From cc1519810b51ae3d832b15e5a3e46f541edf3e09 Mon Sep 17 00:00:00 2001 From: Daniel Arroyo Date: Thu, 9 Jul 2026 18:27:46 -0400 Subject: [PATCH] chore: stop tracking build artifacts in internal/webui/dist (regenerated by build) --- internal/webui/dist/assets/index-B2TqqDPF.js | 340 ------------------ internal/webui/dist/assets/index-BA6Z4BXQ.css | 1 - internal/webui/dist/assets/index-BCf_AnPS.js | 335 ----------------- internal/webui/dist/assets/index-BepSbXPY.css | 1 - internal/webui/dist/index.html | 14 - 5 files changed, 691 deletions(-) delete mode 100644 internal/webui/dist/assets/index-B2TqqDPF.js delete mode 100644 internal/webui/dist/assets/index-BA6Z4BXQ.css delete mode 100644 internal/webui/dist/assets/index-BCf_AnPS.js delete mode 100644 internal/webui/dist/assets/index-BepSbXPY.css delete mode 100644 internal/webui/dist/index.html diff --git a/internal/webui/dist/assets/index-B2TqqDPF.js b/internal/webui/dist/assets/index-B2TqqDPF.js deleted file mode 100644 index 1b7740a..0000000 --- a/internal/webui/dist/assets/index-B2TqqDPF.js +++ /dev/null @@ -1,340 +0,0 @@ -var Xy=Object.defineProperty;var qy=(n,o,s)=>o in n?Xy(n,o,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[o]=s;var Mp=(n,o,s)=>qy(n,typeof o!="symbol"?o+"":o,s);function Jy(n,o){for(var s=0;sa[u]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))a(u);new MutationObserver(u=>{for(const d of u)if(d.type==="childList")for(const p of d.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&a(p)}).observe(document,{childList:!0,subtree:!0});function s(u){const d={};return u.integrity&&(d.integrity=u.integrity),u.referrerPolicy&&(d.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?d.credentials="include":u.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function a(u){if(u.ep)return;u.ep=!0;const d=s(u);fetch(u.href,d)}})();function yu(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Lc={exports:{}},Ls={},Ac={exports:{}},Pe={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Op;function Zy(){if(Op)return Pe;Op=1;var n=Symbol.for("react.element"),o=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),d=Symbol.for("react.provider"),p=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),g=Symbol.iterator;function k(O){return O===null||typeof O!="object"?null:(O=g&&O[g]||O["@@iterator"],typeof O=="function"?O:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,b={};function N(O,V,J){this.props=O,this.context=V,this.refs=b,this.updater=J||S}N.prototype.isReactComponent={},N.prototype.setState=function(O,V){if(typeof O!="object"&&typeof O!="function"&&O!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,O,V,"setState")},N.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function E(){}E.prototype=N.prototype;function T(O,V,J){this.props=O,this.context=V,this.refs=b,this.updater=J||S}var _=T.prototype=new E;_.constructor=T,C(_,N.prototype),_.isPureReactComponent=!0;var L=Array.isArray,I=Object.prototype.hasOwnProperty,W={current:null},B={key:!0,ref:!0,__self:!0,__source:!0};function P(O,V,J){var le,ae={},ue=null,se=null;if(V!=null)for(le in V.ref!==void 0&&(se=V.ref),V.key!==void 0&&(ue=""+V.key),V)I.call(V,le)&&!B.hasOwnProperty(le)&&(ae[le]=V[le]);var ne=arguments.length-2;if(ne===1)ae.children=J;else if(1>>1,V=U[O];if(0>>1;Ou(ae,F))ueu(se,ae)?(U[O]=se,U[ue]=F,O=ue):(U[O]=ae,U[le]=F,O=le);else if(ueu(se,F))U[O]=se,U[ue]=F,O=ue;else break e}}return q}function u(U,q){var F=U.sortIndex-q.sortIndex;return F!==0?F:U.id-q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var p=Date,m=p.now();n.unstable_now=function(){return p.now()-m}}var h=[],y=[],w=1,g=null,k=3,S=!1,C=!1,b=!1,N=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(U){for(var q=s(y);q!==null;){if(q.callback===null)a(y);else if(q.startTime<=U)a(y),q.sortIndex=q.expirationTime,o(h,q);else break;q=s(y)}}function L(U){if(b=!1,_(U),!C)if(s(h)!==null)C=!0,K(I);else{var q=s(y);q!==null&&X(L,q.startTime-U)}}function I(U,q){C=!1,b&&(b=!1,E(P),P=-1),S=!0;var F=k;try{for(_(q),g=s(h);g!==null&&(!(g.expirationTime>q)||U&&!oe());){var O=g.callback;if(typeof O=="function"){g.callback=null,k=g.priorityLevel;var V=O(g.expirationTime<=q);q=n.unstable_now(),typeof V=="function"?g.callback=V:g===s(h)&&a(h),_(q)}else a(h);g=s(h)}if(g!==null)var J=!0;else{var le=s(y);le!==null&&X(L,le.startTime-q),J=!1}return J}finally{g=null,k=F,S=!1}}var W=!1,B=null,P=-1,ee=5,ie=-1;function oe(){return!(n.unstable_now()-ieU||125O?(U.sortIndex=F,o(y,U),s(h)===null&&U===s(y)&&(b?(E(P),P=-1):b=!0,X(L,F-O))):(U.sortIndex=V,o(h,U),C||S||(C=!0,K(I))),U},n.unstable_shouldYield=oe,n.unstable_wrapCallback=function(U){var q=k;return function(){var F=k;k=q;try{return U.apply(this,arguments)}finally{k=F}}}})(zc)),zc}var zp;function rx(){return zp||(zp=1,Dc.exports=nx()),Dc.exports}/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Fp;function ox(){if(Fp)return Tt;Fp=1;var n=xu(),o=rx();function s(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,y=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,w={},g={};function k(e){return h.call(g,e)?!0:h.call(w,e)?!1:y.test(e)?g[e]=!0:(w[e]=!0,!1)}function S(e,t,r,i){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return i?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function C(e,t,r,i){if(t===null||typeof t>"u"||S(e,t,r,i))return!0;if(i)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function b(e,t,r,i,c,f,x){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=i,this.attributeNamespace=c,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=f,this.removeEmptyString=x}var N={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){N[e]=new b(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];N[t]=new b(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){N[e]=new b(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){N[e]=new b(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){N[e]=new b(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){N[e]=new b(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){N[e]=new b(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){N[e]=new b(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){N[e]=new b(e,5,!1,e.toLowerCase(),null,!1,!1)});var E=/[\-:]([a-z])/g;function T(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(E,T);N[t]=new b(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(E,T);N[t]=new b(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(E,T);N[t]=new b(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){N[e]=new b(e,1,!1,e.toLowerCase(),null,!1,!1)}),N.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){N[e]=new b(e,1,!1,e.toLowerCase(),null,!0,!0)});function _(e,t,r,i){var c=N.hasOwnProperty(t)?N[t]:null;(c!==null?c.type!==0:i||!(2j||c[x]!==f[j]){var R=` -`+c[x].replace(" at new "," at ");return e.displayName&&R.includes("")&&(R=R.replace("",e.displayName)),R}while(1<=x&&0<=j);break}}}finally{J=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?V(e):""}function ae(e){switch(e.tag){case 5:return V(e.type);case 16:return V("Lazy");case 13:return V("Suspense");case 19:return V("SuspenseList");case 0:case 2:case 15:return e=le(e.type,!1),e;case 11:return e=le(e.type.render,!1),e;case 1:return e=le(e.type,!0),e;default:return""}}function ue(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case B:return"Fragment";case W:return"Portal";case ee:return"Profiler";case P:return"StrictMode";case H:return"Suspense";case z:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case oe:return(e.displayName||"Context")+".Consumer";case ie:return(e._context.displayName||"Context")+".Provider";case pe:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case te:return t=e.displayName||null,t!==null?t:ue(e.type)||"Memo";case K:t=e._payload,e=e._init;try{return ue(e(t))}catch{}}return null}function se(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ue(t);case 8:return t===P?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ne(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function de(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ke(e){var t=de(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var c=r.get,f=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(x){i=""+x,f.call(this,x)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return i},setValue:function(x){i=""+x},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ne(e){e._valueTracker||(e._valueTracker=ke(e))}function Ee(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),i="";return e&&(i=de(e)?e.checked?"true":"false":e.value),e=i,e!==r?(t.setValue(e),!0):!1}function qe(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function We(e,t){var r=t.checked;return F({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Zt(e,t){var r=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;r=ne(t.value!=null?t.value:r),e._wrapperState={initialChecked:i,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function en(e,t){t=t.checked,t!=null&&_(e,"checked",t,!1)}function St(e,t){en(e,t);var r=ne(t.value),i=t.type;if(r!=null)i==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?kt(e,t.type,r):t.hasOwnProperty("defaultValue")&&kt(e,t.type,ne(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Lr(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!(i!=="submit"&&i!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function kt(e,t,r){(t!=="number"||qe(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Vt=Array.isArray;function Xn(e,t,r,i){if(e=e.options,t){t={};for(var c=0;c"+t.valueOf().toString()+"",t=Ir.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Wt(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var qn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Jn=["Webkit","ms","Moz","O"];Object.keys(qn).forEach(function(e){Jn.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),qn[t]=qn[e]})});function Zs(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||qn.hasOwnProperty(e)&&qn[e]?(""+t).trim():t+"px"}function ei(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var i=r.indexOf("--")===0,c=Zs(r,t[r],i);r==="float"&&(r="cssFloat"),i?e.setProperty(r,c):e[r]=c}}var ti=F({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function so(e,t){if(t){if(ti[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(s(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(s(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(s(61))}if(t.style!=null&&typeof t.style!="object")throw Error(s(62))}}function qo(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Dr=null;function Ht(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Jo=null,Zn=null,Ln=null;function Zo(e){if(e=xs(e)){if(typeof Jo!="function")throw Error(s(280));var t=e.stateNode;t&&(t=Si(t),Jo(e.stateNode,e.type,t))}}function je(e){Zn?Ln?Ln.push(e):Ln=[e]:Zn=e}function Je(){if(Zn){var e=Zn,t=Ln;if(Ln=Zn=null,Zo(e),t)for(e=0;e>>=0,e===0?32:31-(fv(e)/pv|0)|0}var oi=64,si=4194304;function ts(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ii(e,t){var r=e.pendingLanes;if(r===0)return 0;var i=0,c=e.suspendedLanes,f=e.pingedLanes,x=r&268435455;if(x!==0){var j=x&~c;j!==0?i=ts(j):(f&=x,f!==0&&(i=ts(f)))}else x=r&~c,x!==0?i=ts(x):f!==0&&(i=ts(f));if(i===0)return 0;if(t!==0&&t!==i&&(t&c)===0&&(c=i&-i,f=t&-t,c>=f||c===16&&(f&4194240)!==0))return t;if((i&4)!==0&&(i|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=i;0r;r++)t.push(e);return t}function ns(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-tn(t),e[t]=r}function vv(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var i=e.eventTimes;for(e=e.expirationTimes;0=us),Cd=" ",Nd=!1;function jd(e,t){switch(e){case"keyup":return Hv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ed(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var lo=!1;function Yv(e,t){switch(e){case"compositionend":return Ed(t);case"keypress":return t.which!==32?null:(Nd=!0,Cd);case"textInput":return e=t.data,e===Cd&&Nd?null:e;default:return null}}function Gv(e,t){if(lo)return e==="compositionend"||!ml&&jd(e,t)?(e=yd(),di=ll=ar=null,lo=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=i}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Ld(r)}}function Id(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Id(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Dd(){for(var e=window,t=qe();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=qe(e.document)}return t}function vl(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function ry(e){var t=Dd(),r=e.focusedElem,i=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Id(r.ownerDocument.documentElement,r)){if(i!==null&&vl(r)){if(t=i.start,e=i.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var c=r.textContent.length,f=Math.min(i.start,c);i=i.end===void 0?f:Math.min(i.end,c),!e.extend&&f>i&&(c=i,i=f,f=c),c=Ad(r,f);var x=Ad(r,i);c&&x&&(e.rangeCount!==1||e.anchorNode!==c.node||e.anchorOffset!==c.offset||e.focusNode!==x.node||e.focusOffset!==x.offset)&&(t=t.createRange(),t.setStart(c.node,c.offset),e.removeAllRanges(),f>i?(e.addRange(t),e.extend(x.node,x.offset)):(t.setEnd(x.node,x.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,co=null,yl=null,ms=null,xl=!1;function zd(e,t,r){var i=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;xl||co==null||co!==qe(i)||(i=co,"selectionStart"in i&&vl(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),ms&&ps(ms,i)||(ms=i,i=xi(yl,"onSelect"),0ho||(e.current=Tl[ho],Tl[ho]=null,ho--)}function De(e,t){ho++,Tl[ho]=e.current,e.current=t}var dr={},yt=ur(dr),jt=ur(!1),$r=dr;function go(e,t){var r=e.type.contextTypes;if(!r)return dr;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var c={},f;for(f in r)c[f]=t[f];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=c),c}function Et(e){return e=e.childContextTypes,e!=null}function ki(){Ve(jt),Ve(yt)}function Zd(e,t,r){if(yt.current!==dr)throw Error(s(168));De(yt,t),De(jt,r)}function ef(e,t,r){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!="function")return r;i=i.getChildContext();for(var c in i)if(!(c in t))throw Error(s(108,se(e)||"Unknown",c));return F({},r,i)}function Ci(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||dr,$r=yt.current,De(yt,e),De(jt,jt.current),!0}function tf(e,t,r){var i=e.stateNode;if(!i)throw Error(s(169));r?(e=ef(e,t,$r),i.__reactInternalMemoizedMergedChildContext=e,Ve(jt),Ve(yt),De(yt,e)):Ve(jt),De(jt,r)}var In=null,Ni=!1,Ml=!1;function nf(e){In===null?In=[e]:In.push(e)}function hy(e){Ni=!0,nf(e)}function fr(){if(!Ml&&In!==null){Ml=!0;var e=0,t=Le;try{var r=In;for(Le=1;e>=x,c-=x,Dn=1<<32-tn(t)+c|r<Ce?(ut=be,be=null):ut=be.sibling;var Oe=Y(A,be,D[Ce],Z);if(Oe===null){be===null&&(be=ut);break}e&&be&&Oe.alternate===null&&t(A,be),M=f(Oe,M,Ce),we===null?ye=Oe:we.sibling=Oe,we=Oe,be=ut}if(Ce===D.length)return r(A,be),He&&Ur(A,Ce),ye;if(be===null){for(;CeCe?(ut=be,be=null):ut=be.sibling;var br=Y(A,be,Oe.value,Z);if(br===null){be===null&&(be=ut);break}e&&be&&br.alternate===null&&t(A,be),M=f(br,M,Ce),we===null?ye=br:we.sibling=br,we=br,be=ut}if(Oe.done)return r(A,be),He&&Ur(A,Ce),ye;if(be===null){for(;!Oe.done;Ce++,Oe=D.next())Oe=Q(A,Oe.value,Z),Oe!==null&&(M=f(Oe,M,Ce),we===null?ye=Oe:we.sibling=Oe,we=Oe);return He&&Ur(A,Ce),ye}for(be=i(A,be);!Oe.done;Ce++,Oe=D.next())Oe=ce(be,A,Ce,Oe.value,Z),Oe!==null&&(e&&Oe.alternate!==null&&be.delete(Oe.key===null?Ce:Oe.key),M=f(Oe,M,Ce),we===null?ye=Oe:we.sibling=Oe,we=Oe);return e&&be.forEach(function(Qy){return t(A,Qy)}),He&&Ur(A,Ce),ye}function et(A,M,D,Z){if(typeof D=="object"&&D!==null&&D.type===B&&D.key===null&&(D=D.props.children),typeof D=="object"&&D!==null){switch(D.$$typeof){case I:e:{for(var ye=D.key,we=M;we!==null;){if(we.key===ye){if(ye=D.type,ye===B){if(we.tag===7){r(A,we.sibling),M=c(we,D.props.children),M.return=A,A=M;break e}}else if(we.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===K&&cf(ye)===we.type){r(A,we.sibling),M=c(we,D.props),M.ref=ws(A,we,D),M.return=A,A=M;break e}r(A,we);break}else t(A,we);we=we.sibling}D.type===B?(M=Xr(D.props.children,A.mode,Z,D.key),M.return=A,A=M):(Z=Zi(D.type,D.key,D.props,null,A.mode,Z),Z.ref=ws(A,M,D),Z.return=A,A=Z)}return x(A);case W:e:{for(we=D.key;M!==null;){if(M.key===we)if(M.tag===4&&M.stateNode.containerInfo===D.containerInfo&&M.stateNode.implementation===D.implementation){r(A,M.sibling),M=c(M,D.children||[]),M.return=A,A=M;break e}else{r(A,M);break}else t(A,M);M=M.sibling}M=Pc(D,A.mode,Z),M.return=A,A=M}return x(A);case K:return we=D._init,et(A,M,we(D._payload),Z)}if(Vt(D))return ge(A,M,D,Z);if(q(D))return ve(A,M,D,Z);Pi(A,D)}return typeof D=="string"&&D!==""||typeof D=="number"?(D=""+D,M!==null&&M.tag===6?(r(A,M.sibling),M=c(M,D),M.return=A,A=M):(r(A,M),M=_c(D,A.mode,Z),M.return=A,A=M),x(A)):r(A,M)}return et}var wo=uf(!0),df=uf(!1),Ri=ur(null),Ti=null,bo=null,zl=null;function Fl(){zl=bo=Ti=null}function $l(e){var t=Ri.current;Ve(Ri),e._currentValue=t}function Bl(e,t,r){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===r)break;e=e.return}}function So(e,t){Ti=e,zl=bo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(_t=!0),e.firstContext=null)}function Qt(e){var t=e._currentValue;if(zl!==e)if(e={context:e,memoizedValue:t,next:null},bo===null){if(Ti===null)throw Error(s(308));bo=e,Ti.dependencies={lanes:0,firstContext:e}}else bo=bo.next=e;return t}var Vr=null;function Ul(e){Vr===null?Vr=[e]:Vr.push(e)}function ff(e,t,r,i){var c=t.interleaved;return c===null?(r.next=r,Ul(t)):(r.next=c.next,c.next=r),t.interleaved=r,Fn(e,i)}function Fn(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var pr=!1;function Vl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function pf(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function $n(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function mr(e,t,r){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(Me&2)!==0){var c=i.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),i.pending=t,Fn(e,r)}return c=i.interleaved,c===null?(t.next=t,Ul(i)):(t.next=c.next,c.next=t),i.interleaved=t,Fn(e,r)}function Mi(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,rl(e,r)}}function mf(e,t){var r=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,r===i)){var c=null,f=null;if(r=r.firstBaseUpdate,r!==null){do{var x={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};f===null?c=f=x:f=f.next=x,r=r.next}while(r!==null);f===null?c=f=t:f=f.next=t}else c=f=t;r={baseState:i.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:i.shared,effects:i.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Oi(e,t,r,i){var c=e.updateQueue;pr=!1;var f=c.firstBaseUpdate,x=c.lastBaseUpdate,j=c.shared.pending;if(j!==null){c.shared.pending=null;var R=j,$=R.next;R.next=null,x===null?f=$:x.next=$,x=R;var G=e.alternate;G!==null&&(G=G.updateQueue,j=G.lastBaseUpdate,j!==x&&(j===null?G.firstBaseUpdate=$:j.next=$,G.lastBaseUpdate=R))}if(f!==null){var Q=c.baseState;x=0,G=$=R=null,j=f;do{var Y=j.lane,ce=j.eventTime;if((i&Y)===Y){G!==null&&(G=G.next={eventTime:ce,lane:0,tag:j.tag,payload:j.payload,callback:j.callback,next:null});e:{var ge=e,ve=j;switch(Y=t,ce=r,ve.tag){case 1:if(ge=ve.payload,typeof ge=="function"){Q=ge.call(ce,Q,Y);break e}Q=ge;break e;case 3:ge.flags=ge.flags&-65537|128;case 0:if(ge=ve.payload,Y=typeof ge=="function"?ge.call(ce,Q,Y):ge,Y==null)break e;Q=F({},Q,Y);break e;case 2:pr=!0}}j.callback!==null&&j.lane!==0&&(e.flags|=64,Y=c.effects,Y===null?c.effects=[j]:Y.push(j))}else ce={eventTime:ce,lane:Y,tag:j.tag,payload:j.payload,callback:j.callback,next:null},G===null?($=G=ce,R=Q):G=G.next=ce,x|=Y;if(j=j.next,j===null){if(j=c.shared.pending,j===null)break;Y=j,j=Y.next,Y.next=null,c.lastBaseUpdate=Y,c.shared.pending=null}}while(!0);if(G===null&&(R=Q),c.baseState=R,c.firstBaseUpdate=$,c.lastBaseUpdate=G,t=c.shared.interleaved,t!==null){c=t;do x|=c.lane,c=c.next;while(c!==t)}else f===null&&(c.shared.lanes=0);Kr|=x,e.lanes=x,e.memoizedState=Q}}function hf(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var i=Gl.transition;Gl.transition={};try{e(!1),t()}finally{Le=r,Gl.transition=i}}function Lf(){return Xt().memoizedState}function xy(e,t,r){var i=yr(e);if(r={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null},Af(e))If(t,r);else if(r=ff(e,t,r,i),r!==null){var c=Nt();ln(r,e,i,c),Df(r,t,i)}}function wy(e,t,r){var i=yr(e),c={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null};if(Af(e))If(t,c);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var x=t.lastRenderedState,j=f(x,r);if(c.hasEagerState=!0,c.eagerState=j,nn(j,x)){var R=t.interleaved;R===null?(c.next=c,Ul(t)):(c.next=R.next,R.next=c),t.interleaved=c;return}}catch{}finally{}r=ff(e,t,c,i),r!==null&&(c=Nt(),ln(r,e,i,c),Df(r,t,i))}}function Af(e){var t=e.alternate;return e===Ye||t!==null&&t===Ye}function If(e,t){Cs=Ii=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Df(e,t,r){if((r&4194240)!==0){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,rl(e,r)}}var Fi={readContext:Qt,useCallback:xt,useContext:xt,useEffect:xt,useImperativeHandle:xt,useInsertionEffect:xt,useLayoutEffect:xt,useMemo:xt,useReducer:xt,useRef:xt,useState:xt,useDebugValue:xt,useDeferredValue:xt,useTransition:xt,useMutableSource:xt,useSyncExternalStore:xt,useId:xt,unstable_isNewReconciler:!1},by={readContext:Qt,useCallback:function(e,t){return Sn().memoizedState=[e,t===void 0?null:t],e},useContext:Qt,useEffect:jf,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Di(4194308,4,Pf.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Di(4194308,4,e,t)},useInsertionEffect:function(e,t){return Di(4,2,e,t)},useMemo:function(e,t){var r=Sn();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var i=Sn();return t=r!==void 0?r(t):t,i.memoizedState=i.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},i.queue=e,e=e.dispatch=xy.bind(null,Ye,e),[i.memoizedState,e]},useRef:function(e){var t=Sn();return e={current:e},t.memoizedState=e},useState:Cf,useDebugValue:tc,useDeferredValue:function(e){return Sn().memoizedState=e},useTransition:function(){var e=Cf(!1),t=e[0];return e=yy.bind(null,e[1]),Sn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var i=Ye,c=Sn();if(He){if(r===void 0)throw Error(s(407));r=r()}else{if(r=t(),ct===null)throw Error(s(349));(Hr&30)!==0||xf(i,t,r)}c.memoizedState=r;var f={value:r,getSnapshot:t};return c.queue=f,jf(bf.bind(null,i,f,e),[e]),i.flags|=2048,Es(9,wf.bind(null,i,f,r,t),void 0,null),r},useId:function(){var e=Sn(),t=ct.identifierPrefix;if(He){var r=zn,i=Dn;r=(i&~(1<<32-tn(i)-1)).toString(32)+r,t=":"+t+"R"+r,r=Ns++,0<\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=x.createElement(r,{is:i.is}):(e=x.createElement(r),r==="select"&&(x=e,i.multiple?x.multiple=!0:i.size&&(x.size=i.size))):e=x.createElementNS(e,r),e[wn]=t,e[ys]=i,rp(e,t,!1,!1),t.stateNode=e;e:{switch(x=qo(r,i),r){case"dialog":Ue("cancel",e),Ue("close",e),c=i;break;case"iframe":case"object":case"embed":Ue("load",e),c=i;break;case"video":case"audio":for(c=0;cEo&&(t.flags|=128,i=!0,_s(f,!1),t.lanes=4194304)}else{if(!i)if(e=Li(x),e!==null){if(t.flags|=128,i=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),_s(f,!0),f.tail===null&&f.tailMode==="hidden"&&!x.alternate&&!He)return wt(t),null}else 2*Ze()-f.renderingStartTime>Eo&&r!==1073741824&&(t.flags|=128,i=!0,_s(f,!1),t.lanes=4194304);f.isBackwards?(x.sibling=t.child,t.child=x):(r=f.last,r!==null?r.sibling=x:t.child=x,f.last=x)}return f.tail!==null?(t=f.tail,f.rendering=t,f.tail=t.sibling,f.renderingStartTime=Ze(),t.sibling=null,r=Ke.current,De(Ke,i?r&1|2:r&1),t):(wt(t),null);case 22:case 23:return Nc(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&(t.mode&1)!==0?(zt&1073741824)!==0&&(wt(t),t.subtreeFlags&6&&(t.flags|=8192)):wt(t),null;case 24:return null;case 25:return null}throw Error(s(156,t.tag))}function Py(e,t){switch(Ll(t),t.tag){case 1:return Et(t.type)&&ki(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ko(),Ve(jt),Ve(yt),Yl(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Hl(t),null;case 13:if(Ve(Ke),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));xo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ve(Ke),null;case 4:return ko(),null;case 10:return $l(t.type._context),null;case 22:case 23:return Nc(),null;case 24:return null;default:return null}}var Vi=!1,bt=!1,Ry=typeof WeakSet=="function"?WeakSet:Set,me=null;function No(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(i){Xe(e,t,i)}else r.current=null}function pc(e,t,r){try{r()}catch(i){Xe(e,t,i)}}var ip=!1;function Ty(e,t){if(Nl=ci,e=Dd(),vl(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var c=i.anchorOffset,f=i.focusNode;i=i.focusOffset;try{r.nodeType,f.nodeType}catch{r=null;break e}var x=0,j=-1,R=-1,$=0,G=0,Q=e,Y=null;t:for(;;){for(var ce;Q!==r||c!==0&&Q.nodeType!==3||(j=x+c),Q!==f||i!==0&&Q.nodeType!==3||(R=x+i),Q.nodeType===3&&(x+=Q.nodeValue.length),(ce=Q.firstChild)!==null;)Y=Q,Q=ce;for(;;){if(Q===e)break t;if(Y===r&&++$===c&&(j=x),Y===f&&++G===i&&(R=x),(ce=Q.nextSibling)!==null)break;Q=Y,Y=Q.parentNode}Q=ce}r=j===-1||R===-1?null:{start:j,end:R}}else r=null}r=r||{start:0,end:0}}else r=null;for(jl={focusedElem:e,selectionRange:r},ci=!1,me=t;me!==null;)if(t=me,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,me=e;else for(;me!==null;){t=me;try{var ge=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(ge!==null){var ve=ge.memoizedProps,et=ge.memoizedState,A=t.stateNode,M=A.getSnapshotBeforeUpdate(t.elementType===t.type?ve:on(t.type,ve),et);A.__reactInternalSnapshotBeforeUpdate=M}break;case 3:var D=t.stateNode.containerInfo;D.nodeType===1?D.textContent="":D.nodeType===9&&D.documentElement&&D.removeChild(D.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(Z){Xe(t,t.return,Z)}if(e=t.sibling,e!==null){e.return=t.return,me=e;break}me=t.return}return ge=ip,ip=!1,ge}function Ps(e,t,r){var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var c=i=i.next;do{if((c.tag&e)===e){var f=c.destroy;c.destroy=void 0,f!==void 0&&pc(t,r,f)}c=c.next}while(c!==i)}}function Wi(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var i=r.create;r.destroy=i()}r=r.next}while(r!==t)}}function mc(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function ap(e){var t=e.alternate;t!==null&&(e.alternate=null,ap(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[wn],delete t[ys],delete t[Rl],delete t[py],delete t[my])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function lp(e){return e.tag===5||e.tag===3||e.tag===4}function cp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||lp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function hc(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=bi));else if(i!==4&&(e=e.child,e!==null))for(hc(e,t,r),e=e.sibling;e!==null;)hc(e,t,r),e=e.sibling}function gc(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(gc(e,t,r),e=e.sibling;e!==null;)gc(e,t,r),e=e.sibling}var pt=null,sn=!1;function hr(e,t,r){for(r=r.child;r!==null;)up(e,t,r),r=r.sibling}function up(e,t,r){if(xn&&typeof xn.onCommitFiberUnmount=="function")try{xn.onCommitFiberUnmount(ri,r)}catch{}switch(r.tag){case 5:bt||No(r,t);case 6:var i=pt,c=sn;pt=null,hr(e,t,r),pt=i,sn=c,pt!==null&&(sn?(e=pt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):pt.removeChild(r.stateNode));break;case 18:pt!==null&&(sn?(e=pt,r=r.stateNode,e.nodeType===8?Pl(e.parentNode,r):e.nodeType===1&&Pl(e,r),as(e)):Pl(pt,r.stateNode));break;case 4:i=pt,c=sn,pt=r.stateNode.containerInfo,sn=!0,hr(e,t,r),pt=i,sn=c;break;case 0:case 11:case 14:case 15:if(!bt&&(i=r.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){c=i=i.next;do{var f=c,x=f.destroy;f=f.tag,x!==void 0&&((f&2)!==0||(f&4)!==0)&&pc(r,t,x),c=c.next}while(c!==i)}hr(e,t,r);break;case 1:if(!bt&&(No(r,t),i=r.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=r.memoizedProps,i.state=r.memoizedState,i.componentWillUnmount()}catch(j){Xe(r,t,j)}hr(e,t,r);break;case 21:hr(e,t,r);break;case 22:r.mode&1?(bt=(i=bt)||r.memoizedState!==null,hr(e,t,r),bt=i):hr(e,t,r);break;default:hr(e,t,r)}}function dp(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Ry),t.forEach(function(i){var c=$y.bind(null,e,i);r.has(i)||(r.add(i),i.then(c,c))})}}function an(e,t){var r=t.deletions;if(r!==null)for(var i=0;ic&&(c=x),i&=~f}if(i=c,i=Ze()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Oy(i/1960))-i,10e?16:e,vr===null)var i=!1;else{if(e=vr,vr=null,Qi=0,(Me&6)!==0)throw Error(s(331));var c=Me;for(Me|=4,me=e.current;me!==null;){var f=me,x=f.child;if((me.flags&16)!==0){var j=f.deletions;if(j!==null){for(var R=0;RZe()-xc?Gr(e,0):yc|=r),Rt(e,t)}function Cp(e,t){t===0&&((e.mode&1)===0?t=1:(t=si,si<<=1,(si&130023424)===0&&(si=4194304)));var r=Nt();e=Fn(e,t),e!==null&&(ns(e,t,r),Rt(e,r))}function Fy(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Cp(e,r)}function $y(e,t){var r=0;switch(e.tag){case 13:var i=e.stateNode,c=e.memoizedState;c!==null&&(r=c.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(s(314))}i!==null&&i.delete(t),Cp(e,r)}var Np;Np=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||jt.current)_t=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return _t=!1,Ey(e,t,r);_t=(e.flags&131072)!==0}else _t=!1,He&&(t.flags&1048576)!==0&&rf(t,Ei,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;Ui(e,t),e=t.pendingProps;var c=go(t,yt.current);So(t,r),c=Xl(null,t,i,e,c,r);var f=ql();return t.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Et(i)?(f=!0,Ci(t)):f=!1,t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,Vl(t),c.updater=$i,t.stateNode=c,c._reactInternals=t,rc(t,i,e,r),t=ac(null,t,i,!0,f,r)):(t.tag=0,He&&f&&Ol(t),Ct(null,t,c,r),t=t.child),t;case 16:i=t.elementType;e:{switch(Ui(e,t),e=t.pendingProps,c=i._init,i=c(i._payload),t.type=i,c=t.tag=Uy(i),e=on(i,e),c){case 0:t=ic(null,t,i,e,r);break e;case 1:t=qf(null,t,i,e,r);break e;case 11:t=Kf(null,t,i,e,r);break e;case 14:t=Yf(null,t,i,on(i.type,e),r);break e}throw Error(s(306,i,""))}return t;case 0:return i=t.type,c=t.pendingProps,c=t.elementType===i?c:on(i,c),ic(e,t,i,c,r);case 1:return i=t.type,c=t.pendingProps,c=t.elementType===i?c:on(i,c),qf(e,t,i,c,r);case 3:e:{if(Jf(t),e===null)throw Error(s(387));i=t.pendingProps,f=t.memoizedState,c=f.element,pf(e,t),Oi(t,i,null,r);var x=t.memoizedState;if(i=x.element,f.isDehydrated)if(f={element:i,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){c=Co(Error(s(423)),t),t=Zf(e,t,i,r,c);break e}else if(i!==c){c=Co(Error(s(424)),t),t=Zf(e,t,i,r,c);break e}else for(Dt=cr(t.stateNode.containerInfo.firstChild),It=t,He=!0,rn=null,r=df(t,null,i,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(xo(),i===c){t=Bn(e,t,r);break e}Ct(e,t,i,r)}t=t.child}return t;case 5:return gf(t),e===null&&Il(t),i=t.type,c=t.pendingProps,f=e!==null?e.memoizedProps:null,x=c.children,El(i,c)?x=null:f!==null&&El(i,f)&&(t.flags|=32),Xf(e,t),Ct(e,t,x,r),t.child;case 6:return e===null&&Il(t),null;case 13:return ep(e,t,r);case 4:return Wl(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=wo(t,null,i,r):Ct(e,t,i,r),t.child;case 11:return i=t.type,c=t.pendingProps,c=t.elementType===i?c:on(i,c),Kf(e,t,i,c,r);case 7:return Ct(e,t,t.pendingProps,r),t.child;case 8:return Ct(e,t,t.pendingProps.children,r),t.child;case 12:return Ct(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(i=t.type._context,c=t.pendingProps,f=t.memoizedProps,x=c.value,De(Ri,i._currentValue),i._currentValue=x,f!==null)if(nn(f.value,x)){if(f.children===c.children&&!jt.current){t=Bn(e,t,r);break e}}else for(f=t.child,f!==null&&(f.return=t);f!==null;){var j=f.dependencies;if(j!==null){x=f.child;for(var R=j.firstContext;R!==null;){if(R.context===i){if(f.tag===1){R=$n(-1,r&-r),R.tag=2;var $=f.updateQueue;if($!==null){$=$.shared;var G=$.pending;G===null?R.next=R:(R.next=G.next,G.next=R),$.pending=R}}f.lanes|=r,R=f.alternate,R!==null&&(R.lanes|=r),Bl(f.return,r,t),j.lanes|=r;break}R=R.next}}else if(f.tag===10)x=f.type===t.type?null:f.child;else if(f.tag===18){if(x=f.return,x===null)throw Error(s(341));x.lanes|=r,j=x.alternate,j!==null&&(j.lanes|=r),Bl(x,r,t),x=f.sibling}else x=f.child;if(x!==null)x.return=f;else for(x=f;x!==null;){if(x===t){x=null;break}if(f=x.sibling,f!==null){f.return=x.return,x=f;break}x=x.return}f=x}Ct(e,t,c.children,r),t=t.child}return t;case 9:return c=t.type,i=t.pendingProps.children,So(t,r),c=Qt(c),i=i(c),t.flags|=1,Ct(e,t,i,r),t.child;case 14:return i=t.type,c=on(i,t.pendingProps),c=on(i.type,c),Yf(e,t,i,c,r);case 15:return Gf(e,t,t.type,t.pendingProps,r);case 17:return i=t.type,c=t.pendingProps,c=t.elementType===i?c:on(i,c),Ui(e,t),t.tag=1,Et(i)?(e=!0,Ci(t)):e=!1,So(t,r),Ff(t,i,c),rc(t,i,c,r),ac(null,t,i,!0,e,r);case 19:return np(e,t,r);case 22:return Qf(e,t,r)}throw Error(s(156,t.tag))};function jp(e,t){return od(e,t)}function By(e,t,r,i){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Jt(e,t,r,i){return new By(e,t,r,i)}function Ec(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Uy(e){if(typeof e=="function")return Ec(e)?1:0;if(e!=null){if(e=e.$$typeof,e===pe)return 11;if(e===te)return 14}return 2}function wr(e,t){var r=e.alternate;return r===null?(r=Jt(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Zi(e,t,r,i,c,f){var x=2;if(i=e,typeof e=="function")Ec(e)&&(x=1);else if(typeof e=="string")x=5;else e:switch(e){case B:return Xr(r.children,c,f,t);case P:x=8,c|=8;break;case ee:return e=Jt(12,r,t,c|2),e.elementType=ee,e.lanes=f,e;case H:return e=Jt(13,r,t,c),e.elementType=H,e.lanes=f,e;case z:return e=Jt(19,r,t,c),e.elementType=z,e.lanes=f,e;case X:return ea(r,c,f,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ie:x=10;break e;case oe:x=9;break e;case pe:x=11;break e;case te:x=14;break e;case K:x=16,i=null;break e}throw Error(s(130,e==null?e:typeof e,""))}return t=Jt(x,r,t,c),t.elementType=e,t.type=i,t.lanes=f,t}function Xr(e,t,r,i){return e=Jt(7,e,i,t),e.lanes=r,e}function ea(e,t,r,i){return e=Jt(22,e,i,t),e.elementType=X,e.lanes=r,e.stateNode={isHidden:!1},e}function _c(e,t,r){return e=Jt(6,e,null,t),e.lanes=r,e}function Pc(e,t,r){return t=Jt(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Vy(e,t,r,i,c){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=nl(0),this.expirationTimes=nl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nl(0),this.identifierPrefix=i,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function Rc(e,t,r,i,c,f,x,j,R){return e=new Vy(e,t,r,j,R),t===1?(t=1,f===!0&&(t|=8)):t=0,f=Jt(3,null,null,t),e.current=f,f.stateNode=e,f.memoizedState={element:i,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Vl(f),e}function Wy(e,t,r){var i=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(o){console.error(o)}}return n(),Ic.exports=ox(),Ic.exports}var Bp;function sx(){if(Bp)return aa;Bp=1;var n=Um();return aa.createRoot=n.createRoot,aa.hydrateRoot=n.hydrateRoot,aa}var ix=sx();const ax=yu(ix);var Vo=Um();const lx=yu(Vo);/** - * @remix-run/router v1.23.3 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Bs(){return Bs=Object.assign?Object.assign.bind():function(n){for(var o=1;o"u")throw new Error(o)}function wu(n,o){if(!n){typeof console<"u"&&console.warn(o);try{throw new Error(o)}catch{}}}function ux(){return Math.random().toString(36).substr(2,8)}function Vp(n,o){return{usr:n.state,key:n.key,idx:o}}function Jc(n,o,s,a){return s===void 0&&(s=null),Bs({pathname:typeof n=="string"?n:n.pathname,search:"",hash:""},typeof o=="string"?Wo(o):o,{state:s,key:o&&o.key||a||ux()})}function ba(n){let{pathname:o="/",search:s="",hash:a=""}=n;return s&&s!=="?"&&(o+=s.charAt(0)==="?"?s:"?"+s),a&&a!=="#"&&(o+=a.charAt(0)==="#"?a:"#"+a),o}function Wo(n){let o={};if(n){let s=n.indexOf("#");s>=0&&(o.hash=n.substr(s),n=n.substr(0,s));let a=n.indexOf("?");a>=0&&(o.search=n.substr(a),n=n.substr(0,a)),n&&(o.pathname=n)}return o}function dx(n,o,s,a){a===void 0&&(a={});let{window:u=document.defaultView,v5Compat:d=!1}=a,p=u.history,m=Cr.Pop,h=null,y=w();y==null&&(y=0,p.replaceState(Bs({},p.state,{idx:y}),""));function w(){return(p.state||{idx:null}).idx}function g(){m=Cr.Pop;let N=w(),E=N==null?null:N-y;y=N,h&&h({action:m,location:b.location,delta:E})}function k(N,E){m=Cr.Push;let T=Jc(b.location,N,E);y=w()+1;let _=Vp(T,y),L=b.createHref(T);try{p.pushState(_,"",L)}catch(I){if(I instanceof DOMException&&I.name==="DataCloneError")throw I;u.location.assign(L)}d&&h&&h({action:m,location:b.location,delta:1})}function S(N,E){m=Cr.Replace;let T=Jc(b.location,N,E);y=w();let _=Vp(T,y),L=b.createHref(T);p.replaceState(_,"",L),d&&h&&h({action:m,location:b.location,delta:0})}function C(N){let E=u.location.origin!=="null"?u.location.origin:u.location.href,T=typeof N=="string"?N:ba(N);return T=T.replace(/ $/,"%20"),Ge(E,"No window.location.(origin|href) available to create URL for href: "+T),new URL(T,E)}let b={get action(){return m},get location(){return n(u,p)},listen(N){if(h)throw new Error("A history only accepts one active listener");return u.addEventListener(Up,g),h=N,()=>{u.removeEventListener(Up,g),h=null}},createHref(N){return o(u,N)},createURL:C,encodeLocation(N){let E=C(N);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:k,replace:S,go(N){return p.go(N)}};return b}var Wp;(function(n){n.data="data",n.deferred="deferred",n.redirect="redirect",n.error="error"})(Wp||(Wp={}));function fx(n,o,s){return s===void 0&&(s="/"),px(n,o,s)}function px(n,o,s,a){let u=typeof o=="string"?Wo(o):o,d=Do(u.pathname||"/",s);if(d==null)return null;let p=Vm(n);mx(p);let m=null,h=Nx(d);for(let y=0;m==null&&y{let h={relativePath:m===void 0?d.path||"":m,caseSensitive:d.caseSensitive===!0,childrenIndex:p,route:d};h.relativePath.startsWith("/")&&(Ge(h.relativePath.startsWith(a),'Absolute route path "'+h.relativePath+'" nested under path '+('"'+a+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),h.relativePath=h.relativePath.slice(a.length));let y=Nr([a,h.relativePath]),w=s.concat(h);d.children&&d.children.length>0&&(Ge(d.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+y+'".')),Vm(d.children,o,w,y)),!(d.path==null&&!d.index)&&o.push({path:y,score:bx(y,d.index),routesMeta:w})};return n.forEach((d,p)=>{var m;if(d.path===""||!((m=d.path)!=null&&m.includes("?")))u(d,p);else for(let h of Wm(d.path))u(d,p,h)}),o}function Wm(n){let o=n.split("/");if(o.length===0)return[];let[s,...a]=o,u=s.endsWith("?"),d=s.replace(/\?$/,"");if(a.length===0)return u?[d,""]:[d];let p=Wm(a.join("/")),m=[];return m.push(...p.map(h=>h===""?d:[d,h].join("/"))),u&&m.push(...p),m.map(h=>n.startsWith("/")&&h===""?"/":h)}function mx(n){n.sort((o,s)=>o.score!==s.score?s.score-o.score:Sx(o.routesMeta.map(a=>a.childrenIndex),s.routesMeta.map(a=>a.childrenIndex)))}const hx=/^:[\w-]+$/,gx=3,vx=2,yx=1,xx=10,wx=-2,Hp=n=>n==="*";function bx(n,o){let s=n.split("/"),a=s.length;return s.some(Hp)&&(a+=wx),o&&(a+=vx),s.filter(u=>!Hp(u)).reduce((u,d)=>u+(hx.test(d)?gx:d===""?yx:xx),a)}function Sx(n,o){return n.length===o.length&&n.slice(0,-1).every((a,u)=>a===o[u])?n[n.length-1]-o[o.length-1]:0}function kx(n,o,s){let{routesMeta:a}=n,u={},d="/",p=[];for(let m=0;m{let{paramName:k,isOptional:S}=w;if(k==="*"){let b=m[g]||"";p=d.slice(0,d.length-b.length).replace(/(.)\/+$/,"$1")}const C=m[g];return S&&!C?y[k]=void 0:y[k]=(C||"").replace(/%2F/g,"/"),y},{}),pathname:d,pathnameBase:p,pattern:n}}function Cx(n,o,s){o===void 0&&(o=!1),s===void 0&&(s=!0),wu(n==="*"||!n.endsWith("*")||n.endsWith("/*"),'Route path "'+n+'" will be treated as if it were '+('"'+n.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+n.replace(/\*$/,"/*")+'".'));let a=[],u="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(p,m,h)=>(a.push({paramName:m,isOptional:h!=null}),h?"/?([^\\/]+)?":"/([^\\/]+)"));return n.endsWith("*")?(a.push({paramName:"*"}),u+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?u+="\\/*$":n!==""&&n!=="/"&&(u+="(?:(?=\\/|$))"),[new RegExp(u,o?void 0:"i"),a]}function Nx(n){try{return n.split("/").map(o=>decodeURIComponent(o).replace(/\//g,"%2F")).join("/")}catch(o){return wu(!1,'The URL path "'+n+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+o+").")),n}}function Do(n,o){if(o==="/")return n;if(!n.toLowerCase().startsWith(o.toLowerCase()))return null;let s=o.endsWith("/")?o.length-1:o.length,a=n.charAt(s);return a&&a!=="/"?null:n.slice(s)||"/"}const jx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ex=n=>jx.test(n);function _x(n,o){o===void 0&&(o="/");let{pathname:s,search:a="",hash:u=""}=typeof n=="string"?Wo(n):n,d;if(s)if(Ex(s))d=s;else{if(s.includes("//")){let p=s;s=Hm(s),wu(!1,"Pathnames cannot have embedded double slashes - normalizing "+(p+" -> "+s))}s.startsWith("/")?d=Kp(s.substring(1),"/"):d=Kp(s,o)}else d=o;return{pathname:d,search:Tx(a),hash:Mx(u)}}function Kp(n,o){let s=o.replace(/\/+$/,"").split("/");return n.split("/").forEach(u=>{u===".."?s.length>1&&s.pop():u!=="."&&s.push(u)}),s.length>1?s.join("/"):"/"}function Fc(n,o,s,a){return"Cannot include a '"+n+"' character in a manually specified "+("`to."+o+"` field ["+JSON.stringify(a)+"]. Please separate it out to the ")+("`to."+s+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Px(n){return n.filter((o,s)=>s===0||o.route.path&&o.route.path.length>0)}function bu(n,o){let s=Px(n);return o?s.map((a,u)=>u===s.length-1?a.pathname:a.pathnameBase):s.map(a=>a.pathnameBase)}function Su(n,o,s,a){a===void 0&&(a=!1);let u;typeof n=="string"?u=Wo(n):(u=Bs({},n),Ge(!u.pathname||!u.pathname.includes("?"),Fc("?","pathname","search",u)),Ge(!u.pathname||!u.pathname.includes("#"),Fc("#","pathname","hash",u)),Ge(!u.search||!u.search.includes("#"),Fc("#","search","hash",u)));let d=n===""||u.pathname==="",p=d?"/":u.pathname,m;if(p==null)m=s;else{let g=o.length-1;if(!a&&p.startsWith("..")){let k=p.split("/");for(;k[0]==="..";)k.shift(),g-=1;u.pathname=k.join("/")}m=g>=0?o[g]:"/"}let h=_x(u,m),y=p&&p!=="/"&&p.endsWith("/"),w=(d||p===".")&&s.endsWith("/");return!h.pathname.endsWith("/")&&(y||w)&&(h.pathname+="/"),h}const Hm=n=>n.replace(/\/\/+/g,"/"),Nr=n=>Hm(n.join("/")),Rx=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),Tx=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,Mx=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n;function Ox(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}const Km=["post","put","patch","delete"];new Set(Km);const Lx=["get",...Km];new Set(Lx);/** - * React Router v6.30.4 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Us(){return Us=Object.assign?Object.assign.bind():function(n){for(var o=1;o{m.current=!0}),v.useCallback(function(y,w){if(w===void 0&&(w={}),!m.current)return;if(typeof y=="number"){a.go(y);return}let g=Su(y,JSON.parse(p),d,w.relative==="path");n==null&&o!=="/"&&(g.pathname=g.pathname==="/"?o:Nr([o,g.pathname])),(w.replace?a.replace:a.push)(g,w.state,w)},[o,a,p,d,n])}const Dx=v.createContext(null);function zx(n){let o=v.useContext(Tn).outlet;return o&&v.createElement(Dx.Provider,{value:n},o)}function Fx(){let{matches:n}=v.useContext(Tn),o=n[n.length-1];return o?o.params:{}}function Da(n,o){let{relative:s}=o===void 0?{}:o,{future:a}=v.useContext(Gn),{matches:u}=v.useContext(Tn),{pathname:d}=Ko(),p=JSON.stringify(bu(u,a.v7_relativeSplatPath));return v.useMemo(()=>Su(n,JSON.parse(p),d,s==="path"),[n,p,d,s])}function $x(n,o){return Bx(n,o)}function Bx(n,o,s,a){Ho()||Ge(!1);let{navigator:u}=v.useContext(Gn),{matches:d}=v.useContext(Tn),p=d[d.length-1],m=p?p.params:{};p&&p.pathname;let h=p?p.pathnameBase:"/";p&&p.route;let y=Ko(),w;if(o){var g;let N=typeof o=="string"?Wo(o):o;h==="/"||(g=N.pathname)!=null&&g.startsWith(h)||Ge(!1),w=N}else w=y;let k=w.pathname||"/",S=k;if(h!=="/"){let N=h.replace(/^\//,"").split("/");S="/"+k.replace(/^\//,"").split("/").slice(N.length).join("/")}let C=fx(n,{pathname:S}),b=Kx(C&&C.map(N=>Object.assign({},N,{params:Object.assign({},m,N.params),pathname:Nr([h,u.encodeLocation?u.encodeLocation(N.pathname).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?h:Nr([h,u.encodeLocation?u.encodeLocation(N.pathnameBase).pathname:N.pathnameBase])})),d,s,a);return o&&b?v.createElement(Aa.Provider,{value:{location:Us({pathname:"/",search:"",hash:"",state:null,key:"default"},w),navigationType:Cr.Pop}},b):b}function Ux(){let n=Xx(),o=Ox(n)?n.status+" "+n.statusText:n instanceof Error?n.message:JSON.stringify(n),s=n instanceof Error?n.stack:null,u={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},o),s?v.createElement("pre",{style:u},s):null,null)}const Vx=v.createElement(Ux,null);class Wx extends v.Component{constructor(o){super(o),this.state={location:o.location,revalidation:o.revalidation,error:o.error}}static getDerivedStateFromError(o){return{error:o}}static getDerivedStateFromProps(o,s){return s.location!==o.location||s.revalidation!=="idle"&&o.revalidation==="idle"?{error:o.error,location:o.location,revalidation:o.revalidation}:{error:o.error!==void 0?o.error:s.error,location:s.location,revalidation:o.revalidation||s.revalidation}}componentDidCatch(o,s){console.error("React Router caught the following error during render",o,s)}render(){return this.state.error!==void 0?v.createElement(Tn.Provider,{value:this.props.routeContext},v.createElement(Gm.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Hx(n){let{routeContext:o,match:s,children:a}=n,u=v.useContext(La);return u&&u.static&&u.staticContext&&(s.route.errorElement||s.route.ErrorBoundary)&&(u.staticContext._deepestRenderedBoundaryId=s.route.id),v.createElement(Tn.Provider,{value:o},a)}function Kx(n,o,s,a){var u;if(o===void 0&&(o=[]),s===void 0&&(s=null),a===void 0&&(a=null),n==null){var d;if(!s)return null;if(s.errors)n=s.matches;else if((d=a)!=null&&d.v7_partialHydration&&o.length===0&&!s.initialized&&s.matches.length>0)n=s.matches;else return null}let p=n,m=(u=s)==null?void 0:u.errors;if(m!=null){let w=p.findIndex(g=>g.route.id&&(m==null?void 0:m[g.route.id])!==void 0);w>=0||Ge(!1),p=p.slice(0,Math.min(p.length,w+1))}let h=!1,y=-1;if(s&&a&&a.v7_partialHydration)for(let w=0;w=0?p=p.slice(0,y+1):p=[p[0]];break}}}return p.reduceRight((w,g,k)=>{let S,C=!1,b=null,N=null;s&&(S=m&&g.route.id?m[g.route.id]:void 0,b=g.route.errorElement||Vx,h&&(y<0&&k===0?(Jx("route-fallback"),C=!0,N=null):y===k&&(C=!0,N=g.route.hydrateFallbackElement||null)));let E=o.concat(p.slice(0,k+1)),T=()=>{let _;return S?_=b:C?_=N:g.route.Component?_=v.createElement(g.route.Component,null):g.route.element?_=g.route.element:_=w,v.createElement(Hx,{match:g,routeContext:{outlet:w,matches:E,isDataRoute:s!=null},children:_})};return s&&(g.route.ErrorBoundary||g.route.errorElement||k===0)?v.createElement(Wx,{location:s.location,revalidation:s.revalidation,component:b,error:S,children:T(),routeContext:{outlet:null,matches:E,isDataRoute:!0}}):T()},null)}var Xm=(function(n){return n.UseBlocker="useBlocker",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n})(Xm||{}),qm=(function(n){return n.UseBlocker="useBlocker",n.UseLoaderData="useLoaderData",n.UseActionData="useActionData",n.UseRouteError="useRouteError",n.UseNavigation="useNavigation",n.UseRouteLoaderData="useRouteLoaderData",n.UseMatches="useMatches",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n.UseRouteId="useRouteId",n})(qm||{});function Yx(n){let o=v.useContext(La);return o||Ge(!1),o}function Gx(n){let o=v.useContext(Ym);return o||Ge(!1),o}function Qx(n){let o=v.useContext(Tn);return o||Ge(!1),o}function Jm(n){let o=Qx(),s=o.matches[o.matches.length-1];return s.route.id||Ge(!1),s.route.id}function Xx(){var n;let o=v.useContext(Gm),s=Gx(),a=Jm();return o!==void 0?o:(n=s.errors)==null?void 0:n[a]}function qx(){let{router:n}=Yx(Xm.UseNavigateStable),o=Jm(qm.UseNavigateStable),s=v.useRef(!1);return Qm(()=>{s.current=!0}),v.useCallback(function(u,d){d===void 0&&(d={}),s.current&&(typeof u=="number"?n.navigate(u):n.navigate(u,Us({fromRouteId:o},d)))},[n,o])}const Yp={};function Jx(n,o,s){Yp[n]||(Yp[n]=!0)}function Zx(n,o){n==null||n.v7_startTransition,n==null||n.v7_relativeSplatPath}function Zm(n){let{to:o,replace:s,state:a,relative:u}=n;Ho()||Ge(!1);let{future:d,static:p}=v.useContext(Gn),{matches:m}=v.useContext(Tn),{pathname:h}=Ko(),y=Ia(),w=Su(o,bu(m,d.v7_relativeSplatPath),h,u==="path"),g=JSON.stringify(w);return v.useEffect(()=>y(JSON.parse(g),{replace:s,state:a,relative:u}),[y,g,u,s,a]),null}function e0(n){return zx(n.context)}function cn(n){Ge(!1)}function t0(n){let{basename:o="/",children:s=null,location:a,navigationType:u=Cr.Pop,navigator:d,static:p=!1,future:m}=n;Ho()&&Ge(!1);let h=o.replace(/^\/*/,"/"),y=v.useMemo(()=>({basename:h,navigator:d,static:p,future:Us({v7_relativeSplatPath:!1},m)}),[h,m,d,p]);typeof a=="string"&&(a=Wo(a));let{pathname:w="/",search:g="",hash:k="",state:S=null,key:C="default"}=a,b=v.useMemo(()=>{let N=Do(w,h);return N==null?null:{location:{pathname:N,search:g,hash:k,state:S,key:C},navigationType:u}},[h,w,g,k,S,C,u]);return b==null?null:v.createElement(Gn.Provider,{value:y},v.createElement(Aa.Provider,{children:s,value:b}))}function n0(n){let{children:o,location:s}=n;return $x(eu(o),s)}new Promise(()=>{});function eu(n,o){o===void 0&&(o=[]);let s=[];return v.Children.forEach(n,(a,u)=>{if(!v.isValidElement(a))return;let d=[...o,u];if(a.type===v.Fragment){s.push.apply(s,eu(a.props.children,d));return}a.type!==cn&&Ge(!1),!a.props.index||!a.props.children||Ge(!1);let p={id:a.props.id||d.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,loader:a.props.loader,action:a.props.action,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(p.children=eu(a.props.children,d)),s.push(p)}),s}/** - * React Router DOM v6.30.4 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Sa(){return Sa=Object.assign?Object.assign.bind():function(n){for(var o=1;o{y&&Gp?Gp(()=>h(g)):h(g)},[h,y]);return v.useLayoutEffect(()=>p.listen(w),[p,w]),v.useEffect(()=>Zx(a),[a]),v.createElement(t0,{basename:o,children:s,location:m.location,navigationType:m.action,navigator:p,future:a})}const d0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",f0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,zo=v.forwardRef(function(o,s){let{onClick:a,relative:u,reloadDocument:d,replace:p,state:m,target:h,to:y,preventScrollReset:w,viewTransition:g}=o,k=eh(o,s0),{basename:S}=v.useContext(Gn),C,b=!1;if(typeof y=="string"&&f0.test(y)&&(C=y,d0))try{let _=new URL(window.location.href),L=y.startsWith("//")?new URL(_.protocol+y):new URL(y),I=Do(L.pathname,S);L.origin===_.origin&&I!=null?y=I+L.search+L.hash:b=!0}catch{}let N=Ax(y,{relative:u}),E=m0(y,{replace:p,state:m,target:h,preventScrollReset:w,relative:u,viewTransition:g});function T(_){a&&a(_),_.defaultPrevented||E(_)}return v.createElement("a",Sa({},k,{href:C||N,onClick:b||d?a:T,ref:s,target:h}))}),Qp=v.forwardRef(function(o,s){let{"aria-current":a="page",caseSensitive:u=!1,className:d="",end:p=!1,style:m,to:h,viewTransition:y,children:w}=o,g=eh(o,i0),k=Da(h,{relative:g.relative}),S=Ko(),C=v.useContext(Ym),{navigator:b,basename:N}=v.useContext(Gn),E=C!=null&&h0(k)&&y===!0,T=b.encodeLocation?b.encodeLocation(k).pathname:k.pathname,_=S.pathname,L=C&&C.navigation&&C.navigation.location?C.navigation.location.pathname:null;u||(_=_.toLowerCase(),L=L?L.toLowerCase():null,T=T.toLowerCase()),L&&N&&(L=Do(L,N)||L);const I=T!=="/"&&T.endsWith("/")?T.length-1:T.length;let W=_===T||!p&&_.startsWith(T)&&_.charAt(I)==="/",B=L!=null&&(L===T||!p&&L.startsWith(T)&&L.charAt(T.length)==="/"),P={isActive:W,isPending:B,isTransitioning:E},ee=W?a:void 0,ie;typeof d=="function"?ie=d(P):ie=[d,W?"active":null,B?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");let oe=typeof m=="function"?m(P):m;return v.createElement(zo,Sa({},g,{"aria-current":ee,className:ie,ref:s,style:oe,to:h,viewTransition:y}),typeof w=="function"?w(P):w)});var tu;(function(n){n.UseScrollRestoration="useScrollRestoration",n.UseSubmit="useSubmit",n.UseSubmitFetcher="useSubmitFetcher",n.UseFetcher="useFetcher",n.useViewTransitionState="useViewTransitionState"})(tu||(tu={}));var Xp;(function(n){n.UseFetcher="useFetcher",n.UseFetchers="useFetchers",n.UseScrollRestoration="useScrollRestoration"})(Xp||(Xp={}));function p0(n){let o=v.useContext(La);return o||Ge(!1),o}function m0(n,o){let{target:s,replace:a,state:u,preventScrollReset:d,relative:p,viewTransition:m}=o===void 0?{}:o,h=Ia(),y=Ko(),w=Da(n,{relative:p});return v.useCallback(g=>{if(o0(g,s)){g.preventDefault();let k=a!==void 0?a:ba(y)===ba(w);h(n,{replace:k,state:u,preventScrollReset:d,relative:p,viewTransition:m})}},[y,h,w,a,u,s,n,d,p,m])}function h0(n,o){o===void 0&&(o={});let s=v.useContext(l0);s==null&&Ge(!1);let{basename:a}=p0(tu.useViewTransitionState),u=Da(n,{relative:o.relative});if(!s.isTransitioning)return!1;let d=Do(s.currentLocation.pathname,a)||s.currentLocation.pathname,p=Do(s.nextLocation.pathname,a)||s.nextLocation.pathname;return Zc(u.pathname,p)!=null||Zc(u.pathname,d)!=null}function g0(n){if(typeof document>"u")return;let o=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",o.appendChild(s),s.styleSheet?s.styleSheet.cssText=n:s.appendChild(document.createTextNode(n))}const v0=n=>{switch(n){case"success":return w0;case"info":return S0;case"warning":return b0;case"error":return k0;default:return null}},y0=Array(12).fill(0),x0=({visible:n,className:o})=>re.createElement("div",{className:["sonner-loading-wrapper",o].filter(Boolean).join(" "),"data-visible":n},re.createElement("div",{className:"sonner-spinner"},y0.map((s,a)=>re.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${a}`})))),w0=re.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},re.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),b0=re.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},re.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),S0=re.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},re.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),k0=re.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},re.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),C0=re.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},re.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),re.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),N0=()=>{const[n,o]=re.useState(document.hidden);return re.useEffect(()=>{const s=()=>{o(document.hidden)};return document.addEventListener("visibilitychange",s),()=>window.removeEventListener("visibilitychange",s)},[]),n};let nu=1;class j0{constructor(){this.subscribe=o=>(this.subscribers.push(o),()=>{const s=this.subscribers.indexOf(o);this.subscribers.splice(s,1)}),this.publish=o=>{this.subscribers.forEach(s=>s(o))},this.addToast=o=>{this.publish(o),this.toasts=[...this.toasts,o]},this.create=o=>{var s;const{message:a,...u}=o,d=typeof(o==null?void 0:o.id)=="number"||((s=o.id)==null?void 0:s.length)>0?o.id:nu++,p=this.toasts.find(h=>h.id===d),m=o.dismissible===void 0?!0:o.dismissible;return this.dismissedToasts.has(d)&&this.dismissedToasts.delete(d),p?this.toasts=this.toasts.map(h=>h.id===d?(this.publish({...h,...o,id:d,title:a}),{...h,...o,id:d,dismissible:m,title:a}):h):this.addToast({title:a,...u,dismissible:m,id:d}),d},this.dismiss=o=>(o?(this.dismissedToasts.add(o),requestAnimationFrame(()=>this.subscribers.forEach(s=>s({id:o,dismiss:!0})))):this.toasts.forEach(s=>{this.subscribers.forEach(a=>a({id:s.id,dismiss:!0}))}),o),this.message=(o,s)=>this.create({...s,message:o}),this.error=(o,s)=>this.create({...s,message:o,type:"error"}),this.success=(o,s)=>this.create({...s,type:"success",message:o}),this.info=(o,s)=>this.create({...s,type:"info",message:o}),this.warning=(o,s)=>this.create({...s,type:"warning",message:o}),this.loading=(o,s)=>this.create({...s,type:"loading",message:o}),this.promise=(o,s)=>{if(!s)return;let a;s.loading!==void 0&&(a=this.create({...s,promise:o,type:"loading",message:s.loading,description:typeof s.description!="function"?s.description:void 0}));const u=Promise.resolve(o instanceof Function?o():o);let d=a!==void 0,p;const m=u.then(async y=>{if(p=["resolve",y],re.isValidElement(y))d=!1,this.create({id:a,type:"default",message:y});else if(_0(y)&&!y.ok){d=!1;const g=typeof s.error=="function"?await s.error(`HTTP error! status: ${y.status}`):s.error,k=typeof s.description=="function"?await s.description(`HTTP error! status: ${y.status}`):s.description,C=typeof g=="object"&&!re.isValidElement(g)?g:{message:g};this.create({id:a,type:"error",description:k,...C})}else if(y instanceof Error){d=!1;const g=typeof s.error=="function"?await s.error(y):s.error,k=typeof s.description=="function"?await s.description(y):s.description,C=typeof g=="object"&&!re.isValidElement(g)?g:{message:g};this.create({id:a,type:"error",description:k,...C})}else if(s.success!==void 0){d=!1;const g=typeof s.success=="function"?await s.success(y):s.success,k=typeof s.description=="function"?await s.description(y):s.description,C=typeof g=="object"&&!re.isValidElement(g)?g:{message:g};this.create({id:a,type:"success",description:k,...C})}}).catch(async y=>{if(p=["reject",y],s.error!==void 0){d=!1;const w=typeof s.error=="function"?await s.error(y):s.error,g=typeof s.description=="function"?await s.description(y):s.description,S=typeof w=="object"&&!re.isValidElement(w)?w:{message:w};this.create({id:a,type:"error",description:g,...S})}}).finally(()=>{d&&(this.dismiss(a),a=void 0),s.finally==null||s.finally.call(s)}),h=()=>new Promise((y,w)=>m.then(()=>p[0]==="reject"?w(p[1]):y(p[1])).catch(w));return typeof a!="string"&&typeof a!="number"?{unwrap:h}:Object.assign(a,{unwrap:h})},this.custom=(o,s)=>{const a=(s==null?void 0:s.id)||nu++;return this.create({jsx:o(a),id:a,...s}),a},this.getActiveToasts=()=>this.toasts.filter(o=>!this.dismissedToasts.has(o.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Mt=new j0,E0=(n,o)=>{const s=(o==null?void 0:o.id)||nu++;return Mt.addToast({title:n,...o,id:s}),s},_0=n=>n&&typeof n=="object"&&"ok"in n&&typeof n.ok=="boolean"&&"status"in n&&typeof n.status=="number",P0=E0,R0=()=>Mt.toasts,T0=()=>Mt.getActiveToasts(),Re=Object.assign(P0,{success:Mt.success,info:Mt.info,warning:Mt.warning,error:Mt.error,custom:Mt.custom,message:Mt.message,promise:Mt.promise,dismiss:Mt.dismiss,loading:Mt.loading},{getHistory:R0,getToasts:T0});g0("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function la(n){return n.label!==void 0}const M0=3,O0="24px",L0="16px",qp=4e3,A0=356,I0=14,D0=45,z0=200;function Cn(...n){return n.filter(Boolean).join(" ")}function F0(n){const[o,s]=n.split("-"),a=[];return o&&a.push(o),s&&a.push(s),a}const $0=n=>{var o,s,a,u,d,p,m,h,y;const{invert:w,toast:g,unstyled:k,interacting:S,setHeights:C,visibleToasts:b,heights:N,index:E,toasts:T,expanded:_,removeToast:L,defaultRichColors:I,closeButton:W,style:B,cancelButtonStyle:P,actionButtonStyle:ee,className:ie="",descriptionClassName:oe="",duration:pe,position:H,gap:z,expandByDefault:te,classNames:K,icons:X,closeButtonAriaLabel:U="Close toast"}=n,[q,F]=re.useState(null),[O,V]=re.useState(null),[J,le]=re.useState(!1),[ae,ue]=re.useState(!1),[se,ne]=re.useState(!1),[de,ke]=re.useState(!1),[Ne,Ee]=re.useState(!1),[qe,We]=re.useState(0),[Zt,en]=re.useState(0),St=re.useRef(g.duration||pe||qp),Lr=re.useRef(null),kt=re.useRef(null),Vt=E===0,Xn=E+1<=b,dt=g.type,On=g.dismissible!==!1,qs=g.className||"",Js=g.descriptionClassName||"",Ar=re.useMemo(()=>N.findIndex(je=>je.toastId===g.id)||0,[N,g.id]),Xo=re.useMemo(()=>{var je;return(je=g.closeButton)!=null?je:W},[g.closeButton,W]),Ir=re.useMemo(()=>g.duration||pe||qp,[g.duration,pe]),oo=re.useRef(0),Wt=re.useRef(0),qn=re.useRef(0),Jn=re.useRef(null),[Zs,ei]=H.split("-"),ti=re.useMemo(()=>N.reduce((je,Je,rt)=>rt>=Ar?je:je+Je.height,0),[N,Ar]),so=N0(),qo=g.invert||w,Dr=dt==="loading";Wt.current=re.useMemo(()=>Ar*z+ti,[Ar,ti]),re.useEffect(()=>{St.current=Ir},[Ir]),re.useEffect(()=>{le(!0)},[]),re.useEffect(()=>{const je=kt.current;if(je){const Je=je.getBoundingClientRect().height;return en(Je),C(rt=>[{toastId:g.id,height:Je,position:g.position},...rt]),()=>C(rt=>rt.filter(vt=>vt.toastId!==g.id))}},[C,g.id]),re.useLayoutEffect(()=>{if(!J)return;const je=kt.current,Je=je.style.height;je.style.height="auto";const rt=je.getBoundingClientRect().height;je.style.height=Je,en(rt),C(vt=>vt.find(tt=>tt.toastId===g.id)?vt.map(tt=>tt.toastId===g.id?{...tt,height:rt}:tt):[{toastId:g.id,height:rt,position:g.position},...vt])},[J,g.title,g.description,C,g.id,g.jsx,g.action,g.cancel]);const Ht=re.useCallback(()=>{ue(!0),We(Wt.current),C(je=>je.filter(Je=>Je.toastId!==g.id)),setTimeout(()=>{L(g)},z0)},[g,L,C,Wt]);re.useEffect(()=>{if(g.promise&&dt==="loading"||g.duration===1/0||g.type==="loading")return;let je;return _||S||so?(()=>{if(qn.current{St.current!==1/0&&(oo.current=new Date().getTime(),je=setTimeout(()=>{g.onAutoClose==null||g.onAutoClose.call(g,g),Ht()},St.current))})(),()=>clearTimeout(je)},[_,S,g,dt,so,Ht]),re.useEffect(()=>{g.delete&&(Ht(),g.onDismiss==null||g.onDismiss.call(g,g))},[Ht,g.delete]);function Jo(){var je;if(X!=null&&X.loading){var Je;return re.createElement("div",{className:Cn(K==null?void 0:K.loader,g==null||(Je=g.classNames)==null?void 0:Je.loader,"sonner-loader"),"data-visible":dt==="loading"},X.loading)}return re.createElement(x0,{className:Cn(K==null?void 0:K.loader,g==null||(je=g.classNames)==null?void 0:je.loader),visible:dt==="loading"})}const Zn=g.icon||(X==null?void 0:X[dt])||v0(dt);var Ln,Zo;return re.createElement("li",{tabIndex:0,ref:kt,className:Cn(ie,qs,K==null?void 0:K.toast,g==null||(o=g.classNames)==null?void 0:o.toast,K==null?void 0:K.default,K==null?void 0:K[dt],g==null||(s=g.classNames)==null?void 0:s[dt]),"data-sonner-toast":"","data-rich-colors":(Ln=g.richColors)!=null?Ln:I,"data-styled":!(g.jsx||g.unstyled||k),"data-mounted":J,"data-promise":!!g.promise,"data-swiped":Ne,"data-removed":ae,"data-visible":Xn,"data-y-position":Zs,"data-x-position":ei,"data-index":E,"data-front":Vt,"data-swiping":se,"data-dismissible":On,"data-type":dt,"data-invert":qo,"data-swipe-out":de,"data-swipe-direction":O,"data-expanded":!!(_||te&&J),"data-testid":g.testId,style:{"--index":E,"--toasts-before":E,"--z-index":T.length-E,"--offset":`${ae?qe:Wt.current}px`,"--initial-height":te?"auto":`${Zt}px`,...B,...g.style},onDragEnd:()=>{ne(!1),F(null),Jn.current=null},onPointerDown:je=>{je.button!==2&&(Dr||!On||(Lr.current=new Date,We(Wt.current),je.target.setPointerCapture(je.pointerId),je.target.tagName!=="BUTTON"&&(ne(!0),Jn.current={x:je.clientX,y:je.clientY})))},onPointerUp:()=>{var je,Je,rt;if(de||!On)return;Jn.current=null;const vt=Number(((je=kt.current)==null?void 0:je.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),er=Number(((Je=kt.current)==null?void 0:Je.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),tt=new Date().getTime()-((rt=Lr.current)==null?void 0:rt.getTime()),at=q==="x"?vt:er,tr=Math.abs(at)/tt;if(Math.abs(at)>=D0||tr>.11){We(Wt.current),g.onDismiss==null||g.onDismiss.call(g,g),V(q==="x"?vt>0?"right":"left":er>0?"down":"up"),Ht(),ke(!0);return}else{var ft,Lt;(ft=kt.current)==null||ft.style.setProperty("--swipe-amount-x","0px"),(Lt=kt.current)==null||Lt.style.setProperty("--swipe-amount-y","0px")}Ee(!1),ne(!1),F(null)},onPointerMove:je=>{var Je,rt,vt;if(!Jn.current||!On||((Je=window.getSelection())==null?void 0:Je.toString().length)>0)return;const tt=je.clientY-Jn.current.y,at=je.clientX-Jn.current.x;var tr;const ft=(tr=n.swipeDirections)!=null?tr:F0(H);!q&&(Math.abs(at)>1||Math.abs(tt)>1)&&F(Math.abs(at)>Math.abs(tt)?"x":"y");let Lt={x:0,y:0};const nr=Kt=>1/(1.5+Math.abs(Kt)/20);if(q==="y"){if(ft.includes("top")||ft.includes("bottom"))if(ft.includes("top")&&tt<0||ft.includes("bottom")&&tt>0)Lt.y=tt;else{const Kt=tt*nr(tt);Lt.y=Math.abs(Kt)0)Lt.x=at;else{const Kt=at*nr(at);Lt.x=Math.abs(Kt)0||Math.abs(Lt.y)>0)&&Ee(!0),(rt=kt.current)==null||rt.style.setProperty("--swipe-amount-x",`${Lt.x}px`),(vt=kt.current)==null||vt.style.setProperty("--swipe-amount-y",`${Lt.y}px`)}},Xo&&!g.jsx&&dt!=="loading"?re.createElement("button",{"aria-label":U,"data-disabled":Dr,"data-close-button":!0,onClick:Dr||!On?()=>{}:()=>{Ht(),g.onDismiss==null||g.onDismiss.call(g,g)},className:Cn(K==null?void 0:K.closeButton,g==null||(a=g.classNames)==null?void 0:a.closeButton)},(Zo=X==null?void 0:X.close)!=null?Zo:C0):null,(dt||g.icon||g.promise)&&g.icon!==null&&((X==null?void 0:X[dt])!==null||g.icon)?re.createElement("div",{"data-icon":"",className:Cn(K==null?void 0:K.icon,g==null||(u=g.classNames)==null?void 0:u.icon)},g.promise||g.type==="loading"&&!g.icon?g.icon||Jo():null,g.type!=="loading"?Zn:null):null,re.createElement("div",{"data-content":"",className:Cn(K==null?void 0:K.content,g==null||(d=g.classNames)==null?void 0:d.content)},re.createElement("div",{"data-title":"",className:Cn(K==null?void 0:K.title,g==null||(p=g.classNames)==null?void 0:p.title)},g.jsx?g.jsx:typeof g.title=="function"?g.title():g.title),g.description?re.createElement("div",{"data-description":"",className:Cn(oe,Js,K==null?void 0:K.description,g==null||(m=g.classNames)==null?void 0:m.description)},typeof g.description=="function"?g.description():g.description):null),re.isValidElement(g.cancel)?g.cancel:g.cancel&&la(g.cancel)?re.createElement("button",{"data-button":!0,"data-cancel":!0,style:g.cancelButtonStyle||P,onClick:je=>{la(g.cancel)&&On&&(g.cancel.onClick==null||g.cancel.onClick.call(g.cancel,je),Ht())},className:Cn(K==null?void 0:K.cancelButton,g==null||(h=g.classNames)==null?void 0:h.cancelButton)},g.cancel.label):null,re.isValidElement(g.action)?g.action:g.action&&la(g.action)?re.createElement("button",{"data-button":!0,"data-action":!0,style:g.actionButtonStyle||ee,onClick:je=>{la(g.action)&&(g.action.onClick==null||g.action.onClick.call(g.action,je),!je.defaultPrevented&&Ht())},className:Cn(K==null?void 0:K.actionButton,g==null||(y=g.classNames)==null?void 0:y.actionButton)},g.action.label):null)};function Jp(){if(typeof window>"u"||typeof document>"u")return"ltr";const n=document.documentElement.getAttribute("dir");return n==="auto"||!n?window.getComputedStyle(document.documentElement).direction:n}function B0(n,o){const s={};return[n,o].forEach((a,u)=>{const d=u===1,p=d?"--mobile-offset":"--offset",m=d?L0:O0;function h(y){["top","right","bottom","left"].forEach(w=>{s[`${p}-${w}`]=typeof y=="number"?`${y}px`:y})}typeof a=="number"||typeof a=="string"?h(a):typeof a=="object"?["top","right","bottom","left"].forEach(y=>{a[y]===void 0?s[`${p}-${y}`]=m:s[`${p}-${y}`]=typeof a[y]=="number"?`${a[y]}px`:a[y]}):h(m)}),s}const U0=re.forwardRef(function(o,s){const{id:a,invert:u,position:d="bottom-right",hotkey:p=["altKey","KeyT"],expand:m,closeButton:h,className:y,offset:w,mobileOffset:g,theme:k="light",richColors:S,duration:C,style:b,visibleToasts:N=M0,toastOptions:E,dir:T=Jp(),gap:_=I0,icons:L,containerAriaLabel:I="Notifications"}=o,[W,B]=re.useState([]),P=re.useMemo(()=>a?W.filter(J=>J.toasterId===a):W.filter(J=>!J.toasterId),[W,a]),ee=re.useMemo(()=>Array.from(new Set([d].concat(P.filter(J=>J.position).map(J=>J.position)))),[P,d]),[ie,oe]=re.useState([]),[pe,H]=re.useState(!1),[z,te]=re.useState(!1),[K,X]=re.useState(k!=="system"?k:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),U=re.useRef(null),q=p.join("+").replace(/Key/g,"").replace(/Digit/g,""),F=re.useRef(null),O=re.useRef(!1),V=re.useCallback(J=>{B(le=>{var ae;return(ae=le.find(ue=>ue.id===J.id))!=null&&ae.delete||Mt.dismiss(J.id),le.filter(({id:ue})=>ue!==J.id)})},[]);return re.useEffect(()=>Mt.subscribe(J=>{if(J.dismiss){requestAnimationFrame(()=>{B(le=>le.map(ae=>ae.id===J.id?{...ae,delete:!0}:ae))});return}setTimeout(()=>{lx.flushSync(()=>{B(le=>{const ae=le.findIndex(ue=>ue.id===J.id);return ae!==-1?[...le.slice(0,ae),{...le[ae],...J},...le.slice(ae+1)]:[J,...le]})})})}),[W]),re.useEffect(()=>{if(k!=="system"){X(k);return}if(k==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?X("dark"):X("light")),typeof window>"u")return;const J=window.matchMedia("(prefers-color-scheme: dark)");try{J.addEventListener("change",({matches:le})=>{X(le?"dark":"light")})}catch{J.addListener(({matches:ae})=>{try{X(ae?"dark":"light")}catch(ue){console.error(ue)}})}},[k]),re.useEffect(()=>{W.length<=1&&H(!1)},[W]),re.useEffect(()=>{const J=le=>{var ae;if(p.every(ne=>le[ne]||le.code===ne)){var se;H(!0),(se=U.current)==null||se.focus()}le.code==="Escape"&&(document.activeElement===U.current||(ae=U.current)!=null&&ae.contains(document.activeElement))&&H(!1)};return document.addEventListener("keydown",J),()=>document.removeEventListener("keydown",J)},[p]),re.useEffect(()=>{if(U.current)return()=>{F.current&&(F.current.focus({preventScroll:!0}),F.current=null,O.current=!1)}},[U.current]),re.createElement("section",{ref:s,"aria-label":`${I} ${q}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},ee.map((J,le)=>{var ae;const[ue,se]=J.split("-");return P.length?re.createElement("ol",{key:J,dir:T==="auto"?Jp():T,tabIndex:-1,ref:U,className:y,"data-sonner-toaster":!0,"data-sonner-theme":K,"data-y-position":ue,"data-x-position":se,style:{"--front-toast-height":`${((ae=ie[0])==null?void 0:ae.height)||0}px`,"--width":`${A0}px`,"--gap":`${_}px`,...b,...B0(w,g)},onBlur:ne=>{O.current&&!ne.currentTarget.contains(ne.relatedTarget)&&(O.current=!1,F.current&&(F.current.focus({preventScroll:!0}),F.current=null))},onFocus:ne=>{ne.target instanceof HTMLElement&&ne.target.dataset.dismissible==="false"||O.current||(O.current=!0,F.current=ne.relatedTarget)},onMouseEnter:()=>H(!0),onMouseMove:()=>H(!0),onMouseLeave:()=>{z||H(!1)},onDragEnd:()=>H(!1),onPointerDown:ne=>{ne.target instanceof HTMLElement&&ne.target.dataset.dismissible==="false"||te(!0)},onPointerUp:()=>te(!1)},P.filter(ne=>!ne.position&&le===0||ne.position===J).map((ne,de)=>{var ke,Ne;return re.createElement($0,{key:ne.id,icons:L,index:de,toast:ne,defaultRichColors:S,duration:(ke=E==null?void 0:E.duration)!=null?ke:C,className:E==null?void 0:E.className,descriptionClassName:E==null?void 0:E.descriptionClassName,invert:u,visibleToasts:N,closeButton:(Ne=E==null?void 0:E.closeButton)!=null?Ne:h,interacting:z,position:J,style:E==null?void 0:E.style,unstyled:E==null?void 0:E.unstyled,classNames:E==null?void 0:E.classNames,cancelButtonStyle:E==null?void 0:E.cancelButtonStyle,actionButtonStyle:E==null?void 0:E.actionButtonStyle,closeButtonAriaLabel:E==null?void 0:E.closeButtonAriaLabel,removeToast:V,toasts:P.filter(Ee=>Ee.position==ne.position),heights:ie.filter(Ee=>Ee.position==ne.position),setHeights:oe,expandByDefault:m,gap:_,expanded:pe,swipeDirections:o.swipeDirections})})):null}))});/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const th=(...n)=>n.filter((o,s,a)=>!!o&&o.trim()!==""&&a.indexOf(o)===s).join(" ").trim();/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const V0=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const W0=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(o,s,a)=>a?a.toUpperCase():s.toLowerCase());/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Zp=n=>{const o=W0(n);return o.charAt(0).toUpperCase()+o.slice(1)};/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */var $c={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 v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const H0=n=>{for(const o in n)if(o.startsWith("aria-")||o==="role"||o==="title")return!0;return!1},K0=v.createContext({}),Y0=()=>v.useContext(K0),G0=v.forwardRef(({color:n,size:o,strokeWidth:s,absoluteStrokeWidth:a,className:u="",children:d,iconNode:p,...m},h)=>{const{size:y=24,strokeWidth:w=2,absoluteStrokeWidth:g=!1,color:k="currentColor",className:S=""}=Y0()??{},C=a??g?Number(s??w)*24/Number(o??y):s??w;return v.createElement("svg",{ref:h,...$c,width:o??y??$c.width,height:o??y??$c.height,stroke:n??k,strokeWidth:C,className:th("lucide",S,u),...!d&&!H0(m)&&{"aria-hidden":"true"},...m},[...p.map(([b,N])=>v.createElement(b,N)),...Array.isArray(d)?d:[d]])});/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Te=(n,o)=>{const s=v.forwardRef(({className:a,...u},d)=>v.createElement(G0,{ref:d,iconNode:o,className:th(`lucide-${V0(Zp(n))}`,`lucide-${n}`,a),...u}));return s.displayName=Zp(n),s};/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Q0=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],X0=Te("activity",Q0);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const q0=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],ru=Te("arrow-left",q0);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const J0=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Z0=Te("arrow-right",J0);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ew=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}]],em=Te("ban",ew);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const tw=[["path",{d:"M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z",key:"trhst0"}],["path",{d:"M17 21v-2",key:"ds4u3f"}],["path",{d:"M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10",key:"1mo9zo"}],["path",{d:"M21 21v-2",key:"eo0ou"}],["path",{d:"M3 5V3",key:"1k5hjh"}],["path",{d:"M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z",key:"1dd30t"}],["path",{d:"M7 5V3",key:"1t1388"}]],nw=Te("cable",tw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const rw=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],nh=Te("check",rw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ow=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],sw=Te("chevron-left",ow);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const iw=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],aw=Te("chevron-right",iw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const lw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],ka=Te("circle-alert",lw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const cw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],ou=Te("circle-x",cw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const uw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],rh=Te("clock",uw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const dw=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],oh=Te("copy",dw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const fw=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],sh=Te("database",fw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const pw=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],za=Te("download",pw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const mw=[["path",{d:"M10.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"}]],hw=Te("eye-off",mw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const gw=[["path",{d:"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"}]],vw=Te("eye",gw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const yw=[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]],xw=Te("fingerprint-pattern",yw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ww=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["path",{d:"M11 18H8a2 2 0 0 1-2-2V9",key:"19pyzm"}]],su=Te("git-compare",ww);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const bw=[["path",{d:"M10 16h.01",key:"1bzywj"}],["path",{d:"M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"18tbho"}],["path",{d:"M21.946 12.013H2.054",key:"zqlbp7"}],["path",{d:"M6 16h.01",key:"1pmjb7"}]],tm=Te("hard-drive",bw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Sw=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],ih=Te("history",Sw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const kw=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],Ca=Te("key",kw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Cw=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],Nw=Te("layout-dashboard",Cw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const jw=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ew=Te("loader-circle",jw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const _w=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],nm=Te("log-out",_w);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Pw=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],Rw=Te("menu",Pw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Tw=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],ah=Te("pencil",Tw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Mw=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Ow=Te("play",Mw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Lw=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Fo=Te("plus",Lw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Aw=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],lh=Te("refresh-cw",Aw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Iw=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],Dw=Te("scroll-text",Iw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const zw=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],ku=Te("server",zw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Fw=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],$w=Te("settings",Fw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Bw=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],ch=Te("terminal",Bw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Uw=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Cu=Te("trash-2",Uw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Vw=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Ww=Te("triangle-alert",Vw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Hw=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],Bc=Te("upload",Hw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Kw=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],uh=Te("x",Kw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Yw=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],dh=Te("zap",Yw);function rm(n,o){if(typeof n=="function")return n(o);n!=null&&(n.current=o)}function Gw(...n){return o=>{let s=!1;const a=n.map(u=>{const d=rm(u,o);return!s&&typeof d=="function"&&(s=!0),d});if(s)return()=>{for(let u=0;u{let{children:u,...d}=s,p=null,m=!1;const h=[];om(u)&&typeof ca=="function"&&(u=ca(u._payload)),v.Children.forEach(u,k=>{var S;if(e1(k)){m=!0;const C=k;let b="child"in C.props?C.props.child:C.props.children;om(b)&&typeof ca=="function"&&(b=ca(b._payload)),p=qw(C,b),h.push((S=p==null?void 0:p.props)==null?void 0:S.children)}else h.push(k)}),p?p=v.cloneElement(p,void 0,h):!m&&v.Children.count(u)===1&&v.isValidElement(u)&&(p=u);const y=p?Zw(p):void 0,w=Qe(a,y);if(!p){if(u||u===0)throw new Error(m?o1(n):r1(n));return u}const g=Jw(d,p.props??{});return p.type!==v.Fragment&&(g.ref=a?w:y),v.cloneElement(p,g)});return o.displayName=`${n}.Slot`,o}var Qw=$o("Slot"),Xw=Symbol.for("radix.slottable"),qw=(n,o)=>{if("child"in n.props){const s=n.props.child;return v.isValidElement(s)?v.cloneElement(s,void 0,n.props.children(s.props.children)):null}return v.isValidElement(o)?o:null};function Jw(n,o){const s={...o};for(const a in o){const u=n[a],d=o[a];/^on[A-Z]/.test(a)?u&&d?s[a]=(...m)=>{const h=d(...m);return u(...m),h}:u&&(s[a]=u):a==="style"?s[a]={...u,...d}:a==="className"&&(s[a]=[u,d].filter(Boolean).join(" "))}return{...n,...s}}function Zw(n){var a,u;let o=(a=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:a.get,s=o&&"isReactWarning"in o&&o.isReactWarning;return s?n.ref:(o=(u=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:u.get,s=o&&"isReactWarning"in o&&o.isReactWarning,s?n.props.ref:n.props.ref||n.ref)}function e1(n){return v.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===Xw}var t1=Symbol.for("react.lazy");function om(n){return n!=null&&typeof n=="object"&&"$$typeof"in n&&n.$$typeof===t1&&"_payload"in n&&n1(n._payload)}function n1(n){return typeof n=="object"&&n!==null&&"then"in n}var r1=n=>`${n} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,o1=n=>`${n} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,ca=Oa[" use ".trim().toString()];function fh(n){var o,s,a="";if(typeof n=="string"||typeof n=="number")a+=n;else if(typeof n=="object")if(Array.isArray(n)){var u=n.length;for(o=0;otypeof n=="boolean"?`${n}`:n===0?"0":n,im=ph,mh=(n,o)=>s=>{var a;if((o==null?void 0:o.variants)==null)return im(n,s==null?void 0:s.class,s==null?void 0:s.className);const{variants:u,defaultVariants:d}=o,p=Object.keys(u).map(y=>{const w=s==null?void 0:s[y],g=d==null?void 0:d[y];if(w===null)return null;const k=sm(w)||sm(g);return u[y][k]}),m=s&&Object.entries(s).reduce((y,w)=>{let[g,k]=w;return k===void 0||(y[g]=k),y},{}),h=o==null||(a=o.compoundVariants)===null||a===void 0?void 0:a.reduce((y,w)=>{let{class:g,className:k,...S}=w;return Object.entries(S).every(C=>{let[b,N]=C;return Array.isArray(N)?N.includes({...d,...m}[b]):{...d,...m}[b]===N})?[...y,g,k]:y},[]);return im(n,p,h,s==null?void 0:s.class,s==null?void 0:s.className)},s1=(n,o)=>{const s=new Array(n.length+o.length);for(let a=0;a({classGroupId:n,validator:o}),hh=(n=new Map,o=null,s)=>({nextPart:n,validators:o,classGroupId:s}),Na="-",am=[],a1="arbitrary..",l1=n=>{const o=u1(n),{conflictingClassGroups:s,conflictingClassGroupModifiers:a}=n;return{getClassGroupId:p=>{if(p.startsWith("[")&&p.endsWith("]"))return c1(p);const m=p.split(Na),h=m[0]===""&&m.length>1?1:0;return gh(m,h,o)},getConflictingClassGroupIds:(p,m)=>{if(m){const h=a[p],y=s[p];return h?y?s1(y,h):h:y||am}return s[p]||am}}},gh=(n,o,s)=>{if(n.length-o===0)return s.classGroupId;const u=n[o],d=s.nextPart.get(u);if(d){const y=gh(n,o+1,d);if(y)return y}const p=s.validators;if(p===null)return;const m=o===0?n.join(Na):n.slice(o).join(Na),h=p.length;for(let y=0;yn.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const o=n.slice(1,-1),s=o.indexOf(":"),a=o.slice(0,s);return a?a1+a:void 0})(),u1=n=>{const{theme:o,classGroups:s}=n;return d1(s,o)},d1=(n,o)=>{const s=hh();for(const a in n){const u=n[a];Nu(u,s,a,o)}return s},Nu=(n,o,s,a)=>{const u=n.length;for(let d=0;d{if(typeof n=="string"){p1(n,o,s);return}if(typeof n=="function"){m1(n,o,s,a);return}h1(n,o,s,a)},p1=(n,o,s)=>{const a=n===""?o:vh(o,n);a.classGroupId=s},m1=(n,o,s,a)=>{if(g1(n)){Nu(n(a),o,s,a);return}o.validators===null&&(o.validators=[]),o.validators.push(i1(s,n))},h1=(n,o,s,a)=>{const u=Object.entries(n),d=u.length;for(let p=0;p{let s=n;const a=o.split(Na),u=a.length;for(let d=0;d"isThemeGetter"in n&&n.isThemeGetter===!0,v1=n=>{if(n<1)return{get:()=>{},set:()=>{}};let o=0,s=Object.create(null),a=Object.create(null);const u=(d,p)=>{s[d]=p,o++,o>n&&(o=0,a=s,s=Object.create(null))};return{get(d){let p=s[d];if(p!==void 0)return p;if((p=a[d])!==void 0)return u(d,p),p},set(d,p){d in s?s[d]=p:u(d,p)}}},iu="!",lm=":",y1=[],cm=(n,o,s,a,u)=>({modifiers:n,hasImportantModifier:o,baseClassName:s,maybePostfixModifierPosition:a,isExternal:u}),x1=n=>{const{prefix:o,experimentalParseClassName:s}=n;let a=u=>{const d=[];let p=0,m=0,h=0,y;const w=u.length;for(let b=0;bh?y-h:void 0;return cm(d,S,k,C)};if(o){const u=o+lm,d=a;a=p=>p.startsWith(u)?d(p.slice(u.length)):cm(y1,!1,p,void 0,!0)}if(s){const u=a;a=d=>s({className:d,parseClassName:u})}return a},w1=n=>{const o=new Map;return n.orderSensitiveModifiers.forEach((s,a)=>{o.set(s,1e6+a)}),s=>{const a=[];let u=[];for(let d=0;d0&&(u.sort(),a.push(...u),u=[]),a.push(p)):u.push(p)}return u.length>0&&(u.sort(),a.push(...u)),a}},b1=n=>({cache:v1(n.cacheSize),parseClassName:x1(n),sortModifiers:w1(n),postfixLookupClassGroupIds:S1(n),...l1(n)}),S1=n=>{const o=Object.create(null),s=n.postfixLookupClassGroups;if(s)for(let a=0;a{const{parseClassName:s,getClassGroupId:a,getConflictingClassGroupIds:u,sortModifiers:d,postfixLookupClassGroupIds:p}=o,m=[],h=n.trim().split(k1);let y="";for(let w=h.length-1;w>=0;w-=1){const g=h[w],{isExternal:k,modifiers:S,hasImportantModifier:C,baseClassName:b,maybePostfixModifierPosition:N}=s(g);if(k){y=g+(y.length>0?" "+y:y);continue}let E=!!N,T;if(E){const B=b.substring(0,N);T=a(B);const P=T&&p[T]?a(b):void 0;P&&P!==T&&(T=P,E=!1)}else T=a(b);if(!T){if(!E){y=g+(y.length>0?" "+y:y);continue}if(T=a(b),!T){y=g+(y.length>0?" "+y:y);continue}E=!1}const _=S.length===0?"":S.length===1?S[0]:d(S).join(":"),L=C?_+iu:_,I=L+T;if(m.indexOf(I)>-1)continue;m.push(I);const W=u(T,E);for(let B=0;B0?" "+y:y)}return y},N1=(...n)=>{let o=0,s,a,u="";for(;o{if(typeof n=="string")return n;let o,s="";for(let a=0;a{let s,a,u,d;const p=h=>{const y=o.reduce((w,g)=>g(w),n());return s=b1(y),a=s.cache.get,u=s.cache.set,d=m,m(h)},m=h=>{const y=a(h);if(y)return y;const w=C1(h,s);return u(h,w),w};return d=p,(...h)=>d(N1(...h))},E1=[],it=n=>{const o=s=>s[n]||E1;return o.isThemeGetter=!0,o},xh=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,wh=/^\((?:(\w[\w-]*):)?(.+)\)$/i,_1=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,P1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,R1=/\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$/,T1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,M1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,O1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Sr=n=>_1.test(n),_e=n=>!!n&&!Number.isNaN(Number(n)),Nn=n=>!!n&&Number.isInteger(Number(n)),Uc=n=>n.endsWith("%")&&_e(n.slice(0,-1)),Vn=n=>P1.test(n),bh=()=>!0,L1=n=>R1.test(n)&&!T1.test(n),ju=()=>!1,A1=n=>M1.test(n),I1=n=>O1.test(n),D1=n=>!fe(n)&&!he(n),z1=n=>n.startsWith("@container")&&(n[10]==="/"&&n[11]!==void 0||n[11]==="s"&&n[16]!==void 0&&n.startsWith("-size/",10)||n[11]==="n"&&n[18]!==void 0&&n.startsWith("-normal/",10)),F1=n=>Tr(n,Ch,ju),fe=n=>xh.test(n),qr=n=>Tr(n,Nh,L1),um=n=>Tr(n,Y1,_e),$1=n=>Tr(n,Eh,bh),B1=n=>Tr(n,jh,ju),dm=n=>Tr(n,Sh,ju),U1=n=>Tr(n,kh,I1),ua=n=>Tr(n,_h,A1),he=n=>wh.test(n),As=n=>to(n,Nh),V1=n=>to(n,jh),fm=n=>to(n,Sh),W1=n=>to(n,Ch),H1=n=>to(n,kh),da=n=>to(n,_h,!0),K1=n=>to(n,Eh,!0),Tr=(n,o,s)=>{const a=xh.exec(n);return a?a[1]?o(a[1]):s(a[2]):!1},to=(n,o,s=!1)=>{const a=wh.exec(n);return a?a[1]?o(a[1]):s:!1},Sh=n=>n==="position"||n==="percentage",kh=n=>n==="image"||n==="url",Ch=n=>n==="length"||n==="size"||n==="bg-size",Nh=n=>n==="length",Y1=n=>n==="number",jh=n=>n==="family-name",Eh=n=>n==="number"||n==="weight",_h=n=>n==="shadow",G1=()=>{const n=it("color"),o=it("font"),s=it("text"),a=it("font-weight"),u=it("tracking"),d=it("leading"),p=it("breakpoint"),m=it("container"),h=it("spacing"),y=it("radius"),w=it("shadow"),g=it("inset-shadow"),k=it("text-shadow"),S=it("drop-shadow"),C=it("blur"),b=it("perspective"),N=it("aspect"),E=it("ease"),T=it("animate"),_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],I=()=>[...L(),he,fe],W=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto","contain","none"],P=()=>[he,fe,h],ee=()=>[Sr,"full","auto",...P()],ie=()=>[Nn,"none","subgrid",he,fe],oe=()=>["auto",{span:["full",Nn,he,fe]},Nn,he,fe],pe=()=>[Nn,"auto",he,fe],H=()=>["auto","min","max","fr",he,fe],z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],te=()=>["start","end","center","stretch","center-safe","end-safe"],K=()=>["auto",...P()],X=()=>[Sr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],U=()=>[Sr,"screen","full","dvw","lvw","svw","min","max","fit",...P()],q=()=>[Sr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...P()],F=()=>[n,he,fe],O=()=>[...L(),fm,dm,{position:[he,fe]}],V=()=>["no-repeat",{repeat:["","x","y","space","round"]}],J=()=>["auto","cover","contain",W1,F1,{size:[he,fe]}],le=()=>[Uc,As,qr],ae=()=>["","none","full",y,he,fe],ue=()=>["",_e,As,qr],se=()=>["solid","dashed","dotted","double"],ne=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],de=()=>[_e,Uc,fm,dm],ke=()=>["","none",C,he,fe],Ne=()=>["none",_e,he,fe],Ee=()=>["none",_e,he,fe],qe=()=>[_e,he,fe],We=()=>[Sr,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Vn],breakpoint:[Vn],color:[bh],container:[Vn],"drop-shadow":[Vn],ease:["in","out","in-out"],font:[D1],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Vn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Vn],shadow:[Vn],spacing:["px",_e],text:[Vn],"text-shadow":[Vn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Sr,fe,he,N]}],container:["container"],"container-type":[{"@container":["","normal","size",he,fe]}],"container-named":[z1],columns:[{columns:[_e,fe,he,m]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"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:I()}],overflow:[{overflow:W()}],"overflow-x":[{"overflow-x":W()}],"overflow-y":[{"overflow-y":W()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ee()}],"inset-x":[{"inset-x":ee()}],"inset-y":[{"inset-y":ee()}],start:[{"inset-s":ee(),start:ee()}],end:[{"inset-e":ee(),end:ee()}],"inset-bs":[{"inset-bs":ee()}],"inset-be":[{"inset-be":ee()}],top:[{top:ee()}],right:[{right:ee()}],bottom:[{bottom:ee()}],left:[{left:ee()}],visibility:["visible","invisible","collapse"],z:[{z:[Nn,"auto",he,fe]}],basis:[{basis:[Sr,"full","auto",m,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[_e,Sr,"auto","initial","none",fe]}],grow:[{grow:["",_e,he,fe]}],shrink:[{shrink:["",_e,he,fe]}],order:[{order:[Nn,"first","last","none",he,fe]}],"grid-cols":[{"grid-cols":ie()}],"col-start-end":[{col:oe()}],"col-start":[{"col-start":pe()}],"col-end":[{"col-end":pe()}],"grid-rows":[{"grid-rows":ie()}],"row-start-end":[{row:oe()}],"row-start":[{"row-start":pe()}],"row-end":[{"row-end":pe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":H()}],"auto-rows":[{"auto-rows":H()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...z(),"normal"]}],"justify-items":[{"justify-items":[...te(),"normal"]}],"justify-self":[{"justify-self":["auto",...te()]}],"align-content":[{content:["normal",...z()]}],"align-items":[{items:[...te(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...te(),{baseline:["","last"]}]}],"place-content":[{"place-content":z()}],"place-items":[{"place-items":[...te(),"baseline"]}],"place-self":[{"place-self":["auto",...te()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pbs:[{pbs:P()}],pbe:[{pbe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],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":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],"inline-size":[{inline:["auto",...U()]}],"min-inline-size":[{"min-inline":["auto",...U()]}],"max-inline-size":[{"max-inline":["none",...U()]}],"block-size":[{block:["auto",...q()]}],"min-block-size":[{"min-block":["auto",...q()]}],"max-block-size":[{"max-block":["none",...q()]}],w:[{w:[m,"screen",...X()]}],"min-w":[{"min-w":[m,"screen","none",...X()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[p]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",s,As,qr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,K1,$1]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Uc,fe]}],"font-family":[{font:[V1,B1,o]}],"font-features":[{"font-features":[fe]}],"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:[u,he,fe]}],"line-clamp":[{"line-clamp":[_e,"none",he,um]}],leading:[{leading:[d,...P()]}],"list-image":[{"list-image":["none",he,fe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",he,fe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:[_e,"from-font","auto",he,qr]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[_e,"auto",he,fe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"tab-size":[{tab:[Nn,he,fe]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",he,fe]}],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",he,fe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:V()}],"bg-size":[{bg:J()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Nn,he,fe],radial:["",he,fe],conic:[Nn,he,fe]},H1,U1]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:le()}],"gradient-via-pos":[{via:le()}],"gradient-to-pos":[{to:le()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:ae()}],"rounded-s":[{"rounded-s":ae()}],"rounded-e":[{"rounded-e":ae()}],"rounded-t":[{"rounded-t":ae()}],"rounded-r":[{"rounded-r":ae()}],"rounded-b":[{"rounded-b":ae()}],"rounded-l":[{"rounded-l":ae()}],"rounded-ss":[{"rounded-ss":ae()}],"rounded-se":[{"rounded-se":ae()}],"rounded-ee":[{"rounded-ee":ae()}],"rounded-es":[{"rounded-es":ae()}],"rounded-tl":[{"rounded-tl":ae()}],"rounded-tr":[{"rounded-tr":ae()}],"rounded-br":[{"rounded-br":ae()}],"rounded-bl":[{"rounded-bl":ae()}],"border-w":[{border:ue()}],"border-w-x":[{"border-x":ue()}],"border-w-y":[{"border-y":ue()}],"border-w-s":[{"border-s":ue()}],"border-w-e":[{"border-e":ue()}],"border-w-bs":[{"border-bs":ue()}],"border-w-be":[{"border-be":ue()}],"border-w-t":[{"border-t":ue()}],"border-w-r":[{"border-r":ue()}],"border-w-b":[{"border-b":ue()}],"border-w-l":[{"border-l":ue()}],"divide-x":[{"divide-x":ue()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ue()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...se(),"hidden","none"]}],"divide-style":[{divide:[...se(),"hidden","none"]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-bs":[{"border-bs":F()}],"border-color-be":[{"border-be":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[_e,he,fe]}],"outline-w":[{outline:["",_e,As,qr]}],"outline-color":[{outline:F()}],shadow:[{shadow:["","none",w,da,ua]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":["none",g,da,ua]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:ue()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[_e,qr]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":ue()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":["none",k,da,ua]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[_e,he,fe]}],"mix-blend":[{"mix-blend":[...ne(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ne()}],"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":[_e]}],"mask-image-linear-from-pos":[{"mask-linear-from":de()}],"mask-image-linear-to-pos":[{"mask-linear-to":de()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":de()}],"mask-image-t-to-pos":[{"mask-t-to":de()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":de()}],"mask-image-r-to-pos":[{"mask-r-to":de()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":de()}],"mask-image-b-to-pos":[{"mask-b-to":de()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":de()}],"mask-image-l-to-pos":[{"mask-l-to":de()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":de()}],"mask-image-x-to-pos":[{"mask-x-to":de()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":de()}],"mask-image-y-to-pos":[{"mask-y-to":de()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[he,fe]}],"mask-image-radial-from-pos":[{"mask-radial-from":de()}],"mask-image-radial-to-pos":[{"mask-radial-to":de()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"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":L()}],"mask-image-conic-pos":[{"mask-conic":[_e]}],"mask-image-conic-from-pos":[{"mask-conic-from":de()}],"mask-image-conic-to-pos":[{"mask-conic-to":de()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:V()}],"mask-size":[{mask:J()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",he,fe]}],filter:[{filter:["","none",he,fe]}],blur:[{blur:ke()}],brightness:[{brightness:[_e,he,fe]}],contrast:[{contrast:[_e,he,fe]}],"drop-shadow":[{"drop-shadow":["","none",S,da,ua]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:["",_e,he,fe]}],"hue-rotate":[{"hue-rotate":[_e,he,fe]}],invert:[{invert:["",_e,he,fe]}],saturate:[{saturate:[_e,he,fe]}],sepia:[{sepia:["",_e,he,fe]}],"backdrop-filter":[{"backdrop-filter":["","none",he,fe]}],"backdrop-blur":[{"backdrop-blur":ke()}],"backdrop-brightness":[{"backdrop-brightness":[_e,he,fe]}],"backdrop-contrast":[{"backdrop-contrast":[_e,he,fe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",_e,he,fe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[_e,he,fe]}],"backdrop-invert":[{"backdrop-invert":["",_e,he,fe]}],"backdrop-opacity":[{"backdrop-opacity":[_e,he,fe]}],"backdrop-saturate":[{"backdrop-saturate":[_e,he,fe]}],"backdrop-sepia":[{"backdrop-sepia":["",_e,he,fe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",he,fe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[_e,"initial",he,fe]}],ease:[{ease:["linear","initial",E,he,fe]}],delay:[{delay:[_e,he,fe]}],animate:[{animate:["none",T,he,fe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,he,fe]}],"perspective-origin":[{"perspective-origin":I()}],rotate:[{rotate:Ne()}],"rotate-x":[{"rotate-x":Ne()}],"rotate-y":[{"rotate-y":Ne()}],"rotate-z":[{"rotate-z":Ne()}],scale:[{scale:Ee()}],"scale-x":[{"scale-x":Ee()}],"scale-y":[{"scale-y":Ee()}],"scale-z":[{"scale-z":Ee()}],"scale-3d":["scale-3d"],skew:[{skew:qe()}],"skew-x":[{"skew-x":qe()}],"skew-y":[{"skew-y":qe()}],transform:[{transform:[he,fe,"","none","gpu","cpu"]}],"transform-origin":[{origin:I()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:We()}],"translate-x":[{"translate-x":We()}],"translate-y":[{"translate-y":We()}],"translate-z":[{"translate-z":We()}],"translate-none":["translate-none"],zoom:[{zoom:[Nn,he,fe]}],accent:[{accent:F()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:F()}],"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",he,fe]}],"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":F()}],"scrollbar-track-color":[{"scrollbar-track":F()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mbs":[{"scroll-mbs":P()}],"scroll-mbe":[{"scroll-mbe":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pbs":[{"scroll-pbs":P()}],"scroll-pbe":[{"scroll-pbe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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",he,fe]}],fill:[{fill:["none",...F()]}],"stroke-w":[{stroke:[_e,As,qr,um]}],stroke:[{stroke:["none",...F()]}],"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":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Q1=j1(G1);function Se(...n){return Q1(ph(n))}function Ph(n){if(n<1e3)return`${n}ms`;const o=Math.floor(n/1e3);if(o<60)return`${o}s`;const s=Math.floor(o/60),a=o%60;if(s<60)return`${s}m ${a}s`;const u=Math.floor(s/60),d=s%60;return`${u}h ${d}m`}function X1(n){const o=typeof n=="string"?new Date(n):n,a=new Date().getTime()-o.getTime(),u=Math.floor(a/1e3);if(u<60)return"just now";const d=Math.floor(u/60);if(d<60)return`${d}m ago`;const p=Math.floor(d/60);if(p<24)return`${p}h ago`;const m=Math.floor(p/24);return m<7?`${m}d ago`:o.toLocaleDateString()}const pm=mh("inline-flex items-center justify-center gap-2 rounded-card font-medium transition-all duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/40 focus-visible:ring-offset-2 focus-visible:ring-offset-canvas disabled:pointer-events-none disabled:opacity-50 active:scale-[0.98]",{variants:{variant:{primary:"bg-accent text-accent-foreground hover:bg-accent-hover shadow-sm hover:shadow-glow",secondary:"bg-surface-raised text-fg border border-border hover:bg-surface-hover hover:border-border/80",ghost:"text-fg-muted hover:text-fg hover:bg-surface-raised",danger:"bg-rose-500/15 text-rose-400 border border-rose-500/30 hover:bg-rose-500/25 hover:border-rose-500/50 hover:shadow-glow-error","danger-solid":"bg-rose-500 text-white hover:bg-rose-600 shadow-sm",link:"text-accent underline-offset-4 hover:underline hover:text-accent-hover"},size:{sm:"h-8 px-3 text-xs",md:"h-9 px-4 text-sm",lg:"h-11 px-6 text-base",icon:"h-9 w-9","icon-sm":"h-8 w-8","icon-lg":"h-10 w-10"}},defaultVariants:{variant:"primary",size:"md"}}),xe=v.forwardRef(({className:n,variant:o,size:s,loading:a,disabled:u,asChild:d=!1,children:p,...m},h)=>d?l.jsx(Qw,{className:Se(pm({variant:o,size:s,className:n})),ref:h,...m,children:p}):l.jsxs("button",{className:Se(pm({variant:o,size:s,className:n})),ref:h,disabled:u||a,...m,children:[a&&l.jsx(Ew,{className:"h-4 w-4 animate-spin"}),p]}));xe.displayName="Button";class q1 extends v.Component{constructor(s){super(s);Mp(this,"handleReload",()=>{this.setState({hasError:!1,error:null}),window.location.reload()});this.state={hasError:!1,error:null}}static getDerivedStateFromError(s){return{hasError:!0,error:s}}componentDidCatch(s,a){console.error("ErrorBoundary caught:",s,a)}render(){var s;return this.state.hasError?this.props.fallback?this.props.fallback:l.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[50vh] gap-4 p-8 text-center",children:[l.jsx("div",{className:"rounded-full bg-rose-500/10 p-4 text-rose-400",children:l.jsx(Ww,{className:"h-8 w-8"})}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("h2",{className:"text-lg font-semibold text-fg",children:"Something went wrong"}),l.jsx("p",{className:"text-sm text-fg-muted max-w-md",children:((s=this.state.error)==null?void 0:s.message)??"An unexpected error occurred"})]}),l.jsxs(xe,{variant:"secondary",onClick:this.handleReload,className:"gap-2",children:[l.jsx(lh,{className:"h-4 w-4"}),"Reload page"]})]}):this.props.children}}const Eu=v.forwardRef(({className:n,size:o="md",...s},a)=>{const u={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"};return l.jsx("div",{ref:a,role:"status","aria-label":"Loading",className:Se("animate-spin text-accent",u[o],n),...s,children:l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"h-full w-full",children:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),l.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]})})});Eu.displayName="Spinner";const J1="";function Z1(n){return Array.isArray(n)}async function Ie(n,o={}){const{method:s="GET",body:a}=o,u=await fetch(`${J1}${n}`,{method:s,headers:a?{"Content-Type":"application/json"}:{},body:a?JSON.stringify(a):void 0,credentials:"include"});if(!u.ok){const p=await u.json().catch(()=>({error:u.statusText}));throw new Error(p.error||"Request failed")}if(u.status===204)return;const d=await u.json().catch(()=>null);if(d!==null)return Z1(d)&&!d.length&&d[0]===void 0?[]:d}const ht=v.forwardRef(({className:n,type:o,error:s,...a},u)=>l.jsx("input",{type:o,className:Se("flex h-9 w-full rounded-card border bg-surface-raised px-3 py-2 text-sm text-fg placeholder:text-fg-subtle transition-colors","border-border hover:border-border/80","focus:outline-none focus:ring-2 focus:ring-accent/30 focus:border-accent/50","disabled:cursor-not-allowed disabled:opacity-50",s&&"border-rose-500/50 focus:ring-rose-500/30 focus:border-rose-500/50",n),ref:u,...a}));ht.displayName="Input";const ze=v.forwardRef(({className:n,required:o,children:s,...a},u)=>l.jsxs("label",{ref:u,className:Se("text-sm font-medium text-fg-muted leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",n),...a,children:[s,o&&l.jsx("span",{className:"ml-1 text-rose-400",children:"*"})]}));ze.displayName="Label";const $t=v.forwardRef(({className:n,...o},s)=>l.jsx("div",{ref:s,className:Se("rounded-card border border-border bg-surface shadow-card",n),...o}));$t.displayName="Card";const au=v.forwardRef(({className:n,...o},s)=>l.jsx("div",{ref:s,className:Se("flex flex-col gap-1 p-5",n),...o}));au.displayName="CardHeader";const lu=v.forwardRef(({className:n,...o},s)=>l.jsx("h3",{ref:s,className:Se("text-sm font-semibold text-fg",n),...o}));lu.displayName="CardTitle";const eb=v.forwardRef(({className:n,...o},s)=>l.jsx("p",{ref:s,className:Se("text-xs text-fg-muted",n),...o}));eb.displayName="CardDescription";const jr=v.forwardRef(({className:n,...o},s)=>l.jsx("div",{ref:s,className:Se("p-5 pt-0",n),...o}));jr.displayName="CardBody";const tb=v.forwardRef(({className:n,...o},s)=>l.jsx("div",{ref:s,className:Se("flex items-center gap-3 p-5 pt-0",n),...o}));tb.displayName="CardFooter";function nb(){const[n,o]=v.useState(""),[s,a]=v.useState(""),[u,d]=v.useState(!1),[p,m]=v.useState(!1),h=Ia();async function y(w){if(w.preventDefault(),!n.trim()||!s.trim()){Re.error("Username and password are required");return}m(!0);try{const g=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({username:n,password:s})});if(g.ok)h("/");else{const k=await g.json();Re.error(k.error||"Login failed")}}catch{Re.error("Network error")}finally{m(!1)}}return l.jsxs("div",{className:"min-h-screen flex items-center justify-center bg-canvas relative overflow-hidden",children:[l.jsx("div",{className:"absolute inset-0 opacity-[0.03]",style:{backgroundImage:`radial-gradient(circle at 30% 40%, #2dd4bf 0%, transparent 50%), - radial-gradient(circle at 80% 60%, #2dd4bf 0%, transparent 40%)`}}),l.jsxs("div",{className:"relative w-full max-w-sm mx-4",children:[l.jsxs("div",{className:"flex flex-col items-center mb-8 animate-fade-in",children:[l.jsx("div",{className:"rounded-card bg-accent/10 p-3 mb-4",children:l.jsx(sh,{className:"h-8 w-8 text-accent"})}),l.jsx("h1",{className:"text-2xl font-bold text-fg tracking-tight",children:"SyncServer"}),l.jsx("p",{className:"text-fg-muted text-sm mt-1",children:"Sign in to your account"})]}),l.jsx($t,{className:"animate-scale-in",style:{animationDelay:"50ms"},children:l.jsx(jr,{children:l.jsxs("form",{onSubmit:y,className:"space-y-4",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"username",required:!0,children:"Username"}),l.jsx(ht,{id:"username",type:"text",placeholder:"admin",value:n,onChange:w=>o(w.target.value),autoComplete:"username",autoFocus:!0})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"password",required:!0,children:"Password"}),l.jsxs("div",{className:"relative",children:[l.jsx(ht,{id:"password",type:u?"text":"password",placeholder:"••••••••",value:s,onChange:w=>a(w.target.value),autoComplete:"current-password",className:"pr-10"}),l.jsx("button",{type:"button",onClick:()=>d(w=>!w),className:"absolute right-3 top-1/2 -translate-y-1/2 text-fg-subtle hover:text-fg-muted transition-colors",tabIndex:-1,children:u?l.jsx(hw,{className:"h-4 w-4"}):l.jsx(vw,{className:"h-4 w-4"})})]})]}),l.jsx(xe,{type:"submit",className:"w-full",loading:p,children:"Sign In"})]})})})]})]})}const rb=mh("inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium transition-colors",{variants:{variant:{running:"bg-emerald-500/15 text-emerald-400 border border-emerald-500/30",pending:"bg-amber-500/15 text-amber-400 border border-amber-500/30",waking:"bg-amber-500/15 text-amber-400 border border-amber-500/30",success:"bg-emerald-500/15 text-emerald-400 border border-emerald-500/30",error:"bg-rose-500/15 text-rose-400 border border-rose-500/30",info:"bg-sky-500/15 text-sky-400 border border-sky-500/30",neutral:"bg-zinc-500/15 text-zinc-400 border border-zinc-500/30"}},defaultVariants:{variant:"neutral"}}),ob={running:"running",pending:"pending",waking:"waking",success:"success",error:"error",failed:"error",completed:"success",cancelled:"neutral",info:"info",unknown:"neutral"};function Fa(n){return ob[n.toLowerCase()]??"neutral"}function $a(n){return{running:"Running",pending:"Pending",waking:"Waking",success:"Success",error:"Error",failed:"Failed",completed:"Completed",cancelled:"Cancelled",info:"Info",unknown:"Unknown"}[n.toLowerCase()]??n}const sb={wol_timeout:{title:"Machine didn't wake up",hint:"Waited for machine to respond and got no SSH reply. Make sure the server and the target machine are on the same L2 broadcast domain. For HP Microservers and similar hardware, increase the Wake timeout in the machine settings (180s or more)."},wol_send_failed:{title:"Wake-on-LAN packet failed to send",hint:"The magic packet could not be sent. Check the server logs for details. The server must be on the same broadcast domain as the target machine NIC and must have NET_ADMIN or CAP_NET_RAW capability."},rsync_error:{title:"rsync failed",hint:"See the full log for rsync error details"},exit_code:{title:"rsync exited with errors",hint:"Check stderr output for details"},ssh_key_fallback:{title:"SSH key not found",hint:"Server fell back to its own key. Verify the machine SSH key configuration"},cancelled_user:{title:"Cancelled by user",hint:"The job was manually cancelled from the UI"},cancelled_shutdown:{title:"Cancelled — server shutdown",hint:"The job was interrupted because the syncserver process stopped"},unknown_cancelled:{title:"Cancelled (no reason recorded)",hint:"This cancellation happened before the upgrade that records reasons"}};function Rh(n){return n?sb[n]??{title:n,hint:"See full error details below"}:null}const Bt=v.forwardRef(({className:n,variant:o,label:s,children:a,...u},d)=>{const p=s??(typeof o=="string"?$a(o):a);return l.jsx("span",{ref:d,className:Se(rb({variant:o}),n),...u,children:p})});Bt.displayName="Badge";const no=v.forwardRef(({className:n,title:o,description:s,actions:a,...u},d)=>l.jsxs("div",{ref:d,className:Se("flex flex-col gap-1 sm:flex-row sm:items-center sm:justify-between",n),...u,children:[l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("h1",{className:"text-2xl font-bold text-fg tracking-tight",children:o}),s&&l.jsx("p",{className:"mt-1 text-sm text-fg-muted",children:s})]}),a&&l.jsx("div",{className:"flex items-center gap-2 mt-3 sm:mt-0 shrink-0",children:a})]}));no.displayName="PageHeader";const Ws=v.forwardRef(({className:n,...o},s)=>l.jsx("div",{className:"relative w-full overflow-auto",children:l.jsx("table",{ref:s,className:Se("w-full caption-bottom text-sm",n),...o})}));Ws.displayName="Table";const Hs=v.forwardRef(({className:n,...o},s)=>l.jsx("thead",{ref:s,className:Se("[&_tr]:border-b",n),...o}));Hs.displayName="TableHeader";const Ks=v.forwardRef(({className:n,...o},s)=>l.jsx("tbody",{ref:s,className:Se("[&_tr:last-child]:border-0",n),...o}));Ks.displayName="TableBody";const ib=v.forwardRef(({className:n,...o},s)=>l.jsx("tfoot",{ref:s,className:Se("border-t bg-surface-raised font-medium [&>tr]:last:border-b-0",n),...o}));ib.displayName="TableFooter";const Wn=v.forwardRef(({className:n,...o},s)=>l.jsx("tr",{ref:s,className:Se("border-b border-border/50 transition-colors","hover:bg-surface-raised/50",n),...o}));Wn.displayName="TableRow";const Fe=v.forwardRef(({className:n,...o},s)=>l.jsx("th",{ref:s,className:Se("h-10 px-4 text-left align-middle text-xs font-semibold text-fg-muted uppercase tracking-wider","[&:has([role=checkbox])]:pr-0",n),...o}));Fe.displayName="TableHead";const $e=v.forwardRef(({className:n,...o},s)=>l.jsx("td",{ref:s,className:Se("px-4 py-3 align-middle text-sm text-fg","[&:has([role=checkbox])]:pr-0",n),...o}));$e.displayName="TableCell";const ab=v.forwardRef(({className:n,...o},s)=>l.jsx("caption",{ref:s,className:Se("mt-4 text-sm text-fg-muted",n),...o}));ab.displayName="TableCaption";const Yo=v.forwardRef(({className:n,icon:o,title:s,description:a,action:u,...d},p)=>l.jsxs("div",{ref:p,className:Se("flex flex-col items-center justify-center gap-3 py-12 text-center",n),...d,children:[o&&l.jsx("div",{className:"rounded-full bg-surface-raised p-3 text-fg-subtle",children:o}),l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:"text-sm font-medium text-fg",children:s}),a&&l.jsx("p",{className:"text-xs text-fg-muted max-w-xs",children:a})]}),u&&l.jsx("div",{className:"mt-1",children:u})]}));Yo.displayName="EmptyState";const zs=v.forwardRef(({className:n,variant:o="rectangular",width:s,height:a,style:u,...d},p)=>{const m=o==="circular"?"rounded-full":o==="text"?"rounded":"rounded-card";return l.jsx("div",{ref:p,className:Se("animate-pulse bg-surface-raised",m,n),style:{width:s,height:a,...u},...d})});zs.displayName="Skeleton";function Th(n){const o=new EventSource("/api/jobs/stream");return o.addEventListener("machine_status",s=>{try{const a=JSON.parse(s.data);n(a)}catch{}}),()=>o.close()}function lb(){const[n,o]=v.useState([]),[s,a]=v.useState([]),[u,d]=v.useState([]),[p,m]=v.useState(!0);v.useEffect(()=>{Promise.all([Ie("/api/machines"),Ie("/api/jobs?limit=5"),Ie("/api/sync-pairs")]).then(([S,C,b])=>{o(S),a(C),d(b)}).catch(()=>{}).finally(()=>m(!1)),Ie("/api/machines/refresh",{method:"POST"}).catch(()=>{})},[]),v.useEffect(()=>Th(C=>{o(b=>b.map(N=>N.id===C.machine_id?{...N,status:C.status}:N))}),[]);const h=S=>{var C;return((C=u.find(b=>b.id===S))==null?void 0:C.name)??`Pair ${S}`},y=n.filter(S=>S.status.startsWith("online")).length,w=s.filter(S=>S.started_at?S.started_at.startsWith(new Date().toISOString().split("T")[0]):!1).length,g=s.filter(S=>["running","queued","waking_up"].includes(S.status)).length,k=[{label:"Total Machines",value:n.length,icon:ku,className:"text-sky-400",bgClass:"bg-sky-500/10"},{label:"Online",value:y,icon:X0,className:"text-emerald-400",bgClass:"bg-emerald-500/10",accent:y>0},{label:"Jobs Today",value:w,icon:rh,className:"text-amber-400",bgClass:"bg-amber-500/10"},{label:"Running",value:g,icon:tm,className:"text-accent",bgClass:"bg-accent/10"}];return l.jsxs("div",{className:"space-y-6",children:[l.jsx(no,{title:"Dashboard",description:"Overview of your sync infrastructure"}),l.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:p?Array.from({length:4}).map((S,C)=>l.jsx($t,{children:l.jsxs(jr,{children:[l.jsx(zs,{className:"h-4 w-20 mb-3"}),l.jsx(zs,{className:"h-8 w-12"})]})},C)):k.map(S=>{const C=S.icon;return l.jsx($t,{className:"transition-shadow hover:shadow-card-hover",children:l.jsxs(jr,{children:[l.jsxs("div",{className:"flex items-start justify-between mb-3",children:[l.jsx("span",{className:"text-xs font-medium text-fg-muted uppercase tracking-wider",children:S.label}),l.jsx("div",{className:`rounded-card p-1.5 ${S.bgClass}`,children:l.jsx(C,{className:`h-3.5 w-3.5 ${S.className}`})})]}),l.jsx("p",{className:`text-3xl font-bold ${S.className}`,children:S.value})]})},S.label)})}),l.jsxs($t,{children:[l.jsxs("div",{className:"p-5 pb-0 flex items-center justify-between",children:[l.jsx("h2",{className:"text-base font-semibold text-fg",children:"Recent Jobs"}),l.jsx(xe,{variant:"ghost",size:"sm",asChild:!0,children:l.jsx(zo,{to:"/jobs",children:"View all"})})]}),l.jsx("div",{className:"p-5",children:p?l.jsx("div",{className:"space-y-3",children:Array.from({length:3}).map((S,C)=>l.jsx(zs,{className:"h-10 w-full"},C))}):s.length===0?l.jsx(Yo,{icon:l.jsx(tm,{className:"h-5 w-5"}),title:"No jobs yet",description:"Sync pairs will appear here once jobs are executed"}):l.jsxs(Ws,{children:[l.jsx(Hs,{children:l.jsxs(Wn,{children:[l.jsx(Fe,{children:"ID"}),l.jsx(Fe,{children:"Sync Pair"}),l.jsx(Fe,{children:"Status"}),l.jsx(Fe,{children:"Started"})]})}),l.jsx(Ks,{children:s.map(S=>l.jsxs(Wn,{children:[l.jsx($e,{children:l.jsxs(zo,{to:`/jobs/${S.id}`,className:"text-accent hover:text-accent-hover font-mono text-xs",children:["#",S.id]})}),l.jsx($e,{className:"text-fg-muted",children:h(S.sync_pair_id)}),l.jsx($e,{children:l.jsx(Bt,{variant:Fa(S.status),label:$a(S.status)})}),l.jsx($e,{className:"text-fg-muted text-xs",children:S.started_at?X1(S.started_at):"-"})]},S.id))})]})})]})]})}function mm(n,[o,s]){return Math.min(s,Math.max(o,n))}function Be(n,o,{checkForDefaultPrevented:s=!0}={}){return function(u){if(n==null||n(u),s===!1||!u||!u.defaultPrevented)return o==null?void 0:o(u)}}function Ys(n,o=[]){let s=[];function a(d,p){const m=v.createContext(p);m.displayName=d+"Context";const h=s.length;s=[...s,p];const y=g=>{var E;const{scope:k,children:S,...C}=g,b=((E=k==null?void 0:k[n])==null?void 0:E[h])||m,N=v.useMemo(()=>C,Object.values(C));return l.jsx(b.Provider,{value:N,children:S})};y.displayName=d+"Provider";function w(g,k,S={}){var E;const{optional:C=!1}=S,b=((E=k==null?void 0:k[n])==null?void 0:E[h])||m,N=v.useContext(b);if(N)return N;if(p!==void 0)return p;if(!C)throw new Error(`\`${g}\` must be used within \`${d}\``)}return[y,w]}const u=()=>{const d=s.map(p=>v.createContext(p));return function(m){const h=(m==null?void 0:m[n])||d;return v.useMemo(()=>({[`__scope${n}`]:{...m,[n]:h}}),[m,h])}};return u.scopeName=n,[a,cb(u,...o)]}function cb(...n){const o=n[0];if(n.length===1)return o;const s=()=>{const a=n.map(u=>({useScope:u(),scopeName:u.scopeName}));return function(d){const p=a.reduce((m,{useScope:h,scopeName:y})=>{const g=h(d)[`__scope${y}`];return{...m,...g}},{});return v.useMemo(()=>({[`__scope${o.scopeName}`]:p}),[p])}};return s.scopeName=o.scopeName,s}function ub(n){const o=n+"CollectionProvider",[s,a]=Ys(o),[u,d]=s(o,{collectionRef:{current:null},itemMap:new Map}),p=b=>{const{scope:N,children:E}=b,T=v.useRef(null),_=v.useRef(new Map).current;return l.jsx(u,{scope:N,itemMap:_,collectionRef:T,children:E})};p.displayName=o;const m=n+"CollectionSlot",h=$o(m),y=v.forwardRef((b,N)=>{const{scope:E,children:T}=b,_=d(m,E),L=Qe(N,_.collectionRef);return l.jsx(h,{ref:L,children:T})});y.displayName=m;const w=n+"CollectionItemSlot",g="data-radix-collection-item",k=$o(w),S=v.forwardRef((b,N)=>{const{scope:E,children:T,..._}=b,L=v.useRef(null),I=Qe(N,L),W=d(w,E);return v.useEffect(()=>(W.itemMap.set(L,{ref:L,..._}),()=>void W.itemMap.delete(L))),l.jsx(k,{[g]:"",ref:I,children:T})});S.displayName=w;function C(b){const N=d(n+"CollectionConsumer",b);return v.useCallback(()=>{const T=N.collectionRef.current;if(!T)return[];const _=Array.from(T.querySelectorAll(`[${g}]`));return Array.from(N.itemMap.values()).sort((W,B)=>_.indexOf(W.ref.current)-_.indexOf(B.ref.current))},[N.collectionRef,N.itemMap])}return[{Provider:p,Slot:y,ItemSlot:S},C,a]}var db=v.createContext(void 0);function fb(n){const o=v.useContext(db);return n||o||"ltr"}var pb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ae=pb.reduce((n,o)=>{const s=$o(`Primitive.${o}`),a=v.forwardRef((u,d)=>{const{asChild:p,...m}=u,h=p?s:o;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(h,{...m,ref:d})});return a.displayName=`Primitive.${o}`,{...n,[o]:a}},{});function mb(n,o){n&&Vo.flushSync(()=>n.dispatchEvent(o))}function Hn(n){const o=v.useRef(n);return v.useEffect(()=>{o.current=n}),v.useMemo(()=>((...s)=>{var a;return(a=o.current)==null?void 0:a.call(o,...s)}),[])}var hb="DismissableLayer",cu="dismissableLayer.update",gb="dismissableLayer.pointerDownOutside",vb="dismissableLayer.focusOutside",hm,_u=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Pu=v.forwardRef((n,o)=>{const{disableOutsidePointerEvents:s=!1,deferPointerDownOutside:a=!1,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:p,onInteractOutside:m,onDismiss:h,...y}=n,w=v.useContext(_u),[g,k]=v.useState(null),S=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,C]=v.useState({}),b=Qe(o,k),N=Array.from(w.layers),[E]=[...w.layersWithOutsidePointerEventsDisabled].slice(-1),T=E?N.indexOf(E):-1,_=g?N.indexOf(g):-1,L=w.layersWithOutsidePointerEventsDisabled.size>0,I=_>=T,W=v.useRef(!1),B=Sb(oe=>{d==null||d(oe),m==null||m(oe),oe.defaultPrevented||h==null||h()},{ownerDocument:S,deferPointerDownOutside:a,isDeferredPointerDownOutsideRef:W,dismissableSurfaces:w.dismissableSurfaces,shouldHandlePointerDownOutside:v.useCallback(oe=>{if(!(oe instanceof Node))return!1;const pe=[...w.branches].some(H=>H.contains(oe));return I&&!pe},[w.branches,I])}),P=kb(oe=>{if(a&&W.current)return;const pe=oe.target;[...w.branches].some(z=>z.contains(pe))||(p==null||p(oe),m==null||m(oe),oe.defaultPrevented||h==null||h())},S),ee=g?_===N.length-1:!1,ie=Hn(oe=>{oe.key==="Escape"&&(u==null||u(oe),!oe.defaultPrevented&&h&&(oe.preventDefault(),h()))});return v.useEffect(()=>{if(ee)return S.addEventListener("keydown",ie,{capture:!0}),()=>S.removeEventListener("keydown",ie,{capture:!0})},[S,ee,ie]),v.useEffect(()=>{if(g)return s&&(w.layersWithOutsidePointerEventsDisabled.size===0&&(hm=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),w.layersWithOutsidePointerEventsDisabled.add(g)),w.layers.add(g),gm(),()=>{s&&(w.layersWithOutsidePointerEventsDisabled.delete(g),w.layersWithOutsidePointerEventsDisabled.size===0&&(S.body.style.pointerEvents=hm))}},[g,S,s,w]),v.useEffect(()=>()=>{g&&(w.layers.delete(g),w.layersWithOutsidePointerEventsDisabled.delete(g),gm())},[g,w]),v.useEffect(()=>{const oe=()=>C({});return document.addEventListener(cu,oe),()=>document.removeEventListener(cu,oe)},[]),l.jsx(Ae.div,{...y,ref:b,style:{pointerEvents:L?I?"auto":"none":void 0,...n.style},onFocusCapture:Be(n.onFocusCapture,P.onFocusCapture),onBlurCapture:Be(n.onBlurCapture,P.onBlurCapture),onPointerDownCapture:Be(n.onPointerDownCapture,B.onPointerDownCapture)})});Pu.displayName=hb;var yb="DismissableLayerBranch",xb=v.forwardRef((n,o)=>{const s=v.useContext(_u),a=v.useRef(null),u=Qe(o,a);return v.useEffect(()=>{const d=a.current;if(d)return s.branches.add(d),()=>{s.branches.delete(d)}},[s.branches]),l.jsx(Ae.div,{...n,ref:u})});xb.displayName=yb;function wb(){const n=v.useContext(_u),[o,s]=v.useState(null);return v.useEffect(()=>{if(o)return n.dismissableSurfaces.add(o),()=>{n.dismissableSurfaces.delete(o)}},[o,n.dismissableSurfaces]),s}var bb=()=>!0;function Sb(n,o){const{ownerDocument:s=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:a=!1,isDeferredPointerDownOutsideRef:u,dismissableSurfaces:d,shouldHandlePointerDownOutside:p=bb}=o,m=Hn(n),h=v.useRef(!1),y=v.useRef(!1),w=v.useRef(new Map),g=v.useRef(()=>{});return v.useEffect(()=>{function k(){y.current=!1,u.current=!1,w.current.clear()}function S(){return Array.from(w.current.values()).some(Boolean)}function C(_){if(!y.current)return;const L=_.target;L instanceof Node&&[...d].some(W=>W.contains(L))||w.current.set(_.type,!0),_.type==="click"&&window.setTimeout(()=>{y.current&&g.current()},0)}function b(_){y.current&&w.current.set(_.type,!1)}const N=_=>{if(_.target&&!h.current){let L=function(){s.removeEventListener("click",g.current);const W=S();k(),W||Mh(gb,m,I,{discrete:!0})};if(!p(_.target)){s.removeEventListener("click",g.current),k(),h.current=!1;return}const I={originalEvent:_};y.current=!0,u.current=a&&_.button===0,w.current.clear(),!a||_.button!==0?L():(s.removeEventListener("click",g.current),g.current=L,s.addEventListener("click",g.current,{once:!0}))}else s.removeEventListener("click",g.current),k();h.current=!1},E=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const _ of E)s.addEventListener(_,C,!0),s.addEventListener(_,b);const T=window.setTimeout(()=>{s.addEventListener("pointerdown",N)},0);return()=>{window.clearTimeout(T),s.removeEventListener("pointerdown",N),s.removeEventListener("click",g.current);for(const _ of E)s.removeEventListener(_,C,!0),s.removeEventListener(_,b)}},[s,m,a,u,d,p]),{onPointerDownCapture:()=>h.current=!0}}function kb(n,o=globalThis==null?void 0:globalThis.document){const s=Hn(n),a=v.useRef(!1);return v.useEffect(()=>{const u=d=>{d.target&&!a.current&&Mh(vb,s,{originalEvent:d},{discrete:!1})};return o.addEventListener("focusin",u),()=>o.removeEventListener("focusin",u)},[o,s]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}function gm(){const n=new CustomEvent(cu);document.dispatchEvent(n)}function Mh(n,o,s,{discrete:a}){const u=s.originalEvent.target,d=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:s});o&&u.addEventListener(n,o,{once:!0}),a?mb(u,d):u.dispatchEvent(d)}var fa=0,jn=null;function Oh(){v.useEffect(()=>{jn||(jn={start:vm(),end:vm()});const{start:n,end:o}=jn;return document.body.firstElementChild!==n&&document.body.insertAdjacentElement("afterbegin",n),document.body.lastElementChild!==o&&document.body.insertAdjacentElement("beforeend",o),fa++,()=>{fa===1&&(jn==null||jn.start.remove(),jn==null||jn.end.remove(),jn=null),fa=Math.max(0,fa-1)}},[])}function vm(){const n=document.createElement("span");return n.setAttribute("data-radix-focus-guard",""),n.tabIndex=0,n.style.outline="none",n.style.opacity="0",n.style.position="fixed",n.style.pointerEvents="none",n}var Vc="focusScope.autoFocusOnMount",Wc="focusScope.autoFocusOnUnmount",ym={bubbles:!1,cancelable:!0},Cb="FocusScope",Ru=v.forwardRef((n,o)=>{const{loop:s=!1,trapped:a=!1,onMountAutoFocus:u,onUnmountAutoFocus:d,...p}=n,[m,h]=v.useState(null),y=Hn(u),w=Hn(d),g=v.useRef(null),k=Qe(o,h),S=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(a){let b=function(_){if(S.paused||!m)return;const L=_.target;m.contains(L)?g.current=L:kr(g.current,{select:!0})},N=function(_){if(S.paused||!m)return;const L=_.relatedTarget;L!==null&&(m.contains(L)||kr(g.current,{select:!0}))},E=function(_){if(document.activeElement===document.body)for(const I of _)I.removedNodes.length>0&&kr(m)};document.addEventListener("focusin",b),document.addEventListener("focusout",N);const T=new MutationObserver(E);return m&&T.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",N),T.disconnect()}}},[a,m,S.paused]),v.useEffect(()=>{if(m){wm.add(S);const b=document.activeElement;if(!m.contains(b)){const E=new CustomEvent(Vc,ym);m.addEventListener(Vc,y),m.dispatchEvent(E),E.defaultPrevented||(Nb(Rb(Lh(m)),{select:!0}),document.activeElement===b&&kr(m))}return()=>{m.removeEventListener(Vc,y),setTimeout(()=>{const E=new CustomEvent(Wc,ym);m.addEventListener(Wc,w),m.dispatchEvent(E),E.defaultPrevented||kr(b??document.body,{select:!0}),m.removeEventListener(Wc,w),wm.remove(S)},0)}}},[m,y,w,S]);const C=v.useCallback(b=>{if(!s&&!a||S.paused)return;const N=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,E=document.activeElement;if(N&&E){const T=b.currentTarget,[_,L]=jb(T);_&&L?!b.shiftKey&&E===L?(b.preventDefault(),s&&kr(_,{select:!0})):b.shiftKey&&E===_&&(b.preventDefault(),s&&kr(L,{select:!0})):E===T&&b.preventDefault()}},[s,a,S.paused]);return l.jsx(Ae.div,{tabIndex:-1,...p,ref:k,onKeyDown:C})});Ru.displayName=Cb;function Nb(n,{select:o=!1}={}){const s=document.activeElement;for(const a of n)if(kr(a,{select:o}),document.activeElement!==s)return}function jb(n){const o=Lh(n),s=xm(o,n),a=xm(o.reverse(),n);return[s,a]}function Lh(n){const o=[],s=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const u=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||u?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)o.push(s.currentNode);return o}function xm(n,o){const s=typeof o.checkVisibility=="function"&&o.checkVisibility({checkVisibilityCSS:!0});for(const a of n)if(!(s?!a.checkVisibility({checkVisibilityCSS:!0}):Eb(a,{upTo:o})))return a}function Eb(n,{upTo:o}){if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(o!==void 0&&n===o)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}function _b(n){return n instanceof HTMLInputElement&&"select"in n}function kr(n,{select:o=!1}={}){if(n&&n.focus){const s=document.activeElement;n.focus({preventScroll:!0}),n!==s&&_b(n)&&o&&n.select()}}var wm=Pb();function Pb(){let n=[];return{add(o){const s=n[0];o!==s&&(s==null||s.pause()),n=bm(n,o),n.unshift(o)},remove(o){var s;n=bm(n,o),(s=n[0])==null||s.resume()}}}function bm(n,o){const s=[...n],a=s.indexOf(o);return a!==-1&&s.splice(a,1),s}function Rb(n){return n.filter(o=>o.tagName!=="A")}var gt=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},Tb=Oa[" useId ".trim().toString()]||(()=>{}),Mb=0;function Mo(n){const[o,s]=v.useState(Tb());return gt(()=>{s(a=>a??String(Mb++))},[n]),o?`radix-${o}`:""}const Ob=["top","right","bottom","left"],Er=Math.min,Ft=Math.max,ja=Math.round,pa=Math.floor,Pn=n=>({x:n,y:n}),Lb={left:"right",right:"left",bottom:"top",top:"bottom"};function uu(n,o,s){return Ft(n,Er(o,s))}function Kn(n,o){return typeof n=="function"?n(o):n}function Yn(n){return n.split("-")[0]}function Go(n){return n.split("-")[1]}function Tu(n){return n==="x"?"y":"x"}function Mu(n){return n==="y"?"height":"width"}function _n(n){const o=n[0];return o==="t"||o==="b"?"y":"x"}function Ou(n){return Tu(_n(n))}function Ab(n,o,s){s===void 0&&(s=!1);const a=Go(n),u=Ou(n),d=Mu(u);let p=u==="x"?a===(s?"end":"start")?"right":"left":a==="start"?"bottom":"top";return o.reference[d]>o.floating[d]&&(p=Ea(p)),[p,Ea(p)]}function Ib(n){const o=Ea(n);return[du(n),o,du(o)]}function du(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}const Sm=["left","right"],km=["right","left"],Db=["top","bottom"],zb=["bottom","top"];function Fb(n,o,s){switch(n){case"top":case"bottom":return s?o?km:Sm:o?Sm:km;case"left":case"right":return o?Db:zb;default:return[]}}function $b(n,o,s,a){const u=Go(n);let d=Fb(Yn(n),s==="start",a);return u&&(d=d.map(p=>p+"-"+u),o&&(d=d.concat(d.map(du)))),d}function Ea(n){const o=Yn(n);return Lb[o]+n.slice(o.length)}function Bb(n){return{top:0,right:0,bottom:0,left:0,...n}}function Ah(n){return typeof n!="number"?Bb(n):{top:n,right:n,bottom:n,left:n}}function _a(n){const{x:o,y:s,width:a,height:u}=n;return{width:a,height:u,top:s,left:o,right:o+a,bottom:s+u,x:o,y:s}}function Cm(n,o,s){let{reference:a,floating:u}=n;const d=_n(o),p=Ou(o),m=Mu(p),h=Yn(o),y=d==="y",w=a.x+a.width/2-u.width/2,g=a.y+a.height/2-u.height/2,k=a[m]/2-u[m]/2;let S;switch(h){case"top":S={x:w,y:a.y-u.height};break;case"bottom":S={x:w,y:a.y+a.height};break;case"right":S={x:a.x+a.width,y:g};break;case"left":S={x:a.x-u.width,y:g};break;default:S={x:a.x,y:a.y}}switch(Go(o)){case"start":S[p]-=k*(s&&y?-1:1);break;case"end":S[p]+=k*(s&&y?-1:1);break}return S}async function Ub(n,o){var s;o===void 0&&(o={});const{x:a,y:u,platform:d,rects:p,elements:m,strategy:h}=n,{boundary:y="clippingAncestors",rootBoundary:w="viewport",elementContext:g="floating",altBoundary:k=!1,padding:S=0}=Kn(o,n),C=Ah(S),N=m[k?g==="floating"?"reference":"floating":g],E=_a(await d.getClippingRect({element:(s=await(d.isElement==null?void 0:d.isElement(N)))==null||s?N:N.contextElement||await(d.getDocumentElement==null?void 0:d.getDocumentElement(m.floating)),boundary:y,rootBoundary:w,strategy:h})),T=g==="floating"?{x:a,y:u,width:p.floating.width,height:p.floating.height}:p.reference,_=await(d.getOffsetParent==null?void 0:d.getOffsetParent(m.floating)),L=await(d.isElement==null?void 0:d.isElement(_))?await(d.getScale==null?void 0:d.getScale(_))||{x:1,y:1}:{x:1,y:1},I=_a(d.convertOffsetParentRelativeRectToViewportRelativeRect?await d.convertOffsetParentRelativeRectToViewportRelativeRect({elements:m,rect:T,offsetParent:_,strategy:h}):T);return{top:(E.top-I.top+C.top)/L.y,bottom:(I.bottom-E.bottom+C.bottom)/L.y,left:(E.left-I.left+C.left)/L.x,right:(I.right-E.right+C.right)/L.x}}const Vb=50,Wb=async(n,o,s)=>{const{placement:a="bottom",strategy:u="absolute",middleware:d=[],platform:p}=s,m=p.detectOverflow?p:{...p,detectOverflow:Ub},h=await(p.isRTL==null?void 0:p.isRTL(o));let y=await p.getElementRects({reference:n,floating:o,strategy:u}),{x:w,y:g}=Cm(y,a,h),k=a,S=0;const C={};for(let b=0;b({name:"arrow",options:n,async fn(o){const{x:s,y:a,placement:u,rects:d,platform:p,elements:m,middlewareData:h}=o,{element:y,padding:w=0}=Kn(n,o)||{};if(y==null)return{};const g=Ah(w),k={x:s,y:a},S=Ou(u),C=Mu(S),b=await p.getDimensions(y),N=S==="y",E=N?"top":"left",T=N?"bottom":"right",_=N?"clientHeight":"clientWidth",L=d.reference[C]+d.reference[S]-k[S]-d.floating[C],I=k[S]-d.reference[S],W=await(p.getOffsetParent==null?void 0:p.getOffsetParent(y));let B=W?W[_]:0;(!B||!await(p.isElement==null?void 0:p.isElement(W)))&&(B=m.floating[_]||d.floating[C]);const P=L/2-I/2,ee=B/2-b[C]/2-1,ie=Er(g[E],ee),oe=Er(g[T],ee),pe=ie,H=B-b[C]-oe,z=B/2-b[C]/2+P,te=uu(pe,z,H),K=!h.arrow&&Go(u)!=null&&z!==te&&d.reference[C]/2-(zz<=0)){var oe,pe;const z=(((oe=d.flip)==null?void 0:oe.index)||0)+1,te=B[z];if(te&&(!(g==="alignment"?T!==_n(te):!1)||ie.every(U=>_n(U.placement)===T?U.overflows[0]>0:!0)))return{data:{index:z,overflows:ie},reset:{placement:te}};let K=(pe=ie.filter(X=>X.overflows[0]<=0).sort((X,U)=>X.overflows[1]-U.overflows[1])[0])==null?void 0:pe.placement;if(!K)switch(S){case"bestFit":{var H;const X=(H=ie.filter(U=>{if(W){const q=_n(U.placement);return q===T||q==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(q=>q>0).reduce((q,F)=>q+F,0)]).sort((U,q)=>U[1]-q[1])[0])==null?void 0:H[0];X&&(K=X);break}case"initialPlacement":K=m;break}if(u!==K)return{reset:{placement:K}}}return{}}}};function Nm(n,o){return{top:n.top-o.height,right:n.right-o.width,bottom:n.bottom-o.height,left:n.left-o.width}}function jm(n){return Ob.some(o=>n[o]>=0)}const Yb=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(o){const{rects:s,platform:a}=o,{strategy:u="referenceHidden",...d}=Kn(n,o);switch(u){case"referenceHidden":{const p=await a.detectOverflow(o,{...d,elementContext:"reference"}),m=Nm(p,s.reference);return{data:{referenceHiddenOffsets:m,referenceHidden:jm(m)}}}case"escaped":{const p=await a.detectOverflow(o,{...d,altBoundary:!0}),m=Nm(p,s.floating);return{data:{escapedOffsets:m,escaped:jm(m)}}}default:return{}}}}},Ih=new Set(["left","top"]);async function Gb(n,o){const{placement:s,platform:a,elements:u}=n,d=await(a.isRTL==null?void 0:a.isRTL(u.floating)),p=Yn(s),m=Go(s),h=_n(s)==="y",y=Ih.has(p)?-1:1,w=d&&h?-1:1,g=Kn(o,n);let{mainAxis:k,crossAxis:S,alignmentAxis:C}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return m&&typeof C=="number"&&(S=m==="end"?C*-1:C),h?{x:S*w,y:k*y}:{x:k*y,y:S*w}}const Qb=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(o){var s,a;const{x:u,y:d,placement:p,middlewareData:m}=o,h=await Gb(o,n);return p===((s=m.offset)==null?void 0:s.placement)&&(a=m.arrow)!=null&&a.alignmentOffset?{}:{x:u+h.x,y:d+h.y,data:{...h,placement:p}}}}},Xb=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(o){const{x:s,y:a,placement:u,platform:d}=o,{mainAxis:p=!0,crossAxis:m=!1,limiter:h={fn:E=>{let{x:T,y:_}=E;return{x:T,y:_}}},...y}=Kn(n,o),w={x:s,y:a},g=await d.detectOverflow(o,y),k=_n(Yn(u)),S=Tu(k);let C=w[S],b=w[k];if(p){const E=S==="y"?"top":"left",T=S==="y"?"bottom":"right",_=C+g[E],L=C-g[T];C=uu(_,C,L)}if(m){const E=k==="y"?"top":"left",T=k==="y"?"bottom":"right",_=b+g[E],L=b-g[T];b=uu(_,b,L)}const N=h.fn({...o,[S]:C,[k]:b});return{...N,data:{x:N.x-s,y:N.y-a,enabled:{[S]:p,[k]:m}}}}}},qb=function(n){return n===void 0&&(n={}),{options:n,fn(o){const{x:s,y:a,placement:u,rects:d,middlewareData:p}=o,{offset:m=0,mainAxis:h=!0,crossAxis:y=!0}=Kn(n,o),w={x:s,y:a},g=_n(u),k=Tu(g);let S=w[k],C=w[g];const b=Kn(m,o),N=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(h){const _=k==="y"?"height":"width",L=d.reference[k]-d.floating[_]+N.mainAxis,I=d.reference[k]+d.reference[_]-N.mainAxis;SI&&(S=I)}if(y){var E,T;const _=k==="y"?"width":"height",L=Ih.has(Yn(u)),I=d.reference[g]-d.floating[_]+(L&&((E=p.offset)==null?void 0:E[g])||0)+(L?0:N.crossAxis),W=d.reference[g]+d.reference[_]+(L?0:((T=p.offset)==null?void 0:T[g])||0)-(L?N.crossAxis:0);CW&&(C=W)}return{[k]:S,[g]:C}}}},Jb=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(o){var s,a;const{placement:u,rects:d,platform:p,elements:m}=o,{apply:h=()=>{},...y}=Kn(n,o),w=await p.detectOverflow(o,y),g=Yn(u),k=Go(u),S=_n(u)==="y",{width:C,height:b}=d.floating;let N,E;g==="top"||g==="bottom"?(N=g,E=k===(await(p.isRTL==null?void 0:p.isRTL(m.floating))?"start":"end")?"left":"right"):(E=g,N=k==="end"?"top":"bottom");const T=b-w.top-w.bottom,_=C-w.left-w.right,L=Er(b-w[N],T),I=Er(C-w[E],_),W=!o.middlewareData.shift;let B=L,P=I;if((s=o.middlewareData.shift)!=null&&s.enabled.x&&(P=_),(a=o.middlewareData.shift)!=null&&a.enabled.y&&(B=T),W&&!k){const ie=Ft(w.left,0),oe=Ft(w.right,0),pe=Ft(w.top,0),H=Ft(w.bottom,0);S?P=C-2*(ie!==0||oe!==0?ie+oe:Ft(w.left,w.right)):B=b-2*(pe!==0||H!==0?pe+H:Ft(w.top,w.bottom))}await h({...o,availableWidth:P,availableHeight:B});const ee=await p.getDimensions(m.floating);return C!==ee.width||b!==ee.height?{reset:{rects:!0}}:{}}}};function Ba(){return typeof window<"u"}function Qo(n){return Dh(n)?(n.nodeName||"").toLowerCase():"#document"}function Ut(n){var o;return(n==null||(o=n.ownerDocument)==null?void 0:o.defaultView)||window}function Mn(n){var o;return(o=(Dh(n)?n.ownerDocument:n.document)||window.document)==null?void 0:o.documentElement}function Dh(n){return Ba()?n instanceof Node||n instanceof Ut(n).Node:!1}function gn(n){return Ba()?n instanceof Element||n instanceof Ut(n).Element:!1}function Qn(n){return Ba()?n instanceof HTMLElement||n instanceof Ut(n).HTMLElement:!1}function Em(n){return!Ba()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof Ut(n).ShadowRoot}function Gs(n){const{overflow:o,overflowX:s,overflowY:a,display:u}=vn(n);return/auto|scroll|overlay|hidden|clip/.test(o+a+s)&&u!=="inline"&&u!=="contents"}function Zb(n){return/^(table|td|th)$/.test(Qo(n))}function Ua(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}const eS=/transform|translate|scale|rotate|perspective|filter/,tS=/paint|layout|strict|content/,Jr=n=>!!n&&n!=="none";let Hc;function Lu(n){const o=gn(n)?vn(n):n;return Jr(o.transform)||Jr(o.translate)||Jr(o.scale)||Jr(o.rotate)||Jr(o.perspective)||!Au()&&(Jr(o.backdropFilter)||Jr(o.filter))||eS.test(o.willChange||"")||tS.test(o.contain||"")}function nS(n){let o=_r(n);for(;Qn(o)&&!Bo(o);){if(Lu(o))return o;if(Ua(o))return null;o=_r(o)}return null}function Au(){return Hc==null&&(Hc=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Hc}function Bo(n){return/^(html|body|#document)$/.test(Qo(n))}function vn(n){return Ut(n).getComputedStyle(n)}function Va(n){return gn(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function _r(n){if(Qo(n)==="html")return n;const o=n.assignedSlot||n.parentNode||Em(n)&&n.host||Mn(n);return Em(o)?o.host:o}function zh(n){const o=_r(n);return Bo(o)?n.ownerDocument?n.ownerDocument.body:n.body:Qn(o)&&Gs(o)?o:zh(o)}function Vs(n,o,s){var a;o===void 0&&(o=[]),s===void 0&&(s=!0);const u=zh(n),d=u===((a=n.ownerDocument)==null?void 0:a.body),p=Ut(u);if(d){const m=fu(p);return o.concat(p,p.visualViewport||[],Gs(u)?u:[],m&&s?Vs(m):[])}else return o.concat(u,Vs(u,[],s))}function fu(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function Fh(n){const o=vn(n);let s=parseFloat(o.width)||0,a=parseFloat(o.height)||0;const u=Qn(n),d=u?n.offsetWidth:s,p=u?n.offsetHeight:a,m=ja(s)!==d||ja(a)!==p;return m&&(s=d,a=p),{width:s,height:a,$:m}}function Iu(n){return gn(n)?n:n.contextElement}function Oo(n){const o=Iu(n);if(!Qn(o))return Pn(1);const s=o.getBoundingClientRect(),{width:a,height:u,$:d}=Fh(o);let p=(d?ja(s.width):s.width)/a,m=(d?ja(s.height):s.height)/u;return(!p||!Number.isFinite(p))&&(p=1),(!m||!Number.isFinite(m))&&(m=1),{x:p,y:m}}const rS=Pn(0);function $h(n){const o=Ut(n);return!Au()||!o.visualViewport?rS:{x:o.visualViewport.offsetLeft,y:o.visualViewport.offsetTop}}function oS(n,o,s){return o===void 0&&(o=!1),!s||o&&s!==Ut(n)?!1:o}function Zr(n,o,s,a){o===void 0&&(o=!1),s===void 0&&(s=!1);const u=n.getBoundingClientRect(),d=Iu(n);let p=Pn(1);o&&(a?gn(a)&&(p=Oo(a)):p=Oo(n));const m=oS(d,s,a)?$h(d):Pn(0);let h=(u.left+m.x)/p.x,y=(u.top+m.y)/p.y,w=u.width/p.x,g=u.height/p.y;if(d){const k=Ut(d),S=a&&gn(a)?Ut(a):a;let C=k,b=fu(C);for(;b&&a&&S!==C;){const N=Oo(b),E=b.getBoundingClientRect(),T=vn(b),_=E.left+(b.clientLeft+parseFloat(T.paddingLeft))*N.x,L=E.top+(b.clientTop+parseFloat(T.paddingTop))*N.y;h*=N.x,y*=N.y,w*=N.x,g*=N.y,h+=_,y+=L,C=Ut(b),b=fu(C)}}return _a({width:w,height:g,x:h,y})}function Wa(n,o){const s=Va(n).scrollLeft;return o?o.left+s:Zr(Mn(n)).left+s}function Bh(n,o){const s=n.getBoundingClientRect(),a=s.left+o.scrollLeft-Wa(n,s),u=s.top+o.scrollTop;return{x:a,y:u}}function sS(n){let{elements:o,rect:s,offsetParent:a,strategy:u}=n;const d=u==="fixed",p=Mn(a),m=o?Ua(o.floating):!1;if(a===p||m&&d)return s;let h={scrollLeft:0,scrollTop:0},y=Pn(1);const w=Pn(0),g=Qn(a);if((g||!g&&!d)&&((Qo(a)!=="body"||Gs(p))&&(h=Va(a)),g)){const S=Zr(a);y=Oo(a),w.x=S.x+a.clientLeft,w.y=S.y+a.clientTop}const k=p&&!g&&!d?Bh(p,h):Pn(0);return{width:s.width*y.x,height:s.height*y.y,x:s.x*y.x-h.scrollLeft*y.x+w.x+k.x,y:s.y*y.y-h.scrollTop*y.y+w.y+k.y}}function iS(n){return Array.from(n.getClientRects())}function aS(n){const o=Mn(n),s=Va(n),a=n.ownerDocument.body,u=Ft(o.scrollWidth,o.clientWidth,a.scrollWidth,a.clientWidth),d=Ft(o.scrollHeight,o.clientHeight,a.scrollHeight,a.clientHeight);let p=-s.scrollLeft+Wa(n);const m=-s.scrollTop;return vn(a).direction==="rtl"&&(p+=Ft(o.clientWidth,a.clientWidth)-u),{width:u,height:d,x:p,y:m}}const _m=25;function lS(n,o){const s=Ut(n),a=Mn(n),u=s.visualViewport;let d=a.clientWidth,p=a.clientHeight,m=0,h=0;if(u){d=u.width,p=u.height;const w=Au();(!w||w&&o==="fixed")&&(m=u.offsetLeft,h=u.offsetTop)}const y=Wa(a);if(y<=0){const w=a.ownerDocument,g=w.body,k=getComputedStyle(g),S=w.compatMode==="CSS1Compat"&&parseFloat(k.marginLeft)+parseFloat(k.marginRight)||0,C=Math.abs(a.clientWidth-g.clientWidth-S);C<=_m&&(d-=C)}else y<=_m&&(d+=y);return{width:d,height:p,x:m,y:h}}function cS(n,o){const s=Zr(n,!0,o==="fixed"),a=s.top+n.clientTop,u=s.left+n.clientLeft,d=Qn(n)?Oo(n):Pn(1),p=n.clientWidth*d.x,m=n.clientHeight*d.y,h=u*d.x,y=a*d.y;return{width:p,height:m,x:h,y}}function Pm(n,o,s){let a;if(o==="viewport")a=lS(n,s);else if(o==="document")a=aS(Mn(n));else if(gn(o))a=cS(o,s);else{const u=$h(n);a={x:o.x-u.x,y:o.y-u.y,width:o.width,height:o.height}}return _a(a)}function Uh(n,o){const s=_r(n);return s===o||!gn(s)||Bo(s)?!1:vn(s).position==="fixed"||Uh(s,o)}function uS(n,o){const s=o.get(n);if(s)return s;let a=Vs(n,[],!1).filter(m=>gn(m)&&Qo(m)!=="body"),u=null;const d=vn(n).position==="fixed";let p=d?_r(n):n;for(;gn(p)&&!Bo(p);){const m=vn(p),h=Lu(p);!h&&m.position==="fixed"&&(u=null),(d?!h&&!u:!h&&m.position==="static"&&!!u&&(u.position==="absolute"||u.position==="fixed")||Gs(p)&&!h&&Uh(n,p))?a=a.filter(w=>w!==p):u=m,p=_r(p)}return o.set(n,a),a}function dS(n){let{element:o,boundary:s,rootBoundary:a,strategy:u}=n;const p=[...s==="clippingAncestors"?Ua(o)?[]:uS(o,this._c):[].concat(s),a],m=Pm(o,p[0],u);let h=m.top,y=m.right,w=m.bottom,g=m.left;for(let k=1;k{p(!1,1e-7)},1e3)}B===1&&!Wh(y,n.getBoundingClientRect())&&p(),L=!1}try{s=new IntersectionObserver(I,{..._,root:u.ownerDocument})}catch{s=new IntersectionObserver(I,_)}s.observe(n)}return p(!0),d}function yS(n,o,s,a){a===void 0&&(a={});const{ancestorScroll:u=!0,ancestorResize:d=!0,elementResize:p=typeof ResizeObserver=="function",layoutShift:m=typeof IntersectionObserver=="function",animationFrame:h=!1}=a,y=Iu(n),w=u||d?[...y?Vs(y):[],...o?Vs(o):[]]:[];w.forEach(E=>{u&&E.addEventListener("scroll",s,{passive:!0}),d&&E.addEventListener("resize",s)});const g=y&&m?vS(y,s):null;let k=-1,S=null;p&&(S=new ResizeObserver(E=>{let[T]=E;T&&T.target===y&&S&&o&&(S.unobserve(o),cancelAnimationFrame(k),k=requestAnimationFrame(()=>{var _;(_=S)==null||_.observe(o)})),s()}),y&&!h&&S.observe(y),o&&S.observe(o));let C,b=h?Zr(n):null;h&&N();function N(){const E=Zr(n);b&&!Wh(b,E)&&s(),b=E,C=requestAnimationFrame(N)}return s(),()=>{var E;w.forEach(T=>{u&&T.removeEventListener("scroll",s),d&&T.removeEventListener("resize",s)}),g==null||g(),(E=S)==null||E.disconnect(),S=null,h&&cancelAnimationFrame(C)}}const xS=Qb,wS=Xb,bS=Kb,SS=Jb,kS=Yb,Tm=Hb,CS=qb,NS=(n,o,s)=>{const a=new Map,u={platform:gS,...s},d={...u.platform,_c:a};return Wb(n,o,{...u,platform:d})};var jS=typeof document<"u",ES=function(){},ya=jS?v.useLayoutEffect:ES;function Pa(n,o){if(n===o)return!0;if(typeof n!=typeof o)return!1;if(typeof n=="function"&&n.toString()===o.toString())return!0;let s,a,u;if(n&&o&&typeof n=="object"){if(Array.isArray(n)){if(s=n.length,s!==o.length)return!1;for(a=s;a--!==0;)if(!Pa(n[a],o[a]))return!1;return!0}if(u=Object.keys(n),s=u.length,s!==Object.keys(o).length)return!1;for(a=s;a--!==0;)if(!{}.hasOwnProperty.call(o,u[a]))return!1;for(a=s;a--!==0;){const d=u[a];if(!(d==="_owner"&&n.$$typeof)&&!Pa(n[d],o[d]))return!1}return!0}return n!==n&&o!==o}function Hh(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function Mm(n,o){const s=Hh(n);return Math.round(o*s)/s}function Yc(n){const o=v.useRef(n);return ya(()=>{o.current=n}),o}function _S(n){n===void 0&&(n={});const{placement:o="bottom",strategy:s="absolute",middleware:a=[],platform:u,elements:{reference:d,floating:p}={},transform:m=!0,whileElementsMounted:h,open:y}=n,[w,g]=v.useState({x:0,y:0,strategy:s,placement:o,middlewareData:{},isPositioned:!1}),[k,S]=v.useState(a);Pa(k,a)||S(a);const[C,b]=v.useState(null),[N,E]=v.useState(null),T=v.useCallback(U=>{U!==W.current&&(W.current=U,b(U))},[]),_=v.useCallback(U=>{U!==B.current&&(B.current=U,E(U))},[]),L=d||C,I=p||N,W=v.useRef(null),B=v.useRef(null),P=v.useRef(w),ee=h!=null,ie=Yc(h),oe=Yc(u),pe=Yc(y),H=v.useCallback(()=>{if(!W.current||!B.current)return;const U={placement:o,strategy:s,middleware:k};oe.current&&(U.platform=oe.current),NS(W.current,B.current,U).then(q=>{const F={...q,isPositioned:pe.current!==!1};z.current&&!Pa(P.current,F)&&(P.current=F,Vo.flushSync(()=>{g(F)}))})},[k,o,s,oe,pe]);ya(()=>{y===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,g(U=>({...U,isPositioned:!1})))},[y]);const z=v.useRef(!1);ya(()=>(z.current=!0,()=>{z.current=!1}),[]),ya(()=>{if(L&&(W.current=L),I&&(B.current=I),L&&I){if(ie.current)return ie.current(L,I,H);H()}},[L,I,H,ie,ee]);const te=v.useMemo(()=>({reference:W,floating:B,setReference:T,setFloating:_}),[T,_]),K=v.useMemo(()=>({reference:L,floating:I}),[L,I]),X=v.useMemo(()=>{const U={position:s,left:0,top:0};if(!K.floating)return U;const q=Mm(K.floating,w.x),F=Mm(K.floating,w.y);return m?{...U,transform:"translate("+q+"px, "+F+"px)",...Hh(K.floating)>=1.5&&{willChange:"transform"}}:{position:s,left:q,top:F}},[s,m,K.floating,w.x,w.y]);return v.useMemo(()=>({...w,update:H,refs:te,elements:K,floatingStyles:X}),[w,H,te,K,X])}const PS=n=>{function o(s){return{}.hasOwnProperty.call(s,"current")}return{name:"arrow",options:n,fn(s){const{element:a,padding:u}=typeof n=="function"?n(s):n;return a&&o(a)?a.current!=null?Tm({element:a.current,padding:u}).fn(s):{}:a?Tm({element:a,padding:u}).fn(s):{}}}},RS=(n,o)=>{const s=xS(n);return{name:s.name,fn:s.fn,options:[n,o]}},TS=(n,o)=>{const s=wS(n);return{name:s.name,fn:s.fn,options:[n,o]}},MS=(n,o)=>({fn:CS(n).fn,options:[n,o]}),OS=(n,o)=>{const s=bS(n);return{name:s.name,fn:s.fn,options:[n,o]}},LS=(n,o)=>{const s=SS(n);return{name:s.name,fn:s.fn,options:[n,o]}},AS=(n,o)=>{const s=kS(n);return{name:s.name,fn:s.fn,options:[n,o]}},IS=(n,o)=>{const s=PS(n);return{name:s.name,fn:s.fn,options:[n,o]}};var DS="Arrow",Kh=v.forwardRef((n,o)=>{const{children:s,width:a=10,height:u=5,...d}=n;return l.jsx(Ae.svg,{...d,ref:o,width:a,height:u,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?s:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});Kh.displayName=DS;var zS=Kh;function Yh(n){const[o,s]=v.useState(void 0);return gt(()=>{if(n){s({width:n.offsetWidth,height:n.offsetHeight});const a=new ResizeObserver(u=>{if(!Array.isArray(u)||!u.length)return;const d=u[0];let p,m;if("borderBoxSize"in d){const h=d.borderBoxSize,y=Array.isArray(h)?h[0]:h;p=y.inlineSize,m=y.blockSize}else p=n.offsetWidth,m=n.offsetHeight;s({width:p,height:m})});return a.observe(n,{box:"border-box"}),()=>a.unobserve(n)}else s(void 0)},[n]),o}var Du="Popper",[Gh,Qh]=Ys(Du),[FS,Xh]=Gh(Du),qh=n=>{const{__scopePopper:o,children:s}=n,[a,u]=v.useState(null),[d,p]=v.useState(void 0);return l.jsx(FS,{scope:o,anchor:a,onAnchorChange:u,placementState:d,setPlacementState:p,children:s})};qh.displayName=Du;var Jh="PopperAnchor",Zh=v.forwardRef((n,o)=>{const{__scopePopper:s,virtualRef:a,...u}=n,d=Xh(Jh,s),p=v.useRef(null),m=d.onAnchorChange,h=v.useCallback(C=>{p.current=C,C&&m(C)},[m]),y=Qe(o,h),w=v.useRef(null);v.useEffect(()=>{if(!a)return;const C=w.current;w.current=a.current,C!==w.current&&m(w.current)});const g=d.placementState&&Fu(d.placementState),k=g==null?void 0:g[0],S=g==null?void 0:g[1];return a?null:l.jsx(Ae.div,{"data-radix-popper-side":k,"data-radix-popper-align":S,...u,ref:y})});Zh.displayName=Jh;var zu="PopperContent",[$S,BS]=Gh(zu),eg=v.forwardRef((n,o)=>{var ne,de,ke,Ne,Ee,qe;const{__scopePopper:s,side:a="bottom",sideOffset:u=0,align:d="center",alignOffset:p=0,arrowPadding:m=0,avoidCollisions:h=!0,collisionBoundary:y=[],collisionPadding:w=0,sticky:g="partial",hideWhenDetached:k=!1,updatePositionStrategy:S="optimized",onPlaced:C,...b}=n,N=Xh(zu,s),[E,T]=v.useState(null),_=Qe(o,T),[L,I]=v.useState(null),W=Yh(L),B=(W==null?void 0:W.width)??0,P=(W==null?void 0:W.height)??0,ee=a+(d!=="center"?"-"+d:""),ie=typeof w=="number"?w:{top:0,right:0,bottom:0,left:0,...w},oe=Array.isArray(y)?y:[y],pe=oe.length>0,H={padding:ie,boundary:oe.filter(VS),altBoundary:pe},{refs:z,floatingStyles:te,placement:K,isPositioned:X,middlewareData:U}=_S({strategy:"fixed",placement:ee,whileElementsMounted:(...We)=>yS(...We,{animationFrame:S==="always"}),elements:{reference:N.anchor},middleware:[RS({mainAxis:u+P,alignmentAxis:p}),h&&TS({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?MS():void 0,...H}),h&&OS({...H}),LS({...H,apply:({elements:We,rects:Zt,availableWidth:en,availableHeight:St})=>{const{width:Lr,height:kt}=Zt.reference,Vt=We.floating.style;Vt.setProperty("--radix-popper-available-width",`${en}px`),Vt.setProperty("--radix-popper-available-height",`${St}px`),Vt.setProperty("--radix-popper-anchor-width",`${Lr}px`),Vt.setProperty("--radix-popper-anchor-height",`${kt}px`)}}),L&&IS({element:L,padding:m}),WS({arrowWidth:B,arrowHeight:P}),k&&AS({strategy:"referenceHidden",...H,boundary:pe?H.boundary:void 0})]}),q=N.setPlacementState;gt(()=>(q(K),()=>{q(void 0)}),[K,q]);const[F,O]=Fu(K),V=Hn(C);gt(()=>{X&&(V==null||V())},[X,V]);const J=(ne=U.arrow)==null?void 0:ne.x,le=(de=U.arrow)==null?void 0:de.y,ae=((ke=U.arrow)==null?void 0:ke.centerOffset)!==0,[ue,se]=v.useState();return gt(()=>{E&&se(window.getComputedStyle(E).zIndex)},[E]),l.jsx("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...te,transform:X?te.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ue,"--radix-popper-transform-origin":[(Ne=U.transformOrigin)==null?void 0:Ne.x,(Ee=U.transformOrigin)==null?void 0:Ee.y].join(" "),...((qe=U.hide)==null?void 0:qe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:l.jsx($S,{scope:s,placedSide:F,placedAlign:O,onArrowChange:I,arrowX:J,arrowY:le,shouldHideArrow:ae,children:l.jsx(Ae.div,{"data-side":F,"data-align":O,...b,ref:_,style:{...b.style,animation:X?void 0:"none"}})})})});eg.displayName=zu;var tg="PopperArrow",US={top:"bottom",right:"left",bottom:"top",left:"right"},ng=v.forwardRef(function(o,s){const{__scopePopper:a,...u}=o,d=BS(tg,a),p=US[d.placedSide];return l.jsx("span",{ref:d.onArrowChange,style:{position:"absolute",left:d.arrowX,top:d.arrowY,[p]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[d.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[d.placedSide],visibility:d.shouldHideArrow?"hidden":void 0},children:l.jsx(zS,{...u,ref:s,style:{...u.style,display:"block"}})})});ng.displayName=tg;function VS(n){return n!==null}var WS=n=>({name:"transformOrigin",options:n,fn(o){var N,E,T;const{placement:s,rects:a,middlewareData:u}=o,p=((N=u.arrow)==null?void 0:N.centerOffset)!==0,m=p?0:n.arrowWidth,h=p?0:n.arrowHeight,[y,w]=Fu(s),g={start:"0%",center:"50%",end:"100%"}[w],k=(((E=u.arrow)==null?void 0:E.x)??0)+m/2,S=(((T=u.arrow)==null?void 0:T.y)??0)+h/2;let C="",b="";return y==="bottom"?(C=p?g:`${k}px`,b=`${-h}px`):y==="top"?(C=p?g:`${k}px`,b=`${a.floating.height+h}px`):y==="right"?(C=`${-h}px`,b=p?g:`${S}px`):y==="left"&&(C=`${a.floating.width+h}px`,b=p?g:`${S}px`),{data:{x:C,y:b}}}});function Fu(n){const[o,s="center"]=n.split("-");return[o,s]}var HS=qh,KS=Zh,YS=eg,GS=ng,QS="Portal",$u=v.forwardRef((n,o)=>{var m;const{container:s,...a}=n,[u,d]=v.useState(!1);gt(()=>d(!0),[]);const p=s||u&&((m=globalThis==null?void 0:globalThis.document)==null?void 0:m.body);return p?Vo.createPortal(l.jsx(Ae.div,{...a,ref:o}),p):null});$u.displayName=QS;function XS(n,o){return v.useReducer((s,a)=>o[s][a]??s,n)}var Qs=n=>{const{present:o,children:s}=n,a=qS(o),u=typeof s=="function"?s({present:a.isPresent}):v.Children.only(s),d=JS(a.ref,ZS(u));return typeof s=="function"||a.isPresent?v.cloneElement(u,{ref:d}):null};Qs.displayName="Presence";function qS(n){const[o,s]=v.useState(),a=v.useRef(null),u=v.useRef(n),d=v.useRef("none"),p=v.useRef(void 0),m=n?"mounted":"unmounted",[h,y]=XS(m,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{h==="mounted"?(d.current=p.current??Is(a.current),p.current=void 0):d.current="none"},[h]),gt(()=>{const w=a.current,g=u.current;if(g!==n){const S=d.current,C=Is(w);n?(p.current=C,y("MOUNT")):C==="none"||(w==null?void 0:w.display)==="none"?y("UNMOUNT"):y(g&&S!==C?"ANIMATION_OUT":"UNMOUNT"),u.current=n}},[n,y]),gt(()=>{if(o){let w;const g=o.ownerDocument.defaultView??window,k=C=>{const N=Is(a.current).includes(CSS.escape(C.animationName));if(C.target===o&&N&&(y("ANIMATION_END"),!u.current)){const E=o.style.animationFillMode;o.style.animationFillMode="forwards",w=g.setTimeout(()=>{o.style.animationFillMode==="forwards"&&(o.style.animationFillMode=E)})}},S=C=>{C.target===o&&(d.current=Is(a.current))};return o.addEventListener("animationstart",S),o.addEventListener("animationcancel",k),o.addEventListener("animationend",k),()=>{g.clearTimeout(w),o.removeEventListener("animationstart",S),o.removeEventListener("animationcancel",k),o.removeEventListener("animationend",k)}}else y("ANIMATION_END")},[o,y]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:v.useCallback(w=>{if(w){const g=getComputedStyle(w);a.current=g,p.current=Is(g)}else a.current=null;s(w)},[])}}function Om(n,o){if(typeof n=="function")return n(o);n!=null&&(n.current=o)}function JS(...n){const o=v.useRef(n);return o.current=n,v.useCallback(s=>{const a=o.current;let u=!1;const d=a.map(p=>{const m=Om(p,s);return!u&&typeof m=="function"&&(u=!0),m});if(u)return()=>{for(let p=0;p{},caller:a}){const[u,d,p]=tk({defaultProp:o,onChange:s}),m=n!==void 0,h=m?n:u;{const w=v.useRef(n!==void 0);v.useEffect(()=>{const g=w.current;g!==m&&console.warn(`${a} is changing from ${g?"controlled":"uncontrolled"} to ${m?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),w.current=m},[m,a])}const y=v.useCallback(w=>{var g;if(m){const k=nk(w)?w(n):w;k!==n&&((g=p.current)==null||g.call(p,k))}else d(w)},[m,n,d,p]);return[h,y]}function tk({defaultProp:n,onChange:o}){const[s,a]=v.useState(n),u=v.useRef(s),d=v.useRef(o);return ek(()=>{d.current=o},[o]),v.useEffect(()=>{var p;u.current!==s&&((p=d.current)==null||p.call(d,s),u.current=s)},[s,u]),[s,a,d]}function nk(n){return typeof n=="function"}function rg(n){const o=v.useRef({value:n,previous:n});return v.useMemo(()=>(o.current.value!==n&&(o.current.previous=o.current.value,o.current.value=n),o.current.previous),[n])}var og=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),rk="VisuallyHidden",ok=v.forwardRef((n,o)=>l.jsx(Ae.span,{...n,ref:o,style:{...og,...n.style}}));ok.displayName=rk;var sk=function(n){if(typeof document>"u")return null;var o=Array.isArray(n)?n[0]:n;return o.ownerDocument.body},Po=new WeakMap,ma=new WeakMap,ha={},Gc=0,sg=function(n){return n&&(n.host||sg(n.parentNode))},ik=function(n,o){return o.map(function(s){if(n.contains(s))return s;var a=sg(s);return a&&n.contains(a)?a:(console.error("aria-hidden",s,"in not contained inside",n,". Doing nothing"),null)}).filter(function(s){return!!s})},ak=function(n,o,s,a){var u=ik(o,Array.isArray(n)?n:[n]);ha[s]||(ha[s]=new WeakMap);var d=ha[s],p=[],m=new Set,h=new Set(u),y=function(g){!g||m.has(g)||(m.add(g),y(g.parentNode))};u.forEach(y);var w=function(g){!g||h.has(g)||Array.prototype.forEach.call(g.children,function(k){if(m.has(k))w(k);else try{var S=k.getAttribute(a),C=S!==null&&S!=="false",b=(Po.get(k)||0)+1,N=(d.get(k)||0)+1;Po.set(k,b),d.set(k,N),p.push(k),b===1&&C&&ma.set(k,!0),N===1&&k.setAttribute(s,"true"),C||k.setAttribute(a,"true")}catch(E){console.error("aria-hidden: cannot operate on ",k,E)}})};return w(o),m.clear(),Gc++,function(){p.forEach(function(g){var k=Po.get(g)-1,S=d.get(g)-1;Po.set(g,k),d.set(g,S),k||(ma.has(g)||g.removeAttribute(a),ma.delete(g)),S||g.removeAttribute(s)}),Gc--,Gc||(Po=new WeakMap,Po=new WeakMap,ma=new WeakMap,ha={})}},ig=function(n,o,s){s===void 0&&(s="data-aria-hidden");var a=Array.from(Array.isArray(n)?n:[n]),u=sk(n);return u?(a.push.apply(a,Array.from(u.querySelectorAll("[aria-live], script"))),ak(a,u,s,"aria-hidden")):function(){return null}},En=function(){return En=Object.assign||function(o){for(var s,a=1,u=arguments.length;a"u")return Ck;var o=Nk(n),s=document.documentElement.clientWidth,a=window.innerWidth;return{left:o[0],top:o[1],right:o[2],gap:Math.max(0,a-s+o[2]-o[0])}},Ek=ug(),Lo="data-scroll-locked",_k=function(n,o,s,a){var u=n.left,d=n.top,p=n.right,m=n.gap;return s===void 0&&(s="margin"),` - .`.concat(ck,` { - overflow: hidden `).concat(a,`; - padding-right: `).concat(m,"px ").concat(a,`; - } - body[`).concat(Lo,`] { - overflow: hidden `).concat(a,`; - overscroll-behavior: contain; - `).concat([o&&"position: relative ".concat(a,";"),s==="margin"&&` - padding-left: `.concat(u,`px; - padding-top: `).concat(d,`px; - padding-right: `).concat(p,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(m,"px ").concat(a,`; - `),s==="padding"&&"padding-right: ".concat(m,"px ").concat(a,";")].filter(Boolean).join(""),` - } - - .`).concat(xa,` { - right: `).concat(m,"px ").concat(a,`; - } - - .`).concat(wa,` { - margin-right: `).concat(m,"px ").concat(a,`; - } - - .`).concat(xa," .").concat(xa,` { - right: 0 `).concat(a,`; - } - - .`).concat(wa," .").concat(wa,` { - margin-right: 0 `).concat(a,`; - } - - body[`).concat(Lo,`] { - `).concat(uk,": ").concat(m,`px; - } -`)},Am=function(){var n=parseInt(document.body.getAttribute(Lo)||"0",10);return isFinite(n)?n:0},Pk=function(){v.useEffect(function(){return document.body.setAttribute(Lo,(Am()+1).toString()),function(){var n=Am()-1;n<=0?document.body.removeAttribute(Lo):document.body.setAttribute(Lo,n.toString())}},[])},Rk=function(n){var o=n.noRelative,s=n.noImportant,a=n.gapMode,u=a===void 0?"margin":a;Pk();var d=v.useMemo(function(){return jk(u)},[u]);return v.createElement(Ek,{styles:_k(d,!o,u,s?"":"!important")})},pu=!1;if(typeof window<"u")try{var ga=Object.defineProperty({},"passive",{get:function(){return pu=!0,!0}});window.addEventListener("test",ga,ga),window.removeEventListener("test",ga,ga)}catch{pu=!1}var Ro=pu?{passive:!1}:!1,Tk=function(n){return n.tagName==="TEXTAREA"},dg=function(n,o){if(!(n instanceof Element))return!1;var s=window.getComputedStyle(n);return s[o]!=="hidden"&&!(s.overflowY===s.overflowX&&!Tk(n)&&s[o]==="visible")},Mk=function(n){return dg(n,"overflowY")},Ok=function(n){return dg(n,"overflowX")},Im=function(n,o){var s=o.ownerDocument,a=o;do{typeof ShadowRoot<"u"&&a instanceof ShadowRoot&&(a=a.host);var u=fg(n,a);if(u){var d=pg(n,a),p=d[1],m=d[2];if(p>m)return!0}a=a.parentNode}while(a&&a!==s.body);return!1},Lk=function(n){var o=n.scrollTop,s=n.scrollHeight,a=n.clientHeight;return[o,s,a]},Ak=function(n){var o=n.scrollLeft,s=n.scrollWidth,a=n.clientWidth;return[o,s,a]},fg=function(n,o){return n==="v"?Mk(o):Ok(o)},pg=function(n,o){return n==="v"?Lk(o):Ak(o)},Ik=function(n,o){return n==="h"&&o==="rtl"?-1:1},Dk=function(n,o,s,a,u){var d=Ik(n,window.getComputedStyle(o).direction),p=d*a,m=s.target,h=o.contains(m),y=!1,w=p>0,g=0,k=0;do{if(!m)break;var S=pg(n,m),C=S[0],b=S[1],N=S[2],E=b-N-d*C;(C||E)&&fg(n,m)&&(g+=E,k+=C);var T=m.parentNode;m=T&&T.nodeType===Node.DOCUMENT_FRAGMENT_NODE?T.host:T}while(!h&&m!==document.body||h&&(o.contains(m)||o===m));return(w&&Math.abs(g)<1||!w&&Math.abs(k)<1)&&(y=!0),y},va=function(n){return"changedTouches"in n?[n.changedTouches[0].clientX,n.changedTouches[0].clientY]:[0,0]},Dm=function(n){return[n.deltaX,n.deltaY]},zm=function(n){return n&&"current"in n?n.current:n},zk=function(n,o){return n[0]===o[0]&&n[1]===o[1]},Fk=function(n){return` - .block-interactivity-`.concat(n,` {pointer-events: none;} - .allow-interactivity-`).concat(n,` {pointer-events: all;} -`)},$k=0,To=[];function Bk(n){var o=v.useRef([]),s=v.useRef([0,0]),a=v.useRef(),u=v.useState($k++)[0],d=v.useState(ug)[0],p=v.useRef(n);v.useEffect(function(){p.current=n},[n]),v.useEffect(function(){if(n.inert){document.body.classList.add("block-interactivity-".concat(u));var b=lk([n.lockRef.current],(n.shards||[]).map(zm),!0).filter(Boolean);return b.forEach(function(N){return N.classList.add("allow-interactivity-".concat(u))}),function(){document.body.classList.remove("block-interactivity-".concat(u)),b.forEach(function(N){return N.classList.remove("allow-interactivity-".concat(u))})}}},[n.inert,n.lockRef.current,n.shards]);var m=v.useCallback(function(b,N){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!p.current.allowPinchZoom;var E=va(b),T=s.current,_="deltaX"in b?b.deltaX:T[0]-E[0],L="deltaY"in b?b.deltaY:T[1]-E[1],I,W=b.target,B=Math.abs(_)>Math.abs(L)?"h":"v";if("touches"in b&&B==="h"&&W.type==="range")return!1;var P=window.getSelection(),ee=P&&P.anchorNode,ie=ee?ee===W||ee.contains(W):!1;if(ie)return!1;var oe=Im(B,W);if(!oe)return!0;if(oe?I=B:(I=B==="v"?"h":"v",oe=Im(B,W)),!oe)return!1;if(!a.current&&"changedTouches"in b&&(_||L)&&(a.current=I),!I)return!0;var pe=a.current||I;return Dk(pe,N,b,pe==="h"?_:L)},[]),h=v.useCallback(function(b){var N=b;if(!(!To.length||To[To.length-1]!==d)){var E="deltaY"in N?Dm(N):va(N),T=o.current.filter(function(I){return I.name===N.type&&(I.target===N.target||N.target===I.shadowParent)&&zk(I.delta,E)})[0];if(T&&T.should){N.cancelable&&N.preventDefault();return}if(!T){var _=(p.current.shards||[]).map(zm).filter(Boolean).filter(function(I){return I.contains(N.target)}),L=_.length>0?m(N,_[0]):!p.current.noIsolation;L&&N.cancelable&&N.preventDefault()}}},[]),y=v.useCallback(function(b,N,E,T){var _={name:b,delta:N,target:E,should:T,shadowParent:Uk(E)};o.current.push(_),setTimeout(function(){o.current=o.current.filter(function(L){return L!==_})},1)},[]),w=v.useCallback(function(b){s.current=va(b),a.current=void 0},[]),g=v.useCallback(function(b){y(b.type,Dm(b),b.target,m(b,n.lockRef.current))},[]),k=v.useCallback(function(b){y(b.type,va(b),b.target,m(b,n.lockRef.current))},[]);v.useEffect(function(){return To.push(d),n.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:k}),document.addEventListener("wheel",h,Ro),document.addEventListener("touchmove",h,Ro),document.addEventListener("touchstart",w,Ro),function(){To=To.filter(function(b){return b!==d}),document.removeEventListener("wheel",h,Ro),document.removeEventListener("touchmove",h,Ro),document.removeEventListener("touchstart",w,Ro)}},[]);var S=n.removeScrollBar,C=n.inert;return v.createElement(v.Fragment,null,C?v.createElement(d,{styles:Fk(u)}):null,S?v.createElement(Rk,{noRelative:n.noRelative,gapMode:n.gapMode}):null)}function Uk(n){for(var o=null;n!==null;)n instanceof ShadowRoot&&(o=n.host,n=n.host),n=n.parentNode;return o}const Vk=vk(cg,Bk);var Bu=v.forwardRef(function(n,o){return v.createElement(Ha,En({},n,{ref:o,sideCar:Vk}))});Bu.classNames=Ha.classNames;var Wk=[" ","Enter","ArrowUp","ArrowDown"],Hk=[" ","Enter"],eo="Select",[Ka,Ya,Kk]=ub(eo),[ro]=Ys(eo,[Kk,Qh]),Ga=Qh(),[Yk,Mr]=ro(eo),[Gk,Qk]=ro(eo),Xk="SelectProvider";function mg(n){const{__scopeSelect:o,children:s,open:a,defaultOpen:u,onOpenChange:d,value:p,defaultValue:m,onValueChange:h,dir:y,name:w,autoComplete:g,disabled:k,required:S,form:C,internal_do_not_use_render:b}=n,N=Ga(o),[E,T]=v.useState(null),[_,L]=v.useState(null),[I,W]=v.useState(!1),B=fb(y),[P,ee]=Ra({prop:a,defaultProp:u??!1,onChange:d,caller:eo}),[ie,oe]=Ra({prop:p,defaultProp:m,onChange:h,caller:eo}),pe=v.useRef(null),H=v.useRef(ie);v.useEffect(()=>{const V=C?E==null?void 0:E.ownerDocument.getElementById(C):E==null?void 0:E.form;if(V instanceof HTMLFormElement){const J=()=>oe(H.current);return V.addEventListener("reset",J),()=>V.removeEventListener("reset",J)}},[C,E,oe]);const z=E?!!C||!!E.closest("form"):!0,[te,K]=v.useState(new Set),X=Mo(),U=Array.from(te).map(V=>V.props.value).join(";"),q=v.useCallback(V=>{K(J=>new Set(J).add(V))},[]),F=v.useCallback(V=>{K(J=>{const le=new Set(J);return le.delete(V),le})},[]),O={required:S,trigger:E,onTriggerChange:T,valueNode:_,onValueNodeChange:L,valueNodeHasChildren:I,onValueNodeHasChildrenChange:W,contentId:X,value:ie,onValueChange:oe,open:P,onOpenChange:ee,dir:B,triggerPointerDownPosRef:pe,disabled:k,name:w,autoComplete:g,form:C,nativeOptions:te,nativeSelectKey:U,isFormControl:z};return l.jsx(HS,{...N,children:l.jsx(Yk,{scope:o,...O,children:l.jsx(Ka.Provider,{scope:o,children:l.jsx(Gk,{scope:o,onNativeOptionAdd:q,onNativeOptionRemove:F,children:gC(b)?b(O):s})})})})}mg.displayName=Xk;var hg=n=>{const{__scopeSelect:o,children:s,...a}=n;return l.jsx(mg,{__scopeSelect:o,...a,internal_do_not_use_render:({isFormControl:u})=>l.jsxs(l.Fragment,{children:[s,u?l.jsx(Ag,{__scopeSelect:o}):null]})})};hg.displayName=eo;var gg="SelectTrigger",Uu=v.forwardRef((n,o)=>{const{__scopeSelect:s,disabled:a=!1,...u}=n,d=Ga(s),p=Mr(gg,s),m=p.disabled||a,h=Qe(o,p.onTriggerChange),y=Ya(s),w=v.useRef("touch"),[g,k,S]=Ig(b=>{const N=y().filter(_=>!_.disabled),E=N.find(_=>_.value===p.value),T=Dg(N,b,E);T!==void 0&&p.onValueChange(T.value)}),C=b=>{m||(p.onOpenChange(!0),S()),b&&(p.triggerPointerDownPosRef.current={x:Math.round(b.pageX),y:Math.round(b.pageY)})};return l.jsx(KS,{asChild:!0,...d,children:l.jsx(Ae.button,{type:"button",role:"combobox","aria-controls":p.open?p.contentId:void 0,"aria-expanded":p.open,"aria-required":p.required,"aria-autocomplete":"none",dir:p.dir,"data-state":p.open?"open":"closed",disabled:m,"data-disabled":m?"":void 0,"data-placeholder":Qa(p.value)?"":void 0,...u,ref:h,onClick:Be(u.onClick,b=>{b.currentTarget.focus(),w.current!=="mouse"&&C(b)}),onPointerDown:Be(u.onPointerDown,b=>{w.current=b.pointerType;const N=b.target;N.hasPointerCapture(b.pointerId)&&N.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&b.pointerType==="mouse"&&(C(b),b.preventDefault())}),onKeyDown:Be(u.onKeyDown,b=>{const N=g.current!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&k(b.key),!(N&&b.key===" ")&&Wk.includes(b.key)&&(C(),b.preventDefault())})})})});Uu.displayName=gg;var vg="SelectValue",yg=v.forwardRef((n,o)=>{const{__scopeSelect:s,className:a,style:u,children:d,placeholder:p="",...m}=n,h=Mr(vg,s),{onValueNodeHasChildrenChange:y}=h,w=d!==void 0,g=Qe(o,h.onValueNodeChange);gt(()=>{y(w)},[y,w]);const k=Qa(h.value);return l.jsx(Ae.span,{...m,asChild:k?!1:m.asChild,ref:g,style:{pointerEvents:"none"},children:l.jsx(v.Fragment,{children:k?p:d},k?"placeholder":"value")})});yg.displayName=vg;var qk="SelectIcon",Jk=v.forwardRef((n,o)=>{const{__scopeSelect:s,children:a,...u}=n;return l.jsx(Ae.span,{"aria-hidden":!0,...u,ref:o,children:a||"▼"})});Jk.displayName=qk;var xg="SelectPortal",[Zk,eC]=ro(xg,{forceMount:void 0}),wg=n=>{const{__scopeSelect:o,forceMount:s,...a}=n;return l.jsx(Zk,{scope:n.__scopeSelect,forceMount:s,children:l.jsx($u,{asChild:!0,...a})})};wg.displayName=xg;var Pr="SelectContent",Vu=v.forwardRef((n,o)=>{const s=eC(Pr,n.__scopeSelect),{forceMount:a=s.forceMount,...u}=n,d=Mr(Pr,n.__scopeSelect),[p,m]=v.useState();return gt(()=>{m(new DocumentFragment)},[]),l.jsx(Qs,{present:a||d.open,children:({present:h})=>h?l.jsx(kg,{...u,ref:o}):l.jsx(bg,{...u,fragment:p})})});Vu.displayName=Pr;var bg=v.forwardRef((n,o)=>{const{__scopeSelect:s,children:a,fragment:u}=n;return u?Vo.createPortal(l.jsx(Sg,{scope:s,children:l.jsx(Ka.Slot,{scope:s,children:l.jsx("div",{ref:o,children:a})})}),u):null});bg.displayName="SelectContentFragment";var un=10,[Sg,Or]=ro(Pr),tC="SelectContentImpl",nC=$o("SelectContent.RemoveScroll"),kg=v.forwardRef((n,o)=>{const{__scopeSelect:s}=n,{position:a="item-aligned",onCloseAutoFocus:u,onEscapeKeyDown:d,onPointerDownOutside:p,side:m,sideOffset:h,align:y,alignOffset:w,arrowPadding:g,collisionBoundary:k,collisionPadding:S,sticky:C,hideWhenDetached:b,avoidCollisions:N,...E}=n,T=Mr(Pr,s),[_,L]=v.useState(null),[I,W]=v.useState(null),B=Qe(o,L),[P,ee]=v.useState(null),[ie,oe]=v.useState(null),pe=Ya(s),[H,z]=v.useState(!1),te=v.useRef(!1);v.useEffect(()=>{if(_)return ig(_)},[_]),Oh();const K=v.useCallback(se=>{const[ne,...de]=pe().map(Ee=>Ee.ref.current),[ke]=de.slice(-1),Ne=document.activeElement;for(const Ee of se)if(Ee===Ne||(Ee==null||Ee.scrollIntoView({block:"nearest"}),Ee===ne&&I&&(I.scrollTop=0),Ee===ke&&I&&(I.scrollTop=I.scrollHeight),Ee==null||Ee.focus(),document.activeElement!==Ne))return},[pe,I]),X=v.useCallback(()=>K([P,_]),[K,P,_]);v.useEffect(()=>{H&&X()},[H,X]);const{onOpenChange:U,triggerPointerDownPosRef:q}=T;v.useEffect(()=>{if(_){let se={x:0,y:0};const ne=ke=>{var Ne,Ee;se={x:Math.abs(Math.round(ke.pageX)-(((Ne=q.current)==null?void 0:Ne.x)??0)),y:Math.abs(Math.round(ke.pageY)-(((Ee=q.current)==null?void 0:Ee.y)??0))}},de=ke=>{se.x<=10&&se.y<=10?ke.preventDefault():ke.composedPath().includes(_)||U(!1),document.removeEventListener("pointermove",ne),q.current=null};return q.current!==null&&(document.addEventListener("pointermove",ne),document.addEventListener("pointerup",de,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ne),document.removeEventListener("pointerup",de,{capture:!0})}}},[_,U,q]),v.useEffect(()=>{const se=()=>U(!1);return window.addEventListener("blur",se),window.addEventListener("resize",se),()=>{window.removeEventListener("blur",se),window.removeEventListener("resize",se)}},[U]);const[F,O]=Ig(se=>{const ne=pe().filter(Ne=>!Ne.disabled),de=ne.find(Ne=>Ne.ref.current===document.activeElement),ke=Dg(ne,se,de);ke&&setTimeout(()=>{var Ne;return(Ne=ke.ref.current)==null?void 0:Ne.focus()})}),V=v.useCallback((se,ne,de)=>{const ke=!te.current&&!de;(T.value!==void 0&&T.value===ne||ke)&&(ee(se),ke&&(te.current=!0))},[T.value]),J=v.useCallback(()=>_==null?void 0:_.focus(),[_]),le=v.useCallback((se,ne,de)=>{const ke=!te.current&&!de;(T.value!==void 0&&T.value===ne||ke)&&oe(se)},[T.value]),ae=a==="popper"?mu:Cg,ue=ae===mu?{side:m,sideOffset:h,align:y,alignOffset:w,arrowPadding:g,collisionBoundary:k,collisionPadding:S,sticky:C,hideWhenDetached:b,avoidCollisions:N}:{};return l.jsx(Sg,{scope:s,content:_,viewport:I,onViewportChange:W,itemRefCallback:V,selectedItem:P,onItemLeave:J,itemTextRefCallback:le,focusSelectedItem:X,selectedItemText:ie,position:a,isPositioned:H,searchRef:F,children:l.jsx(Bu,{as:nC,allowPinchZoom:!0,children:l.jsx(Ru,{asChild:!0,trapped:T.open,onMountAutoFocus:se=>{se.preventDefault()},onUnmountAutoFocus:Be(u,se=>{var ne;(ne=T.trigger)==null||ne.focus({preventScroll:!0}),se.preventDefault()}),children:l.jsx(Pu,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:se=>se.preventDefault(),onDismiss:()=>T.onOpenChange(!1),children:l.jsx(ae,{role:"listbox",id:T.contentId,"data-state":T.open?"open":"closed",dir:T.dir,onContextMenu:se=>se.preventDefault(),...E,...ue,onPlaced:()=>z(!0),ref:B,style:{display:"flex",flexDirection:"column",outline:"none",...E.style},onKeyDown:Be(E.onKeyDown,se=>{const ne=se.ctrlKey||se.altKey||se.metaKey;if(se.key==="Tab"&&se.preventDefault(),!ne&&se.key.length===1&&O(se.key),["ArrowUp","ArrowDown","Home","End"].includes(se.key)){let ke=pe().filter(Ne=>!Ne.disabled).map(Ne=>Ne.ref.current);if(["ArrowUp","End"].includes(se.key)&&(ke=ke.slice().reverse()),["ArrowUp","ArrowDown"].includes(se.key)){const Ne=se.target,Ee=ke.indexOf(Ne);ke=ke.slice(Ee+1)}setTimeout(()=>K(ke)),se.preventDefault()}})})})})})})});kg.displayName=tC;var rC="SelectItemAlignedPosition",Cg=v.forwardRef((n,o)=>{const{__scopeSelect:s,onPlaced:a,...u}=n,d=Mr(Pr,s),p=Or(Pr,s),[m,h]=v.useState(null),[y,w]=v.useState(null),g=Qe(o,w),k=Ya(s),S=v.useRef(!1),C=v.useRef(!0),{viewport:b,selectedItem:N,selectedItemText:E,focusSelectedItem:T}=p,_=v.useCallback(()=>{if(d.trigger&&d.valueNode&&m&&y&&b&&N&&E){const B=d.trigger.getBoundingClientRect(),P=y.getBoundingClientRect(),ee=d.valueNode.getBoundingClientRect(),ie=E.getBoundingClientRect();if(d.dir!=="rtl"){const Ne=ie.left-P.left,Ee=ee.left-Ne,qe=B.left-Ee,We=B.width+qe,Zt=Math.max(We,P.width),en=window.innerWidth-un,St=mm(Ee,[un,Math.max(un,en-Zt)]);m.style.minWidth=We+"px",m.style.left=St+"px"}else{const Ne=P.right-ie.right,Ee=window.innerWidth-ee.right-Ne,qe=window.innerWidth-B.right-Ee,We=B.width+qe,Zt=Math.max(We,P.width),en=window.innerWidth-un,St=mm(Ee,[un,Math.max(un,en-Zt)]);m.style.minWidth=We+"px",m.style.right=St+"px"}const oe=k(),pe=window.innerHeight-un*2,H=b.scrollHeight,z=window.getComputedStyle(y),te=parseInt(z.borderTopWidth,10),K=parseInt(z.paddingTop,10),X=parseInt(z.borderBottomWidth,10),U=parseInt(z.paddingBottom,10),q=te+K+H+U+X,F=Math.min(N.offsetHeight*5,q),O=window.getComputedStyle(b),V=parseInt(O.paddingTop,10),J=parseInt(O.paddingBottom,10),le=B.top+B.height/2-un,ae=pe-le,ue=N.offsetHeight/2,se=N.offsetTop+ue,ne=te+K+se,de=q-ne;if(ne<=le){const Ne=oe.length>0&&N===oe[oe.length-1].ref.current;m.style.bottom="0px";const Ee=y.clientHeight-b.offsetTop-b.offsetHeight,qe=Math.max(ae,ue+(Ne?J:0)+Ee+X),We=ne+qe;m.style.height=We+"px"}else{const Ne=oe.length>0&&N===oe[0].ref.current;m.style.top="0px";const qe=Math.max(le,te+b.offsetTop+(Ne?V:0)+ue)+de;m.style.height=qe+"px",b.scrollTop=ne-le+b.offsetTop}m.style.margin=`${un}px 0`,m.style.minHeight=F+"px",m.style.maxHeight=pe+"px",a==null||a(),requestAnimationFrame(()=>S.current=!0)}},[k,d.trigger,d.valueNode,m,y,b,N,E,d.dir,a]);gt(()=>_(),[_]);const[L,I]=v.useState();gt(()=>{y&&I(window.getComputedStyle(y).zIndex)},[y]);const W=v.useCallback(B=>{B&&C.current===!0&&(_(),T==null||T(),C.current=!1)},[_,T]);return l.jsx(sC,{scope:s,contentWrapper:m,shouldExpandOnScrollRef:S,onScrollButtonChange:W,children:l.jsx("div",{ref:h,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:L},children:l.jsx(Ae.div,{...u,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...u.style}})})})});Cg.displayName=rC;var oC="SelectPopperPosition",mu=v.forwardRef((n,o)=>{const{__scopeSelect:s,align:a="start",collisionPadding:u=un,...d}=n,p=Ga(s);return l.jsx(YS,{...p,...d,ref:o,align:a,collisionPadding:u,style:{boxSizing:"border-box",...d.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});mu.displayName=oC;var[sC,Wu]=ro(Pr,{}),hu="SelectViewport",Ng=v.forwardRef((n,o)=>{const{__scopeSelect:s,nonce:a,...u}=n,d=Or(hu,s),p=Wu(hu,s),m=Qe(o,d.onViewportChange),h=v.useRef(0);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),l.jsx(Ka.Slot,{scope:s,children:l.jsx(Ae.div,{"data-radix-select-viewport":"",role:"presentation",...u,ref:m,style:{position:"relative",flex:1,overflow:"hidden auto",...u.style},onScroll:Be(u.onScroll,y=>{const w=y.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:k}=p;if(k!=null&&k.current&&g){const S=Math.abs(h.current-w.scrollTop);if(S>0){const C=window.innerHeight-un*2,b=parseFloat(g.style.minHeight),N=parseFloat(g.style.height),E=Math.max(b,N);if(E0?L:0,g.style.justifyContent="flex-end")}}}h.current=w.scrollTop})})})]})});Ng.displayName=hu;var jg="SelectGroup",[iC,aC]=ro(jg),lC=v.forwardRef((n,o)=>{const{__scopeSelect:s,...a}=n,u=Mo();return l.jsx(iC,{scope:s,id:u,children:l.jsx(Ae.div,{role:"group","aria-labelledby":u,...a,ref:o})})});lC.displayName=jg;var Eg="SelectLabel",cC=v.forwardRef((n,o)=>{const{__scopeSelect:s,...a}=n,u=aC(Eg,s);return l.jsx(Ae.div,{id:u.id,...a,ref:o})});cC.displayName=Eg;var Ta="SelectItem",[uC,_g]=ro(Ta),Hu=v.forwardRef((n,o)=>{const{__scopeSelect:s,value:a,disabled:u=!1,textValue:d,...p}=n,m=Mr(Ta,s),h=Or(Ta,s),y=m.value===a,[w,g]=v.useState(d??""),[k,S]=v.useState(!1),C=Hn(_=>{var L;return(L=h.itemRefCallback)==null?void 0:L.call(h,_,a,u)}),b=Qe(o,C),N=Mo(),E=v.useRef("touch"),T=()=>{u||(m.onValueChange(a),m.onOpenChange(!1))};return l.jsx(uC,{scope:s,value:a,disabled:u,textId:N,isSelected:y,onItemTextChange:v.useCallback(_=>{g(L=>L||((_==null?void 0:_.textContent)??"").trim())},[]),children:l.jsx(Ka.ItemSlot,{scope:s,value:a,disabled:u,textValue:w,children:l.jsx(Ae.div,{role:"option","aria-labelledby":N,"data-highlighted":k?"":void 0,"aria-selected":y&&k,"data-state":y?"checked":"unchecked","aria-disabled":u||void 0,"data-disabled":u?"":void 0,tabIndex:u?void 0:-1,...p,ref:b,onFocus:Be(p.onFocus,()=>S(!0)),onBlur:Be(p.onBlur,()=>S(!1)),onClick:Be(p.onClick,()=>{E.current!=="mouse"&&T()}),onPointerUp:Be(p.onPointerUp,()=>{E.current==="mouse"&&T()}),onPointerDown:Be(p.onPointerDown,_=>{E.current=_.pointerType}),onPointerMove:Be(p.onPointerMove,_=>{var L;E.current=_.pointerType,u?(L=h.onItemLeave)==null||L.call(h):E.current==="mouse"&&_.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Be(p.onPointerLeave,_=>{var L;_.currentTarget===document.activeElement&&((L=h.onItemLeave)==null||L.call(h))}),onKeyDown:Be(p.onKeyDown,_=>{var I;u||_.target!==_.currentTarget||((I=h.searchRef)==null?void 0:I.current)!==""&&_.key===" "||(Hk.includes(_.key)&&T(),_.key===" "&&_.preventDefault())})})})})});Hu.displayName=Ta;var Ds="SelectItemText",Pg=v.forwardRef((n,o)=>{const{__scopeSelect:s,className:a,style:u,...d}=n,p=Mr(Ds,s),m=Or(Ds,s),h=_g(Ds,s),y=Qk(Ds,s),[w,g]=v.useState(null),k=Hn(T=>{var _;return(_=m.itemTextRefCallback)==null?void 0:_.call(m,T,h.value,h.disabled)}),S=Qe(o,g,h.onItemTextChange,k),C=w==null?void 0:w.textContent,b=v.useMemo(()=>l.jsx("option",{value:h.value,disabled:h.disabled,children:C},h.value),[h.disabled,h.value,C]),{onNativeOptionAdd:N,onNativeOptionRemove:E}=y;return gt(()=>(N(b),()=>E(b)),[N,E,b]),l.jsxs(l.Fragment,{children:[l.jsx(Ae.span,{id:h.textId,...d,ref:S}),h.isSelected&&p.valueNode&&!p.valueNodeHasChildren&&!Qa(p.value)?Vo.createPortal(d.children,p.valueNode):null]})});Pg.displayName=Ds;var Rg="SelectItemIndicator",Tg=v.forwardRef((n,o)=>{const{__scopeSelect:s,...a}=n;return _g(Rg,s).isSelected?l.jsx(Ae.span,{"aria-hidden":!0,...a,ref:o}):null});Tg.displayName=Rg;var gu="SelectScrollUpButton",dC=v.forwardRef((n,o)=>{const s=Or(gu,n.__scopeSelect),a=Wu(gu,n.__scopeSelect),[u,d]=v.useState(!1),p=Qe(o,a.onScrollButtonChange);return gt(()=>{if(s.viewport&&s.isPositioned){let m=function(){const y=h.scrollTop>0;d(y)};const h=s.viewport;return m(),h.addEventListener("scroll",m),()=>h.removeEventListener("scroll",m)}},[s.viewport,s.isPositioned]),u?l.jsx(Mg,{...n,ref:p,onAutoScroll:()=>{const{viewport:m,selectedItem:h}=s;m&&h&&(m.scrollTop=m.scrollTop-h.offsetHeight)}}):null});dC.displayName=gu;var vu="SelectScrollDownButton",fC=v.forwardRef((n,o)=>{const s=Or(vu,n.__scopeSelect),a=Wu(vu,n.__scopeSelect),[u,d]=v.useState(!1),p=Qe(o,a.onScrollButtonChange);return gt(()=>{if(s.viewport&&s.isPositioned){let m=function(){const y=h.scrollHeight-h.clientHeight,w=Math.ceil(h.scrollTop)h.removeEventListener("scroll",m)}},[s.viewport,s.isPositioned]),u?l.jsx(Mg,{...n,ref:p,onAutoScroll:()=>{const{viewport:m,selectedItem:h}=s;m&&h&&(m.scrollTop=m.scrollTop+h.offsetHeight)}}):null});fC.displayName=vu;var Mg=v.forwardRef((n,o)=>{const{__scopeSelect:s,onAutoScroll:a,...u}=n,d=Or("SelectScrollButton",s),p=v.useRef(null),m=Ya(s),h=v.useCallback(()=>{p.current!==null&&(window.clearInterval(p.current),p.current=null)},[]);return v.useEffect(()=>()=>h(),[h]),gt(()=>{var w;const y=m().find(g=>g.ref.current===document.activeElement);(w=y==null?void 0:y.ref.current)==null||w.scrollIntoView({block:"nearest"})},[m]),l.jsx(Ae.div,{"aria-hidden":!0,...u,ref:o,style:{flexShrink:0,...u.style},onPointerDown:Be(u.onPointerDown,()=>{p.current===null&&(p.current=window.setInterval(a,50))}),onPointerMove:Be(u.onPointerMove,()=>{var y;(y=d.onItemLeave)==null||y.call(d),p.current===null&&(p.current=window.setInterval(a,50))}),onPointerLeave:Be(u.onPointerLeave,()=>{h()})})}),pC="SelectSeparator",mC=v.forwardRef((n,o)=>{const{__scopeSelect:s,...a}=n;return l.jsx(Ae.div,{"aria-hidden":!0,...a,ref:o})});mC.displayName=pC;var Og="SelectArrow",hC=v.forwardRef((n,o)=>{const{__scopeSelect:s,...a}=n,u=Ga(s);return Or(Og,s).position==="popper"?l.jsx(GS,{...u,...a,ref:o}):null});hC.displayName=Og;var Lg="SelectBubbleInput",Ag=v.forwardRef(({__scopeSelect:n,...o},s)=>{const a=Mr(Lg,n),{value:u,onValueChange:d,required:p,disabled:m,name:h,autoComplete:y,form:w}=a,{nativeOptions:g,nativeSelectKey:k}=a,S=v.useRef(null),C=Qe(s,S),b=u??"",N=rg(b),E=Array.from(g).some(T=>(T.props.value??"")==="");return v.useEffect(()=>{const T=S.current;if(!T)return;const _=window.HTMLSelectElement.prototype,I=Object.getOwnPropertyDescriptor(_,"value").set;if(N!==b&&I){const W=new Event("change",{bubbles:!0});I.call(T,b),T.dispatchEvent(W)}},[N,b]),l.jsxs(Ae.select,{"aria-hidden":!0,required:p,tabIndex:-1,name:h,autoComplete:y,disabled:m,form:w,onChange:T=>d(T.target.value),...o,style:{...og,...o.style},ref:C,defaultValue:b,children:[Qa(u)&&!E?l.jsx("option",{value:""}):null,Array.from(g)]},k)});Ag.displayName=Lg;function gC(n){return typeof n=="function"}function Qa(n){return n===""||n===void 0}function Ig(n){const o=Hn(n),s=v.useRef(""),a=v.useRef(0),u=v.useCallback(p=>{const m=s.current+p;o(m),(function h(y){s.current=y,window.clearTimeout(a.current),y!==""&&(a.current=window.setTimeout(()=>h(""),1e3))})(m)},[o]),d=v.useCallback(()=>{s.current="",window.clearTimeout(a.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(a.current),[]),[s,u,d]}function Dg(n,o,s){const u=o.length>1&&Array.from(o).every(y=>y===o[0])?o[0]:o,d=s?n.indexOf(s):-1;let p=vC(n,Math.max(d,0));u.length===1&&(p=p.filter(y=>y!==s));const h=p.find(y=>y.textValue.toLowerCase().startsWith(u.toLowerCase()));return h!==s?h:void 0}function vC(n,o){return n.map((s,a)=>n[(o+a)%n.length])}const Fs=hg,$s=yg,Ao=v.forwardRef(({className:n,children:o,...s},a)=>l.jsx(Uu,{ref:a,className:Se("flex h-9 w-full items-center justify-between rounded-card border border-border bg-surface-raised px-3 py-2 text-sm text-fg placeholder:text-fg-subtle transition-colors","hover:border-border/80 focus:outline-none focus:ring-2 focus:ring-accent/30 focus:border-accent/50","disabled:cursor-not-allowed disabled:opacity-50"," [&>span]:line-clamp-1",n),...s,children:o}));Ao.displayName=Uu.displayName;const Io=v.forwardRef(({className:n,children:o,position:s="popper",...a},u)=>l.jsx(wg,{children:l.jsx(Vu,{ref:u,className:Se("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-card border border-border bg-surface shadow-card animate-scale-in",s==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1",n),position:s,...a,children:l.jsx(Ng,{className:Se("p-1",s==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:o})})}));Io.displayName=Vu.displayName;const Ot=v.forwardRef(({className:n,children:o,...s},a)=>l.jsxs(Hu,{ref:a,className:Se("relative flex w-full cursor-pointer select-none items-center rounded px-2 py-1.5 text-sm text-fg-muted outline-none","hover:bg-surface-raised hover:text-fg","focus:bg-surface-raised focus:text-fg","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n),...s,children:[l.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(Tg,{children:l.jsx(nh,{className:"h-4 w-4 text-accent"})})}),l.jsx(Pg,{children:o})]}));Ot.displayName=Hu.displayName;var Xa="Dialog",[zg]=Ys(Xa),[yC,yn]=zg(Xa),Fg=n=>{const{__scopeDialog:o,children:s,open:a,defaultOpen:u,onOpenChange:d,modal:p=!0}=n,m=v.useRef(null),h=v.useRef(null),[y,w]=Ra({prop:a,defaultProp:u??!1,onChange:d,caller:Xa});return l.jsx(yC,{scope:o,triggerRef:m,contentRef:h,contentId:Mo(),titleId:Mo(),descriptionId:Mo(),open:y,onOpenChange:w,onOpenToggle:v.useCallback(()=>w(g=>!g),[w]),modal:p,children:s})};Fg.displayName=Xa;var $g="DialogTrigger",xC=v.forwardRef((n,o)=>{const{__scopeDialog:s,...a}=n,u=yn($g,s),d=Qe(o,u.triggerRef);return l.jsx(Ae.button,{type:"button","aria-haspopup":"dialog","aria-expanded":u.open,"aria-controls":u.open?u.contentId:void 0,"data-state":qu(u.open),...a,ref:d,onClick:Be(n.onClick,u.onOpenToggle)})});xC.displayName=$g;var Ku="DialogPortal",[wC,Bg]=zg(Ku,{forceMount:void 0}),Ug=n=>{const{__scopeDialog:o,forceMount:s,children:a,container:u}=n,d=yn(Ku,o);return l.jsx(wC,{scope:o,forceMount:s,children:v.Children.map(a,p=>l.jsx(Qs,{present:s||d.open,children:l.jsx($u,{asChild:!0,container:u,children:p})}))})};Ug.displayName=Ku;var Ma="DialogOverlay",Yu=v.forwardRef((n,o)=>{const s=Bg(Ma,n.__scopeDialog),{forceMount:a=s.forceMount,...u}=n,d=yn(Ma,n.__scopeDialog);return d.modal?l.jsx(Qs,{present:a||d.open,children:l.jsx(SC,{...u,ref:o})}):null});Yu.displayName=Ma;var bC=$o("DialogOverlay.RemoveScroll"),SC=v.forwardRef((n,o)=>{const{__scopeDialog:s,...a}=n,u=yn(Ma,s),d=wb(),p=Qe(o,d);return l.jsx(Bu,{as:bC,allowPinchZoom:!0,shards:[u.contentRef],children:l.jsx(Ae.div,{"data-state":qu(u.open),...a,ref:p,style:{pointerEvents:"auto",...a.style}})})}),Uo="DialogContent",Gu=v.forwardRef((n,o)=>{const s=Bg(Uo,n.__scopeDialog),{forceMount:a=s.forceMount,...u}=n,d=yn(Uo,n.__scopeDialog);return l.jsx(Qs,{present:a||d.open,children:d.modal?l.jsx(kC,{...u,ref:o}):l.jsx(CC,{...u,ref:o})})});Gu.displayName=Uo;var kC=v.forwardRef((n,o)=>{const s=yn(Uo,n.__scopeDialog),a=v.useRef(null),u=Qe(o,s.contentRef,a);return v.useEffect(()=>{const d=a.current;if(d)return ig(d)},[]),l.jsx(Vg,{...n,ref:u,trapFocus:s.open,disableOutsidePointerEvents:s.open,onCloseAutoFocus:Be(n.onCloseAutoFocus,d=>{var p;d.preventDefault(),(p=s.triggerRef.current)==null||p.focus()}),onPointerDownOutside:Be(n.onPointerDownOutside,d=>{const p=d.detail.originalEvent,m=p.button===0&&p.ctrlKey===!0;(p.button===2||m)&&d.preventDefault()}),onFocusOutside:Be(n.onFocusOutside,d=>d.preventDefault())})}),CC=v.forwardRef((n,o)=>{const s=yn(Uo,n.__scopeDialog),a=v.useRef(!1),u=v.useRef(!1);return l.jsx(Vg,{...n,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:d=>{var p,m;(p=n.onCloseAutoFocus)==null||p.call(n,d),d.defaultPrevented||(a.current||(m=s.triggerRef.current)==null||m.focus(),d.preventDefault()),a.current=!1,u.current=!1},onInteractOutside:d=>{var h,y;(h=n.onInteractOutside)==null||h.call(n,d),d.defaultPrevented||(a.current=!0,d.detail.originalEvent.type==="pointerdown"&&(u.current=!0));const p=d.target;((y=s.triggerRef.current)==null?void 0:y.contains(p))&&d.preventDefault(),d.detail.originalEvent.type==="focusin"&&u.current&&d.preventDefault()}})}),Vg=v.forwardRef((n,o)=>{const{__scopeDialog:s,trapFocus:a,onOpenAutoFocus:u,onCloseAutoFocus:d,...p}=n,m=yn(Uo,s);return Oh(),l.jsx(l.Fragment,{children:l.jsx(Ru,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:u,onUnmountAutoFocus:d,children:l.jsx(Pu,{role:"dialog",id:m.contentId,"aria-describedby":m.descriptionId,"aria-labelledby":m.titleId,"data-state":qu(m.open),...p,ref:o,deferPointerDownOutside:!0,onDismiss:()=>m.onOpenChange(!1)})})})}),Wg="DialogTitle",Qu=v.forwardRef((n,o)=>{const{__scopeDialog:s,...a}=n,u=yn(Wg,s);return l.jsx(Ae.h2,{id:u.titleId,...a,ref:o})});Qu.displayName=Wg;var Hg="DialogDescription",Xu=v.forwardRef((n,o)=>{const{__scopeDialog:s,...a}=n,u=yn(Hg,s);return l.jsx(Ae.p,{id:u.descriptionId,...a,ref:o})});Xu.displayName=Hg;var Kg="DialogClose",Yg=v.forwardRef((n,o)=>{const{__scopeDialog:s,...a}=n,u=yn(Kg,s);return l.jsx(Ae.button,{type:"button",...a,ref:o,onClick:Be(n.onClick,()=>u.onOpenChange(!1))})});Yg.displayName=Kg;function qu(n){return n?"open":"closed"}const Rn=Fg,NC=Ug,Gg=v.forwardRef(({className:n,...o},s)=>l.jsx(Yu,{ref:s,className:Se("fixed inset-0 z-50 bg-black/60 backdrop-blur-sm","data-[state=open]:animate-fade-in",n),...o}));Gg.displayName=Yu.displayName;const dn=v.forwardRef(({className:n,children:o,size:s="md",...a},u)=>{const d={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl"};return l.jsxs(NC,{children:[l.jsx(Gg,{}),l.jsxs(Gu,{ref:u,className:Se("fixed left-[50%] top-[50%] z-50 translate-x-[-50%] translate-y-[-50%]","w-full max-h-[90vh] overflow-y-auto rounded-card border border-border bg-surface shadow-card animate-scale-in","focus:outline-none",d[s],n),...a,children:[o,l.jsxs(Yg,{className:"absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-accent/40 focus:ring-offset-2 focus:ring-offset-surface disabled:pointer-events-none",children:[l.jsx(uh,{className:"h-4 w-4 text-fg-muted"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]})});dn.displayName=Gu.displayName;const fn=v.forwardRef(({className:n,...o},s)=>l.jsx("div",{ref:s,className:Se("flex flex-col gap-1.5 p-5 pb-0",n),...o}));fn.displayName="ModalHeader";const pn=v.forwardRef(({className:n,...o},s)=>l.jsx(Qu,{ref:s,className:Se("text-base font-semibold text-fg",n),...o}));pn.displayName=Qu.displayName;const mn=v.forwardRef(({className:n,...o},s)=>l.jsx(Xu,{ref:s,className:Se("text-sm text-fg-muted",n),...o}));mn.displayName=Xu.displayName;const Rr=v.forwardRef(({className:n,...o},s)=>l.jsx("div",{ref:s,className:Se("p-5",n),...o}));Rr.displayName="ModalBody";const hn=v.forwardRef(({className:n,...o},s)=>l.jsx("div",{ref:s,className:Se("flex items-center justify-end gap-3 p-5 pt-0",n),...o}));hn.displayName="ModalFooter";const Xs=v.forwardRef(({className:n,text:o,displayText:s,successDuration:a=2e3,...u},d)=>{const[p,m]=v.useState(!1),h=v.useCallback(async()=>{try{await navigator.clipboard.writeText(o),m(!0),setTimeout(()=>m(!1),a)}catch{}},[o,a]);return l.jsx(xe,{ref:d,variant:"ghost",size:"sm",onClick:h,className:Se("gap-1.5 text-fg-muted hover:text-fg",n),...u,children:p?l.jsxs(l.Fragment,{children:[l.jsx(nh,{className:"h-3.5 w-3.5 text-emerald-400"}),l.jsx("span",{className:"text-emerald-400",children:"Copied"})]}):l.jsxs(l.Fragment,{children:[l.jsx(oh,{className:"h-3.5 w-3.5"}),l.jsx("span",{children:s??"Copy"})]})})});Xs.displayName="CopyButton";const Fm={id:void 0,name:"",host:"",port:22,ssh_user:"root",ssh_key_id:null,mac_address:"",wol_enabled:!1,broadcast_addr:"",wake_timeout_seconds:180,wake_check_interval_seconds:5};function jC(){var ie,oe,pe,H;const[n,o]=v.useState([]),[s,a]=v.useState([]),[u,d]=v.useState(!1),[p,m]=v.useState(null),[h,y]=v.useState(Fm),[w,g]=v.useState(!1),[k,S]=v.useState(!1),[C,b]=v.useState({machine:null,result:null,loading:!1});v.useEffect(()=>{N(),S(!0),Ie("/api/machines/refresh",{method:"POST"}).catch(()=>{});const z=setTimeout(()=>S(!1),5e3);return()=>clearTimeout(z)},[]),v.useEffect(()=>Th(te=>{o(K=>K.map(X=>X.id===te.machine_id?{...X,status:te.status}:X))}),[]);async function N(){try{const[z,te]=await Promise.all([Ie("/api/machines"),Ie("/api/ssh-keys")]);o(z),a(te)}catch{}}function E(){y(Fm),d(!0)}function T(z){y({id:z.id,name:z.name,host:z.host,port:z.port,ssh_user:z.ssh_user,ssh_key_id:z.ssh_key_id,mac_address:z.mac_address||"",wol_enabled:z.wol_enabled,broadcast_addr:z.broadcast_addr||"",wake_timeout_seconds:z.wake_timeout_seconds||180,wake_check_interval_seconds:z.wake_check_interval_seconds||5}),d(!0)}async function _(z){if(z.preventDefault(),!h.name.trim()||!h.host.trim()){Re.error("Name and host are required");return}if(h.mac_address&&!/^([0-9A-Fa-f]{2}[:-]){5}[0-9A-Fa-f]{2}$/.test(h.mac_address)){Re.error("Invalid MAC address format (AA:BB:CC:DD:EE:FF)");return}g(!0);try{const te={id:h.id||null,name:h.name,host:h.host,port:Number(h.port),ssh_user:h.ssh_user,ssh_key_id:h.ssh_key_id,mac_address:h.mac_address||null,wol_enabled:!!h.wol_enabled,broadcast_addr:h.broadcast_addr||null,wake_timeout_seconds:Number(h.wake_timeout_seconds),wake_check_interval_seconds:Number(h.wake_check_interval_seconds)};await Ie(h.id?`/api/machines/${h.id}`:"/api/machines",{method:h.id?"PUT":"POST",body:te}),d(!1),Re.success(h.id?"Machine updated":"Machine created"),N()}catch(te){Re.error(te.message)}finally{g(!1)}}async function L(){if(p!==null)try{await Ie(`/api/machines/${p}`,{method:"DELETE"}),Re.success("Machine deleted"),m(null),N()}catch(z){Re.error(z.message)}}async function I(z){try{await Ie(`/api/machines/${z.id}/test-wol`,{method:"POST"}),Re.success(`Magic packet sent (${z.mac_address})`)}catch(te){Re.error(`Wake failed: ${te.message}`)}}async function W(z){b({machine:z,result:null,loading:!0});try{const te=await Ie(`/api/machines/${z.id}/test-connection`,{method:"POST"});b({machine:z,result:te,loading:!1})}catch(te){b({machine:z,result:{success:!1,error:te.message},loading:!1})}}async function B(){var z;if(!(!C.machine||!((z=C.result)!=null&&z.fingerprint)))try{const te=await Ie(`/api/machines/${C.machine.id}/approve-fingerprint`,{method:"POST",body:{fingerprint:C.result.fingerprint}});o(K=>K.map(X=>X.id===te.id?te:X)),Re.success("Fingerprint approved"),b({machine:null,result:null,loading:!1})}catch(te){Re.error(`Approve failed: ${te.message}`)}}function P(){b({machine:null,result:null,loading:!1})}function ee(z){if(!z)return"Server Key";const te=s.find(K=>K.id===z);return te?te.label:`Key #${z}`}return l.jsxs("div",{className:"space-y-6",children:[l.jsx(no,{title:"Machines",description:"Remote machines reachable via SSH",actions:l.jsxs(xe,{onClick:E,size:"sm",children:[l.jsx(Fo,{className:"h-4 w-4"}),"Add Machine"]})}),l.jsx($t,{children:l.jsx("div",{className:"p-0",children:n.length===0?l.jsx(Yo,{icon:l.jsx(ku,{className:"h-5 w-5"}),title:"No machines",description:"Add a remote machine to start syncing data",action:l.jsxs(xe,{onClick:E,size:"sm",children:[l.jsx(Fo,{className:"h-4 w-4"}),"Add Machine"]})}):l.jsxs(l.Fragment,{children:[k&&l.jsxs("div",{className:"flex items-center gap-2 px-4 pt-3 text-xs text-muted-foreground",children:[l.jsx("span",{className:"inline-block h-2 w-2 bg-amber-400 rounded-full animate-pulse"}),"Checking machine status..."]}),l.jsxs(Ws,{children:[l.jsx(Hs,{children:l.jsxs(Wn,{children:[l.jsx(Fe,{children:"Name"}),l.jsx(Fe,{children:"Host"}),l.jsx(Fe,{children:"SSH Key"}),l.jsx(Fe,{children:"WoL"}),l.jsx(Fe,{children:"WoL Timeout"}),l.jsx(Fe,{children:"Status"}),l.jsx(Fe,{className:"w-24",children:"Actions"})]})}),l.jsx(Ks,{children:n.map(z=>l.jsxs(Wn,{children:[l.jsx($e,{className:"font-medium",children:z.name}),l.jsx($e,{children:l.jsxs("span",{className:"font-mono text-xs text-fg-muted",children:[z.host,":",z.port]})}),l.jsx($e,{className:"text-fg-muted text-xs",children:ee(z.ssh_key_id)}),l.jsx($e,{children:z.wol_enabled?l.jsx(Bt,{variant:"info",label:"Yes"}):l.jsx("span",{className:"text-fg-subtle text-xs",children:"No"})}),l.jsx($e,{children:z.wol_enabled?l.jsxs("span",{className:"text-xs text-fg-muted",children:[z.wake_timeout_seconds,"s"]}):l.jsx("span",{className:"text-fg-subtle text-xs",children:"—"})}),l.jsx($e,{children:l.jsx(EC,{status:z.status})}),l.jsx($e,{children:l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx(xe,{variant:"ghost",size:"icon-sm",onClick:()=>T(z),title:"Edit",children:l.jsx(ah,{className:"h-3.5 w-3.5"})}),l.jsx(xe,{variant:"ghost",size:"icon-sm",onClick:()=>W(z),title:"Test SSH Connection",children:l.jsx(nw,{className:"h-3.5 w-3.5"})}),z.wol_enabled&&l.jsx(xe,{variant:"ghost",size:"icon-sm",onClick:()=>I(z),title:"Test Wake-on-LAN",children:l.jsx(dh,{className:"h-3.5 w-3.5"})}),l.jsx(xe,{variant:"ghost",size:"icon-sm",onClick:()=>m(z.id),className:"text-rose-400 hover:text-rose-300 hover:bg-rose-500/10",title:"Delete",children:l.jsx(Cu,{className:"h-3.5 w-3.5"})})]})})]},z.id))})]})]})})}),l.jsx(Rn,{open:u,onOpenChange:d,children:l.jsxs(dn,{size:"md",children:[l.jsxs(fn,{children:[l.jsx(pn,{children:h.id?"Edit Machine":"Add Machine"}),l.jsx(mn,{children:h.id?"Update the configuration for this machine":"Configure a new remote machine for syncing"})]}),l.jsxs("form",{onSubmit:_,children:[l.jsxs(Rr,{className:"space-y-4",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"name",required:!0,children:"Name"}),l.jsx(ht,{id:"name",placeholder:"backup-nas",value:h.name,onChange:z=>y({...h,name:z.target.value})})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"host",children:"Host / IP"}),l.jsx(ht,{id:"host",placeholder:"192.168.1.100",value:h.host,onChange:z=>y({...h,host:z.target.value})})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"port",children:"SSH Port"}),l.jsx(ht,{id:"port",type:"number",placeholder:"22",value:h.port,onChange:z=>y({...h,port:Number(z.target.value)})})]})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"ssh_user",children:"SSH User"}),l.jsx(ht,{id:"ssh_user",placeholder:"root",value:h.ssh_user,onChange:z=>y({...h,ssh_user:z.target.value})})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"ssh_key_id",children:"SSH Key"}),l.jsxs(Fs,{value:((ie=h.ssh_key_id)==null?void 0:ie.toString())??"",onValueChange:z=>y({...h,ssh_key_id:z?Number(z):null}),children:[l.jsx(Ao,{id:"ssh_key_id",children:l.jsx($s,{placeholder:"Server Key"})}),l.jsxs(Io,{children:[l.jsx(Ot,{value:"",children:"Server Key (default)"}),s.map(z=>l.jsxs(Ot,{value:z.id.toString(),children:[z.label," ",z.in_use?"(in use)":""]},z.id))]})]})]})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"mac_address",children:"MAC Address"}),l.jsx(ht,{id:"mac_address",placeholder:"AA:BB:CC:DD:EE:FF",value:h.mac_address,onChange:z=>y({...h,mac_address:z.target.value})}),l.jsx("p",{className:"text-xs text-fg-subtle",children:"Required for Wake-on-LAN"})]}),l.jsxs("div",{className:Se("flex items-center gap-2 rounded-card p-3 transition-colors",h.wol_enabled?"bg-accent/5 border border-accent/20":"bg-surface-raised border border-border"),children:[l.jsx("input",{type:"checkbox",id:"wol_enabled",checked:h.wol_enabled,onChange:z=>y({...h,wol_enabled:z.target.checked}),className:"h-4 w-4 rounded border-border accent-accent"}),l.jsx(ze,{htmlFor:"wol_enabled",className:"cursor-pointer mb-0",children:"Enable Wake-on-LAN"})]}),h.wol_enabled&&l.jsxs("div",{className:"space-y-3 p-3 border border-border rounded-card bg-surface-raised",children:[l.jsx("p",{className:"text-xs text-fg-subtle font-medium",children:"Wake-on-LAN Settings"}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"broadcast_addr",children:"Broadcast Address"}),l.jsx(ht,{id:"broadcast_addr",placeholder:"255.255.255.255",value:h.broadcast_addr,onChange:z=>y({...h,broadcast_addr:z.target.value})}),l.jsx("p",{className:"text-xs text-fg-subtle",children:"Leave blank to use 255.255.255.255. Set to your subnet broadcast address if the server has multiple interfaces."})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"wake_timeout_seconds",children:"Wake timeout (s)"}),l.jsx(ht,{id:"wake_timeout_seconds",type:"number",min:10,max:600,value:h.wake_timeout_seconds,onChange:z=>y({...h,wake_timeout_seconds:Number(z.target.value)})}),l.jsx("p",{className:"text-xs text-fg-subtle",children:"HP Microservers typically need ~180s."})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"wake_check_interval_seconds",children:"Check interval (s)"}),l.jsx(ht,{id:"wake_check_interval_seconds",type:"number",min:1,max:60,value:h.wake_check_interval_seconds,onChange:z=>y({...h,wake_check_interval_seconds:Number(z.target.value)})}),l.jsx("p",{className:"text-xs text-fg-subtle",children:"How often to poll SSH readiness."})]})]})]})]}),l.jsxs(hn,{children:[l.jsx(xe,{type:"button",variant:"secondary",onClick:()=>d(!1),children:"Cancel"}),l.jsx(xe,{type:"submit",loading:w,children:h.id?"Save Changes":"Add Machine"})]})]})]})}),l.jsx(Rn,{open:p!==null,onOpenChange:z=>!z&&m(null),children:l.jsxs(dn,{size:"sm",children:[l.jsxs(fn,{children:[l.jsx(pn,{children:"Delete Machine"}),l.jsx(mn,{children:"Are you sure you want to delete this machine? This action cannot be undone."})]}),l.jsxs(hn,{children:[l.jsx(xe,{variant:"secondary",onClick:()=>m(null),children:"Cancel"}),l.jsx(xe,{variant:"danger-solid",onClick:L,children:"Delete"})]})]})}),l.jsx(Rn,{open:C.machine!==null,onOpenChange:z=>!z&&P(),children:l.jsxs(dn,{size:"md",children:[l.jsxs(fn,{children:[l.jsx(pn,{children:"SSH Connection Test"}),l.jsxs(mn,{children:[(oe=C.machine)==null?void 0:oe.name," (",(pe=C.machine)==null?void 0:pe.host,":",(H=C.machine)==null?void 0:H.port,")"]})]}),l.jsxs(Rr,{className:"space-y-4",children:[C.loading&&l.jsx("div",{className:"flex items-center justify-center py-8",children:l.jsx("div",{className:"h-6 w-6 border-2 border-accent border-t-transparent rounded-full animate-spin"})}),!C.loading&&C.result&&l.jsxs("div",{className:"space-y-4",children:[C.result.success?l.jsxs("div",{className:"rounded-card bg-emerald-500/10 border border-emerald-500/30 p-4",children:[l.jsx("p",{className:"text-sm font-medium text-emerald-400 mb-1",children:"Connection successful"}),l.jsx("pre",{className:"text-xs text-fg-muted whitespace-pre-wrap",children:C.result.output})]}):l.jsxs("div",{className:"rounded-card bg-rose-500/10 border border-rose-500/30 p-4",children:[l.jsx("p",{className:"text-sm font-medium text-rose-400 mb-1",children:"Connection failed"}),l.jsx("p",{className:"text-xs text-fg-muted",children:C.result.error})]}),C.result.fingerprint&&l.jsxs("div",{className:"space-y-2",children:[l.jsx("p",{className:"text-sm font-medium text-fg",children:"Host Key Fingerprint"}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("code",{className:"flex-1 text-xs font-mono bg-surface-raised rounded-card px-3 py-2 text-fg-muted border border-border",children:C.result.fingerprint}),l.jsx(Xs,{text:C.result.fingerprint})]}),C.machine&&!C.machine.fingerprint_confirmed&&l.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[l.jsx(Bt,{variant:"pending",label:"Not verified"}),l.jsx("span",{className:"text-xs text-fg-muted",children:"Approve to trust this fingerprint"})]}),C.machine&&C.machine.fingerprint_confirmed&&l.jsx("div",{className:"flex items-center gap-2 mt-2",children:l.jsx(Bt,{variant:"success",label:"Verified"})})]})]})]}),l.jsxs(hn,{children:[l.jsx(xe,{variant:"secondary",onClick:P,children:"Close"}),!C.loading&&C.result&&!C.result.success&&C.result.fingerprint&&C.machine&&!C.machine.fingerprint_confirmed&&l.jsx(xe,{onClick:B,children:"Approve & Trust Fingerprint"})]})]})})]})}function EC({status:n}){const o=n==="online"?"success":n==="offline"?"neutral":"info";return l.jsx(Bt,{variant:o,label:n})}const qa=v.forwardRef(({className:n,error:o,...s},a)=>l.jsx("textarea",{className:Se("flex min-h-[80px] w-full rounded-card border bg-surface-raised px-3 py-2 text-sm text-fg placeholder:text-fg-subtle transition-colors resize-none","border-border hover:border-border/80","focus:outline-none focus:ring-2 focus:ring-accent/30 focus:border-accent/50","disabled:cursor-not-allowed disabled:opacity-50",o&&"border-rose-500/50 focus:ring-rose-500/30 focus:border-rose-500/50",n),ref:a,...s}));qa.displayName="Textarea";const $m={id:void 0,name:"",source_machine_id:null,source_path:"",dest_machine_id:null,dest_path:"",direction:"push",rsync_flags:"-aP",exclude_patterns:"",enabled:!0};function _C(){var W,B;const[n,o]=v.useState([]),[s,a]=v.useState([]),[u,d]=v.useState(!1),[p,m]=v.useState(null),[h,y]=v.useState($m),[w,g]=v.useState({}),[k,S]=v.useState(!1);v.useEffect(()=>{C()},[]);async function C(){try{const[P,ee]=await Promise.all([Ie("/api/sync-pairs"),Ie("/api/machines")]);o(P),a(ee)}catch{}}function b(){y($m),d(!0)}function N(P){y({id:P.id,name:P.name,source_machine_id:P.source_machine_id,source_path:P.source_path,dest_machine_id:P.dest_machine_id,dest_path:P.dest_path,direction:P.direction,rsync_flags:P.rsync_flags,exclude_patterns:P.exclude_patterns||"",enabled:P.enabled}),d(!0)}async function E(P){if(P.preventDefault(),!h.name.trim()){Re.error("Name is required");return}if(!h.source_path.trim()||!h.dest_path.trim()){Re.error("Source and destination paths are required");return}S(!0);try{await Ie(h.id?`/api/sync-pairs/${h.id}`:"/api/sync-pairs",{method:h.id?"PUT":"POST",body:{name:h.name,source_machine_id:h.source_machine_id,source_path:h.source_path,dest_machine_id:h.dest_machine_id,dest_path:h.dest_path,direction:h.direction,rsync_flags:h.rsync_flags,exclude_patterns:h.exclude_patterns,enabled:h.enabled}}),d(!1),Re.success(h.id?"Sync pair updated":"Sync pair created"),C()}catch(ee){Re.error(ee.message)}finally{S(!1)}}async function T(P){g(ee=>({...ee,[P]:!0}));try{await Ie(`/api/sync-pairs/${P}/run`,{method:"POST"}),Re.success("Job triggered"),C()}catch(ee){Re.error(ee.message)}finally{g(ee=>({...ee,[P]:!1}))}}async function _(){if(p!==null)try{await Ie(`/api/sync-pairs/${p}`,{method:"DELETE"}),Re.success("Sync pair deleted"),m(null),C()}catch(P){Re.error(P.message)}}function L(P){if(!P)return"Local server";const ee=s.find(ie=>ie.id===P);return ee?ee.name:`Machine ${P}`}const I=P=>P==="push"?l.jsx(Z0,{className:"h-3 w-3"}):P==="pull"?l.jsx(ru,{className:"h-3 w-3"}):l.jsx(su,{className:"h-3 w-3"});return l.jsxs("div",{className:"space-y-6",children:[l.jsx(no,{title:"Sync Pairs",description:"Define source and destination for rsync operations",actions:l.jsxs(xe,{onClick:b,size:"sm",children:[l.jsx(Fo,{className:"h-4 w-4"}),"Add Sync Pair"]})}),l.jsx($t,{children:l.jsx("div",{className:"p-0",children:n.length===0?l.jsx(Yo,{icon:l.jsx(su,{className:"h-5 w-5"}),title:"No sync pairs",description:"Create a sync pair to define data transfer between machines",action:l.jsxs(xe,{onClick:b,size:"sm",children:[l.jsx(Fo,{className:"h-4 w-4"}),"Add Sync Pair"]})}):l.jsxs(Ws,{children:[l.jsx(Hs,{children:l.jsxs(Wn,{children:[l.jsx(Fe,{children:"Name"}),l.jsx(Fe,{children:"Source"}),l.jsx(Fe,{children:"Destination"}),l.jsx(Fe,{children:"Direction"}),l.jsx(Fe,{children:"Enabled"}),l.jsx(Fe,{className:"w-28",children:"Actions"})]})}),l.jsx(Ks,{children:n.map(P=>l.jsxs(Wn,{children:[l.jsx($e,{className:"font-medium",children:P.name}),l.jsx($e,{children:l.jsxs("span",{className:"font-mono text-xs text-fg-muted",children:[L(P.source_machine_id),":",P.source_path]})}),l.jsx($e,{children:l.jsxs("span",{className:"font-mono text-xs text-fg-muted",children:[L(P.dest_machine_id),":",P.dest_path]})}),l.jsx($e,{children:l.jsxs("div",{className:"flex items-center gap-1.5",children:[I(P.direction),l.jsx("span",{className:"text-xs capitalize",children:P.direction})]})}),l.jsx($e,{children:P.enabled?l.jsx(Bt,{variant:"success",label:"Active"}):l.jsx(Bt,{variant:"neutral",label:"Disabled"})}),l.jsx($e,{children:l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx(xe,{variant:"ghost",size:"icon-sm",onClick:()=>N(P),className:"text-fg-muted hover:text-fg hover:bg-surface-raised",title:"Edit",children:l.jsx(ah,{className:"h-3.5 w-3.5"})}),l.jsx(xe,{variant:"ghost",size:"icon-sm",onClick:()=>T(P.id),disabled:w[P.id],loading:w[P.id],className:"text-emerald-400 hover:text-emerald-300 hover:bg-emerald-500/10",title:"Run now",children:l.jsx(Ow,{className:"h-3.5 w-3.5"})}),l.jsx(xe,{variant:"ghost",size:"icon-sm",onClick:()=>m(P.id),className:"text-rose-400 hover:text-rose-300 hover:bg-rose-500/10",title:"Delete",children:l.jsx(Cu,{className:"h-3.5 w-3.5"})})]})})]},P.id))})]})})}),l.jsx(Rn,{open:u,onOpenChange:d,children:l.jsxs(dn,{size:"lg",children:[l.jsxs(fn,{children:[l.jsx(pn,{children:h.id?"Edit Sync Pair":"Add Sync Pair"}),l.jsx(mn,{children:h.id?"Update the configuration for this sync pair":"Define a new source and destination for data syncing"})]}),l.jsxs("form",{onSubmit:E,children:[l.jsxs(Rr,{className:"space-y-4",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"sp-name",required:!0,children:"Name"}),l.jsx(ht,{id:"sp-name",placeholder:"backup-photos",value:h.name,onChange:P=>y({...h,name:P.target.value})})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"sp-source-machine",children:"Source Machine"}),l.jsxs(Fs,{value:((W=h.source_machine_id)==null?void 0:W.toString())??"",onValueChange:P=>y({...h,source_machine_id:P?Number(P):null}),children:[l.jsx(Ao,{id:"sp-source-machine",children:l.jsx($s,{placeholder:"Local server"})}),l.jsxs(Io,{children:[l.jsx(Ot,{value:"",children:"Local server"}),s.map(P=>l.jsx(Ot,{value:P.id.toString(),children:P.name},P.id))]})]})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"sp-dest-machine",children:"Dest Machine"}),l.jsxs(Fs,{value:((B=h.dest_machine_id)==null?void 0:B.toString())??"",onValueChange:P=>y({...h,dest_machine_id:P?Number(P):null}),children:[l.jsx(Ao,{id:"sp-dest-machine",children:l.jsx($s,{placeholder:"Local server"})}),l.jsxs(Io,{children:[l.jsx(Ot,{value:"",children:"Local server"}),s.map(P=>l.jsx(Ot,{value:P.id.toString(),children:P.name},P.id))]})]})]})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"sp-source-path",required:!0,children:"Source Path"}),l.jsx(ht,{id:"sp-source-path",placeholder:"/data/photos",value:h.source_path,onChange:P=>y({...h,source_path:P.target.value})})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"sp-dest-path",required:!0,children:"Dest Path"}),l.jsx(ht,{id:"sp-dest-path",placeholder:"/backup/photos",value:h.dest_path,onChange:P=>y({...h,dest_path:P.target.value})})]})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"sp-direction",children:"Direction"}),l.jsxs(Fs,{value:h.direction,onValueChange:P=>y({...h,direction:P}),children:[l.jsx(Ao,{id:"sp-direction",children:l.jsx($s,{})}),l.jsxs(Io,{children:[l.jsx(Ot,{value:"push",children:"Push"}),l.jsx(Ot,{value:"pull",children:"Pull"}),l.jsx(Ot,{value:"mirror",children:"Mirror"})]})]})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"sp-rsync-flags",children:"Rsync Flags"}),l.jsx(ht,{id:"sp-rsync-flags",placeholder:"-aP",value:h.rsync_flags,onChange:P=>y({...h,rsync_flags:P.target.value})})]})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"sp-exclude",children:"Exclude Patterns"}),l.jsx(qa,{id:"sp-exclude",placeholder:`node_modules -.git -*.tmp`,value:h.exclude_patterns,onChange:P=>y({...h,exclude_patterns:P.target.value}),className:"font-mono text-xs",rows:3}),l.jsx("p",{className:"text-xs text-fg-subtle",children:"One pattern per line"})]}),l.jsxs("div",{className:Se("flex items-center gap-2 rounded-card p-3 transition-colors",h.enabled?"bg-accent/5 border border-accent/20":"bg-surface-raised border border-border"),children:[l.jsx("input",{type:"checkbox",id:"sp-enabled",checked:h.enabled,onChange:P=>y({...h,enabled:P.target.checked}),className:"h-4 w-4 rounded border-border accent-accent"}),l.jsx(ze,{htmlFor:"sp-enabled",className:"cursor-pointer mb-0",children:"Enable this sync pair"})]})]}),l.jsxs(hn,{children:[l.jsx(xe,{type:"button",variant:"secondary",onClick:()=>d(!1),children:"Cancel"}),l.jsx(xe,{type:"submit",loading:k,children:h.id?"Save Changes":"Add Sync Pair"})]})]})]})}),l.jsx(Rn,{open:p!==null,onOpenChange:P=>!P&&m(null),children:l.jsxs(dn,{size:"sm",children:[l.jsxs(fn,{children:[l.jsx(pn,{children:"Delete Sync Pair"}),l.jsx(mn,{children:"Are you sure you want to delete this sync pair? All associated job history will remain."})]}),l.jsxs(hn,{children:[l.jsx(xe,{variant:"secondary",onClick:()=>m(null),children:"Cancel"}),l.jsx(xe,{variant:"danger-solid",onClick:_,children:"Delete"})]})]})})]})}function PC(){const[n,o]=v.useState([]),[s,a]=v.useState([]),[u,d]=v.useState(""),[p,m]=v.useState(""),[h,y]=v.useState("7d"),[w,g]=v.useState(0),[k,S]=v.useState(0),[C,b]=v.useState(!0),N=50;v.useEffect(()=>{T()},[]),v.useEffect(()=>{E()},[u,p,h,k]);async function E(){b(!0);try{let B=`/api/jobs?limit=${N}&offset=${k*N}`;if(u&&(B+=`&status=${u}`),p&&(B+=`&sync_pair_id=${p}`),h==="24h"){const oe=new Date(Date.now()-864e5).toISOString();B+=`&from=${encodeURIComponent(oe)}`}else if(h==="7d"){const oe=new Date(Date.now()-6048e5).toISOString();B+=`&from=${encodeURIComponent(oe)}`}else if(h==="30d"){const oe=new Date(Date.now()-2592e6).toISOString();B+=`&from=${encodeURIComponent(oe)}`}const P=await fetch(B,{credentials:"include"}),ee=P.headers.get("X-Total-Count");ee&&g(Number(ee));const ie=await P.json();o(Array.isArray(ie)?ie:[])}catch{}finally{b(!1)}}async function T(){try{a(await Ie("/api/sync-pairs"))}catch{}}async function _(B){try{await Ie(`/api/jobs/${B}/cancel`,{method:"POST"}),Re.success("Job cancelled"),E()}catch(P){Re.error(P.message)}}function L(B){const P=s.find(ee=>ee.id===B);return P?P.name:`Pair ${B}`}const I=Math.ceil(w/N),W=({label:B,value:P,onChange:ee})=>l.jsxs(Fs,{value:P,onValueChange:ee,children:[l.jsx(Ao,{className:"w-auto min-w-[140px]",children:l.jsx($s,{placeholder:B})}),l.jsxs(Io,{children:[l.jsx(Ot,{value:"",children:B}),B==="All Pairs"&&s.map(ie=>l.jsx(Ot,{value:ie.id.toString(),children:ie.name},ie.id)),B==="All Statuses"&&[{value:"queued",label:"Queued"},{value:"waking_up",label:"Waking Up"},{value:"running",label:"Running"},{value:"success",label:"Success"},{value:"failed",label:"Failed"},{value:"cancelled",label:"Cancelled"}].map(ie=>l.jsx(Ot,{value:ie.value,children:ie.label},ie.value)),B==="Time Range"&&[{value:"24h",label:"Last 24h"},{value:"7d",label:"Last 7 days"},{value:"30d",label:"Last 30 days"},{value:"all",label:"All time"}].map(ie=>l.jsx(Ot,{value:ie.value,children:ie.label},ie.value))]})]});return l.jsxs("div",{className:"space-y-6",children:[l.jsx(no,{title:"Job History",description:`${w} job${w!==1?"s":""} found`,actions:l.jsxs(xe,{variant:"secondary",size:"sm",onClick:()=>E(),disabled:C,children:[l.jsx(lh,{className:Se("h-4 w-4",C&&"animate-spin")}),"Refresh"]})}),l.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[l.jsx(W,{label:"All Pairs",value:p,onChange:B=>{m(B),S(0)}}),l.jsx(W,{label:"All Statuses",value:u,onChange:B=>{d(B),S(0)}}),l.jsx(W,{label:"Time Range",value:h,onChange:B=>{y(B),S(0)}}),(u||p||h!=="7d")&&l.jsxs(xe,{variant:"ghost",size:"sm",onClick:()=>{d(""),m(""),y("7d"),S(0)},className:"text-fg-subtle",children:[l.jsx(ou,{className:"h-3.5 w-3.5"}),"Clear filters"]})]}),l.jsxs(RC,{className:"p-0",children:[C?l.jsx("div",{className:"p-5 space-y-3",children:Array.from({length:5}).map((B,P)=>l.jsx(zs,{className:"h-12 w-full"},P))}):n.length===0?l.jsx(Yo,{icon:l.jsx(ih,{className:"h-5 w-5"}),title:"No jobs found",description:u||p||h!=="7d"?"Try adjusting your filters":"Sync pairs will appear here once jobs are executed"}):l.jsxs(Ws,{children:[l.jsx(Hs,{children:l.jsxs(Wn,{children:[l.jsx(Fe,{children:"ID"}),l.jsx(Fe,{children:"Sync Pair"}),l.jsx(Fe,{children:"Trigger"}),l.jsx(Fe,{children:"Status"}),l.jsx(Fe,{children:"Duration"}),l.jsx(Fe,{children:"Started"}),l.jsx(Fe,{children:"Finished"}),l.jsx(Fe,{className:"w-20",children:"Actions"})]})}),l.jsx(Ks,{children:n.map(B=>l.jsxs(Wn,{children:[l.jsx($e,{children:l.jsxs(zo,{to:`/jobs/${B.id}`,className:"text-accent hover:text-accent-hover font-mono text-xs",children:["#",B.id]})}),l.jsx($e,{className:"text-fg-muted",children:L(B.sync_pair_id)}),l.jsx($e,{children:l.jsx("span",{className:"text-xs text-fg-muted capitalize",children:B.trigger_type})}),l.jsx($e,{children:l.jsx(Bt,{variant:Fa(B.status),label:$a(B.status)})}),l.jsx($e,{className:"text-fg-muted font-mono text-xs",children:B.started_at?Ph((B.finished_at?new Date(B.finished_at).getTime():Date.now())-new Date(B.started_at).getTime()):"-"}),l.jsx($e,{className:"text-fg-muted text-xs",children:B.started_at?new Date(B.started_at).toLocaleString():"-"}),l.jsx($e,{className:"text-fg-muted text-xs",children:B.finished_at?new Date(B.finished_at).toLocaleString():"-"}),l.jsx($e,{children:["queued","waking_up","running"].includes(B.status)&&l.jsx(xe,{variant:"ghost",size:"icon-sm",onClick:()=>_(B.id),className:"text-rose-400 hover:text-rose-300 hover:bg-rose-500/10",title:"Cancel job",children:l.jsx(ou,{className:"h-3.5 w-3.5"})})})]},B.id))})]}),I>1&&l.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-t border-border",children:[l.jsxs("div",{className:"text-xs text-fg-muted",children:["Page ",k+1," of ",I," (",w," total)"]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(xe,{variant:"secondary",size:"icon-sm",onClick:()=>S(B=>Math.max(0,B-1)),disabled:k===0,children:l.jsx(sw,{className:"h-4 w-4"})}),l.jsx(xe,{variant:"secondary",size:"icon-sm",onClick:()=>S(B=>Math.min(I-1,B+1)),disabled:k>=I-1,children:l.jsx(aw,{className:"h-4 w-4"})})]})]})]})]})}function RC({children:n,className:o}){return l.jsx("div",{className:Se("rounded-card border border-border bg-surface shadow-card",o),children:n})}var Ja="Switch",[TC]=Ys(Ja),[MC,Ju]=TC(Ja);function OC(n){const{__scopeSwitch:o,checked:s,children:a,defaultChecked:u,disabled:d,form:p,name:m,onCheckedChange:h,required:y,value:w="on",internal_do_not_use_render:g}=n,[k,S]=Ra({prop:s,defaultProp:u??!1,onChange:h,caller:Ja}),[C,b]=v.useState(null),[N,E]=v.useState(null),T=v.useRef(!1),_=C?!!p||!!C.closest("form"):!0,L={checked:k,setChecked:S,disabled:d,control:C,setControl:b,name:m,form:p,value:w,hasConsumerStoppedPropagationRef:T,required:y,defaultChecked:u,isFormControl:_,bubbleInput:N,setBubbleInput:E};return l.jsx(MC,{scope:o,...L,children:LC(g)?g(L):a})}var Qg="SwitchTrigger",Xg=v.forwardRef(({__scopeSwitch:n,onClick:o,...s},a)=>{const{control:u,form:d,value:p,disabled:m,checked:h,required:y,setControl:w,setChecked:g,hasConsumerStoppedPropagationRef:k,isFormControl:S,bubbleInput:C}=Ju(Qg,n),b=Qe(a,w),N=v.useRef(h);return v.useEffect(()=>{const E=d?u==null?void 0:u.ownerDocument.getElementById(d):u==null?void 0:u.form;if(E instanceof HTMLFormElement){const T=()=>g(N.current);return E.addEventListener("reset",T),()=>E.removeEventListener("reset",T)}},[u,d,g]),l.jsx(Ae.button,{type:"button",role:"switch","aria-checked":h,"aria-required":y,"data-state":tv(h),"data-disabled":m?"":void 0,disabled:m,value:p,...s,ref:b,onClick:Be(o,E=>{g(T=>!T),C&&S&&(k.current=E.isPropagationStopped(),k.current||E.stopPropagation())})})});Xg.displayName=Qg;var Zu=v.forwardRef((n,o)=>{const{__scopeSwitch:s,name:a,checked:u,defaultChecked:d,required:p,disabled:m,value:h,onCheckedChange:y,form:w,...g}=n;return l.jsx(OC,{__scopeSwitch:s,checked:u,defaultChecked:d,disabled:m,required:p,onCheckedChange:y,name:a,form:w,value:h,internal_do_not_use_render:({isFormControl:k})=>l.jsxs(l.Fragment,{children:[l.jsx(Xg,{...g,ref:o,__scopeSwitch:s}),k&&l.jsx(ev,{__scopeSwitch:s})]})})});Zu.displayName=Ja;var qg="SwitchThumb",Jg=v.forwardRef((n,o)=>{const{__scopeSwitch:s,...a}=n,u=Ju(qg,s);return l.jsx(Ae.span,{"data-state":tv(u.checked),"data-disabled":u.disabled?"":void 0,...a,ref:o})});Jg.displayName=qg;var Zg="SwitchBubbleInput",ev=v.forwardRef(({__scopeSwitch:n,...o},s)=>{const{control:a,hasConsumerStoppedPropagationRef:u,checked:d,defaultChecked:p,required:m,disabled:h,name:y,value:w,form:g,bubbleInput:k,setBubbleInput:S}=Ju(Zg,n),C=Qe(s,S),b=rg(d),N=Yh(a);v.useEffect(()=>{const T=k;if(!T)return;const _=window.HTMLInputElement.prototype,I=Object.getOwnPropertyDescriptor(_,"checked").set,W=!u.current;if(b!==d&&I){const B=new Event("click",{bubbles:W});I.call(T,d),T.dispatchEvent(B)}},[k,b,d,u]);const E=v.useRef(d);return l.jsx(Ae.input,{type:"checkbox","aria-hidden":!0,defaultChecked:p??E.current,required:m,disabled:h,name:y,value:w,form:g,...o,tabIndex:-1,ref:C,style:{...o.style,...N,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});ev.displayName=Zg;function LC(n){return typeof n=="function"}function tv(n){return n?"checked":"unchecked"}const nv=v.forwardRef(({className:n,...o},s)=>l.jsx(Zu,{ref:s,className:Se("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/40 focus-visible:ring-offset-2 focus-visible:ring-offset-canvas","disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:bg-accent data-[state=unchecked]:bg-surface-raised data-[state=unchecked]:border-border",n),...o,children:l.jsx(Jg,{className:Se("pointer-events-none block h-4 w-4 rounded-full bg-fg-subtle shadow-lg ring-0 transition-transform","translate-x-0 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));nv.displayName=Zu.displayName;function AC({open:n,onOpenChange:o,job:s,fullLog:a}){const[u,d]=v.useState(!1),p=Rh(s.error_code??null),m=async()=>{const h=[`Job #${s.id}`,`Sync Pair ID: ${s.sync_pair_id}`,`Trigger: ${s.trigger_type}`,`Status: ${s.status}`,`Error Code: ${s.error_code??"unknown"}`,`Error: ${s.error_message??"none"}`,"","--- Full Log ---",a??"(no log available)"].join(` -`);await navigator.clipboard.writeText(h),d(!0),setTimeout(()=>d(!1),2e3)};return l.jsx(Rn,{open:n,onOpenChange:o,children:l.jsxs(dn,{size:"lg",children:[l.jsxs(fn,{children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(ka,{className:"h-5 w-5 text-rose-400"}),l.jsx(pn,{children:"Job Failed"})]}),l.jsxs(mn,{children:["Job #",s.id," finished with status"," ",l.jsx(Bt,{variant:Fa(s.status),label:s.status})]})]}),l.jsxs(Rr,{className:"space-y-4",children:[p&&l.jsxs("div",{className:"rounded-card border border-rose-500/30 bg-rose-500/10 p-4 space-y-1",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(ka,{className:"h-4 w-4 text-rose-400 shrink-0"}),l.jsx("span",{className:"text-sm font-semibold text-rose-300",children:p.title})]}),l.jsx("p",{className:"text-xs text-rose-400/70 pl-6",children:p.hint})]}),s.error_message&&l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("p",{className:"text-xs font-medium text-fg-muted uppercase tracking-wider",children:"Error Message"}),l.jsx("div",{className:"rounded-card border border-border bg-canvas-raised p-3 font-mono text-xs text-rose-300/80 whitespace-pre-wrap break-all max-h-40 overflow-y-auto",children:s.error_message})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:"text-xs font-medium text-fg-muted uppercase tracking-wider",children:"Error Code"}),l.jsx("p",{className:"text-sm font-mono text-fg",children:s.error_code??"—"})]}),l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:"text-xs font-medium text-fg-muted uppercase tracking-wider",children:"Trigger"}),l.jsx("p",{className:"text-sm text-fg capitalize",children:s.trigger_type})]}),s.started_at&&l.jsxs("div",{className:"space-y-1",children:[l.jsxs("p",{className:"text-xs font-medium text-fg-muted uppercase tracking-wider flex items-center gap-1",children:[l.jsx(rh,{className:"h-3 w-3"}),"Started"]}),l.jsx("p",{className:"text-sm text-fg",children:new Date(s.started_at).toLocaleString()})]}),s.finished_at&&l.jsxs("div",{className:"space-y-1",children:[l.jsxs("p",{className:"text-xs font-medium text-fg-muted uppercase tracking-wider flex items-center gap-1",children:[l.jsx(dh,{className:"h-3 w-3"}),"Finished"]}),l.jsx("p",{className:"text-sm text-fg",children:new Date(s.finished_at).toLocaleString()})]})]}),a&&l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("p",{className:"text-xs font-medium text-fg-muted uppercase tracking-wider",children:"Stderr / Error Log"}),l.jsx("div",{className:"rounded-card border border-border bg-canvas-raised p-3 font-mono text-xs text-rose-400/70 whitespace-pre-wrap break-all max-h-48 overflow-y-auto",children:a})]})]}),l.jsxs(hn,{children:[l.jsx(xe,{variant:"secondary",onClick:()=>o(!1),children:"Close"}),l.jsxs(xe,{variant:"secondary",size:"sm",onClick:()=>{const h=document.createElement("a");h.href=`/api/jobs/${s.id}/log/download`,h.download=`job-${s.id}.log`,document.body.appendChild(h),h.click(),document.body.removeChild(h)},children:[l.jsx(za,{className:"h-4 w-4"}),"Full Log"]}),l.jsx(xe,{onClick:m,children:u?l.jsx(l.Fragment,{children:l.jsx("span",{className:"text-emerald-400",children:"Copied"})}):l.jsxs(l.Fragment,{children:[l.jsx(oh,{className:"h-4 w-4"}),"Copy All"]})})]})]})})}function IC(){const{id:n}=Fx(),[o,s]=v.useState(null),[a,u]=v.useState(null),[d,p]=v.useState([]),[m,h]=v.useState([]),[y,w]=v.useState(!0),g=v.useRef(null),k=v.useRef(null),S=Number(n),[C,b]=v.useState(!0),[N,E]=v.useState(!1),[T,_]=v.useState(""),[L,I]=v.useState(!1);v.useEffect(()=>{if(W(),S){B(0);const H=new EventSource(`/api/jobs/${S}/log/stream?job_id=${S}`);k.current=H,H.onmessage=z=>{const te=JSON.parse(z.data);te.type==="log"&&h(K=>[...K,{stream:te.stream,text:te.line}]),te.type==="status"&&s(K=>{if(!K)return K;const X={...K,status:te.status};return te.line&&(X.error_message=te.line),X})}}return()=>{var H;return(H=k.current)==null?void 0:H.close()}},[n]),v.useEffect(()=>{y&&g.current&&g.current.scrollIntoView({behavior:"smooth"})},[m,y]);async function W(){try{const H=await Ie(`/api/jobs/${n}`);s(H);const te=(await Ie("/api/sync-pairs")??[]).find(K=>K.id===H.sync_pair_id);u(te||null)}catch{}finally{b(!1)}}async function B(H){try{const z=await Ie(`/api/jobs/${n}/log?offset=${H}&limit=1000`)??[];H===0&&p(z)}catch{}}async function P(){try{await Ie(`/api/jobs/${n}/cancel`,{method:"POST",body:{reason:T.trim()||void 0}}),Re.success("Job cancelled"),E(!1),_(""),W()}catch(H){Re.error(H.message)}}function ee(){const H=[...d.map(X=>`[${X.timestamp}] [${X.stream}] ${X.content}`),...m.map(X=>`[LIVE] [${X.stream}] ${X.text}`)],z=new Blob([H.join(` -`)],{type:"text/plain"}),te=URL.createObjectURL(z),K=document.createElement("a");K.href=te,K.download=`job-${n}.log`,document.body.appendChild(K),K.click(),document.body.removeChild(K),URL.revokeObjectURL(te)}if(v.useCallback(()=>{const H=[...d.map(z=>`[${z.timestamp}] [${z.stream}] ${z.content}`),...m.map(z=>`[LIVE] [${z.stream}] ${z.text}`)].join(` -`);navigator.clipboard.writeText(H),Re.success("Log copied to clipboard")},[d,m]),C)return l.jsx("div",{className:"flex items-center justify-center min-h-[50vh]",children:l.jsx(Eu,{size:"lg"})});if(!o)return l.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[50vh] gap-3",children:[l.jsx("p",{className:"text-fg-muted",children:"Job not found"}),l.jsx(xe,{variant:"secondary",asChild:!0,children:l.jsxs(zo,{to:"/jobs",children:[l.jsx(ru,{className:"h-4 w-4"}),"Back to Jobs"]})})]});const ie=d.length+m.length,oe=[...d.filter(H=>H.stream==="stderr").map(H=>H.content),...m.filter(H=>H.stream==="stderr").map(H=>H.text)].join(` -`),pe=Rh(o.error_code??null);return l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(xe,{variant:"ghost",size:"sm",asChild:!0,children:l.jsxs(zo,{to:"/jobs",children:[l.jsx(ru,{className:"h-4 w-4"}),"Job History"]})}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("h1",{className:"text-xl font-bold text-fg font-mono",children:["#",o.id]}),l.jsx(Bt,{variant:Fa(o.status),label:$a(o.status)})]})]}),l.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[{label:"Sync Pair",value:(a==null?void 0:a.name)||`Pair ${o.sync_pair_id}`},{label:"Trigger",value:o.trigger_type},{label:"Duration",value:o.started_at?Ph((o.finished_at?new Date(o.finished_at).getTime():Date.now())-new Date(o.started_at).getTime()):"-"},{label:"Started",value:o.started_at?new Date(o.started_at).toLocaleString():"-"}].map(H=>l.jsx($t,{children:l.jsxs("div",{className:"p-4",children:[l.jsx("div",{className:"text-xs font-medium text-fg-muted uppercase tracking-wider mb-1",children:H.label}),l.jsx("div",{className:"text-sm font-semibold text-fg truncate",children:H.value})]})},H.label))}),(o.status==="failed"||o.status==="cancelled"&&o.error_message)&&l.jsx("div",{className:Se("rounded-card border p-4 space-y-2",o.status==="failed"?"border-rose-500/30 bg-rose-500/10":"border-zinc-500/30 bg-zinc-500/10"),children:l.jsxs("div",{className:"flex items-start gap-2",children:[o.status==="failed"?l.jsx(ka,{className:"h-4 w-4 text-rose-400 shrink-0 mt-0.5"}):l.jsx(em,{className:"h-4 w-4 text-zinc-400 shrink-0 mt-0.5"}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[l.jsx("span",{className:Se("text-sm font-semibold",o.status==="failed"?"text-rose-300":"text-zinc-300"),children:(pe==null?void 0:pe.title)??(o.status==="failed"?"Job failed":"Job cancelled")}),o.error_code&&l.jsxs("span",{className:Se("text-xs font-mono",o.status==="failed"?"text-rose-400/60":"text-zinc-400/60"),children:["[",o.error_code,"]"]})]}),(pe==null?void 0:pe.hint)&&l.jsx("p",{className:Se("text-xs mt-0.5",o.status==="failed"?"text-rose-400/70":"text-zinc-400/70"),children:pe.hint}),l.jsx("p",{className:Se("text-xs font-mono mt-1 truncate max-w-2xl",o.status==="failed"?"text-rose-300/80":"text-zinc-300/80"),children:o.error_message})]}),l.jsxs(xe,{variant:"secondary",size:"sm",onClick:()=>I(!0),className:Se("shrink-0 border",o.status==="failed"?"text-rose-300 hover:text-rose-200 border-rose-500/40 hover:border-rose-400/60":"text-zinc-300 hover:text-zinc-200 border-zinc-500/40 hover:border-zinc-400/60"),children:[o.status==="failed"?l.jsx(ka,{className:"h-4 w-4"}):l.jsx(em,{className:"h-4 w-4"}),"View error"]})]})}),["queued","waking_up","running"].includes(o.status)&&l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs(xe,{variant:"danger",size:"sm",onClick:()=>E(!0),children:[l.jsx(ou,{className:"h-4 w-4"}),"Cancel Job"]}),l.jsxs("div",{className:"flex items-center gap-2 text-sm text-fg-muted",children:[l.jsx(nv,{id:"auto-scroll",checked:y,onCheckedChange:w}),l.jsx("label",{htmlFor:"auto-scroll",className:"cursor-pointer",children:"Auto-scroll"})]})]}),l.jsxs($t,{className:"flex flex-col min-h-0",children:[l.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border shrink-0",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(ch,{className:"h-4 w-4 text-fg-subtle"}),l.jsx("span",{className:"text-xs font-semibold text-fg-muted uppercase tracking-wider",children:"Output"}),l.jsxs("span",{className:"text-xs text-fg-subtle",children:[ie," line",ie!==1?"s":""]})]}),l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx(Xs,{text:[...d.map(H=>`[${H.timestamp}] [${H.stream}] ${H.content}`),...m.map(H=>`[LIVE] [${H.stream}] ${H.text}`)].join(` -`),displayText:"Copy log"}),l.jsx(xe,{variant:"ghost",size:"icon-sm",onClick:ee,title:"Download log",children:l.jsx(za,{className:"h-3.5 w-3.5"})})]})]}),l.jsxs("div",{className:"flex-1 overflow-y-auto p-4 font-mono text-xs space-y-0.5 scrollbar-thin min-h-[300px] max-h-[60vh]",children:[d.length===0&&m.length===0?l.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-fg-subtle gap-2",children:[l.jsx(Dw,{className:"h-6 w-6"}),l.jsx("p",{children:"No log output yet"})]}):l.jsxs(l.Fragment,{children:[d.map(H=>l.jsx(DC,{stream:H.stream,content:H.content,timestamp:H.timestamp},H.id)),m.map((H,z)=>l.jsxs("div",{className:Se("flex gap-2",H.stream==="stderr"?"text-rose-400":"text-fg-muted"),children:[l.jsx("span",{className:"text-accent shrink-0",children:"LIVE"}),l.jsx("span",{className:"break-all",children:H.text})]},`live-${z}`))]}),l.jsx("div",{ref:g})]})]}),l.jsx(Rn,{open:N,onOpenChange:E,children:l.jsxs(dn,{size:"sm",children:[l.jsxs(fn,{children:[l.jsx(pn,{children:"Cancel Job"}),l.jsxs(mn,{children:["Are you sure you want to cancel job #",o.id,"? This action cannot be undone."]})]}),l.jsxs("form",{onSubmit:H=>{H.preventDefault(),P()},children:[l.jsx(Rr,{children:l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"cancel-reason",children:"Reason (optional)"}),l.jsx(qa,{id:"cancel-reason",value:T,onChange:H=>_(H.target.value),placeholder:"e.g. wrong path, machine offline...",rows:2,className:"font-mono text-xs"}),l.jsx("p",{className:"text-xs text-fg-subtle",children:"Adding a reason helps track why jobs are cancelled"})]})}),l.jsxs(hn,{children:[l.jsx(xe,{variant:"secondary",type:"button",onClick:()=>{E(!1),_("")},children:"Keep Running"}),l.jsx(xe,{variant:"danger-solid",type:"submit",children:"Cancel Job"})]})]})]})}),l.jsx(AC,{open:L,onOpenChange:I,job:o,fullLog:oe})]})}function DC({stream:n,content:o,timestamp:s}){const a=new Date(s),u=`${a.getHours().toString().padStart(2,"0")}:${a.getMinutes().toString().padStart(2,"0")}:${a.getSeconds().toString().padStart(2,"0")}`;return l.jsxs("div",{className:Se("flex gap-2",n==="stderr"?"text-rose-400":"text-fg-muted"),children:[l.jsx("span",{className:"text-fg-subtle shrink-0",children:u}),l.jsx("span",{className:"break-all",children:o})]})}function zC(){const[n,o]=v.useState(""),[s,a]=v.useState(!0);v.useEffect(()=>{fetch("/api/settings/pubkey",{credentials:"include"}).then(d=>d.ok?d.text():"").then(d=>o(d)).catch(()=>{}).finally(()=>a(!1))},[]);function u(){if(!n)return;const d=new Blob([n],{type:"text/plain"}),p=URL.createObjectURL(d),m=document.createElement("a");m.href=p,m.download="syncserver.pub",document.body.appendChild(m),m.click(),document.body.removeChild(m),URL.revokeObjectURL(p)}return l.jsxs("div",{className:"space-y-6 max-w-2xl",children:[l.jsx(no,{title:"Settings",description:"Server configuration and SSH key management"}),l.jsxs($t,{children:[l.jsx(au,{children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:"rounded-card bg-accent/10 p-1",children:l.jsx(Ca,{className:"h-4 w-4 text-accent"})}),l.jsx(lu,{children:"Server SSH Public Key"})]})}),l.jsxs(jr,{className:"space-y-4",children:[l.jsxs("p",{className:"text-sm text-fg-muted",children:["Add this key to the"," ",l.jsx("code",{className:"bg-surface-raised px-1.5 py-0.5 rounded text-xs text-fg font-mono",children:"~/.ssh/authorized_keys"})," ","file on your remote machines to allow SyncServer to connect."]}),l.jsx("div",{className:"bg-canvas-raised rounded-card p-4 font-mono text-xs text-emerald-400/80 break-all min-h-[4rem]",children:s?l.jsx("span",{className:"text-fg-subtle",children:"Loading..."}):n||l.jsx("span",{className:"text-fg-subtle",children:"No public key available"})}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Xs,{text:n,displayText:"Copy public key"}),n&&l.jsxs(xe,{variant:"secondary",size:"sm",onClick:u,children:[l.jsx(za,{className:"h-3.5 w-3.5"}),"Download .pub"]})]})]})]}),l.jsxs($t,{children:[l.jsx(au,{children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:"rounded-card bg-surface-raised p-1",children:l.jsx(ch,{className:"h-4 w-4 text-fg-muted"})}),l.jsx(lu,{children:"Quick Reference"})]})}),l.jsx(jr,{className:"space-y-4",children:l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{children:[l.jsxs("p",{className:"text-sm text-fg-muted mb-2",children:[l.jsx("span",{className:"font-semibold text-fg",children:"ssh-copy-id:"})," Copy the public key above to a remote machine:"]}),l.jsx("div",{className:"bg-canvas-raised rounded-card p-3 font-mono text-xs text-fg-muted",children:"cat ~/.ssh/id_ed25519.pub | ssh user@host 'cat >> ~/.ssh/authorized_keys'"})]}),l.jsx("div",{children:l.jsxs("p",{className:"text-sm text-fg-muted",children:[l.jsx("span",{className:"font-semibold text-fg",children:"Wake-on-LAN:"})," ","Make sure your target machine BIOS/UEFI has WoL enabled and is connected to the same network layer (L2) as this server."]})})]})})]})]})}function FC(){const[n,o]=v.useState([]),[s,a]=v.useState(null),[u,d]=v.useState(null),[p,m]=v.useState(""),[h,y]=v.useState(""),[w,g]=v.useState(""),[k,S]=v.useState(!1),[C,b]=v.useState(null);v.useEffect(()=>{N()},[]);async function N(){try{o(await Ie("/api/ssh-keys"))}catch{}}async function E(){if(!p.trim()){Re.error("Label is required");return}S(!0);try{await Ie("/api/ssh-keys",{method:"POST",body:{label:p.trim(),generate:!0}}),a(null),m(""),Re.success("SSH key pair generated"),N()}catch(I){Re.error(I.message)}finally{S(!1)}}async function T(){if(!h.trim()){Re.error("Label is required");return}if(!w.trim()){Re.error("Public key is required");return}S(!0);try{await Ie("/api/ssh-keys",{method:"POST",body:{label:h.trim(),generate:!1,public_key:w.trim()}}),a(null),y(""),g(""),Re.success("SSH key imported"),N()}catch(I){Re.error(I.message)}finally{S(!1)}}async function _(){if(u!==null)try{await Ie(`/api/ssh-keys/${u}`,{method:"DELETE"}),Re.success("SSH key deleted"),d(null),N()}catch(I){Re.error(I.message)}}async function L(I){try{const W=await fetch(`/api/ssh-keys/${I}/private`,{credentials:"include"});if(!W.ok){const ie=await W.json().catch(()=>({error:"Failed"}));Re.error(ie.error);return}const B=await W.blob(),P=URL.createObjectURL(B),ee=document.createElement("a");ee.href=P,ee.download=`ssh-key-${I}.key`,document.body.appendChild(ee),ee.click(),document.body.removeChild(ee),URL.revokeObjectURL(P),b(I),Re.success("Private key downloaded"),setTimeout(()=>b(null),3e3)}catch(W){Re.error(W.message)}}return l.jsxs("div",{className:"space-y-6",children:[l.jsx(no,{title:"SSH Keys",description:"Manage SSH key pairs for authenticating with remote machines",actions:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs(xe,{variant:"secondary",size:"sm",onClick:()=>a("import"),children:[l.jsx(Bc,{className:"h-4 w-4"}),"Import Public Key"]}),l.jsxs(xe,{size:"sm",onClick:()=>a("generate"),children:[l.jsx(Fo,{className:"h-4 w-4"}),"Generate New"]})]})}),n.length===0?l.jsx($t,{children:l.jsx(jr,{className:"p-0",children:l.jsx(Yo,{icon:l.jsx(Ca,{className:"h-5 w-5"}),title:"No SSH keys",description:"Generate a key pair or import a public key to authenticate with remote machines",action:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs(xe,{variant:"secondary",size:"sm",onClick:()=>a("import"),children:[l.jsx(Bc,{className:"h-4 w-4"}),"Import"]}),l.jsxs(xe,{size:"sm",onClick:()=>a("generate"),children:[l.jsx(Fo,{className:"h-4 w-4"}),"Generate"]})]})})})}):l.jsx("div",{className:"space-y-3",children:n.map(I=>l.jsx($t,{children:l.jsx(jr,{children:l.jsxs("div",{className:"flex items-start justify-between gap-4",children:[l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[l.jsx("h3",{className:"text-sm font-semibold text-fg truncate",children:I.label}),I.in_use&&l.jsx(Bt,{variant:"success",label:"In Use"}),!I.has_private_key&&l.jsx(Bt,{variant:"neutral",label:"Imported Only"})]}),l.jsxs("div",{className:"flex items-center gap-1.5 mb-3 text-xs text-fg-subtle",children:[l.jsx(xw,{className:"h-3.5 w-3.5"}),l.jsx("span",{className:"font-mono truncate",children:I.fingerprint})]}),l.jsx("div",{className:"bg-canvas-raised rounded-card p-3 font-mono text-xs text-emerald-400/80 break-all max-w-2xl",children:I.public_key})]}),l.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[l.jsx(Xs,{text:I.public_key,displayText:"Copy pub"}),I.has_private_key&&l.jsxs(xe,{variant:"secondary",size:"sm",onClick:()=>L(I.id),loading:C===I.id,children:[l.jsx(za,{className:"h-3.5 w-3.5"}),C===I.id?"Done":"Private"]}),l.jsx(xe,{variant:"danger",size:"icon-sm",onClick:()=>d(I.id),children:l.jsx(Cu,{className:"h-3.5 w-3.5"})})]})]})})},I.id))}),l.jsx(Rn,{open:s==="generate",onOpenChange:I=>!I&&a(null),children:l.jsxs(dn,{size:"md",children:[l.jsxs(fn,{children:[l.jsx(pn,{children:"Generate SSH Key Pair"}),l.jsx(mn,{children:"Generate a new Ed25519 key pair. The private key will be downloaded immediately and the public key stored on the server."})]}),l.jsx(Rr,{className:"space-y-4",children:l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"gen-label",required:!0,children:"Label"}),l.jsx(ht,{id:"gen-label",placeholder:"backup-nas",value:p,onChange:I=>m(I.target.value)})]})}),l.jsxs(hn,{children:[l.jsx(xe,{variant:"secondary",onClick:()=>a(null),children:"Cancel"}),l.jsxs(xe,{onClick:E,loading:k,children:[l.jsx(Ca,{className:"h-4 w-4"}),"Generate"]})]})]})}),l.jsx(Rn,{open:s==="import",onOpenChange:I=>!I&&a(null),children:l.jsxs(dn,{size:"md",children:[l.jsxs(fn,{children:[l.jsx(pn,{children:"Import Public Key"}),l.jsx(mn,{children:"Import an existing public key. Only the public key will be stored — you must have the corresponding private key on this server."})]}),l.jsxs(Rr,{className:"space-y-4",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"import-label",required:!0,children:"Label"}),l.jsx(ht,{id:"import-label",placeholder:"work-server",value:h,onChange:I=>y(I.target.value)})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"import-pubkey",required:!0,children:"Public Key"}),l.jsx(qa,{id:"import-pubkey",placeholder:"ssh-ed25519 AAAA...",value:w,onChange:I=>g(I.target.value),className:"font-mono text-xs h-24"})]})]}),l.jsxs(hn,{children:[l.jsx(xe,{variant:"secondary",onClick:()=>a(null),children:"Cancel"}),l.jsxs(xe,{onClick:T,loading:k,children:[l.jsx(Bc,{className:"h-4 w-4"}),"Import"]})]})]})}),l.jsx(Rn,{open:u!==null,onOpenChange:I=>!I&&d(null),children:l.jsxs(dn,{size:"sm",children:[l.jsxs(fn,{children:[l.jsx(pn,{children:"Delete SSH Key"}),l.jsx(mn,{children:"Are you sure you want to delete this SSH key? Machines using it will fall back to the server key."})]}),l.jsxs(hn,{children:[l.jsx(xe,{variant:"secondary",onClick:()=>d(null),children:"Cancel"}),l.jsx(xe,{variant:"danger-solid",onClick:_,children:"Delete"})]})]})})]})}const Bm=[{to:"/",label:"Dashboard",icon:Nw},{to:"/machines",label:"Machines",icon:ku},{to:"/sync-pairs",label:"Sync Pairs",icon:su},{to:"/jobs",label:"Jobs",icon:ih},{to:"/ssh-keys",label:"SSH Keys",icon:Ca},{to:"/settings",label:"Settings",icon:$w}];function $C({children:n}){const[o,s]=v.useState(null);return v.useEffect(()=>{fetch("/api/auth/me",{credentials:"include"}).then(a=>s(a.ok)).catch(()=>s(!1))},[]),o===null?l.jsx("div",{className:"flex h-screen items-center justify-center bg-canvas",children:l.jsx(Eu,{size:"lg"})}):o?n:l.jsx(Zm,{to:"/login"})}function BC(){const[n,o]=v.useState(!1),[s,a]=v.useState(null),u=Ia();v.useEffect(()=>{Ie("/api/settings/info").then(p=>a(p.version)).catch(()=>{})},[]);const d=async()=>{try{await fetch("/api/auth/logout",{method:"POST",credentials:"include"})}catch{}localStorage.removeItem("auth"),u("/login")};return l.jsx("header",{className:"sticky top-0 z-50 bg-surface border-b border-border",children:l.jsxs("div",{className:"max-w-7xl mx-auto px-4",children:[l.jsxs("div",{className:"flex items-center h-14 gap-6",children:[l.jsxs("a",{href:"/",className:"flex items-center gap-2.5 text-fg font-bold text-base hover:text-accent transition-colors shrink-0",children:[l.jsx("div",{className:"rounded-card bg-accent/10 p-1",children:l.jsx(sh,{className:"h-4 w-4 text-accent"})}),l.jsx("span",{className:"hidden sm:inline",children:"SyncServer"})]}),s&&l.jsxs("span",{className:"hidden lg:inline-flex items-center rounded-card bg-surface-raised px-2 py-0.5 text-xs font-mono text-fg-muted border border-border",children:["v",s]}),l.jsx("nav",{className:"hidden md:flex items-center gap-0.5 flex-1",children:Bm.map(p=>{const m=p.icon;return l.jsxs(Qp,{to:p.to,end:p.to==="/",className:({isActive:h})=>Se("flex items-center gap-1.5 px-3 py-1.5 rounded-card text-sm font-medium transition-all duration-150",h?"bg-surface-raised text-fg":"text-fg-muted hover:text-fg hover:bg-surface-raised"),children:[l.jsx(m,{className:"h-3.5 w-3.5"}),p.label]},p.to)})}),l.jsxs("div",{className:"flex items-center gap-2 ml-auto",children:[l.jsx(xe,{variant:"ghost",size:"icon-sm",onClick:d,className:"text-fg-muted hover:text-fg hidden sm:flex",title:"Logout",children:l.jsx(nm,{className:"h-4 w-4"})}),l.jsx(xe,{variant:"ghost",size:"icon",onClick:()=>o(p=>!p),className:"md:hidden text-fg-muted",children:n?l.jsx(uh,{className:"h-5 w-5"}):l.jsx(Rw,{className:"h-5 w-5"})})]})]}),n&&l.jsxs("nav",{className:"md:hidden pb-3 flex flex-col gap-0.5 animate-slide-up",children:[Bm.map(p=>{const m=p.icon;return l.jsxs(Qp,{to:p.to,end:p.to==="/",onClick:()=>o(!1),className:({isActive:h})=>Se("flex items-center gap-2 px-3 py-2 rounded-card text-sm font-medium transition-all",h?"bg-surface-raised text-fg":"text-fg-muted hover:text-fg hover:bg-surface-raised"),children:[l.jsx(m,{className:"h-4 w-4"}),p.label]},p.to)}),l.jsxs("button",{onClick:()=>{o(!1),d()},className:"flex items-center gap-2 px-3 py-2 rounded-card text-sm font-medium text-fg-muted hover:text-fg hover:bg-surface-raised mt-1 border-t border-border pt-3",children:[l.jsx(nm,{className:"h-4 w-4"}),"Logout"]})]})]})})}function UC(){return l.jsxs("div",{className:"min-h-screen bg-canvas",children:[l.jsx("a",{href:"#main-content",className:"sr-only focus:not-sr-only focus:fixed focus:top-4 focus:left-4 focus:z-[100] focus:px-4 focus:py-2 focus:rounded-card focus:bg-surface-raised focus:text-fg focus:outline-none focus:ring-2 focus:ring-accent/40",children:"Skip to content"}),l.jsx(BC,{}),l.jsx("main",{id:"main-content",className:"max-w-7xl mx-auto px-4 py-6",children:l.jsx(e0,{})}),l.jsx(U0,{position:"bottom-right",toastOptions:{classNames:{error:"bg-surface-raised border border-rose-500/30 text-fg",success:"bg-surface-raised border border-emerald-500/30 text-fg",warning:"bg-surface-raised border border-amber-500/30 text-fg",info:"bg-surface-raised border border-sky-500/30 text-fg"}},theme:"dark",richColors:!0,closeButton:!0})]})}function VC(){return l.jsx(u0,{children:l.jsx(q1,{children:l.jsxs(n0,{children:[l.jsx(cn,{path:"/login",element:l.jsx(nb,{})}),l.jsxs(cn,{element:l.jsx($C,{children:l.jsx(UC,{})}),children:[l.jsx(cn,{path:"/",element:l.jsx(lb,{})}),l.jsx(cn,{path:"/machines",element:l.jsx(jC,{})}),l.jsx(cn,{path:"/sync-pairs",element:l.jsx(_C,{})}),l.jsx(cn,{path:"/jobs",element:l.jsx(PC,{})}),l.jsx(cn,{path:"/jobs/:id",element:l.jsx(IC,{})}),l.jsx(cn,{path:"/ssh-keys",element:l.jsx(FC,{})}),l.jsx(cn,{path:"/settings",element:l.jsx(zC,{})})]}),l.jsx(cn,{path:"*",element:l.jsx(Zm,{to:"/"})})]})})})}ax.createRoot(document.getElementById("root")).render(l.jsx(re.StrictMode,{children:l.jsx(VC,{})})); diff --git a/internal/webui/dist/assets/index-BA6Z4BXQ.css b/internal/webui/dist/assets/index-BA6Z4BXQ.css deleted file mode 100644 index fb5e345..0000000 --- a/internal/webui/dist/assets/index-BA6Z4BXQ.css +++ /dev/null @@ -1 +0,0 @@ -@import"https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap";*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:IBM Plex Sans,ui-sans-serif,system-ui,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:JetBrains Mono,ui-monospace,SFMono-Regular,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}*,*:before,*:after{box-sizing:border-box}html{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;scroll-behavior:smooth}body{--tw-bg-opacity: 1;background-color:rgb(8 8 8 / var(--tw-bg-opacity, 1));font-family:IBM Plex Sans,ui-sans-serif,system-ui,sans-serif;--tw-text-opacity: 1;color:rgb(245 245 245 / var(--tw-text-opacity, 1));min-height:100vh}::-moz-selection{background-color:#2dd4bf4d;--tw-text-opacity: 1;color:rgb(245 245 245 / var(--tw-text-opacity, 1))}::selection{background-color:#2dd4bf4d;--tw-text-opacity: 1;color:rgb(245 245 245 / var(--tw-text-opacity, 1))}:focus-visible{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-color: rgb(45 212 191 / .4);--tw-ring-offset-width: 2px;--tw-ring-offset-color: #080808}input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{display:none}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.left-\[50\%\]{left:50%}.right-2{right:.5rem}.right-3{right:.75rem}.right-4{right:1rem}.top-0{top:0}.top-1\/2{top:50%}.top-4{top:1rem}.top-\[50\%\]{top:50%}.z-50{z-index:50}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-0{margin-bottom:0}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-auto{margin-left:auto}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-2{height:.5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-full{height:100%}.h-screen{height:100vh}.max-h-40{max-height:10rem}.max-h-48{max-height:12rem}.max-h-96{max-height:24rem}.max-h-\[60vh\]{max-height:60vh}.max-h-\[90vh\]{max-height:90vh}.min-h-0{min-height:0px}.min-h-\[300px\]{min-height:300px}.min-h-\[4rem\]{min-height:4rem}.min-h-\[50vh\]{min-height:50vh}.min-h-\[80px\]{min-height:80px}.min-h-screen{min-height:100vh}.w-10{width:2.5rem}.w-12{width:3rem}.w-2{width:.5rem}.w-20{width:5rem}.w-24{width:6rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-auto{width:auto}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-\[140px\]{min-width:140px}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.max-w-2xl{max-width:42rem}.max-w-7xl{max-width:80rem}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.caption-bottom{caption-side:bottom}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.animate-fade-in{animation:fadeIn .2s ease-out}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes scaleIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}.animate-scale-in{animation:scaleIn .2s ease-out}@keyframes slideUp{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.animate-slide-up{animation:slideUp .2s ease-out}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-card{border-radius:.5rem}.rounded-full{border-radius:9999px}.rounded-sm{border-radius:.125rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-accent\/20{border-color:#2dd4bf33}.border-amber-500\/30{border-color:#f59e0b4d}.border-border{--tw-border-opacity: 1;border-color:rgb(38 38 38 / var(--tw-border-opacity, 1))}.border-border\/50{border-color:#26262680}.border-emerald-500\/30{border-color:#10b9814d}.border-rose-500\/30{border-color:#f43f5e4d}.border-rose-500\/40{border-color:#f43f5e66}.border-rose-500\/50{border-color:#f43f5e80}.border-sky-500\/30{border-color:#0ea5e94d}.border-transparent{border-color:transparent}.border-zinc-500\/30{border-color:#71717a4d}.border-zinc-500\/40{border-color:#71717a66}.bg-accent{--tw-bg-opacity: 1;background-color:rgb(45 212 191 / var(--tw-bg-opacity, 1))}.bg-accent\/10{background-color:#2dd4bf1a}.bg-accent\/5{background-color:#2dd4bf0d}.bg-amber-400{--tw-bg-opacity: 1;background-color:rgb(251 191 36 / var(--tw-bg-opacity, 1))}.bg-amber-500\/10{background-color:#f59e0b1a}.bg-amber-500\/15{background-color:#f59e0b26}.bg-black\/60{background-color:#0009}.bg-canvas{--tw-bg-opacity: 1;background-color:rgb(8 8 8 / var(--tw-bg-opacity, 1))}.bg-canvas-raised{--tw-bg-opacity: 1;background-color:rgb(18 18 18 / var(--tw-bg-opacity, 1))}.bg-emerald-500\/10{background-color:#10b9811a}.bg-emerald-500\/15{background-color:#10b98126}.bg-fg-subtle{--tw-bg-opacity: 1;background-color:rgb(115 115 115 / var(--tw-bg-opacity, 1))}.bg-rose-500{--tw-bg-opacity: 1;background-color:rgb(244 63 94 / var(--tw-bg-opacity, 1))}.bg-rose-500\/10{background-color:#f43f5e1a}.bg-rose-500\/15{background-color:#f43f5e26}.bg-sky-500\/10{background-color:#0ea5e91a}.bg-sky-500\/15{background-color:#0ea5e926}.bg-surface{--tw-bg-opacity: 1;background-color:rgb(15 15 15 / var(--tw-bg-opacity, 1))}.bg-surface-raised{--tw-bg-opacity: 1;background-color:rgb(26 26 26 / var(--tw-bg-opacity, 1))}.bg-zinc-500\/10{background-color:#71717a1a}.bg-zinc-500\/15{background-color:#71717a26}.p-0{padding:0}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-8{padding:2rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pb-0{padding-bottom:0}.pb-3{padding-bottom:.75rem}.pl-6{padding-left:1.5rem}.pr-10{padding-right:2.5rem}.pt-0{padding-top:0}.pt-3{padding-top:.75rem}.text-left{text-align:left}.text-center{text-align:center}.align-middle{vertical-align:middle}.font-mono{font-family:JetBrains Mono,ui-monospace,SFMono-Regular,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.tracking-wider{letter-spacing:.05em}.text-accent{--tw-text-opacity: 1;color:rgb(45 212 191 / var(--tw-text-opacity, 1))}.text-accent-foreground{--tw-text-opacity: 1;color:rgb(15 15 15 / var(--tw-text-opacity, 1))}.text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.text-emerald-400{--tw-text-opacity: 1;color:rgb(52 211 153 / var(--tw-text-opacity, 1))}.text-emerald-400\/80{color:#34d399cc}.text-fg{--tw-text-opacity: 1;color:rgb(245 245 245 / var(--tw-text-opacity, 1))}.text-fg-muted{--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity, 1))}.text-fg-subtle{--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity, 1))}.text-rose-300{--tw-text-opacity: 1;color:rgb(253 164 175 / var(--tw-text-opacity, 1))}.text-rose-300\/80{color:#fda4afcc}.text-rose-400{--tw-text-opacity: 1;color:rgb(251 113 133 / var(--tw-text-opacity, 1))}.text-rose-400\/60{color:#fb718599}.text-rose-400\/70{color:#fb7185b3}.text-sky-400{--tw-text-opacity: 1;color:rgb(56 189 248 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-zinc-300{--tw-text-opacity: 1;color:rgb(212 212 216 / var(--tw-text-opacity, 1))}.text-zinc-300\/80{color:#d4d4d8cc}.text-zinc-400{--tw-text-opacity: 1;color:rgb(161 161 170 / var(--tw-text-opacity, 1))}.text-zinc-400\/60{color:#a1a1aa99}.text-zinc-400\/70{color:#a1a1aab3}.underline-offset-4{text-underline-offset:4px}.accent-accent{accent-color:#2dd4bf}.opacity-25{opacity:.25}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-\[0\.03\]{opacity:.03}.shadow-card{--tw-shadow: 0 0 0 1px rgba(38, 38, 38, 1), 0 2px 8px rgba(0, 0, 0, .4);--tw-shadow-colored: 0 0 0 1px var(--tw-shadow-color), 0 2px 8px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.scrollbar-thin{scrollbar-width:thin;scrollbar-color:#3f3f46 transparent}.scrollbar-thin::-webkit-scrollbar{width:6px;height:6px}.scrollbar-thin::-webkit-scrollbar-track{background:transparent}.scrollbar-thin::-webkit-scrollbar-thumb{background-color:#3f3f46;border-radius:3px}.scrollbar-thin::-webkit-scrollbar-thumb:hover{background-color:#52525b}.placeholder\:text-fg-subtle::-moz-placeholder{--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity, 1))}.placeholder\:text-fg-subtle::placeholder{--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity, 1))}.hover\:border-border\/80:hover{border-color:#262626cc}.hover\:border-rose-400\/60:hover{border-color:#fb718599}.hover\:border-rose-500\/50:hover{border-color:#f43f5e80}.hover\:border-zinc-400\/60:hover{border-color:#a1a1aa99}.hover\:bg-accent-hover:hover{--tw-bg-opacity: 1;background-color:rgb(94 234 212 / var(--tw-bg-opacity, 1))}.hover\:bg-emerald-500\/10:hover{background-color:#10b9811a}.hover\:bg-rose-500\/10:hover{background-color:#f43f5e1a}.hover\:bg-rose-500\/25:hover{background-color:#f43f5e40}.hover\:bg-rose-600:hover{--tw-bg-opacity: 1;background-color:rgb(225 29 72 / var(--tw-bg-opacity, 1))}.hover\:bg-surface-hover:hover,.hover\:bg-surface-raised:hover{--tw-bg-opacity: 1;background-color:rgb(26 26 26 / var(--tw-bg-opacity, 1))}.hover\:bg-surface-raised\/50:hover{background-color:#1a1a1a80}.hover\:text-accent:hover{--tw-text-opacity: 1;color:rgb(45 212 191 / var(--tw-text-opacity, 1))}.hover\:text-accent-hover:hover{--tw-text-opacity: 1;color:rgb(94 234 212 / var(--tw-text-opacity, 1))}.hover\:text-emerald-300:hover{--tw-text-opacity: 1;color:rgb(110 231 183 / var(--tw-text-opacity, 1))}.hover\:text-fg:hover{--tw-text-opacity: 1;color:rgb(245 245 245 / var(--tw-text-opacity, 1))}.hover\:text-fg-muted:hover{--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity, 1))}.hover\:text-rose-200:hover{--tw-text-opacity: 1;color:rgb(254 205 211 / var(--tw-text-opacity, 1))}.hover\:text-rose-300:hover{--tw-text-opacity: 1;color:rgb(253 164 175 / var(--tw-text-opacity, 1))}.hover\:text-zinc-200:hover{--tw-text-opacity: 1;color:rgb(228 228 231 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-card-hover:hover{--tw-shadow: 0 0 0 1px rgba(45, 212, 191, .3), 0 4px 16px rgba(0, 0, 0, .5);--tw-shadow-colored: 0 0 0 1px var(--tw-shadow-color), 0 4px 16px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-glow:hover{--tw-shadow: 0 0 20px rgba(45, 212, 191, .15);--tw-shadow-colored: 0 0 20px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-glow-error:hover{--tw-shadow: 0 0 20px rgba(244, 63, 94, .15);--tw-shadow-colored: 0 0 20px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\:not-sr-only:focus{position:static;width:auto;height:auto;padding:0;margin:0;overflow:visible;clip:auto;white-space:normal}.focus\:fixed:focus{position:fixed}.focus\:left-4:focus{left:1rem}.focus\:top-4:focus{top:1rem}.focus\:z-\[100\]:focus{z-index:100}.focus\:rounded-card:focus{border-radius:.5rem}.focus\:border-accent\/50:focus{border-color:#2dd4bf80}.focus\:border-rose-500\/50:focus{border-color:#f43f5e80}.focus\:bg-surface-raised:focus{--tw-bg-opacity: 1;background-color:rgb(26 26 26 / var(--tw-bg-opacity, 1))}.focus\:px-4:focus{padding-left:1rem;padding-right:1rem}.focus\:py-2:focus{padding-top:.5rem;padding-bottom:.5rem}.focus\:text-fg:focus{--tw-text-opacity: 1;color:rgb(245 245 245 / var(--tw-text-opacity, 1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-accent\/30:focus{--tw-ring-color: rgb(45 212 191 / .3)}.focus\:ring-accent\/40:focus{--tw-ring-color: rgb(45 212 191 / .4)}.focus\:ring-rose-500\/30:focus{--tw-ring-color: rgb(244 63 94 / .3)}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus\:ring-offset-surface:focus{--tw-ring-offset-color: #0f0f0f}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-accent\/40:focus-visible{--tw-ring-color: rgb(45 212 191 / .4)}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.focus-visible\:ring-offset-canvas:focus-visible{--tw-ring-offset-color: #080808}.active\:scale-\[0\.98\]:active{--tw-scale-x: .98;--tw-scale-y: .98;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=checked\]\:translate-x-4[data-state=checked]{--tw-translate-x: 1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked]{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.data-\[state\=open\]\:animate-fade-in[data-state=open]{animation:fadeIn .2s ease-out}.data-\[state\=unchecked\]\:border-border[data-state=unchecked]{--tw-border-opacity: 1;border-color:rgb(38 38 38 / var(--tw-border-opacity, 1))}.data-\[state\=checked\]\:bg-accent[data-state=checked]{--tw-bg-opacity: 1;background-color:rgb(45 212 191 / var(--tw-bg-opacity, 1))}.data-\[state\=unchecked\]\:bg-surface-raised[data-state=unchecked]{--tw-bg-opacity: 1;background-color:rgb(26 26 26 / var(--tw-bg-opacity, 1))}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}@media(min-width:640px){.sm\:mt-0{margin-top:0}.sm\:inline{display:inline}.sm\:flex{display:flex}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}}@media(min-width:768px){.md\:flex{display:flex}.md\:hidden{display:none}}@media(min-width:1024px){.lg\:inline-flex{display:inline-flex}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>span\]\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px} diff --git a/internal/webui/dist/assets/index-BCf_AnPS.js b/internal/webui/dist/assets/index-BCf_AnPS.js deleted file mode 100644 index e26429f..0000000 --- a/internal/webui/dist/assets/index-BCf_AnPS.js +++ /dev/null @@ -1,335 +0,0 @@ -var Xy=Object.defineProperty;var qy=(n,o,s)=>o in n?Xy(n,o,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[o]=s;var Mp=(n,o,s)=>qy(n,typeof o!="symbol"?o+"":o,s);function Jy(n,o){for(var s=0;sa[u]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))a(u);new MutationObserver(u=>{for(const d of u)if(d.type==="childList")for(const p of d.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&a(p)}).observe(document,{childList:!0,subtree:!0});function s(u){const d={};return u.integrity&&(d.integrity=u.integrity),u.referrerPolicy&&(d.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?d.credentials="include":u.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function a(u){if(u.ep)return;u.ep=!0;const d=s(u);fetch(u.href,d)}})();function yu(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Lc={exports:{}},Ls={},Ac={exports:{}},Pe={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Op;function Zy(){if(Op)return Pe;Op=1;var n=Symbol.for("react.element"),o=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),d=Symbol.for("react.provider"),p=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),g=Symbol.iterator;function k(O){return O===null||typeof O!="object"?null:(O=g&&O[g]||O["@@iterator"],typeof O=="function"?O:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,S={};function C(O,V,q){this.props=O,this.context=V,this.refs=S,this.updater=q||b}C.prototype.isReactComponent={},C.prototype.setState=function(O,V){if(typeof O!="object"&&typeof O!="function"&&O!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,O,V,"setState")},C.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function E(){}E.prototype=C.prototype;function T(O,V,q){this.props=O,this.context=V,this.refs=S,this.updater=q||b}var _=T.prototype=new E;_.constructor=T,j(_,C.prototype),_.isPureReactComponent=!0;var A=Array.isArray,D=Object.prototype.hasOwnProperty,L={current:null},F={key:!0,ref:!0,__self:!0,__source:!0};function P(O,V,q){var ie,re={},ce=null,ne=null;if(V!=null)for(ie in V.ref!==void 0&&(ne=V.ref),V.key!==void 0&&(ce=""+V.key),V)D.call(V,ie)&&!F.hasOwnProperty(ie)&&(re[ie]=V[ie]);var ee=arguments.length-2;if(ee===1)re.children=q;else if(1>>1,V=U[O];if(0>>1;Ou(re,$))ceu(ne,re)?(U[O]=ne,U[ce]=$,O=ce):(U[O]=re,U[ie]=$,O=ie);else if(ceu(ne,$))U[O]=ne,U[ce]=$,O=ce;else break e}}return Q}function u(U,Q){var $=U.sortIndex-Q.sortIndex;return $!==0?$:U.id-Q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var p=Date,m=p.now();n.unstable_now=function(){return p.now()-m}}var h=[],y=[],w=1,g=null,k=3,b=!1,j=!1,S=!1,C=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(U){for(var Q=s(y);Q!==null;){if(Q.callback===null)a(y);else if(Q.startTime<=U)a(y),Q.sortIndex=Q.expirationTime,o(h,Q);else break;Q=s(y)}}function A(U){if(S=!1,_(U),!j)if(s(h)!==null)j=!0,Y(D);else{var Q=s(y);Q!==null&&Z(A,Q.startTime-U)}}function D(U,Q){j=!1,S&&(S=!1,E(P),P=-1),b=!0;var $=k;try{for(_(Q),g=s(h);g!==null&&(!(g.expirationTime>Q)||U&&!oe());){var O=g.callback;if(typeof O=="function"){g.callback=null,k=g.priorityLevel;var V=O(g.expirationTime<=Q);Q=n.unstable_now(),typeof V=="function"?g.callback=V:g===s(h)&&a(h),_(Q)}else a(h);g=s(h)}if(g!==null)var q=!0;else{var ie=s(y);ie!==null&&Z(A,ie.startTime-Q),q=!1}return q}finally{g=null,k=$,b=!1}}var L=!1,F=null,P=-1,X=5,se=-1;function oe(){return!(n.unstable_now()-seU||125O?(U.sortIndex=$,o(y,U),s(h)===null&&U===s(y)&&(S?(E(P),P=-1):S=!0,Z(A,$-O))):(U.sortIndex=V,o(h,U),j||b||(j=!0,Y(D))),U},n.unstable_shouldYield=oe,n.unstable_wrapCallback=function(U){var Q=k;return function(){var $=k;k=Q;try{return U.apply(this,arguments)}finally{k=$}}}})(zc)),zc}var zp;function rx(){return zp||(zp=1,Dc.exports=nx()),Dc.exports}/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Fp;function ox(){if(Fp)return Tt;Fp=1;var n=xu(),o=rx();function s(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,y=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,w={},g={};function k(e){return h.call(g,e)?!0:h.call(w,e)?!1:y.test(e)?g[e]=!0:(w[e]=!0,!1)}function b(e,t,r,i){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return i?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function j(e,t,r,i){if(t===null||typeof t>"u"||b(e,t,r,i))return!0;if(i)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function S(e,t,r,i,c,f,x){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=i,this.attributeNamespace=c,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=f,this.removeEmptyString=x}var C={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){C[e]=new S(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];C[t]=new S(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){C[e]=new S(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){C[e]=new S(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){C[e]=new S(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){C[e]=new S(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){C[e]=new S(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){C[e]=new S(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){C[e]=new S(e,5,!1,e.toLowerCase(),null,!1,!1)});var E=/[\-:]([a-z])/g;function T(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(E,T);C[t]=new S(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(E,T);C[t]=new S(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(E,T);C[t]=new S(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){C[e]=new S(e,1,!1,e.toLowerCase(),null,!1,!1)}),C.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){C[e]=new S(e,1,!1,e.toLowerCase(),null,!0,!0)});function _(e,t,r,i){var c=C.hasOwnProperty(t)?C[t]:null;(c!==null?c.type!==0:i||!(2N||c[x]!==f[N]){var R=` -`+c[x].replace(" at new "," at ");return e.displayName&&R.includes("")&&(R=R.replace("",e.displayName)),R}while(1<=x&&0<=N);break}}}finally{q=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?V(e):""}function re(e){switch(e.tag){case 5:return V(e.type);case 16:return V("Lazy");case 13:return V("Suspense");case 19:return V("SuspenseList");case 0:case 2:case 15:return e=ie(e.type,!1),e;case 11:return e=ie(e.type.render,!1),e;case 1:return e=ie(e.type,!0),e;default:return""}}function ce(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case F:return"Fragment";case L:return"Portal";case X:return"Profiler";case P:return"StrictMode";case W:return"Suspense";case le:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case oe:return(e.displayName||"Context")+".Consumer";case se:return(e._context.displayName||"Context")+".Provider";case he:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ve:return t=e.displayName||null,t!==null?t:ce(e.type)||"Memo";case Y:t=e._payload,e=e._init;try{return ce(e(t))}catch{}}return null}function ne(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ce(t);case 8:return t===P?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ee(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ue(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ke(e){var t=ue(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var c=r.get,f=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(x){i=""+x,f.call(this,x)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return i},setValue:function(x){i=""+x},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ne(e){e._valueTracker||(e._valueTracker=ke(e))}function Ee(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),i="";return e&&(i=ue(e)?e.checked?"true":"false":e.value),e=i,e!==r?(t.setValue(e),!0):!1}function qe(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function We(e,t){var r=t.checked;return $({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Jt(e,t){var r=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;r=ee(t.value!=null?t.value:r),e._wrapperState={initialChecked:i,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Zt(e,t){t=t.checked,t!=null&&_(e,"checked",t,!1)}function bt(e,t){Zt(e,t);var r=ee(t.value),i=t.type;if(r!=null)i==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?kt(e,t.type,r):t.hasOwnProperty("defaultValue")&&kt(e,t.type,ee(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Or(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!(i!=="submit"&&i!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function kt(e,t,r){(t!=="number"||qe(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Ut=Array.isArray;function Xn(e,t,r,i){if(e=e.options,t){t={};for(var c=0;c"+t.valueOf().toString()+"",t=Ar.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Vt(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var qn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Jn=["Webkit","ms","Moz","O"];Object.keys(qn).forEach(function(e){Jn.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),qn[t]=qn[e]})});function Js(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||qn.hasOwnProperty(e)&&qn[e]?(""+t).trim():t+"px"}function Zs(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var i=r.indexOf("--")===0,c=Js(r,t[r],i);r==="float"&&(r="cssFloat"),i?e.setProperty(r,c):e[r]=c}}var ei=$({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function so(e,t){if(t){if(ei[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(s(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(s(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(s(61))}if(t.style!=null&&typeof t.style!="object")throw Error(s(62))}}function qo(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ir=null;function Wt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Jo=null,Zn=null,On=null;function Zo(e){if(e=xs(e)){if(typeof Jo!="function")throw Error(s(280));var t=e.stateNode;t&&(t=Si(t),Jo(e.stateNode,e.type,t))}}function je(e){Zn?On?On.push(e):On=[e]:Zn=e}function Je(){if(Zn){var e=Zn,t=On;if(On=Zn=null,Zo(e),t)for(e=0;e>>=0,e===0?32:31-(fv(e)/pv|0)|0}var ri=64,oi=4194304;function ts(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function si(e,t){var r=e.pendingLanes;if(r===0)return 0;var i=0,c=e.suspendedLanes,f=e.pingedLanes,x=r&268435455;if(x!==0){var N=x&~c;N!==0?i=ts(N):(f&=x,f!==0&&(i=ts(f)))}else x=r&~c,x!==0?i=ts(x):f!==0&&(i=ts(f));if(i===0)return 0;if(t!==0&&t!==i&&(t&c)===0&&(c=i&-i,f=t&-t,c>=f||c===16&&(f&4194240)!==0))return t;if((i&4)!==0&&(i|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=i;0r;r++)t.push(e);return t}function ns(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-en(t),e[t]=r}function vv(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var i=e.eventTimes;for(e=e.expirationTimes;0=us),Cd=" ",Nd=!1;function jd(e,t){switch(e){case"keyup":return Hv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ed(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var lo=!1;function Yv(e,t){switch(e){case"compositionend":return Ed(t);case"keypress":return t.which!==32?null:(Nd=!0,Cd);case"textInput":return e=t.data,e===Cd&&Nd?null:e;default:return null}}function Gv(e,t){if(lo)return e==="compositionend"||!ml&&jd(e,t)?(e=yd(),ui=ll=ar=null,lo=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=i}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Ld(r)}}function Id(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Id(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Dd(){for(var e=window,t=qe();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=qe(e.document)}return t}function vl(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function ry(e){var t=Dd(),r=e.focusedElem,i=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Id(r.ownerDocument.documentElement,r)){if(i!==null&&vl(r)){if(t=i.start,e=i.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var c=r.textContent.length,f=Math.min(i.start,c);i=i.end===void 0?f:Math.min(i.end,c),!e.extend&&f>i&&(c=i,i=f,f=c),c=Ad(r,f);var x=Ad(r,i);c&&x&&(e.rangeCount!==1||e.anchorNode!==c.node||e.anchorOffset!==c.offset||e.focusNode!==x.node||e.focusOffset!==x.offset)&&(t=t.createRange(),t.setStart(c.node,c.offset),e.removeAllRanges(),f>i?(e.addRange(t),e.extend(x.node,x.offset)):(t.setEnd(x.node,x.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,co=null,yl=null,ms=null,xl=!1;function zd(e,t,r){var i=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;xl||co==null||co!==qe(i)||(i=co,"selectionStart"in i&&vl(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),ms&&ps(ms,i)||(ms=i,i=yi(yl,"onSelect"),0ho||(e.current=Tl[ho],Tl[ho]=null,ho--)}function Ie(e,t){ho++,Tl[ho]=e.current,e.current=t}var dr={},yt=ur(dr),jt=ur(!1),Fr=dr;function go(e,t){var r=e.type.contextTypes;if(!r)return dr;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var c={},f;for(f in r)c[f]=t[f];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=c),c}function Et(e){return e=e.childContextTypes,e!=null}function bi(){Ve(jt),Ve(yt)}function Zd(e,t,r){if(yt.current!==dr)throw Error(s(168));Ie(yt,t),Ie(jt,r)}function ef(e,t,r){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!="function")return r;i=i.getChildContext();for(var c in i)if(!(c in t))throw Error(s(108,ne(e)||"Unknown",c));return $({},r,i)}function ki(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||dr,Fr=yt.current,Ie(yt,e),Ie(jt,jt.current),!0}function tf(e,t,r){var i=e.stateNode;if(!i)throw Error(s(169));r?(e=ef(e,t,Fr),i.__reactInternalMemoizedMergedChildContext=e,Ve(jt),Ve(yt),Ie(yt,e)):Ve(jt),Ie(jt,r)}var An=null,Ci=!1,Ml=!1;function nf(e){An===null?An=[e]:An.push(e)}function hy(e){Ci=!0,nf(e)}function fr(){if(!Ml&&An!==null){Ml=!0;var e=0,t=Le;try{var r=An;for(Le=1;e>=x,c-=x,In=1<<32-en(t)+c|r<Ce?(ut=Se,Se=null):ut=Se.sibling;var Oe=H(I,Se,z[Ce],J);if(Oe===null){Se===null&&(Se=ut);break}e&&Se&&Oe.alternate===null&&t(I,Se),M=f(Oe,M,Ce),we===null?ye=Oe:we.sibling=Oe,we=Oe,Se=ut}if(Ce===z.length)return r(I,Se),He&&Br(I,Ce),ye;if(Se===null){for(;CeCe?(ut=Se,Se=null):ut=Se.sibling;var Sr=H(I,Se,Oe.value,J);if(Sr===null){Se===null&&(Se=ut);break}e&&Se&&Sr.alternate===null&&t(I,Se),M=f(Sr,M,Ce),we===null?ye=Sr:we.sibling=Sr,we=Sr,Se=ut}if(Oe.done)return r(I,Se),He&&Br(I,Ce),ye;if(Se===null){for(;!Oe.done;Ce++,Oe=z.next())Oe=G(I,Oe.value,J),Oe!==null&&(M=f(Oe,M,Ce),we===null?ye=Oe:we.sibling=Oe,we=Oe);return He&&Br(I,Ce),ye}for(Se=i(I,Se);!Oe.done;Ce++,Oe=z.next())Oe=ae(Se,I,Ce,Oe.value,J),Oe!==null&&(e&&Oe.alternate!==null&&Se.delete(Oe.key===null?Ce:Oe.key),M=f(Oe,M,Ce),we===null?ye=Oe:we.sibling=Oe,we=Oe);return e&&Se.forEach(function(Qy){return t(I,Qy)}),He&&Br(I,Ce),ye}function et(I,M,z,J){if(typeof z=="object"&&z!==null&&z.type===F&&z.key===null&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case D:e:{for(var ye=z.key,we=M;we!==null;){if(we.key===ye){if(ye=z.type,ye===F){if(we.tag===7){r(I,we.sibling),M=c(we,z.props.children),M.return=I,I=M;break e}}else if(we.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===Y&&cf(ye)===we.type){r(I,we.sibling),M=c(we,z.props),M.ref=ws(I,we,z),M.return=I,I=M;break e}r(I,we);break}else t(I,we);we=we.sibling}z.type===F?(M=Qr(z.props.children,I.mode,J,z.key),M.return=I,I=M):(J=Ji(z.type,z.key,z.props,null,I.mode,J),J.ref=ws(I,M,z),J.return=I,I=J)}return x(I);case L:e:{for(we=z.key;M!==null;){if(M.key===we)if(M.tag===4&&M.stateNode.containerInfo===z.containerInfo&&M.stateNode.implementation===z.implementation){r(I,M.sibling),M=c(M,z.children||[]),M.return=I,I=M;break e}else{r(I,M);break}else t(I,M);M=M.sibling}M=Pc(z,I.mode,J),M.return=I,I=M}return x(I);case Y:return we=z._init,et(I,M,we(z._payload),J)}if(Ut(z))return me(I,M,z,J);if(Q(z))return ge(I,M,z,J);_i(I,z)}return typeof z=="string"&&z!==""||typeof z=="number"?(z=""+z,M!==null&&M.tag===6?(r(I,M.sibling),M=c(M,z),M.return=I,I=M):(r(I,M),M=_c(z,I.mode,J),M.return=I,I=M),x(I)):r(I,M)}return et}var wo=uf(!0),df=uf(!1),Pi=ur(null),Ri=null,So=null,zl=null;function Fl(){zl=So=Ri=null}function $l(e){var t=Pi.current;Ve(Pi),e._currentValue=t}function Bl(e,t,r){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===r)break;e=e.return}}function bo(e,t){Ri=e,zl=So=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(_t=!0),e.firstContext=null)}function Gt(e){var t=e._currentValue;if(zl!==e)if(e={context:e,memoizedValue:t,next:null},So===null){if(Ri===null)throw Error(s(308));So=e,Ri.dependencies={lanes:0,firstContext:e}}else So=So.next=e;return t}var Ur=null;function Ul(e){Ur===null?Ur=[e]:Ur.push(e)}function ff(e,t,r,i){var c=t.interleaved;return c===null?(r.next=r,Ul(t)):(r.next=c.next,c.next=r),t.interleaved=r,zn(e,i)}function zn(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var pr=!1;function Vl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function pf(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Fn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function mr(e,t,r){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(Me&2)!==0){var c=i.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),i.pending=t,zn(e,r)}return c=i.interleaved,c===null?(t.next=t,Ul(i)):(t.next=c.next,c.next=t),i.interleaved=t,zn(e,r)}function Ti(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,rl(e,r)}}function mf(e,t){var r=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,r===i)){var c=null,f=null;if(r=r.firstBaseUpdate,r!==null){do{var x={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};f===null?c=f=x:f=f.next=x,r=r.next}while(r!==null);f===null?c=f=t:f=f.next=t}else c=f=t;r={baseState:i.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:i.shared,effects:i.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Mi(e,t,r,i){var c=e.updateQueue;pr=!1;var f=c.firstBaseUpdate,x=c.lastBaseUpdate,N=c.shared.pending;if(N!==null){c.shared.pending=null;var R=N,B=R.next;R.next=null,x===null?f=B:x.next=B,x=R;var K=e.alternate;K!==null&&(K=K.updateQueue,N=K.lastBaseUpdate,N!==x&&(N===null?K.firstBaseUpdate=B:N.next=B,K.lastBaseUpdate=R))}if(f!==null){var G=c.baseState;x=0,K=B=R=null,N=f;do{var H=N.lane,ae=N.eventTime;if((i&H)===H){K!==null&&(K=K.next={eventTime:ae,lane:0,tag:N.tag,payload:N.payload,callback:N.callback,next:null});e:{var me=e,ge=N;switch(H=t,ae=r,ge.tag){case 1:if(me=ge.payload,typeof me=="function"){G=me.call(ae,G,H);break e}G=me;break e;case 3:me.flags=me.flags&-65537|128;case 0:if(me=ge.payload,H=typeof me=="function"?me.call(ae,G,H):me,H==null)break e;G=$({},G,H);break e;case 2:pr=!0}}N.callback!==null&&N.lane!==0&&(e.flags|=64,H=c.effects,H===null?c.effects=[N]:H.push(N))}else ae={eventTime:ae,lane:H,tag:N.tag,payload:N.payload,callback:N.callback,next:null},K===null?(B=K=ae,R=G):K=K.next=ae,x|=H;if(N=N.next,N===null){if(N=c.shared.pending,N===null)break;H=N,N=H.next,H.next=null,c.lastBaseUpdate=H,c.shared.pending=null}}while(!0);if(K===null&&(R=G),c.baseState=R,c.firstBaseUpdate=B,c.lastBaseUpdate=K,t=c.shared.interleaved,t!==null){c=t;do x|=c.lane,c=c.next;while(c!==t)}else f===null&&(c.shared.lanes=0);Hr|=x,e.lanes=x,e.memoizedState=G}}function hf(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var i=Gl.transition;Gl.transition={};try{e(!1),t()}finally{Le=r,Gl.transition=i}}function Lf(){return Qt().memoizedState}function xy(e,t,r){var i=yr(e);if(r={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null},Af(e))If(t,r);else if(r=ff(e,t,r,i),r!==null){var c=Nt();an(r,e,i,c),Df(r,t,i)}}function wy(e,t,r){var i=yr(e),c={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null};if(Af(e))If(t,c);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var x=t.lastRenderedState,N=f(x,r);if(c.hasEagerState=!0,c.eagerState=N,tn(N,x)){var R=t.interleaved;R===null?(c.next=c,Ul(t)):(c.next=R.next,R.next=c),t.interleaved=c;return}}catch{}finally{}r=ff(e,t,c,i),r!==null&&(c=Nt(),an(r,e,i,c),Df(r,t,i))}}function Af(e){var t=e.alternate;return e===Ye||t!==null&&t===Ye}function If(e,t){Cs=Ai=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Df(e,t,r){if((r&4194240)!==0){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,rl(e,r)}}var zi={readContext:Gt,useCallback:xt,useContext:xt,useEffect:xt,useImperativeHandle:xt,useInsertionEffect:xt,useLayoutEffect:xt,useMemo:xt,useReducer:xt,useRef:xt,useState:xt,useDebugValue:xt,useDeferredValue:xt,useTransition:xt,useMutableSource:xt,useSyncExternalStore:xt,useId:xt,unstable_isNewReconciler:!1},Sy={readContext:Gt,useCallback:function(e,t){return vn().memoizedState=[e,t===void 0?null:t],e},useContext:Gt,useEffect:jf,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Ii(4194308,4,Pf.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Ii(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ii(4,2,e,t)},useMemo:function(e,t){var r=vn();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var i=vn();return t=r!==void 0?r(t):t,i.memoizedState=i.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},i.queue=e,e=e.dispatch=xy.bind(null,Ye,e),[i.memoizedState,e]},useRef:function(e){var t=vn();return e={current:e},t.memoizedState=e},useState:Cf,useDebugValue:tc,useDeferredValue:function(e){return vn().memoizedState=e},useTransition:function(){var e=Cf(!1),t=e[0];return e=yy.bind(null,e[1]),vn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var i=Ye,c=vn();if(He){if(r===void 0)throw Error(s(407));r=r()}else{if(r=t(),ct===null)throw Error(s(349));(Wr&30)!==0||xf(i,t,r)}c.memoizedState=r;var f={value:r,getSnapshot:t};return c.queue=f,jf(Sf.bind(null,i,f,e),[e]),i.flags|=2048,Es(9,wf.bind(null,i,f,r,t),void 0,null),r},useId:function(){var e=vn(),t=ct.identifierPrefix;if(He){var r=Dn,i=In;r=(i&~(1<<32-en(i)-1)).toString(32)+r,t=":"+t+"R"+r,r=Ns++,0<\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=x.createElement(r,{is:i.is}):(e=x.createElement(r),r==="select"&&(x=e,i.multiple?x.multiple=!0:i.size&&(x.size=i.size))):e=x.createElementNS(e,r),e[hn]=t,e[ys]=i,rp(e,t,!1,!1),t.stateNode=e;e:{switch(x=qo(r,i),r){case"dialog":Ue("cancel",e),Ue("close",e),c=i;break;case"iframe":case"object":case"embed":Ue("load",e),c=i;break;case"video":case"audio":for(c=0;cEo&&(t.flags|=128,i=!0,_s(f,!1),t.lanes=4194304)}else{if(!i)if(e=Oi(x),e!==null){if(t.flags|=128,i=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),_s(f,!0),f.tail===null&&f.tailMode==="hidden"&&!x.alternate&&!He)return wt(t),null}else 2*Ze()-f.renderingStartTime>Eo&&r!==1073741824&&(t.flags|=128,i=!0,_s(f,!1),t.lanes=4194304);f.isBackwards?(x.sibling=t.child,t.child=x):(r=f.last,r!==null?r.sibling=x:t.child=x,f.last=x)}return f.tail!==null?(t=f.tail,f.rendering=t,f.tail=t.sibling,f.renderingStartTime=Ze(),t.sibling=null,r=Ke.current,Ie(Ke,i?r&1|2:r&1),t):(wt(t),null);case 22:case 23:return Nc(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&(t.mode&1)!==0?(zt&1073741824)!==0&&(wt(t),t.subtreeFlags&6&&(t.flags|=8192)):wt(t),null;case 24:return null;case 25:return null}throw Error(s(156,t.tag))}function Py(e,t){switch(Ll(t),t.tag){case 1:return Et(t.type)&&bi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ko(),Ve(jt),Ve(yt),Yl(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Hl(t),null;case 13:if(Ve(Ke),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));xo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ve(Ke),null;case 4:return ko(),null;case 10:return $l(t.type._context),null;case 22:case 23:return Nc(),null;case 24:return null;default:return null}}var Ui=!1,St=!1,Ry=typeof WeakSet=="function"?WeakSet:Set,fe=null;function No(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(i){Xe(e,t,i)}else r.current=null}function pc(e,t,r){try{r()}catch(i){Xe(e,t,i)}}var ip=!1;function Ty(e,t){if(Nl=li,e=Dd(),vl(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var c=i.anchorOffset,f=i.focusNode;i=i.focusOffset;try{r.nodeType,f.nodeType}catch{r=null;break e}var x=0,N=-1,R=-1,B=0,K=0,G=e,H=null;t:for(;;){for(var ae;G!==r||c!==0&&G.nodeType!==3||(N=x+c),G!==f||i!==0&&G.nodeType!==3||(R=x+i),G.nodeType===3&&(x+=G.nodeValue.length),(ae=G.firstChild)!==null;)H=G,G=ae;for(;;){if(G===e)break t;if(H===r&&++B===c&&(N=x),H===f&&++K===i&&(R=x),(ae=G.nextSibling)!==null)break;G=H,H=G.parentNode}G=ae}r=N===-1||R===-1?null:{start:N,end:R}}else r=null}r=r||{start:0,end:0}}else r=null;for(jl={focusedElem:e,selectionRange:r},li=!1,fe=t;fe!==null;)if(t=fe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,fe=e;else for(;fe!==null;){t=fe;try{var me=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(me!==null){var ge=me.memoizedProps,et=me.memoizedState,I=t.stateNode,M=I.getSnapshotBeforeUpdate(t.elementType===t.type?ge:rn(t.type,ge),et);I.__reactInternalSnapshotBeforeUpdate=M}break;case 3:var z=t.stateNode.containerInfo;z.nodeType===1?z.textContent="":z.nodeType===9&&z.documentElement&&z.removeChild(z.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(J){Xe(t,t.return,J)}if(e=t.sibling,e!==null){e.return=t.return,fe=e;break}fe=t.return}return me=ip,ip=!1,me}function Ps(e,t,r){var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var c=i=i.next;do{if((c.tag&e)===e){var f=c.destroy;c.destroy=void 0,f!==void 0&&pc(t,r,f)}c=c.next}while(c!==i)}}function Vi(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var i=r.create;r.destroy=i()}r=r.next}while(r!==t)}}function mc(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function ap(e){var t=e.alternate;t!==null&&(e.alternate=null,ap(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[hn],delete t[ys],delete t[Rl],delete t[py],delete t[my])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function lp(e){return e.tag===5||e.tag===3||e.tag===4}function cp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||lp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function hc(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=wi));else if(i!==4&&(e=e.child,e!==null))for(hc(e,t,r),e=e.sibling;e!==null;)hc(e,t,r),e=e.sibling}function gc(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(gc(e,t,r),e=e.sibling;e!==null;)gc(e,t,r),e=e.sibling}var pt=null,on=!1;function hr(e,t,r){for(r=r.child;r!==null;)up(e,t,r),r=r.sibling}function up(e,t,r){if(mn&&typeof mn.onCommitFiberUnmount=="function")try{mn.onCommitFiberUnmount(ni,r)}catch{}switch(r.tag){case 5:St||No(r,t);case 6:var i=pt,c=on;pt=null,hr(e,t,r),pt=i,on=c,pt!==null&&(on?(e=pt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):pt.removeChild(r.stateNode));break;case 18:pt!==null&&(on?(e=pt,r=r.stateNode,e.nodeType===8?Pl(e.parentNode,r):e.nodeType===1&&Pl(e,r),as(e)):Pl(pt,r.stateNode));break;case 4:i=pt,c=on,pt=r.stateNode.containerInfo,on=!0,hr(e,t,r),pt=i,on=c;break;case 0:case 11:case 14:case 15:if(!St&&(i=r.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){c=i=i.next;do{var f=c,x=f.destroy;f=f.tag,x!==void 0&&((f&2)!==0||(f&4)!==0)&&pc(r,t,x),c=c.next}while(c!==i)}hr(e,t,r);break;case 1:if(!St&&(No(r,t),i=r.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=r.memoizedProps,i.state=r.memoizedState,i.componentWillUnmount()}catch(N){Xe(r,t,N)}hr(e,t,r);break;case 21:hr(e,t,r);break;case 22:r.mode&1?(St=(i=St)||r.memoizedState!==null,hr(e,t,r),St=i):hr(e,t,r);break;default:hr(e,t,r)}}function dp(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Ry),t.forEach(function(i){var c=$y.bind(null,e,i);r.has(i)||(r.add(i),i.then(c,c))})}}function sn(e,t){var r=t.deletions;if(r!==null)for(var i=0;ic&&(c=x),i&=~f}if(i=c,i=Ze()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Oy(i/1960))-i,10e?16:e,vr===null)var i=!1;else{if(e=vr,vr=null,Gi=0,(Me&6)!==0)throw Error(s(331));var c=Me;for(Me|=4,fe=e.current;fe!==null;){var f=fe,x=f.child;if((fe.flags&16)!==0){var N=f.deletions;if(N!==null){for(var R=0;RZe()-xc?Yr(e,0):yc|=r),Rt(e,t)}function Cp(e,t){t===0&&((e.mode&1)===0?t=1:(t=oi,oi<<=1,(oi&130023424)===0&&(oi=4194304)));var r=Nt();e=zn(e,t),e!==null&&(ns(e,t,r),Rt(e,r))}function Fy(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Cp(e,r)}function $y(e,t){var r=0;switch(e.tag){case 13:var i=e.stateNode,c=e.memoizedState;c!==null&&(r=c.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(s(314))}i!==null&&i.delete(t),Cp(e,r)}var Np;Np=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||jt.current)_t=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return _t=!1,Ey(e,t,r);_t=(e.flags&131072)!==0}else _t=!1,He&&(t.flags&1048576)!==0&&rf(t,ji,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;Bi(e,t),e=t.pendingProps;var c=go(t,yt.current);bo(t,r),c=Xl(null,t,i,e,c,r);var f=ql();return t.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Et(i)?(f=!0,ki(t)):f=!1,t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,Vl(t),c.updater=Fi,t.stateNode=c,c._reactInternals=t,rc(t,i,e,r),t=ac(null,t,i,!0,f,r)):(t.tag=0,He&&f&&Ol(t),Ct(null,t,c,r),t=t.child),t;case 16:i=t.elementType;e:{switch(Bi(e,t),e=t.pendingProps,c=i._init,i=c(i._payload),t.type=i,c=t.tag=Uy(i),e=rn(i,e),c){case 0:t=ic(null,t,i,e,r);break e;case 1:t=qf(null,t,i,e,r);break e;case 11:t=Kf(null,t,i,e,r);break e;case 14:t=Yf(null,t,i,rn(i.type,e),r);break e}throw Error(s(306,i,""))}return t;case 0:return i=t.type,c=t.pendingProps,c=t.elementType===i?c:rn(i,c),ic(e,t,i,c,r);case 1:return i=t.type,c=t.pendingProps,c=t.elementType===i?c:rn(i,c),qf(e,t,i,c,r);case 3:e:{if(Jf(t),e===null)throw Error(s(387));i=t.pendingProps,f=t.memoizedState,c=f.element,pf(e,t),Mi(t,i,null,r);var x=t.memoizedState;if(i=x.element,f.isDehydrated)if(f={element:i,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){c=Co(Error(s(423)),t),t=Zf(e,t,i,r,c);break e}else if(i!==c){c=Co(Error(s(424)),t),t=Zf(e,t,i,r,c);break e}else for(Dt=cr(t.stateNode.containerInfo.firstChild),It=t,He=!0,nn=null,r=df(t,null,i,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(xo(),i===c){t=$n(e,t,r);break e}Ct(e,t,i,r)}t=t.child}return t;case 5:return gf(t),e===null&&Il(t),i=t.type,c=t.pendingProps,f=e!==null?e.memoizedProps:null,x=c.children,El(i,c)?x=null:f!==null&&El(i,f)&&(t.flags|=32),Xf(e,t),Ct(e,t,x,r),t.child;case 6:return e===null&&Il(t),null;case 13:return ep(e,t,r);case 4:return Wl(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=wo(t,null,i,r):Ct(e,t,i,r),t.child;case 11:return i=t.type,c=t.pendingProps,c=t.elementType===i?c:rn(i,c),Kf(e,t,i,c,r);case 7:return Ct(e,t,t.pendingProps,r),t.child;case 8:return Ct(e,t,t.pendingProps.children,r),t.child;case 12:return Ct(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(i=t.type._context,c=t.pendingProps,f=t.memoizedProps,x=c.value,Ie(Pi,i._currentValue),i._currentValue=x,f!==null)if(tn(f.value,x)){if(f.children===c.children&&!jt.current){t=$n(e,t,r);break e}}else for(f=t.child,f!==null&&(f.return=t);f!==null;){var N=f.dependencies;if(N!==null){x=f.child;for(var R=N.firstContext;R!==null;){if(R.context===i){if(f.tag===1){R=Fn(-1,r&-r),R.tag=2;var B=f.updateQueue;if(B!==null){B=B.shared;var K=B.pending;K===null?R.next=R:(R.next=K.next,K.next=R),B.pending=R}}f.lanes|=r,R=f.alternate,R!==null&&(R.lanes|=r),Bl(f.return,r,t),N.lanes|=r;break}R=R.next}}else if(f.tag===10)x=f.type===t.type?null:f.child;else if(f.tag===18){if(x=f.return,x===null)throw Error(s(341));x.lanes|=r,N=x.alternate,N!==null&&(N.lanes|=r),Bl(x,r,t),x=f.sibling}else x=f.child;if(x!==null)x.return=f;else for(x=f;x!==null;){if(x===t){x=null;break}if(f=x.sibling,f!==null){f.return=x.return,x=f;break}x=x.return}f=x}Ct(e,t,c.children,r),t=t.child}return t;case 9:return c=t.type,i=t.pendingProps.children,bo(t,r),c=Gt(c),i=i(c),t.flags|=1,Ct(e,t,i,r),t.child;case 14:return i=t.type,c=rn(i,t.pendingProps),c=rn(i.type,c),Yf(e,t,i,c,r);case 15:return Gf(e,t,t.type,t.pendingProps,r);case 17:return i=t.type,c=t.pendingProps,c=t.elementType===i?c:rn(i,c),Bi(e,t),t.tag=1,Et(i)?(e=!0,ki(t)):e=!1,bo(t,r),Ff(t,i,c),rc(t,i,c,r),ac(null,t,i,!0,e,r);case 19:return np(e,t,r);case 22:return Qf(e,t,r)}throw Error(s(156,t.tag))};function jp(e,t){return od(e,t)}function By(e,t,r,i){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qt(e,t,r,i){return new By(e,t,r,i)}function Ec(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Uy(e){if(typeof e=="function")return Ec(e)?1:0;if(e!=null){if(e=e.$$typeof,e===he)return 11;if(e===ve)return 14}return 2}function wr(e,t){var r=e.alternate;return r===null?(r=qt(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Ji(e,t,r,i,c,f){var x=2;if(i=e,typeof e=="function")Ec(e)&&(x=1);else if(typeof e=="string")x=5;else e:switch(e){case F:return Qr(r.children,c,f,t);case P:x=8,c|=8;break;case X:return e=qt(12,r,t,c|2),e.elementType=X,e.lanes=f,e;case W:return e=qt(13,r,t,c),e.elementType=W,e.lanes=f,e;case le:return e=qt(19,r,t,c),e.elementType=le,e.lanes=f,e;case Z:return Zi(r,c,f,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case se:x=10;break e;case oe:x=9;break e;case he:x=11;break e;case ve:x=14;break e;case Y:x=16,i=null;break e}throw Error(s(130,e==null?e:typeof e,""))}return t=qt(x,r,t,c),t.elementType=e,t.type=i,t.lanes=f,t}function Qr(e,t,r,i){return e=qt(7,e,i,t),e.lanes=r,e}function Zi(e,t,r,i){return e=qt(22,e,i,t),e.elementType=Z,e.lanes=r,e.stateNode={isHidden:!1},e}function _c(e,t,r){return e=qt(6,e,null,t),e.lanes=r,e}function Pc(e,t,r){return t=qt(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Vy(e,t,r,i,c){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=nl(0),this.expirationTimes=nl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nl(0),this.identifierPrefix=i,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function Rc(e,t,r,i,c,f,x,N,R){return e=new Vy(e,t,r,N,R),t===1?(t=1,f===!0&&(t|=8)):t=0,f=qt(3,null,null,t),e.current=f,f.stateNode=e,f.memoizedState={element:i,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Vl(f),e}function Wy(e,t,r){var i=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(o){console.error(o)}}return n(),Ic.exports=ox(),Ic.exports}var Bp;function sx(){if(Bp)return ia;Bp=1;var n=Um();return ia.createRoot=n.createRoot,ia.hydrateRoot=n.hydrateRoot,ia}var ix=sx();const ax=yu(ix);var Vo=Um();const lx=yu(Vo);/** - * @remix-run/router v1.23.3 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Bs(){return Bs=Object.assign?Object.assign.bind():function(n){for(var o=1;o"u")throw new Error(o)}function wu(n,o){if(!n){typeof console<"u"&&console.warn(o);try{throw new Error(o)}catch{}}}function ux(){return Math.random().toString(36).substr(2,8)}function Vp(n,o){return{usr:n.state,key:n.key,idx:o}}function Jc(n,o,s,a){return s===void 0&&(s=null),Bs({pathname:typeof n=="string"?n:n.pathname,search:"",hash:""},typeof o=="string"?Wo(o):o,{state:s,key:o&&o.key||a||ux()})}function wa(n){let{pathname:o="/",search:s="",hash:a=""}=n;return s&&s!=="?"&&(o+=s.charAt(0)==="?"?s:"?"+s),a&&a!=="#"&&(o+=a.charAt(0)==="#"?a:"#"+a),o}function Wo(n){let o={};if(n){let s=n.indexOf("#");s>=0&&(o.hash=n.substr(s),n=n.substr(0,s));let a=n.indexOf("?");a>=0&&(o.search=n.substr(a),n=n.substr(0,a)),n&&(o.pathname=n)}return o}function dx(n,o,s,a){a===void 0&&(a={});let{window:u=document.defaultView,v5Compat:d=!1}=a,p=u.history,m=Cr.Pop,h=null,y=w();y==null&&(y=0,p.replaceState(Bs({},p.state,{idx:y}),""));function w(){return(p.state||{idx:null}).idx}function g(){m=Cr.Pop;let C=w(),E=C==null?null:C-y;y=C,h&&h({action:m,location:S.location,delta:E})}function k(C,E){m=Cr.Push;let T=Jc(S.location,C,E);y=w()+1;let _=Vp(T,y),A=S.createHref(T);try{p.pushState(_,"",A)}catch(D){if(D instanceof DOMException&&D.name==="DataCloneError")throw D;u.location.assign(A)}d&&h&&h({action:m,location:S.location,delta:1})}function b(C,E){m=Cr.Replace;let T=Jc(S.location,C,E);y=w();let _=Vp(T,y),A=S.createHref(T);p.replaceState(_,"",A),d&&h&&h({action:m,location:S.location,delta:0})}function j(C){let E=u.location.origin!=="null"?u.location.origin:u.location.href,T=typeof C=="string"?C:wa(C);return T=T.replace(/ $/,"%20"),Ge(E,"No window.location.(origin|href) available to create URL for href: "+T),new URL(T,E)}let S={get action(){return m},get location(){return n(u,p)},listen(C){if(h)throw new Error("A history only accepts one active listener");return u.addEventListener(Up,g),h=C,()=>{u.removeEventListener(Up,g),h=null}},createHref(C){return o(u,C)},createURL:j,encodeLocation(C){let E=j(C);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:k,replace:b,go(C){return p.go(C)}};return S}var Wp;(function(n){n.data="data",n.deferred="deferred",n.redirect="redirect",n.error="error"})(Wp||(Wp={}));function fx(n,o,s){return s===void 0&&(s="/"),px(n,o,s)}function px(n,o,s,a){let u=typeof o=="string"?Wo(o):o,d=Do(u.pathname||"/",s);if(d==null)return null;let p=Vm(n);mx(p);let m=null,h=Nx(d);for(let y=0;m==null&&y{let h={relativePath:m===void 0?d.path||"":m,caseSensitive:d.caseSensitive===!0,childrenIndex:p,route:d};h.relativePath.startsWith("/")&&(Ge(h.relativePath.startsWith(a),'Absolute route path "'+h.relativePath+'" nested under path '+('"'+a+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),h.relativePath=h.relativePath.slice(a.length));let y=Nr([a,h.relativePath]),w=s.concat(h);d.children&&d.children.length>0&&(Ge(d.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+y+'".')),Vm(d.children,o,w,y)),!(d.path==null&&!d.index)&&o.push({path:y,score:Sx(y,d.index),routesMeta:w})};return n.forEach((d,p)=>{var m;if(d.path===""||!((m=d.path)!=null&&m.includes("?")))u(d,p);else for(let h of Wm(d.path))u(d,p,h)}),o}function Wm(n){let o=n.split("/");if(o.length===0)return[];let[s,...a]=o,u=s.endsWith("?"),d=s.replace(/\?$/,"");if(a.length===0)return u?[d,""]:[d];let p=Wm(a.join("/")),m=[];return m.push(...p.map(h=>h===""?d:[d,h].join("/"))),u&&m.push(...p),m.map(h=>n.startsWith("/")&&h===""?"/":h)}function mx(n){n.sort((o,s)=>o.score!==s.score?s.score-o.score:bx(o.routesMeta.map(a=>a.childrenIndex),s.routesMeta.map(a=>a.childrenIndex)))}const hx=/^:[\w-]+$/,gx=3,vx=2,yx=1,xx=10,wx=-2,Hp=n=>n==="*";function Sx(n,o){let s=n.split("/"),a=s.length;return s.some(Hp)&&(a+=wx),o&&(a+=vx),s.filter(u=>!Hp(u)).reduce((u,d)=>u+(hx.test(d)?gx:d===""?yx:xx),a)}function bx(n,o){return n.length===o.length&&n.slice(0,-1).every((a,u)=>a===o[u])?n[n.length-1]-o[o.length-1]:0}function kx(n,o,s){let{routesMeta:a}=n,u={},d="/",p=[];for(let m=0;m{let{paramName:k,isOptional:b}=w;if(k==="*"){let S=m[g]||"";p=d.slice(0,d.length-S.length).replace(/(.)\/+$/,"$1")}const j=m[g];return b&&!j?y[k]=void 0:y[k]=(j||"").replace(/%2F/g,"/"),y},{}),pathname:d,pathnameBase:p,pattern:n}}function Cx(n,o,s){o===void 0&&(o=!1),s===void 0&&(s=!0),wu(n==="*"||!n.endsWith("*")||n.endsWith("/*"),'Route path "'+n+'" will be treated as if it were '+('"'+n.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+n.replace(/\*$/,"/*")+'".'));let a=[],u="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(p,m,h)=>(a.push({paramName:m,isOptional:h!=null}),h?"/?([^\\/]+)?":"/([^\\/]+)"));return n.endsWith("*")?(a.push({paramName:"*"}),u+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?u+="\\/*$":n!==""&&n!=="/"&&(u+="(?:(?=\\/|$))"),[new RegExp(u,o?void 0:"i"),a]}function Nx(n){try{return n.split("/").map(o=>decodeURIComponent(o).replace(/\//g,"%2F")).join("/")}catch(o){return wu(!1,'The URL path "'+n+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+o+").")),n}}function Do(n,o){if(o==="/")return n;if(!n.toLowerCase().startsWith(o.toLowerCase()))return null;let s=o.endsWith("/")?o.length-1:o.length,a=n.charAt(s);return a&&a!=="/"?null:n.slice(s)||"/"}const jx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ex=n=>jx.test(n);function _x(n,o){o===void 0&&(o="/");let{pathname:s,search:a="",hash:u=""}=typeof n=="string"?Wo(n):n,d;if(s)if(Ex(s))d=s;else{if(s.includes("//")){let p=s;s=Hm(s),wu(!1,"Pathnames cannot have embedded double slashes - normalizing "+(p+" -> "+s))}s.startsWith("/")?d=Kp(s.substring(1),"/"):d=Kp(s,o)}else d=o;return{pathname:d,search:Tx(a),hash:Mx(u)}}function Kp(n,o){let s=o.replace(/\/+$/,"").split("/");return n.split("/").forEach(u=>{u===".."?s.length>1&&s.pop():u!=="."&&s.push(u)}),s.length>1?s.join("/"):"/"}function Fc(n,o,s,a){return"Cannot include a '"+n+"' character in a manually specified "+("`to."+o+"` field ["+JSON.stringify(a)+"]. Please separate it out to the ")+("`to."+s+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Px(n){return n.filter((o,s)=>s===0||o.route.path&&o.route.path.length>0)}function Su(n,o){let s=Px(n);return o?s.map((a,u)=>u===s.length-1?a.pathname:a.pathnameBase):s.map(a=>a.pathnameBase)}function bu(n,o,s,a){a===void 0&&(a=!1);let u;typeof n=="string"?u=Wo(n):(u=Bs({},n),Ge(!u.pathname||!u.pathname.includes("?"),Fc("?","pathname","search",u)),Ge(!u.pathname||!u.pathname.includes("#"),Fc("#","pathname","hash",u)),Ge(!u.search||!u.search.includes("#"),Fc("#","search","hash",u)));let d=n===""||u.pathname==="",p=d?"/":u.pathname,m;if(p==null)m=s;else{let g=o.length-1;if(!a&&p.startsWith("..")){let k=p.split("/");for(;k[0]==="..";)k.shift(),g-=1;u.pathname=k.join("/")}m=g>=0?o[g]:"/"}let h=_x(u,m),y=p&&p!=="/"&&p.endsWith("/"),w=(d||p===".")&&s.endsWith("/");return!h.pathname.endsWith("/")&&(y||w)&&(h.pathname+="/"),h}const Hm=n=>n.replace(/\/\/+/g,"/"),Nr=n=>Hm(n.join("/")),Rx=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),Tx=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,Mx=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n;function Ox(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}const Km=["post","put","patch","delete"];new Set(Km);const Lx=["get",...Km];new Set(Lx);/** - * React Router v6.30.4 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Us(){return Us=Object.assign?Object.assign.bind():function(n){for(var o=1;o{m.current=!0}),v.useCallback(function(y,w){if(w===void 0&&(w={}),!m.current)return;if(typeof y=="number"){a.go(y);return}let g=bu(y,JSON.parse(p),d,w.relative==="path");n==null&&o!=="/"&&(g.pathname=g.pathname==="/"?o:Nr([o,g.pathname])),(w.replace?a.replace:a.push)(g,w.state,w)},[o,a,p,d,n])}const Dx=v.createContext(null);function zx(n){let o=v.useContext(Rn).outlet;return o&&v.createElement(Dx.Provider,{value:n},o)}function Fx(){let{matches:n}=v.useContext(Rn),o=n[n.length-1];return o?o.params:{}}function Ia(n,o){let{relative:s}=o===void 0?{}:o,{future:a}=v.useContext(Gn),{matches:u}=v.useContext(Rn),{pathname:d}=Ko(),p=JSON.stringify(Su(u,a.v7_relativeSplatPath));return v.useMemo(()=>bu(n,JSON.parse(p),d,s==="path"),[n,p,d,s])}function $x(n,o){return Bx(n,o)}function Bx(n,o,s,a){Ho()||Ge(!1);let{navigator:u}=v.useContext(Gn),{matches:d}=v.useContext(Rn),p=d[d.length-1],m=p?p.params:{};p&&p.pathname;let h=p?p.pathnameBase:"/";p&&p.route;let y=Ko(),w;if(o){var g;let C=typeof o=="string"?Wo(o):o;h==="/"||(g=C.pathname)!=null&&g.startsWith(h)||Ge(!1),w=C}else w=y;let k=w.pathname||"/",b=k;if(h!=="/"){let C=h.replace(/^\//,"").split("/");b="/"+k.replace(/^\//,"").split("/").slice(C.length).join("/")}let j=fx(n,{pathname:b}),S=Kx(j&&j.map(C=>Object.assign({},C,{params:Object.assign({},m,C.params),pathname:Nr([h,u.encodeLocation?u.encodeLocation(C.pathname).pathname:C.pathname]),pathnameBase:C.pathnameBase==="/"?h:Nr([h,u.encodeLocation?u.encodeLocation(C.pathnameBase).pathname:C.pathnameBase])})),d,s,a);return o&&S?v.createElement(La.Provider,{value:{location:Us({pathname:"/",search:"",hash:"",state:null,key:"default"},w),navigationType:Cr.Pop}},S):S}function Ux(){let n=Xx(),o=Ox(n)?n.status+" "+n.statusText:n instanceof Error?n.message:JSON.stringify(n),s=n instanceof Error?n.stack:null,u={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},o),s?v.createElement("pre",{style:u},s):null,null)}const Vx=v.createElement(Ux,null);class Wx extends v.Component{constructor(o){super(o),this.state={location:o.location,revalidation:o.revalidation,error:o.error}}static getDerivedStateFromError(o){return{error:o}}static getDerivedStateFromProps(o,s){return s.location!==o.location||s.revalidation!=="idle"&&o.revalidation==="idle"?{error:o.error,location:o.location,revalidation:o.revalidation}:{error:o.error!==void 0?o.error:s.error,location:s.location,revalidation:o.revalidation||s.revalidation}}componentDidCatch(o,s){console.error("React Router caught the following error during render",o,s)}render(){return this.state.error!==void 0?v.createElement(Rn.Provider,{value:this.props.routeContext},v.createElement(Gm.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Hx(n){let{routeContext:o,match:s,children:a}=n,u=v.useContext(Oa);return u&&u.static&&u.staticContext&&(s.route.errorElement||s.route.ErrorBoundary)&&(u.staticContext._deepestRenderedBoundaryId=s.route.id),v.createElement(Rn.Provider,{value:o},a)}function Kx(n,o,s,a){var u;if(o===void 0&&(o=[]),s===void 0&&(s=null),a===void 0&&(a=null),n==null){var d;if(!s)return null;if(s.errors)n=s.matches;else if((d=a)!=null&&d.v7_partialHydration&&o.length===0&&!s.initialized&&s.matches.length>0)n=s.matches;else return null}let p=n,m=(u=s)==null?void 0:u.errors;if(m!=null){let w=p.findIndex(g=>g.route.id&&(m==null?void 0:m[g.route.id])!==void 0);w>=0||Ge(!1),p=p.slice(0,Math.min(p.length,w+1))}let h=!1,y=-1;if(s&&a&&a.v7_partialHydration)for(let w=0;w=0?p=p.slice(0,y+1):p=[p[0]];break}}}return p.reduceRight((w,g,k)=>{let b,j=!1,S=null,C=null;s&&(b=m&&g.route.id?m[g.route.id]:void 0,S=g.route.errorElement||Vx,h&&(y<0&&k===0?(Jx("route-fallback"),j=!0,C=null):y===k&&(j=!0,C=g.route.hydrateFallbackElement||null)));let E=o.concat(p.slice(0,k+1)),T=()=>{let _;return b?_=S:j?_=C:g.route.Component?_=v.createElement(g.route.Component,null):g.route.element?_=g.route.element:_=w,v.createElement(Hx,{match:g,routeContext:{outlet:w,matches:E,isDataRoute:s!=null},children:_})};return s&&(g.route.ErrorBoundary||g.route.errorElement||k===0)?v.createElement(Wx,{location:s.location,revalidation:s.revalidation,component:S,error:b,children:T(),routeContext:{outlet:null,matches:E,isDataRoute:!0}}):T()},null)}var Xm=(function(n){return n.UseBlocker="useBlocker",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n})(Xm||{}),qm=(function(n){return n.UseBlocker="useBlocker",n.UseLoaderData="useLoaderData",n.UseActionData="useActionData",n.UseRouteError="useRouteError",n.UseNavigation="useNavigation",n.UseRouteLoaderData="useRouteLoaderData",n.UseMatches="useMatches",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n.UseRouteId="useRouteId",n})(qm||{});function Yx(n){let o=v.useContext(Oa);return o||Ge(!1),o}function Gx(n){let o=v.useContext(Ym);return o||Ge(!1),o}function Qx(n){let o=v.useContext(Rn);return o||Ge(!1),o}function Jm(n){let o=Qx(),s=o.matches[o.matches.length-1];return s.route.id||Ge(!1),s.route.id}function Xx(){var n;let o=v.useContext(Gm),s=Gx(),a=Jm();return o!==void 0?o:(n=s.errors)==null?void 0:n[a]}function qx(){let{router:n}=Yx(Xm.UseNavigateStable),o=Jm(qm.UseNavigateStable),s=v.useRef(!1);return Qm(()=>{s.current=!0}),v.useCallback(function(u,d){d===void 0&&(d={}),s.current&&(typeof u=="number"?n.navigate(u):n.navigate(u,Us({fromRouteId:o},d)))},[n,o])}const Yp={};function Jx(n,o,s){Yp[n]||(Yp[n]=!0)}function Zx(n,o){n==null||n.v7_startTransition,n==null||n.v7_relativeSplatPath}function Zm(n){let{to:o,replace:s,state:a,relative:u}=n;Ho()||Ge(!1);let{future:d,static:p}=v.useContext(Gn),{matches:m}=v.useContext(Rn),{pathname:h}=Ko(),y=Aa(),w=bu(o,Su(m,d.v7_relativeSplatPath),h,u==="path"),g=JSON.stringify(w);return v.useEffect(()=>y(JSON.parse(g),{replace:s,state:a,relative:u}),[y,g,u,s,a]),null}function e0(n){return zx(n.context)}function ln(n){Ge(!1)}function t0(n){let{basename:o="/",children:s=null,location:a,navigationType:u=Cr.Pop,navigator:d,static:p=!1,future:m}=n;Ho()&&Ge(!1);let h=o.replace(/^\/*/,"/"),y=v.useMemo(()=>({basename:h,navigator:d,static:p,future:Us({v7_relativeSplatPath:!1},m)}),[h,m,d,p]);typeof a=="string"&&(a=Wo(a));let{pathname:w="/",search:g="",hash:k="",state:b=null,key:j="default"}=a,S=v.useMemo(()=>{let C=Do(w,h);return C==null?null:{location:{pathname:C,search:g,hash:k,state:b,key:j},navigationType:u}},[h,w,g,k,b,j,u]);return S==null?null:v.createElement(Gn.Provider,{value:y},v.createElement(La.Provider,{children:s,value:S}))}function n0(n){let{children:o,location:s}=n;return $x(eu(o),s)}new Promise(()=>{});function eu(n,o){o===void 0&&(o=[]);let s=[];return v.Children.forEach(n,(a,u)=>{if(!v.isValidElement(a))return;let d=[...o,u];if(a.type===v.Fragment){s.push.apply(s,eu(a.props.children,d));return}a.type!==ln&&Ge(!1),!a.props.index||!a.props.children||Ge(!1);let p={id:a.props.id||d.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,loader:a.props.loader,action:a.props.action,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(p.children=eu(a.props.children,d)),s.push(p)}),s}/** - * React Router DOM v6.30.4 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Sa(){return Sa=Object.assign?Object.assign.bind():function(n){for(var o=1;o{y&&Gp?Gp(()=>h(g)):h(g)},[h,y]);return v.useLayoutEffect(()=>p.listen(w),[p,w]),v.useEffect(()=>Zx(a),[a]),v.createElement(t0,{basename:o,children:s,location:m.location,navigationType:m.action,navigator:p,future:a})}const d0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",f0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,zo=v.forwardRef(function(o,s){let{onClick:a,relative:u,reloadDocument:d,replace:p,state:m,target:h,to:y,preventScrollReset:w,viewTransition:g}=o,k=eh(o,s0),{basename:b}=v.useContext(Gn),j,S=!1;if(typeof y=="string"&&f0.test(y)&&(j=y,d0))try{let _=new URL(window.location.href),A=y.startsWith("//")?new URL(_.protocol+y):new URL(y),D=Do(A.pathname,b);A.origin===_.origin&&D!=null?y=D+A.search+A.hash:S=!0}catch{}let C=Ax(y,{relative:u}),E=m0(y,{replace:p,state:m,target:h,preventScrollReset:w,relative:u,viewTransition:g});function T(_){a&&a(_),_.defaultPrevented||E(_)}return v.createElement("a",Sa({},k,{href:j||C,onClick:S||d?a:T,ref:s,target:h}))}),Qp=v.forwardRef(function(o,s){let{"aria-current":a="page",caseSensitive:u=!1,className:d="",end:p=!1,style:m,to:h,viewTransition:y,children:w}=o,g=eh(o,i0),k=Ia(h,{relative:g.relative}),b=Ko(),j=v.useContext(Ym),{navigator:S,basename:C}=v.useContext(Gn),E=j!=null&&h0(k)&&y===!0,T=S.encodeLocation?S.encodeLocation(k).pathname:k.pathname,_=b.pathname,A=j&&j.navigation&&j.navigation.location?j.navigation.location.pathname:null;u||(_=_.toLowerCase(),A=A?A.toLowerCase():null,T=T.toLowerCase()),A&&C&&(A=Do(A,C)||A);const D=T!=="/"&&T.endsWith("/")?T.length-1:T.length;let L=_===T||!p&&_.startsWith(T)&&_.charAt(D)==="/",F=A!=null&&(A===T||!p&&A.startsWith(T)&&A.charAt(T.length)==="/"),P={isActive:L,isPending:F,isTransitioning:E},X=L?a:void 0,se;typeof d=="function"?se=d(P):se=[d,L?"active":null,F?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");let oe=typeof m=="function"?m(P):m;return v.createElement(zo,Sa({},g,{"aria-current":X,className:se,ref:s,style:oe,to:h,viewTransition:y}),typeof w=="function"?w(P):w)});var tu;(function(n){n.UseScrollRestoration="useScrollRestoration",n.UseSubmit="useSubmit",n.UseSubmitFetcher="useSubmitFetcher",n.UseFetcher="useFetcher",n.useViewTransitionState="useViewTransitionState"})(tu||(tu={}));var Xp;(function(n){n.UseFetcher="useFetcher",n.UseFetchers="useFetchers",n.UseScrollRestoration="useScrollRestoration"})(Xp||(Xp={}));function p0(n){let o=v.useContext(Oa);return o||Ge(!1),o}function m0(n,o){let{target:s,replace:a,state:u,preventScrollReset:d,relative:p,viewTransition:m}=o===void 0?{}:o,h=Aa(),y=Ko(),w=Ia(n,{relative:p});return v.useCallback(g=>{if(o0(g,s)){g.preventDefault();let k=a!==void 0?a:wa(y)===wa(w);h(n,{replace:k,state:u,preventScrollReset:d,relative:p,viewTransition:m})}},[y,h,w,a,u,s,n,d,p,m])}function h0(n,o){o===void 0&&(o={});let s=v.useContext(l0);s==null&&Ge(!1);let{basename:a}=p0(tu.useViewTransitionState),u=Ia(n,{relative:o.relative});if(!s.isTransitioning)return!1;let d=Do(s.currentLocation.pathname,a)||s.currentLocation.pathname,p=Do(s.nextLocation.pathname,a)||s.nextLocation.pathname;return Zc(u.pathname,p)!=null||Zc(u.pathname,d)!=null}function g0(n){if(typeof document>"u")return;let o=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",o.appendChild(s),s.styleSheet?s.styleSheet.cssText=n:s.appendChild(document.createTextNode(n))}const v0=n=>{switch(n){case"success":return w0;case"info":return b0;case"warning":return S0;case"error":return k0;default:return null}},y0=Array(12).fill(0),x0=({visible:n,className:o})=>te.createElement("div",{className:["sonner-loading-wrapper",o].filter(Boolean).join(" "),"data-visible":n},te.createElement("div",{className:"sonner-spinner"},y0.map((s,a)=>te.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${a}`})))),w0=te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},te.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),S0=te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},te.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),b0=te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},te.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),k0=te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},te.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),C0=te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},te.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),te.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),N0=()=>{const[n,o]=te.useState(document.hidden);return te.useEffect(()=>{const s=()=>{o(document.hidden)};return document.addEventListener("visibilitychange",s),()=>window.removeEventListener("visibilitychange",s)},[]),n};let nu=1;class j0{constructor(){this.subscribe=o=>(this.subscribers.push(o),()=>{const s=this.subscribers.indexOf(o);this.subscribers.splice(s,1)}),this.publish=o=>{this.subscribers.forEach(s=>s(o))},this.addToast=o=>{this.publish(o),this.toasts=[...this.toasts,o]},this.create=o=>{var s;const{message:a,...u}=o,d=typeof(o==null?void 0:o.id)=="number"||((s=o.id)==null?void 0:s.length)>0?o.id:nu++,p=this.toasts.find(h=>h.id===d),m=o.dismissible===void 0?!0:o.dismissible;return this.dismissedToasts.has(d)&&this.dismissedToasts.delete(d),p?this.toasts=this.toasts.map(h=>h.id===d?(this.publish({...h,...o,id:d,title:a}),{...h,...o,id:d,dismissible:m,title:a}):h):this.addToast({title:a,...u,dismissible:m,id:d}),d},this.dismiss=o=>(o?(this.dismissedToasts.add(o),requestAnimationFrame(()=>this.subscribers.forEach(s=>s({id:o,dismiss:!0})))):this.toasts.forEach(s=>{this.subscribers.forEach(a=>a({id:s.id,dismiss:!0}))}),o),this.message=(o,s)=>this.create({...s,message:o}),this.error=(o,s)=>this.create({...s,message:o,type:"error"}),this.success=(o,s)=>this.create({...s,type:"success",message:o}),this.info=(o,s)=>this.create({...s,type:"info",message:o}),this.warning=(o,s)=>this.create({...s,type:"warning",message:o}),this.loading=(o,s)=>this.create({...s,type:"loading",message:o}),this.promise=(o,s)=>{if(!s)return;let a;s.loading!==void 0&&(a=this.create({...s,promise:o,type:"loading",message:s.loading,description:typeof s.description!="function"?s.description:void 0}));const u=Promise.resolve(o instanceof Function?o():o);let d=a!==void 0,p;const m=u.then(async y=>{if(p=["resolve",y],te.isValidElement(y))d=!1,this.create({id:a,type:"default",message:y});else if(_0(y)&&!y.ok){d=!1;const g=typeof s.error=="function"?await s.error(`HTTP error! status: ${y.status}`):s.error,k=typeof s.description=="function"?await s.description(`HTTP error! status: ${y.status}`):s.description,j=typeof g=="object"&&!te.isValidElement(g)?g:{message:g};this.create({id:a,type:"error",description:k,...j})}else if(y instanceof Error){d=!1;const g=typeof s.error=="function"?await s.error(y):s.error,k=typeof s.description=="function"?await s.description(y):s.description,j=typeof g=="object"&&!te.isValidElement(g)?g:{message:g};this.create({id:a,type:"error",description:k,...j})}else if(s.success!==void 0){d=!1;const g=typeof s.success=="function"?await s.success(y):s.success,k=typeof s.description=="function"?await s.description(y):s.description,j=typeof g=="object"&&!te.isValidElement(g)?g:{message:g};this.create({id:a,type:"success",description:k,...j})}}).catch(async y=>{if(p=["reject",y],s.error!==void 0){d=!1;const w=typeof s.error=="function"?await s.error(y):s.error,g=typeof s.description=="function"?await s.description(y):s.description,b=typeof w=="object"&&!te.isValidElement(w)?w:{message:w};this.create({id:a,type:"error",description:g,...b})}}).finally(()=>{d&&(this.dismiss(a),a=void 0),s.finally==null||s.finally.call(s)}),h=()=>new Promise((y,w)=>m.then(()=>p[0]==="reject"?w(p[1]):y(p[1])).catch(w));return typeof a!="string"&&typeof a!="number"?{unwrap:h}:Object.assign(a,{unwrap:h})},this.custom=(o,s)=>{const a=(s==null?void 0:s.id)||nu++;return this.create({jsx:o(a),id:a,...s}),a},this.getActiveToasts=()=>this.toasts.filter(o=>!this.dismissedToasts.has(o.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Mt=new j0,E0=(n,o)=>{const s=(o==null?void 0:o.id)||nu++;return Mt.addToast({title:n,...o,id:s}),s},_0=n=>n&&typeof n=="object"&&"ok"in n&&typeof n.ok=="boolean"&&"status"in n&&typeof n.status=="number",P0=E0,R0=()=>Mt.toasts,T0=()=>Mt.getActiveToasts(),Te=Object.assign(P0,{success:Mt.success,info:Mt.info,warning:Mt.warning,error:Mt.error,custom:Mt.custom,message:Mt.message,promise:Mt.promise,dismiss:Mt.dismiss,loading:Mt.loading},{getHistory:R0,getToasts:T0});g0("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function aa(n){return n.label!==void 0}const M0=3,O0="24px",L0="16px",qp=4e3,A0=356,I0=14,D0=45,z0=200;function xn(...n){return n.filter(Boolean).join(" ")}function F0(n){const[o,s]=n.split("-"),a=[];return o&&a.push(o),s&&a.push(s),a}const $0=n=>{var o,s,a,u,d,p,m,h,y;const{invert:w,toast:g,unstyled:k,interacting:b,setHeights:j,visibleToasts:S,heights:C,index:E,toasts:T,expanded:_,removeToast:A,defaultRichColors:D,closeButton:L,style:F,cancelButtonStyle:P,actionButtonStyle:X,className:se="",descriptionClassName:oe="",duration:he,position:W,gap:le,expandByDefault:ve,classNames:Y,icons:Z,closeButtonAriaLabel:U="Close toast"}=n,[Q,$]=te.useState(null),[O,V]=te.useState(null),[q,ie]=te.useState(!1),[re,ce]=te.useState(!1),[ne,ee]=te.useState(!1),[ue,ke]=te.useState(!1),[Ne,Ee]=te.useState(!1),[qe,We]=te.useState(0),[Jt,Zt]=te.useState(0),bt=te.useRef(g.duration||he||qp),Or=te.useRef(null),kt=te.useRef(null),Ut=E===0,Xn=E+1<=S,dt=g.type,Mn=g.dismissible!==!1,Xs=g.className||"",qs=g.descriptionClassName||"",Lr=te.useMemo(()=>C.findIndex(je=>je.toastId===g.id)||0,[C,g.id]),Xo=te.useMemo(()=>{var je;return(je=g.closeButton)!=null?je:L},[g.closeButton,L]),Ar=te.useMemo(()=>g.duration||he||qp,[g.duration,he]),oo=te.useRef(0),Vt=te.useRef(0),qn=te.useRef(0),Jn=te.useRef(null),[Js,Zs]=W.split("-"),ei=te.useMemo(()=>C.reduce((je,Je,rt)=>rt>=Lr?je:je+Je.height,0),[C,Lr]),so=N0(),qo=g.invert||w,Ir=dt==="loading";Vt.current=te.useMemo(()=>Lr*le+ei,[Lr,ei]),te.useEffect(()=>{bt.current=Ar},[Ar]),te.useEffect(()=>{ie(!0)},[]),te.useEffect(()=>{const je=kt.current;if(je){const Je=je.getBoundingClientRect().height;return Zt(Je),j(rt=>[{toastId:g.id,height:Je,position:g.position},...rt]),()=>j(rt=>rt.filter(vt=>vt.toastId!==g.id))}},[j,g.id]),te.useLayoutEffect(()=>{if(!q)return;const je=kt.current,Je=je.style.height;je.style.height="auto";const rt=je.getBoundingClientRect().height;je.style.height=Je,Zt(rt),j(vt=>vt.find(tt=>tt.toastId===g.id)?vt.map(tt=>tt.toastId===g.id?{...tt,height:rt}:tt):[{toastId:g.id,height:rt,position:g.position},...vt])},[q,g.title,g.description,j,g.id,g.jsx,g.action,g.cancel]);const Wt=te.useCallback(()=>{ce(!0),We(Vt.current),j(je=>je.filter(Je=>Je.toastId!==g.id)),setTimeout(()=>{A(g)},z0)},[g,A,j,Vt]);te.useEffect(()=>{if(g.promise&&dt==="loading"||g.duration===1/0||g.type==="loading")return;let je;return _||b||so?(()=>{if(qn.current{bt.current!==1/0&&(oo.current=new Date().getTime(),je=setTimeout(()=>{g.onAutoClose==null||g.onAutoClose.call(g,g),Wt()},bt.current))})(),()=>clearTimeout(je)},[_,b,g,dt,so,Wt]),te.useEffect(()=>{g.delete&&(Wt(),g.onDismiss==null||g.onDismiss.call(g,g))},[Wt,g.delete]);function Jo(){var je;if(Z!=null&&Z.loading){var Je;return te.createElement("div",{className:xn(Y==null?void 0:Y.loader,g==null||(Je=g.classNames)==null?void 0:Je.loader,"sonner-loader"),"data-visible":dt==="loading"},Z.loading)}return te.createElement(x0,{className:xn(Y==null?void 0:Y.loader,g==null||(je=g.classNames)==null?void 0:je.loader),visible:dt==="loading"})}const Zn=g.icon||(Z==null?void 0:Z[dt])||v0(dt);var On,Zo;return te.createElement("li",{tabIndex:0,ref:kt,className:xn(se,Xs,Y==null?void 0:Y.toast,g==null||(o=g.classNames)==null?void 0:o.toast,Y==null?void 0:Y.default,Y==null?void 0:Y[dt],g==null||(s=g.classNames)==null?void 0:s[dt]),"data-sonner-toast":"","data-rich-colors":(On=g.richColors)!=null?On:D,"data-styled":!(g.jsx||g.unstyled||k),"data-mounted":q,"data-promise":!!g.promise,"data-swiped":Ne,"data-removed":re,"data-visible":Xn,"data-y-position":Js,"data-x-position":Zs,"data-index":E,"data-front":Ut,"data-swiping":ne,"data-dismissible":Mn,"data-type":dt,"data-invert":qo,"data-swipe-out":ue,"data-swipe-direction":O,"data-expanded":!!(_||ve&&q),"data-testid":g.testId,style:{"--index":E,"--toasts-before":E,"--z-index":T.length-E,"--offset":`${re?qe:Vt.current}px`,"--initial-height":ve?"auto":`${Jt}px`,...F,...g.style},onDragEnd:()=>{ee(!1),$(null),Jn.current=null},onPointerDown:je=>{je.button!==2&&(Ir||!Mn||(Or.current=new Date,We(Vt.current),je.target.setPointerCapture(je.pointerId),je.target.tagName!=="BUTTON"&&(ee(!0),Jn.current={x:je.clientX,y:je.clientY})))},onPointerUp:()=>{var je,Je,rt;if(ue||!Mn)return;Jn.current=null;const vt=Number(((je=kt.current)==null?void 0:je.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),er=Number(((Je=kt.current)==null?void 0:Je.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),tt=new Date().getTime()-((rt=Or.current)==null?void 0:rt.getTime()),at=Q==="x"?vt:er,tr=Math.abs(at)/tt;if(Math.abs(at)>=D0||tr>.11){We(Vt.current),g.onDismiss==null||g.onDismiss.call(g,g),V(Q==="x"?vt>0?"right":"left":er>0?"down":"up"),Wt(),ke(!0);return}else{var ft,Lt;(ft=kt.current)==null||ft.style.setProperty("--swipe-amount-x","0px"),(Lt=kt.current)==null||Lt.style.setProperty("--swipe-amount-y","0px")}Ee(!1),ee(!1),$(null)},onPointerMove:je=>{var Je,rt,vt;if(!Jn.current||!Mn||((Je=window.getSelection())==null?void 0:Je.toString().length)>0)return;const tt=je.clientY-Jn.current.y,at=je.clientX-Jn.current.x;var tr;const ft=(tr=n.swipeDirections)!=null?tr:F0(W);!Q&&(Math.abs(at)>1||Math.abs(tt)>1)&&$(Math.abs(at)>Math.abs(tt)?"x":"y");let Lt={x:0,y:0};const nr=Ht=>1/(1.5+Math.abs(Ht)/20);if(Q==="y"){if(ft.includes("top")||ft.includes("bottom"))if(ft.includes("top")&&tt<0||ft.includes("bottom")&&tt>0)Lt.y=tt;else{const Ht=tt*nr(tt);Lt.y=Math.abs(Ht)0)Lt.x=at;else{const Ht=at*nr(at);Lt.x=Math.abs(Ht)0||Math.abs(Lt.y)>0)&&Ee(!0),(rt=kt.current)==null||rt.style.setProperty("--swipe-amount-x",`${Lt.x}px`),(vt=kt.current)==null||vt.style.setProperty("--swipe-amount-y",`${Lt.y}px`)}},Xo&&!g.jsx&&dt!=="loading"?te.createElement("button",{"aria-label":U,"data-disabled":Ir,"data-close-button":!0,onClick:Ir||!Mn?()=>{}:()=>{Wt(),g.onDismiss==null||g.onDismiss.call(g,g)},className:xn(Y==null?void 0:Y.closeButton,g==null||(a=g.classNames)==null?void 0:a.closeButton)},(Zo=Z==null?void 0:Z.close)!=null?Zo:C0):null,(dt||g.icon||g.promise)&&g.icon!==null&&((Z==null?void 0:Z[dt])!==null||g.icon)?te.createElement("div",{"data-icon":"",className:xn(Y==null?void 0:Y.icon,g==null||(u=g.classNames)==null?void 0:u.icon)},g.promise||g.type==="loading"&&!g.icon?g.icon||Jo():null,g.type!=="loading"?Zn:null):null,te.createElement("div",{"data-content":"",className:xn(Y==null?void 0:Y.content,g==null||(d=g.classNames)==null?void 0:d.content)},te.createElement("div",{"data-title":"",className:xn(Y==null?void 0:Y.title,g==null||(p=g.classNames)==null?void 0:p.title)},g.jsx?g.jsx:typeof g.title=="function"?g.title():g.title),g.description?te.createElement("div",{"data-description":"",className:xn(oe,qs,Y==null?void 0:Y.description,g==null||(m=g.classNames)==null?void 0:m.description)},typeof g.description=="function"?g.description():g.description):null),te.isValidElement(g.cancel)?g.cancel:g.cancel&&aa(g.cancel)?te.createElement("button",{"data-button":!0,"data-cancel":!0,style:g.cancelButtonStyle||P,onClick:je=>{aa(g.cancel)&&Mn&&(g.cancel.onClick==null||g.cancel.onClick.call(g.cancel,je),Wt())},className:xn(Y==null?void 0:Y.cancelButton,g==null||(h=g.classNames)==null?void 0:h.cancelButton)},g.cancel.label):null,te.isValidElement(g.action)?g.action:g.action&&aa(g.action)?te.createElement("button",{"data-button":!0,"data-action":!0,style:g.actionButtonStyle||X,onClick:je=>{aa(g.action)&&(g.action.onClick==null||g.action.onClick.call(g.action,je),!je.defaultPrevented&&Wt())},className:xn(Y==null?void 0:Y.actionButton,g==null||(y=g.classNames)==null?void 0:y.actionButton)},g.action.label):null)};function Jp(){if(typeof window>"u"||typeof document>"u")return"ltr";const n=document.documentElement.getAttribute("dir");return n==="auto"||!n?window.getComputedStyle(document.documentElement).direction:n}function B0(n,o){const s={};return[n,o].forEach((a,u)=>{const d=u===1,p=d?"--mobile-offset":"--offset",m=d?L0:O0;function h(y){["top","right","bottom","left"].forEach(w=>{s[`${p}-${w}`]=typeof y=="number"?`${y}px`:y})}typeof a=="number"||typeof a=="string"?h(a):typeof a=="object"?["top","right","bottom","left"].forEach(y=>{a[y]===void 0?s[`${p}-${y}`]=m:s[`${p}-${y}`]=typeof a[y]=="number"?`${a[y]}px`:a[y]}):h(m)}),s}const U0=te.forwardRef(function(o,s){const{id:a,invert:u,position:d="bottom-right",hotkey:p=["altKey","KeyT"],expand:m,closeButton:h,className:y,offset:w,mobileOffset:g,theme:k="light",richColors:b,duration:j,style:S,visibleToasts:C=M0,toastOptions:E,dir:T=Jp(),gap:_=I0,icons:A,containerAriaLabel:D="Notifications"}=o,[L,F]=te.useState([]),P=te.useMemo(()=>a?L.filter(q=>q.toasterId===a):L.filter(q=>!q.toasterId),[L,a]),X=te.useMemo(()=>Array.from(new Set([d].concat(P.filter(q=>q.position).map(q=>q.position)))),[P,d]),[se,oe]=te.useState([]),[he,W]=te.useState(!1),[le,ve]=te.useState(!1),[Y,Z]=te.useState(k!=="system"?k:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),U=te.useRef(null),Q=p.join("+").replace(/Key/g,"").replace(/Digit/g,""),$=te.useRef(null),O=te.useRef(!1),V=te.useCallback(q=>{F(ie=>{var re;return(re=ie.find(ce=>ce.id===q.id))!=null&&re.delete||Mt.dismiss(q.id),ie.filter(({id:ce})=>ce!==q.id)})},[]);return te.useEffect(()=>Mt.subscribe(q=>{if(q.dismiss){requestAnimationFrame(()=>{F(ie=>ie.map(re=>re.id===q.id?{...re,delete:!0}:re))});return}setTimeout(()=>{lx.flushSync(()=>{F(ie=>{const re=ie.findIndex(ce=>ce.id===q.id);return re!==-1?[...ie.slice(0,re),{...ie[re],...q},...ie.slice(re+1)]:[q,...ie]})})})}),[L]),te.useEffect(()=>{if(k!=="system"){Z(k);return}if(k==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Z("dark"):Z("light")),typeof window>"u")return;const q=window.matchMedia("(prefers-color-scheme: dark)");try{q.addEventListener("change",({matches:ie})=>{Z(ie?"dark":"light")})}catch{q.addListener(({matches:re})=>{try{Z(re?"dark":"light")}catch(ce){console.error(ce)}})}},[k]),te.useEffect(()=>{L.length<=1&&W(!1)},[L]),te.useEffect(()=>{const q=ie=>{var re;if(p.every(ee=>ie[ee]||ie.code===ee)){var ne;W(!0),(ne=U.current)==null||ne.focus()}ie.code==="Escape"&&(document.activeElement===U.current||(re=U.current)!=null&&re.contains(document.activeElement))&&W(!1)};return document.addEventListener("keydown",q),()=>document.removeEventListener("keydown",q)},[p]),te.useEffect(()=>{if(U.current)return()=>{$.current&&($.current.focus({preventScroll:!0}),$.current=null,O.current=!1)}},[U.current]),te.createElement("section",{ref:s,"aria-label":`${D} ${Q}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},X.map((q,ie)=>{var re;const[ce,ne]=q.split("-");return P.length?te.createElement("ol",{key:q,dir:T==="auto"?Jp():T,tabIndex:-1,ref:U,className:y,"data-sonner-toaster":!0,"data-sonner-theme":Y,"data-y-position":ce,"data-x-position":ne,style:{"--front-toast-height":`${((re=se[0])==null?void 0:re.height)||0}px`,"--width":`${A0}px`,"--gap":`${_}px`,...S,...B0(w,g)},onBlur:ee=>{O.current&&!ee.currentTarget.contains(ee.relatedTarget)&&(O.current=!1,$.current&&($.current.focus({preventScroll:!0}),$.current=null))},onFocus:ee=>{ee.target instanceof HTMLElement&&ee.target.dataset.dismissible==="false"||O.current||(O.current=!0,$.current=ee.relatedTarget)},onMouseEnter:()=>W(!0),onMouseMove:()=>W(!0),onMouseLeave:()=>{le||W(!1)},onDragEnd:()=>W(!1),onPointerDown:ee=>{ee.target instanceof HTMLElement&&ee.target.dataset.dismissible==="false"||ve(!0)},onPointerUp:()=>ve(!1)},P.filter(ee=>!ee.position&&ie===0||ee.position===q).map((ee,ue)=>{var ke,Ne;return te.createElement($0,{key:ee.id,icons:A,index:ue,toast:ee,defaultRichColors:b,duration:(ke=E==null?void 0:E.duration)!=null?ke:j,className:E==null?void 0:E.className,descriptionClassName:E==null?void 0:E.descriptionClassName,invert:u,visibleToasts:C,closeButton:(Ne=E==null?void 0:E.closeButton)!=null?Ne:h,interacting:le,position:q,style:E==null?void 0:E.style,unstyled:E==null?void 0:E.unstyled,classNames:E==null?void 0:E.classNames,cancelButtonStyle:E==null?void 0:E.cancelButtonStyle,actionButtonStyle:E==null?void 0:E.actionButtonStyle,closeButtonAriaLabel:E==null?void 0:E.closeButtonAriaLabel,removeToast:V,toasts:P.filter(Ee=>Ee.position==ee.position),heights:se.filter(Ee=>Ee.position==ee.position),setHeights:oe,expandByDefault:m,gap:_,expanded:he,swipeDirections:o.swipeDirections})})):null}))});/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const th=(...n)=>n.filter((o,s,a)=>!!o&&o.trim()!==""&&a.indexOf(o)===s).join(" ").trim();/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const V0=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const W0=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(o,s,a)=>a?a.toUpperCase():s.toLowerCase());/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Zp=n=>{const o=W0(n);return o.charAt(0).toUpperCase()+o.slice(1)};/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */var $c={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 v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const H0=n=>{for(const o in n)if(o.startsWith("aria-")||o==="role"||o==="title")return!0;return!1},K0=v.createContext({}),Y0=()=>v.useContext(K0),G0=v.forwardRef(({color:n,size:o,strokeWidth:s,absoluteStrokeWidth:a,className:u="",children:d,iconNode:p,...m},h)=>{const{size:y=24,strokeWidth:w=2,absoluteStrokeWidth:g=!1,color:k="currentColor",className:b=""}=Y0()??{},j=a??g?Number(s??w)*24/Number(o??y):s??w;return v.createElement("svg",{ref:h,...$c,width:o??y??$c.width,height:o??y??$c.height,stroke:n??k,strokeWidth:j,className:th("lucide",b,u),...!d&&!H0(m)&&{"aria-hidden":"true"},...m},[...p.map(([S,C])=>v.createElement(S,C)),...Array.isArray(d)?d:[d]])});/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Re=(n,o)=>{const s=v.forwardRef(({className:a,...u},d)=>v.createElement(G0,{ref:d,iconNode:o,className:th(`lucide-${V0(Zp(n))}`,`lucide-${n}`,a),...u}));return s.displayName=Zp(n),s};/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Q0=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],X0=Re("activity",Q0);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const q0=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],ru=Re("arrow-left",q0);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const J0=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Z0=Re("arrow-right",J0);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ew=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}]],em=Re("ban",ew);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const tw=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],nh=Re("check",tw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const nw=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],rw=Re("chevron-left",nw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ow=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],sw=Re("chevron-right",ow);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const iw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],ba=Re("circle-alert",iw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const aw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],ou=Re("circle-x",aw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const lw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],rh=Re("clock",lw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const cw=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],oh=Re("copy",cw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const uw=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],sh=Re("database",uw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const dw=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],Da=Re("download",dw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const fw=[["path",{d:"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"}]],pw=Re("eye-off",fw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const mw=[["path",{d:"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"}]],hw=Re("eye",mw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const gw=[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]],vw=Re("fingerprint-pattern",gw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const yw=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["path",{d:"M11 18H8a2 2 0 0 1-2-2V9",key:"19pyzm"}]],su=Re("git-compare",yw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const xw=[["path",{d:"M10 16h.01",key:"1bzywj"}],["path",{d:"M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"18tbho"}],["path",{d:"M21.946 12.013H2.054",key:"zqlbp7"}],["path",{d:"M6 16h.01",key:"1pmjb7"}]],tm=Re("hard-drive",xw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ww=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],ih=Re("history",ww);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Sw=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],ka=Re("key",Sw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const bw=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],kw=Re("layout-dashboard",bw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Cw=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Nw=Re("loader-circle",Cw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const jw=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],nm=Re("log-out",jw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ew=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],_w=Re("menu",Ew);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Pw=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],ah=Re("pencil",Pw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Rw=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Tw=Re("play",Rw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Mw=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Fo=Re("plus",Mw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ow=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],lh=Re("refresh-cw",Ow);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Lw=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],Aw=Re("scroll-text",Lw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Iw=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],ku=Re("server",Iw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Dw=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],zw=Re("settings",Dw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Fw=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],ch=Re("terminal",Fw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const $w=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Cu=Re("trash-2",$w);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Bw=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Uw=Re("triangle-alert",Bw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Vw=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],Bc=Re("upload",Vw);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ww=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],uh=Re("x",Ww);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Hw=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],dh=Re("zap",Hw);function rm(n,o){if(typeof n=="function")return n(o);n!=null&&(n.current=o)}function Kw(...n){return o=>{let s=!1;const a=n.map(u=>{const d=rm(u,o);return!s&&typeof d=="function"&&(s=!0),d});if(s)return()=>{for(let u=0;u{let{children:u,...d}=s,p=null,m=!1;const h=[];om(u)&&typeof la=="function"&&(u=la(u._payload)),v.Children.forEach(u,k=>{var b;if(Jw(k)){m=!0;const j=k;let S="child"in j.props?j.props.child:j.props.children;om(S)&&typeof la=="function"&&(S=la(S._payload)),p=Qw(j,S),h.push((b=p==null?void 0:p.props)==null?void 0:b.children)}else h.push(k)}),p?p=v.cloneElement(p,void 0,h):!m&&v.Children.count(u)===1&&v.isValidElement(u)&&(p=u);const y=p?qw(p):void 0,w=Qe(a,y);if(!p){if(u||u===0)throw new Error(m?n1(n):t1(n));return u}const g=Xw(d,p.props??{});return p.type!==v.Fragment&&(g.ref=a?w:y),v.cloneElement(p,g)});return o.displayName=`${n}.Slot`,o}var Yw=$o("Slot"),Gw=Symbol.for("radix.slottable"),Qw=(n,o)=>{if("child"in n.props){const s=n.props.child;return v.isValidElement(s)?v.cloneElement(s,void 0,n.props.children(s.props.children)):null}return v.isValidElement(o)?o:null};function Xw(n,o){const s={...o};for(const a in o){const u=n[a],d=o[a];/^on[A-Z]/.test(a)?u&&d?s[a]=(...m)=>{const h=d(...m);return u(...m),h}:u&&(s[a]=u):a==="style"?s[a]={...u,...d}:a==="className"&&(s[a]=[u,d].filter(Boolean).join(" "))}return{...n,...s}}function qw(n){var a,u;let o=(a=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:a.get,s=o&&"isReactWarning"in o&&o.isReactWarning;return s?n.ref:(o=(u=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:u.get,s=o&&"isReactWarning"in o&&o.isReactWarning,s?n.props.ref:n.props.ref||n.ref)}function Jw(n){return v.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===Gw}var Zw=Symbol.for("react.lazy");function om(n){return n!=null&&typeof n=="object"&&"$$typeof"in n&&n.$$typeof===Zw&&"_payload"in n&&e1(n._payload)}function e1(n){return typeof n=="object"&&n!==null&&"then"in n}var t1=n=>`${n} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,n1=n=>`${n} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,la=Ma[" use ".trim().toString()];function fh(n){var o,s,a="";if(typeof n=="string"||typeof n=="number")a+=n;else if(typeof n=="object")if(Array.isArray(n)){var u=n.length;for(o=0;otypeof n=="boolean"?`${n}`:n===0?"0":n,im=ph,mh=(n,o)=>s=>{var a;if((o==null?void 0:o.variants)==null)return im(n,s==null?void 0:s.class,s==null?void 0:s.className);const{variants:u,defaultVariants:d}=o,p=Object.keys(u).map(y=>{const w=s==null?void 0:s[y],g=d==null?void 0:d[y];if(w===null)return null;const k=sm(w)||sm(g);return u[y][k]}),m=s&&Object.entries(s).reduce((y,w)=>{let[g,k]=w;return k===void 0||(y[g]=k),y},{}),h=o==null||(a=o.compoundVariants)===null||a===void 0?void 0:a.reduce((y,w)=>{let{class:g,className:k,...b}=w;return Object.entries(b).every(j=>{let[S,C]=j;return Array.isArray(C)?C.includes({...d,...m}[S]):{...d,...m}[S]===C})?[...y,g,k]:y},[]);return im(n,p,h,s==null?void 0:s.class,s==null?void 0:s.className)},r1=(n,o)=>{const s=new Array(n.length+o.length);for(let a=0;a({classGroupId:n,validator:o}),hh=(n=new Map,o=null,s)=>({nextPart:n,validators:o,classGroupId:s}),Ca="-",am=[],s1="arbitrary..",i1=n=>{const o=l1(n),{conflictingClassGroups:s,conflictingClassGroupModifiers:a}=n;return{getClassGroupId:p=>{if(p.startsWith("[")&&p.endsWith("]"))return a1(p);const m=p.split(Ca),h=m[0]===""&&m.length>1?1:0;return gh(m,h,o)},getConflictingClassGroupIds:(p,m)=>{if(m){const h=a[p],y=s[p];return h?y?r1(y,h):h:y||am}return s[p]||am}}},gh=(n,o,s)=>{if(n.length-o===0)return s.classGroupId;const u=n[o],d=s.nextPart.get(u);if(d){const y=gh(n,o+1,d);if(y)return y}const p=s.validators;if(p===null)return;const m=o===0?n.join(Ca):n.slice(o).join(Ca),h=p.length;for(let y=0;yn.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const o=n.slice(1,-1),s=o.indexOf(":"),a=o.slice(0,s);return a?s1+a:void 0})(),l1=n=>{const{theme:o,classGroups:s}=n;return c1(s,o)},c1=(n,o)=>{const s=hh();for(const a in n){const u=n[a];Nu(u,s,a,o)}return s},Nu=(n,o,s,a)=>{const u=n.length;for(let d=0;d{if(typeof n=="string"){d1(n,o,s);return}if(typeof n=="function"){f1(n,o,s,a);return}p1(n,o,s,a)},d1=(n,o,s)=>{const a=n===""?o:vh(o,n);a.classGroupId=s},f1=(n,o,s,a)=>{if(m1(n)){Nu(n(a),o,s,a);return}o.validators===null&&(o.validators=[]),o.validators.push(o1(s,n))},p1=(n,o,s,a)=>{const u=Object.entries(n),d=u.length;for(let p=0;p{let s=n;const a=o.split(Ca),u=a.length;for(let d=0;d"isThemeGetter"in n&&n.isThemeGetter===!0,h1=n=>{if(n<1)return{get:()=>{},set:()=>{}};let o=0,s=Object.create(null),a=Object.create(null);const u=(d,p)=>{s[d]=p,o++,o>n&&(o=0,a=s,s=Object.create(null))};return{get(d){let p=s[d];if(p!==void 0)return p;if((p=a[d])!==void 0)return u(d,p),p},set(d,p){d in s?s[d]=p:u(d,p)}}},iu="!",lm=":",g1=[],cm=(n,o,s,a,u)=>({modifiers:n,hasImportantModifier:o,baseClassName:s,maybePostfixModifierPosition:a,isExternal:u}),v1=n=>{const{prefix:o,experimentalParseClassName:s}=n;let a=u=>{const d=[];let p=0,m=0,h=0,y;const w=u.length;for(let S=0;Sh?y-h:void 0;return cm(d,b,k,j)};if(o){const u=o+lm,d=a;a=p=>p.startsWith(u)?d(p.slice(u.length)):cm(g1,!1,p,void 0,!0)}if(s){const u=a;a=d=>s({className:d,parseClassName:u})}return a},y1=n=>{const o=new Map;return n.orderSensitiveModifiers.forEach((s,a)=>{o.set(s,1e6+a)}),s=>{const a=[];let u=[];for(let d=0;d0&&(u.sort(),a.push(...u),u=[]),a.push(p)):u.push(p)}return u.length>0&&(u.sort(),a.push(...u)),a}},x1=n=>({cache:h1(n.cacheSize),parseClassName:v1(n),sortModifiers:y1(n),postfixLookupClassGroupIds:w1(n),...i1(n)}),w1=n=>{const o=Object.create(null),s=n.postfixLookupClassGroups;if(s)for(let a=0;a{const{parseClassName:s,getClassGroupId:a,getConflictingClassGroupIds:u,sortModifiers:d,postfixLookupClassGroupIds:p}=o,m=[],h=n.trim().split(S1);let y="";for(let w=h.length-1;w>=0;w-=1){const g=h[w],{isExternal:k,modifiers:b,hasImportantModifier:j,baseClassName:S,maybePostfixModifierPosition:C}=s(g);if(k){y=g+(y.length>0?" "+y:y);continue}let E=!!C,T;if(E){const F=S.substring(0,C);T=a(F);const P=T&&p[T]?a(S):void 0;P&&P!==T&&(T=P,E=!1)}else T=a(S);if(!T){if(!E){y=g+(y.length>0?" "+y:y);continue}if(T=a(S),!T){y=g+(y.length>0?" "+y:y);continue}E=!1}const _=b.length===0?"":b.length===1?b[0]:d(b).join(":"),A=j?_+iu:_,D=A+T;if(m.indexOf(D)>-1)continue;m.push(D);const L=u(T,E);for(let F=0;F0?" "+y:y)}return y},k1=(...n)=>{let o=0,s,a,u="";for(;o{if(typeof n=="string")return n;let o,s="";for(let a=0;a{let s,a,u,d;const p=h=>{const y=o.reduce((w,g)=>g(w),n());return s=x1(y),a=s.cache.get,u=s.cache.set,d=m,m(h)},m=h=>{const y=a(h);if(y)return y;const w=b1(h,s);return u(h,w),w};return d=p,(...h)=>d(k1(...h))},N1=[],it=n=>{const o=s=>s[n]||N1;return o.isThemeGetter=!0,o},xh=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,wh=/^\((?:(\w[\w-]*):)?(.+)\)$/i,j1=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,E1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,_1=/\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$/,P1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,R1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,T1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,br=n=>j1.test(n),_e=n=>!!n&&!Number.isNaN(Number(n)),wn=n=>!!n&&Number.isInteger(Number(n)),Uc=n=>n.endsWith("%")&&_e(n.slice(0,-1)),Un=n=>E1.test(n),Sh=()=>!0,M1=n=>_1.test(n)&&!P1.test(n),ju=()=>!1,O1=n=>R1.test(n),L1=n=>T1.test(n),A1=n=>!de(n)&&!pe(n),I1=n=>n.startsWith("@container")&&(n[10]==="/"&&n[11]!==void 0||n[11]==="s"&&n[16]!==void 0&&n.startsWith("-size/",10)||n[11]==="n"&&n[18]!==void 0&&n.startsWith("-normal/",10)),D1=n=>Rr(n,Ch,ju),de=n=>xh.test(n),Xr=n=>Rr(n,Nh,M1),um=n=>Rr(n,H1,_e),z1=n=>Rr(n,Eh,Sh),F1=n=>Rr(n,jh,ju),dm=n=>Rr(n,bh,ju),$1=n=>Rr(n,kh,L1),ca=n=>Rr(n,_h,O1),pe=n=>wh.test(n),As=n=>to(n,Nh),B1=n=>to(n,jh),fm=n=>to(n,bh),U1=n=>to(n,Ch),V1=n=>to(n,kh),ua=n=>to(n,_h,!0),W1=n=>to(n,Eh,!0),Rr=(n,o,s)=>{const a=xh.exec(n);return a?a[1]?o(a[1]):s(a[2]):!1},to=(n,o,s=!1)=>{const a=wh.exec(n);return a?a[1]?o(a[1]):s:!1},bh=n=>n==="position"||n==="percentage",kh=n=>n==="image"||n==="url",Ch=n=>n==="length"||n==="size"||n==="bg-size",Nh=n=>n==="length",H1=n=>n==="number",jh=n=>n==="family-name",Eh=n=>n==="number"||n==="weight",_h=n=>n==="shadow",K1=()=>{const n=it("color"),o=it("font"),s=it("text"),a=it("font-weight"),u=it("tracking"),d=it("leading"),p=it("breakpoint"),m=it("container"),h=it("spacing"),y=it("radius"),w=it("shadow"),g=it("inset-shadow"),k=it("text-shadow"),b=it("drop-shadow"),j=it("blur"),S=it("perspective"),C=it("aspect"),E=it("ease"),T=it("animate"),_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],D=()=>[...A(),pe,de],L=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto","contain","none"],P=()=>[pe,de,h],X=()=>[br,"full","auto",...P()],se=()=>[wn,"none","subgrid",pe,de],oe=()=>["auto",{span:["full",wn,pe,de]},wn,pe,de],he=()=>[wn,"auto",pe,de],W=()=>["auto","min","max","fr",pe,de],le=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ve=()=>["start","end","center","stretch","center-safe","end-safe"],Y=()=>["auto",...P()],Z=()=>[br,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],U=()=>[br,"screen","full","dvw","lvw","svw","min","max","fit",...P()],Q=()=>[br,"screen","full","lh","dvh","lvh","svh","min","max","fit",...P()],$=()=>[n,pe,de],O=()=>[...A(),fm,dm,{position:[pe,de]}],V=()=>["no-repeat",{repeat:["","x","y","space","round"]}],q=()=>["auto","cover","contain",U1,D1,{size:[pe,de]}],ie=()=>[Uc,As,Xr],re=()=>["","none","full",y,pe,de],ce=()=>["",_e,As,Xr],ne=()=>["solid","dashed","dotted","double"],ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ue=()=>[_e,Uc,fm,dm],ke=()=>["","none",j,pe,de],Ne=()=>["none",_e,pe,de],Ee=()=>["none",_e,pe,de],qe=()=>[_e,pe,de],We=()=>[br,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Un],breakpoint:[Un],color:[Sh],container:[Un],"drop-shadow":[Un],ease:["in","out","in-out"],font:[A1],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Un],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Un],shadow:[Un],spacing:["px",_e],text:[Un],"text-shadow":[Un],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",br,de,pe,C]}],container:["container"],"container-type":[{"@container":["","normal","size",pe,de]}],"container-named":[I1],columns:[{columns:[_e,de,pe,m]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"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:D()}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:X()}],"inset-x":[{"inset-x":X()}],"inset-y":[{"inset-y":X()}],start:[{"inset-s":X(),start:X()}],end:[{"inset-e":X(),end:X()}],"inset-bs":[{"inset-bs":X()}],"inset-be":[{"inset-be":X()}],top:[{top:X()}],right:[{right:X()}],bottom:[{bottom:X()}],left:[{left:X()}],visibility:["visible","invisible","collapse"],z:[{z:[wn,"auto",pe,de]}],basis:[{basis:[br,"full","auto",m,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[_e,br,"auto","initial","none",de]}],grow:[{grow:["",_e,pe,de]}],shrink:[{shrink:["",_e,pe,de]}],order:[{order:[wn,"first","last","none",pe,de]}],"grid-cols":[{"grid-cols":se()}],"col-start-end":[{col:oe()}],"col-start":[{"col-start":he()}],"col-end":[{"col-end":he()}],"grid-rows":[{"grid-rows":se()}],"row-start-end":[{row:oe()}],"row-start":[{"row-start":he()}],"row-end":[{"row-end":he()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":W()}],"auto-rows":[{"auto-rows":W()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...le(),"normal"]}],"justify-items":[{"justify-items":[...ve(),"normal"]}],"justify-self":[{"justify-self":["auto",...ve()]}],"align-content":[{content:["normal",...le()]}],"align-items":[{items:[...ve(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ve(),{baseline:["","last"]}]}],"place-content":[{"place-content":le()}],"place-items":[{"place-items":[...ve(),"baseline"]}],"place-self":[{"place-self":["auto",...ve()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pbs:[{pbs:P()}],pbe:[{pbe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:Y()}],mx:[{mx:Y()}],my:[{my:Y()}],ms:[{ms:Y()}],me:[{me:Y()}],mbs:[{mbs:Y()}],mbe:[{mbe:Y()}],mt:[{mt:Y()}],mr:[{mr:Y()}],mb:[{mb:Y()}],ml:[{ml:Y()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:Z()}],"inline-size":[{inline:["auto",...U()]}],"min-inline-size":[{"min-inline":["auto",...U()]}],"max-inline-size":[{"max-inline":["none",...U()]}],"block-size":[{block:["auto",...Q()]}],"min-block-size":[{"min-block":["auto",...Q()]}],"max-block-size":[{"max-block":["none",...Q()]}],w:[{w:[m,"screen",...Z()]}],"min-w":[{"min-w":[m,"screen","none",...Z()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[p]},...Z()]}],h:[{h:["screen","lh",...Z()]}],"min-h":[{"min-h":["screen","lh","none",...Z()]}],"max-h":[{"max-h":["screen","lh",...Z()]}],"font-size":[{text:["base",s,As,Xr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,W1,z1]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Uc,de]}],"font-family":[{font:[B1,F1,o]}],"font-features":[{"font-features":[de]}],"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:[u,pe,de]}],"line-clamp":[{"line-clamp":[_e,"none",pe,um]}],leading:[{leading:[d,...P()]}],"list-image":[{"list-image":["none",pe,de]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",pe,de]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:$()}],"text-color":[{text:$()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ne(),"wavy"]}],"text-decoration-thickness":[{decoration:[_e,"from-font","auto",pe,Xr]}],"text-decoration-color":[{decoration:$()}],"underline-offset":[{"underline-offset":[_e,"auto",pe,de]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"tab-size":[{tab:[wn,pe,de]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",pe,de]}],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",pe,de]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:V()}],"bg-size":[{bg:q()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},wn,pe,de],radial:["",pe,de],conic:[wn,pe,de]},V1,$1]}],"bg-color":[{bg:$()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:$()}],"gradient-via":[{via:$()}],"gradient-to":[{to:$()}],rounded:[{rounded:re()}],"rounded-s":[{"rounded-s":re()}],"rounded-e":[{"rounded-e":re()}],"rounded-t":[{"rounded-t":re()}],"rounded-r":[{"rounded-r":re()}],"rounded-b":[{"rounded-b":re()}],"rounded-l":[{"rounded-l":re()}],"rounded-ss":[{"rounded-ss":re()}],"rounded-se":[{"rounded-se":re()}],"rounded-ee":[{"rounded-ee":re()}],"rounded-es":[{"rounded-es":re()}],"rounded-tl":[{"rounded-tl":re()}],"rounded-tr":[{"rounded-tr":re()}],"rounded-br":[{"rounded-br":re()}],"rounded-bl":[{"rounded-bl":re()}],"border-w":[{border:ce()}],"border-w-x":[{"border-x":ce()}],"border-w-y":[{"border-y":ce()}],"border-w-s":[{"border-s":ce()}],"border-w-e":[{"border-e":ce()}],"border-w-bs":[{"border-bs":ce()}],"border-w-be":[{"border-be":ce()}],"border-w-t":[{"border-t":ce()}],"border-w-r":[{"border-r":ce()}],"border-w-b":[{"border-b":ce()}],"border-w-l":[{"border-l":ce()}],"divide-x":[{"divide-x":ce()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ce()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ne(),"hidden","none"]}],"divide-style":[{divide:[...ne(),"hidden","none"]}],"border-color":[{border:$()}],"border-color-x":[{"border-x":$()}],"border-color-y":[{"border-y":$()}],"border-color-s":[{"border-s":$()}],"border-color-e":[{"border-e":$()}],"border-color-bs":[{"border-bs":$()}],"border-color-be":[{"border-be":$()}],"border-color-t":[{"border-t":$()}],"border-color-r":[{"border-r":$()}],"border-color-b":[{"border-b":$()}],"border-color-l":[{"border-l":$()}],"divide-color":[{divide:$()}],"outline-style":[{outline:[...ne(),"none","hidden"]}],"outline-offset":[{"outline-offset":[_e,pe,de]}],"outline-w":[{outline:["",_e,As,Xr]}],"outline-color":[{outline:$()}],shadow:[{shadow:["","none",w,ua,ca]}],"shadow-color":[{shadow:$()}],"inset-shadow":[{"inset-shadow":["none",g,ua,ca]}],"inset-shadow-color":[{"inset-shadow":$()}],"ring-w":[{ring:ce()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:$()}],"ring-offset-w":[{"ring-offset":[_e,Xr]}],"ring-offset-color":[{"ring-offset":$()}],"inset-ring-w":[{"inset-ring":ce()}],"inset-ring-color":[{"inset-ring":$()}],"text-shadow":[{"text-shadow":["none",k,ua,ca]}],"text-shadow-color":[{"text-shadow":$()}],opacity:[{opacity:[_e,pe,de]}],"mix-blend":[{"mix-blend":[...ee(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ee()}],"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":[_e]}],"mask-image-linear-from-pos":[{"mask-linear-from":ue()}],"mask-image-linear-to-pos":[{"mask-linear-to":ue()}],"mask-image-linear-from-color":[{"mask-linear-from":$()}],"mask-image-linear-to-color":[{"mask-linear-to":$()}],"mask-image-t-from-pos":[{"mask-t-from":ue()}],"mask-image-t-to-pos":[{"mask-t-to":ue()}],"mask-image-t-from-color":[{"mask-t-from":$()}],"mask-image-t-to-color":[{"mask-t-to":$()}],"mask-image-r-from-pos":[{"mask-r-from":ue()}],"mask-image-r-to-pos":[{"mask-r-to":ue()}],"mask-image-r-from-color":[{"mask-r-from":$()}],"mask-image-r-to-color":[{"mask-r-to":$()}],"mask-image-b-from-pos":[{"mask-b-from":ue()}],"mask-image-b-to-pos":[{"mask-b-to":ue()}],"mask-image-b-from-color":[{"mask-b-from":$()}],"mask-image-b-to-color":[{"mask-b-to":$()}],"mask-image-l-from-pos":[{"mask-l-from":ue()}],"mask-image-l-to-pos":[{"mask-l-to":ue()}],"mask-image-l-from-color":[{"mask-l-from":$()}],"mask-image-l-to-color":[{"mask-l-to":$()}],"mask-image-x-from-pos":[{"mask-x-from":ue()}],"mask-image-x-to-pos":[{"mask-x-to":ue()}],"mask-image-x-from-color":[{"mask-x-from":$()}],"mask-image-x-to-color":[{"mask-x-to":$()}],"mask-image-y-from-pos":[{"mask-y-from":ue()}],"mask-image-y-to-pos":[{"mask-y-to":ue()}],"mask-image-y-from-color":[{"mask-y-from":$()}],"mask-image-y-to-color":[{"mask-y-to":$()}],"mask-image-radial":[{"mask-radial":[pe,de]}],"mask-image-radial-from-pos":[{"mask-radial-from":ue()}],"mask-image-radial-to-pos":[{"mask-radial-to":ue()}],"mask-image-radial-from-color":[{"mask-radial-from":$()}],"mask-image-radial-to-color":[{"mask-radial-to":$()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":A()}],"mask-image-conic-pos":[{"mask-conic":[_e]}],"mask-image-conic-from-pos":[{"mask-conic-from":ue()}],"mask-image-conic-to-pos":[{"mask-conic-to":ue()}],"mask-image-conic-from-color":[{"mask-conic-from":$()}],"mask-image-conic-to-color":[{"mask-conic-to":$()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:V()}],"mask-size":[{mask:q()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",pe,de]}],filter:[{filter:["","none",pe,de]}],blur:[{blur:ke()}],brightness:[{brightness:[_e,pe,de]}],contrast:[{contrast:[_e,pe,de]}],"drop-shadow":[{"drop-shadow":["","none",b,ua,ca]}],"drop-shadow-color":[{"drop-shadow":$()}],grayscale:[{grayscale:["",_e,pe,de]}],"hue-rotate":[{"hue-rotate":[_e,pe,de]}],invert:[{invert:["",_e,pe,de]}],saturate:[{saturate:[_e,pe,de]}],sepia:[{sepia:["",_e,pe,de]}],"backdrop-filter":[{"backdrop-filter":["","none",pe,de]}],"backdrop-blur":[{"backdrop-blur":ke()}],"backdrop-brightness":[{"backdrop-brightness":[_e,pe,de]}],"backdrop-contrast":[{"backdrop-contrast":[_e,pe,de]}],"backdrop-grayscale":[{"backdrop-grayscale":["",_e,pe,de]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[_e,pe,de]}],"backdrop-invert":[{"backdrop-invert":["",_e,pe,de]}],"backdrop-opacity":[{"backdrop-opacity":[_e,pe,de]}],"backdrop-saturate":[{"backdrop-saturate":[_e,pe,de]}],"backdrop-sepia":[{"backdrop-sepia":["",_e,pe,de]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",pe,de]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[_e,"initial",pe,de]}],ease:[{ease:["linear","initial",E,pe,de]}],delay:[{delay:[_e,pe,de]}],animate:[{animate:["none",T,pe,de]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,pe,de]}],"perspective-origin":[{"perspective-origin":D()}],rotate:[{rotate:Ne()}],"rotate-x":[{"rotate-x":Ne()}],"rotate-y":[{"rotate-y":Ne()}],"rotate-z":[{"rotate-z":Ne()}],scale:[{scale:Ee()}],"scale-x":[{"scale-x":Ee()}],"scale-y":[{"scale-y":Ee()}],"scale-z":[{"scale-z":Ee()}],"scale-3d":["scale-3d"],skew:[{skew:qe()}],"skew-x":[{"skew-x":qe()}],"skew-y":[{"skew-y":qe()}],transform:[{transform:[pe,de,"","none","gpu","cpu"]}],"transform-origin":[{origin:D()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:We()}],"translate-x":[{"translate-x":We()}],"translate-y":[{"translate-y":We()}],"translate-z":[{"translate-z":We()}],"translate-none":["translate-none"],zoom:[{zoom:[wn,pe,de]}],accent:[{accent:$()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:$()}],"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",pe,de]}],"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":$()}],"scrollbar-track-color":[{"scrollbar-track":$()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mbs":[{"scroll-mbs":P()}],"scroll-mbe":[{"scroll-mbe":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pbs":[{"scroll-pbs":P()}],"scroll-pbe":[{"scroll-pbe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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",pe,de]}],fill:[{fill:["none",...$()]}],"stroke-w":[{stroke:[_e,As,Xr,um]}],stroke:[{stroke:["none",...$()]}],"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":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Y1=C1(K1);function be(...n){return Y1(ph(n))}function Ph(n){if(n<1e3)return`${n}ms`;const o=Math.floor(n/1e3);if(o<60)return`${o}s`;const s=Math.floor(o/60),a=o%60;if(s<60)return`${s}m ${a}s`;const u=Math.floor(s/60),d=s%60;return`${u}h ${d}m`}function G1(n){const o=typeof n=="string"?new Date(n):n,a=new Date().getTime()-o.getTime(),u=Math.floor(a/1e3);if(u<60)return"just now";const d=Math.floor(u/60);if(d<60)return`${d}m ago`;const p=Math.floor(d/60);if(p<24)return`${p}h ago`;const m=Math.floor(p/24);return m<7?`${m}d ago`:o.toLocaleDateString()}const pm=mh("inline-flex items-center justify-center gap-2 rounded-card font-medium transition-all duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/40 focus-visible:ring-offset-2 focus-visible:ring-offset-canvas disabled:pointer-events-none disabled:opacity-50 active:scale-[0.98]",{variants:{variant:{primary:"bg-accent text-accent-foreground hover:bg-accent-hover shadow-sm hover:shadow-glow",secondary:"bg-surface-raised text-fg border border-border hover:bg-surface-hover hover:border-border/80",ghost:"text-fg-muted hover:text-fg hover:bg-surface-raised",danger:"bg-rose-500/15 text-rose-400 border border-rose-500/30 hover:bg-rose-500/25 hover:border-rose-500/50 hover:shadow-glow-error","danger-solid":"bg-rose-500 text-white hover:bg-rose-600 shadow-sm",link:"text-accent underline-offset-4 hover:underline hover:text-accent-hover"},size:{sm:"h-8 px-3 text-xs",md:"h-9 px-4 text-sm",lg:"h-11 px-6 text-base",icon:"h-9 w-9","icon-sm":"h-8 w-8","icon-lg":"h-10 w-10"}},defaultVariants:{variant:"primary",size:"md"}}),xe=v.forwardRef(({className:n,variant:o,size:s,loading:a,disabled:u,asChild:d=!1,children:p,...m},h)=>d?l.jsx(Yw,{className:be(pm({variant:o,size:s,className:n})),ref:h,...m,children:p}):l.jsxs("button",{className:be(pm({variant:o,size:s,className:n})),ref:h,disabled:u||a,...m,children:[a&&l.jsx(Nw,{className:"h-4 w-4 animate-spin"}),p]}));xe.displayName="Button";class Q1 extends v.Component{constructor(s){super(s);Mp(this,"handleReload",()=>{this.setState({hasError:!1,error:null}),window.location.reload()});this.state={hasError:!1,error:null}}static getDerivedStateFromError(s){return{hasError:!0,error:s}}componentDidCatch(s,a){console.error("ErrorBoundary caught:",s,a)}render(){var s;return this.state.hasError?this.props.fallback?this.props.fallback:l.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[50vh] gap-4 p-8 text-center",children:[l.jsx("div",{className:"rounded-full bg-rose-500/10 p-4 text-rose-400",children:l.jsx(Uw,{className:"h-8 w-8"})}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("h2",{className:"text-lg font-semibold text-fg",children:"Something went wrong"}),l.jsx("p",{className:"text-sm text-fg-muted max-w-md",children:((s=this.state.error)==null?void 0:s.message)??"An unexpected error occurred"})]}),l.jsxs(xe,{variant:"secondary",onClick:this.handleReload,className:"gap-2",children:[l.jsx(lh,{className:"h-4 w-4"}),"Reload page"]})]}):this.props.children}}const Eu=v.forwardRef(({className:n,size:o="md",...s},a)=>{const u={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"};return l.jsx("div",{ref:a,role:"status","aria-label":"Loading",className:be("animate-spin text-accent",u[o],n),...s,children:l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"h-full w-full",children:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),l.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]})})});Eu.displayName="Spinner";const X1="";function q1(n){return Array.isArray(n)}async function Be(n,o={}){const{method:s="GET",body:a}=o,u=await fetch(`${X1}${n}`,{method:s,headers:a?{"Content-Type":"application/json"}:{},body:a?JSON.stringify(a):void 0,credentials:"include"});if(!u.ok){const p=await u.json().catch(()=>({error:u.statusText}));throw new Error(p.error||"Request failed")}if(u.status===204)return;const d=await u.json().catch(()=>null);if(d!==null)return q1(d)&&!d.length&&d[0]===void 0?[]:d}const ht=v.forwardRef(({className:n,type:o,error:s,...a},u)=>l.jsx("input",{type:o,className:be("flex h-9 w-full rounded-card border bg-surface-raised px-3 py-2 text-sm text-fg placeholder:text-fg-subtle transition-colors","border-border hover:border-border/80","focus:outline-none focus:ring-2 focus:ring-accent/30 focus:border-accent/50","disabled:cursor-not-allowed disabled:opacity-50",s&&"border-rose-500/50 focus:ring-rose-500/30 focus:border-rose-500/50",n),ref:u,...a}));ht.displayName="Input";const De=v.forwardRef(({className:n,required:o,children:s,...a},u)=>l.jsxs("label",{ref:u,className:be("text-sm font-medium text-fg-muted leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",n),...a,children:[s,o&&l.jsx("span",{className:"ml-1 text-rose-400",children:"*"})]}));De.displayName="Label";const $t=v.forwardRef(({className:n,...o},s)=>l.jsx("div",{ref:s,className:be("rounded-card border border-border bg-surface shadow-card",n),...o}));$t.displayName="Card";const au=v.forwardRef(({className:n,...o},s)=>l.jsx("div",{ref:s,className:be("flex flex-col gap-1 p-5",n),...o}));au.displayName="CardHeader";const lu=v.forwardRef(({className:n,...o},s)=>l.jsx("h3",{ref:s,className:be("text-sm font-semibold text-fg",n),...o}));lu.displayName="CardTitle";const J1=v.forwardRef(({className:n,...o},s)=>l.jsx("p",{ref:s,className:be("text-xs text-fg-muted",n),...o}));J1.displayName="CardDescription";const jr=v.forwardRef(({className:n,...o},s)=>l.jsx("div",{ref:s,className:be("p-5 pt-0",n),...o}));jr.displayName="CardBody";const Z1=v.forwardRef(({className:n,...o},s)=>l.jsx("div",{ref:s,className:be("flex items-center gap-3 p-5 pt-0",n),...o}));Z1.displayName="CardFooter";function eS(){const[n,o]=v.useState(""),[s,a]=v.useState(""),[u,d]=v.useState(!1),[p,m]=v.useState(!1),h=Aa();async function y(w){if(w.preventDefault(),!n.trim()||!s.trim()){Te.error("Username and password are required");return}m(!0);try{const g=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({username:n,password:s})});if(g.ok)h("/");else{const k=await g.json();Te.error(k.error||"Login failed")}}catch{Te.error("Network error")}finally{m(!1)}}return l.jsxs("div",{className:"min-h-screen flex items-center justify-center bg-canvas relative overflow-hidden",children:[l.jsx("div",{className:"absolute inset-0 opacity-[0.03]",style:{backgroundImage:`radial-gradient(circle at 30% 40%, #2dd4bf 0%, transparent 50%), - radial-gradient(circle at 80% 60%, #2dd4bf 0%, transparent 40%)`}}),l.jsxs("div",{className:"relative w-full max-w-sm mx-4",children:[l.jsxs("div",{className:"flex flex-col items-center mb-8 animate-fade-in",children:[l.jsx("div",{className:"rounded-card bg-accent/10 p-3 mb-4",children:l.jsx(sh,{className:"h-8 w-8 text-accent"})}),l.jsx("h1",{className:"text-2xl font-bold text-fg tracking-tight",children:"SyncServer"}),l.jsx("p",{className:"text-fg-muted text-sm mt-1",children:"Sign in to your account"})]}),l.jsx($t,{className:"animate-scale-in",style:{animationDelay:"50ms"},children:l.jsx(jr,{children:l.jsxs("form",{onSubmit:y,className:"space-y-4",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(De,{htmlFor:"username",required:!0,children:"Username"}),l.jsx(ht,{id:"username",type:"text",placeholder:"admin",value:n,onChange:w=>o(w.target.value),autoComplete:"username",autoFocus:!0})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(De,{htmlFor:"password",required:!0,children:"Password"}),l.jsxs("div",{className:"relative",children:[l.jsx(ht,{id:"password",type:u?"text":"password",placeholder:"••••••••",value:s,onChange:w=>a(w.target.value),autoComplete:"current-password",className:"pr-10"}),l.jsx("button",{type:"button",onClick:()=>d(w=>!w),className:"absolute right-3 top-1/2 -translate-y-1/2 text-fg-subtle hover:text-fg-muted transition-colors",tabIndex:-1,children:u?l.jsx(pw,{className:"h-4 w-4"}):l.jsx(hw,{className:"h-4 w-4"})})]})]}),l.jsx(xe,{type:"submit",className:"w-full",loading:p,children:"Sign In"})]})})})]})]})}const tS=mh("inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium transition-colors",{variants:{variant:{running:"bg-emerald-500/15 text-emerald-400 border border-emerald-500/30",pending:"bg-amber-500/15 text-amber-400 border border-amber-500/30",waking:"bg-amber-500/15 text-amber-400 border border-amber-500/30",success:"bg-emerald-500/15 text-emerald-400 border border-emerald-500/30",error:"bg-rose-500/15 text-rose-400 border border-rose-500/30",info:"bg-sky-500/15 text-sky-400 border border-sky-500/30",neutral:"bg-zinc-500/15 text-zinc-400 border border-zinc-500/30"}},defaultVariants:{variant:"neutral"}}),nS={running:"running",pending:"pending",waking:"waking",success:"success",error:"error",failed:"error",completed:"success",cancelled:"neutral",info:"info",unknown:"neutral"};function za(n){return nS[n.toLowerCase()]??"neutral"}function Fa(n){return{running:"Running",pending:"Pending",waking:"Waking",success:"Success",error:"Error",failed:"Failed",completed:"Completed",cancelled:"Cancelled",info:"Info",unknown:"Unknown"}[n.toLowerCase()]??n}const rS={wol_timeout:{title:"Machine didn't wake up",hint:"Waited for machine to respond and got no SSH reply. Make sure the server and the target machine are on the same L2 broadcast domain. For HP Microservers and similar hardware, increase the Wake timeout in the machine settings (180s or more)."},wol_send_failed:{title:"Wake-on-LAN packet failed to send",hint:"The magic packet could not be sent. Check the server logs for details. The server must be on the same broadcast domain as the target machine NIC and must have NET_ADMIN or CAP_NET_RAW capability."},rsync_error:{title:"rsync failed",hint:"See the full log for rsync error details"},exit_code:{title:"rsync exited with errors",hint:"Check stderr output for details"},ssh_key_fallback:{title:"SSH key not found",hint:"Server fell back to its own key. Verify the machine SSH key configuration"},cancelled_user:{title:"Cancelled by user",hint:"The job was manually cancelled from the UI"},cancelled_shutdown:{title:"Cancelled — server shutdown",hint:"The job was interrupted because the syncserver process stopped"},unknown_cancelled:{title:"Cancelled (no reason recorded)",hint:"This cancellation happened before the upgrade that records reasons"}};function Rh(n){return n?rS[n]??{title:n,hint:"See full error details below"}:null}const un=v.forwardRef(({className:n,variant:o,label:s,children:a,...u},d)=>{const p=s??(typeof o=="string"?Fa(o):a);return l.jsx("span",{ref:d,className:be(tS({variant:o}),n),...u,children:p})});un.displayName="Badge";const no=v.forwardRef(({className:n,title:o,description:s,actions:a,...u},d)=>l.jsxs("div",{ref:d,className:be("flex flex-col gap-1 sm:flex-row sm:items-center sm:justify-between",n),...u,children:[l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("h1",{className:"text-2xl font-bold text-fg tracking-tight",children:o}),s&&l.jsx("p",{className:"mt-1 text-sm text-fg-muted",children:s})]}),a&&l.jsx("div",{className:"flex items-center gap-2 mt-3 sm:mt-0 shrink-0",children:a})]}));no.displayName="PageHeader";const Ws=v.forwardRef(({className:n,...o},s)=>l.jsx("div",{className:"relative w-full overflow-auto",children:l.jsx("table",{ref:s,className:be("w-full caption-bottom text-sm",n),...o})}));Ws.displayName="Table";const Hs=v.forwardRef(({className:n,...o},s)=>l.jsx("thead",{ref:s,className:be("[&_tr]:border-b",n),...o}));Hs.displayName="TableHeader";const Ks=v.forwardRef(({className:n,...o},s)=>l.jsx("tbody",{ref:s,className:be("[&_tr:last-child]:border-0",n),...o}));Ks.displayName="TableBody";const oS=v.forwardRef(({className:n,...o},s)=>l.jsx("tfoot",{ref:s,className:be("border-t bg-surface-raised font-medium [&>tr]:last:border-b-0",n),...o}));oS.displayName="TableFooter";const Wn=v.forwardRef(({className:n,...o},s)=>l.jsx("tr",{ref:s,className:be("border-b border-border/50 transition-colors","hover:bg-surface-raised/50",n),...o}));Wn.displayName="TableRow";const ze=v.forwardRef(({className:n,...o},s)=>l.jsx("th",{ref:s,className:be("h-10 px-4 text-left align-middle text-xs font-semibold text-fg-muted uppercase tracking-wider","[&:has([role=checkbox])]:pr-0",n),...o}));ze.displayName="TableHead";const Fe=v.forwardRef(({className:n,...o},s)=>l.jsx("td",{ref:s,className:be("px-4 py-3 align-middle text-sm text-fg","[&:has([role=checkbox])]:pr-0",n),...o}));Fe.displayName="TableCell";const sS=v.forwardRef(({className:n,...o},s)=>l.jsx("caption",{ref:s,className:be("mt-4 text-sm text-fg-muted",n),...o}));sS.displayName="TableCaption";const Yo=v.forwardRef(({className:n,icon:o,title:s,description:a,action:u,...d},p)=>l.jsxs("div",{ref:p,className:be("flex flex-col items-center justify-center gap-3 py-12 text-center",n),...d,children:[o&&l.jsx("div",{className:"rounded-full bg-surface-raised p-3 text-fg-subtle",children:o}),l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:"text-sm font-medium text-fg",children:s}),a&&l.jsx("p",{className:"text-xs text-fg-muted max-w-xs",children:a})]}),u&&l.jsx("div",{className:"mt-1",children:u})]}));Yo.displayName="EmptyState";const zs=v.forwardRef(({className:n,variant:o="rectangular",width:s,height:a,style:u,...d},p)=>{const m=o==="circular"?"rounded-full":o==="text"?"rounded":"rounded-card";return l.jsx("div",{ref:p,className:be("animate-pulse bg-surface-raised",m,n),style:{width:s,height:a,...u},...d})});zs.displayName="Skeleton";function Th(n){const o=new EventSource("/api/jobs/stream");return o.addEventListener("machine_status",s=>{try{const a=JSON.parse(s.data);n(a)}catch{}}),()=>o.close()}function iS(){const[n,o]=v.useState([]),[s,a]=v.useState([]),[u,d]=v.useState([]),[p,m]=v.useState(!0);v.useEffect(()=>{Promise.all([Be("/api/machines"),Be("/api/jobs?limit=5"),Be("/api/sync-pairs")]).then(([b,j,S])=>{o(b),a(j),d(S)}).catch(()=>{}).finally(()=>m(!1)),Be("/api/machines/refresh",{method:"POST"}).catch(()=>{})},[]),v.useEffect(()=>Th(j=>{o(S=>S.map(C=>C.id===j.machine_id?{...C,status:j.status}:C))}),[]);const h=b=>{var j;return((j=u.find(S=>S.id===b))==null?void 0:j.name)??`Pair ${b}`},y=n.filter(b=>b.status.startsWith("online")).length,w=s.filter(b=>b.started_at?b.started_at.startsWith(new Date().toISOString().split("T")[0]):!1).length,g=s.filter(b=>["running","queued","waking_up"].includes(b.status)).length,k=[{label:"Total Machines",value:n.length,icon:ku,className:"text-sky-400",bgClass:"bg-sky-500/10"},{label:"Online",value:y,icon:X0,className:"text-emerald-400",bgClass:"bg-emerald-500/10",accent:y>0},{label:"Jobs Today",value:w,icon:rh,className:"text-amber-400",bgClass:"bg-amber-500/10"},{label:"Running",value:g,icon:tm,className:"text-accent",bgClass:"bg-accent/10"}];return l.jsxs("div",{className:"space-y-6",children:[l.jsx(no,{title:"Dashboard",description:"Overview of your sync infrastructure"}),l.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:p?Array.from({length:4}).map((b,j)=>l.jsx($t,{children:l.jsxs(jr,{children:[l.jsx(zs,{className:"h-4 w-20 mb-3"}),l.jsx(zs,{className:"h-8 w-12"})]})},j)):k.map(b=>{const j=b.icon;return l.jsx($t,{className:"transition-shadow hover:shadow-card-hover",children:l.jsxs(jr,{children:[l.jsxs("div",{className:"flex items-start justify-between mb-3",children:[l.jsx("span",{className:"text-xs font-medium text-fg-muted uppercase tracking-wider",children:b.label}),l.jsx("div",{className:`rounded-card p-1.5 ${b.bgClass}`,children:l.jsx(j,{className:`h-3.5 w-3.5 ${b.className}`})})]}),l.jsx("p",{className:`text-3xl font-bold ${b.className}`,children:b.value})]})},b.label)})}),l.jsxs($t,{children:[l.jsxs("div",{className:"p-5 pb-0 flex items-center justify-between",children:[l.jsx("h2",{className:"text-base font-semibold text-fg",children:"Recent Jobs"}),l.jsx(xe,{variant:"ghost",size:"sm",asChild:!0,children:l.jsx(zo,{to:"/jobs",children:"View all"})})]}),l.jsx("div",{className:"p-5",children:p?l.jsx("div",{className:"space-y-3",children:Array.from({length:3}).map((b,j)=>l.jsx(zs,{className:"h-10 w-full"},j))}):s.length===0?l.jsx(Yo,{icon:l.jsx(tm,{className:"h-5 w-5"}),title:"No jobs yet",description:"Sync pairs will appear here once jobs are executed"}):l.jsxs(Ws,{children:[l.jsx(Hs,{children:l.jsxs(Wn,{children:[l.jsx(ze,{children:"ID"}),l.jsx(ze,{children:"Sync Pair"}),l.jsx(ze,{children:"Status"}),l.jsx(ze,{children:"Started"})]})}),l.jsx(Ks,{children:s.map(b=>l.jsxs(Wn,{children:[l.jsx(Fe,{children:l.jsxs(zo,{to:`/jobs/${b.id}`,className:"text-accent hover:text-accent-hover font-mono text-xs",children:["#",b.id]})}),l.jsx(Fe,{className:"text-fg-muted",children:h(b.sync_pair_id)}),l.jsx(Fe,{children:l.jsx(un,{variant:za(b.status),label:Fa(b.status)})}),l.jsx(Fe,{className:"text-fg-muted text-xs",children:b.started_at?G1(b.started_at):"-"})]},b.id))})]})})]})]})}function mm(n,[o,s]){return Math.min(s,Math.max(o,n))}function $e(n,o,{checkForDefaultPrevented:s=!0}={}){return function(u){if(n==null||n(u),s===!1||!u||!u.defaultPrevented)return o==null?void 0:o(u)}}function Ys(n,o=[]){let s=[];function a(d,p){const m=v.createContext(p);m.displayName=d+"Context";const h=s.length;s=[...s,p];const y=g=>{var E;const{scope:k,children:b,...j}=g,S=((E=k==null?void 0:k[n])==null?void 0:E[h])||m,C=v.useMemo(()=>j,Object.values(j));return l.jsx(S.Provider,{value:C,children:b})};y.displayName=d+"Provider";function w(g,k,b={}){var E;const{optional:j=!1}=b,S=((E=k==null?void 0:k[n])==null?void 0:E[h])||m,C=v.useContext(S);if(C)return C;if(p!==void 0)return p;if(!j)throw new Error(`\`${g}\` must be used within \`${d}\``)}return[y,w]}const u=()=>{const d=s.map(p=>v.createContext(p));return function(m){const h=(m==null?void 0:m[n])||d;return v.useMemo(()=>({[`__scope${n}`]:{...m,[n]:h}}),[m,h])}};return u.scopeName=n,[a,aS(u,...o)]}function aS(...n){const o=n[0];if(n.length===1)return o;const s=()=>{const a=n.map(u=>({useScope:u(),scopeName:u.scopeName}));return function(d){const p=a.reduce((m,{useScope:h,scopeName:y})=>{const g=h(d)[`__scope${y}`];return{...m,...g}},{});return v.useMemo(()=>({[`__scope${o.scopeName}`]:p}),[p])}};return s.scopeName=o.scopeName,s}function lS(n){const o=n+"CollectionProvider",[s,a]=Ys(o),[u,d]=s(o,{collectionRef:{current:null},itemMap:new Map}),p=S=>{const{scope:C,children:E}=S,T=v.useRef(null),_=v.useRef(new Map).current;return l.jsx(u,{scope:C,itemMap:_,collectionRef:T,children:E})};p.displayName=o;const m=n+"CollectionSlot",h=$o(m),y=v.forwardRef((S,C)=>{const{scope:E,children:T}=S,_=d(m,E),A=Qe(C,_.collectionRef);return l.jsx(h,{ref:A,children:T})});y.displayName=m;const w=n+"CollectionItemSlot",g="data-radix-collection-item",k=$o(w),b=v.forwardRef((S,C)=>{const{scope:E,children:T,..._}=S,A=v.useRef(null),D=Qe(C,A),L=d(w,E);return v.useEffect(()=>(L.itemMap.set(A,{ref:A,..._}),()=>void L.itemMap.delete(A))),l.jsx(k,{[g]:"",ref:D,children:T})});b.displayName=w;function j(S){const C=d(n+"CollectionConsumer",S);return v.useCallback(()=>{const T=C.collectionRef.current;if(!T)return[];const _=Array.from(T.querySelectorAll(`[${g}]`));return Array.from(C.itemMap.values()).sort((L,F)=>_.indexOf(L.ref.current)-_.indexOf(F.ref.current))},[C.collectionRef,C.itemMap])}return[{Provider:p,Slot:y,ItemSlot:b},j,a]}var cS=v.createContext(void 0);function uS(n){const o=v.useContext(cS);return n||o||"ltr"}var dS=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ae=dS.reduce((n,o)=>{const s=$o(`Primitive.${o}`),a=v.forwardRef((u,d)=>{const{asChild:p,...m}=u,h=p?s:o;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(h,{...m,ref:d})});return a.displayName=`Primitive.${o}`,{...n,[o]:a}},{});function fS(n,o){n&&Vo.flushSync(()=>n.dispatchEvent(o))}function Hn(n){const o=v.useRef(n);return v.useEffect(()=>{o.current=n}),v.useMemo(()=>((...s)=>{var a;return(a=o.current)==null?void 0:a.call(o,...s)}),[])}var pS="DismissableLayer",cu="dismissableLayer.update",mS="dismissableLayer.pointerDownOutside",hS="dismissableLayer.focusOutside",hm,_u=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Pu=v.forwardRef((n,o)=>{const{disableOutsidePointerEvents:s=!1,deferPointerDownOutside:a=!1,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:p,onInteractOutside:m,onDismiss:h,...y}=n,w=v.useContext(_u),[g,k]=v.useState(null),b=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,j]=v.useState({}),S=Qe(o,k),C=Array.from(w.layers),[E]=[...w.layersWithOutsidePointerEventsDisabled].slice(-1),T=E?C.indexOf(E):-1,_=g?C.indexOf(g):-1,A=w.layersWithOutsidePointerEventsDisabled.size>0,D=_>=T,L=v.useRef(!1),F=wS(oe=>{d==null||d(oe),m==null||m(oe),oe.defaultPrevented||h==null||h()},{ownerDocument:b,deferPointerDownOutside:a,isDeferredPointerDownOutsideRef:L,dismissableSurfaces:w.dismissableSurfaces,shouldHandlePointerDownOutside:v.useCallback(oe=>{if(!(oe instanceof Node))return!1;const he=[...w.branches].some(W=>W.contains(oe));return D&&!he},[w.branches,D])}),P=SS(oe=>{if(a&&L.current)return;const he=oe.target;[...w.branches].some(le=>le.contains(he))||(p==null||p(oe),m==null||m(oe),oe.defaultPrevented||h==null||h())},b),X=g?_===C.length-1:!1,se=Hn(oe=>{oe.key==="Escape"&&(u==null||u(oe),!oe.defaultPrevented&&h&&(oe.preventDefault(),h()))});return v.useEffect(()=>{if(X)return b.addEventListener("keydown",se,{capture:!0}),()=>b.removeEventListener("keydown",se,{capture:!0})},[b,X,se]),v.useEffect(()=>{if(g)return s&&(w.layersWithOutsidePointerEventsDisabled.size===0&&(hm=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),w.layersWithOutsidePointerEventsDisabled.add(g)),w.layers.add(g),gm(),()=>{s&&(w.layersWithOutsidePointerEventsDisabled.delete(g),w.layersWithOutsidePointerEventsDisabled.size===0&&(b.body.style.pointerEvents=hm))}},[g,b,s,w]),v.useEffect(()=>()=>{g&&(w.layers.delete(g),w.layersWithOutsidePointerEventsDisabled.delete(g),gm())},[g,w]),v.useEffect(()=>{const oe=()=>j({});return document.addEventListener(cu,oe),()=>document.removeEventListener(cu,oe)},[]),l.jsx(Ae.div,{...y,ref:S,style:{pointerEvents:A?D?"auto":"none":void 0,...n.style},onFocusCapture:$e(n.onFocusCapture,P.onFocusCapture),onBlurCapture:$e(n.onBlurCapture,P.onBlurCapture),onPointerDownCapture:$e(n.onPointerDownCapture,F.onPointerDownCapture)})});Pu.displayName=pS;var gS="DismissableLayerBranch",vS=v.forwardRef((n,o)=>{const s=v.useContext(_u),a=v.useRef(null),u=Qe(o,a);return v.useEffect(()=>{const d=a.current;if(d)return s.branches.add(d),()=>{s.branches.delete(d)}},[s.branches]),l.jsx(Ae.div,{...n,ref:u})});vS.displayName=gS;function yS(){const n=v.useContext(_u),[o,s]=v.useState(null);return v.useEffect(()=>{if(o)return n.dismissableSurfaces.add(o),()=>{n.dismissableSurfaces.delete(o)}},[o,n.dismissableSurfaces]),s}var xS=()=>!0;function wS(n,o){const{ownerDocument:s=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:a=!1,isDeferredPointerDownOutsideRef:u,dismissableSurfaces:d,shouldHandlePointerDownOutside:p=xS}=o,m=Hn(n),h=v.useRef(!1),y=v.useRef(!1),w=v.useRef(new Map),g=v.useRef(()=>{});return v.useEffect(()=>{function k(){y.current=!1,u.current=!1,w.current.clear()}function b(){return Array.from(w.current.values()).some(Boolean)}function j(_){if(!y.current)return;const A=_.target;A instanceof Node&&[...d].some(L=>L.contains(A))||w.current.set(_.type,!0),_.type==="click"&&window.setTimeout(()=>{y.current&&g.current()},0)}function S(_){y.current&&w.current.set(_.type,!1)}const C=_=>{if(_.target&&!h.current){let A=function(){s.removeEventListener("click",g.current);const L=b();k(),L||Mh(mS,m,D,{discrete:!0})};if(!p(_.target)){s.removeEventListener("click",g.current),k(),h.current=!1;return}const D={originalEvent:_};y.current=!0,u.current=a&&_.button===0,w.current.clear(),!a||_.button!==0?A():(s.removeEventListener("click",g.current),g.current=A,s.addEventListener("click",g.current,{once:!0}))}else s.removeEventListener("click",g.current),k();h.current=!1},E=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const _ of E)s.addEventListener(_,j,!0),s.addEventListener(_,S);const T=window.setTimeout(()=>{s.addEventListener("pointerdown",C)},0);return()=>{window.clearTimeout(T),s.removeEventListener("pointerdown",C),s.removeEventListener("click",g.current);for(const _ of E)s.removeEventListener(_,j,!0),s.removeEventListener(_,S)}},[s,m,a,u,d,p]),{onPointerDownCapture:()=>h.current=!0}}function SS(n,o=globalThis==null?void 0:globalThis.document){const s=Hn(n),a=v.useRef(!1);return v.useEffect(()=>{const u=d=>{d.target&&!a.current&&Mh(hS,s,{originalEvent:d},{discrete:!1})};return o.addEventListener("focusin",u),()=>o.removeEventListener("focusin",u)},[o,s]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}function gm(){const n=new CustomEvent(cu);document.dispatchEvent(n)}function Mh(n,o,s,{discrete:a}){const u=s.originalEvent.target,d=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:s});o&&u.addEventListener(n,o,{once:!0}),a?fS(u,d):u.dispatchEvent(d)}var da=0,Sn=null;function Oh(){v.useEffect(()=>{Sn||(Sn={start:vm(),end:vm()});const{start:n,end:o}=Sn;return document.body.firstElementChild!==n&&document.body.insertAdjacentElement("afterbegin",n),document.body.lastElementChild!==o&&document.body.insertAdjacentElement("beforeend",o),da++,()=>{da===1&&(Sn==null||Sn.start.remove(),Sn==null||Sn.end.remove(),Sn=null),da=Math.max(0,da-1)}},[])}function vm(){const n=document.createElement("span");return n.setAttribute("data-radix-focus-guard",""),n.tabIndex=0,n.style.outline="none",n.style.opacity="0",n.style.position="fixed",n.style.pointerEvents="none",n}var Vc="focusScope.autoFocusOnMount",Wc="focusScope.autoFocusOnUnmount",ym={bubbles:!1,cancelable:!0},bS="FocusScope",Ru=v.forwardRef((n,o)=>{const{loop:s=!1,trapped:a=!1,onMountAutoFocus:u,onUnmountAutoFocus:d,...p}=n,[m,h]=v.useState(null),y=Hn(u),w=Hn(d),g=v.useRef(null),k=Qe(o,h),b=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(a){let S=function(_){if(b.paused||!m)return;const A=_.target;m.contains(A)?g.current=A:kr(g.current,{select:!0})},C=function(_){if(b.paused||!m)return;const A=_.relatedTarget;A!==null&&(m.contains(A)||kr(g.current,{select:!0}))},E=function(_){if(document.activeElement===document.body)for(const D of _)D.removedNodes.length>0&&kr(m)};document.addEventListener("focusin",S),document.addEventListener("focusout",C);const T=new MutationObserver(E);return m&&T.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",C),T.disconnect()}}},[a,m,b.paused]),v.useEffect(()=>{if(m){wm.add(b);const S=document.activeElement;if(!m.contains(S)){const E=new CustomEvent(Vc,ym);m.addEventListener(Vc,y),m.dispatchEvent(E),E.defaultPrevented||(kS(_S(Lh(m)),{select:!0}),document.activeElement===S&&kr(m))}return()=>{m.removeEventListener(Vc,y),setTimeout(()=>{const E=new CustomEvent(Wc,ym);m.addEventListener(Wc,w),m.dispatchEvent(E),E.defaultPrevented||kr(S??document.body,{select:!0}),m.removeEventListener(Wc,w),wm.remove(b)},0)}}},[m,y,w,b]);const j=v.useCallback(S=>{if(!s&&!a||b.paused)return;const C=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,E=document.activeElement;if(C&&E){const T=S.currentTarget,[_,A]=CS(T);_&&A?!S.shiftKey&&E===A?(S.preventDefault(),s&&kr(_,{select:!0})):S.shiftKey&&E===_&&(S.preventDefault(),s&&kr(A,{select:!0})):E===T&&S.preventDefault()}},[s,a,b.paused]);return l.jsx(Ae.div,{tabIndex:-1,...p,ref:k,onKeyDown:j})});Ru.displayName=bS;function kS(n,{select:o=!1}={}){const s=document.activeElement;for(const a of n)if(kr(a,{select:o}),document.activeElement!==s)return}function CS(n){const o=Lh(n),s=xm(o,n),a=xm(o.reverse(),n);return[s,a]}function Lh(n){const o=[],s=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const u=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||u?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)o.push(s.currentNode);return o}function xm(n,o){const s=typeof o.checkVisibility=="function"&&o.checkVisibility({checkVisibilityCSS:!0});for(const a of n)if(!(s?!a.checkVisibility({checkVisibilityCSS:!0}):NS(a,{upTo:o})))return a}function NS(n,{upTo:o}){if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(o!==void 0&&n===o)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}function jS(n){return n instanceof HTMLInputElement&&"select"in n}function kr(n,{select:o=!1}={}){if(n&&n.focus){const s=document.activeElement;n.focus({preventScroll:!0}),n!==s&&jS(n)&&o&&n.select()}}var wm=ES();function ES(){let n=[];return{add(o){const s=n[0];o!==s&&(s==null||s.pause()),n=Sm(n,o),n.unshift(o)},remove(o){var s;n=Sm(n,o),(s=n[0])==null||s.resume()}}}function Sm(n,o){const s=[...n],a=s.indexOf(o);return a!==-1&&s.splice(a,1),s}function _S(n){return n.filter(o=>o.tagName!=="A")}var gt=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},PS=Ma[" useId ".trim().toString()]||(()=>{}),RS=0;function Mo(n){const[o,s]=v.useState(PS());return gt(()=>{s(a=>a??String(RS++))},[n]),o?`radix-${o}`:""}const TS=["top","right","bottom","left"],Er=Math.min,Ft=Math.max,Na=Math.round,fa=Math.floor,Cn=n=>({x:n,y:n}),MS={left:"right",right:"left",bottom:"top",top:"bottom"};function uu(n,o,s){return Ft(n,Er(o,s))}function Kn(n,o){return typeof n=="function"?n(o):n}function Yn(n){return n.split("-")[0]}function Go(n){return n.split("-")[1]}function Tu(n){return n==="x"?"y":"x"}function Mu(n){return n==="y"?"height":"width"}function kn(n){const o=n[0];return o==="t"||o==="b"?"y":"x"}function Ou(n){return Tu(kn(n))}function OS(n,o,s){s===void 0&&(s=!1);const a=Go(n),u=Ou(n),d=Mu(u);let p=u==="x"?a===(s?"end":"start")?"right":"left":a==="start"?"bottom":"top";return o.reference[d]>o.floating[d]&&(p=ja(p)),[p,ja(p)]}function LS(n){const o=ja(n);return[du(n),o,du(o)]}function du(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}const bm=["left","right"],km=["right","left"],AS=["top","bottom"],IS=["bottom","top"];function DS(n,o,s){switch(n){case"top":case"bottom":return s?o?km:bm:o?bm:km;case"left":case"right":return o?AS:IS;default:return[]}}function zS(n,o,s,a){const u=Go(n);let d=DS(Yn(n),s==="start",a);return u&&(d=d.map(p=>p+"-"+u),o&&(d=d.concat(d.map(du)))),d}function ja(n){const o=Yn(n);return MS[o]+n.slice(o.length)}function FS(n){return{top:0,right:0,bottom:0,left:0,...n}}function Ah(n){return typeof n!="number"?FS(n):{top:n,right:n,bottom:n,left:n}}function Ea(n){const{x:o,y:s,width:a,height:u}=n;return{width:a,height:u,top:s,left:o,right:o+a,bottom:s+u,x:o,y:s}}function Cm(n,o,s){let{reference:a,floating:u}=n;const d=kn(o),p=Ou(o),m=Mu(p),h=Yn(o),y=d==="y",w=a.x+a.width/2-u.width/2,g=a.y+a.height/2-u.height/2,k=a[m]/2-u[m]/2;let b;switch(h){case"top":b={x:w,y:a.y-u.height};break;case"bottom":b={x:w,y:a.y+a.height};break;case"right":b={x:a.x+a.width,y:g};break;case"left":b={x:a.x-u.width,y:g};break;default:b={x:a.x,y:a.y}}switch(Go(o)){case"start":b[p]-=k*(s&&y?-1:1);break;case"end":b[p]+=k*(s&&y?-1:1);break}return b}async function $S(n,o){var s;o===void 0&&(o={});const{x:a,y:u,platform:d,rects:p,elements:m,strategy:h}=n,{boundary:y="clippingAncestors",rootBoundary:w="viewport",elementContext:g="floating",altBoundary:k=!1,padding:b=0}=Kn(o,n),j=Ah(b),C=m[k?g==="floating"?"reference":"floating":g],E=Ea(await d.getClippingRect({element:(s=await(d.isElement==null?void 0:d.isElement(C)))==null||s?C:C.contextElement||await(d.getDocumentElement==null?void 0:d.getDocumentElement(m.floating)),boundary:y,rootBoundary:w,strategy:h})),T=g==="floating"?{x:a,y:u,width:p.floating.width,height:p.floating.height}:p.reference,_=await(d.getOffsetParent==null?void 0:d.getOffsetParent(m.floating)),A=await(d.isElement==null?void 0:d.isElement(_))?await(d.getScale==null?void 0:d.getScale(_))||{x:1,y:1}:{x:1,y:1},D=Ea(d.convertOffsetParentRelativeRectToViewportRelativeRect?await d.convertOffsetParentRelativeRectToViewportRelativeRect({elements:m,rect:T,offsetParent:_,strategy:h}):T);return{top:(E.top-D.top+j.top)/A.y,bottom:(D.bottom-E.bottom+j.bottom)/A.y,left:(E.left-D.left+j.left)/A.x,right:(D.right-E.right+j.right)/A.x}}const BS=50,US=async(n,o,s)=>{const{placement:a="bottom",strategy:u="absolute",middleware:d=[],platform:p}=s,m=p.detectOverflow?p:{...p,detectOverflow:$S},h=await(p.isRTL==null?void 0:p.isRTL(o));let y=await p.getElementRects({reference:n,floating:o,strategy:u}),{x:w,y:g}=Cm(y,a,h),k=a,b=0;const j={};for(let S=0;S({name:"arrow",options:n,async fn(o){const{x:s,y:a,placement:u,rects:d,platform:p,elements:m,middlewareData:h}=o,{element:y,padding:w=0}=Kn(n,o)||{};if(y==null)return{};const g=Ah(w),k={x:s,y:a},b=Ou(u),j=Mu(b),S=await p.getDimensions(y),C=b==="y",E=C?"top":"left",T=C?"bottom":"right",_=C?"clientHeight":"clientWidth",A=d.reference[j]+d.reference[b]-k[b]-d.floating[j],D=k[b]-d.reference[b],L=await(p.getOffsetParent==null?void 0:p.getOffsetParent(y));let F=L?L[_]:0;(!F||!await(p.isElement==null?void 0:p.isElement(L)))&&(F=m.floating[_]||d.floating[j]);const P=A/2-D/2,X=F/2-S[j]/2-1,se=Er(g[E],X),oe=Er(g[T],X),he=se,W=F-S[j]-oe,le=F/2-S[j]/2+P,ve=uu(he,le,W),Y=!h.arrow&&Go(u)!=null&&le!==ve&&d.reference[j]/2-(lele<=0)){var oe,he;const le=(((oe=d.flip)==null?void 0:oe.index)||0)+1,ve=F[le];if(ve&&(!(g==="alignment"?T!==kn(ve):!1)||se.every(U=>kn(U.placement)===T?U.overflows[0]>0:!0)))return{data:{index:le,overflows:se},reset:{placement:ve}};let Y=(he=se.filter(Z=>Z.overflows[0]<=0).sort((Z,U)=>Z.overflows[1]-U.overflows[1])[0])==null?void 0:he.placement;if(!Y)switch(b){case"bestFit":{var W;const Z=(W=se.filter(U=>{if(L){const Q=kn(U.placement);return Q===T||Q==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(Q=>Q>0).reduce((Q,$)=>Q+$,0)]).sort((U,Q)=>U[1]-Q[1])[0])==null?void 0:W[0];Z&&(Y=Z);break}case"initialPlacement":Y=m;break}if(u!==Y)return{reset:{placement:Y}}}return{}}}};function Nm(n,o){return{top:n.top-o.height,right:n.right-o.width,bottom:n.bottom-o.height,left:n.left-o.width}}function jm(n){return TS.some(o=>n[o]>=0)}const HS=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(o){const{rects:s,platform:a}=o,{strategy:u="referenceHidden",...d}=Kn(n,o);switch(u){case"referenceHidden":{const p=await a.detectOverflow(o,{...d,elementContext:"reference"}),m=Nm(p,s.reference);return{data:{referenceHiddenOffsets:m,referenceHidden:jm(m)}}}case"escaped":{const p=await a.detectOverflow(o,{...d,altBoundary:!0}),m=Nm(p,s.floating);return{data:{escapedOffsets:m,escaped:jm(m)}}}default:return{}}}}},Ih=new Set(["left","top"]);async function KS(n,o){const{placement:s,platform:a,elements:u}=n,d=await(a.isRTL==null?void 0:a.isRTL(u.floating)),p=Yn(s),m=Go(s),h=kn(s)==="y",y=Ih.has(p)?-1:1,w=d&&h?-1:1,g=Kn(o,n);let{mainAxis:k,crossAxis:b,alignmentAxis:j}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return m&&typeof j=="number"&&(b=m==="end"?j*-1:j),h?{x:b*w,y:k*y}:{x:k*y,y:b*w}}const YS=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(o){var s,a;const{x:u,y:d,placement:p,middlewareData:m}=o,h=await KS(o,n);return p===((s=m.offset)==null?void 0:s.placement)&&(a=m.arrow)!=null&&a.alignmentOffset?{}:{x:u+h.x,y:d+h.y,data:{...h,placement:p}}}}},GS=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(o){const{x:s,y:a,placement:u,platform:d}=o,{mainAxis:p=!0,crossAxis:m=!1,limiter:h={fn:E=>{let{x:T,y:_}=E;return{x:T,y:_}}},...y}=Kn(n,o),w={x:s,y:a},g=await d.detectOverflow(o,y),k=kn(Yn(u)),b=Tu(k);let j=w[b],S=w[k];if(p){const E=b==="y"?"top":"left",T=b==="y"?"bottom":"right",_=j+g[E],A=j-g[T];j=uu(_,j,A)}if(m){const E=k==="y"?"top":"left",T=k==="y"?"bottom":"right",_=S+g[E],A=S-g[T];S=uu(_,S,A)}const C=h.fn({...o,[b]:j,[k]:S});return{...C,data:{x:C.x-s,y:C.y-a,enabled:{[b]:p,[k]:m}}}}}},QS=function(n){return n===void 0&&(n={}),{options:n,fn(o){const{x:s,y:a,placement:u,rects:d,middlewareData:p}=o,{offset:m=0,mainAxis:h=!0,crossAxis:y=!0}=Kn(n,o),w={x:s,y:a},g=kn(u),k=Tu(g);let b=w[k],j=w[g];const S=Kn(m,o),C=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(h){const _=k==="y"?"height":"width",A=d.reference[k]-d.floating[_]+C.mainAxis,D=d.reference[k]+d.reference[_]-C.mainAxis;bD&&(b=D)}if(y){var E,T;const _=k==="y"?"width":"height",A=Ih.has(Yn(u)),D=d.reference[g]-d.floating[_]+(A&&((E=p.offset)==null?void 0:E[g])||0)+(A?0:C.crossAxis),L=d.reference[g]+d.reference[_]+(A?0:((T=p.offset)==null?void 0:T[g])||0)-(A?C.crossAxis:0);jL&&(j=L)}return{[k]:b,[g]:j}}}},XS=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(o){var s,a;const{placement:u,rects:d,platform:p,elements:m}=o,{apply:h=()=>{},...y}=Kn(n,o),w=await p.detectOverflow(o,y),g=Yn(u),k=Go(u),b=kn(u)==="y",{width:j,height:S}=d.floating;let C,E;g==="top"||g==="bottom"?(C=g,E=k===(await(p.isRTL==null?void 0:p.isRTL(m.floating))?"start":"end")?"left":"right"):(E=g,C=k==="end"?"top":"bottom");const T=S-w.top-w.bottom,_=j-w.left-w.right,A=Er(S-w[C],T),D=Er(j-w[E],_),L=!o.middlewareData.shift;let F=A,P=D;if((s=o.middlewareData.shift)!=null&&s.enabled.x&&(P=_),(a=o.middlewareData.shift)!=null&&a.enabled.y&&(F=T),L&&!k){const se=Ft(w.left,0),oe=Ft(w.right,0),he=Ft(w.top,0),W=Ft(w.bottom,0);b?P=j-2*(se!==0||oe!==0?se+oe:Ft(w.left,w.right)):F=S-2*(he!==0||W!==0?he+W:Ft(w.top,w.bottom))}await h({...o,availableWidth:P,availableHeight:F});const X=await p.getDimensions(m.floating);return j!==X.width||S!==X.height?{reset:{rects:!0}}:{}}}};function $a(){return typeof window<"u"}function Qo(n){return Dh(n)?(n.nodeName||"").toLowerCase():"#document"}function Bt(n){var o;return(n==null||(o=n.ownerDocument)==null?void 0:o.defaultView)||window}function Tn(n){var o;return(o=(Dh(n)?n.ownerDocument:n.document)||window.document)==null?void 0:o.documentElement}function Dh(n){return $a()?n instanceof Node||n instanceof Bt(n).Node:!1}function dn(n){return $a()?n instanceof Element||n instanceof Bt(n).Element:!1}function Qn(n){return $a()?n instanceof HTMLElement||n instanceof Bt(n).HTMLElement:!1}function Em(n){return!$a()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof Bt(n).ShadowRoot}function Gs(n){const{overflow:o,overflowX:s,overflowY:a,display:u}=fn(n);return/auto|scroll|overlay|hidden|clip/.test(o+a+s)&&u!=="inline"&&u!=="contents"}function qS(n){return/^(table|td|th)$/.test(Qo(n))}function Ba(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}const JS=/transform|translate|scale|rotate|perspective|filter/,ZS=/paint|layout|strict|content/,qr=n=>!!n&&n!=="none";let Hc;function Lu(n){const o=dn(n)?fn(n):n;return qr(o.transform)||qr(o.translate)||qr(o.scale)||qr(o.rotate)||qr(o.perspective)||!Au()&&(qr(o.backdropFilter)||qr(o.filter))||JS.test(o.willChange||"")||ZS.test(o.contain||"")}function eb(n){let o=_r(n);for(;Qn(o)&&!Bo(o);){if(Lu(o))return o;if(Ba(o))return null;o=_r(o)}return null}function Au(){return Hc==null&&(Hc=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Hc}function Bo(n){return/^(html|body|#document)$/.test(Qo(n))}function fn(n){return Bt(n).getComputedStyle(n)}function Ua(n){return dn(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function _r(n){if(Qo(n)==="html")return n;const o=n.assignedSlot||n.parentNode||Em(n)&&n.host||Tn(n);return Em(o)?o.host:o}function zh(n){const o=_r(n);return Bo(o)?n.ownerDocument?n.ownerDocument.body:n.body:Qn(o)&&Gs(o)?o:zh(o)}function Vs(n,o,s){var a;o===void 0&&(o=[]),s===void 0&&(s=!0);const u=zh(n),d=u===((a=n.ownerDocument)==null?void 0:a.body),p=Bt(u);if(d){const m=fu(p);return o.concat(p,p.visualViewport||[],Gs(u)?u:[],m&&s?Vs(m):[])}else return o.concat(u,Vs(u,[],s))}function fu(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function Fh(n){const o=fn(n);let s=parseFloat(o.width)||0,a=parseFloat(o.height)||0;const u=Qn(n),d=u?n.offsetWidth:s,p=u?n.offsetHeight:a,m=Na(s)!==d||Na(a)!==p;return m&&(s=d,a=p),{width:s,height:a,$:m}}function Iu(n){return dn(n)?n:n.contextElement}function Oo(n){const o=Iu(n);if(!Qn(o))return Cn(1);const s=o.getBoundingClientRect(),{width:a,height:u,$:d}=Fh(o);let p=(d?Na(s.width):s.width)/a,m=(d?Na(s.height):s.height)/u;return(!p||!Number.isFinite(p))&&(p=1),(!m||!Number.isFinite(m))&&(m=1),{x:p,y:m}}const tb=Cn(0);function $h(n){const o=Bt(n);return!Au()||!o.visualViewport?tb:{x:o.visualViewport.offsetLeft,y:o.visualViewport.offsetTop}}function nb(n,o,s){return o===void 0&&(o=!1),!s||o&&s!==Bt(n)?!1:o}function Jr(n,o,s,a){o===void 0&&(o=!1),s===void 0&&(s=!1);const u=n.getBoundingClientRect(),d=Iu(n);let p=Cn(1);o&&(a?dn(a)&&(p=Oo(a)):p=Oo(n));const m=nb(d,s,a)?$h(d):Cn(0);let h=(u.left+m.x)/p.x,y=(u.top+m.y)/p.y,w=u.width/p.x,g=u.height/p.y;if(d){const k=Bt(d),b=a&&dn(a)?Bt(a):a;let j=k,S=fu(j);for(;S&&a&&b!==j;){const C=Oo(S),E=S.getBoundingClientRect(),T=fn(S),_=E.left+(S.clientLeft+parseFloat(T.paddingLeft))*C.x,A=E.top+(S.clientTop+parseFloat(T.paddingTop))*C.y;h*=C.x,y*=C.y,w*=C.x,g*=C.y,h+=_,y+=A,j=Bt(S),S=fu(j)}}return Ea({width:w,height:g,x:h,y})}function Va(n,o){const s=Ua(n).scrollLeft;return o?o.left+s:Jr(Tn(n)).left+s}function Bh(n,o){const s=n.getBoundingClientRect(),a=s.left+o.scrollLeft-Va(n,s),u=s.top+o.scrollTop;return{x:a,y:u}}function rb(n){let{elements:o,rect:s,offsetParent:a,strategy:u}=n;const d=u==="fixed",p=Tn(a),m=o?Ba(o.floating):!1;if(a===p||m&&d)return s;let h={scrollLeft:0,scrollTop:0},y=Cn(1);const w=Cn(0),g=Qn(a);if((g||!g&&!d)&&((Qo(a)!=="body"||Gs(p))&&(h=Ua(a)),g)){const b=Jr(a);y=Oo(a),w.x=b.x+a.clientLeft,w.y=b.y+a.clientTop}const k=p&&!g&&!d?Bh(p,h):Cn(0);return{width:s.width*y.x,height:s.height*y.y,x:s.x*y.x-h.scrollLeft*y.x+w.x+k.x,y:s.y*y.y-h.scrollTop*y.y+w.y+k.y}}function ob(n){return Array.from(n.getClientRects())}function sb(n){const o=Tn(n),s=Ua(n),a=n.ownerDocument.body,u=Ft(o.scrollWidth,o.clientWidth,a.scrollWidth,a.clientWidth),d=Ft(o.scrollHeight,o.clientHeight,a.scrollHeight,a.clientHeight);let p=-s.scrollLeft+Va(n);const m=-s.scrollTop;return fn(a).direction==="rtl"&&(p+=Ft(o.clientWidth,a.clientWidth)-u),{width:u,height:d,x:p,y:m}}const _m=25;function ib(n,o){const s=Bt(n),a=Tn(n),u=s.visualViewport;let d=a.clientWidth,p=a.clientHeight,m=0,h=0;if(u){d=u.width,p=u.height;const w=Au();(!w||w&&o==="fixed")&&(m=u.offsetLeft,h=u.offsetTop)}const y=Va(a);if(y<=0){const w=a.ownerDocument,g=w.body,k=getComputedStyle(g),b=w.compatMode==="CSS1Compat"&&parseFloat(k.marginLeft)+parseFloat(k.marginRight)||0,j=Math.abs(a.clientWidth-g.clientWidth-b);j<=_m&&(d-=j)}else y<=_m&&(d+=y);return{width:d,height:p,x:m,y:h}}function ab(n,o){const s=Jr(n,!0,o==="fixed"),a=s.top+n.clientTop,u=s.left+n.clientLeft,d=Qn(n)?Oo(n):Cn(1),p=n.clientWidth*d.x,m=n.clientHeight*d.y,h=u*d.x,y=a*d.y;return{width:p,height:m,x:h,y}}function Pm(n,o,s){let a;if(o==="viewport")a=ib(n,s);else if(o==="document")a=sb(Tn(n));else if(dn(o))a=ab(o,s);else{const u=$h(n);a={x:o.x-u.x,y:o.y-u.y,width:o.width,height:o.height}}return Ea(a)}function Uh(n,o){const s=_r(n);return s===o||!dn(s)||Bo(s)?!1:fn(s).position==="fixed"||Uh(s,o)}function lb(n,o){const s=o.get(n);if(s)return s;let a=Vs(n,[],!1).filter(m=>dn(m)&&Qo(m)!=="body"),u=null;const d=fn(n).position==="fixed";let p=d?_r(n):n;for(;dn(p)&&!Bo(p);){const m=fn(p),h=Lu(p);!h&&m.position==="fixed"&&(u=null),(d?!h&&!u:!h&&m.position==="static"&&!!u&&(u.position==="absolute"||u.position==="fixed")||Gs(p)&&!h&&Uh(n,p))?a=a.filter(w=>w!==p):u=m,p=_r(p)}return o.set(n,a),a}function cb(n){let{element:o,boundary:s,rootBoundary:a,strategy:u}=n;const p=[...s==="clippingAncestors"?Ba(o)?[]:lb(o,this._c):[].concat(s),a],m=Pm(o,p[0],u);let h=m.top,y=m.right,w=m.bottom,g=m.left;for(let k=1;k{p(!1,1e-7)},1e3)}F===1&&!Wh(y,n.getBoundingClientRect())&&p(),A=!1}try{s=new IntersectionObserver(D,{..._,root:u.ownerDocument})}catch{s=new IntersectionObserver(D,_)}s.observe(n)}return p(!0),d}function gb(n,o,s,a){a===void 0&&(a={});const{ancestorScroll:u=!0,ancestorResize:d=!0,elementResize:p=typeof ResizeObserver=="function",layoutShift:m=typeof IntersectionObserver=="function",animationFrame:h=!1}=a,y=Iu(n),w=u||d?[...y?Vs(y):[],...o?Vs(o):[]]:[];w.forEach(E=>{u&&E.addEventListener("scroll",s,{passive:!0}),d&&E.addEventListener("resize",s)});const g=y&&m?hb(y,s):null;let k=-1,b=null;p&&(b=new ResizeObserver(E=>{let[T]=E;T&&T.target===y&&b&&o&&(b.unobserve(o),cancelAnimationFrame(k),k=requestAnimationFrame(()=>{var _;(_=b)==null||_.observe(o)})),s()}),y&&!h&&b.observe(y),o&&b.observe(o));let j,S=h?Jr(n):null;h&&C();function C(){const E=Jr(n);S&&!Wh(S,E)&&s(),S=E,j=requestAnimationFrame(C)}return s(),()=>{var E;w.forEach(T=>{u&&T.removeEventListener("scroll",s),d&&T.removeEventListener("resize",s)}),g==null||g(),(E=b)==null||E.disconnect(),b=null,h&&cancelAnimationFrame(j)}}const vb=YS,yb=GS,xb=WS,wb=XS,Sb=HS,Tm=VS,bb=QS,kb=(n,o,s)=>{const a=new Map,u={platform:mb,...s},d={...u.platform,_c:a};return US(n,o,{...u,platform:d})};var Cb=typeof document<"u",Nb=function(){},va=Cb?v.useLayoutEffect:Nb;function _a(n,o){if(n===o)return!0;if(typeof n!=typeof o)return!1;if(typeof n=="function"&&n.toString()===o.toString())return!0;let s,a,u;if(n&&o&&typeof n=="object"){if(Array.isArray(n)){if(s=n.length,s!==o.length)return!1;for(a=s;a--!==0;)if(!_a(n[a],o[a]))return!1;return!0}if(u=Object.keys(n),s=u.length,s!==Object.keys(o).length)return!1;for(a=s;a--!==0;)if(!{}.hasOwnProperty.call(o,u[a]))return!1;for(a=s;a--!==0;){const d=u[a];if(!(d==="_owner"&&n.$$typeof)&&!_a(n[d],o[d]))return!1}return!0}return n!==n&&o!==o}function Hh(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function Mm(n,o){const s=Hh(n);return Math.round(o*s)/s}function Yc(n){const o=v.useRef(n);return va(()=>{o.current=n}),o}function jb(n){n===void 0&&(n={});const{placement:o="bottom",strategy:s="absolute",middleware:a=[],platform:u,elements:{reference:d,floating:p}={},transform:m=!0,whileElementsMounted:h,open:y}=n,[w,g]=v.useState({x:0,y:0,strategy:s,placement:o,middlewareData:{},isPositioned:!1}),[k,b]=v.useState(a);_a(k,a)||b(a);const[j,S]=v.useState(null),[C,E]=v.useState(null),T=v.useCallback(U=>{U!==L.current&&(L.current=U,S(U))},[]),_=v.useCallback(U=>{U!==F.current&&(F.current=U,E(U))},[]),A=d||j,D=p||C,L=v.useRef(null),F=v.useRef(null),P=v.useRef(w),X=h!=null,se=Yc(h),oe=Yc(u),he=Yc(y),W=v.useCallback(()=>{if(!L.current||!F.current)return;const U={placement:o,strategy:s,middleware:k};oe.current&&(U.platform=oe.current),kb(L.current,F.current,U).then(Q=>{const $={...Q,isPositioned:he.current!==!1};le.current&&!_a(P.current,$)&&(P.current=$,Vo.flushSync(()=>{g($)}))})},[k,o,s,oe,he]);va(()=>{y===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,g(U=>({...U,isPositioned:!1})))},[y]);const le=v.useRef(!1);va(()=>(le.current=!0,()=>{le.current=!1}),[]),va(()=>{if(A&&(L.current=A),D&&(F.current=D),A&&D){if(se.current)return se.current(A,D,W);W()}},[A,D,W,se,X]);const ve=v.useMemo(()=>({reference:L,floating:F,setReference:T,setFloating:_}),[T,_]),Y=v.useMemo(()=>({reference:A,floating:D}),[A,D]),Z=v.useMemo(()=>{const U={position:s,left:0,top:0};if(!Y.floating)return U;const Q=Mm(Y.floating,w.x),$=Mm(Y.floating,w.y);return m?{...U,transform:"translate("+Q+"px, "+$+"px)",...Hh(Y.floating)>=1.5&&{willChange:"transform"}}:{position:s,left:Q,top:$}},[s,m,Y.floating,w.x,w.y]);return v.useMemo(()=>({...w,update:W,refs:ve,elements:Y,floatingStyles:Z}),[w,W,ve,Y,Z])}const Eb=n=>{function o(s){return{}.hasOwnProperty.call(s,"current")}return{name:"arrow",options:n,fn(s){const{element:a,padding:u}=typeof n=="function"?n(s):n;return a&&o(a)?a.current!=null?Tm({element:a.current,padding:u}).fn(s):{}:a?Tm({element:a,padding:u}).fn(s):{}}}},_b=(n,o)=>{const s=vb(n);return{name:s.name,fn:s.fn,options:[n,o]}},Pb=(n,o)=>{const s=yb(n);return{name:s.name,fn:s.fn,options:[n,o]}},Rb=(n,o)=>({fn:bb(n).fn,options:[n,o]}),Tb=(n,o)=>{const s=xb(n);return{name:s.name,fn:s.fn,options:[n,o]}},Mb=(n,o)=>{const s=wb(n);return{name:s.name,fn:s.fn,options:[n,o]}},Ob=(n,o)=>{const s=Sb(n);return{name:s.name,fn:s.fn,options:[n,o]}},Lb=(n,o)=>{const s=Eb(n);return{name:s.name,fn:s.fn,options:[n,o]}};var Ab="Arrow",Kh=v.forwardRef((n,o)=>{const{children:s,width:a=10,height:u=5,...d}=n;return l.jsx(Ae.svg,{...d,ref:o,width:a,height:u,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?s:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});Kh.displayName=Ab;var Ib=Kh;function Yh(n){const[o,s]=v.useState(void 0);return gt(()=>{if(n){s({width:n.offsetWidth,height:n.offsetHeight});const a=new ResizeObserver(u=>{if(!Array.isArray(u)||!u.length)return;const d=u[0];let p,m;if("borderBoxSize"in d){const h=d.borderBoxSize,y=Array.isArray(h)?h[0]:h;p=y.inlineSize,m=y.blockSize}else p=n.offsetWidth,m=n.offsetHeight;s({width:p,height:m})});return a.observe(n,{box:"border-box"}),()=>a.unobserve(n)}else s(void 0)},[n]),o}var Du="Popper",[Gh,Qh]=Ys(Du),[Db,Xh]=Gh(Du),qh=n=>{const{__scopePopper:o,children:s}=n,[a,u]=v.useState(null),[d,p]=v.useState(void 0);return l.jsx(Db,{scope:o,anchor:a,onAnchorChange:u,placementState:d,setPlacementState:p,children:s})};qh.displayName=Du;var Jh="PopperAnchor",Zh=v.forwardRef((n,o)=>{const{__scopePopper:s,virtualRef:a,...u}=n,d=Xh(Jh,s),p=v.useRef(null),m=d.onAnchorChange,h=v.useCallback(j=>{p.current=j,j&&m(j)},[m]),y=Qe(o,h),w=v.useRef(null);v.useEffect(()=>{if(!a)return;const j=w.current;w.current=a.current,j!==w.current&&m(w.current)});const g=d.placementState&&Fu(d.placementState),k=g==null?void 0:g[0],b=g==null?void 0:g[1];return a?null:l.jsx(Ae.div,{"data-radix-popper-side":k,"data-radix-popper-align":b,...u,ref:y})});Zh.displayName=Jh;var zu="PopperContent",[zb,Fb]=Gh(zu),eg=v.forwardRef((n,o)=>{var ee,ue,ke,Ne,Ee,qe;const{__scopePopper:s,side:a="bottom",sideOffset:u=0,align:d="center",alignOffset:p=0,arrowPadding:m=0,avoidCollisions:h=!0,collisionBoundary:y=[],collisionPadding:w=0,sticky:g="partial",hideWhenDetached:k=!1,updatePositionStrategy:b="optimized",onPlaced:j,...S}=n,C=Xh(zu,s),[E,T]=v.useState(null),_=Qe(o,T),[A,D]=v.useState(null),L=Yh(A),F=(L==null?void 0:L.width)??0,P=(L==null?void 0:L.height)??0,X=a+(d!=="center"?"-"+d:""),se=typeof w=="number"?w:{top:0,right:0,bottom:0,left:0,...w},oe=Array.isArray(y)?y:[y],he=oe.length>0,W={padding:se,boundary:oe.filter(Bb),altBoundary:he},{refs:le,floatingStyles:ve,placement:Y,isPositioned:Z,middlewareData:U}=jb({strategy:"fixed",placement:X,whileElementsMounted:(...We)=>gb(...We,{animationFrame:b==="always"}),elements:{reference:C.anchor},middleware:[_b({mainAxis:u+P,alignmentAxis:p}),h&&Pb({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?Rb():void 0,...W}),h&&Tb({...W}),Mb({...W,apply:({elements:We,rects:Jt,availableWidth:Zt,availableHeight:bt})=>{const{width:Or,height:kt}=Jt.reference,Ut=We.floating.style;Ut.setProperty("--radix-popper-available-width",`${Zt}px`),Ut.setProperty("--radix-popper-available-height",`${bt}px`),Ut.setProperty("--radix-popper-anchor-width",`${Or}px`),Ut.setProperty("--radix-popper-anchor-height",`${kt}px`)}}),A&&Lb({element:A,padding:m}),Ub({arrowWidth:F,arrowHeight:P}),k&&Ob({strategy:"referenceHidden",...W,boundary:he?W.boundary:void 0})]}),Q=C.setPlacementState;gt(()=>(Q(Y),()=>{Q(void 0)}),[Y,Q]);const[$,O]=Fu(Y),V=Hn(j);gt(()=>{Z&&(V==null||V())},[Z,V]);const q=(ee=U.arrow)==null?void 0:ee.x,ie=(ue=U.arrow)==null?void 0:ue.y,re=((ke=U.arrow)==null?void 0:ke.centerOffset)!==0,[ce,ne]=v.useState();return gt(()=>{E&&ne(window.getComputedStyle(E).zIndex)},[E]),l.jsx("div",{ref:le.setFloating,"data-radix-popper-content-wrapper":"",style:{...ve,transform:Z?ve.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ce,"--radix-popper-transform-origin":[(Ne=U.transformOrigin)==null?void 0:Ne.x,(Ee=U.transformOrigin)==null?void 0:Ee.y].join(" "),...((qe=U.hide)==null?void 0:qe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:l.jsx(zb,{scope:s,placedSide:$,placedAlign:O,onArrowChange:D,arrowX:q,arrowY:ie,shouldHideArrow:re,children:l.jsx(Ae.div,{"data-side":$,"data-align":O,...S,ref:_,style:{...S.style,animation:Z?void 0:"none"}})})})});eg.displayName=zu;var tg="PopperArrow",$b={top:"bottom",right:"left",bottom:"top",left:"right"},ng=v.forwardRef(function(o,s){const{__scopePopper:a,...u}=o,d=Fb(tg,a),p=$b[d.placedSide];return l.jsx("span",{ref:d.onArrowChange,style:{position:"absolute",left:d.arrowX,top:d.arrowY,[p]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[d.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[d.placedSide],visibility:d.shouldHideArrow?"hidden":void 0},children:l.jsx(Ib,{...u,ref:s,style:{...u.style,display:"block"}})})});ng.displayName=tg;function Bb(n){return n!==null}var Ub=n=>({name:"transformOrigin",options:n,fn(o){var C,E,T;const{placement:s,rects:a,middlewareData:u}=o,p=((C=u.arrow)==null?void 0:C.centerOffset)!==0,m=p?0:n.arrowWidth,h=p?0:n.arrowHeight,[y,w]=Fu(s),g={start:"0%",center:"50%",end:"100%"}[w],k=(((E=u.arrow)==null?void 0:E.x)??0)+m/2,b=(((T=u.arrow)==null?void 0:T.y)??0)+h/2;let j="",S="";return y==="bottom"?(j=p?g:`${k}px`,S=`${-h}px`):y==="top"?(j=p?g:`${k}px`,S=`${a.floating.height+h}px`):y==="right"?(j=`${-h}px`,S=p?g:`${b}px`):y==="left"&&(j=`${a.floating.width+h}px`,S=p?g:`${b}px`),{data:{x:j,y:S}}}});function Fu(n){const[o,s="center"]=n.split("-");return[o,s]}var Vb=qh,Wb=Zh,Hb=eg,Kb=ng,Yb="Portal",$u=v.forwardRef((n,o)=>{var m;const{container:s,...a}=n,[u,d]=v.useState(!1);gt(()=>d(!0),[]);const p=s||u&&((m=globalThis==null?void 0:globalThis.document)==null?void 0:m.body);return p?Vo.createPortal(l.jsx(Ae.div,{...a,ref:o}),p):null});$u.displayName=Yb;function Gb(n,o){return v.useReducer((s,a)=>o[s][a]??s,n)}var Qs=n=>{const{present:o,children:s}=n,a=Qb(o),u=typeof s=="function"?s({present:a.isPresent}):v.Children.only(s),d=Xb(a.ref,qb(u));return typeof s=="function"||a.isPresent?v.cloneElement(u,{ref:d}):null};Qs.displayName="Presence";function Qb(n){const[o,s]=v.useState(),a=v.useRef(null),u=v.useRef(n),d=v.useRef("none"),p=v.useRef(void 0),m=n?"mounted":"unmounted",[h,y]=Gb(m,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{h==="mounted"?(d.current=p.current??Is(a.current),p.current=void 0):d.current="none"},[h]),gt(()=>{const w=a.current,g=u.current;if(g!==n){const b=d.current,j=Is(w);n?(p.current=j,y("MOUNT")):j==="none"||(w==null?void 0:w.display)==="none"?y("UNMOUNT"):y(g&&b!==j?"ANIMATION_OUT":"UNMOUNT"),u.current=n}},[n,y]),gt(()=>{if(o){let w;const g=o.ownerDocument.defaultView??window,k=j=>{const C=Is(a.current).includes(CSS.escape(j.animationName));if(j.target===o&&C&&(y("ANIMATION_END"),!u.current)){const E=o.style.animationFillMode;o.style.animationFillMode="forwards",w=g.setTimeout(()=>{o.style.animationFillMode==="forwards"&&(o.style.animationFillMode=E)})}},b=j=>{j.target===o&&(d.current=Is(a.current))};return o.addEventListener("animationstart",b),o.addEventListener("animationcancel",k),o.addEventListener("animationend",k),()=>{g.clearTimeout(w),o.removeEventListener("animationstart",b),o.removeEventListener("animationcancel",k),o.removeEventListener("animationend",k)}}else y("ANIMATION_END")},[o,y]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:v.useCallback(w=>{if(w){const g=getComputedStyle(w);a.current=g,p.current=Is(g)}else a.current=null;s(w)},[])}}function Om(n,o){if(typeof n=="function")return n(o);n!=null&&(n.current=o)}function Xb(...n){const o=v.useRef(n);return o.current=n,v.useCallback(s=>{const a=o.current;let u=!1;const d=a.map(p=>{const m=Om(p,s);return!u&&typeof m=="function"&&(u=!0),m});if(u)return()=>{for(let p=0;p{},caller:a}){const[u,d,p]=Zb({defaultProp:o,onChange:s}),m=n!==void 0,h=m?n:u;{const w=v.useRef(n!==void 0);v.useEffect(()=>{const g=w.current;g!==m&&console.warn(`${a} is changing from ${g?"controlled":"uncontrolled"} to ${m?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),w.current=m},[m,a])}const y=v.useCallback(w=>{var g;if(m){const k=ek(w)?w(n):w;k!==n&&((g=p.current)==null||g.call(p,k))}else d(w)},[m,n,d,p]);return[h,y]}function Zb({defaultProp:n,onChange:o}){const[s,a]=v.useState(n),u=v.useRef(s),d=v.useRef(o);return Jb(()=>{d.current=o},[o]),v.useEffect(()=>{var p;u.current!==s&&((p=d.current)==null||p.call(d,s),u.current=s)},[s,u]),[s,a,d]}function ek(n){return typeof n=="function"}function rg(n){const o=v.useRef({value:n,previous:n});return v.useMemo(()=>(o.current.value!==n&&(o.current.previous=o.current.value,o.current.value=n),o.current.previous),[n])}var og=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),tk="VisuallyHidden",nk=v.forwardRef((n,o)=>l.jsx(Ae.span,{...n,ref:o,style:{...og,...n.style}}));nk.displayName=tk;var rk=function(n){if(typeof document>"u")return null;var o=Array.isArray(n)?n[0]:n;return o.ownerDocument.body},Po=new WeakMap,pa=new WeakMap,ma={},Gc=0,sg=function(n){return n&&(n.host||sg(n.parentNode))},ok=function(n,o){return o.map(function(s){if(n.contains(s))return s;var a=sg(s);return a&&n.contains(a)?a:(console.error("aria-hidden",s,"in not contained inside",n,". Doing nothing"),null)}).filter(function(s){return!!s})},sk=function(n,o,s,a){var u=ok(o,Array.isArray(n)?n:[n]);ma[s]||(ma[s]=new WeakMap);var d=ma[s],p=[],m=new Set,h=new Set(u),y=function(g){!g||m.has(g)||(m.add(g),y(g.parentNode))};u.forEach(y);var w=function(g){!g||h.has(g)||Array.prototype.forEach.call(g.children,function(k){if(m.has(k))w(k);else try{var b=k.getAttribute(a),j=b!==null&&b!=="false",S=(Po.get(k)||0)+1,C=(d.get(k)||0)+1;Po.set(k,S),d.set(k,C),p.push(k),S===1&&j&&pa.set(k,!0),C===1&&k.setAttribute(s,"true"),j||k.setAttribute(a,"true")}catch(E){console.error("aria-hidden: cannot operate on ",k,E)}})};return w(o),m.clear(),Gc++,function(){p.forEach(function(g){var k=Po.get(g)-1,b=d.get(g)-1;Po.set(g,k),d.set(g,b),k||(pa.has(g)||g.removeAttribute(a),pa.delete(g)),b||g.removeAttribute(s)}),Gc--,Gc||(Po=new WeakMap,Po=new WeakMap,pa=new WeakMap,ma={})}},ig=function(n,o,s){s===void 0&&(s="data-aria-hidden");var a=Array.from(Array.isArray(n)?n:[n]),u=rk(n);return u?(a.push.apply(a,Array.from(u.querySelectorAll("[aria-live], script"))),sk(a,u,s,"aria-hidden")):function(){return null}},bn=function(){return bn=Object.assign||function(o){for(var s,a=1,u=arguments.length;a"u")return bk;var o=kk(n),s=document.documentElement.clientWidth,a=window.innerWidth;return{left:o[0],top:o[1],right:o[2],gap:Math.max(0,a-s+o[2]-o[0])}},Nk=ug(),Lo="data-scroll-locked",jk=function(n,o,s,a){var u=n.left,d=n.top,p=n.right,m=n.gap;return s===void 0&&(s="margin"),` - .`.concat(ak,` { - overflow: hidden `).concat(a,`; - padding-right: `).concat(m,"px ").concat(a,`; - } - body[`).concat(Lo,`] { - overflow: hidden `).concat(a,`; - overscroll-behavior: contain; - `).concat([o&&"position: relative ".concat(a,";"),s==="margin"&&` - padding-left: `.concat(u,`px; - padding-top: `).concat(d,`px; - padding-right: `).concat(p,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(m,"px ").concat(a,`; - `),s==="padding"&&"padding-right: ".concat(m,"px ").concat(a,";")].filter(Boolean).join(""),` - } - - .`).concat(ya,` { - right: `).concat(m,"px ").concat(a,`; - } - - .`).concat(xa,` { - margin-right: `).concat(m,"px ").concat(a,`; - } - - .`).concat(ya," .").concat(ya,` { - right: 0 `).concat(a,`; - } - - .`).concat(xa," .").concat(xa,` { - margin-right: 0 `).concat(a,`; - } - - body[`).concat(Lo,`] { - `).concat(lk,": ").concat(m,`px; - } -`)},Am=function(){var n=parseInt(document.body.getAttribute(Lo)||"0",10);return isFinite(n)?n:0},Ek=function(){v.useEffect(function(){return document.body.setAttribute(Lo,(Am()+1).toString()),function(){var n=Am()-1;n<=0?document.body.removeAttribute(Lo):document.body.setAttribute(Lo,n.toString())}},[])},_k=function(n){var o=n.noRelative,s=n.noImportant,a=n.gapMode,u=a===void 0?"margin":a;Ek();var d=v.useMemo(function(){return Ck(u)},[u]);return v.createElement(Nk,{styles:jk(d,!o,u,s?"":"!important")})},pu=!1;if(typeof window<"u")try{var ha=Object.defineProperty({},"passive",{get:function(){return pu=!0,!0}});window.addEventListener("test",ha,ha),window.removeEventListener("test",ha,ha)}catch{pu=!1}var Ro=pu?{passive:!1}:!1,Pk=function(n){return n.tagName==="TEXTAREA"},dg=function(n,o){if(!(n instanceof Element))return!1;var s=window.getComputedStyle(n);return s[o]!=="hidden"&&!(s.overflowY===s.overflowX&&!Pk(n)&&s[o]==="visible")},Rk=function(n){return dg(n,"overflowY")},Tk=function(n){return dg(n,"overflowX")},Im=function(n,o){var s=o.ownerDocument,a=o;do{typeof ShadowRoot<"u"&&a instanceof ShadowRoot&&(a=a.host);var u=fg(n,a);if(u){var d=pg(n,a),p=d[1],m=d[2];if(p>m)return!0}a=a.parentNode}while(a&&a!==s.body);return!1},Mk=function(n){var o=n.scrollTop,s=n.scrollHeight,a=n.clientHeight;return[o,s,a]},Ok=function(n){var o=n.scrollLeft,s=n.scrollWidth,a=n.clientWidth;return[o,s,a]},fg=function(n,o){return n==="v"?Rk(o):Tk(o)},pg=function(n,o){return n==="v"?Mk(o):Ok(o)},Lk=function(n,o){return n==="h"&&o==="rtl"?-1:1},Ak=function(n,o,s,a,u){var d=Lk(n,window.getComputedStyle(o).direction),p=d*a,m=s.target,h=o.contains(m),y=!1,w=p>0,g=0,k=0;do{if(!m)break;var b=pg(n,m),j=b[0],S=b[1],C=b[2],E=S-C-d*j;(j||E)&&fg(n,m)&&(g+=E,k+=j);var T=m.parentNode;m=T&&T.nodeType===Node.DOCUMENT_FRAGMENT_NODE?T.host:T}while(!h&&m!==document.body||h&&(o.contains(m)||o===m));return(w&&Math.abs(g)<1||!w&&Math.abs(k)<1)&&(y=!0),y},ga=function(n){return"changedTouches"in n?[n.changedTouches[0].clientX,n.changedTouches[0].clientY]:[0,0]},Dm=function(n){return[n.deltaX,n.deltaY]},zm=function(n){return n&&"current"in n?n.current:n},Ik=function(n,o){return n[0]===o[0]&&n[1]===o[1]},Dk=function(n){return` - .block-interactivity-`.concat(n,` {pointer-events: none;} - .allow-interactivity-`).concat(n,` {pointer-events: all;} -`)},zk=0,To=[];function Fk(n){var o=v.useRef([]),s=v.useRef([0,0]),a=v.useRef(),u=v.useState(zk++)[0],d=v.useState(ug)[0],p=v.useRef(n);v.useEffect(function(){p.current=n},[n]),v.useEffect(function(){if(n.inert){document.body.classList.add("block-interactivity-".concat(u));var S=ik([n.lockRef.current],(n.shards||[]).map(zm),!0).filter(Boolean);return S.forEach(function(C){return C.classList.add("allow-interactivity-".concat(u))}),function(){document.body.classList.remove("block-interactivity-".concat(u)),S.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(u))})}}},[n.inert,n.lockRef.current,n.shards]);var m=v.useCallback(function(S,C){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!p.current.allowPinchZoom;var E=ga(S),T=s.current,_="deltaX"in S?S.deltaX:T[0]-E[0],A="deltaY"in S?S.deltaY:T[1]-E[1],D,L=S.target,F=Math.abs(_)>Math.abs(A)?"h":"v";if("touches"in S&&F==="h"&&L.type==="range")return!1;var P=window.getSelection(),X=P&&P.anchorNode,se=X?X===L||X.contains(L):!1;if(se)return!1;var oe=Im(F,L);if(!oe)return!0;if(oe?D=F:(D=F==="v"?"h":"v",oe=Im(F,L)),!oe)return!1;if(!a.current&&"changedTouches"in S&&(_||A)&&(a.current=D),!D)return!0;var he=a.current||D;return Ak(he,C,S,he==="h"?_:A)},[]),h=v.useCallback(function(S){var C=S;if(!(!To.length||To[To.length-1]!==d)){var E="deltaY"in C?Dm(C):ga(C),T=o.current.filter(function(D){return D.name===C.type&&(D.target===C.target||C.target===D.shadowParent)&&Ik(D.delta,E)})[0];if(T&&T.should){C.cancelable&&C.preventDefault();return}if(!T){var _=(p.current.shards||[]).map(zm).filter(Boolean).filter(function(D){return D.contains(C.target)}),A=_.length>0?m(C,_[0]):!p.current.noIsolation;A&&C.cancelable&&C.preventDefault()}}},[]),y=v.useCallback(function(S,C,E,T){var _={name:S,delta:C,target:E,should:T,shadowParent:$k(E)};o.current.push(_),setTimeout(function(){o.current=o.current.filter(function(A){return A!==_})},1)},[]),w=v.useCallback(function(S){s.current=ga(S),a.current=void 0},[]),g=v.useCallback(function(S){y(S.type,Dm(S),S.target,m(S,n.lockRef.current))},[]),k=v.useCallback(function(S){y(S.type,ga(S),S.target,m(S,n.lockRef.current))},[]);v.useEffect(function(){return To.push(d),n.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:k}),document.addEventListener("wheel",h,Ro),document.addEventListener("touchmove",h,Ro),document.addEventListener("touchstart",w,Ro),function(){To=To.filter(function(S){return S!==d}),document.removeEventListener("wheel",h,Ro),document.removeEventListener("touchmove",h,Ro),document.removeEventListener("touchstart",w,Ro)}},[]);var b=n.removeScrollBar,j=n.inert;return v.createElement(v.Fragment,null,j?v.createElement(d,{styles:Dk(u)}):null,b?v.createElement(_k,{noRelative:n.noRelative,gapMode:n.gapMode}):null)}function $k(n){for(var o=null;n!==null;)n instanceof ShadowRoot&&(o=n.host,n=n.host),n=n.parentNode;return o}const Bk=hk(cg,Fk);var Bu=v.forwardRef(function(n,o){return v.createElement(Wa,bn({},n,{ref:o,sideCar:Bk}))});Bu.classNames=Wa.classNames;var Uk=[" ","Enter","ArrowUp","ArrowDown"],Vk=[" ","Enter"],Zr="Select",[Ha,Ka,Wk]=lS(Zr),[ro]=Ys(Zr,[Wk,Qh]),Ya=Qh(),[Hk,Tr]=ro(Zr),[Kk,Yk]=ro(Zr),Gk="SelectProvider";function mg(n){const{__scopeSelect:o,children:s,open:a,defaultOpen:u,onOpenChange:d,value:p,defaultValue:m,onValueChange:h,dir:y,name:w,autoComplete:g,disabled:k,required:b,form:j,internal_do_not_use_render:S}=n,C=Ya(o),[E,T]=v.useState(null),[_,A]=v.useState(null),[D,L]=v.useState(!1),F=uS(y),[P,X]=Pa({prop:a,defaultProp:u??!1,onChange:d,caller:Zr}),[se,oe]=Pa({prop:p,defaultProp:m,onChange:h,caller:Zr}),he=v.useRef(null),W=v.useRef(se);v.useEffect(()=>{const V=j?E==null?void 0:E.ownerDocument.getElementById(j):E==null?void 0:E.form;if(V instanceof HTMLFormElement){const q=()=>oe(W.current);return V.addEventListener("reset",q),()=>V.removeEventListener("reset",q)}},[j,E,oe]);const le=E?!!j||!!E.closest("form"):!0,[ve,Y]=v.useState(new Set),Z=Mo(),U=Array.from(ve).map(V=>V.props.value).join(";"),Q=v.useCallback(V=>{Y(q=>new Set(q).add(V))},[]),$=v.useCallback(V=>{Y(q=>{const ie=new Set(q);return ie.delete(V),ie})},[]),O={required:b,trigger:E,onTriggerChange:T,valueNode:_,onValueNodeChange:A,valueNodeHasChildren:D,onValueNodeHasChildrenChange:L,contentId:Z,value:se,onValueChange:oe,open:P,onOpenChange:X,dir:F,triggerPointerDownPosRef:he,disabled:k,name:w,autoComplete:g,form:j,nativeOptions:ve,nativeSelectKey:U,isFormControl:le};return l.jsx(Vb,{...C,children:l.jsx(Hk,{scope:o,...O,children:l.jsx(Ha.Provider,{scope:o,children:l.jsx(Kk,{scope:o,onNativeOptionAdd:Q,onNativeOptionRemove:$,children:mC(S)?S(O):s})})})})}mg.displayName=Gk;var hg=n=>{const{__scopeSelect:o,children:s,...a}=n;return l.jsx(mg,{__scopeSelect:o,...a,internal_do_not_use_render:({isFormControl:u})=>l.jsxs(l.Fragment,{children:[s,u?l.jsx(Ag,{__scopeSelect:o}):null]})})};hg.displayName=Zr;var gg="SelectTrigger",Uu=v.forwardRef((n,o)=>{const{__scopeSelect:s,disabled:a=!1,...u}=n,d=Ya(s),p=Tr(gg,s),m=p.disabled||a,h=Qe(o,p.onTriggerChange),y=Ka(s),w=v.useRef("touch"),[g,k,b]=Ig(S=>{const C=y().filter(_=>!_.disabled),E=C.find(_=>_.value===p.value),T=Dg(C,S,E);T!==void 0&&p.onValueChange(T.value)}),j=S=>{m||(p.onOpenChange(!0),b()),S&&(p.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return l.jsx(Wb,{asChild:!0,...d,children:l.jsx(Ae.button,{type:"button",role:"combobox","aria-controls":p.open?p.contentId:void 0,"aria-expanded":p.open,"aria-required":p.required,"aria-autocomplete":"none",dir:p.dir,"data-state":p.open?"open":"closed",disabled:m,"data-disabled":m?"":void 0,"data-placeholder":Ga(p.value)?"":void 0,...u,ref:h,onClick:$e(u.onClick,S=>{S.currentTarget.focus(),w.current!=="mouse"&&j(S)}),onPointerDown:$e(u.onPointerDown,S=>{w.current=S.pointerType;const C=S.target;C.hasPointerCapture(S.pointerId)&&C.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(j(S),S.preventDefault())}),onKeyDown:$e(u.onKeyDown,S=>{const C=g.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&k(S.key),!(C&&S.key===" ")&&Uk.includes(S.key)&&(j(),S.preventDefault())})})})});Uu.displayName=gg;var vg="SelectValue",yg=v.forwardRef((n,o)=>{const{__scopeSelect:s,className:a,style:u,children:d,placeholder:p="",...m}=n,h=Tr(vg,s),{onValueNodeHasChildrenChange:y}=h,w=d!==void 0,g=Qe(o,h.onValueNodeChange);gt(()=>{y(w)},[y,w]);const k=Ga(h.value);return l.jsx(Ae.span,{...m,asChild:k?!1:m.asChild,ref:g,style:{pointerEvents:"none"},children:l.jsx(v.Fragment,{children:k?p:d},k?"placeholder":"value")})});yg.displayName=vg;var Qk="SelectIcon",Xk=v.forwardRef((n,o)=>{const{__scopeSelect:s,children:a,...u}=n;return l.jsx(Ae.span,{"aria-hidden":!0,...u,ref:o,children:a||"▼"})});Xk.displayName=Qk;var xg="SelectPortal",[qk,Jk]=ro(xg,{forceMount:void 0}),wg=n=>{const{__scopeSelect:o,forceMount:s,...a}=n;return l.jsx(qk,{scope:n.__scopeSelect,forceMount:s,children:l.jsx($u,{asChild:!0,...a})})};wg.displayName=xg;var Pr="SelectContent",Vu=v.forwardRef((n,o)=>{const s=Jk(Pr,n.__scopeSelect),{forceMount:a=s.forceMount,...u}=n,d=Tr(Pr,n.__scopeSelect),[p,m]=v.useState();return gt(()=>{m(new DocumentFragment)},[]),l.jsx(Qs,{present:a||d.open,children:({present:h})=>h?l.jsx(kg,{...u,ref:o}):l.jsx(Sg,{...u,fragment:p})})});Vu.displayName=Pr;var Sg=v.forwardRef((n,o)=>{const{__scopeSelect:s,children:a,fragment:u}=n;return u?Vo.createPortal(l.jsx(bg,{scope:s,children:l.jsx(Ha.Slot,{scope:s,children:l.jsx("div",{ref:o,children:a})})}),u):null});Sg.displayName="SelectContentFragment";var cn=10,[bg,Mr]=ro(Pr),Zk="SelectContentImpl",eC=$o("SelectContent.RemoveScroll"),kg=v.forwardRef((n,o)=>{const{__scopeSelect:s}=n,{position:a="item-aligned",onCloseAutoFocus:u,onEscapeKeyDown:d,onPointerDownOutside:p,side:m,sideOffset:h,align:y,alignOffset:w,arrowPadding:g,collisionBoundary:k,collisionPadding:b,sticky:j,hideWhenDetached:S,avoidCollisions:C,...E}=n,T=Tr(Pr,s),[_,A]=v.useState(null),[D,L]=v.useState(null),F=Qe(o,A),[P,X]=v.useState(null),[se,oe]=v.useState(null),he=Ka(s),[W,le]=v.useState(!1),ve=v.useRef(!1);v.useEffect(()=>{if(_)return ig(_)},[_]),Oh();const Y=v.useCallback(ne=>{const[ee,...ue]=he().map(Ee=>Ee.ref.current),[ke]=ue.slice(-1),Ne=document.activeElement;for(const Ee of ne)if(Ee===Ne||(Ee==null||Ee.scrollIntoView({block:"nearest"}),Ee===ee&&D&&(D.scrollTop=0),Ee===ke&&D&&(D.scrollTop=D.scrollHeight),Ee==null||Ee.focus(),document.activeElement!==Ne))return},[he,D]),Z=v.useCallback(()=>Y([P,_]),[Y,P,_]);v.useEffect(()=>{W&&Z()},[W,Z]);const{onOpenChange:U,triggerPointerDownPosRef:Q}=T;v.useEffect(()=>{if(_){let ne={x:0,y:0};const ee=ke=>{var Ne,Ee;ne={x:Math.abs(Math.round(ke.pageX)-(((Ne=Q.current)==null?void 0:Ne.x)??0)),y:Math.abs(Math.round(ke.pageY)-(((Ee=Q.current)==null?void 0:Ee.y)??0))}},ue=ke=>{ne.x<=10&&ne.y<=10?ke.preventDefault():ke.composedPath().includes(_)||U(!1),document.removeEventListener("pointermove",ee),Q.current=null};return Q.current!==null&&(document.addEventListener("pointermove",ee),document.addEventListener("pointerup",ue,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ee),document.removeEventListener("pointerup",ue,{capture:!0})}}},[_,U,Q]),v.useEffect(()=>{const ne=()=>U(!1);return window.addEventListener("blur",ne),window.addEventListener("resize",ne),()=>{window.removeEventListener("blur",ne),window.removeEventListener("resize",ne)}},[U]);const[$,O]=Ig(ne=>{const ee=he().filter(Ne=>!Ne.disabled),ue=ee.find(Ne=>Ne.ref.current===document.activeElement),ke=Dg(ee,ne,ue);ke&&setTimeout(()=>{var Ne;return(Ne=ke.ref.current)==null?void 0:Ne.focus()})}),V=v.useCallback((ne,ee,ue)=>{const ke=!ve.current&&!ue;(T.value!==void 0&&T.value===ee||ke)&&(X(ne),ke&&(ve.current=!0))},[T.value]),q=v.useCallback(()=>_==null?void 0:_.focus(),[_]),ie=v.useCallback((ne,ee,ue)=>{const ke=!ve.current&&!ue;(T.value!==void 0&&T.value===ee||ke)&&oe(ne)},[T.value]),re=a==="popper"?mu:Cg,ce=re===mu?{side:m,sideOffset:h,align:y,alignOffset:w,arrowPadding:g,collisionBoundary:k,collisionPadding:b,sticky:j,hideWhenDetached:S,avoidCollisions:C}:{};return l.jsx(bg,{scope:s,content:_,viewport:D,onViewportChange:L,itemRefCallback:V,selectedItem:P,onItemLeave:q,itemTextRefCallback:ie,focusSelectedItem:Z,selectedItemText:se,position:a,isPositioned:W,searchRef:$,children:l.jsx(Bu,{as:eC,allowPinchZoom:!0,children:l.jsx(Ru,{asChild:!0,trapped:T.open,onMountAutoFocus:ne=>{ne.preventDefault()},onUnmountAutoFocus:$e(u,ne=>{var ee;(ee=T.trigger)==null||ee.focus({preventScroll:!0}),ne.preventDefault()}),children:l.jsx(Pu,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:ne=>ne.preventDefault(),onDismiss:()=>T.onOpenChange(!1),children:l.jsx(re,{role:"listbox",id:T.contentId,"data-state":T.open?"open":"closed",dir:T.dir,onContextMenu:ne=>ne.preventDefault(),...E,...ce,onPlaced:()=>le(!0),ref:F,style:{display:"flex",flexDirection:"column",outline:"none",...E.style},onKeyDown:$e(E.onKeyDown,ne=>{const ee=ne.ctrlKey||ne.altKey||ne.metaKey;if(ne.key==="Tab"&&ne.preventDefault(),!ee&&ne.key.length===1&&O(ne.key),["ArrowUp","ArrowDown","Home","End"].includes(ne.key)){let ke=he().filter(Ne=>!Ne.disabled).map(Ne=>Ne.ref.current);if(["ArrowUp","End"].includes(ne.key)&&(ke=ke.slice().reverse()),["ArrowUp","ArrowDown"].includes(ne.key)){const Ne=ne.target,Ee=ke.indexOf(Ne);ke=ke.slice(Ee+1)}setTimeout(()=>Y(ke)),ne.preventDefault()}})})})})})})});kg.displayName=Zk;var tC="SelectItemAlignedPosition",Cg=v.forwardRef((n,o)=>{const{__scopeSelect:s,onPlaced:a,...u}=n,d=Tr(Pr,s),p=Mr(Pr,s),[m,h]=v.useState(null),[y,w]=v.useState(null),g=Qe(o,w),k=Ka(s),b=v.useRef(!1),j=v.useRef(!0),{viewport:S,selectedItem:C,selectedItemText:E,focusSelectedItem:T}=p,_=v.useCallback(()=>{if(d.trigger&&d.valueNode&&m&&y&&S&&C&&E){const F=d.trigger.getBoundingClientRect(),P=y.getBoundingClientRect(),X=d.valueNode.getBoundingClientRect(),se=E.getBoundingClientRect();if(d.dir!=="rtl"){const Ne=se.left-P.left,Ee=X.left-Ne,qe=F.left-Ee,We=F.width+qe,Jt=Math.max(We,P.width),Zt=window.innerWidth-cn,bt=mm(Ee,[cn,Math.max(cn,Zt-Jt)]);m.style.minWidth=We+"px",m.style.left=bt+"px"}else{const Ne=P.right-se.right,Ee=window.innerWidth-X.right-Ne,qe=window.innerWidth-F.right-Ee,We=F.width+qe,Jt=Math.max(We,P.width),Zt=window.innerWidth-cn,bt=mm(Ee,[cn,Math.max(cn,Zt-Jt)]);m.style.minWidth=We+"px",m.style.right=bt+"px"}const oe=k(),he=window.innerHeight-cn*2,W=S.scrollHeight,le=window.getComputedStyle(y),ve=parseInt(le.borderTopWidth,10),Y=parseInt(le.paddingTop,10),Z=parseInt(le.borderBottomWidth,10),U=parseInt(le.paddingBottom,10),Q=ve+Y+W+U+Z,$=Math.min(C.offsetHeight*5,Q),O=window.getComputedStyle(S),V=parseInt(O.paddingTop,10),q=parseInt(O.paddingBottom,10),ie=F.top+F.height/2-cn,re=he-ie,ce=C.offsetHeight/2,ne=C.offsetTop+ce,ee=ve+Y+ne,ue=Q-ee;if(ee<=ie){const Ne=oe.length>0&&C===oe[oe.length-1].ref.current;m.style.bottom="0px";const Ee=y.clientHeight-S.offsetTop-S.offsetHeight,qe=Math.max(re,ce+(Ne?q:0)+Ee+Z),We=ee+qe;m.style.height=We+"px"}else{const Ne=oe.length>0&&C===oe[0].ref.current;m.style.top="0px";const qe=Math.max(ie,ve+S.offsetTop+(Ne?V:0)+ce)+ue;m.style.height=qe+"px",S.scrollTop=ee-ie+S.offsetTop}m.style.margin=`${cn}px 0`,m.style.minHeight=$+"px",m.style.maxHeight=he+"px",a==null||a(),requestAnimationFrame(()=>b.current=!0)}},[k,d.trigger,d.valueNode,m,y,S,C,E,d.dir,a]);gt(()=>_(),[_]);const[A,D]=v.useState();gt(()=>{y&&D(window.getComputedStyle(y).zIndex)},[y]);const L=v.useCallback(F=>{F&&j.current===!0&&(_(),T==null||T(),j.current=!1)},[_,T]);return l.jsx(rC,{scope:s,contentWrapper:m,shouldExpandOnScrollRef:b,onScrollButtonChange:L,children:l.jsx("div",{ref:h,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:A},children:l.jsx(Ae.div,{...u,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...u.style}})})})});Cg.displayName=tC;var nC="SelectPopperPosition",mu=v.forwardRef((n,o)=>{const{__scopeSelect:s,align:a="start",collisionPadding:u=cn,...d}=n,p=Ya(s);return l.jsx(Hb,{...p,...d,ref:o,align:a,collisionPadding:u,style:{boxSizing:"border-box",...d.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});mu.displayName=nC;var[rC,Wu]=ro(Pr,{}),hu="SelectViewport",Ng=v.forwardRef((n,o)=>{const{__scopeSelect:s,nonce:a,...u}=n,d=Mr(hu,s),p=Wu(hu,s),m=Qe(o,d.onViewportChange),h=v.useRef(0);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),l.jsx(Ha.Slot,{scope:s,children:l.jsx(Ae.div,{"data-radix-select-viewport":"",role:"presentation",...u,ref:m,style:{position:"relative",flex:1,overflow:"hidden auto",...u.style},onScroll:$e(u.onScroll,y=>{const w=y.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:k}=p;if(k!=null&&k.current&&g){const b=Math.abs(h.current-w.scrollTop);if(b>0){const j=window.innerHeight-cn*2,S=parseFloat(g.style.minHeight),C=parseFloat(g.style.height),E=Math.max(S,C);if(E0?A:0,g.style.justifyContent="flex-end")}}}h.current=w.scrollTop})})})]})});Ng.displayName=hu;var jg="SelectGroup",[oC,sC]=ro(jg),iC=v.forwardRef((n,o)=>{const{__scopeSelect:s,...a}=n,u=Mo();return l.jsx(oC,{scope:s,id:u,children:l.jsx(Ae.div,{role:"group","aria-labelledby":u,...a,ref:o})})});iC.displayName=jg;var Eg="SelectLabel",aC=v.forwardRef((n,o)=>{const{__scopeSelect:s,...a}=n,u=sC(Eg,s);return l.jsx(Ae.div,{id:u.id,...a,ref:o})});aC.displayName=Eg;var Ra="SelectItem",[lC,_g]=ro(Ra),Hu=v.forwardRef((n,o)=>{const{__scopeSelect:s,value:a,disabled:u=!1,textValue:d,...p}=n,m=Tr(Ra,s),h=Mr(Ra,s),y=m.value===a,[w,g]=v.useState(d??""),[k,b]=v.useState(!1),j=Hn(_=>{var A;return(A=h.itemRefCallback)==null?void 0:A.call(h,_,a,u)}),S=Qe(o,j),C=Mo(),E=v.useRef("touch"),T=()=>{u||(m.onValueChange(a),m.onOpenChange(!1))};return l.jsx(lC,{scope:s,value:a,disabled:u,textId:C,isSelected:y,onItemTextChange:v.useCallback(_=>{g(A=>A||((_==null?void 0:_.textContent)??"").trim())},[]),children:l.jsx(Ha.ItemSlot,{scope:s,value:a,disabled:u,textValue:w,children:l.jsx(Ae.div,{role:"option","aria-labelledby":C,"data-highlighted":k?"":void 0,"aria-selected":y&&k,"data-state":y?"checked":"unchecked","aria-disabled":u||void 0,"data-disabled":u?"":void 0,tabIndex:u?void 0:-1,...p,ref:S,onFocus:$e(p.onFocus,()=>b(!0)),onBlur:$e(p.onBlur,()=>b(!1)),onClick:$e(p.onClick,()=>{E.current!=="mouse"&&T()}),onPointerUp:$e(p.onPointerUp,()=>{E.current==="mouse"&&T()}),onPointerDown:$e(p.onPointerDown,_=>{E.current=_.pointerType}),onPointerMove:$e(p.onPointerMove,_=>{var A;E.current=_.pointerType,u?(A=h.onItemLeave)==null||A.call(h):E.current==="mouse"&&_.currentTarget.focus({preventScroll:!0})}),onPointerLeave:$e(p.onPointerLeave,_=>{var A;_.currentTarget===document.activeElement&&((A=h.onItemLeave)==null||A.call(h))}),onKeyDown:$e(p.onKeyDown,_=>{var D;u||_.target!==_.currentTarget||((D=h.searchRef)==null?void 0:D.current)!==""&&_.key===" "||(Vk.includes(_.key)&&T(),_.key===" "&&_.preventDefault())})})})})});Hu.displayName=Ra;var Ds="SelectItemText",Pg=v.forwardRef((n,o)=>{const{__scopeSelect:s,className:a,style:u,...d}=n,p=Tr(Ds,s),m=Mr(Ds,s),h=_g(Ds,s),y=Yk(Ds,s),[w,g]=v.useState(null),k=Hn(T=>{var _;return(_=m.itemTextRefCallback)==null?void 0:_.call(m,T,h.value,h.disabled)}),b=Qe(o,g,h.onItemTextChange,k),j=w==null?void 0:w.textContent,S=v.useMemo(()=>l.jsx("option",{value:h.value,disabled:h.disabled,children:j},h.value),[h.disabled,h.value,j]),{onNativeOptionAdd:C,onNativeOptionRemove:E}=y;return gt(()=>(C(S),()=>E(S)),[C,E,S]),l.jsxs(l.Fragment,{children:[l.jsx(Ae.span,{id:h.textId,...d,ref:b}),h.isSelected&&p.valueNode&&!p.valueNodeHasChildren&&!Ga(p.value)?Vo.createPortal(d.children,p.valueNode):null]})});Pg.displayName=Ds;var Rg="SelectItemIndicator",Tg=v.forwardRef((n,o)=>{const{__scopeSelect:s,...a}=n;return _g(Rg,s).isSelected?l.jsx(Ae.span,{"aria-hidden":!0,...a,ref:o}):null});Tg.displayName=Rg;var gu="SelectScrollUpButton",cC=v.forwardRef((n,o)=>{const s=Mr(gu,n.__scopeSelect),a=Wu(gu,n.__scopeSelect),[u,d]=v.useState(!1),p=Qe(o,a.onScrollButtonChange);return gt(()=>{if(s.viewport&&s.isPositioned){let m=function(){const y=h.scrollTop>0;d(y)};const h=s.viewport;return m(),h.addEventListener("scroll",m),()=>h.removeEventListener("scroll",m)}},[s.viewport,s.isPositioned]),u?l.jsx(Mg,{...n,ref:p,onAutoScroll:()=>{const{viewport:m,selectedItem:h}=s;m&&h&&(m.scrollTop=m.scrollTop-h.offsetHeight)}}):null});cC.displayName=gu;var vu="SelectScrollDownButton",uC=v.forwardRef((n,o)=>{const s=Mr(vu,n.__scopeSelect),a=Wu(vu,n.__scopeSelect),[u,d]=v.useState(!1),p=Qe(o,a.onScrollButtonChange);return gt(()=>{if(s.viewport&&s.isPositioned){let m=function(){const y=h.scrollHeight-h.clientHeight,w=Math.ceil(h.scrollTop)h.removeEventListener("scroll",m)}},[s.viewport,s.isPositioned]),u?l.jsx(Mg,{...n,ref:p,onAutoScroll:()=>{const{viewport:m,selectedItem:h}=s;m&&h&&(m.scrollTop=m.scrollTop+h.offsetHeight)}}):null});uC.displayName=vu;var Mg=v.forwardRef((n,o)=>{const{__scopeSelect:s,onAutoScroll:a,...u}=n,d=Mr("SelectScrollButton",s),p=v.useRef(null),m=Ka(s),h=v.useCallback(()=>{p.current!==null&&(window.clearInterval(p.current),p.current=null)},[]);return v.useEffect(()=>()=>h(),[h]),gt(()=>{var w;const y=m().find(g=>g.ref.current===document.activeElement);(w=y==null?void 0:y.ref.current)==null||w.scrollIntoView({block:"nearest"})},[m]),l.jsx(Ae.div,{"aria-hidden":!0,...u,ref:o,style:{flexShrink:0,...u.style},onPointerDown:$e(u.onPointerDown,()=>{p.current===null&&(p.current=window.setInterval(a,50))}),onPointerMove:$e(u.onPointerMove,()=>{var y;(y=d.onItemLeave)==null||y.call(d),p.current===null&&(p.current=window.setInterval(a,50))}),onPointerLeave:$e(u.onPointerLeave,()=>{h()})})}),dC="SelectSeparator",fC=v.forwardRef((n,o)=>{const{__scopeSelect:s,...a}=n;return l.jsx(Ae.div,{"aria-hidden":!0,...a,ref:o})});fC.displayName=dC;var Og="SelectArrow",pC=v.forwardRef((n,o)=>{const{__scopeSelect:s,...a}=n,u=Ya(s);return Mr(Og,s).position==="popper"?l.jsx(Kb,{...u,...a,ref:o}):null});pC.displayName=Og;var Lg="SelectBubbleInput",Ag=v.forwardRef(({__scopeSelect:n,...o},s)=>{const a=Tr(Lg,n),{value:u,onValueChange:d,required:p,disabled:m,name:h,autoComplete:y,form:w}=a,{nativeOptions:g,nativeSelectKey:k}=a,b=v.useRef(null),j=Qe(s,b),S=u??"",C=rg(S),E=Array.from(g).some(T=>(T.props.value??"")==="");return v.useEffect(()=>{const T=b.current;if(!T)return;const _=window.HTMLSelectElement.prototype,D=Object.getOwnPropertyDescriptor(_,"value").set;if(C!==S&&D){const L=new Event("change",{bubbles:!0});D.call(T,S),T.dispatchEvent(L)}},[C,S]),l.jsxs(Ae.select,{"aria-hidden":!0,required:p,tabIndex:-1,name:h,autoComplete:y,disabled:m,form:w,onChange:T=>d(T.target.value),...o,style:{...og,...o.style},ref:j,defaultValue:S,children:[Ga(u)&&!E?l.jsx("option",{value:""}):null,Array.from(g)]},k)});Ag.displayName=Lg;function mC(n){return typeof n=="function"}function Ga(n){return n===""||n===void 0}function Ig(n){const o=Hn(n),s=v.useRef(""),a=v.useRef(0),u=v.useCallback(p=>{const m=s.current+p;o(m),(function h(y){s.current=y,window.clearTimeout(a.current),y!==""&&(a.current=window.setTimeout(()=>h(""),1e3))})(m)},[o]),d=v.useCallback(()=>{s.current="",window.clearTimeout(a.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(a.current),[]),[s,u,d]}function Dg(n,o,s){const u=o.length>1&&Array.from(o).every(y=>y===o[0])?o[0]:o,d=s?n.indexOf(s):-1;let p=hC(n,Math.max(d,0));u.length===1&&(p=p.filter(y=>y!==s));const h=p.find(y=>y.textValue.toLowerCase().startsWith(u.toLowerCase()));return h!==s?h:void 0}function hC(n,o){return n.map((s,a)=>n[(o+a)%n.length])}const Fs=hg,$s=yg,Ao=v.forwardRef(({className:n,children:o,...s},a)=>l.jsx(Uu,{ref:a,className:be("flex h-9 w-full items-center justify-between rounded-card border border-border bg-surface-raised px-3 py-2 text-sm text-fg placeholder:text-fg-subtle transition-colors","hover:border-border/80 focus:outline-none focus:ring-2 focus:ring-accent/30 focus:border-accent/50","disabled:cursor-not-allowed disabled:opacity-50"," [&>span]:line-clamp-1",n),...s,children:o}));Ao.displayName=Uu.displayName;const Io=v.forwardRef(({className:n,children:o,position:s="popper",...a},u)=>l.jsx(wg,{children:l.jsx(Vu,{ref:u,className:be("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-card border border-border bg-surface shadow-card animate-scale-in",s==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1",n),position:s,...a,children:l.jsx(Ng,{className:be("p-1",s==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:o})})}));Io.displayName=Vu.displayName;const Ot=v.forwardRef(({className:n,children:o,...s},a)=>l.jsxs(Hu,{ref:a,className:be("relative flex w-full cursor-pointer select-none items-center rounded px-2 py-1.5 text-sm text-fg-muted outline-none","hover:bg-surface-raised hover:text-fg","focus:bg-surface-raised focus:text-fg","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n),...s,children:[l.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(Tg,{children:l.jsx(nh,{className:"h-4 w-4 text-accent"})})}),l.jsx(Pg,{children:o})]}));Ot.displayName=Hu.displayName;var Qa="Dialog",[zg]=Ys(Qa),[gC,pn]=zg(Qa),Fg=n=>{const{__scopeDialog:o,children:s,open:a,defaultOpen:u,onOpenChange:d,modal:p=!0}=n,m=v.useRef(null),h=v.useRef(null),[y,w]=Pa({prop:a,defaultProp:u??!1,onChange:d,caller:Qa});return l.jsx(gC,{scope:o,triggerRef:m,contentRef:h,contentId:Mo(),titleId:Mo(),descriptionId:Mo(),open:y,onOpenChange:w,onOpenToggle:v.useCallback(()=>w(g=>!g),[w]),modal:p,children:s})};Fg.displayName=Qa;var $g="DialogTrigger",vC=v.forwardRef((n,o)=>{const{__scopeDialog:s,...a}=n,u=pn($g,s),d=Qe(o,u.triggerRef);return l.jsx(Ae.button,{type:"button","aria-haspopup":"dialog","aria-expanded":u.open,"aria-controls":u.open?u.contentId:void 0,"data-state":qu(u.open),...a,ref:d,onClick:$e(n.onClick,u.onOpenToggle)})});vC.displayName=$g;var Ku="DialogPortal",[yC,Bg]=zg(Ku,{forceMount:void 0}),Ug=n=>{const{__scopeDialog:o,forceMount:s,children:a,container:u}=n,d=pn(Ku,o);return l.jsx(yC,{scope:o,forceMount:s,children:v.Children.map(a,p=>l.jsx(Qs,{present:s||d.open,children:l.jsx($u,{asChild:!0,container:u,children:p})}))})};Ug.displayName=Ku;var Ta="DialogOverlay",Yu=v.forwardRef((n,o)=>{const s=Bg(Ta,n.__scopeDialog),{forceMount:a=s.forceMount,...u}=n,d=pn(Ta,n.__scopeDialog);return d.modal?l.jsx(Qs,{present:a||d.open,children:l.jsx(wC,{...u,ref:o})}):null});Yu.displayName=Ta;var xC=$o("DialogOverlay.RemoveScroll"),wC=v.forwardRef((n,o)=>{const{__scopeDialog:s,...a}=n,u=pn(Ta,s),d=yS(),p=Qe(o,d);return l.jsx(Bu,{as:xC,allowPinchZoom:!0,shards:[u.contentRef],children:l.jsx(Ae.div,{"data-state":qu(u.open),...a,ref:p,style:{pointerEvents:"auto",...a.style}})})}),Uo="DialogContent",Gu=v.forwardRef((n,o)=>{const s=Bg(Uo,n.__scopeDialog),{forceMount:a=s.forceMount,...u}=n,d=pn(Uo,n.__scopeDialog);return l.jsx(Qs,{present:a||d.open,children:d.modal?l.jsx(SC,{...u,ref:o}):l.jsx(bC,{...u,ref:o})})});Gu.displayName=Uo;var SC=v.forwardRef((n,o)=>{const s=pn(Uo,n.__scopeDialog),a=v.useRef(null),u=Qe(o,s.contentRef,a);return v.useEffect(()=>{const d=a.current;if(d)return ig(d)},[]),l.jsx(Vg,{...n,ref:u,trapFocus:s.open,disableOutsidePointerEvents:s.open,onCloseAutoFocus:$e(n.onCloseAutoFocus,d=>{var p;d.preventDefault(),(p=s.triggerRef.current)==null||p.focus()}),onPointerDownOutside:$e(n.onPointerDownOutside,d=>{const p=d.detail.originalEvent,m=p.button===0&&p.ctrlKey===!0;(p.button===2||m)&&d.preventDefault()}),onFocusOutside:$e(n.onFocusOutside,d=>d.preventDefault())})}),bC=v.forwardRef((n,o)=>{const s=pn(Uo,n.__scopeDialog),a=v.useRef(!1),u=v.useRef(!1);return l.jsx(Vg,{...n,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:d=>{var p,m;(p=n.onCloseAutoFocus)==null||p.call(n,d),d.defaultPrevented||(a.current||(m=s.triggerRef.current)==null||m.focus(),d.preventDefault()),a.current=!1,u.current=!1},onInteractOutside:d=>{var h,y;(h=n.onInteractOutside)==null||h.call(n,d),d.defaultPrevented||(a.current=!0,d.detail.originalEvent.type==="pointerdown"&&(u.current=!0));const p=d.target;((y=s.triggerRef.current)==null?void 0:y.contains(p))&&d.preventDefault(),d.detail.originalEvent.type==="focusin"&&u.current&&d.preventDefault()}})}),Vg=v.forwardRef((n,o)=>{const{__scopeDialog:s,trapFocus:a,onOpenAutoFocus:u,onCloseAutoFocus:d,...p}=n,m=pn(Uo,s);return Oh(),l.jsx(l.Fragment,{children:l.jsx(Ru,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:u,onUnmountAutoFocus:d,children:l.jsx(Pu,{role:"dialog",id:m.contentId,"aria-describedby":m.descriptionId,"aria-labelledby":m.titleId,"data-state":qu(m.open),...p,ref:o,deferPointerDownOutside:!0,onDismiss:()=>m.onOpenChange(!1)})})})}),Wg="DialogTitle",Qu=v.forwardRef((n,o)=>{const{__scopeDialog:s,...a}=n,u=pn(Wg,s);return l.jsx(Ae.h2,{id:u.titleId,...a,ref:o})});Qu.displayName=Wg;var Hg="DialogDescription",Xu=v.forwardRef((n,o)=>{const{__scopeDialog:s,...a}=n,u=pn(Hg,s);return l.jsx(Ae.p,{id:u.descriptionId,...a,ref:o})});Xu.displayName=Hg;var Kg="DialogClose",Yg=v.forwardRef((n,o)=>{const{__scopeDialog:s,...a}=n,u=pn(Kg,s);return l.jsx(Ae.button,{type:"button",...a,ref:o,onClick:$e(n.onClick,()=>u.onOpenChange(!1))})});Yg.displayName=Kg;function qu(n){return n?"open":"closed"}const Vn=Fg,kC=Ug,Gg=v.forwardRef(({className:n,...o},s)=>l.jsx(Yu,{ref:s,className:be("fixed inset-0 z-50 bg-black/60 backdrop-blur-sm","data-[state=open]:animate-fade-in",n),...o}));Gg.displayName=Yu.displayName;const Nn=v.forwardRef(({className:n,children:o,size:s="md",...a},u)=>{const d={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl"};return l.jsxs(kC,{children:[l.jsx(Gg,{}),l.jsxs(Gu,{ref:u,className:be("fixed left-[50%] top-[50%] z-50 translate-x-[-50%] translate-y-[-50%]","w-full max-h-[90vh] overflow-y-auto rounded-card border border-border bg-surface shadow-card animate-scale-in","focus:outline-none",d[s],n),...a,children:[o,l.jsxs(Yg,{className:"absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-accent/40 focus:ring-offset-2 focus:ring-offset-surface disabled:pointer-events-none",children:[l.jsx(uh,{className:"h-4 w-4 text-fg-muted"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]})});Nn.displayName=Gu.displayName;const jn=v.forwardRef(({className:n,...o},s)=>l.jsx("div",{ref:s,className:be("flex flex-col gap-1.5 p-5 pb-0",n),...o}));jn.displayName="ModalHeader";const En=v.forwardRef(({className:n,...o},s)=>l.jsx(Qu,{ref:s,className:be("text-base font-semibold text-fg",n),...o}));En.displayName=Qu.displayName;const _n=v.forwardRef(({className:n,...o},s)=>l.jsx(Xu,{ref:s,className:be("text-sm text-fg-muted",n),...o}));_n.displayName=Xu.displayName;const eo=v.forwardRef(({className:n,...o},s)=>l.jsx("div",{ref:s,className:be("p-5",n),...o}));eo.displayName="ModalBody";const Pn=v.forwardRef(({className:n,...o},s)=>l.jsx("div",{ref:s,className:be("flex items-center justify-end gap-3 p-5 pt-0",n),...o}));Pn.displayName="ModalFooter";const Fm={id:void 0,name:"",host:"",port:22,ssh_user:"root",ssh_key_id:null,mac_address:"",wol_enabled:!1,broadcast_addr:"",wake_timeout_seconds:180,wake_check_interval_seconds:5};function CC(){var D;const[n,o]=v.useState([]),[s,a]=v.useState([]),[u,d]=v.useState(!1),[p,m]=v.useState(null),[h,y]=v.useState(Fm),[w,g]=v.useState(!1),[k,b]=v.useState(!1);v.useEffect(()=>{j(),b(!0),Be("/api/machines/refresh",{method:"POST"}).catch(()=>{});const L=setTimeout(()=>b(!1),5e3);return()=>clearTimeout(L)},[]),v.useEffect(()=>Th(F=>{o(P=>P.map(X=>X.id===F.machine_id?{...X,status:F.status}:X))}),[]);async function j(){try{const[L,F]=await Promise.all([Be("/api/machines"),Be("/api/ssh-keys")]);o(L),a(F)}catch{}}function S(){y(Fm),d(!0)}function C(L){y({id:L.id,name:L.name,host:L.host,port:L.port,ssh_user:L.ssh_user,ssh_key_id:L.ssh_key_id,mac_address:L.mac_address||"",wol_enabled:L.wol_enabled,broadcast_addr:L.broadcast_addr||"",wake_timeout_seconds:L.wake_timeout_seconds||180,wake_check_interval_seconds:L.wake_check_interval_seconds||5}),d(!0)}async function E(L){if(L.preventDefault(),!h.name.trim()||!h.host.trim()){Te.error("Name and host are required");return}if(h.mac_address&&!/^([0-9A-Fa-f]{2}[:-]){5}[0-9A-Fa-f]{2}$/.test(h.mac_address)){Te.error("Invalid MAC address format (AA:BB:CC:DD:EE:FF)");return}g(!0);try{const F={id:h.id||null,name:h.name,host:h.host,port:Number(h.port),ssh_user:h.ssh_user,ssh_key_id:h.ssh_key_id,mac_address:h.mac_address||null,wol_enabled:!!h.wol_enabled,broadcast_addr:h.broadcast_addr||null,wake_timeout_seconds:Number(h.wake_timeout_seconds),wake_check_interval_seconds:Number(h.wake_check_interval_seconds)};await Be(h.id?`/api/machines/${h.id}`:"/api/machines",{method:h.id?"PUT":"POST",body:F}),d(!1),Te.success(h.id?"Machine updated":"Machine created"),j()}catch(F){Te.error(F.message)}finally{g(!1)}}async function T(){if(p!==null)try{await Be(`/api/machines/${p}`,{method:"DELETE"}),Te.success("Machine deleted"),m(null),j()}catch(L){Te.error(L.message)}}async function _(L){try{await Be(`/api/machines/${L.id}/test-wol`,{method:"POST"}),Te.success(`Magic packet sent (${L.mac_address})`)}catch(F){Te.error(`Wake failed: ${F.message}`)}}function A(L){if(!L)return"Server Key";const F=s.find(P=>P.id===L);return F?F.label:`Key #${L}`}return l.jsxs("div",{className:"space-y-6",children:[l.jsx(no,{title:"Machines",description:"Remote machines reachable via SSH",actions:l.jsxs(xe,{onClick:S,size:"sm",children:[l.jsx(Fo,{className:"h-4 w-4"}),"Add Machine"]})}),l.jsx($t,{children:l.jsx("div",{className:"p-0",children:n.length===0?l.jsx(Yo,{icon:l.jsx(ku,{className:"h-5 w-5"}),title:"No machines",description:"Add a remote machine to start syncing data",action:l.jsxs(xe,{onClick:S,size:"sm",children:[l.jsx(Fo,{className:"h-4 w-4"}),"Add Machine"]})}):l.jsxs(l.Fragment,{children:[k&&l.jsxs("div",{className:"flex items-center gap-2 px-4 pt-3 text-xs text-muted-foreground",children:[l.jsx("span",{className:"inline-block h-2 w-2 bg-amber-400 rounded-full animate-pulse"}),"Checking machine status..."]}),l.jsxs(Ws,{children:[l.jsx(Hs,{children:l.jsxs(Wn,{children:[l.jsx(ze,{children:"Name"}),l.jsx(ze,{children:"Host"}),l.jsx(ze,{children:"SSH Key"}),l.jsx(ze,{children:"WoL"}),l.jsx(ze,{children:"WoL Timeout"}),l.jsx(ze,{children:"Status"}),l.jsx(ze,{className:"w-24",children:"Actions"})]})}),l.jsx(Ks,{children:n.map(L=>l.jsxs(Wn,{children:[l.jsx(Fe,{className:"font-medium",children:L.name}),l.jsx(Fe,{children:l.jsxs("span",{className:"font-mono text-xs text-fg-muted",children:[L.host,":",L.port]})}),l.jsx(Fe,{className:"text-fg-muted text-xs",children:A(L.ssh_key_id)}),l.jsx(Fe,{children:L.wol_enabled?l.jsx(un,{variant:"info",label:"Yes"}):l.jsx("span",{className:"text-fg-subtle text-xs",children:"No"})}),l.jsx(Fe,{children:L.wol_enabled?l.jsxs("span",{className:"text-xs text-fg-muted",children:[L.wake_timeout_seconds,"s"]}):l.jsx("span",{className:"text-fg-subtle text-xs",children:"—"})}),l.jsx(Fe,{children:l.jsx(NC,{status:L.status})}),l.jsx(Fe,{children:l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx(xe,{variant:"ghost",size:"icon-sm",onClick:()=>C(L),title:"Edit",children:l.jsx(ah,{className:"h-3.5 w-3.5"})}),L.wol_enabled&&l.jsx(xe,{variant:"ghost",size:"icon-sm",onClick:()=>_(L),title:"Test Wake-on-LAN",children:l.jsx(dh,{className:"h-3.5 w-3.5"})}),l.jsx(xe,{variant:"ghost",size:"icon-sm",onClick:()=>m(L.id),className:"text-rose-400 hover:text-rose-300 hover:bg-rose-500/10",title:"Delete",children:l.jsx(Cu,{className:"h-3.5 w-3.5"})})]})})]},L.id))})]})]})})}),l.jsx(Vn,{open:u,onOpenChange:d,children:l.jsxs(Nn,{size:"md",children:[l.jsxs(jn,{children:[l.jsx(En,{children:h.id?"Edit Machine":"Add Machine"}),l.jsx(_n,{children:h.id?"Update the configuration for this machine":"Configure a new remote machine for syncing"})]}),l.jsxs("form",{onSubmit:E,children:[l.jsxs(eo,{className:"space-y-4",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(De,{htmlFor:"name",required:!0,children:"Name"}),l.jsx(ht,{id:"name",placeholder:"backup-nas",value:h.name,onChange:L=>y({...h,name:L.target.value})})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(De,{htmlFor:"host",children:"Host / IP"}),l.jsx(ht,{id:"host",placeholder:"192.168.1.100",value:h.host,onChange:L=>y({...h,host:L.target.value})})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(De,{htmlFor:"port",children:"SSH Port"}),l.jsx(ht,{id:"port",type:"number",placeholder:"22",value:h.port,onChange:L=>y({...h,port:Number(L.target.value)})})]})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(De,{htmlFor:"ssh_user",children:"SSH User"}),l.jsx(ht,{id:"ssh_user",placeholder:"root",value:h.ssh_user,onChange:L=>y({...h,ssh_user:L.target.value})})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(De,{htmlFor:"ssh_key_id",children:"SSH Key"}),l.jsxs(Fs,{value:((D=h.ssh_key_id)==null?void 0:D.toString())??"",onValueChange:L=>y({...h,ssh_key_id:L?Number(L):null}),children:[l.jsx(Ao,{id:"ssh_key_id",children:l.jsx($s,{placeholder:"Server Key"})}),l.jsxs(Io,{children:[l.jsx(Ot,{value:"",children:"Server Key (default)"}),s.map(L=>l.jsxs(Ot,{value:L.id.toString(),children:[L.label," ",L.in_use?"(in use)":""]},L.id))]})]})]})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(De,{htmlFor:"mac_address",children:"MAC Address"}),l.jsx(ht,{id:"mac_address",placeholder:"AA:BB:CC:DD:EE:FF",value:h.mac_address,onChange:L=>y({...h,mac_address:L.target.value})}),l.jsx("p",{className:"text-xs text-fg-subtle",children:"Required for Wake-on-LAN"})]}),l.jsxs("div",{className:be("flex items-center gap-2 rounded-card p-3 transition-colors",h.wol_enabled?"bg-accent/5 border border-accent/20":"bg-surface-raised border border-border"),children:[l.jsx("input",{type:"checkbox",id:"wol_enabled",checked:h.wol_enabled,onChange:L=>y({...h,wol_enabled:L.target.checked}),className:"h-4 w-4 rounded border-border accent-accent"}),l.jsx(De,{htmlFor:"wol_enabled",className:"cursor-pointer mb-0",children:"Enable Wake-on-LAN"})]}),h.wol_enabled&&l.jsxs("div",{className:"space-y-3 p-3 border border-border rounded-card bg-surface-raised",children:[l.jsx("p",{className:"text-xs text-fg-subtle font-medium",children:"Wake-on-LAN Settings"}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(De,{htmlFor:"broadcast_addr",children:"Broadcast Address"}),l.jsx(ht,{id:"broadcast_addr",placeholder:"255.255.255.255",value:h.broadcast_addr,onChange:L=>y({...h,broadcast_addr:L.target.value})}),l.jsx("p",{className:"text-xs text-fg-subtle",children:"Leave blank to use 255.255.255.255. Set to your subnet broadcast address if the server has multiple interfaces."})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(De,{htmlFor:"wake_timeout_seconds",children:"Wake timeout (s)"}),l.jsx(ht,{id:"wake_timeout_seconds",type:"number",min:10,max:600,value:h.wake_timeout_seconds,onChange:L=>y({...h,wake_timeout_seconds:Number(L.target.value)})}),l.jsx("p",{className:"text-xs text-fg-subtle",children:"HP Microservers typically need ~180s."})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(De,{htmlFor:"wake_check_interval_seconds",children:"Check interval (s)"}),l.jsx(ht,{id:"wake_check_interval_seconds",type:"number",min:1,max:60,value:h.wake_check_interval_seconds,onChange:L=>y({...h,wake_check_interval_seconds:Number(L.target.value)})}),l.jsx("p",{className:"text-xs text-fg-subtle",children:"How often to poll SSH readiness."})]})]})]})]}),l.jsxs(Pn,{children:[l.jsx(xe,{type:"button",variant:"secondary",onClick:()=>d(!1),children:"Cancel"}),l.jsx(xe,{type:"submit",loading:w,children:h.id?"Save Changes":"Add Machine"})]})]})]})}),l.jsx(Vn,{open:p!==null,onOpenChange:L=>!L&&m(null),children:l.jsxs(Nn,{size:"sm",children:[l.jsxs(jn,{children:[l.jsx(En,{children:"Delete Machine"}),l.jsx(_n,{children:"Are you sure you want to delete this machine? This action cannot be undone."})]}),l.jsxs(Pn,{children:[l.jsx(xe,{variant:"secondary",onClick:()=>m(null),children:"Cancel"}),l.jsx(xe,{variant:"danger-solid",onClick:T,children:"Delete"})]})]})})]})}function NC({status:n}){const o=n==="online"?"success":n==="offline"?"neutral":"info";return l.jsx(un,{variant:o,label:n})}const Xa=v.forwardRef(({className:n,error:o,...s},a)=>l.jsx("textarea",{className:be("flex min-h-[80px] w-full rounded-card border bg-surface-raised px-3 py-2 text-sm text-fg placeholder:text-fg-subtle transition-colors resize-none","border-border hover:border-border/80","focus:outline-none focus:ring-2 focus:ring-accent/30 focus:border-accent/50","disabled:cursor-not-allowed disabled:opacity-50",o&&"border-rose-500/50 focus:ring-rose-500/30 focus:border-rose-500/50",n),ref:a,...s}));Xa.displayName="Textarea";const $m={id:void 0,name:"",source_machine_id:null,source_path:"",dest_machine_id:null,dest_path:"",direction:"push",rsync_flags:"-aP",exclude_patterns:"",enabled:!0};function jC(){var L,F;const[n,o]=v.useState([]),[s,a]=v.useState([]),[u,d]=v.useState(!1),[p,m]=v.useState(null),[h,y]=v.useState($m),[w,g]=v.useState({}),[k,b]=v.useState(!1);v.useEffect(()=>{j()},[]);async function j(){try{const[P,X]=await Promise.all([Be("/api/sync-pairs"),Be("/api/machines")]);o(P),a(X)}catch{}}function S(){y($m),d(!0)}function C(P){y({id:P.id,name:P.name,source_machine_id:P.source_machine_id,source_path:P.source_path,dest_machine_id:P.dest_machine_id,dest_path:P.dest_path,direction:P.direction,rsync_flags:P.rsync_flags,exclude_patterns:P.exclude_patterns||"",enabled:P.enabled}),d(!0)}async function E(P){if(P.preventDefault(),!h.name.trim()){Te.error("Name is required");return}if(!h.source_path.trim()||!h.dest_path.trim()){Te.error("Source and destination paths are required");return}b(!0);try{await Be(h.id?`/api/sync-pairs/${h.id}`:"/api/sync-pairs",{method:h.id?"PUT":"POST",body:{name:h.name,source_machine_id:h.source_machine_id,source_path:h.source_path,dest_machine_id:h.dest_machine_id,dest_path:h.dest_path,direction:h.direction,rsync_flags:h.rsync_flags,exclude_patterns:h.exclude_patterns,enabled:h.enabled}}),d(!1),Te.success(h.id?"Sync pair updated":"Sync pair created"),j()}catch(X){Te.error(X.message)}finally{b(!1)}}async function T(P){g(X=>({...X,[P]:!0}));try{await Be(`/api/sync-pairs/${P}/run`,{method:"POST"}),Te.success("Job triggered"),j()}catch(X){Te.error(X.message)}finally{g(X=>({...X,[P]:!1}))}}async function _(){if(p!==null)try{await Be(`/api/sync-pairs/${p}`,{method:"DELETE"}),Te.success("Sync pair deleted"),m(null),j()}catch(P){Te.error(P.message)}}function A(P){if(!P)return"Local server";const X=s.find(se=>se.id===P);return X?X.name:`Machine ${P}`}const D=P=>P==="push"?l.jsx(Z0,{className:"h-3 w-3"}):P==="pull"?l.jsx(ru,{className:"h-3 w-3"}):l.jsx(su,{className:"h-3 w-3"});return l.jsxs("div",{className:"space-y-6",children:[l.jsx(no,{title:"Sync Pairs",description:"Define source and destination for rsync operations",actions:l.jsxs(xe,{onClick:S,size:"sm",children:[l.jsx(Fo,{className:"h-4 w-4"}),"Add Sync Pair"]})}),l.jsx($t,{children:l.jsx("div",{className:"p-0",children:n.length===0?l.jsx(Yo,{icon:l.jsx(su,{className:"h-5 w-5"}),title:"No sync pairs",description:"Create a sync pair to define data transfer between machines",action:l.jsxs(xe,{onClick:S,size:"sm",children:[l.jsx(Fo,{className:"h-4 w-4"}),"Add Sync Pair"]})}):l.jsxs(Ws,{children:[l.jsx(Hs,{children:l.jsxs(Wn,{children:[l.jsx(ze,{children:"Name"}),l.jsx(ze,{children:"Source"}),l.jsx(ze,{children:"Destination"}),l.jsx(ze,{children:"Direction"}),l.jsx(ze,{children:"Enabled"}),l.jsx(ze,{className:"w-28",children:"Actions"})]})}),l.jsx(Ks,{children:n.map(P=>l.jsxs(Wn,{children:[l.jsx(Fe,{className:"font-medium",children:P.name}),l.jsx(Fe,{children:l.jsxs("span",{className:"font-mono text-xs text-fg-muted",children:[A(P.source_machine_id),":",P.source_path]})}),l.jsx(Fe,{children:l.jsxs("span",{className:"font-mono text-xs text-fg-muted",children:[A(P.dest_machine_id),":",P.dest_path]})}),l.jsx(Fe,{children:l.jsxs("div",{className:"flex items-center gap-1.5",children:[D(P.direction),l.jsx("span",{className:"text-xs capitalize",children:P.direction})]})}),l.jsx(Fe,{children:P.enabled?l.jsx(un,{variant:"success",label:"Active"}):l.jsx(un,{variant:"neutral",label:"Disabled"})}),l.jsx(Fe,{children:l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx(xe,{variant:"ghost",size:"icon-sm",onClick:()=>C(P),className:"text-fg-muted hover:text-fg hover:bg-surface-raised",title:"Edit",children:l.jsx(ah,{className:"h-3.5 w-3.5"})}),l.jsx(xe,{variant:"ghost",size:"icon-sm",onClick:()=>T(P.id),disabled:w[P.id],loading:w[P.id],className:"text-emerald-400 hover:text-emerald-300 hover:bg-emerald-500/10",title:"Run now",children:l.jsx(Tw,{className:"h-3.5 w-3.5"})}),l.jsx(xe,{variant:"ghost",size:"icon-sm",onClick:()=>m(P.id),className:"text-rose-400 hover:text-rose-300 hover:bg-rose-500/10",title:"Delete",children:l.jsx(Cu,{className:"h-3.5 w-3.5"})})]})})]},P.id))})]})})}),l.jsx(Vn,{open:u,onOpenChange:d,children:l.jsxs(Nn,{size:"lg",children:[l.jsxs(jn,{children:[l.jsx(En,{children:h.id?"Edit Sync Pair":"Add Sync Pair"}),l.jsx(_n,{children:h.id?"Update the configuration for this sync pair":"Define a new source and destination for data syncing"})]}),l.jsxs("form",{onSubmit:E,children:[l.jsxs(eo,{className:"space-y-4",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(De,{htmlFor:"sp-name",required:!0,children:"Name"}),l.jsx(ht,{id:"sp-name",placeholder:"backup-photos",value:h.name,onChange:P=>y({...h,name:P.target.value})})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(De,{htmlFor:"sp-source-machine",children:"Source Machine"}),l.jsxs(Fs,{value:((L=h.source_machine_id)==null?void 0:L.toString())??"",onValueChange:P=>y({...h,source_machine_id:P?Number(P):null}),children:[l.jsx(Ao,{id:"sp-source-machine",children:l.jsx($s,{placeholder:"Local server"})}),l.jsxs(Io,{children:[l.jsx(Ot,{value:"",children:"Local server"}),s.map(P=>l.jsx(Ot,{value:P.id.toString(),children:P.name},P.id))]})]})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(De,{htmlFor:"sp-dest-machine",children:"Dest Machine"}),l.jsxs(Fs,{value:((F=h.dest_machine_id)==null?void 0:F.toString())??"",onValueChange:P=>y({...h,dest_machine_id:P?Number(P):null}),children:[l.jsx(Ao,{id:"sp-dest-machine",children:l.jsx($s,{placeholder:"Local server"})}),l.jsxs(Io,{children:[l.jsx(Ot,{value:"",children:"Local server"}),s.map(P=>l.jsx(Ot,{value:P.id.toString(),children:P.name},P.id))]})]})]})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(De,{htmlFor:"sp-source-path",required:!0,children:"Source Path"}),l.jsx(ht,{id:"sp-source-path",placeholder:"/data/photos",value:h.source_path,onChange:P=>y({...h,source_path:P.target.value})})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(De,{htmlFor:"sp-dest-path",required:!0,children:"Dest Path"}),l.jsx(ht,{id:"sp-dest-path",placeholder:"/backup/photos",value:h.dest_path,onChange:P=>y({...h,dest_path:P.target.value})})]})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(De,{htmlFor:"sp-direction",children:"Direction"}),l.jsxs(Fs,{value:h.direction,onValueChange:P=>y({...h,direction:P}),children:[l.jsx(Ao,{id:"sp-direction",children:l.jsx($s,{})}),l.jsxs(Io,{children:[l.jsx(Ot,{value:"push",children:"Push"}),l.jsx(Ot,{value:"pull",children:"Pull"}),l.jsx(Ot,{value:"mirror",children:"Mirror"})]})]})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(De,{htmlFor:"sp-rsync-flags",children:"Rsync Flags"}),l.jsx(ht,{id:"sp-rsync-flags",placeholder:"-aP",value:h.rsync_flags,onChange:P=>y({...h,rsync_flags:P.target.value})})]})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(De,{htmlFor:"sp-exclude",children:"Exclude Patterns"}),l.jsx(Xa,{id:"sp-exclude",placeholder:`node_modules -.git -*.tmp`,value:h.exclude_patterns,onChange:P=>y({...h,exclude_patterns:P.target.value}),className:"font-mono text-xs",rows:3}),l.jsx("p",{className:"text-xs text-fg-subtle",children:"One pattern per line"})]}),l.jsxs("div",{className:be("flex items-center gap-2 rounded-card p-3 transition-colors",h.enabled?"bg-accent/5 border border-accent/20":"bg-surface-raised border border-border"),children:[l.jsx("input",{type:"checkbox",id:"sp-enabled",checked:h.enabled,onChange:P=>y({...h,enabled:P.target.checked}),className:"h-4 w-4 rounded border-border accent-accent"}),l.jsx(De,{htmlFor:"sp-enabled",className:"cursor-pointer mb-0",children:"Enable this sync pair"})]})]}),l.jsxs(Pn,{children:[l.jsx(xe,{type:"button",variant:"secondary",onClick:()=>d(!1),children:"Cancel"}),l.jsx(xe,{type:"submit",loading:k,children:h.id?"Save Changes":"Add Sync Pair"})]})]})]})}),l.jsx(Vn,{open:p!==null,onOpenChange:P=>!P&&m(null),children:l.jsxs(Nn,{size:"sm",children:[l.jsxs(jn,{children:[l.jsx(En,{children:"Delete Sync Pair"}),l.jsx(_n,{children:"Are you sure you want to delete this sync pair? All associated job history will remain."})]}),l.jsxs(Pn,{children:[l.jsx(xe,{variant:"secondary",onClick:()=>m(null),children:"Cancel"}),l.jsx(xe,{variant:"danger-solid",onClick:_,children:"Delete"})]})]})})]})}function EC(){const[n,o]=v.useState([]),[s,a]=v.useState([]),[u,d]=v.useState(""),[p,m]=v.useState(""),[h,y]=v.useState("7d"),[w,g]=v.useState(0),[k,b]=v.useState(0),[j,S]=v.useState(!0),C=50;v.useEffect(()=>{T()},[]),v.useEffect(()=>{E()},[u,p,h,k]);async function E(){S(!0);try{let F=`/api/jobs?limit=${C}&offset=${k*C}`;if(u&&(F+=`&status=${u}`),p&&(F+=`&sync_pair_id=${p}`),h==="24h"){const oe=new Date(Date.now()-864e5).toISOString();F+=`&from=${encodeURIComponent(oe)}`}else if(h==="7d"){const oe=new Date(Date.now()-6048e5).toISOString();F+=`&from=${encodeURIComponent(oe)}`}else if(h==="30d"){const oe=new Date(Date.now()-2592e6).toISOString();F+=`&from=${encodeURIComponent(oe)}`}const P=await fetch(F,{credentials:"include"}),X=P.headers.get("X-Total-Count");X&&g(Number(X));const se=await P.json();o(Array.isArray(se)?se:[])}catch{}finally{S(!1)}}async function T(){try{a(await Be("/api/sync-pairs"))}catch{}}async function _(F){try{await Be(`/api/jobs/${F}/cancel`,{method:"POST"}),Te.success("Job cancelled"),E()}catch(P){Te.error(P.message)}}function A(F){const P=s.find(X=>X.id===F);return P?P.name:`Pair ${F}`}const D=Math.ceil(w/C),L=({label:F,value:P,onChange:X})=>l.jsxs(Fs,{value:P,onValueChange:X,children:[l.jsx(Ao,{className:"w-auto min-w-[140px]",children:l.jsx($s,{placeholder:F})}),l.jsxs(Io,{children:[l.jsx(Ot,{value:"",children:F}),F==="All Pairs"&&s.map(se=>l.jsx(Ot,{value:se.id.toString(),children:se.name},se.id)),F==="All Statuses"&&[{value:"queued",label:"Queued"},{value:"waking_up",label:"Waking Up"},{value:"running",label:"Running"},{value:"success",label:"Success"},{value:"failed",label:"Failed"},{value:"cancelled",label:"Cancelled"}].map(se=>l.jsx(Ot,{value:se.value,children:se.label},se.value)),F==="Time Range"&&[{value:"24h",label:"Last 24h"},{value:"7d",label:"Last 7 days"},{value:"30d",label:"Last 30 days"},{value:"all",label:"All time"}].map(se=>l.jsx(Ot,{value:se.value,children:se.label},se.value))]})]});return l.jsxs("div",{className:"space-y-6",children:[l.jsx(no,{title:"Job History",description:`${w} job${w!==1?"s":""} found`,actions:l.jsxs(xe,{variant:"secondary",size:"sm",onClick:()=>E(),disabled:j,children:[l.jsx(lh,{className:be("h-4 w-4",j&&"animate-spin")}),"Refresh"]})}),l.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[l.jsx(L,{label:"All Pairs",value:p,onChange:F=>{m(F),b(0)}}),l.jsx(L,{label:"All Statuses",value:u,onChange:F=>{d(F),b(0)}}),l.jsx(L,{label:"Time Range",value:h,onChange:F=>{y(F),b(0)}}),(u||p||h!=="7d")&&l.jsxs(xe,{variant:"ghost",size:"sm",onClick:()=>{d(""),m(""),y("7d"),b(0)},className:"text-fg-subtle",children:[l.jsx(ou,{className:"h-3.5 w-3.5"}),"Clear filters"]})]}),l.jsxs(_C,{className:"p-0",children:[j?l.jsx("div",{className:"p-5 space-y-3",children:Array.from({length:5}).map((F,P)=>l.jsx(zs,{className:"h-12 w-full"},P))}):n.length===0?l.jsx(Yo,{icon:l.jsx(ih,{className:"h-5 w-5"}),title:"No jobs found",description:u||p||h!=="7d"?"Try adjusting your filters":"Sync pairs will appear here once jobs are executed"}):l.jsxs(Ws,{children:[l.jsx(Hs,{children:l.jsxs(Wn,{children:[l.jsx(ze,{children:"ID"}),l.jsx(ze,{children:"Sync Pair"}),l.jsx(ze,{children:"Trigger"}),l.jsx(ze,{children:"Status"}),l.jsx(ze,{children:"Duration"}),l.jsx(ze,{children:"Started"}),l.jsx(ze,{children:"Finished"}),l.jsx(ze,{className:"w-20",children:"Actions"})]})}),l.jsx(Ks,{children:n.map(F=>l.jsxs(Wn,{children:[l.jsx(Fe,{children:l.jsxs(zo,{to:`/jobs/${F.id}`,className:"text-accent hover:text-accent-hover font-mono text-xs",children:["#",F.id]})}),l.jsx(Fe,{className:"text-fg-muted",children:A(F.sync_pair_id)}),l.jsx(Fe,{children:l.jsx("span",{className:"text-xs text-fg-muted capitalize",children:F.trigger_type})}),l.jsx(Fe,{children:l.jsx(un,{variant:za(F.status),label:Fa(F.status)})}),l.jsx(Fe,{className:"text-fg-muted font-mono text-xs",children:F.started_at?Ph((F.finished_at?new Date(F.finished_at).getTime():Date.now())-new Date(F.started_at).getTime()):"-"}),l.jsx(Fe,{className:"text-fg-muted text-xs",children:F.started_at?new Date(F.started_at).toLocaleString():"-"}),l.jsx(Fe,{className:"text-fg-muted text-xs",children:F.finished_at?new Date(F.finished_at).toLocaleString():"-"}),l.jsx(Fe,{children:["queued","waking_up","running"].includes(F.status)&&l.jsx(xe,{variant:"ghost",size:"icon-sm",onClick:()=>_(F.id),className:"text-rose-400 hover:text-rose-300 hover:bg-rose-500/10",title:"Cancel job",children:l.jsx(ou,{className:"h-3.5 w-3.5"})})})]},F.id))})]}),D>1&&l.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-t border-border",children:[l.jsxs("div",{className:"text-xs text-fg-muted",children:["Page ",k+1," of ",D," (",w," total)"]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(xe,{variant:"secondary",size:"icon-sm",onClick:()=>b(F=>Math.max(0,F-1)),disabled:k===0,children:l.jsx(rw,{className:"h-4 w-4"})}),l.jsx(xe,{variant:"secondary",size:"icon-sm",onClick:()=>b(F=>Math.min(D-1,F+1)),disabled:k>=D-1,children:l.jsx(sw,{className:"h-4 w-4"})})]})]})]})]})}function _C({children:n,className:o}){return l.jsx("div",{className:be("rounded-card border border-border bg-surface shadow-card",o),children:n})}var qa="Switch",[PC]=Ys(qa),[RC,Ju]=PC(qa);function TC(n){const{__scopeSwitch:o,checked:s,children:a,defaultChecked:u,disabled:d,form:p,name:m,onCheckedChange:h,required:y,value:w="on",internal_do_not_use_render:g}=n,[k,b]=Pa({prop:s,defaultProp:u??!1,onChange:h,caller:qa}),[j,S]=v.useState(null),[C,E]=v.useState(null),T=v.useRef(!1),_=j?!!p||!!j.closest("form"):!0,A={checked:k,setChecked:b,disabled:d,control:j,setControl:S,name:m,form:p,value:w,hasConsumerStoppedPropagationRef:T,required:y,defaultChecked:u,isFormControl:_,bubbleInput:C,setBubbleInput:E};return l.jsx(RC,{scope:o,...A,children:MC(g)?g(A):a})}var Qg="SwitchTrigger",Xg=v.forwardRef(({__scopeSwitch:n,onClick:o,...s},a)=>{const{control:u,form:d,value:p,disabled:m,checked:h,required:y,setControl:w,setChecked:g,hasConsumerStoppedPropagationRef:k,isFormControl:b,bubbleInput:j}=Ju(Qg,n),S=Qe(a,w),C=v.useRef(h);return v.useEffect(()=>{const E=d?u==null?void 0:u.ownerDocument.getElementById(d):u==null?void 0:u.form;if(E instanceof HTMLFormElement){const T=()=>g(C.current);return E.addEventListener("reset",T),()=>E.removeEventListener("reset",T)}},[u,d,g]),l.jsx(Ae.button,{type:"button",role:"switch","aria-checked":h,"aria-required":y,"data-state":tv(h),"data-disabled":m?"":void 0,disabled:m,value:p,...s,ref:S,onClick:$e(o,E=>{g(T=>!T),j&&b&&(k.current=E.isPropagationStopped(),k.current||E.stopPropagation())})})});Xg.displayName=Qg;var Zu=v.forwardRef((n,o)=>{const{__scopeSwitch:s,name:a,checked:u,defaultChecked:d,required:p,disabled:m,value:h,onCheckedChange:y,form:w,...g}=n;return l.jsx(TC,{__scopeSwitch:s,checked:u,defaultChecked:d,disabled:m,required:p,onCheckedChange:y,name:a,form:w,value:h,internal_do_not_use_render:({isFormControl:k})=>l.jsxs(l.Fragment,{children:[l.jsx(Xg,{...g,ref:o,__scopeSwitch:s}),k&&l.jsx(ev,{__scopeSwitch:s})]})})});Zu.displayName=qa;var qg="SwitchThumb",Jg=v.forwardRef((n,o)=>{const{__scopeSwitch:s,...a}=n,u=Ju(qg,s);return l.jsx(Ae.span,{"data-state":tv(u.checked),"data-disabled":u.disabled?"":void 0,...a,ref:o})});Jg.displayName=qg;var Zg="SwitchBubbleInput",ev=v.forwardRef(({__scopeSwitch:n,...o},s)=>{const{control:a,hasConsumerStoppedPropagationRef:u,checked:d,defaultChecked:p,required:m,disabled:h,name:y,value:w,form:g,bubbleInput:k,setBubbleInput:b}=Ju(Zg,n),j=Qe(s,b),S=rg(d),C=Yh(a);v.useEffect(()=>{const T=k;if(!T)return;const _=window.HTMLInputElement.prototype,D=Object.getOwnPropertyDescriptor(_,"checked").set,L=!u.current;if(S!==d&&D){const F=new Event("click",{bubbles:L});D.call(T,d),T.dispatchEvent(F)}},[k,S,d,u]);const E=v.useRef(d);return l.jsx(Ae.input,{type:"checkbox","aria-hidden":!0,defaultChecked:p??E.current,required:m,disabled:h,name:y,value:w,form:g,...o,tabIndex:-1,ref:j,style:{...o.style,...C,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});ev.displayName=Zg;function MC(n){return typeof n=="function"}function tv(n){return n?"checked":"unchecked"}const nv=v.forwardRef(({className:n,...o},s)=>l.jsx(Zu,{ref:s,className:be("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/40 focus-visible:ring-offset-2 focus-visible:ring-offset-canvas","disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:bg-accent data-[state=unchecked]:bg-surface-raised data-[state=unchecked]:border-border",n),...o,children:l.jsx(Jg,{className:be("pointer-events-none block h-4 w-4 rounded-full bg-fg-subtle shadow-lg ring-0 transition-transform","translate-x-0 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));nv.displayName=Zu.displayName;const Ja=v.forwardRef(({className:n,text:o,displayText:s,successDuration:a=2e3,...u},d)=>{const[p,m]=v.useState(!1),h=v.useCallback(async()=>{try{await navigator.clipboard.writeText(o),m(!0),setTimeout(()=>m(!1),a)}catch{}},[o,a]);return l.jsx(xe,{ref:d,variant:"ghost",size:"sm",onClick:h,className:be("gap-1.5 text-fg-muted hover:text-fg",n),...u,children:p?l.jsxs(l.Fragment,{children:[l.jsx(nh,{className:"h-3.5 w-3.5 text-emerald-400"}),l.jsx("span",{className:"text-emerald-400",children:"Copied"})]}):l.jsxs(l.Fragment,{children:[l.jsx(oh,{className:"h-3.5 w-3.5"}),l.jsx("span",{children:s??"Copy"})]})})});Ja.displayName="CopyButton";function OC({open:n,onOpenChange:o,job:s,fullLog:a}){const[u,d]=v.useState(!1),p=Rh(s.error_code??null),m=async()=>{const h=[`Job #${s.id}`,`Sync Pair ID: ${s.sync_pair_id}`,`Trigger: ${s.trigger_type}`,`Status: ${s.status}`,`Error Code: ${s.error_code??"unknown"}`,`Error: ${s.error_message??"none"}`,"","--- Full Log ---",a??"(no log available)"].join(` -`);await navigator.clipboard.writeText(h),d(!0),setTimeout(()=>d(!1),2e3)};return l.jsx(Vn,{open:n,onOpenChange:o,children:l.jsxs(Nn,{size:"lg",children:[l.jsxs(jn,{children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(ba,{className:"h-5 w-5 text-rose-400"}),l.jsx(En,{children:"Job Failed"})]}),l.jsxs(_n,{children:["Job #",s.id," finished with status"," ",l.jsx(un,{variant:za(s.status),label:s.status})]})]}),l.jsxs(eo,{className:"space-y-4",children:[p&&l.jsxs("div",{className:"rounded-card border border-rose-500/30 bg-rose-500/10 p-4 space-y-1",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(ba,{className:"h-4 w-4 text-rose-400 shrink-0"}),l.jsx("span",{className:"text-sm font-semibold text-rose-300",children:p.title})]}),l.jsx("p",{className:"text-xs text-rose-400/70 pl-6",children:p.hint})]}),s.error_message&&l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("p",{className:"text-xs font-medium text-fg-muted uppercase tracking-wider",children:"Error Message"}),l.jsx("div",{className:"rounded-card border border-border bg-canvas-raised p-3 font-mono text-xs text-rose-300/80 whitespace-pre-wrap break-all max-h-40 overflow-y-auto",children:s.error_message})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:"text-xs font-medium text-fg-muted uppercase tracking-wider",children:"Error Code"}),l.jsx("p",{className:"text-sm font-mono text-fg",children:s.error_code??"—"})]}),l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:"text-xs font-medium text-fg-muted uppercase tracking-wider",children:"Trigger"}),l.jsx("p",{className:"text-sm text-fg capitalize",children:s.trigger_type})]}),s.started_at&&l.jsxs("div",{className:"space-y-1",children:[l.jsxs("p",{className:"text-xs font-medium text-fg-muted uppercase tracking-wider flex items-center gap-1",children:[l.jsx(rh,{className:"h-3 w-3"}),"Started"]}),l.jsx("p",{className:"text-sm text-fg",children:new Date(s.started_at).toLocaleString()})]}),s.finished_at&&l.jsxs("div",{className:"space-y-1",children:[l.jsxs("p",{className:"text-xs font-medium text-fg-muted uppercase tracking-wider flex items-center gap-1",children:[l.jsx(dh,{className:"h-3 w-3"}),"Finished"]}),l.jsx("p",{className:"text-sm text-fg",children:new Date(s.finished_at).toLocaleString()})]})]}),a&&l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("p",{className:"text-xs font-medium text-fg-muted uppercase tracking-wider",children:"Stderr / Error Log"}),l.jsx("div",{className:"rounded-card border border-border bg-canvas-raised p-3 font-mono text-xs text-rose-400/70 whitespace-pre-wrap break-all max-h-48 overflow-y-auto",children:a})]})]}),l.jsxs(Pn,{children:[l.jsx(xe,{variant:"secondary",onClick:()=>o(!1),children:"Close"}),l.jsxs(xe,{variant:"secondary",size:"sm",onClick:()=>{const h=document.createElement("a");h.href=`/api/jobs/${s.id}/log/download`,h.download=`job-${s.id}.log`,document.body.appendChild(h),h.click(),document.body.removeChild(h)},children:[l.jsx(Da,{className:"h-4 w-4"}),"Full Log"]}),l.jsx(xe,{onClick:m,children:u?l.jsx(l.Fragment,{children:l.jsx("span",{className:"text-emerald-400",children:"Copied"})}):l.jsxs(l.Fragment,{children:[l.jsx(oh,{className:"h-4 w-4"}),"Copy All"]})})]})]})})}function LC(){const{id:n}=Fx(),[o,s]=v.useState(null),[a,u]=v.useState(null),[d,p]=v.useState([]),[m,h]=v.useState([]),[y,w]=v.useState(!0),g=v.useRef(null),k=v.useRef(null),b=Number(n),[j,S]=v.useState(!0),[C,E]=v.useState(!1),[T,_]=v.useState(""),[A,D]=v.useState(!1);v.useEffect(()=>{if(L(),b){F(0);const W=new EventSource(`/api/jobs/${b}/log/stream?job_id=${b}`);k.current=W,W.onmessage=le=>{const ve=JSON.parse(le.data);ve.type==="log"&&h(Y=>[...Y,{stream:ve.stream,text:ve.line}]),ve.type==="status"&&s(Y=>{if(!Y)return Y;const Z={...Y,status:ve.status};return ve.line&&(Z.error_message=ve.line),Z})}}return()=>{var W;return(W=k.current)==null?void 0:W.close()}},[n]),v.useEffect(()=>{y&&g.current&&g.current.scrollIntoView({behavior:"smooth"})},[m,y]);async function L(){try{const W=await Be(`/api/jobs/${n}`);s(W);const ve=(await Be("/api/sync-pairs")??[]).find(Y=>Y.id===W.sync_pair_id);u(ve||null)}catch{}finally{S(!1)}}async function F(W){try{const le=await Be(`/api/jobs/${n}/log?offset=${W}&limit=1000`)??[];W===0&&p(le)}catch{}}async function P(){try{await Be(`/api/jobs/${n}/cancel`,{method:"POST",body:{reason:T.trim()||void 0}}),Te.success("Job cancelled"),E(!1),_(""),L()}catch(W){Te.error(W.message)}}function X(){const W=[...d.map(Z=>`[${Z.timestamp}] [${Z.stream}] ${Z.content}`),...m.map(Z=>`[LIVE] [${Z.stream}] ${Z.text}`)],le=new Blob([W.join(` -`)],{type:"text/plain"}),ve=URL.createObjectURL(le),Y=document.createElement("a");Y.href=ve,Y.download=`job-${n}.log`,document.body.appendChild(Y),Y.click(),document.body.removeChild(Y),URL.revokeObjectURL(ve)}if(v.useCallback(()=>{const W=[...d.map(le=>`[${le.timestamp}] [${le.stream}] ${le.content}`),...m.map(le=>`[LIVE] [${le.stream}] ${le.text}`)].join(` -`);navigator.clipboard.writeText(W),Te.success("Log copied to clipboard")},[d,m]),j)return l.jsx("div",{className:"flex items-center justify-center min-h-[50vh]",children:l.jsx(Eu,{size:"lg"})});if(!o)return l.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[50vh] gap-3",children:[l.jsx("p",{className:"text-fg-muted",children:"Job not found"}),l.jsx(xe,{variant:"secondary",asChild:!0,children:l.jsxs(zo,{to:"/jobs",children:[l.jsx(ru,{className:"h-4 w-4"}),"Back to Jobs"]})})]});const se=d.length+m.length,oe=[...d.filter(W=>W.stream==="stderr").map(W=>W.content),...m.filter(W=>W.stream==="stderr").map(W=>W.text)].join(` -`),he=Rh(o.error_code??null);return l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(xe,{variant:"ghost",size:"sm",asChild:!0,children:l.jsxs(zo,{to:"/jobs",children:[l.jsx(ru,{className:"h-4 w-4"}),"Job History"]})}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("h1",{className:"text-xl font-bold text-fg font-mono",children:["#",o.id]}),l.jsx(un,{variant:za(o.status),label:Fa(o.status)})]})]}),l.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[{label:"Sync Pair",value:(a==null?void 0:a.name)||`Pair ${o.sync_pair_id}`},{label:"Trigger",value:o.trigger_type},{label:"Duration",value:o.started_at?Ph((o.finished_at?new Date(o.finished_at).getTime():Date.now())-new Date(o.started_at).getTime()):"-"},{label:"Started",value:o.started_at?new Date(o.started_at).toLocaleString():"-"}].map(W=>l.jsx($t,{children:l.jsxs("div",{className:"p-4",children:[l.jsx("div",{className:"text-xs font-medium text-fg-muted uppercase tracking-wider mb-1",children:W.label}),l.jsx("div",{className:"text-sm font-semibold text-fg truncate",children:W.value})]})},W.label))}),(o.status==="failed"||o.status==="cancelled"&&o.error_message)&&l.jsx("div",{className:be("rounded-card border p-4 space-y-2",o.status==="failed"?"border-rose-500/30 bg-rose-500/10":"border-zinc-500/30 bg-zinc-500/10"),children:l.jsxs("div",{className:"flex items-start gap-2",children:[o.status==="failed"?l.jsx(ba,{className:"h-4 w-4 text-rose-400 shrink-0 mt-0.5"}):l.jsx(em,{className:"h-4 w-4 text-zinc-400 shrink-0 mt-0.5"}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[l.jsx("span",{className:be("text-sm font-semibold",o.status==="failed"?"text-rose-300":"text-zinc-300"),children:(he==null?void 0:he.title)??(o.status==="failed"?"Job failed":"Job cancelled")}),o.error_code&&l.jsxs("span",{className:be("text-xs font-mono",o.status==="failed"?"text-rose-400/60":"text-zinc-400/60"),children:["[",o.error_code,"]"]})]}),(he==null?void 0:he.hint)&&l.jsx("p",{className:be("text-xs mt-0.5",o.status==="failed"?"text-rose-400/70":"text-zinc-400/70"),children:he.hint}),l.jsx("p",{className:be("text-xs font-mono mt-1 truncate max-w-2xl",o.status==="failed"?"text-rose-300/80":"text-zinc-300/80"),children:o.error_message})]}),l.jsxs(xe,{variant:"secondary",size:"sm",onClick:()=>D(!0),className:be("shrink-0 border",o.status==="failed"?"text-rose-300 hover:text-rose-200 border-rose-500/40 hover:border-rose-400/60":"text-zinc-300 hover:text-zinc-200 border-zinc-500/40 hover:border-zinc-400/60"),children:[o.status==="failed"?l.jsx(ba,{className:"h-4 w-4"}):l.jsx(em,{className:"h-4 w-4"}),"View error"]})]})}),["queued","waking_up","running"].includes(o.status)&&l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs(xe,{variant:"danger",size:"sm",onClick:()=>E(!0),children:[l.jsx(ou,{className:"h-4 w-4"}),"Cancel Job"]}),l.jsxs("div",{className:"flex items-center gap-2 text-sm text-fg-muted",children:[l.jsx(nv,{id:"auto-scroll",checked:y,onCheckedChange:w}),l.jsx("label",{htmlFor:"auto-scroll",className:"cursor-pointer",children:"Auto-scroll"})]})]}),l.jsxs($t,{className:"flex flex-col min-h-0",children:[l.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border shrink-0",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(ch,{className:"h-4 w-4 text-fg-subtle"}),l.jsx("span",{className:"text-xs font-semibold text-fg-muted uppercase tracking-wider",children:"Output"}),l.jsxs("span",{className:"text-xs text-fg-subtle",children:[se," line",se!==1?"s":""]})]}),l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx(Ja,{text:[...d.map(W=>`[${W.timestamp}] [${W.stream}] ${W.content}`),...m.map(W=>`[LIVE] [${W.stream}] ${W.text}`)].join(` -`),displayText:"Copy log"}),l.jsx(xe,{variant:"ghost",size:"icon-sm",onClick:X,title:"Download log",children:l.jsx(Da,{className:"h-3.5 w-3.5"})})]})]}),l.jsxs("div",{className:"flex-1 overflow-y-auto p-4 font-mono text-xs space-y-0.5 scrollbar-thin min-h-[300px] max-h-[60vh]",children:[d.length===0&&m.length===0?l.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-fg-subtle gap-2",children:[l.jsx(Aw,{className:"h-6 w-6"}),l.jsx("p",{children:"No log output yet"})]}):l.jsxs(l.Fragment,{children:[d.map(W=>l.jsx(AC,{stream:W.stream,content:W.content,timestamp:W.timestamp},W.id)),m.map((W,le)=>l.jsxs("div",{className:be("flex gap-2",W.stream==="stderr"?"text-rose-400":"text-fg-muted"),children:[l.jsx("span",{className:"text-accent shrink-0",children:"LIVE"}),l.jsx("span",{className:"break-all",children:W.text})]},`live-${le}`))]}),l.jsx("div",{ref:g})]})]}),l.jsx(Vn,{open:C,onOpenChange:E,children:l.jsxs(Nn,{size:"sm",children:[l.jsxs(jn,{children:[l.jsx(En,{children:"Cancel Job"}),l.jsxs(_n,{children:["Are you sure you want to cancel job #",o.id,"? This action cannot be undone."]})]}),l.jsxs("form",{onSubmit:W=>{W.preventDefault(),P()},children:[l.jsx(eo,{children:l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(De,{htmlFor:"cancel-reason",children:"Reason (optional)"}),l.jsx(Xa,{id:"cancel-reason",value:T,onChange:W=>_(W.target.value),placeholder:"e.g. wrong path, machine offline...",rows:2,className:"font-mono text-xs"}),l.jsx("p",{className:"text-xs text-fg-subtle",children:"Adding a reason helps track why jobs are cancelled"})]})}),l.jsxs(Pn,{children:[l.jsx(xe,{variant:"secondary",type:"button",onClick:()=>{E(!1),_("")},children:"Keep Running"}),l.jsx(xe,{variant:"danger-solid",type:"submit",children:"Cancel Job"})]})]})]})}),l.jsx(OC,{open:A,onOpenChange:D,job:o,fullLog:oe})]})}function AC({stream:n,content:o,timestamp:s}){const a=new Date(s),u=`${a.getHours().toString().padStart(2,"0")}:${a.getMinutes().toString().padStart(2,"0")}:${a.getSeconds().toString().padStart(2,"0")}`;return l.jsxs("div",{className:be("flex gap-2",n==="stderr"?"text-rose-400":"text-fg-muted"),children:[l.jsx("span",{className:"text-fg-subtle shrink-0",children:u}),l.jsx("span",{className:"break-all",children:o})]})}function IC(){const[n,o]=v.useState(""),[s,a]=v.useState(!0);v.useEffect(()=>{fetch("/api/settings/pubkey",{credentials:"include"}).then(d=>d.ok?d.text():"").then(d=>o(d)).catch(()=>{}).finally(()=>a(!1))},[]);function u(){if(!n)return;const d=new Blob([n],{type:"text/plain"}),p=URL.createObjectURL(d),m=document.createElement("a");m.href=p,m.download="syncserver.pub",document.body.appendChild(m),m.click(),document.body.removeChild(m),URL.revokeObjectURL(p)}return l.jsxs("div",{className:"space-y-6 max-w-2xl",children:[l.jsx(no,{title:"Settings",description:"Server configuration and SSH key management"}),l.jsxs($t,{children:[l.jsx(au,{children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:"rounded-card bg-accent/10 p-1",children:l.jsx(ka,{className:"h-4 w-4 text-accent"})}),l.jsx(lu,{children:"Server SSH Public Key"})]})}),l.jsxs(jr,{className:"space-y-4",children:[l.jsxs("p",{className:"text-sm text-fg-muted",children:["Add this key to the"," ",l.jsx("code",{className:"bg-surface-raised px-1.5 py-0.5 rounded text-xs text-fg font-mono",children:"~/.ssh/authorized_keys"})," ","file on your remote machines to allow SyncServer to connect."]}),l.jsx("div",{className:"bg-canvas-raised rounded-card p-4 font-mono text-xs text-emerald-400/80 break-all min-h-[4rem]",children:s?l.jsx("span",{className:"text-fg-subtle",children:"Loading..."}):n||l.jsx("span",{className:"text-fg-subtle",children:"No public key available"})}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Ja,{text:n,displayText:"Copy public key"}),n&&l.jsxs(xe,{variant:"secondary",size:"sm",onClick:u,children:[l.jsx(Da,{className:"h-3.5 w-3.5"}),"Download .pub"]})]})]})]}),l.jsxs($t,{children:[l.jsx(au,{children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:"rounded-card bg-surface-raised p-1",children:l.jsx(ch,{className:"h-4 w-4 text-fg-muted"})}),l.jsx(lu,{children:"Quick Reference"})]})}),l.jsx(jr,{className:"space-y-4",children:l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{children:[l.jsxs("p",{className:"text-sm text-fg-muted mb-2",children:[l.jsx("span",{className:"font-semibold text-fg",children:"ssh-copy-id:"})," Copy the public key above to a remote machine:"]}),l.jsx("div",{className:"bg-canvas-raised rounded-card p-3 font-mono text-xs text-fg-muted",children:"cat ~/.ssh/id_ed25519.pub | ssh user@host 'cat >> ~/.ssh/authorized_keys'"})]}),l.jsx("div",{children:l.jsxs("p",{className:"text-sm text-fg-muted",children:[l.jsx("span",{className:"font-semibold text-fg",children:"Wake-on-LAN:"})," ","Make sure your target machine BIOS/UEFI has WoL enabled and is connected to the same network layer (L2) as this server."]})})]})})]})]})}function DC(){const[n,o]=v.useState([]),[s,a]=v.useState(null),[u,d]=v.useState(null),[p,m]=v.useState(""),[h,y]=v.useState(""),[w,g]=v.useState(""),[k,b]=v.useState(!1),[j,S]=v.useState(null);v.useEffect(()=>{C()},[]);async function C(){try{o(await Be("/api/ssh-keys"))}catch{}}async function E(){if(!p.trim()){Te.error("Label is required");return}b(!0);try{await Be("/api/ssh-keys",{method:"POST",body:{label:p.trim(),generate:!0}}),a(null),m(""),Te.success("SSH key pair generated"),C()}catch(D){Te.error(D.message)}finally{b(!1)}}async function T(){if(!h.trim()){Te.error("Label is required");return}if(!w.trim()){Te.error("Public key is required");return}b(!0);try{await Be("/api/ssh-keys",{method:"POST",body:{label:h.trim(),generate:!1,public_key:w.trim()}}),a(null),y(""),g(""),Te.success("SSH key imported"),C()}catch(D){Te.error(D.message)}finally{b(!1)}}async function _(){if(u!==null)try{await Be(`/api/ssh-keys/${u}`,{method:"DELETE"}),Te.success("SSH key deleted"),d(null),C()}catch(D){Te.error(D.message)}}async function A(D){try{const L=await fetch(`/api/ssh-keys/${D}/private`,{credentials:"include"});if(!L.ok){const se=await L.json().catch(()=>({error:"Failed"}));Te.error(se.error);return}const F=await L.blob(),P=URL.createObjectURL(F),X=document.createElement("a");X.href=P,X.download=`ssh-key-${D}.key`,document.body.appendChild(X),X.click(),document.body.removeChild(X),URL.revokeObjectURL(P),S(D),Te.success("Private key downloaded"),setTimeout(()=>S(null),3e3)}catch(L){Te.error(L.message)}}return l.jsxs("div",{className:"space-y-6",children:[l.jsx(no,{title:"SSH Keys",description:"Manage SSH key pairs for authenticating with remote machines",actions:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs(xe,{variant:"secondary",size:"sm",onClick:()=>a("import"),children:[l.jsx(Bc,{className:"h-4 w-4"}),"Import Public Key"]}),l.jsxs(xe,{size:"sm",onClick:()=>a("generate"),children:[l.jsx(Fo,{className:"h-4 w-4"}),"Generate New"]})]})}),n.length===0?l.jsx($t,{children:l.jsx(jr,{className:"p-0",children:l.jsx(Yo,{icon:l.jsx(ka,{className:"h-5 w-5"}),title:"No SSH keys",description:"Generate a key pair or import a public key to authenticate with remote machines",action:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs(xe,{variant:"secondary",size:"sm",onClick:()=>a("import"),children:[l.jsx(Bc,{className:"h-4 w-4"}),"Import"]}),l.jsxs(xe,{size:"sm",onClick:()=>a("generate"),children:[l.jsx(Fo,{className:"h-4 w-4"}),"Generate"]})]})})})}):l.jsx("div",{className:"space-y-3",children:n.map(D=>l.jsx($t,{children:l.jsx(jr,{children:l.jsxs("div",{className:"flex items-start justify-between gap-4",children:[l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[l.jsx("h3",{className:"text-sm font-semibold text-fg truncate",children:D.label}),D.in_use&&l.jsx(un,{variant:"success",label:"In Use"}),!D.has_private_key&&l.jsx(un,{variant:"neutral",label:"Imported Only"})]}),l.jsxs("div",{className:"flex items-center gap-1.5 mb-3 text-xs text-fg-subtle",children:[l.jsx(vw,{className:"h-3.5 w-3.5"}),l.jsx("span",{className:"font-mono truncate",children:D.fingerprint})]}),l.jsx("div",{className:"bg-canvas-raised rounded-card p-3 font-mono text-xs text-emerald-400/80 break-all max-w-2xl",children:D.public_key})]}),l.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[l.jsx(Ja,{text:D.public_key,displayText:"Copy pub"}),D.has_private_key&&l.jsxs(xe,{variant:"secondary",size:"sm",onClick:()=>A(D.id),loading:j===D.id,children:[l.jsx(Da,{className:"h-3.5 w-3.5"}),j===D.id?"Done":"Private"]}),l.jsx(xe,{variant:"danger",size:"icon-sm",onClick:()=>d(D.id),children:l.jsx(Cu,{className:"h-3.5 w-3.5"})})]})]})})},D.id))}),l.jsx(Vn,{open:s==="generate",onOpenChange:D=>!D&&a(null),children:l.jsxs(Nn,{size:"md",children:[l.jsxs(jn,{children:[l.jsx(En,{children:"Generate SSH Key Pair"}),l.jsx(_n,{children:"Generate a new Ed25519 key pair. The private key will be downloaded immediately and the public key stored on the server."})]}),l.jsx(eo,{className:"space-y-4",children:l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(De,{htmlFor:"gen-label",required:!0,children:"Label"}),l.jsx(ht,{id:"gen-label",placeholder:"backup-nas",value:p,onChange:D=>m(D.target.value)})]})}),l.jsxs(Pn,{children:[l.jsx(xe,{variant:"secondary",onClick:()=>a(null),children:"Cancel"}),l.jsxs(xe,{onClick:E,loading:k,children:[l.jsx(ka,{className:"h-4 w-4"}),"Generate"]})]})]})}),l.jsx(Vn,{open:s==="import",onOpenChange:D=>!D&&a(null),children:l.jsxs(Nn,{size:"md",children:[l.jsxs(jn,{children:[l.jsx(En,{children:"Import Public Key"}),l.jsx(_n,{children:"Import an existing public key. Only the public key will be stored — you must have the corresponding private key on this server."})]}),l.jsxs(eo,{className:"space-y-4",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(De,{htmlFor:"import-label",required:!0,children:"Label"}),l.jsx(ht,{id:"import-label",placeholder:"work-server",value:h,onChange:D=>y(D.target.value)})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(De,{htmlFor:"import-pubkey",required:!0,children:"Public Key"}),l.jsx(Xa,{id:"import-pubkey",placeholder:"ssh-ed25519 AAAA...",value:w,onChange:D=>g(D.target.value),className:"font-mono text-xs h-24"})]})]}),l.jsxs(Pn,{children:[l.jsx(xe,{variant:"secondary",onClick:()=>a(null),children:"Cancel"}),l.jsxs(xe,{onClick:T,loading:k,children:[l.jsx(Bc,{className:"h-4 w-4"}),"Import"]})]})]})}),l.jsx(Vn,{open:u!==null,onOpenChange:D=>!D&&d(null),children:l.jsxs(Nn,{size:"sm",children:[l.jsxs(jn,{children:[l.jsx(En,{children:"Delete SSH Key"}),l.jsx(_n,{children:"Are you sure you want to delete this SSH key? Machines using it will fall back to the server key."})]}),l.jsxs(Pn,{children:[l.jsx(xe,{variant:"secondary",onClick:()=>d(null),children:"Cancel"}),l.jsx(xe,{variant:"danger-solid",onClick:_,children:"Delete"})]})]})})]})}const Bm=[{to:"/",label:"Dashboard",icon:kw},{to:"/machines",label:"Machines",icon:ku},{to:"/sync-pairs",label:"Sync Pairs",icon:su},{to:"/jobs",label:"Jobs",icon:ih},{to:"/ssh-keys",label:"SSH Keys",icon:ka},{to:"/settings",label:"Settings",icon:zw}];function zC({children:n}){const[o,s]=v.useState(null);return v.useEffect(()=>{fetch("/api/auth/me",{credentials:"include"}).then(a=>s(a.ok)).catch(()=>s(!1))},[]),o===null?l.jsx("div",{className:"flex h-screen items-center justify-center bg-canvas",children:l.jsx(Eu,{size:"lg"})}):o?n:l.jsx(Zm,{to:"/login"})}function FC(){const[n,o]=v.useState(!1),[s,a]=v.useState(null),u=Aa();v.useEffect(()=>{Be("/api/settings/info").then(p=>a(p.version)).catch(()=>{})},[]);const d=async()=>{try{await fetch("/api/auth/logout",{method:"POST",credentials:"include"})}catch{}localStorage.removeItem("auth"),u("/login")};return l.jsx("header",{className:"sticky top-0 z-50 bg-surface border-b border-border",children:l.jsxs("div",{className:"max-w-7xl mx-auto px-4",children:[l.jsxs("div",{className:"flex items-center h-14 gap-6",children:[l.jsxs("a",{href:"/",className:"flex items-center gap-2.5 text-fg font-bold text-base hover:text-accent transition-colors shrink-0",children:[l.jsx("div",{className:"rounded-card bg-accent/10 p-1",children:l.jsx(sh,{className:"h-4 w-4 text-accent"})}),l.jsx("span",{className:"hidden sm:inline",children:"SyncServer"})]}),s&&l.jsxs("span",{className:"hidden lg:inline-flex items-center rounded-card bg-surface-raised px-2 py-0.5 text-xs font-mono text-fg-muted border border-border",children:["v",s]}),l.jsx("nav",{className:"hidden md:flex items-center gap-0.5 flex-1",children:Bm.map(p=>{const m=p.icon;return l.jsxs(Qp,{to:p.to,end:p.to==="/",className:({isActive:h})=>be("flex items-center gap-1.5 px-3 py-1.5 rounded-card text-sm font-medium transition-all duration-150",h?"bg-surface-raised text-fg":"text-fg-muted hover:text-fg hover:bg-surface-raised"),children:[l.jsx(m,{className:"h-3.5 w-3.5"}),p.label]},p.to)})}),l.jsxs("div",{className:"flex items-center gap-2 ml-auto",children:[l.jsx(xe,{variant:"ghost",size:"icon-sm",onClick:d,className:"text-fg-muted hover:text-fg hidden sm:flex",title:"Logout",children:l.jsx(nm,{className:"h-4 w-4"})}),l.jsx(xe,{variant:"ghost",size:"icon",onClick:()=>o(p=>!p),className:"md:hidden text-fg-muted",children:n?l.jsx(uh,{className:"h-5 w-5"}):l.jsx(_w,{className:"h-5 w-5"})})]})]}),n&&l.jsxs("nav",{className:"md:hidden pb-3 flex flex-col gap-0.5 animate-slide-up",children:[Bm.map(p=>{const m=p.icon;return l.jsxs(Qp,{to:p.to,end:p.to==="/",onClick:()=>o(!1),className:({isActive:h})=>be("flex items-center gap-2 px-3 py-2 rounded-card text-sm font-medium transition-all",h?"bg-surface-raised text-fg":"text-fg-muted hover:text-fg hover:bg-surface-raised"),children:[l.jsx(m,{className:"h-4 w-4"}),p.label]},p.to)}),l.jsxs("button",{onClick:()=>{o(!1),d()},className:"flex items-center gap-2 px-3 py-2 rounded-card text-sm font-medium text-fg-muted hover:text-fg hover:bg-surface-raised mt-1 border-t border-border pt-3",children:[l.jsx(nm,{className:"h-4 w-4"}),"Logout"]})]})]})})}function $C(){return l.jsxs("div",{className:"min-h-screen bg-canvas",children:[l.jsx("a",{href:"#main-content",className:"sr-only focus:not-sr-only focus:fixed focus:top-4 focus:left-4 focus:z-[100] focus:px-4 focus:py-2 focus:rounded-card focus:bg-surface-raised focus:text-fg focus:outline-none focus:ring-2 focus:ring-accent/40",children:"Skip to content"}),l.jsx(FC,{}),l.jsx("main",{id:"main-content",className:"max-w-7xl mx-auto px-4 py-6",children:l.jsx(e0,{})}),l.jsx(U0,{position:"bottom-right",toastOptions:{classNames:{error:"bg-surface-raised border border-rose-500/30 text-fg",success:"bg-surface-raised border border-emerald-500/30 text-fg",warning:"bg-surface-raised border border-amber-500/30 text-fg",info:"bg-surface-raised border border-sky-500/30 text-fg"}},theme:"dark",richColors:!0,closeButton:!0})]})}function BC(){return l.jsx(u0,{children:l.jsx(Q1,{children:l.jsxs(n0,{children:[l.jsx(ln,{path:"/login",element:l.jsx(eS,{})}),l.jsxs(ln,{element:l.jsx(zC,{children:l.jsx($C,{})}),children:[l.jsx(ln,{path:"/",element:l.jsx(iS,{})}),l.jsx(ln,{path:"/machines",element:l.jsx(CC,{})}),l.jsx(ln,{path:"/sync-pairs",element:l.jsx(jC,{})}),l.jsx(ln,{path:"/jobs",element:l.jsx(EC,{})}),l.jsx(ln,{path:"/jobs/:id",element:l.jsx(LC,{})}),l.jsx(ln,{path:"/ssh-keys",element:l.jsx(DC,{})}),l.jsx(ln,{path:"/settings",element:l.jsx(IC,{})})]}),l.jsx(ln,{path:"*",element:l.jsx(Zm,{to:"/"})})]})})})}ax.createRoot(document.getElementById("root")).render(l.jsx(te.StrictMode,{children:l.jsx(BC,{})})); diff --git a/internal/webui/dist/assets/index-BepSbXPY.css b/internal/webui/dist/assets/index-BepSbXPY.css deleted file mode 100644 index 5aa8783..0000000 --- a/internal/webui/dist/assets/index-BepSbXPY.css +++ /dev/null @@ -1 +0,0 @@ -@import"https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap";*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:IBM Plex Sans,ui-sans-serif,system-ui,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:JetBrains Mono,ui-monospace,SFMono-Regular,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}*,*:before,*:after{box-sizing:border-box}html{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;scroll-behavior:smooth}body{--tw-bg-opacity: 1;background-color:rgb(8 8 8 / var(--tw-bg-opacity, 1));font-family:IBM Plex Sans,ui-sans-serif,system-ui,sans-serif;--tw-text-opacity: 1;color:rgb(245 245 245 / var(--tw-text-opacity, 1));min-height:100vh}::-moz-selection{background-color:#2dd4bf4d;--tw-text-opacity: 1;color:rgb(245 245 245 / var(--tw-text-opacity, 1))}::selection{background-color:#2dd4bf4d;--tw-text-opacity: 1;color:rgb(245 245 245 / var(--tw-text-opacity, 1))}:focus-visible{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-color: rgb(45 212 191 / .4);--tw-ring-offset-width: 2px;--tw-ring-offset-color: #080808}input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{display:none}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.left-\[50\%\]{left:50%}.right-2{right:.5rem}.right-3{right:.75rem}.right-4{right:1rem}.top-0{top:0}.top-1\/2{top:50%}.top-4{top:1rem}.top-\[50\%\]{top:50%}.z-50{z-index:50}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-0{margin-bottom:0}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-auto{margin-left:auto}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-2{height:.5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-full{height:100%}.h-screen{height:100vh}.max-h-40{max-height:10rem}.max-h-48{max-height:12rem}.max-h-96{max-height:24rem}.max-h-\[60vh\]{max-height:60vh}.max-h-\[90vh\]{max-height:90vh}.min-h-0{min-height:0px}.min-h-\[300px\]{min-height:300px}.min-h-\[4rem\]{min-height:4rem}.min-h-\[50vh\]{min-height:50vh}.min-h-\[80px\]{min-height:80px}.min-h-screen{min-height:100vh}.w-10{width:2.5rem}.w-12{width:3rem}.w-2{width:.5rem}.w-20{width:5rem}.w-24{width:6rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-auto{width:auto}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-\[140px\]{min-width:140px}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.max-w-2xl{max-width:42rem}.max-w-7xl{max-width:80rem}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.caption-bottom{caption-side:bottom}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.animate-fade-in{animation:fadeIn .2s ease-out}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes scaleIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}.animate-scale-in{animation:scaleIn .2s ease-out}@keyframes slideUp{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.animate-slide-up{animation:slideUp .2s ease-out}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-card{border-radius:.5rem}.rounded-full{border-radius:9999px}.rounded-sm{border-radius:.125rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-accent{--tw-border-opacity: 1;border-color:rgb(45 212 191 / var(--tw-border-opacity, 1))}.border-accent\/20{border-color:#2dd4bf33}.border-amber-500\/30{border-color:#f59e0b4d}.border-border{--tw-border-opacity: 1;border-color:rgb(38 38 38 / var(--tw-border-opacity, 1))}.border-border\/50{border-color:#26262680}.border-emerald-500\/30{border-color:#10b9814d}.border-rose-500\/30{border-color:#f43f5e4d}.border-rose-500\/40{border-color:#f43f5e66}.border-rose-500\/50{border-color:#f43f5e80}.border-sky-500\/30{border-color:#0ea5e94d}.border-transparent{border-color:transparent}.border-zinc-500\/30{border-color:#71717a4d}.border-zinc-500\/40{border-color:#71717a66}.border-t-transparent{border-top-color:transparent}.bg-accent{--tw-bg-opacity: 1;background-color:rgb(45 212 191 / var(--tw-bg-opacity, 1))}.bg-accent\/10{background-color:#2dd4bf1a}.bg-accent\/5{background-color:#2dd4bf0d}.bg-amber-400{--tw-bg-opacity: 1;background-color:rgb(251 191 36 / var(--tw-bg-opacity, 1))}.bg-amber-500\/10{background-color:#f59e0b1a}.bg-amber-500\/15{background-color:#f59e0b26}.bg-black\/60{background-color:#0009}.bg-canvas{--tw-bg-opacity: 1;background-color:rgb(8 8 8 / var(--tw-bg-opacity, 1))}.bg-canvas-raised{--tw-bg-opacity: 1;background-color:rgb(18 18 18 / var(--tw-bg-opacity, 1))}.bg-emerald-500\/10{background-color:#10b9811a}.bg-emerald-500\/15{background-color:#10b98126}.bg-fg-subtle{--tw-bg-opacity: 1;background-color:rgb(115 115 115 / var(--tw-bg-opacity, 1))}.bg-rose-500{--tw-bg-opacity: 1;background-color:rgb(244 63 94 / var(--tw-bg-opacity, 1))}.bg-rose-500\/10{background-color:#f43f5e1a}.bg-rose-500\/15{background-color:#f43f5e26}.bg-sky-500\/10{background-color:#0ea5e91a}.bg-sky-500\/15{background-color:#0ea5e926}.bg-surface{--tw-bg-opacity: 1;background-color:rgb(15 15 15 / var(--tw-bg-opacity, 1))}.bg-surface-raised{--tw-bg-opacity: 1;background-color:rgb(26 26 26 / var(--tw-bg-opacity, 1))}.bg-zinc-500\/10{background-color:#71717a1a}.bg-zinc-500\/15{background-color:#71717a26}.p-0{padding:0}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-8{padding:2rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-0{padding-bottom:0}.pb-3{padding-bottom:.75rem}.pl-6{padding-left:1.5rem}.pr-10{padding-right:2.5rem}.pt-0{padding-top:0}.pt-3{padding-top:.75rem}.text-left{text-align:left}.text-center{text-align:center}.align-middle{vertical-align:middle}.font-mono{font-family:JetBrains Mono,ui-monospace,SFMono-Regular,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.tracking-wider{letter-spacing:.05em}.text-accent{--tw-text-opacity: 1;color:rgb(45 212 191 / var(--tw-text-opacity, 1))}.text-accent-foreground{--tw-text-opacity: 1;color:rgb(15 15 15 / var(--tw-text-opacity, 1))}.text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.text-emerald-400{--tw-text-opacity: 1;color:rgb(52 211 153 / var(--tw-text-opacity, 1))}.text-emerald-400\/80{color:#34d399cc}.text-fg{--tw-text-opacity: 1;color:rgb(245 245 245 / var(--tw-text-opacity, 1))}.text-fg-muted{--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity, 1))}.text-fg-subtle{--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity, 1))}.text-rose-300{--tw-text-opacity: 1;color:rgb(253 164 175 / var(--tw-text-opacity, 1))}.text-rose-300\/80{color:#fda4afcc}.text-rose-400{--tw-text-opacity: 1;color:rgb(251 113 133 / var(--tw-text-opacity, 1))}.text-rose-400\/60{color:#fb718599}.text-rose-400\/70{color:#fb7185b3}.text-sky-400{--tw-text-opacity: 1;color:rgb(56 189 248 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-zinc-300{--tw-text-opacity: 1;color:rgb(212 212 216 / var(--tw-text-opacity, 1))}.text-zinc-300\/80{color:#d4d4d8cc}.text-zinc-400{--tw-text-opacity: 1;color:rgb(161 161 170 / var(--tw-text-opacity, 1))}.text-zinc-400\/60{color:#a1a1aa99}.text-zinc-400\/70{color:#a1a1aab3}.underline-offset-4{text-underline-offset:4px}.accent-accent{accent-color:#2dd4bf}.opacity-25{opacity:.25}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-\[0\.03\]{opacity:.03}.shadow-card{--tw-shadow: 0 0 0 1px rgba(38, 38, 38, 1), 0 2px 8px rgba(0, 0, 0, .4);--tw-shadow-colored: 0 0 0 1px var(--tw-shadow-color), 0 2px 8px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.scrollbar-thin{scrollbar-width:thin;scrollbar-color:#3f3f46 transparent}.scrollbar-thin::-webkit-scrollbar{width:6px;height:6px}.scrollbar-thin::-webkit-scrollbar-track{background:transparent}.scrollbar-thin::-webkit-scrollbar-thumb{background-color:#3f3f46;border-radius:3px}.scrollbar-thin::-webkit-scrollbar-thumb:hover{background-color:#52525b}.placeholder\:text-fg-subtle::-moz-placeholder{--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity, 1))}.placeholder\:text-fg-subtle::placeholder{--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity, 1))}.hover\:border-border\/80:hover{border-color:#262626cc}.hover\:border-rose-400\/60:hover{border-color:#fb718599}.hover\:border-rose-500\/50:hover{border-color:#f43f5e80}.hover\:border-zinc-400\/60:hover{border-color:#a1a1aa99}.hover\:bg-accent-hover:hover{--tw-bg-opacity: 1;background-color:rgb(94 234 212 / var(--tw-bg-opacity, 1))}.hover\:bg-emerald-500\/10:hover{background-color:#10b9811a}.hover\:bg-rose-500\/10:hover{background-color:#f43f5e1a}.hover\:bg-rose-500\/25:hover{background-color:#f43f5e40}.hover\:bg-rose-600:hover{--tw-bg-opacity: 1;background-color:rgb(225 29 72 / var(--tw-bg-opacity, 1))}.hover\:bg-surface-hover:hover,.hover\:bg-surface-raised:hover{--tw-bg-opacity: 1;background-color:rgb(26 26 26 / var(--tw-bg-opacity, 1))}.hover\:bg-surface-raised\/50:hover{background-color:#1a1a1a80}.hover\:text-accent:hover{--tw-text-opacity: 1;color:rgb(45 212 191 / var(--tw-text-opacity, 1))}.hover\:text-accent-hover:hover{--tw-text-opacity: 1;color:rgb(94 234 212 / var(--tw-text-opacity, 1))}.hover\:text-emerald-300:hover{--tw-text-opacity: 1;color:rgb(110 231 183 / var(--tw-text-opacity, 1))}.hover\:text-fg:hover{--tw-text-opacity: 1;color:rgb(245 245 245 / var(--tw-text-opacity, 1))}.hover\:text-fg-muted:hover{--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity, 1))}.hover\:text-rose-200:hover{--tw-text-opacity: 1;color:rgb(254 205 211 / var(--tw-text-opacity, 1))}.hover\:text-rose-300:hover{--tw-text-opacity: 1;color:rgb(253 164 175 / var(--tw-text-opacity, 1))}.hover\:text-zinc-200:hover{--tw-text-opacity: 1;color:rgb(228 228 231 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-card-hover:hover{--tw-shadow: 0 0 0 1px rgba(45, 212, 191, .3), 0 4px 16px rgba(0, 0, 0, .5);--tw-shadow-colored: 0 0 0 1px var(--tw-shadow-color), 0 4px 16px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-glow:hover{--tw-shadow: 0 0 20px rgba(45, 212, 191, .15);--tw-shadow-colored: 0 0 20px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-glow-error:hover{--tw-shadow: 0 0 20px rgba(244, 63, 94, .15);--tw-shadow-colored: 0 0 20px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\:not-sr-only:focus{position:static;width:auto;height:auto;padding:0;margin:0;overflow:visible;clip:auto;white-space:normal}.focus\:fixed:focus{position:fixed}.focus\:left-4:focus{left:1rem}.focus\:top-4:focus{top:1rem}.focus\:z-\[100\]:focus{z-index:100}.focus\:rounded-card:focus{border-radius:.5rem}.focus\:border-accent\/50:focus{border-color:#2dd4bf80}.focus\:border-rose-500\/50:focus{border-color:#f43f5e80}.focus\:bg-surface-raised:focus{--tw-bg-opacity: 1;background-color:rgb(26 26 26 / var(--tw-bg-opacity, 1))}.focus\:px-4:focus{padding-left:1rem;padding-right:1rem}.focus\:py-2:focus{padding-top:.5rem;padding-bottom:.5rem}.focus\:text-fg:focus{--tw-text-opacity: 1;color:rgb(245 245 245 / var(--tw-text-opacity, 1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-accent\/30:focus{--tw-ring-color: rgb(45 212 191 / .3)}.focus\:ring-accent\/40:focus{--tw-ring-color: rgb(45 212 191 / .4)}.focus\:ring-rose-500\/30:focus{--tw-ring-color: rgb(244 63 94 / .3)}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus\:ring-offset-surface:focus{--tw-ring-offset-color: #0f0f0f}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-accent\/40:focus-visible{--tw-ring-color: rgb(45 212 191 / .4)}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.focus-visible\:ring-offset-canvas:focus-visible{--tw-ring-offset-color: #080808}.active\:scale-\[0\.98\]:active{--tw-scale-x: .98;--tw-scale-y: .98;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=checked\]\:translate-x-4[data-state=checked]{--tw-translate-x: 1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked]{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.data-\[state\=open\]\:animate-fade-in[data-state=open]{animation:fadeIn .2s ease-out}.data-\[state\=unchecked\]\:border-border[data-state=unchecked]{--tw-border-opacity: 1;border-color:rgb(38 38 38 / var(--tw-border-opacity, 1))}.data-\[state\=checked\]\:bg-accent[data-state=checked]{--tw-bg-opacity: 1;background-color:rgb(45 212 191 / var(--tw-bg-opacity, 1))}.data-\[state\=unchecked\]\:bg-surface-raised[data-state=unchecked]{--tw-bg-opacity: 1;background-color:rgb(26 26 26 / var(--tw-bg-opacity, 1))}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}@media(min-width:640px){.sm\:mt-0{margin-top:0}.sm\:inline{display:inline}.sm\:flex{display:flex}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}}@media(min-width:768px){.md\:flex{display:flex}.md\:hidden{display:none}}@media(min-width:1024px){.lg\:inline-flex{display:inline-flex}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>span\]\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px} diff --git a/internal/webui/dist/index.html b/internal/webui/dist/index.html deleted file mode 100644 index 36fbd62..0000000 --- a/internal/webui/dist/index.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - SyncServer - - - - -
- -