diff --git "a/assets/index-RvrzVxyQ.js" "b/assets/index-RvrzVxyQ.js" new file mode 100644--- /dev/null +++ "b/assets/index-RvrzVxyQ.js" @@ -0,0 +1,157 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/FeedView-VglAKTTo.js","assets/components-vAXr5Yrz.js","assets/LatexTitle-CbOP0isa.js","assets/LatexTitle-wklAmtGL.css","assets/transform-C19D-_iA.js","assets/api-5i4Mf2ca.js","assets/adminAuth-PI_XkM8E.js","assets/usePapers-Dilp1UjP.js","assets/useQuery-DBPiiCZh.js","assets/useInfiniteQuery-D6kOn4ET.js","assets/useIntersectionObserver-b_ghxvrt.js","assets/usePeriodFilter-vtzRDJbK.js","assets/skeleton-vJLXL7dU.js","assets/alert-B6WjabOu.js","assets/PapersListView-CIlHl_0S.js","assets/useDebounce-UZQdQpzf.js","assets/PaperDetailView-De0mLZCp.js","assets/input-DBg77x-j.js","assets/useMutation-BChaaj62.js","assets/badge-CAs_Xk6U.js","assets/TagsIndexView-1TeE1k6L.js","assets/TagBrowseView-wiX11K6Q.js","assets/MethodsIndexView-CF_jCe6d.js","assets/MethodDetailView-BXXICNAd.js","assets/BenchmarkDetailView-BFX5j8r9.js","assets/SavedPapersView-Vf8zOvxz.js","assets/SubmitView-BTOuC0rd.js","assets/CronDashboard-BJLOLf49.js","assets/SearchOverlay-CGeqDGTE.js"])))=>i.map(i=>d[i]); +var Qd=e=>{throw TypeError(e)};var al=(e,t,n)=>t.has(e)||Qd("Cannot "+n);var T=(e,t,n)=>(al(e,t,"read from private field"),n?n.call(e):t.get(e)),J=(e,t,n)=>t.has(e)?Qd("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),V=(e,t,n,r)=>(al(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Te=(e,t,n)=>(al(e,t,"access private method"),n);var Gi=(e,t,n,r)=>({set _(o){V(e,t,o,n)},get _(){return T(e,t,r)}});function e0(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var Q_=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function mh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vh={exports:{}},wa={},gh={exports:{}},Z={};/** + * @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 Ii=Symbol.for("react.element"),t0=Symbol.for("react.portal"),n0=Symbol.for("react.fragment"),r0=Symbol.for("react.strict_mode"),o0=Symbol.for("react.profiler"),i0=Symbol.for("react.provider"),s0=Symbol.for("react.context"),a0=Symbol.for("react.forward_ref"),l0=Symbol.for("react.suspense"),u0=Symbol.for("react.memo"),c0=Symbol.for("react.lazy"),Gd=Symbol.iterator;function d0(e){return e===null||typeof e!="object"?null:(e=Gd&&e[Gd]||e["@@iterator"],typeof e=="function"?e:null)}var yh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},wh=Object.assign,xh={};function Po(e,t,n){this.props=e,this.context=t,this.refs=xh,this.updater=n||yh}Po.prototype.isReactComponent={};Po.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Po.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Sh(){}Sh.prototype=Po.prototype;function mc(e,t,n){this.props=e,this.context=t,this.refs=xh,this.updater=n||yh}var vc=mc.prototype=new Sh;vc.constructor=mc;wh(vc,Po.prototype);vc.isPureReactComponent=!0;var Yd=Array.isArray,Eh=Object.prototype.hasOwnProperty,gc={current:null},Ch={key:!0,ref:!0,__self:!0,__source:!0};function bh(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)Eh.call(t,r)&&!Ch.hasOwnProperty(r)&&(o[r]=t[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(1>>1,F=_[U];if(0>>1;Uo(ue,I))meo(q,ue)?(_[U]=q,_[me]=I,U=me):(_[U]=ue,_[X]=I,U=X);else if(meo(q,I))_[U]=q,_[me]=I,U=me;else break e}}return k}function o(_,k){var I=_.sortIndex-k.sortIndex;return I!==0?I:_.id-k.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],u=[],d=1,c=null,h=3,p=!1,S=!1,g=!1,x=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(_){for(var k=n(u);k!==null;){if(k.callback===null)r(u);else if(k.startTime<=_)r(u),k.sortIndex=k.expirationTime,t(l,k);else break;k=n(u)}}function E(_){if(g=!1,y(_),!S)if(n(l)!==null)S=!0,z(C);else{var k=n(u);k!==null&&W(E,k.startTime-_)}}function C(_,k){S=!1,g&&(g=!1,v(R),R=-1),p=!0;var I=h;try{for(y(k),c=n(l);c!==null&&(!(c.expirationTime>k)||_&&!$());){var U=c.callback;if(typeof U=="function"){c.callback=null,h=c.priorityLevel;var F=U(c.expirationTime<=k);k=e.unstable_now(),typeof F=="function"?c.callback=F:c===n(l)&&r(l),y(k)}else r(l);c=n(l)}if(c!==null)var Q=!0;else{var X=n(u);X!==null&&W(E,X.startTime-k),Q=!1}return Q}finally{c=null,h=I,p=!1}}var b=!1,P=null,R=-1,A=5,O=-1;function $(){return!(e.unstable_now()-O_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<_?Math.floor(1e3/_):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(_){switch(h){case 1:case 2:case 3:var k=3;break;default:k=h}var I=h;h=k;try{return _()}finally{h=I}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(_,k){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var I=h;h=_;try{return k()}finally{h=I}},e.unstable_scheduleCallback=function(_,k,I){var U=e.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0U?(_.sortIndex=I,t(u,_),n(l)===null&&_===n(u)&&(g?(v(R),R=-1):g=!0,W(E,I-U))):(_.sortIndex=F,t(l,_),S||p||(S=!0,z(C))),_},e.unstable_shouldYield=$,e.unstable_wrapCallback=function(_){var k=h;return function(){var I=h;h=k;try{return _.apply(this,arguments)}finally{h=I}}}})(_h);Th.exports=_h;var E0=Th.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 C0=f,rt=E0;function M(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ql=Object.prototype.hasOwnProperty,b0=/^[: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]*$/,qd={},Zd={};function P0(e){return ql.call(Zd,e)?!0:ql.call(qd,e)?!1:b0.test(e)?Zd[e]=!0:(qd[e]=!0,!1)}function k0(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function R0(e,t,n,r){if(t===null||typeof t>"u"||k0(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ue(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var Me={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Me[e]=new Ue(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Me[t]=new Ue(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Me[e]=new Ue(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Me[e]=new Ue(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){Me[e]=new Ue(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Me[e]=new Ue(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Me[e]=new Ue(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Me[e]=new Ue(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Me[e]=new Ue(e,5,!1,e.toLowerCase(),null,!1,!1)});var wc=/[\-:]([a-z])/g;function xc(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(wc,xc);Me[t]=new Ue(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(wc,xc);Me[t]=new Ue(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(wc,xc);Me[t]=new Ue(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Me[e]=new Ue(e,1,!1,e.toLowerCase(),null,!1,!1)});Me.xlinkHref=new Ue("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Me[e]=new Ue(e,1,!1,e.toLowerCase(),null,!0,!0)});function Sc(e,t,n,r){var o=Me.hasOwnProperty(t)?Me[t]:null;(o!==null?o.type!==0:r||!(2a||o[s]!==i[a]){var l=` +`+o[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{cl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ho(e):""}function T0(e){switch(e.tag){case 5:return Ho(e.type);case 16:return Ho("Lazy");case 13:return Ho("Suspense");case 19:return Ho("SuspenseList");case 0:case 2:case 15:return e=dl(e.type,!1),e;case 11:return e=dl(e.type.render,!1),e;case 1:return e=dl(e.type,!0),e;default:return""}}function tu(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 Fr:return"Fragment";case Dr:return"Portal";case Zl:return"Profiler";case Ec:return"StrictMode";case Jl:return"Suspense";case eu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Oh:return(e.displayName||"Context")+".Consumer";case Mh:return(e._context.displayName||"Context")+".Provider";case Cc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case bc:return t=e.displayName||null,t!==null?t:tu(e.type)||"Memo";case Cn:t=e._payload,e=e._init;try{return tu(e(t))}catch{}}return null}function _0(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 tu(t);case 8:return t===Ec?"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 Hn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ih(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function N0(e){var t=Ih(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function qi(e){e._valueTracker||(e._valueTracker=N0(e))}function Lh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ih(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Fs(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 nu(e,t){var n=t.checked;return pe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function ef(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Hn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function jh(e,t){t=t.checked,t!=null&&Sc(e,"checked",t,!1)}function ru(e,t){jh(e,t);var n=Hn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ou(e,t.type,n):t.hasOwnProperty("defaultValue")&&ou(e,t.type,Hn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function tf(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ou(e,t,n){(t!=="number"||Fs(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ko=Array.isArray;function Yr(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=Zi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ai(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Xo={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},M0=["Webkit","ms","Moz","O"];Object.keys(Xo).forEach(function(e){M0.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Xo[t]=Xo[e]})});function zh(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Xo.hasOwnProperty(e)&&Xo[e]?(""+t).trim():t+"px"}function Uh(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=zh(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var O0=pe({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 au(e,t){if(t){if(O0[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(M(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(M(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(M(61))}if(t.style!=null&&typeof t.style!="object")throw Error(M(62))}}function lu(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 uu=null;function Pc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var cu=null,Xr=null,qr=null;function of(e){if(e=Di(e)){if(typeof cu!="function")throw Error(M(280));var t=e.stateNode;t&&(t=Pa(t),cu(e.stateNode,e.type,t))}}function Bh(e){Xr?qr?qr.push(e):qr=[e]:Xr=e}function Vh(){if(Xr){var e=Xr,t=qr;if(qr=Xr=null,of(e),t)for(e=0;e>>=0,e===0?32:31-(V0(e)/W0|0)|0}var Ji=64,es=4194304;function Qo(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 Bs(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~o;a!==0?r=Qo(a):(i&=s,i!==0&&(r=Qo(i)))}else s=n&~o,s!==0?r=Qo(s):i!==0&&(r=Qo(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Li(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Tt(t),e[t]=n}function G0(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Zo),hf=" ",mf=!1;function um(e,t){switch(e){case"keyup":return Ex.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function cm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var $r=!1;function bx(e,t){switch(e){case"compositionend":return cm(t);case"keypress":return t.which!==32?null:(mf=!0,hf);case"textInput":return e=t.data,e===hf&&mf?null:e;default:return null}}function Px(e,t){if($r)return e==="compositionend"||!Ac&&um(e,t)?(e=am(),bs=Nc=An=null,$r=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=wf(n)}}function hm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?hm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function mm(){for(var e=window,t=Fs();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Fs(e.document)}return t}function Ic(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 Ix(e){var t=mm(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&hm(n.ownerDocument.documentElement,n)){if(r!==null&&Ic(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=xf(n,i);var s=xf(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,zr=null,vu=null,ei=null,gu=!1;function Sf(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;gu||zr==null||zr!==Fs(r)||(r=zr,"selectionStart"in r&&Ic(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ei&&pi(ei,r)||(ei=r,r=Hs(vu,"onSelect"),0Vr||(e.current=Cu[Vr],Cu[Vr]=null,Vr--)}function re(e,t){Vr++,Cu[Vr]=e.current,e.current=t}var Kn={},je=Xn(Kn),Qe=Xn(!1),hr=Kn;function mo(e,t){var n=e.type.contextTypes;if(!n)return Kn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ge(e){return e=e.childContextTypes,e!=null}function Qs(){se(Qe),se(je)}function Tf(e,t,n){if(je.current!==Kn)throw Error(M(168));re(je,t),re(Qe,n)}function bm(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(M(108,_0(e)||"Unknown",o));return pe({},n,r)}function Gs(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Kn,hr=je.current,re(je,e),re(Qe,Qe.current),!0}function _f(e,t,n){var r=e.stateNode;if(!r)throw Error(M(169));n?(e=bm(e,t,hr),r.__reactInternalMemoizedMergedChildContext=e,se(Qe),se(je),re(je,e)):se(Qe),re(Qe,n)}var Xt=null,ka=!1,Pl=!1;function Pm(e){Xt===null?Xt=[e]:Xt.push(e)}function Kx(e){ka=!0,Pm(e)}function qn(){if(!Pl&&Xt!==null){Pl=!0;var e=0,t=te;try{var n=Xt;for(te=1;e>=s,o-=s,Zt=1<<32-Tt(t)+o|n<R?(A=P,P=null):A=P.sibling;var O=h(v,P,y[R],E);if(O===null){P===null&&(P=A);break}e&&P&&O.alternate===null&&t(v,P),m=i(O,m,R),b===null?C=O:b.sibling=O,b=O,P=A}if(R===y.length)return n(v,P),le&&tr(v,R),C;if(P===null){for(;RR?(A=P,P=null):A=P.sibling;var $=h(v,P,O.value,E);if($===null){P===null&&(P=A);break}e&&P&&$.alternate===null&&t(v,P),m=i($,m,R),b===null?C=$:b.sibling=$,b=$,P=A}if(O.done)return n(v,P),le&&tr(v,R),C;if(P===null){for(;!O.done;R++,O=y.next())O=c(v,O.value,E),O!==null&&(m=i(O,m,R),b===null?C=O:b.sibling=O,b=O);return le&&tr(v,R),C}for(P=r(v,P);!O.done;R++,O=y.next())O=p(P,v,R,O.value,E),O!==null&&(e&&O.alternate!==null&&P.delete(O.key===null?R:O.key),m=i(O,m,R),b===null?C=O:b.sibling=O,b=O);return e&&P.forEach(function(j){return t(v,j)}),le&&tr(v,R),C}function x(v,m,y,E){if(typeof y=="object"&&y!==null&&y.type===Fr&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Xi:e:{for(var C=y.key,b=m;b!==null;){if(b.key===C){if(C=y.type,C===Fr){if(b.tag===7){n(v,b.sibling),m=o(b,y.props.children),m.return=v,v=m;break e}}else if(b.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Cn&&Of(C)===b.type){n(v,b.sibling),m=o(b,y.props),m.ref=$o(v,b,y),m.return=v,v=m;break e}n(v,b);break}else t(v,b);b=b.sibling}y.type===Fr?(m=pr(y.props.children,v.mode,E,y.key),m.return=v,v=m):(E=Os(y.type,y.key,y.props,null,v.mode,E),E.ref=$o(v,m,y),E.return=v,v=E)}return s(v);case Dr:e:{for(b=y.key;m!==null;){if(m.key===b)if(m.tag===4&&m.stateNode.containerInfo===y.containerInfo&&m.stateNode.implementation===y.implementation){n(v,m.sibling),m=o(m,y.children||[]),m.return=v,v=m;break e}else{n(v,m);break}else t(v,m);m=m.sibling}m=Al(y,v.mode,E),m.return=v,v=m}return s(v);case Cn:return b=y._init,x(v,m,b(y._payload),E)}if(Ko(y))return S(v,m,y,E);if(Io(y))return g(v,m,y,E);as(v,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,m!==null&&m.tag===6?(n(v,m.sibling),m=o(m,y),m.return=v,v=m):(n(v,m),m=Ol(y,v.mode,E),m.return=v,v=m),s(v)):n(v,m)}return x}var go=_m(!0),Nm=_m(!1),qs=Xn(null),Zs=null,Kr=null,Fc=null;function $c(){Fc=Kr=Zs=null}function zc(e){var t=qs.current;se(qs),e._currentValue=t}function ku(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Jr(e,t){Zs=e,Fc=Kr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ke=!0),e.firstContext=null)}function mt(e){var t=e._currentValue;if(Fc!==e)if(e={context:e,memoizedValue:t,next:null},Kr===null){if(Zs===null)throw Error(M(308));Kr=e,Zs.dependencies={lanes:0,firstContext:e}}else Kr=Kr.next=e;return t}var or=null;function Uc(e){or===null?or=[e]:or.push(e)}function Mm(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Uc(t)):(n.next=o.next,o.next=n),t.interleaved=n,rn(e,r)}function rn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var bn=!1;function Bc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Om(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 en(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function zn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ee&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,rn(e,n)}return o=r.interleaved,o===null?(t.next=t,Uc(r)):(t.next=o.next,o.next=t),r.interleaved=t,rn(e,n)}function ks(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Rc(e,n)}}function Af(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Js(e,t,n,r){var o=e.updateQueue;bn=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,u=l.next;l.next=null,s===null?i=u:s.next=u,s=l;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==s&&(a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=l))}if(i!==null){var c=o.baseState;s=0,d=u=l=null,a=i;do{var h=a.lane,p=a.eventTime;if((r&h)===h){d!==null&&(d=d.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var S=e,g=a;switch(h=t,p=n,g.tag){case 1:if(S=g.payload,typeof S=="function"){c=S.call(p,c,h);break e}c=S;break e;case 3:S.flags=S.flags&-65537|128;case 0:if(S=g.payload,h=typeof S=="function"?S.call(p,c,h):S,h==null)break e;c=pe({},c,h);break e;case 2:bn=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=o.effects,h===null?o.effects=[a]:h.push(a))}else p={eventTime:p,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=p,l=c):d=d.next=p,s|=h;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;h=a,a=h.next,h.next=null,o.lastBaseUpdate=h,o.shared.pending=null}}while(!0);if(d===null&&(l=c),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=d,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);gr|=s,e.lanes=s,e.memoizedState=c}}function If(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Rl.transition;Rl.transition={};try{e(!1),t()}finally{te=n,Rl.transition=r}}function Ym(){return vt().memoizedState}function Xx(e,t,n){var r=Bn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Xm(e))qm(t,n);else if(n=Mm(e,t,n,r),n!==null){var o=$e();_t(n,e,r,o),Zm(n,t,r)}}function qx(e,t,n){var r=Bn(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Xm(e))qm(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,a=i(s,n);if(o.hasEagerState=!0,o.eagerState=a,Nt(a,s)){var l=t.interleaved;l===null?(o.next=o,Uc(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}n=Mm(e,t,o,r),n!==null&&(o=$e(),_t(n,e,r,o),Zm(n,t,r))}}function Xm(e){var t=e.alternate;return e===de||t!==null&&t===de}function qm(e,t){ti=ta=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Zm(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Rc(e,n)}}var na={readContext:mt,useCallback:Oe,useContext:Oe,useEffect:Oe,useImperativeHandle:Oe,useInsertionEffect:Oe,useLayoutEffect:Oe,useMemo:Oe,useReducer:Oe,useRef:Oe,useState:Oe,useDebugValue:Oe,useDeferredValue:Oe,useTransition:Oe,useMutableSource:Oe,useSyncExternalStore:Oe,useId:Oe,unstable_isNewReconciler:!1},Zx={readContext:mt,useCallback:function(e,t){return Lt().memoizedState=[e,t===void 0?null:t],e},useContext:mt,useEffect:jf,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ts(4194308,4,Wm.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ts(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ts(4,2,e,t)},useMemo:function(e,t){var n=Lt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Lt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Xx.bind(null,de,e),[r.memoizedState,e]},useRef:function(e){var t=Lt();return e={current:e},t.memoizedState=e},useState:Lf,useDebugValue:Xc,useDeferredValue:function(e){return Lt().memoizedState=e},useTransition:function(){var e=Lf(!1),t=e[0];return e=Yx.bind(null,e[1]),Lt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=de,o=Lt();if(le){if(n===void 0)throw Error(M(407));n=n()}else{if(n=t(),Pe===null)throw Error(M(349));vr&30||jm(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,jf(Fm.bind(null,r,i,e),[e]),r.flags|=2048,Si(9,Dm.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Lt(),t=Pe.identifierPrefix;if(le){var n=Jt,r=Zt;n=(r&~(1<<32-Tt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=wi++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[$t]=t,e[vi]=r,lv(e,t,!1,!1),t.stateNode=e;e:{switch(s=lu(n,r),n){case"dialog":ie("cancel",e),ie("close",e),o=r;break;case"iframe":case"object":case"embed":ie("load",e),o=r;break;case"video":case"audio":for(o=0;oxo&&(t.flags|=128,r=!0,zo(i,!1),t.lanes=4194304)}else{if(!r)if(e=ea(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),zo(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!le)return Ae(t),null}else 2*ye()-i.renderingStartTime>xo&&n!==1073741824&&(t.flags|=128,r=!0,zo(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ye(),t.sibling=null,n=ce.current,re(ce,r?n&1|2:n&1),t):(Ae(t),null);case 22:case 23:return nd(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?qe&1073741824&&(Ae(t),t.subtreeFlags&6&&(t.flags|=8192)):Ae(t),null;case 24:return null;case 25:return null}throw Error(M(156,t.tag))}function s1(e,t){switch(jc(t),t.tag){case 1:return Ge(t.type)&&Qs(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return yo(),se(Qe),se(je),Hc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Wc(t),null;case 13:if(se(ce),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(M(340));vo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return se(ce),null;case 4:return yo(),null;case 10:return zc(t.type._context),null;case 22:case 23:return nd(),null;case 24:return null;default:return null}}var us=!1,Le=!1,a1=typeof WeakSet=="function"?WeakSet:Set,D=null;function Qr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ge(e,t,r)}else n.current=null}function Lu(e,t,n){try{n()}catch(r){ge(e,t,r)}}var Qf=!1;function l1(e,t){if(yu=Vs,e=mm(),Ic(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,u=0,d=0,c=e,h=null;t:for(;;){for(var p;c!==n||o!==0&&c.nodeType!==3||(a=s+o),c!==i||r!==0&&c.nodeType!==3||(l=s+r),c.nodeType===3&&(s+=c.nodeValue.length),(p=c.firstChild)!==null;)h=c,c=p;for(;;){if(c===e)break t;if(h===n&&++u===o&&(a=s),h===i&&++d===r&&(l=s),(p=c.nextSibling)!==null)break;c=h,h=c.parentNode}c=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(wu={focusedElem:e,selectionRange:n},Vs=!1,D=t;D!==null;)if(t=D,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,D=e;else for(;D!==null;){t=D;try{var S=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var g=S.memoizedProps,x=S.memoizedState,v=t.stateNode,m=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:Ct(t.type,g),x);v.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(M(163))}}catch(E){ge(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,D=e;break}D=t.return}return S=Qf,Qf=!1,S}function ni(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Lu(t,n,i)}o=o.next}while(o!==r)}}function _a(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ju(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function dv(e){var t=e.alternate;t!==null&&(e.alternate=null,dv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[$t],delete t[vi],delete t[Eu],delete t[Wx],delete t[Hx])),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 fv(e){return e.tag===5||e.tag===3||e.tag===4}function Gf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||fv(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 Du(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ks));else if(r!==4&&(e=e.child,e!==null))for(Du(e,t,n),e=e.sibling;e!==null;)Du(e,t,n),e=e.sibling}function Fu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Fu(e,t,n),e=e.sibling;e!==null;)Fu(e,t,n),e=e.sibling}var _e=null,kt=!1;function yn(e,t,n){for(n=n.child;n!==null;)pv(e,t,n),n=n.sibling}function pv(e,t,n){if(Bt&&typeof Bt.onCommitFiberUnmount=="function")try{Bt.onCommitFiberUnmount(Sa,n)}catch{}switch(n.tag){case 5:Le||Qr(n,t);case 6:var r=_e,o=kt;_e=null,yn(e,t,n),_e=r,kt=o,_e!==null&&(kt?(e=_e,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):_e.removeChild(n.stateNode));break;case 18:_e!==null&&(kt?(e=_e,n=n.stateNode,e.nodeType===8?bl(e.parentNode,n):e.nodeType===1&&bl(e,n),di(e)):bl(_e,n.stateNode));break;case 4:r=_e,o=kt,_e=n.stateNode.containerInfo,kt=!0,yn(e,t,n),_e=r,kt=o;break;case 0:case 11:case 14:case 15:if(!Le&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&Lu(n,t,s),o=o.next}while(o!==r)}yn(e,t,n);break;case 1:if(!Le&&(Qr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ge(n,t,a)}yn(e,t,n);break;case 21:yn(e,t,n);break;case 22:n.mode&1?(Le=(r=Le)||n.memoizedState!==null,yn(e,t,n),Le=r):yn(e,t,n);break;default:yn(e,t,n)}}function Yf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new a1),t.forEach(function(r){var o=g1.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function St(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=ye()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*c1(r/1960))-r,10e?16:e,In===null)var r=!1;else{if(e=In,In=null,ia=0,ee&6)throw Error(M(331));var o=ee;for(ee|=4,D=e.current;D!==null;){var i=D,s=i.child;if(D.flags&16){var a=i.deletions;if(a!==null){for(var l=0;lye()-ed?fr(e,0):Jc|=n),Ye(e,t)}function Sv(e,t){t===0&&(e.mode&1?(t=es,es<<=1,!(es&130023424)&&(es=4194304)):t=1);var n=$e();e=rn(e,t),e!==null&&(Li(e,t,n),Ye(e,n))}function v1(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Sv(e,n)}function g1(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(M(314))}r!==null&&r.delete(t),Sv(e,n)}var Ev;Ev=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Qe.current)Ke=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ke=!1,o1(e,t,n);Ke=!!(e.flags&131072)}else Ke=!1,le&&t.flags&1048576&&km(t,Xs,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;_s(e,t),e=t.pendingProps;var o=mo(t,je.current);Jr(t,n),o=Qc(null,t,r,e,o,n);var i=Gc();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ge(r)?(i=!0,Gs(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Bc(t),o.updater=Ta,t.stateNode=o,o._reactInternals=t,Tu(t,r,e,n),t=Mu(null,t,r,!0,i,n)):(t.tag=0,le&&i&&Lc(t),De(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(_s(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=w1(r),e=Ct(r,e),o){case 0:t=Nu(null,t,r,e,n);break e;case 1:t=Wf(null,t,r,e,n);break e;case 11:t=Bf(null,t,r,e,n);break e;case 14:t=Vf(null,t,r,Ct(r.type,e),n);break e}throw Error(M(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ct(r,o),Nu(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ct(r,o),Wf(e,t,r,o,n);case 3:e:{if(iv(t),e===null)throw Error(M(387));r=t.pendingProps,i=t.memoizedState,o=i.element,Om(e,t),Js(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=wo(Error(M(423)),t),t=Hf(e,t,r,n,o);break e}else if(r!==o){o=wo(Error(M(424)),t),t=Hf(e,t,r,n,o);break e}else for(et=$n(t.stateNode.containerInfo.firstChild),tt=t,le=!0,Rt=null,n=Nm(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(vo(),r===o){t=on(e,t,n);break e}De(e,t,r,n)}t=t.child}return t;case 5:return Am(t),e===null&&Pu(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,xu(r,o)?s=null:i!==null&&xu(r,i)&&(t.flags|=32),ov(e,t),De(e,t,s,n),t.child;case 6:return e===null&&Pu(t),null;case 13:return sv(e,t,n);case 4:return Vc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=go(t,null,r,n):De(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ct(r,o),Bf(e,t,r,o,n);case 7:return De(e,t,t.pendingProps,n),t.child;case 8:return De(e,t,t.pendingProps.children,n),t.child;case 12:return De(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,re(qs,r._currentValue),r._currentValue=s,i!==null)if(Nt(i.value,s)){if(i.children===o.children&&!Qe.current){t=on(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){s=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=en(-1,n&-n),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),ku(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(M(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),ku(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}De(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Jr(t,n),o=mt(o),r=r(o),t.flags|=1,De(e,t,r,n),t.child;case 14:return r=t.type,o=Ct(r,t.pendingProps),o=Ct(r.type,o),Vf(e,t,r,o,n);case 15:return nv(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ct(r,o),_s(e,t),t.tag=1,Ge(r)?(e=!0,Gs(t)):e=!1,Jr(t,n),Jm(t,r,o),Tu(t,r,o,n),Mu(null,t,r,!0,e,n);case 19:return av(e,t,n);case 22:return rv(e,t,n)}throw Error(M(156,t.tag))};function Cv(e,t){return Xh(e,t)}function y1(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ft(e,t,n,r){return new y1(e,t,n,r)}function od(e){return e=e.prototype,!(!e||!e.isReactComponent)}function w1(e){if(typeof e=="function")return od(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Cc)return 11;if(e===bc)return 14}return 2}function Vn(e,t){var n=e.alternate;return n===null?(n=ft(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Os(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")od(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Fr:return pr(n.children,o,i,t);case Ec:s=8,o|=8;break;case Zl:return e=ft(12,n,t,o|2),e.elementType=Zl,e.lanes=i,e;case Jl:return e=ft(13,n,t,o),e.elementType=Jl,e.lanes=i,e;case eu:return e=ft(19,n,t,o),e.elementType=eu,e.lanes=i,e;case Ah:return Ma(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Mh:s=10;break e;case Oh:s=9;break e;case Cc:s=11;break e;case bc:s=14;break e;case Cn:s=16,r=null;break e}throw Error(M(130,e==null?e:typeof e,""))}return t=ft(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function pr(e,t,n,r){return e=ft(7,e,r,t),e.lanes=n,e}function Ma(e,t,n,r){return e=ft(22,e,r,t),e.elementType=Ah,e.lanes=n,e.stateNode={isHidden:!1},e}function Ol(e,t,n){return e=ft(6,e,null,t),e.lanes=n,e}function Al(e,t,n){return t=ft(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function x1(e,t,n,r,o){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=pl(0),this.expirationTimes=pl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pl(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function id(e,t,n,r,o,i,s,a,l){return e=new x1(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=ft(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Bc(i),e}function S1(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Rv)}catch(e){console.error(e)}}Rv(),Rh.exports=ot;var $i=Rh.exports;const Tv=mh($i);var _v,rp=$i;_v=rp.createRoot,rp.hydrateRoot;const k1="modulepreload",R1=function(e){return"/"+e},op={},st=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),a=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));o=Promise.allSettled(n.map(l=>{if(l=R1(l),l in op)return;op[l]=!0;const u=l.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${d}`))return;const c=document.createElement("link");if(c.rel=u?"stylesheet":k1,u||(c.as="script"),c.crossOrigin="",c.href=l,a&&c.setAttribute("nonce",a),document.head.appendChild(c),u)return new Promise((h,p)=>{c.addEventListener("load",h),c.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${l}`)))})}))}function i(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return o.then(s=>{for(const a of s||[])a.status==="rejected"&&i(a.reason);return t().catch(i)})};/** + * @remix-run/router v1.23.2 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Ci(){return Ci=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function ja(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function N1(){return Math.random().toString(36).substr(2,8)}function sp(e,t){return{usr:e.state,key:e.key,idx:t}}function la(e,t,n,r){return n===void 0&&(n=null),Ci({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Er(t):t,{state:n,key:t&&t.key||r||N1()})}function bi(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Er(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Nv(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,s=o.history,a=Ln.Pop,l=null,u=d();u==null&&(u=0,s.replaceState(Ci({},s.state,{idx:u}),""));function d(){return(s.state||{idx:null}).idx}function c(){a=Ln.Pop;let x=d(),v=x==null?null:x-u;u=x,l&&l({action:a,location:g.location,delta:v})}function h(x,v){a=Ln.Push;let m=la(g.location,x,v);n&&n(m,x),u=d()+1;let y=sp(m,u),E=g.createHref(m);try{s.pushState(y,"",E)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;o.location.assign(E)}i&&l&&l({action:a,location:g.location,delta:1})}function p(x,v){a=Ln.Replace;let m=la(g.location,x,v);n&&n(m,x),u=d();let y=sp(m,u),E=g.createHref(m);s.replaceState(y,"",E),i&&l&&l({action:a,location:g.location,delta:0})}function S(x){let v=o.location.origin!=="null"?o.location.origin:o.location.href,m=typeof x=="string"?x:bi(x);return m=m.replace(/ $/,"%20"),fe(v,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,v)}let g={get action(){return a},get location(){return e(o,s)},listen(x){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(ip,c),l=x,()=>{o.removeEventListener(ip,c),l=null}},createHref(x){return t(o,x)},createURL:S,encodeLocation(x){let v=S(x);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:h,replace:p,go(x){return s.go(x)}};return g}var ap;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(ap||(ap={}));function M1(e,t,n){return n===void 0&&(n="/"),O1(e,t,n)}function O1(e,t,n,r){let o=typeof t=="string"?Er(t):t,i=So(o.pathname||"/",n);if(i==null)return null;let s=Mv(e);A1(s);let a=null;for(let l=0;a==null&&l{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:s,route:i};l.relativePath.startsWith("/")&&(fe(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=Wn([r,l.relativePath]),d=n.concat(l);i.children&&i.children.length>0&&(fe(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Mv(i.children,t,d,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:z1(u,i.index),routesMeta:d})};return e.forEach((i,s)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))o(i,s);else for(let l of Ov(i.path))o(i,s,l)}),t}function Ov(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let s=Ov(r.join("/")),a=[];return a.push(...s.map(l=>l===""?i:[i,l].join("/"))),o&&a.push(...s),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function A1(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:U1(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const I1=/^:[\w-]+$/,L1=3,j1=2,D1=1,F1=10,$1=-2,lp=e=>e==="*";function z1(e,t){let n=e.split("/"),r=n.length;return n.some(lp)&&(r+=$1),t&&(r+=j1),n.filter(o=>!lp(o)).reduce((o,i)=>o+(I1.test(i)?L1:i===""?D1:F1),r)}function U1(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function B1(e,t,n){let{routesMeta:r}=e,o={},i="/",s=[];for(let a=0;a{let{paramName:h,isOptional:p}=d;if(h==="*"){let g=a[c]||"";s=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const S=a[c];return p&&!S?u[h]=void 0:u[h]=(S||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:s,pattern:e}}function V1(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),ja(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function W1(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ja(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function So(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const H1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,K1=e=>H1.test(e);function Q1(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?Er(e):e,i;if(n)if(K1(n))i=n;else{if(n.includes("//")){let s=n;n=n.replace(/\/\/+/g,"/"),ja(!1,"Pathnames cannot have embedded double slashes - normalizing "+(s+" -> "+n))}n.startsWith("/")?i=up(n.substring(1),"/"):i=up(n,t)}else i=t;return{pathname:i,search:X1(r),hash:q1(o)}}function up(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Il(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function G1(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function ud(e,t){let n=G1(e);return t?n.map((r,o)=>o===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function cd(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=Er(e):(o=Ci({},e),fe(!o.pathname||!o.pathname.includes("?"),Il("?","pathname","search",o)),fe(!o.pathname||!o.pathname.includes("#"),Il("#","pathname","hash",o)),fe(!o.search||!o.search.includes("#"),Il("#","search","hash",o)));let i=e===""||o.pathname==="",s=i?"/":o.pathname,a;if(s==null)a=n;else{let c=t.length-1;if(!r&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),c-=1;o.pathname=h.join("/")}a=c>=0?t[c]:"/"}let l=Q1(o,a),u=s&&s!=="/"&&s.endsWith("/"),d=(i||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}const Wn=e=>e.join("/").replace(/\/\/+/g,"/"),Y1=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),X1=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,q1=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Z1(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Av=["post","put","patch","delete"];new Set(Av);const J1=["get",...Av];new Set(J1);/** + * React Router v6.30.3 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Pi(){return Pi=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),f.useCallback(function(u,d){if(d===void 0&&(d={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let c=cd(u,JSON.parse(s),i,d.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Wn([t,c.pathname])),(d.replace?r.replace:r.push)(c,d.state,d)},[t,r,s,i,e])}function nS(){let{matches:e}=f.useContext(cn),t=e[e.length-1];return t?t.params:{}}function $a(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=f.useContext(un),{matches:o}=f.useContext(cn),{pathname:i}=dn(),s=JSON.stringify(ud(o,r.v7_relativeSplatPath));return f.useMemo(()=>cd(e,JSON.parse(s),i,n==="path"),[e,s,i,n])}function rS(e,t){return oS(e,t)}function oS(e,t,n,r){To()||fe(!1);let{navigator:o}=f.useContext(un),{matches:i}=f.useContext(cn),s=i[i.length-1],a=s?s.params:{};s&&s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let u=dn(),d;if(t){var c;let x=typeof t=="string"?Er(t):t;l==="/"||(c=x.pathname)!=null&&c.startsWith(l)||fe(!1),d=x}else d=u;let h=d.pathname||"/",p=h;if(l!=="/"){let x=l.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(x.length).join("/")}let S=M1(e,{pathname:p}),g=uS(S&&S.map(x=>Object.assign({},x,{params:Object.assign({},a,x.params),pathname:Wn([l,o.encodeLocation?o.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?l:Wn([l,o.encodeLocation?o.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),i,n,r);return t&&g?f.createElement(Fa.Provider,{value:{location:Pi({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:Ln.Pop}},g):g}function iS(){let e=pS(),t=Z1(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return f.createElement(f.Fragment,null,f.createElement("h2",null,"Unexpected Application Error!"),f.createElement("h3",{style:{fontStyle:"italic"}},t),n?f.createElement("pre",{style:o},n):null,null)}const sS=f.createElement(iS,null);class aS extends f.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?f.createElement(cn.Provider,{value:this.props.routeContext},f.createElement(Lv.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function lS(e){let{routeContext:t,match:n,children:r}=e,o=f.useContext(Da);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),f.createElement(cn.Provider,{value:t},r)}function uS(e,t,n,r){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let s=e,a=(o=n)==null?void 0:o.errors;if(a!=null){let d=s.findIndex(c=>c.route.id&&(a==null?void 0:a[c.route.id])!==void 0);d>=0||fe(!1),s=s.slice(0,Math.min(s.length,d+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d=0?s=s.slice(0,u+1):s=[s[0]];break}}}return s.reduceRight((d,c,h)=>{let p,S=!1,g=null,x=null;n&&(p=a&&c.route.id?a[c.route.id]:void 0,g=c.route.errorElement||sS,l&&(u<0&&h===0?(mS("route-fallback"),S=!0,x=null):u===h&&(S=!0,x=c.route.hydrateFallbackElement||null)));let v=t.concat(s.slice(0,h+1)),m=()=>{let y;return p?y=g:S?y=x:c.route.Component?y=f.createElement(c.route.Component,null):c.route.element?y=c.route.element:y=d,f.createElement(lS,{match:c,routeContext:{outlet:d,matches:v,isDataRoute:n!=null},children:y})};return n&&(c.route.ErrorBoundary||c.route.errorElement||h===0)?f.createElement(aS,{location:n.location,revalidation:n.revalidation,component:g,error:p,children:m(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):m()},null)}var Dv=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Dv||{}),Fv=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Fv||{});function cS(e){let t=f.useContext(Da);return t||fe(!1),t}function dS(e){let t=f.useContext(Iv);return t||fe(!1),t}function fS(e){let t=f.useContext(cn);return t||fe(!1),t}function $v(e){let t=fS(),n=t.matches[t.matches.length-1];return n.route.id||fe(!1),n.route.id}function pS(){var e;let t=f.useContext(Lv),n=dS(),r=$v();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function hS(){let{router:e}=cS(Dv.UseNavigateStable),t=$v(Fv.UseNavigateStable),n=f.useRef(!1);return jv(()=>{n.current=!0}),f.useCallback(function(o,i){i===void 0&&(i={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,Pi({fromRouteId:t},i)))},[e,t])}const cp={};function mS(e,t,n){cp[e]||(cp[e]=!0)}function zv(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Uv(e){let{to:t,replace:n,state:r,relative:o}=e;To()||fe(!1);let{future:i,static:s}=f.useContext(un),{matches:a}=f.useContext(cn),{pathname:l}=dn(),u=dd(),d=cd(t,ud(a,i.v7_relativeSplatPath),l,o==="path"),c=JSON.stringify(d);return f.useEffect(()=>u(JSON.parse(c),{replace:n,state:r,relative:o}),[u,c,o,n,r]),null}function Ve(e){fe(!1)}function Bv(e){let{basename:t="/",children:n=null,location:r,navigationType:o=Ln.Pop,navigator:i,static:s=!1,future:a}=e;To()&&fe(!1);let l=t.replace(/^\/*/,"/"),u=f.useMemo(()=>({basename:l,navigator:i,static:s,future:Pi({v7_relativeSplatPath:!1},a)}),[l,a,i,s]);typeof r=="string"&&(r=Er(r));let{pathname:d="/",search:c="",hash:h="",state:p=null,key:S="default"}=r,g=f.useMemo(()=>{let x=So(d,l);return x==null?null:{location:{pathname:x,search:c,hash:h,state:p,key:S},navigationType:o}},[l,d,c,h,p,S,o]);return g==null?null:f.createElement(un.Provider,{value:u},f.createElement(Fa.Provider,{children:n,value:g}))}function vS(e){let{children:t,location:n}=e;return rS(Wu(t),n)}new Promise(()=>{});function Wu(e,t){t===void 0&&(t=[]);let n=[];return f.Children.forEach(e,(r,o)=>{if(!f.isValidElement(r))return;let i=[...t,o];if(r.type===f.Fragment){n.push.apply(n,Wu(r.props.children,i));return}r.type!==Ve&&fe(!1),!r.props.index||!r.props.children||fe(!1);let s={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=Wu(r.props.children,i)),n.push(s)}),n}/** + * React Router DOM v6.30.3 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function ua(){return ua=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}function gS(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function yS(e,t){return e.button===0&&(!t||t==="_self")&&!gS(e)}function Hu(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(o=>[n,o]):[[n,r]])},[]))}function wS(e,t){let n=Hu(e);return t&&t.forEach((r,o)=>{n.has(o)||t.getAll(o).forEach(i=>{n.append(o,i)})}),n}const xS=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],SS=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],ES="6";try{window.__reactRouterVersion=ES}catch{}const CS=f.createContext({isTransitioning:!1}),bS="startTransition",ca=xa[bS];function PS(e){let{basename:t,children:n,future:r,window:o}=e,i=f.useRef();i.current==null&&(i.current=T1({window:o,v5Compat:!0}));let s=i.current,[a,l]=f.useState({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},d=f.useCallback(c=>{u&&ca?ca(()=>l(c)):l(c)},[l,u]);return f.useLayoutEffect(()=>s.listen(d),[s,d]),f.useEffect(()=>zv(r),[r]),f.createElement(Bv,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:s,future:r})}function kS(e){let{basename:t,children:n,future:r,window:o}=e,i=f.useRef();i.current==null&&(i.current=_1({window:o,v5Compat:!0}));let s=i.current,[a,l]=f.useState({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},d=f.useCallback(c=>{u&&ca?ca(()=>l(c)):l(c)},[l,u]);return f.useLayoutEffect(()=>s.listen(d),[s,d]),f.useEffect(()=>zv(r),[r]),f.createElement(Bv,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:s,future:r})}const RS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",TS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,_S=f.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:i,replace:s,state:a,target:l,to:u,preventScrollReset:d,viewTransition:c}=t,h=Vv(t,xS),{basename:p}=f.useContext(un),S,g=!1;if(typeof u=="string"&&TS.test(u)&&(S=u,RS))try{let y=new URL(window.location.href),E=u.startsWith("//")?new URL(y.protocol+u):new URL(u),C=So(E.pathname,p);E.origin===y.origin&&C!=null?u=C+E.search+E.hash:g=!0}catch{}let x=eS(u,{relative:o}),v=MS(u,{replace:s,state:a,target:l,preventScrollReset:d,relative:o,viewTransition:c});function m(y){r&&r(y),y.defaultPrevented||v(y)}return f.createElement("a",ua({},h,{href:S||x,onClick:g||i?r:m,ref:n,target:l}))}),lt=f.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:o=!1,className:i="",end:s=!1,style:a,to:l,viewTransition:u,children:d}=t,c=Vv(t,SS),h=$a(l,{relative:c.relative}),p=dn(),S=f.useContext(Iv),{navigator:g,basename:x}=f.useContext(un),v=S!=null&&OS(h)&&u===!0,m=g.encodeLocation?g.encodeLocation(h).pathname:h.pathname,y=p.pathname,E=S&&S.navigation&&S.navigation.location?S.navigation.location.pathname:null;o||(y=y.toLowerCase(),E=E?E.toLowerCase():null,m=m.toLowerCase()),E&&x&&(E=So(E,x)||E);const C=m!=="/"&&m.endsWith("/")?m.length-1:m.length;let b=y===m||!s&&y.startsWith(m)&&y.charAt(C)==="/",P=E!=null&&(E===m||!s&&E.startsWith(m)&&E.charAt(m.length)==="/"),R={isActive:b,isPending:P,isTransitioning:v},A=b?r:void 0,O;typeof i=="function"?O=i(R):O=[i,b?"active":null,P?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let $=typeof a=="function"?a(R):a;return f.createElement(_S,ua({},c,{"aria-current":A,className:O,ref:n,style:$,to:l,viewTransition:u}),typeof d=="function"?d(R):d)});var Ku;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ku||(Ku={}));var dp;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(dp||(dp={}));function NS(e){let t=f.useContext(Da);return t||fe(!1),t}function MS(e,t){let{target:n,replace:r,state:o,preventScrollReset:i,relative:s,viewTransition:a}=t===void 0?{}:t,l=dd(),u=dn(),d=$a(e,{relative:s});return f.useCallback(c=>{if(yS(c,n)){c.preventDefault();let h=r!==void 0?r:bi(u)===bi(d);l(e,{replace:h,state:o,preventScrollReset:i,relative:s,viewTransition:a})}},[u,l,d,r,o,n,e,i,s,a])}function G_(e){let t=f.useRef(Hu(e)),n=f.useRef(!1),r=dn(),o=f.useMemo(()=>wS(r.search,n.current?null:t.current),[r.search]),i=dd(),s=f.useCallback((a,l)=>{const u=Hu(typeof a=="function"?a(o):a);n.current=!0,i("?"+u,l)},[i,o]);return[o,s]}function OS(e,t){t===void 0&&(t={});let n=f.useContext(CS);n==null&&fe(!1);let{basename:r}=NS(Ku.useViewTransitionState),o=$a(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=So(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=So(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Vu(o.pathname,s)!=null||Vu(o.pathname,i)!=null}var za=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},sr,Rn,oo,sh,AS=(sh=class extends za{constructor(){super();J(this,sr);J(this,Rn);J(this,oo);V(this,oo,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){T(this,Rn)||this.setEventListener(T(this,oo))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,Rn))==null||t.call(this),V(this,Rn,void 0))}setEventListener(t){var n;V(this,oo,t),(n=T(this,Rn))==null||n.call(this),V(this,Rn,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){T(this,sr)!==t&&(V(this,sr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof T(this,sr)=="boolean"?T(this,sr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},sr=new WeakMap,Rn=new WeakMap,oo=new WeakMap,sh),Wv=new AS,IS={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Tn,hc,ah,LS=(ah=class{constructor(){J(this,Tn,IS);J(this,hc,!1)}setTimeoutProvider(e){V(this,Tn,e)}setTimeout(e,t){return T(this,Tn).setTimeout(e,t)}clearTimeout(e){T(this,Tn).clearTimeout(e)}setInterval(e,t){return T(this,Tn).setInterval(e,t)}clearInterval(e){T(this,Tn).clearInterval(e)}},Tn=new WeakMap,hc=new WeakMap,ah),Qu=new LS;function jS(e){setTimeout(e,0)}var DS=typeof window>"u"||"Deno"in globalThis;function bt(){}function FS(e,t){return typeof e=="function"?e(t):e}function $S(e){return typeof e=="number"&&e>=0&&e!==1/0}function zS(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Gu(e,t){return typeof e=="function"?e(t):e}function US(e,t){return typeof e=="function"?e(t):e}function fp(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:s,stale:a}=e;if(s){if(r){if(t.queryHash!==fd(s,t.options))return!1}else if(!Ri(t.queryKey,s))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||o&&o!==t.state.fetchStatus||i&&!i(t))}function pp(e,t){const{exact:n,status:r,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(ki(t.options.mutationKey)!==ki(i))return!1}else if(!Ri(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function fd(e,t){return((t==null?void 0:t.queryKeyHashFn)||ki)(e)}function ki(e){return JSON.stringify(e,(t,n)=>Yu(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Ri(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Ri(e[n],t[n])):!1}var BS=Object.prototype.hasOwnProperty;function Hv(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=hp(e)&&hp(t);if(!r&&!(Yu(e)&&Yu(t)))return t;const i=(r?e:Object.keys(e)).length,s=r?t:Object.keys(t),a=s.length,l=r?new Array(a):{};let u=0;for(let d=0;d{Qu.setTimeout(t,e)})}function WS(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Hv(e,t):t}function X_(e){return e}function HS(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function KS(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var pd=Symbol();function Kv(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===pd?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function q_(e,t){return typeof e=="function"?e(...t):!!e}function QS(e,t,n){let r=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=t()),r||(r=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var Qv=(()=>{let e=()=>DS;return{isServer(){return e()},setIsServer(t){e=t}}})();function GS(){let e,t;const n=new Promise((o,i)=>{e=o,t=i});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}var YS=jS;function XS(){let e=[],t=0,n=a=>{a()},r=a=>{a()},o=YS;const i=a=>{t?e.push(a):o(()=>{n(a)})},s=()=>{const a=e;e=[],a.length&&o(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||s()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{o=a}}}var Fe=XS(),io,_n,so,lh,qS=(lh=class extends za{constructor(){super();J(this,io,!0);J(this,_n);J(this,so);V(this,so,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){T(this,_n)||this.setEventListener(T(this,so))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,_n))==null||t.call(this),V(this,_n,void 0))}setEventListener(t){var n;V(this,so,t),(n=T(this,_n))==null||n.call(this),V(this,_n,t(this.setOnline.bind(this)))}setOnline(t){T(this,io)!==t&&(V(this,io,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return T(this,io)}},io=new WeakMap,_n=new WeakMap,so=new WeakMap,lh),da=new qS;function ZS(e){return Math.min(1e3*2**e,3e4)}function Gv(e){return(e??"online")==="online"?da.isOnline():!0}var Xu=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Yv(e){let t=!1,n=0,r;const o=GS(),i=()=>o.status!=="pending",s=g=>{var x;if(!i()){const v=new Xu(g);h(v),(x=e.onCancel)==null||x.call(e,v)}},a=()=>{t=!0},l=()=>{t=!1},u=()=>Wv.isFocused()&&(e.networkMode==="always"||da.isOnline())&&e.canRun(),d=()=>Gv(e.networkMode)&&e.canRun(),c=g=>{i()||(r==null||r(),o.resolve(g))},h=g=>{i()||(r==null||r(),o.reject(g))},p=()=>new Promise(g=>{var x;r=v=>{(i()||u())&&g(v)},(x=e.onPause)==null||x.call(e)}).then(()=>{var g;r=void 0,i()||(g=e.onContinue)==null||g.call(e)}),S=()=>{if(i())return;let g;const x=n===0?e.initialPromise:void 0;try{g=x??e.fn()}catch(v){g=Promise.reject(v)}Promise.resolve(g).then(c).catch(v=>{var b;if(i())return;const m=e.retry??(Qv.isServer()?0:3),y=e.retryDelay??ZS,E=typeof y=="function"?y(n,v):y,C=m===!0||typeof m=="number"&&nu()?void 0:p()).then(()=>{t?h(v):S()})})};return{promise:o,status:()=>o.status,cancel:s,continue:()=>(r==null||r(),o),cancelRetry:a,continueRetry:l,canStart:d,start:()=>(d()?S():p().then(S),o)}}var ar,uh,Xv=(uh=class{constructor(){J(this,ar)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),$S(this.gcTime)&&V(this,ar,Qu.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Qv.isServer()?1/0:5*60*1e3))}clearGcTimeout(){T(this,ar)!==void 0&&(Qu.clearTimeout(T(this,ar)),V(this,ar,void 0))}},ar=new WeakMap,uh);function JS(e){return{onFetch:(t,n)=>{var d,c,h,p,S;const r=t.options,o=(h=(c=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:c.fetchMore)==null?void 0:h.direction,i=((p=t.state.data)==null?void 0:p.pages)||[],s=((S=t.state.data)==null?void 0:S.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let g=!1;const x=y=>{QS(y,()=>t.signal,()=>g=!0)},v=Kv(t.options,t.fetchOptions),m=async(y,E,C)=>{if(g)return Promise.reject(t.signal.reason);if(E==null&&y.pages.length)return Promise.resolve(y);const P=(()=>{const $={client:t.client,queryKey:t.queryKey,pageParam:E,direction:C?"backward":"forward",meta:t.options.meta};return x($),$})(),R=await v(P),{maxPages:A}=t.options,O=C?KS:HS;return{pages:O(y.pages,R,A),pageParams:O(y.pageParams,E,A)}};if(o&&i.length){const y=o==="backward",E=y?qv:qu,C={pages:i,pageParams:s},b=E(r,C);a=await m(C,b,y)}else{const y=e??i.length;do{const E=l===0?s[0]??r.initialPageParam:qu(r,a);if(l>0&&E==null)break;a=await m(a,E),l++}while(l{var g,x;return(x=(g=t.options).persister)==null?void 0:x.call(g,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function qu(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function qv(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}function Z_(e,t){return t?qu(e,t)!=null:!1}function J_(e,t){return!t||!e.getPreviousPageParam?!1:qv(e,t)!=null}var ao,lr,lo,ut,ur,Ce,Mi,cr,Ze,Zv,Gt,ch,eE=(ch=class extends Xv{constructor(t){super();J(this,Ze);J(this,ao);J(this,lr);J(this,lo);J(this,ut);J(this,ur);J(this,Ce);J(this,Mi);J(this,cr);V(this,cr,!1),V(this,Mi,t.defaultOptions),this.setOptions(t.options),this.observers=[],V(this,ur,t.client),V(this,ut,T(this,ur).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,V(this,lr,gp(this.options)),this.state=t.state??T(this,lr),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return T(this,ao)}get promise(){var t;return(t=T(this,Ce))==null?void 0:t.promise}setOptions(t){if(this.options={...T(this,Mi),...t},t!=null&&t._type&&V(this,ao,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=gp(this.options);n.data!==void 0&&(this.setState(vp(n.data,n.dataUpdatedAt)),V(this,lr,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&T(this,ut).remove(this)}setData(t,n){const r=WS(this.state.data,t,this.options);return Te(this,Ze,Gt).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t){Te(this,Ze,Gt).call(this,{type:"setState",state:t})}cancel(t){var r,o;const n=(r=T(this,Ce))==null?void 0:r.promise;return(o=T(this,Ce))==null||o.cancel(t),n?n.then(bt).catch(bt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return T(this,lr)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>US(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===pd||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Gu(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!zS(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=T(this,Ce))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=T(this,Ce))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),T(this,ut).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(T(this,Ce)&&(T(this,cr)||Te(this,Ze,Zv).call(this)?T(this,Ce).cancel({revert:!0}):T(this,Ce).cancelRetry()),this.scheduleGc()),T(this,ut).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Te(this,Ze,Gt).call(this,{type:"invalidate"})}async fetch(t,n){var u,d,c,h,p,S,g,x,v,m,y;if(this.state.fetchStatus!=="idle"&&((u=T(this,Ce))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(T(this,Ce))return T(this,Ce).continueRetry(),T(this,Ce).promise}if(t&&this.setOptions(t),!this.options.queryFn){const E=this.observers.find(C=>C.options.queryFn);E&&this.setOptions(E.options)}const r=new AbortController,o=E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:()=>(V(this,cr,!0),r.signal)})},i=()=>{const E=Kv(this.options,n),b=(()=>{const P={client:T(this,ur),queryKey:this.queryKey,meta:this.meta};return o(P),P})();return V(this,cr,!1),this.options.persister?this.options.persister(E,b,this):E(b)},a=(()=>{const E={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:T(this,ur),state:this.state,fetchFn:i};return o(E),E})(),l=T(this,ao)==="infinite"?JS(this.options.pages):this.options.behavior;l==null||l.onFetch(a,this),V(this,lo,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=a.fetchOptions)==null?void 0:d.meta))&&Te(this,Ze,Gt).call(this,{type:"fetch",meta:(c=a.fetchOptions)==null?void 0:c.meta}),V(this,Ce,Yv({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,onCancel:E=>{E instanceof Xu&&E.revert&&this.setState({...T(this,lo),fetchStatus:"idle"}),r.abort()},onFail:(E,C)=>{Te(this,Ze,Gt).call(this,{type:"failed",failureCount:E,error:C})},onPause:()=>{Te(this,Ze,Gt).call(this,{type:"pause"})},onContinue:()=>{Te(this,Ze,Gt).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}));try{const E=await T(this,Ce).start();if(E===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(E),(p=(h=T(this,ut).config).onSuccess)==null||p.call(h,E,this),(g=(S=T(this,ut).config).onSettled)==null||g.call(S,E,this.state.error,this),E}catch(E){if(E instanceof Xu){if(E.silent)return T(this,Ce).promise;if(E.revert){if(this.state.data===void 0)throw E;return this.state.data}}throw Te(this,Ze,Gt).call(this,{type:"error",error:E}),(v=(x=T(this,ut).config).onError)==null||v.call(x,E,this),(y=(m=T(this,ut).config).onSettled)==null||y.call(m,this.state.data,E,this),E}finally{this.scheduleGc()}}},ao=new WeakMap,lr=new WeakMap,lo=new WeakMap,ut=new WeakMap,ur=new WeakMap,Ce=new WeakMap,Mi=new WeakMap,cr=new WeakMap,Ze=new WeakSet,Zv=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Gt=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...tE(r.data,this.options),fetchMeta:t.meta??null};case"success":const o={...r,...vp(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return V(this,lo,t.manual?o:void 0),o;case"error":const i=t.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Fe.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),T(this,ut).notify({query:this,type:"updated",action:t})})},ch);function tE(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Gv(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function vp(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function gp(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Oi,jt,Ie,dr,Dt,Sn,dh,nE=(dh=class extends Xv{constructor(t){super();J(this,Dt);J(this,Oi);J(this,jt);J(this,Ie);J(this,dr);V(this,Oi,t.client),this.mutationId=t.mutationId,V(this,Ie,t.mutationCache),V(this,jt,[]),this.state=t.state||rE(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){T(this,jt).includes(t)||(T(this,jt).push(t),this.clearGcTimeout(),T(this,Ie).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){V(this,jt,T(this,jt).filter(n=>n!==t)),this.scheduleGc(),T(this,Ie).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){T(this,jt).length||(this.state.status==="pending"?this.scheduleGc():T(this,Ie).remove(this))}continue(){var t;return((t=T(this,dr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,a,l,u,d,c,h,p,S,g,x,v,m,y,E,C,b,P;const n=()=>{Te(this,Dt,Sn).call(this,{type:"continue"})},r={client:T(this,Oi),meta:this.options.meta,mutationKey:this.options.mutationKey};V(this,dr,Yv({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(R,A)=>{Te(this,Dt,Sn).call(this,{type:"failed",failureCount:R,error:A})},onPause:()=>{Te(this,Dt,Sn).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>T(this,Ie).canRun(this)}));const o=this.state.status==="pending",i=!T(this,dr).canStart();try{if(o)n();else{Te(this,Dt,Sn).call(this,{type:"pending",variables:t,isPaused:i}),T(this,Ie).config.onMutate&&await T(this,Ie).config.onMutate(t,this,r);const A=await((a=(s=this.options).onMutate)==null?void 0:a.call(s,t,r));A!==this.state.context&&Te(this,Dt,Sn).call(this,{type:"pending",context:A,variables:t,isPaused:i})}const R=await T(this,dr).start();return await((u=(l=T(this,Ie).config).onSuccess)==null?void 0:u.call(l,R,t,this.state.context,this,r)),await((c=(d=this.options).onSuccess)==null?void 0:c.call(d,R,t,this.state.context,r)),await((p=(h=T(this,Ie).config).onSettled)==null?void 0:p.call(h,R,null,this.state.variables,this.state.context,this,r)),await((g=(S=this.options).onSettled)==null?void 0:g.call(S,R,null,t,this.state.context,r)),Te(this,Dt,Sn).call(this,{type:"success",data:R}),R}catch(R){try{await((v=(x=T(this,Ie).config).onError)==null?void 0:v.call(x,R,t,this.state.context,this,r))}catch(A){Promise.reject(A)}try{await((y=(m=this.options).onError)==null?void 0:y.call(m,R,t,this.state.context,r))}catch(A){Promise.reject(A)}try{await((C=(E=T(this,Ie).config).onSettled)==null?void 0:C.call(E,void 0,R,this.state.variables,this.state.context,this,r))}catch(A){Promise.reject(A)}try{await((P=(b=this.options).onSettled)==null?void 0:P.call(b,void 0,R,t,this.state.context,r))}catch(A){Promise.reject(A)}throw Te(this,Dt,Sn).call(this,{type:"error",error:R}),R}finally{T(this,Ie).runNext(this)}}},Oi=new WeakMap,jt=new WeakMap,Ie=new WeakMap,dr=new WeakMap,Dt=new WeakSet,Sn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Fe.batch(()=>{T(this,jt).forEach(r=>{r.onMutationUpdate(t)}),T(this,Ie).notify({mutation:this,type:"updated",action:t})})},dh);function rE(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var qt,Pt,Ai,fh,oE=(fh=class extends za{constructor(t={}){super();J(this,qt);J(this,Pt);J(this,Ai);this.config=t,V(this,qt,new Set),V(this,Pt,new Map),V(this,Ai,0)}build(t,n,r){const o=new nE({client:t,mutationCache:this,mutationId:++Gi(this,Ai)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){T(this,qt).add(t);const n=fs(t);if(typeof n=="string"){const r=T(this,Pt).get(n);r?r.push(t):T(this,Pt).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(T(this,qt).delete(t)){const n=fs(t);if(typeof n=="string"){const r=T(this,Pt).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&T(this,Pt).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=fs(t);if(typeof n=="string"){const r=T(this,Pt).get(n),o=r==null?void 0:r.find(i=>i.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=fs(t);if(typeof n=="string"){const o=(r=T(this,Pt).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Fe.batch(()=>{T(this,qt).forEach(t=>{this.notify({type:"removed",mutation:t})}),T(this,qt).clear(),T(this,Pt).clear()})}getAll(){return Array.from(T(this,qt))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>pp(n,r))}findAll(t={}){return this.getAll().filter(n=>pp(t,n))}notify(t){Fe.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Fe.batch(()=>Promise.all(t.map(n=>n.continue().catch(bt))))}},qt=new WeakMap,Pt=new WeakMap,Ai=new WeakMap,fh);function fs(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Ft,ph,iE=(ph=class extends za{constructor(t={}){super();J(this,Ft);this.config=t,V(this,Ft,new Map)}build(t,n,r){const o=n.queryKey,i=n.queryHash??fd(o,n);let s=this.get(i);return s||(s=new eE({client:t,queryKey:o,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(s)),s}add(t){T(this,Ft).has(t.queryHash)||(T(this,Ft).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=T(this,Ft).get(t.queryHash);n&&(t.destroy(),n===t&&T(this,Ft).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Fe.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return T(this,Ft).get(t)}getAll(){return[...T(this,Ft).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>fp(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>fp(t,r)):n}notify(t){Fe.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Fe.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Fe.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Ft=new WeakMap,ph),ve,Nn,Mn,uo,co,On,fo,po,hh,sE=(hh=class{constructor(e={}){J(this,ve);J(this,Nn);J(this,Mn);J(this,uo);J(this,co);J(this,On);J(this,fo);J(this,po);V(this,ve,e.queryCache||new iE),V(this,Nn,e.mutationCache||new oE),V(this,Mn,e.defaultOptions||{}),V(this,uo,new Map),V(this,co,new Map),V(this,On,0)}mount(){Gi(this,On)._++,T(this,On)===1&&(V(this,fo,Wv.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,ve).onFocus())})),V(this,po,da.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,ve).onOnline())})))}unmount(){var e,t;Gi(this,On)._--,T(this,On)===0&&((e=T(this,fo))==null||e.call(this),V(this,fo,void 0),(t=T(this,po))==null||t.call(this),V(this,po,void 0))}isFetching(e){return T(this,ve).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return T(this,Nn).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=T(this,ve).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=T(this,ve).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Gu(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return T(this,ve).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=T(this,ve).get(r.queryHash),i=o==null?void 0:o.state.data,s=FS(t,i);if(s!==void 0)return T(this,ve).build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return Fe.batch(()=>T(this,ve).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=T(this,ve).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=T(this,ve);Fe.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=T(this,ve);return Fe.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Fe.batch(()=>T(this,ve).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(bt).catch(bt)}invalidateQueries(e,t={}){return Fe.batch(()=>(T(this,ve).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Fe.batch(()=>T(this,ve).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let i=o.fetch(void 0,n);return n.throwOnError||(i=i.catch(bt)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(bt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=T(this,ve).build(this,t);return n.isStaleByTime(Gu(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(bt).catch(bt)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(bt).catch(bt)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return da.isOnline()?T(this,Nn).resumePausedMutations():Promise.resolve()}getQueryCache(){return T(this,ve)}getMutationCache(){return T(this,Nn)}getDefaultOptions(){return T(this,Mn)}setDefaultOptions(e){V(this,Mn,e)}setQueryDefaults(e,t){T(this,uo).set(ki(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...T(this,uo).values()],n={};return t.forEach(r=>{Ri(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){T(this,co).set(ki(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...T(this,co).values()],n={};return t.forEach(r=>{Ri(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...T(this,Mn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=fd(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===pd&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...T(this,Mn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){T(this,ve).clear(),T(this,Nn).clear()}},ve=new WeakMap,Nn=new WeakMap,Mn=new WeakMap,uo=new WeakMap,co=new WeakMap,On=new WeakMap,fo=new WeakMap,po=new WeakMap,hh),Jv=f.createContext(void 0),eN=e=>{const t=f.useContext(Jv);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},aE=({client:e,children:t})=>(f.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),w.jsx(Jv.Provider,{value:e,children:t}));const yp=e=>e.endsWith("/")?e.slice(0,-1):e;function eg(){const e="https://paperswithcode.co".trim();if(!e)return"";try{const t=e.startsWith("http")?new URL(e):new URL(e,typeof window<"u"?window.location.origin:"http://localhost");return yp(t.origin)}catch{return yp(e)}}function hd(e){const t=e.startsWith("/")?e:`/${e}`,n=eg();return n?`${n}${t}`:t}function tN(e){if(!e)return null;if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith("data:")||e.startsWith("blob:")||e.startsWith("//"))return e;if(e.startsWith("/")){const t=eg();return t?`${t}${e}`:e}return e}function Ua(){const t=String("1").trim().toLowerCase();return t==="1"||t==="true"||t==="yes"}function lE(){const t=String("1").trim().toLowerCase();return t==="1"||t==="true"||t==="yes"}const uE="/hf-logo.svg?v=20260513b",wp=({size:e=14})=>w.jsx("img",{src:uE,alt:"",width:Math.round(e*95/88),height:e,"aria-hidden":"true",draggable:!1,style:{display:"block"}}),cE=({returnTo:e,compact:t=!1})=>{if(Ua())return null;const n=()=>{const r=hd(`/api/v1/auth/hf/login?return_to=${encodeURIComponent(e)}`);window.location.href=r};return t?w.jsx("button",{type:"button",className:"icon-btn","aria-label":"Sign in with Hugging Face",title:"Sign in with Hugging Face",onClick:n,children:w.jsx(wp,{size:16})}):w.jsxs("button",{type:"button",className:"hf-signin-btn",onClick:n,"aria-label":"Sign in with Hugging Face",children:[w.jsx(wp,{size:18}),w.jsx("span",{children:"Sign in"})]})};function dE(e,t=[]){let n=[];function r(i,s){const a=f.createContext(s);a.displayName=i+"Context";const l=n.length;n=[...n,s];const u=c=>{var v;const{scope:h,children:p,...S}=c,g=((v=h==null?void 0:h[e])==null?void 0:v[l])||a,x=f.useMemo(()=>S,Object.values(S));return w.jsx(g.Provider,{value:x,children:p})};u.displayName=i+"Provider";function d(c,h){var g;const p=((g=h==null?void 0:h[e])==null?void 0:g[l])||a,S=f.useContext(p);if(S)return S;if(s!==void 0)return s;throw new Error(`\`${c}\` must be used within \`${i}\``)}return[u,d]}const o=()=>{const i=n.map(s=>f.createContext(s));return function(a){const l=(a==null?void 0:a[e])||i;return f.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,fE(o,...t)]}function fE(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((a,{useScope:l,scopeName:u})=>{const c=l(i)[`__scope${u}`];return{...a,...c}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Xe(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var gt=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{};function xp(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Cr(...e){return t=>{let n=!1;const r=e.map(o=>{const i=xp(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o{let{children:i,...s}=r;tg(i)&&typeof fa=="function"&&(i=fa(i._payload));const a=f.Children.toArray(i),l=a.find(gE);if(l){const u=l.props.children,d=a.map(c=>c===l?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:c);return w.jsx(t,{...s,ref:o,children:f.isValidElement(u)?f.cloneElement(u,void 0,d):null})}return w.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var nN=ng("Slot");function mE(e){const t=f.forwardRef((n,r)=>{let{children:o,...i}=n;if(tg(o)&&typeof fa=="function"&&(o=fa(o._payload)),f.isValidElement(o)){const s=wE(o),a=yE(i,o.props);return o.type!==f.Fragment&&(a.ref=r?Cr(r,s):s),f.cloneElement(o,a)}return f.Children.count(o)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var vE=Symbol("radix.slottable");function gE(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===vE}function yE(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function wE(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var xE=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],md=xE.reduce((e,t)=>{const n=ng(`Primitive.${t}`),r=f.forwardRef((o,i)=>{const{asChild:s,...a}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),w.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),rg={exports:{}},og={};/** + * @license React + * use-sync-external-store-shim.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Eo=f;function SE(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var EE=typeof Object.is=="function"?Object.is:SE,CE=Eo.useState,bE=Eo.useEffect,PE=Eo.useLayoutEffect,kE=Eo.useDebugValue;function RE(e,t){var n=t(),r=CE({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return PE(function(){o.value=n,o.getSnapshot=t,Ll(o)&&i({inst:o})},[e,n,t]),bE(function(){return Ll(o)&&i({inst:o}),e(function(){Ll(o)&&i({inst:o})})},[e]),kE(n),n}function Ll(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!EE(e,n)}catch{return!0}}function TE(e,t){return t()}var _E=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?TE:RE;og.useSyncExternalStore=Eo.useSyncExternalStore!==void 0?Eo.useSyncExternalStore:_E;rg.exports=og;var NE=rg.exports;function ME(){return NE.useSyncExternalStore(OE,()=>!0,()=>!1)}function OE(){return()=>{}}var vd="Avatar",[AE]=dE(vd),[IE,ig]=AE(vd),sg=f.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,i]=f.useState("idle");return w.jsx(IE,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:i,children:w.jsx(md.span,{...r,ref:t})})});sg.displayName=vd;var ag="AvatarImage",lg=f.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...i}=e,s=ig(ag,n),a=LE(r,i),l=Xe(u=>{o(u),s.onImageLoadingStatusChange(u)});return gt(()=>{a!=="idle"&&l(a)},[a,l]),a==="loaded"?w.jsx(md.img,{...i,ref:t,src:r}):null});lg.displayName=ag;var ug="AvatarFallback",cg=f.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,i=ig(ug,n),[s,a]=f.useState(r===void 0);return f.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>a(!0),r);return()=>window.clearTimeout(l)}},[r]),s&&i.imageLoadingStatus!=="loaded"?w.jsx(md.span,{...o,ref:t}):null});cg.displayName=ug;function Sp(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function LE(e,{referrerPolicy:t,crossOrigin:n}){const r=ME(),o=f.useRef(null),i=r?(o.current||(o.current=new window.Image),o.current):null,[s,a]=f.useState(()=>Sp(i,e));return gt(()=>{a(Sp(i,e))},[i,e]),gt(()=>{const l=c=>()=>{a(c)};if(!i)return;const u=l("loaded"),d=l("error");return i.addEventListener("load",u),i.addEventListener("error",d),t&&(i.referrerPolicy=t),typeof n=="string"&&(i.crossOrigin=n),()=>{i.removeEventListener("load",u),i.removeEventListener("error",d)}},[i,n,t]),s}var dg=sg,fg=lg,pg=cg;function hg(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t{const t=FE(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const a=s.split(gd);return a[0]===""&&a.length!==1&&a.shift(),vg(a,t)||DE(s)},getConflictingClassGroupIds:(s,a)=>{const l=n[s]||[];return a&&r[s]?[...l,...r[s]]:l}}},vg=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?vg(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(gd);return(s=t.validators.find(({validator:a})=>a(i)))==null?void 0:s.classGroupId},Ep=/^\[(.+)\]$/,DE=e=>{if(Ep.test(e)){const t=Ep.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},FE=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return zE(Object.entries(e.classGroups),n).forEach(([i,s])=>{Zu(s,r,i,t)}),r},Zu=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Cp(t,o);i.classGroupId=n;return}if(typeof o=="function"){if($E(o)){Zu(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,s])=>{Zu(s,Cp(t,i),n,r)})})},Cp=(e,t)=>{let n=e;return t.split(gd).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},$E=e=>e.isThemeGetter,zE=(e,t)=>t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,a])=>[t+s,a])):i);return[n,o]}):e,UE=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,s)=>{n.set(i,s),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let s=n.get(i);if(s!==void 0)return s;if((s=r.get(i))!==void 0)return o(i,s),s},set(i,s){n.has(i)?n.set(i,s):o(i,s)}}},gg="!",BE=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],i=t.length,s=a=>{const l=[];let u=0,d=0,c;for(let x=0;xd?c-d:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:S,maybePostfixModifierPosition:g}};return n?a=>n({className:a,parseClassName:s}):s},VE=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},WE=e=>({cache:UE(e.cacheSize),parseClassName:BE(e),...jE(e)}),HE=/\s+/,KE=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],s=e.trim().split(HE);let a="";for(let l=s.length-1;l>=0;l-=1){const u=s[l],{modifiers:d,hasImportantModifier:c,baseClassName:h,maybePostfixModifierPosition:p}=n(u);let S=!!p,g=r(S?h.substring(0,p):h);if(!g){if(!S){a=u+(a.length>0?" "+a:a);continue}if(g=r(h),!g){a=u+(a.length>0?" "+a:a);continue}S=!1}const x=VE(d).join(":"),v=c?x+gg:x,m=v+g;if(i.includes(m))continue;i.push(m);const y=o(g,S);for(let E=0;E0?" "+a:a)}return a};function QE(){let e=0,t,n,r="";for(;e{if(typeof e=="string")return e;let t,n="";for(let r=0;rc(d),e());return n=WE(u),r=n.cache.get,o=n.cache.set,i=a,a(l)}function a(l){const u=r(l);if(u)return u;const d=KE(l,n);return o(l,d),d}return function(){return i(QE.apply(null,arguments))}}const oe=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},wg=/^\[(?:([a-z-]+):)?(.+)\]$/i,YE=/^\d+\/\d+$/,XE=new Set(["px","full","screen"]),qE=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ZE=/\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$/,JE=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,eC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,tC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Qt=e=>to(e)||XE.has(e)||YE.test(e),wn=e=>_o(e,"length",uC),to=e=>!!e&&!Number.isNaN(Number(e)),jl=e=>_o(e,"number",to),Bo=e=>!!e&&Number.isInteger(Number(e)),nC=e=>e.endsWith("%")&&to(e.slice(0,-1)),G=e=>wg.test(e),xn=e=>qE.test(e),rC=new Set(["length","size","percentage"]),oC=e=>_o(e,rC,xg),iC=e=>_o(e,"position",xg),sC=new Set(["image","url"]),aC=e=>_o(e,sC,dC),lC=e=>_o(e,"",cC),Vo=()=>!0,_o=(e,t,n)=>{const r=wg.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},uC=e=>ZE.test(e)&&!JE.test(e),xg=()=>!1,cC=e=>eC.test(e),dC=e=>tC.test(e),fC=()=>{const e=oe("colors"),t=oe("spacing"),n=oe("blur"),r=oe("brightness"),o=oe("borderColor"),i=oe("borderRadius"),s=oe("borderSpacing"),a=oe("borderWidth"),l=oe("contrast"),u=oe("grayscale"),d=oe("hueRotate"),c=oe("invert"),h=oe("gap"),p=oe("gradientColorStops"),S=oe("gradientColorStopPositions"),g=oe("inset"),x=oe("margin"),v=oe("opacity"),m=oe("padding"),y=oe("saturate"),E=oe("scale"),C=oe("sepia"),b=oe("skew"),P=oe("space"),R=oe("translate"),A=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto",G,t],j=()=>[G,t],H=()=>["",Qt,wn],L=()=>["auto",to,G],Y=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],z=()=>["solid","dashed","dotted","double","none"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],_=()=>["start","end","center","between","around","evenly","stretch"],k=()=>["","0",G],I=()=>["auto","avoid","all","avoid-page","page","left","right","column"],U=()=>[to,G];return{cacheSize:500,separator:":",theme:{colors:[Vo],spacing:[Qt,wn],blur:["none","",xn,G],brightness:U(),borderColor:[e],borderRadius:["none","","full",xn,G],borderSpacing:j(),borderWidth:H(),contrast:U(),grayscale:k(),hueRotate:U(),invert:k(),gap:j(),gradientColorStops:[e],gradientColorStopPositions:[nC,wn],inset:$(),margin:$(),opacity:U(),padding:j(),saturate:U(),scale:U(),sepia:k(),skew:U(),space:j(),translate:j()},classGroups:{aspect:[{aspect:["auto","square","video",G]}],container:["container"],columns:[{columns:[xn]}],"break-after":[{"break-after":I()}],"break-before":[{"break-before":I()}],"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"],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:[...Y(),G]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Bo,G]}],basis:[{basis:$()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",G]}],grow:[{grow:k()}],shrink:[{shrink:k()}],order:[{order:["first","last","none",Bo,G]}],"grid-cols":[{"grid-cols":[Vo]}],"col-start-end":[{col:["auto",{span:["full",Bo,G]},G]}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":[Vo]}],"row-start-end":[{row:["auto",{span:[Bo,G]},G]}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",G]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",G]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",..._()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",..._(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[..._(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[m]}],px:[{px:[m]}],py:[{py:[m]}],ps:[{ps:[m]}],pe:[{pe:[m]}],pt:[{pt:[m]}],pr:[{pr:[m]}],pb:[{pb:[m]}],pl:[{pl:[m]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[P]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[P]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",G,t]}],"min-w":[{"min-w":[G,t,"min","max","fit"]}],"max-w":[{"max-w":[G,t,"none","full","min","max","fit","prose",{screen:[xn]},xn]}],h:[{h:[G,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[G,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[G,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[G,t,"auto","min","max","fit"]}],"font-size":[{text:["base",xn,wn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",jl]}],"font-family":[{font:[Vo]}],"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:["tighter","tight","normal","wide","wider","widest",G]}],"line-clamp":[{"line-clamp":["none",to,jl]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Qt,G]}],"list-image":[{"list-image":["none",G]}],"list-style-type":[{list:["none","disc","decimal",G]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...z(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Qt,wn]}],"underline-offset":[{"underline-offset":["auto",Qt,G]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",G]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",G]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Y(),iC]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",oC]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},aC]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...z(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:z()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...z()]}],"outline-offset":[{"outline-offset":[Qt,G]}],"outline-w":[{outline:[Qt,wn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[Qt,wn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",xn,lC]}],"shadow-color":[{shadow:[Vo]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...W(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":W()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",xn,G]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[c]}],saturate:[{saturate:[y]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[c]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",G]}],duration:[{duration:U()}],ease:[{ease:["linear","in","out","in-out",G]}],delay:[{delay:U()}],animate:[{animate:["none","spin","ping","pulse","bounce",G]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[E]}],"scale-x":[{"scale-x":[E]}],"scale-y":[{"scale-y":[E]}],rotate:[{rotate:[Bo,G]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"skew-x":[{"skew-x":[b]}],"skew-y":[{"skew-y":[b]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",G]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",G]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"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",G]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Qt,wn,jl]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},pC=GE(fC);function Re(...e){return pC(mg(e))}function rN(e){if(e==null||e==="")return"—";const t=typeof e=="string"?parseFloat(e):e;return Number.isFinite(t)?Math.abs(t)>=100?t.toFixed(0):Math.abs(t)>=10?t.toFixed(1):t.toFixed(2):String(e)}const Sg=f.forwardRef(({className:e,...t},n)=>w.jsx(dg,{ref:n,className:Re("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Sg.displayName=dg.displayName;const Eg=f.forwardRef(({className:e,...t},n)=>w.jsx(fg,{ref:n,className:Re("aspect-square h-full w-full",e),...t}));Eg.displayName=fg.displayName;const Cg=f.forwardRef(({className:e,...t},n)=>w.jsx(pg,{ref:n,className:Re("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Cg.displayName=pg.displayName;function B(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function oN(e,t){const n=f.createContext(t),r=i=>{const{children:s,...a}=i,l=f.useMemo(()=>a,Object.values(a));return w.jsx(n.Provider,{value:l,children:s})};r.displayName=e+"Provider";function o(i){const s=f.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function br(e,t=[]){let n=[];function r(i,s){const a=f.createContext(s),l=n.length;n=[...n,s];const u=c=>{var v;const{scope:h,children:p,...S}=c,g=((v=h==null?void 0:h[e])==null?void 0:v[l])||a,x=f.useMemo(()=>S,Object.values(S));return w.jsx(g.Provider,{value:x,children:p})};u.displayName=i+"Provider";function d(c,h){var g;const p=((g=h==null?void 0:h[e])==null?void 0:g[l])||a,S=f.useContext(p);if(S)return S;if(s!==void 0)return s;throw new Error(`\`${c}\` must be used within \`${i}\``)}return[u,d]}const o=()=>{const i=n.map(s=>f.createContext(s));return function(a){const l=(a==null?void 0:a[e])||i;return f.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,hC(o,...t)]}function hC(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((a,{useScope:l,scopeName:u})=>{const c=l(i)[`__scope${u}`];return{...a,...c}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}var mC=xa[" useInsertionEffect ".trim().toString()]||gt;function yd({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,s]=vC({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:o;{const d=f.useRef(e!==void 0);f.useEffect(()=>{const c=d.current;c!==a&&console.warn(`${r} is changing from ${c?"controlled":"uncontrolled"} to ${a?"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.`),d.current=a},[a,r])}const u=f.useCallback(d=>{var c;if(a){const h=gC(d)?d(e):d;h!==e&&((c=s.current)==null||c.call(s,h))}else i(d)},[a,e,i,s]);return[l,u]}function vC({defaultProp:e,onChange:t}){const[n,r]=f.useState(e),o=f.useRef(n),i=f.useRef(t);return mC(()=>{i.current=t},[t]),f.useEffect(()=>{var s;o.current!==n&&((s=i.current)==null||s.call(i,n),o.current=n)},[n,o]),[n,r,i]}function gC(e){return typeof e=="function"}function yC(e){const t=wC(e),n=f.forwardRef((r,o)=>{const{children:i,...s}=r,a=f.Children.toArray(i),l=a.find(SC);if(l){const u=l.props.children,d=a.map(c=>c===l?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:c);return w.jsx(t,{...s,ref:o,children:f.isValidElement(u)?f.cloneElement(u,void 0,d):null})}return w.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function wC(e){const t=f.forwardRef((n,r)=>{const{children:o,...i}=n;if(f.isValidElement(o)){const s=CC(o),a=EC(i,o.props);return o.type!==f.Fragment&&(a.ref=r?Cr(r,s):s),f.cloneElement(o,a)}return f.Children.count(o)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var xC=Symbol("radix.slottable");function SC(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===xC}function EC(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function CC(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var bC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],he=bC.reduce((e,t)=>{const n=yC(`Primitive.${t}`),r=f.forwardRef((o,i)=>{const{asChild:s,...a}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),w.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function wd(e,t){e&&$i.flushSync(()=>e.dispatchEvent(t))}function bp(e){const t=PC(e),n=f.forwardRef((r,o)=>{const{children:i,...s}=r,a=f.Children.toArray(i),l=a.find(RC);if(l){const u=l.props.children,d=a.map(c=>c===l?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:c);return w.jsx(t,{...s,ref:o,children:f.isValidElement(u)?f.cloneElement(u,void 0,d):null})}return w.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function PC(e){const t=f.forwardRef((n,r)=>{const{children:o,...i}=n;if(f.isValidElement(o)){const s=_C(o),a=TC(i,o.props);return o.type!==f.Fragment&&(a.ref=r?Cr(r,s):s),f.cloneElement(o,a)}return f.Children.count(o)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var kC=Symbol("radix.slottable");function RC(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===kC}function TC(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function _C(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function xd(e){const t=e+"CollectionProvider",[n,r]=br(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=g=>{const{scope:x,children:v}=g,m=N.useRef(null),y=N.useRef(new Map).current;return w.jsx(o,{scope:x,itemMap:y,collectionRef:m,children:v})};s.displayName=t;const a=e+"CollectionSlot",l=bp(a),u=N.forwardRef((g,x)=>{const{scope:v,children:m}=g,y=i(a,v),E=ke(x,y.collectionRef);return w.jsx(l,{ref:E,children:m})});u.displayName=a;const d=e+"CollectionItemSlot",c="data-radix-collection-item",h=bp(d),p=N.forwardRef((g,x)=>{const{scope:v,children:m,...y}=g,E=N.useRef(null),C=ke(x,E),b=i(d,v);return N.useEffect(()=>(b.itemMap.set(E,{ref:E,...y}),()=>void b.itemMap.delete(E))),w.jsx(h,{[c]:"",ref:C,children:m})});p.displayName=d;function S(g){const x=i(e+"CollectionConsumer",g);return N.useCallback(()=>{const m=x.collectionRef.current;if(!m)return[];const y=Array.from(m.querySelectorAll(`[${c}]`));return Array.from(x.itemMap.values()).sort((b,P)=>y.indexOf(b.ref.current)-y.indexOf(P.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:s,Slot:u,ItemSlot:p},S,r]}var NC=f.createContext(void 0);function bg(e){const t=f.useContext(NC);return e||t||"ltr"}function MC(e,t=globalThis==null?void 0:globalThis.document){const n=Xe(e);f.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var OC="DismissableLayer",Ju="dismissableLayer.update",AC="dismissableLayer.pointerDownOutside",IC="dismissableLayer.focusOutside",Pp,Pg=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ba=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...l}=e,u=f.useContext(Pg),[d,c]=f.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=f.useState({}),S=ke(t,P=>c(P)),g=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(x),m=d?g.indexOf(d):-1,y=u.layersWithOutsidePointerEventsDisabled.size>0,E=m>=v,C=jC(P=>{const R=P.target,A=[...u.branches].some(O=>O.contains(R));!E||A||(o==null||o(P),s==null||s(P),P.defaultPrevented||a==null||a())},h),b=DC(P=>{const R=P.target;[...u.branches].some(O=>O.contains(R))||(i==null||i(P),s==null||s(P),P.defaultPrevented||a==null||a())},h);return MC(P=>{m===u.layers.size-1&&(r==null||r(P),!P.defaultPrevented&&a&&(P.preventDefault(),a()))},h),f.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Pp=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),kp(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Pp)}},[d,h,n,u]),f.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),kp())},[d,u]),f.useEffect(()=>{const P=()=>p({});return document.addEventListener(Ju,P),()=>document.removeEventListener(Ju,P)},[]),w.jsx(he.div,{...l,ref:S,style:{pointerEvents:y?E?"auto":"none":void 0,...e.style},onFocusCapture:B(e.onFocusCapture,b.onFocusCapture),onBlurCapture:B(e.onBlurCapture,b.onBlurCapture),onPointerDownCapture:B(e.onPointerDownCapture,C.onPointerDownCapture)})});Ba.displayName=OC;var LC="DismissableLayerBranch",kg=f.forwardRef((e,t)=>{const n=f.useContext(Pg),r=f.useRef(null),o=ke(t,r);return f.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),w.jsx(he.div,{...e,ref:o})});kg.displayName=LC;function jC(e,t=globalThis==null?void 0:globalThis.document){const n=Xe(e),r=f.useRef(!1),o=f.useRef(()=>{});return f.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){Rg(AC,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function DC(e,t=globalThis==null?void 0:globalThis.document){const n=Xe(e),r=f.useRef(!1);return f.useEffect(()=>{const o=i=>{i.target&&!r.current&&Rg(IC,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function kp(){const e=new CustomEvent(Ju);document.dispatchEvent(e)}function Rg(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?wd(o,i):o.dispatchEvent(i)}var FC=Ba,$C=kg,Dl=0;function zC(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Rp()),document.body.insertAdjacentElement("beforeend",e[1]??Rp()),Dl++,()=>{Dl===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Dl--}},[])}function Rp(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Fl="focusScope.autoFocusOnMount",$l="focusScope.autoFocusOnUnmount",Tp={bubbles:!1,cancelable:!0},UC="FocusScope",Tg=f.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[a,l]=f.useState(null),u=Xe(o),d=Xe(i),c=f.useRef(null),h=ke(t,g=>l(g)),p=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(r){let g=function(y){if(p.paused||!a)return;const E=y.target;a.contains(E)?c.current=E:En(c.current,{select:!0})},x=function(y){if(p.paused||!a)return;const E=y.relatedTarget;E!==null&&(a.contains(E)||En(c.current,{select:!0}))},v=function(y){if(document.activeElement===document.body)for(const C of y)C.removedNodes.length>0&&En(a)};document.addEventListener("focusin",g),document.addEventListener("focusout",x);const m=new MutationObserver(v);return a&&m.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",x),m.disconnect()}}},[r,a,p.paused]),f.useEffect(()=>{if(a){Np.add(p);const g=document.activeElement;if(!a.contains(g)){const v=new CustomEvent(Fl,Tp);a.addEventListener(Fl,u),a.dispatchEvent(v),v.defaultPrevented||(BC(QC(_g(a)),{select:!0}),document.activeElement===g&&En(a))}return()=>{a.removeEventListener(Fl,u),setTimeout(()=>{const v=new CustomEvent($l,Tp);a.addEventListener($l,d),a.dispatchEvent(v),v.defaultPrevented||En(g??document.body,{select:!0}),a.removeEventListener($l,d),Np.remove(p)},0)}}},[a,u,d,p]);const S=f.useCallback(g=>{if(!n&&!r||p.paused)return;const x=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,v=document.activeElement;if(x&&v){const m=g.currentTarget,[y,E]=VC(m);y&&E?!g.shiftKey&&v===E?(g.preventDefault(),n&&En(y,{select:!0})):g.shiftKey&&v===y&&(g.preventDefault(),n&&En(E,{select:!0})):v===m&&g.preventDefault()}},[n,r,p.paused]);return w.jsx(he.div,{tabIndex:-1,...s,ref:h,onKeyDown:S})});Tg.displayName=UC;function BC(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(En(r,{select:t}),document.activeElement!==n)return}function VC(e){const t=_g(e),n=_p(t,e),r=_p(t.reverse(),e);return[n,r]}function _g(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function _p(e,t){for(const n of e)if(!WC(n,{upTo:t}))return n}function WC(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function HC(e){return e instanceof HTMLInputElement&&"select"in e}function En(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&HC(e)&&t&&e.select()}}var Np=KC();function KC(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Mp(e,t),e.unshift(t)},remove(t){var n;e=Mp(e,t),(n=e[0])==null||n.resume()}}}function Mp(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function QC(e){return e.filter(t=>t.tagName!=="A")}var GC=xa[" useId ".trim().toString()]||(()=>{}),YC=0;function ec(e){const[t,n]=f.useState(GC());return gt(()=>{n(r=>r??String(YC++))},[e]),t?`radix-${t}`:""}const XC=["top","right","bottom","left"],Qn=Math.min,Je=Math.max,pa=Math.round,ps=Math.floor,Wt=e=>({x:e,y:e}),qC={left:"right",right:"left",bottom:"top",top:"bottom"};function tc(e,t,n){return Je(e,Qn(t,n))}function sn(e,t){return typeof e=="function"?e(t):e}function an(e){return e.split("-")[0]}function No(e){return e.split("-")[1]}function Sd(e){return e==="x"?"y":"x"}function Ed(e){return e==="y"?"height":"width"}function Ut(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Cd(e){return Sd(Ut(e))}function ZC(e,t,n){n===void 0&&(n=!1);const r=No(e),o=Cd(e),i=Ed(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=ha(s)),[s,ha(s)]}function JC(e){const t=ha(e);return[nc(e),t,nc(t)]}function nc(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Op=["left","right"],Ap=["right","left"],eb=["top","bottom"],tb=["bottom","top"];function nb(e,t,n){switch(e){case"top":case"bottom":return n?t?Ap:Op:t?Op:Ap;case"left":case"right":return t?eb:tb;default:return[]}}function rb(e,t,n,r){const o=No(e);let i=nb(an(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(nc)))),i}function ha(e){const t=an(e);return qC[t]+e.slice(t.length)}function ob(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ng(e){return typeof e!="number"?ob(e):{top:e,right:e,bottom:e,left:e}}function ma(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Ip(e,t,n){let{reference:r,floating:o}=e;const i=Ut(t),s=Cd(t),a=Ed(s),l=an(t),u=i==="y",d=r.x+r.width/2-o.width/2,c=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let p;switch(l){case"top":p={x:d,y:r.y-o.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:c};break;case"left":p={x:r.x-o.width,y:c};break;default:p={x:r.x,y:r.y}}switch(No(t)){case"start":p[s]-=h*(n&&u?-1:1);break;case"end":p[s]+=h*(n&&u?-1:1);break}return p}async function ib(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:c="floating",altBoundary:h=!1,padding:p=0}=sn(t,e),S=Ng(p),x=a[h?c==="floating"?"reference":"floating":c],v=ma(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(x)))==null||n?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:l})),m=c==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),E=await(i.isElement==null?void 0:i.isElement(y))?await(i.getScale==null?void 0:i.getScale(y))||{x:1,y:1}:{x:1,y:1},C=ma(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:m,offsetParent:y,strategy:l}):m);return{top:(v.top-C.top+S.top)/E.y,bottom:(C.bottom-v.bottom+S.bottom)/E.y,left:(v.left-C.left+S.left)/E.x,right:(C.right-v.right+S.right)/E.x}}const sb=50,ab=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:ib},l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:c}=Ip(u,r,l),h=r,p=0;const S={};for(let g=0;g({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:u,padding:d=0}=sn(e,t)||{};if(u==null)return{};const c=Ng(d),h={x:n,y:r},p=Cd(o),S=Ed(p),g=await s.getDimensions(u),x=p==="y",v=x?"top":"left",m=x?"bottom":"right",y=x?"clientHeight":"clientWidth",E=i.reference[S]+i.reference[p]-h[p]-i.floating[S],C=h[p]-i.reference[p],b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let P=b?b[y]:0;(!P||!await(s.isElement==null?void 0:s.isElement(b)))&&(P=a.floating[y]||i.floating[S]);const R=E/2-C/2,A=P/2-g[S]/2-1,O=Qn(c[v],A),$=Qn(c[m],A),j=O,H=P-g[S]-$,L=P/2-g[S]/2+R,Y=tc(j,L,H),z=!l.arrow&&No(o)!=null&&L!==Y&&i.reference[S]/2-(LL<=0)){var $,j;const L=((($=i.flip)==null?void 0:$.index)||0)+1,Y=P[L];if(Y&&(!(c==="alignment"?m!==Ut(Y):!1)||O.every(_=>Ut(_.placement)===m?_.overflows[0]>0:!0)))return{data:{index:L,overflows:O},reset:{placement:Y}};let z=(j=O.filter(W=>W.overflows[0]<=0).sort((W,_)=>W.overflows[1]-_.overflows[1])[0])==null?void 0:j.placement;if(!z)switch(p){case"bestFit":{var H;const W=(H=O.filter(_=>{if(b){const k=Ut(_.placement);return k===m||k==="y"}return!0}).map(_=>[_.placement,_.overflows.filter(k=>k>0).reduce((k,I)=>k+I,0)]).sort((_,k)=>_[1]-k[1])[0])==null?void 0:H[0];W&&(z=W);break}case"initialPlacement":z=a;break}if(o!==z)return{reset:{placement:z}}}return{}}}};function Lp(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function jp(e){return XC.some(t=>e[t]>=0)}const cb=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=sn(e,t);switch(o){case"referenceHidden":{const s=await r.detectOverflow(t,{...i,elementContext:"reference"}),a=Lp(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:jp(a)}}}case"escaped":{const s=await r.detectOverflow(t,{...i,altBoundary:!0}),a=Lp(s,n.floating);return{data:{escapedOffsets:a,escaped:jp(a)}}}default:return{}}}}},Mg=new Set(["left","top"]);async function db(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=an(n),a=No(n),l=Ut(n)==="y",u=Mg.has(s)?-1:1,d=i&&l?-1:1,c=sn(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:S}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return a&&typeof S=="number"&&(p=a==="end"?S*-1:S),l?{x:p*d,y:h*u}:{x:h*u,y:p*d}}const fb=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await db(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},pb=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:v=>{let{x:m,y}=v;return{x:m,y}}},...u}=sn(e,t),d={x:n,y:r},c=await i.detectOverflow(t,u),h=Ut(an(o)),p=Sd(h);let S=d[p],g=d[h];if(s){const v=p==="y"?"top":"left",m=p==="y"?"bottom":"right",y=S+c[v],E=S-c[m];S=tc(y,S,E)}if(a){const v=h==="y"?"top":"left",m=h==="y"?"bottom":"right",y=g+c[v],E=g-c[m];g=tc(y,g,E)}const x=l.fn({...t,[p]:S,[h]:g});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[p]:s,[h]:a}}}}}},hb=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=sn(e,t),d={x:n,y:r},c=Ut(o),h=Sd(c);let p=d[h],S=d[c];const g=sn(a,t),x=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const y=h==="y"?"height":"width",E=i.reference[h]-i.floating[y]+x.mainAxis,C=i.reference[h]+i.reference[y]-x.mainAxis;pC&&(p=C)}if(u){var v,m;const y=h==="y"?"width":"height",E=Mg.has(an(o)),C=i.reference[c]-i.floating[y]+(E&&((v=s.offset)==null?void 0:v[c])||0)+(E?0:x.crossAxis),b=i.reference[c]+i.reference[y]+(E?0:((m=s.offset)==null?void 0:m[c])||0)-(E?x.crossAxis:0);Sb&&(S=b)}return{[h]:p,[c]:S}}}},mb=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...u}=sn(e,t),d=await s.detectOverflow(t,u),c=an(o),h=No(o),p=Ut(o)==="y",{width:S,height:g}=i.floating;let x,v;c==="top"||c==="bottom"?(x=c,v=h===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(v=c,x=h==="end"?"top":"bottom");const m=g-d.top-d.bottom,y=S-d.left-d.right,E=Qn(g-d[x],m),C=Qn(S-d[v],y),b=!t.middlewareData.shift;let P=E,R=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(P=m),b&&!h){const O=Je(d.left,0),$=Je(d.right,0),j=Je(d.top,0),H=Je(d.bottom,0);p?R=S-2*(O!==0||$!==0?O+$:Je(d.left,d.right)):P=g-2*(j!==0||H!==0?j+H:Je(d.top,d.bottom))}await l({...t,availableWidth:R,availableHeight:P});const A=await s.getDimensions(a.floating);return S!==A.width||g!==A.height?{reset:{rects:!0}}:{}}}};function Va(){return typeof window<"u"}function Mo(e){return Og(e)?(e.nodeName||"").toLowerCase():"#document"}function nt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ht(e){var t;return(t=(Og(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Og(e){return Va()?e instanceof Node||e instanceof nt(e).Node:!1}function Mt(e){return Va()?e instanceof Element||e instanceof nt(e).Element:!1}function fn(e){return Va()?e instanceof HTMLElement||e instanceof nt(e).HTMLElement:!1}function Dp(e){return!Va()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof nt(e).ShadowRoot}function zi(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ot(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function vb(e){return/^(table|td|th)$/.test(Mo(e))}function Wa(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const gb=/transform|translate|scale|rotate|perspective|filter/,yb=/paint|layout|strict|content/,er=e=>!!e&&e!=="none";let zl;function bd(e){const t=Mt(e)?Ot(e):e;return er(t.transform)||er(t.translate)||er(t.scale)||er(t.rotate)||er(t.perspective)||!Pd()&&(er(t.backdropFilter)||er(t.filter))||gb.test(t.willChange||"")||yb.test(t.contain||"")}function wb(e){let t=Gn(e);for(;fn(t)&&!Co(t);){if(bd(t))return t;if(Wa(t))return null;t=Gn(t)}return null}function Pd(){return zl==null&&(zl=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),zl}function Co(e){return/^(html|body|#document)$/.test(Mo(e))}function Ot(e){return nt(e).getComputedStyle(e)}function Ha(e){return Mt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Gn(e){if(Mo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Dp(e)&&e.host||Ht(e);return Dp(t)?t.host:t}function Ag(e){const t=Gn(e);return Co(t)?e.ownerDocument?e.ownerDocument.body:e.body:fn(t)&&zi(t)?t:Ag(t)}function Ti(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Ag(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=nt(o);if(i){const a=rc(s);return t.concat(s,s.visualViewport||[],zi(o)?o:[],a&&n?Ti(a):[])}else return t.concat(o,Ti(o,[],n))}function rc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ig(e){const t=Ot(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=fn(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=pa(n)!==i||pa(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function kd(e){return Mt(e)?e:e.contextElement}function no(e){const t=kd(e);if(!fn(t))return Wt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Ig(t);let s=(i?pa(n.width):n.width)/r,a=(i?pa(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const xb=Wt(0);function Lg(e){const t=nt(e);return!Pd()||!t.visualViewport?xb:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Sb(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==nt(e)?!1:t}function wr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=kd(e);let s=Wt(1);t&&(r?Mt(r)&&(s=no(r)):s=no(e));const a=Sb(i,n,r)?Lg(i):Wt(0);let l=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,d=o.width/s.x,c=o.height/s.y;if(i){const h=nt(i),p=r&&Mt(r)?nt(r):r;let S=h,g=rc(S);for(;g&&r&&p!==S;){const x=no(g),v=g.getBoundingClientRect(),m=Ot(g),y=v.left+(g.clientLeft+parseFloat(m.paddingLeft))*x.x,E=v.top+(g.clientTop+parseFloat(m.paddingTop))*x.y;l*=x.x,u*=x.y,d*=x.x,c*=x.y,l+=y,u+=E,S=nt(g),g=rc(S)}}return ma({width:d,height:c,x:l,y:u})}function Ka(e,t){const n=Ha(e).scrollLeft;return t?t.left+n:wr(Ht(e)).left+n}function jg(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Ka(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Eb(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Ht(r),a=t?Wa(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},u=Wt(1);const d=Wt(0),c=fn(r);if((c||!c&&!i)&&((Mo(r)!=="body"||zi(s))&&(l=Ha(r)),c)){const p=wr(r);u=no(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}const h=s&&!c&&!i?jg(s,l):Wt(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+h.x,y:n.y*u.y-l.scrollTop*u.y+d.y+h.y}}function Cb(e){return Array.from(e.getClientRects())}function bb(e){const t=Ht(e),n=Ha(e),r=e.ownerDocument.body,o=Je(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Je(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Ka(e);const a=-n.scrollTop;return Ot(r).direction==="rtl"&&(s+=Je(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const Fp=25;function Pb(e,t){const n=nt(e),r=Ht(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const d=Pd();(!d||d&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const u=Ka(r);if(u<=0){const d=r.ownerDocument,c=d.body,h=getComputedStyle(c),p=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,S=Math.abs(r.clientWidth-c.clientWidth-p);S<=Fp&&(i-=S)}else u<=Fp&&(i+=u);return{width:i,height:s,x:a,y:l}}function kb(e,t){const n=wr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=fn(e)?no(e):Wt(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,u=r*i.y;return{width:s,height:a,x:l,y:u}}function $p(e,t,n){let r;if(t==="viewport")r=Pb(e,n);else if(t==="document")r=bb(Ht(e));else if(Mt(t))r=kb(t,n);else{const o=Lg(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ma(r)}function Dg(e,t){const n=Gn(e);return n===t||!Mt(n)||Co(n)?!1:Ot(n).position==="fixed"||Dg(n,t)}function Rb(e,t){const n=t.get(e);if(n)return n;let r=Ti(e,[],!1).filter(a=>Mt(a)&&Mo(a)!=="body"),o=null;const i=Ot(e).position==="fixed";let s=i?Gn(e):e;for(;Mt(s)&&!Co(s);){const a=Ot(s),l=bd(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||zi(s)&&!l&&Dg(e,s))?r=r.filter(d=>d!==s):o=a,s=Gn(s)}return t.set(e,r),r}function Tb(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Wa(t)?[]:Rb(t,this._c):[].concat(n),r],a=$p(t,s[0],o);let l=a.top,u=a.right,d=a.bottom,c=a.left;for(let h=1;h{s(!1,1e-7)},1e3)}P===1&&!$g(u,e.getBoundingClientRect())&&s(),E=!1}try{n=new IntersectionObserver(C,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,y)}n.observe(e)}return s(!0),i}function Lb(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=kd(e),d=o||i?[...u?Ti(u):[],...t?Ti(t):[]]:[];d.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const c=u&&a?Ib(u,n):null;let h=-1,p=null;s&&(p=new ResizeObserver(v=>{let[m]=v;m&&m.target===u&&p&&t&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var y;(y=p)==null||y.observe(t)})),n()}),u&&!l&&p.observe(u),t&&p.observe(t));let S,g=l?wr(e):null;l&&x();function x(){const v=wr(e);g&&!$g(g,v)&&n(),g=v,S=requestAnimationFrame(x)}return n(),()=>{var v;d.forEach(m=>{o&&m.removeEventListener("scroll",n),i&&m.removeEventListener("resize",n)}),c==null||c(),(v=p)==null||v.disconnect(),p=null,l&&cancelAnimationFrame(S)}}const jb=fb,Db=pb,Fb=ub,$b=mb,zb=cb,Up=lb,Ub=hb,Bb=(e,t,n)=>{const r=new Map,o={platform:Ab,...n},i={...o.platform,_c:r};return ab(e,t,{...o,platform:i})};var Vb=typeof document<"u",Wb=function(){},As=Vb?f.useLayoutEffect:Wb;function va(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!va(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!va(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function zg(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Bp(e,t){const n=zg(e);return Math.round(t*n)/n}function Bl(e){const t=f.useRef(e);return As(()=>{t.current=e}),t}function Hb(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[d,c]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=f.useState(r);va(h,r)||p(r);const[S,g]=f.useState(null),[x,v]=f.useState(null),m=f.useCallback(_=>{_!==b.current&&(b.current=_,g(_))},[]),y=f.useCallback(_=>{_!==P.current&&(P.current=_,v(_))},[]),E=i||S,C=s||x,b=f.useRef(null),P=f.useRef(null),R=f.useRef(d),A=l!=null,O=Bl(l),$=Bl(o),j=Bl(u),H=f.useCallback(()=>{if(!b.current||!P.current)return;const _={placement:t,strategy:n,middleware:h};$.current&&(_.platform=$.current),Bb(b.current,P.current,_).then(k=>{const I={...k,isPositioned:j.current!==!1};L.current&&!va(R.current,I)&&(R.current=I,$i.flushSync(()=>{c(I)}))})},[h,t,n,$,j]);As(()=>{u===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,c(_=>({..._,isPositioned:!1})))},[u]);const L=f.useRef(!1);As(()=>(L.current=!0,()=>{L.current=!1}),[]),As(()=>{if(E&&(b.current=E),C&&(P.current=C),E&&C){if(O.current)return O.current(E,C,H);H()}},[E,C,H,O,A]);const Y=f.useMemo(()=>({reference:b,floating:P,setReference:m,setFloating:y}),[m,y]),z=f.useMemo(()=>({reference:E,floating:C}),[E,C]),W=f.useMemo(()=>{const _={position:n,left:0,top:0};if(!z.floating)return _;const k=Bp(z.floating,d.x),I=Bp(z.floating,d.y);return a?{..._,transform:"translate("+k+"px, "+I+"px)",...zg(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:k,top:I}},[n,a,z.floating,d.x,d.y]);return f.useMemo(()=>({...d,update:H,refs:Y,elements:z,floatingStyles:W}),[d,H,Y,z,W])}const Kb=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Up({element:r.current,padding:o}).fn(n):{}:r?Up({element:r,padding:o}).fn(n):{}}}},Qb=(e,t)=>{const n=jb(e);return{name:n.name,fn:n.fn,options:[e,t]}},Gb=(e,t)=>{const n=Db(e);return{name:n.name,fn:n.fn,options:[e,t]}},Yb=(e,t)=>({fn:Ub(e).fn,options:[e,t]}),Xb=(e,t)=>{const n=Fb(e);return{name:n.name,fn:n.fn,options:[e,t]}},qb=(e,t)=>{const n=$b(e);return{name:n.name,fn:n.fn,options:[e,t]}},Zb=(e,t)=>{const n=zb(e);return{name:n.name,fn:n.fn,options:[e,t]}},Jb=(e,t)=>{const n=Kb(e);return{name:n.name,fn:n.fn,options:[e,t]}};var eP="Arrow",Ug=f.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return w.jsx(he.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:w.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ug.displayName=eP;var tP=Ug;function nP(e){const[t,n]=f.useState(void 0);return gt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,a;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;s=u.inlineSize,a=u.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Rd="Popper",[Bg,Qa]=br(Rd),[rP,Vg]=Bg(Rd),Wg=e=>{const{__scopePopper:t,children:n}=e,[r,o]=f.useState(null);return w.jsx(rP,{scope:t,anchor:r,onAnchorChange:o,children:n})};Wg.displayName=Rd;var Hg="PopperAnchor",Kg=f.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=Vg(Hg,n),s=f.useRef(null),a=ke(t,s),l=f.useRef(null);return f.useEffect(()=>{const u=l.current;l.current=(r==null?void 0:r.current)||s.current,u!==l.current&&i.onAnchorChange(l.current)}),r?null:w.jsx(he.div,{...o,ref:a})});Kg.displayName=Hg;var Td="PopperContent",[oP,iP]=Bg(Td),Qg=f.forwardRef((e,t)=>{var q,Kt,Ee,At,pn,Tr;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:c="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:S,...g}=e,x=Vg(Td,n),[v,m]=f.useState(null),y=ke(t,hn=>m(hn)),[E,C]=f.useState(null),b=nP(E),P=(b==null?void 0:b.width)??0,R=(b==null?void 0:b.height)??0,A=r+(i!=="center"?"-"+i:""),O=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},$=Array.isArray(u)?u:[u],j=$.length>0,H={padding:O,boundary:$.filter(aP),altBoundary:j},{refs:L,floatingStyles:Y,placement:z,isPositioned:W,middlewareData:_}=Hb({strategy:"fixed",placement:A,whileElementsMounted:(...hn)=>Lb(...hn,{animationFrame:p==="always"}),elements:{reference:x.anchor},middleware:[Qb({mainAxis:o+R,alignmentAxis:s}),l&&Gb({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?Yb():void 0,...H}),l&&Xb({...H}),qb({...H,apply:({elements:hn,rects:Hi,availableWidth:rl,availableHeight:Ki})=>{const{width:ol,height:Oo}=Hi.reference,_r=hn.floating.style;_r.setProperty("--radix-popper-available-width",`${rl}px`),_r.setProperty("--radix-popper-available-height",`${Ki}px`),_r.setProperty("--radix-popper-anchor-width",`${ol}px`),_r.setProperty("--radix-popper-anchor-height",`${Oo}px`)}}),E&&Jb({element:E,padding:a}),lP({arrowWidth:P,arrowHeight:R}),h&&Zb({strategy:"referenceHidden",...H})]}),[k,I]=Xg(z),U=Xe(S);gt(()=>{W&&(U==null||U())},[W,U]);const F=(q=_.arrow)==null?void 0:q.x,Q=(Kt=_.arrow)==null?void 0:Kt.y,X=((Ee=_.arrow)==null?void 0:Ee.centerOffset)!==0,[ue,me]=f.useState();return gt(()=>{v&&me(window.getComputedStyle(v).zIndex)},[v]),w.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...Y,transform:W?Y.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ue,"--radix-popper-transform-origin":[(At=_.transformOrigin)==null?void 0:At.x,(pn=_.transformOrigin)==null?void 0:pn.y].join(" "),...((Tr=_.hide)==null?void 0:Tr.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:w.jsx(oP,{scope:n,placedSide:k,onArrowChange:C,arrowX:F,arrowY:Q,shouldHideArrow:X,children:w.jsx(he.div,{"data-side":k,"data-align":I,...g,ref:y,style:{...g.style,animation:W?void 0:"none"}})})})});Qg.displayName=Td;var Gg="PopperArrow",sP={top:"bottom",right:"left",bottom:"top",left:"right"},Yg=f.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=iP(Gg,r),s=sP[i.placedSide];return w.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:w.jsx(tP,{...o,ref:n,style:{...o.style,display:"block"}})})});Yg.displayName=Gg;function aP(e){return e!==null}var lP=e=>({name:"transformOrigin",options:e,fn(t){var x,v,m;const{placement:n,rects:r,middlewareData:o}=t,s=((x=o.arrow)==null?void 0:x.centerOffset)!==0,a=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[u,d]=Xg(n),c={start:"0%",center:"50%",end:"100%"}[d],h=(((v=o.arrow)==null?void 0:v.x)??0)+a/2,p=(((m=o.arrow)==null?void 0:m.y)??0)+l/2;let S="",g="";return u==="bottom"?(S=s?c:`${h}px`,g=`${-l}px`):u==="top"?(S=s?c:`${h}px`,g=`${r.floating.height+l}px`):u==="right"?(S=`${-l}px`,g=s?c:`${p}px`):u==="left"&&(S=`${r.floating.width+l}px`,g=s?c:`${p}px`),{data:{x:S,y:g}}}});function Xg(e){const[t,n="center"]=e.split("-");return[t,n]}var uP=Wg,qg=Kg,Zg=Qg,Jg=Yg,cP="Portal",_d=f.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,i]=f.useState(!1);gt(()=>i(!0),[]);const s=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?Tv.createPortal(w.jsx(he.div,{...r,ref:t}),s):null});_d.displayName=cP;function dP(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var Pr=e=>{const{present:t,children:n}=e,r=fP(t),o=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),i=ke(r.ref,pP(o));return typeof n=="function"||r.isPresent?f.cloneElement(o,{ref:i}):null};Pr.displayName="Presence";function fP(e){const[t,n]=f.useState(),r=f.useRef(null),o=f.useRef(e),i=f.useRef("none"),s=e?"mounted":"unmounted",[a,l]=dP(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const u=hs(r.current);i.current=a==="mounted"?u:"none"},[a]),gt(()=>{const u=r.current,d=o.current;if(d!==e){const h=i.current,p=hs(u);e?l("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&h!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),gt(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,c=p=>{const g=hs(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&g&&(l("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},h=p=>{p.target===t&&(i.current=hs(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:f.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function hs(e){return(e==null?void 0:e.animationName)||"none"}function pP(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Vl="rovingFocusGroup.onEntryFocus",hP={bubbles:!1,cancelable:!0},Ui="RovingFocusGroup",[oc,ey,mP]=xd(Ui),[vP,ty]=br(Ui,[mP]),[gP,yP]=vP(Ui),ny=f.forwardRef((e,t)=>w.jsx(oc.Provider,{scope:e.__scopeRovingFocusGroup,children:w.jsx(oc.Slot,{scope:e.__scopeRovingFocusGroup,children:w.jsx(wP,{...e,ref:t})})}));ny.displayName=Ui;var wP=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...c}=e,h=f.useRef(null),p=ke(t,h),S=bg(i),[g,x]=yd({prop:s,defaultProp:a??null,onChange:l,caller:Ui}),[v,m]=f.useState(!1),y=Xe(u),E=ey(n),C=f.useRef(!1),[b,P]=f.useState(0);return f.useEffect(()=>{const R=h.current;if(R)return R.addEventListener(Vl,y),()=>R.removeEventListener(Vl,y)},[y]),w.jsx(gP,{scope:n,orientation:r,dir:S,loop:o,currentTabStopId:g,onItemFocus:f.useCallback(R=>x(R),[x]),onItemShiftTab:f.useCallback(()=>m(!0),[]),onFocusableItemAdd:f.useCallback(()=>P(R=>R+1),[]),onFocusableItemRemove:f.useCallback(()=>P(R=>R-1),[]),children:w.jsx(he.div,{tabIndex:v||b===0?-1:0,"data-orientation":r,...c,ref:p,style:{outline:"none",...e.style},onMouseDown:B(e.onMouseDown,()=>{C.current=!0}),onFocus:B(e.onFocus,R=>{const A=!C.current;if(R.target===R.currentTarget&&A&&!v){const O=new CustomEvent(Vl,hP);if(R.currentTarget.dispatchEvent(O),!O.defaultPrevented){const $=E().filter(z=>z.focusable),j=$.find(z=>z.active),H=$.find(z=>z.id===g),Y=[j,H,...$].filter(Boolean).map(z=>z.ref.current);iy(Y,d)}}C.current=!1}),onBlur:B(e.onBlur,()=>m(!1))})})}),ry="RovingFocusGroupItem",oy=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,children:s,...a}=e,l=ec(),u=i||l,d=yP(ry,n),c=d.currentTabStopId===u,h=ey(n),{onFocusableItemAdd:p,onFocusableItemRemove:S,currentTabStopId:g}=d;return f.useEffect(()=>{if(r)return p(),()=>S()},[r,p,S]),w.jsx(oc.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:w.jsx(he.span,{tabIndex:c?0:-1,"data-orientation":d.orientation,...a,ref:t,onMouseDown:B(e.onMouseDown,x=>{r?d.onItemFocus(u):x.preventDefault()}),onFocus:B(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:B(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){d.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const v=EP(x,d.orientation,d.dir);if(v!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let y=h().filter(E=>E.focusable).map(E=>E.ref.current);if(v==="last")y.reverse();else if(v==="prev"||v==="next"){v==="prev"&&y.reverse();const E=y.indexOf(x.currentTarget);y=d.loop?CP(y,E+1):y.slice(E+1)}setTimeout(()=>iy(y))}}),children:typeof s=="function"?s({isCurrentTabStop:c,hasTabStop:g!=null}):s})})});oy.displayName=ry;var xP={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function SP(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function EP(e,t,n){const r=SP(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return xP[r]}function iy(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function CP(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var bP=ny,PP=oy;function kP(e){const t=RP(e),n=f.forwardRef((r,o)=>{const{children:i,...s}=r,a=f.Children.toArray(i),l=a.find(_P);if(l){const u=l.props.children,d=a.map(c=>c===l?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:c);return w.jsx(t,{...s,ref:o,children:f.isValidElement(u)?f.cloneElement(u,void 0,d):null})}return w.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function RP(e){const t=f.forwardRef((n,r)=>{const{children:o,...i}=n;if(f.isValidElement(o)){const s=MP(o),a=NP(i,o.props);return o.type!==f.Fragment&&(a.ref=r?Cr(r,s):s),f.cloneElement(o,a)}return f.Children.count(o)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var TP=Symbol("radix.slottable");function _P(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===TP}function NP(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function MP(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var OP=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ir=new WeakMap,ms=new WeakMap,vs={},Wl=0,sy=function(e){return e&&(e.host||sy(e.parentNode))},AP=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=sy(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},IP=function(e,t,n,r){var o=AP(t,Array.isArray(e)?e:[e]);vs[n]||(vs[n]=new WeakMap);var i=vs[n],s=[],a=new Set,l=new Set(o),u=function(c){!c||a.has(c)||(a.add(c),u(c.parentNode))};o.forEach(u);var d=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(h){if(a.has(h))d(h);else try{var p=h.getAttribute(r),S=p!==null&&p!=="false",g=(Ir.get(h)||0)+1,x=(i.get(h)||0)+1;Ir.set(h,g),i.set(h,x),s.push(h),g===1&&S&&ms.set(h,!0),x===1&&h.setAttribute(n,"true"),S||h.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",h,v)}})};return d(t),a.clear(),Wl++,function(){s.forEach(function(c){var h=Ir.get(c)-1,p=i.get(c)-1;Ir.set(c,h),i.set(c,p),h||(ms.has(c)||c.removeAttribute(r),ms.delete(c)),p||c.removeAttribute(n)}),Wl--,Wl||(Ir=new WeakMap,Ir=new WeakMap,ms=new WeakMap,vs={})}},LP=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=OP(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),IP(r,o,n,"aria-hidden")):function(){return null}},zt=function(){return zt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r"u")return ZP;var t=JP(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},tk=cy(),ro="data-scroll-locked",nk=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),` + .`.concat(DP,` { + overflow: hidden `).concat(r,`; + padding-right: `).concat(a,"px ").concat(r,`; + } + body[`).concat(ro,`] { + overflow: hidden `).concat(r,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` + padding-left: `.concat(o,`px; + padding-top: `).concat(i,`px; + padding-right: `).concat(s,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(a,"px ").concat(r,`; + `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),` + } + + .`).concat(Is,` { + right: `).concat(a,"px ").concat(r,`; + } + + .`).concat(Ls,` { + margin-right: `).concat(a,"px ").concat(r,`; + } + + .`).concat(Is," .").concat(Is,` { + right: 0 `).concat(r,`; + } + + .`).concat(Ls," .").concat(Ls,` { + margin-right: 0 `).concat(r,`; + } + + body[`).concat(ro,`] { + `).concat(FP,": ").concat(a,`px; + } +`)},Wp=function(){var e=parseInt(document.body.getAttribute(ro)||"0",10);return isFinite(e)?e:0},rk=function(){f.useEffect(function(){return document.body.setAttribute(ro,(Wp()+1).toString()),function(){var e=Wp()-1;e<=0?document.body.removeAttribute(ro):document.body.setAttribute(ro,e.toString())}},[])},ok=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;rk();var i=f.useMemo(function(){return ek(o)},[o]);return f.createElement(tk,{styles:nk(i,!t,o,n?"":"!important")})},ic=!1;if(typeof window<"u")try{var gs=Object.defineProperty({},"passive",{get:function(){return ic=!0,!0}});window.addEventListener("test",gs,gs),window.removeEventListener("test",gs,gs)}catch{ic=!1}var Lr=ic?{passive:!1}:!1,ik=function(e){return e.tagName==="TEXTAREA"},dy=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!ik(e)&&n[t]==="visible")},sk=function(e){return dy(e,"overflowY")},ak=function(e){return dy(e,"overflowX")},Hp=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=fy(e,r);if(o){var i=py(e,r),s=i[1],a=i[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},lk=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},uk=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},fy=function(e,t){return e==="v"?sk(t):ak(t)},py=function(e,t){return e==="v"?lk(t):uk(t)},ck=function(e,t){return e==="h"&&t==="rtl"?-1:1},dk=function(e,t,n,r,o){var i=ck(e,window.getComputedStyle(t).direction),s=i*r,a=n.target,l=t.contains(a),u=!1,d=s>0,c=0,h=0;do{if(!a)break;var p=py(e,a),S=p[0],g=p[1],x=p[2],v=g-x-i*S;(S||v)&&fy(e,a)&&(c+=v,h+=S);var m=a.parentNode;a=m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE?m.host:m}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(d&&Math.abs(c)<1||!d&&Math.abs(h)<1)&&(u=!0),u},ys=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Kp=function(e){return[e.deltaX,e.deltaY]},Qp=function(e){return e&&"current"in e?e.current:e},fk=function(e,t){return e[0]===t[0]&&e[1]===t[1]},pk=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},hk=0,jr=[];function mk(e){var t=f.useRef([]),n=f.useRef([0,0]),r=f.useRef(),o=f.useState(hk++)[0],i=f.useState(cy)[0],s=f.useRef(e);f.useEffect(function(){s.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=jP([e.lockRef.current],(e.shards||[]).map(Qp),!0).filter(Boolean);return g.forEach(function(x){return x.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=f.useCallback(function(g,x){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!s.current.allowPinchZoom;var v=ys(g),m=n.current,y="deltaX"in g?g.deltaX:m[0]-v[0],E="deltaY"in g?g.deltaY:m[1]-v[1],C,b=g.target,P=Math.abs(y)>Math.abs(E)?"h":"v";if("touches"in g&&P==="h"&&b.type==="range")return!1;var R=window.getSelection(),A=R&&R.anchorNode,O=A?A===b||A.contains(b):!1;if(O)return!1;var $=Hp(P,b);if(!$)return!0;if($?C=P:(C=P==="v"?"h":"v",$=Hp(P,b)),!$)return!1;if(!r.current&&"changedTouches"in g&&(y||E)&&(r.current=C),!C)return!0;var j=r.current||C;return dk(j,x,g,j==="h"?y:E)},[]),l=f.useCallback(function(g){var x=g;if(!(!jr.length||jr[jr.length-1]!==i)){var v="deltaY"in x?Kp(x):ys(x),m=t.current.filter(function(C){return C.name===x.type&&(C.target===x.target||x.target===C.shadowParent)&&fk(C.delta,v)})[0];if(m&&m.should){x.cancelable&&x.preventDefault();return}if(!m){var y=(s.current.shards||[]).map(Qp).filter(Boolean).filter(function(C){return C.contains(x.target)}),E=y.length>0?a(x,y[0]):!s.current.noIsolation;E&&x.cancelable&&x.preventDefault()}}},[]),u=f.useCallback(function(g,x,v,m){var y={name:g,delta:x,target:v,should:m,shadowParent:vk(v)};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(E){return E!==y})},1)},[]),d=f.useCallback(function(g){n.current=ys(g),r.current=void 0},[]),c=f.useCallback(function(g){u(g.type,Kp(g),g.target,a(g,e.lockRef.current))},[]),h=f.useCallback(function(g){u(g.type,ys(g),g.target,a(g,e.lockRef.current))},[]);f.useEffect(function(){return jr.push(i),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:h}),document.addEventListener("wheel",l,Lr),document.addEventListener("touchmove",l,Lr),document.addEventListener("touchstart",d,Lr),function(){jr=jr.filter(function(g){return g!==i}),document.removeEventListener("wheel",l,Lr),document.removeEventListener("touchmove",l,Lr),document.removeEventListener("touchstart",d,Lr)}},[]);var p=e.removeScrollBar,S=e.inert;return f.createElement(f.Fragment,null,S?f.createElement(i,{styles:pk(o)}):null,p?f.createElement(ok,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function vk(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const gk=HP(uy,mk);var hy=f.forwardRef(function(e,t){return f.createElement(Ga,zt({},e,{ref:t,sideCar:gk}))});hy.classNames=Ga.classNames;var sc=["Enter"," "],yk=["ArrowDown","PageUp","Home"],my=["ArrowUp","PageDown","End"],wk=[...yk,...my],xk={ltr:[...sc,"ArrowRight"],rtl:[...sc,"ArrowLeft"]},Sk={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Bi="Menu",[_i,Ek,Ck]=xd(Bi),[kr,vy]=br(Bi,[Ck,Qa,ty]),Ya=Qa(),gy=ty(),[bk,Rr]=kr(Bi),[Pk,Vi]=kr(Bi),yy=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:i,modal:s=!0}=e,a=Ya(t),[l,u]=f.useState(null),d=f.useRef(!1),c=Xe(i),h=bg(o);return f.useEffect(()=>{const p=()=>{d.current=!0,document.addEventListener("pointerdown",S,{capture:!0,once:!0}),document.addEventListener("pointermove",S,{capture:!0,once:!0})},S=()=>d.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("pointermove",S,{capture:!0})}},[]),w.jsx(uP,{...a,children:w.jsx(bk,{scope:t,open:n,onOpenChange:c,content:l,onContentChange:u,children:w.jsx(Pk,{scope:t,onClose:f.useCallback(()=>c(!1),[c]),isUsingKeyboardRef:d,dir:h,modal:s,children:r})})})};yy.displayName=Bi;var kk="MenuAnchor",Nd=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Ya(n);return w.jsx(qg,{...o,...r,ref:t})});Nd.displayName=kk;var Md="MenuPortal",[Rk,wy]=kr(Md,{forceMount:void 0}),xy=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=Rr(Md,t);return w.jsx(Rk,{scope:t,forceMount:n,children:w.jsx(Pr,{present:n||i.open,children:w.jsx(_d,{asChild:!0,container:o,children:r})})})};xy.displayName=Md;var ht="MenuContent",[Tk,Od]=kr(ht),Sy=f.forwardRef((e,t)=>{const n=wy(ht,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=Rr(ht,e.__scopeMenu),s=Vi(ht,e.__scopeMenu);return w.jsx(_i.Provider,{scope:e.__scopeMenu,children:w.jsx(Pr,{present:r||i.open,children:w.jsx(_i.Slot,{scope:e.__scopeMenu,children:s.modal?w.jsx(_k,{...o,ref:t}):w.jsx(Nk,{...o,ref:t})})})})}),_k=f.forwardRef((e,t)=>{const n=Rr(ht,e.__scopeMenu),r=f.useRef(null),o=ke(t,r);return f.useEffect(()=>{const i=r.current;if(i)return LP(i)},[]),w.jsx(Ad,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:B(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Nk=f.forwardRef((e,t)=>{const n=Rr(ht,e.__scopeMenu);return w.jsx(Ad,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Mk=kP("MenuContent.ScrollLock"),Ad=f.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:c,onInteractOutside:h,onDismiss:p,disableOutsideScroll:S,...g}=e,x=Rr(ht,n),v=Vi(ht,n),m=Ya(n),y=gy(n),E=Ek(n),[C,b]=f.useState(null),P=f.useRef(null),R=ke(t,P,x.onContentChange),A=f.useRef(0),O=f.useRef(""),$=f.useRef(0),j=f.useRef(null),H=f.useRef("right"),L=f.useRef(0),Y=S?hy:f.Fragment,z=S?{as:Mk,allowPinchZoom:!0}:void 0,W=k=>{var q,Kt;const I=O.current+k,U=E().filter(Ee=>!Ee.disabled),F=document.activeElement,Q=(q=U.find(Ee=>Ee.ref.current===F))==null?void 0:q.textValue,X=U.map(Ee=>Ee.textValue),ue=Vk(X,I,Q),me=(Kt=U.find(Ee=>Ee.textValue===ue))==null?void 0:Kt.ref.current;(function Ee(At){O.current=At,window.clearTimeout(A.current),At!==""&&(A.current=window.setTimeout(()=>Ee(""),1e3))})(I),me&&setTimeout(()=>me.focus())};f.useEffect(()=>()=>window.clearTimeout(A.current),[]),zC();const _=f.useCallback(k=>{var U,F;return H.current===((U=j.current)==null?void 0:U.side)&&Hk(k,(F=j.current)==null?void 0:F.area)},[]);return w.jsx(Tk,{scope:n,searchRef:O,onItemEnter:f.useCallback(k=>{_(k)&&k.preventDefault()},[_]),onItemLeave:f.useCallback(k=>{var I;_(k)||((I=P.current)==null||I.focus(),b(null))},[_]),onTriggerLeave:f.useCallback(k=>{_(k)&&k.preventDefault()},[_]),pointerGraceTimerRef:$,onPointerGraceIntentChange:f.useCallback(k=>{j.current=k},[]),children:w.jsx(Y,{...z,children:w.jsx(Tg,{asChild:!0,trapped:o,onMountAutoFocus:B(i,k=>{var I;k.preventDefault(),(I=P.current)==null||I.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:w.jsx(Ba,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:c,onInteractOutside:h,onDismiss:p,children:w.jsx(bP,{asChild:!0,...y,dir:v.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:b,onEntryFocus:B(l,k=>{v.isUsingKeyboardRef.current||k.preventDefault()}),preventScrollOnEntryFocus:!0,children:w.jsx(Zg,{role:"menu","aria-orientation":"vertical","data-state":Dy(x.open),"data-radix-menu-content":"",dir:v.dir,...m,...g,ref:R,style:{outline:"none",...g.style},onKeyDown:B(g.onKeyDown,k=>{const U=k.target.closest("[data-radix-menu-content]")===k.currentTarget,F=k.ctrlKey||k.altKey||k.metaKey,Q=k.key.length===1;U&&(k.key==="Tab"&&k.preventDefault(),!F&&Q&&W(k.key));const X=P.current;if(k.target!==X||!wk.includes(k.key))return;k.preventDefault();const me=E().filter(q=>!q.disabled).map(q=>q.ref.current);my.includes(k.key)&&me.reverse(),Uk(me)}),onBlur:B(e.onBlur,k=>{k.currentTarget.contains(k.target)||(window.clearTimeout(A.current),O.current="")}),onPointerMove:B(e.onPointerMove,Ni(k=>{const I=k.target,U=L.current!==k.clientX;if(k.currentTarget.contains(I)&&U){const F=k.clientX>L.current?"right":"left";H.current=F,L.current=k.clientX}}))})})})})})})});Sy.displayName=ht;var Ok="MenuGroup",Id=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return w.jsx(he.div,{role:"group",...r,ref:t})});Id.displayName=Ok;var Ak="MenuLabel",Ey=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return w.jsx(he.div,{...r,ref:t})});Ey.displayName=Ak;var ga="MenuItem",Gp="menu.itemSelect",Xa=f.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,i=f.useRef(null),s=Vi(ga,e.__scopeMenu),a=Od(ga,e.__scopeMenu),l=ke(t,i),u=f.useRef(!1),d=()=>{const c=i.current;if(!n&&c){const h=new CustomEvent(Gp,{bubbles:!0,cancelable:!0});c.addEventListener(Gp,p=>r==null?void 0:r(p),{once:!0}),wd(c,h),h.defaultPrevented?u.current=!1:s.onClose()}};return w.jsx(Cy,{...o,ref:l,disabled:n,onClick:B(e.onClick,d),onPointerDown:c=>{var h;(h=e.onPointerDown)==null||h.call(e,c),u.current=!0},onPointerUp:B(e.onPointerUp,c=>{var h;u.current||(h=c.currentTarget)==null||h.click()}),onKeyDown:B(e.onKeyDown,c=>{const h=a.searchRef.current!=="";n||h&&c.key===" "||sc.includes(c.key)&&(c.currentTarget.click(),c.preventDefault())})})});Xa.displayName=ga;var Cy=f.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...i}=e,s=Od(ga,n),a=gy(n),l=f.useRef(null),u=ke(t,l),[d,c]=f.useState(!1),[h,p]=f.useState("");return f.useEffect(()=>{const S=l.current;S&&p((S.textContent??"").trim())},[i.children]),w.jsx(_i.ItemSlot,{scope:n,disabled:r,textValue:o??h,children:w.jsx(PP,{asChild:!0,...a,focusable:!r,children:w.jsx(he.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:u,onPointerMove:B(e.onPointerMove,Ni(S=>{r?s.onItemLeave(S):(s.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:B(e.onPointerLeave,Ni(S=>s.onItemLeave(S))),onFocus:B(e.onFocus,()=>c(!0)),onBlur:B(e.onBlur,()=>c(!1))})})})}),Ik="MenuCheckboxItem",by=f.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return w.jsx(_y,{scope:e.__scopeMenu,checked:n,children:w.jsx(Xa,{role:"menuitemcheckbox","aria-checked":ya(n)?"mixed":n,...o,ref:t,"data-state":jd(n),onSelect:B(o.onSelect,()=>r==null?void 0:r(ya(n)?!0:!n),{checkForDefaultPrevented:!1})})})});by.displayName=Ik;var Py="MenuRadioGroup",[Lk,jk]=kr(Py,{value:void 0,onValueChange:()=>{}}),ky=f.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,i=Xe(r);return w.jsx(Lk,{scope:e.__scopeMenu,value:n,onValueChange:i,children:w.jsx(Id,{...o,ref:t})})});ky.displayName=Py;var Ry="MenuRadioItem",Ty=f.forwardRef((e,t)=>{const{value:n,...r}=e,o=jk(Ry,e.__scopeMenu),i=n===o.value;return w.jsx(_y,{scope:e.__scopeMenu,checked:i,children:w.jsx(Xa,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":jd(i),onSelect:B(r.onSelect,()=>{var s;return(s=o.onValueChange)==null?void 0:s.call(o,n)},{checkForDefaultPrevented:!1})})})});Ty.displayName=Ry;var Ld="MenuItemIndicator",[_y,Dk]=kr(Ld,{checked:!1}),Ny=f.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,i=Dk(Ld,n);return w.jsx(Pr,{present:r||ya(i.checked)||i.checked===!0,children:w.jsx(he.span,{...o,ref:t,"data-state":jd(i.checked)})})});Ny.displayName=Ld;var Fk="MenuSeparator",My=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return w.jsx(he.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});My.displayName=Fk;var $k="MenuArrow",Oy=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Ya(n);return w.jsx(Jg,{...o,...r,ref:t})});Oy.displayName=$k;var zk="MenuSub",[iN,Ay]=kr(zk),Yo="MenuSubTrigger",Iy=f.forwardRef((e,t)=>{const n=Rr(Yo,e.__scopeMenu),r=Vi(Yo,e.__scopeMenu),o=Ay(Yo,e.__scopeMenu),i=Od(Yo,e.__scopeMenu),s=f.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:l}=i,u={__scopeMenu:e.__scopeMenu},d=f.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return f.useEffect(()=>d,[d]),f.useEffect(()=>{const c=a.current;return()=>{window.clearTimeout(c),l(null)}},[a,l]),w.jsx(Nd,{asChild:!0,...u,children:w.jsx(Cy,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Dy(n.open),...e,ref:Cr(t,o.onTriggerChange),onClick:c=>{var h;(h=e.onClick)==null||h.call(e,c),!(e.disabled||c.defaultPrevented)&&(c.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:B(e.onPointerMove,Ni(c=>{i.onItemEnter(c),!c.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(i.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:B(e.onPointerLeave,Ni(c=>{var p,S;d();const h=(p=n.content)==null?void 0:p.getBoundingClientRect();if(h){const g=(S=n.content)==null?void 0:S.dataset.side,x=g==="right",v=x?-5:5,m=h[x?"left":"right"],y=h[x?"right":"left"];i.onPointerGraceIntentChange({area:[{x:c.clientX+v,y:c.clientY},{x:m,y:h.top},{x:y,y:h.top},{x:y,y:h.bottom},{x:m,y:h.bottom}],side:g}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(c),c.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:B(e.onKeyDown,c=>{var p;const h=i.searchRef.current!=="";e.disabled||h&&c.key===" "||xk[r.dir].includes(c.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),c.preventDefault())})})})});Iy.displayName=Yo;var Ly="MenuSubContent",jy=f.forwardRef((e,t)=>{const n=wy(ht,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=Rr(ht,e.__scopeMenu),s=Vi(ht,e.__scopeMenu),a=Ay(Ly,e.__scopeMenu),l=f.useRef(null),u=ke(t,l);return w.jsx(_i.Provider,{scope:e.__scopeMenu,children:w.jsx(Pr,{present:r||i.open,children:w.jsx(_i.Slot,{scope:e.__scopeMenu,children:w.jsx(Ad,{id:a.contentId,"aria-labelledby":a.triggerId,...o,ref:u,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var c;s.isUsingKeyboardRef.current&&((c=l.current)==null||c.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:B(e.onFocusOutside,d=>{d.target!==a.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:B(e.onEscapeKeyDown,d=>{s.onClose(),d.preventDefault()}),onKeyDown:B(e.onKeyDown,d=>{var p;const c=d.currentTarget.contains(d.target),h=Sk[s.dir].includes(d.key);c&&h&&(i.onOpenChange(!1),(p=a.trigger)==null||p.focus(),d.preventDefault())})})})})})});jy.displayName=Ly;function Dy(e){return e?"open":"closed"}function ya(e){return e==="indeterminate"}function jd(e){return ya(e)?"indeterminate":e?"checked":"unchecked"}function Uk(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Bk(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Vk(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let s=Bk(e,Math.max(i,0));o.length===1&&(s=s.filter(u=>u!==n));const l=s.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function Wk(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;ir!=h>r&&n<(c-u)*(r-d)/(h-d)+u&&(o=!o)}return o}function Hk(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Wk(n,t)}function Ni(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Kk=yy,Qk=Nd,Gk=xy,Yk=Sy,Xk=Id,qk=Ey,Zk=Xa,Jk=by,eR=ky,tR=Ty,nR=Ny,rR=My,oR=Oy,iR=Iy,sR=jy,qa="DropdownMenu",[aR]=br(qa,[vy]),Be=vy(),[lR,Fy]=aR(qa),$y=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:i,onOpenChange:s,modal:a=!0}=e,l=Be(t),u=f.useRef(null),[d,c]=yd({prop:o,defaultProp:i??!1,onChange:s,caller:qa});return w.jsx(lR,{scope:t,triggerId:ec(),triggerRef:u,contentId:ec(),open:d,onOpenChange:c,onOpenToggle:f.useCallback(()=>c(h=>!h),[c]),modal:a,children:w.jsx(Kk,{...l,open:d,onOpenChange:c,dir:r,modal:a,children:n})})};$y.displayName=qa;var zy="DropdownMenuTrigger",Uy=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,i=Fy(zy,n),s=Be(n);return w.jsx(Qk,{asChild:!0,...s,children:w.jsx(he.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:Cr(t,i.triggerRef),onPointerDown:B(e.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(i.onOpenToggle(),i.open||a.preventDefault())}),onKeyDown:B(e.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&i.onOpenToggle(),a.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});Uy.displayName=zy;var uR="DropdownMenuPortal",By=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Be(t);return w.jsx(Gk,{...r,...n})};By.displayName=uR;var Vy="DropdownMenuContent",Wy=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Fy(Vy,n),i=Be(n),s=f.useRef(!1);return w.jsx(Yk,{id:o.contentId,"aria-labelledby":o.triggerId,...i,...r,ref:t,onCloseAutoFocus:B(e.onCloseAutoFocus,a=>{var l;s.current||(l=o.triggerRef.current)==null||l.focus(),s.current=!1,a.preventDefault()}),onInteractOutside:B(e.onInteractOutside,a=>{const l=a.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,d=l.button===2||u;(!o.modal||d)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Wy.displayName=Vy;var cR="DropdownMenuGroup",dR=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Be(n);return w.jsx(Xk,{...o,...r,ref:t})});dR.displayName=cR;var fR="DropdownMenuLabel",Hy=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Be(n);return w.jsx(qk,{...o,...r,ref:t})});Hy.displayName=fR;var pR="DropdownMenuItem",Ky=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Be(n);return w.jsx(Zk,{...o,...r,ref:t})});Ky.displayName=pR;var hR="DropdownMenuCheckboxItem",Qy=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Be(n);return w.jsx(Jk,{...o,...r,ref:t})});Qy.displayName=hR;var mR="DropdownMenuRadioGroup",vR=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Be(n);return w.jsx(eR,{...o,...r,ref:t})});vR.displayName=mR;var gR="DropdownMenuRadioItem",Gy=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Be(n);return w.jsx(tR,{...o,...r,ref:t})});Gy.displayName=gR;var yR="DropdownMenuItemIndicator",Yy=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Be(n);return w.jsx(nR,{...o,...r,ref:t})});Yy.displayName=yR;var wR="DropdownMenuSeparator",Xy=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Be(n);return w.jsx(rR,{...o,...r,ref:t})});Xy.displayName=wR;var xR="DropdownMenuArrow",SR=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Be(n);return w.jsx(oR,{...o,...r,ref:t})});SR.displayName=xR;var ER="DropdownMenuSubTrigger",qy=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Be(n);return w.jsx(iR,{...o,...r,ref:t})});qy.displayName=ER;var CR="DropdownMenuSubContent",Zy=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Be(n);return w.jsx(sR,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Zy.displayName=CR;var bR=$y,PR=Uy,kR=By,Jy=Wy,ew=Hy,tw=Ky,nw=Qy,rw=Gy,ow=Yy,iw=Xy,sw=qy,aw=Zy;/** + * @license lucide-react v0.462.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const RR=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),lw=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/** + * @license lucide-react v0.462.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var TR={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + * @license lucide-react v0.462.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const _R=f.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...a},l)=>f.createElement("svg",{ref:l,...TR,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:lw("lucide",o),...a},[...s.map(([u,d])=>f.createElement(u,d)),...Array.isArray(i)?i:[i]]));/** + * @license lucide-react v0.462.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Za=(e,t)=>{const n=f.forwardRef(({className:r,...o},i)=>f.createElement(_R,{ref:i,iconNode:t,className:lw(`lucide-${RR(e)}`,r),...o}));return n.displayName=`${e}`,n};/** + * @license lucide-react v0.462.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const NR=Za("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** + * @license lucide-react v0.462.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const MR=Za("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** + * @license lucide-react v0.462.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const OR=Za("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** + * @license lucide-react v0.462.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const AR=Za("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),IR=bR,LR=PR,jR=f.forwardRef(({className:e,inset:t,children:n,...r},o)=>w.jsxs(sw,{ref:o,className:Re("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent",t&&"pl-8",e),...r,children:[n,w.jsx(MR,{className:"ml-auto h-4 w-4"})]}));jR.displayName=sw.displayName;const DR=f.forwardRef(({className:e,...t},n)=>w.jsx(aw,{ref:n,className:Re("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));DR.displayName=aw.displayName;const uw=f.forwardRef(({className:e,sideOffset:t=4,...n},r)=>w.jsx(kR,{children:w.jsx(Jy,{ref:r,sideOffset:t,className:Re("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));uw.displayName=Jy.displayName;const ac=f.forwardRef(({className:e,inset:t,...n},r)=>w.jsx(tw,{ref:r,className:Re("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",t&&"pl-8",e),...n}));ac.displayName=tw.displayName;const FR=f.forwardRef(({className:e,children:t,checked:n,...r},o)=>w.jsxs(nw,{ref:o,className:Re("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),checked:n,...r,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(ow,{children:w.jsx(NR,{className:"h-4 w-4"})})}),t]}));FR.displayName=nw.displayName;const $R=f.forwardRef(({className:e,children:t,...n},r)=>w.jsxs(rw,{ref:r,className:Re("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...n,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(ow,{children:w.jsx(OR,{className:"h-2 w-2 fill-current"})})}),t]}));$R.displayName=rw.displayName;const cw=f.forwardRef(({className:e,inset:t,...n},r)=>w.jsx(ew,{ref:r,className:Re("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));cw.displayName=ew.displayName;const lc=f.forwardRef(({className:e,...t},n)=>w.jsx(iw,{ref:n,className:Re("-mx-1 my-1 h-px bg-muted",e),...t}));lc.displayName=iw.displayName;function zR(e){const n=(e.name||e.username||"?").trim().split(/\s+/).filter(Boolean);return n.length===0?"?":n.length===1?n[0][0].toUpperCase():(n[0][0]+n[n.length-1][0]).toUpperCase()}const UR=({user:e,onLogout:t})=>w.jsxs(IR,{children:[w.jsx(LR,{asChild:!0,children:w.jsx("button",{type:"button",className:"user-avatar-btn","aria-label":`Account menu for ${e.username}`,children:w.jsxs(Sg,{className:"h-8 w-8",children:[e.avatar_url&&w.jsx(Eg,{src:e.avatar_url,alt:e.username}),w.jsx(Cg,{className:"text-xs",children:zR(e)})]})})}),w.jsxs(uw,{align:"end",className:"w-56",children:[w.jsxs(cw,{className:"flex flex-col gap-0.5 py-2",children:[w.jsx("span",{className:"text-sm font-medium leading-tight",children:e.name||e.username}),w.jsxs("span",{className:"text-xs font-normal text-muted-foreground",children:["@",e.username]}),e.is_admin&&w.jsx("span",{className:"mt-1 inline-flex w-fit items-center rounded-full bg-amber-100 px-2 py-0.5 text-[10px] font-medium uppercase tracking-wide text-amber-900",children:"Admin"})]}),w.jsx(lc,{}),w.jsx(ac,{asChild:!0,children:w.jsx("a",{href:`https://huggingface.co/${encodeURIComponent(e.username)}`,target:"_blank",rel:"noopener noreferrer",children:"Hugging Face profile"})}),w.jsx(lc,{}),w.jsx(ac,{onSelect:n=>{n.preventDefault(),t()},children:"Log out"})]})]}),dw=N.createContext(null),Yp="pwc:auth-stale";async function BR(){if(Ua())return null;const e=await fetch(hd("/api/v1/auth/me"),{credentials:"include",cache:"no-store"});return e.status===401||!e.ok?null:await e.json()}const VR=({children:e})=>{const[t,n]=N.useState(null),[r,o]=N.useState(!0),i=N.useCallback(async()=>{o(!0);const l=await BR();n(l),o(!1)},[]),s=N.useCallback(async()=>{await fetch(hd("/api/v1/auth/logout"),{method:"POST",credentials:"include"}),n(null)},[]);N.useEffect(()=>{i()},[i]),N.useEffect(()=>{const l=()=>n(null);return window.addEventListener(Yp,l),()=>window.removeEventListener(Yp,l)},[]);const a=N.useMemo(()=>({user:t,isLoading:r,refresh:i,logout:s}),[t,r,i,s]);return w.jsx(dw.Provider,{value:a,children:e})};function WR(){const e=N.useContext(dw);if(!e)throw new Error("useAuth must be used inside an ");return e}const Wo=({name:e,size:t=14})=>{const n={search:w.jsx("path",{d:"M11 11l3 3M7 12.5a5.5 5.5 0 110-11 5.5 5.5 0 010 11z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round"}),bookmark:w.jsx("path",{d:"M4 2h8v12l-4-3-4 3V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),menu:w.jsx("path",{d:"M2 4h12M2 8h12M2 12h12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),close:w.jsx("path",{d:"M3 3l10 10M13 3L3 13",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})};return w.jsx("svg",{className:t===11?"icon-sm":"icon",viewBox:"0 0 16 16",width:t,height:t,children:n[e]})},Xp="https://github.com/huggingface/paperswithcode-feedback/issues",HR=()=>{if(typeof navigator>"u")return!1;const e=navigator.userAgentData,t=(e==null?void 0:e.platform)||navigator.platform||navigator.userAgent||"";return/Mac|iPhone|iPad|iPod/i.test(t)},KR=()=>{const[e,t]=N.useState(!1);return N.useEffect(()=>{t(HR())},[]),w.jsx("kbd",{children:e?"⌘K":"Ctrl K"})},QR=({onOpenSearch:e})=>{const[t,n]=N.useState(!1),r=()=>n(!1),{user:o,logout:i}=WR(),s=dn(),a=`${s.pathname}${s.search}`||"/",l=Ua();return w.jsxs(w.Fragment,{children:[w.jsx("header",{className:"app-header",children:w.jsxs("div",{className:"app-header-inner",children:[w.jsxs(lt,{to:"/",className:"brand",onClick:r,children:[w.jsx("span",{className:"brand-mark"}),w.jsxs("span",{className:"brand-name",children:["Papers ",w.jsx("em",{children:"With Code"})]})]}),w.jsxs("nav",{className:"nav",children:[w.jsx(lt,{to:"/",end:!0,className:({isActive:u})=>`nav-item ${u?"active":""}`,children:"Trending"}),w.jsx(lt,{to:"/tasks",className:({isActive:u})=>`nav-item ${u?"active":""}`,children:"Browse state-of-the-art"}),w.jsx(lt,{to:"/methods",className:({isActive:u})=>`nav-item ${u?"active":""}`,children:"Methods"}),w.jsx(lt,{to:"/submit",className:({isActive:u})=>`nav-item ${u?"active":""}`,children:"Submit"})]}),w.jsx("div",{className:"header-spacer"}),w.jsx("a",{className:"feedback-link header-feedback-link",href:Xp,target:"_blank",rel:"noreferrer",children:"Submit feedback"}),w.jsxs("button",{className:"search-trigger",onClick:e,children:[w.jsx(Wo,{name:"search",size:13}),w.jsx("span",{children:"Search papers, authors, domains…"}),w.jsx(KR,{})]}),w.jsx("button",{className:"icon-btn mobile-search-btn","aria-label":"Search",onClick:e,children:w.jsx(Wo,{name:"search",size:14})}),!l&&w.jsx(lt,{to:"/saved",className:"icon-btn header-bookmark-btn","aria-label":"Saved papers",title:"Saved papers",children:w.jsx(Wo,{name:"bookmark",size:13})}),l?null:o?w.jsx(UR,{user:o,onLogout:i}):w.jsx(cE,{returnTo:a}),w.jsx("button",{className:"icon-btn mobile-menu-btn","aria-label":"Open menu",onClick:()=>n(u=>!u),children:w.jsx(Wo,{name:t?"close":"menu",size:14})})]})}),t&&w.jsx("div",{className:"mobile-nav-drawer",onClick:r,children:w.jsxs("div",{className:"mobile-nav-panel",onClick:u=>u.stopPropagation(),children:[w.jsxs("button",{type:"button",className:"mobile-nav-link mobile-nav-search",onClick:()=>{r(),e()},children:[w.jsx(Wo,{name:"search",size:14}),w.jsx("span",{children:"Search papers, authors, domains…"})]}),w.jsx(lt,{to:"/",end:!0,className:"mobile-nav-link",onClick:r,children:"Trending"}),w.jsx(lt,{to:"/tasks",className:"mobile-nav-link",onClick:r,children:"Browse state-of-the-art"}),w.jsx(lt,{to:"/methods",className:"mobile-nav-link",onClick:r,children:"Methods"}),w.jsx(lt,{to:"/submit",className:"mobile-nav-link",onClick:r,children:"Submit"}),w.jsx("a",{className:"mobile-nav-link",href:Xp,target:"_blank",rel:"noreferrer",onClick:r,children:"Submit feedback"}),!l&&w.jsxs(w.Fragment,{children:[w.jsx(lt,{to:"/saved",className:"mobile-nav-link",onClick:r,children:"Saved papers"}),w.jsx(lt,{to:"/cron-dashboard",className:"mobile-nav-link",onClick:r,children:"CRON dashboard"})]})]})})]})},GR=1,YR=1e6;let Gl=0;function XR(){return Gl=(Gl+1)%Number.MAX_SAFE_INTEGER,Gl.toString()}const Yl=new Map,qp=e=>{if(Yl.has(e))return;const t=setTimeout(()=>{Yl.delete(e),ii({type:"REMOVE_TOAST",toastId:e})},YR);Yl.set(e,t)},qR=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,GR)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?qp(n):e.toasts.forEach(r=>{qp(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},js=[];let Ds={toasts:[]};function ii(e){Ds=qR(Ds,e),js.forEach(t=>{t(Ds)})}function ZR({...e}){const t=XR(),n=o=>ii({type:"UPDATE_TOAST",toast:{...o,id:t}}),r=()=>ii({type:"DISMISS_TOAST",toastId:t});return ii({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}function JR(){const[e,t]=f.useState(Ds);return f.useEffect(()=>(js.push(t),()=>{const n=js.indexOf(t);n>-1&&js.splice(n,1)}),[e]),{...e,toast:ZR,dismiss:n=>ii({type:"DISMISS_TOAST",toastId:n})}}var eT=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"}),tT="VisuallyHidden",Ja=f.forwardRef((e,t)=>w.jsx(he.span,{...e,ref:t,style:{...eT,...e.style}}));Ja.displayName=tT;var nT=Ja,Dd="ToastProvider",[Fd,rT,oT]=xd("Toast"),[fw]=br("Toast",[oT]),[iT,el]=fw(Dd),pw=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:s}=e,[a,l]=f.useState(null),[u,d]=f.useState(0),c=f.useRef(!1),h=f.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Dd}\`. Expected non-empty \`string\`.`),w.jsx(Fd.Provider,{scope:t,children:w.jsx(iT,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:f.useCallback(()=>d(p=>p+1),[]),onToastRemove:f.useCallback(()=>d(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:c,isClosePausedRef:h,children:s})})};pw.displayName=Dd;var hw="ToastViewport",sT=["F8"],uc="toast.viewportPause",cc="toast.viewportResume",mw=f.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=sT,label:o="Notifications ({hotkey})",...i}=e,s=el(hw,n),a=rT(n),l=f.useRef(null),u=f.useRef(null),d=f.useRef(null),c=f.useRef(null),h=ke(t,c,s.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),S=s.toastCount>0;f.useEffect(()=>{const x=v=>{var y;r.length!==0&&r.every(E=>v[E]||v.code===E)&&((y=c.current)==null||y.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[r]),f.useEffect(()=>{const x=l.current,v=c.current;if(S&&x&&v){const m=()=>{if(!s.isClosePausedRef.current){const b=new CustomEvent(uc);v.dispatchEvent(b),s.isClosePausedRef.current=!0}},y=()=>{if(s.isClosePausedRef.current){const b=new CustomEvent(cc);v.dispatchEvent(b),s.isClosePausedRef.current=!1}},E=b=>{!x.contains(b.relatedTarget)&&y()},C=()=>{x.contains(document.activeElement)||y()};return x.addEventListener("focusin",m),x.addEventListener("focusout",E),x.addEventListener("pointermove",m),x.addEventListener("pointerleave",C),window.addEventListener("blur",m),window.addEventListener("focus",y),()=>{x.removeEventListener("focusin",m),x.removeEventListener("focusout",E),x.removeEventListener("pointermove",m),x.removeEventListener("pointerleave",C),window.removeEventListener("blur",m),window.removeEventListener("focus",y)}}},[S,s.isClosePausedRef]);const g=f.useCallback(({tabbingDirection:x})=>{const m=a().map(y=>{const E=y.ref.current,C=[E,...wT(E)];return x==="forwards"?C:C.reverse()});return(x==="forwards"?m.reverse():m).flat()},[a]);return f.useEffect(()=>{const x=c.current;if(x){const v=m=>{var C,b,P;const y=m.altKey||m.ctrlKey||m.metaKey;if(m.key==="Tab"&&!y){const R=document.activeElement,A=m.shiftKey;if(m.target===x&&A){(C=u.current)==null||C.focus();return}const j=g({tabbingDirection:A?"backwards":"forwards"}),H=j.findIndex(L=>L===R);Xl(j.slice(H+1))?m.preventDefault():A?(b=u.current)==null||b.focus():(P=d.current)==null||P.focus()}};return x.addEventListener("keydown",v),()=>x.removeEventListener("keydown",v)}},[a,g]),w.jsxs($C,{ref:l,role:"region","aria-label":o.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:S?void 0:"none"},children:[S&&w.jsx(dc,{ref:u,onFocusFromOutsideViewport:()=>{const x=g({tabbingDirection:"forwards"});Xl(x)}}),w.jsx(Fd.Slot,{scope:n,children:w.jsx(he.ol,{tabIndex:-1,...i,ref:h})}),S&&w.jsx(dc,{ref:d,onFocusFromOutsideViewport:()=>{const x=g({tabbingDirection:"backwards"});Xl(x)}})]})});mw.displayName=hw;var vw="ToastFocusProxy",dc=f.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=el(vw,n);return w.jsx(Ja,{tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:s=>{var u;const a=s.relatedTarget;!((u=i.viewport)!=null&&u.contains(a))&&r()}})});dc.displayName=vw;var Wi="Toast",aT="toast.swipeStart",lT="toast.swipeMove",uT="toast.swipeCancel",cT="toast.swipeEnd",gw=f.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...s}=e,[a,l]=yd({prop:r,defaultProp:o??!0,onChange:i,caller:Wi});return w.jsx(Pr,{present:n||a,children:w.jsx(pT,{open:a,...s,ref:t,onClose:()=>l(!1),onPause:Xe(e.onPause),onResume:Xe(e.onResume),onSwipeStart:B(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:B(e.onSwipeMove,u=>{const{x:d,y:c}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${c}px`)}),onSwipeCancel:B(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:B(e.onSwipeEnd,u=>{const{x:d,y:c}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${c}px`),l(!1)})})})});gw.displayName=Wi;var[dT,fT]=fw(Wi,{onClose(){}}),pT=f.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:s,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:d,onSwipeMove:c,onSwipeCancel:h,onSwipeEnd:p,...S}=e,g=el(Wi,n),[x,v]=f.useState(null),m=ke(t,L=>v(L)),y=f.useRef(null),E=f.useRef(null),C=o||g.duration,b=f.useRef(0),P=f.useRef(C),R=f.useRef(0),{onToastAdd:A,onToastRemove:O}=g,$=Xe(()=>{var Y;(x==null?void 0:x.contains(document.activeElement))&&((Y=g.viewport)==null||Y.focus()),s()}),j=f.useCallback(L=>{!L||L===1/0||(window.clearTimeout(R.current),b.current=new Date().getTime(),R.current=window.setTimeout($,L))},[$]);f.useEffect(()=>{const L=g.viewport;if(L){const Y=()=>{j(P.current),u==null||u()},z=()=>{const W=new Date().getTime()-b.current;P.current=P.current-W,window.clearTimeout(R.current),l==null||l()};return L.addEventListener(uc,z),L.addEventListener(cc,Y),()=>{L.removeEventListener(uc,z),L.removeEventListener(cc,Y)}}},[g.viewport,C,l,u,j]),f.useEffect(()=>{i&&!g.isClosePausedRef.current&&j(C)},[i,C,g.isClosePausedRef,j]),f.useEffect(()=>(A(),()=>O()),[A,O]);const H=f.useMemo(()=>x?bw(x):null,[x]);return g.viewport?w.jsxs(w.Fragment,{children:[H&&w.jsx(hT,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:H}),w.jsx(dT,{scope:n,onClose:$,children:$i.createPortal(w.jsx(Fd.ItemSlot,{scope:n,children:w.jsx(FC,{asChild:!0,onEscapeKeyDown:B(a,()=>{g.isFocusedToastEscapeKeyDownRef.current||$(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:w.jsx(he.li,{tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...S,ref:m,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:B(e.onKeyDown,L=>{L.key==="Escape"&&(a==null||a(L.nativeEvent),L.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,$()))}),onPointerDown:B(e.onPointerDown,L=>{L.button===0&&(y.current={x:L.clientX,y:L.clientY})}),onPointerMove:B(e.onPointerMove,L=>{if(!y.current)return;const Y=L.clientX-y.current.x,z=L.clientY-y.current.y,W=!!E.current,_=["left","right"].includes(g.swipeDirection),k=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,I=_?k(0,Y):0,U=_?0:k(0,z),F=L.pointerType==="touch"?10:2,Q={x:I,y:U},X={originalEvent:L,delta:Q};W?(E.current=Q,ws(lT,c,X,{discrete:!1})):Zp(Q,g.swipeDirection,F)?(E.current=Q,ws(aT,d,X,{discrete:!1}),L.target.setPointerCapture(L.pointerId)):(Math.abs(Y)>F||Math.abs(z)>F)&&(y.current=null)}),onPointerUp:B(e.onPointerUp,L=>{const Y=E.current,z=L.target;if(z.hasPointerCapture(L.pointerId)&&z.releasePointerCapture(L.pointerId),E.current=null,y.current=null,Y){const W=L.currentTarget,_={originalEvent:L,delta:Y};Zp(Y,g.swipeDirection,g.swipeThreshold)?ws(cT,p,_,{discrete:!0}):ws(uT,h,_,{discrete:!0}),W.addEventListener("click",k=>k.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),hT=e=>{const{__scopeToast:t,children:n,...r}=e,o=el(Wi,t),[i,s]=f.useState(!1),[a,l]=f.useState(!1);return gT(()=>s(!0)),f.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:w.jsx(_d,{asChild:!0,children:w.jsx(Ja,{...r,children:i&&w.jsxs(w.Fragment,{children:[o.label," ",n]})})})},mT="ToastTitle",yw=f.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return w.jsx(he.div,{...r,ref:t})});yw.displayName=mT;var vT="ToastDescription",ww=f.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return w.jsx(he.div,{...r,ref:t})});ww.displayName=vT;var xw="ToastAction",Sw=f.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?w.jsx(Cw,{altText:n,asChild:!0,children:w.jsx($d,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${xw}\`. Expected non-empty \`string\`.`),null)});Sw.displayName=xw;var Ew="ToastClose",$d=f.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=fT(Ew,n);return w.jsx(Cw,{asChild:!0,children:w.jsx(he.button,{type:"button",...r,ref:t,onClick:B(e.onClick,o.onClose)})})});$d.displayName=Ew;var Cw=f.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return w.jsx(he.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function bw(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),yT(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const s=r.dataset.radixToastAnnounceAlt;s&&t.push(s)}else t.push(...bw(r))}}),t}function ws(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?wd(o,i):o.dispatchEvent(i)}var Zp=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function gT(e=()=>{}){const t=Xe(e);gt(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function yT(e){return e.nodeType===e.ELEMENT_NODE}function wT(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Xl(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var xT=pw,Pw=mw,kw=gw,Rw=yw,Tw=ww,_w=Sw,Nw=$d;const Jp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,eh=mg,ST=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return eh(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(u=>{const d=n==null?void 0:n[u],c=i==null?void 0:i[u];if(d===null)return null;const h=Jp(d)||Jp(c);return o[u][h]}),a=n&&Object.entries(n).reduce((u,d)=>{let[c,h]=d;return h===void 0||(u[c]=h),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:c,className:h,...p}=d;return Object.entries(p).every(S=>{let[g,x]=S;return Array.isArray(x)?x.includes({...i,...a}[g]):{...i,...a}[g]===x})?[...u,c,h]:u},[]);return eh(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},ET=xT,Mw=f.forwardRef(({className:e,...t},n)=>w.jsx(Pw,{ref:n,className:Re("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Mw.displayName=Pw.displayName;const CT=ST("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Ow=f.forwardRef(({className:e,variant:t,...n},r)=>w.jsx(kw,{ref:r,className:Re(CT({variant:t}),e),...n}));Ow.displayName=kw.displayName;const bT=f.forwardRef(({className:e,...t},n)=>w.jsx(_w,{ref:n,className:Re("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));bT.displayName=_w.displayName;const Aw=f.forwardRef(({className:e,...t},n)=>w.jsx(Nw,{ref:n,className:Re("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:w.jsx(AR,{className:"h-4 w-4"})}));Aw.displayName=Nw.displayName;const Iw=f.forwardRef(({className:e,...t},n)=>w.jsx(Rw,{ref:n,className:Re("text-sm font-semibold",e),...t}));Iw.displayName=Rw.displayName;const Lw=f.forwardRef(({className:e,...t},n)=>w.jsx(Tw,{ref:n,className:Re("text-sm opacity-90",e),...t}));Lw.displayName=Tw.displayName;function PT(){const{toasts:e}=JR();return w.jsxs(ET,{children:[e.map(function({id:t,title:n,description:r,action:o,...i}){return w.jsxs(Ow,{...i,children:[w.jsxs("div",{className:"grid gap-1",children:[n&&w.jsx(Iw,{children:n}),r&&w.jsx(Lw,{children:r})]}),o,w.jsx(Aw,{})]},t)}),w.jsx(Mw,{})]})}var th=["light","dark"],kT="(prefers-color-scheme: dark)",RT=f.createContext(void 0),TT={setTheme:e=>{},themes:[]},_T=()=>{var e;return(e=f.useContext(RT))!=null?e:TT};f.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:o,defaultTheme:i,value:s,attrs:a,nonce:l})=>{let u=i==="system",d=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(S=>`'${S}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,c=o?th.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",h=(S,g=!1,x=!0)=>{let v=s?s[S]:S,m=g?S+"|| ''":`'${v}'`,y="";return o&&x&&!g&&th.includes(S)&&(y+=`d.style.colorScheme = '${S}';`),n==="class"?g||v?y+=`c.add(${m})`:y+="null":v&&(y+=`d[s](n,${m})`),y},p=e?`!function(){${d}${h(e)}}()`:r?`!function(){try{${d}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${kT}',m=window.matchMedia(t);if(m.media!==t||m.matches){${h("dark")}}else{${h("light")}}}else if(e){${s?`var x=${JSON.stringify(s)};`:""}${h(s?"x[e]":"e",!0)}}${u?"":"else{"+h(i,!1,!1)+"}"}${c}}catch(e){}}()`:`!function(){try{${d}var e=localStorage.getItem('${t}');if(e){${s?`var x=${JSON.stringify(s)};`:""}${h(s?"x[e]":"e",!0)}}else{${h(i,!1,!1)};}${c}}catch(t){}}();`;return f.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:p}})});var NT=e=>{switch(e){case"success":return AT;case"info":return LT;case"warning":return IT;case"error":return jT;default:return null}},MT=Array(12).fill(0),OT=({visible:e,className:t})=>N.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},N.createElement("div",{className:"sonner-spinner"},MT.map((n,r)=>N.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),AT=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.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"})),IT=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},N.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"})),LT=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.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"})),jT=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.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"})),DT=N.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"},N.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),N.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),FT=()=>{let[e,t]=N.useState(document.hidden);return N.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},fc=1,$T=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:fc++,i=this.toasts.find(a=>a.id===o),s=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),i?this.toasts=this.toasts.map(a=>a.id===o?(this.publish({...a,...e,id:o,title:n}),{...a,...e,id:o,dismissible:s,title:n}):a):this.addToast({title:n,...r,dismissible:s,id:o}),o},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),o=n!==void 0,i,s=r.then(async l=>{if(i=["resolve",l],N.isValidElement(l))o=!1,this.create({id:n,type:"default",message:l});else if(UT(l)&&!l.ok){o=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:n,type:"error",message:u,description:d})}else if(t.success!==void 0){o=!1;let u=typeof t.success=="function"?await t.success(l):t.success,d=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"success",message:u,description:d})}}).catch(async l=>{if(i=["reject",l],t.error!==void 0){o=!1;let u=typeof t.error=="function"?await t.error(l):t.error,d=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"error",message:u,description:d})}}).finally(()=>{var l;o&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,u)=>s.then(()=>i[0]==="reject"?u(i[1]):l(i[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||fc++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},We=new $T,zT=(e,t)=>{let n=(t==null?void 0:t.id)||fc++;return We.addToast({title:e,...t,id:n}),n},UT=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",BT=zT,VT=()=>We.toasts,WT=()=>We.getActiveToasts();Object.assign(BT,{success:We.success,info:We.info,warning:We.warning,error:We.error,custom:We.custom,message:We.message,promise:We.promise,dismiss:We.dismiss,loading:We.loading},{getHistory:VT,getToasts:WT});function HT(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}HT(`:where(html[dir="ltr"]),:where([data-sonner-toaster][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%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][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%)}:where([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:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([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);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([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 #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([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)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([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;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([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);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-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([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}:where([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}:where([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, 0px)) translate(var(--swipe-amount-x, 0px));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{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{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{0%{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-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--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-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-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-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, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--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-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-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],[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],[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],[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],[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:nth-child(1){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)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{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 xs(e){return e.label!==void 0}var KT=3,QT="32px",GT="16px",nh=4e3,YT=356,XT=14,qT=20,ZT=200;function Et(...e){return e.filter(Boolean).join(" ")}function JT(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var e_=e=>{var t,n,r,o,i,s,a,l,u,d,c;let{invert:h,toast:p,unstyled:S,interacting:g,setHeights:x,visibleToasts:v,heights:m,index:y,toasts:E,expanded:C,removeToast:b,defaultRichColors:P,closeButton:R,style:A,cancelButtonStyle:O,actionButtonStyle:$,className:j="",descriptionClassName:H="",duration:L,position:Y,gap:z,loadingIcon:W,expandByDefault:_,classNames:k,icons:I,closeButtonAriaLabel:U="Close toast",pauseWhenPageIsHidden:F}=e,[Q,X]=N.useState(null),[ue,me]=N.useState(null),[q,Kt]=N.useState(!1),[Ee,At]=N.useState(!1),[pn,Tr]=N.useState(!1),[hn,Hi]=N.useState(!1),[rl,Ki]=N.useState(!1),[ol,Oo]=N.useState(0),[_r,Ud]=N.useState(0),Ao=N.useRef(p.duration||L||nh),Bd=N.useRef(null),Zn=N.useRef(null),Hw=y===0,Kw=y+1<=v,at=p.type,Nr=p.dismissible!==!1,Qw=p.className||"",Gw=p.descriptionClassName||"",Qi=N.useMemo(()=>m.findIndex(K=>K.toastId===p.id)||0,[m,p.id]),Yw=N.useMemo(()=>{var K;return(K=p.closeButton)!=null?K:R},[p.closeButton,R]),Vd=N.useMemo(()=>p.duration||L||nh,[p.duration,L]),il=N.useRef(0),Mr=N.useRef(0),Wd=N.useRef(0),Or=N.useRef(null),[Xw,qw]=Y.split("-"),Hd=N.useMemo(()=>m.reduce((K,ne,ae)=>ae>=Qi?K:K+ne.height,0),[m,Qi]),Kd=FT(),Zw=p.invert||h,sl=at==="loading";Mr.current=N.useMemo(()=>Qi*z+Hd,[Qi,Hd]),N.useEffect(()=>{Ao.current=Vd},[Vd]),N.useEffect(()=>{Kt(!0)},[]),N.useEffect(()=>{let K=Zn.current;if(K){let ne=K.getBoundingClientRect().height;return Ud(ne),x(ae=>[{toastId:p.id,height:ne,position:p.position},...ae]),()=>x(ae=>ae.filter(yt=>yt.toastId!==p.id))}},[x,p.id]),N.useLayoutEffect(()=>{if(!q)return;let K=Zn.current,ne=K.style.height;K.style.height="auto";let ae=K.getBoundingClientRect().height;K.style.height=ne,Ud(ae),x(yt=>yt.find(wt=>wt.toastId===p.id)?yt.map(wt=>wt.toastId===p.id?{...wt,height:ae}:wt):[{toastId:p.id,height:ae,position:p.position},...yt])},[q,p.title,p.description,x,p.id]);let mn=N.useCallback(()=>{At(!0),Oo(Mr.current),x(K=>K.filter(ne=>ne.toastId!==p.id)),setTimeout(()=>{b(p)},ZT)},[p,b,x,Mr]);N.useEffect(()=>{if(p.promise&&at==="loading"||p.duration===1/0||p.type==="loading")return;let K;return C||g||F&&Kd?(()=>{if(Wd.current{var ne;(ne=p.onAutoClose)==null||ne.call(p,p),mn()},Ao.current)),()=>clearTimeout(K)},[C,g,p,at,F,Kd,mn]),N.useEffect(()=>{p.delete&&mn()},[mn,p.delete]);function Jw(){var K,ne,ae;return I!=null&&I.loading?N.createElement("div",{className:Et(k==null?void 0:k.loader,(K=p==null?void 0:p.classNames)==null?void 0:K.loader,"sonner-loader"),"data-visible":at==="loading"},I.loading):W?N.createElement("div",{className:Et(k==null?void 0:k.loader,(ne=p==null?void 0:p.classNames)==null?void 0:ne.loader,"sonner-loader"),"data-visible":at==="loading"},W):N.createElement(OT,{className:Et(k==null?void 0:k.loader,(ae=p==null?void 0:p.classNames)==null?void 0:ae.loader),visible:at==="loading"})}return N.createElement("li",{tabIndex:0,ref:Zn,className:Et(j,Qw,k==null?void 0:k.toast,(t=p==null?void 0:p.classNames)==null?void 0:t.toast,k==null?void 0:k.default,k==null?void 0:k[at],(n=p==null?void 0:p.classNames)==null?void 0:n[at]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:P,"data-styled":!(p.jsx||p.unstyled||S),"data-mounted":q,"data-promise":!!p.promise,"data-swiped":rl,"data-removed":Ee,"data-visible":Kw,"data-y-position":Xw,"data-x-position":qw,"data-index":y,"data-front":Hw,"data-swiping":pn,"data-dismissible":Nr,"data-type":at,"data-invert":Zw,"data-swipe-out":hn,"data-swipe-direction":ue,"data-expanded":!!(C||_&&q),style:{"--index":y,"--toasts-before":y,"--z-index":E.length-y,"--offset":`${Ee?ol:Mr.current}px`,"--initial-height":_?"auto":`${_r}px`,...A,...p.style},onDragEnd:()=>{Tr(!1),X(null),Or.current=null},onPointerDown:K=>{sl||!Nr||(Bd.current=new Date,Oo(Mr.current),K.target.setPointerCapture(K.pointerId),K.target.tagName!=="BUTTON"&&(Tr(!0),Or.current={x:K.clientX,y:K.clientY}))},onPointerUp:()=>{var K,ne,ae,yt;if(hn||!Nr)return;Or.current=null;let wt=Number(((K=Zn.current)==null?void 0:K.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),vn=Number(((ne=Zn.current)==null?void 0:ne.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Jn=new Date().getTime()-((ae=Bd.current)==null?void 0:ae.getTime()),xt=Q==="x"?wt:vn,gn=Math.abs(xt)/Jn;if(Math.abs(xt)>=qT||gn>.11){Oo(Mr.current),(yt=p.onDismiss)==null||yt.call(p,p),me(Q==="x"?wt>0?"right":"left":vn>0?"down":"up"),mn(),Hi(!0),Ki(!1);return}Tr(!1),X(null)},onPointerMove:K=>{var ne,ae,yt,wt;if(!Or.current||!Nr||((ne=window.getSelection())==null?void 0:ne.toString().length)>0)return;let vn=K.clientY-Or.current.y,Jn=K.clientX-Or.current.x,xt=(ae=e.swipeDirections)!=null?ae:JT(Y);!Q&&(Math.abs(Jn)>1||Math.abs(vn)>1)&&X(Math.abs(Jn)>Math.abs(vn)?"x":"y");let gn={x:0,y:0};Q==="y"?(xt.includes("top")||xt.includes("bottom"))&&(xt.includes("top")&&vn<0||xt.includes("bottom")&&vn>0)&&(gn.y=vn):Q==="x"&&(xt.includes("left")||xt.includes("right"))&&(xt.includes("left")&&Jn<0||xt.includes("right")&&Jn>0)&&(gn.x=Jn),(Math.abs(gn.x)>0||Math.abs(gn.y)>0)&&Ki(!0),(yt=Zn.current)==null||yt.style.setProperty("--swipe-amount-x",`${gn.x}px`),(wt=Zn.current)==null||wt.style.setProperty("--swipe-amount-y",`${gn.y}px`)}},Yw&&!p.jsx?N.createElement("button",{"aria-label":U,"data-disabled":sl,"data-close-button":!0,onClick:sl||!Nr?()=>{}:()=>{var K;mn(),(K=p.onDismiss)==null||K.call(p,p)},className:Et(k==null?void 0:k.closeButton,(o=p==null?void 0:p.classNames)==null?void 0:o.closeButton)},(i=I==null?void 0:I.close)!=null?i:DT):null,p.jsx||f.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:N.createElement(N.Fragment,null,at||p.icon||p.promise?N.createElement("div",{"data-icon":"",className:Et(k==null?void 0:k.icon,(s=p==null?void 0:p.classNames)==null?void 0:s.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||Jw():null,p.type!=="loading"?p.icon||(I==null?void 0:I[at])||NT(at):null):null,N.createElement("div",{"data-content":"",className:Et(k==null?void 0:k.content,(a=p==null?void 0:p.classNames)==null?void 0:a.content)},N.createElement("div",{"data-title":"",className:Et(k==null?void 0:k.title,(l=p==null?void 0:p.classNames)==null?void 0:l.title)},typeof p.title=="function"?p.title():p.title),p.description?N.createElement("div",{"data-description":"",className:Et(H,Gw,k==null?void 0:k.description,(u=p==null?void 0:p.classNames)==null?void 0:u.description)},typeof p.description=="function"?p.description():p.description):null),f.isValidElement(p.cancel)?p.cancel:p.cancel&&xs(p.cancel)?N.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||O,onClick:K=>{var ne,ae;xs(p.cancel)&&Nr&&((ae=(ne=p.cancel).onClick)==null||ae.call(ne,K),mn())},className:Et(k==null?void 0:k.cancelButton,(d=p==null?void 0:p.classNames)==null?void 0:d.cancelButton)},p.cancel.label):null,f.isValidElement(p.action)?p.action:p.action&&xs(p.action)?N.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||$,onClick:K=>{var ne,ae;xs(p.action)&&((ae=(ne=p.action).onClick)==null||ae.call(ne,K),!K.defaultPrevented&&mn())},className:Et(k==null?void 0:k.actionButton,(c=p==null?void 0:p.classNames)==null?void 0:c.actionButton)},p.action.label):null))};function rh(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function t_(e,t){let n={};return[e,t].forEach((r,o)=>{let i=o===1,s=i?"--mobile-offset":"--offset",a=i?GT:QT;function l(u){["top","right","bottom","left"].forEach(d=>{n[`${s}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${s}-${u}`]=a:n[`${s}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(a)}),n}var n_=f.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:i,closeButton:s,className:a,offset:l,mobileOffset:u,theme:d="light",richColors:c,duration:h,style:p,visibleToasts:S=KT,toastOptions:g,dir:x=rh(),gap:v=XT,loadingIcon:m,icons:y,containerAriaLabel:E="Notifications",pauseWhenPageIsHidden:C}=e,[b,P]=N.useState([]),R=N.useMemo(()=>Array.from(new Set([r].concat(b.filter(F=>F.position).map(F=>F.position)))),[b,r]),[A,O]=N.useState([]),[$,j]=N.useState(!1),[H,L]=N.useState(!1),[Y,z]=N.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),W=N.useRef(null),_=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),k=N.useRef(null),I=N.useRef(!1),U=N.useCallback(F=>{P(Q=>{var X;return(X=Q.find(ue=>ue.id===F.id))!=null&&X.delete||We.dismiss(F.id),Q.filter(({id:ue})=>ue!==F.id)})},[]);return N.useEffect(()=>We.subscribe(F=>{if(F.dismiss){P(Q=>Q.map(X=>X.id===F.id?{...X,delete:!0}:X));return}setTimeout(()=>{Tv.flushSync(()=>{P(Q=>{let X=Q.findIndex(ue=>ue.id===F.id);return X!==-1?[...Q.slice(0,X),{...Q[X],...F},...Q.slice(X+1)]:[F,...Q]})})})}),[]),N.useEffect(()=>{if(d!=="system"){z(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?z("dark"):z("light")),typeof window>"u")return;let F=window.matchMedia("(prefers-color-scheme: dark)");try{F.addEventListener("change",({matches:Q})=>{z(Q?"dark":"light")})}catch{F.addListener(({matches:X})=>{try{z(X?"dark":"light")}catch(ue){console.error(ue)}})}},[d]),N.useEffect(()=>{b.length<=1&&j(!1)},[b]),N.useEffect(()=>{let F=Q=>{var X,ue;o.every(me=>Q[me]||Q.code===me)&&(j(!0),(X=W.current)==null||X.focus()),Q.code==="Escape"&&(document.activeElement===W.current||(ue=W.current)!=null&&ue.contains(document.activeElement))&&j(!1)};return document.addEventListener("keydown",F),()=>document.removeEventListener("keydown",F)},[o]),N.useEffect(()=>{if(W.current)return()=>{k.current&&(k.current.focus({preventScroll:!0}),k.current=null,I.current=!1)}},[W.current]),N.createElement("section",{ref:t,"aria-label":`${E} ${_}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},R.map((F,Q)=>{var X;let[ue,me]=F.split("-");return b.length?N.createElement("ol",{key:F,dir:x==="auto"?rh():x,tabIndex:-1,ref:W,className:a,"data-sonner-toaster":!0,"data-theme":Y,"data-y-position":ue,"data-lifted":$&&b.length>1&&!i,"data-x-position":me,style:{"--front-toast-height":`${((X=A[0])==null?void 0:X.height)||0}px`,"--width":`${YT}px`,"--gap":`${v}px`,...p,...t_(l,u)},onBlur:q=>{I.current&&!q.currentTarget.contains(q.relatedTarget)&&(I.current=!1,k.current&&(k.current.focus({preventScroll:!0}),k.current=null))},onFocus:q=>{q.target instanceof HTMLElement&&q.target.dataset.dismissible==="false"||I.current||(I.current=!0,k.current=q.relatedTarget)},onMouseEnter:()=>j(!0),onMouseMove:()=>j(!0),onMouseLeave:()=>{H||j(!1)},onDragEnd:()=>j(!1),onPointerDown:q=>{q.target instanceof HTMLElement&&q.target.dataset.dismissible==="false"||L(!0)},onPointerUp:()=>L(!1)},b.filter(q=>!q.position&&Q===0||q.position===F).map((q,Kt)=>{var Ee,At;return N.createElement(e_,{key:q.id,icons:y,index:Kt,toast:q,defaultRichColors:c,duration:(Ee=g==null?void 0:g.duration)!=null?Ee:h,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:n,visibleToasts:S,closeButton:(At=g==null?void 0:g.closeButton)!=null?At:s,interacting:H,position:F,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,removeToast:U,toasts:b.filter(pn=>pn.position==q.position),heights:A.filter(pn=>pn.position==q.position),setHeights:O,expandByDefault:i,gap:v,loadingIcon:m,expanded:$,pauseWhenPageIsHidden:C,swipeDirections:e.swipeDirections})})):null}))});const r_=({...e})=>{const{theme:t="system"}=_T();return w.jsx(n_,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var o_=Symbol("radix.slottable");function i_(e){const t=({children:n})=>w.jsx(w.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=o_,t}var[tl]=br("Tooltip",[Qa]),zd=Qa(),jw="TooltipProvider",s_=700,oh="tooltip.open",[a_,Dw]=tl(jw),Fw=e=>{const{__scopeTooltip:t,delayDuration:n=s_,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,s=f.useRef(!0),a=f.useRef(!1),l=f.useRef(0);return f.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),w.jsx(a_,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:f.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:f.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:f.useCallback(u=>{a.current=u},[]),disableHoverableContent:o,children:i})};Fw.displayName=jw;var $w="Tooltip",[sN,nl]=tl($w),pc="TooltipTrigger",l_=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=nl(pc,n),i=Dw(pc,n),s=zd(n),a=f.useRef(null),l=ke(t,a,o.onTriggerChange),u=f.useRef(!1),d=f.useRef(!1),c=f.useCallback(()=>u.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),w.jsx(qg,{asChild:!0,...s,children:w.jsx(he.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:B(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:B(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:B(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:B(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:B(e.onBlur,o.onClose),onClick:B(e.onClick,o.onClose)})})});l_.displayName=pc;var u_="TooltipPortal",[aN,c_]=tl(u_,{forceMount:void 0}),bo="TooltipContent",zw=f.forwardRef((e,t)=>{const n=c_(bo,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,s=nl(bo,e.__scopeTooltip);return w.jsx(Pr,{present:r||s.open,children:s.disableHoverableContent?w.jsx(Uw,{side:o,...i,ref:t}):w.jsx(d_,{side:o,...i,ref:t})})}),d_=f.forwardRef((e,t)=>{const n=nl(bo,e.__scopeTooltip),r=Dw(bo,e.__scopeTooltip),o=f.useRef(null),i=ke(t,o),[s,a]=f.useState(null),{trigger:l,onClose:u}=n,d=o.current,{onPointerInTransitChange:c}=r,h=f.useCallback(()=>{a(null),c(!1)},[c]),p=f.useCallback((S,g)=>{const x=S.currentTarget,v={x:S.clientX,y:S.clientY},m=v_(v,x.getBoundingClientRect()),y=g_(v,m),E=y_(g.getBoundingClientRect()),C=x_([...y,...E]);a(C),c(!0)},[c]);return f.useEffect(()=>()=>h(),[h]),f.useEffect(()=>{if(l&&d){const S=x=>p(x,d),g=x=>p(x,l);return l.addEventListener("pointerleave",S),d.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",S),d.removeEventListener("pointerleave",g)}}},[l,d,p,h]),f.useEffect(()=>{if(s){const S=g=>{const x=g.target,v={x:g.clientX,y:g.clientY},m=(l==null?void 0:l.contains(x))||(d==null?void 0:d.contains(x)),y=!w_(v,s);m?h():y&&(h(),u())};return document.addEventListener("pointermove",S),()=>document.removeEventListener("pointermove",S)}},[l,d,s,u,h]),w.jsx(Uw,{...e,ref:i})}),[f_,p_]=tl($w,{isInside:!1}),h_=i_("TooltipContent"),Uw=f.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...a}=e,l=nl(bo,n),u=zd(n),{onClose:d}=l;return f.useEffect(()=>(document.addEventListener(oh,d),()=>document.removeEventListener(oh,d)),[d]),f.useEffect(()=>{if(l.trigger){const c=h=>{const p=h.target;p!=null&&p.contains(l.trigger)&&d()};return window.addEventListener("scroll",c,{capture:!0}),()=>window.removeEventListener("scroll",c,{capture:!0})}},[l.trigger,d]),w.jsx(Ba,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:c=>c.preventDefault(),onDismiss:d,children:w.jsxs(Zg,{"data-state":l.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[w.jsx(h_,{children:r}),w.jsx(f_,{scope:n,isInside:!0,children:w.jsx(nT,{id:l.contentId,role:"tooltip",children:o||r})})]})})});zw.displayName=bo;var Bw="TooltipArrow",m_=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=zd(n);return p_(Bw,n).isInside?null:w.jsx(Jg,{...o,...r,ref:t})});m_.displayName=Bw;function v_(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function g_(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function y_(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function w_(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;ir!=h>r&&n<(c-u)*(r-d)/(h-d)+u&&(o=!o)}return o}function x_(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),S_(t)}function S_(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var E_=Fw,Vw=zw;const C_=E_,b_=f.forwardRef(({className:e,sideOffset:t=4,...n},r)=>w.jsx(Vw,{ref:r,sideOffset:t,className:Re("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));b_.displayName=Vw.displayName;function P_(){const{pathname:e,search:t}=dn();f.useEffect(()=>{window.scrollTo(0,0)},[e,t])}const Ww=lE(),k_=Ww?kS:PS;if(!Ww&&typeof window<"u"){const e=window.location.hash;e.startsWith("#/")&&!e.startsWith("#//")&&window.history.replaceState(null,"",e.slice(1))}const R_=N.lazy(()=>st(()=>import("./FeedView-VglAKTTo.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]))),T_=N.lazy(()=>st(()=>import("./PapersListView-CIlHl_0S.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,8,9,15,11,10,12,13]))),__=N.lazy(()=>st(()=>import("./PaperDetailView-De0mLZCp.js"),__vite__mapDeps([16,8,1,2,3,4,5,6,7,9,12,13,17,18,19]))),N_=N.lazy(()=>st(()=>import("./TagsIndexView-1TeE1k6L.js"),__vite__mapDeps([20,8,5,6,4,12,13]))),M_=N.lazy(()=>st(()=>import("./TagBrowseView-wiX11K6Q.js"),__vite__mapDeps([21,8,1,2,3,4,5,6,7,9,10,12,13]))),O_=N.lazy(()=>st(()=>import("./MethodsIndexView-CF_jCe6d.js"),__vite__mapDeps([22,8,5,6,12,13]))),A_=N.lazy(()=>st(()=>import("./MethodDetailView-BXXICNAd.js"),__vite__mapDeps([23,8,9,1,2,3,4,5,6,10,12,13]))),I_=N.lazy(()=>st(()=>import("./BenchmarkDetailView-BFX5j8r9.js"),__vite__mapDeps([24,8,5,6,12,13,2,3,1,4]))),L_=N.lazy(()=>st(()=>import("./SavedPapersView-Vf8zOvxz.js"),__vite__mapDeps([25,8,1,2,3,4,5,6,12,13]))),j_=N.lazy(()=>st(()=>import("./SubmitView-BTOuC0rd.js"),__vite__mapDeps([26,18,13,17,5,6]))),D_=N.lazy(()=>st(()=>import("./CronDashboard-BJLOLf49.js"),__vite__mapDeps([27,8,19,17,6]))),F_=N.lazy(()=>st(()=>import("./NotFound-CMGYqDmr.js"),[])),$_=N.lazy(()=>st(()=>import("./SearchOverlay-CGeqDGTE.js"),__vite__mapDeps([28,8,2,3,5,6,15,4]))),z_=()=>w.jsxs("div",{className:"page","aria-busy":"true","aria-live":"polite",children:[w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:24,width:"30%",marginBottom:24}}),w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:64,width:"60%",marginBottom:32}}),w.jsxs("div",{className:"paper-list",style:{display:"grid",gap:16},children:[w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}}),w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}}),w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}})]})]}),U_=new sE({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}}),B_=()=>{const{arxivId:e}=nS();return w.jsx(Uv,{to:e?`/paper/${e}`:"/papers",replace:!0})},ih=({element:e})=>Ua()?w.jsx(Uv,{to:"/",replace:!0}):w.jsx(w.Fragment,{children:e}),V_=()=>{const[e,t]=N.useState(!1);return P_(),N.useEffect(()=>{const n=r=>{(r.metaKey||r.ctrlKey)&&r.key==="k"&&(r.preventDefault(),t(!0))};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[]),w.jsxs(w.Fragment,{children:[w.jsx(QR,{onOpenSearch:()=>t(!0)}),w.jsx("main",{children:w.jsx(N.Suspense,{fallback:w.jsx(z_,{}),children:w.jsxs(vS,{children:[w.jsx(Ve,{path:"/",element:w.jsx(R_,{})}),w.jsx(Ve,{path:"/papers",element:w.jsx(T_,{})}),w.jsx(Ve,{path:"/papers/:arxivId",element:w.jsx(B_,{})}),w.jsx(Ve,{path:"/paper/:arxivId",element:w.jsx(__,{})}),w.jsx(Ve,{path:"/tasks",element:w.jsx(N_,{})}),w.jsx(Ve,{path:"/tasks/:taskSlug",element:w.jsx(M_,{})}),w.jsx(Ve,{path:"/methods",element:w.jsx(O_,{})}),w.jsx(Ve,{path:"/methods/:methodSlug",element:w.jsx(A_,{})}),w.jsx(Ve,{path:"/benchmark/:datasetSlug",element:w.jsx(I_,{})}),w.jsx(Ve,{path:"/submit",element:w.jsx(j_,{})}),w.jsx(Ve,{path:"/saved",element:w.jsx(ih,{element:w.jsx(L_,{})})}),w.jsx(Ve,{path:"/cron-dashboard",element:w.jsx(ih,{element:w.jsx(D_,{})})}),w.jsx(Ve,{path:"*",element:w.jsx(F_,{})})]})})}),e&&w.jsx(N.Suspense,{fallback:null,children:w.jsx($_,{open:e,onClose:()=>t(!1)})})]})},W_=()=>w.jsx(aE,{client:U_,children:w.jsx(VR,{children:w.jsxs(C_,{children:[w.jsx(k_,{children:w.jsx(V_,{})}),w.jsx(PT,{}),w.jsx(r_,{}),!1]})})}),H_=_v(document.getElementById("root"));H_.render(w.jsx(N.StrictMode,{children:w.jsx(W_,{})}));export{nN as $,LR as A,uw as B,NR as C,Ba as D,ac as E,Tg as F,lc as G,rN as H,Fe as I,Y_ as J,Hv as K,_S as L,bt as M,X_ as N,Q_ as O,Pr as P,mh as Q,hy as R,za as S,J_ as T,Z_ as U,cE as V,ki as W,AR as X,rE as Y,q_ as Z,ST as _,he as a,dn as a0,tN as a1,eg as a2,GS as a3,US as a4,Gu as a5,Qv as a6,$S as a7,zS as a8,Qu as a9,Wv as aa,tE as ab,WS as ac,yd as b,Za as c,ke as d,B as e,nP as f,br as g,Re as h,Cr as i,w as j,ec as k,_d as l,LP as m,zC as n,oN as o,eN as p,JR as q,f as r,WR as s,N as t,G_ as u,Ua as v,hd as w,nS as x,dd as y,IR as z};