@dhzh/foundry 7.3.1 → 7.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -2
- package/dist/index.mjs +7 -7
- package/dist/skills/foundry/SKILL.md +8 -3
- package/dist/skills/foundry/references/skills.md +62 -0
- package/dist/web/assets/index-BB11hmXJ.css +1 -0
- package/dist/web/assets/index-BmnFtxk4.js +155 -0
- package/dist/web/assets/{markdown-editor-DON6nMR6.js → markdown-editor-BOmYrZEd.js} +1 -1
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/web/assets/index-DLR57seW.css +0 -1
- package/dist/web/assets/index-DaAdlBRL.js +0 -146
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/markdown-editor-DON6nMR6.js","assets/markdown-editor-DMeNDIaI.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
function FN(e,n){for(var a=0;a<n.length;a++){const o=n[a];if(typeof o!="string"&&!Array.isArray(o)){for(const s in o)if(s!=="default"&&!(s in e)){const u=Object.getOwnPropertyDescriptor(o,s);u&&Object.defineProperty(e,s,u.get?u:{enumerable:!0,get:()=>o[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))o(s);new MutationObserver(s=>{for(const u of s)if(u.type==="childList")for(const c of u.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&o(c)}).observe(document,{childList:!0,subtree:!0});function a(s){const u={};return s.integrity&&(u.integrity=s.integrity),s.referrerPolicy&&(u.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?u.credentials="include":s.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function o(s){if(s.ep)return;s.ep=!0;const u=a(s);fetch(s.href,u)}})();function BR(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var c0={exports:{}},Bu={};var iS;function BN(){if(iS)return Bu;iS=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function a(o,s,u){var c=null;if(u!==void 0&&(c=""+u),s.key!==void 0&&(c=""+s.key),"key"in s){u={};for(var d in s)d!=="key"&&(u[d]=s[d])}else u=s;return s=u.ref,{$$typeof:e,type:o,key:c,ref:s!==void 0?s:null,props:u}}return Bu.Fragment=n,Bu.jsx=a,Bu.jsxs=a,Bu}var sS;function VN(){return sS||(sS=1,c0.exports=BN()),c0.exports}var x=VN(),d0={exports:{}},Tt={};var lS;function qN(){if(lS)return Tt;lS=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),b=Symbol.for("react.view_transition"),S=Symbol.iterator;function w(j){return j===null||typeof j!="object"?null:(j=S&&j[S]||j["@@iterator"],typeof j=="function"?j:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R=Object.assign,T={};function O(j,B,W){this.props=j,this.context=B,this.refs=T,this.updater=W||C}O.prototype.isReactComponent={},O.prototype.setState=function(j,B){if(typeof j!="object"&&typeof j!="function"&&j!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,j,B,"setState")},O.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function M(){}M.prototype=O.prototype;function A(j,B,W){this.props=j,this.context=B,this.refs=T,this.updater=W||C}var N=A.prototype=new M;N.constructor=A,R(N,O.prototype),N.isPureReactComponent=!0;var P=Array.isArray;function I(){}var D={H:null,A:null,T:null,S:null},z=Object.prototype.hasOwnProperty;function F(j,B,W){var re=W.ref;return{$$typeof:e,type:j,key:B,ref:re!==void 0?re:null,props:W}}function G(j,B){return F(j.type,B,j.props)}function J(j){return typeof j=="object"&&j!==null&&j.$$typeof===e}function Y(j){var B={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(W){return B[W]})}var U=/\/+/g;function H(j,B){return typeof j=="object"&&j!==null&&j.key!=null?Y(""+j.key):B.toString(36)}function L(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(I,I):(j.status="pending",j.then(function(B){j.status==="pending"&&(j.status="fulfilled",j.value=B)},function(B){j.status==="pending"&&(j.status="rejected",j.reason=B)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function $(j,B,W,re,Re){var le=typeof j;(le==="undefined"||le==="boolean")&&(j=null);var me=!1;if(j===null)me=!0;else switch(le){case"bigint":case"string":case"number":me=!0;break;case"object":switch(j.$$typeof){case e:case n:me=!0;break;case y:return me=j._init,$(me(j._payload),B,W,re,Re)}}if(me)return Re=Re(j),me=re===""?"."+H(j,0):re,P(Re)?(W="",me!=null&&(W=me.replace(U,"$&/")+"/"),$(Re,B,W,"",function(Te){return Te})):Re!=null&&(J(Re)&&(Re=G(Re,W+(Re.key==null||j&&j.key===Re.key?"":(""+Re.key).replace(U,"$&/")+"/")+me)),B.push(Re)),1;me=0;var ge=re===""?".":re+":";if(P(j))for(var ce=0;ce<j.length;ce++)re=j[ce],le=ge+H(re,ce),me+=$(re,B,W,le,Re);else if(ce=w(j),typeof ce=="function")for(j=ce.call(j),ce=0;!(re=j.next()).done;)re=re.value,le=ge+H(re,ce++),me+=$(re,B,W,le,Re);else if(le==="object"){if(typeof j.then=="function")return $(L(j),B,W,re,Re);throw B=String(j),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return me}function K(j,B,W){if(j==null)return j;var re=[],Re=0;return $(j,re,"","",function(le){return B.call(W,le,Re++)}),re}function V(j){if(j._status===-1){var B=j._result,W=B();W.then(function(re){(j._status===0||j._status===-1)&&(j._status=1,j._result=re,W.status===void 0&&(W.status="fulfilled",W.value=re))},function(re){(j._status===0||j._status===-1)&&(j._status=2,j._result=re,W.status===void 0&&(W.status="rejected",W.reason=re))}),j._status===-1&&(j._status=0,j._result=W)}if(j._status===1)return j._result.default;throw j._result}var X=typeof reportError=="function"?reportError:function(j){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof j=="object"&&j!==null&&typeof j.message=="string"?String(j.message):String(j),error:j});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",j);return}console.error(j)};function ee(j){var B=D.T,W={};W.types=B!==null?B.types:null,D.T=W;try{var re=j(),Re=D.S;Re!==null&&Re(W,re),typeof re=="object"&&re!==null&&typeof re.then=="function"&&re.then(I,X)}catch(le){X(le)}finally{B!==null&&W.types!==null&&(B.types=W.types),D.T=B}}function q(j){var B=D.T;if(B!==null){var W=B.types;W===null?B.types=[j]:W.indexOf(j)===-1&&W.push(j)}else ee(q.bind(null,j))}var se={map:K,forEach:function(j,B,W){K(j,function(){B.apply(this,arguments)},W)},count:function(j){var B=0;return K(j,function(){B++}),B},toArray:function(j){return K(j,function(B){return B})||[]},only:function(j){if(!J(j))throw Error("React.Children.only expected to receive a single React element child.");return j}};return Tt.Activity=h,Tt.Children=se,Tt.Component=O,Tt.Fragment=a,Tt.Profiler=s,Tt.PureComponent=A,Tt.StrictMode=o,Tt.Suspense=p,Tt.ViewTransition=b,Tt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,Tt.__COMPILER_RUNTIME={__proto__:null,c:function(j){return D.H.useMemoCache(j)}},Tt.addTransitionType=q,Tt.cache=function(j){return function(){return j.apply(null,arguments)}},Tt.cacheSignal=function(){return null},Tt.cloneElement=function(j,B,W){if(j==null)throw Error("The argument must be a React element, but you passed "+j+".");var re=R({},j.props),Re=j.key;if(B!=null)for(le in B.key!==void 0&&(Re=""+B.key),B)!z.call(B,le)||le==="key"||le==="__self"||le==="__source"||le==="ref"&&B.ref===void 0||(re[le]=B[le]);var le=arguments.length-2;if(le===1)re.children=W;else if(1<le){for(var me=Array(le),ge=0;ge<le;ge++)me[ge]=arguments[ge+2];re.children=me}return F(j.type,Re,re)},Tt.createContext=function(j){return j={$$typeof:c,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null},j.Provider=j,j.Consumer={$$typeof:u,_context:j},j},Tt.createElement=function(j,B,W){var re,Re={},le=null;if(B!=null)for(re in B.key!==void 0&&(le=""+B.key),B)z.call(B,re)&&re!=="key"&&re!=="__self"&&re!=="__source"&&(Re[re]=B[re]);var me=arguments.length-2;if(me===1)Re.children=W;else if(1<me){for(var ge=Array(me),ce=0;ce<me;ce++)ge[ce]=arguments[ce+2];Re.children=ge}if(j&&j.defaultProps)for(re in me=j.defaultProps,me)Re[re]===void 0&&(Re[re]=me[re]);return F(j,le,Re)},Tt.createRef=function(){return{current:null}},Tt.forwardRef=function(j){return{$$typeof:d,render:j}},Tt.isValidElement=J,Tt.lazy=function(j){return{$$typeof:y,_payload:{_status:-1,_result:j},_init:V}},Tt.memo=function(j,B){return{$$typeof:g,type:j,compare:B===void 0?null:B}},Tt.startTransition=ee,Tt.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},Tt.use=function(j){return D.H.use(j)},Tt.useActionState=function(j,B,W){return D.H.useActionState(j,B,W)},Tt.useCallback=function(j,B){return D.H.useCallback(j,B)},Tt.useContext=function(j){return D.H.useContext(j)},Tt.useDebugValue=function(){},Tt.useDeferredValue=function(j,B){return D.H.useDeferredValue(j,B)},Tt.useEffect=function(j,B){return D.H.useEffect(j,B)},Tt.useEffectEvent=function(j){return D.H.useEffectEvent(j)},Tt.useId=function(){return D.H.useId()},Tt.useImperativeHandle=function(j,B,W){return D.H.useImperativeHandle(j,B,W)},Tt.useInsertionEffect=function(j,B){return D.H.useInsertionEffect(j,B)},Tt.useLayoutEffect=function(j,B){return D.H.useLayoutEffect(j,B)},Tt.useMemo=function(j,B){return D.H.useMemo(j,B)},Tt.useOptimistic=function(j,B){return D.H.useOptimistic(j,B)},Tt.useReducer=function(j,B,W){return D.H.useReducer(j,B,W)},Tt.useRef=function(j){return D.H.useRef(j)},Tt.useState=function(j){return D.H.useState(j)},Tt.useSyncExternalStore=function(j,B,W){return D.H.useSyncExternalStore(j,B,W)},Tt.useTransition=function(){return D.H.useTransition()},Tt.version="19.3.1",Tt}var uS;function Ec(){return uS||(uS=1,d0.exports=qN()),d0.exports}var v=Ec();const Ne=BR(v),VR=FN({__proto__:null,default:Ne},[v]);var f0={exports:{}},Vu={},h0={exports:{}},p0={};var cS;function YN(){return cS||(cS=1,(function(e){function n(L,$){var K=L.length;L.push($);e:for(;0<K;){var V=K-1>>>1,X=L[V];if(0<s(X,$))L[V]=$,L[K]=X,K=V;else break e}}function a(L){return L.length===0?null:L[0]}function o(L){if(L.length===0)return null;var $=L[0],K=L.pop();if(K!==$){L[0]=K;e:for(var V=0,X=L.length,ee=X>>>1;V<ee;){var q=2*(V+1)-1,se=L[q],j=q+1,B=L[j];if(0>s(se,K))j<X&&0>s(B,se)?(L[V]=B,L[j]=K,V=j):(L[V]=se,L[q]=K,V=q);else if(j<X&&0>s(B,K))L[V]=B,L[j]=K,V=j;else break e}}return $}function s(L,$){var K=L.sortIndex-$.sortIndex;return K!==0?K:L.id-$.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var c=Date,d=c.now();e.unstable_now=function(){return c.now()-d}}var p=[],g=[],y=1,h=null,b=3,S=!1,w=!1,C=!1,R=!1,T=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;function A(L){for(var $=a(g);$!==null;){if($.callback===null)o(g);else if($.startTime<=L)o(g),$.sortIndex=$.expirationTime,n(p,$);else break;$=a(g)}}function N(L){if(C=!1,A(L),!w)if(a(p)!==null)w=!0,P||(P=!0,J());else{var $=a(g);$!==null&&H(N,$.startTime-L)}}var P=!1,I=-1,D=5,z=-1;function F(){return R?!0:!(e.unstable_now()-z<D)}function G(){if(R=!1,P){var L=e.unstable_now();z=L;var $=!0;try{e:{w=!1,C&&(C=!1,O(I),I=-1),S=!0;var K=b;try{t:{for(A(L),h=a(p);h!==null&&!(h.expirationTime>L&&F());){var V=h.callback;if(typeof V=="function"){h.callback=null,b=h.priorityLevel;var X=V(h.expirationTime<=L);if(L=e.unstable_now(),typeof X=="function"){h.callback=X,A(L),$=!0;break t}h===a(p)&&o(p),A(L)}else o(p);h=a(p)}if(h!==null)$=!0;else{var ee=a(g);ee!==null&&H(N,ee.startTime-L),$=!1}}break e}finally{h=null,b=K,S=!1}$=void 0}}finally{$?J():P=!1}}}var J;if(typeof M=="function")J=function(){M(G)};else if(typeof MessageChannel<"u"){var Y=new MessageChannel,U=Y.port2;Y.port1.onmessage=G,J=function(){U.postMessage(null)}}else J=function(){T(G,0)};function H(L,$){I=T(function(){L(e.unstable_now())},$)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(L){L.callback=null},e.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<L?Math.floor(1e3/L):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(L){switch(b){case 1:case 2:case 3:var $=3;break;default:$=b}var K=b;b=$;try{return L()}finally{b=K}},e.unstable_requestPaint=function(){R=!0},e.unstable_runWithPriority=function(L,$){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var K=b;b=L;try{return $()}finally{b=K}},e.unstable_scheduleCallback=function(L,$,K){var V=e.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?V+K:V):K=V,L){case 1:var X=-1;break;case 2:X=250;break;case 5:X=1073741823;break;case 4:X=1e4;break;default:X=5e3}return X=K+X,L={id:y++,callback:$,priorityLevel:L,startTime:K,expirationTime:X,sortIndex:-1},K>V?(L.sortIndex=K,n(g,L),a(p)===null&&L===a(g)&&(C?(O(I),I=-1):C=!0,H(N,K-V))):(L.sortIndex=X,n(p,L),w||S||(w=!0,P||(P=!0,J()))),L},e.unstable_shouldYield=F,e.unstable_wrapCallback=function(L){var $=b;return function(){var K=b;b=$;try{return L.apply(this,arguments)}finally{b=K}}}})(p0)),p0}var dS;function KN(){return dS||(dS=1,h0.exports=YN()),h0.exports}var g0={exports:{}},xr={};var fS;function GN(){if(fS)return xr;fS=1;var e=Ec();function n(y){var h="https://react.dev/errors/"+y;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)h+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+y+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var o={d:{f:a,r:function(){throw Error(n(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},s=Symbol.for("react.portal"),u=Symbol.for("react.recoverable"),c=Symbol.for("react.optimistic_key");function d(y,h,b){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:S==null?null:S===c?c:""+S,children:y,containerInfo:h,implementation:b}}var p=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function g(y,h){if(y==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return xr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,xr.browser=function(y){return{$$typeof:u,_reason:y}},xr.createPortal=function(y,h){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(n(299));return d(y,h,null,b)},xr.flushSync=function(y){var h=p.T,b=o.p;try{if(p.T=null,o.p=2,y)return y()}finally{p.T=h,o.p=b,o.d.f()}},xr.preconnect=function(y,h){typeof y=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,o.d.C(y,h))},xr.prefetchDNS=function(y){typeof y=="string"&&o.d.D(y)},xr.preinit=function(y,h){if(typeof y=="string"&&h&&typeof h.as=="string"){var b=h.as,S=g(b,h.crossOrigin),w=typeof h.integrity=="string"?h.integrity:void 0,C=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;b==="style"?o.d.S(y,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:S,integrity:w,fetchPriority:C}):b==="script"&&o.d.X(y,{crossOrigin:S,integrity:w,fetchPriority:C,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},xr.preinitModule=function(y,h){if(typeof y=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var b=g(h.as,h.crossOrigin);o.d.M(y,{crossOrigin:b,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0})}}else h==null&&o.d.M(y)},xr.preload=function(y,h){if(typeof y=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var b=h.as,S=g(b,h.crossOrigin);o.d.L(y,b,{crossOrigin:S,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},xr.preloadModule=function(y,h){if(typeof y=="string")if(h){var b=g(h.as,h.crossOrigin);o.d.m(y,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:b,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0})}else o.d.m(y)},xr.requestFormReset=function(y){o.d.r(y)},xr.unstable_batchedUpdates=function(y,h){return y(h)},xr.useFormState=function(y,h,b){return p.H.useFormState(y,h,b)},xr.useFormStatus=function(){return p.H.useHostTransitionStatus()},xr.version="19.3.1",xr}var hS;function qR(){if(hS)return g0.exports;hS=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),g0.exports=GN(),g0.exports}var pS;function $N(){if(pS)return Vu;pS=1;var e=KN(),n=Ec(),a=qR();function o(t){var r="https://react.dev/errors/"+t;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)r+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+t+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function u(t){for(var r=t,i=r;i&&!i.alternate;)r=i,(r.flags&4098)!==0&&(t=r.return),i=r.return;for(;r.return;)r=r.return;return r.tag===3?t:null}function c(t){if(t.tag===13){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function d(t){if(t.tag===31){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function p(t){if(u(t)!==t)throw Error(o(188))}function g(t){var r=t.alternate;if(!r){if(r=u(t),r===null)throw Error(o(188));return r!==t?null:t}for(var i=t,l=r;;){var f=i.return;if(f===null)break;var m=f.alternate;if(m===null){if(l=f.return,l!==null){i=l;continue}break}if(f.child===m.child){for(m=f.child;m;){if(m===i)return p(f),t;if(m===l)return p(f),r;m=m.sibling}throw Error(o(188))}if(i.return!==l.return)i=f,l=m;else{for(var E=!1,k=f.child;k;){if(k===i){E=!0,i=f,l=m;break}if(k===l){E=!0,l=f,i=m;break}k=k.sibling}if(!E){for(k=m.child;k;){if(k===i){E=!0,i=m,l=f;break}if(k===l){E=!0,l=m,i=f;break}k=k.sibling}if(!E)throw Error(o(189))}}if(i.alternate!==l)throw Error(o(190))}if(i.tag!==3)throw Error(o(188));return i.stateNode.current===i?t:r}function y(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t;for(t=t.child;t!==null;){if(r=y(t),r!==null)return r;t=t.sibling}return null}function h(t,r,i,l,f,m){for(;t!==null;){if((t.tag===5||t.tag===27||t.tag===6)&&i(t,l,f,m)||(t.tag!==22||t.memoizedState===null)&&(r||t.tag!==5&&t.tag!==27)&&h(t.child,r,i,l,f,m))return!0;t=t.sibling}return!1}function b(t){for(t=t.return;t!==null;){if(t.tag===3||t.tag===5||t.tag===27)return t;t=t.return}return null}function S(t){var r=!1;for(t=t.return;t!==null&&(t.tag===4&&(r=!0),!(t.tag===3||t.tag===5||t.tag===27));)t=t.return;return r}function w(t){var r=[null,null],i=b(t);return i===null||C(r,t,i.child,{foundSelf:!1}),r}function C(t,r,i,l){for(;i!==null;){if(i===r)l.foundSelf=!0;else if(i.tag===5||i.tag===27||i.tag===6){if(l.foundSelf)return t[1]=i,!0;t[0]=i}else if((i.tag!==22||i.memoizedState===null)&&C(t,r,i.child,l))return!0;i=i.sibling}return!1}function R(t){switch(t.tag){case 5:case 27:case 6:return t.stateNode;case 3:return t.stateNode.containerInfo;default:throw Error(o(559))}}var T=null,O=null;function M(t,r,i){return t===i?!0:t===r?(T=t,!0):!1}function A(t,r,i){return t===i?(O=t,!1):t===r?(O!==null&&(T=t),!0):!1}function N(t){if(t===null)return null;do t=t===null?null:t.return;while(t&&t.tag!==5&&t.tag!==27&&t.tag!==3);return t||null}function P(t,r,i){for(var l=0,f=t;f;f=i(f))l++;f=0;for(var m=r;m;m=i(m))f++;for(;0<l-f;)t=i(t),l--;for(;0<f-l;)r=i(r),f--;for(;l--;){if(t===r||r!==null&&t===r.alternate)return t;t=i(t),r=i(r)}return null}var I=Object.assign,D=Symbol.for("react.element"),z=Symbol.for("react.transitional.element"),F=Symbol.for("react.portal"),G=Symbol.for("react.fragment"),J=Symbol.for("react.strict_mode"),Y=Symbol.for("react.profiler"),U=Symbol.for("react.consumer"),H=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),X=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),q=Symbol.for("react.legacy_hidden"),se=Symbol.for("react.memo_cache_sentinel"),j=Symbol.for("react.view_transition"),B=Symbol.for("react.recoverable"),W=Symbol.iterator;function re(t){return t===null||typeof t!="object"?null:(t=W&&t[W]||t["@@iterator"],typeof t=="function"?t:null)}var Re=Symbol.for("react.client.reference");function le(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===Re?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case G:return"Fragment";case Y:return"Profiler";case J:return"StrictMode";case $:return"Suspense";case K:return"SuspenseList";case ee:return"Activity";case j:return"ViewTransition"}if(typeof t=="object")switch(t.$$typeof){case F:return"Portal";case H:return t.displayName||"Context";case U:return(t._context.displayName||"Context")+".Consumer";case L:var r=t.render;return t=t.displayName,t||(t=r.displayName||r.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case V:return r=t.displayName||null,r!==null?r:le(t.type)||"Memo";case X:r=t._payload,t=t._init;try{return le(t(r))}catch{}}return null}var me=Array.isArray,ge=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Te={pending:!1,data:null,method:null,action:null},ve=[],Pe=-1;function Me(t){return{current:t}}function Le(t){0>Pe||(t.current=ve[Pe],ve[Pe]=null,Pe--)}function Fe(t,r){Pe++,ve[Pe]=t.current,t.current=r}var Oe=Me(null),He=Me(null),be=Me(null),Ue=Me(null);function Ze(t,r){switch(Fe(be,r),Fe(He,t),Fe(Oe,null),r.nodeType){case 9:case 11:t=(t=r.documentElement)&&(t=t.namespaceURI)?g1(t):0;break;default:if(t=r.tagName,r=r.namespaceURI)r=g1(r),t=m1(r,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Le(Oe),Fe(Oe,t)}function it(){Le(Oe),Le(He),Le(be)}function de(t){var r=t.memoizedState;r!==null&&(cl._currentValue=r.memoizedState,Fe(Ue,t)),r=Oe.current;var i=m1(r,t.type);r!==i&&(Fe(He,t),Fe(Oe,i))}function we(t){He.current===t&&(Le(Oe),Le(He)),Ue.current===t&&(Le(Ue),cl._currentValue=Te)}var Ke,De;function je(t){if(Ke===void 0)try{throw Error()}catch(i){var r=i.stack.trim().match(/\n( *(at )?)/);Ke=r&&r[1]||"",De=-1<i.stack.indexOf(`
|
|
3
|
-
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
|
-
`+Ke+t+De}var yt=!1;function ut(t,r){if(!t||yt)return"";yt=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(r){var Ce=function(){throw Error()};if(Object.defineProperty(Ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ce,[])}catch(Ye){var ae=Ye}Reflect.construct(t,[],Ce)}else{try{Ce.call()}catch(Ye){ae=Ye}Ce=!1;try{var fe=Object.getOwnPropertyDescriptor(t.prototype,"props");Object.defineProperty(t.prototype,"props",{configurable:!0,set:function(){throw Error()}}),Ce=!0,new t}finally{Ce&&(fe!==void 0?Object.defineProperty(t.prototype,"props",fe):delete t.prototype.props)}}}else{try{throw Error()}catch(Ye){ae=Ye}(Ce=t())&&typeof Ce.catch=="function"&&Ce.catch(function(){})}}catch(Ye){if(Ye&&ae&&typeof Ye.stack=="string")return[Ye.stack,ae.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=l.DetermineComponentFrameRoot(),E=m[0],k=m[1];if(E&&k){var Q=E.split(`
|
|
5
|
-
`),ie=k.split(`
|
|
6
|
-
`);for(f=l=0;l<Q.length&&!Q[l].includes("DetermineComponentFrameRoot");)l++;for(;f<ie.length&&!ie[f].includes("DetermineComponentFrameRoot");)f++;if(l===Q.length||f===ie.length)for(l=Q.length-1,f=ie.length-1;1<=l&&0<=f&&Q[l]!==ie[f];)f--;for(;1<=l&&0<=f;l--,f--)if(Q[l]!==ie[f]){if(l!==1||f!==1)do if(l--,f--,0>f||Q[l]!==ie[f]){var pe=`
|
|
7
|
-
`+Q[l].replace(" at new "," at ");return t.displayName&&pe.includes("<anonymous>")&&(pe=pe.replace("<anonymous>",t.displayName)),pe}while(1<=l&&0<=f);break}}}finally{yt=!1,Error.prepareStackTrace=i}return(i=t?t.displayName||t.name:"")?je(i):""}function ht(t,r){switch(t.tag){case 26:case 27:case 5:return je(t.type);case 16:return je("Lazy");case 13:return t.child!==r&&r!==null?je("Suspense Fallback"):je("Suspense");case 19:return je("SuspenseList");case 0:case 15:return ut(t.type,!1);case 11:return ut(t.type.render,!1);case 1:return ut(t.type,!0);case 31:return je("Activity");case 30:return je("ViewTransition");default:return""}}function Ot(t){try{var r="",i=null;do r+=ht(t,i),i=t,t=t.return;while(t);return r}catch(l){return`
|
|
8
|
-
Error generating stack: `+l.message+`
|
|
9
|
-
`+l.stack}}var Dt=Object.prototype.hasOwnProperty,Wt=e.unstable_scheduleCallback,rn=e.unstable_cancelCallback,en=e.unstable_shouldYield,We=e.unstable_requestPaint,xt=e.unstable_now,$t=e.unstable_getCurrentPriorityLevel,ft=e.unstable_ImmediatePriority,vt=e.unstable_UserBlockingPriority,gt=e.unstable_NormalPriority,Lt=e.unstable_LowPriority,un=e.unstable_IdlePriority,Ie=e.log,ot=e.unstable_setDisableYieldValue,ke=null,ze=null;function Ge(t){if(typeof Ie=="function"&&ot(t),ze&&typeof ze.setStrictMode=="function")try{ze.setStrictMode(ke,t)}catch{}}var et=Math.clz32?Math.clz32:Z,Et=Math.log,_=Math.LN2;function Z(t){return t>>>=0,t===0?32:31-(Et(t)/_|0)|0}var ne=256,ye=262144,xe=4194304;function qe(t){var r=t&42;if(r!==0)return r;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&-t;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Ve(t,r,i){var l=t.pendingLanes;if(l===0)return 0;var f=0,m=t.suspendedLanes,E=t.pingedLanes;t=t.warmLanes;var k=l&134217727;return k!==0?(l=k&~m,l!==0?f=qe(l):(E&=k,E!==0?f=qe(E):i||(i=k&~t,i!==0&&(f=qe(i))))):(k=l&~m,k!==0?f=qe(k):E!==0?f=qe(E):i||(i=l&~t,i!==0&&(f=qe(i)))),f===0?0:r!==0&&r!==f&&(r&m)===0&&(m=f&-f,i=r&-r,m>=i||m===32&&(i&4194048)!==0)?r:f}function Xe(t,r){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&r)===0}function $e(t,r){(r&8)!==0&&(r|=r&32);var i=t.entangledLanes;if(i!==0)for(t=t.entanglements,i&=r;0<i;){var l=31-et(i),f=1<<l;r|=t[l],i&=~f}return r}function st(t,r){switch(t){case 1:case 2:case 4:case 8:case 64:return r+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function tt(){var t=xe;return xe<<=1,(xe&62914560)===0&&(xe=4194304),t}function St(t){for(var r=[],i=0;31>i;i++)r.push(t);return r}function ct(t,r){t.pendingLanes|=r,r!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Bt(t,r,i,l,f,m){var E=t.pendingLanes;t.pendingLanes=i,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=i,t.entangledLanes&=i,t.errorRecoveryDisabledLanes&=i,t.shellSuspendCounter=0;var k=t.entanglements,Q=t.expirationTimes,ie=t.hiddenUpdates;for(i=E&~i;0<i;){var pe=31-et(i),Ce=1<<pe;k[pe]=0,Q[pe]=-1;var ae=ie[pe];if(ae!==null)for(ie[pe]=null,pe=0;pe<ae.length;pe++){var fe=ae[pe];fe!==null&&(fe.lane&=-536870913)}i&=~Ce}l!==0&&Ht(t,l,0),m!==0&&f===0&&t.tag!==0&&(t.suspendedLanes|=m&~(E&~r))}function Ht(t,r,i){t.pendingLanes|=r,t.suspendedLanes&=~r;var l=31-et(r);t.entangledLanes|=r,t.entanglements[l]=t.entanglements[l]|1073741824|i&261930}function On(t,r){var i=t.entangledLanes|=r;for(t=t.entanglements;i;){var l=31-et(i),f=1<<l;f&r|t[l]&r&&(t[l]|=r),i&=~f}}function Vt(t,r){var i=r&-r;return i=(i&42)!==0?1:Ut(i),(i&(t.suspendedLanes|r))!==0?0:i}function Ut(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function En(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Cn(){var t=ce.p;return t!==0?t:(t=window.event,t===void 0?32:W1(t.type))}function Qr(t,r){var i=ce.p;try{return ce.p=t,r()}finally{ce.p=i}}var cn=Math.random().toString(36).slice(2),dn="__reactFiber$"+cn,Mn="__reactProps$"+cn,jn="__reactContainer$"+cn,vo="__reactEvents$"+cn,Or="__reactListeners$"+cn,Ia="__reactHandles$"+cn,Zr="__reactResources$"+cn,pa="__reactMarker$"+cn,Pt="__reactLoad$"+cn;function Yn(t){delete t[dn],delete t[Mn],delete t[Or],delete t[Ia]}function Fn(t){var r;if(r=t[dn])return r;for(var i=t.parentNode;i;){if(r=i[jn]||i[dn]){if(i=r.alternate,r.child!==null||i!==null&&i.child!==null)for(t=I1(t);t!==null;){if(i=t[dn])return i;t=I1(t)}return r}t=i,i=t.parentNode}return null}function fr(t){if(t=t[dn]||t[jn]){var r=t.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return t}return null}function he(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t.stateNode;throw Error(o(33))}function Ae(t){var r=t[Zr];return r||(r=t[Zr]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function Se(t){t[pa]=!0}function nt(t){t[Pt]=void 0}var Ct=new Set,wt={};function zt(t,r){vn(t,r),vn(t+"Capture",r)}function vn(t,r){for(wt[t]=r,t=0;t<r.length;t++)Ct.add(r[t])}var fn=RegExp("^[: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]*$"),mt={},At={};function an(t){return Dt.call(At,t)?!0:Dt.call(mt,t)?!1:fn.test(t)?At[t]=!0:(mt[t]=!0,!1)}var pt=!1;function nr(){var t=pt;return pt=!1,t}function Ln(t,r,i){if(an(r))if(i===null)t.removeAttribute(r);else{switch(typeof i){case"undefined":case"function":case"symbol":t.removeAttribute(r);return;case"boolean":var l=r.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){t.removeAttribute(r);return}}t.setAttribute(r,i)}}function Jr(t,r,i){if(i===null)t.removeAttribute(r);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(r);return}t.setAttribute(r,i)}}function Gn(t,r,i,l){if(l===null)t.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(i);return}t.setAttributeNS(r,i,l)}}function $n(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Ms(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function Zl(t,r,i){var l=Object.getOwnPropertyDescriptor(t.constructor.prototype,r);if(!t.hasOwnProperty(r)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var f=l.get,m=l.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return f.call(this)},set:function(E){i=""+E,m.call(this,E)}}),Object.defineProperty(t,r,{enumerable:l.enumerable}),{getValue:function(){return i},setValue:function(E){i=""+E},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function bo(t){if(!t._valueTracker){var r=Ms(t)?"checked":"value";t._valueTracker=Zl(t,r,""+t[r])}}function As(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var i=r.getValue(),l="";return t&&(l=Ms(t)?t.checked?"true":"false":t.value),t=l,t!==i?(r.setValue(t),!0):!1}var Jc=/[\n"\\]/g;function Nn(t){return t.replace(Jc,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function wr(t,r,i,l,f,m,E,k){t.name="",E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?t.type=E:t.removeAttribute("type"),r!=null?E==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+$n(r)):t.value!==""+$n(r)&&(t.value=""+$n(r)):E!=="submit"&&E!=="reset"||t.removeAttribute("value"),r!=null?E==="number"&&t.value==r?Ds(t,$n(t.value)):Ds(t,$n(r)):i!=null?Ds(t,$n(i)):l!=null&&t.removeAttribute("value"),f==null&&m!=null&&(t.defaultChecked=!!m),f!=null&&(t.checked=f&&typeof f!="function"&&typeof f!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?t.name=""+$n(k):t.removeAttribute("name")}function Yo(t,r,i,l,f,m,E,k){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(t.type=m),r!=null||i!=null){if(!(m!=="submit"&&m!=="reset"||r!=null)){bo(t);return}i=i!=null?""+$n(i):"",r=r!=null?""+$n(r):i,k||r===t.value||(t.value=r),t.defaultValue=r}l=l??f,l=typeof l!="function"&&typeof l!="symbol"&&!!l,t.checked=k?t.checked:!!l,t.defaultChecked=!!l,E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"&&(t.name=E),bo(t)}function Ds(t,r){t.defaultValue!==""+r&&(t.defaultValue=""+r)}function Fr(t,r,i,l){if(t=t.options,r){r={};for(var f=0;f<i.length;f++)r["$"+i[f]]=!0;for(i=0;i<t.length;i++)f=r.hasOwnProperty("$"+t[i].value),t[i].selected!==f&&(t[i].selected=f),f&&l&&(t[i].defaultSelected=!0)}else{for(i=""+$n(i),r=null,f=0;f<t.length;f++){if(t[f].value===i){t[f].selected=!0,l&&(t[f].defaultSelected=!0);return}r!==null||t[f].disabled||(r=t[f])}r!==null&&(r.selected=!0)}}function Ns(t,r,i){if(r!=null&&(r=""+$n(r),r!==t.value&&(t.value=r),i==null)){t.defaultValue!==r&&(t.defaultValue=r);return}t.defaultValue=i!=null?""+$n(i):""}function Wr(t,r,i,l){if(r==null){if(l!=null){if(i!=null)throw Error(o(92));if(me(l)){if(1<l.length)throw Error(o(93));l=l[0]}i=l}i==null&&(i=""),r=i}i=$n(r),t.defaultValue=i,l=t.textContent,l===i&&l!==""&&l!==null&&(t.value=l),bo(t)}function Mr(t,r){if(r){var i=t.firstChild;if(i&&i===t.lastChild&&i.nodeType===3){i.nodeValue=r;return}}t.textContent=r}var Ko=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Jl(t,r,i){var l=r.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?l?t.setProperty(r,""):r==="float"?t.cssFloat="":t[r]="":l?t.setProperty(r,i):typeof i!="number"||i===0||Ko.has(r)?r==="float"?t.cssFloat=i:t[r]=(""+i).trim():t[r]=i+"px"}function ea(t,r,i){if(r!=null&&typeof r!="object")throw Error(o(62));if(t=t.style,i!=null){for(var l in i)!i.hasOwnProperty(l)||r!=null&&r.hasOwnProperty(l)||(l.indexOf("--")===0?t.setProperty(l,""):l==="float"?t.cssFloat="":t[l]="",pt=!0);for(var f in r)l=r[f],r.hasOwnProperty(f)&&i[f]!==l&&(Jl(t,f,l),pt=!0)}else for(var m in r)r.hasOwnProperty(m)&&Jl(t,m,r[m])}function ki(t){if(t.indexOf("-")===-1)return!1;switch(t){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 Wl=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["maskType","mask-type"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),eu=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function hr(t){return eu.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Ar(){}var Pi=null;function Li(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var tn=null,or=null;function ga(t){var r=fr(t);if(r&&(t=r.stateNode)){var i=t[Mn]||null;e:switch(t=r.stateNode,r.type){case"input":if(wr(t,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),r=i.name,i.type==="radio"&&r!=null){for(i=t;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Nn(""+r)+'"][type="radio"]'),r=0;r<i.length;r++){var l=i[r];if(l!==t&&l.form===t.form){var f=l[Mn]||null;if(!f)throw Error(o(90));wr(l,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(r=0;r<i.length;r++)l=i[r],l.form===t.form&&As(l)}break e;case"textarea":Ns(t,i.value,i.defaultValue);break e;case"select":r=i.value,r!=null&&Fr(t,!!i.multiple,r,!1)}}}var ta=!1;function zi(t,r,i){if(ta)return t(r,i);ta=!0;try{var l=t(r);return l}finally{if(ta=!1,(tn!==null||or!==null)&&(Jd(),tn&&(r=tn,t=or,or=tn=null,ga(r),t)))for(r=0;r<t.length;r++)ga(t[r])}}function xo(t,r){var i=t.stateNode;if(i===null)return null;var l=i[Mn]||null;if(l===null)return null;i=l[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(t=t.type,l=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!l;break e;default:t=!1}if(t)return null;if(i&&typeof i!="function")throw Error(o(231,r,typeof i));return i}var pr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_i=!1;if(pr)try{var tu={};Object.defineProperty(tu,"passive",{get:function(){_i=!0}}),window.addEventListener("test",tu,tu),window.removeEventListener("test",tu,tu)}catch{_i=!1}var Go=null,$p=null,Wc=null;function db(){if(Wc)return Wc;var t,r=$p,i=r.length,l,f="value"in Go?Go.value:Go.textContent,m=f.length;for(t=0;t<i&&r[t]===f[t];t++);var E=i-t;for(l=1;l<=E&&r[i-l]===f[m-l];l++);return Wc=f.slice(t,1<l?1-l:void 0)}function ed(t){var r=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&r===13&&(t=13)):t=r,t===10&&(t=13),32<=t||t===13?t:0}function td(){return!0}function fb(){return!1}function Dr(t){function r(i,l,f,m,E){this._reactName=i,this._targetInst=f,this.type=l,this.nativeEvent=m,this.target=E,this.currentTarget=null;for(var k in t)t.hasOwnProperty(k)&&(i=t[k],this[k]=i?i(m):m[k]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?td:fb,this.isPropagationStopped=fb,this}return I(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=td)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=td)},persist:function(){},isPersistent:td}),r}var $o={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},nd=Dr($o),nu=I({},$o,{view:0,detail:0}),fA=Dr(nu),Xp,Qp,ru,rd=I({},nu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Jp,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==ru&&(ru&&t.type==="mousemove"?(Xp=t.screenX-ru.screenX,Qp=t.screenY-ru.screenY):Qp=Xp=0,ru=t),Xp)},movementY:function(t){return"movementY"in t?t.movementY:Qp}}),hb=Dr(rd),hA=I({},rd,{dataTransfer:0}),pA=Dr(hA),gA=I({},nu,{relatedTarget:0}),Zp=Dr(gA),mA=I({},$o,{animationName:0,elapsedTime:0,pseudoElement:0}),yA=Dr(mA),vA=I({},$o,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),bA=Dr(vA),xA=I({},$o,{data:0}),pb=Dr(xA),SA={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},wA={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},RA={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function EA(t){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(t):(t=RA[t])?!!r[t]:!1}function Jp(){return EA}var CA=I({},nu,{key:function(t){if(t.key){var r=SA[t.key]||t.key;if(r!=="Unidentified")return r}return t.type==="keypress"?(t=ed(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?wA[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Jp,charCode:function(t){return t.type==="keypress"?ed(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?ed(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),TA=Dr(CA),OA=I({},rd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),gb=Dr(OA),MA=I({},$o,{submitter:0}),AA=Dr(MA),DA=I({},nu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Jp}),NA=Dr(DA),jA=I({},$o,{propertyName:0,elapsedTime:0,pseudoElement:0}),IA=Dr(jA),kA=I({},rd,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),PA=Dr(kA),LA=I({},$o,{newState:0,oldState:0,source:0}),zA=Dr(LA),_A=[9,13,27,32],Wp=pr&&"CompositionEvent"in window,au=null;pr&&"documentMode"in document&&(au=document.documentMode);var HA=pr&&"TextEvent"in window&&!au,mb=pr&&(!Wp||au&&8<au&&11>=au),yb=" ",vb=!1;function bb(t,r){switch(t){case"keyup":return _A.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xb(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var js=!1;function UA(t,r){switch(t){case"compositionend":return xb(r);case"keypress":return r.which!==32?null:(vb=!0,yb);case"textInput":return t=r.data,t===yb&&vb?null:t;default:return null}}function FA(t,r){if(js)return t==="compositionend"||!Wp&&bb(t,r)?(t=db(),Wc=$p=Go=null,js=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return mb&&r.locale!=="ko"?null:r.data;default:return null}}var BA={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Sb(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r==="input"?!!BA[t.type]:r==="textarea"}function wb(t,r,i,l){tn?or?or.push(l):or=[l]:tn=l,r=af(r,"onChange"),0<r.length&&(i=new nd("onChange","change",null,i,l),t.push({event:i,listeners:r}))}var ou=null,iu=null;function VA(t){u1(t,0)}function ad(t){var r=he(t);if(As(r))return t}function Rb(t,r){if(t==="change")return r}var Eb=!1;if(pr){var eg;if(pr){var tg="oninput"in document;if(!tg){var Cb=document.createElement("div");Cb.setAttribute("oninput","return;"),tg=typeof Cb.oninput=="function"}eg=tg}else eg=!1;Eb=eg&&(!document.documentMode||9<document.documentMode)}function Tb(){ou&&(ou.detachEvent("onpropertychange",Ob),iu=ou=null)}function Ob(t){if(t.propertyName==="value"&&ad(iu)){var r=[];wb(r,iu,t,Li(t)),zi(VA,r)}}function qA(t,r,i){t==="focusin"?(Tb(),ou=r,iu=i,ou.attachEvent("onpropertychange",Ob)):t==="focusout"&&Tb()}function YA(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return ad(iu)}function KA(t,r){if(t==="click")return ad(r)}function GA(t,r){if(t==="input"||t==="change")return ad(r)}function $A(t,r){return t===r&&(t!==0||1/t===1/r)||t!==t&&r!==r}var na=typeof Object.is=="function"?Object.is:$A;function su(t,r){if(na(t,r))return!0;if(typeof t!="object"||t===null||typeof r!="object"||r===null)return!1;var i=Object.keys(t),l=Object.keys(r);if(i.length!==l.length)return!1;for(l=0;l<i.length;l++){var f=i[l];if(!Dt.call(r,f)||!na(t[f],r[f]))return!1}return!0}function ng(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Mb(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Ab(t,r){var i=Mb(t);t=0;for(var l;i;){if(i.nodeType===3){if(l=t+i.textContent.length,t<=r&&l>=r)return{node:i,offset:r-t};t=l}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Mb(i)}}function Db(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?Db(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function Nb(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var r=ng(t.document);r instanceof t.HTMLIFrameElement;){try{var i=typeof r.contentWindow.location.href=="string"}catch{i=!1}if(i)t=r.contentWindow;else break;r=ng(t.document)}return r}function rg(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r&&(r==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||r==="textarea"||t.contentEditable==="true")}var XA=pr&&"documentMode"in document&&11>=document.documentMode,Is=null,ag=null,lu=null,og=!1;function jb(t,r,i){var l=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;og||Is==null||Is!==ng(l)||(l=Is,"selectionStart"in l&&rg(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),lu&&su(lu,l)||(lu=l,l=af(ag,"onSelect"),0<l.length&&(r=new nd("onSelect","select",null,r,i),t.push({event:r,listeners:l}),r.target=Is)))}function Hi(t,r){var i={};return i[t.toLowerCase()]=r.toLowerCase(),i["Webkit"+t]="webkit"+r,i["Moz"+t]="moz"+r,i}var ks={animationend:Hi("Animation","AnimationEnd"),animationiteration:Hi("Animation","AnimationIteration"),animationstart:Hi("Animation","AnimationStart"),transitionrun:Hi("Transition","TransitionRun"),transitionstart:Hi("Transition","TransitionStart"),transitioncancel:Hi("Transition","TransitionCancel"),transitionend:Hi("Transition","TransitionEnd")},ig={},Ib={};pr&&(Ib=document.createElement("div").style,"AnimationEvent"in window||(delete ks.animationend.animation,delete ks.animationiteration.animation,delete ks.animationstart.animation),"TransitionEvent"in window||delete ks.transitionend.transition);function Ui(t){if(ig[t])return ig[t];if(!ks[t])return t;var r=ks[t],i;for(i in r)if(r.hasOwnProperty(i)&&i in Ib)return ig[t]=r[i];return t}var kb=Ui("animationend"),Pb=Ui("animationiteration"),Lb=Ui("animationstart"),QA=Ui("transitionrun"),ZA=Ui("transitionstart"),JA=Ui("transitioncancel"),zb=Ui("transitionend"),_b=new Map,sg="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");sg.push("scrollEnd");function ka(t,r){_b.set(t,r),zt(r,[t])}var WA=0;function So(t,r){if(t.name!=null&&t.name!=="auto")return t.name;if(r.autoName!==null)return r.autoName;t=_a.identifierPrefix;var i=WA++;return t="_"+t+"t_"+i.toString(32)+"_",r.autoName=t}function Hb(t){if(t==null||typeof t=="string")return t;var r=null,i=el;if(i!==null)for(var l=0;l<i.length;l++){var f=t[i[l]];if(f!=null){if(f==="none")return"none";r=r==null?f:r+(" "+f)}}return r??t.default}function wo(t,r){return t=Hb(t),r=Hb(r),r==null?t==="auto"?null:t:r==="auto"?null:r}var od=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},ma=[],Ps=0,lg=0;function id(){for(var t=Ps,r=lg=Ps=0;r<t;){var i=ma[r];ma[r++]=null;var l=ma[r];ma[r++]=null;var f=ma[r];ma[r++]=null;var m=ma[r];if(ma[r++]=null,l!==null&&f!==null){var E=l.pending;E===null?f.next=f:(f.next=E.next,E.next=f),l.pending=f}m!==0&&Ub(i,f,m)}}function sd(t,r,i,l){ma[Ps++]=t,ma[Ps++]=r,ma[Ps++]=i,ma[Ps++]=l,lg|=l,t.lanes|=l,t=t.alternate,t!==null&&(t.lanes|=l)}function ug(t,r,i,l){return sd(t,r,i,l),ld(t)}function Fi(t,r){return sd(t,null,null,r),ld(t)}function Ub(t,r,i){t.lanes|=i;var l=t.alternate;l!==null&&(l.lanes|=i);for(var f=!1,m=t.return;m!==null;)m.childLanes|=i,l=m.alternate,l!==null&&(l.childLanes|=i),m.tag===22&&(t=m.stateNode,t===null||t._visibility&1||(f=!0)),t=m,m=m.return;return t.tag===3?(m=t.stateNode,f&&r!==null&&(f=31-et(i),t=m.hiddenUpdates,l=t[f],l===null?t[f]=[r]:l.push(r),r.lane=i|536870912),m):null}function ld(t){if(50<Du)throw Du=0,Zd=null,Error(o(185));for(var r=t.return;r!==null;)t=r,r=t.return;return t.tag===3?t.stateNode:null}var Ls={};function eD(t,r,i,l){this.tag=t,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Br(t,r,i,l){return new eD(t,r,i,l)}function cg(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Ro(t,r){var i=t.alternate;return i===null?(i=Br(t.tag,r,t.key,t.mode),i.elementType=t.elementType,i.type=t.type,i.stateNode=t.stateNode,i.alternate=t,t.alternate=i):(i.pendingProps=r,i.type=t.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=t.flags&1206910976,i.childLanes=t.childLanes,i.lanes=t.lanes,i.child=t.child,i.memoizedProps=t.memoizedProps,i.memoizedState=t.memoizedState,i.updateQueue=t.updateQueue,r=t.dependencies,i.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},i.sibling=t.sibling,i.index=t.index,i.ref=t.ref,i.refCleanup=t.refCleanup,i}function Fb(t,r){t.flags&=1206910978;var i=t.alternate;return i===null?(t.childLanes=0,t.lanes=r,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=i.childLanes,t.lanes=i.lanes,t.child=i.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=i.memoizedProps,t.memoizedState=i.memoizedState,t.updateQueue=i.updateQueue,t.type=i.type,r=i.dependencies,t.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),t}function ud(t,r,i,l,f,m){var E=0;if(l=t,typeof l=="function")cg(l)&&(E=1);else if(typeof l=="string")E=MN(t,i,Oe.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(l){case ee:return t=Br(31,i,r,f),t.elementType=ee,t.lanes=m,t;case G:return Bi(i.children,f,m,r);case J:E=8,f|=24;break;case Y:return t=Br(12,i,r,f|2),t.elementType=Y,t.lanes=m,t;case $:return t=Br(13,i,r,f),t.elementType=$,t.lanes=m,t;case K:return t=Br(19,i,r,f),t.elementType=K,t.lanes=m,t;case q:case j:return t=f|32,t=Br(30,i,r,t),t.elementType=j,t.lanes=m,t.stateNode={autoName:null,paired:null,clones:null,ref:null},t;default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case H:E=10;break e;case U:E=9;break e;case L:E=11;break e;case V:E=14;break e;case X:E=16,l=null;break e}E=29,i=Error(o(130,t===null?"null":typeof t,"")),l=null}return r=Br(E,i,r,f),r.elementType=t,r.type=l,r.lanes=m,r}function Bi(t,r,i,l){return t=Br(7,t,l,r),t.lanes=i,t}function dg(t,r,i){return t=Br(6,t,null,r),t.lanes=i,t}function Bb(t){var r=Br(18,null,null,0);return r.stateNode=t,r}function fg(t,r,i){return r=Br(4,t.children!==null?t.children:[],t.key,r),r.lanes=i,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}var Vb=new WeakMap;function ya(t,r){if(typeof t=="object"&&t!==null){var i=Vb.get(t);return i!==void 0?i:(r={value:t,source:r,stack:Ot(r)},Vb.set(t,r),r)}return{value:t,source:r,stack:Ot(r)}}var zs=[],_s=0,cd=null,uu=0,va=[],ba=0,Xo=null,$a=1,Xa="";function Eo(t,r){zs[_s++]=uu,zs[_s++]=cd,cd=t,uu=r}function qb(t,r,i){va[ba++]=$a,va[ba++]=Xa,va[ba++]=Xo,Xo=t;var l=$a;t=Xa;var f=32-et(l)-1;l&=~(1<<f),i+=1;var m=32-et(r)+f;if(30<m){var E=f-f%5;m=(l&(1<<E)-1).toString(32),l>>=E,f-=E,$a=1<<32-et(r)+f|i<<f|l,Xa=m+t}else $a=1<<m|i<<f|l,Xa=t}function dd(t){t.return!==null&&(Eo(t,1),qb(t,1,0))}function hg(t){for(;t===cd;)cd=zs[--_s],zs[_s]=null,uu=zs[--_s],zs[_s]=null;for(;t===Xo;)Xo=va[--ba],va[ba]=null,Xa=va[--ba],va[ba]=null,$a=va[--ba],va[ba]=null}function Yb(t,r){va[ba++]=$a,va[ba++]=Xa,va[ba++]=Xo,$a=r.id,Xa=r.overflow,Xo=t}var ir=null,An=null,Ft=!1,Qo=null,xa=!1,pg=Error(o(519));function Zo(t){var r=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw cu(ya(r,t)),pg}function Kb(t){var r=t.stateNode,i=t.type,l=t.memoizedProps;switch(r[dn]=t,r[Mn]=l,i){case"dialog":Yt("cancel",r),Yt("close",r);break;case"iframe":case"object":case"embed":Yt("load",r);break;case"video":case"audio":for(i=0;i<ju.length;i++)Yt(ju[i],r);break;case"source":Yt("error",r);break;case"img":case"image":case"link":Yt("error",r),Yt("load",r);break;case"details":Yt("toggle",r);break;case"input":Yt("invalid",r),Yo(r,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Yt("invalid",r);break;case"textarea":Yt("invalid",r),Wr(r,l.value,l.defaultValue,l.children)}i=l.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||r.textContent===""+i||l.suppressHydrationWarning===!0||h1(r.textContent,i)?(l.popover!=null&&(Yt("beforetoggle",r),Yt("toggle",r)),l.onScroll!=null&&Yt("scroll",r),l.onScrollEnd!=null&&Yt("scrollend",r),l.onClick!=null&&(r.onclick=Ar),r=!0):r=!1,r||Zo(t,!0)}function fd(t){for(ir=t.return;ir;)switch(ir.tag){case 5:case 31:case 13:xa=!1;return;case 27:case 3:xa=!0;return;default:ir=ir.return}}function Hs(t){if(t!==ir)return!1;if(!Ft)return fd(t),Ft=!0,!1;var r=t.tag,i;if((i=r!==3&&r!==27)&&((i=r===5)&&(i=t.type,i=!(i!=="form"&&i!=="button")||qm(t.type,t.memoizedProps)),i=!i),i&&An&&Zo(t),fd(t),r===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(317));An=j1(t)}else if(r===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(317));An=j1(t)}else r===27?(r=An,hi(t.type)?(t=Wm,Wm=null,An=t):An=r):An=ir?wa(t.stateNode.nextSibling):null;return!0}function Vi(){An=ir=null,Ft=!1}function gg(){var t=Qo;return t!==null&&(Yr===null?Yr=t:Yr.push.apply(Yr,t),Qo=null),t}function cu(t){Qo===null?Qo=[t]:Qo.push(t)}var mg=Me(null),qi=null,Co=null;function Jo(t,r,i){Fe(mg,r._currentValue),r._currentValue=i}function To(t){t._currentValue=mg.current,Le(mg)}function hd(t,r,i){for(;t!==null;){var l=t.alternate;if((t.childLanes&r)!==r?(t.childLanes|=r,l!==null&&(l.childLanes|=r)):l!==null&&(l.childLanes&r)!==r&&(l.childLanes|=r),t===i)break;t=t.return}}function yg(t,r,i,l){var f=t.child;for(f!==null&&(f.return=t);f!==null;){var m=f.dependencies;if(m!==null){var E=f.child;m=m.firstContext;e:for(;m!==null;){var k=m;m=f;for(var Q=0;Q<r.length;Q++)if(k.context===r[Q]){m.lanes|=i,k=m.alternate,k!==null&&(k.lanes|=i),hd(m.return,i,t),l||(E=null);break e}m=k.next}}else if(f.tag===18){if(E=f.return,E===null)throw Error(o(341));E.lanes|=i,m=E.alternate,m!==null&&(m.lanes|=i),hd(E,i,t),E=null}else f.tag===13&&f.memoizedState!==null&&f.memoizedState.dehydrated===null?(f.lanes|=i,E=f.alternate,E!==null&&(E.lanes|=i),hd(f.return,i,t),E=f.child,E=E!==null?E.sibling:null):E=f.child;if(E!==null)E.return=f;else for(E=f;E!==null;){if(E===t){E=null;break}if(f=E.sibling,f!==null){f.return=E.return,E=f;break}E=E.return}f=E}}function Yi(t,r,i,l){t=null;for(var f=r,m=!1;f!==null;){if(!m){if((f.flags&524288)!==0)m=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var E=f.alternate;if(E===null)throw Error(o(387));if(E=E.memoizedProps,E!==null){var k=f.type;na(f.pendingProps.value,E.value)||(t!==null?t.push(k):t=[k])}}else if(f===Ue.current){if(E=f.alternate,E===null)throw Error(o(387));E.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(t!==null?t.push(cl):t=[cl])}f=f.return}return t!==null&&yg(r,t,i,l),r.flags|=262144,t!==null}function pd(t){for(t=t.firstContext;t!==null;){if(!na(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Ki(t){qi=t,Co=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function gr(t){return Gb(qi,t)}function gd(t,r){return qi===null&&Ki(t),Gb(t,r)}function Gb(t,r){var i=r._currentValue;if(r={context:r,memoizedValue:i,next:null},Co===null){if(t===null)throw Error(o(308));Co=r,t.dependencies={lanes:0,firstContext:r},t.flags|=524288}else Co=Co.next=r;return i}var tD=typeof AbortController<"u"?AbortController:function(){var t=[],r=this.signal={aborted:!1,addEventListener:function(i,l){t.push(l)}};this.abort=function(){r.aborted=!0,t.forEach(function(i){return i()})}},nD=e.unstable_scheduleCallback,rD=e.unstable_NormalPriority,Xn={$$typeof:H,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function vg(){return{controller:new tD,data:new Map,refCount:0}}function du(t){t.refCount--,t.refCount===0&&nD(rD,function(){t.controller.abort()})}function $b(t,r){if((t.pendingLanes&4194048)!==0){var i=t.transitionTypes;for(i===null&&(i=t.transitionTypes=[]),t=0;t<r.length;t++){var l=r[t];i.indexOf(l)===-1&&i.push(l)}}}var fu=null;function aD(t){var r=t.transitionTypes;return t.transitionTypes=null,r}var hu=null,bg=0,Gi=0,Us=null;function oD(t,r){if(hu===null){var i=hu=[];bg=0,Gi=Pm(),Us={status:"pending",value:void 0,then:function(l){i.push(l)}}}return bg++,r.then(Xb,Xb),r}function Xb(){if(--bg===0&&(fu=null,hu!==null)){Us!==null&&(Us.status="fulfilled");var t=hu;hu=null,Gi=0,Us=null;for(var r=0;r<t.length;r++)(0,t[r])()}}function iD(t,r){var i=[],l={status:"pending",value:null,reason:null,then:function(f){i.push(f)}};return t.then(function(){l.status="fulfilled",l.value=r;for(var f=0;f<i.length;f++)(0,i[f])(r)},function(f){for(l.status="rejected",l.reason=f,f=0;f<i.length;f++)(0,i[f])(void 0)}),l}var Qb=ge.S;ge.S=function(t,r){if(B2=xt(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&oD(t,r),fu!==null)for(var i=al;i!==null;)$b(i,fu),i=i.next;if(i=t.types,i!==null){for(var l=al;l!==null;)$b(l,i),l=l.next;if(Gi!==0){l=fu,l===null&&(l=fu=[]);for(var f=0;f<i.length;f++){var m=i[f];l.indexOf(m)===-1&&l.push(m)}}}Qb!==null&&Qb(t,r)};var $i=Me(null);function xg(){var t=$i.current;return t!==null?t:Tn.pooledCache}function md(t,r){r===null?Fe($i,$i.current):Fe($i,r.pool)}function Zb(){var t=xg();return t===null?null:{parent:Xn._currentValue,pool:t}}var Fs=Error(o(460)),Sg=Error(o(474)),yd=Error(o(542)),vd={then:function(){}};function Jb(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Wb(t,r,i){switch(i=t[i],i===void 0?t.push(r):i!==r&&(r.then(Ar,Ar),r=i),r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,tx(t),t===void 0&&!("reason"in r)?Error(o(600)):t;default:if(typeof r.status=="string")r.then(Ar,Ar);else{if(t=Tn,t!==null&&100<t.shellSuspendCounter)throw Error(o(482));t=r,t.status="pending",t.then(function(l){if(r.status==="pending"){var f=r;f.status="fulfilled",f.value=l}},function(l){if(r.status==="pending"){var f=r;f.status="rejected",f.reason=l}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,tx(t),t}throw Qi=r,Fs}}function Xi(t){try{var r=t._init;return r(t._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Qi=i,Fs):i}}var Qi=null;function ex(){if(Qi===null)throw Error(o(459));var t=Qi;return Qi=null,t}function tx(t){if(t===Fs||t===yd)throw Error(o(483))}var Bs=null,pu=0;function bd(t){var r=pu;return pu+=1,Bs===null&&(Bs=[]),Wb(Bs,t,r)}function Wo(t,r){r=r.props.ref,t.ref=r!==void 0?r:null}function xd(t,r){throw r.$$typeof===D?Error(o(525)):(t=Object.prototype.toString.call(r),Error(o(31,t==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":t)))}function nx(t){function r(oe,te){if(t){var ue=oe.deletions;ue===null?(oe.deletions=[te],oe.flags|=16):ue.push(te)}}function i(oe,te){if(!t)return null;for(;te!==null;)r(oe,te),te=te.sibling;return null}function l(oe){for(var te=new Map;oe!==null;)oe.key===null?te.set(oe.index,oe):te.set(oe.key,oe),oe=oe.sibling;return te}function f(oe,te){return oe=Ro(oe,te),oe.index=0,oe.sibling=null,oe}function m(oe,te,ue){return oe.index=ue,t?(ue=oe.alternate,ue!==null?(ue=ue.index,ue<te?(oe.flags|=2,te):ue):(oe.flags|=134217730,te)):(oe.flags|=1048576,te)}function E(oe){return t&&oe.alternate===null&&(oe.flags|=134217730),oe}function k(oe,te,ue,Ee){return te===null||te.tag!==6?(te=dg(ue,oe.mode,Ee),te.return=oe,te):(te=f(te,ue),te.return=oe,te)}function Q(oe,te,ue,Ee){var Je=ue.type;return Je===G?(oe=pe(oe,te,ue.props.children,Ee,ue.key),Wo(oe,ue),oe):te!==null&&(te.elementType===Je||typeof Je=="object"&&Je!==null&&Je.$$typeof===X&&Xi(Je)===te.type)?(te=f(te,ue.props),Wo(te,ue),te.return=oe,te):(te=ud(ue.type,ue.key,ue.props,null,oe.mode,Ee),Wo(te,ue),te.return=oe,te)}function ie(oe,te,ue,Ee){return te===null||te.tag!==4||te.stateNode.containerInfo!==ue.containerInfo||te.stateNode.implementation!==ue.implementation?(te=fg(ue,oe.mode,Ee),te.return=oe,te):(te=f(te,ue.children||[]),te.return=oe,te)}function pe(oe,te,ue,Ee,Je){return te===null||te.tag!==7?(te=Bi(ue,oe.mode,Ee,Je),te.return=oe,te):(te=f(te,ue),te.return=oe,te)}function Ce(oe,te,ue){if(typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint")return te=dg(""+te,oe.mode,ue),te.return=oe,te;if(typeof te=="object"&&te!==null){switch(te.$$typeof){case z:return ue=ud(te.type,te.key,te.props,null,oe.mode,ue),Wo(ue,te),ue.return=oe,ue;case F:return te=fg(te,oe.mode,ue),te.return=oe,te;case X:return te=Xi(te),Ce(oe,te,ue)}if(me(te)||re(te))return te=Bi(te,oe.mode,ue,null),te.return=oe,te;if(typeof te.then=="function")return Ce(oe,bd(te),ue);if(te.$$typeof===H)return Ce(oe,gd(oe,te),ue);xd(oe,te)}return null}function ae(oe,te,ue,Ee){var Je=te!==null?te.key:null;if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return Je!==null?null:k(oe,te,""+ue,Ee);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case z:return ue.key===Je?Q(oe,te,ue,Ee):null;case F:return ue.key===Je?ie(oe,te,ue,Ee):null;case X:return ue=Xi(ue),ae(oe,te,ue,Ee)}if(me(ue)||re(ue))return Je!==null?null:pe(oe,te,ue,Ee,null);if(typeof ue.then=="function")return ae(oe,te,bd(ue),Ee);if(ue.$$typeof===H)return ae(oe,te,gd(oe,ue),Ee);xd(oe,ue)}return null}function fe(oe,te,ue,Ee,Je){if(typeof Ee=="string"&&Ee!==""||typeof Ee=="number"||typeof Ee=="bigint")return oe=oe.get(ue)||null,k(te,oe,""+Ee,Je);if(typeof Ee=="object"&&Ee!==null){switch(Ee.$$typeof){case z:return oe=oe.get(Ee.key===null?ue:Ee.key)||null,Q(te,oe,Ee,Je);case F:return oe=oe.get(Ee.key===null?ue:Ee.key)||null,ie(te,oe,Ee,Je);case X:return Ee=Xi(Ee),fe(oe,te,ue,Ee,Je)}if(me(Ee)||re(Ee))return oe=oe.get(ue)||null,pe(te,oe,Ee,Je,null);if(typeof Ee.then=="function")return fe(oe,te,ue,bd(Ee),Je);if(Ee.$$typeof===H)return fe(oe,te,ue,gd(te,Ee),Je);xd(te,Ee)}return null}function Ye(oe,te,ue,Ee){for(var Je=null,Qt=null,lt=te,bt=te=0,Jn=null;lt!==null&&bt<ue.length;bt++){lt.index>bt?(Jn=lt,lt=null):Jn=lt.sibling;var nn=ae(oe,lt,ue[bt],Ee);if(nn===null){lt===null&&(lt=Jn);break}t&<&&nn.alternate===null&&r(oe,lt),te=m(nn,te,bt),Qt===null?Je=nn:Qt.sibling=nn,Qt=nn,lt=Jn}if(bt===ue.length)return i(oe,lt),Ft&&Eo(oe,bt),Je;if(lt===null){for(;bt<ue.length;bt++)lt=Ce(oe,ue[bt],Ee),lt!==null&&(te=m(lt,te,bt),Qt===null?Je=lt:Qt.sibling=lt,Qt=lt);return Ft&&Eo(oe,bt),Je}for(lt=l(lt);bt<ue.length;bt++)Jn=fe(lt,oe,bt,ue[bt],Ee),Jn!==null&&(t&&(nn=Jn.alternate,nn!==null&<.delete(nn.key===null?bt:nn.key)),te=m(Jn,te,bt),Qt===null?Je=Jn:Qt.sibling=Jn,Qt=Jn);return t&<.forEach(function(vi){return r(oe,vi)}),Ft&&Eo(oe,bt),Je}function rt(oe,te,ue,Ee){if(ue==null)throw Error(o(151));for(var Je=null,Qt=null,lt=te,bt=te=0,Jn=null,nn=ue.next();lt!==null&&!nn.done;bt++,nn=ue.next()){lt.index>bt?(Jn=lt,lt=null):Jn=lt.sibling;var vi=ae(oe,lt,nn.value,Ee);if(vi===null){lt===null&&(lt=Jn);break}t&<&&vi.alternate===null&&r(oe,lt),te=m(vi,te,bt),Qt===null?Je=vi:Qt.sibling=vi,Qt=vi,lt=Jn}if(nn.done)return i(oe,lt),Ft&&Eo(oe,bt),Je;if(lt===null){for(;!nn.done;bt++,nn=ue.next())nn=Ce(oe,nn.value,Ee),nn!==null&&(te=m(nn,te,bt),Qt===null?Je=nn:Qt.sibling=nn,Qt=nn);return Ft&&Eo(oe,bt),Je}for(lt=l(lt);!nn.done;bt++,nn=ue.next())nn=fe(lt,oe,bt,nn.value,Ee),nn!==null&&(t&&(Jn=nn.alternate,Jn!==null&<.delete(Jn.key===null?bt:Jn.key)),te=m(nn,te,bt),Qt===null?Je=nn:Qt.sibling=nn,Qt=nn);return t&<.forEach(function(UN){return r(oe,UN)}),Ft&&Eo(oe,bt),Je}function jt(oe,te,ue,Ee){if(typeof ue=="object"&&ue!==null&&ue.type===G&&ue.key===null&&ue.props.ref===void 0&&(ue=ue.props.children),typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case z:e:{for(var Je=ue.key;te!==null;){if(te.key===Je){if(Je=ue.type,Je===G){if(te.tag===7){i(oe,te.sibling),Ee=f(te,ue.props.children),Wo(Ee,ue),Ee.return=oe,oe=Ee;break e}}else if(te.elementType===Je||typeof Je=="object"&&Je!==null&&Je.$$typeof===X&&Xi(Je)===te.type){i(oe,te.sibling),Ee=f(te,ue.props),Wo(Ee,ue),Ee.return=oe,oe=Ee;break e}i(oe,te);break}else r(oe,te);te=te.sibling}ue.type===G?(Ee=Bi(ue.props.children,oe.mode,Ee,ue.key),Wo(Ee,ue),Ee.return=oe,oe=Ee):(Ee=ud(ue.type,ue.key,ue.props,null,oe.mode,Ee),Wo(Ee,ue),Ee.return=oe,oe=Ee)}return E(oe);case F:e:{for(Je=ue.key;te!==null;){if(te.key===Je)if(te.tag===4&&te.stateNode.containerInfo===ue.containerInfo&&te.stateNode.implementation===ue.implementation){i(oe,te.sibling),Ee=f(te,ue.children||[]),Ee.return=oe,oe=Ee;break e}else{i(oe,te);break}else r(oe,te);te=te.sibling}Ee=fg(ue,oe.mode,Ee),Ee.return=oe,oe=Ee}return E(oe);case X:return ue=Xi(ue),jt(oe,te,ue,Ee)}if(me(ue))return Ye(oe,te,ue,Ee);if(re(ue)){if(Je=re(ue),typeof Je!="function")throw Error(o(150));return ue=Je.call(ue),rt(oe,te,ue,Ee)}if(typeof ue.then=="function")return jt(oe,te,bd(ue),Ee);if(ue.$$typeof===H)return jt(oe,te,gd(oe,ue),Ee);xd(oe,ue)}return typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint"?(ue=""+ue,te!==null&&te.tag===6?(i(oe,te.sibling),Ee=f(te,ue),Ee.return=oe,oe=Ee):(i(oe,te),Ee=dg(ue,oe.mode,Ee),Ee.return=oe,oe=Ee),E(oe)):i(oe,te)}return function(oe,te,ue,Ee){try{pu=0;var Je=jt(oe,te,ue,Ee);return Bs=null,Je}catch(lt){if(lt===Fs||lt===yd)throw lt;var Qt=Br(29,lt,null,oe.mode);return Qt.lanes=Ee,Qt.return=oe,Qt}}}var Zi=nx(!0),rx=nx(!1),ei=!1;function wg(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Rg(t,r){t=t.updateQueue,r.updateQueue===t&&(r.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function ti(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function ni(t,r,i){var l=t.updateQueue;if(l===null)return null;if(l=l.shared,(ln&2)!==0){var f=l.pending;return f===null?r.next=r:(r.next=f.next,f.next=r),l.pending=r,r=ld(t),Ub(t,null,i),r}return sd(t,l,r,i),ld(t)}function gu(t,r,i){if(r=r.updateQueue,r!==null&&(r=r.shared,(i&4194048)!==0)){var l=r.lanes;l&=t.pendingLanes,i|=l,r.lanes=i,On(t,i)}}function Eg(t,r){var i=t.updateQueue,l=t.alternate;if(l!==null&&(l=l.updateQueue,i===l)){var f=null,m=null;if(i=i.firstBaseUpdate,i!==null){do{var E={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};m===null?f=m=E:m=m.next=E,i=i.next}while(i!==null);m===null?f=m=r:m=m.next=r}else f=m=r;i={baseState:l.baseState,firstBaseUpdate:f,lastBaseUpdate:m,shared:l.shared,callbacks:l.callbacks},t.updateQueue=i;return}t=i.lastBaseUpdate,t===null?i.firstBaseUpdate=r:t.next=r,i.lastBaseUpdate=r}var Cg=!1;function mu(){if(Cg){var t=Us;if(t!==null)throw t}}function yu(t,r,i,l){Cg=!1;var f=t.updateQueue;ei=!1;var m=f.firstBaseUpdate,E=f.lastBaseUpdate,k=f.shared.pending;if(k!==null){f.shared.pending=null;var Q=k,ie=Q.next;Q.next=null,E===null?m=ie:E.next=ie,E=Q;var pe=t.alternate;pe!==null&&(pe=pe.updateQueue,k=pe.lastBaseUpdate,k!==E&&(k===null?pe.firstBaseUpdate=ie:k.next=ie,pe.lastBaseUpdate=Q))}if(m!==null){var Ce=f.baseState;E=0,pe=ie=Q=null,k=m;do{var ae=k.lane&-536870913,fe=ae!==k.lane;if(fe?(Xt&ae)===ae:(l&ae)===ae){ae!==0&&ae===Gi&&(Cg=!0),pe!==null&&(pe=pe.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var Ye=t,rt=k;ae=r;var jt=i;switch(rt.tag){case 1:if(Ye=rt.payload,typeof Ye=="function"){Ce=Ye.call(jt,Ce,ae);break e}Ce=Ye;break e;case 3:Ye.flags=Ye.flags&-65537|128;case 0:if(Ye=rt.payload,ae=typeof Ye=="function"?Ye.call(jt,Ce,ae):Ye,ae==null)break e;Ce=I({},Ce,ae);break e;case 2:ei=!0}}ae=k.callback,ae!==null&&(t.flags|=64,fe&&(t.flags|=8192),fe=f.callbacks,fe===null?f.callbacks=[ae]:fe.push(ae))}else fe={lane:ae,tag:k.tag,payload:k.payload,callback:k.callback,next:null},pe===null?(ie=pe=fe,Q=Ce):pe=pe.next=fe,E|=ae;if(k=k.next,k===null){if(k=f.shared.pending,k===null)break;fe=k,k=fe.next,fe.next=null,f.lastBaseUpdate=fe,f.shared.pending=null}}while(!0);pe===null&&(Q=Ce),f.baseState=Q,f.firstBaseUpdate=ie,f.lastBaseUpdate=pe,m===null&&(f.shared.lanes=0),ui|=E,t.lanes=E,t.memoizedState=Ce}}function ax(t,r){if(typeof t!="function")throw Error(o(191,t));t.call(r)}function ox(t,r){var i=t.callbacks;if(i!==null)for(t.callbacks=null,t=0;t<i.length;t++)ax(i[t],r)}var ri=Me(null),Sd=Me(0);function ix(t,r){t=No,Fe(Sd,t),Fe(ri,r),No=t|r.baseLanes}function Tg(){Fe(Sd,No),Fe(ri,ri.current)}function Og(){No=Sd.current,Le(ri),Le(Sd)}var mr=Me(null),Rr=null;function ai(t){var r=t.alternate;Fe(yr,yr.current&1),Fe(mr,t),Rr===null&&(r===null||ri.current!==null||r.memoizedState!==null)&&(Rr=t)}function Mg(t){Fe(yr,yr.current),Fe(mr,t),Rr===null&&(Rr=t)}function sx(t){t.tag===22?(Fe(yr,yr.current),Fe(mr,t),Rr===null&&(Rr=t)):oi()}function oi(){Fe(yr,yr.current),Fe(mr,mr.current)}function ra(t){Le(mr),Rr===t&&(Rr=null),Le(yr)}var yr=Me(0);function vu(t,r){Fe(mr,mr.current),Fe(yr,r)}function Ag(t){Le(yr),Le(mr),Rr===t&&(Rr=null)}function wd(t){for(var r=t;r!==null;){if(r.tag===13){var i=r.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Zm(i)||Jm(i)))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!=="independent"){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var Oo=0,Nt=null,bn=null,Qn=null,Rd=!1,Vs=!1,Ji=!1,Ed=0,bu=0,qs=null,sD=0;function Bn(){throw Error(o(321))}function Dg(t,r){if(r===null)return!1;for(var i=0;i<r.length&&i<t.length;i++)if(!na(t[i],r[i]))return!1;return!0}function Ng(t,r,i,l,f,m){return Oo=m,Nt=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,ge.H=t===null||t.memoizedState===null?qx:Yx,Ji=!1,m=i(l,f),Ji=!1,Vs&&(m=ux(r,i,l,f)),lx(t),m}function lx(t){ge.H=Nd;var r=bn!==null&&bn.next!==null;if(Oo=0,Qn=bn=Nt=null,Rd=!1,bu=0,qs=null,r)throw Error(o(300));t===null||Zn||(t=t.dependencies,t!==null&&pd(t)&&(Zn=!0))}function ux(t,r,i,l){Nt=t;var f=0;do{if(Vs&&(qs=null),bu=0,Vs=!1,25<=f)throw Error(o(301));if(f+=1,Qn=bn=null,t.updateQueue!=null){var m=t.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}ge.H=gD,m=r(i,l)}while(Vs);return m}function lD(){var t=ge.H,r=t.useState()[0];return r=typeof r.then=="function"?xu(r):r,t=t.useState()[0],(bn!==null?bn.memoizedState:null)!==t&&(Nt.flags|=1024),r}function jg(){var t=Ed!==0;return Ed=0,t}function Ig(t,r,i){r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~i}function kg(t){if(Rd){for(t=t.memoizedState;t!==null;){var r=t.queue;r!==null&&(r.pending=null),t=t.next}Rd=!1}Oo=0,Qn=bn=Nt=null,Vs=!1,bu=Ed=0,qs=null}function Nr(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Qn===null?Nt.memoizedState=Qn=t:Qn=Qn.next=t,Qn}function Kn(){if(bn===null){var t=Nt.alternate;t=t!==null?t.memoizedState:null}else t=bn.next;var r=Qn===null?Nt.memoizedState:Qn.next;if(r!==null)Qn=r,bn=t;else{if(t===null)throw Nt.alternate===null?Error(o(467)):Error(o(310));bn=t,t={memoizedState:bn.memoizedState,baseState:bn.baseState,baseQueue:bn.baseQueue,queue:bn.queue,next:null},Qn===null?Nt.memoizedState=Qn=t:Qn=Qn.next=t}return Qn}function Cd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function xu(t){var r=bu;return bu+=1,qs===null&&(qs=[]),t=Wb(qs,t,r),r=Nt,(Qn===null?r.memoizedState:Qn.next)===null&&(r=r.alternate,ge.H=r===null||r.memoizedState===null?qx:Yx),t}function Td(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return xu(t);if(t.$$typeof===B)return;if(t.$$typeof===H)return gr(t)}throw Error(o(438,String(t)))}function Pg(t){var r=null,i=Nt.updateQueue;if(i!==null&&(r=i.memoCache),r==null){var l=Nt.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(r={data:l.data.map(function(f){return f.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),i===null&&(i=Cd(),Nt.updateQueue=i),i.memoCache=r,i=r.data[r.index],i===void 0)for(i=r.data[r.index]=Array(t),l=0;l<t;l++)i[l]=se;return r.index++,i}function Mo(t,r){return typeof r=="function"?r(t):r}function Od(t){var r=Kn();return Lg(r,bn,t)}function Lg(t,r,i){var l=t.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=i;var f=t.baseQueue,m=l.pending;if(m!==null){if(f!==null){var E=f.next;f.next=m.next,m.next=E}r.baseQueue=f=m,l.pending=null}if(m=t.baseState,f===null)t.memoizedState=m;else{r=f.next;var k=E=null,Q=null,ie=r,pe=!1;do{var Ce=ie.lane&-536870913;if(Ce!==ie.lane?(Xt&Ce)===Ce:(Oo&Ce)===Ce){var ae=ie.revertLane;if(ae===0)Q!==null&&(Q=Q.next={lane:0,revertLane:0,gesture:null,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null}),Ce===Gi&&(pe=!0);else if((Oo&ae)===ae){ie=ie.next,ae===Gi&&(pe=!0);continue}else Ce={lane:0,revertLane:ie.revertLane,gesture:null,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null},Q===null?(k=Q=Ce,E=m):Q=Q.next=Ce,Nt.lanes|=ae,ui|=ae;Ce=ie.action,Ji&&i(m,Ce),m=ie.hasEagerState?ie.eagerState:i(m,Ce)}else ae={lane:Ce,revertLane:ie.revertLane,gesture:ie.gesture,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null},Q===null?(k=Q=ae,E=m):Q=Q.next=ae,Nt.lanes|=Ce,ui|=Ce;ie=ie.next}while(ie!==null&&ie!==r);if(Q===null?E=m:Q.next=k,!na(m,t.memoizedState)&&(Zn=!0,pe&&(i=Us,i!==null)))throw i;t.memoizedState=m,t.baseState=E,t.baseQueue=Q,l.lastRenderedState=m}return f===null&&(l.lanes=0),[t.memoizedState,l.dispatch]}function zg(t){var r=Kn(),i=r.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=t;var l=i.dispatch,f=i.pending,m=r.memoizedState;if(f!==null){i.pending=null;var E=f=f.next;do m=t(m,E.action),E=E.next;while(E!==f);na(m,r.memoizedState)||(Zn=!0),r.memoizedState=m,r.baseQueue===null&&(r.baseState=m),i.lastRenderedState=m}return[m,l]}function cx(t,r,i){var l=Nt,f=Kn(),m=Ft;if(m){if(i===void 0)throw Error(o(407));i=i()}else i=r();var E=!na((bn||f).memoizedState,i);if(E&&(f.memoizedState=i,Zn=!0),f=f.queue,Ug(hx.bind(null,l,f,t),[t]),t=f.getSnapshot!==r||E||Qn!==null&&(Qn.memoizedState.tag&1)!==0,Ys(t?9:8,{destroy:void 0},fx.bind(null,l,f,i,r),null),t){if(l.flags|=2048,Tn===null)throw Error(o(349));m||(Oo&127)!==0||dx(l,r,i)}return i}function dx(t,r,i){t.flags|=16384,t={getSnapshot:r,value:i},r=Nt.updateQueue,r===null?(r=Cd(),Nt.updateQueue=r,r.stores=[t]):(i=r.stores,i===null?r.stores=[t]:i.push(t))}function fx(t,r,i,l){r.value=i,r.getSnapshot=l,px(r)&&gx(t)}function hx(t,r,i){return i(function(){px(r)&&gx(t)})}function px(t){var r=t.getSnapshot;t=t.value;try{var i=r();return!na(t,i)}catch{return!0}}function gx(t){var r=Fi(t,2);r!==null&&Kr(r,t,2)}function _g(t){var r=Nr();if(typeof t=="function"){var i=t;if(t=i(),Ji){Ge(!0);try{i()}finally{Ge(!1)}}}return r.memoizedState=r.baseState=t,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mo,lastRenderedState:t},r}function mx(t,r,i,l){return t.baseState=i,Lg(t,bn,typeof l=="function"?l:Mo)}function uD(t,r,i,l,f){if(Dd(t))throw Error(o(485));if(t=r.action,t!==null){var m={payload:f,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(E){m.listeners.push(E)}};ge.T!==null?i(!0):m.isTransition=!1,l(m),i=r.pending,i===null?(m.next=r.pending=m,yx(r,m)):(m.next=i.next,r.pending=i.next=m)}}function yx(t,r){var i=r.action,l=r.payload,f=t.state;if(r.isTransition){var m=ge.T,E={};E.types=m!==null?m.types:null,ge.T=E;try{var k=i(f,l),Q=ge.S;Q!==null&&Q(E,k),vx(t,r,k)}catch(ie){Hg(t,r,ie)}finally{m!==null&&E.types!==null&&(m.types=E.types),ge.T=m}}else try{m=i(f,l),vx(t,r,m)}catch(ie){Hg(t,r,ie)}}function vx(t,r,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(l){bx(t,r,l)},function(l){return Hg(t,r,l)}):bx(t,r,i)}function bx(t,r,i){r.status="fulfilled",r.value=i,xx(r),t.state=i,r=t.pending,r!==null&&(i=r.next,i===r?t.pending=null:(i=i.next,r.next=i,yx(t,i)))}function Hg(t,r,i){var l=t.pending;if(t.pending=null,l!==null){l=l.next;do r.status="rejected",r.reason=i,xx(r),r=r.next;while(r!==l)}t.action=null}function xx(t){t=t.listeners;for(var r=0;r<t.length;r++)(0,t[r])()}function Sx(t,r){return r}function wx(t,r){if(Ft){var i=Tn.formState;if(i!==null){e:{var l=Nt;if(Ft){if(An){t:{for(var f=An,m=xa;f.nodeType!==8;){if(!m){f=null;break t}if(f=wa(f.nextSibling),f===null){f=null;break t}}m=f.data,f=m==="F!"||m==="F"?f:null}if(f){An=wa(f.nextSibling),l=f.data==="F!";break e}}Zo(l)}l=!1}l&&(r=i[0])}}return i=Nr(),i.memoizedState=i.baseState=r,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sx,lastRenderedState:r},i.queue=l,i=Fx.bind(null,Nt,l),l.dispatch=i,l=_g(!1),m=Yg.bind(null,Nt,!1,l.queue),l=Nr(),f={state:r,dispatch:null,action:t,pending:null},l.queue=f,i=uD.bind(null,Nt,f,m,i),f.dispatch=i,l.memoizedState=t,[r,i,!1]}function Rx(t){var r=Kn();return Ex(r,bn,t)}function Ex(t,r,i){if(r=Lg(t,r,Sx)[0],t=Od(Mo)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var l=xu(r)}catch(E){throw E===Fs?yd:E}else l=r;r=Kn();var f=r.queue,m=f.dispatch;return i!==r.memoizedState&&(Nt.flags|=2048,Ys(9,{destroy:void 0},cD.bind(null,f,i),null)),[l,m,t]}function cD(t,r){t.action=r}function Cx(t){var r=Kn(),i=bn;if(i!==null)return Ex(r,i,t);Kn(),r=r.memoizedState,i=Kn();var l=i.queue.dispatch;return i.memoizedState=t,[r,l,!1]}function Ys(t,r,i,l){return t={tag:t,create:i,deps:l,inst:r,next:null},r=Nt.updateQueue,r===null&&(r=Cd(),Nt.updateQueue=r),i=r.lastEffect,i===null?r.lastEffect=t.next=t:(l=i.next,i.next=t,t.next=l,r.lastEffect=t),t}function Tx(){return Kn().memoizedState}function Md(t,r,i,l){var f=Nr();Nt.flags|=t,f.memoizedState=Ys(1|r,{destroy:void 0},i,l===void 0?null:l)}function Ad(t,r,i,l){var f=Kn();l=l===void 0?null:l;var m=f.memoizedState.inst;bn!==null&&l!==null&&Dg(l,bn.memoizedState.deps)?f.memoizedState=Ys(r,m,i,l):(Nt.flags|=t,f.memoizedState=Ys(1|r,m,i,l))}function Ox(t,r){Md(8390656,8,t,r)}function Ug(t,r){Ad(2048,8,t,r)}function dD(t){Nt.flags|=4;var r=Nt.updateQueue;if(r===null)r=Cd(),Nt.updateQueue=r,r.events=[t];else{var i=r.events;i===null?r.events=[t]:i.push(t)}}function Mx(t){var r=Kn().memoizedState;return dD({ref:r,nextImpl:t}),function(){if((ln&2)!==0)throw Error(o(440));return r.impl.apply(void 0,arguments)}}function Ax(t,r){return Ad(4,2,t,r)}function Dx(t,r){return Ad(4,4,t,r)}function Nx(t,r){if(typeof r=="function"){t=t();var i=r(t);return function(){typeof i=="function"?i():r(null)}}if(r!=null)return t=t(),r.current=t,function(){r.current=null}}function jx(t,r,i){i=i!=null?i.concat([t]):null,Ad(4,4,Nx.bind(null,r,t),i)}function Fg(){}function Ix(t,r){var i=Kn();r=r===void 0?null:r;var l=i.memoizedState;return r!==null&&Dg(r,l[1])?l[0]:(i.memoizedState=[t,r],t)}function kx(t,r){var i=Kn();r=r===void 0?null:r;var l=i.memoizedState;if(r!==null&&Dg(r,l[1]))return l[0];if(l=t(),Ji){Ge(!0);try{t()}finally{Ge(!1)}}return i.memoizedState=[l,r],l}function Bg(t,r,i){return i===void 0||(Oo&1073741824)!==0&&(Xt&261930)===0?t.memoizedState=r:(t.memoizedState=i,t=q2(),Nt.lanes|=t,ui|=t,i)}function Px(t,r,i,l){return na(i,r)?i:ri.current!==null?(t=Bg(t,i,l),na(t,r)||(Zn=!0),t):(Oo&106)===0||(Oo&1073741824)!==0&&(Xt&261930)===0?(Zn=!0,t.memoizedState=i):(t=q2(),Nt.lanes|=t,ui|=t,r)}function Lx(t,r,i,l,f){var m=ce.p;ce.p=m!==0&&8>m?m:8;var E=ge.T,k={};k.types=E!==null?E.types:null,ge.T=k,Yg(t,!1,r,i);try{var Q=f(),ie=ge.S;if(ie!==null&&ie(k,Q),Q!==null&&typeof Q=="object"&&typeof Q.then=="function"){var pe=iD(Q,l);Su(t,r,pe,sa(t))}else Su(t,r,l,sa(t))}catch(Ce){Su(t,r,{then:function(){},status:"rejected",reason:Ce},sa())}finally{ce.p=m,E!==null&&k.types!==null&&(E.types=k.types),ge.T=E}}function fD(){}function Vg(t,r,i,l){if(t.tag!==5)throw Error(o(476));var f=zx(t).queue;Lx(t,f,r,Te,i===null?fD:function(){return _x(t),i(l)})}function zx(t){var r=t.memoizedState;if(r!==null)return r;r={memoizedState:Te,baseState:Te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mo,lastRenderedState:Te},next:null};var i={};return r.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mo,lastRenderedState:i},next:null},t.memoizedState=r,t=t.alternate,t!==null&&(t.memoizedState=r),r}function _x(t){var r=zx(t);r.next===null&&(r=t.alternate.memoizedState),Su(t,r.next.queue,{},sa())}function qg(){return gr(cl)}function Hx(){return Kn().memoizedState}function Ux(){return Kn().memoizedState}function hD(t){for(var r=t.return;r!==null;){switch(r.tag){case 24:case 3:var i=sa();t=ti(i);var l=ni(r,t,i);l!==null&&(Kr(l,r,i),gu(l,r,i)),r={cache:vg()},t.payload=r;return}r=r.return}}function pD(t,r,i){var l=sa();i={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Dd(t)?Bx(r,i):(i=ug(t,r,i,l),i!==null&&(Kr(i,t,l),Vx(i,r,l)))}function Fx(t,r,i){var l=sa();Su(t,r,i,l)}function Su(t,r,i,l){var f={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Dd(t))Bx(r,f);else{var m=t.alternate;if(t.lanes===0&&(m===null||m.lanes===0)&&(m=r.lastRenderedReducer,m!==null))try{var E=r.lastRenderedState,k=m(E,i);if(f.hasEagerState=!0,f.eagerState=k,na(k,E))return sd(t,r,f,0),Tn===null&&id(),!1}catch{}if(i=ug(t,r,f,l),i!==null)return Kr(i,t,l),Vx(i,r,l),!0}return!1}function Yg(t,r,i,l){if(l={lane:2,revertLane:Pm(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Dd(t)){if(r)throw Error(o(479))}else r=ug(t,i,l,2),r!==null&&Kr(r,t,2)}function Dd(t){var r=t.alternate;return t===Nt||r!==null&&r===Nt}function Bx(t,r){Vs=Rd=!0;var i=t.pending;i===null?r.next=r:(r.next=i.next,i.next=r),t.pending=r}function Vx(t,r,i){if((i&4194048)!==0){var l=r.lanes;l&=t.pendingLanes,i|=l,r.lanes=i,On(t,i)}}var Nd={readContext:gr,use:Td,useCallback:Bn,useContext:Bn,useEffect:Bn,useImperativeHandle:Bn,useLayoutEffect:Bn,useInsertionEffect:Bn,useMemo:Bn,useReducer:Bn,useRef:Bn,useState:Bn,useDebugValue:Bn,useDeferredValue:Bn,useTransition:Bn,useSyncExternalStore:Bn,useId:Bn,useHostTransitionStatus:Bn,useFormState:Bn,useActionState:Bn,useOptimistic:Bn,useMemoCache:Bn,useCacheRefresh:Bn,useEffectEvent:Bn},qx={readContext:gr,use:Td,useCallback:function(t,r){return Nr().memoizedState=[t,r===void 0?null:r],t},useContext:gr,useEffect:Ox,useImperativeHandle:function(t,r,i){i=i!=null?i.concat([t]):null,Md(4194308,4,Nx.bind(null,r,t),i)},useLayoutEffect:function(t,r){return Md(4194308,4,t,r)},useInsertionEffect:function(t,r){Md(4,2,t,r)},useMemo:function(t,r){var i=Nr();r=r===void 0?null:r;var l=t();if(Ji){Ge(!0);try{t()}finally{Ge(!1)}}return i.memoizedState=[l,r],l},useReducer:function(t,r,i){var l=Nr();if(i!==void 0){var f=i(r);if(Ji){Ge(!0);try{i(r)}finally{Ge(!1)}}}else f=r;return l.memoizedState=l.baseState=f,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:f},l.queue=t,t=t.dispatch=pD.bind(null,Nt,t),[l.memoizedState,t]},useRef:function(t){var r=Nr();return t={current:t},r.memoizedState=t},useState:function(t){t=_g(t);var r=t.queue,i=Fx.bind(null,Nt,r);return r.dispatch=i,[t.memoizedState,i]},useDebugValue:Fg,useDeferredValue:function(t,r){var i=Nr();return Bg(i,t,r)},useTransition:function(){var t=_g(!1);return t=Lx.bind(null,Nt,t.queue,!0,!1),Nr().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,r,i){var l=Nt,f=Nr();if(Ft){if(i===void 0)throw Error(o(407));i=i()}else{if(i=r(),Tn===null)throw Error(o(349));(Xt&127)!==0||dx(l,r,i)}f.memoizedState=i;var m={value:i,getSnapshot:r};return f.queue=m,Ox(hx.bind(null,l,m,t),[t]),l.flags|=2048,Ys(9,{destroy:void 0},fx.bind(null,l,m,i,r),null),i},useId:function(){var t=Nr(),r=Tn.identifierPrefix;if(Ft){var i=Xa,l=$a;i=(l&~(1<<32-et(l)-1)).toString(32)+i,r="_"+r+"R_"+i,i=Ed++,0<i&&(r+="H"+i.toString(32)),r+="_"}else i=sD++,r="_"+r+"r_"+i.toString(32)+"_";return t.memoizedState=r},useHostTransitionStatus:qg,useFormState:wx,useActionState:wx,useOptimistic:function(t){var r=Nr();r.memoizedState=r.baseState=t;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=i,r=Yg.bind(null,Nt,!0,i),i.dispatch=r,[t,r]},useMemoCache:Pg,useCacheRefresh:function(){return Nr().memoizedState=hD.bind(null,Nt)},useEffectEvent:function(t){var r=Nr(),i={impl:t};return r.memoizedState=i,function(){if((ln&2)!==0)throw Error(o(440));return i.impl.apply(void 0,arguments)}}},Yx={readContext:gr,use:Td,useCallback:Ix,useContext:gr,useEffect:Ug,useImperativeHandle:jx,useInsertionEffect:Ax,useLayoutEffect:Dx,useMemo:kx,useReducer:Od,useRef:Tx,useState:function(){return Od(Mo)},useDebugValue:Fg,useDeferredValue:function(t,r){var i=Kn();return Px(i,bn.memoizedState,t,r)},useTransition:function(){var t=Od(Mo)[0],r=Kn().memoizedState;return[typeof t=="boolean"?t:xu(t),r]},useSyncExternalStore:cx,useId:Hx,useHostTransitionStatus:qg,useFormState:Rx,useActionState:Rx,useOptimistic:function(t,r){var i=Kn();return mx(i,bn,t,r)},useMemoCache:Pg,useCacheRefresh:Ux,useEffectEvent:Mx},gD={readContext:gr,use:Td,useCallback:Ix,useContext:gr,useEffect:Ug,useImperativeHandle:jx,useInsertionEffect:Ax,useLayoutEffect:Dx,useMemo:kx,useReducer:zg,useRef:Tx,useState:function(){return zg(Mo)},useDebugValue:Fg,useDeferredValue:function(t,r){var i=Kn();return bn===null?Bg(i,t,r):Px(i,bn.memoizedState,t,r)},useTransition:function(){var t=zg(Mo)[0],r=Kn().memoizedState;return[typeof t=="boolean"?t:xu(t),r]},useSyncExternalStore:cx,useId:Hx,useHostTransitionStatus:qg,useFormState:Cx,useActionState:Cx,useOptimistic:function(t,r){var i=Kn();return bn!==null?mx(i,bn,t,r):(i.baseState=t,[t,i.queue.dispatch])},useMemoCache:Pg,useCacheRefresh:Ux,useEffectEvent:Mx};function Kg(t,r,i,l){r=t.memoizedState,i=i(l,r),i=i==null?r:I({},r,i),t.memoizedState=i,t.lanes===0&&(t.updateQueue.baseState=i)}var Gg={enqueueSetState:function(t,r,i){t=t._reactInternals;var l=sa(),f=ti(l);f.payload=r,i!=null&&(f.callback=i),r=ni(t,f,l),r!==null&&(Kr(r,t,l),gu(r,t,l))},enqueueReplaceState:function(t,r,i){t=t._reactInternals;var l=sa(),f=ti(l);f.tag=1,f.payload=r,i!=null&&(f.callback=i),r=ni(t,f,l),r!==null&&(Kr(r,t,l),gu(r,t,l))},enqueueForceUpdate:function(t,r){t=t._reactInternals;var i=sa(),l=ti(i);l.tag=2,r!=null&&(l.callback=r),r=ni(t,l,i),r!==null&&(Kr(r,t,i),gu(r,t,i))}};function Kx(t,r,i,l,f,m,E){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(l,m,E):r.prototype&&r.prototype.isPureReactComponent?!su(i,l)||!su(f,m):!0}function Gx(t,r,i,l){t=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(i,l),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(i,l),r.state!==t&&Gg.enqueueReplaceState(r,r.state,null)}function Wi(t,r){var i=r;if("ref"in r){i={};for(var l in r)l!=="ref"&&(i[l]=r[l])}if(t=t.defaultProps){i===r&&(i=I({},i));for(var f in t)i[f]===void 0&&(i[f]=t[f])}return i}function $x(t){od(t)}function Xx(t){console.error(t)}function Qx(t){od(t)}function jd(t,r){try{var i=t.onUncaughtError;i(r.value,{componentStack:r.stack})}catch(l){setTimeout(function(){throw l})}}function Zx(t,r,i){try{var l=t.onCaughtError;l(i.value,{componentStack:i.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function $g(t,r,i){return i=ti(i),i.tag=3,i.payload={element:null},i.callback=function(){jd(t,r)},i}function Jx(t){return t=ti(t),t.tag=3,t}function Wx(t,r,i,l){var f=i.type.getDerivedStateFromError;if(typeof f=="function"){var m=l.value;t.payload=function(){return f(m)},t.callback=function(){Zx(r,i,l)}}var E=i.stateNode;E!==null&&typeof E.componentDidCatch=="function"&&(t.callback=function(){Zx(r,i,l),typeof f!="function"&&(ci===null?ci=new Set([this]):ci.add(this));var k=l.stack;this.componentDidCatch(l.value,{componentStack:k!==null?k:""})})}function mD(t,r,i,l,f){if(i.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(r=i.alternate,r!==null&&Yi(r,i,f,!0),i=mr.current,i!==null){switch(i.tag){case 31:case 13:case 19:return Rr===null?Wd():i.alternate===null&&Vn===0&&(Vn=3),i.flags&=-257,i.flags|=65536,i.lanes=f,l===vd?i.flags|=16384:(r=i.updateQueue,r===null?i.updateQueue=new Set([l]):r.add(l),jm(t,l,f)),!1;case 22:return i.flags|=65536,l===vd?i.flags|=16384:(r=i.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([l])},i.updateQueue=r):(i=r.retryQueue,i===null?r.retryQueue=new Set([l]):i.add(l)),jm(t,l,f)),!1}throw Error(o(435,i.tag))}return jm(t,l,f),Wd(),!1}if(Ft)return r=mr.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=f,l!==pg&&(t=Error(o(422),{cause:l}),cu(ya(t,i)))):(l!==pg&&(r=Error(o(423),{cause:l}),cu(ya(r,i))),t=t.current.alternate,t.flags|=65536,f&=-f,t.lanes|=f,l=ya(l,i),f=$g(t.stateNode,l,f),Eg(t,f),Vn!==4&&(Vn=2)),!1;var m=Error(o(520),{cause:l});if(m=ya(m,i),Au===null?Au=[m]:Au.push(m),Vn!==4&&(Vn=2),r===null)return!0;l=ya(l,i),i=r;do{switch(i.tag){case 3:return i.flags|=65536,t=f&-f,i.lanes|=t,t=$g(i.stateNode,l,t),Eg(i,t),!1;case 1:if(r=i.type,m=i.stateNode,(i.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(ci===null||!ci.has(m))))return i.flags|=65536,f&=-f,i.lanes|=f,f=Jx(f),Wx(f,t,i,l),Eg(i,f),!1;break;case 22:if(i.memoizedState!==null)return i.flags|=65536,!1}i=i.return}while(i!==null);return!1}var Xg=Error(o(461)),Zn=!1;function rr(t,r,i,l){r.child=t===null?rx(r,null,i,l):Zi(r,t.child,i,l)}function e2(t,r,i,l,f){i=i.render;var m=r.ref;if("ref"in l){var E={};for(var k in l)k!=="ref"&&(E[k]=l[k])}else E=l;return Ki(r),l=Ng(t,r,i,E,m,f),k=jg(),t!==null&&!Zn?(Ig(t,r,f),Ao(t,r,f)):(Ft&&k&&dd(r),r.flags|=1,rr(t,r,l,f),r.child)}function t2(t,r,i,l,f){if(t===null){var m=i.type;return typeof m=="function"&&!cg(m)&&m.defaultProps===void 0&&i.compare===null?(r.tag=15,r.type=m,n2(t,r,m,l,f)):(t=ud(i.type,null,l,r,r.mode,f),t.ref=r.ref,t.return=r,r.child=t)}if(m=t.child,!rm(t,f)){var E=m.memoizedProps;if(i=i.compare,i=i!==null?i:su,i(E,l)&&t.ref===r.ref)return Ao(t,r,f)}return r.flags|=1,t=Ro(m,l),t.ref=r.ref,t.return=r,r.child=t}function n2(t,r,i,l,f){if(t!==null){var m=t.memoizedProps;if(su(m,l)&&t.ref===r.ref)if(Zn=!1,r.pendingProps=l=m,rm(t,f))(t.flags&131072)!==0&&(Zn=!0);else return r.lanes=t.lanes,Ao(t,r,f)}return Qg(t,r,i,l,f)}function r2(t,r,i,l){var f=l.children,m=t!==null?t.memoizedState:null;if(t===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((r.flags&128)!==0){if(m=m!==null?m.baseLanes|i:i,t!==null){for(l=r.child=t.child,f=0;l!==null;)f=f|l.lanes|l.childLanes,l=l.sibling;l=f&~m}else l=0,r.child=null;return a2(t,r,m,i,l)}if((i&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},t!==null&&md(r,m!==null?m.cachePool:null),m!==null?ix(r,m):Tg(),sx(r);else return l=r.lanes=536870912,a2(t,r,m!==null?m.baseLanes|i:i,i,l)}else m!==null?(md(r,m.cachePool),ix(r,m),oi(),r.memoizedState=null):(t!==null&&md(r,null),Tg(),oi());return rr(t,r,f,i),r.child}function wu(t,r){return t!==null&&t.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function a2(t,r,i,l,f){var m=xg();return m=m===null?null:{parent:Xn._currentValue,pool:m},r.memoizedState={baseLanes:i,cachePool:m},t!==null&&md(r,null),Tg(),sx(r),t!==null&&Yi(t,r,l,!0),r.childLanes=f,null}function Id(t,r){return r=kd({mode:r.mode,children:r.children},t.mode),r.ref=t.ref,t.child=r,r.return=t,r}function o2(t,r,i){return Zi(r,t.child,null,i),t=Id(r,r.pendingProps),t.flags|=2,ra(r),r.memoizedState=null,t}function yD(t,r,i){var l=r.pendingProps,f=(r.flags&128)!==0;if(r.flags&=-129,t===null){if(Ft){if(l.mode==="hidden")return t=Id(r,l),r.lanes=536870912,t.memoizedState={baseLanes:0,cachePool:null},wu(null,t);if(Mg(r),(t=An)?(t=N1(t,xa),t=t!==null&&t.data==="&"?t:null,t!==null&&(r.memoizedState={dehydrated:t,treeContext:Xo!==null?{id:$a,overflow:Xa}:null,retryLane:536870912,hydrationErrors:null},i=Bb(t),i.return=r,r.child=i,ir=r,An=null)):t=null,t===null)throw Zo(r);return r.lanes=536870912,null}return Id(r,l)}var m=t.memoizedState;if(m!==null){var E=m.dehydrated;if(Mg(r),f)if(r.flags&256)r.flags&=-257,r=o2(t,r,i);else if(r.memoizedState!==null)r.child=t.child,r.flags|=128,r=null;else throw Error(o(558));else if(Zn||Yi(t,r,i,!1),f=(i&t.childLanes)!==0,Zn||f){if(ri.current===null){if(l=Tn,l!==null&&(E=Vt(l,i),E!==0&&E!==m.retryLane))throw m.retryLane=E,Fi(t,E),Kr(l,t,E),Xg;Wd()}r=o2(t,r,i)}else t=m.treeContext,An=wa(E.nextSibling),ir=r,Ft=!0,Qo=null,xa=!1,t!==null&&Yb(r,t),r=Id(r,l),r.flags|=134221824;return r}return t=Ro(t.child,{mode:l.mode,children:l.children}),t.ref=r.ref,r.child=t,t.return=r,t}function Ks(t,r){var i=r.ref;if(i===null)t!==null&&t.ref!==null&&(r.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(o(284));(t===null||t.ref!==i)&&(r.flags|=4194816)}}function Qg(t,r,i,l,f){return Ki(r),i=Ng(t,r,i,l,void 0,f),l=jg(),t!==null&&!Zn?(Ig(t,r,f),Ao(t,r,f)):(Ft&&l&&dd(r),r.flags|=1,rr(t,r,i,f),r.child)}function i2(t,r,i,l,f,m){return Ki(r),r.updateQueue=null,i=ux(r,l,i,f),lx(t),l=jg(),t!==null&&!Zn?(Ig(t,r,m),Ao(t,r,m)):(Ft&&l&&dd(r),r.flags|=1,rr(t,r,i,m),r.child)}function s2(t,r,i,l,f){if(Ki(r),r.stateNode===null){var m=Ls,E=i.contextType;typeof E=="object"&&E!==null&&(m=gr(E)),m=new i(l,m),r.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=Gg,r.stateNode=m,m._reactInternals=r,m=r.stateNode,m.props=l,m.state=r.memoizedState,m.refs={},wg(r),E=i.contextType,m.context=typeof E=="object"&&E!==null?gr(E):Ls,m.state=r.memoizedState,E=i.getDerivedStateFromProps,typeof E=="function"&&(Kg(r,i,E,l),m.state=r.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(E=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),E!==m.state&&Gg.enqueueReplaceState(m,m.state,null),yu(r,l,m,f),mu(),m.state=r.memoizedState),typeof m.componentDidMount=="function"&&(r.flags|=4194308),l=!0}else if(t===null){m=r.stateNode;var k=r.memoizedProps,Q=Wi(i,k);m.props=Q;var ie=m.context,pe=i.contextType;E=Ls,typeof pe=="object"&&pe!==null&&(E=gr(pe));var Ce=i.getDerivedStateFromProps;pe=typeof Ce=="function"||typeof m.getSnapshotBeforeUpdate=="function",k=r.pendingProps!==k,pe||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(k||ie!==E)&&Gx(r,m,l,E),ei=!1;var ae=r.memoizedState;m.state=ae,yu(r,l,m,f),mu(),ie=r.memoizedState,k||ae!==ie||ei?(typeof Ce=="function"&&(Kg(r,i,Ce,l),ie=r.memoizedState),(Q=ei||Kx(r,i,Q,l,ae,ie,E))?(pe||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(r.flags|=4194308)):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=l,r.memoizedState=ie),m.props=l,m.state=ie,m.context=E,l=Q):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),l=!1)}else{m=r.stateNode,Rg(t,r),E=r.memoizedProps,pe=Wi(i,E),m.props=pe,Ce=r.pendingProps,ae=m.context,ie=i.contextType,Q=Ls,typeof ie=="object"&&ie!==null&&(Q=gr(ie)),k=i.getDerivedStateFromProps,(ie=typeof k=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(E!==Ce||ae!==Q)&&Gx(r,m,l,Q),ei=!1,ae=r.memoizedState,m.state=ae,yu(r,l,m,f),mu();var fe=r.memoizedState;E!==Ce||ae!==fe||ei||t!==null&&t.dependencies!==null&&pd(t.dependencies)?(typeof k=="function"&&(Kg(r,i,k,l),fe=r.memoizedState),(pe=ei||Kx(r,i,pe,l,ae,fe,Q)||t!==null&&t.dependencies!==null&&pd(t.dependencies))?(ie||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(l,fe,Q),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(l,fe,Q)),typeof m.componentDidUpdate=="function"&&(r.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof m.componentDidUpdate!="function"||E===t.memoizedProps&&ae===t.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||E===t.memoizedProps&&ae===t.memoizedState||(r.flags|=1024),r.memoizedProps=l,r.memoizedState=fe),m.props=l,m.state=fe,m.context=Q,l=pe):(typeof m.componentDidUpdate!="function"||E===t.memoizedProps&&ae===t.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||E===t.memoizedProps&&ae===t.memoizedState||(r.flags|=1024),l=!1)}return m=l,Ks(t,r),l=(r.flags&128)!==0,m||l?(m=r.stateNode,i=l&&typeof i.getDerivedStateFromError!="function"?null:m.render(),r.flags|=1,t!==null&&l?(r.child=Zi(r,t.child,null,f),r.child=Zi(r,null,i,f)):rr(t,r,i,f),r.memoizedState=m.state,t=r.child):t=Ao(t,r,f),t}function l2(t,r,i,l){return Vi(),r.flags|=256,rr(t,r,i,l),r.child}var Zg={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Jg(t){return{baseLanes:t,cachePool:Zb()}}function Wg(t,r,i){return t=t!==null?t.childLanes&~i:0,r&&(t|=ia),t}function u2(t,r,i){var l=r.pendingProps,f=!1,m=(r.flags&128)!==0,E;if((E=m)||(E=t!==null&&t.memoizedState===null?!1:(yr.current&2)!==0),E&&(f=!0,r.flags&=-129),E=(r.flags&32)!==0,r.flags&=-33,t===null){if(Ft){if(f?ai(r):oi(),(t=An)?(t=N1(t,xa),t=t!==null&&t.data!=="&"?t:null,t!==null&&(r.memoizedState={dehydrated:t,treeContext:Xo!==null?{id:$a,overflow:Xa}:null,retryLane:536870912,hydrationErrors:null},i=Bb(t),i.return=r,r.child=i,ir=r,An=null)):t=null,t===null)throw Zo(r);return Jm(t)?r.lanes=32:r.lanes=536870912,null}return m=l.children,l=l.fallback,f?(oi(),f=r.mode,m=kd({mode:"hidden",children:m},f),l=Bi(l,f,i,null),m.return=r,l.return=r,m.sibling=l,r.child=m,l=r.child,l.memoizedState=Jg(i),l.childLanes=Wg(t,E,i),r.memoizedState=Zg,wu(null,l)):(ai(r),em(r,m))}var k=t.memoizedState;if(k!==null){var Q=k.dehydrated;if(Q!==null)return vD(t,r,m,E,l,Q,k,i)}return f?(oi(),f=l.fallback,m=r.mode,k=t.child,Q=k.sibling,l=Ro(k,{mode:"hidden",children:l.children}),l.subtreeFlags=k.subtreeFlags&1206910976,Q!==null?f=Ro(Q,f):(f=Bi(f,m,i,null),f.flags|=2),f.return=r,l.return=r,l.sibling=f,r.child=l,wu(null,l),l=r.child,f=t.child.memoizedState,f===null?f=Jg(i):(m=f.cachePool,m!==null?(k=Xn._currentValue,m=m.parent!==k?{parent:k,pool:k}:m):m=Zb(),f={baseLanes:f.baseLanes|i,cachePool:m}),l.memoizedState=f,l.childLanes=Wg(t,E,i),r.memoizedState=Zg,wu(t.child,l)):(ai(r),i=t.child,t=i.sibling,i=Ro(i,{mode:"visible",children:l.children}),i.return=r,i.sibling=null,t!==null&&(E=r.deletions,E===null?(r.deletions=[t],r.flags|=16):E.push(t)),r.child=i,r.memoizedState=null,i)}function em(t,r){return r=kd({mode:"visible",children:r},t.mode),r.return=t,t.child=r}function kd(t,r){return t=Br(22,t,null,r),t.lanes=0,t}function Pd(t,r,i){return Zi(r,t.child,null,i),t=em(r,r.pendingProps.children),t.flags|=2,r.memoizedState=null,t}function vD(t,r,i,l,f,m,E,k){if(i)return r.flags&256?(ai(r),r.flags&=-257,Pd(t,r,k)):r.memoizedState!==null?(oi(),r.child=t.child,r.flags|=128,null):(oi(),m=f.fallback,E=r.mode,f=kd({mode:"visible",children:f.children},E),m=Bi(m,E,k,null),m.flags|=2,f.return=r,m.return=r,f.sibling=m,r.child=f,Zi(r,t.child,null,k),f=r.child,f.memoizedState=Jg(k),f.childLanes=Wg(t,l,k),r.memoizedState=Zg,wu(null,f));if(ai(r),Jm(m)){if(l=m.nextSibling&&m.nextSibling.dataset,l)var Q=l.dgst;return l=Q,l!==""&&(f=Error(o(419)),f.stack="",f.digest=l,cu({value:f,source:null,stack:null})),Pd(t,r,k)}if(Zn||Yi(t,r,k,!1),l=(k&t.childLanes)!==0,Zn||l){if(ri.current!==null)return Pd(t,r,k);if(l=Tn,l!==null&&(f=Vt(l,k),f!==0&&f!==E.retryLane))throw E.retryLane=f,Fi(t,f),Kr(l,t,f),Xg;return Zm(m)||Wd(),Pd(t,r,k)}return Zm(m)?(r.flags|=192,r.child=t.child,null):(t=E.treeContext,An=wa(m.nextSibling),ir=r,Ft=!0,Qo=null,xa=!1,t!==null&&Yb(r,t),r=em(r,f.children),r.flags|=134221824,r)}function c2(t,r,i){t.lanes|=r;var l=t.alternate;l!==null&&(l.lanes|=r),hd(t.return,r,i)}function d2(t){for(var r=null;t!==null;){var i=t.alternate;i!==null&&wd(i)===null&&(r=t),t=t.sibling}return r}function Ld(t,r,i,l,f,m){var E=t.memoizedState;E===null?t.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:l,tail:i,tailMode:f,treeForkCount:m}:(E.isBackwards=r,E.rendering=null,E.renderingStartTime=0,E.last=l,E.tail=i,E.tailMode=f,E.treeForkCount=m)}function tm(t){var r=t.child;for(t.child=null;r!==null;){var i=r.sibling;r.sibling=t.child,t.child=r,r=i}}function nm(t,r,i){var l=r.pendingProps,f=l.revealOrder,m=l.tail;l=l.children;var E=yr.current;if(r.flags&128)return vu(r,E),null;var k=(E&2)!==0;if(k?(E=E&1|2,r.flags|=128):E&=1,vu(r,E),f==="backwards"&&t!==null?(tm(t),rr(t,r,l,i),tm(t)):rr(t,r,l,i),l=Ft?uu:0,!k&&t!==null&&(t.flags&128)!==0)e:for(t=r.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&c2(t,i,r);else if(t.tag===19)c2(t,i,r);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===r)break e;for(;t.sibling===null;){if(t.return===null||t.return===r)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(f){case"backwards":i=d2(r.child),i===null?(f=r.child,r.child=null):(f=i.sibling,i.sibling=null,tm(r)),Ld(r,!0,f,null,m,l);break;case"unstable_legacy-backwards":for(i=null,f=r.child,r.child=null;f!==null;){if(t=f.alternate,t!==null&&wd(t)===null){r.child=f;break}t=f.sibling,f.sibling=i,i=f,f=t}Ld(r,!0,i,null,m,l);break;case"together":Ld(r,!1,null,null,void 0,l);break;case"independent":r.memoizedState=null;break;default:i=d2(r.child),i===null?(f=r.child,r.child=null):(f=i.sibling,i.sibling=null),Ld(r,!1,f,i,m,l)}return r.child}function f2(t,r,i){var l=r.pendingProps;return Jo(r,r.type,l.value),rr(t,r,l.children,i),r.child}function Ao(t,r,i){if(t!==null&&(r.dependencies=t.dependencies),ui|=r.lanes,(i&r.childLanes)===0)if(t!==null){if(Yi(t,r,i,!1),(i&r.childLanes)===0)return null}else return null;if(t!==null&&r.child!==t.child)throw Error(o(153));if(r.child!==null){for(t=r.child,i=Ro(t,t.pendingProps),r.child=i,i.return=r;t.sibling!==null;)t=t.sibling,i=i.sibling=Ro(t,t.pendingProps),i.return=r;i.sibling=null}return r.child}function rm(t,r){return(t.lanes&r)!==0?!0:(t=t.dependencies,!!(t!==null&&pd(t)))}function bD(t,r,i){switch(r.tag){case 3:Ze(r,r.stateNode.containerInfo),Jo(r,Xn,t.memoizedState.cache),Vi();break;case 27:case 5:de(r);break;case 4:Ze(r,r.stateNode.containerInfo);break;case 10:Jo(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,Mg(r),null;break;case 13:var l=r.memoizedState;if(l!==null){if(l.dehydrated!==null)return ai(r),r.flags|=128,null;l=Yi(t,r,i,!1);var f=r.child.childLanes;return l||(i&f)!==0?u2(t,r,i):(ai(r),t=Ao(t,r,i),t!==null?t.sibling:null)}ai(r);break;case 19:if(r.flags&128)return nm(t,r,i);if(f=(t.flags&128)!==0,l=(i&r.childLanes)!==0,l||(Yi(t,r,i,!1),l=(i&r.childLanes)!==0),f){if(l)return nm(t,r,i);r.flags|=128}if(f=r.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),vu(r,yr.current),l)break;return null;case 22:return r.lanes=0,r2(t,r,i,r.pendingProps);case 24:Jo(r,Xn,t.memoizedState.cache)}return Ao(t,r,i)}function h2(t,r,i){if(t!==null)if(t.memoizedProps!==r.pendingProps)Zn=!0;else{if(!rm(t,i)&&(r.flags&128)===0)return Zn=!1,bD(t,r,i);Zn=(t.flags&131072)!==0}else Zn=!1,Ft&&(r.flags&1048576)!==0&&qb(r,uu,r.index);switch(r.lanes=0,r.tag){case 16:e:{var l=r.pendingProps;if(t=Xi(r.elementType),r.type=t,typeof t=="function")cg(t)?(l=Wi(t,l),r.tag=1,r=s2(null,r,t,l,i)):(r.tag=0,r=Qg(null,r,t,l,i));else{if(t!=null){var f=t.$$typeof;if(f===L){r.tag=11,r=e2(null,r,t,l,i);break e}else if(f===V){r.tag=14,r=t2(null,r,t,l,i);break e}else if(f===H){r.tag=10,r.type=t,r=f2(null,r,i);break e}}throw r=le(t)||t,Error(o(306,r,""))}}return r;case 0:return Qg(t,r,r.type,r.pendingProps,i);case 1:return l=r.type,f=Wi(l,r.pendingProps),s2(t,r,l,f,i);case 3:e:{if(Ze(r,r.stateNode.containerInfo),t===null)throw Error(o(387));l=r.pendingProps;var m=r.memoizedState;f=m.element,Rg(t,r),yu(r,l,null,i);var E=r.memoizedState;if(l=E.cache,Jo(r,Xn,l),l!==m.cache&&yg(r,[Xn],i,!0),mu(),l=E.element,m.isDehydrated)if(m={element:l,isDehydrated:!1,cache:E.cache},r.updateQueue.baseState=m,r.memoizedState=m,r.flags&256){r=l2(t,r,l,i);break e}else if(l!==f){f=ya(Error(o(424)),r),cu(f),r=l2(t,r,l,i);break e}else for(t=r.stateNode.containerInfo,t.nodeType===9?t=t.body:t=t.nodeName==="HTML"?t.ownerDocument.body:t,An=wa(t.firstChild),ir=r,Ft=!0,Qo=null,xa=!0,i=rx(r,null,l,i),r.child=i;i;)i.flags=i.flags&-3|134221824,i=i.sibling;else{if(Vi(),l===f){r=Ao(t,r,i);break e}rr(t,r,l,i)}r=r.child}return r;case 26:return Ks(t,r),t===null?(i=_1(r.type,null,r.pendingProps,null))?r.memoizedState=i:Ft||(r.stateNode=y1(r.type,r.pendingProps,be.current,r)):r.memoizedState=_1(r.type,t.memoizedProps,r.pendingProps,t.memoizedState),null;case 27:return de(r),t===null&&Ft&&(l=r.stateNode=k1(r.type,r.pendingProps,be.current),ir=r,xa=!0,f=An,hi(r.type)?(Wm=f,An=wa(l.firstChild)):An=f),rr(t,r,r.pendingProps.children,i),Ks(t,r),t===null&&(r.flags|=4194304),r.child;case 5:return t===null&&Ft&&((f=l=An)&&(l=hN(l,r.type,r.pendingProps,xa),l!==null?(r.stateNode=l,ir=r,An=wa(l.firstChild),xa=!1,f=!0):f=!1),f||Zo(r)),de(r),f=r.type,m=r.pendingProps,E=t!==null?t.memoizedProps:null,l=m.children,qm(f,m)?l=null:E!==null&&qm(f,E)&&(r.flags|=32),r.memoizedState!==null&&(f=Ng(t,r,lD,null,null,i),cl._currentValue=f),Ks(t,r),rr(t,r,l,i),r.child;case 6:return t===null&&Ft&&((t=i=An)&&(i=pN(i,r.pendingProps,xa),i!==null?(r.stateNode=i,ir=r,An=null,t=!0):t=!1),t||Zo(r)),null;case 13:return u2(t,r,i);case 4:return Ze(r,r.stateNode.containerInfo),l=r.pendingProps,t===null?r.child=Zi(r,null,l,i):rr(t,r,l,i),r.child;case 11:return e2(t,r,r.type,r.pendingProps,i);case 7:return l=r.pendingProps,Ks(t,r),rr(t,r,l,i),r.child;case 8:return rr(t,r,r.pendingProps.children,i),r.child;case 12:return rr(t,r,r.pendingProps.children,i),r.child;case 10:return f2(t,r,i);case 9:return f=r.type._context,l=r.pendingProps.children,Ki(r),f=gr(f),l=l(f),r.flags|=1,rr(t,r,l,i),r.child;case 14:return t2(t,r,r.type,r.pendingProps,i);case 15:return n2(t,r,r.type,r.pendingProps,i);case 19:return nm(t,r,i);case 31:return yD(t,r,i);case 22:return r2(t,r,i,r.pendingProps);case 24:return Ki(r),l=gr(Xn),t===null?(f=xg(),f===null&&(f=Tn,m=vg(),f.pooledCache=m,m.refCount++,m!==null&&(f.pooledCacheLanes|=i),f=m),r.memoizedState={parent:l,cache:f},wg(r),Jo(r,Xn,f)):((t.lanes&i)!==0&&(Rg(t,r),yu(r,null,null,i),mu()),f=t.memoizedState,m=r.memoizedState,f.parent!==l?(f={parent:l,cache:l},r.memoizedState=f,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=f),Jo(r,Xn,l)):(l=m.cache,Jo(r,Xn,l),l!==f.cache&&yg(r,[Xn],i,!0))),rr(t,r,r.pendingProps.children,i),r.child;case 30:return r.stateNode===null&&(r.stateNode={autoName:null,paired:null,clones:null,ref:null}),l=r.pendingProps,l.name!=null&&l.name!=="auto"?r.flags|=t===null?18882560:18874368:Ft&&dd(r),t!==null&&t.memoizedProps.name!==l.name?r.flags|=4194816:Ks(t,r),rr(t,r,l.children,i),r.child;case 29:throw r.pendingProps}throw Error(o(156,r.tag))}function Do(t){t.flags|=4}function am(t,r,i,l,f){var m;if((m=(t.mode&32)!==0)&&(m=i===null?B1(r,l):B1(r,l)&&(l.src!==i.src||l.srcSet!==i.srcSet)),m){if(t.flags|=16777216,(f&335544128)===f)if(t.stateNode.complete)t.flags|=8192;else if($2())t.flags|=8192;else throw Qi=vd,Sg}else t.flags&=-16777217}function p2(t,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!V1(r))if($2())t.flags|=8192;else throw Qi=vd,Sg}function zd(t,r){r!==null&&(t.flags|=4),t.flags&16384&&(r=t.tag!==22?tt():536870912,t.lanes|=r,Zs|=r)}function Ru(t,r){if(!Ft)switch(t.tailMode){case"visible":break;case"collapsed":for(var i=t.tail,l=null;i!==null;)i.alternate!==null&&(l=i),i=i.sibling;l===null?r||t.tail===null?t.tail=null:t.tail.sibling=null:l.sibling=null;break;default:for(r=t.tail,i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?t.tail=null:i.sibling=null}}function Dn(t){var r=t.alternate!==null&&t.alternate.child===t.child,i=0,l=0;if(r)for(var f=t.child;f!==null;)i|=f.lanes|f.childLanes,l|=f.subtreeFlags&1206910976,l|=f.flags&1206910976,f.return=t,f=f.sibling;else for(f=t.child;f!==null;)i|=f.lanes|f.childLanes,l|=f.subtreeFlags,l|=f.flags,f.return=t,f=f.sibling;return t.subtreeFlags|=l,t.childLanes=i,r}function xD(t,r,i){var l=r.pendingProps;switch(hg(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Dn(r),null;case 1:return Dn(r),null;case 3:return i=r.stateNode,l=null,t!==null&&(l=t.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),To(Xn),it(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(t===null||t.child===null)&&(Hs(r)?Do(r):t===null||t.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,gg())),Dn(r),null;case 26:var f=r.type,m=r.memoizedState;return t===null?(Do(r),m!==null?(Dn(r),p2(r,m)):(Dn(r),am(r,f,null,l,i))):m?m!==t.memoizedState?(Do(r),Dn(r),p2(r,m)):(Dn(r),r.flags&=-16777217):(t=t.memoizedProps,t!==l&&Do(r),Dn(r),am(r,f,t,l,i)),null;case 27:if(we(r),i=be.current,f=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==l&&Do(r);else{if(!l){if(r.stateNode===null)throw Error(o(166));return Dn(r),r.subtreeFlags&=-33554433,null}t=Oe.current,Hs(r)?Kb(r):(t=k1(f,l,i),r.stateNode=t,Do(r))}return Dn(r),r.subtreeFlags&=-33554433,null;case 5:if(we(r),f=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==l&&Do(r);else{if(!l){if(r.stateNode===null)throw Error(o(166));return Dn(r),r.subtreeFlags&=-33554433,null}if(m=Oe.current,Hs(r))Kb(r);else{var E=ku(be.current);switch(m){case 1:m=E.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:m=E.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":m=E.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":m=E.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":m=E.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof l.is=="string"?E.createElement("select",{is:l.is}):E.createElement("select"),l.multiple?m.multiple=!0:l.size&&(m.size=l.size);break;default:m=typeof l.is=="string"?E.createElement(f,{is:l.is}):E.createElement(f)}}m[dn]=r,m[Mn]=l;e:for(E=r.child;E!==null;){if(E.tag===5||E.tag===6)m.appendChild(E.stateNode);else if(E.tag!==4&&E.tag!==27&&E.child!==null){E.child.return=E,E=E.child;continue}if(E===r)break e;for(;E.sibling===null;){if(E.return===null||E.return===r)break e;E=E.return}E.sibling.return=E.return,E=E.sibling}r.stateNode=m;e:switch(br(m,f,l),f){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Do(r)}}return Dn(r),r.subtreeFlags&=-33554433,am(r,r.type,t===null?null:t.memoizedProps,r.pendingProps,i),null;case 6:if(t&&r.stateNode!=null)t.memoizedProps!==l&&Do(r);else{if(typeof l!="string"&&r.stateNode===null)throw Error(o(166));if(t=be.current,Hs(r)){if(t=r.stateNode,i=r.memoizedProps,l=null,f=ir,f!==null)switch(f.tag){case 27:case 5:l=f.memoizedProps}t[dn]=r,t=!!(t.nodeValue===i||l!==null&&l.suppressHydrationWarning===!0||h1(t.nodeValue,i)),t||Zo(r,!0)}else t=ku(t).createTextNode(l),t[dn]=r,r.stateNode=t}return Dn(r),null;case 31:if(i=r.memoizedState,t===null||t.memoizedState!==null){if(l=Hs(r),i!==null){if(t===null){if(!l)throw Error(o(318));if(t=r.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(557));t[dn]=r}else Vi(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Dn(r),t=!1}else i=gg(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=i),t=!0;if(!t)return r.flags&256?(ra(r),r):(ra(r),null);if((r.flags&128)!==0)throw Error(o(558))}return Dn(r),null;case 13:if(l=r.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(f=Hs(r),l!==null&&l.dehydrated!==null){if(t===null){if(!f)throw Error(o(318));if(f=r.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(o(317));f[dn]=r}else Vi(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Dn(r),f=!1}else f=gg(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=f),f=!0;if(!f)return r.flags&256?(ra(r),r):(ra(r),null)}return ra(r),(r.flags&128)!==0?(r.lanes=i,r):(i=l!==null,t=t!==null&&t.memoizedState!==null,i&&(l=r.child,f=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(f=l.alternate.memoizedState.cachePool.pool),m=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(m=l.memoizedState.cachePool.pool),m!==f&&(l.flags|=2048)),i!==t&&i&&(r.child.flags|=8192),zd(r,r.updateQueue),Dn(r),null);case 4:return it(),t===null&&Hm(r.stateNode.containerInfo),r.flags|=67108864,Dn(r),null;case 10:return To(r.type),Dn(r),null;case 19:if(Ag(r),l=r.memoizedState,l===null)return Dn(r),null;if(f=(r.flags&128)!==0,m=l.rendering,m===null)if(f)Ru(l,!1);else{if(Vn!==0||t!==null&&(t.flags&128)!==0)for(t=r.child;t!==null;){if(m=wd(t),m!==null){for(r.flags|=128,Ru(l,!1),t=m.updateQueue,r.updateQueue=t,zd(r,t),r.subtreeFlags=0,t=i,i=r.child;i!==null;)Fb(i,t),i=i.sibling;return vu(r,yr.current&1|2),Ft&&Eo(r,l.treeForkCount),r.child}t=t.sibling}l.tail!==null&&xt()>Xd&&(r.flags|=128,f=!0,Ru(l,!1),r.lanes=4194304)}else{if(!f)if(t=wd(m),t!==null){if(r.flags|=128,f=!0,t=t.updateQueue,r.updateQueue=t,zd(r,t),Ru(l,!0),l.tail===null&&l.tailMode!=="collapsed"&&l.tailMode!=="visible"&&!m.alternate&&!Ft)return Dn(r),null}else 2*xt()-l.renderingStartTime>Xd&&i!==536870912&&(r.flags|=128,f=!0,Ru(l,!1),r.lanes=4194304);l.isBackwards?(m.sibling=r.child,r.child=m):(t=l.last,t!==null?t.sibling=m:r.child=m,l.last=m)}if(l.tail!==null){t=l.tail;e:{for(i=t;i!==null;){if(i.alternate!==null){i=!1;break e}i=i.sibling}i=!0}return l.rendering=t,l.tail=t.sibling,l.renderingStartTime=xt(),t.sibling=null,m=yr.current,m=f?m&1|2:m&1,l.tailMode==="visible"||l.tailMode==="collapsed"||!i||Ft?vu(r,m):(i=m,Fe(mr,r),Fe(yr,i),Rr===null&&(Rr=r)),Ft&&Eo(r,l.treeForkCount),t}return Dn(r),null;case 22:case 23:return ra(r),Og(),l=r.memoizedState!==null,t!==null?t.memoizedState!==null!==l&&(r.flags|=8192):l&&(r.flags|=8192),l?(i&536870912)!==0&&(r.flags&128)===0&&(Dn(r),r.subtreeFlags&6&&(r.flags|=8192)):Dn(r),i=r.updateQueue,i!==null&&zd(r,i.retryQueue),i=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),l=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool),l!==i&&(r.flags|=2048),t!==null&&Le($i),null;case 24:return i=null,t!==null&&(i=t.memoizedState.cache),r.memoizedState.cache!==i&&(r.flags|=2048),To(Xn),Dn(r),null;case 25:return null;case 30:return r.flags|=33554432,Dn(r),null}throw Error(o(156,r.tag))}function SD(t,r){switch(hg(r),r.tag){case 1:return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return To(Xn),it(),t=r.flags,(t&65536)!==0&&(t&128)===0?(r.flags=t&-65537|128,r):null;case 26:case 27:case 5:return we(r),null;case 31:if(r.memoizedState!==null){if(ra(r),r.alternate===null)throw Error(o(340));Vi()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 13:if(ra(r),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(o(340));Vi()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return Ag(r),t=r.flags,t&65536?(r.flags=t&-65537|128,t=r.memoizedState,t!==null&&(t.rendering=null,t.tail=null),r.flags|=4,r):null;case 4:return it(),null;case 10:return To(r.type),null;case 22:case 23:return ra(r),Og(),t!==null&&Le($i),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 24:return To(Xn),null;case 25:return null;default:return null}}function g2(t,r){switch(hg(r),r.tag){case 3:To(Xn),it();break;case 26:case 27:case 5:we(r);break;case 4:it();break;case 31:r.memoizedState!==null&&ra(r);break;case 13:ra(r);break;case 19:Ag(r);break;case 10:To(r.type);break;case 22:case 23:ra(r),Og(),t!==null&&Le($i);break;case 24:To(Xn)}}function Eu(t,r){try{var i=r.updateQueue,l=i!==null?i.lastEffect:null;if(l!==null){var f=l.next;i=f;do{if((i.tag&t)===t){l=void 0;var m=i.create,E=i.inst;l=m(),E.destroy=l}i=i.next}while(i!==f)}}catch(k){gn(r,r.return,k)}}function ii(t,r,i){try{var l=r.updateQueue,f=l!==null?l.lastEffect:null;if(f!==null){var m=f.next;l=m;do{if((l.tag&t)===t){var E=l.inst,k=E.destroy;if(k!==void 0){E.destroy=void 0,f=r;var Q=i,ie=k;try{ie()}catch(pe){gn(f,Q,pe)}}}l=l.next}while(l!==m)}}catch(pe){gn(r,r.return,pe)}}function m2(t){var r=t.updateQueue;if(r!==null){var i=t.stateNode;try{ox(r,i)}catch(l){gn(t,t.return,l)}}}function y2(t,r,i){i.props=Wi(t.type,t.memoizedProps),i.state=t.memoizedState;try{i.componentWillUnmount()}catch(l){gn(t,r,l)}}function Qa(t,r){try{var i=t.ref;if(i!==null){switch(t.tag){case 26:case 27:case 5:var l=t.stateNode;break;case 30:var f=t.stateNode,m=So(t.memoizedProps,f);(f.ref===null||f.ref.name!==m)&&(f.ref=E1(m)),l=f.ref;break;case 7:if(t.stateNode===null){var E=new la(t);h(t.child,!1,dN,E,void 0,void 0),t.stateNode=E}l=t.stateNode;break;default:l=t.stateNode}typeof i=="function"?t.refCleanup=i(l):i.current=l}}catch(k){gn(t,r,k)}}function vr(t,r){var i=t.ref,l=t.refCleanup;if(i!==null)if(typeof l=="function")try{l()}catch(f){gn(t,r,f)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(f){gn(t,r,f)}else i.current=null}function _d(t,r){if((t.tag===5||t.tag===27||t.tag===6)&&t.alternate===null&&r!==null)for(var i=0;i<r.length;i++)D1(t.stateNode,r[i])}function v2(t){for(var r=t.return;r!==null&&(im(r)&&D1(t.stateNode,r.stateNode),!om(r));)r=r.return}function Cu(t){for(var r=t.return;r!==null&&(im(r)&&fN(t.stateNode,r.stateNode),!om(r));)r=r.return}function om(t){return t.tag===5||t.tag===3||t.tag===27}function im(t){return t&&t.tag===7&&t.stateNode!==null}function sm(t){var r=t.type,i=t.memoizedProps,l=t.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":i.autoFocus&&l.focus();break e;case"img":i.src?l.src=i.src:i.srcSet&&(l.srcset=i.srcSet)}}catch(f){gn(t,t.return,f)}}function lm(t,r,i){try{var l=t.stateNode;GD(l,t.type,i,r),l[Mn]=r}catch(f){gn(t,t.return,f)}}function b2(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&hi(t.type)||t.tag===4}function um(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||b2(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&hi(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function cm(t,r,i,l){var f=t.tag;if(f===5||f===6)f=t.stateNode,r?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(f,r):(r=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,r.appendChild(f),i=i._reactRootContainer,i!=null||r.onclick!==null||(r.onclick=Ar)),_d(t,l),pt=!0;else if(f!==4&&(f===27&&(_d(t,l),l=null,hi(t.type)&&(i=t.stateNode,r=null)),t=t.child,t!==null))for(cm(t,r,i,l),t=t.sibling;t!==null;)cm(t,r,i,l),t=t.sibling}function Hd(t,r,i,l){var f=t.tag;if(f===5||f===6)f=t.stateNode,r?i.insertBefore(f,r):i.appendChild(f),_d(t,l),pt=!0;else if(f!==4&&(f===27&&(_d(t,l),l=null,hi(t.type)&&(i=t.stateNode)),t=t.child,t!==null))for(Hd(t,r,i,l),t=t.sibling;t!==null;)Hd(t,r,i,l),t=t.sibling}function x2(t){var r=t.stateNode,i=t.memoizedProps;try{for(var l=t.type,f=r.attributes;f.length;)r.removeAttributeNode(f[0]);br(r,l,i),r[dn]=t,r[Mn]=i}catch(m){gn(t,t.return,m)}}var Ud=!1,aa=null;function S2(t){(t.tag===30||(t.subtreeFlags&33554432)!==0)&&(Ud=!0)}var Za=null;function w2(){var t=Za;return Za=null,t}var Vr=0;function Gs(t,r,i,l,f){return Vr=0,R2(t.child,r,i,l,f)}function R2(t,r,i,l,f){for(var m=!1;t!==null;){if(t.tag===5){var E=t.stateNode;if(l!==null){var k=Gm(E);l.push(k),k.view&&(m=!0)}else m||Gm(E).view&&(m=!0);Ud=!0,w1(E,Vr===0?r:r+"_"+Vr,i),Vr++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&f||R2(t.child,r,i,l,f)&&(m=!0));t=t.sibling}return m}function Ja(t,r){for(;t!==null;)t.tag===5?R1(t.stateNode,t.memoizedProps):(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&r||Ja(t.child,r)),t=t.sibling}function Fd(t){if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if((t.tag!==22||t.memoizedState===null)&&(Fd(t),t.tag===30&&(t.flags&18874368)!==0&&t.stateNode.paired)){var r=t.memoizedProps;if(r.name==null||r.name==="auto")throw Error(o(544));var i=r.name;r=wo(r.default,r.share),r!=="none"&&(Gs(t,i,r,null,!1)||Ja(t.child,!1))}t=t.sibling}}function dm(t,r){if(t.tag===30){var i=t.stateNode,l=t.memoizedProps,f=So(l,i),m=wo(l.default,i.paired?l.share:l.enter);m!=="none"?Gs(t,f,m,null,!1)?(Fd(t),i.paired||r||tl(t,l.onEnter)):Ja(t.child,!1):Fd(t)}else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)dm(t,r),t=t.sibling;else Fd(t)}function fm(t){if(aa!==null&&aa.size!==0){var r=aa;if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if(t.tag!==22||t.memoizedState===null){if(t.tag===30&&(t.flags&18874368)!==0){var i=t.memoizedProps,l=i.name;if(l!=null&&l!=="auto"){var f=r.get(l);if(f!==void 0){var m=wo(i.default,i.share);if(m!=="none"&&(Gs(t,l,m,null,!1)?(m=t.stateNode,f.paired=m,m.paired=f,tl(t,i.onShare)):Ja(t.child,!1)),r.delete(l),r.size===0)break}}}fm(t)}t=t.sibling}}}function hm(t){if(t.tag===30){var r=t.memoizedProps,i=So(r,t.stateNode),l=aa!==null?aa.get(i):void 0,f=wo(r.default,l!==void 0?r.share:r.exit);f!=="none"&&(Gs(t,i,f,null,!1)?l!==void 0?(f=t.stateNode,l.paired=f,f.paired=l,aa.delete(i),tl(t,r.onShare)):tl(t,r.onExit):Ja(t.child,!1)),aa!==null&&fm(t)}else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)hm(t),t=t.sibling;else aa!==null&&fm(t)}function E2(t){for(t=t.child;t!==null;){if(t.tag===30){var r=t.memoizedProps,i=So(r,t.stateNode);r=wo(r.default,r.update),t.flags&=-5,r!=="none"&&Gs(t,i,r,t.memoizedState=[],!1)}else(t.subtreeFlags&33554432)!==0&&E2(t);t=t.sibling}}function pm(t){if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if(t.tag!==22||t.memoizedState===null){if(t.tag===30&&(t.flags&18874368)!==0){var r=t.stateNode;r.paired!==null&&(r.paired=null,Ja(t.child,!1))}pm(t)}t=t.sibling}}function Bd(t){if(t.tag===30)t.stateNode.paired=null,Ja(t.child,!1),pm(t);else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)Bd(t),t=t.sibling;else pm(t)}function C2(t){for(t=t.child;t!==null;)t.tag===30?Ja(t.child,!1):(t.subtreeFlags&33554432)!==0&&C2(t),t=t.sibling}function gm(t,r,i,l,f,m,E){for(var k=!1;r!==null;){if(r.tag===5){var Q=r.stateNode;if(m!==null&&Vr<m.length){var ie=m[Vr],pe=Gm(Q);(ie.view||pe.view)&&(k=!0);var Ce;if(Ce=(t.flags&4)===0)if(pe.clip)Ce=!0;else{Ce=ie.rect;var ae=pe.rect;Ce=Ce.y!==ae.y||Ce.x!==ae.x||Ce.height!==ae.height||Ce.width!==ae.width}Ce&&(t.flags|=4),pe.abs?pe=!ie.abs:(ie=ie.rect,pe=pe.rect,pe=ie.height!==pe.height||ie.width!==pe.width),pe&&(t.flags|=32)}else t.flags|=32;(t.flags&4)!==0&&w1(Q,Vr===0?i:i+"_"+Vr,f),k&&(t.flags&4)!==0||(Za===null&&(Za=[]),Za.push(Q,Vr===0?l:l+"_"+Vr,r.memoizedProps)),Vr++}else(r.tag!==22||r.memoizedState===null)&&(r.tag===30&&E?t.flags|=r.flags&32:gm(t,r.child,i,l,f,m,E)&&(k=!0));r=r.sibling}return k}function T2(t,r){for(t=t.child;t!==null;){if(t.tag===30){var i=t.memoizedProps,l=t.stateNode,f=So(i,l),m=wo(i.default,i.update),E;E=t.memoizedState,t.memoizedState=null,l=t;var k=t.child;Vr=0,f=gm(l,k,f,f,m,E,!1),(t.flags&4)!==0&&f&&tl(t,i.onUpdate)}else(t.subtreeFlags&33554432)!==0&&T2(t);t=t.sibling}}var sr=!1,hn=!1,Wa=!1,mm=!1,O2=typeof WeakSet=="function"?WeakSet:Set,lr=null,eo=!1,Tu=!1,Vd=!1,ym=!1;function wD(t,r,i){if(t=t.containerInfo,Bm=dl,t=Nb(t),rg(t)){if("selectionStart"in t)var l={start:t.selectionStart,end:t.selectionEnd};else e:{l=(l=t.ownerDocument)&&l.defaultView||window;var f=l.getSelection&&l.getSelection();if(f&&f.rangeCount!==0){l=f.anchorNode;var m=f.anchorOffset,E=f.focusNode;f=f.focusOffset;try{l.nodeType,E.nodeType}catch{l=null;break e}var k=0,Q=-1,ie=-1,pe=0,Ce=0,ae=t,fe=null;t:for(;;){for(var Ye;ae!==l||m!==0&&ae.nodeType!==3||(Q=k+m),ae!==E||f!==0&&ae.nodeType!==3||(ie=k+f),ae.nodeType===3&&(k+=ae.nodeValue.length),(Ye=ae.firstChild)!==null;)fe=ae,ae=Ye;for(;;){if(ae===t)break t;if(fe===l&&++pe===m&&(Q=k),fe===E&&++Ce===f&&(ie=k),(Ye=ae.nextSibling)!==null)break;ae=fe,fe=ae.parentNode}ae=Ye}l=Q===-1||ie===-1?null:{start:Q,end:ie}}else l=null}l=l||{start:0,end:0}}else l=null;for(Vm={focusedElem:t,selectionRange:l},dl=!1,i=(i&335544064)===i,lr=r,r=i?9270:1024;lr!==null;){if(t=lr,i&&(l=t.deletions,l!==null))for(m=0;m<l.length;m++)i&&hm(l[m]);if(t.alternate===null&&(t.flags&2)!==0)i&&S2(t),qd(i);else{if(t.tag===22){if(l=t.alternate,t.memoizedState!==null){l!==null&&l.memoizedState===null&&i&&hm(l),qd(i);continue}else if(l!==null&&l.memoizedState!==null){i&&S2(t),qd(i);continue}}l=t.child,(t.subtreeFlags&r)!==0&&l!==null?(l.return=t,lr=l):(i&&E2(t),qd(i))}}aa=null}function qd(t){for(;lr!==null;){var r=lr,i=t,l=r.alternate,f=r.flags;switch(r.tag){case 0:case 11:case 15:break;case 1:if((f&1024)!==0&&l!==null){i=void 0,f=l.memoizedProps,l=l.memoizedState;var m=r.stateNode;try{var E=Wi(r.type,f);i=m.getSnapshotBeforeUpdate(E,l),m.__reactInternalSnapshotBeforeUpdate=i}catch(k){gn(r,r.return,k)}}break;case 3:if((f&1024)!==0){if(l=r.stateNode.containerInfo,i=l.nodeType,i===9)Qm(l);else if(i===1)switch(l.nodeName){case"HEAD":case"HTML":case"BODY":Qm(l);break;default:l.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:i&&l!==null&&(i=So(l.memoizedProps,l.stateNode),f=r.memoizedProps,f=wo(f.default,f.update),f!=="none"&&Gs(l,i,f,l.memoizedState=[],!0));break;default:if((f&1024)!==0)throw Error(o(163))}if(l=r.sibling,l!==null){l.return=r.return,lr=l;break}lr=r.return}}function M2(t,r,i){var l=i.flags;switch(i.tag){case 0:case 11:case 15:to(t,i),l&4&&Eu(5,i);break;case 1:if(to(t,i),l&4)if(t=i.stateNode,r===null)try{t.componentDidMount()}catch(E){gn(i,i.return,E)}else{var f=Wi(i.type,r.memoizedProps);r=r.memoizedState;try{t.componentDidUpdate(f,r,t.__reactInternalSnapshotBeforeUpdate)}catch(E){gn(i,i.return,E)}}l&64&&m2(i),l&512&&Qa(i,i.return);break;case 3:if(to(t,i),l&64&&(t=i.updateQueue,t!==null)){if(r=null,i.child!==null)switch(i.child.tag){case 27:case 5:r=i.child.stateNode;break;case 1:r=i.child.stateNode}try{ox(t,r)}catch(E){gn(i,i.return,E)}}break;case 27:r===null&&l&4&&x2(i);case 26:case 5:to(t,i),r===null&&l&4&&sm(i),l&512&&Qa(i,i.return);break;case 12:to(t,i);break;case 31:to(t,i),l&4&&j2(t,i);break;case 13:to(t,i),l&4&&I2(t,i),l&64&&(t=i.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(i=kD.bind(null,i),gN(t,i))));break;case 22:if(l=i.memoizedState!==null||sr,!l){var m=r!==null&&r.memoizedState!==null||hn;r=sr,f=hn,sr=l,(hn=m)&&!f?(l=2,(i.subtreeFlags&8772)!==0&&(l|=1),za(t,i,l)):to(t,i),sr=r,hn=f}break;case 30:to(t,i),l&512&&Qa(i,i.return);break;case 7:l&512&&Qa(i,i.return);default:to(t,i)}}function vm(t,r){for(t=t.child;t!==null;)A2(t,r),t=t.sibling}function A2(t,r){switch(t.tag){case 5:case 26:try{var i=t.stateNode;if(r){var l=i.style;typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none"}else{var f=t.stateNode,m=t.memoizedProps.style,E=m!=null&&m.hasOwnProperty("display")?m.display:null;f.style.display=E==null||typeof E=="boolean"?"":(""+E).trim()}}catch(Q){gn(t,t.return,Q)}bm(t,r);break;case 6:try{t.stateNode.nodeValue=r?"":t.memoizedProps,pt=!0}catch(Q){gn(t,t.return,Q)}break;case 18:try{var k=t.stateNode;r?S1(k,!0):S1(t.stateNode,!1)}catch(Q){gn(t,t.return,Q)}break;case 22:case 23:t.memoizedState===null&&vm(t,r);break;default:vm(t,r)}}function bm(t,r){if(t.subtreeFlags&67108864)for(t=t.child;t!==null;){e:{var i=t,l=r;switch(i.tag){case 4:A2(i,l);break e;case 22:i.memoizedState===null&&bm(i,l);break e;default:bm(i,l)}}t=t.sibling}}function D2(t){var r=t.alternate;r!==null&&(t.alternate=null,D2(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&Yn(r)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var In=null,qr=!1;function Pa(t,r,i){for(i=i.child;i!==null;)N2(t,r,i),i=i.sibling}function N2(t,r,i){if(ze&&typeof ze.onCommitFiberUnmount=="function")try{ze.onCommitFiberUnmount(ke,i)}catch{}switch(i.tag){case 26:hn||vr(i,r),Pa(t,r,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&!hn&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:hn||vr(i,r),Cu(i);var l=In,f=qr;hi(i.type)&&(In=i.stateNode,qr=!1),Pa(t,r,i),P1(i.stateNode,i.type,i.memoizedProps),In=l,qr=f;break;case 5:hn||vr(i,r),Cu(i);case 6:if(i.tag===6&&Cu(i),l=In,f=qr,In=null,Pa(t,r,i),In=l,qr=f,In!==null)if(qr)try{(In.nodeType===9?In.body:In.nodeName==="HTML"?In.ownerDocument.body:In).removeChild(i.stateNode),pt=!0}catch(m){gn(i,r,m)}else try{In.removeChild(i.stateNode),pt=!0}catch(m){gn(i,r,m)}break;case 18:In!==null&&(qr?(t=In,x1(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,i.stateNode),fl(t)):x1(In,i.stateNode));break;case 4:l=In,f=qr,In=i.stateNode.containerInfo,qr=!0,Pa(t,r,i),In=l,qr=f;break;case 0:case 11:case 14:case 15:ii(2,i,r),hn||ii(4,i,r),Pa(t,r,i);break;case 1:hn||(vr(i,r),l=i.stateNode,typeof l.componentWillUnmount=="function"&&y2(i,r,l)),Pa(t,r,i);break;case 21:Pa(t,r,i);break;case 22:hn=(l=hn)||i.memoizedState!==null,Pa(t,r,i),hn=l;break;case 30:vr(i,r),Pa(t,r,i);break;case 7:hn||vr(i,r),Pa(t,r,i);break;default:Pa(t,r,i)}}function j2(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{fl(t)}catch(i){gn(r,r.return,i)}}}function I2(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{fl(t)}catch(i){gn(r,r.return,i)}}function RD(t){switch(t.tag){case 31:case 13:case 19:var r=t.stateNode;return r===null&&(r=t.stateNode=new O2),r;case 22:return t=t.stateNode,r=t._retryCache,r===null&&(r=t._retryCache=new O2),r;default:throw Error(o(435,t.tag))}}function Yd(t,r){var i=RD(t);r.forEach(function(l){if(!i.has(l)){i.add(l);var f=PD.bind(null,t,l);l.then(f,f)}})}function jr(t,r,i){var l=r.deletions;if(l!==null)for(var f=0;f<l.length;f++){var m=l[f],E=t,k=r,Q=k;e:for(;Q!==null;){switch(Q.tag){case 27:if(hi(Q.type)){In=Q.stateNode,qr=!1;break e}break;case 5:In=Q.stateNode,qr=!1;break e;case 3:case 4:In=Q.stateNode.containerInfo,qr=!0;break e}Q=Q.return}if(In===null)throw Error(o(160));N2(E,k,m),In=null,qr=!1,E=m.alternate,E!==null&&(E.return=null),m.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)k2(r,t,i),r=r.sibling}var La=null;function k2(t,r,i){var l=t.alternate,f=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(f&4&&(l=t.updateQueue,l=l!==null?l.events:null,l!==null))for(var m=0;m<l.length;m++){var E=l[m];E.ref.impl=E.nextImpl}jr(r,t,i),Ir(t),f&4&&(ii(3,t,t.return),Eu(3,t),ii(5,t,t.return));break;case 1:jr(r,t,i),Ir(t),f&512&&(hn||l===null||vr(l,l.return)),f&64&&sr&&(t=t.updateQueue,t!==null&&(r=t.callbacks,r!==null&&(i=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=i===null?r:i.concat(r))));break;case 26:if(m=La,jr(r,t,i),Ir(t),f&512&&(hn||l===null||vr(l,l.return)),f&4)if(f=l!==null?l.memoizedState:null,i=t.memoizedState,l===null)if(i===null)if(t.stateNode===null)if(sr)t.stateNode=y1(t.type,t.memoizedProps,r.containerInfo,t);else{e:{r=t.type,i=t.memoizedProps,f=m.ownerDocument||m;t:switch(r){case"title":l=f.getElementsByTagName("title")[0],(!l||l[pa]||l[dn]||l.namespaceURI==="http://www.w3.org/2000/svg"||l.hasAttribute("itemprop"))&&(l=f.createElement(r),f.head.insertBefore(l,f.querySelector("head > title"))),br(l,r,i),l[dn]=t,Se(l),r=l;break e;case"link":if(m=F1("link","href",f).get(r+(i.href||""))){for(E=0;E<m.length;E++)if(l=m[E],l.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&l.getAttribute("rel")===(i.rel==null?null:i.rel)&&l.getAttribute("title")===(i.title==null?null:i.title)&&l.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){m.splice(E,1);break t}}l=f.createElement(r),br(l,r,i),f.head.appendChild(l);break;case"meta":if(m=F1("meta","content",f).get(r+(i.content||""))){for(E=0;E<m.length;E++)if(l=m[E],l.getAttribute("content")===(i.content==null?null:""+i.content)&&l.getAttribute("name")===(i.name==null?null:i.name)&&l.getAttribute("property")===(i.property==null?null:i.property)&&l.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&l.getAttribute("charset")===(i.charSet==null?null:i.charSet)){m.splice(E,1);break t}}l=f.createElement(r),br(l,r,i),f.head.appendChild(l);break;default:throw Error(o(468,r))}l[dn]=t,Se(l),r=l}t.stateNode=r}else sr||r0(m,t.type,t.stateNode);else t.stateNode=U1(m,i,t.memoizedProps);else f!==i?(f===null?(r=l.stateNode,r===null||hn||r.parentNode.removeChild(r)):f.count--,i===null?sr||r0(m,t.type,t.stateNode):U1(m,i,t.memoizedProps)):i===null&&t.stateNode!==null&&lm(t,t.memoizedProps,l.memoizedProps);break;case 27:jr(r,t,i),Ir(t),f&512&&(hn||l===null||vr(l,l.return)),l!==null&&f&4&&lm(t,t.memoizedProps,l.memoizedProps);break;case 5:if(m=Wa,Wa=!1,jr(r,t,i),Wa=m,Ir(t),f&512&&(hn||l===null||vr(l,l.return)),t.flags&32){r=t.stateNode;try{Mr(r,""),pt=!0}catch(pe){gn(t,t.return,pe)}}f&4&&t.stateNode!=null&&(r=t.memoizedProps,lm(t,r,l!==null?l.memoizedProps:r)),f&1024&&(mm=!0);break;case 6:if(jr(r,t,i),Ir(t),f&4){if(t.stateNode===null)throw Error(o(162));r=t.memoizedProps,i=t.stateNode;try{i.nodeValue=r,pt=!0}catch(pe){gn(t,t.return,pe)}}break;case 3:if(pt=!1,sf=null,m=La,La=Pu(r.containerInfo),jr(r,t,i),La=m,Ir(t),f&4&&l!==null&&l.memoizedState.isDehydrated)try{fl(r.containerInfo)}catch(pe){gn(t,t.return,pe)}mm&&(mm=!1,P2(t)),pt=!1;break;case 4:f=Wa,Wa=sr,l=nr(),m=La,La=Pu(t.stateNode.containerInfo),jr(r,t,i),Ir(t),La=m,pt&&Tu&&(Vd=!0),pt=l,Wa=f;break;case 12:jr(r,t,i),Ir(t);break;case 31:jr(r,t,i),Ir(t),f&4&&(r=t.updateQueue,r!==null&&(t.updateQueue=null,Yd(t,r)));break;case 13:jr(r,t,i),Ir(t),t.child.flags&8192&&t.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&($d=xt()),f&4&&(r=t.updateQueue,r!==null&&(t.updateQueue=null,Yd(t,r)));break;case 22:m=t.memoizedState!==null,E=l!==null&&l.memoizedState!==null;var k=sr,Q=hn,ie=Wa;sr=k||m,Wa=ie||m,hn=Q||E,jr(r,t,i),hn=Q,Wa=ie,sr=k,Ir(t),f&8192&&(r=t.stateNode,r._visibility=m?r._visibility&-2:r._visibility|1,!m||l===null||E||sr||hn||(r=E||hn,i=sr,l=hn,sr=m||sr,hn=r,si(t,2),sr=i,hn=l),!m&&Wa||vm(t,m)),f&4&&(r=t.updateQueue,r!==null&&(i=r.retryQueue,i!==null&&(r.retryQueue=null,Yd(t,i))));break;case 19:jr(r,t,i),Ir(t),f&4&&(r=t.updateQueue,r!==null&&(t.updateQueue=null,Yd(t,r)));break;case 30:f&512&&(hn||l===null||vr(l,l.return)),f=nr(),m=Tu,E=(i&335544064)===i,k=t.memoizedProps,Tu=E&&wo(k.default,k.update)!=="none",jr(r,t,i),Ir(t),E&&l!==null&&pt&&(t.flags|=4),Tu=m,pt=f;break;case 21:break;case 7:f&512&&(hn||l===null||vr(l,l.return)),l&&l.stateNode!==null&&(l.stateNode._fragmentFiber=t);default:jr(r,t,i),Ir(t)}}function Ir(t){var r=t.flags;if(r&2){try{for(var i,l=t.return;l!==null;){if(b2(l)){i=l;break}l=l.return}l=null;for(var f=t.return;f!==null;){if(im(f)){var m=f.stateNode;l===null?l=[m]:l.push(m)}if(om(f))break;f=f.return}var E=l;if(i==null)throw Error(o(160));switch(i.tag){case 27:var k=i.stateNode,Q=um(t);Hd(t,Q,k,E);break;case 5:var ie=i.stateNode;i.flags&32&&(Mr(ie,""),i.flags&=-33);var pe=um(t);Hd(t,pe,ie,E);break;case 3:case 4:var Ce=i.stateNode.containerInfo,ae=um(t);cm(t,ae,Ce,E);break;default:throw Error(o(161))}}catch(fe){gn(t,t.return,fe)}t.flags&=-3}r&4096&&(t.flags&=-4097)}function P2(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var r=t;P2(r),r.tag===5&&r.flags&1024&&(r=r.stateNode,dl=!0,r.reset(),dl=!1),t=t.sibling}}function $s(t,r){if(r.subtreeFlags&9270)for(r=r.child;r!==null;)L2(r,t),r=r.sibling;else T2(r)}function L2(t,r){var i=t.alternate;if(i===null)dm(t,!1);else switch(t.tag){case 3:if(ym=eo=!1,w2(),$s(r,t),!eo&&!Vd){if(t=Za,t!==null)for(var l=0;l<t.length;l+=3){i=t[l];var f=t[l+1];R1(i,t[l+2]),i=i.ownerDocument.documentElement,i!==null&&i.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+f+")"})}t=r.containerInfo,t=t.nodeType===9?t.documentElement:t.ownerDocument.documentElement,t!==null&&t.style.viewTransitionName===""&&(t.style.viewTransitionName="none",t.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),t.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),ym=!0}Za=null;break;case 5:$s(r,t);break;case 4:l=eo,eo=!1,$s(r,t),eo&&(Vd=!0),eo=l;break;case 22:t.memoizedState===null&&(i.memoizedState!==null?dm(t,!1):$s(r,t));break;case 30:l=eo,f=w2(),eo=!1,$s(r,t),eo&&(t.flags|=4);var m=t.memoizedProps,E=t.stateNode;r=So(m,E),E=So(i.memoizedProps,E);var k=wo(m.default,m.update);k==="none"?r=!1:(m=i.memoizedState,i.memoizedState=null,i=t.child,Vr=0,r=gm(t,i,r,E,k,m,!0),Vr!==(m===null?0:m.length)&&(t.flags|=32)),(t.flags&4)!==0&&r?(tl(t,t.memoizedProps.onUpdate),Za=f):f!==null&&(f.push.apply(f,Za),Za=f),eo=(t.flags&32)!==0?!0:l;break;default:$s(r,t)}}function to(t,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)M2(t,r.alternate,r),r=r.sibling}function si(t,r){for(t=t.child;t!==null;){var i=t,l=r;switch(i.tag){case 0:case 11:case 14:case 15:ii(4,i,i.return),si(i,l);break;case 1:vr(i,i.return);var f=i.stateNode;typeof f.componentWillUnmount=="function"&&y2(i,i.return,f),si(i,l);break;case 27:(l&2)!==0&&P1(i.stateNode,i.type,i.memoizedProps);case 5:vr(i,i.return),i.tag!==5&&i.tag!==27||Cu(i),si(i,l);break;case 6:Cu(i);break;case 26:vr(i,i.return),f=i.stateNode,i.memoizedState!==null||f===null||hn||f.parentNode.removeChild(f),si(i,l);break;case 22:i.memoizedState===null&&si(i,l);break;case 30:vr(i,i.return),si(i,l);break;case 7:vr(i,i.return);default:si(i,l)}t=t.sibling}}function za(t,r,i){for(i=(r.subtreeFlags&8772)!==0?i:i&-2,r=r.child;r!==null;){var l=r.alternate,f=t,m=r,E=m.flags,k=(i&1)!==0;switch(m.tag){case 0:case 11:case 15:za(f,m,i),Eu(4,m);break;case 1:if(za(f,m,i),l=m,f=l.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(pe){gn(l,l.return,pe)}if(l=m,f=l.updateQueue,f!==null){var Q=l.stateNode;try{var ie=f.shared.hiddenCallbacks;if(ie!==null)for(f.shared.hiddenCallbacks=null,f=0;f<ie.length;f++)ax(ie[f],Q)}catch(pe){gn(l,l.return,pe)}}k&&E&64&&m2(m),Qa(m,m.return);break;case 27:(i&2)!==0&&x2(m);case 5:m.tag!==5&&m.tag!==27||v2(m),za(f,m,i),k&&l===null&&E&4&&sm(m),Qa(m,m.return);break;case 6:v2(m);break;case 26:Q=m.stateNode,m.memoizedState!==null||Q===null||sr||r0(Pu(Q.ownerDocument),m.type,Q),za(f,m,i),k&&l===null&&E&4&&sm(m),Qa(m,m.return);break;case 12:za(f,m,i);break;case 31:za(f,m,i),k&&E&4&&j2(f,m);break;case 13:za(f,m,i),k&&E&4&&I2(f,m);break;case 22:m.memoizedState===null&&za(f,m,i),Qa(m,m.return);break;case 30:za(f,m,i),Qa(m,m.return);break;case 7:Qa(m,m.return);default:za(f,m,i)}r=r.sibling}}function xm(t,r){var i=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),t=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(t=r.memoizedState.cachePool.pool),t!==i&&(t!=null&&t.refCount++,i!=null&&du(i))}function Sm(t,r){t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&du(t))}function Sa(t,r,i,l){var f=(i&335544064)===i;if(r.subtreeFlags&(f?10262:10256))for(r=r.child;r!==null;)z2(t,r,i,l),r=r.sibling;else f&&C2(r)}function z2(t,r,i,l){var f=(i&335544064)===i;f&&r.alternate===null&&r.return!==null&&r.return.alternate!==null&&Bd(r);var m=r.flags;switch(r.tag){case 0:case 11:case 15:Sa(t,r,i,l),m&2048&&Eu(9,r);break;case 1:Sa(t,r,i,l);break;case 3:Sa(t,r,i,l),f&&ym&&(t=t.containerInfo,t=t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,t.style.viewTransitionName==="root"&&(t.style.viewTransitionName=""),t=t.ownerDocument.documentElement,t!==null&&t.style.viewTransitionName==="none"&&(t.style.viewTransitionName="")),m&2048&&(m=null,r.alternate!==null&&(m=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==m&&(r.refCount++,m!=null&&du(m)));break;case 12:if(m&2048){Sa(t,r,i,l),m=r.stateNode;try{var E=r.memoizedProps,k=E.id,Q=E.onPostCommit;typeof Q=="function"&&Q(k,r.alternate===null?"mount":"update",m.passiveEffectDuration,-0)}catch(ie){gn(r,r.return,ie)}}else Sa(t,r,i,l);break;case 31:Sa(t,r,i,l);break;case 13:Sa(t,r,i,l);break;case 23:break;case 22:E=r.stateNode,k=r.alternate,r.memoizedState!==null?(f&&k!==null&&k.memoizedState===null&&Bd(k),E._visibility&2?Sa(t,r,i,l):Ou(t,r)):(f&&k!==null&&k.memoizedState!==null&&Bd(r),E._visibility&2?Sa(t,r,i,l):(E._visibility|=2,Xs(t,r,i,l,(r.subtreeFlags&10256)!==0||!1))),m&2048&&xm(k,r);break;case 24:Sa(t,r,i,l),m&2048&&Sm(r.alternate,r);break;case 30:f&&(m=r.alternate,m!==null&&(Ja(m.child,!0),Ja(r.child,!0))),Sa(t,r,i,l);break;default:Sa(t,r,i,l)}}function Xs(t,r,i,l,f){for(f=f&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var m=t,E=r,k=i,Q=l,ie=E.flags;switch(E.tag){case 0:case 11:case 15:Xs(m,E,k,Q,f),Eu(8,E);break;case 23:break;case 22:var pe=E.stateNode;E.memoizedState!==null?pe._visibility&2?Xs(m,E,k,Q,f):Ou(m,E):(pe._visibility|=2,Xs(m,E,k,Q,f)),f&&ie&2048&&xm(E.alternate,E);break;case 24:Xs(m,E,k,Q,f),f&&ie&2048&&Sm(E.alternate,E);break;default:Xs(m,E,k,Q,f)}r=r.sibling}}function Ou(t,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var i=t,l=r,f=l.flags;switch(l.tag){case 22:Ou(i,l),f&2048&&xm(l.alternate,l);break;case 24:Ou(i,l),f&2048&&Sm(l.alternate,l);break;default:Ou(i,l)}r=r.sibling}}var es=8192;function ts(t,r,i){if(t.subtreeFlags&es)for(t=t.child;t!==null;)_2(t,r,i),t=t.sibling}function _2(t,r,i){switch(t.tag){case 26:ts(t,r,i),t.flags&es&&(t.memoizedState!==null?AN(i,La,t.memoizedState,t.memoizedProps):(t=t.stateNode,(r&335544128)===r&&Y1(i,t)));break;case 5:ts(t,r,i),t.flags&es&&(t=t.stateNode,(r&335544128)===r&&Y1(i,t));break;case 3:case 4:var l=La;La=Pu(t.stateNode.containerInfo),ts(t,r,i),La=l;break;case 22:t.memoizedState===null&&(l=t.alternate,l!==null&&l.memoizedState!==null?(l=es,es=16777216,ts(t,r,i),es=l):ts(t,r,i));break;case 30:if((t.flags&es)!==0&&(l=t.memoizedProps.name,l!=null&&l!=="auto")){var f=t.stateNode;f.paired=null,aa===null&&(aa=new Map),aa.set(l,f)}ts(t,r,i);break;default:ts(t,r,i)}}function H2(t){var r=t.alternate;if(r!==null&&(t=r.child,t!==null)){r.child=null;do r=t.sibling,t.sibling=null,t=r;while(t!==null)}}function Mu(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var i=0;i<r.length;i++){var l=r[i];lr=l,F2(l,t)}H2(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)U2(t),t=t.sibling}function U2(t){switch(t.tag){case 0:case 11:case 15:Mu(t),t.flags&2048&&ii(9,t,t.return);break;case 3:Mu(t);break;case 12:Mu(t);break;case 22:var r=t.stateNode;t.memoizedState!==null&&r._visibility&2&&(t.return===null||t.return.tag!==13)?(r._visibility&=-3,Kd(t)):Mu(t);break;default:Mu(t)}}function Kd(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var i=0;i<r.length;i++){var l=r[i];lr=l,F2(l,t)}H2(t)}for(t=t.child;t!==null;){switch(r=t,r.tag){case 0:case 11:case 15:ii(8,r,r.return),Kd(r);break;case 22:i=r.stateNode,i._visibility&2&&(i._visibility&=-3,Kd(r));break;default:Kd(r)}t=t.sibling}}function F2(t,r){for(;lr!==null;){var i=lr;switch(i.tag){case 0:case 11:case 15:ii(8,i,r);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var l=i.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:du(i.memoizedState.cache)}if(l=i.child,l!==null)l.return=i,lr=l;else e:for(i=t;lr!==null;){l=lr;var f=l.sibling,m=l.return;if(D2(l),l===i){lr=null;break e}if(f!==null){f.return=m,lr=f;break e}lr=m}}}var ED={getCacheForType:function(t){var r=gr(Xn),i=r.data.get(t);return i===void 0&&(i=t(),r.data.set(t,i)),i},cacheSignal:function(){return gr(Xn).controller.signal}},CD=typeof WeakMap=="function"?WeakMap:Map,ln=0,Tn=null,qt=null,Xt=0,pn=0,oa=null,li=!1,Qs=!1,wm=!1,No=0,Vn=0,ui=0,ns=0,Gd=0,ia=0,Zs=0,Au=null,Yr=null,Rm=!1,$d=0,B2=0,Xd=1/0,Qd=null,ci=null,zn=0,_a=null,rs=null,no=0,Em=0,Cm=null,V2=null,Js=null,Ws=null,el=null,Du=0,Zd=null;function sa(){return(ln&2)!==0&&Xt!==0?Xt&-Xt:ge.T!==null?Pm():Cn()}function q2(){if(ia===0)if((Xt&536870912)===0||Ft){var t=ye;ye<<=1,(ye&3932160)===0&&(ye=262144),ia=t}else ia=536870912;return t=mr.current,t!==null&&(t.flags|=32),ia}function tl(t,r){if(r!=null){var i=t.stateNode,l=i.ref;l===null&&(l=i.ref=E1(So(t.memoizedProps,i))),Ws===null&&(Ws=[]),Ws.push(r.bind(null,l))}}function Kr(t,r,i){(t===Tn&&(pn===2||pn===9)||t.cancelPendingCommit!==null)&&(nl(t,0),di(t,Xt,ia,!1)),ct(t,i),((ln&2)===0||t!==Tn)&&(t===Tn&&((ln&2)===0&&(ns|=i),Vn===4&&di(t,Xt,ia,!1)),ro(t))}function Y2(t,r,i){if((ln&6)!==0)throw Error(o(327));var l=!i&&(r&127)===0&&(r&t.expiredLanes)===0||Xe(t,r),f=l?MD(t,r):Om(t,r,!0),m=l;do{if(f===0){Qs&&!l&&di(t,r,0,!1);break}else{if(i=t.current.alternate,m&&!TD(i)){f=Om(t,r,!1),m=!1;continue}if(f===2){if(m=r,t.errorRecoveryDisabledLanes&m)var E=0;else E=t.pendingLanes&-536870913,E=E!==0?E:E&536870912?536870912:0;if(E!==0){r=E;e:{var k=t;f=Au;var Q=k.current.memoizedState.isDehydrated;if(Q&&(nl(k,E).flags|=256),E=Om(k,E,!1),E!==2&&E!==6){if(wm&&!Q){k.errorRecoveryDisabledLanes|=m,ns|=m,f=4;break e}m=Yr,Yr=f,m!==null&&(Yr===null?Yr=m:Yr.push.apply(Yr,m))}f=E}if(m=!1,f!==2)continue}}if(f===1){nl(t,0),di(t,r,0,!0);break}e:{switch(l=t,m=f,m){case 0:case 1:throw Error(o(345));case 4:if((r&4194048)!==r&&(r&62914560)!==r)break;case 6:di(l,r,ia,!li);break e;case 2:Yr=null;break;case 3:case 5:break;default:throw Error(o(329))}if((r&62914560)===r&&(f=$d+300-xt(),10<f)){if(di(l,r,ia,!li),Ve(l,0,!0)!==0)break e;no=r,l.timeoutHandle=Km(K2.bind(null,l,i,Yr,Qd,Rm,r,ia,ns,Zs,li,m,"Throttled",-0,0),f);break e}K2(l,i,Yr,Qd,Rm,r,ia,ns,Zs,li,m,null,-0,0)}}break}while(!0);ro(t)}function K2(t,r,i,l,f,m,E,k,Q,ie,pe,Ce,ae,fe){t.timeoutHandle=-1;var Ye=r.subtreeFlags,rt=(m&335544064)===m;if(Ce=null,(rt||Ye&8192||(Ye&16785408)===16785408)&&(Ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ar},aa=null,_2(r,m,Ce),rt&&(Ye=Ce,rt=t.containerInfo,rt=(rt.nodeType===9?rt:rt.ownerDocument).__reactViewTransition,rt!=null&&(Ye.count++,Ye.waitingForViewTransition=!0,Ye=_u.bind(Ye),rt.finished.then(Ye,Ye))),Ye=(m&62914560)===m?$d-xt():(m&4194048)===m?B2-xt():0,Ye=DN(Ce,Ye),Ye!==null)){no=m,t.cancelPendingCommit=Ye(e1.bind(null,t,r,m,i,l,f,E,k,Q,ie,pe,Ce,null,ae,fe)),di(t,m,E,!ie);return}e1(t,r,m,i,l,f,E,k,Q,ie,pe,Ce)}function TD(t){for(var r=t;;){var i=r.tag;if((i===0||i===11||i===15)&&r.flags&16384&&(i=r.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var l=0;l<i.length;l++){var f=i[l],m=f.getSnapshot;f=f.value;try{if(!na(m(),f))return!1}catch{return!1}}if(i=r.child,r.subtreeFlags&16384&&i!==null)i.return=r,r=i;else{if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function di(t,r,i,l){r=$e(t,r),r&=~Gd,r&=~ns,t.suspendedLanes|=r,t.pingedLanes&=~r,l&&(t.warmLanes|=r),l=t.expirationTimes;for(var f=r;0<f;){var m=31-et(f),E=1<<m;l[m]=-1,f&=~E}i!==0&&Ht(t,i,r)}function Jd(){return(ln&6)===0?(Nu(0),!1):!0}function Tm(){if(qt!==null){if(pn===0)var t=qt.return;else t=qt,Co=qi=null,kg(t),Bs=null,pu=0,t=qt;for(;t!==null;)g2(t.alternate,t),t=t.return;qt=null}}function nl(t,r){var i=t.timeoutHandle;return i!==-1&&(t.timeoutHandle=-1,QD(i)),i=t.cancelPendingCommit,i!==null&&(t.cancelPendingCommit=null,i()),no=0,Tm(),Tn=t,qt=i=Ro(t.current,null),Xt=r,pn=0,oa=null,li=!1,Qs=Xe(t,r),wm=!1,Zs=ia=Gd=ns=ui=Vn=0,Yr=Au=null,Rm=!1,No=$e(t,r),id(),i}function G2(t,r){Nt=null,ge.H=Nd,r===Fs||r===yd?(r=ex(),pn=3):r===Sg?(r=ex(),pn=4):pn=r===Xg?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,oa=r,qt===null&&(Vn=1,jd(t,ya(r,t.current)))}function $2(){var t=mr.current;return t===null?!0:(Xt&4194048)===Xt?Rr===null:(Xt&62914560)===Xt||(Xt&536870912)!==0?t===Rr:!1}function X2(){var t=ge.H;return ge.H=Nd,t===null?Nd:t}function Q2(){var t=ge.A;return ge.A=ED,t}function Wd(){Vn=4,li||(Xt&4194048)!==Xt&&mr.current!==null||(Qs=!0),(ui&134217727)===0&&(ns&134217727)===0||Tn===null||di(Tn,Xt,ia,!1)}function Om(t,r,i){var l=ln;ln|=2;var f=X2(),m=Q2();(Tn!==t||Xt!==r)&&(Qd=null,nl(t,r)),r=!1;var E=Vn;e:do try{if(pn!==0&&qt!==null){var k=qt,Q=oa;switch(pn){case 8:Tm(),E=6;break e;case 3:case 2:case 9:case 6:mr.current===null&&(r=!0);var ie=pn;if(pn=0,oa=null,rl(t,k,Q,ie),i&&Qs){E=0;break e}break;default:ie=pn,pn=0,oa=null,rl(t,k,Q,ie)}}OD(),E=Vn;break}catch(pe){G2(t,pe)}while(!0);return r&&t.shellSuspendCounter++,Co=qi=null,ln=l,ge.H=f,ge.A=m,qt===null&&(Tn=null,Xt=0,id()),E}function OD(){for(;qt!==null;)Z2(qt)}function MD(t,r){var i=ln;ln|=2;var l=X2(),f=Q2();Tn!==t||Xt!==r?(Qd=null,Xd=xt()+500,nl(t,r)):Qs=Xe(t,r);e:do try{if(pn!==0&&qt!==null){r=qt;var m=oa;t:switch(pn){case 1:pn=0,oa=null,rl(t,r,m,1);break;case 2:case 9:if(Jb(m)){pn=0,oa=null,J2(r);break}r=function(){pn!==2&&pn!==9||Tn!==t||(pn=7),ro(t)},m.then(r,r);break e;case 3:pn=7;break e;case 4:pn=5;break e;case 7:Jb(m)?(pn=0,oa=null,J2(r)):(pn=0,oa=null,rl(t,r,m,7));break;case 5:var E=null;switch(qt.tag){case 26:E=qt.memoizedState;case 5:case 27:var k=qt;if(E?V1(E):k.stateNode.complete){pn=0,oa=null;var Q=k.sibling;if(Q!==null)qt=Q;else{var ie=k.return;ie!==null?(qt=ie,ef(ie)):qt=null}break t}}pn=0,oa=null,rl(t,r,m,5);break;case 6:pn=0,oa=null,rl(t,r,m,6);break;case 8:Tm(),Vn=6;break e;default:throw Error(o(462))}}AD();break}catch(pe){G2(t,pe)}while(!0);return Co=qi=null,ge.H=l,ge.A=f,ln=i,qt!==null?0:(Tn=null,Xt=0,id(),Vn)}function AD(){for(;qt!==null&&!en();)Z2(qt)}function Z2(t){var r=h2(t.alternate,t,No);t.memoizedProps=t.pendingProps,r===null?ef(t):qt=r}function J2(t){var r=t,i=r.alternate;switch(r.tag){case 15:case 0:r=i2(i,r,r.pendingProps,r.type,void 0,Xt);break;case 11:r=i2(i,r,r.pendingProps,r.type.render,r.ref,Xt);break;case 5:kg(r);var l=r;l===ir&&(Ft?(fd(l),l.tag===5&&l.stateNode!=null&&(An=l.stateNode)):(fd(l),Ft=!0));default:g2(i,r),r=qt=Fb(r,No),r=h2(i,r,No)}t.memoizedProps=t.pendingProps,r===null?ef(t):qt=r}function rl(t,r,i,l){Co=qi=null,kg(r),Bs=null,pu=0;var f=r.return;try{if(mD(t,f,r,i,Xt)){Vn=1,jd(t,ya(i,t.current)),qt=null;return}}catch(m){if(f!==null)throw qt=f,m;Vn=1,jd(t,ya(i,t.current)),qt=null;return}r.flags&32768?(Ft||l===1?t=!0:Qs||(Xt&536870912)!==0?t=!1:(li=t=!0,(l===2||l===9||l===3||l===6)&&(l=mr.current,l!==null&&l.tag===13&&(l.flags|=16384))),W2(r,t)):ef(r)}function ef(t){var r=t;do{if((r.flags&32768)!==0){W2(r,li);return}t=r.return;var i=xD(r.alternate,r,No);if(i!==null){qt=i;return}if(r=r.sibling,r!==null){qt=r;return}qt=r=t}while(r!==null);Vn===0&&(Vn=5)}function W2(t,r){do{var i=SD(t.alternate,t);if(i!==null){i.flags&=32767,qt=i;return}if(i=t.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!r&&(t=t.sibling,t!==null)){qt=t;return}qt=t=i}while(t!==null);Vn=6,qt=null}function e1(t,r,i,l,f,m,E,k,Q,ie,pe,Ce){t.cancelPendingCommit=null;do tf();while(zn!==0);if((ln&6)!==0)throw Error(o(327));if(r!==null){if(r===t.current)throw Error(o(177));t===Tn&&(qt=Tn=null,Xt=0),rs=r,_a=t,no=i,Cm=f,V2=l,DD(t,r,i,E,k,Q,Ce)}}function DD(t,r,i,l,f,m,E){var k=r.lanes|r.childLanes;if(Em=k,k|=lg,Bt(t,i,k,l,f,m),Ws=null,(i&335544064)===i?(el=aD(t),l=10262):(el=null,l=10256),(r.subtreeFlags&l)!==0||(r.flags&l)!==0?(t.callbackNode=null,t.callbackPriority=0,LD(gt,function(){return Nm(),null})):(t.callbackNode=null,t.callbackPriority=0),Ud=!1,l=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||l){l=ge.T,ge.T=null,f=ce.p,ce.p=2,m=ln,ln|=4;try{wD(t,r,i)}finally{ln=m,ce.p=f,ge.T=l}}zn=1,Ud?Js=nN(E,t.containerInfo,el,Mm,Am,jD,Dm,Nm,ND):(Mm(),Am(),Dm())}function ND(t){if(zn!==0){var r=_a.onRecoverableError;r(t,{componentStack:null})}}function jD(){zn===3&&(zn=0,L2(rs,_a),zn=4)}function Mm(){if(zn===1){zn=0;var t=_a,r=rs,i=no,l=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||l){l=ge.T,ge.T=null;var f=ce.p;ce.p=2;var m=ln;ln|=4;try{Tu=Vd=!1,k2(r,t,i),i=Vm;var E=Nb(t.containerInfo),k=i.focusedElem,Q=i.selectionRange;if(E!==k&&k&&k.ownerDocument&&Db(k.ownerDocument.documentElement,k)){if(Q!==null&&rg(k)){var ie=Q.start,pe=Q.end;if(pe===void 0&&(pe=ie),"selectionStart"in k)k.selectionStart=ie,k.selectionEnd=Math.min(pe,k.value.length);else{var Ce=k.ownerDocument||document,ae=Ce&&Ce.defaultView||window;if(ae.getSelection){var fe=ae.getSelection(),Ye=k.textContent.length,rt=Math.min(Q.start,Ye),jt=Q.end===void 0?rt:Math.min(Q.end,Ye);!fe.extend&&rt>jt&&(E=jt,jt=rt,rt=E);var oe=Ab(k,rt),te=Ab(k,jt);if(oe&&te&&(fe.rangeCount!==1||fe.anchorNode!==oe.node||fe.anchorOffset!==oe.offset||fe.focusNode!==te.node||fe.focusOffset!==te.offset)){var ue=Ce.createRange();ue.setStart(oe.node,oe.offset),fe.removeAllRanges(),rt>jt?(fe.addRange(ue),fe.extend(te.node,te.offset)):(ue.setEnd(te.node,te.offset),fe.addRange(ue))}}}}for(Ce=[],fe=k;fe=fe.parentNode;)fe.nodeType===1&&Ce.push({element:fe,left:fe.scrollLeft,top:fe.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;k<Ce.length;k++){var Ee=Ce[k];Ee.element.scrollLeft=Ee.left,Ee.element.scrollTop=Ee.top}}dl=!!Bm,Vm=Bm=null}finally{ln=m,ce.p=f,ge.T=l}}t.current=r,zn=2}}function Am(){if(zn===2){zn=0;var t=_a,r=rs,i=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||i){i=ge.T,ge.T=null;var l=ce.p;ce.p=2;var f=ln;ln|=4;try{M2(t,r.alternate,r)}finally{ln=f,ce.p=l,ge.T=i}}zn=3}}function Dm(){if(zn===4||zn===3){zn=0;var t=Js;Js=null,We();var r=_a,i=rs,l=no,f=V2,m=(l&335544064)===l?10262:10256;if((i.subtreeFlags&m)!==0||(i.flags&m)!==0?zn=5:(zn=0,rs=_a=null,t1(r,r.pendingLanes)),m=r.pendingLanes,m===0&&(ci=null),En(l),i=i.stateNode,ze&&typeof ze.onCommitFiberRoot=="function")try{ze.onCommitFiberRoot(ke,i,void 0,(i.current.flags&128)===128)}catch{}if(f!==null){i=ge.T,m=ce.p,ce.p=2,ge.T=null;try{for(var E=r.onRecoverableError,k=0;k<f.length;k++){var Q=f[k];E(Q.value,{componentStack:Q.stack})}}finally{ge.T=i,ce.p=m}}if(f=Ws,E=el,el=null,f!==null&&(Ws=null,E===null&&(E=[]),t!==null))for(Q=0;Q<f.length;Q++)i=(0,f[Q])(E),i!==void 0&&t.finished.finally(i);(no&3)!==0&&tf(),ro(r),m=r.pendingLanes,(l&261930)!==0&&(m&42)!==0?r===Zd?Du++:(Du=0,Zd=r):(Du=0,Zd=null),Nu(0)}}function t1(t,r){(t.pooledCacheLanes&=r)===0&&(r=t.pooledCache,r!=null&&(t.pooledCache=null,du(r)))}function tf(){return Js!==null&&(Js.skipTransition(),Js=null),Mm(),Am(),Dm(),Nm()}function Nm(){if(zn!==5)return!1;var t=_a,r=Em;Em=0;var i=En(no),l=ge.T,f=ce.p;try{ce.p=32>i?32:i,ge.T=null,i=Cm,Cm=null;var m=_a,E=no;if(zn=0,rs=_a=null,no=0,(ln&6)!==0)throw Error(o(331));var k=ln;if(ln|=4,U2(m.current),z2(m,m.current,E,i),ln=k,Nu(0,!1),ze&&typeof ze.onPostCommitFiberRoot=="function")try{ze.onPostCommitFiberRoot(ke,m)}catch{}return!0}finally{ce.p=f,ge.T=l,t1(t,r)}}function n1(t,r,i){r=ya(i,r),r=$g(t.stateNode,r,2),t=ni(t,r,2),t!==null&&(ct(t,2),ro(t))}function gn(t,r,i){if(t.tag===3)n1(t,t,i);else for(;r!==null;){if(r.tag===3){n1(r,t,i);break}else if(r.tag===1){var l=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(ci===null||!ci.has(l))){t=ya(i,t),i=Jx(2),l=ni(r,i,2),l!==null&&(Wx(i,l,r,t),ct(l,2),ro(l));break}}r=r.return}}function jm(t,r,i){var l=t.pingCache;if(l===null){l=t.pingCache=new CD;var f=new Set;l.set(r,f)}else f=l.get(r),f===void 0&&(f=new Set,l.set(r,f));f.has(i)||(wm=!0,f.add(i),t=ID.bind(null,t,r,i),r.then(t,t))}function ID(t,r,i){var l=t.pingCache;l!==null&&l.delete(r),t.pingedLanes|=t.suspendedLanes&i,t.warmLanes&=~i,Tn===t&&(Xt&i)===i&&((Vn===4||Vn===3&&(Xt&62914560)===Xt&&300>xt()-$d)&&(ln&2)===0?nl(t,0):Gd|=i,Zs===Xt&&(Zs=0)),ro(t)}function r1(t,r){r===0&&(r=tt()),t=Fi(t,r),t!==null&&(ct(t,r),ro(t))}function kD(t){var r=t.memoizedState,i=0;r!==null&&(i=r.retryLane),r1(t,i)}function PD(t,r){var i=0;switch(t.tag){case 31:case 13:var l=t.stateNode,f=t.memoizedState;f!==null&&(i=f.retryLane);break;case 19:l=t.stateNode;break;case 22:l=t.stateNode._retryCache;break;default:throw Error(o(314))}l!==null&&l.delete(r),r1(t,i)}function LD(t,r){return Wt(t,r)}var al=null,ol=null,Im=!1,nf=!1,km=!1,fi=0;function ro(t){t!==ol&&t.next===null&&(ol===null?al=ol=t:ol=ol.next=t),nf=!0,Im||(Im=!0,_D())}function Nu(t,r){if(!km&&nf){km=!0;do for(var i=!1,l=al;l!==null;){if(t!==0){var f=l.pendingLanes;if(f===0)var m=0;else{var E=l.suspendedLanes,k=l.pingedLanes;m=(1<<31-et(42|t)+1)-1,m&=f&~(E&~k),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(i=!0,s1(l,m))}else m=Xt,m=Ve(l,l===Tn?m:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(m&3)===0||Xe(l,m)||(i=!0,s1(l,m));l=l.next}while(i);km=!1}}function zD(){a1()}function a1(){nf=Im=!1;var t=0;fi!==0&&XD()&&(t=fi);for(var r=xt(),i=null,l=al;l!==null;){var f=l.next,m=o1(l,r);m===0?(l.next=null,i===null?al=f:i.next=f,f===null&&(ol=i)):(i=l,(t!==0||(m&3)!==0)&&(nf=!0)),l=f}zn!==0&&zn!==5||Nu(t),fi!==0&&(fi=0)}function o1(t,r){for(var i=t.suspendedLanes,l=t.pingedLanes,f=t.expirationTimes,m=t.pendingLanes&-62914561;0<m;){var E=31-et(m),k=1<<E,Q=f[E];Q===-1?((k&i)===0||(k&l)!==0)&&(f[E]=st(k,r)):Q<=r&&(t.expiredLanes|=k),m&=~k}if(r=Tn,i=Xt,i=Ve(t,t===r?i:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),l=t.callbackNode,i===0||t===r&&(pn===2||pn===9)||t.cancelPendingCommit!==null)return l!==null&&l!==null&&rn(l),t.callbackNode=null,t.callbackPriority=0;if((i&3)===0||Xe(t,i)){if(r=i&-i,r===t.callbackPriority)return r;switch(l!==null&&rn(l),En(i)){case 2:case 8:i=vt;break;case 32:i=gt;break;case 268435456:i=un;break;default:i=gt}return l=i1.bind(null,t),i=Wt(i,l),t.callbackPriority=r,t.callbackNode=i,r}return l!==null&&l!==null&&rn(l),t.callbackPriority=2,t.callbackNode=null,2}function i1(t,r){if(zn!==0&&zn!==5)return t.callbackNode=null,t.callbackPriority=0,null;var i=t.callbackNode;if(tf()&&t.callbackNode!==i)return null;var l=Xt;return l=Ve(t,t===Tn?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),l===0?null:(Y2(t,l,r),o1(t,xt()),t.callbackNode!=null&&t.callbackNode===i?i1.bind(null,t):null)}function s1(t,r){if(tf())return null;Y2(t,r,!0)}function _D(){ZD(function(){(ln&6)!==0?Wt(ft,zD):a1()})}function Pm(){if(fi===0){var t=Gi;t===0&&(t=ne,ne<<=1,(ne&261888)===0&&(ne=256)),fi=t}return fi}function l1(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:hr(t)}function HD(t,r,i,l,f){if(r==="submit"&&i&&i.stateNode===f){var m=l1((f[Mn]||null).action),E=l.submitter;E&&(r=(r=E[Mn]||null)?l1(r.formAction):E.getAttribute("formAction"),r!==null&&(m=r,E=null));var k=new nd("action","action",null,l,f);t.push({event:k,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(fi!==0){var Q=new FormData(f,E);Vg(i,{pending:!0,data:Q,method:f.method,action:m},null,Q)}}else typeof m=="function"&&(k.preventDefault(),Q=new FormData(f,E),Vg(i,{pending:!0,data:Q,method:f.method,action:m},m,Q))},currentTarget:f}]})}}for(var Lm=0;Lm<sg.length;Lm++){var zm=sg[Lm],UD=zm.toLowerCase(),FD=zm[0].toUpperCase()+zm.slice(1);ka(UD,"on"+FD)}ka(kb,"onAnimationEnd"),ka(Pb,"onAnimationIteration"),ka(Lb,"onAnimationStart"),ka("dblclick","onDoubleClick"),ka("focusin","onFocus"),ka("focusout","onBlur"),ka(QA,"onTransitionRun"),ka(ZA,"onTransitionStart"),ka(JA,"onTransitionCancel"),ka(zb,"onTransitionEnd"),vn("onMouseEnter",["mouseout","mouseover"]),vn("onMouseLeave",["mouseout","mouseover"]),vn("onPointerEnter",["pointerout","pointerover"]),vn("onPointerLeave",["pointerout","pointerover"]),zt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),zt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),zt("onBeforeInput",["compositionend","keypress","textInput","paste"]),zt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),zt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),zt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ju="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),BD=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ju));function u1(t,r){r=(r&4)!==0;for(var i=0;i<t.length;i++){var l=t[i],f=l.event;l=l.listeners;e:{var m=void 0;if(r)for(var E=l.length-1;0<=E;E--){var k=l[E],Q=k.instance,ie=k.currentTarget;if(k=k.listener,Q!==m&&f.isPropagationStopped())break e;m=k,f.currentTarget=ie;try{m(f)}catch(pe){od(pe)}f.currentTarget=null,m=Q}else for(E=0;E<l.length;E++){if(k=l[E],Q=k.instance,ie=k.currentTarget,k=k.listener,Q!==m&&f.isPropagationStopped())break e;m=k,f.currentTarget=ie;try{m(f)}catch(pe){od(pe)}f.currentTarget=null,m=Q}}}}function Yt(t,r){var i=r[vo];i===void 0&&(i=r[vo]=new Set);var l=t+"__bubble";i.has(l)||(c1(r,t,2,!1),i.add(l))}function _m(t,r,i){var l=0;r&&(l|=4),c1(i,t,l,r)}var rf="_reactListening"+Math.random().toString(36).slice(2);function Hm(t){if(!t[rf]){t[rf]=!0,Ct.forEach(function(i){i!=="selectionchange"&&(BD.has(i)||_m(i,!1,t),_m(i,!0,t))});var r=t.nodeType===9?t:t.ownerDocument;r===null||r[rf]||(r[rf]=!0,_m("selectionchange",!1,r))}}function c1(t,r,i,l){switch(W1(r)){case 2:var f=kN;break;case 8:f=PN;break;default:f=o0}i=f.bind(null,r,i,t),f=void 0,!_i||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(f=!0),l?f!==void 0?t.addEventListener(r,i,{capture:!0,passive:f}):t.addEventListener(r,i,!0):f!==void 0?t.addEventListener(r,i,{passive:f}):t.addEventListener(r,i,!1)}function Um(t,r,i,l,f){var m=l;if((r&1)===0&&(r&2)===0&&l!==null)e:for(;;){if(l===null)return;var E=l.tag;if(E===3||E===4){var k=l.stateNode.containerInfo;if(k===f)break;if(E===4)for(E=l.return;E!==null;){var Q=E.tag;if((Q===3||Q===4)&&E.stateNode.containerInfo===f)return;E=E.return}for(;k!==null;){if(E=Fn(k),E===null)return;if(Q=E.tag,Q===5||Q===6||Q===26||Q===27){l=m=E;continue e}k=k.parentNode}}l=l.return}zi(function(){var ie=m,pe=Li(i),Ce=[];e:{var ae=_b.get(t);if(ae!==void 0){var fe=nd,Ye=t;switch(t){case"keypress":if(ed(i)===0)break e;case"keydown":case"keyup":fe=TA;break;case"focusin":Ye="focus",fe=Zp;break;case"focusout":Ye="blur",fe=Zp;break;case"beforeblur":case"afterblur":fe=Zp;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":fe=hb;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":fe=pA;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":fe=NA;break;case kb:case Pb:case Lb:fe=yA;break;case zb:fe=IA;break;case"scroll":case"scrollend":fe=fA;break;case"wheel":fe=PA;break;case"copy":case"cut":case"paste":fe=bA;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":fe=gb;break;case"submit":fe=AA;break;case"toggle":case"beforetoggle":fe=zA}var rt=(r&4)!==0,jt=!rt&&(t==="scroll"||t==="scrollend"),oe=rt?ae!==null?ae+"Capture":null:ae;rt=[];for(var te=ie,ue;te!==null;){var Ee=te;if(ue=Ee.stateNode,Ee=Ee.tag,Ee!==5&&Ee!==26&&Ee!==27||ue===null||oe===null||(Ee=xo(te,oe),Ee!=null&&rt.push(Iu(te,Ee,ue))),jt)break;te=te.return}0<rt.length&&(ae=new fe(ae,Ye,null,i,pe),Ce.push({event:ae,listeners:rt}))}}if((r&7)===0){e:{if(fe=t==="mouseover"||t==="pointerover",ae=t==="mouseout"||t==="pointerout",fe&&i!==Pi&&(Ye=i.relatedTarget||i.fromElement)&&(Fn(Ye)||Ye[jn]))break e;(ae||fe)&&(Ye=pe.window===pe?pe:(fe=pe.ownerDocument)?fe.defaultView||fe.parentWindow:window,ae?(fe=i.relatedTarget||i.toElement,ae=ie,fe=fe?Fn(fe):null,fe!==null&&(jt=u(fe),rt=fe.tag,fe!==jt||rt!==5&&rt!==27&&rt!==6)&&(fe=null)):(ae=null,fe=ie),ae!==fe&&(rt=hb,Ee="onMouseLeave",oe="onMouseEnter",te="mouse",(t==="pointerout"||t==="pointerover")&&(rt=gb,Ee="onPointerLeave",oe="onPointerEnter",te="pointer"),jt=ae==null?Ye:he(ae),ue=fe==null?Ye:he(fe),Ye=new rt(Ee,te+"leave",ae,i,pe),Ye.target=jt,Ye.relatedTarget=ue,Ee=null,Fn(pe)===ie&&(rt=new rt(oe,te+"enter",fe,i,pe),rt.target=ue,rt.relatedTarget=jt,Ee=rt),jt=Ee,rt=ae&&fe?P(ae,fe,VD):null,ae!==null&&d1(Ce,Ye,ae,rt,!1),fe!==null&&jt!==null&&d1(Ce,jt,fe,rt,!0)))}e:{if(ae=ie?he(ie):window,fe=ae.nodeName&&ae.nodeName.toLowerCase(),fe==="select"||fe==="input"&&ae.type==="file")var Je=Rb;else if(Sb(ae))if(Eb)Je=GA;else{Je=YA;var Qt=qA}else fe=ae.nodeName,!fe||fe.toLowerCase()!=="input"||ae.type!=="checkbox"&&ae.type!=="radio"?ie&&ki(ie.elementType)&&(Je=Rb):Je=KA;if(Je&&(Je=Je(t,ie))){wb(Ce,Je,i,pe);break e}Qt&&Qt(t,ae,ie)}switch(Qt=ie?he(ie):window,t){case"focusin":(Sb(Qt)||Qt.contentEditable==="true")&&(Is=Qt,ag=ie,lu=null);break;case"focusout":lu=ag=Is=null;break;case"mousedown":og=!0;break;case"contextmenu":case"mouseup":case"dragend":og=!1,jb(Ce,i,pe);break;case"selectionchange":if(XA)break;case"keydown":case"keyup":jb(Ce,i,pe)}var lt;if(Wp)e:{switch(t){case"compositionstart":var bt="onCompositionStart";break e;case"compositionend":bt="onCompositionEnd";break e;case"compositionupdate":bt="onCompositionUpdate";break e}bt=void 0}else js?bb(t,i)&&(bt="onCompositionEnd"):t==="keydown"&&i.keyCode===229&&(bt="onCompositionStart");bt&&(mb&&i.locale!=="ko"&&(js||bt!=="onCompositionStart"?bt==="onCompositionEnd"&&js&&(lt=db()):(Go=pe,$p="value"in Go?Go.value:Go.textContent,js=!0)),Qt=af(ie,bt),0<Qt.length&&(bt=new pb(bt,t,null,i,pe),Ce.push({event:bt,listeners:Qt}),lt?bt.data=lt:(lt=xb(i),lt!==null&&(bt.data=lt)))),(lt=HA?UA(t,i):FA(t,i))&&(bt=af(ie,"onBeforeInput"),0<bt.length&&(Qt=new pb("onBeforeInput","beforeinput",null,i,pe),Ce.push({event:Qt,listeners:bt}),Qt.data=lt)),HD(Ce,t,ie,i,pe)}u1(Ce,r)})}function Iu(t,r,i){return{instance:t,listener:r,currentTarget:i}}function af(t,r){for(var i=r+"Capture",l=[];t!==null;){var f=t,m=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||m===null||(f=xo(t,i),f!=null&&l.unshift(Iu(t,f,m)),f=xo(t,r),f!=null&&l.push(Iu(t,f,m))),t.tag===3)return l;t=t.return}return[]}function VD(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function d1(t,r,i,l,f){for(var m=r._reactName,E=[];i!==null&&i!==l;){var k=i,Q=k.alternate,ie=k.stateNode;if(k=k.tag,Q!==null&&Q===l)break;k!==5&&k!==26&&k!==27||ie===null||(Q=ie,f?(ie=xo(i,m),ie!=null&&E.unshift(Iu(i,ie,Q))):f||(ie=xo(i,m),ie!=null&&E.push(Iu(i,ie,Q)))),i=i.return}E.length!==0&&t.push({event:r,listeners:E})}var qD=/\r\n?/g,YD=/\u0000|\uFFFD/g;function f1(t){return(typeof t=="string"?t:""+t).replace(qD,`
|
|
10
|
-
`).replace(YD,"")}function h1(t,r){return r=f1(r),f1(t)===r}function mn(t,r,i,l,f,m){switch(i){case"children":if(typeof l=="string")r==="body"||r==="textarea"&&l===""||Mr(t,l);else if(typeof l=="number"||typeof l=="bigint")r!=="body"&&Mr(t,""+l);else return;break;case"className":Jr(t,"class",l);break;case"tabIndex":Jr(t,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Jr(t,i,l);break;case"style":ea(t,l,m);return;case"data":if(r!=="object"){Jr(t,"data",l);break}case"src":case"href":if(l===""&&(r!=="a"||i!=="href")){t.removeAttribute(i);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(i);break}l=hr(l),t.setAttribute(i,l);break;case"action":case"formAction":if(typeof l=="function"){t.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof m=="function"&&(i==="formAction"?(r!=="input"&&mn(t,r,"name",f.name,f,null),mn(t,r,"formEncType",f.formEncType,f,null),mn(t,r,"formMethod",f.formMethod,f,null),mn(t,r,"formTarget",f.formTarget,f,null)):(mn(t,r,"encType",f.encType,f,null),mn(t,r,"method",f.method,f,null),mn(t,r,"target",f.target,f,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(i);break}l=hr(l),t.setAttribute(i,l);break;case"onClick":l!=null&&(t.onclick=Ar);return;case"onScroll":l!=null&&Yt("scroll",t);return;case"onScrollEnd":l!=null&&Yt("scrollend",t);return;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(i=l.__html,i!=null){if(f.children!=null)throw Error(o(60));m?.__html!==i&&(t.innerHTML=i)}}break;case"multiple":t.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":t.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){t.removeAttribute("xlink:href");break}i=hr(l),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(i,l):t.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(i,""):t.removeAttribute(i);break;case"capture":case"download":l===!0?t.setAttribute(i,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(i,l):t.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?t.setAttribute(i,l):t.removeAttribute(i);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?t.removeAttribute(i):t.setAttribute(i,l);break;case"popover":Yt("beforetoggle",t),Yt("toggle",t),Ln(t,"popover",l);break;case"xlinkActuate":Gn(t,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Gn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Gn(t,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Gn(t,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Gn(t,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Gn(t,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Gn(t,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Gn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Gn(t,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Ln(t,"is",l);break;case"innerText":case"textContent":return;default:if(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")i=Wl.get(i)||i,Ln(t,i,l);else return}pt=!0}function Fm(t,r,i,l,f,m){switch(i){case"style":ea(t,l,m);return;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(i=l.__html,i!=null){if(f.children!=null)throw Error(o(60));m?.__html!==i&&(t.innerHTML=i)}}break;case"children":if(typeof l=="string")Mr(t,l);else if(typeof l=="number"||typeof l=="bigint")Mr(t,""+l);else return;break;case"onScroll":l!=null&&Yt("scroll",t);return;case"onScrollEnd":l!=null&&Yt("scrollend",t);return;case"onClick":l!=null&&(t.onclick=Ar);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!wt.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(f=i.endsWith("Capture"),m=i.slice(2,f?i.length-7:void 0),r=t[Mn]||null,r=r!=null?r[i]:null,typeof r=="function"&&t.removeEventListener(m,r,f),typeof l=="function")){typeof r!="function"&&r!==null&&(i in t?t[i]=null:t.hasAttribute(i)&&t.removeAttribute(i)),t.addEventListener(m,l,f);break e}pt=!0,i in t?t[i]=l:l===!0?t.setAttribute(i,""):Ln(t,i,l)}return}pt=!0}function br(t,r,i){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Yt("error",t),Yt("load",t);var l=!1,f=!1,m;for(m in i)if(i.hasOwnProperty(m)){var E=i[m];if(E!=null)switch(m){case"src":l=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,r));default:mn(t,r,m,E,i,null)}}f&&mn(t,r,"srcSet",i.srcSet,i,null),l&&mn(t,r,"src",i.src,i,null);return;case"input":Yt("invalid",t);var k=m=E=f=null,Q=null,ie=null;for(l in i)if(i.hasOwnProperty(l)){var pe=i[l];if(pe!=null)switch(l){case"name":f=pe;break;case"type":E=pe;break;case"checked":Q=pe;break;case"defaultChecked":ie=pe;break;case"value":m=pe;break;case"defaultValue":k=pe;break;case"children":case"dangerouslySetInnerHTML":if(pe!=null)throw Error(o(137,r));break;default:mn(t,r,l,pe,i,null)}}Yo(t,m,k,Q,ie,E,f,!1);return;case"select":Yt("invalid",t),l=E=m=null;for(f in i)if(i.hasOwnProperty(f)&&(k=i[f],k!=null))switch(f){case"value":m=k;break;case"defaultValue":E=k;break;case"multiple":l=k;default:mn(t,r,f,k,i,null)}r=m,i=E,t.multiple=!!l,r!=null?Fr(t,!!l,r,!1):i!=null&&Fr(t,!!l,i,!0);return;case"textarea":Yt("invalid",t),m=f=l=null;for(E in i)if(i.hasOwnProperty(E)&&(k=i[E],k!=null))switch(E){case"value":l=k;break;case"defaultValue":f=k;break;case"children":m=k;break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(o(91));break;default:mn(t,r,E,k,i,null)}Wr(t,l,f,m);return;case"option":for(Q in i)i.hasOwnProperty(Q)&&(l=i[Q],l!=null)&&(Q==="selected"?t.selected=l&&typeof l!="function"&&typeof l!="symbol":mn(t,r,Q,l,i,null));return;case"dialog":Yt("beforetoggle",t),Yt("toggle",t),Yt("cancel",t),Yt("close",t);break;case"iframe":case"object":Yt("load",t);break;case"video":case"audio":for(l=0;l<ju.length;l++)Yt(ju[l],t);break;case"image":Yt("error",t),Yt("load",t);break;case"details":Yt("toggle",t);break;case"embed":case"source":case"link":Yt("error",t),Yt("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ie in i)if(i.hasOwnProperty(ie)&&(l=i[ie],l!=null))switch(ie){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,r));default:mn(t,r,ie,l,i,null)}return;default:if(ki(r)){for(pe in i)i.hasOwnProperty(pe)&&(l=i[pe],l!==void 0&&Fm(t,r,pe,l,i,void 0));return}}for(k in i)i.hasOwnProperty(k)&&(l=i[k],l!=null&&mn(t,r,k,l,i,null))}var KD={};function GD(t,r,i,l){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,m=null,E=null,k=null,Q=null,ie=null,pe=null;for(fe in i){var Ce=i[fe];if(i.hasOwnProperty(fe)&&Ce!=null)switch(fe){case"checked":break;case"value":break;case"defaultValue":Q=Ce;default:l.hasOwnProperty(fe)||mn(t,r,fe,null,l,Ce)}}for(var ae in l){var fe=l[ae];if(Ce=i[ae],l.hasOwnProperty(ae)&&(fe!=null||Ce!=null))switch(ae){case"type":fe!==Ce&&(pt=!0),m=fe;break;case"name":fe!==Ce&&(pt=!0),f=fe;break;case"checked":fe!==Ce&&(pt=!0),ie=fe;break;case"defaultChecked":fe!==Ce&&(pt=!0),pe=fe;break;case"value":fe!==Ce&&(pt=!0),E=fe;break;case"defaultValue":fe!==Ce&&(pt=!0),k=fe;break;case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(o(137,r));break;default:fe!==Ce&&mn(t,r,ae,fe,l,Ce)}}wr(t,E,k,Q,ie,pe,m,f);return;case"select":fe=E=k=ae=null;for(m in i)if(Q=i[m],i.hasOwnProperty(m)&&Q!=null)switch(m){case"value":break;case"multiple":fe=Q;default:l.hasOwnProperty(m)||mn(t,r,m,null,l,Q)}for(f in l)if(m=l[f],Q=i[f],l.hasOwnProperty(f)&&(m!=null||Q!=null))switch(f){case"value":m!==Q&&(pt=!0),ae=m;break;case"defaultValue":m!==Q&&(pt=!0),k=m;break;case"multiple":m!==Q&&(pt=!0),E=m;default:m!==Q&&mn(t,r,f,m,l,Q)}r=k,i=E,l=fe,ae!=null?Fr(t,!!i,ae,!1):!!l!=!!i&&(r!=null?Fr(t,!!i,r,!0):Fr(t,!!i,i?[]:"",!1));return;case"textarea":fe=ae=null;for(k in i)if(f=i[k],i.hasOwnProperty(k)&&f!=null&&!l.hasOwnProperty(k))switch(k){case"value":break;case"children":break;default:mn(t,r,k,null,l,f)}for(E in l)if(f=l[E],m=i[E],l.hasOwnProperty(E)&&(f!=null||m!=null))switch(E){case"value":f!==m&&(pt=!0),ae=f;break;case"defaultValue":f!==m&&(pt=!0),fe=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(o(91));break;default:f!==m&&mn(t,r,E,f,l,m)}Ns(t,ae,fe);return;case"option":for(var Ye in i)ae=i[Ye],i.hasOwnProperty(Ye)&&ae!=null&&!l.hasOwnProperty(Ye)&&(Ye==="selected"?t.selected=!1:mn(t,r,Ye,null,l,ae));for(Q in l)ae=l[Q],fe=i[Q],l.hasOwnProperty(Q)&&ae!==fe&&(ae!=null||fe!=null)&&(Q==="selected"?(ae!==fe&&(pt=!0),t.selected=ae&&typeof ae!="function"&&typeof ae!="symbol"):mn(t,r,Q,ae,l,fe));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var rt in i)ae=i[rt],i.hasOwnProperty(rt)&&ae!=null&&!l.hasOwnProperty(rt)&&mn(t,r,rt,null,l,ae);for(ie in l)if(ae=l[ie],fe=i[ie],l.hasOwnProperty(ie)&&ae!==fe&&(ae!=null||fe!=null))switch(ie){case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(o(137,r));break;default:mn(t,r,ie,ae,l,fe)}return;default:if(ki(r)){for(var jt in i)ae=i[jt],i.hasOwnProperty(jt)&&ae!==void 0&&!l.hasOwnProperty(jt)&&Fm(t,r,jt,void 0,l,ae);for(pe in l)ae=l[pe],fe=i[pe],!l.hasOwnProperty(pe)||ae===fe||ae===void 0&&fe===void 0||Fm(t,r,pe,ae,l,fe);return}}for(var oe in i)ae=i[oe],i.hasOwnProperty(oe)&&ae!=null&&!l.hasOwnProperty(oe)&&mn(t,r,oe,null,l,ae);for(Ce in l)ae=l[Ce],fe=i[Ce],!l.hasOwnProperty(Ce)||ae===fe||ae==null&&fe==null||mn(t,r,Ce,ae,l,fe)}function p1(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function $D(){if(typeof performance.getEntriesByType=="function"){for(var t=0,r=0,i=performance.getEntriesByType("resource"),l=0;l<i.length;l++){var f=i[l],m=f.transferSize,E=f.initiatorType,k=f.duration;if(m&&k&&p1(E)){for(E=0,k=f.responseEnd,l+=1;l<i.length;l++){var Q=i[l],ie=Q.startTime;if(ie>k)break;var pe=Q.transferSize,Ce=Q.initiatorType;pe&&p1(Ce)&&(Q=Q.responseEnd,E+=pe*(Q<k?1:(k-ie)/(Q-ie)))}if(--l,r+=8*(m+E)/(f.duration/1e3),t++,10<t)break}}if(0<t)return r/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var Bm=null,Vm=null;function ku(t){return t.nodeType===9?t:t.ownerDocument}function g1(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function m1(t,r){if(t===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&r==="foreignObject"?0:t}function y1(t,r,i,l){return i=ku(i).createElement(t),i[dn]=l,i[Mn]=r,br(i,t,r),Se(i),i}function qm(t,r){return t==="textarea"||t==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var Ym=null;function XD(){var t=window.event;return t&&t.type==="popstate"?t===Ym?!1:(Ym=t,!0):(Ym=null,!1)}var Km=typeof setTimeout=="function"?setTimeout:void 0,QD=typeof clearTimeout=="function"?clearTimeout:void 0,v1=typeof Promise=="function"?Promise:void 0,b1=typeof requestAnimationFrame=="function"?requestAnimationFrame:Km,ZD=typeof queueMicrotask=="function"?queueMicrotask:typeof v1<"u"?function(t){return v1.resolve(null).then(t).catch(JD)}:Km;function JD(t){setTimeout(function(){throw t})}function hi(t){return t==="head"}function x1(t,r){var i=r,l=0;do{var f=i.nextSibling;if(t.removeChild(i),f&&f.nodeType===8)if(i=f.data,i==="/$"||i==="/&"){if(l===0){t.removeChild(f),fl(r);return}l--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")l++;else if(i==="html")e0(t.ownerDocument.documentElement);else if(i==="head"){i=t.ownerDocument.head,e0(i);for(var m=i.firstChild;m;){var E=m.nextSibling,k=m.nodeName;m[pa]||k==="SCRIPT"||k==="STYLE"||k==="LINK"&&m.rel.toLowerCase()==="stylesheet"||i.removeChild(m),m=E}}else i==="body"&&e0(t.ownerDocument.body);i=f}while(i);fl(r)}function S1(t,r){var i=t;t=0;do{var l=i.nextSibling;if(i.nodeType===1?r?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(r?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),l&&l.nodeType===8)if(i=l.data,i==="/$"){if(t===0)break;t--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||t++;i=l}while(i)}function w1(t,r,i){if(r=CSS.escape(r)!==r?"r-"+btoa(r).replace(/=/g,""):r,t.style.viewTransitionName=r,i!=null&&(t.style.viewTransitionClass=i),i=getComputedStyle(t),i.display==="inline"){if(r=t.getClientRects(),r.length===1)var l=1;else for(var f=l=0;f<r.length;f++){var m=r[f];0<m.width&&0<m.height&&l++}l===1&&(t=t.style,t.display=r.length===1?"inline-block":"block",t.marginTop="-"+i.paddingTop,t.marginBottom="-"+i.paddingBottom)}}function R1(t,r){t=t.style,r=r.style;var i=r!=null?r.hasOwnProperty("viewTransitionName")?r.viewTransitionName:r.hasOwnProperty("view-transition-name")?r["view-transition-name"]:null:null;t.viewTransitionName=i==null||typeof i=="boolean"?"":(""+i).trim(),i=r!=null?r.hasOwnProperty("viewTransitionClass")?r.viewTransitionClass:r.hasOwnProperty("view-transition-class")?r["view-transition-class"]:null:null,t.viewTransitionClass=i==null||typeof i=="boolean"?"":(""+i).trim(),t.display==="inline-block"&&(r==null?t.display=t.margin="":(i=r.display,t.display=i==null||typeof i=="boolean"?"":i,i=r.margin,i!=null?t.margin=i:(i=r.hasOwnProperty("marginTop")?r.marginTop:r["margin-top"],t.marginTop=i==null||typeof i=="boolean"?"":i,r=r.hasOwnProperty("marginBottom")?r.marginBottom:r["margin-bottom"],t.marginBottom=r==null||typeof r=="boolean"?"":r)))}function WD(t,r,i){return i=i.ownerDocument.defaultView,{rect:t,abs:r.position==="absolute"||r.position==="fixed",clip:r.clipPath!=="none"||r.overflow!=="visible"||r.filter!=="none"||r.mask!=="none"||r.mask!=="none"||r.borderRadius!=="0px",view:0<=t.bottom&&0<=t.right&&t.top<=i.innerHeight&&t.left<=i.innerWidth}}function Gm(t){var r=t.getBoundingClientRect(),i=getComputedStyle(t);return WD(r,i,t)}function eN(t){return t.documentElement.clientHeight}function tN(t){this.addEventListener("load",t),this.addEventListener("error",t)}function nN(t,r,i,l,f,m,E,k,Q){var ie=r.nodeType===9?r:r.ownerDocument;try{var pe=ie.startViewTransition({update:function(){var ae=ie.defaultView,fe=ae.navigation&&ae.navigation.transition,Ye=ie.fonts.status;l();var rt=[];if(Ye==="loaded"&&(eN(ie),ie.fonts.status==="loading"&&rt.push(ie.fonts.ready)),Ye=rt.length,t!==null)for(var jt=t.suspenseyImages,oe=0,te=0;te<jt.length;te++){var ue=jt[te];if(!ue.complete){var Ee=ue.getBoundingClientRect();if(0<Ee.bottom&&0<Ee.right&&Ee.top<ae.innerHeight&&Ee.left<ae.innerWidth){if(oe+=q1(ue),oe>lf){rt.length=Ye;break}ue=new Promise(tN.bind(ue)),rt.push(ue)}}}if(0<rt.length)return ae=Promise.race([Promise.all(rt),new Promise(function(Je){return setTimeout(Je,500)})]).then(f,f),(fe?Promise.allSettled([fe.finished,ae]):ae).then(m,m);if(f(),fe)return fe.finished.then(m,m);m()},types:i});ie.__reactViewTransition=pe;var Ce=[];return pe.ready.then(function(){for(var ae=ie.documentElement.getAnimations({subtree:!0}),fe=0;fe<ae.length;fe++){var Ye=ae[fe],rt=Ye.effect,jt=rt.pseudoElement;if(jt!=null&&jt.startsWith("::view-transition")){Ce.push(Ye),Ye=rt.getKeyframes();for(var oe=jt=void 0,te=!0,ue=0;ue<Ye.length;ue++){var Ee=Ye[ue],Je=Ee.width;if(jt===void 0)jt=Je;else if(jt!==Je){te=!1;break}if(Je=Ee.height,oe===void 0)oe=Je;else if(oe!==Je){te=!1;break}delete Ee.width,delete Ee.height,Ee.transform==="none"&&delete Ee.transform}te&&jt!==void 0&&oe!==void 0&&(rt.setKeyframes(Ye),te=getComputedStyle(rt.target,rt.pseudoElement),te.width!==jt||te.height!==oe)&&(te=Ye[0],te.width=jt,te.height=oe,te=Ye[Ye.length-1],te.width=jt,te.height=oe,rt.setKeyframes(Ye))}}E()},function(ae){ie.__reactViewTransition===pe&&(ie.__reactViewTransition=null);try{typeof ae=="object"&&ae!==null&&ae.name==="InvalidStateError"&&(ae.message==="View transition was skipped because document visibility state is hidden."||ae.message==="Skipping view transition because document visibility state has become hidden."||ae.message==="Skipping view transition because viewport size changed."||ae.message==="Transition was aborted because of invalid state")&&(ae=null),ae!==null&&Q(ae)}finally{l(),f(),E()}}),pe.finished.finally(function(){for(var ae=0;ae<Ce.length;ae++)Ce[ae].cancel();ie.__reactViewTransition===pe&&(ie.__reactViewTransition=null),k()}),pe}catch{return l(),f(),E(),null}}function as(t,r){this._scope=document.documentElement,this._selector="::view-transition-"+t+"("+r+")"}as.prototype.animate=function(t,r){return r=typeof r=="number"?{duration:r}:I({},r),r.pseudoElement=this._selector,this._scope.animate(t,r)},as.prototype.getAnimations=function(){for(var t=this._scope,r=this._selector,i=t.getAnimations({subtree:!0}),l=[],f=0;f<i.length;f++){var m=i[f].effect;m!==null&&m.target===t&&m.pseudoElement===r&&l.push(i[f])}return l},as.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function E1(t){return{name:t,group:new as("group",t),imagePair:new as("image-pair",t),old:new as("old",t),new:new as("new",t)}}function la(t){this._fragmentFiber=t,this._observers=this._eventListeners=null}la.prototype.addEventListener=function(t,r,i){var l=null,f=null;if(!(i!=null&&typeof i!="boolean"&&(l=i.signal||null,l!==null&&l.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var m=this._eventListeners;if(T1(m,t,r,i)===-1){var E=this,k=r;i!=null&&typeof i!="boolean"&&i.once===!0&&(k=function(Q){E.removeEventListener(t,r,i),typeof r=="function"?r.call(this,Q):r.handleEvent(Q)}),l!==null&&(f=E.removeEventListener.bind(E,t,r,i),l.addEventListener("abort",f,{once:!0}),f=l.removeEventListener.bind(l,"abort",f)),l=il(i),m.push({type:t,listener:r,optionsOrUseCapture:i,attachedListener:k,cleanup:f}),h(this._fragmentFiber.child,!1,rN,t,k,l)}this._eventListeners=m}};function rN(t,r,i,l){return R(t).addEventListener(r,i,l),!1}la.prototype.removeEventListener=function(t,r,i){var l=this._eventListeners;if(l!==null&&(r=T1(l,t,r,i),r!==-1)){var f=l[r];i=f.attachedListener;var m=f.cleanup;f=il(f.optionsOrUseCapture),h(this._fragmentFiber.child,!1,aN,t,i,f),l.splice(r,1),m!==null&&m()}};function aN(t,r,i,l){return R(t).removeEventListener(r,i,l),!1}function il(t){return t!=null&&typeof t!="boolean"&&(t.once===!0||t.signal instanceof AbortSignal)?{capture:t.capture,passive:t.passive}:t}function C1(t){return t==null?"c=0":typeof t=="boolean"?"c="+(t?"1":"0"):"c="+(t.capture?"1":"0")}function T1(t,r,i,l){if(t.length===0)return-1;l=C1(l);for(var f=0;f<t.length;f++){var m=t[f];if(m.type===r&&m.listener===i&&C1(m.optionsOrUseCapture)===l)return f}return-1}la.prototype.dispatchEvent=function(t){var r=b(this._fragmentFiber);if(r===null)return!0;r=R(r);var i=this._eventListeners;if(i!==null&&0<i.length||!t.bubbles){var l=r.nodeType===9?r.createComment(""):document.createTextNode("");if(i)for(var f=0;f<i.length;f++){var m=i[f];l.addEventListener(m.type,m.attachedListener,il(m.optionsOrUseCapture))}if(r.appendChild(l),t=l.dispatchEvent(t),i)for(f=0;f<i.length;f++)m=i[f],l.removeEventListener(m.type,m.attachedListener,il(m.optionsOrUseCapture));return r.removeChild(l),t}return r.dispatchEvent(t)},la.prototype.focus=function(t){h(this._fragmentFiber.child,!0,O1,t,void 0,void 0)};function O1(t,r){return t.tag===6?!1:(t=R(t),mN(t,r))}la.prototype.focusLast=function(t){var r=[];h(this._fragmentFiber.child,!0,$m,r,void 0,void 0);for(var i=r.length-1;0<=i&&!O1(r[i],t);i--);};function $m(t,r){return r.push(t),!1}la.prototype.blur=function(){var t=b(this._fragmentFiber);t!==null&&(t=R(t),t=ku(t).activeElement,t!==null&&h(this._fragmentFiber.child,!1,oN,t,void 0,void 0))};function oN(t,r){return t.tag===6?!1:(t=R(t),t===r||t.contains(r)?(r.blur(),!0):!1)}la.prototype.observeUsing=function(t){this._observers===null&&(this._observers=new Set),this._observers.add(t),h(this._fragmentFiber.child,!1,iN,t,void 0,void 0)};function iN(t,r){return t.tag===6||(t=R(t),r.observe(t)),!1}la.prototype.unobserveUsing=function(t){var r=this._observers;if(r!==null&&r.has(t)){r.delete(t),h(this._fragmentFiber.child,!1,sN,t,void 0,void 0);for(var i=r=0;i<Ha.length;i++){var l=Ha[i];l.fragmentInstance===this&&l.observer===t?t.unobserve(l.instance):Ha[r++]=l}Ha.length=r}};function sN(t,r){return t.tag===6||(t=R(t),r.unobserve(t)),!1}var Ha=[],Xm=!1;function lN(t,r,i){Ha.push({fragmentInstance:t,observer:r,instance:i}),Xm||(Xm=!0,yN(function(){Xm=!1;var l=Ha;Ha=[];for(var f=0;f<l.length;f++){var m=l[f];m.observer.unobserve(m.instance)}}))}la.prototype.getClientRects=function(){var t=[];return h(this._fragmentFiber.child,!1,uN,t,void 0,void 0),t};function uN(t,r){if(t.tag===6){t=t.stateNode;var i=t.ownerDocument.createRange();i.selectNodeContents(t),r.push.apply(r,i.getClientRects())}else t=R(t),r.push.apply(r,t.getClientRects());return!1}la.prototype.getRootNode=function(t){var r=b(this._fragmentFiber);return r===null?this:R(r).getRootNode(t)},la.prototype.compareDocumentPosition=function(t){var r=b(this._fragmentFiber);if(r===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var i=[];h(this._fragmentFiber.child,!1,$m,i,void 0,void 0);var l=R(r);if(i.length===0){if(i=l,S(this._fragmentFiber)){e:{for(r=this._fragmentFiber.return;r!==null;){if(r.tag===4){r=r.stateNode.containerInfo;break e}if(r.tag===3||r.tag===5||r.tag===27)break;r=r.return}r=null}r!=null&&(i=r)}r=this._fragmentFiber;var f=l=i.compareDocumentPosition(t);return i===t?f=Node.DOCUMENT_POSITION_CONTAINS:l&Node.DOCUMENT_POSITION_CONTAINED_BY&&(i=w(r)[1],i===null?f=Node.DOCUMENT_POSITION_PRECEDING:(t=R(i).compareDocumentPosition(t),f=t===0||t&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),f|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}r=R(i[0]),f=R(i[i.length-1]);var m=S(this._fragmentFiber)?r.parentElement:l;if(m==null)return Node.DOCUMENT_POSITION_DISCONNECTED;l=m.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_CONTAINED_BY,m=m.compareDocumentPosition(f)&Node.DOCUMENT_POSITION_CONTAINED_BY;var E=r.compareDocumentPosition(t),k=f.compareDocumentPosition(t),Q=E&Node.DOCUMENT_POSITION_CONTAINED_BY||k&Node.DOCUMENT_POSITION_CONTAINED_BY;return k=l&&m&&E&Node.DOCUMENT_POSITION_FOLLOWING&&k&Node.DOCUMENT_POSITION_PRECEDING,r=l&&r===t||m&&f===t||Q||k?Node.DOCUMENT_POSITION_CONTAINED_BY:!l&&r===t||!m&&f===t?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:E,r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||cN(r,this._fragmentFiber,i[0],i[i.length-1],t)?r:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function cN(t,r,i,l,f){var m=Fn(f);if(t&Node.DOCUMENT_POSITION_CONTAINED_BY){if(i=!!m)e:{for(;m!==null;){if(m.tag===7&&(m===r||m.alternate===r)){i=!0;break e}m=m.return}i=!1}return i}if(t&Node.DOCUMENT_POSITION_CONTAINS){if(m===null)return m=f.ownerDocument,f===m||f===m.documentElement||f===m.body;e:{for(m=r,r=b(r);m!==null;){if(!(m.tag!==5&&m.tag!==3&&m.tag!==27||m!==r&&m.alternate!==r)){m=!0;break e}m=m.return}m=!1}return m}return t&Node.DOCUMENT_POSITION_PRECEDING?((r=!!m)&&!(r=m===i)&&(r=P(i,m,N),r===null?r=!1:(h(r,!0,M,m,i),m=T,T=null,r=m!==null)),r):t&Node.DOCUMENT_POSITION_FOLLOWING?((r=!!m)&&!(r=m===l)&&(r=P(l,m,N),r===null?r=!1:(h(r,!0,A,m,l),m=T,O=T=null,r=m!==null)),r):!1}function M1(t,r){var i=t.ownerDocument.createRange();i.selectNodeContents(t),t=i.getBoundingClientRect(),window.scrollTo(window.scrollX+t.left,r?window.scrollY+t.top:window.scrollY+t.bottom-window.innerHeight)}la.prototype.scrollIntoView=function(t){if(typeof t=="object")throw Error(o(566));var r=[];h(this._fragmentFiber.child,!1,$m,r,void 0,void 0);var i=t!==!1;if(r.length===0){var l=w(this._fragmentFiber);if(l=i?l[1]||l[0]||b(this._fragmentFiber):l[0]||l[1],l===null)return;if(l.tag===6){t=R(l),M1(t,i);return}if(l=R(l),l.nodeType!==9){if(l.nodeType===11){i="host"in l?l.host:null,i!==null&&i.scrollIntoView(t);return}l.scrollIntoView(t)}}for(l=i?r.length-1:0;l!==(i?-1:r.length);){var f=r[l];f.tag===6?(f=R(f),M1(f,i)):R(f).scrollIntoView(t),l+=i?-1:1}};function dN(t,r){return t=R(t),A1(t,r),!1}function A1(t,r){t.reactFragments==null&&(t.reactFragments=new Set),t.reactFragments.add(r)}function D1(t,r){var i=r._eventListeners;if(i!==null)for(var l=0;l<i.length;l++){var f=i[l];t.addEventListener(f.type,f.attachedListener,il(f.optionsOrUseCapture))}t.nodeType!==3&&(i=r._observers,i!==null&&i.forEach(function(m){for(var E=0,k=0;k<Ha.length;k++){var Q=Ha[k];(Q.fragmentInstance!==r||Q.observer!==m||Q.instance!==t)&&(Ha[E++]=Q)}Ha.length=E,m.observe(t)}),A1(t,r))}function fN(t,r){var i=r._eventListeners;if(i!==null)for(var l=0;l<i.length;l++){var f=i[l];t.removeEventListener(f.type,f.attachedListener,il(f.optionsOrUseCapture))}t.nodeType!==3&&(i=r._observers,i!==null&&i.forEach(function(m){typeof m.rootMargin=="string"?lN(r,m,t):m.unobserve(t)}),t.reactFragments!=null&&t.reactFragments.delete(r))}function Qm(t){var r=t.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var i=r;switch(r=r.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Qm(i),Yn(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}t.removeChild(i)}}function hN(t,r,i,l){for(;t.nodeType===1;){var f=i;if(t.nodeName.toLowerCase()!==r.toLowerCase()){if(!l&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(l){if(!t[pa])switch(r){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(m=t.getAttribute("rel"),m==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(m!==f.rel||t.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||t.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||t.getAttribute("title")!==(f.title==null?null:f.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(m=t.getAttribute("src"),(m!==(f.src==null?null:f.src)||t.getAttribute("type")!==(f.type==null?null:f.type)||t.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&m&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(r==="input"&&t.type==="hidden"){var m=f.name==null?null:""+f.name;if(f.type==="hidden"&&t.getAttribute("name")===m)return t}else return t;if(t=wa(t.nextSibling),t===null)break}return null}function pN(t,r,i){if(r==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!i||(t=wa(t.nextSibling),t===null))return null;return t}function N1(t,r){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!r||(t=wa(t.nextSibling),t===null))return null;return t}function Zm(t){return t.data==="$?"||t.data==="$~"}function Jm(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function gN(t,r){var i=t.ownerDocument;if(t.data==="$~")t._reactRetry=r;else if(t.data!=="$?"||i.readyState!=="loading")r();else{var l=function(){r(),i.removeEventListener("DOMContentLoaded",l)};i.addEventListener("DOMContentLoaded",l),t._reactRetry=l}}function wa(t){for(;t!=null;t=t.nextSibling){var r=t.nodeType;if(r===1||r===3)break;if(r===8){if(r=t.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return t}var Wm=null;function j1(t){t=t.nextSibling;for(var r=0;t;){if(t.nodeType===8){var i=t.data;if(i==="/$"||i==="/&"){if(r===0)return wa(t.nextSibling);r--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||r++}t=t.nextSibling}return null}function I1(t){t=t.previousSibling;for(var r=0;t;){if(t.nodeType===8){var i=t.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(r===0)return t;r--}else i!=="/$"&&i!=="/&"||r++}t=t.previousSibling}return null}function mN(t,r){function i(){l=!0}if(t.ownerDocument.activeElement===t)return!0;var l=!1;try{t.ownerDocument.addEventListener("focus",i,!0),(t.focus||HTMLElement.prototype.focus).call(t,r)}finally{t.ownerDocument.removeEventListener("focus",i,!0)}return l}function yN(t){b1(function(){b1(function(r){return t(r)})})}function k1(t,r,i){switch(r=ku(i),t){case"html":if(t=r.documentElement,!t)throw Error(o(452));return t;case"head":if(t=r.head,!t)throw Error(o(453));return t;case"body":if(t=r.body,!t)throw Error(o(454));return t;default:throw Error(o(451))}}function P1(t,r,i){for(var l in i){var f=i[l];i.hasOwnProperty(l)&&f!=null&&mn(t,r,l,null,KD,f)}i.dangerouslySetInnerHTML!=null&&(t.textContent=""),t.onclick===Ar&&(t.onclick=null),Yn(t)}function e0(t){for(var r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Yn(t)}var Ra=new Map,L1=new Set;function Pu(t){if(typeof t.getRootNode=="function"){var r=t.getRootNode();if(r.nodeType===9||r.nodeType===11)return r}return t.nodeType===9?t:t.ownerDocument}var jo=ce.d;ce.d={f:vN,r:bN,D:xN,C:SN,L:wN,m:RN,X:CN,S:EN,M:TN};function vN(){var t=jo.f(),r=Jd();return t||r}function bN(t){var r=fr(t);r!==null&&r.tag===5&&r.type==="form"?_x(r):jo.r(t)}var sl=typeof document>"u"?null:document;function z1(t,r,i){var l=sl;if(l&&typeof r=="string"&&r){var f=Nn(r);f='link[rel="'+t+'"][href="'+f+'"]',typeof i=="string"&&(f+='[crossorigin="'+i+'"]'),L1.has(f)||(L1.add(f),t={rel:t,crossOrigin:i,href:r},l.querySelector(f)===null&&(r=l.createElement("link"),br(r,"link",t),Se(r),l.head.appendChild(r)))}}function xN(t){jo.D(t),z1("dns-prefetch",t,null)}function SN(t,r){jo.C(t,r),z1("preconnect",t,r)}function wN(t,r,i){jo.L(t,r,i);var l=sl;if(l&&t&&r){var f='link[rel="preload"][as="'+Nn(r)+'"]';r==="image"&&i&&i.imageSrcSet?(f+='[imagesrcset="'+Nn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(f+='[imagesizes="'+Nn(i.imageSizes)+'"]')):f+='[href="'+Nn(t)+'"]';var m=f;switch(r){case"style":m=ll(t);break;case"script":m=ul(t)}if(!(Ra.has(m)||(t=I({rel:"preload",href:r==="image"&&i&&i.imageSrcSet?void 0:t,as:r},i),Ra.set(m,t),l.querySelector(f)!==null||r==="style"&&l.querySelector(Lu(m))||r==="script"&&l.querySelector(zu(m))))){var E=l.createElement("link");br(E,"link",t),r==="style"&&(E[Pt]=!0,E.onload=E.onerror=function(){nt(E)}),Se(E),l.head.appendChild(E)}}}function RN(t,r){jo.m(t,r);var i=sl;if(i&&t){var l=r&&typeof r.as=="string"?r.as:"script",f='link[rel="modulepreload"][as="'+Nn(l)+'"][href="'+Nn(t)+'"]',m=f;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=ul(t)}if(!Ra.has(m)&&(t=I({rel:"modulepreload",href:t},r),Ra.set(m,t),i.querySelector(f)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(zu(m)))return}l=i.createElement("link"),br(l,"link",t),Se(l),i.head.appendChild(l)}}}function EN(t,r,i){jo.S(t,r,i);var l=sl;if(l&&t){var f=Ae(l).hoistableStyles,m=ll(t);r=r||"default";var E=f.get(m);if(!E){var k={loading:0,preload:null};if(E=l.querySelector(Lu(m)))k.loading=5;else{t=I({rel:"stylesheet",href:t,"data-precedence":r},i),(i=Ra.get(m))&&t0(t,i);var Q=E=l.createElement("link");Se(Q),br(Q,"link",t),Q._p=new Promise(function(ie,pe){Q.onload=ie,Q.onerror=pe}),Q.addEventListener("load",function(){k.loading|=1}),Q.addEventListener("error",function(){k.loading|=2}),k.loading|=4,of(E,r,l)}E={type:"stylesheet",instance:E,count:1,state:k},f.set(m,E)}}}function CN(t,r){jo.X(t,r);var i=sl;if(i&&t){var l=Ae(i).hoistableScripts,f=ul(t),m=l.get(f);m||(m=i.querySelector(zu(f)),m||(t=I({src:t,async:!0},r),(r=Ra.get(f))&&n0(t,r),m=i.createElement("script"),Se(m),br(m,"link",t),i.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},l.set(f,m))}}function TN(t,r){jo.M(t,r);var i=sl;if(i&&t){var l=Ae(i).hoistableScripts,f=ul(t),m=l.get(f);m||(m=i.querySelector(zu(f)),m||(t=I({src:t,async:!0,type:"module"},r),(r=Ra.get(f))&&n0(t,r),m=i.createElement("script"),Se(m),br(m,"link",t),i.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},l.set(f,m))}}function _1(t,r,i,l){var f=(f=be.current)?Pu(f):null;if(!f)throw Error(o(446));switch(t){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(i=ll(i.href),r=Ae(f).hoistableStyles,l=r.get(i),l||(l={type:"style",instance:null,count:0,state:null},r.set(i,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){t=ll(i.href);var m=Ae(f).hoistableStyles,E=m.get(t);if(E||(f=f.ownerDocument||f,E={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(t,E),(m=f.querySelector(Lu(t)))?m._p||(E.instance=m,E.state.loading=5):(m=Ra.get(t),m||(m={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Ra.set(t,m)),ON(f,t,m,E.state))),r&&l===null)throw Error(o(528,""));return E}if(r&&l!==null)throw Error(o(529,""));return null;case"script":return r=i.async,i=i.src,typeof i=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(i=ul(i),r=Ae(f).hoistableScripts,l=r.get(i),l||(l={type:"script",instance:null,count:0,state:null},r.set(i,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,t))}}function ll(t){return'href="'+Nn(t)+'"'}function Lu(t){return'link[rel="stylesheet"]['+t+"]"}function H1(t){return I({},t,{"data-precedence":t.precedence,precedence:null})}function ON(t,r,i,l){if(r=t.querySelector('link[rel="preload"][as="style"]['+r+"]")){if(r[Pt]!==!0){l.loading=1;return}}else r=t.createElement("link"),r[Pt]=!0,r.onload=r.onerror=nt.bind(null,r),br(r,"link",i),Se(r),t.head.appendChild(r);l.preload=r,r.addEventListener("load",function(){return l.loading|=1}),r.addEventListener("error",function(){return l.loading|=2})}function ul(t){return'[src="'+Nn(t)+'"]'}function zu(t){return"script[async]"+t}function U1(t,r,i){if(r.count++,r.instance===null)switch(r.type){case"style":var l=t.querySelector('style[data-href~="'+Nn(i.href)+'"]');if(l)return r.instance=l,Se(l),l;var f=I({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return l=(t.ownerDocument||t).createElement("style"),Se(l),br(l,"style",f),of(l,i.precedence,t),r.instance=l;case"stylesheet":f=ll(i.href);var m=t.querySelector(Lu(f));if(m)return r.state.loading|=4,r.instance=m,Se(m),m;l=H1(i),(f=Ra.get(f))&&t0(l,f),m=(t.ownerDocument||t).createElement("link"),Se(m);var E=m;return E._p=new Promise(function(k,Q){E.onload=k,E.onerror=Q}),br(m,"link",l),r.state.loading|=4,of(m,i.precedence,t),r.instance=m;case"script":return m=ul(i.src),(f=t.querySelector(zu(m)))?(r.instance=f,Se(f),f):(l=i,(f=Ra.get(m))&&(l=I({},i),n0(l,f)),t=t.ownerDocument||t,f=t.createElement("script"),Se(f),br(f,"link",l),t.head.appendChild(f),r.instance=f);case"void":return null;default:throw Error(o(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(l=r.instance,r.state.loading|=4,of(l,i.precedence,t));return r.instance}function of(t,r,i){for(var l=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=l.length?l[l.length-1]:null,m=f,E=0;E<l.length;E++){var k=l[E];if(k.dataset.precedence===r)m=k;else if(m!==f)break}m?m.parentNode.insertBefore(t,m.nextSibling):(r=i.nodeType===9?i.head:i,r.insertBefore(t,r.firstChild))}function t0(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.title==null&&(t.title=r.title)}function n0(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.integrity==null&&(t.integrity=r.integrity)}var sf=null;function F1(t,r,i){if(sf===null){var l=new Map,f=sf=new Map;f.set(i,l)}else f=sf,l=f.get(i),l||(l=new Map,f.set(i,l));if(l.has(t))return l;for(l.set(t,null),i=i.getElementsByTagName(t),f=0;f<i.length;f++){var m=i[f];if(!(m[pa]||m[dn]||t==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var E=m.getAttribute(r)||"";E=t+E;var k=l.get(E);k?k.push(m):l.set(E,[m])}}return l}function r0(t,r,i){t=t.ownerDocument||t,t.head.insertBefore(i,r==="title"?t.querySelector("head > title"):null)}function MN(t,r,i){if(i===1||r.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;return r.rel==="stylesheet"?(t=r.disabled,typeof r.precedence=="string"&&t==null):!0;case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function B1(t,r){return t==="img"&&r.src!=null&&r.src!==""&&r.onLoad==null&&r.loading!=="lazy"}function V1(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function q1(t){return(t.width||100)*(t.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function Y1(t,r){typeof r.decode=="function"&&(t.imgCount++,r.complete||(t.imgBytes+=q1(r),t.suspenseyImages.push(r)),t=NN.bind(t),r.decode().then(t,t))}function AN(t,r,i,l){if(i.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var f=ll(l.href),m=r.querySelector(Lu(f));if(m){r=m._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(t.count++,t=_u.bind(t),r.then(t,t)),i.state.loading|=4,i.instance=m,Se(m);return}m=r.ownerDocument||r,l=H1(l),(f=Ra.get(f))&&t0(l,f),m=m.createElement("link"),Se(m);var E=m;E._p=new Promise(function(k,Q){E.onload=k,E.onerror=Q}),br(m,"link",l),i.instance=m}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(i,r),(r=i.state.preload)&&(i.state.loading&3)===0&&(t.count++,i=_u.bind(t),r.addEventListener("load",i),r.addEventListener("error",i))}}var lf=0;function DN(t,r){return t.stylesheets&&t.count===0&&cf(t,t.stylesheets),0<t.count||0<t.imgCount?function(i){var l=setTimeout(function(){if(t.stylesheets&&cf(t,t.stylesheets),t.unsuspend){var m=t.unsuspend;t.unsuspend=null,m()}},6e4+r);0<t.imgBytes&&lf===0&&(lf=62500*$D());var f=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&cf(t,t.stylesheets),t.unsuspend)){var m=t.unsuspend;t.unsuspend=null,m()}},(t.imgBytes>lf?50:800)+r);return t.unsuspend=i,function(){t.unsuspend=null,clearTimeout(l),clearTimeout(f)}}:null}function K1(t){if(t.count===0&&(t.imgCount===0||!t.waitingForImages)){if(t.stylesheets)cf(t,t.stylesheets);else if(t.unsuspend){var r=t.unsuspend;t.unsuspend=null,r()}}}function _u(){this.count--,K1(this)}function NN(){this.imgCount--,K1(this)}var uf=null;function cf(t,r){t.stylesheets=null,t.unsuspend!==null&&(t.count++,uf=new Map,r.forEach(jN,t),uf=null,_u.call(t))}function jN(t,r){if(!(r.state.loading&4)){var i=uf.get(t);if(i)var l=i.get(null);else{i=new Map,uf.set(t,i);for(var f=t.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<f.length;m++){var E=f[m];(E.nodeName==="LINK"||E.getAttribute("media")!=="not all")&&(i.set(E.dataset.precedence,E),l=E)}l&&i.set(null,l)}f=r.instance,E=f.getAttribute("data-precedence"),m=i.get(E)||l,m===l&&i.set(null,f),i.set(E,f),this.count++,l=_u.bind(this),f.addEventListener("load",l),f.addEventListener("error",l),m?m.parentNode.insertBefore(f,m.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(f,t.firstChild)),r.state.loading|=4}}var cl={$$typeof:H,Provider:null,Consumer:null,_currentValue:Te,_currentValue2:Te,_threadCount:0};function IN(t,r,i,l,f,m,E,k,Q){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=St(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=St(0),this.hiddenUpdates=St(null),this.identifierPrefix=l,this.onUncaughtError=f,this.onCaughtError=m,this.onRecoverableError=E,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Q,this.transitionTypes=null,this.incompleteTransitions=new Map}function G1(t,r,i,l,f,m,E,k,Q,ie,pe,Ce){return t=new IN(t,r,i,E,Q,ie,pe,Ce,k),r=1,m===!0&&(r|=24),m=Br(3,null,null,r),t.current=m,m.stateNode=t,r=vg(),r.refCount++,t.pooledCache=r,r.refCount++,m.memoizedState={element:l,isDehydrated:i,cache:r},wg(m),t}function $1(t){return t?(t=Ls,t):Ls}function X1(t,r,i,l,f,m){f=$1(f),l.context===null?l.context=f:l.pendingContext=f,l=ti(r),l.payload={element:i},m=m===void 0?null:m,m!==null&&(l.callback=m),i=ni(t,l,r),i!==null&&(Kr(i,t,r),gu(i,t,r))}function Q1(t,r){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var i=t.retryLane;t.retryLane=i!==0&&i<r?i:r}}function a0(t,r){Q1(t,r),(t=t.alternate)&&Q1(t,r)}function Z1(t){if(t.tag===13||t.tag===31){var r=Fi(t,67108864);r!==null&&Kr(r,t,67108864),a0(t,67108864)}}function J1(t){if(t.tag===13||t.tag===31){var r=sa();r=Ut(r);var i=Fi(t,r);i!==null&&Kr(i,t,r),a0(t,r)}}var dl=!0;function kN(t,r,i,l){var f=ge.T;ge.T=null;var m=ce.p;try{ce.p=2,o0(t,r,i,l)}finally{ce.p=m,ge.T=f}}function PN(t,r,i,l){var f=ge.T;ge.T=null;var m=ce.p;try{ce.p=8,o0(t,r,i,l)}finally{ce.p=m,ge.T=f}}function o0(t,r,i,l){if(dl){var f=i0(l);if(f===null)Um(t,r,l,df,i),eS(t,l);else if(zN(f,t,r,i,l))l.stopPropagation();else if(eS(t,l),r&4&&-1<LN.indexOf(t)){for(;f!==null;){var m=fr(f);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var E=qe(m.pendingLanes);if(E!==0){var k=m;for(k.pendingLanes|=2,k.entangledLanes|=2;E;){var Q=1<<31-et(E);k.entanglements[1]|=Q,E&=~Q}ro(m),(ln&6)===0&&(Xd=xt()+500,Nu(0))}}break;case 31:case 13:k=Fi(m,2),k!==null&&Kr(k,m,2),Jd(),a0(m,2)}if(m=i0(l),m===null&&Um(t,r,l,df,i),m===f)break;f=m}f!==null&&l.stopPropagation()}else Um(t,r,l,null,i)}}function i0(t){return t=Li(t),s0(t)}var df=null;function s0(t){if(df=null,t=Fn(t),t!==null){var r=u(t);if(r===null)t=null;else{var i=r.tag;if(i===13){if(t=c(r),t!==null)return t;t=null}else if(i===31){if(t=d(r),t!==null)return t;t=null}else if(i===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;t=null}else r!==t&&(t=null)}}return df=t,null}function W1(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"fullscreenerror":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch($t()){case ft:return 2;case vt:return 8;case gt:case Lt:return 32;case un:return 268435456;default:return 32}default:return 32}}var l0=!1,pi=null,gi=null,mi=null,Hu=new Map,Uu=new Map,yi=[],LN="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function eS(t,r){switch(t){case"focusin":case"focusout":pi=null;break;case"dragenter":case"dragleave":gi=null;break;case"mouseover":case"mouseout":mi=null;break;case"pointerover":case"pointerout":Hu.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Uu.delete(r.pointerId)}}function Fu(t,r,i,l,f,m){return t===null||t.nativeEvent!==m?(t={blockedOn:r,domEventName:i,eventSystemFlags:l,nativeEvent:m,targetContainers:[f]},r!==null&&(r=fr(r),r!==null&&Z1(r)),t):(t.eventSystemFlags|=l,r=t.targetContainers,f!==null&&r.indexOf(f)===-1&&r.push(f),t)}function zN(t,r,i,l,f){switch(r){case"focusin":return pi=Fu(pi,t,r,i,l,f),!0;case"dragenter":return gi=Fu(gi,t,r,i,l,f),!0;case"mouseover":return mi=Fu(mi,t,r,i,l,f),!0;case"pointerover":var m=f.pointerId;return Hu.set(m,Fu(Hu.get(m)||null,t,r,i,l,f)),!0;case"gotpointercapture":return m=f.pointerId,Uu.set(m,Fu(Uu.get(m)||null,t,r,i,l,f)),!0}return!1}function tS(t){var r=Fn(t.target);if(r!==null){var i=u(r);if(i!==null){if(r=i.tag,r===13){if(r=c(i),r!==null){t.blockedOn=r,Qr(t.priority,function(){J1(i)});return}}else if(r===31){if(r=d(i),r!==null){t.blockedOn=r,Qr(t.priority,function(){J1(i)});return}}else if(r===3&&i.stateNode.current.memoizedState.isDehydrated){t.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}t.blockedOn=null}function ff(t){if(t.blockedOn!==null)return!1;for(var r=t.targetContainers;0<r.length;){var i=i0(t.nativeEvent);if(i===null){i=t.nativeEvent;var l=new i.constructor(i.type,i);Pi=l,i.target.dispatchEvent(l),Pi=null}else return r=fr(i),r!==null&&Z1(r),t.blockedOn=i,!1;r.shift()}return!0}function nS(t,r,i){ff(t)&&i.delete(r)}function _N(){l0=!1,pi!==null&&ff(pi)&&(pi=null),gi!==null&&ff(gi)&&(gi=null),mi!==null&&ff(mi)&&(mi=null),Hu.forEach(nS),Uu.forEach(nS)}function hf(t,r){t.blockedOn===r&&(t.blockedOn=null,l0||(l0=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,_N)))}var pf=null;function rS(t){pf!==t&&(pf=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){pf===t&&(pf=null);for(var r=0;r<t.length;r+=3){var i=t[r],l=t[r+1],f=t[r+2];if(typeof l!="function"){if(s0(l||i)===null)continue;break}var m=fr(i);m!==null&&(t.splice(r,3),r-=3,Vg(m,{pending:!0,data:f,method:i.method,action:l},l,f))}}))}function fl(t){function r(Q){return hf(Q,t)}pi!==null&&hf(pi,t),gi!==null&&hf(gi,t),mi!==null&&hf(mi,t),Hu.forEach(r),Uu.forEach(r);for(var i=0;i<yi.length;i++){var l=yi[i];l.blockedOn===t&&(l.blockedOn=null)}for(;0<yi.length&&(i=yi[0],i.blockedOn===null);)tS(i),i.blockedOn===null&&yi.shift();if(i=(t.ownerDocument||t).$$reactFormReplay,i!=null)for(l=0;l<i.length;l+=3){var f=i[l],m=i[l+1],E=f[Mn]||null;if(typeof m=="function")E||rS(i);else if(E){var k=null;if(m&&m.hasAttribute("formAction")){if(f=m,E=m[Mn]||null)k=E.formAction;else if(s0(f)!==null)continue}else k=E.action;typeof k=="function"?i[l+1]=k:(i.splice(l,3),l-=3),rS(i)}}}function aS(){function t(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(E){return f=E})},focusReset:"manual",scroll:"manual"})}function r(){f!==null&&(f(),f=null),l||setTimeout(i,20)}function i(){if(!l&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,f=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(i,100),function(){l=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),f!==null&&(f(),f=null)}}}function u0(t){this._internalRoot=t}gf.prototype.render=u0.prototype.render=function(t){var r=this._internalRoot;if(r===null)throw Error(o(409));var i=r.current,l=sa();X1(i,l,t,r,null,null)},gf.prototype.unmount=u0.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var r=t.containerInfo;X1(t.current,2,null,t,null,null),Jd(),r[jn]=null}};function gf(t){this._internalRoot=t}gf.prototype.unstable_scheduleHydration=function(t){if(t){var r=Cn();t={blockedOn:null,target:t,priority:r};for(var i=0;i<yi.length&&r!==0&&r<yi[i].priority;i++);yi.splice(i,0,t),i===0&&tS(t)}};var oS=n.version;if(oS!=="19.3.1")throw Error(o(527,oS,"19.3.1"));ce.findDOMNode=function(t){var r=t._reactInternals;if(r===void 0)throw typeof t.render=="function"?Error(o(188)):(t=Object.keys(t).join(","),Error(o(268,t)));return t=g(r),t=t!==null?y(t):null,t=t===null?null:t.stateNode,t};var HN={bundleType:0,version:"19.3.1",rendererPackageName:"react-dom",currentDispatcherRef:ge,reconcilerVersion:"19.3.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var mf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!mf.isDisabled&&mf.supportsFiber)try{ke=mf.inject(HN),ze=mf}catch{}}return Vu.createRoot=function(t,r){if(!s(t))throw Error(o(299));var i=!1,l="",f=$x,m=Xx,E=Qx;return r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(l=r.identifierPrefix),r.onUncaughtError!==void 0&&(f=r.onUncaughtError),r.onCaughtError!==void 0&&(m=r.onCaughtError),r.onRecoverableError!==void 0&&(E=r.onRecoverableError)),r=G1(t,1,!1,null,null,i,l,null,f,m,E,aS),t[jn]=r.current,Hm(t),new u0(r)},Vu.hydrateRoot=function(t,r,i){if(!s(t))throw Error(o(299));var l=!1,f="",m=$x,E=Xx,k=Qx,Q=null;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(f=i.identifierPrefix),i.onUncaughtError!==void 0&&(m=i.onUncaughtError),i.onCaughtError!==void 0&&(E=i.onCaughtError),i.onRecoverableError!==void 0&&(k=i.onRecoverableError),i.formState!==void 0&&(Q=i.formState)),r=G1(t,1,!0,r,i??null,l,f,Q,m,E,k,aS),r.context=$1(null),i=r.current,l=sa(),l=Ut(l),f=ti(l),f.callback=null,ni(i,f,l),i=l,r.current.lanes=i,ct(r,i),ro(r),t[jn]=r.current,Hm(t),new gf(r)},Vu.version="19.3.1",Vu}var gS;function XN(){if(gS)return f0.exports;gS=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),f0.exports=$N(),f0.exports}var QN=XN();const mS={};function er(e,n){const a=v.useRef(mS);return a.current===mS&&(a.current=e(n)),a}const X0=[];let Q0;function ZN(){return Q0}function JN(e){X0.push(e)}function Cc(e){const n=(a,o)=>{const s=er(WN).current;let u;try{Q0=s;for(const c of X0)c.before(s);u=e(a,o);for(const c of X0)c.after(s);s.didInitialize=!0}finally{Q0=void 0}return u};return n.displayName=e.displayName||e.name,n}function YR(e){return v.forwardRef(Cc(e))}function WN(){return{didInitialize:!1}}function Sn(){}const fo=Object.freeze([]),Gt=Object.freeze({}),e4=()=>{},_e=typeof document<"u"?v.useLayoutEffect:e4;function t4(e,n){return function(o,...s){const u=new URL(e);return u.searchParams.set("code",o.toString()),s.forEach(c=>u.searchParams.append("args[]",c)),`${n} error #${o}; visit ${u} for the full message.`}}const Rn=t4("https://base-ui.com/production-error","Base UI"),KR=v.createContext(void 0);function Tc(e){const n=v.useContext(KR);if(n===void 0&&!e)throw new Error(Rn(72));return n}function zy(e){v.useEffect(e,fo)}const qu=0;class Da{static create(){return new Da}currentId=qu;start(n,a){this.clear(),this.currentId=setTimeout(()=>{this.currentId=qu,a()},n)}isStarted(){return this.currentId!==qu}clear=()=>{this.currentId!==qu&&(clearTimeout(this.currentId),this.currentId=qu)};disposeEffect=()=>this.clear}function Hn(){const e=er(Da.create).current;return zy(e.disposeEffect),e}function n4(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}const{userAgent:r4,platform:a4,maxTouchPoints:o4}=n4(),Ph=r4.toLowerCase(),hc=a4.toLowerCase(),Lh=/^i(os$|p)/.test(hc)||hc==="macintel"&&o4>1,yS="android",Z0=hc===yS||Ph.includes(yS),_y=!Lh&&hc.startsWith("mac");hc.startsWith("win");const i4=_y||Lh,ho=typeof CSS<"u"&&!!CSS.supports?.("-webkit-backdrop-filter:none");!ho&&Ph.includes("firefox");!ho&&Ph.includes("chrom");const s4=i4,Hy=/jsdom|happydom/.test(Ph);function Fa(e){e.preventDefault(),e.stopPropagation()}function l4(e){return"nativeEvent"in e}function jl(e){return e.pointerType===""&&e.isTrusted?!0:Z0&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Uy(e){return Hy?!1:!Z0&&e.width===0&&e.height===0||e.type==="pointerdown"&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"&&(Z0||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Ci(e,n){const a=["mouse","pen"];return n||a.push("",void 0),a.includes(e)}function u4(e){const n=e.type;return n==="click"||n==="mousedown"||n==="keydown"||n==="keyup"}function zh(){return typeof window<"u"}function Sr(e){return Fy(e)?(e.nodeName||"").toLowerCase():"#document"}function wn(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function Fo(e){var n;return(n=(Fy(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function Fy(e){return zh()?e instanceof Node||e instanceof wn(e).Node:!1}function on(e){return zh()?e instanceof Element||e instanceof wn(e).Element:!1}function yn(e){return zh()?e instanceof HTMLElement||e instanceof wn(e).HTMLElement:!1}function gs(e){return!zh()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof wn(e).ShadowRoot}function Oc(e){const{overflow:n,overflowX:a,overflowY:o,display:s}=fa(e);return/auto|scroll|overlay|hidden|clip/.test(n+o+a)&&s!=="inline"&&s!=="contents"}function c4(e){return/^(table|td|th)$/.test(Sr(e))}function _h(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const d4=/transform|translate|scale|rotate|perspective|filter/,f4=/paint|layout|strict|content/,os=e=>!!e&&e!=="none";let m0;function By(e){const n=on(e)?fa(e):e;return os(n.transform)||os(n.translate)||os(n.scale)||os(n.rotate)||os(n.perspective)||!Vy()&&(os(n.backdropFilter)||os(n.filter))||d4.test(n.willChange||"")||f4.test(n.contain||"")}function h4(e){let n=Uo(e);for(;yn(n)&&!zo(n);){if(By(n))return n;if(_h(n))return null;n=Uo(n)}return null}function Vy(){return m0==null&&(m0=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),m0}function zo(e){return/^(html|body|#document)$/.test(Sr(e))}function fa(e){return wn(e).getComputedStyle(e)}function Hh(e){return on(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Uo(e){if(Sr(e)==="html")return e;const n=e.assignedSlot||e.parentNode||gs(e)&&e.host||Fo(e);return gs(n)?n.host:n}function GR(e){const n=Uo(e);return zo(n)?(e.ownerDocument||e).body:yn(n)&&Oc(n)?n:GR(n)}function pc(e,n,a){var o;n===void 0&&(n=[]),a===void 0&&(a=!0);const s=GR(e),u=s===((o=e.ownerDocument)==null?void 0:o.body),c=wn(s);if(u){const d=J0(c);return n.concat(c,c.visualViewport||[],Oc(s)?s:[],d&&a?pc(d):[])}else return n.concat(s,pc(s,[],a))}function J0(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function $r(e){let n=e.activeElement;for(;n?.shadowRoot?.activeElement!=null;)n=n.shadowRoot.activeElement;return n}function at(e,n){if(!e||!n)return!1;const a=n.getRootNode?.();if(e.contains(n))return!0;if(a&&gs(a)){let o=n;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function gc(e,n){let a=e;for(;a;){if(on(a)&&a.matches(n))return a;a=a.assignedSlot??a.parentNode??(gs(a)?a.host:null)}return null}function tr(e){return"composedPath"in e?e.composedPath()[0]??e.target:e.target}const W0="data-base-ui-focusable",$R="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Uh="ArrowLeft",Fh="ArrowRight",XR="ArrowUp",qy="ArrowDown",Yy="data-starting-style",p4="data-ending-style",g4={[Yy]:""},m4={[p4]:""},po={transitionStatus(e){return e==="starting"?g4:e==="ending"?m4:null}},y4="data-open",v4="data-closed",b4="data-anchor-hidden",QR="data-popup-open",x4="data-pressed",S4={[QR]:""},w4={[QR]:"",[x4]:""},R4={[y4]:""},E4={[v4]:""},C4={[b4]:""},ZR={open(e){return e?S4:null}},rh={open(e){return e?w4:null}},Mc={open(e){return e?R4:E4},anchorHidden(e){return e?C4:null}},Bh={...Mc,...po},ey="data-trigger-disabled";function ah(e,n){if(!on(e))return!1;const a=e;if(n.hasElement(a))return!a.hasAttribute(ey);for(const[,o]of n.entries())if(at(o,a))return!o.hasAttribute(ey);return!1}function y0(e,n){if(n==null)return!1;if("composedPath"in e)return e.composedPath().includes(n);const a=e;return a.target!=null&&n.contains(a.target)}function T4(e){return e.matches("html,body")}function Ac(e){return yn(e)&&e.matches($R)}function O4(e){return gc(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${$R}`)!=null}function ty(e){return e?e.getAttribute("role")==="combobox"&&Ac(e):!1}function M4(e){if(!e||Hy)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function oh(e){return e?e.hasAttribute(W0)?e:e.querySelector(`[${W0}]`)||e:null}function A4(e,n){return n!=null&&!Ci(n)?0:typeof e=="function"?e():e}function ms(e,n,a){const o=A4(e,a);return typeof o=="number"?o:o?.[n]}function vS(e){return typeof e=="function"?e():e}function JR(e,n){return n||e==="click"||e==="mousedown"}function D4(e){return e?.includes("mouse")&&e!=="mousedown"}function dt(e,n,a,o){let s=!1,u=!1;const c=o??Gt;return{reason:e,event:n??new Event("base-ui"),cancel(){s=!0},allowPropagation(){u=!0},get isCanceled(){return s},get isPropagationAllowed(){return u},trigger:a,...c}}function N4(e,n,a){const o=a??Gt;return{reason:e,event:n??new Event("base-ui"),...o}}const _r="none",Va="trigger-press",qn="trigger-hover",Sl="trigger-focus",Vh="outside-press",fs="item-press",WR="close-press",Ti="focus-out",Dc="escape-key",ih="list-navigation",eE="keyboard",j4="pointer",Ky="cancel-open",Zu="sibling-open",I4="disabled",Nc="imperative-action",k4="window-resize",tE=v.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Da,currentIdRef:{current:null},currentContextRef:{current:null}});function P4(e,n){e.current=n.current}function L4(e){const{children:n,delay:a,timeoutMs:o=0}=e,s=v.useRef(a),u=v.useRef(a),c=v.useRef(null),d=v.useRef(null),p=Hn();return _e(()=>{if(u.current=a,!c.current){s.current=a;return}s.current={open:ms(s.current,"open"),close:ms(a,"close")}},[a,c,s,u]),x.jsx(tE.Provider,{value:v.useMemo(()=>({hasProvider:!0,delayRef:s,initialDelayRef:u,currentIdRef:c,timeoutMs:o,currentContextRef:d,timeout:p}),[o,p]),children:n})}function z4(e,n={open:!1}){const{open:a}=n,o=e.useState("floatingId"),s=v.useContext(tE),{currentIdRef:u,delayRef:c,timeoutMs:d,initialDelayRef:p,currentContextRef:g,hasProvider:y,timeout:h}=s,[b,S]=v.useState(!1),w=v.useRef(a);return _e(()=>{w.current=a},[a]),_e(()=>{function C(){g.current?.setIsInstantPhase(!1),u.current=null,g.current=null,c.current=p.current,h.clear()}if(u.current&&!a&&u.current===o){if(S(!1),d){const R=o;return h.start(d,()=>{e.select("open")||u.current&&u.current!==R||C()}),()=>{(w.current||u.current!==R)&&h.clear()}}C()}},[a,o,u,c,d,p,g,h,e]),_e(()=>{if(!a)return;const C=g.current,R=u.current;h.clear(),g.current={onOpenChange:e.setOpen,setIsInstantPhase:S},u.current=o,c.current={open:0,close:ms(p.current,"close")},R!==null&&R!==o?(S(!0),C?.setIsInstantPhase(!0),C?.onOpenChange(!1,dt(_r))):(S(!1),C?.setIsInstantPhase(!1))},[a,o,e,u,c,p,g,h]),_e(()=>()=>{if(u.current===o){if(g.current=null,!w.current)return;u.current=null,P4(c,p),h.clear()}},[g,u,c,o,p,h]),v.useMemo(()=>({activeIdRef:u,hasProvider:y,delayRef:c,isInstantPhase:b}),[u,y,c,b])}function It(e,n,a,o){return e.addEventListener(n,a,o),()=>{e.removeEventListener(n,a,o)}}function uo(...e){return()=>{for(let n=0;n<e.length;n+=1){const a=e[n];a&&a()}}}function Xr(e,n,a,o){const s=er(nE).current;return H4(s,e,n,a,o)&&rE(s,[e,n,a,o]),s.callback}function _4(e){const n=er(nE).current;return U4(n,e)&&rE(n,e),n.callback}function nE(){return{callback:null,cleanup:null,refs:[]}}function H4(e,n,a,o,s){return e.refs[0]!==n||e.refs[1]!==a||e.refs[2]!==o||e.refs[3]!==s}function U4(e,n){return e.refs.length!==n.length||e.refs.some((a,o)=>a!==n[o])}function rE(e,n){if(e.refs=n,n.every(a=>a==null)){e.callback=null;return}e.callback=a=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),a!=null){const o=Array(n.length).fill(null);for(let s=0;s<n.length;s+=1){const u=n[s];if(u!=null)switch(typeof u){case"function":{const c=u(a);typeof c=="function"&&(o[s]=c);break}case"object":{u.current=a;break}}}e.cleanup=()=>{for(let s=0;s<n.length;s+=1){const u=n[s];if(u!=null)switch(typeof u){case"function":{const c=o[s];typeof c=="function"?c():u(null);break}case"object":{u.current=null;break}}}}}}}function Pn(e){const n=er(F4,e).current;return n.next=e,_e(n.effect),n}function F4(e){const n={current:e,next:e,effect:()=>{n.current=n.next}};return n}const Gy={...VR},v0=Gy.useInsertionEffect,B4=v0&&v0!==Gy.useLayoutEffect?v0:e=>e();function Be(e){const n=er(V4).current;return n.next=e,B4(n.effect),n.trampoline}function V4(){const e={next:void 0,callback:q4,trampoline:(...n)=>e.callback?.(...n),effect:()=>{e.callback=e.next}};return e}function q4(){}const yf=null;class Y4{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=n=>{this.isScheduled=!1;const a=this.callbacks,o=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,o>0)for(let s=0;s<a.length;s+=1)a[s]?.(n)};request(n){const a=this.nextId;return this.nextId+=1,this.callbacks.push(n),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),a}cancel(n){const a=n-this.startId;a<0||a>=this.callbacks.length||this.callbacks[a]!==null&&(this.callbacks[a]=null,this.callbacksCount-=1)}}let vf=new Y4;class Cr{static create(){return new Cr}static request(n){return vf.request(n)}static cancel(n){return vf.cancel(n)}currentId=yf;request(n){this.cancel(),this.currentId=vf.request(()=>{this.currentId=yf,n()})}cancel=()=>{this.currentId!==yf&&(vf.cancel(this.currentId),this.currentId=yf)};disposeEffect=()=>this.cancel}function Il(){const e=er(Cr.create).current;return zy(e.disposeEffect),e}function Kt(e){return e?.ownerDocument||document}const aE={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},jc={...aE,position:"fixed",margin:0,top:0,left:0},qh={...aE,position:"absolute"},kl=v.forwardRef(function(n,a){const[o,s]=v.useState();_e(()=>{s4&&ho&&s("button")},[]);const u={tabIndex:0,role:o};return x.jsx("span",{...n,ref:a,style:jc,"aria-hidden":o?void 0:!0,...u,"data-base-ui-focus-guard":""})}),Pl=Math.min,_o=Math.max,sh=Math.round,bf=Math.floor,Ho=e=>({x:e,y:e}),K4={left:"right",right:"left",bottom:"top",top:"bottom"};function oE(e,n,a){return _o(e,Pl(n,a))}function Oi(e,n){return typeof e=="function"?e(n):e}function da(e){return e.split("-")[0]}function co(e){return e.split("-")[1]}function $y(e){return e==="x"?"y":"x"}function Xy(e){return e==="y"?"height":"width"}function Oa(e){const n=e[0];return n==="t"||n==="b"?"y":"x"}function Qy(e){return $y(Oa(e))}function G4(e,n,a){a===void 0&&(a=!1);const o=co(e),s=Qy(e),u=Xy(s);let c=s==="x"?o===(a?"end":"start")?"right":"left":o==="start"?"bottom":"top";return n.reference[u]>n.floating[u]&&(c=lh(c)),[c,lh(c)]}function $4(e){const n=lh(e);return[ny(e),n,ny(n)]}function ny(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const bS=["left","right"],xS=["right","left"],X4=["top","bottom"],Q4=["bottom","top"];function Z4(e,n,a){switch(e){case"top":case"bottom":return a?n?xS:bS:n?bS:xS;case"left":case"right":return n?X4:Q4;default:return[]}}function J4(e,n,a,o){const s=co(e);let u=Z4(da(e),a==="start",o);return s&&(u=u.map(c=>c+"-"+s),n&&(u=u.concat(u.map(ny)))),u}function lh(e){const n=da(e);return K4[n]+e.slice(n.length)}function W4(e){var n,a,o,s;return{top:(n=e.top)!=null?n:0,right:(a=e.right)!=null?a:0,bottom:(o=e.bottom)!=null?o:0,left:(s=e.left)!=null?s:0}}function iE(e){return typeof e!="number"?W4(e):{top:e,right:e,bottom:e,left:e}}function mc(e){const{x:n,y:a,width:o,height:s}=e;return{width:o,height:s,top:a,left:n,right:n+o,bottom:a+s,x:n,y:a}}function wl(e,n){return n<0||n>=e.length}function qf(e,n){return Rl(e.current,{disabledIndices:n})}function ry(e,n){return Rl(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:n})}function e3(e,n,a){const{decrement:o,loopFocus:s,allowEscape:u,disabledIndices:c,minIndex:d,maxIndex:p}=a,g=()=>Rl(e,{startingIndex:n,decrement:o,disabledIndices:c});let y,h=!1;if(!s)y=o?Math.max(d,g()):Math.min(p,g());else if(o?n<=d:n>=p){const b=o?-1:e.length;u&&n!==b?y=-1:(y=o?p:d,h=!0)}else y=g();return{index:wl(e,y)?-1:y,wrapped:h}}function Rl(e,{startingIndex:n=-1,decrement:a=!1,disabledIndices:o,amount:s=1}={}){let u=n;do u+=a?-s:s;while(u>=0&&u<=e.length-1&&El(e,u,o));return u}function El(e,n,a){if(typeof a=="function"?a(n):a?.includes(n)??!1)return!0;const s=e[n];return s?!Yh(s)||s.matches(":disabled")?!0:!a&&(s.hasAttribute("disabled")||s.getAttribute("aria-disabled")==="true"):!1}function t3(e){return e.visibility==="hidden"||e.visibility==="collapse"}function Yh(e,n=e?fa(e):null){return!e||!e.isConnected||!n||t3(n)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():n.display!=="none"&&n.display!=="contents"}const n3='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function r3(e){const n=e.assignedSlot;if(n)return n;if(e.parentElement)return e.parentElement;const a=e.getRootNode();return gs(a)?a.host:null}function ay(e){for(const n of Array.from(e.children))if(Sr(n)==="summary")return n;return null}function a3(e,n){const a=ay(n);return!!a&&(e===a||at(a,e))}function sE(e){const n=e?Sr(e):"";return e!=null&&e.matches(n3)&&(n!=="summary"||e.parentElement!=null&&Sr(e.parentElement)==="details"&&ay(e.parentElement)===e)&&(n!=="details"||ay(e)==null)&&(n!=="input"||e.type!=="hidden")}function Zy(e){if(!sE(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let n=e;n;n=r3(n)){const a=n!==e,o=Sr(n)==="slot";if(n.hasAttribute("inert")||a&&Sr(n)==="details"&&!n.open&&!a3(e,n)||n.hasAttribute("hidden")||!o&&!o3(n,a))return!1}return!0}function o3(e,n){const a=fa(e);return n?a.display!=="none":Yh(e,a)}function lE(e){const n=e.tabIndex;if(n<0){const a=Sr(e);if(a==="details"||a==="audio"||a==="video"||yn(e)&&e.isContentEditable)return 0}return n}function b0(e){if(Sr(e)!=="input")return null;const n=e;return n.type==="radio"&&n.name!==""?n:null}function uE(e,n){const a=b0(e);if(!a)return!0;const o=n.find(s=>{const u=b0(s);return u?.name===a.name&&u.form===a.form&&u.checked});return o?o===a:n.find(s=>{const u=b0(s);return u?.name===a.name&&u.form===a.form})===a}function cE(e){if(yn(e)&&Sr(e)==="slot"){const n=e.assignedElements({flatten:!0});if(n.length>0)return n}return yn(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Jy(e,n){cE(e).forEach(a=>{sE(a)&&n.push(a),Jy(a,n)})}function dE(e,n,a){cE(e).forEach(o=>{yn(o)&&o.matches(n)&&a.push(o),dE(o,n,a)})}function Kh(e){return Zy(e)&&lE(e)>=0}function fE(e){const n=[];return Jy(e,n),n.filter(Zy)}function Gh(e){const n=fE(e);return n.filter(a=>lE(a)>=0&&uE(a,n))}function hE(e,n){const a=Gh(e),o=a.length;if(o===0)return;const s=$r(Kt(e)),u=a.indexOf(s),c=u===-1?n===1?0:o-1:u+n;return a[c]}function pE(e){return hE(Kt(e).body,1)||e}function gE(e){return hE(Kt(e).body,-1)||e}function i3(e,n,a){if(!e)return null;const o=[];Jy(Kt(e).body,o);const s=o.indexOf(e);if(s===-1)return null;const u=o.filter(Zy);for(let c=1;c<o.length;c+=1){const d=o[(s+n*c+o.length)%o.length];if(!at(a,d)&&Kh(d)&&uE(d,u))return d}return o[s]}function Cl(e,n){const a=n||e.currentTarget,o=e.relatedTarget;return!o||!at(a,o)}function s3(e){Gh(e).forEach(a=>{a.dataset.tabindex=a.getAttribute("tabindex")||"",a.setAttribute("tabindex","-1")})}function SS(e){const n=[];dE(e,"[data-tabindex]",n),n.forEach(a=>{const o=a.dataset.tabindex;delete a.dataset.tabindex,o?a.setAttribute("tabindex",o):a.removeAttribute("tabindex")})}function Mi(e,n,a=!0){return e.filter(s=>s.parentId===n).flatMap(s=>[...!a||s.context?.open?[s]:[],...Mi(e,s.id,a)])}function wS(e,n){let a=[],o=e.find(s=>s.id===n)?.parentId;for(;o;){const s=e.find(u=>u.id===o);o=s?.parentId,s&&(a=a.concat(s))}return a}function Tl(e){return`data-base-ui-${e}`}let xf=0;function Yf(e,n={}){const{preventScroll:a=!1,sync:o=!1,shouldFocus:s}=n;cancelAnimationFrame(xf);function u(){s&&!s()||e?.focus({preventScroll:a})}if(o)return u(),Sn;const c=requestAnimationFrame(u);return xf=c,()=>{xf===c&&(cancelAnimationFrame(c),xf=0)}}const RS="data-base-ui-inert";let Yu=new WeakMap,Sf=new WeakSet,Ku=new WeakMap,x0=0;function mE(e){return e?gs(e)?e.host:mE(e.parentNode):null}const ES=(e,n)=>n.map(a=>{if(e.contains(a))return a;const o=mE(a);return e.contains(o)?o:null}).filter(a=>a!=null),CS=e=>{const n=new Set;return e.forEach(a=>{let o=a;for(;o&&!n.has(o);)n.add(o),o=o.parentNode}),n},TS=(e,n,a)=>{const o=[],s=u=>{!u||a.has(u)||Array.from(u.children).forEach(c=>{Sr(c)!=="script"&&(n.has(c)?s(c):o.push(c))})};return s(e),o};function l3(e,n,a,{mark:o=!0}){const s=ES(n,e),u=o?TS(n,CS(s),new Set(s)):[],c=[],d=[];if(a){const p=ES(n,Array.from(n.querySelectorAll("[aria-live]"))),g=s.concat(p);TS(n,CS(g),new Set(g)).forEach(h=>{const b=h.getAttribute("aria-hidden"),S=b!==null&&b!=="false",w=(Yu.get(h)||0)+1;Yu.set(h,w),c.push(h),w===1&&S&&Sf.add(h),S||h.setAttribute("aria-hidden","true")})}return o&&u.forEach(p=>{const g=(Ku.get(p)||0)+1;Ku.set(p,g),d.push(p),g===1&&p.setAttribute(RS,"")}),x0+=1,()=>{c.forEach(p=>{const g=(Yu.get(p)||0)-1;Yu.set(p,g),g||(Sf.has(p)||p.removeAttribute("aria-hidden"),Sf.delete(p))}),o&&d.forEach(p=>{const g=(Ku.get(p)||0)-1;Ku.set(p,g),g||p.removeAttribute(RS)}),x0-=1,x0||(Yu=new WeakMap,Sf=new WeakSet,Ku=new WeakMap)}}function OS(e,n={}){const{ariaHidden:a=!1,mark:o=!0}=n,s=Kt(e[0]).body;return l3(e,s,a,{mark:o})}var cr=qR();const u3=BR(cr);function yE(){const[,e]=v.useState({});return v.useCallback(()=>{e({})},[])}let MS=0;function c3(e,n="mui"){const a=v.useRef(void 0),o=yE(),s=e??a.current;return v.useEffect(()=>{a.current==null&&(MS+=1,a.current=`${n}-${MS}`,e==null&&o())},[e,n,o]),s}const AS=Gy.useId;function Ul(e,n){if(AS!==void 0){const a=AS();return e??(n?`${n}-${a}`:a)}return c3(e,n)}const d3=parseInt(v.version,10);function Wy(e){return d3>=e}function DS(e){if(!v.isValidElement(e))return null;const n=e,a=n.props;return(Wy(19)?a?.ref:n.ref)??null}function oy(e,n){if(e&&!n)return e;if(!e&&n)return n;if(e||n)return{...e,...n}}function f3(e,n){const a={};for(const o in e){const s=e[o];if(n?.hasOwnProperty(o)){const u=n[o](s);u!=null&&Object.assign(a,u);continue}s===!0?a[`data-${o.toLowerCase()}`]="":s&&(a[`data-${o.toLowerCase()}`]=s.toString())}return a}function h3(e,n){return typeof e=="function"?e(n):e}function vE(e,n){return typeof e=="function"?e(n):e}const bE={};function Lr(e,n,a,o,s){if(!a&&!o&&!s&&!e)return uh(n);let u=uh(e);return n&&(u=Ju(u,n)),a&&(u=Ju(u,a)),o&&(u=Ju(u,o)),s&&(u=Ju(u,s)),u}function p3(e){if(e.length===0)return bE;if(e.length===1)return uh(e[0]);let n=uh(e[0]);for(let a=1;a<e.length;a+=1)n=Ju(n,e[a]);return n}function uh(e){return SE(e)?{...e(bE)}:g3(e)}function Ju(e,n){return SE(n)?n(e):m3(e,n)}function g3(e){const n={...e};for(const a in n){const o=n[a];xE(a,o)&&(n[a]=wE(o))}return n}function m3(e,n){if(!n)return e;for(const a in n){const o=n[a];switch(a){case"style":{e[a]=oy(e.style,o);break}case"className":{e[a]=RE(e.className,o);break}default:xE(a,o)?e[a]=y3(e[a],o):e[a]=o}}return e}function xE(e,n){const a=e.charCodeAt(0),o=e.charCodeAt(1),s=e.charCodeAt(2);return a===111&&o===110&&s>=65&&s<=90&&(typeof n=="function"||typeof n>"u")}function SE(e){return typeof e=="function"}function y3(e,n){return n?e?(...a)=>{const o=a[0];if(EE(o)){const u=o;ch(u);const c=n(...a);return u.baseUIHandlerPrevented||e?.(...a),c}const s=n(...a);return e?.(...a),s}:wE(n):e}function wE(e){return e&&((...n)=>{const a=n[0];return EE(a)&&ch(a),e(...n)})}function ch(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function RE(e,n){return n?e?n+" "+e:n:e}function EE(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Mt(e,n,a={}){let o=n.render;a.enabled!==!1&&(o=ev(o));const s=v3(n,a,o);if(a.enabled===!1)return null;const u=a.state??Gt;return S3(e,o,s,u)}function v3(e,n,a){const{className:o,style:s}=e,{state:u=Gt,ref:c,props:d,stateAttributesMapping:p,enabled:g=!0}=n,y=g?h3(o,u):void 0,h=g?vE(s,u):void 0,b=g?f3(u,p):Gt,S=g&&d?b3(d):void 0,w=g?oy(b,S)??{}:Gt;return typeof document<"u"&&(g?Array.isArray(c)?w.ref=_4([w.ref,DS(a),...c]):w.ref=Xr(w.ref,DS(a),c):Xr(null,null)),g?(y!==void 0&&(w.className=RE(w.className,y)),h!==void 0&&(w.style=oy(w.style,h)),w):Gt}function b3(e){return Array.isArray(e)?p3(e):Lr(void 0,e)}const x3=Symbol.for("react.lazy");function ev(e){if(e?.$$typeof!==x3)return e;const n=v.Children.toArray(e)[0];return v.isValidElement(n)?n:e}function S3(e,n,a,o){if(n){if(typeof n=="function")return n(a,o);const s=Lr(a,n.props);return s.ref=a.ref,v.cloneElement(n,s)}return w3(e,a)}function w3(e,n){return e==="button"?v.createElement("button",{type:"button",...n,key:n.key}):e==="img"?v.createElement("img",{alt:"",...n,key:n.key}):v.createElement(e,n)}const R3=500,CE=500,E3={style:{transition:"none"}},C3="data-base-ui-click-trigger",TE={fallbackAxisSide:"none"},tv={fallbackAxisSide:"end"},T3={clipPath:"inset(50%)",position:"fixed",top:0,left:0},OE=v.createContext(null),ME=()=>v.useContext(OE),O3=Tl("portal");function AE(e={}){const{ref:n,container:a,componentProps:o=Gt,elementProps:s}=e,u=Ul(),d=ME()?.portalNode,[p,g]=v.useState(null),[y,h]=v.useState(null),b=Be(R=>{R!==null&&h(R)}),S=v.useRef(null);_e(()=>{if(a===null){S.current&&(S.current=null,h(null),g(null));return}const R=(a&&(Fy(a)?a:a.current))??d??document.body;if(R==null){S.current&&(S.current=null,h(null),g(null));return}S.current!==R&&(S.current=R,h(null),g(R))},[a,d]);const w=Mt("div",o,{ref:[n,b],props:[{id:u,[O3]:""},s]}),C=p&&w?cr.createPortal(w,p):null;return{node:y,nodeId:v.isValidElement(w)?w.props.id:void 0,subtree:C}}const $h=v.forwardRef(function(n,a){const{render:o,className:s,style:u,children:c,container:d,portalOwnerRole:p,...g}=n,{node:y,nodeId:h,subtree:b}=AE({container:d,ref:a,componentProps:n,elementProps:g}),S=v.useRef(null),w=v.useRef(null),C=v.useRef(null),R=v.useRef(null),[T,O]=v.useState(null),M=v.useRef(!1),A=T?.modal,N=T?.open,P=!!T&&!T.modal&&T.open&&!!y;v.useEffect(()=>{if(!y||A)return;function D(z){y&&z.relatedTarget&&Cl(z)&&(z.type==="focusin"?M.current&&(SS(y),M.current=!1):(s3(y),M.current=!0))}return uo(It(y,"focusin",D,!0),It(y,"focusout",D,!0))},[y,A]),_e(()=>{!y||N!==!0||!M.current||(SS(y),M.current=!1)},[N,y]);const I=v.useMemo(()=>({beforeOutsideRef:S,afterOutsideRef:w,beforeInsideRef:C,afterInsideRef:R,portalNode:y,setFocusManagerState:O}),[y]);return x.jsxs(v.Fragment,{children:[b,x.jsxs(OE.Provider,{value:I,children:[P&&y&&x.jsx(kl,{"data-type":"outside",ref:S,onFocus:D=>{if(Cl(D,y))C.current?.focus();else{const z=T?T.domReference:null;gE(z)?.focus()}}}),P&&y&&x.jsx("span",{role:p,"aria-owns":h,style:T3}),y&&cr.createPortal(c,y),P&&y&&x.jsx(kl,{"data-type":"outside",ref:w,onFocus:D=>{if(Cl(D,y))R.current?.focus();else{const z=T?T.domReference:null;pE(z)?.focus(),T?.closeOnFocusOut&&T?.onOpenChange(!1,dt(Ti,D.nativeEvent))}}})]})]})});function DE(){const e=new Map;return{emit(n,a){e.get(n)?.forEach(o=>o(a))},on(n,a){e.has(n)||e.set(n,new Set),e.get(n).add(a)},off(n,a){e.get(n)?.delete(a)}}}class nv{nodesRef={current:[]};events=DE();addNode(n){this.nodesRef.current.push(n)}removeNode(n){const a=this.nodesRef.current.findIndex(o=>o===n);a!==-1&&this.nodesRef.current.splice(a,1)}}const NE=v.createContext(null),jE=v.createContext(null),Ni=()=>v.useContext(NE)?.id||null,ji=e=>{const n=v.useContext(jE);return e??n};function rv(e){const n=Ul(),a=ji(e),o=Ni();return _e(()=>{if(!n)return;const s={id:n,parentId:o};return a?.addNode(s),()=>{a?.removeNode(s)}},[a,n,o]),n}function IE(e){const{children:n,id:a}=e,o=Ni();return x.jsx(NE.Provider,{value:v.useMemo(()=>({id:a,parentId:o}),[a,o]),children:n})}function kE(e){const{children:n,externalTree:a}=e,o=er(()=>a??new nv).current;return x.jsx(jE.Provider,{value:o,children:n})}function ko(e){return e==null?e:"current"in e?e.current:e}function M3(e,n){const a=wn(tr(e));return e instanceof a.KeyboardEvent?"keyboard":e instanceof a.FocusEvent?n||"keyboard":"pointerType"in e?e.pointerType||(jl(e)?"keyboard":n||"mouse"):"touches"in e?"touch":e instanceof a.MouseEvent?n||(e.detail===0?"keyboard":"mouse"):""}const NS=20;let Ri=[];function av(){Ri=Ri.filter(e=>e.deref()?.isConnected)}function jS(e){av(),e&&Sr(e)!=="body"&&(Ri.push(new WeakRef(e)),Ri.length>NS&&(Ri=Ri.slice(-NS)))}function IS(){return av(),Ri[Ri.length-1]?.deref()}function A3(e){return e?Kh(e)?e:Gh(e)[0]||e:null}function kS(e){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!e.getAttribute("role")?.includes("dialog"))return;const a=fE(e).filter(s=>{const u=s.getAttribute("data-tabindex")||"";return Kh(s)||s.hasAttribute("data-tabindex")&&!u.startsWith("-")}),o=e.getAttribute("tabindex");a.length===0?o!=="0"&&(e.setAttribute("tabindex","0"),e.setAttribute("data-tabindex","0")):(o!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function Xh(e){const{context:n,children:a,disabled:o=!1,initialFocus:s=!0,returnFocus:u=!0,explicitReturnFocus:c,restoreFocus:d=!1,modal:p=!0,closeOnFocusOut:g=!0,openInteractionType:y="",nextFocusableElement:h,previousFocusableElement:b,beforeContentFocusGuardRef:S,externalTree:w,getInsideElements:C}=e,R=n.useState("open"),T=n.useState("domReferenceElement"),O=n.useState("floatingElement"),{events:M,dataRef:A}=n.context,N=Be(()=>A.current.floatingContext?.nodeId),P=s===!1,I=ty(T)&&P,D=Pn(s),z=Pn(u),F=Pn(c),G=Pn(y),J=Pn(R),Y=ji(w),U=ME(),H=v.useRef(!1),L=v.useRef(!1),$=v.useRef(!1),K=v.useRef(null),V=v.useRef(""),X=v.useRef(""),ee=v.useRef(null),q=v.useRef(null),se=Xr(ee,S,U?.beforeInsideRef),j=Xr(q,U?.afterInsideRef),B=Hn(),W=Hn(),re=Il(),Re=U!=null,le=oh(O),me=Be((ve=le)=>ve?Gh(ve):[]),ge=Be(()=>C?.().filter(ve=>ve!=null)??[]);v.useEffect(()=>{if(o||!p)return;function ve(Me){Me.key==="Tab"&&at(le,$r(Kt(le)))&&me().length===0&&!I&&Fa(Me)}const Pe=Kt(le);return It(Pe,"keydown",ve)},[o,le,p,I,me]),v.useEffect(()=>{if(o||!R)return;const ve=Kt(le);function Pe(){$.current=!1}function Me(Fe){const Oe=tr(Fe),He=ge(),be=at(O,Oe)||at(T,Oe)||at(U?.portalNode,Oe)||He.some(Ue=>Ue===Oe||at(Ue,Oe));$.current=!be,X.current=Fe.pointerType||"keyboard",gc(Oe,`[${C3}]`)&&(L.current=!0,W.start(0,()=>{L.current=!1}))}function Le(){X.current="keyboard"}return uo(It(ve,"pointerdown",Me,!0),It(ve,"pointerup",Pe,!0),It(ve,"pointercancel",Pe,!0),It(ve,"keydown",Le,!0),Pe)},[o,O,T,le,R,U,W,ge]),v.useEffect(()=>{if(o||!g)return;const ve=Kt(le);function Pe(){L.current=!0,W.start(0,()=>{L.current=!1})}function Me(He){const be=tr(He);Kh(be)&&(K.current=be)}function Le(He){const be=He.relatedTarget,Ue=He.currentTarget,Ze=tr(He);p&&be==null&&Ze!=null&&at(O,Ze)&&jS(Ze),queueMicrotask(()=>{const it=N(),de=n.context.triggerElements,we=ge(),Ke=be?.hasAttribute(Tl("focus-guard"))&&[ee.current,q.current,U?.beforeInsideRef.current,U?.afterInsideRef.current,U?.beforeOutsideRef.current,U?.afterOutsideRef.current,ko(b),ko(h)].includes(be),De=!(at(T,be)||at(O,be)||at(be,O)||at(U?.portalNode,be)||we.some(je=>je===be||at(je,be))||de.hasMatchingElement(je=>at(je,be))||Ke||Y&&(Mi(Y.nodesRef.current,it).find(je=>at(je.context?.elements.floating,be)||at(je.context?.elements.domReference,be))||wS(Y.nodesRef.current,it).find(je=>[je.context?.elements.floating,oh(je.context?.elements.floating)].includes(be)||je.context?.elements.domReference===be)));if(Ue===T&&le&&kS(le),d&&Ue!==T&&!Yh(Ze)&&$r(ve)===ve.body){if(yn(le)&&(le.focus(),d==="popup")){re.request(()=>{le.focus()});return}const je=me(),yt=K.current,ut=(yt&&je.includes(yt)?yt:null)||je[je.length-1]||le;yn(ut)&&ut.focus()}if(A.current.insideReactTree){A.current.insideReactTree=!1;return}(I||!p)&&be&&De&&!L.current&&(I||be!==IS())&&(H.current=!0,n.setOpen(!1,dt(Ti,He)))})}function Fe(){$.current||(A.current.insideReactTree=!0,B.start(0,()=>{A.current.insideReactTree=!1}))}const Oe=yn(T)?T:null;if(!(!O&&!Oe))return uo(Oe&&It(Oe,"focusout",Le),Oe&&It(Oe,"pointerdown",Pe),O&&It(O,"focusin",Me),O&&It(O,"focusout",Le),O&&U&&It(O,"focusout",Fe,!0))},[o,T,O,le,p,Y,U,n,g,d,me,I,N,A,B,W,re,h,b,ge]),v.useEffect(()=>{if(o||!O||!R)return;const ve=Array.from(U?.portalNode?.querySelectorAll(`[${Tl("portal")}]`)||[]),Me=(Y?wS(Y.nodesRef.current,N()):[]).find(Ue=>ty(Ue.context?.elements.domReference||null))?.context?.elements.domReference,Fe=[...[O,...ve,ee.current,q.current,U?.beforeOutsideRef.current,U?.afterOutsideRef.current,...ge()],Me,ko(b),ko(h),I?T:null].filter(Ue=>Ue!=null),Oe=OS(Fe,{ariaHidden:p||I,mark:!1}),He=[O,...ve].filter(Ue=>Ue!=null),be=OS(He);return()=>{be(),Oe()}},[R,o,T,O,p,U,I,Y,N,h,b,ge]),_e(()=>{if(!R||o||!yn(le))return;V.current="",X.current="";const ve=Kt(le),Pe=$r(ve);queueMicrotask(()=>{const Me=D.current,Le=typeof Me=="function"?Me(G.current||""):Me;if(Le===void 0||Le===!1||at(le,Pe))return;let Oe=null;const He=()=>(Oe==null&&(Oe=me(le)),Oe[0]||le);let be;Le===!0||Le===null?be=He():be=ko(Le),be=be||He();const Ue=at(le,$r(ve)),Ze=A.current.openEvent,it=Ze?.type==="mousedown"&&jl(Ze);Yf(be,{sync:it,preventScroll:be===le,shouldFocus(){if(!J.current)return!1;if(Ue)return!0;const de=$r(ve);return!(de!==be&&at(le,de))}})})},[o,R,le,me,D,G,J,A]);const ce=v.useRef(null);_e(()=>{if(o||!le){ce.current=null;return}ce.current&&(ce.current.cancelled=!0,ce.current=null);const ve=Kt(le),Pe=$r(ve),Me=G.current==null;jS(Pe);function Le(Oe){if(Oe.open||(V.current=M3(Oe.nativeEvent,X.current)),(Oe.reason===Ti&&Oe.triggerElement?.hasAttribute(Tl("focus-guard"))||Oe.reason===qn&&Oe.nativeEvent.type==="mouseleave")&&(H.current=!0),Oe.reason===Vh)if(Oe.nested)H.current=!1;else if(jl(Oe.nativeEvent)||Uy(Oe.nativeEvent))H.current=!1;else{let He=!1;Kt(le).createElement("div").focus({get preventScroll(){return He=!0,!1}}),He?H.current=!1:H.current=!0}}M.on("openchange",Le);function Fe(Oe){const He=z.current;let be=typeof He=="function"?He(Oe):He;if(be===void 0||be===!1)return null;be===null&&(be=!0);const Ue=T?.isConnected?T:null,Ze=Pe?.isConnected&&Sr(Pe)!=="body"?Pe:null;let it=Me?Ze||Ue:Ue||Ze;return it||(it=IS()||null),typeof be=="boolean"?it:ko(be)||it||null}return()=>{M.off("openchange",Le);const Oe=$r(ve),He=ge(),be=at(O,Oe)||He.some(we=>we===Oe||at(we,Oe))||Y&&Mi(Y.nodesRef.current,N(),!1).some(we=>at(we.context?.elements.floating,Oe)),Ue=z.current,Ze=V.current,it=Fe(Ze),de={cancelled:!1};ce.current=de,queueMicrotask(()=>{ce.current===de&&(ce.current=null);const we=A3(it),Ke=F.current??typeof Ue!="boolean";if(!de.cancelled&&Ue&&!H.current&&yn(we)&&(!(!Ke&&we!==Oe&&Oe!==ve.body)||be)){const De={preventScroll:!0};Ze==="keyboard"&&(De.focusVisible=!0),we.focus(De)}H.current=!1})}},[o,O,le,z,F,G,M,Y,T,N,ge]),_e(()=>{if(!ho||R||!O)return;const ve=$r(Kt(O));!yn(ve)||!Ac(ve)||at(O,ve)&&ve.blur()},[R,O]),_e(()=>{if(!(o||!U))return U.setFocusManagerState({modal:p,closeOnFocusOut:g,open:R,onOpenChange:n.setOpen,domReference:T}),()=>{U.setFocusManagerState(null)}},[o,U,p,R,n,g,T]),_e(()=>{if(!(o||!le))return kS(le),()=>{queueMicrotask(av)}},[o,le]);const Te=!o&&(p?!I:!0)&&(Re||p);return x.jsxs(v.Fragment,{children:[Te&&x.jsx(kl,{"data-type":"inside",ref:se,onFocus:ve=>{if(p){const Pe=me();Yf(Pe[Pe.length-1])}else U?.portalNode&&(H.current=!1,Cl(ve,U.portalNode)?pE(T)?.focus():ko(b??U.beforeOutsideRef)?.focus())}}),a,Te&&x.jsx(kl,{"data-type":"inside",ref:j,onFocus:ve=>{p?Yf(me()[0]):U?.portalNode&&(g&&(H.current=!0),Cl(ve,U.portalNode)?gE(T)?.focus():ko(h??U.afterOutsideRef)?.focus())}})]})}function PE(e,n={}){const{enabled:a=!0,event:o="click",toggle:s=!0,ignoreMouse:u=!1,stickIfOpen:c=!0,touchOpenDelay:d=0,reason:p=Va}=n,g=e.context.dataRef,y=v.useRef(void 0),h=Il(),b=Hn(),S=v.useMemo(()=>{function w(R,T,O,M){const A=dt(p,T,O);R&&M==="touch"&&d>0?b.start(d,()=>{e.setOpen(!0,A)}):e.setOpen(R,A)}function C(R,T,O){const M=g.current.openEvent,A=e.select("domReferenceElement")!==T;return R&&A||!R||!s?!0:M&&(typeof c=="function"?c():c)?!O(M.type):!1}return{onPointerDown(R){y.current=Ci(R.pointerType,!0)&&Uy(R.nativeEvent)?"virtual":R.pointerType},onMouseDown(R){const T=y.current,O=R.nativeEvent,M=e.select("open");if(R.button!==0||o==="click"||Ci(T,!0)&&u)return;const A=C(M,R.currentTarget,D=>D==="click"||D==="mousedown"),N=tr(O),P=Ac(N);if(P||T==="virtual"){w(A,O,P?N:R.currentTarget,T);return}const I=R.currentTarget;h.request(()=>{w(A,O,I,T)})},onClick(R){if(o==="mousedown-only")return;const T=y.current;if(o==="mousedown"&&T){y.current=void 0;return}if(Ci(T,!0)&&u)return;const O=e.select("open"),M=C(O,R.currentTarget,A=>A==="click"||A==="mousedown"||A==="keydown"||A==="keyup");w(M,R.nativeEvent,R.currentTarget,T)},onKeyDown(){y.current=void 0}}},[g,o,u,p,e,c,s,h,b,d]);return v.useMemo(()=>a?{reference:S}:Gt,[a,S])}function D3(e,n){let a=null,o=null,s=!1;return{contextElement:e||void 0,getBoundingClientRect(){const u=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},c=n.axis==="x"||n.axis==="both",d=n.axis==="y"||n.axis==="both",p=["mouseenter","mousemove"].includes(n.dataRef.current.openEvent?.type||"")&&n.pointerType!=="touch",g=n.axis==="y"?u.width:0,y=n.axis==="x"?u.height:0;let h=u.x,b=u.y;return a==null&&n.x&&c&&(a=u.x-n.x),o==null&&n.y&&d&&(o=u.y-n.y),h-=a||0,b-=o||0,(!s||p)&&(h=c&&n.x!=null?n.x:h,b=d&&n.y!=null?n.y:b),s=!0,{width:g,height:y,x:h,y:b,top:b,right:h+g,bottom:b+y,left:h}}}}function PS(e){return e!=null&&e.clientX!=null}function N3(e,n={}){const{enabled:a=!0,axis:o="both"}=n,s=e.useState("open"),u=e.useState("floatingElement"),c=e.useState("domReferenceElement"),d=e.context.dataRef,p=v.useRef(!1),g=v.useRef(null),[y,h]=v.useState(),[b,S]=v.useState([]),w=Be(M=>{e.set("positionReference",M)}),C=Be((M,A,N)=>{p.current||d.current.openEvent&&!PS(d.current.openEvent)||e.set("positionReference",D3(N??c,{x:M,y:A,axis:o,dataRef:d,pointerType:y}))}),R=Be(M=>{s?g.current||(C(M.clientX,M.clientY,M.currentTarget),S([])):C(M.clientX,M.clientY,M.currentTarget)}),T=Ci(y)?u:s;v.useEffect(()=>{if(!a){w(c);return}if(!T)return;function M(){g.current?.(),g.current=null}const A=wn(u);function N(P){const I=tr(P);at(u,I)?M():C(P.clientX,P.clientY)}return!d.current.openEvent||PS(d.current.openEvent)?g.current=It(A,"mousemove",N):w(c),M},[T,a,u,d,c,e,C,w,b]),v.useEffect(()=>()=>{e.set("positionReference",null)},[e]),v.useEffect(()=>{a&&!u&&(p.current=!1)},[a,u]),v.useEffect(()=>{!a&&s&&(p.current=!0)},[a,s]);const O=v.useMemo(()=>{function M(A){h(A.pointerType)}return{onPointerDown:M,onPointerEnter:M,onMouseMove:R,onMouseEnter:R}},[R]);return v.useMemo(()=>a?{reference:O,trigger:O}:{},[a,O])}function j3(){return!1}function I3(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function Ic(e,n={}){const{enabled:a=!0,escapeKey:o=!0,outsidePress:s=!0,outsidePressEvent:u="sloppy",referencePress:c=j3,bubbles:d,externalTree:p}=n,g=e.useState("open"),y=e.useState("floatingElement"),{dataRef:h,events:b}=e.context,S=ji(p),w=Be(typeof s=="function"?s:()=>!1),C=typeof s=="function"?w:s,R=C!==!1,T=Be(()=>u),{escapeKey:O,outsidePress:M}=I3(d),A=v.useRef(!1),N=v.useRef(!1),P=v.useRef(!1),I=v.useRef(!1),D=v.useRef(!1),z=v.useRef(""),F=v.useRef(null),G=Hn(),J=Hn(),Y=Hn(),U=Be(()=>{J.clear(),h.current.insideReactTree=!1}),H=Be(j=>{const B=h.current.floatingContext?.nodeId;return(S?Mi(S.nodesRef.current,B):[]).some(re=>re.context?.open&&!re.context.dataRef.current[j])}),L=Be(j=>y0(j,e.select("floatingElement"))||y0(j,e.select("domReferenceElement"))),$=Be(j=>{c()&&e.setOpen(!1,dt(Va,j.nativeEvent))}),K=Be(j=>{if(!g||!a||!o||j.key!=="Escape")return;const B=l4(j)?j.nativeEvent:j;if(D.current||B.isComposing||!O&&H("__escapeKeyBubbles"))return;const W=dt(Dc,B);e.setOpen(!1,W),W.isCanceled||j.preventDefault(),!O&&!W.isPropagationAllowed&&j.stopPropagation()}),V=Be(()=>{h.current.insideReactTree=!0,J.start(0,U)}),X=Be(j=>{if(!g||!a||j.button!==0)return;const B=tr(j.nativeEvent);at(e.select("floatingElement"),B)&&(A.current||(A.current=!0,N.current=!1))}),ee=Be(j=>{!g||!a||(j.defaultPrevented||j.nativeEvent.defaultPrevented)&&A.current&&(N.current=!0)});v.useEffect(()=>{function j(B){B.open||(I.current=!1)}return b.on("openchange",j),()=>{b.off("openchange",j)}},[b]),v.useEffect(()=>U,[U]),v.useEffect(()=>{if(!g||!a)return g||(I.current=!1,D.current=!1,z.current="",F.current=null),U;h.current.__escapeKeyBubbles=O,h.current.__outsidePressBubbles=M;const j=new Da,B=Kt(y);function W(){Y.clear(),D.current=!0}function re(){D.current=!0,Y.start(ho?5:0,()=>{D.current=!1})}function Re(){P.current=!0,j.start(0,()=>{P.current=!1})}function le(){A.current=!1,N.current=!1}function me(){const de=z.current,we=de==="pen"||!de?"mouse":de,Ke=T(),De=typeof Ke=="function"?Ke():Ke;return typeof De=="string"?De:De[we]}function ge(de){const we=me();return we==="intentional"&&de.type!=="click"||we==="sloppy"&&de.type==="click"}function ce(de){const we=h.current.floatingContext?.nodeId,Ke=S&&Mi(S.nodesRef.current,we).some(De=>y0(de,De.context?.elements.floating));return L(de)||Ke}function Te(de){if(ge(de)){de.type!=="click"&&!L(de)&&(j.clear(),P.current=!1),U();return}if(h.current.insideReactTree){U();return}const we=tr(de),Ke=`[${Tl("inert")}]`,De=on(we)?we.getRootNode():null,je=Array.from((gs(De)?De:Kt(e.select("floatingElement"))).querySelectorAll(Ke)),yt=e.context.triggerElements;if(we&&(yt.hasElement(we)||yt.hasMatchingElement(ht=>at(ht,we))))return;let ut=on(we)?we:null;for(;ut&&!zo(ut);){const ht=Uo(ut);if(zo(ht)||!on(ht))break;ut=ht}if(!(je.length&&on(we)&&!T4(we)&&!at(we,e.select("floatingElement"))&&je.every(ht=>!at(ut,ht)))){if(yn(we)&&!("touches"in de)){const ht=zo(we),Ot=fa(we),Dt=/auto|scroll/,Wt=ht||Dt.test(Ot.overflowX),rn=ht||Dt.test(Ot.overflowY),en=Wt&&we.clientWidth>0&&we.scrollWidth>we.clientWidth,We=rn&&we.clientHeight>0&&we.scrollHeight>we.clientHeight,xt=Ot.direction==="rtl",$t=We&&(xt?de.offsetX<=we.offsetWidth-we.clientWidth:de.offsetX>we.clientWidth),ft=en&&de.offsetY>we.clientHeight;if($t||ft)return}if(!ce(de)){if(me()==="intentional"){if(de.detail!==0&&!jl(de)&&!I.current)return;if(P.current){j.clear(),P.current=!1;return}}typeof C=="function"&&!C(de)||H("__outsidePressBubbles")||(e.setOpen(!1,dt(Vh,de)),U())}}}function ve(de){me()!=="sloppy"||de.pointerType==="touch"||!e.select("open")||!a||L(de)||Te(de)}function Pe(de){if(me()!=="sloppy"||!e.select("open")||!a||L(de))return;const we=de.touches[0];we&&(F.current={startTime:Date.now(),startX:we.clientX,startY:we.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},G.start(1e3,()=>{F.current&&(F.current.dismissOnTouchEnd=!1,F.current.dismissOnMouseDown=!1)}))}function Me(de,we){const Ke=tr(de);if(!Ke)return;const De=It(Ke,de.type,()=>{we(de),De()})}function Le(de){z.current="touch",Me(de,Pe)}function Fe(de){G.clear(),de.type==="pointerdown"&&(de.button===0&&(I.current=!0),z.current=de.pointerType),!(de.type==="mousedown"&&F.current&&!F.current.dismissOnMouseDown)&&Me(de,we=>{we.type==="pointerdown"?ve(we):Te(we)})}function Oe(de){if(de.type==="pointercancel"&&(I.current=!1),!A.current)return;const we=N.current;if(le(),me()==="intentional"){if(de.type==="pointercancel"){we&&Re();return}if(!ce(de)){if(we){Re();return}typeof C=="function"&&!C(de)||(j.clear(),P.current=!0,U())}}}function He(de){if(me()!=="sloppy"||!F.current||L(de))return;const we=de.touches[0];if(!we)return;const Ke=Math.abs(we.clientX-F.current.startX),De=Math.abs(we.clientY-F.current.startY),je=Math.sqrt(Ke*Ke+De*De);je>5&&(F.current.dismissOnTouchEnd=!0),je>10&&(Te(de),G.clear(),F.current=null)}function be(de){Me(de,He)}function Ue(de){me()!=="sloppy"||!F.current||L(de)||(F.current.dismissOnTouchEnd&&Te(de),G.clear(),F.current=null)}function Ze(de){Me(de,Ue)}const it=uo(o&&uo(It(B,"keydown",K),It(B,"compositionstart",W),It(B,"compositionend",re)),R&&uo(It(B,"click",Fe,!0),It(B,"pointerdown",Fe,!0),It(B,"pointerup",Oe,!0),It(B,"pointercancel",Oe,!0),It(B,"mousedown",Fe,!0),It(B,"mouseup",Oe,!0),It(B,"touchstart",Le,{capture:!0,passive:!0}),It(B,"touchmove",be,{capture:!0,passive:!0}),It(B,"touchend",Ze,{capture:!0,passive:!0})));return()=>{it(),j.clear(),le(),P.current=!1}},[h,y,o,R,C,g,a,O,M,K,U,T,H,L,S,e,G,Y]);const q=v.useMemo(()=>({onKeyDown:K,onPointerDown:$,onClick:$}),[K,$]),se=v.useMemo(()=>({onKeyDown:K,onPointerDown:ee,onMouseDown:ee,onClickCapture:V,onMouseDownCapture(j){V(),X(j)},onPointerDownCapture(j){V(),X(j)},onMouseUpCapture:V,onTouchEndCapture:V,onTouchMoveCapture:V}),[K,V,X,ee]);return v.useMemo(()=>a?{reference:q,floating:se,trigger:q}:{},[a,q,se])}function LE(e){const{popupStore:n,treatPopupAsFloatingElement:a=!1,floatingRootContext:o,floatingId:s,nested:u,onOpenChange:c}=e,d=n.useState("open"),p=n.useState("activeTriggerElement"),g=n.useState(a?"popupElement":"positionerElement"),y=c;return n.useSyncedValue("floatingId",s),_e(()=>{const h={open:d,floatingId:s,referenceElement:p,floatingElement:g};on(p)&&(h.domReferenceElement=p),o.state.positionReference===o.state.referenceElement&&(h.positionReference=p),o.update(h)},[d,s,p,g,o]),o.context.onOpenChange=y,o.context.nested=u,o}function ws(e,n=!1,a=!1,o=!1){const[s,u]=v.useState(e&&n?"idle":void 0),[c,d]=v.useState(e&&!o);return e&&!c&&(d(!0),u("starting")),!e&&c&&s!=="ending"&&!a&&u("ending"),!e&&!c&&s==="ending"&&u(void 0),_e(()=>{if(!e&&c&&s!=="ending"&&a){const p=Cr.request(()=>{u("ending")});return()=>{Cr.cancel(p)}}},[e,c,s,a]),_e(()=>{if(!e||n||s===void 0)return;const p=Cr.request(()=>{u(void 0)});return()=>{Cr.cancel(p)}},[n,e,s]),_e(()=>{if(!e||!n)return;e&&c&&s!=="idle"&&u("starting");const p=Cr.request(()=>{u("idle")});return()=>{Cr.cancel(p)}},[n,e,c,s]),{mounted:c,setMounted:d,transitionStatus:s}}function LS(e,n){return e.getAnimations(n).filter(a=>{const o=a.effect?.getTiming();return o?.duration!==1/0&&o?.iterations!==1/0})}let wf=null;function k3(e){if(!wf){const n=[];wf=n,queueMicrotask(()=>{wf=null,cr.flushSync(()=>{for(const a of n)a()})})}wf.push(e)}function Qh(e,n=!1,a=!1){const o=Il();return Be((s,u=null)=>{o.cancel();const c=ko(e);if(c==null)return;const d=c,p=()=>{if(!a){cr.flushSync(s);return}k3(()=>{u?.aborted||s()})};if(typeof d.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){s();return}function g(){Promise.all(LS(d).map(y=>y.finished.then(Sn))).then(()=>{u?.aborted||p()},()=>{if(u?.aborted)return;if(LS(d).some(h=>h.pending||h.playState!=="finished")){g();return}p()})}if(n){const y=Yy;if(!d.hasAttribute(y)){o.request(g);return}const h=new MutationObserver(()=>{d.hasAttribute(y)||(h.disconnect(),g())});h.observe(d,{attributes:!0,attributeFilter:[y]}),u?.addEventListener("abort",()=>h.disconnect(),{once:!0});return}o.request(g)})}function ja(e){const{enabled:n=!0,open:a,ref:o,batch:s=!1,onComplete:u}=e,c=Be(u),d=Qh(o,a,s);v.useEffect(()=>{if(!n)return;const p=new AbortController;return d(c,p.signal),()=>{p.abort()}},[n,a,c,d])}function zE(e){const{open:n,ref:a,preventUnmountOnClose:o,setPreventUnmountOnClose:s,onUnmount:u,animateInitialOpen:c}=e,d=Be(s),{mounted:p,setMounted:g,transitionStatus:y}=ws(n,!1,!1,c),h=n?!1:o;_e(()=>{n&&d(!1)},[n,d]);const b=v.useRef(p),S=v.useRef(!1),w=yE(),C=()=>{b.current=!1,g(!1),u()};_e(()=>{b.current=p,S.current&&(S.current=!1,!n&&p&&C())});const R=Be(()=>{if(b.current){if(n){S.current=!0,w();return}C()}});return ja({enabled:p&&!n&&!h,open:n,ref:a,onComplete(){n||R()}}),{mounted:p,transitionStatus:y,preventUnmountingOnClose:h,forceUnmount:R}}const kc={tabIndex:-1,[W0]:""};function _E(e){return n=>n==="touch"?e.current:!0}function ov(e,n=!1){const a=Ul(),o=Ni()!=null,s=er(()=>e(a,o)).current;return LE({popupStore:s,treatPopupAsFloatingElement:n,floatingRootContext:s.state.floatingRootContext,floatingId:a,nested:o,onOpenChange:s.setOpen}),s}function Zh({handle:e,store:n}){return _e(()=>e.attachStore(n),[e,n]),null}function zS(e){const n=e.context.triggerElements.size;e.select("open")&&e.state.triggerCount!==n&&e.set("triggerCount",n)}function P3(e,n){const a=v.useRef(null);return Be(o=>{const s=a.current;if(s!==null){if(s.element===o&&s.store===n&&s.id===e)return;a.current=null;const u=s.store;u.context.triggerElements.getById(s.id)===s.element&&(u.context.triggerElements.delete(s.id),zS(u))}o!==null&&e!==void 0&&(a.current={store:n,id:e,element:o},n.context.triggerElements.add(e,o),zS(n))})}function Jh(e,n,a,o=!1){let s=e.preventUnmountingOnClose;n?s=!1:o&&(s=!0);const u=a?.id??null;let c=e.activeTriggerId,d=e.activeTriggerElement;return(u||n)&&(c=u,d=a??null),{open:n,preventUnmountingOnClose:s,activeTriggerId:c,activeTriggerElement:d,openedWithoutTrigger:n?a==null:e.openedWithoutTrigger}}function Wh(e){let n=!1;return e.preventUnmountOnClose=()=>{n=!0},()=>n}function L3(e,n,a,o={}){const s=a.reason,u=s===qn,c=n&&s===Sl,d=!n&&(s===Va||s===Dc),p=Wh(a);if(e.context.onOpenChange?.(n,a),a.isCanceled)return;o.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(n,a);const g=()=>{const y=Jh(e.state,n,a.trigger,p()),h={...o.extraState,...y};c?h.instantType="focus":d?h.instantType="dismiss":u&&(h.instantType=void 0),e.update(h)};u?cr.flushSync(g):g()}function HE(e,n,a,o){const s=a.useState("isMountedByTrigger",e),u=P3(e,a),c=Be(p=>{const g=a.select("open"),y=a.select("activeTriggerId");if(y===e){const h={activeTriggerElement:p,...g?o:null};a.update(h);return}if(y==null&&g&&!a.state.openedWithoutTrigger){const h={activeTriggerId:e??null,activeTriggerElement:p,...o};a.update(h)}}),d=Be(p=>{u(p),p&&c(p)});return _e(()=>(d(n.current),()=>d(null)),[d,n,a,e]),_e(()=>{if(s){const p={activeTriggerElement:n.current,...o};a.update(p)}},[s,a,n,...Object.values(o)]),{registerTrigger:d,isMountedByThisTrigger:s}}function ep(e,n={}){const{closeOnActiveTriggerUnmount:a=!1}=n,o=v.useRef(null),s=e.useState("open"),u=e.useState("triggerCount"),c=e.useState("activeTriggerId"),d=e.useState("activeTriggerElement");_e(()=>{if(!s){o.current=null,e.state.triggerCount!==0&&e.set("triggerCount",0),e.state.openedWithoutTrigger&&e.set("openedWithoutTrigger",!1);return}const p=e.context.triggerElements.size,g={};e.state.triggerCount!==p&&(g.triggerCount=p);const y=e.select("activeTriggerId");let h=null;if(y){const b=e.context.triggerElements.getById(y);if(b)o.current=y,b!==e.state.activeTriggerElement&&(g.activeTriggerElement=b);else{for(const[S,w]of e.context.triggerElements.entries())if(w===e.state.activeTriggerElement){g.activeTriggerId=S,g.activeTriggerElement=w,o.current=S;break}g.activeTriggerId===void 0&&(o.current===y?h=y:o.current=null)}}else o.current=null;if(!h&&!y&&!e.state.openedWithoutTrigger&&p===1){const b=e.context.triggerElements.entries().next();if(!b.done){const[S,w]=b.value;g.activeTriggerId=S,g.activeTriggerElement=w,o.current=S}}(g.triggerCount!==void 0||g.activeTriggerId!==void 0||g.activeTriggerElement!==void 0)&&e.update(g),h&&a&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===h&&!e.context.triggerElements.getById(h)){const b=dt(_r);e.setOpen(!1,b),b.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[s,e,u,c,d,a])}function tp(e,n,a,o){const{mounted:s,transitionStatus:u,forceUnmount:c}=zE({open:e,ref:n.context.popupRef,preventUnmountOnClose:n.useState("preventUnmountingOnClose"),setPreventUnmountOnClose:d=>n.set("preventUnmountingOnClose",d),animateInitialOpen:o,onUnmount(){n.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),a?.(),n.context.onOpenChangeComplete?.(!1)}});return er(()=>(n.set("mounted",s),null)),n.useSyncedValues({mounted:s,transitionStatus:u}),{forceUnmount:c,transitionStatus:u}}function np(e,n){e.useSyncedValues(n),_e(()=>()=>{e.update({activeTriggerProps:Gt,inactiveTriggerProps:Gt,popupProps:Gt})},[e])}function UE(e,n){_e(()=>{!n&&e.state.openMethod!==null&&e.set("openMethod",null)},[n,e]),_e(()=>()=>{e.state.openMethod!==null&&e.set("openMethod",null)},[e])}class Pc{idMap=new Map;add(n,a){this.idMap.set(n,a)}delete(n){this.idMap.delete(n)}hasElement(n){for(const a of this.idMap.values())if(a===n)return!0;return!1}hasMatchingElement(n){for(const a of this.idMap.values())if(n(a))return!0;return!1}getById(n){return this.idMap.get(n)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}}var S0={exports:{}},w0={};var _S;function z3(){if(_S)return w0;_S=1;var e=Ec();function n(h,b){return h===b&&(h!==0||1/h===1/b)||h!==h&&b!==b}var a=typeof Object.is=="function"?Object.is:n,o=e.useState,s=e.useEffect,u=e.useLayoutEffect,c=e.useDebugValue;function d(h,b){var S=b(),w=o({inst:{value:S,getSnapshot:b}}),C=w[0].inst,R=w[1];return u(function(){C.value=S,C.getSnapshot=b,p(C)&&R({inst:C})},[h,S,b]),s(function(){return p(C)&&R({inst:C}),h(function(){p(C)&&R({inst:C})})},[h]),c(S),S}function p(h){var b=h.getSnapshot;h=h.value;try{var S=b();return!a(h,S)}catch{return!0}}function g(h,b){return b()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?g:d;return w0.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,w0}var HS;function FE(){return HS||(HS=1,S0.exports=z3()),S0.exports}var rp=FE(),R0={exports:{}},E0={};var US;function _3(){if(US)return E0;US=1;var e=Ec(),n=FE();function a(g,y){return g===y&&(g!==0||1/g===1/y)||g!==g&&y!==y}var o=typeof Object.is=="function"?Object.is:a,s=n.useSyncExternalStore,u=e.useRef,c=e.useEffect,d=e.useMemo,p=e.useDebugValue;return E0.useSyncExternalStoreWithSelector=function(g,y,h,b,S){var w=u(null);if(w.current===null){var C={hasValue:!1,value:null};w.current=C}else C=w.current;w=d(function(){function T(P){if(!O){if(O=!0,M=P,P=b(P),S!==void 0&&C.hasValue){var I=C.value;if(S(I,P))return A=I}return A=P}if(I=A,o(M,P))return I;var D=b(P);return S!==void 0&&S(I,D)?(M=P,I):(M=P,A=D)}var O=!1,M,A,N=h===void 0?null:h;return[function(){return T(y())},N===null?void 0:function(){return T(N())}]},[y,h,b,S]);var R=s(g,w[0],w[1]);return c(function(){C.hasValue=!0,C.value=R},[R]),p(R),R},E0}var FS;function H3(){return FS||(FS=1,R0.exports=_3()),R0.exports}var U3=H3();const F3=Wy(19),B3=F3?q3:Y3;function BE(e,n,a,o,s){return B3(e,n,a,o,s)}function V3(e,n,a,o,s){const u=v.useCallback(()=>n(e.getSnapshot(),a,o,s),[e,n,a,o,s]);return rp.useSyncExternalStore(e.subscribe,u,u)}JN({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let n=!1;for(let a=0;a<e.syncHooks.length;a+=1){const o=e.syncHooks[a],s=o.selector(o.store.state,o.a1,o.a2,o.a3);Object.is(o.value,s)||(n=!0,o.value=s)}return n&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=n=>{const a=new Set;for(const s of e.syncHooks)a.add(s.store);const o=[];for(const s of a)o.push(s.subscribe(n));return()=>{for(const s of o)s()}}),rp.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function q3(e,n,a,o,s){const u=ZN();if(!u)return V3(e,n,a,o,s);const c=u.syncIndex;u.syncIndex+=1;let d;return u.didInitialize?(d=u.syncHooks[c],(d.store!==e||d.selector!==n||!Object.is(d.a1,a)||!Object.is(d.a2,o)||!Object.is(d.a3,s))&&(d.store!==e&&(u.didChangeStore=!0),d.store=e,d.selector=n,d.a1=a,d.a2=o,d.a3=s,d.value=n(e.getSnapshot(),a,o,s))):(d={store:e,selector:n,a1:a,a2:o,a3:s,value:n(e.getSnapshot(),a,o,s)},u.syncHooks.push(d)),d.value}function Y3(e,n,a,o,s){return U3.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,u=>n(u,a,o,s))}class K3{static create(n){return new this(n)}constructor(n){this.state=n,this.listeners=new Set,this.updateTick=0}subscribe=n=>(this.listeners.add(n),()=>{this.listeners.delete(n)});getSnapshot=()=>this.state;setState(n){if(this.state===n)return;this.state=n,this.updateTick+=1;const a=this.updateTick;for(const o of this.listeners){if(a!==this.updateTick)return;o(n)}}update(n){for(const a in n)if(!Object.is(this.state[a],n[a])){this.setState({...this.state,...n});return}}set(n,a){Object.is(this.state[n],a)||this.setState({...this.state,[n]:a})}notifyAll(){const n={...this.state};this.setState(n)}use(n,a,o,s){return BE(this,n,a,o,s)}}class Fl extends K3{constructor(n,a={},o){super(n),this.context=a,this.selectors=o}useSyncedValue(n,a){v.useDebugValue(n);const o=this;_e(()=>{o.state[n]!==a&&o.set(n,a)},[o,n,a])}useSyncedValueWithCleanup(n,a){const o=this;_e(()=>(o.state[n]!==a&&o.set(n,a),()=>{o.set(n,void 0)}),[o,n,a])}useSyncedValues(n){const a=this,o=Object.values(n);_e(()=>{a.update(n)},[a,...o])}useControlledProp(n,a){v.useDebugValue(n);const o=this,s=a!==void 0;_e(()=>{s&&!Object.is(o.state[n],a)&&o.setState({...o.state,[n]:a})},[o,n,a,s])}select(n,a,o,s){const u=this.selectors[n];return u(this.state,a,o,s)}useState(n,a,o,s){return v.useDebugValue(n),BE(this,this.selectors[n],a,o,s)}useContextCallback(n,a){v.useDebugValue(n);const o=Be(a??Sn);this.context[n]=o}useStateSetter(n){const a=v.useRef(void 0);return a.current===void 0&&(a.current=o=>{this.set(n,o)}),a.current}observe(n,a){let o;typeof n=="function"?o=n:o=this.selectors[n];let s=o(this.state);return a(s,s,this),this.subscribe(u=>{const c=o(u);if(!Object.is(s,c)){const d=s;s=c,a(c,d,this)}})}}const G3={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId};class VE extends Fl{constructor(n){const{syncOnly:a,nested:o,onOpenChange:s,triggerElements:u,...c}=n;super({...c,positionReference:c.referenceElement,domReferenceElement:c.referenceElement},{onOpenChange:s,dataRef:{current:{}},events:DE(),nested:o,triggerElements:u},G3),this.syncOnly=a}syncOpenEvent=(n,a)=>{(!n||!this.state.open||a!=null&&u4(a))&&(this.context.dataRef.current.openEvent=n?a:void 0)};dispatchOpenChange=(n,a)=>{this.syncOpenEvent(n,a.event);const o={open:n,reason:a.reason,nativeEvent:a.event,nested:this.context.nested,triggerElement:a.trigger};this.context.events.emit("openchange",o)};setOpen=(n,a)=>{if(this.syncOnly){this.context.onOpenChange?.(n,a);return}this.dispatchOpenChange(n,a),this.context.onOpenChange?.(n,a)}}function ap(e,n,a=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new VE({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:n,syncOnly:!0,nested:a,onOpenChange:void 0}),floatingId:n,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,openedWithoutTrigger:!1,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Gt,inactiveTriggerProps:Gt,popupProps:Gt}}const rc=e=>e.triggerIdProp??e.activeTriggerId,dh=e=>e.openProp??e.open,BS=e=>(e.popupElement?.id??e.floatingId)||void 0;function qE(e,n){return n!==void 0&&dh(e)&&rc(e)===n}function $3(e,n){return qE(e,n)?!0:n!==void 0&&dh(e)&&rc(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}const Po={open:dh,mounted:e=>e.mounted,transitionStatus:e=>dh(e)&&!e.mounted?"starting":e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:rc,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:BS,isTriggerActive:(e,n)=>n!==void 0&&rc(e)===n,isOpenedByTrigger:(e,n)=>qE(e,n),isMountedByTrigger:(e,n)=>n!==void 0&&rc(e)===n&&e.mounted,triggerProps:(e,n)=>n?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,n)=>$3(e,n)?BS(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function YE(e){const n=v.useCallback(o=>e===void 0?Sn:e.subscribeStore(o),[e]),a=v.useCallback(()=>e===void 0?void 0:e.store,[e]);return rp.useSyncExternalStore(n,a,()=>e?.serverStore)}function X3(e){const{open:n=!1,onOpenChange:a,elements:o={}}=e,s=Ul(),u=Ni()!=null,c=er(()=>new VE({open:n,transitionStatus:void 0,onOpenChange:a,referenceElement:o.reference??null,floatingElement:o.floating??null,triggerElements:new Pc,floatingId:s,syncOnly:!1,nested:u})).current;return _e(()=>{const d={open:n,floatingId:s};o.reference!==void 0&&(d.referenceElement=o.reference,d.domReferenceElement=on(o.reference)?o.reference:null),o.floating!==void 0&&(d.floatingElement=o.floating),c.update(d)},[n,s,o.reference,o.floating,c]),c.context.onOpenChange=a,c.context.nested=u,c}const C0=_y&&ho;function KE(e,n={}){const{enabled:a=!0,delay:o}=n,{events:s,dataRef:u}=e.context,c=v.useRef(!1),d=v.useRef(null),p=v.useRef(!0),g=Hn();v.useEffect(()=>{const h=e.select("domReferenceElement");if(!a)return;const b=wn(h);function S(){const R=e.select("domReferenceElement");!e.select("open")&&yn(R)&&R===$r(Kt(R))&&(c.current=!0,d.current=R)}function w(){p.current=!0}function C(){p.current=!1}return uo(It(b,"blur",S),C0&&It(b,"keydown",w,!0),C0&&It(b,"pointerdown",C,!0))},[e,a]),v.useEffect(()=>{if(!a)return;function h(b){if(b.reason===Va||b.reason===Dc){const S=e.select("domReferenceElement");on(S)&&(d.current=S,c.current=!0)}}return s.on("openchange",h),()=>{s.off("openchange",h)}},[s,a,e]);const y=v.useMemo(()=>{function h(){c.current=!1,d.current=null}return{onMouseLeave(){h()},onFocus(b){const S=b.currentTarget;if(c.current){if(d.current===S)return;h()}const w=tr(b.nativeEvent);if(on(w)){if(C0&&!b.relatedTarget){if(!p.current&&!Ac(w))return}else if(!M4(w))return}const C=ah(b.relatedTarget,e.context.triggerElements),{nativeEvent:R,currentTarget:T}=b;if(e.select("open")&&C||!o){e.setOpen(!0,dt(Sl,R,T));return}g.start(o,()=>{c.current||e.setOpen(!0,dt(Sl,R,T))})},onBlur(b){h();const S=b.relatedTarget,w=b.nativeEvent,C=on(S)&&S.hasAttribute(Tl("focus-guard"))&&S.getAttribute("data-type")==="outside";g.start(0,()=>{const R=e.select("domReferenceElement"),T=$r(Kt(R));!S&&T===R||at(u.current.floatingContext?.refs.floating.current,T)||at(R,T)||C||ah(S??T,e.context.triggerElements)||e.setOpen(!1,dt(Sl,w))})}}},[u,o,e,g]);return v.useMemo(()=>a?{reference:y,trigger:y}:{},[a,y])}class iv{pointerType=void 0;interactedInside=!1;handler=void 0;blockMouseMove=!0;performedPointerEventsMutation=!1;pointerEventsScopeElement=null;pointerEventsReferenceElement=null;pointerEventsFloatingElement=null;restTimeoutPending=!1;openChangeTimeout=new Da;restTimeout=new Da;handleCloseOptions=void 0;static create(){return new iv}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}const fh=new WeakMap;function hh(e){if(!e.performedPointerEventsMutation)return;const n=e.pointerEventsScopeElement;n&&fh.get(n)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),fh.delete(n)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function GE(e,n){const{scopeElement:a,referenceElement:o,floatingElement:s}=n,u=fh.get(a);u&&u!==e&&hh(u),hh(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=a,e.pointerEventsReferenceElement=o,e.pointerEventsFloatingElement=s,fh.set(a,e),a.style.pointerEvents="none",o.style.pointerEvents="auto",s.style.pointerEvents="auto"}function sv(e){const n=e.context.dataRef.current,a=er(()=>n.hoverInteractionState??iv.create()).current;return n.hoverInteractionState||(n.hoverInteractionState=a),zy(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}function lv(e,n={}){const{enabled:a=!0,closeDelay:o=0,nodeId:s}=n,u=e.useState("open"),c=e.useState("floatingElement"),d=e.useState("domReferenceElement"),{dataRef:p}=e.context,g=ji(),y=Ni(),h=sv(e),b=Hn(),S=Be(()=>JR(p.current.openEvent?.type,h.interactedInside)),w=Be(()=>D4(p.current.openEvent?.type)),C=Be(()=>{hh(h)});_e(()=>{u||(h.pointerType=void 0,h.restTimeoutPending=!1,h.interactedInside=!1,C())},[u,h,C]),v.useEffect(()=>C,[C]),_e(()=>{if(a&&u&&h.handleCloseOptions?.blockPointerEvents&&w()&&on(d)&&c){const R=d,T=c,O=Kt(c),M=g?.nodesRef.current.find(I=>I.id===y)?.context?.elements.floating;M&&(M.style.pointerEvents="");const A=h.pointerEventsScopeElement!==T?h.pointerEventsScopeElement:null,N=M!==T?M:null,P=h.handleCloseOptions?.getScope?.()??A??N??gc(R,"[data-rootownerid]")??O.body;return GE(h,{scopeElement:P,referenceElement:R,floatingElement:T}),()=>{C()}}},[a,u,d,c,h,w,g,y,C]),v.useEffect(()=>{if(!a)return;function R(){return!!(g&&y&&Mi(g.nodesRef.current,y).length>0)}function T(I){const D=ms(o,"close",h.pointerType),z=()=>{e.setOpen(!1,dt(qn,I)),g?.events.emit("floating.closed",I)};D?h.openChangeTimeout.start(D,z):(h.openChangeTimeout.clear(),z())}function O(I){const D=tr(I);if(!O4(D)){h.interactedInside=!1;return}h.interactedInside=gc(D,"[aria-haspopup]")!=null}function M(){h.openChangeTimeout.clear(),b.clear(),g?.events.off("floating.closed",N),C()}function A(I){if(R()&&g){g.events.on("floating.closed",N);return}if(ah(I.relatedTarget,e.context.triggerElements))return;const D=p.current.floatingContext?.nodeId??s,z=I.relatedTarget;if(!(g&&D&&on(z)&&Mi(g.nodesRef.current,D,!1).some(G=>at(G.context?.elements.floating,z)))){if(h.handler){h.handler(I);return}C(),w()&&!S()&&T(I)}}function N(I){!g||!y||R()||b.start(0,()=>{g.events.off("floating.closed",N),e.setOpen(!1,dt(qn,I)),g.events.emit("floating.closed",I)})}const P=c;return uo(P&&It(P,"mouseenter",M),P&&It(P,"mouseleave",A),P&&It(P,"pointerdown",O,!0),()=>{g?.events.off("floating.closed",N)})},[a,c,e,p,o,s,w,S,C,h,g,y,b])}const Q3={current:null};function $E(e,n={}){const{enabled:a=!0,delay:o=0,handleClose:s=null,mouseOnly:u=!1,restMs:c=0,move:d=!0,triggerElementRef:p=Q3,externalTree:g,isActiveTrigger:y=!0,getHandleCloseContext:h,isClosing:b,shouldOpen:S,guardStaleOpen:w=!1}=n,{dataRef:C,events:R}=e.context,T=ji(g),O=sv(e),M=v.useRef(!1),A=Pn(s),N=Pn(o),P=Pn(c),I=Pn(a),D=Pn(S),z=Pn(b),F=Be(()=>JR(C.current.openEvent?.type,O.interactedInside)),G=Be(()=>D.current?.()!==!1),J=Be((H,L,$)=>{const K=e.context.triggerElements;if(K.hasElement(L))return!H||!at(H,L);if(!on($))return!1;const V=$;return K.hasMatchingElement(X=>at(X,V))&&(!H||!at(H,V))}),Y=Be(()=>{if(!O.handler)return;Kt(e.select("domReferenceElement")).removeEventListener("mousemove",O.handler),O.handler=void 0}),U=Be(()=>{hh(O)});return y&&(O.handleCloseOptions=s?.__options),v.useEffect(()=>Y,[Y]),v.useEffect(()=>{if(!a)return;function H(L){L.open?M.current=!1:(M.current=L.reason===qn,Y(),O.openChangeTimeout.clear(),O.restTimeout.clear(),O.blockMouseMove=!0,O.restTimeoutPending=!1)}return R.on("openchange",H),()=>{R.off("openchange",H)}},[a,R,O,Y]),v.useEffect(()=>{if(!a)return;function H(ee,q=!0){const se=ms(N.current,"close",O.pointerType);se?O.openChangeTimeout.start(se,()=>{e.setOpen(!1,dt(qn,ee)),T?.events.emit("floating.closed",ee)}):q&&(O.openChangeTimeout.clear(),e.setOpen(!1,dt(qn,ee)),T?.events.emit("floating.closed",ee))}const L=p.current??(y?e.select("domReferenceElement"):null);if(!on(L))return;function $(ee){if(O.openChangeTimeout.clear(),O.blockMouseMove=!1,u&&!Ci(O.pointerType))return;const q=vS(P.current),se=ms(N.current,"open",O.pointerType),j=tr(ee),B=ee.currentTarget??null,W=e.select("domReferenceElement");let re=B;if(on(j)&&!e.context.triggerElements.hasElement(j)){for(const Me of e.context.triggerElements.elements())if(at(Me,j)){re=Me;break}}on(B)&&on(W)&&!e.context.triggerElements.hasElement(B)&&at(B,W)&&(re=W);const Re=re==null?!1:J(W,re,j),le=e.select("open"),me=z.current?.()??e.select("transitionStatus")==="ending",ge=!le&&me&&M.current,ce=!Re&&on(re)&&on(W)&&at(W,re)&&ge,Te=q>0&&!se,ve=Re&&(le||ge)||ce,Pe=!le||Re;if(ve){G()&&e.setOpen(!0,dt(qn,ee,re));return}Te||(se?O.openChangeTimeout.start(se,()=>{Pe&&G()&&e.setOpen(!0,dt(qn,ee,re))}):Pe&&G()&&e.setOpen(!0,dt(qn,ee,re)))}function K(ee){if(F()){U();return}Y();const q=e.select("domReferenceElement"),se=Kt(q);O.restTimeout.clear(),O.restTimeoutPending=!1;const j=C.current.floatingContext??h?.();if(ah(ee.relatedTarget,e.context.triggerElements))return;if(A.current&&j){e.select("open")||O.openChangeTimeout.clear();const W=p.current;O.handler=A.current({...j,tree:T,x:ee.clientX,y:ee.clientY,onClose(){U(),Y(),I.current&&!F()&&W===e.select("domReferenceElement")&&H(ee,!0)}}),se.addEventListener("mousemove",O.handler),O.handler(ee);return}(O.pointerType!=="touch"||!at(e.select("floatingElement"),ee.relatedTarget))&&H(ee)}function V(ee){at(L,ee.relatedTarget)||(O.openChangeTimeout.clear(),O.restTimeout.clear(),O.restTimeoutPending=!1)}const X=w?It(L,"mouseout",V):void 0;return d?uo(It(L,"mousemove",$,{once:!0}),It(L,"mouseenter",$),It(L,"mouseleave",K),X):uo(It(L,"mouseenter",$),It(L,"mouseleave",K),X)},[Y,U,C,N,e,a,A,O,y,J,F,u,d,P,p,T,I,h,z,G,w]),v.useMemo(()=>{if(!a)return;function H(L){O.pointerType=L.pointerType}return{onPointerDown:H,onPointerEnter:H,onMouseMove(L){const{nativeEvent:$}=L,K=L.currentTarget,V=e.select("domReferenceElement"),X=e.select("open"),ee=J(V,K,L.target);if(u&&!Ci(O.pointerType))return;if(X&&ee&&O.handleCloseOptions?.blockPointerEvents){const j=e.select("floatingElement");if(j){const B=O.handleCloseOptions?.getScope?.()??K.ownerDocument.body;GE(O,{scopeElement:B,referenceElement:K,floatingElement:j})}}const q=vS(P.current);if(X&&!ee||q===0||!ee&&O.restTimeoutPending&&L.movementX**2+L.movementY**2<2)return;O.restTimeout.clear();function se(){if(O.restTimeoutPending=!1,F())return;const j=e.select("open");!O.blockMouseMove&&(!j||ee)&&G()&&e.setOpen(!0,dt(qn,$,K))}O.pointerType==="touch"?cr.flushSync(()=>{se()}):ee&&X?se():(O.restTimeoutPending=!0,O.restTimeout.start(q,se))}}},[a,O,F,J,u,e,P,G])}function VS(e){return ho&&e.movementX===0&&e.movementY===0}function op(e,n,a){switch(e){case"vertical":return n;case"horizontal":return a;default:return n||a}}function Rf(e,n){return op(n,e===XR||e===qy,e===Uh||e===Fh)}function T0(e,n,a){return op(n,e===qy,a?e===Uh:e===Fh)||e==="Enter"||e===" "||e===""}function Z3(e,n,a){return op(n,a?e===Uh:e===Fh,e===qy)}function J3(e,n,a,o){const s=a?e===Fh:e===Uh,u=e===XR;return n==="both"||n==="horizontal"&&o?e==="Escape":op(n,s,u)}function XE(e,n){const{listRef:a,activeIndex:o,onNavigate:s=()=>{},enabled:u=!0,selectedIndex:c=null,allowEscape:d=!1,loopFocus:p=!1,nested:g=!1,rtl:y=!1,virtual:h=!1,focusItemOnOpen:b="auto",focusItemOnHover:S=!0,openOnArrowKeyDown:w=!0,disabledIndices:C=void 0,orientation:R="vertical",triggerOrientation:T=R,parentOrientation:O,id:M,resetOnPointerLeave:A=!0,externalTree:N,nestedReturnFocusRef:P,grid:I}=n,D=I!=null,z=e.useState("open"),F=e.useState("floatingElement"),G=e.useState("domReferenceElement"),J=e.context.dataRef,Y=oh(F),U=ty(G),H=Pn(Y),L=Ni(),$=ji(N),K=v.useRef(b),V=v.useRef(c??-1),X=v.useRef(null),ee=v.useRef(!0),q=Be(de=>{s(V.current===-1?null:V.current,de)}),se=v.useRef(!!F),j=v.useRef(z),B=v.useRef(!1),W=v.useRef(!1),re=v.useRef(null),Re=Pn(C),le=Pn(z),me=Pn(c),ge=Pn(A),ce=Il(),Te=Il(),ve=Be(()=>{ce.cancel();function de(je){h||(re.current=Yf(je,{sync:B.current,preventScroll:!0}))}const we=a.current[V.current],Ke=W.current;we&&de(we),(B.current?je=>je():je=>ce.request(je))(()=>{const je=a.current[V.current]||we;if(!je)return;we||de(je),He&&(Ke||!ee.current)&&je.scrollIntoView?.({block:"nearest",inline:"nearest"})})});_e(()=>{J.current.orientation=R},[J,R]),_e(()=>{z||(X.current=null),(!z||b!=="auto")&&(K.current=b)},[z,b]),_e(()=>{u&&(z&&F?(V.current=c??-1,K.current&&c!=null&&(W.current=!0,q())):se.current&&(V.current=-1,q()))},[u,z,F,c,q]),_e(()=>{if(u){if(!z){B.current=!1;return}if(F)if(o==null){if(B.current=!1,me.current!=null)return;if(se.current&&(V.current=-1,ve()),(!j.current||!se.current)&&K.current&&(X.current!=null||K.current===!0&&X.current==null)){let de=0;const we=()=>{a.current[0]==null?(de<2&&(de?De=>Te.request(De):queueMicrotask)(we),de+=1):(V.current=X.current==null||T0(X.current,T,y)||g?qf(a):ry(a),X.current=null,q())};we()}}else wl(a.current,o)||(V.current=o,ve(),W.current=!1)}},[u,z,F,o,me,g,a,T,y,q,ve,Te]),_e(()=>{if(!u||F||!$||h||!se.current)return;const de=$.nodesRef.current,we=de.find(je=>je.id===L)?.context?.elements.floating,Ke=$r(Kt(G??we??null)),De=de.some(je=>je.context&&at(je.context.elements.floating,Ke));we&&!De&&ee.current&&we.focus({preventScroll:!0})},[u,F,G,$,L,h]),_e(()=>{j.current=z,se.current=!!F});const Pe=o!=null,Me=Be(de=>{if(!le.current)return;const we=a.current.indexOf(de.currentTarget);we!==-1&&(V.current!==we||o!==we)&&(V.current=we,q(de))}),Le=Be(()=>O??$?.nodesRef.current.find(de=>de.id===L)?.context?.dataRef?.current.orientation),Fe=Be(()=>qf(a,Re.current)),Oe=Be(de=>{if(ee.current=!1,B.current=!0,de.which===229||!le.current&&de.currentTarget===H.current)return;if(g&&J3(de.key,R,y,D)){Rf(de.key,Le())||Fa(de),e.setOpen(!1,dt(ih,de.nativeEvent));const je=P?.current??G;yn(je)&&je.focus();return}o!=null&&o!==V.current&&!wl(a.current,o)&&(V.current=o);const we=V.current,Ke=qf(a,C),De=ry(a,C);if(U||(de.key==="Home"&&(Fa(de),V.current=Ke,q(de)),de.key==="End"&&(Fa(de),V.current=De,q(de))),I!=null){const je=I(de,V.current,a,R,p,y,C,Ke,De);if(je!=null&&je!==V.current&&(V.current=je,q(de)),R==="both")return}if(Rf(de.key,R)){Fa(de);const je=$r(de.currentTarget.ownerDocument);if(z&&!h&&at(de.currentTarget,je)&&!a.current.some(ht=>ht!=null&&at(ht,je))){V.current=T0(de.key,R,y)?Ke:De,q(de),o===V.current&&ve();return}const{index:yt,wrapped:ut}=e3(a.current,we,{decrement:!T0(de.key,R,y),loopFocus:p,allowEscape:d,disabledIndices:C,minIndex:Ke,maxIndex:De});ut&&(B.current=!1),V.current=yt,q(de)}}),He=v.useMemo(()=>({onFocus(we){B.current=!0,Me(we)},onClick({currentTarget:we}){h||we.focus({preventScroll:!0})},onMouseMove(we){VS(we)||(B.current=!0,W.current=!1,S&&Me(we))},onPointerLeave(we){if(!le.current||!ee.current||we.pointerType==="touch")return;B.current=!0;const Ke=we.relatedTarget;if(!(!S||a.current.includes(Ke))&&ge.current&&(re.current?.(),re.current=null,V.current=-1,q(we),!h)){const De=H.current,je=$r(Kt(De));De&&at(De,je)&&De.focus({preventScroll:!0})}}}),[Me,le,H,S,a,q,ge,h]),be=v.useMemo(()=>h&&z&&Pe&&{"aria-activedescendant":`${M}-${o}`},[h,z,Pe,M,o]),Ue=v.useMemo(()=>({...U?{}:be,onKeyDown(de){if(de.key==="Tab"&&de.shiftKey&&z&&!h){const we=tr(de.nativeEvent);if(we&&!at(H.current,we))return;Fa(de);const Ke=dt(Ti,de.nativeEvent);e.setOpen(!1,Ke);const De=P?.current??G;!Ke.isCanceled&&yn(De)&&De.focus();return}Oe(de)},onPointerMove(de){VS(de)||(ee.current=!0)}}),[be,Oe,H,U,e,z,h,G,P]),Ze=v.useMemo(()=>{function de(De){e.setOpen(!0,dt(ih,De.nativeEvent,De.currentTarget))}function we(De){b==="auto"&&jl(De.nativeEvent)&&(K.current=!h)}function Ke(De){K.current=b,b==="auto"&&Uy(De.nativeEvent)&&(K.current=!0)}return{onKeyDown(De){const je=e.select("open");ee.current=!1;const yt=De.key.startsWith("Arrow"),ut=Z3(De.key,Le(),y),ht=Rf(De.key,je?R:T),Ot=(g?ut:ht)||De.key==="Enter"||De.key.trim()==="";if(h&&je&&(!g||Ac(De.currentTarget)))return Oe(De);if(!(!je&&!w&&yt)){if(Ot){const Dt=Rf(De.key,Le());X.current=g&&Dt?null:De.key}if(g){ut&&(Fa(De),je?(V.current=Fe(),q(De),h&&H.current?.focus()):de(De));return}ht&&(me.current!=null&&(V.current=me.current),Fa(De),!je&&w?de(De):Oe(De),je&&q(De))}},onFocus(De){De.target===De.currentTarget&&e.select("open")&&!h&&(V.current=-1,q(De))},onPointerDown:Ke,onPointerEnter:Ke,onMouseDown:we,onClick:we}},[Oe,b,Fe,g,q,e,w,R,T,Le,y,me,h,H]),it=v.useMemo(()=>({...be,...Ze}),[be,Ze]);return v.useMemo(()=>u?{reference:it,floating:Ue,item:He,trigger:Ze}:{},[u,it,Ue,Ze,He])}function QE(e,n){const{listRef:a,elementsRef:o,activeIndex:s,onMatch:u,disabledIndices:c,onTyping:d,enabled:p=!0,resetMs:g=750,selectedIndex:y=null}=n,h=Be(d),b=e.useState("open"),S=Hn(),w=v.useRef(""),C=v.useRef(y??s??-1),R=v.useRef(null),T=Be(A=>{function N(U){return o?.current[U]}function P(U){const H=N(U);return H&&!Yh(H)||H?.matches(":disabled")?!1:c==null||!El(fo,U,c)}function I(U,H,L=0){if(U.length===0)return-1;const $=(L%U.length+U.length)%U.length,K=H.toLowerCase();for(let V=0;V<U.length;V+=1){const X=($+V)%U.length;if(!(!U[X]?.toLowerCase().startsWith(K)||!P(X)))return X}return-1}const D=a.current;if(w.current.length>0&&A.key===" "&&(Fa(A),h?.(!0)),w.current.length>0&&w.current[0]!==" "&&I(D,w.current)===-1&&A.key!==" "&&h?.(!1),D==null||A.key.length!==1||A.ctrlKey||A.metaKey||A.altKey)return;b&&A.key!==" "&&(Fa(A),h?.(!0));const z=w.current==="";z&&(C.current=y??s??-1),D.every((U,H)=>U&&P(H)?U[0]?.toLowerCase()!==U[1]?.toLowerCase():!0)&&w.current===A.key&&(w.current="",C.current=R.current),w.current+=A.key,S.start(g,()=>{w.current="",C.current=R.current,h?.(!1)});const J=((z?y??s??-1:C.current)??0)+1,Y=I(D,w.current,J);Y!==-1?(u?.(Y,A),R.current=Y):A.key!==" "&&(w.current="",h?.(!1))}),O=Be(A=>{const N=A.relatedTarget,P=e.select("domReferenceElement"),I=e.select("floatingElement");at(P,N)||at(I,N)||(S.clear(),w.current="",C.current=R.current,h?.(!1))});_e(()=>{!b&&y!==null||(S.clear(),R.current=null,w.current!==""&&(w.current="",h?.(!1)))},[b,y,S,h]);const M=v.useMemo(()=>({onKeyDown:T,onBlur:O}),[T,O]);return v.useMemo(()=>p?{reference:M,floating:M}:{},[p,M])}const qS=.1,W3=qS*qS,xn=.5;function Ef(e,n,a,o,s,u){return o>=n!=u>=n&&e<=(s-a)*(n-o)/(u-o)+a}function Cf(e,n,a,o,s,u,c,d,p,g){let y=!1;return Ef(e,n,a,o,s,u)&&(y=!y),Ef(e,n,s,u,c,d)&&(y=!y),Ef(e,n,c,d,p,g)&&(y=!y),Ef(e,n,p,g,a,o)&&(y=!y),y}function ej(e,n,a){return e>=a.x&&e<=a.x+a.width&&n>=a.y&&n<=a.y+a.height}function Tf(e,n,a,o,s,u){const c=Math.min(a,s),d=Math.max(a,s),p=Math.min(o,u),g=Math.max(o,u);return e>=c&&e<=d&&n>=p&&n<=g}function ZE(e={}){const{blockPointerEvents:n=!1}=e,a=new Da,o=({x:s,y:u,placement:c,elements:d,onClose:p,nodeId:g,tree:y})=>{const h=c?.split("-")[0];let b=!1,S=null,w=null,C=typeof performance<"u"?performance.now():0;function R(O,M){const A=performance.now(),N=A-C;if(S===null||w===null||N===0)return S=O,w=M,C=A,!1;const P=O-S,I=M-w,D=P*P+I*I,z=N*N*W3;return S=O,w=M,C=A,D<z}function T(){a.clear(),p()}return function(M){a.clear();const A=d.domReference,N=d.floating;if(!A||!N||h==null||s==null||u==null)return;const{clientX:P,clientY:I}=M,D=tr(M),z=M.type==="mouseleave",F=at(N,D),G=at(A,D);if(F&&(b=!0,!z))return;if(G&&(b=!1,!z)){b=!0;return}if(z&&on(M.relatedTarget)&&at(N,M.relatedTarget))return;function J(){return!!(y&&Mi(y.nodesRef.current,g).length>0)}function Y(){J()||T()}if(J())return;const U=A.getBoundingClientRect(),H=N.getBoundingClientRect(),L=s>H.right-H.width/2,$=u>H.bottom-H.height/2,K=H.width>U.width,V=H.height>U.height,X=(K?U:H).left,ee=(K?U:H).right,q=(V?U:H).top,se=(V?U:H).bottom;if(h==="top"&&u>=U.bottom-1||h==="bottom"&&u<=U.top+1||h==="left"&&s>=U.right-1||h==="right"&&s<=U.left+1){Y();return}let j=!1;switch(h){case"top":j=Tf(P,I,X,U.top+1,ee,H.bottom-1);break;case"bottom":j=Tf(P,I,X,H.top+1,ee,U.bottom-1);break;case"left":j=Tf(P,I,H.right-1,se,U.left+1,q);break;case"right":j=Tf(P,I,U.right-1,se,H.left+1,q);break}if(j)return;if(b&&!ej(P,I,U)){Y();return}if(!z&&R(P,I)){Y();return}let B=!1;switch(h){case"top":{const W=K?xn/2:xn*4,re=K||L?s+W:s-W,Re=K?s-W:L?s+W:s-W,le=u+xn+1,me=L||K?H.bottom-xn:H.top,ge=L?K?H.bottom-xn:H.top:H.bottom-xn;B=Cf(P,I,re,le,Re,le,H.left,me,H.right,ge);break}case"bottom":{const W=K?xn/2:xn*4,re=K||L?s+W:s-W,Re=K?s-W:L?s+W:s-W,le=u-xn,me=L||K?H.top+xn:H.bottom,ge=L?K?H.top+xn:H.bottom:H.top+xn;B=Cf(P,I,re,le,Re,le,H.left,me,H.right,ge);break}case"left":{const W=V?xn/2:xn*4,re=V||$?u+W:u-W,Re=V?u-W:$?u+W:u-W,le=s+xn+1,me=$||V?H.right-xn:H.left,ge=$?V?H.right-xn:H.left:H.right-xn;B=Cf(P,I,me,H.top,ge,H.bottom,le,re,le,Re);break}case"right":{const W=V?xn/2:xn*4,re=V||$?u+W:u-W,Re=V?u-W:$?u+W:u-W,le=s-xn,me=$||V?H.left+xn:H.right,ge=$?V?H.left+xn:H.right:H.left+xn;B=Cf(P,I,le,re,le,Re,me,H.top,ge,H.bottom);break}}B?b||a.start(40,Y):Y()}};return o.__options={...e,blockPointerEvents:n},o}function YS(e,n,a){let{reference:o,floating:s}=e;const u=Oa(n),c=Qy(n),d=Xy(c),p=da(n),g=u==="y",y=o.x+o.width/2-s.width/2,h=o.y+o.height/2-s.height/2,b=o[d]/2-s[d]/2;let S;switch(p){case"top":S={x:y,y:o.y-s.height};break;case"bottom":S={x:y,y:o.y+o.height};break;case"right":S={x:o.x+o.width,y:h};break;case"left":S={x:o.x-s.width,y:h};break;default:S={x:o.x,y:o.y}}const w=co(n);return w&&(S[c]+=b*(w==="end"?1:-1)*(a&&g?-1:1)),S}async function tj(e,n){var a;n===void 0&&(n={});const{x:o,y:s,platform:u,rects:c,elements:d,strategy:p}=e,{boundary:g="clippingAncestors",rootBoundary:y="viewport",elementContext:h="floating",altBoundary:b=!1,padding:S=0}=Oi(n,e),w=iE(S),R=d[b?h==="floating"?"reference":"floating":h],T=mc(await u.getClippingRect({element:(a=await(u.isElement==null?void 0:u.isElement(R)))==null||a?R:R.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(d.floating)),boundary:g,rootBoundary:y,strategy:p})),O=h==="floating"?{x:o,y:s,width:c.floating.width,height:c.floating.height}:c.reference,M=await(u.getOffsetParent==null?void 0:u.getOffsetParent(d.floating)),A=await(u.isElement==null?void 0:u.isElement(M))&&await(u.getScale==null?void 0:u.getScale(M))||{x:1,y:1},N=mc(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:O,offsetParent:M,strategy:p}):O);return{top:(T.top-N.top+w.top)/A.y,bottom:(N.bottom-T.bottom+w.bottom)/A.y,left:(T.left-N.left+w.left)/A.x,right:(N.right-T.right+w.right)/A.x}}const nj=50,rj=async(e,n,a)=>{const{placement:o="bottom",strategy:s="absolute",middleware:u=[],platform:c}=a,d=c.detectOverflow?c:{...c,detectOverflow:tj},p=await(c.isRTL==null?void 0:c.isRTL(n));let g=await c.getElementRects({reference:e,floating:n,strategy:s}),{x:y,y:h}=YS(g,o,p),b=o,S=0;const w={};for(let C=0;C<u.length;C++){const R=u[C];if(!R)continue;const{name:T,fn:O}=R,{x:M,y:A,data:N,reset:P}=await O({x:y,y:h,initialPlacement:o,placement:b,strategy:s,middlewareData:w,rects:g,platform:d,elements:{reference:e,floating:n}});y=M??y,h=A??h,w[T]={...w[T],...N},P&&S<nj&&(S++,typeof P=="object"&&(P.placement&&(b=P.placement),P.rects&&(g=P.rects===!0?await c.getElementRects({reference:e,floating:n,strategy:s}):P.rects),{x:y,y:h}=YS(g,b,p)),C=-1)}return{x:y,y:h,placement:b,strategy:s,middlewareData:w}},aj=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(n){var a,o;const{placement:s,middlewareData:u,rects:c,initialPlacement:d,platform:p,elements:g}=n,{mainAxis:y=!0,crossAxis:h=!0,fallbackPlacements:b,fallbackStrategy:S="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:C=!0,...R}=Oi(e,n);if((a=u.arrow)!=null&&a.alignmentOffset)return{};const T=da(s),O=Oa(d),M=da(d)===d,A=await(p.isRTL==null?void 0:p.isRTL(g.floating)),N=b||(M||!C?[lh(d)]:$4(d)),P=w!=="none";!b&&P&&N.push(...J4(d,C,w,A));const I=[d,...N],D=await p.detectOverflow(n,R),z=[];let F=((o=u.flip)==null?void 0:o.overflows)||[];if(y&&z.push(D[T]),h){const U=G4(s,c,A);z.push(D[U[0]],D[U[1]])}if(F=[...F,{placement:s,overflows:z}],!z.every(U=>U<=0)){var G,J;const U=(((G=u.flip)==null?void 0:G.index)||0)+1,H=I[U];if(H&&(!(h==="alignment"?O!==Oa(H):!1)||F.every(K=>Oa(K.placement)===O?K.overflows[0]>0:!0)))return{data:{index:U,overflows:F},reset:{placement:H}};let L=(J=F.filter($=>$.overflows[0]<=0).sort(($,K)=>$.overflows[1]-K.overflows[1])[0])==null?void 0:J.placement;if(!L)switch(S){case"bestFit":{var Y;const $=(Y=F.filter(K=>{if(P){const V=Oa(K.placement);return V===O||V==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(V=>V>0).reduce((V,X)=>V+X,0)]).sort((K,V)=>K[1]-V[1])[0])==null?void 0:Y[0];$&&(L=$);break}case"initialPlacement":L=d;break}if(s!==L)return{reset:{placement:L}}}return{}}}},JE=new Set(["left","top"]);async function oj(e,n){const{placement:a,platform:o,elements:s}=e,u=await(o.isRTL==null?void 0:o.isRTL(s.floating)),c=da(a),d=co(a),p=Oa(a)==="y",g=JE.has(c)?-1:1,y=u&&p?-1:1,h=Oi(n,e);let{mainAxis:b,crossAxis:S,alignmentAxis:w}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return d&&typeof w=="number"&&(S=d==="end"?w*-1:w),p?{x:S*y,y:b*g}:{x:b*g,y:S*y}}const ij=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var a,o;const{x:s,y:u,placement:c,middlewareData:d}=n,p=await oj(n,e);return c===((a=d.offset)==null?void 0:a.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:s+p.x,y:u+p.y,data:{...p,placement:c}}}}},sj=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:a,y:o,placement:s,platform:u}=n,{mainAxis:c=!0,crossAxis:d=!1,limiter:p={fn:O=>{let{x:M,y:A}=O;return{x:M,y:A}}},...g}=Oi(e,n),y={x:a,y:o},h=await u.detectOverflow(n,g),b=Oa(s),S=$y(b);let w=y[S],C=y[b];const R=(O,M)=>oE(M+h[O==="y"?"top":"left"],M,M-h[O==="y"?"bottom":"right"]);c&&(w=R(S,w)),d&&(C=R(b,C));const T=p.fn({...n,[S]:w,[b]:C});return{...T,data:{x:T.x-a,y:T.y-o,enabled:{[S]:c,[b]:d}}}}}},lj=function(e){return e===void 0&&(e={}),{options:e,fn(n){var a,o;const{x:s,y:u,placement:c,rects:d,middlewareData:p}=n,{offset:g=0,mainAxis:y=!0,crossAxis:h=!0}=Oi(e,n),b={x:s,y:u},S=Oa(c),w=$y(S);let C=b[w],R=b[S];const T=Oi(g,n),O=typeof T=="number"?{mainAxis:T,crossAxis:0}:{mainAxis:(a=T.mainAxis)!=null?a:0,crossAxis:(o=T.crossAxis)!=null?o:0};if(y){const N=w==="y"?"height":"width",P=d.reference[w]-d.floating[N]+O.mainAxis,I=d.reference[w]+d.reference[N]-O.mainAxis;C<P?C=P:C>I&&(C=I)}if(h){var M,A;const N=w==="y"?"width":"height",P=JE.has(da(c)),I=d.reference[S]-d.floating[N]+(P&&((M=p.offset)==null?void 0:M[S])||0)+(P?0:O.crossAxis),D=d.reference[S]+d.reference[N]+(P?0:((A=p.offset)==null?void 0:A[S])||0)-(P?O.crossAxis:0);R<I?R=I:R>D&&(R=D)}return{[w]:C,[S]:R}}}},uj=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){const{placement:a,rects:o,platform:s,elements:u}=n,{apply:c=()=>{},...d}=Oi(e,n),p=await s.detectOverflow(n,d),g=da(a),y=co(a),h=Oa(a)==="y",{width:b,height:S}=o.floating;let w,C;g==="top"||g==="bottom"?(w=g,C=y===(await(s.isRTL==null?void 0:s.isRTL(u.floating))?"start":"end")?"left":"right"):(C=g,w=y==="end"?"top":"bottom");const R=S-p.top-p.bottom,T=b-p.left-p.right,O=Pl(S-p[w],R),M=Pl(b-p[C],T),A=n.middlewareData.shift,N=!A;let P=O,I=M;A!=null&&A.enabled.x&&(I=T),A!=null&&A.enabled.y&&(P=R),N&&!y&&(h?I=b-2*_o(p.left,p.right):P=S-2*_o(p.top,p.bottom)),await c({...n,availableWidth:I,availableHeight:P});const D=await s.getDimensions(u.floating);return b!==D.width||S!==D.height?{reset:{rects:!0}}:{}}}};function WE(e){const n=fa(e);let a=parseFloat(n.width)||0,o=parseFloat(n.height)||0;const s=yn(e),u=s?e.offsetWidth:a,c=s?e.offsetHeight:o,d=sh(a)!==u||sh(o)!==c;return d&&(a=u,o=c),{width:a,height:o,$:d}}function uv(e){return on(e)?e:e.contextElement}function Ol(e){const n=uv(e);if(!yn(n))return Ho(1);const a=n.getBoundingClientRect(),{width:o,height:s,$:u}=WE(n);let c=(u?sh(a.width):a.width)/o,d=(u?sh(a.height):a.height)/s;return(!c||!Number.isFinite(c))&&(c=1),(!d||!Number.isFinite(d))&&(d=1),{x:c,y:d}}const cj=Ho(0);function eC(e){const n=wn(e);return!Vy()||!n.visualViewport?cj:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function dj(e,n,a){return n===void 0&&(n=!1),!!a&&n&&a===wn(e)}function ys(e,n,a,o){n===void 0&&(n=!1),a===void 0&&(a=!1);const s=e.getBoundingClientRect(),u=uv(e);let c=Ho(1);n&&(o?on(o)&&(c=Ol(o)):c=Ol(e));const d=dj(u,a,o)?eC(u):Ho(0);let p=(s.left+d.x)/c.x,g=(s.top+d.y)/c.y,y=s.width/c.x,h=s.height/c.y;if(u&&o){const b=wn(u),S=on(o)?wn(o):o;let w=b,C=J0(w);for(;C&&S!==w;){const R=Ol(C),T=C.getBoundingClientRect(),O=fa(C),M=T.left+(C.clientLeft+parseFloat(O.paddingLeft))*R.x,A=T.top+(C.clientTop+parseFloat(O.paddingTop))*R.y;p*=R.x,g*=R.y,y*=R.x,h*=R.y,p+=M,g+=A,w=wn(C),C=J0(w)}}return mc({width:y,height:h,x:p,y:g})}function ip(e,n){const a=Hh(e).scrollLeft;return n?n.left+a:ys(Fo(e)).left+a}function tC(e,n){const a=e.getBoundingClientRect(),o=a.left+n.scrollLeft-ip(e,a),s=a.top+n.scrollTop;return{x:o,y:s}}function fj(e){let{elements:n,rect:a,offsetParent:o,strategy:s}=e;const u=s==="fixed",c=Fo(o),d=n?_h(n.floating):!1;if(o===c||d&&u)return a;let p={scrollLeft:0,scrollTop:0},g=Ho(1);const y=Ho(0),h=yn(o);if((h||!u)&&((Sr(o)!=="body"||Oc(c))&&(p=Hh(o)),h)){const S=ys(o);g=Ol(o),y.x=S.x+o.clientLeft,y.y=S.y+o.clientTop}const b=c&&!h&&!u?tC(c,p):Ho(0);return{width:a.width*g.x,height:a.height*g.y,x:a.x*g.x-p.scrollLeft*g.x+y.x+b.x,y:a.y*g.y-p.scrollTop*g.y+y.y+b.y}}function hj(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function pj(e){const n=Hh(e),a=e.ownerDocument.body,o=_o(e.scrollWidth,e.clientWidth,a.scrollWidth,a.clientWidth),s=_o(e.scrollHeight,e.clientHeight,a.scrollHeight,a.clientHeight);let u=-n.scrollLeft+ip(e);const c=-n.scrollTop;return fa(a).direction==="rtl"&&(u+=_o(e.clientWidth,a.clientWidth)-o),{width:o,height:s,x:u,y:c}}const gj=25;function mj(e,n,a){a===void 0&&(a="viewport");const o=a==="layoutViewport",s=wn(e),u=Fo(e),c=s.visualViewport;let d=u.clientWidth,p=u.clientHeight,g=0,y=0;if(c){const b=!Vy()||n==="fixed";o?b||(g=-c.offsetLeft,y=-c.offsetTop):(d=c.width,p=c.height,b&&(g=c.offsetLeft,y=c.offsetTop))}if(ip(u)<=0){const b=u.ownerDocument,S=b.body,w=getComputedStyle(S),C=b.compatMode==="CSS1Compat"&&parseFloat(w.marginLeft)+parseFloat(w.marginRight)||0,R=Math.abs(u.clientWidth-S.clientWidth-C),T=getComputedStyle(u).scrollbarGutter==="stable both-edges"?R/2:R;T<=gj&&(d-=T)}return{width:d,height:p,x:g,y}}function yj(e,n){const a=ys(e,!0,n==="fixed"),o=a.top+e.clientTop,s=a.left+e.clientLeft,u=Ol(e),c=e.clientWidth*u.x,d=e.clientHeight*u.y,p=s*u.x,g=o*u.y;return{width:c,height:d,x:p,y:g}}function KS(e,n,a){let o;if(n==="viewport"||n==="layoutViewport")o=mj(e,a,n);else if(n==="document")o=pj(Fo(e));else if(on(n))o=yj(n,a);else{const s=eC(e);o={x:n.x-s.x,y:n.y-s.y,width:n.width,height:n.height}}return mc(o)}function vj(e,n){const a=n.get(e);if(a)return a;let o=pc(e,[],!1).filter(d=>on(d)&&Sr(d)!=="body"),s=null;const u=fa(e).position==="fixed";let c=u?Uo(e):e;for(;on(c)&&!zo(c);){const d=fa(c),p=By(c),g=s?s.position:u?"fixed":"";!p&&(g==="fixed"||g==="absolute"&&d.position==="static")?o=o.filter(h=>h!==c):s=d,c=Uo(c)}return n.set(e,o),o}function bj(e){let{element:n,boundary:a,rootBoundary:o,strategy:s}=e;const c=[...a==="clippingAncestors"?_h(n)?[]:vj(n,this._c):[].concat(a),o],d=KS(n,c[0],s);let p=d.top,g=d.right,y=d.bottom,h=d.left;for(let b=1;b<c.length;b++){const S=KS(n,c[b],s);p=_o(S.top,p),g=Pl(S.right,g),y=Pl(S.bottom,y),h=_o(S.left,h)}return{width:g-h,height:y-p,x:h,y:p}}function xj(e){const{width:n,height:a}=WE(e);return{width:n,height:a}}function Sj(e,n,a){const o=yn(n),s=Fo(n),u=a==="fixed",c=ys(e,!0,u,n);let d={scrollLeft:0,scrollTop:0};const p=Ho(0);if((o||!u)&&((Sr(n)!=="body"||Oc(s))&&(d=Hh(n)),o)){const b=ys(n,!0,u,n);p.x=b.x+n.clientLeft,p.y=b.y+n.clientTop}!o&&s&&(p.x=ip(s));const g=s&&!o&&!u?tC(s,d):Ho(0),y=c.left+d.scrollLeft-p.x-g.x,h=c.top+d.scrollTop-p.y-g.y;return{x:y,y:h,width:c.width,height:c.height}}function O0(e){return fa(e).position==="static"}function GS(e,n){if(!yn(e)||fa(e).position==="fixed")return null;if(n)return n(e);let a=e.offsetParent;return Fo(e)===a&&(a=a.ownerDocument.body),a}function nC(e,n){const a=wn(e);if(_h(e))return a;if(!yn(e)){let s=Uo(e);for(;s&&!zo(s);){if(on(s)&&!O0(s))return s;s=Uo(s)}return a}let o=GS(e,n);for(;o&&c4(o)&&O0(o);)o=GS(o,n);return o&&zo(o)&&O0(o)&&!By(o)?a:o||h4(e)||a}const wj=async function(e){const n=this.getOffsetParent||nC,a=this.getDimensions,o=await a(e.floating);return{reference:Sj(e.reference,await n(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Rj(e){return fa(e).direction==="rtl"}const rC={convertOffsetParentRelativeRectToViewportRelativeRect:fj,getDocumentElement:Fo,getClippingRect:bj,getOffsetParent:nC,getElementRects:wj,getClientRects:hj,getDimensions:xj,getScale:Ol,isElement:on,isRTL:Rj};function aC(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}function Ej(e,n,a){let o=null,s;const u=Fo(e);function c(){var y;clearTimeout(s),(y=o)==null||y.disconnect(),o=null}function d(y,h){y===void 0&&(y=!1),h===void 0&&(h=1),c();const b=e.getBoundingClientRect(),{left:S,top:w,width:C,height:R}=b;if(y||n(),!C||!R)return;const T=bf(w),O=bf(u.clientWidth-(S+C)),M=bf(u.clientHeight-(w+R)),A=bf(S),P={rootMargin:-T+"px "+-O+"px "+-M+"px "+-A+"px",threshold:_o(0,Pl(1,h))||1};let I=!0;function D(z){const F=z[0].intersectionRatio;if(!aC(b,e.getBoundingClientRect()))return d();if(F!==h){if(!I)return d();F?d(!1,F):s=setTimeout(()=>{d(!1,1e-7)},1e3)}I=!1}try{o=new IntersectionObserver(D,{...P,root:u.ownerDocument})}catch{o=new IntersectionObserver(D,P)}o.observe(e)}const p=wn(e),g=()=>d(a);return p.addEventListener("resize",g),d(!0),()=>{p.removeEventListener("resize",g),c()}}function $S(e,n,a,o){o===void 0&&(o={});const{ancestorScroll:s=!0,ancestorResize:u=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:p=!1}=o,g=uv(e),y=s||u?[...g?pc(g):[],...n?pc(n):[]]:[];y.forEach(T=>{s&&T.addEventListener("scroll",a),u&&T.addEventListener("resize",a)});const h=g&&d?Ej(g,a,u):null;let b=-1,S=null;c&&(S=new ResizeObserver(T=>{let[O]=T;O&&O.target===g&&S&&n&&(S.unobserve(n),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var M;(M=S)==null||M.observe(n)})),a()}),g&&!p&&S.observe(g),n&&S.observe(n));let w,C=p?ys(e):null;p&&R();function R(){const T=ys(e);C&&!aC(C,T)&&a(),C=T,w=requestAnimationFrame(R)}return a(),()=>{var T;y.forEach(O=>{s&&O.removeEventListener("scroll",a),u&&O.removeEventListener("resize",a)}),h?.(),(T=S)==null||T.disconnect(),S=null,p&&cancelAnimationFrame(w)}}const Cj=ij,Tj=sj,Oj=aj,Mj=uj,Aj=lj,Dj=(e,n,a)=>{const o=new Map,s=a??{},u={...rC,...s.platform,_c:o};return rj(e,n,{...s,platform:u})};var Nj=typeof document<"u",jj=function(){},Kf=Nj?v.useLayoutEffect:jj;function ph(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(typeof e=="function"&&e.toString()===n.toString())return!0;let a,o,s;if(e&&n&&typeof e=="object"){if(Array.isArray(e)){if(a=e.length,a!==n.length)return!1;for(o=a;o--!==0;)if(!ph(e[o],n[o]))return!1;return!0}if(s=Object.keys(e),a=s.length,a!==Object.keys(n).length)return!1;for(o=a;o--!==0;)if(!{}.hasOwnProperty.call(n,s[o]))return!1;for(o=a;o--!==0;){const u=s[o];if(!(u==="_owner"&&e.$$typeof)&&!ph(e[u],n[u]))return!1}return!0}return e!==e&&n!==n}function oC(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function XS(e,n){const a=oC(e);return Math.round(n*a)/a}function M0(e){const n=v.useRef(e);return Kf(()=>{n.current=e}),n}function Ij(e){e===void 0&&(e={});const{placement:n="bottom",strategy:a="absolute",middleware:o=[],platform:s,elements:{reference:u,floating:c}={},transform:d=!0,whileElementsMounted:p,open:g}=e,[y,h]=v.useState({x:0,y:0,strategy:a,placement:n,middlewareData:{},isPositioned:!1}),[b,S]=v.useState(o);ph(b,o)||S(o);const[w,C]=v.useState(null),[R,T]=v.useState(null),O=v.useCallback(K=>{K!==P.current&&(P.current=K,C(K))},[]),M=v.useCallback(K=>{K!==I.current&&(I.current=K,T(K))},[]),A=u||w,N=c||R,P=v.useRef(null),I=v.useRef(null),D=v.useRef(y),z=p!=null,F=M0(p),G=M0(s),J=M0(g),Y=v.useCallback(()=>{if(!P.current||!I.current)return;const K={placement:n,strategy:a,middleware:b};G.current&&(K.platform=G.current),Dj(P.current,I.current,K).then(V=>{const X={...V,isPositioned:J.current!==!1};U.current&&!ph(D.current,X)&&(D.current=X,cr.flushSync(()=>{h(X)}))})},[b,n,a,G,J]);Kf(()=>{g===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,h(K=>({...K,isPositioned:!1})))},[g]);const U=v.useRef(!1);Kf(()=>(U.current=!0,()=>{U.current=!1}),[]),Kf(()=>{if(A&&(P.current=A),N&&(I.current=N),A&&N){if(F.current)return F.current(A,N,Y);Y()}},[A,N,Y,F,z]);const H=v.useMemo(()=>({reference:P,floating:I,setReference:O,setFloating:M}),[O,M]),L=v.useMemo(()=>({reference:A,floating:N}),[A,N]),$=v.useMemo(()=>{const K={position:a,left:0,top:0};if(!L.floating)return K;const V=XS(L.floating,y.x),X=XS(L.floating,y.y);return d?{...K,transform:"translate("+V+"px, "+X+"px)",...oC(L.floating)>=1.5&&{willChange:"transform"}}:{position:a,left:V,top:X}},[a,d,L.floating,y.x,y.y]);return v.useMemo(()=>({...y,update:Y,refs:H,elements:L,floatingStyles:$}),[y,Y,H,L,$])}const kj=(e,n)=>{const a=Cj(e);return{name:a.name,fn:a.fn,options:[e,n]}},Pj=(e,n)=>{const a=Tj(e);return{name:a.name,fn:a.fn,options:[e,n]}},Lj=(e,n)=>({fn:Aj(e).fn,options:[e,n]}),zj=(e,n)=>{const a=Oj(e);return{name:a.name,fn:a.fn,options:[e,n]}},_j=(e,n)=>{const a=Mj(e);return{name:a.name,fn:a.fn,options:[e,n]}},Hj={...Po,disabled:e=>e.disabled,instantType:e=>e.instantType,isInstantPhase:e=>e.isInstantPhase,trackCursorAxis:e=>e.trackCursorAxis,disableHoverablePopup:e=>e.disableHoverablePopup,lastOpenChangeReason:e=>e.openChangeReason,closeOnClick:e=>e.closeOnClick,appliedTriggerProps:(e,n)=>n?e.activeTriggerProps:void 0,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin};class Uj extends Fl{constructor(n,a,o){const s=new Pc;super(Fj(n,s,a,o),Bj(s),Hj)}setOpen=(n,a)=>{L3(this,n,a,{extraState:{openChangeReason:a.reason}})};cancelPendingOpen(n){this.state.floatingRootContext.dispatchOpenChange(!1,dt(Va,n))}}function Fj(e,n,a,o=!1){return{...ap(n,a,o),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function Bj(e){return{popupRef:v.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}const Vj=Cc(function(n){const{disabled:a=!1,defaultOpen:o=!1,open:s,disableHoverablePopup:u=!1,trackCursorAxis:c="none",actionsRef:d,onOpenChange:p,onOpenChangeComplete:g,handle:y,triggerId:h,defaultTriggerId:b=null,children:S}=n,w=ov((G,J)=>new Uj({open:o,openProp:s,activeTriggerId:b,triggerIdProp:h},G,J));w.useControlledProp("openProp",s),w.useControlledProp("triggerIdProp",h),w.useContextCallback("onOpenChange",p),w.useContextCallback("onOpenChangeComplete",g);const C=w.useState("open"),R=!a&&C,T=w.useState("activeTriggerId"),O=w.useState("mounted"),M=w.useState("payload");w.useSyncedValues({trackCursorAxis:c,disableHoverablePopup:u,disabled:a}),ep(w,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:A,transitionStatus:N}=tp(R,w),P=w.useState("isInstantPhase"),I=w.useState("instantType"),D=w.useState("lastOpenChangeReason"),z=v.useRef(null);_e(()=>{C&&a&&w.setOpen(!1,dt(I4))},[C,a,w]),_e(()=>{N==="ending"&&D===_r||N!=="ending"&&P?(I!=="delay"&&(z.current=I),w.set("instantType","delay")):z.current!==null&&(w.set("instantType",z.current),z.current=null)},[N,P,D,I,w]),_e(()=>{R&&T==null&&w.set("payload",void 0)},[w,T,R]),v.useImperativeHandle(d,()=>({unmount:A,close:()=>w.setOpen(!1,dt(Nc))}),[A,w]);const F=R||O||!a&&c!=="none";return x.jsxs(KR.Provider,{value:w,children:[y&&x.jsx(Zh,{handle:y,store:w}),F&&x.jsx(qj,{store:w,disabled:a,trackCursorAxis:c}),typeof S=="function"?S({payload:M}):S]})});function qj({store:e,disabled:n,trackCursorAxis:a}){const o=e.useState("floatingRootContext"),s=Ic(o,{enabled:!n,referencePress:()=>e.select("closeOnClick")}),u=N3(o,{enabled:!n&&a!=="none",axis:a==="none"?void 0:a}),c=v.useMemo(()=>Lr(u.reference,s.reference),[u.reference,s.reference]);return np(e,{activeTriggerProps:c,inactiveTriggerProps:c,popupProps:s.floating??Gt}),null}function Tr(e){return Ul(e,"base-ui")}const iC=v.createContext(void 0);function Yj(){return v.useContext(iC)}const Kj=600,QS="data-base-ui-tooltip-trigger";function ZS(e){const n=tr(e);return on(n)?n:null}const Gj=YR(function(n,a){const{render:o,className:s,style:u,handle:c,payload:d,disabled:p,delay:g,closeOnClick:y=!0,closeDelay:h,id:b,...S}=n,w=Tc(!0),R=YE(c)??w;if(!R)throw new Error(Rn(82));const T=Tr(b),O=R.useState("isTriggerActive",T),M=R.useState("isOpenedByTrigger",T),A=R.useState("floatingRootContext"),N=v.useRef(null),P=h??0,{registerTrigger:I,isMountedByThisTrigger:D}=HE(T,N,R,{payload:d,closeOnClick:y,closeDelay:P}),z=Yj(),{activeIdRef:F,delayRef:G,isInstantPhase:J,hasProvider:Y}=z4(A,{open:M}),U=sv(A);R.useSyncedValue("isInstantPhase",J);const H=R.useState("disabled"),L=p??H,$=Pn(L),K=R.useState("trackCursorAxis"),V=R.useState("disableHoverablePopup"),X=v.useRef(!1),ee=Hn(),q=v.useRef(void 0);function se(){return Y&&F.current!=null?0:g??z??Kj}function j(ce){const Te=N.current;if(!Te||!ce)return!1;const ve=gc(ce,`[${QS}]`);return ve!==null&&ve!==Te&&at(Te,ve)}function B(ce){const Te=j(ce);return X.current=Te,Te&&(U.openChangeTimeout.clear(),U.restTimeout.clear(),U.restTimeoutPending=!1,ee.clear()),Te}const W=$E(A,{enabled:!L,mouseOnly:!0,move:!1,handleClose:!V&&K!=="both"?ZE():null,restMs:se,delay(){return h==null&&Y?{close:ms(G.current,"close")}:{close:P}},triggerElementRef:N,isActiveTrigger:O,isClosing:()=>R.select("transitionStatus")==="ending",shouldOpen(){return!X.current}}),re=KE(A,{enabled:!L}).reference,Re=ce=>{const Te=X.current,ve=ZS(ce),Pe=B(ve),Me=N.current,Le=Me&&ve&&at(Me,ve);if(Pe&&R.select("open")&&R.select("lastOpenChangeReason")===qn){R.setOpen(!1,dt(qn,ce));return}if(Te&&!Pe&&Le&&!$.current&&!R.select("open")&&Me&&Ci(q.current)){const Fe=()=>{!X.current&&!$.current&&!R.select("open")&&R.setOpen(!0,dt(qn,ce,Me))},Oe=se();Oe===0?(ee.clear(),Fe()):ee.start(Oe,Fe)}},le=R.useState("appliedTriggerProps",D||K!=="none");return Mt("button",n,{state:{open:M},ref:[a,I,N],props:[W,re,le,{onMouseOver(ce){Re(ce.nativeEvent)},onFocus(ce){j(ZS(ce.nativeEvent))&&ce.preventBaseUIHandler()},onMouseLeave(){X.current=!1,ee.clear(),q.current=void 0},onPointerEnter(ce){q.current=ce.pointerType},onPointerDown(ce){q.current=ce.pointerType,R.set("closeOnClick",y),y&&!R.select("open")&&R.cancelPendingOpen(ce.nativeEvent)},onClick(ce){y&&!R.select("open")&&R.cancelPendingOpen(ce.nativeEvent)},id:T,[ey]:L?"":void 0,[QS]:L?void 0:""},S],stateAttributesMapping:ZR})}),sC=v.createContext(void 0);function $j(){const e=v.useContext(sC);if(e===void 0)throw new Error(Rn(70));return e}const Xj=v.forwardRef(function(n,a){const{children:o,container:s,className:u,render:c,style:d,...p}=n,{node:g,subtree:y}=AE({container:s,ref:a,componentProps:n,elementProps:p});return!y&&!g?null:x.jsxs(v.Fragment,{children:[y,g&&cr.createPortal(o,g)]})}),Qj=v.forwardRef(function(n,a){const{keepMounted:o=!1,...s}=n;return Tc().useState("mounted")||o?x.jsx(sC.Provider,{value:o,children:x.jsx(Xj,{ref:a,...s})}):null}),lC=v.createContext(void 0);function uC(){const e=v.useContext(lC);if(e===void 0)throw new Error(Rn(71));return e}function Zj(e){const{nodeId:n,externalTree:a,rootContext:o}=e,s=o.useState("referenceElement"),u=o.useState("floatingElement"),c=o.useState("domReferenceElement"),d=o.useState("open"),p=o.useState("floatingId"),[g,y]=v.useState(null),h=v.useRef(null),b=ji(a),S=v.useMemo(()=>({reference:s,floating:u,domReference:c}),[s,u,c]),w=Ij({...e,elements:{...S,...g&&{reference:g}}}),C=v.useCallback(M=>{const A=on(M)?{getBoundingClientRect:()=>M.getBoundingClientRect(),getClientRects:()=>M.getClientRects(),contextElement:M}:M;y(A),w.refs.setReference(A)},[w.refs]),R=v.useMemo(()=>({...w.refs,setPositionReference:C,domReference:h}),[w.refs,C]),T=v.useMemo(()=>({...w.elements,domReference:c}),[w.elements,c]),O=v.useMemo(()=>({...w,dataRef:o.context.dataRef,open:d,onOpenChange:o.setOpen,events:o.context.events,floatingId:p,refs:R,elements:T,nodeId:n,rootStore:o}),[w,R,T,n,o,d,p]);return _e(()=>{c&&(h.current=c)},[c]),_e(()=>{o.context.dataRef.current.floatingContext=O;const M=b?.nodesRef.current.find(A=>A.id===n);M&&(M.context=O)}),v.useMemo(()=>({...w,context:O,refs:R,elements:T,rootStore:o}),[w,R,T,O,o])}const Jj=v.createContext(void 0);function sp(){return v.useContext(Jj)?.direction??"ltr"}const Wj=e=>({name:"arrow",options:e,async fn(n){const{x:a,y:o,placement:s,rects:u,platform:c,elements:d,middlewareData:p}=n,{element:g,padding:y=0}=Oi(e,n)||{};if(g==null)return{};const h=iE(y),b={x:a,y:o},S=Qy(s),w=Xy(S),C=await c.getDimensions(g),R=S==="y",T=R?"top":"left",O=R?"bottom":"right",M=R?"clientHeight":"clientWidth",A=u.reference[w]+u.reference[S]-b[S]-u.floating[w],N=b[S]-u.reference[S],P=d.floating[M]||u.floating[w],I=A/2-N/2,D=P/2-C[w]/2-1,z=Math.min(h[T],D),F=Math.min(h[O],D),G=z,J=P-C[w]-F,Y=P/2-C[w]/2+I,U=oE(G,Y,J),H=!p.arrow&&co(s)!=null&&Y!==U&&u.reference[w]/2-(Y<G?z:F)-C[w]/2<0,L=H?Y<G?Y-G:Y-J:0;return{[S]:b[S]+L,data:{[S]:U,centerOffset:Y-U-L,...H&&{alignmentOffset:L}},reset:H}}}),eI=(e,n)=>{const{name:a,fn:o}=Wj(e);return{name:a,fn:o,options:[e,n]}},tI={name:"hide",async fn(e){const{width:n,height:a,x:o,y:s}=e.rects.reference,u=n===0&&a===0&&o===0&&s===0,c=await e.platform.detectOverflow(e,{elementContext:"reference"});return{data:{referenceHidden:c.top-a>=0||c.right-n>=0||c.bottom-a>=0||c.left-n>=0||u}}}},nI={sideX:"left",sideY:"top"},rI="--available-width",aI="--available-height",oI="--anchor-width",iI="--anchor-height",sI="--transform-origin",JS=rI,WS=aI;function cC(e,n,a){const o=e==="inline-start"||e==="inline-end";return{top:"top",right:o?a?"inline-start":"inline-end":"right",bottom:"bottom",left:o?a?"inline-end":"inline-start":"left"}[n]}function ew(e,n,a){const{rects:o,placement:s}=e;return{side:cC(n,da(s),a),align:co(s)||"center",anchor:{width:o.reference.width,height:o.reference.height},positioner:{width:o.floating.width,height:o.floating.height}}}function lp(e){return lI(e,Zj)}function lI(e,n){const{anchor:a,positionMethod:o="absolute",side:s="bottom",sideOffset:u=0,align:c="center",alignOffset:d=0,collisionBoundary:p,collisionPadding:g=5,sticky:y=!1,arrowPadding:h=5,disableAnchorTracking:b=!1,inline:S,keepMounted:w=!1,floatingRootContext:C,mounted:R,collisionAvoidance:T,shift:O,nodeId:M,adaptiveOrigin:A,lazyFlip:N=!1,externalTree:P}=e,I=T.side||"flip",D=T.align||"flip",z=T.fallbackAxisSide||"end",F=O?.crossAxis??!1,G=O?.rootBoundary,J=typeof a=="function"?a:void 0,Y=Be(J),U=J?Y:a,H=Pn(a),L=Pn(R),K=sp()==="rtl",[V,X]=v.useState(null);!R&&V!==null&&X(null);const ee=N==="placement",q=V?da(V):null,se=V&&ee?co(V)||"center":null,j=q||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":K?"left":"right","inline-start":K?"right":"left"}[s],B=se||c,W=B==="center"?j:`${j}-${B}`;let re=g;typeof re=="number"?re={top:re,right:re,bottom:re,left:re}:re&&(re={top:re.top||0,right:re.right||0,bottom:re.bottom||0,left:re.left||0});const Re=1,le=s==="bottom"?Re:0,me=s==="top"?Re:0,ge=s==="right"?Re:0,ce=s==="left"?Re:0,Te={boundary:p==="clipping-ancestors"?"clippingAncestors":p,padding:re},ve=v.useRef(null),Pe=Pn(u),Me=Pn(d),Le=typeof u!="function"?u:0,Fe=typeof d!="function"?d:0,Oe=[];S&&Oe.push(S),Oe.push(kj(Ie=>{const ot=ew(Ie,s,K),ke=typeof Pe.current=="function"?Pe.current(ot):Pe.current,ze=typeof Me.current=="function"?Me.current(ot):Me.current;return{mainAxis:ke,crossAxis:ze,alignmentAxis:ze}},[Le,Fe,K,s]));const He=D==="none"&&I!=="shift",be=!He&&(y||F||I==="shift"),Ue=I==="none"?null:zj({...Te,padding:{top:re.top+Re+le,right:re.right+Re+ce,bottom:re.bottom+Re+me,left:re.left+Re+ge},mainAxis:!F&&I==="flip",crossAxis:D==="flip"?"alignment":!1,fallbackAxisSideDirection:z}),Ze=He?null:Pj({...Te,rootBoundary:G,mainAxis:D!=="none",crossAxis:be,limiter:y||F?void 0:Lj(Ie=>{if(!ve.current)return{};const{width:ot,height:ke}=ve.current.getBoundingClientRect(),ze=Oa(da(Ie.placement)),Ge=ze==="y"?ot:ke,et=ze==="y"?re.left+re.right:re.top+re.bottom;return{offset:Ge/2+et/2}})},[Te,y,F,G,re,D]);I==="shift"||D==="shift"||B==="center"?Oe.push(Ze,Ue):Oe.push(Ue,Ze),Oe.push(_j({...Te,apply({elements:{floating:Ie},availableWidth:ot,availableHeight:ke,rects:ze}){if(!L.current)return;const Ge=Ie.style;Ge.setProperty(JS,`${ot}px`),Ge.setProperty(WS,`${ke}px`);const et=wn(Ie).devicePixelRatio||1,{x:Et,y:_,width:Z,height:ne}=ze.reference,ye=(Math.round((Et+Z)*et)-Math.round(Et*et))/et,xe=(Math.round((_+ne)*et)-Math.round(_*et))/et;Ge.setProperty(oI,`${ye}px`),Ge.setProperty(iI,`${xe}px`)}}),eI(Ie=>({element:ve.current||Kt(Ie.elements.floating).createElement("div"),padding:ve.current?h:0}),[h]),{name:"transformOrigin",fn(Ie){const{elements:{floating:ot},middlewareData:ke,placement:ze,platform:Ge,rects:et,y:Et}=Ie,_=da(ze),Z=co(ze),ne=Oa(_)==="y",ye=ve.current,xe=typeof u=="function"?u(ew(Ie,s,K)):u;let qe;if(!ye&&Z&&Math.abs(ne?ke.shift?.x||0:ke.shift?.y||0)<=1)qe=Z==="start"===(ne&&Ge.isRTL?.(ot)===!0)?"100%":"0%";else{const Xe=ne?ke.arrow?.x||0:ke.arrow?.y||0,$e=ne?ye?.clientWidth||0:ye?.clientHeight||0;qe=`${Xe+$e/2}px`}let Ve=_==="top"||_==="left"?`calc(100% + ${xe}px)`:`${-xe}px`;return be&&ne&&Math.abs(ke.shift?.y||0)>xe&&(Ve=`${et.reference.y+et.reference.height/2-Et}px`),ot.style.setProperty(sI,ne?`${qe} ${Ve}`:`${Ve} ${qe}`),{}}},tI,A),_e(()=>{!R&&C&&C.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[R,C]);const it=v.useMemo(()=>({ancestorScroll:!b,elementResize:!b&&typeof ResizeObserver<"u",layoutShift:!b&&typeof IntersectionObserver<"u"}),[b]),{refs:de,elements:we,x:Ke,y:De,middlewareData:je,update:yt,placement:ut,context:ht,isPositioned:Ot,floatingStyles:Dt}=n({rootContext:C,open:w?R:void 0,placement:W,middleware:Oe,strategy:o,whileElementsMounted:w?void 0:(...Ie)=>$S(...Ie,it),nodeId:M,externalTree:P}),{sideX:Wt,sideY:rn}=je.adaptiveOrigin||nI,en=Ot?o:"fixed",We=v.useMemo(()=>{let Ie;return Ot?A?Ie={position:en,[Wt]:Ke,[rn]:De}:Ie={...Dt,position:en}:Ie={position:en,top:0,left:0},Ie[JS]="100vw",Ie[WS]="100vh",Ot||(Ie.opacity=0),Ie},[A,en,Wt,Ke,rn,De,Dt,Ot]),xt=v.useRef(null);_e(()=>{if(!R)return;const Ie=H.current,ot=typeof Ie=="function"?Ie():Ie,ze=(tw(ot)?ot.current:ot)||null||null;ze!==xt.current&&(de.setPositionReference(ze),xt.current=ze)},[R,de,U,H]),v.useEffect(()=>{if(!R)return;const Ie=H.current;typeof Ie!="function"&&tw(Ie)&&Ie.current!==xt.current&&(de.setPositionReference(Ie.current),xt.current=Ie.current)},[R,de,U,H]),v.useEffect(()=>{if(w&&R&&we.reference&&we.floating)return $S(we.reference,we.floating,yt,it)},[w,R,we,yt,it]);const $t=da(ut),ft=cC(s,$t,K),vt=co(ut)||"center",gt=!!je.hide?.referenceHidden;_e(()=>{N&&R&&Ot&&($t!==j||ee&&vt!==B)&&X(ut)},[N,ee,R,Ot,ut,$t,vt,j,B]);const Lt=v.useMemo(()=>({position:"absolute",top:je.arrow?.y,left:je.arrow?.x}),[je.arrow]),un=je.arrow?.centerOffset!==0;return v.useMemo(()=>({positionerStyles:We,arrowStyles:Lt,arrowRef:ve,arrowUncentered:un,side:ft,align:vt,physicalSide:$t,anchorHidden:gt,refs:de,context:ht,isPositioned:Ot,update:yt}),[We,Lt,ve,un,ft,vt,$t,gt,de,ht,Ot,yt])}function tw(e){return e!=null&&"current"in e}function Lc(e){return e==="starting"?E3:Gt}function up(e,n,{styles:a,transitionStatus:o,props:s,refs:u,hidden:c,inert:d=!1}){const p={...a};return d&&(p.pointerEvents="none"),Mt("div",e,{state:n,ref:u,props:[{role:"presentation",hidden:c,style:p},Lc(o),s],stateAttributesMapping:Mc})}const uI=v.forwardRef(function(n,a){const{render:o,className:s,anchor:u,positionMethod:c="absolute",side:d="top",align:p="center",sideOffset:g=0,alignOffset:y=0,collisionBoundary:h="clipping-ancestors",collisionPadding:b=5,arrowPadding:S=5,sticky:w=!1,disableAnchorTracking:C=!1,collisionAvoidance:R=tv,style:T,...O}=n,M=Tc(),A=$j(),N=M.useState("open"),P=M.useState("mounted"),I=M.useState("trackCursorAxis"),D=M.useState("disableHoverablePopup"),z=M.useState("floatingRootContext"),F=M.useState("instantType"),G=M.useState("transitionStatus"),J=M.useState("adaptiveOrigin"),Y=lp({anchor:u,positionMethod:c,floatingRootContext:z,mounted:P,side:d,sideOffset:g,align:p,alignOffset:y,collisionBoundary:h,collisionPadding:b,sticky:w,arrowPadding:S,disableAnchorTracking:C,keepMounted:A,collisionAvoidance:R,adaptiveOrigin:J}),U=v.useMemo(()=>({open:N,side:Y.side,align:Y.align,anchorHidden:Y.anchorHidden,instant:I!=="none"?"tracking-cursor":F}),[N,Y.side,Y.align,Y.anchorHidden,I,F]),H=up(n,U,{styles:Y.positionerStyles,transitionStatus:G,props:O,refs:[a,M.useStateSetter("positionerElement")],hidden:!P,inert:!N||I==="both"||D});return x.jsx(lC.Provider,{value:Y,children:H})}),cI=v.forwardRef(function(n,a){const{render:o,className:s,style:u,...c}=n,d=Tc(),{side:p,align:g}=uC(),y=d.useState("open"),h=d.useState("instantType"),b=d.useState("transitionStatus"),S=d.useState("popupProps"),w=d.useState("floatingRootContext"),C=d.useState("disabled"),R=d.useState("closeDelay");ja({open:y,ref:d.context.popupRef,onComplete(){y&&d.context.onOpenChangeComplete?.(!0)}}),lv(w,{enabled:!C,closeDelay:R});const T=d.useStateSetter("popupElement");return Mt("div",n,{state:{open:y,side:p,align:g,instant:h,transitionStatus:b},ref:[a,d.context.popupRef,T],props:[kc,S,Lc(b),c],stateAttributesMapping:Bh})}),dI=v.forwardRef(function(n,a){const{render:o,className:s,style:u,...c}=n,d=Tc(),{arrowRef:p,side:g,align:y,arrowUncentered:h,arrowStyles:b}=uC(),S=d.useState("open"),w=d.useState("instantType");return Mt("div",n,{state:{open:S,side:g,align:y,uncentered:h,instant:w},ref:[a,p],props:[{style:b,"aria-hidden":!0},c],stateAttributesMapping:Mc})}),fI=function(n){const{delay:a,closeDelay:o,timeout:s=400}=n,u=v.useMemo(()=>({open:a,close:o}),[a,o]);return x.jsx(iC.Provider,{value:a,children:x.jsx(L4,{delay:u,timeoutMs:s,children:n.children})})};function cp(e){return Wy(19)?e:e?"true":void 0}function hI(e){const[n,a]=v.useState({current:e,previous:null});return Object.is(e,n.current)||a({current:e,previous:n.current}),n.previous}const dC=48,go=(e,n=0)=>{const a=new Int32Array(e.length);for(let o=0;o<e.length;o++)a[o]=e.charCodeAt(o)-dC-n;return a},dp=e=>{const n=new Int32Array(e.length+1);for(let a=0;a<e.length;a++)n[a+1]=n[a]+e[a];return n},Ai=e=>{const n=new Int32Array(e.length);let a=0;for(let o=0;o<e.length;o++){const s=e.charCodeAt(o)-dC;a+=s>>>1^-(s&1),n[o]=a}return n},pI=384,gI=[],ss=dp(go("E0500002005282000000002000150000020021820000011200000003022202000300004200120000200420001200021200301200010400162000010000220021010:2192001200220012000220012000200200200400010200040000000000400200108200110100000022010313000162002000020020012020080213000228200000000082000000000120002000120020020040101020300130001001010")),mI=dp(go(":11111111211111119311546544411119731869:671397415686432441111111111161114151214313433415:78311132233313187211117221449443411141111151152226611131111112212518142224214215421421542142424242516171151615616347111111111197911327451111111111111111111113134714133513411111311111111111111111111112444411111342312715245411117:3")),yI="@containerabcdefghinlmoprstunderlineviawzccentlignnimatespectuto-colsrowsaglorightnessckdrop-sisbcontrastfiltergrayscalehue-rotateinvertopacityslurrightnessaturateepia-coniclinearpositionradialsizeockurrderttom-belrstxyespacing-xyaretoursorlnt-umnsendspantartainentrasteividerop-shadowurationcorationlay-xyasendillexontromlter-featuresstretchapr-xyayscaleidow-colsrowsue-rotatedentlinesetvert-beringsxyeshadoweiadingftnest-clamp-imageabein-lrstxyskx--b-coniclpositionrsizet-x-y-fromto-fromto-inearfromto-fromto-adialfromto-fromtofromtofromtofromtoblockhinlinew-screenesblockhinlinewbjectpacityrutlinederigin-offsetbelrstxyesrspective-originaceholderioghtng-offsettateundedw-xyz-belrstlreseslr-endspantartaturatecepiahizekewpace-taleroll-xyz-barmpbelrstxyesbelrstxyes-thumbrackadowrink-xyxyartrokeabextora-shadowpckingnsformitionlate-xyz-offsetill-changeoom",vI=(()=>{const e=ss.length-1,n=new Int32Array(e);for(let s=e-1;s>=0;s--){let u=1,c=s+1;for(let d=ss[s];d<ss[s+1];d++)u+=n[c],c+=n[c];n[s]=u}const a=new Int32Array(ss[e]);let o=0;for(let s=0;s<e;s++){let u=s+1;for(let c=ss[s];c<ss[s+1];c++)a[o++]=u,u+=n[u]}return a})(),bI=go("02000000000000900<=0?000B000F00F00ŏI0J0LNPRTVX0000]_a00000000000000000000000rst0000000zŏ00000000000
ŏ0000000ŏ00000000000000000000000000000000000000000000000000000000000000Ë000000000000000000000Þ000000000000000000ð0000000ø0ùúûüýþÿĀāĂ㥹Ć000000000000000000000000000000000000000000ħ0ĨĪ00000000000000000000ļĽ00000Ŭ000000",1),xI=dp(go("123333359346463635126536711576")),SI=go("93203242332583253248325D>E?F@03263243255B:032523853:0325B:8GA032542H<C=12727B:0328432553;D>E?3257D>032585:0325B:;0328B:032"),wI=go("012113445661666666789111:5;;;;;;;;444;;;:62999<1161=62>>?61:21@ABCD4446996:64E:::;:?::64:F114GHHIHHHHIHH1HH1HH1HHHHHH::EEJ4444::EE4444441691;644444114244444:;K6666555555555555555999666664444444444444444444444226?6:66644L9M?D:111::::6DE199"),RI=Ai("020200202020020020020020020020200200200200200200200002020202001003040106000200200200200200200200200200200200200200200200200200200200200200200200200200200200020020020020020020002020200202002002002002002002002002002020002002020020200220200200200200200200200200200200020020020000200020002000200200200020020020002000200200200020020202002020202000200200020022000200200020020002002000200220002002000200W0Z00020020002002020002002000200g0j0002002000200200020020002002000200200020020002000200002000002002002002002000200020000200002002002002002002002020020020200200200200200200200200202020020020020020020020020002002002020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020002002002002002002000200200200200200200200200200020202020002000200020002002002002000020200200"),EI=(()=>{const e=new Int32Array(319).fill(-1),n=Ai("02422242:222222242224222242442222222422222244442242226224222426222422442462222422622222222626222462242622422622422424242422222222422222222242422222222222222222622442224222222222222224424442262222222222222222222226224222424242422224422422422222"),a=Ai("02222222222222222222202222222222222222222222221422222222222222222222222222222222222Y\\222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222221422222222222222222222222222222222222222Ŀł222222222222222222");for(let o=0;o<n.length;o++)e[n[o]]=a[o];return e})(),CI="container |break-after- all auto avoid avoid-page column left page right|break-before- all auto avoid avoid-page column left page right|break-inside-a uto void void-column void-page|box-decoration- clone slice|box- border content| contents flow-root hidden table table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group| not-sr-only sr-only|float- end left none right start|clear- both end left none right start|isolat e ion-auto|overflow- auto clip hidden scroll visible|overflow-x- auto clip hidden scroll visible|overflow-y- auto clip hidden scroll visible|overscroll- auto contain none|overscroll-x- auto contain none|overscroll-y- auto contain none| absolute fixed relative static sticky| collapse invisible visible|justify- around baseline between center center-safe end end-safe evenly normal start stretch|justify-items- center center-safe end end-safe normal start stretch|justify-self- auto center center-safe end end-safe start stretch|items- baseline baseline-last center center-safe end end-safe start stretch|self- auto baseline baseline-last center center-safe end end-safe start stretch|place-content- around baseline between center center-safe end end-safe evenly start stretch|place-items- baseline center center-safe end end-safe start stretch|place-self- auto center center-safe end end-safe start stretch| antialiased subpixel-antialiased| italic not-italic|normal-nums |ordinal |slashed-zero | lining-nums oldstyle-nums| proportional-nums tabular-nums| diagonal-fractions stacked-fractions| no-underline overline| capitalize lowercase normal-case uppercase|truncate |whitespace- break-spaces normal nowrap pre pre-line pre-wrap|break- all keep normal words|wrap- anywhere break-word normal|hyphens- auto manual none|mix-blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay plus-darker plus-lighter saturation screen soft-light|table- auto fixed|caption- bottom top|backface- hidden visible|appearance- auto none|scheme- dark light light-dark normal only-dark only-light|field-sizing- content fixed|pointer-events- auto none|resize -none -x -y|snap- align-none center end start|snap- always normal|snap- both none x y|snap- mandatory proximity|touch- auto manipulation none|touch-pan- left right x|touch-pan- down up y|touch-pinch-zoom |select- all auto none text|forced-color-adjust- auto none| normal size| baseline bottom middle sub super text-bottom text-top top| bounce none ping pulse spin| auto square video| auto fr max min px|none | auto full px| fixed local scroll|clip- border content padding text|origin- border content padding| bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| no-repeat repeat repeat-round repeat-space repeat-x repeat-y| auto contain cover|blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay saturation screen soft-light|to- b bl br l r t tl tr| auto dvh fit full lh lvh max min px screen svh| dashed dotted double hidden none solid| collapse separate|px |auto |full | content none strict| inline-size size|layout |paint |style | around baseline between center center-safe end end-safe evenly normal start stretch| alias all-scroll auto cell col-resize context-menu copy crosshair default e-resize ew-resize grab grabbing help move n-resize ne-resize nesw-resize no-drop none not-allowed ns-resize nw-resize nwse-resize pointer progress row-resize s-resize se-resize sw-resize text vertical-text w-resize wait zoom-in zoom-out| dashed dotted double solid wavy| auto from-font|reverse |initial | in in-out initial linear out| col col-reverse row row-reverse| nowrap wrap wrap-reverse| auto initial none| black bold extrabold extralight light medium normal semibold thin| condensed expanded extra-condensed extra-expanded normal semi-condensed semi-expanded ultra-condensed ultra-expanded|flow- col col-dense dense row row-dense| none subgrid| auto dvh dvw fit full lh lvh lvw max min px screen svh svw| block flex grid table| auto dvw fit full lvw max min px screen svw| loose none normal px relaxed snug tight|through |item | inside outside| decimal disc none| auto px| clip-border clip-content clip-fill clip-padding clip-stroke clip-view no-clip| add exclude intersect subtract| alpha luminance match|origin- border content fill padding stroke view|type- alpha luminance| circle ellipse| closest-corner closest-side farthest-corner farthest-side|at- bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| dvh fit full lh lvh max min none px screen svh| auto dvh dvw fit full lh lvh lvw max min none px screen svh svw| dvw fit full lvw max min none px screen svw| auto dvh dvw fit full lvh lvw max min none prose px svh svw| auto dvh dvw fit full lvh lvw max min none px screen svh svw| contain cover fill none scale-down| first last none| distant dramatic midrange near none normal|inset | full none|3d | auto smooth|gutter- auto both stable| auto none thin| inner none| auto dvh dvw fit full lvh lvw max min px svh svw|base | center end justify left right start| clip ellipsis| balance nowrap pretty wrap| normal tight tighter wide wider widest| cpu gpu none| 3d flat| all colors none opacity shadow transform| discrete normal| full px| auto dvh dvw fit full lvh lvw max min px screen svh svw| auto contents scroll transform".split("|").map(e=>{const n=e.split(" "),a=n.shift();for(let o=0;o<n.length;o++)n[o]=a+n[o];return n}),nw=Ai("0000000000000000000000000000000000000000000000000000000000000262242:6@200000006:240B428:4422400002046044222426220026642642462026224222824220022400000000\\00N222422242222222224062242222222422226264222422222222222222442804222422222222222222222222220<4<0204260002444020204224422"),TI=Ai("ɠ222222222222222222222222222222222222222222222222222222222222˕4222226>6ʰ22ʷʺʷʺʷ42ʴ2ʓ22>621422ɶ222ɹɼɷɺɷɺ22ɱ42222ɨ2ɧ26622ɘɓ244ƸƵ222]d24242ǖǓƚÄȫ2263ȨȥȨ2222222ǣ222222222222222222ǂƽ2ƾƵ2222222422222ƜƑ22222222222222222222144Ŧţ22Ţş222222222222222222222ĸ2ı68ĦģĦɡŰ4Ġ«®ĝ822ĔđĔ2ē2222622"),OI=Ai("02222222222222222222222222222222222222222222222222222222222222222202021422222222CF2200GJ021042222WZ222IL0ad2c10h2222U00X202[^2w0000120zy|}22
:22z22222222222G000qOVI00000{2<40000@00000G¦§000ª00000000000000021K¬«00®000000000000000000000222HGH_1¸222½2¾2222ÇÊ000°2±"),fC=new Int32Array(987),hC=new Int32Array(987),pC=new Int32Array(987);let iy="";const sy=new Int32Array(1022);{const e=new Map;let n=0,a=0;for(let o=0;o<nw.length;o++)for(const s of CI[OI[o]]){let u=e.get(s);u===void 0&&(u=n++,e.set(s,u),sy[u*2]=iy.length,sy[u*2+1]=s.length,iy+=s),fC[a]=nw[o],hC[a]=TI[o],pC[a]=u,a++}}const MI=Ai("0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p"),AI=dp(go("1::24444432:442:44:44>222222:44:4421322511111311111114")),DI=Ai("24A;33N=C@H4A;33N=C@<27;83:;8393NQ:3NQʰ222ˉºŴŽ2R2=18cƴÅŇ=cĞÛC1ƈǝȈ:ħ25=11D3A@4=<1;1DEr25;11B3?<6;:371BCn9@7=<8192>2E121@9@EHE@9>2T25511<398454131<=V25511<398454131<=ƧNž2Đå242L222290000f22500ɛ000ǘ222"),NI=go("ij"),jI=go(""),II=go("1"),kI="* ** after backdrop before details-content file first-letter first-line marker placeholder selection";var PI={GROUP_COUNT:pI,customValidatorNames:gI,edgeStart:ss,labelStart:mI,labelText:yI,edgeTarget:vI,nodeGroup:bI,nodeVlist:EI,vlistPat:xI,vlistOps:SI,vlistRef:wI,vlistGroup:RI,litAnchor:fC,litGroup:hC,litPool:pC,poolOffsets:sy,poolText:iy,adjGid:MI,adjStart:AI,adjTgt:DI,patGid:NI,patTgt:jI,postfixLookupGroups:II,orderSensitiveModifiers:kI};const LI="line"in new Error,ao=-1,is=-1,A0=(e,n,a)=>{let o=2166136261;for(let s=n;s<a;s++)o=Math.imul(o^e.charCodeAt(s),16777619);return o},Gf=(e,n,a)=>{const o=a-n;let s=Math.imul(o,2654435761)^e.charCodeAt(n);if(o>3){const u=o>>2,c=o>>1;s=Math.imul(s^e.charCodeAt(n+1)<<8^e.charCodeAt(n+2)<<16^e.charCodeAt(n+u),2246822507),s=Math.imul(s^e.charCodeAt(n+c)<<8^e.charCodeAt(n+c+u)<<16^e.charCodeAt(a-3),3266489909),s^=e.charCodeAt(a-2)<<8^e.charCodeAt(a-1)<<16;for(let d=n+3,p=a-4;d<n+8&&d<p;d++,p--)s=Math.imul(s^e.charCodeAt(d)^e.charCodeAt(p)<<8,16777619)}return s^s>>>15|0},zI=(e,n,a={})=>{const{GROUP_COUNT:o,edgeStart:s,labelStart:u,labelText:c,edgeTarget:d,nodeGroup:p,nodeVlist:g,vlistPat:y,vlistOps:h,vlistRef:b,vlistGroup:S,litAnchor:w,litGroup:C,litPool:R,poolOffsets:T,poolText:O,adjGid:M,adjStart:A,adjTgt:N,patGid:P,patTgt:I,postfixLookupGroups:D,customValidatorNames:z,orderSensitiveModifiers:F}=e,G=new Int32Array(o).fill(-1);for(let he=0;he<M.length;he++)G[M[he]]=he;let J=0;for(let he=0;he+1<A.length;he++){const Ae=A[he+1]-A[he];Ae>J&&(J=Ae)}let Y=32;for(;Y<2*(1+J+P.length);)Y<<=1;const U=new Int32Array(b.length+1);for(let he=0;he<b.length;he++)U[he+1]=U[he]+y[b[he]+1]-y[b[he]];const H=new Uint8Array(o);for(let he=0;he<D.length;he++)H[D[he]]=1;const L=s.length-1,$=new Uint8Array(L);let K=0,V=!0;for(let he=0;he<w.length;he++){$[w[he]]=1;const Ae=T[R[he]*2+1];Ae>K&&(K=Ae);const Se=O.charCodeAt(T[R[he]*2]);(Se===91||Se===40)&&(V=!1)}let X=1;for(;X<w.length*2;)X<<=1;const ee=new Int32Array(X).fill(-1);for(let he=0;he<w.length;he++){const Ae=T[R[he]*2];let Se=(A0(O,Ae,Ae+T[R[he]*2+1])^Math.imul(w[he],2654435761)|0)&X-1;for(;ee[Se]!==-1;)Se=Se+1&X-1;ee[Se]=he}const q=(he,Ae,Se,nt)=>{let Ct=(A0(Ae,Se,nt)^Math.imul(he,2654435761)|0)&X-1;const wt=nt-Se;for(;;){const zt=ee[Ct];if(zt===-1)return-1;if(w[zt]===he&&T[R[zt]*2+1]===wt){const vn=T[R[zt]*2];let fn=!0;for(let mt=0;mt<wt;mt++)if(O.charCodeAt(vn+mt)!==Ae.charCodeAt(Se+mt)){fn=!1;break}if(fn)return C[zt]}Ct=Ct+1&X-1}},se=a.cacheSize??8192,j=a.prefix??e.prefix??"",B=j===""?"":j+":",W=B.length,re=(z??[]).map(he=>{throw new Error("cn: missing validator "+he)}),Re=/\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$/,le=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,me=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ge=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;let ce=0,Te=-1,ve=-1,Pe=-1,Me=-1;const Le=he=>he>=97&&he<=122||he>=65&&he<=90||he>=48&&he<=57||he===95,Fe=he=>/\s/.test(String.fromCharCode(he)),Oe=(he,Ae,Se)=>{if(ce=0,Te=-1,Se-Ae<3)return;const nt=he.charCodeAt(Ae),Ct=he.charCodeAt(Se-1);if(nt===91&&Ct===93)ce=1;else if(nt===40&&Ct===41)ce=2;else return;Pe=Ae+1,Me=Se-1;let wt=Ae+1;if(Le(he.charCodeAt(wt))){for(wt++;wt<Se-1;){const zt=he.charCodeAt(wt);if(!Le(zt)&&zt!==45)break;wt++}wt<Se-2&&he.charCodeAt(wt)===58&&(Te=Ae+1,ve=wt,Pe=wt+1)}},He=(he,Ae,Se,nt)=>{if(Se-Ae!==nt.length)return!1;for(let Ct=0;Ct<nt.length;Ct++)if(he.charCodeAt(Ae+Ct)!==nt.charCodeAt(Ct))return!1;return!0},be=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Ue=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ze=he=>!!he&&!Number.isNaN(Number(he)),it=(he,Ae,Se)=>{if(Se-Ae<11||!He(he,Ae,Ae+10,"@container"))return!1;if(he.charCodeAt(Ae+10)===47)return Se-Ae>=12;const nt=he.charCodeAt(Ae+11);return nt===115&&Se-Ae>=17&&He(he,Ae+10,Ae+16,"-size/")||nt===110&&Se-Ae>=19&&He(he,Ae+10,Ae+18,"-normal/")},de=[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2],we="length|number|number weight|family-name|position percentage|length size bg-size|image url|shadow|length|family-name|position percentage|length size bg-size|image url|shadow|number weight".split("|").map(he=>he.split(" ")),Ke=[2,3,1,0,0,0,4,5,0,0,0,0,0,1,1],De=(he,Ae,Se,nt)=>{if(he>=10){if(he>=25)return re[he-25](Ae.slice(Se,nt));const Ct=he-10;if(ce!==de[Ct])return!1;if(Te>=0){for(const wt of we[Ct])if(He(Ae,Te,ve,wt))return!0;return!1}switch(Ke[Ct]){case 0:return!1;case 1:return!0;case 2:{const wt=Ae.slice(Pe,Me);return Re.test(wt)&&!le.test(wt)}case 3:return Ze(Ae.slice(Pe,Me));case 4:return ge.test(Ae.slice(Pe,Me));default:return me.test(Ae.slice(Pe,Me))}}switch(he){case 0:return!0;case 1:return ce===0;case 2:return ce===1;case 3:return ce===2;case 4:return be.test(Ae.slice(Se,nt));case 5:return Ze(Ae.slice(Se,nt));case 6:{const Ct=Ae.slice(Se,nt);return!!Ct&&Number.isInteger(Number(Ct))}case 7:return nt>Se&&Ae.charCodeAt(nt-1)===37&&Ze(Ae.slice(Se,nt-1));case 8:return Ue.test(Ae.slice(Se,nt));default:return it(Ae,Se,nt)}},je=new Set(typeof F=="string"?F.split(" "):F),yt=(he,Ae,Se,nt,Ct,wt)=>{const zt=A0(Ae,Se,nt)^(Ct?2654435769:0)|0;let vn=he.get(zt);if(vn!==void 0)e:for(let At=0;At<vn.length;At++){const an=vn[At];if(!(an.imp!==Ct||an.k.length!==nt-Se)){for(let pt=0;pt<an.k.length;pt++)if(an.k.charCodeAt(pt)!==Ae.charCodeAt(Se+pt))continue e;return an.id}}else he.set(zt,vn=[]);const fn=Ae.slice(Se,nt),mt=wt(fn);return vn.push({k:fn,imp:Ct,id:mt}),mt};let ut=new Map,ht=new Map,Ot=2;const Dt=4096,Wt=(he,Ae)=>{const Se=[];let nt=0,Ct=0,wt=0;for(let mt=0;mt<he.length;mt++){const At=he.charCodeAt(mt);nt===0&&Ct===0&&At===58?(Se.push(he.slice(wt,mt)),wt=mt+1):At===91?nt++:At===93?nt--:At===40?Ct++:At===41&&Ct--}Se.push(he.slice(wt));let zt=Se[0];if(Se.length>1){const mt=[];let At=[];for(const an of Se)an.charCodeAt(0)===91||je.has(an)?(At.length&&(mt.push(...At.sort()),At=[]),mt.push(an)):At.push(an);At.length&&mt.push(...At.sort()),zt=mt.join(":")}const vn=Ae?zt+" !":zt;let fn=ht.get(vn);return fn===void 0&&ht.set(vn,fn=Ot++),fn};let rn=new Map,en=o;const We=o+4096,xt=()=>en++,$t=2097152,ft=8192,vt=new Int32Array(ft),gt=new Array(ft).fill(null),Lt=new Int32Array(ft),un=new Int32Array(ft),Ie=new Uint8Array(ft);let ot=0;const ke=(he,Ae,Se,nt,Ct,wt,zt,vn)=>{let fn=he;if(gt[he]!==null)if(gt[he|1]===null)fn=he|1;else if((ot++&3)===0)fn=he|ot>>2&1;else return;gt[fn]=Ae.slice(Se,nt),vt[fn]=Ct,Lt[fn]=wt,un[fn]=zt,Ie[fn]=vn},ze=()=>gt.fill(null);let Ge=256,et=[new Int32Array(Ge),new Int32Array(Ge),new Int32Array(Ge),new Int32Array(Ge)],[Et,_,Z,ne]=et,ye=new Uint8Array(Ge),xe=new Uint8Array(Ge);const qe=()=>{Ge*=2,et=et.map(Ae=>{const Se=new Int32Array(Ge);return Se.set(Ae),Se}),[Et,_,Z,ne]=et;const he=new Uint8Array(Ge);he.set(ye),ye=he,xe=new Uint8Array(Ge)};let Ve=64,Xe=new Int32Array(Ve),$e=new Int32Array(Ve);const st=new Int32Array(o);let tt=2048,St=21,ct=new Float64Array(tt),Bt=new Int32Array(tt),Ht=0;const On=(he,Ae)=>{if(he===0&&Ae<o)return st[Ae]===Ht?1:(st[Ae]=Ht,0);const Se=he*2097152+Ae+1;let nt=Math.imul(Se,2654435761)>>>St;for(;Bt[nt]===Ht;){if(ct[nt]===Se)return 1;nt=nt+1&tt-1}return ct[nt]=Se,Bt[nt]=Ht,0},Vt=(he,Ae,Se,nt,Ct)=>{if(Se-Ae>=2&&he.charCodeAt(Ae)===91&&he.charCodeAt(Se-1)===93){let wt=-1;for(let zt=Ae+1;zt<Se-1;zt++)if(he.charCodeAt(zt)===58){wt=zt;break}return wt===-1||wt===Ae+1?ao:yt(rn,he,Ae+1,wt,0,xt)}if(nt>=0&&p[nt]>=0)return p[nt];for(let wt=Ct-1;wt>=0;wt--){const zt=$e[wt];if(zt>Se)continue;const vn=Xe[wt],fn=Se-zt;if($[vn]===1&&fn>0&&fn<=K){const Ln=he.charCodeAt(zt);if(V===!1||Ln!==91&&Ln!==40){const Jr=q(vn,he,zt,Se);if(Jr>=0)return Jr}}const mt=g[vn];if(mt<0)continue;const At=b[mt],an=y[At],pt=y[At+1];if(an===pt)continue;Oe(he,zt,Se);const nr=U[mt]-an;for(let Ln=an;Ln<pt;Ln++)if(De(h[Ln],he,zt,Se))return S[nr+Ln]}return ao},Ut=he=>{const Ae=he.length;let Se=0,nt=0,Ct=!1;(Ot>Dt||ut.size>Dt)&&(ut=new Map,ht=new Map,Ot=2,ze()),en>We&&(rn=new Map,en=o,ze());let wt=0;for(;wt<Ae;){let mt=he.charCodeAt(wt);if(mt===32||mt>=9&&mt<=13||mt>=160&&Fe(mt)){mt!==32&&(Ct=!0),wt++;continue}const At=wt;let an=0;for(;wt<Ae;){if(mt=he.charCodeAt(wt),mt<=32){if(mt===32)break;if(mt>=9&&mt<=13){Ct=!0;break}}else if(mt>=160&&Fe(mt)){Ct=!0;break}an=Math.imul(an^mt,16777619),wt++}const pt=wt,nr=pt-At;Se===Ge&&qe();const Ln=Se++;Et[Ln]=At,_[Ln]=pt,nt+=nr,an^=Math.imul(nr,2654435761);const Jr=an^an>>>15|0,Gn=Jr&8190;{let tn=-1;if(vt[Gn]===Jr&>[Gn]!==null&>[Gn].length===nr?tn=Gn:vt[Gn|1]===Jr&>[Gn|1]!==null&>[Gn|1].length===nr&&(tn=Gn|1),tn>=0){const or=gt[tn];let ga=!0;for(let ta=0;ta<nr;ta++)if(or.charCodeAt(ta)!==he.charCodeAt(At+ta)){ga=!1;break}if(ga){Z[Ln]=Lt[tn],ne[Ln]=un[tn],ye[Ln]=Ie[tn];continue}}}let $n=At;if(W!==0){if(pt-At<=W||!he.startsWith(B,At)){Z[Ln]=ao,ke(Gn,he,At,pt,Jr,ao,0,0);continue}$n=At+W}let Ms=0,Zl=0,bo=-1,As=-1;for(let tn=$n;tn<pt;tn++){const or=he.charCodeAt(tn);if(Ms===0&&Zl===0){if(or===58){bo=tn;continue}if(or===47){As=tn;continue}}or===91?Ms++:or===93?Ms--:or===40?Zl++:or===41&&Zl--}const Jc=bo>=$n?bo+1:$n;let Nn=Jc,wr=pt,Yo=!1,Ds=0;wr>Nn&&he.charCodeAt(wr-1)===33?(Yo=!0,wr--):wr>Nn&&he.charCodeAt(Nn)===33&&(Yo=!0,Nn++,Ds=1);let Fr=-1;As>Jc&&(Fr=As+Ds,Fr>=wr&&(Fr=-1));let Ns=Nn;wr-Nn>1&&he.charCodeAt(Nn)===45&&(Ns=Nn+1);let Wr=0,Mr=0,Ko=0,Jl=-1,ea=0;(g[0]>=0||$[0]===1)&&(Xe[0]=0,$e[0]=Ns,ea=1);let ki=is,Wl=0;for(let tn=Ns;tn<wr;tn++)if(tn===Fr&&(ki=Mr<Ko?is:Wr,Wl=ea),Wr!==is){const or=he.charCodeAt(tn);let ga=-1;if(Mr<Ko)c.charCodeAt(Mr)===or?(Mr++,Mr===Ko&&(ga=Wr=Jl)):Wr=is;else{const ta=s[Wr],zi=s[Wr+1];let xo=is;for(let pr=ta;pr<zi;pr++){const _i=u[pr];if(c.charCodeAt(_i)===or){u[pr+1]-_i===1?ga=xo=d[pr]:(Mr=_i+1,Ko=u[pr+1],Jl=d[pr],xo=Wr);break}}Wr=xo}if(ga>=0&&(g[ga]>=0||$[ga]===1)&&tn+1<wr&&he.charCodeAt(tn+1)===45){if(ea===Ve){Ve*=2;const ta=new Int32Array(Ve);ta.set(Xe),Xe=ta;const zi=new Int32Array(Ve);zi.set($e),$e=zi}Xe[ea]=ga,$e[ea]=tn+2,ea++}}Fr===wr&&(ki=Mr<Ko?is:Wr,Wl=ea);const eu=Mr<Ko?is:Wr;let hr,Ar=!1;if(Fr>=0)if(Ar=!0,hr=Vt(he,Nn,Fr,ki,Wl),hr!==ao&&hr<o&&H[hr]){const tn=Vt(he,Nn,wr,eu,ea);tn!==ao&&tn!==hr&&(hr=tn,Ar=!1)}else hr===ao&&(hr=Vt(he,Nn,wr,eu,ea),Ar=!1);else hr=Vt(he,Nn,wr,eu,ea);let Pi=0,Li=0;hr===ao?Z[Ln]=ao:(Li=Ar?1:0,Pi=$n>=bo?Yo?1:0:yt(ut,he,$n,bo,Yo?1:0,tn=>Wt(tn,Yo)),Z[Ln]=hr,ye[Ln]=Li,ne[Ln]=Pi),ke(Gn,he,At,pt,Jr,hr,Pi,Li)}if(Se===0)return"";if(Se===1)return Et[0]===0&&_[0]===Ae?he:he.slice(Et[0],_[0]);if(Se*Y>tt){for(;Se*Y>tt;)tt<<=1,St--;ct=new Float64Array(tt),Bt=new Int32Array(tt)}if(Ot>=$t||en>=$t)throw new Error("cn: too many distinct classes in one merge");Ht=Ht+1|0,Ht===0&&(st.fill(0),Bt.fill(0),Ht=1);let zt=!1;for(let mt=Se-1;mt>=0;mt--){const At=Z[mt];if(At===ao){xe[mt]=1;continue}const an=ne[mt];if(On(an,At)===1){xe[mt]=0,zt=!0;continue}if(xe[mt]=1,At<o){const pt=G[At];if(pt>=0)for(let nr=A[pt];nr<A[pt+1];nr++)On(an,N[nr]);if(ye[mt]&1)for(let nr=0;nr<P.length;nr++)P[nr]===At&&On(an,I[nr])}}if(!zt&&!Ct&&Ae===nt+Se-1)return he;let vn="",fn=0;for(;fn<Se;){if(!xe[fn]){fn++;continue}const mt=Et[fn];let At=_[fn],an=fn+1;for(;an<Se&&xe[an]&&Et[an]===At+1&&he.charCodeAt(At)===32;)At=_[an],an++;vn.length>0&&(vn+=" "),vn+=he.slice(mt,At),fn=an}return vn},En=16384,Cn=new Int32Array(En*2);let Qr=0,cn=1,dn=Object.create(null),Mn=Object.create(null),jn=new Map,vo=new Map,Or=0,Ia=0;const Zr=()=>{Qr^=En,cn=cn+1|0,Ia=0},pa=he=>{let Ae=dn[he];if(Ae!==void 0)return Ae;const Se=Gf(he,0,he.length),nt=(Se&16383)+Qr,Ct=Cn[nt]===(Se^cn)||Cn[nt^En]===(Se^cn-1);return Ct&&(Ae=Mn[he],Ae!==void 0)?(dn[he]=Ae,Ae):(Ae=Ut(he),Ct?(dn[he]=Ae,++Or>se&&(Or=0,Mn=dn,dn=Object.create(null),Zr())):(Cn[nt]=Se^cn,++Ia>En&&Zr()),Ae)},Pt=he=>{let Ae=jn.get(he);if(Ae!==void 0)return Ae;const Se=Gf(he,0,he.length),nt=(Se&16383)+Qr,Ct=Cn[nt]===(Se^cn)||Cn[nt^En]===(Se^cn-1);return Ct&&(Ae=vo.get(he),Ae!==void 0)?(jn.set(he,Ae),Ae):(Ae=Ut(he),Ct?(jn.set(he,Ae),++Or>se&&(Or=0,vo=jn,jn=new Map,Zr())):(Cn[nt]=Se^cn,++Ia>En&&Zr()),Ae)},Yn=he=>{const Ae=Gf(he,0,he.length),Se=(Ae&16383)+Qr;return Cn[Se]===(Ae^cn)||Cn[Se^En]===(Ae^cn-1)?!0:(Cn[Se]=Ae^cn,++Ia>En&&Zr(),!1)},Fn=se===0?Ut:LI?he=>{const Ae=jn.get(he);return Ae!==void 0?Ae:Pt(he)}:pa;return{merge:function(){return arguments.length===1&&typeof arguments[0]=="string"?Fn(arguments[0]):Fn(HI.apply(null,arguments))},mergeString:Fn,seenBefore:se===0?()=>!1:Yn,mergeUncached:Ut}},gh=(e,n)=>{if(!e)return"";if(typeof e=="string")return e;let a="";if(typeof e.length=="number"&&(!n||Array.isArray(e))){const o=e;for(let s=0;s<o.length;s++){const u=o[s];if(!u)continue;const c=typeof u=="string"?u:gh(u,n);c&&(a&&(a+=" "),a+=c)}return a}if(n){if(typeof e=="number")return""+e;if(typeof e=="object")for(const o in e)e[o]&&(a&&(a+=" "),a+=o)}return a},_I=(e,n)=>{let a="";for(let o=0;o<e.length;o++){const s=e[o];if(!s)continue;const u=typeof s=="string"?s:gh(s,n);u&&(a&&(a+=" "),a+=u)}return a},HI=function(){return _I(arguments,!1)},UI=256,rw=16,FI=1024,D0=4096,BI=(e,n)=>{const a=n===void 0?()=>!0:n.seenBefore,o=n===void 0?e:n.mergeUncached;let s=new Map,u=new Map,c=0,d=null,p=null,g=[],y=[],h=0;const b=(T,O,M)=>{p===null&&(p=new Array(D0).fill(""),g=new Array(D0).fill(""),y=new Array(D0).fill(""));const A=Gf(T,0,T.length)&4094;if(p[A]===T&&g[A]===O)return y[A];if(p[A|1]===T&&g[A|1]===O)return y[A|1];const N=e(M?O+" "+T:T),P=p[A]===""?A:A|(p[A|1]===""?1:h++&1);return p[P]=T,g[P]=O,y[P]=N,N},S=(T,O,M,A)=>{let N=0;if(O){if(O!==T.a0)return!1;N=1}if(M){if(M!==(N===0?T.a0:T.a1))return!1;N++}if(A){if(A!==(N===0?T.a0:N===1?T.a1:T.a2))return!1;N++}return N===T.t},w=(T,O)=>{const M=T.a;let A=0;for(let N=0;N<O.length;N++){const P=O[N];if(P){if(P!==M[A])return!1;A++}}return A===T.t},C=(T,O)=>{const M=T.length,A=d===null?null:d.n;if(!O){if(A!==null&&w(A,T))return d=A,A.r;if(d!==null&&d!==A&&w(d,T))return d.r}let N="",P=-1,I=0,D=!1;for(let G=0;G<M;G++){let J=T[G];if(J){if(typeof J!="string"){if(J=T[G]=gh(J,!0),!J)continue;D=!0}P<0&&(N=J,P=G),I++}}if(I===0)return"";if(I===1)return e(N);if(D){if(A!==null&&w(A,T))return d=A,A.r;if(d!==null&&d!==A&&w(d,T))return d.r}let z=s.get(N);z===void 0&&(z=u.get(N),z!==void 0&&s.set(N,z));let F=null;if(z!==void 0){if(z.skip>0){z.skip--,d=null;let J=N;for(let Y=P+1;Y<M;Y++){const U=T[Y];U&&(J+=" "+U)}return b(J,"",!1)}const G=z.e;e:for(let J=0;J<G.length;J++){const Y=G[J];if(Y.t!==I)continue;const U=Y.a;let H=1;for(let L=P+1;L<M;L++){const $=T[L];if($&&$!==U[H++])continue e}F=Y;break}F!==null&&(z.miss=0)}if(F===null){let G=N;const J=[N];for(let U=P+1;U<M;U++){const H=T[U];H&&(G+=" "+H,J.push(H))}if(!a(G))return o(G);F={r:e(G),t:J.length,a0:J[0],a1:J[1],a2:J[2]??"",a:J,n:null},z===void 0?s.set(N,z={e:[],miss:0,skip:0,at:0}):++z.miss>rw&&(z.miss=rw,z.skip=FI,z.e.length=0,z.at=0);const Y=z.e;Y.length<UI?Y.push(F):(Y[z.at]=F,z.at=z.at+1&255),++c>1e3&&(c=0,u=s,s=new Map)}return d!==null&&d!==F&&(d.n=F),d=F,F.r},R=T=>Array.isArray(T)?C(T.slice(),!1):e(gh(T,!0));return function(T,O,M){const A=arguments.length;if((A|1)===3){const I=d;if(I!==null){const D=I.n;if(D!==null&&S(D,T,O,M))return d=D,D.r;if(I!==D&&S(I,T,O,M))return I.r}if(A===2&&typeof O=="string"&&O!==""){const D=s.get(T);if(D!==void 0&&D.skip>0)return D.skip--,d=null,b(O,T,!0)}return C([T,O,M],!0)}if(A===1)return typeof T=="string"?e(T):R(T);const N=d;if(N!==null){const I=N.n;if(I!==null){const D=I.a;let z=0,F=!0;for(let G=0;G<A;G++){const J=arguments[G];if(J){if(J!==D[z]){F=!1;break}z++}}if(F&&z===I.t)return d=I,I.r}if(N!==I){const D=N.a;let z=0,F=!0;for(let G=0;G<A;G++){const J=arguments[G];if(J){if(J!==D[z]){F=!1;break}z++}}if(F&&z===N.t)return N.r}}const P=[];for(let I=0;I<A;I++)P.push(arguments[I]);return C(P,!0)}},aw=zI(PI),Qe=BI(aw.mergeString,aw);function VI({delay:e=0,...n}){return x.jsx(fI,{"data-slot":"tooltip-provider",delay:e,...n})}function mh({...e}){return x.jsx(Vj,{"data-slot":"tooltip",...e})}function yh({...e}){return x.jsx(Gj,{"data-slot":"tooltip-trigger",...e})}function vh({className:e,side:n="top",sideOffset:a=4,align:o="center",alignOffset:s=0,children:u,...c}){return x.jsx(Qj,{children:x.jsx(uI,{align:o,alignOffset:s,side:n,sideOffset:a,className:"isolate z-50",children:x.jsxs(cI,{"data-slot":"tooltip-content",className:Qe("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...c,children:[u,x.jsx(dI,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"})]})})})}var qI=(e,n,a,o,s,u,c,d)=>{let p=document.documentElement,g=["light","dark"];function y(S){(Array.isArray(e)?e:[e]).forEach(w=>{let C=w==="class",R=C&&u?s.map(T=>u[T]||T):s;C?(p.classList.remove(...R),p.classList.add(u&&u[S]?u[S]:S)):p.setAttribute(w,S)}),h(S)}function h(S){d&&g.includes(S)&&(p.style.colorScheme=S)}function b(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(o)y(o);else try{let S=localStorage.getItem(n)||a,w=c&&S==="system"?b():S;y(w)}catch{}},YI=v.createContext(void 0),KI={setTheme:e=>{},themes:[]},GI=()=>{var e;return(e=v.useContext(YI))!=null?e:KI};v.memo(({forcedTheme:e,storageKey:n,attribute:a,enableSystem:o,enableColorScheme:s,defaultTheme:u,value:c,themes:d,nonce:p,scriptProps:g})=>{let y=JSON.stringify([a,n,u,e,d,c,o,s]).slice(1,-1);return v.createElement("script",{...g,suppressHydrationWarning:!0,nonce:typeof window>"u"?p:"",dangerouslySetInnerHTML:{__html:`(${qI.toString()})(${y})`}})});function $I(e){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",n.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}const XI=e=>{switch(e){case"success":return JI;case"info":return ek;case"warning":return WI;case"error":return tk;default:return null}},QI=Array(12).fill(0),ZI=({visible:e,className:n})=>Ne.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":e},Ne.createElement("div",{className:"sonner-spinner"},QI.map((a,o)=>Ne.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${o}`})))),JI=Ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Ne.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"})),WI=Ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Ne.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"})),ek=Ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Ne.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"})),tk=Ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Ne.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"})),nk=Ne.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","aria-hidden":"true"},Ne.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),Ne.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),rk=()=>{const[e,n]=Ne.useState(document.hidden);return Ne.useEffect(()=>{const a=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",a),()=>document.removeEventListener("visibilitychange",a)},[]),e};let ak=1;const ok=100,ow=e=>{var n;return typeof e?.id=="number"||(e==null||(n=e.id)==null?void 0:n.length)>0?e.id:ak++};class ik{constructor(){this.subscribe=n=>(this.subscribers.push(n),this.getActiveToasts().forEach(a=>n(a)),()=>{const a=this.subscribers.indexOf(n);this.subscribers.splice(a,1)}),this.publish=n=>{this.subscribers.forEach(a=>a(n))},this.addToast=n=>{this.publish(n),this.toasts=[...this.toasts,n],this.trimHistory()},this.trimHistory=()=>{let n=this.toasts.length-ok;n<=0||(this.toasts=this.toasts.filter(a=>n>0&&this.dismissedToasts.has(a.id)?(this.dismissedToasts.delete(a.id),n--,!1):!0))},this.create=n=>{const{message:a,...o}=n,s=ow(n),u=this.pendingDismissals.get(s);u!==void 0&&(cancelAnimationFrame(u),this.pendingDismissals.delete(s),this.dismissedToasts.delete(s));const c=this.dismissedToasts.has(s),d=n.dismissible===void 0?!0:n.dismissible;return c&&(this.dismissedToasts.delete(s),this.toasts=this.toasts.filter(g=>g.id!==s)),(c?void 0:this.toasts.find(g=>g.id===s))?this.toasts=this.toasts.map(g=>g.id===s?(this.publish({...g,...n,id:s,title:a}),{...g,...n,id:s,dismissible:d,title:a}):g):this.addToast({title:a,...o,dismissible:d,id:s}),s},this.dismiss=n=>{if(n==null)return this.getActiveToasts().forEach(o=>{this.dismissedToasts.add(o.id),this.subscribers.forEach(s=>s({id:o.id,dismiss:!0}))}),n;this.dismissedToasts.add(n);const a=this.pendingDismissals.get(n);return a!==void 0&&cancelAnimationFrame(a),this.pendingDismissals.set(n,requestAnimationFrame(()=>{this.pendingDismissals.delete(n),this.subscribers.forEach(o=>o({id:n,dismiss:!0}))})),n},this.message=(n,a)=>this.create({...a,message:n,type:void 0}),this.error=(n,a)=>this.create({...a,message:n,type:"error"}),this.success=(n,a)=>this.create({...a,type:"success",message:n}),this.info=(n,a)=>this.create({...a,type:"info",message:n}),this.warning=(n,a)=>this.create({...a,type:"warning",message:n}),this.loading=(n,a)=>this.create({...a,type:"loading",message:n}),this.promise=(n,a)=>{if(!a)return;let o;a.loading!==void 0&&(o=this.create({...a,promise:n,type:"loading",message:a.loading,description:typeof a.description!="function"?a.description:void 0}));const s=Promise.resolve(n instanceof Function?n():n);let u=o!==void 0,c;const d=s.then(async g=>{if(c=["resolve",g],Ne.isValidElement(g))u=!1,this.create({id:o,type:"default",message:g});else if(lk(g)&&!g.ok){u=!1;const h=typeof a.error=="function"?await a.error(`HTTP error! status: ${g.status}`):a.error,b=typeof a.description=="function"?await a.description(`HTTP error! status: ${g.status}`):a.description,w=typeof h=="object"&&!Ne.isValidElement(h)?h:{message:h};this.create({id:o,type:"error",description:b,...w})}else if(g instanceof Error){u=!1;const h=typeof a.error=="function"?await a.error(g):a.error,b=typeof a.description=="function"?await a.description(g):a.description,w=typeof h=="object"&&!Ne.isValidElement(h)?h:{message:h};this.create({id:o,type:"error",description:b,...w})}else if(a.success!==void 0){u=!1;const h=typeof a.success=="function"?await a.success(g):a.success,b=typeof a.description=="function"?await a.description(g):a.description,w=typeof h=="object"&&!Ne.isValidElement(h)?h:{message:h};this.create({id:o,type:"success",description:b,...w})}}).catch(async g=>{if(c=["reject",g],a.error!==void 0){u=!1;const y=typeof a.error=="function"?await a.error(g):a.error,h=typeof a.description=="function"?await a.description(g):a.description,S=typeof y=="object"&&!Ne.isValidElement(y)?y:{message:y};this.create({id:o,type:"error",description:h,...S})}}).finally(()=>{u&&(this.dismiss(o),o=void 0),a.finally==null||a.finally.call(a)}),p=()=>new Promise((g,y)=>d.then(()=>c[0]==="reject"?y(c[1]):g(c[1])).catch(y));return typeof o!="string"&&typeof o!="number"?{unwrap:p}:Object.assign(o,{unwrap:p})},this.custom=(n,a)=>{const o=ow(a);return this.create({...a,jsx:n(o),id:o,type:void 0}),o},this.getActiveToasts=()=>this.toasts.filter(n=>!this.dismissedToasts.has(n.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}}const Gr=new ik,sk=(e,n)=>Gr.message(e,n),lk=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",uk=sk,ck=()=>Gr.toasts,dk=()=>Gr.getActiveToasts(),_n=Object.assign(uk,{success:Gr.success,info:Gr.info,warning:Gr.warning,error:Gr.error,custom:Gr.custom,message:Gr.message,promise:Gr.promise,dismiss:Gr.dismiss,loading:Gr.loading},{getHistory:ck,getToasts:dk});$I("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Of(e){return e.label!==void 0}const fk=3,hk="24px",pk="16px",iw=4e3,gk=356,mk=14,yk=45,vk=200;function oo(...e){return e.filter(Boolean).join(" ")}function bk(e){const[n,a]=e.split("-"),o=[];return n&&o.push(n),a&&o.push(a),o}const xk=e=>{var n,a,o,s,u,c,d,p,g;const{invert:y,toast:h,unstyled:b,interacting:S,setHeights:w,visibleToasts:C,heights:R,index:T,toasts:O,expanded:M,removeToast:A,defaultRichColors:N,closeButton:P,style:I,cancelButtonStyle:D,actionButtonStyle:z,className:F="",descriptionClassName:G="",duration:J,position:Y,gap:U,expandByDefault:H,classNames:L,icons:$,closeButtonAriaLabel:K="Close toast"}=e,[V,X]=Ne.useState(null),[ee,q]=Ne.useState(null),[se,j]=Ne.useState(!1),[B,W]=Ne.useState(!1),[re,Re]=Ne.useState(!1),[le,me]=Ne.useState(!1),[ge,ce]=Ne.useState(!1),[Te,ve]=Ne.useState(0),[Pe,Me]=Ne.useState(0),Le=Ne.useRef(h.duration||J||iw),Fe=Ne.useRef(null),Oe=Ne.useRef(null),He=T===0,be=T+1<=C,Ue=h.type,Ze=Ue??"default",it=h.dismissible!==!1,de=h.className||"",we=h.descriptionClassName||"",Ke=Ne.useMemo(()=>R.findIndex(Ie=>Ie.toastId===h.id)||0,[R,h.id]),De=Ne.useMemo(()=>{var Ie;return(Ie=h.closeButton)!=null?Ie:P},[h.closeButton,P]),je=Ne.useMemo(()=>h.duration||J||iw,[h.duration,J]),yt=Ne.useRef(0),ut=Ne.useRef(0),ht=Ne.useRef(0),Ot=Ne.useRef(null),[Dt,Wt]=Y.split("-"),rn=Ne.useMemo(()=>R.reduce((Ie,ot,ke)=>ke>=Ke?Ie:Ie+ot.height,0),[R,Ke]),en=rk(),We=Ne.useMemo(()=>{var Ie;return(Ie=e.swipeDirections)!=null?Ie:bk(Y)},[e.swipeDirections,Y]),xt=h.invert||y,$t=Ue==="loading";ut.current=Ne.useMemo(()=>Ke*U+rn,[Ke,rn]),Ne.useEffect(()=>{Le.current=je},[je]),Ne.useEffect(()=>{j(!0)},[]),Ne.useEffect(()=>{const Ie=Oe.current;if(Ie){const ot=Ie.getBoundingClientRect().height;return Me(ot),w(ke=>[{toastId:h.id,height:ot,position:h.position},...ke]),()=>w(ke=>ke.filter(ze=>ze.toastId!==h.id))}},[w,h.id]),Ne.useLayoutEffect(()=>{if(!se)return;const Ie=Oe.current,ot=Ie.style.height;Ie.style.height="auto";const ke=Ie.getBoundingClientRect().height;Ie.style.height=ot,Me(ke),w(ze=>ze.find(et=>et.toastId===h.id)?ze.map(et=>et.toastId===h.id?{...et,height:ke}:et):[{toastId:h.id,height:ke,position:h.position},...ze])},[se,h.title,h.description,w,h.id,h.jsx,h.action,h.cancel]);const ft=Ne.useCallback(()=>{W(!0),ve(ut.current),w(Ie=>Ie.filter(ot=>ot.toastId!==h.id)),setTimeout(()=>{A(h)},vk)},[h,A,w,ut]);Ne.useEffect(()=>{if(h.promise&&Ue==="loading"||h.duration===1/0||h.type==="loading")return;let Ie;return M||S||en?(()=>{if(ht.current<yt.current){const ze=new Date().getTime()-yt.current;Le.current=Le.current-ze}ht.current=new Date().getTime()})():Le.current!==1/0&&(yt.current=new Date().getTime(),Ie=setTimeout(()=>{h.onAutoClose==null||h.onAutoClose.call(h,h),ft()},Le.current)),()=>clearTimeout(Ie)},[M,S,h,Ue,en,ft]),Ne.useEffect(()=>{h.delete&&(ft(),h.onDismiss==null||h.onDismiss.call(h,h))},[ft,h.delete]);function vt(){var Ie;if($?.loading){var ot;return Ne.createElement("div",{className:oo(L?.loader,h==null||(ot=h.classNames)==null?void 0:ot.loader,"sonner-loader"),"data-visible":Ue==="loading"},$.loading)}return Ne.createElement(ZI,{className:oo(L?.loader,h==null||(Ie=h.classNames)==null?void 0:Ie.loader),visible:Ue==="loading"})}const gt=h.icon||$?.[Ue]||XI(Ue);var Lt,un;return Ne.createElement("li",{tabIndex:0,ref:Oe,className:oo(F,de,L?.toast,h==null||(n=h.classNames)==null?void 0:n.toast,L?.[Ze],h==null||(a=h.classNames)==null?void 0:a[Ze]),"data-sonner-toast":"","data-rich-colors":(Lt=h.richColors)!=null?Lt:N,"data-styled":!(h.jsx||h.unstyled||b),"data-mounted":se,"data-promise":!!h.promise,"data-swiped":ge,"data-removed":B,"data-visible":be,"data-y-position":Dt,"data-x-position":Wt,"data-index":T,"data-front":He,"data-swiping":re,"data-dismissible":it,"data-type":Ue,"data-invert":xt,"data-swipe-out":le,"data-swipe-direction":ee,"data-expanded":!!(M||H&&se),"data-testid":h.testId,style:{"--index":T,"--toasts-before":T,"--z-index":O.length-T,"--offset":`${B?Te:ut.current}px`,"--initial-height":H?"auto":`${Pe}px`,...I,...h.style},onDragEnd:()=>{Re(!1),X(null),Ot.current=null},onPointerDown:Ie=>{Ie.button!==2&&($t||!it||(Fe.current=new Date,ve(ut.current),Ie.target.setPointerCapture(Ie.pointerId),Ie.target.tagName!=="BUTTON"&&(Re(!0),Ot.current={x:Ie.clientX,y:Ie.clientY})))},onPointerUp:()=>{var Ie,ot,ke;if(le||!it)return;Ot.current=null;const ze=Number(((Ie=Oe.current)==null?void 0:Ie.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ge=Number(((ot=Oe.current)==null?void 0:ot.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),et=new Date().getTime()-((ke=Fe.current)==null?void 0:ke.getTime()),Et=V==="x"?ze:Ge,_=Math.abs(Et)/et;if((V==="x"?We.includes(ze>0?"right":"left"):We.includes(Ge>0?"bottom":"top"))&&(Math.abs(Et)>=yk||_>.11)){ve(ut.current),h.onDismiss==null||h.onDismiss.call(h,h),q(V==="x"?ze>0?"right":"left":Ge>0?"down":"up"),ft(),me(!0);return}else{var ne,ye;(ne=Oe.current)==null||ne.style.setProperty("--swipe-amount-x","0px"),(ye=Oe.current)==null||ye.style.setProperty("--swipe-amount-y","0px")}ce(!1),Re(!1),X(null)},onPointerMove:Ie=>{var ot,ke,ze;if(!Ot.current||!it||((ot=window.getSelection())==null?void 0:ot.toString().length)>0)return;const et=Ie.clientY-Ot.current.y,Et=Ie.clientX-Ot.current.x;!V&&(Math.abs(Et)>1||Math.abs(et)>1)&&X(Math.abs(Et)>Math.abs(et)?"x":"y");let _={x:0,y:0};const Z=ne=>1/(1.5+Math.abs(ne)/20);if(V==="y"){if(We.includes("top")||We.includes("bottom"))if(We.includes("top")&&et<0||We.includes("bottom")&&et>0)_.y=et;else{const ne=et*Z(et);_.y=Math.abs(ne)<Math.abs(et)?ne:et}}else if(V==="x"&&(We.includes("left")||We.includes("right")))if(We.includes("left")&&Et<0||We.includes("right")&&Et>0)_.x=Et;else{const ne=Et*Z(Et);_.x=Math.abs(ne)<Math.abs(Et)?ne:Et}(Math.abs(_.x)>0||Math.abs(_.y)>0)&&ce(!0),(ke=Oe.current)==null||ke.style.setProperty("--swipe-amount-x",`${_.x}px`),(ze=Oe.current)==null||ze.style.setProperty("--swipe-amount-y",`${_.y}px`)}},De&&!h.jsx&&Ue!=="loading"?Ne.createElement("button",{"aria-label":K,"data-disabled":$t,"data-close-button":!0,onClick:$t||!it?()=>{}:()=>{ft(),h.onDismiss==null||h.onDismiss.call(h,h)},className:oo(L?.closeButton,h==null||(o=h.classNames)==null?void 0:o.closeButton)},(un=$?.close)!=null?un:nk):null,(Ue||h.icon||h.promise)&&h.icon!==null&&($?.[Ue]!==null||h.icon)?Ne.createElement("div",{"data-icon":"",className:oo(L?.icon,h==null||(s=h.classNames)==null?void 0:s.icon)},Ue==="loading"?h.icon||vt():h.promise?vt():null,Ue!=="loading"?gt:null):null,Ne.createElement("div",{"data-content":"",className:oo(L?.content,h==null||(u=h.classNames)==null?void 0:u.content)},Ne.createElement("div",{"data-title":"",className:oo(L?.title,h==null||(c=h.classNames)==null?void 0:c.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?Ne.createElement("div",{"data-description":"",className:oo(G,we,L?.description,h==null||(d=h.classNames)==null?void 0:d.description)},typeof h.description=="function"?h.description():h.description):null),Ne.isValidElement(h.cancel)?h.cancel:h.cancel&&Of(h.cancel)?Ne.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||D,onClick:Ie=>{Of(h.cancel)&&it&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,Ie),ft())},className:oo(L?.cancelButton,h==null||(p=h.classNames)==null?void 0:p.cancelButton)},h.cancel.label):null,Ne.isValidElement(h.action)?h.action:h.action&&Of(h.action)?Ne.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||z,onClick:Ie=>{Of(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,Ie),!Ie.defaultPrevented&&ft())},className:oo(L?.actionButton,h==null||(g=h.classNames)==null?void 0:g.actionButton)},h.action.label):null)};function sw(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function Sk(e,n){const a={};return[e,n].forEach((o,s)=>{const u=s===1,c=u?"--mobile-offset":"--offset",d=u?pk:hk;function p(g){["top","right","bottom","left"].forEach(y=>{a[`${c}-${y}`]=typeof g=="number"?`${g}px`:g})}typeof o=="number"||typeof o=="string"?p(o):typeof o=="object"?["top","right","bottom","left"].forEach(g=>{o[g]===void 0?a[`${c}-${g}`]=d:a[`${c}-${g}`]=typeof o[g]=="number"?`${o[g]}px`:o[g]}):p(d)}),a}const wk=Ne.forwardRef(function(n,a){const{id:o,invert:s,position:u="bottom-right",hotkey:c=["altKey","KeyT"],expand:d,closeButton:p,className:g,offset:y,mobileOffset:h,theme:b="light",richColors:S,duration:w,style:C,visibleToasts:R=fk,toastOptions:T,dir:O=sw(),gap:M=mk,icons:A,customAriaLabel:N,containerAriaLabel:P="Notifications"}=n,[I,D]=Ne.useState([]),z=Ne.useMemo(()=>o?I.filter(j=>j.toasterId===o):I.filter(j=>!j.toasterId),[I,o]),F=Ne.useMemo(()=>Array.from(new Set([u].concat(z.filter(j=>j.position).map(j=>j.position)))),[z,u]),[G,J]=Ne.useState([]),[Y,U]=Ne.useState(!1),[H,L]=Ne.useState(!1),[$,K]=Ne.useState(b!=="system"?b:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),V=Ne.useRef(null),X=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),ee=Ne.useRef(null),q=Ne.useRef(!1),se=Ne.useCallback(j=>{D(B=>{var W;return(W=B.find(re=>re.id===j.id))!=null&&W.delete||Gr.dismiss(j.id),B.filter(({id:re})=>re!==j.id)})},[]);return Ne.useEffect(()=>Gr.subscribe(j=>{if(j.dismiss){requestAnimationFrame(()=>{D(B=>B.map(W=>W.id===j.id?{...W,delete:!0}:W))});return}setTimeout(()=>{u3.flushSync(()=>{D(B=>{const W=B.findIndex(re=>re.id===j.id);return W!==-1?[...B.slice(0,W),{...B[W],...j},...B.slice(W+1)]:[j,...B]})})})}),[]),Ne.useEffect(()=>{if(b!=="system"){K(b);return}if(b==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?K("dark"):K("light")),typeof window>"u")return;const j=window.matchMedia("(prefers-color-scheme: dark)");try{j.addEventListener("change",({matches:B})=>{K(B?"dark":"light")})}catch{j.addListener(({matches:W})=>{try{K(W?"dark":"light")}catch(re){console.error(re)}})}},[b]),Ne.useEffect(()=>{I.length<=1&&U(!1)},[I]),Ne.useEffect(()=>{const j=B=>{var W;if(c.length>0&&c.every(le=>B[le]||B.code===le)){var Re;U(!0),(Re=V.current)==null||Re.focus()}B.code==="Escape"&&(document.activeElement===V.current||(W=V.current)!=null&&W.contains(document.activeElement))&&U(!1)};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},[c]),Ne.useEffect(()=>{if(V.current)return()=>{ee.current&&(ee.current.focus({preventScroll:!0}),ee.current=null,q.current=!1)}},[V.current]),Ne.createElement("section",{ref:a,"aria-label":N??`${P} ${X}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},F.map((j,B)=>{var W;const[re,Re]=j.split("-");return z.length?Ne.createElement("ol",{key:j,dir:O==="auto"?sw():O,tabIndex:-1,ref:V,className:g,"data-sonner-toaster":!0,"data-sonner-theme":$,"data-y-position":re,"data-x-position":Re,style:{"--front-toast-height":`${((W=G[0])==null?void 0:W.height)||0}px`,"--width":`${gk}px`,"--gap":`${M}px`,...C,...Sk(y,h)},onBlur:le=>{q.current&&!le.currentTarget.contains(le.relatedTarget)&&(q.current=!1,ee.current&&(ee.current.focus({preventScroll:!0}),ee.current=null))},onFocus:le=>{le.target instanceof HTMLElement&&le.target.dataset.dismissible==="false"||q.current||(q.current=!0,ee.current=le.relatedTarget)},onMouseEnter:()=>U(!0),onMouseMove:()=>U(!0),onMouseLeave:()=>{H||U(!1)},onDragEnd:()=>U(!1),onPointerDown:le=>{le.target instanceof HTMLElement&&le.target.dataset.dismissible==="false"||L(!0)},onPointerUp:()=>L(!1)},z.filter(le=>!le.position&&B===0||le.position===j).map((le,me)=>{var ge,ce;return Ne.createElement(xk,{key:le.id,icons:A,index:me,toast:le,defaultRichColors:S,duration:(ge=T?.duration)!=null?ge:w,className:T?.className,descriptionClassName:T?.descriptionClassName,invert:s,visibleToasts:R,closeButton:(ce=T?.closeButton)!=null?ce:p,interacting:H,position:j,style:T?.style,unstyled:T?.unstyled,classNames:T?.classNames,cancelButtonStyle:T?.cancelButtonStyle,actionButtonStyle:T?.actionButtonStyle,closeButtonAriaLabel:T?.closeButtonAriaLabel,removeToast:se,toasts:z.filter(Te=>Te.position==le.position),heights:G.filter(Te=>Te.position==le.position),setHeights:J,expandByDefault:d,gap:M,expanded:Y,swipeDirections:n.swipeDirections})})):null}))}),Rk=e=>(e.match(/\d+[xX]\d+|[A-Z]?[a-z]+|[A-Z]|\d+/g)??[]).join("-").toLowerCase();function Ek(e,n,a=[]){if(n==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:Rk(e),size:24,node:n,...a.length>0?{aliases:a}:{}}}const Ck=e=>{let n="",a=!1;for(const o of e){if(o==="-"||o==="_"||o<=" "){a=n.length>0;continue}n.length===0?n+=o.toLowerCase():n+=a?o.toUpperCase():o,a=!1}return n},Tk=e=>{const n=Ck(e);return n.charAt(0).toUpperCase()+n.slice(1)},ly=(...e)=>{const n=new Set;for(const a of e)if(typeof a=="string")for(const o of a.split(/\s+/))o&&n.add(o);return[...n].join(" ")},hl={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};function N0(e){return e!=null}function Ok(e,n={}){const a=n.attributeNames??{},o=b=>a[b]??b,s=e.size??e.width??hl.width,u=e.size??e.height??hl.height,c=e.aliases?.filter(b=>typeof b=="string"&&b.trim()!=="").map(b=>`lucide-${b}`)??[],d=[...e.name?[`lucide-${e.name}`]:[],...c],p=n.className?.split(" ").filter(Boolean)??[],g=n.includeDefaultClasses===!1?ly(...p):ly("lucide",...d,...p);let y=n.strokeWidth??hl["stroke-width"];if(n.absoluteStrokeWidth){const b=Number(y)*Number(e.size??e.width??hl.width)/Number(n.size??n.width??hl.width);Number.isFinite(b)&&(y=b)}return["svg",{...Object.entries(hl).reduce((b,[S,w])=>(b[o(S)]=w,b),{}),..."color"in n&&n.color&&{[o("stroke")]:n.color},..."size"in n&&N0(n.size)&&{[o("width")]:n.size,[o("height")]:n.size},..."width"in n&&N0(n.width)&&{[o("width")]:n.width},..."height"in n&&N0(n.height)&&{[o("height")]:n.height},[o("stroke-width")]:y,...g&&{[o("class")]:g},[o("viewBox")]:`0 0 ${s} ${u}`,...n.hasA11yProp===!1?{[o("aria-hidden")]:"true"}:{},..."attributes"in n&&n.attributes},e.node.map(b=>{const[S,w,C]=b,R=n.nonScalingStroke?{[o("vector-effect")]:"non-scaling-stroke",...w}:w;return C?[S,R,C]:[S,R]})]}function Mk(e,n={}){return Ok(e,{...n,attributeNames:{...n.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}const Ak=e=>{if(e==null||typeof e!="object")return!1;for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&(n.startsWith("aria-")||n==="role"||n==="title")&&e[n]!=null)return!0;return!1},Dk=v.createContext({}),Nk=()=>v.useContext(Dk),jk=v.forwardRef(({color:e,size:n,width:a,height:o,strokeWidth:s,absoluteStrokeWidth:u,nonScalingStroke:c,className:d="",children:p,iconNode:g=[],icon:y={node:g,aliases:[],size:24},...h},b)=>{const{size:S=24,strokeWidth:w=2,absoluteStrokeWidth:C=!1,nonScalingStroke:R=!1,color:T="currentColor",className:O=""}=Nk()??{},M=!!p||Ak(h),[A,N,P=[]]=Mk(y,{color:e??T,width:a??n??S,height:o??n??S,strokeWidth:s??w,absoluteStrokeWidth:u??C,nonScalingStroke:c??R,className:ly(O,d),hasA11yProp:M,attributes:h});return v.createElement(A,{ref:b,...N},[...P.map(([I,D])=>v.createElement(I,D)),...Array.isArray(p)?p:[p]])});function kt(e,n=[],a=[]){const o=typeof e=="string"?Ek(e,n,a):e,s=v.forwardRef(({className:u,...c},d)=>v.createElement(jk,{ref:d,icon:o,className:u,...c}));return o.name&&(s.displayName=Tk(o.name)),s}const gC={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};gC.node;const Ik=kt(gC),mC={name:"audio-lines",size:24,node:[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]]};mC.node;const kk=kt(mC),yC={name:"bot",size:24,node:[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]};yC.node;const vC=kt(yC),bC={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};bC.node;const fp=kt(bC),xC={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};xC.node;const SC=kt(xC),wC={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};wC.node;const Pk=kt(wC),RC={name:"chevron-up",size:24,node:[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]};RC.node;const Lk=kt(RC),EC={name:"chevrons-up-down",size:24,node:[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]};EC.node;const zk=kt(EC),CC={name:"circle-check",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 9-5.5 5.5L8 12",key:"xofnsj"}]],aliases:["check-circle-2"]};CC.node;const _k=kt(CC),TC={name:"circle-question-mark",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9 9.5a3 2.5 0 016 0c0 2-2 2-3 3.5",key:"1awbb0"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["help-circle","circle-help"]};TC.node;const Hk=kt(TC),OC={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};OC.node;const Uk=kt(OC),MC={name:"download",size:24,node:[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]};MC.node;const AC=kt(MC),DC={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};DC.node;const Fk=kt(DC),NC={name:"eye-off",size:24,node:[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]};NC.node;const Bk=kt(NC),jC={name:"eye",size:24,node:[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};jC.node;const Vk=kt(jC),IC={name:"file-input",size:24,node:[["path",{d:"M4 11V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-1",key:"1q9hii"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M2 15h10",key:"jfw4w8"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]]};IC.node;const kC=kt(IC),PC={name:"file-output",size:24,node:[["path",{d:"M4.226 20.925A2 2 0 0 0 6 22h12a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v3.127",key:"wfxp4w"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 11-3 3",key:"1dgrs4"}],["path",{d:"m5 17-3-3h10",key:"1mvvaf"}]]};PC.node;const LC=kt(PC),zC={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};zC.node;const qk=kt(zC),_C={name:"folder-open",size:24,node:[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]};_C.node;const Yk=kt(_C),HC={name:"gallery-vertical-end",size:24,node:[["path",{d:"M7 2h10",key:"nczekb"}],["path",{d:"M5 6h14",key:"u2x4p"}],["rect",{width:"18",height:"12",x:"3",y:"10",rx:"2",key:"l0tzu3"}]]};HC.node;const Kk=kt(HC),UC={name:"grip-vertical",size:24,node:[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]};UC.node;const cv=kt(UC),FC={name:"info",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]};FC.node;const Gk=kt(FC),BC={name:"languages",size:24,node:[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]};BC.node;const $k=kt(BC),VC={name:"layout-dashboard",size:24,node:[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]};VC.node;const Xk=kt(VC),qC={name:"library-big",size:24,node:[["rect",{width:"8",height:"18",x:"3",y:"3",rx:"1",key:"oynpb5"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M20.4 18.9c.2.5-.1 1.1-.6 1.3l-1.9.7c-.5.2-1.1-.1-1.3-.6L11.1 5.1c-.2-.5.1-1.1.6-1.3l1.9-.7c.5-.2 1.1.1 1.3.6Z",key:"1qboyk"}]]};qC.node;const Qk=kt(qC),YC={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};YC.node;const Bl=kt(YC),KC={name:"lock-keyhole",size:24,node:[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]]};KC.node;const Zk=kt(KC),GC={name:"menu",size:24,node:[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]};GC.node;const Jk=kt(GC),$C={name:"octagon-x",size:24,node:[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aliases:["x-octagon"]};$C.node;const Wk=kt($C),XC={name:"paintbrush",size:24,node:[["path",{d:"m14.622 17.897-10.68-2.913",key:"vj2p1u"}],["path",{d:"M18.376 2.622a1 1 0 1 1 3.002 3.002L17.36 9.643a.5.5 0 0 0 0 .707l.944.944a2.41 2.41 0 0 1 0 3.408l-.944.944a.5.5 0 0 1-.707 0L8.354 7.348a.5.5 0 0 1 0-.707l.944-.944a2.41 2.41 0 0 1 3.408 0l.944.944a.5.5 0 0 0 .707 0z",key:"18tc5c"}],["path",{d:"M9 8c-1.804 2.71-3.97 3.46-6.583 3.948a.507.507 0 0 0-.302.819l7.32 8.883a1 1 0 0 0 1.185.204C12.735 20.405 16 16.792 16 15",key:"ytzfxy"}]]};XC.node;const eP=kt(XC),QC={name:"panel-left",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],aliases:["sidebar"]};QC.node;const tP=kt(QC),ZC={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};ZC.node;const nP=kt(ZC),JC={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};JC.node;const dv=kt(JC),WC={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};WC.node;const rP=kt(WC),eT={name:"rotate-cw",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]};eT.node;const tT=kt(eT),nT={name:"save",size:24,node:[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]};nT.node;const aP=kt(nT),rT={name:"settings",size:24,node:[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};rT.node;const oP=kt(rT),aT={name:"sliders-horizontal",size:24,node:[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]]};aT.node;const iP=kt(aT),oT={name:"terminal",size:24,node:[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]};oT.node;const sP=kt(oT),iT={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};iT.node;const lP=kt(iT),sT={name:"triangle-exclamation-point",size:24,node:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["alert-triangle","triangle-alert"]};sT.node;const uP=kt(sT),lT={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};lT.node;const Rs=kt(lT),cP=({...e})=>{const{theme:n="system"}=GI();return x.jsx(wk,{theme:n,className:"toaster group",icons:{success:x.jsx(_k,{className:"size-4"}),info:x.jsx(Gk,{className:"size-4"}),warning:x.jsx(uP,{className:"size-4"}),error:x.jsx(Wk,{className:"size-4"}),loading:x.jsx(Bl,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},toastOptions:{classNames:{toast:"cn-toast"}},...e})},uT=v.createContext(void 0),Bo=e=>{const n=v.useContext(uT);if(e)return e;if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},dP=({client:e,children:n})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),x.jsx(uT.Provider,{value:e,children:n})),fP={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)};var hP=class{#e=fP;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,n){return this.#e.setTimeout(e,n)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,n){return this.#e.setInterval(e,n)}clearInterval(e){this.#e.clearInterval(e)}};const cs=new hP;function pP(e){setTimeout(e,0)}const gP=typeof window>"u"||"Deno"in globalThis;function Pr(){}function mP(e,n){return typeof e=="function"?e(n):e}function cT(e){return typeof e=="number"&&e>=0&&e!==1/0}function dT(e,n){return Math.max(e+(n||0)-Date.now(),0)}function kn(e,n){return typeof e=="function"?e(n):e}function lw(e,n){const{type:a="all",exact:o,fetchStatus:s,predicate:u,queryKey:c,stale:d}=e;if(c){if(o){if(n.queryHash!==fv(c,n.options))return!1}else if(!Ll(n.queryKey,c))return!1}if(a!=="all"){const p=n.isActive();if(a==="active"&&!p||a==="inactive"&&p)return!1}return!(typeof d=="boolean"&&n.isStale()!==d||s&&s!==n.state.fetchStatus||u&&!u(n))}function uw(e,n){const{exact:a,status:o,predicate:s,mutationKey:u}=e;if(u){if(!n.options.mutationKey)return!1;if(a){if(vs(n.options.mutationKey)!==vs(u))return!1}else if(!Ll(n.options.mutationKey,u))return!1}return!(o&&n.state.status!==o||s&&!s(n))}function fv(e,n){return(n?.queryKeyHashFn||vs)(e)}function vs(e){return JSON.stringify(e,(n,a)=>uy(a)?Object.keys(a).sort().reduce((o,s)=>(o[s]=a[s],o),{}):a)}function Ll(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(Array.isArray(e)&&Array.isArray(n)){if(n.length>e.length)return!1;for(let o=0;o<n.length;o++)if(!Ll(e[o],n[o]))return!1;return!0}const a=Object.keys(n);for(const o of a)if(!Ll(e[o],n[o]))return!1;return!0}return!1}const yP=Object.prototype.hasOwnProperty;function hv(e,n,a=0){if(e===n)return e;if(a>500)return n;const o=cw(e)&&cw(n);if(!o&&!(uy(e)&&uy(n)))return n;const s=(o?e:Object.keys(e)).length,u=o?n:Object.keys(n),c=u.length,d=o?new Array(c):{};let p=0;for(let g=0;g<c;g++){const y=o?g:u[g],h=e[y],b=n[y];if(h===b){d[y]=h,(o?g<s:yP.call(e,y))&&p++;continue}if(h===null||b===null||typeof h!="object"||typeof b!="object"){d[y]=b;continue}const S=hv(h,b,a+1);d[y]=S,S===h&&p++}return s===c&&p===s?e:d}function $f(e,n){if(!n||Object.keys(e).length!==Object.keys(n).length)return!1;for(const a in e)if(e[a]!==n[a])return!1;return!0}function cw(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function uy(e){if(!dw(e))return!1;const n=Object.getPrototypeOf(e),a=n?.constructor;if(a===void 0)return!0;if(typeof a!="function")return!1;const o=a.prototype;return!(!dw(o)||!o.hasOwnProperty("isPrototypeOf")||n!==Object.prototype)}function dw(e){return Object.prototype.toString.call(e)==="[object Object]"}function vP(e){return new Promise(n=>{cs.setTimeout(n,e)})}function cy(e,n,a){return typeof a.structuralSharing=="function"?a.structuralSharing(e,n):a.structuralSharing!==!1?hv(e,n):n}function bP(e,n,a=0){const o=[...e,n];return a&&o.length>a?o.slice(1):o}function xP(e,n,a=0){const o=[n,...e];return a&&o.length>a?o.slice(0,-1):o}const pv=Symbol();function fT(e,n){return!e.queryFn&&n?.initialPromise?()=>n.initialPromise:!e.queryFn||e.queryFn===pv?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function gv(e,n){return typeof e=="function"?e(...n):!!e}function SP(e,n,a){let o=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??=n(),o||(o=!0,s.aborted?a():s.addEventListener("abort",a,{once:!0})),s)}),e}let wP=()=>gP;const mv=()=>wP();var Vl=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(){}},RP=class extends Vl{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}};const yv=new RP,EP=pP;function CP(){let e=[],n=0,a=d=>{d()},o=d=>{d()},s=EP;const u=d=>{n?e.push(d):s(()=>{a(d)})},c=()=>{const d=e;e=[],d.length&&s(()=>{o(()=>{d.forEach(p=>{a(p)})})})};return{batch:d=>{let p;n++;try{p=d()}finally{n--,n||c()}return p},batchCalls:d=>(...p)=>{u(()=>{d(...p)})},schedule:u,setNotifyFunction:d=>{a=d},setBatchNotifyFunction:d=>{o=d},setScheduler:d=>{s=d}}}const Wn=CP();var TP=class extends Vl{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const n=()=>e(!0),a=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",a,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",a)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}};const bh=new TP;function OP(e){return Math.min(1e3*2**e,3e4)}function hT(e){return(e??"online")==="online"?bh.isOnline():!0}var dy=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function pT(e){let n=!1,a=0,o,s="pending",u,c;const d=new Promise((O,M)=>{u=O,c=M});d.catch(Pr);const p=()=>s!=="pending",g=O=>{if(!p()){const M=new dy(O);C(M),e.onCancel?.(M)}},y=()=>{n=!0},h=()=>{n=!1},b=()=>yv.isFocused()&&(e.networkMode==="always"||bh.isOnline())&&e.canRun(),S=()=>hT(e.networkMode)&&e.canRun(),w=O=>{p()||(o?.(),s="resolved",u(O))},C=O=>{p()||(o?.(),s="rejected",c(O))},R=O=>new Promise(M=>{o=A=>{(p()||O())&&M(A)},e.onPause?.()}).then(()=>{o=void 0,p()||e.onContinue?.()}),T=()=>{if(p())return;let O;const M=a===0?e.initialPromise:void 0;try{O=M??e.fn()}catch(A){O=Promise.reject(A)}Promise.resolve(O).then(w).catch(A=>{if(p())return;const N=e.retry??(mv()?0:3),P=e.retryDelay??OP,I=typeof P=="function"?P(a,A):P,D=N===!0||typeof N=="number"&&a<N||typeof N=="function"&&N(a,A);if(n||!D){C(A);return}a++,e.onFail?.(a,A),vP(I).then(()=>b()?void 0:R(b)).then(()=>{n?C(A):T()})})};return{promise:d,status:()=>s,cancel:g,continue:()=>(o?.(),d),cancelRetry:y,continueRetry:h,canStart:S,start:()=>(S()?T():R(S).then(T),d)}}var gT=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),cT(this.gcTime)&&(this.#e=cs.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(mv()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(cs.clearTimeout(this.#e),this.#e=void 0)}};function MP(e){return{onFetch:(n,a)=>{const o=n.options,s=n.fetchOptions?.meta?.fetchMore?.direction,u=n.state.data?.pages||[],c=n.state.data?.pageParams||[];let d={pages:[],pageParams:[]},p=0;const g=async()=>{let y=!1;const h=w=>{SP(w,()=>n.signal,()=>y=!0)},b=fT(n.options,n.fetchOptions),S=async(w,C,R)=>{if(y)return Promise.reject(n.signal.reason);if(C==null&&w.pages.length)return Promise.resolve(w);const O=(()=>{const P={client:n.client,queryKey:n.queryKey,pageParam:C,direction:R?"backward":"forward",meta:n.options.meta};return h(P),P})(),M=await b(O),{maxPages:A}=n.options,N=R?xP:bP;return{pages:N(w.pages,M,A),pageParams:N(w.pageParams,C,A)}};if(s&&u.length){const w=s==="backward",C=w?AP:fw,R={pages:u,pageParams:c};d=await S(R,C(o,R),w)}else{const w=e??u.length;do{const C=p===0?c[0]===void 0?o.initialPageParam:c[0]:fw(o,d);if(p>0&&C==null)break;d=await S(d,C),p++}while(p<w)}return d};n.options.persister?n.fetchFn=()=>n.options.persister?.(g,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},a):n.fetchFn=g}}}function fw(e,{pages:n,pageParams:a}){const o=n.length-1;return n.length>0?e.getNextPageParam(n[o],n,a[o],a):void 0}function AP(e,{pages:n,pageParams:a}){return n.length>0?e.getPreviousPageParam?.(n[0],n,a[0],a):void 0}var DP=class extends gT{#e;#t;#n;#r;#o;#a;#i;#l;constructor(e){super(),this.#l=!1,this.#i=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#o=e.client,this.#r=this.#o.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=pw(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#i,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=pw(this.options);n.data!==void 0&&(this.setState(hw(n.data,n.dataUpdatedAt)),this.#t=n)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,n){const a=cy(this.state.data,e,this.options);return this.#s({data:a,type:"success",dataUpdatedAt:n?.updatedAt,manual:n?.manual}),a}setState(e){this.#s({type:"setState",state:e})}cancel(e){const n=this.#a?.promise;return this.#a?.cancel(e),n?n.then(Pr).catch(Pr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>kn(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===pv||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>kn(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!dT(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){const n=this.observers.indexOf(e);n!==-1&&(this.observers.splice(n,1),this.observers.length||(this.#a&&(this.#l||this.state.fetchStatus==="paused"&&this.state.status==="pending"?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}async fetch(e,n){if(this.state.fetchStatus!=="idle"&&this.#a?.status()!=="rejected"){if(this.state.data!==void 0&&n?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){const p=this.observers.find(g=>g.options.queryFn);p&&this.setOptions(p.options)}const a=new AbortController,o=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(this.#l=!0,a.signal)})},s=()=>{const p=fT(this.options,n),y=(()=>{const h={client:this.#o,queryKey:this.queryKey,meta:this.meta};return o(h),h})();return this.#l=!1,this.options.persister?this.options.persister(p,y,this):p(y)},c=(()=>{const p={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:this.#o,state:this.state,fetchFn:s};return o(p),p})();(this.#e==="infinite"?MP(this.options.pages):this.options.behavior)?.onFetch(c,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#s({type:"fetch",meta:c.fetchOptions?.meta});const d=this.#a=pT({initialPromise:n?.initialPromise,fn:c.fetchFn,onCancel:p=>{p instanceof dy&&p.revert&&this.setState({...this.#n,fetchStatus:"idle"}),a.abort()},onFail:(p,g)=>{this.#s({type:"failed",failureCount:p,error:g})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{const p=await d.start();if(p===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(p),this.#r.config.onSuccess?.(p,this),this.#r.config.onSettled?.(p,this.state.error,this),p}catch(p){if(p instanceof dy){if(p.silent)return this.#a.promise;if(p.revert){if(this.state.data===void 0)throw p;return this.state.data}}throw this.#s({type:"error",error:p}),this.#r.config.onError?.(p,this),this.#r.config.onSettled?.(this.state.data,p,this),p}finally{this.#a===d&&(this.#a=void 0),this.scheduleGc()}}#s(e){const n=a=>{switch(e.type){case"failed":return{...a,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...a,fetchStatus:"paused"};case"continue":return{...a,fetchStatus:"fetching"};case"fetch":return{...a,...mT(a.data,this.options),fetchMeta:e.meta??null};case"success":const o={...a,...hw(e.data,e.dataUpdatedAt),dataUpdateCount:a.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?o:void 0,o;case"error":const s=e.error;return{...a,error:s,errorUpdateCount:a.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:a.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...a,isInvalidated:!0};case"setState":return{...a,...e.state}}};this.state=n(this.state),Wn.batch(()=>{this.observers.slice().forEach(a=>{a.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function mT(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:hT(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function hw(e,n){return{data:e,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function pw(e){const n=typeof e.initialData=="function"?e.initialData():e.initialData,a=n!==void 0,o=a?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:a?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:a?"success":"pending",fetchStatus:"idle"}}var NP=class extends Vl{#e;#t=void 0;#n=void 0;#r=void 0;#o;#a;#i;#l;#s;#h;#c;#d;#u;#p=new Set;constructor(e,n){super(),this.options=n,this.#e=e,this.#i=null,this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),gw(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return fy(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return fy(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#S(),this.#t.removeObserver(this)}setOptions(e){const n=this.options,a=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof kn(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#t.setOptions(this.options),n._defaulted&&!$f(this.options,n)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const o=this.hasListeners();o&&mw(this.#t,a,this.options,n)&&this.#f(),this.updateResult(),o&&(this.#t!==a||kn(this.options.enabled,this.#t)!==kn(n.enabled,this.#t)||kn(this.options.staleTime,this.#t)!==kn(n.staleTime,this.#t))&&this.#m();const s=this.#y();o&&(this.#t!==a||kn(this.options.enabled,this.#t)!==kn(n.enabled,this.#t)||s!==this.#u)&&this.#v(s)}getOptimisticResult(e){const n=this.#e.getQueryCache().build(this.#e,e),a=this.createResult(n,e);return $f(this.getCurrentResult(),a)||(this.#r=a,this.#a=this.options,this.#o=this.#t.state),a}getCurrentResult(){return this.#r}trackResult(e,n){return new Proxy(e,{get:(a,o)=>(this.trackProp(o),n?.(o),Reflect.get(a,o))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=this.#e.defaultQueryOptions(e),a=this.#e.getQueryCache().build(this.#e,n);let o=()=>{},s;const u=new Promise(c=>{s=c,o=this.#e.getQueryCache().subscribe(d=>{d.type==="updated"&&d.query.queryHash===a.queryHash&&a.state.data!==void 0&&(o(),c(this.createResult(a,n)))})});return Promise.race([a.fetch(n).then(()=>{const c=this.createResult(a,n);return s?.(c),c}).finally(()=>{o()}),u])}fetch(e){return this.#f({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#f(e){this.#w();let n=this.#t.fetch(this.options,e);return e?.throwOnError||(n=n.catch(Pr)),n}#g(e){return!mv()&&kn(this.options.enabled,this.#t)!==!1&&cT(e)}#m(){this.#x();const e=kn(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#g(e))return;const n=dT(this.#r.dataUpdatedAt,e)+1;this.#c=cs.setTimeout(()=>{this.#r.isStale||this.updateResult()},n)}#y(){return kn(this.options.refetchInterval,this.#t)??!1}#v(e){this.#S(),this.#u=e,!(this.#u===0||!this.#g(this.#u))&&(this.#d=cs.setInterval(()=>{(this.options.refetchIntervalInBackground||yv.isFocused())&&this.#f()},this.#u))}#b(){this.#m(),this.#v(this.#y())}#x(){this.#c!==void 0&&(cs.clearTimeout(this.#c),this.#c=void 0)}#S(){this.#d!==void 0&&(cs.clearInterval(this.#d),this.#d=void 0)}createResult(e,n){const a=this.#t,o=this.options,s=this.#r,u=this.#o,c=this.#a,d=e!==a?e.state:this.#n,{state:p}=e;let g={...p},y=!1,h;if(n._optimisticResults){const N=this.hasListeners(),P=!N&&gw(e,n),I=N&&mw(e,a,n,o);(P||I)&&(g={...g,...mT(p.data,e.options)}),n._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:b,errorUpdatedAt:S,status:w}=g;h=g.data;let C=!1;if(n.placeholderData!==void 0&&h===void 0&&w==="pending"){let N;s?.isPlaceholderData&&n.placeholderData===c?.placeholderData?(N=s.data,C=!0):N=typeof n.placeholderData=="function"?n.placeholderData(this.#h?.state.data,this.#h):n.placeholderData,N!==void 0&&(w="success",h=cy(s?.data,N,n),y=!0)}if(n.select&&h!==void 0&&!C)if(s&&h===u?.data&&n.select===this.#l)h=this.#s;else try{this.#l=n.select,h=n.select(h),h=cy(s?.data,h,n),this.#s=h,this.#i=null}catch(N){this.#i=N}else h===void 0&&(this.#i=null);this.#i&&(b=this.#i,h=this.#s,S=Date.now(),w="error",y=!1);const R=g.fetchStatus==="fetching",T=w==="pending",O=w==="error",M=T&&R,A=h!==void 0;return{status:w,fetchStatus:g.fetchStatus,isPending:T,isSuccess:w==="success",isError:O,isInitialLoading:M,isLoading:M,data:h,dataUpdatedAt:g.dataUpdatedAt,error:b,errorUpdatedAt:S,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:g.dataUpdateCount>d.dataUpdateCount||g.errorUpdateCount>d.errorUpdateCount,isFetching:R,isRefetching:R&&!T,isLoadingError:O&&!A,isPaused:g.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:O&&A,isStale:vv(e,n),refetch:this.refetch,isEnabled:kn(n.enabled,e)!==!1}}updateResult(){const e=this.#r,n=this.createResult(this.#t,this.options);if(this.#o=this.#t.state,this.#a=this.options,this.#o.data!==void 0&&(this.#h=this.#t),$f(n,e))return;this.#r=n;const o=(()=>{if(!e)return!0;const{notifyOnChangeProps:s}=this.options,u=typeof s=="function"?s():s;if(u==="all"||!u&&!this.#p.size)return!0;const c=new Set(u??this.#p);return this.options.throwOnError&&c.add("error"),Object.keys(this.#r).some(d=>{const p=d;return this.#r[p]!==e[p]&&c.has(p)})})();Wn.batch(()=>{o&&this.listeners.forEach(s=>{s(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}#w(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const n=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(n?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}};function jP(e,n){return kn(n.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&kn(n.retryOnMount,e)===!1)}function gw(e,n){return jP(e,n)||e.state.data!==void 0&&fy(e,n,n.refetchOnMount)}function fy(e,n,a){if(kn(n.enabled,e)!==!1&&kn(n.staleTime,e)!=="static"){const o=kn(a,e);return o==="always"||o!==!1&&vv(e,n)}return!1}function mw(e,n,a,o){return(e!==n||kn(o.enabled,e)===!1)&&(!a.suspense||e.state.status!=="error")&&vv(e,a)}function vv(e,n){return kn(n.enabled,e)!==!1&&e.isStaleByTime(kn(n.staleTime,e))}var IP=class extends gT{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||yT(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(n=>n!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(e){const n=()=>{this.#o({type:"continue"})},a={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},o=this.#r=pT({fn:()=>this.options.mutationFn?this.options.mutationFn(e,a):Promise.reject(new Error("No mutationFn found")),onFail:(c,d)=>{this.#o({type:"failed",failureCount:c,error:d})},onPause:()=>{this.#o({type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),s=this.state.status==="pending",u=!o.canStart();try{if(s)n();else{this.#o({type:"pending",variables:e,isPaused:u}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,a);const d=await this.options.onMutate?.(e,a);d!==this.state.context&&this.#o({type:"pending",context:d,variables:e,isPaused:u})}const c=await o.start();return await this.#n.config.onSuccess?.(c,e,this.state.context,this,a),await this.options.onSuccess?.(c,e,this.state.context,a),await this.#n.config.onSettled?.(c,null,this.state.variables,this.state.context,this,a),await this.options.onSettled?.(c,null,e,this.state.context,a),this.#o({type:"success",data:c}),c}catch(c){try{await this.#n.config.onError?.(c,e,this.state.context,this,a)}catch(d){Promise.reject(d)}try{await this.options.onError?.(c,e,this.state.context,a)}catch(d){Promise.reject(d)}try{await this.#n.config.onSettled?.(void 0,c,this.state.variables,this.state.context,this,a)}catch(d){Promise.reject(d)}try{await this.options.onSettled?.(void 0,c,e,this.state.context,a)}catch(d){Promise.reject(d)}throw this.#o({type:"error",error:c}),c}finally{this.#r===o&&(this.#r=void 0),this.#n.runNext(this)}}#o(e){const n=a=>{switch(e.type){case"failed":return{...a,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...a,isPaused:!0};case"continue":return{...a,isPaused:!1};case"pending":return{...a,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...a,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...a,data:void 0,error:e.error,failureCount:a.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Wn.batch(()=>{this.#t.forEach(a=>{a.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function yT(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var kP=class extends Vl{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,n,a){const o=new IP({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(n),state:a});return this.add(o),o}add(e){this.#e.add(e);const n=Mf(e);if(typeof n=="string"){const a=this.#t.get(n);a?a.push(e):this.#t.set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const n=Mf(e);if(typeof n=="string"){const a=this.#t.get(n);if(a)if(a.length>1){const o=a.indexOf(e);o!==-1&&a.splice(o,1)}else a[0]===e&&this.#t.delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=Mf(e);if(typeof n=="string"){const a=this.#t.get(n)?.find(o=>o.state.status==="pending");return!a||a===e}else return!0}runNext(e){const n=Mf(e);return typeof n=="string"?this.#t.get(n)?.find(a=>a!==e&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Wn.batch(()=>{const e=this.getAll();this.#e.clear(),this.#t.clear(),e.forEach(n=>{this.notify({type:"removed",mutation:n})})})}getAll(){return Array.from(this.#e)}find(e){const n={exact:!0,...e};return this.getAll().find(a=>uw(n,a))}findAll(e={}){return this.getAll().filter(n=>uw(e,n))}notify(e){Wn.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return Wn.batch(()=>Promise.all(e.map(n=>n.continue().catch(Pr))))}};function Mf(e){return e.options.scope?.id}var PP=class extends Vl{#e;#t=void 0;#n;#r;constructor(n,a){super(),this.#e=n,this.setOptions(a),this.bindMethods(),this.#o()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){const a=this.options;this.options=this.#e.defaultMutationOptions(n),$f(this.options,a)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),a?.mutationKey&&this.options.mutationKey&&vs(a.mutationKey)!==vs(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#o())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(n){this.#o(),this.#a(n)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#o(),this.#a()}mutate(n,a){return this.#r=a,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(n)}#o(){const n=this.#n?.state??yT();this.#t={...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset}}#a(n){Wn.batch(()=>{const a=this.#r;if(a&&this.hasListeners()){const o=this.#t.variables,s=this.#t.context,u={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(n?.type==="success"){try{a.onSuccess?.(n.data,o,s,u)}catch(c){Promise.reject(c)}try{a.onSettled?.(n.data,null,o,s,u)}catch(c){Promise.reject(c)}}else if(n?.type==="error"){try{a.onError?.(n.error,o,s,u)}catch(c){Promise.reject(c)}try{a.onSettled?.(void 0,n.error,o,s,u)}catch(c){Promise.reject(c)}}}this.listeners.forEach(o=>{o(this.#t)})})}},vT=class extends Vl{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,n,a){const o=n.queryKey,s=n.queryHash??fv(o,n);let u=this.get(s);return u||(u=new DP({client:e,queryKey:o,queryHash:s,options:e.defaultQueryOptions(n),state:a,defaultOptions:e.getQueryDefaults(o)}),this.add(u)),u}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){this.#e.get(e.queryHash)===e&&(e.destroy(),this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Wn.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const n={exact:!0,...e};return this.getAll().find(a=>lw(n,a))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(a=>lw(e,a)):n}notify(e){Wn.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){Wn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Wn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},LP=class{#e;#t;#n;#r;#o;#a;#i;#l;constructor(e={}){this.#e=e.queryCache||new vT,this.#t=e.mutationCache||new kP,this.#n=e.defaultOptions||{},this.#r=new Map,this.#o=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#i=yv.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#l=bh.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#i?.(),this.#i=void 0,this.#l?.(),this.#l=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const n=this.defaultQueryOptions({queryKey:e});return this.#e.get(n.queryHash)?.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),a=this.#e.build(this,n),o=a.state.data;return o===void 0?this.fetchQuery(e):(e.revalidateIfStale&&a.isStaleByTime(kn(n.staleTime,a))&&this.prefetchQuery(n),Promise.resolve(o))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:n,state:a})=>[n,a.data])}setQueryData(e,n,a){const o=this.defaultQueryOptions({queryKey:e}),s=this.#e.get(o.queryHash)?.state.data,u=mP(n,s);if(u!==void 0)return this.#e.build(this,o).setData(u,{...a,manual:!0})}setQueriesData(e,n,a){return Wn.batch(()=>this.#e.findAll(e).map(({queryKey:o})=>[o,this.setQueryData(o,n,a)]))}getQueryState(e){const n=this.defaultQueryOptions({queryKey:e});return this.#e.get(n.queryHash)?.state}removeQueries(e){const n=this.#e;Wn.batch(()=>{n.findAll(e).forEach(a=>{n.remove(a)})})}resetQueries(e,n){const a=this.#e;return Wn.batch(()=>{const o=a.findAll(e),s=new Set(o);return o.forEach(u=>{u.reset()}),this.refetchQueries({type:"active",predicate:u=>s.has(u)},n)})}cancelQueries(e,n={}){const a={revert:!0,...n},o=Wn.batch(()=>this.#e.findAll(e).map(s=>s.cancel(a)));return Promise.all(o).then(Pr).catch(Pr)}invalidateQueries(e,n={}){return Wn.batch(()=>(this.#e.findAll(e).forEach(a=>{a.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},n)))}refetchQueries(e,n={}){const a={...n,cancelRefetch:n.cancelRefetch??!0},o=Wn.batch(()=>this.#e.findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let u=s.fetch(void 0,a);return a.throwOnError||(u=u.catch(Pr)),s.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(o).then(Pr)}async query(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const a=this.#e.build(this,n),o=a.isStaleByTime(kn(n.staleTime,a))?await a.fetch(n):a.state.data,s=n.select;return s?s(o):o}fetchQuery(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const a=this.#e.build(this,n);return a.isStaleByTime(kn(n.staleTime,a))?a.fetch(n):Promise.resolve(a.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Pr).catch(Pr)}infiniteQuery(e){return e._type="infinite",this.query(e)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Pr).catch(Pr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return bh.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,n){this.#r.set(vs(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...this.#r.values()],a={};return n.forEach(o=>{Ll(e,o.queryKey)&&Object.assign(a,o.defaultOptions)}),a}setMutationDefaults(e,n){this.#o.set(vs(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...this.#o.values()],a={};return n.forEach(o=>{Ll(e,o.mutationKey)&&Object.assign(a,o.defaultOptions)}),a}defaultQueryOptions(e){if(e._defaulted)return e;const n={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=fv(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===pv&&(n.enabled=!1),n}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}};const bT=v.createContext(!1),zP=()=>v.useContext(bT);bT.Provider;function _P(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const HP=v.createContext(_P()),UP=()=>v.useContext(HP),FP=(e,n,a)=>{const o=a?.state.status==="error"&&typeof e.throwOnError=="function"?gv(e.throwOnError,[a.state.error,a]):e.throwOnError;(e.suspense||o)&&(n.isReset()||(e.retryOnMount=!1))},BP=e=>{v.useEffect(()=>{e.clearReset()},[e])},VP=({result:e,errorResetBoundary:n,throwOnError:a,query:o,suspense:s})=>e.isError&&!n.isReset()&&!e.isFetching&&o&&(s&&e.data===void 0||gv(a,[e.error,o])),qP=e=>{if(e.suspense){const a=s=>s==="static"?s:Math.max(s??1e3,1e3),o=e.staleTime;e.staleTime=typeof o=="function"?(...s)=>a(o(...s)):a(o),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},YP=(e,n)=>e?.suspense&&n.isPending,KP=(e,n,a)=>n.fetchOptimistic(e).catch(()=>{a.clearReset()});function GP(e,n,a){const o=zP(),s=UP(),u=Bo(a),c=u.defaultQueryOptions(e),d=u.getQueryCache().get(c.queryHash),p=e.subscribed!==!1;c._optimisticResults=o?"isRestoring":p?"optimistic":void 0,qP(c),FP(c,s,d),BP(s);const[g]=v.useState(()=>new n(u,c)),y=g.getOptimisticResult(c),h=!o&&p;if(v.useSyncExternalStore(v.useCallback(b=>{const S=h?g.subscribe(Wn.batchCalls(b)):Pr;return g.updateResult(),S},[g,h]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),v.useEffect(()=>{g.setOptions(c)},[c,g]),YP(c,y))throw KP(c,g,s);if(VP({result:y,errorResetBoundary:s,throwOnError:c.throwOnError,query:d,suspense:c.suspense}))throw y.error;return c.notifyOnChangeProps?y:g.trackResult(y)}function hp(e,n){return GP(e,NP,n)}function $P(e,n){const a=Bo(n);return QP({filters:{...e,status:"pending"}},a).length}function XP(){let e;return(n,a)=>{let o=[],s;return()=>{const u=n.findAll(a.filters),c=u.flatMap(d=>[d,d.state]);return(!s||c.length!==o.length||c.some((d,p)=>!Object.is(d,o[p])))&&(o=c,s=hv(e,u.map(d=>a.select?a.select(d):d.state)),e=s),s}}}function QP(e={},n){const a=Bo(n).getMutationCache(),[o]=v.useState(()=>XP()),s=o(a,e);return v.useSyncExternalStore(v.useCallback(u=>a.subscribe(Wn.batchCalls(u)),[a]),s,s)}function Ma(e,n){const a=Bo(n),[o]=v.useState(()=>new PP(a,e));v.useEffect(()=>{o.setOptions(e)},[o,e]);const s=v.useSyncExternalStore(v.useCallback(c=>o.subscribe(Wn.batchCalls(c)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),u=v.useCallback((...c)=>{o.mutate(c[0],c[1]).catch(Pr)},[o]);if(s.error&&gv(o.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:u,mutateAsync:s.mutate}}var xT=e=>{throw TypeError(e)},ST=(e,n,a)=>n.has(e)||xT("Cannot "+a),Ea=(e,n,a)=>(ST(e,n,"read from private field"),a?a.call(e):n.get(e)),Wu=(e,n,a)=>n.has(e)?xT("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,a),io=(e,n,a,o)=>(ST(e,n,"write to private field"),n.set(e,a),a),pp=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,gp=/^[\\/]{2}/;function wT(e,n){return n+e.replace(/\\/g,"/")}var yw="popstate";function vw(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function ZP(e={}){function n(s,u){let{pathname:c="/",search:d="",hash:p=""}=Ka(s.location.hash.substring(1));return!c.startsWith("/")&&!c.startsWith(".")&&(c="/"+c),yc("",{pathname:c,search:d,hash:p},u.state&&u.state.usr||null,u.state&&u.state.key||"default")}function a(s,u){let c=s.document.querySelector("base"),d="";if(c&&c.getAttribute("href")){let p=s.location.href,g=p.indexOf("#");d=g===-1?p:p.slice(0,g)}return d+"#"+(typeof u=="string"?u:zr(u))}function o(s,u){Un(s.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(u)})`)}return WP(n,a,o,e)}function _t(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function Un(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function JP(){return Math.random().toString(36).substring(2,10)}function bw(e,n){return{usr:e.state,key:e.key,idx:n,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function yc(e,n,a=null,o,s){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof n=="string"?Ka(n):n,state:a,key:n&&n.key||o||JP(),mask:s}}function zr({pathname:e="/",search:n="",hash:a=""}){return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),a&&a!=="#"&&(e+=a.charAt(0)==="#"?a:"#"+a),e}function Ka(e){let n={};if(e){let a=e.indexOf("#");a>=0&&(n.hash=e.substring(a),e=e.substring(0,a));let o=e.indexOf("?");o>=0&&(n.search=e.substring(o),e=e.substring(0,o)),e&&(n.pathname=e)}return n}function WP(e,n,a,o={}){let{window:s=document.defaultView,v5Compat:u=!1}=o,c=s.history,d="POP",p=null,g=y();g==null&&(g=0,c.replaceState({...c.state,idx:g},""));function y(){return(c.state||{idx:null}).idx}function h(){d="POP";let R=y(),T=R==null?null:R-g;g=R,p&&p({action:d,location:C.location,delta:T})}function b(R,T){d="PUSH";let O=vw(R)?R:yc(C.location,R,T);a&&a(O,R),g=y()+1;let M=bw(O,g),A=C.createHref(O.mask||O);try{c.pushState(M,"",A)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;s.location.assign(A)}u&&p&&p({action:d,location:C.location,delta:1})}function S(R,T){d="REPLACE";let O=vw(R)?R:yc(C.location,R,T);a&&a(O,R),g=y();let M=bw(O,g),A=C.createHref(O.mask||O);c.replaceState(M,"",A),u&&p&&p({action:d,location:C.location,delta:0})}function w(R){return RT(s,R)}let C={get action(){return d},get location(){return e(s,c)},listen(R){if(p)throw new Error("A history only accepts one active listener");return s.addEventListener(yw,h),p=R,()=>{s.removeEventListener(yw,h),p=null}},createHref(R){return n(s,R)},createURL:w,encodeLocation(R){let T=w(R);return{pathname:T.pathname,search:T.search,hash:T.hash}},push:b,replace:S,go(R){return c.go(R)}};return C}function RT(e,n,a=!1){let o="http://localhost";e&&(o=e.location.origin!=="null"?e.location.origin:e.location.href),_t(o,"No window.location.(origin|href) available to create URL");let s=typeof n=="string"?n:zr(n);return s=s.replace(/ $/,"%20"),!a&&gp.test(s)&&(s=o+s),new URL(s,o)}var ec,xw=class{constructor(e){if(Wu(this,ec,new Map),e)for(let[n,a]of e)this.set(n,a)}get(e){if(Ea(this,ec).has(e))return Ea(this,ec).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,n){Ea(this,ec).set(e,n)}};ec=new WeakMap;var e5=new Set(["lazy","caseSensitive","path","id","index","children"]);function t5(e){return e5.has(e)}var n5=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function r5(e){return n5.has(e)}function a5(e){return e.index===!0}function vc(e,n,a=[],o={},s=!1){return e.map((u,c)=>{let d=[...a,String(c)],p=typeof u.id=="string"?u.id:d.join("-");if(_t(u.index!==!0||!u.children,"Cannot specify children on an index route"),_t(s||!o[p],`Found a route id collision on id "${p}". Route id's must be globally unique within Data Router usages`),a5(u)){let g={...u,id:p};return o[p]=Sw(g,n(g)),g}else{let g={...u,id:p,children:void 0};return o[p]=Sw(g,n(g)),u.children&&(g.children=vc(u.children,n,d,o,s)),g}})}function Sw(e,n){return Object.assign(e,{...n,...typeof n.lazy=="object"&&n.lazy!=null?{lazy:{...e.lazy,...n.lazy}}:{}})}function ET(e,n,a="/"){return Ua(e,n,a,!1)}function Ua(e,n,a,o,s){let u=typeof n=="string"?Ka(n):n,c=Na(u.pathname||"/",a);if(c==null)return null;let d=s??Xf(e),p=null,g=g5(c);for(let y=0;p==null&&y<d.length;++y)p=p5(d[y],g,o);return p}function CT(e,n){let{route:a,pathname:o,params:s}=e;return{id:a.id,pathname:o,params:s,data:n[a.id],loaderData:n[a.id],handle:a.handle}}function Xf(e){let n=TT(e);return o5(n),n}function TT(e,n=[],a=[],o="",s=!1){let u=(c,d,p=s,g)=>{let y={relativePath:g===void 0?c.path||"":g,caseSensitive:c.caseSensitive===!0,childrenIndex:d,route:c};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(o)&&p)return;_t(y.relativePath.startsWith(o),`Absolute route path "${y.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(o.length)}let h=Aa([o,y.relativePath]),b=a.concat(y);c.children&&c.children.length>0&&(_t(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),TT(c.children,n,b,h,p)),!(c.path==null&&!c.index)&&n.push({path:h,score:f5(h,c.index),routesMeta:b.map((S,w)=>{let[C,R]=AT(S.relativePath,S.caseSensitive,w===b.length-1);return{...S,matcher:C,compiledParams:R}})})};return e.forEach((c,d)=>{if(c.path===""||!c.path?.includes("?"))u(c,d);else for(let p of OT(c.path))u(c,d,!0,p)}),n}function OT(e){let n=e.split("/");if(n.length===0)return[];let[a,...o]=n,s=a.endsWith("?"),u=a.replace(/\?$/,"");if(o.length===0)return s?[u,""]:[u];let c=OT(o.join("/")),d=[];return d.push(...c.map(p=>p===""?u:[u,p].join("/"))),s&&d.push(...c),d.map(p=>e.startsWith("/")&&p===""?"/":p)}function o5(e){e.sort((n,a)=>n.score!==a.score?a.score-n.score:h5(n.routesMeta.map(o=>o.childrenIndex),a.routesMeta.map(o=>o.childrenIndex)))}var i5=/^:[\w-]+$/,s5=3,l5=2,u5=1,c5=10,d5=-2,ww=e=>e==="*";function f5(e,n){let a=e.split("/"),o=a.length;return a.some(ww)&&(o+=d5),n&&(o+=l5),a.filter(s=>!ww(s)).reduce((s,u)=>s+(i5.test(u)?s5:u===""?u5:c5),o)}function h5(e,n){return e.length===n.length&&e.slice(0,-1).every((o,s)=>o===n[s])?e[e.length-1]-n[n.length-1]:0}function p5(e,n,a=!1){let{routesMeta:o}=e,s={},u="/",c=[];for(let d=0;d<o.length;++d){let p=o[d],g=d===o.length-1,y=u==="/"?n:n.slice(u.length)||"/",h={path:p.relativePath,caseSensitive:p.caseSensitive,end:g},b=p.matcher&&p.compiledParams?MT(h,y,p.matcher,p.compiledParams):xh(h,y),S=p.route;if(!b&&g&&a&&!o[o.length-1].route.index&&(b=xh({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},y)),!b)return null;Object.assign(s,b.params),c.push({params:s,pathname:Aa([u,b.pathname]),pathnameBase:v5(Aa([u,b.pathnameBase])),route:S}),b.pathnameBase!=="/"&&(u=Aa([u,b.pathnameBase]))}return c}function xh(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[a,o]=AT(e.path,e.caseSensitive,e.end);return MT(e,n,a,o)}function MT(e,n,a,o){let s=n.match(a);if(!s)return null;let u=s[0],c=zl(u,1),d=s.slice(1);return{params:o.reduce((g,{paramName:y,isOptional:h},b)=>{if(y==="*"){let w=d[b]||"";c=zl(u.slice(0,u.length-w.length),1)}const S=d[b];return h&&!S?g[y]=void 0:g[y]=(S||"").replace(/%2F/g,"/"),g},{}),pathname:u,pathnameBase:c,pattern:e}}function AT(e,n=!1,a=!0){Un(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 o=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,d,p,g,y)=>{if(o.push({paramName:d,isOptional:p!=null}),p){let h=y.charAt(g+c.length);return h&&h!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(o.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,n?void 0:"i"),o]}function g5(e){try{return e.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return Un(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${n}).`),e}}function Na(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let a=n.endsWith("/")?n.length-1:n.length,o=e.charAt(a);return o&&o!=="/"?null:e.slice(a)||"/"}function m5({basename:e,pathname:n}){return n==="/"?e:Aa([e,n])}var bv=e=>pp.test(e);function y5(e,n="/"){let{pathname:a,search:o="",hash:s=""}=typeof e=="string"?Ka(e):e,u;return a?(a=xv(a),a.startsWith("/")||a.startsWith("\\")?u=Rw(a.substring(1),"/"):u=Rw(a,n)):u=n,{pathname:u,search:b5(o),hash:x5(s)}}function Rw(e,n){let a=zl(n).split("/");return e.split("/").forEach(s=>{s===".."?a.length>1&&a.pop():s!=="."&&a.push(s)}),a.length>1?a.join("/"):"/"}function j0(e,n,a,o){return`Cannot include a '${e}' character in a manually specified \`to.${n}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${a}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function DT(e){return e.filter((n,a)=>a===0||n.route.path&&n.route.path.length>0)}function mp(e){let n=DT(e);return n.map((a,o)=>o===n.length-1?a.pathname:a.pathnameBase)}function zc(e,n,a,o=!1){let s;typeof e=="string"?s=Ka(e):(s={...e},_t(!s.pathname||!s.pathname.includes("?"),j0("?","pathname","search",s)),_t(!s.pathname||!s.pathname.includes("#"),j0("#","pathname","hash",s)),_t(!s.search||!s.search.includes("#"),j0("#","search","hash",s)));let u=e===""||s.pathname==="",c=u?"/":s.pathname,d;if(c==null)d=a;else{let h=n.length-1;if(!o&&c.startsWith("..")){let b=c.split("/");for(;b[0]==="..";)b.shift(),h-=1;s.pathname=b.join("/")}d=h>=0?n[h]:"/"}let p=y5(s,d),g=c&&c!=="/"&&c.endsWith("/"),y=(u||c===".")&&a.endsWith("/");return!p.pathname.endsWith("/")&&(g||y)&&(p.pathname+="/"),p}var xv=e=>e.replace(/[\\/]{2,}/g,"/"),Aa=e=>xv(e.join("/"));function zl(e,n=0){let a=e.length;for(;a>n&&e.charCodeAt(a-1)===47;)a--;return a===e.length?e:e.slice(0,a)}var v5=e=>zl(e).replace(/^\/*/,"/"),b5=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,x5=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,S5=["EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],_c=class{constructor(e,n,a,o=!1){this.status=e,this.statusText=n||"",this.internal=o,a instanceof Error?(this.data=a.toString(),this.error=a):this.data=a}};function bc(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Hc(e){let n=e.map(a=>a.route.path).filter(Boolean);return Aa(n)||"/"}var NT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function jT(e,n){let a=e;if(typeof a!="string"||!pp.test(a))return{absoluteURL:void 0,isExternal:!1,to:a};let o=a,s=!1;if(NT)try{let u=new URL(window.location.href),c=gp.test(a)?new URL(wT(a,u.protocol)):new URL(a),d=Na(c.pathname,n);c.origin===u.origin&&d!=null?a=d+c.search+c.hash:s=!0}catch{Un(!1,`<Link to="${a}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:s,to:a}}var Ei=Symbol("Uninstrumented");function w5(e,n){let a={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(s=>s({id:n.id,index:n.index,path:n.path,instrument(u){let c=Object.keys(a);for(let d of c)u[d]&&a[d].push(u[d])}}));let o={};if(typeof n.lazy=="function"&&a.lazy.length>0){let s=xl(a.lazy,n.lazy,()=>{});s&&(o.lazy=s)}if(typeof n.lazy=="object"){let s=n.lazy;["middleware","loader","action"].forEach(u=>{let c=s[u],d=a[`lazy.${u}`];if(typeof c=="function"&&d.length>0){let p=xl(d,c,()=>{});p&&(o.lazy=Object.assign(o.lazy||{},{[u]:p}))}})}return["loader","action"].forEach(s=>{let u=n[s];if(typeof u=="function"&&a[s].length>0){let c=u[Ei]??u,d=xl(a[s],c,(...p)=>Ew(p[0]));d&&(s==="loader"&&c.hydrate===!0&&(d.hydrate=!0),d[Ei]=c,o[s]=d)}}),n.middleware&&n.middleware.length>0&&a.middleware.length>0&&(o.middleware=n.middleware.map(s=>{let u=s[Ei]??s,c=xl(a.middleware,u,(...d)=>Ew(d[0]));return c?(c[Ei]=u,c):s})),o}function R5(e,n){let a={navigate:[],fetch:[]};if(n.forEach(o=>o({instrument(s){let u=Object.keys(s);for(let c of u)s[c]&&a[c].push(s[c])}})),a.navigate.length>0){let o=e.navigate[Ei]??e.navigate,s=xl(a.navigate,o,(...u)=>{let[c,d]=u;return{to:typeof c=="number"||typeof c=="string"?c:c?zr(c):".",...Cw(e,d??{})}});s&&(s[Ei]=o,e.navigate=s)}if(a.fetch.length>0){let o=e.fetch[Ei]??e.fetch,s=xl(a.fetch,o,(...u)=>{let[c,,d,p]=u;return{href:d??".",fetcherKey:c,...Cw(e,p??{})}});s&&(s[Ei]=o,e.fetch=s)}return e}function xl(e,n,a){return e.length===0?null:async(...o)=>{let s=await IT(e,a(...o),()=>n(...o),e.length-1);if(s.type==="error")throw s.value;return s.value}}async function IT(e,n,a,o){let s=e[o],u;if(s){let c,d=async()=>(c?console.error("You cannot call instrumented handlers more than once"):c=IT(e,n,a,o-1),u=await c,_t(u,"Expected a result"),u.type==="error"&&u.value instanceof Error?{status:"error",error:u.value}:{status:"success",error:void 0});try{await s(d,n)}catch(p){console.error("An instrumentation function threw an error:",p)}c||await d(),await c}else try{u={type:"success",value:await a()}}catch(c){u={type:"error",value:c}}return u||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function Ew(e){let{request:n,context:a,params:o,pattern:s}=e;return{request:E5(n),params:{...o},pattern:s,context:C5(a)}}function Cw(e,n){return{currentUrl:zr(e.state.location),..."formMethod"in n?{formMethod:n.formMethod}:{},..."formEncType"in n?{formEncType:n.formEncType}:{},..."formData"in n?{formData:n.formData}:{},..."body"in n?{body:n.body}:{}}}function E5(e){return{method:e.method,url:e.url,headers:{get:(...n)=>e.headers.get(...n)}}}function C5(e){if(O5(e)){let n={...e};return Object.freeze(n),n}else return{get:n=>e.get(n)}}var T5=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function O5(e){if(e===null||typeof e!="object")return!1;const n=Object.getPrototypeOf(e);return n===Object.prototype||n===null||Object.getOwnPropertyNames(n).sort().join("\0")===T5}var Tw=new URL("http://localhost");function Sv(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),Tw)}catch{return Tw}}function I0(e,n){return e.origin===n.origin&&(e.origin!=="null"||e.protocol===n.protocol&&e.host===n.host)}function M5(e,n){if(e.startsWith("//"))return!0;let a=n.protocol.toLowerCase();return e.toLowerCase().startsWith(a)?n.host===""||e.slice(a.length).startsWith("//"):!1}function Ml(e,n,a,o){let s=null;try{s=e==null?null:new URL(e,a)}catch{}let u=new URL(n,a),c=s!=null&&!I0(s,a),d=!I0(u,a);if(o==="reject"){if(c||d)throw new Error("External navigation is not allowed")}else if(d&&(s==null||!M5(e,s)||!I0(s,u)))throw new Error("External navigation is not allowed")}var kT=["POST","PUT","PATCH","DELETE"],A5=new Set(kT),D5=["GET",...kT],N5=new Set(D5),PT=new Set([301,302,303,307,308]),j5=new Set([307,308]),k0={state:"idle",location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},I5={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Gu={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},k5=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),LT="remix-router-transitions",zT=Symbol("ResetLoaderData"),ls,ml,bi,yl,P5=class{constructor(e){Wu(this,ls),Wu(this,ml),Wu(this,bi),Wu(this,yl),io(this,ls,e),io(this,ml,Xf(e))}get stableRoutes(){return Ea(this,ls)}get activeRoutes(){return Ea(this,bi)??Ea(this,ls)}get branches(){return Ea(this,yl)??Ea(this,ml)}get hasHMRRoutes(){return Ea(this,bi)!=null}setRoutes(e){io(this,ls,e),io(this,ml,Xf(e))}setHmrRoutes(e){io(this,bi,e),io(this,yl,Xf(e))}commitHmrRoutes(){Ea(this,bi)&&(io(this,ls,Ea(this,bi)),io(this,ml,Ea(this,yl)),io(this,bi,void 0),io(this,yl,void 0))}};ls=new WeakMap;ml=new WeakMap;bi=new WeakMap;yl=new WeakMap;function L5(e){const n=e.window?e.window:typeof window<"u"?window:void 0,a=typeof n<"u"&&typeof n.document<"u"&&typeof n.document.createElement<"u";_t(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let o=e.hydrationRouteProperties||[],s=e.mapRouteProperties||k5,u=s;if(e.instrumentations){let _=e.instrumentations;u=Z=>({...s(Z),...w5(_.map(ne=>ne.route).filter(Boolean),Z)})}let c={},d=new P5(vc(e.routes,u,void 0,c)),p=e.basename||"/";p.startsWith("/")||(p=`/${p}`);let g=e.dataStrategy||F5,y={...e.future},h=null,b=new Set,S=null,w=null,C=null,R=null,T=e.hydrationData!=null,O=Ua(d.activeRoutes,e.history.location,p,!1,d.branches),M=!1,A=null,N,P;if(O==null&&!e.patchRoutesOnNavigation){let _=Ca(404,{pathname:e.history.location.pathname}),{matches:Z,route:ne}=Af(d.activeRoutes);N=!0,P=!N,O=Z,A={[ne.id]:_}}else if(O&&!e.hydrationData&&ke(O,d.activeRoutes,e.history.location.pathname).active&&(O=null),O)if(O.some(_=>_.route.lazy))N=!1,P=!N;else if(!O.some(_=>wv(_.route)))N=!0,P=!N;else{let _=e.hydrationData?e.hydrationData.loaderData:null,Z=e.hydrationData?e.hydrationData.errors:null,ne=O;if(Z){let ye=O.findIndex(xe=>Z[xe.route.id]!==void 0);ne=ne.slice(0,ye+1)}P=!1,N=!0,ne.forEach(ye=>{let xe=_T(ye.route,_,Z);P=P||xe.renderFallback,N=N&&!xe.shouldLoad})}else{N=!1,P=!N,O=[];let _=ke(null,d.activeRoutes,e.history.location.pathname);_.active&&_.matches&&(M=!0,O=_.matches)}let I,D={historyAction:e.history.action,location:e.history.location,matches:O,initialized:N,renderFallback:P,navigation:k0,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||A,fetchers:new Map,blockers:new Map},z="POP",F=null,G=!1,J,Y=!1,U=new Map,H=null,L=!1,$=!1,K=new Set,V=new Map,X=0,ee=-1,q=new Map,se=new Set,j=new Map,B=new Map,W=new Set,re=new Map,Re,le=null;function me(){if(h=e.history.listen(({action:_,location:Z,delta:ne})=>{if(Re){Re(),Re=void 0;return}Un(re.size===0||ne!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let ye=vt({currentLocation:D.location,nextLocation:Z,historyAction:_});if(ye&&ne!=null){let xe=new Promise(qe=>{Re=qe});e.history.go(ne*-1),ft(ye,{state:"blocked",location:Z,proceed(){ft(ye,{state:"proceeding",proceed:void 0,reset:void 0,location:Z}),xe.then(()=>e.history.go(ne))},reset(){let qe=new Map(D.blockers);qe.set(ye,Gu),Te({blockers:qe})}}),F?.resolve(),F=null;return}return Le(_,Z)}),a){iL(n,U);let _=()=>sL(n,U);n.addEventListener("pagehide",_),H=()=>n.removeEventListener("pagehide",_)}return D.initialized||Le("POP",D.location,{initialHydration:!0}),I}function ge(){h&&h(),H&&H(),b.clear(),J&&J.abort(),D.fetchers.forEach((_,Z)=>Ot(D.fetchers,Z)),D.blockers.forEach((_,Z)=>$t(Z))}function ce(_){if(b.add(_),S){let{newErrors:Z}=S;S=null,_(D,{deletedFetchers:[],newErrors:Z,viewTransitionOpts:void 0,flushSync:!1})}return()=>b.delete(_)}function Te(_,Z={}){_.matches&&(_.matches=_.matches.map(xe=>{let qe=c[xe.route.id],Ve=xe.route;return Ve.element!==qe.element||Ve.errorElement!==qe.errorElement||Ve.hydrateFallbackElement!==qe.hydrateFallbackElement?{...xe,route:qe}:xe})),D={...D,..._};let ne=[],ye=[];D.fetchers.forEach((xe,qe)=>{xe.state==="idle"&&(W.has(qe)?ne.push(qe):ye.push(qe))}),W.forEach(xe=>{!D.fetchers.has(xe)&&!V.has(xe)&&ne.push(xe)}),b.size===0&&(S={newErrors:_.errors??null}),[...b].forEach(xe=>xe(D,{deletedFetchers:ne,newErrors:_.errors??null,viewTransitionOpts:Z.viewTransitionOpts,flushSync:Z.flushSync===!0})),ne.forEach(xe=>Ot(D.fetchers,xe)),ye.forEach(xe=>D.fetchers.delete(xe))}function ve(_,Z,{flushSync:ne}={}){let ye=D.actionData!=null&&D.navigation.formMethod!=null&&Er(D.navigation.formMethod)&&D.navigation.state==="loading"&&_.state?._isRedirect!==!0,xe;Z.actionData?Object.keys(Z.actionData).length>0?xe=Z.actionData:xe=null:ye?xe=D.actionData:xe=null;let qe=Z.loaderData?Lw(D.loaderData,Z.loaderData,Z.matches||[],Z.errors):D.loaderData,Ve=D.blockers;Ve.size>0&&(Ve=new Map(Ve),Ve.forEach((tt,St)=>Ve.set(St,Gu)));let Xe=L?!1:ot(_,Z.matches||D.matches),$e=G===!0||D.navigation.formMethod!=null&&Er(D.navigation.formMethod)&&_.state?._isRedirect!==!0;d.commitHmrRoutes(),L||z==="POP"||(z==="PUSH"?e.history.push(_,_.state):z==="REPLACE"&&e.history.replace(_,_.state));let st;if(z==="POP"&&!L&&_!==D.location){let tt=U.get(D.location.pathname);tt&&tt.has(_.pathname)?st={currentLocation:D.location,nextLocation:_}:U.has(_.pathname)&&(st={currentLocation:_,nextLocation:D.location})}else if(Y){let tt=U.get(D.location.pathname);tt?tt.add(_.pathname):(tt=new Set([_.pathname]),U.set(D.location.pathname,tt)),st={currentLocation:D.location,nextLocation:_}}Te({...Z,actionData:xe,loaderData:qe,historyAction:z,location:_,initialized:!0,renderFallback:!1,navigation:k0,revalidation:"idle",restoreScrollPosition:Xe,preventScrollReset:$e,blockers:Ve},{viewTransitionOpts:st,flushSync:ne===!0}),z="POP",G=!1,Y=!1,L=!1,$=!1,F?.resolve(),F=null,le?.resolve(),le=null}async function Pe(_,Z){if(F?.resolve(),F=null,typeof _=="number"){F||(F=Uw());let Ht=F.promise;return e.history.go(_),Ht}let ne=hy(D.location,D.matches,p,_,Z?.fromRouteId,Z?.relative),{path:ye,submission:xe,error:qe}=Ow(!1,ne,Z),Ve;if(Z?.mask){let Ht=typeof Z.mask=="string"?Ka(Z.mask):{...D.location.mask,...Z.mask};if(Ve={pathname:Ht.pathname??"",search:Ht.search??"",hash:Ht.hash??""},gp.test(Ve.pathname))throw new Error("External navigation is not allowed");Ve.pathname.startsWith("\\")&&(Ve.pathname=Ve.pathname.replace(/^\\+/,"/")),Ml(typeof Z.mask=="string"?Z.mask:zr(Z.mask),zr(Ve),e.history.createURL("/"),"reject")}let Xe=D.location,$e=yc(Xe,ye,Z&&Z.state,void 0,Ve);$e={...$e,...e.history.encodeLocation($e)},Ml(_==null?e.history.createHref(D.location):typeof _=="string"?_:zr(_),e.history.createHref($e.mask||$e),e.history.createURL("/"),"reject");let st=Z&&Z.replace!=null?Z.replace:void 0,tt="PUSH";st===!0?tt="REPLACE":st===!1||xe!=null&&Er(xe.formMethod)&&xe.formAction===D.location.pathname+D.location.search&&(tt="REPLACE");let St=Z&&"preventScrollReset"in Z?Z.preventScrollReset===!0:void 0,ct=(Z&&Z.flushSync)===!0,Bt=vt({currentLocation:Xe,nextLocation:$e,historyAction:tt});if(Bt){ft(Bt,{state:"blocked",location:$e,proceed(){ft(Bt,{state:"proceeding",proceed:void 0,reset:void 0,location:$e}),Pe(_,Z)},reset(){let Ht=new Map(D.blockers);Ht.set(Bt,Gu),Te({blockers:Ht})}});return}await Le(tt,$e,{submission:xe,pendingError:qe,preventScrollReset:St,replace:Z&&Z.replace,enableViewTransition:Z&&Z.viewTransition,flushSync:ct,callSiteDefaultShouldRevalidate:Z&&Z.defaultShouldRevalidate})}function Me(){le||(le=Uw()),De(),Te({revalidation:"loading"});let _=le.promise;return D.navigation.state==="submitting"?_:D.navigation.state==="idle"?(Le(D.historyAction,D.location,{startUninterruptedRevalidation:!0}),_):(Le(z||D.historyAction,D.navigation.location,{overrideNavigation:D.navigation,enableViewTransition:Y===!0}),_)}async function Le(_,Z,ne){J&&J.abort(),J=null,z=_,L=(ne&&ne.startUninterruptedRevalidation)===!0,Ie(D.location,D.matches),G=(ne&&ne.preventScrollReset)===!0,Y=(ne&&ne.enableViewTransition)===!0;let ye=d.activeRoutes,xe=ne?.initialHydration&&D.matches&&D.matches.length>0&&!M?D.matches:Ua(ye,Z,p,!1,d.branches),qe=(ne&&ne.flushSync)===!0;if(xe&&D.initialized&&!$&&Q5(D.location,Z)&&!(ne&&ne.submission&&Er(ne.submission.formMethod))){ve(Z,{matches:xe},{flushSync:qe});return}let Ve=ke(xe,ye,Z.pathname);if(Ve.active&&Ve.matches&&(xe=Ve.matches),!xe){let{error:Vt,notFoundMatches:Ut,route:En}=gt(Z.pathname);ve(Z,{matches:Ut,loaderData:{},errors:{[En.id]:Vt}},{flushSync:qe});return}let Xe=ne&&ne.overrideNavigation?{...ne.overrideNavigation,matches:xe,historyAction:_}:void 0;J=new AbortController;let $e=vl(e.history,Z,J.signal,ne&&ne.submission),st=e.getContext?await e.getContext():new xw,tt;if(ne&&ne.pendingError)tt=[wi(xe).route.id,{type:"error",error:ne.pendingError}];else if(ne&&ne.submission&&Er(ne.submission.formMethod)){let Vt=await Fe($e,Z,ne.submission,xe,_,st,Ve.active,ne&&ne.initialHydration===!0,{replace:ne.replace,flushSync:qe});if(Vt.shortCircuited)return;if(Vt.pendingActionResult){let[Ut,En]=Vt.pendingActionResult;if(ua(En)&&bc(En.error)&&En.error.status===404){J=null,ve(Z,{matches:Vt.matches,loaderData:{},errors:{[Ut]:En.error}});return}}xe=Vt.matches||xe,tt=Vt.pendingActionResult,Xe=P0(Z,xe,_,ne.submission),qe=!1,Ve.active=!1,$e=vl(e.history,$e.url,$e.signal)}let{shortCircuited:St,matches:ct,loaderData:Bt,errors:Ht,workingFetchers:On}=await Oe($e,Z,xe,_,st,Ve.active,Xe,ne&&ne.submission,ne&&ne.fetcherSubmission,ne&&ne.replace,ne&&ne.initialHydration===!0,qe,tt,ne&&ne.callSiteDefaultShouldRevalidate);St||(J=null,ve(Z,{matches:ct||xe,...zw(tt),loaderData:Bt,errors:Ht,...On?{fetchers:On}:{}}))}async function Fe(_,Z,ne,ye,xe,qe,Ve,Xe,$e={}){De();let st=aL(Z,ye,xe,ne);if(Te({navigation:st},{flushSync:$e.flushSync===!0}),Ve){let ct=await ze(ye,Z.pathname,_.signal);if(ct.type==="aborted")return{shortCircuited:!0};if(ct.type==="error"){if(ct.partialMatches.length===0){let{matches:Ht,route:On}=Af(d.activeRoutes);return{matches:Ht,pendingActionResult:[On.id,{type:"error",error:ct.error}]}}let Bt=wi(ct.partialMatches).route.id;return{matches:ct.partialMatches,pendingActionResult:[Bt,{type:"error",error:ct.error}]}}else if(ct.matches)ye=ct.matches;else{let{notFoundMatches:Bt,error:Ht,route:On}=gt(Z.pathname);return{matches:Bt,pendingActionResult:[On.id,{type:"error",error:Ht}]}}}let tt,St=Qf(ye,Z);if(!St.route.action&&!St.route.lazy)tt={type:"error",error:Ca(405,{method:_.method,pathname:Z.pathname,routeId:St.route.id})};else{let ct=Al(u,c,_,Z,ye,St,Xe?[]:o,qe),Bt=await we(_,Z,ct,qe,null);if(tt=Bt[St.route.id],!tt){for(let Ht of ye)if(Bt[Ht.route.id]){tt=Bt[Ht.route.id];break}}if(_.signal.aborted)return{shortCircuited:!0}}if(ds(tt)){let ct;return $e&&$e.replace!=null?ct=$e.replace:ct=Iw(tt.response.headers.get("Location"),new URL(_.url),p,e.history)===D.location.pathname+D.location.search,await de(_,tt,!0,{submission:ne,replace:ct}),{shortCircuited:!0}}if(ua(tt)){let ct=wi(ye,St.route.id);return($e&&$e.replace)!==!0&&(z="PUSH"),{matches:ye,pendingActionResult:[ct.route.id,tt,St.route.id]}}return{matches:ye,pendingActionResult:[St.route.id,tt]}}async function Oe(_,Z,ne,ye,xe,qe,Ve,Xe,$e,st,tt,St,ct,Bt){let Ht=Ve||P0(Z,ne,ye,Xe),On=Xe||$e||Hw(Ht),Vt=!L&&!tt;if(qe){if(Vt){let Yn=He(ct);Te({navigation:Ht,...Yn!==void 0?{actionData:Yn}:{}},{flushSync:St})}let Pt=await ze(ne,Z.pathname,_.signal);if(Pt.type==="aborted")return{shortCircuited:!0};if(Pt.type==="error"){if(Pt.partialMatches.length===0){let{matches:Fn,route:fr}=Af(d.activeRoutes);return{matches:Fn,loaderData:{},errors:{[fr.id]:Pt.error}}}let Yn=wi(Pt.partialMatches).route.id;return{matches:Pt.partialMatches,loaderData:{},errors:{[Yn]:Pt.error}}}else if(Pt.matches)ne=Pt.matches;else{let{error:Yn,notFoundMatches:Fn,route:fr}=gt(Z.pathname);return{matches:Fn,loaderData:{},errors:{[fr.id]:Yn}}}}let Ut=d.activeRoutes,{dsMatches:En,revalidatingFetchers:Cn}=Mw(_,xe,u,c,e.history,D,ne,On,Z,tt?[]:o,tt===!0,$,K,W,j,se,Ut,p,e.patchRoutesOnNavigation!=null,d.branches,ct,Bt);if(ee=++X,!e.dataStrategy&&!En.some(Pt=>Pt.shouldLoad)&&!En.some(Pt=>Pt.route.middleware&&Pt.route.middleware.length>0)&&Cn.length===0){let Pt=new Map(D.fetchers),Yn=en(Pt);return ve(Z,{matches:ne,loaderData:{},errors:ct&&ua(ct[1])?{[ct[0]]:ct[1].error}:null,...zw(ct),...Yn?{fetchers:Pt}:{}},{flushSync:St}),{shortCircuited:!0}}if(Vt){let Pt={};if(!qe){Pt.navigation=Ht;let Yn=He(ct);Yn!==void 0&&(Pt.actionData=Yn)}Cn.length>0&&(Pt.fetchers=be(Cn)),Te(Pt,{flushSync:St})}Cn.forEach(Pt=>{Wt(Pt.key),Pt.controller&&V.set(Pt.key,Pt.controller)});let Qr=()=>Cn.forEach(Pt=>Wt(Pt.key));J&&J.signal.addEventListener("abort",Qr);let{loaderResults:cn,fetcherResults:dn}=await Ke(En,Cn,_,Z,xe);if(_.signal.aborted)return{shortCircuited:!0};J&&J.signal.removeEventListener("abort",Qr),Cn.forEach(Pt=>V.delete(Pt.key));let Mn=Df(cn);if(Mn)return await de(_,Mn.result,!0,{replace:st}),{shortCircuited:!0};if(Mn=Df(dn),Mn)return se.add(Mn.key),await de(_,Mn.result,!0,{replace:st}),{shortCircuited:!0};let jn=new Map(D.fetchers),{loaderData:vo,errors:Or}=Pw(D,ne,cn,ct,Cn,dn,jn);tt&&D.errors&&(Or={...D.errors,...Or});let Ia=en(jn),Zr=We(ee,jn),pa=Ia||Zr||Cn.length>0;return{matches:ne,loaderData:vo,errors:Or,...pa?{workingFetchers:jn}:{}}}function He(_){if(_&&!ua(_[1]))return{[_[0]]:_[1].data};if(D.actionData)return Object.keys(D.actionData).length===0?null:D.actionData}function be(_){let Z=new Map(D.fetchers);return _.forEach(ne=>{let ye=Z.get(ne.key),xe=$u(void 0,ye?ye.data:void 0);Z.set(ne.key,xe)}),Z}async function Ue(_,Z,ne,ye){Wt(_);let xe=(ye&&ye.flushSync)===!0,qe=d.activeRoutes,Ve=hy(D.location,D.matches,p,ne,Z,ye?.relative),Xe=Ua(qe,Ve,p,!1,d.branches),$e=ke(Xe,qe,Ve);if($e.active&&$e.matches&&(Xe=$e.matches),!Xe){yt(_,Z,Ca(404,{pathname:Ve}),{flushSync:xe});return}let{path:st,submission:tt,error:St}=Ow(!0,Ve,ye);if(St){yt(_,Z,St,{flushSync:xe});return}let ct=e.getContext?await e.getContext():new xw,Bt=(ye&&ye.preventScrollReset)===!0;if(tt&&Er(tt.formMethod)){await Ze(_,Z,st,Xe,ct,$e.active,xe,Bt,tt,ye&&ye.defaultShouldRevalidate);return}j.set(_,{routeId:Z,path:st}),await it(_,Z,st,Xe,ct,$e.active,xe,Bt,tt)}async function Ze(_,Z,ne,ye,xe,qe,Ve,Xe,$e,st){De(),j.delete(_);let tt=D.fetchers.get(_);je(_,oL($e,tt),{flushSync:Ve});let St=new AbortController,ct=vl(e.history,ne,St.signal,$e);if(qe){let Se=await ze(ye,new URL(ct.url).pathname,ct.signal,_);if(Se.type==="aborted")return;if(Se.type==="error"){yt(_,Z,Se.error,{flushSync:Ve});return}else if(Se.matches)ye=Se.matches;else{yt(_,Z,Ca(404,{pathname:ne}),{flushSync:Ve});return}}let Bt=Qf(ye,ne);if(!Bt.route.action&&!Bt.route.lazy){let Se=Ca(405,{method:$e.formMethod,pathname:ne,routeId:Z});yt(_,Z,Se,{flushSync:Ve});return}V.set(_,St);let Ht=X,On=Al(u,c,ct,ne,ye,Bt,o,xe),Vt=await we(ct,ne,On,xe,_),Ut=Vt[Bt.route.id];if(!Ut){for(let Se of On)if(Vt[Se.route.id]){Ut=Vt[Se.route.id];break}}if(ct.signal.aborted){V.get(_)===St&&V.delete(_);return}if(W.has(_)){if(ds(Ut)||ua(Ut)){je(_,so(void 0));return}}else{if(ds(Ut))if(V.delete(_),ee>Ht){je(_,so(void 0));return}else return se.add(_),je(_,$u($e)),de(ct,Ut,!1,{fetcherSubmission:$e,preventScrollReset:Xe});if(ua(Ut)){yt(_,Z,Ut.error);return}}let En=D.navigation.location||D.location,Cn=vl(e.history,En,St.signal),Qr=d.activeRoutes,cn=D.navigation.state!=="idle"?Ua(Qr,D.navigation.location,p,!1,d.branches):D.matches;_t(cn,"Didn't find any matches after fetcher action");let dn=++X;q.set(_,dn);let{dsMatches:Mn,revalidatingFetchers:jn}=Mw(Cn,xe,u,c,e.history,D,cn,$e,En,o,!1,$,K,W,j,se,Qr,p,e.patchRoutesOnNavigation!=null,d.branches,[Bt.route.id,Ut],st),vo=$u($e,Ut.data),Or=new Map(D.fetchers);Or.set(_,vo),jn.filter(Se=>Se.key!==_).forEach(Se=>{let nt=Se.key,Ct=Or.get(nt),wt=$u(void 0,Ct?Ct.data:void 0);Or.set(nt,wt),Wt(nt),Se.controller&&V.set(nt,Se.controller)}),Te({fetchers:Or});let Ia=()=>jn.forEach(Se=>Wt(Se.key));St.signal.addEventListener("abort",Ia);let{loaderResults:Zr,fetcherResults:pa}=await Ke(Mn,jn,Cn,En,xe);if(St.signal.aborted)return;St.signal.removeEventListener("abort",Ia),q.delete(_),V.delete(_),jn.forEach(Se=>V.delete(Se.key));let Pt=D.fetchers.has(_),Yn=Se=>{if(!Pt)return Se;let nt=new Map(Se.fetchers);return nt.set(_,so(Ut.data)),{...Se,fetchers:nt}},Fn=Df(Zr);if(Fn)return D=Yn(D),de(Cn,Fn.result,!1,{preventScrollReset:Xe});if(Fn=Df(pa),Fn)return se.add(Fn.key),D=Yn(D),de(Cn,Fn.result,!1,{preventScrollReset:Xe});let fr=new Map(D.fetchers);Pt&&fr.set(_,so(Ut.data));let{loaderData:he,errors:Ae}=Pw(D,cn,Zr,void 0,jn,pa,fr);We(dn,fr),D.navigation.state==="loading"&&dn>ee?(_t(z,"Expected pending action"),J&&J.abort(),ve(D.navigation.location,{matches:cn,loaderData:he,errors:Ae,fetchers:fr})):(Te({errors:Ae,loaderData:Lw(D.loaderData,he,cn,Ae),fetchers:fr}),$=!1)}async function it(_,Z,ne,ye,xe,qe,Ve,Xe,$e){let st=D.fetchers.get(_);je(_,$u($e,st?st.data:void 0),{flushSync:Ve});let tt=new AbortController,St=vl(e.history,ne,tt.signal);if(qe){let Ut=await ze(ye,new URL(St.url).pathname,St.signal,_);if(Ut.type==="aborted")return;if(Ut.type==="error"){yt(_,Z,Ut.error,{flushSync:Ve});return}else if(Ut.matches)ye=Ut.matches;else{yt(_,Z,Ca(404,{pathname:ne}),{flushSync:Ve});return}}let ct=Qf(ye,ne);V.set(_,tt);let Bt=X,Ht=Al(u,c,St,ne,ye,ct,o,xe),On=await we(St,ne,Ht,xe,_),Vt=On[ct.route.id];if(!Vt){for(let Ut of ye)if(On[Ut.route.id]){Vt=On[Ut.route.id];break}}if(V.get(_)===tt&&V.delete(_),!St.signal.aborted){if(W.has(_)){je(_,so(void 0));return}if(ds(Vt))if(ee>Bt){je(_,so(void 0));return}else{se.add(_),await de(St,Vt,!1,{preventScrollReset:Xe});return}if(ua(Vt)){yt(_,Z,Vt.error);return}je(_,so(Vt.data))}}async function de(_,Z,ne,{submission:ye,fetcherSubmission:xe,preventScrollReset:qe,replace:Ve}={}){ne||(F?.resolve(),F=null),Z.response.headers.has("X-Remix-Revalidate")&&($=!0);let Xe=Z.response.headers.get("Location");_t(Xe,"Expected a Location header on the redirect Response");let $e=Xe,st=new URL(_.url);Xe=Iw(Xe,st,p,e.history),Ml($e,Xe,st,"allow-explicit");let tt=yc(D.location,Xe,{_isRedirect:!0});if(a){let Vt=!1;if(Z.response.headers.has("X-Remix-Reload-Document"))Vt=!0;else if(bv(Xe)){const Ut=RT(n,Xe,!0);Vt=Ut.origin!==n.location.origin||Na(Ut.pathname,p)==null}if(Vt){Ve?n.location.replace(Xe):n.location.assign(Xe);return}}J=null;let St=Ve===!0||Z.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:ct,formAction:Bt,formEncType:Ht}=D.navigation;!ye&&!xe&&ct&&Bt&&Ht&&(ye=Hw(D.navigation));let On=ye||xe;if(j5.has(Z.response.status)&&On&&Er(On.formMethod))await Le(St,tt,{submission:{...On,formAction:Xe},preventScrollReset:qe||G,enableViewTransition:ne?Y:void 0});else{let Vt=P0(tt,[],St,ye);await Le(St,tt,{overrideNavigation:Vt,fetcherSubmission:xe,preventScrollReset:qe||G,enableViewTransition:ne?Y:void 0})}}async function we(_,Z,ne,ye,xe){let qe,Ve={};try{qe=await V5(g,_,Z,ne,xe,ye,!1)}catch(Xe){return ne.filter($e=>$e.shouldLoad).forEach($e=>{Ve[$e.route.id]={type:"error",error:Xe}}),Ve}if(_.signal.aborted)return Ve;if(!Er(_.method))for(let Xe of ne){if(qe[Xe.route.id]?.type==="error")break;!qe.hasOwnProperty(Xe.route.id)&&!D.loaderData.hasOwnProperty(Xe.route.id)&&(!D.errors||!D.errors.hasOwnProperty(Xe.route.id))&&Xe.shouldCallHandler()&&(qe[Xe.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${Xe.route.id}`)})}for(let[Xe,$e]of Object.entries(qe))if(eL($e)){let st=$e.result;Ve[Xe]={type:"redirect",response:G5(st,_,Xe,ne,p)}}else Ve[Xe]=await K5($e);return Ve}async function Ke(_,Z,ne,ye,xe){let qe=we(ne,ye,_,xe,null),Ve=Promise.all(Z.map(async st=>{if(st.matches&&st.match&&st.request&&st.controller){let St=(await we(st.request,st.path,st.matches,xe,st.key))[st.match.route.id];return{[st.key]:St}}else return Promise.resolve({[st.key]:{type:"error",error:Ca(404,{pathname:st.path})}})})),Xe=await qe,$e=(await Ve).reduce((st,tt)=>Object.assign(st,tt),{});return{loaderResults:Xe,fetcherResults:$e}}function De(){$=!0,j.forEach((_,Z)=>{V.has(Z)&&K.add(Z),Wt(Z)})}function je(_,Z,ne={}){let ye=new Map(D.fetchers);ye.set(_,Z),Te({fetchers:ye},{flushSync:(ne&&ne.flushSync)===!0})}function yt(_,Z,ne,ye={}){let xe=wi(D.matches,Z),qe=new Map(D.fetchers);Ot(qe,_),Te({errors:{[xe.route.id]:ne},fetchers:qe},{flushSync:(ye&&ye.flushSync)===!0})}function ut(_){return B.set(_,(B.get(_)||0)+1),W.has(_)&&W.delete(_),D.fetchers.get(_)||I5}function ht(_,Z){Wt(_,Z?.reason),je(_,so(null))}function Ot(_,Z){let ne=D.fetchers.get(Z);V.has(Z)&&!(ne&&ne.state==="loading"&&q.has(Z))&&Wt(Z),j.delete(Z),q.delete(Z),se.delete(Z),W.delete(Z),K.delete(Z),_.delete(Z)}function Dt(_){let Z=(B.get(_)||0)-1;Z<=0?(B.delete(_),W.add(_)):B.set(_,Z),Te({fetchers:new Map(D.fetchers)})}function Wt(_,Z){let ne=V.get(_);ne&&(ne.abort(Z),V.delete(_))}function rn(_,Z){for(let ne of _){let ye=Z.get(ne);_t(ye,`Expected fetcher: ${ne}`);let xe=so(ye.data);Z.set(ne,xe)}}function en(_){let Z=[],ne=!1;for(let ye of se){let xe=_.get(ye);_t(xe,`Expected fetcher: ${ye}`),xe.state==="loading"&&(se.delete(ye),Z.push(ye),ne=!0)}return rn(Z,_),ne}function We(_,Z){let ne=[];for(let[ye,xe]of q)if(xe<_){let qe=Z.get(ye);_t(qe,`Expected fetcher: ${ye}`),qe.state==="loading"&&(Wt(ye),q.delete(ye),ne.push(ye))}return rn(ne,Z),ne.length>0}function xt(_,Z){let ne=D.blockers.get(_)||Gu;return re.get(_)!==Z&&re.set(_,Z),ne}function $t(_){D.blockers.delete(_),re.delete(_)}function ft(_,Z){let ne=D.blockers.get(_)||Gu;_t(ne.state==="unblocked"&&Z.state==="blocked"||ne.state==="blocked"&&Z.state==="blocked"||ne.state==="blocked"&&Z.state==="proceeding"||ne.state==="blocked"&&Z.state==="unblocked"||ne.state==="proceeding"&&Z.state==="unblocked",`Invalid blocker state transition: ${ne.state} -> ${Z.state}`);let ye=new Map(D.blockers);ye.set(_,Z),Te({blockers:ye})}function vt({currentLocation:_,nextLocation:Z,historyAction:ne}){if(re.size===0)return;re.size>1&&Un(!1,"A router only supports one blocker at a time");let ye=Array.from(re.entries()),[xe,qe]=ye[ye.length-1],Ve=D.blockers.get(xe);if(!(Ve&&Ve.state==="proceeding")&&qe({currentLocation:_,nextLocation:Z,historyAction:ne}))return xe}function gt(_){let Z=Ca(404,{pathname:_}),ne=d.activeRoutes,{matches:ye,route:xe}=Af(ne);return{notFoundMatches:ye,route:xe,error:Z}}function Lt(_,Z,ne){if(w=_,R=Z,C=ne||null,!T&&D.navigation===k0){T=!0;let ye=ot(D.location,D.matches);ye!=null&&Te({restoreScrollPosition:ye})}return()=>{w=null,R=null,C=null}}function un(_,Z){return C&&C(_,Z.map(ye=>CT(ye,D.loaderData)))||_.key}function Ie(_,Z){if(w&&R){let ne=un(_,Z);w[ne]=R()}}function ot(_,Z){if(w){let ne=un(_,Z),ye=w[ne];if(typeof ye=="number")return ye}return null}function ke(_,Z,ne){if(e.patchRoutesOnNavigation){let ye=d.branches;if(_){if(Object.keys(_[0].params).length>0)return{active:!0,matches:Ua(Z,ne,p,!0,ye)}}else return{active:!0,matches:Ua(Z,ne,p,!0,ye)||[]}}return{active:!1,matches:null}}async function ze(_,Z,ne,ye){if(!e.patchRoutesOnNavigation)return{type:"success",matches:_};let xe=_;for(;;){let qe=c;try{await e.patchRoutesOnNavigation({signal:ne,path:Z,matches:xe,fetcherKey:ye,patch:(st,tt)=>{ne.aborted||Aw(st,tt,d,qe,u,!1)}})}catch(st){return{type:"error",error:st,partialMatches:xe}}if(ne.aborted)return{type:"aborted"};let Ve=d.branches,Xe=Ua(d.activeRoutes,Z,p,!1,Ve),$e=null;if(Xe){if(Object.keys(Xe[0].params).length===0)return{type:"success",matches:Xe};if($e=Ua(d.activeRoutes,Z,p,!0,Ve),!($e&&xe.length<$e.length&&Ge(xe,$e.slice(0,xe.length))))return{type:"success",matches:Xe}}if($e||($e=Ua(d.activeRoutes,Z,p,!0,Ve)),!$e||Ge(xe,$e))return{type:"success",matches:null};xe=$e}}function Ge(_,Z){return _.length===Z.length&&_.every((ne,ye)=>ne.route.id===Z[ye].route.id)}function et(_){c={},d.setHmrRoutes(vc(_,u,void 0,c))}function Et(_,Z,ne=!1){Aw(_,Z,d,c,u,ne),d.hasHMRRoutes||Te({})}return I={get basename(){return p},get future(){return y},get state(){return D},get routes(){return d.stableRoutes},get branches(){return d.branches},get manifest(){return c},get window(){return n},initialize:me,subscribe:ce,enableScrollRestoration:Lt,navigate:Pe,fetch:Ue,revalidate:Me,createHref:_=>e.history.createHref(_),createURL:_=>e.history.createURL(_),encodeLocation:_=>e.history.encodeLocation(_),getFetcher:ut,resetFetcher:ht,deleteFetcher:Dt,dispose:ge,getBlocker:xt,deleteBlocker:$t,patchRoutes:Et,_internalFetchControllers:V,_internalSetRoutes:et,_internalSetStateDoNotUseOrYouWillBreakYourApp(_){Te(_)}},e.instrumentations&&(I=R5(I,e.instrumentations.map(_=>_.router).filter(Boolean))),I}function z5(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function hy(e,n,a,o,s,u){let c,d;if(s){c=[];for(let g of n)if(c.push(g),g.route.id===s){d=g;break}}else c=n,d=n[n.length-1];let p=zc(o||".",mp(c),Na(e.pathname,a)||e.pathname,u==="path");if(o==null&&(p.search=e.search,p.hash=e.hash),(o==null||o===""||o===".")&&d){let g=Ev(p.search);if(d.route.index&&!g)p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index";else if(!d.route.index&&g){let y=new URLSearchParams(p.search),h=y.getAll("index");y.delete("index"),h.filter(S=>S).forEach(S=>y.append("index",S));let b=y.toString();p.search=b?`?${b}`:""}}return a!=="/"&&(p.pathname=m5({basename:a,pathname:p.pathname})),zr(p)}function Ow(e,n,a){if(!a||!z5(a))return{path:n};if(a.formMethod&&!rL(a.formMethod))return{path:n,error:Ca(405,{method:a.formMethod})};let o=()=>({path:n,error:Ca(400,{type:"invalid-body"})}),u=(a.formMethod||"get").toUpperCase(),c=YT(n);if(a.body!==void 0){if(a.formEncType==="text/plain"){if(!Er(u))return o();let h=typeof a.body=="string"?a.body:a.body instanceof FormData||a.body instanceof URLSearchParams?Array.from(a.body.entries()).reduce((b,[S,w])=>`${b}${S}=${w}
|
|
11
|
-
`,""):String(a.body);return{path:n,submission:{formMethod:u,formAction:c,formEncType:a.formEncType,formData:void 0,json:void 0,text:h}}}else if(a.formEncType==="application/json"){if(!Er(u))return o();try{let h=typeof a.body=="string"?JSON.parse(a.body):a.body;return{path:n,submission:{formMethod:u,formAction:c,formEncType:a.formEncType,formData:void 0,json:h,text:void 0}}}catch{return o()}}}_t(typeof FormData=="function","FormData is not available in this environment");let d,p;if(a.formData)d=my(a.formData),p=a.formData;else if(a.body instanceof FormData)d=my(a.body),p=a.body;else if(a.body instanceof URLSearchParams)d=a.body,p=kw(d);else if(a.body==null)d=new URLSearchParams,p=new FormData;else try{d=new URLSearchParams(a.body),p=kw(d)}catch{return o()}let g={formMethod:u,formAction:c,formEncType:a&&a.formEncType||"application/x-www-form-urlencoded",formData:p,json:void 0,text:void 0};if(Er(g.formMethod))return{path:n,submission:g};let y=Ka(n);return e&&y.search&&Ev(y.search)&&d.append("index",""),y.search=`?${d}`,{path:zr(y),submission:g}}function Mw(e,n,a,o,s,u,c,d,p,g,y,h,b,S,w,C,R,T,O,M,A,N){let P=A?ua(A[1])?A[1].error:A[1].data:void 0,I=s.createURL(u.location),D=s.createURL(p),z;if(y&&u.errors){let L=Object.keys(u.errors)[0];z=c.findIndex($=>$.route.id===L)}else if(A&&ua(A[1])){let L=A[0];z=c.findIndex($=>$.route.id===L)-1}let F=A?A[1].statusCode:void 0,G=F&&F>=400,J={currentUrl:I,currentParams:u.matches[0]?.params||{},nextUrl:D,nextParams:c[0].params,...d,actionResult:P,actionStatus:F},Y=Hc(c),U=c.map((L,$)=>{let{route:K}=L,V=null;if(z!=null&&$>z)V=!1;else if(K.lazy)V=!0;else if(!wv(K))V=!1;else if(y){let{shouldLoad:se}=_T(K,u.loaderData,u.errors);V=se}else _5(u.loaderData,u.matches[$],L)&&(V=!0);if(V!==null)return py(a,o,e,p,Y,L,g,n,V);let X=!1;typeof N=="boolean"?X=N:G?X=!1:(h||I.pathname+I.search===D.pathname+D.search||I.search!==D.search||H5(u.matches[$],L))&&(X=!0);let ee={...J,defaultShouldRevalidate:X},q=ac(L,ee);return py(a,o,e,p,Y,L,g,n,q,ee,N)}),H=[];return w.forEach((L,$)=>{if(y||!c.some(B=>B.route.id===L.routeId)||S.has($))return;let K=u.fetchers.get($),V=K&&K.state!=="idle"&&K.data===void 0,X=Ua(R,L.path,T??"/",!1,M);if(!X){if(O&&V)return;H.push({key:$,routeId:L.routeId,path:L.path,matches:null,match:null,request:null,controller:null});return}if(C.has($))return;let ee=Qf(X,L.path),q=new AbortController,se=vl(s,L.path,q.signal),j=null;if(b.has($))b.delete($),j=Al(a,o,se,L.path,X,ee,g,n);else if(V)h&&(j=Al(a,o,se,L.path,X,ee,g,n));else{let B;typeof N=="boolean"?B=N:G?B=!1:B=h;let W={...J,defaultShouldRevalidate:B};ac(ee,W)&&(j=Al(a,o,se,L.path,X,ee,g,n,W))}j&&H.push({key:$,routeId:L.routeId,path:L.path,matches:j,match:ee,request:se,controller:q})}),{dsMatches:U,revalidatingFetchers:H}}function wv(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function _T(e,n,a){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!wv(e))return{shouldLoad:!1,renderFallback:!1};let o=n!=null&&e.id in n,s=a!=null&&a[e.id]!==void 0;if(!o&&s)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader=="function"&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!o};let u=!o&&!s;return{shouldLoad:u,renderFallback:u}}function _5(e,n,a){let o=!n||a.route.id!==n.route.id,s=!e.hasOwnProperty(a.route.id);return o||s}function H5(e,n){let a=e.route.path;return e.pathname!==n.pathname||a!=null&&a.endsWith("*")&&e.params["*"]!==n.params["*"]}function ac(e,n){if(e.route.shouldRevalidate){let a=e.route.shouldRevalidate(n);if(typeof a=="boolean")return a}return n.defaultShouldRevalidate}function Aw(e,n,a,o,s,u){let c;if(e){let g=o[e];_t(g,`No route found to patch children into: routeId = ${e}`),g.children||(g.children=[]),c=g.children}else c=a.activeRoutes;let d=[],p=[];if(n.forEach(g=>{let y=c.find(h=>HT(g,h));y?p.push({existingRoute:y,newRoute:g}):d.push(g)}),d.length>0){let g=vc(d,s,[e||"_","patch",String(c?.length||"0")],o);c.push(...g)}if(u&&p.length>0)for(let g=0;g<p.length;g++){let{existingRoute:y,newRoute:h}=p[g],b=y,[S]=vc([h],s,[],{},!0);Object.assign(b,{element:S.element?S.element:b.element,errorElement:S.errorElement?S.errorElement:b.errorElement,hydrateFallbackElement:S.hydrateFallbackElement?S.hydrateFallbackElement:b.hydrateFallbackElement})}a.hasHMRRoutes||a.setRoutes([...a.activeRoutes])}function HT(e,n){return"id"in e&&"id"in n&&e.id===n.id?!0:e.index===n.index&&e.path===n.path&&e.caseSensitive===n.caseSensitive?(!e.children||e.children.length===0)&&(!n.children||n.children.length===0)?!0:e.children?.every((a,o)=>n.children?.some(s=>HT(a,s)))??!1:!1}var Dw=new WeakMap,UT=({key:e,route:n,manifest:a,mapRouteProperties:o})=>{let s=a[n.id];if(_t(s,"No route found in manifest"),!s.lazy||typeof s.lazy!="object")return;let u=s.lazy[e];if(!u)return;let c=Dw.get(s);c||(c={},Dw.set(s,c));let d=c[e];if(d)return d;let p=(async()=>{let g=t5(e),h=s[e]!==void 0&&e!=="hasErrorBoundary";if(g)Un(!g,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),c[e]=Promise.resolve();else if(h)Un(!1,`Route "${s.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let b=await u();b!=null&&(Object.assign(s,{[e]:b}),Object.assign(s,o(s)))}typeof s.lazy=="object"&&(s.lazy[e]=void 0,Object.values(s.lazy).every(b=>b===void 0)&&(s.lazy=void 0))})();return c[e]=p,p},Nw=new WeakMap;function U5(e,n,a,o,s){let u=a[e.id];if(_t(u,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let y=Nw.get(u);if(y)return{lazyRoutePromise:y,lazyHandlerPromise:y};let h=(async()=>{_t(typeof e.lazy=="function","No lazy route function found");let b=await e.lazy(),S={};for(let w in b){let C=b[w];if(C===void 0)continue;let R=r5(w),O=u[w]!==void 0&&w!=="hasErrorBoundary";R?Un(!R,"Route property "+w+" is not a supported property to be returned from a lazy route function. This property will be ignored."):O?Un(!O,`Route "${u.id}" has a static property "${w}" defined but its lazy function is also returning a value for this property. The lazy route property "${w}" will be ignored.`):S[w]=C}Object.assign(u,S),Object.assign(u,{...o(u),lazy:void 0})})();return Nw.set(u,h),h.catch(()=>{}),{lazyRoutePromise:h,lazyHandlerPromise:h}}let c=Object.keys(e.lazy),d=[],p;for(let y of c){if(s&&s.includes(y))continue;let h=UT({key:y,route:e,manifest:a,mapRouteProperties:o});h&&(d.push(h),y===n&&(p=h))}let g=d.length>0?Promise.all(d).then(()=>{}):void 0;return g?.catch(()=>{}),p?.catch(()=>{}),{lazyRoutePromise:g,lazyHandlerPromise:p}}async function jw(e){let n=e.matches.filter(s=>s.shouldLoad),a={};return(await Promise.all(n.map(s=>s.resolve()))).forEach((s,u)=>{a[n[u].route.id]=s}),a}async function F5(e){return e.matches.some(n=>n.route.middleware)?FT(e,()=>jw(e)):jw(e)}function FT(e,n){return B5(e,n,o=>{if(nL(o))throw o;return o},J5,a);function a(o,s,u){if(u)return Promise.resolve(Object.assign(u.value,{[s]:{type:"error",result:o}}));{let{matches:c}=e,d=Math.min(Math.max(c.findIndex(g=>g.route.id===s),0),Math.max(c.findIndex(g=>g.shouldCallHandler()),0)),p=wi(c,c[d].route.id).route.id;return Promise.resolve({[p]:{type:"error",result:o}})}}}async function B5(e,n,a,o,s){let{matches:u,...c}=e,d=u.flatMap(g=>g.route.middleware?g.route.middleware.map(y=>[g.route.id,y]):[]);return await BT(c,d,n,a,o,s)}async function BT(e,n,a,o,s,u,c=0){let{request:d}=e;if(d.signal.aborted)throw d.signal.reason??new Error(`Request aborted: ${d.method} ${d.url}`);let p=n[c];if(!p)return await a();let[g,y]=p,h,b=async()=>{if(h)throw new Error("You may only call `next()` once per middleware");try{return h={value:await BT(e,n,a,o,s,u,c+1)},h.value}catch(S){return h={value:await u(S,g,h)},h.value}};try{let S=await y(e,b),w=S!=null?o(S):void 0;return s(w)?w:h?w??h.value:(h={value:await b()},h.value)}catch(S){return await u(S,g,h)}}function VT(e,n,a,o,s){let u=UT({key:"middleware",route:o.route,manifest:n,mapRouteProperties:e}),c=U5(o.route,Er(a.method)?"action":"loader",n,e,s);return{middleware:u,route:c.lazyRoutePromise,handler:c.lazyHandlerPromise}}function py(e,n,a,o,s,u,c,d,p,g=null,y){let h=!1,b=VT(e,n,a,u,c);return{...u,_lazyPromises:b,shouldLoad:p,shouldRevalidateArgs:g,shouldCallHandler(S){return h=!0,g?typeof y=="boolean"?ac(u,{...g,defaultShouldRevalidate:y}):typeof S=="boolean"?ac(u,{...g,defaultShouldRevalidate:S}):ac(u,g):p},resolve(S){let{lazy:w,loader:C,middleware:R}=u.route,T=h||p||S&&!Er(a.method)&&(w||C),O=R&&R.length>0&&!C&&!w;return T&&(Er(a.method)||!O)?q5({request:a,path:o,pattern:s,match:u,lazyHandlerPromise:b?.handler,lazyRoutePromise:b?.route,handlerOverride:S,scopedContext:d}):Promise.resolve({type:"data",result:void 0})}}}function Al(e,n,a,o,s,u,c,d,p=null){return s.map(g=>g.route.id!==u.route.id?{...g,shouldLoad:!1,shouldRevalidateArgs:p,shouldCallHandler:()=>!1,_lazyPromises:VT(e,n,a,g,c),resolve:()=>Promise.resolve({type:"data",result:void 0})}:py(e,n,a,o,Hc(s),g,c,d,!0,p))}async function V5(e,n,a,o,s,u,c){o.some(y=>y._lazyPromises?.middleware)&&await Promise.all(o.map(y=>y._lazyPromises?.middleware));let d={request:n,url:qT(n,a),pattern:Hc(o),params:o[0].params,context:u,matches:o},g=await e({...d,fetcherKey:s,runClientMiddleware:y=>{let h=d;return FT(h,()=>y({...h,fetcherKey:s,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(o.flatMap(y=>[y._lazyPromises?.handler,y._lazyPromises?.route]))}catch{}return g}async function q5({request:e,path:n,pattern:a,match:o,lazyHandlerPromise:s,lazyRoutePromise:u,handlerOverride:c,scopedContext:d}){let p,g,y=Er(e.method),h=y?"action":"loader",b=S=>{let w,C=new Promise((O,M)=>w=M);g=()=>w(),e.signal.addEventListener("abort",g);let R=O=>typeof S!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${h}" [routeId: ${o.route.id}]`)):S({request:e,url:qT(e,n),pattern:a,params:o.params,context:d},...O!==void 0?[O]:[]),T=(async()=>{try{return{type:"data",result:await(c?c(M=>R(M)):R())}}catch(O){return{type:"error",result:O}}})();return Promise.race([T,C])};try{let S=y?o.route.action:o.route.loader;if(s||u)if(S){let w,[C]=await Promise.all([b(S).catch(R=>{w=R}),s,u]);if(w!==void 0)throw w;p=C}else{await s;let w=y?o.route.action:o.route.loader;if(w)[p]=await Promise.all([b(w),u]);else if(h==="action"){let C=new URL(e.url),R=C.pathname+C.search;throw Ca(405,{method:e.method,pathname:R,routeId:o.route.id})}else return{type:"data",result:void 0}}else if(S)p=await b(S);else{let w=new URL(e.url),C=w.pathname+w.search;throw Ca(404,{pathname:C})}}catch(S){return{type:"error",result:S}}finally{g&&e.signal.removeEventListener("abort",g)}return p}async function Y5(e){let n=e.headers.get("Content-Type");return n&&/\bapplication\/json\b/.test(n)?e.body==null?null:e.json():e.text()}async function K5(e){let{result:n,type:a}=e;if(Rv(n)){let o;try{o=await Y5(n)}catch(s){return{type:"error",error:s}}return a==="error"?{type:"error",error:new _c(n.status,n.statusText,o),statusCode:n.status,headers:n.headers}:{type:"data",data:o,statusCode:n.status,headers:n.headers}}return a==="error"?_w(n)?n.data instanceof Error?{type:"error",error:n.data,statusCode:n.init?.status,headers:n.init?.headers?new Headers(n.init.headers):void 0}:{type:"error",error:Z5(n),statusCode:bc(n)?n.status:void 0,headers:n.init?.headers?new Headers(n.init.headers):void 0}:{type:"error",error:n,statusCode:bc(n)?n.status:void 0}:_w(n)?{type:"data",data:n.data,statusCode:n.init?.status,headers:n.init?.headers?new Headers(n.init.headers):void 0}:{type:"data",data:n}}function G5(e,n,a,o,s){let u=e.headers.get("Location");if(_t(u,"Redirects returned/thrown from loaders/actions must have a Location header"),!bv(u)){let c=o.slice(0,o.findIndex(d=>d.route.id===a)+1);u=hy(new URL(n.url),c,s,u),e.headers.set("Location",u)}return e}var $5=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function gy(e){try{return $5.includes(new URL(e).protocol)}catch{return!1}}function Iw(e,n,a,o){if(bv(e)){let s=e,u=gp.test(s)?new URL(wT(s,n.protocol)):new URL(s);if(gy(u.toString()))throw new Error("Invalid redirect location");let c=Na(u.pathname,a)!=null;if(u.origin===n.origin&&c)return xv(u.pathname)+u.search+u.hash}try{let s=o.createURL(e);if(gy(s.toString()))throw new Error("Invalid redirect location")}catch{}return e}function vl(e,n,a,o){let s=e.createURL(YT(n)).toString(),u={signal:a};if(o&&Er(o.formMethod)){let{formMethod:c,formEncType:d}=o;u.method=c.toUpperCase(),d==="application/json"?(u.headers=new Headers({"Content-Type":d}),u.body=JSON.stringify(o.json)):d==="text/plain"?u.body=o.text:d==="application/x-www-form-urlencoded"&&o.formData?u.body=my(o.formData):u.body=o.formData}return new Request(s,u)}function qT(e,n){let a=new URL(e.url),o=typeof n=="string"?Ka(n):n;if(a.pathname=o.pathname||"/",o.search){let s=new URLSearchParams(o.search),u=s.getAll("index");s.delete("index");for(let c of u.filter(Boolean))s.append("index",c);a.search=s.size?`?${s.toString()}`:""}else a.search="";return a.hash=o.hash||"",a}function my(e){let n=new URLSearchParams;for(let[a,o]of e.entries())n.append(a,typeof o=="string"?o:o.name);return n}function kw(e){let n=new FormData;for(let[a,o]of e.entries())n.append(a,o);return n}function X5(e,n,a,o=!1,s=!1){let u={},c=null,d,p=!1,g={},y=a&&ua(a[1])?a[1].error:void 0;return e.forEach(h=>{if(!(h.route.id in n))return;let b=h.route.id,S=n[b];if(_t(!ds(S),"Cannot handle redirect results in processLoaderData"),ua(S)){let w=S.error;if(y!==void 0&&(w=y,y=void 0),c=c||{},s)c[b]=w;else{let C=wi(e,b);c[C.route.id]==null&&(c[C.route.id]=w)}o||(u[b]=zT),p||(p=!0,d=bc(S.error)?S.error.status:500),S.headers&&(g[b]=S.headers)}else u[b]=S.data,S.statusCode&&S.statusCode!==200&&!p&&(d=S.statusCode),S.headers&&(g[b]=S.headers)}),y!==void 0&&a&&(c={[a[0]]:y},a[2]&&(u[a[2]]=void 0)),{loaderData:u,errors:c,statusCode:d||200,loaderHeaders:g}}function Pw(e,n,a,o,s,u,c){let{loaderData:d,errors:p}=X5(n,a,o);return s.filter(g=>!g.matches||g.matches.some(y=>y.shouldLoad)).forEach(g=>{let{key:y,match:h,controller:b}=g;if(b&&b.signal.aborted)return;let S=u[y];if(_t(S,"Did not find corresponding fetcher result"),ua(S)){let w=wi(e.matches,h?.route.id);p&&p[w.route.id]||(p={...p,[w.route.id]:S.error}),c.delete(y)}else if(ds(S))_t(!1,"Unhandled fetcher revalidation redirect");else{let w=so(S.data);c.set(y,w)}}),{loaderData:d,errors:p}}function Lw(e,n,a,o){let s=Object.entries(n).filter(([,u])=>u!==zT).reduce((u,[c,d])=>(u[c]=d,u),{});for(let u of a){let c=u.route.id;if(!n.hasOwnProperty(c)&&e.hasOwnProperty(c)&&u.route.loader&&(s[c]=e[c]),o&&o.hasOwnProperty(c))break}return s}function zw(e){return e?ua(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function wi(e,n){return(n?e.slice(0,e.findIndex(o=>o.route.id===n)+1):[...e]).reverse().find(o=>o.route.hasErrorBoundary===!0)||e[0]}function Af(e){let n=e.length===1?e[0]:e.find(a=>a.index||!a.path||a.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:n}],route:n}}function Ca(e,{pathname:n,routeId:a,method:o,type:s,message:u}={}){let c="Unknown Server Error",d="Unknown @remix-run/router error";return e===400?(c="Bad Request",o&&n&&a?d=`You made a ${o} request to "${n}" but did not provide a \`loader\` for route "${a}", so there is no way to handle the request.`:s==="invalid-body"&&(d="Unable to encode submission body")):e===403?(c="Forbidden",d=`Route "${a}" does not match URL "${n}"`):e===404?(c="Not Found",d=`No route matches URL "${n}"`):e===405&&(c="Method Not Allowed",o&&n&&a?d=`You made a ${o.toUpperCase()} request to "${n}" but did not provide an \`action\` for route "${a}", so there is no way to handle the request.`:o&&(d=`Invalid request method "${o.toUpperCase()}"`)),new _c(e||500,c,new Error(d),!0)}function Df(e){let n=Object.entries(e);for(let a=n.length-1;a>=0;a--){let[o,s]=n[a];if(ds(s))return{key:o,result:s}}}function YT(e){let n=typeof e=="string"?Ka(e):e;return zr({...n,hash:""})}function Q5(e,n){return e.pathname!==n.pathname||e.search!==n.search?!1:e.hash===""?n.hash!=="":e.hash===n.hash?!0:n.hash!==""}function Z5(e){return new _c(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function J5(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([n,a])=>typeof n=="string"&&W5(a))}function W5(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function eL(e){return Rv(e.result)&&PT.has(e.result.status)}function ua(e){return e.type==="error"}function ds(e){return(e&&e.type)==="redirect"}function _w(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Rv(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function tL(e){return PT.has(e)}function nL(e){return Rv(e)&&tL(e.status)&&e.headers.has("Location")}function rL(e){return N5.has(e.toUpperCase())}function Er(e){return A5.has(e.toUpperCase())}function Ev(e){return new URLSearchParams(e).getAll("index").some(n=>n==="")}function Qf(e,n){let a=typeof n=="string"?Ka(n).search:n.search;if(e[e.length-1].route.index&&Ev(a||""))return e[e.length-1];let o=DT(e);return o[o.length-1]}function Hw(e){let{formMethod:n,formAction:a,formEncType:o,text:s,formData:u,json:c}=e;if(!(!n||!a||!o)){if(s!=null)return{formMethod:n,formAction:a,formEncType:o,formData:void 0,json:void 0,text:s};if(u!=null)return{formMethod:n,formAction:a,formEncType:o,formData:u,json:void 0,text:void 0};if(c!==void 0)return{formMethod:n,formAction:a,formEncType:o,formData:void 0,json:c,text:void 0}}}function P0(e,n,a,o){return o?{state:"loading",location:e,matches:n,historyAction:a,formMethod:o.formMethod,formAction:o.formAction,formEncType:o.formEncType,formData:o.formData,json:o.json,text:o.text}:{state:"loading",location:e,matches:n,historyAction:a,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function aL(e,n,a,o){return{state:"submitting",location:e,matches:n,historyAction:a,formMethod:o.formMethod,formAction:o.formAction,formEncType:o.formEncType,formData:o.formData,json:o.json,text:o.text}}function $u(e,n){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:n}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:n}}function oL(e,n){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:n?n.data:void 0}}function so(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function iL(e,n){try{let a=e.sessionStorage.getItem(LT);if(a){let o=JSON.parse(a);for(let[s,u]of Object.entries(o||{}))u&&Array.isArray(u)&&n.set(s,new Set(u||[]))}}catch{}}function sL(e,n){if(n.size>0){let a={};for(let[o,s]of n)a[o]=[...s];try{e.sessionStorage.setItem(LT,JSON.stringify(a))}catch(o){Un(!1,`Failed to save applied view transitions in sessionStorage (${o}).`)}}}function Uw(){let e,n,a=new Promise((o,s)=>{e=async u=>{o(u);try{await a}catch{}},n=async u=>{s(u);try{await a}catch{}}});return{promise:a,resolve:e,reject:n}}var Es=v.createContext(null);Es.displayName="DataRouter";var Uc=v.createContext(null);Uc.displayName="DataRouterState";var KT=v.createContext(!1);function GT(){return v.useContext(KT)}var Cv=v.createContext({isTransitioning:!1});Cv.displayName="ViewTransition";var $T=v.createContext(new Map);$T.displayName="Fetchers";var lL=v.createContext(null);lL.displayName="Await";var ha=v.createContext(null);ha.displayName="Navigation";var yp=v.createContext(null);yp.displayName="Location";var Ga=v.createContext({outlet:null,matches:[],isDataRoute:!1});Ga.displayName="Route";var Tv=v.createContext(null);Tv.displayName="RouteError";var XT="REACT_ROUTER_ERROR",uL="REDIRECT",cL="ROUTE_ERROR_RESPONSE";function dL(e){if(e.startsWith(`${XT}:${uL}:{`))try{let n=JSON.parse(e.slice(28));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.location=="string"&&typeof n.reloadDocument=="boolean"&&typeof n.replace=="boolean")return n}catch{}}function fL(e){if(e.startsWith(`${XT}:${cL}:{`))try{let n=JSON.parse(e.slice(40));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string")return new _c(n.status,n.statusText,n.data)}catch{}}function hL(e,{relative:n}={}){_t(ql(),"useHref() may be used only in the context of a <Router> component.");let{basename:a,navigator:o}=v.useContext(ha),{hash:s,pathname:u,search:c}=Fc(e,{relative:n}),d=u;return a!=="/"&&(d=u==="/"?a:Aa([a,u])),o.createHref({pathname:d,search:c,hash:s})}function ql(){return v.useContext(yp)!=null}function Hr(){return _t(ql(),"useLocation() may be used only in the context of a <Router> component."),v.useContext(yp).location}var QT="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ZT(e){v.useContext(ha).static||v.useLayoutEffect(e)}function vp(){let{isDataRoute:e}=v.useContext(Ga);return e?ML():pL()}function pL(){_t(ql(),"useNavigate() may be used only in the context of a <Router> component.");let e=v.useContext(Es),{basename:n,navigator:a}=v.useContext(ha),{matches:o}=v.useContext(Ga),{pathname:s}=Hr(),u=JSON.stringify(mp(o)),c=v.useRef(!1);return ZT(()=>{c.current=!0}),v.useCallback((p,g={})=>{if(Un(c.current,QT),!c.current)return;if(typeof p=="number"){a.go(p);return}let y=zc(p,JSON.parse(u),s,g.relative==="path");e==null&&n!=="/"&&(y.pathname=y.pathname==="/"?n:Aa([n,y.pathname])),Ml(typeof p=="string"?p:zr(p),a.createHref(y),Sv(a),"reject"),(g.replace?a.replace:a.push)(y,g.state,g)},[n,a,u,s,e])}var gL=v.createContext(null);function mL(e){let n=v.useContext(Ga).outlet;return v.useMemo(()=>n&&v.createElement(gL.Provider,{value:e},n),[n,e])}function Fc(e,{relative:n}={}){let{matches:a}=v.useContext(Ga),{pathname:o}=Hr(),s=JSON.stringify(mp(a));return v.useMemo(()=>zc(e,JSON.parse(s),o,n==="path"),[e,s,o,n])}function yL(e,n,a){_t(ql(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=v.useContext(ha),{matches:s}=v.useContext(Ga),u=s[s.length-1],c=u?u.params:{},d=u?u.pathname:"/",p=u?u.pathnameBase:"/",g=u&&u.route;{let R=g&&g.path||"";eO(d,!g||R.endsWith("*")||R.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${R}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
12
|
-
|
|
13
|
-
Please change the parent <Route path="${R}"> to <Route path="${R==="/"?"*":`${R}/*`}">.`)}let y=Hr(),h;h=y;let b=h.pathname||"/",S=b;if(p!=="/"){let R=p.replace(/^\//,"").split("/");S="/"+b.replace(/^\//,"").split("/").slice(R.length).join("/")}let w=a&&a.state.matches.length?a.state.matches.map(R=>Object.assign(R,{route:a.manifest[R.route.id]||R.route})):ET(e,{pathname:S});return Un(g||w!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),Un(w==null||w[w.length-1].route.element!==void 0||w[w.length-1].route.Component!==void 0||w[w.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),wL(w&&w.map(R=>Object.assign({},R,{params:Object.assign({},c,R.params),pathname:Aa([p,o.encodeLocation?o.encodeLocation(R.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathname]),pathnameBase:R.pathnameBase==="/"?p:Aa([p,o.encodeLocation?o.encodeLocation(R.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathnameBase])})),s,a)}function vL(){let e=OL(),n=bc(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),a=e instanceof Error?e.stack:null,o="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:o},u={padding:"2px 4px",backgroundColor:o},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=v.createElement(v.Fragment,null,v.createElement("p",null,"💿 Hey developer 👋"),v.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",v.createElement("code",{style:u},"ErrorBoundary")," or"," ",v.createElement("code",{style:u},"errorElement")," prop on your route.")),v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},n),a?v.createElement("pre",{style:s},a):null,c)}var bL=v.createElement(vL,null),JT=class extends v.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){this.props.onError?this.props.onError(e,n):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const a=fL(e.digest);a&&(e=a)}let n=e!==void 0?v.createElement(Ga.Provider,{value:this.props.routeContext},v.createElement(Tv.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?v.createElement(xL,{error:e},n):n}};JT.contextType=KT;var L0=new WeakMap;function xL({children:e,error:n}){let{basename:a,navigator:o}=v.useContext(ha);if(typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){let s=dL(n.digest);if(s){let u=L0.get(n);if(u)throw u;let c=jT(s.location,a),d=c.absoluteURL||c.to;if(Ml(s.location,d,Sv(o),"allow-explicit"),gy(d))throw new Error("Invalid redirect location");if(NT&&!L0.get(n))if(c.isExternal||s.reloadDocument)window.location.href=d;else{const p=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(c.to,{replace:s.replace}));throw L0.set(n,p),p}return v.createElement("meta",{httpEquiv:"refresh",content:`0;url=${d}`})}}return e}function SL({routeContext:e,match:n,children:a}){let o=v.useContext(Es);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),v.createElement(Ga.Provider,{value:e},a)}function wL(e,n=[],a){let o=a?.state;if(e==null){if(!o)return null;if(o.errors)e=o.matches;else if(n.length===0&&!o.initialized&&o.matches.length>0)e=o.matches;else return null}let s=e,u=o?.errors;if(u!=null){let y=s.findIndex(h=>h.route.id&&u?.[h.route.id]!==void 0);_t(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),s=s.slice(0,Math.min(s.length,y+1))}let c=!1,d=-1;if(a&&o){c=o.renderFallback;for(let y=0;y<s.length;y++){let h=s[y];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(d=y),h.route.id){let{loaderData:b,errors:S}=o,w=h.route.loader&&!b.hasOwnProperty(h.route.id)&&(!S||S[h.route.id]===void 0);if(h.route.lazy||w){a.isStatic&&(c=!0),d>=0?s=s.slice(0,d+1):s=[s[0]];break}}}}let p=a?.onError,g=o&&p?(y,h)=>{p(y,{location:o.location,params:o.matches?.[0]?.params??{},pattern:Hc(o.matches),errorInfo:h})}:void 0;return s.reduceRight((y,h,b)=>{let S,w=!1,C=null,R=null;o&&(S=u&&h.route.id?u[h.route.id]:void 0,C=h.route.errorElement||bL,c&&(d<0&&b===0?(eO("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,R=null):d===b&&(w=!0,R=h.route.hydrateFallbackElement||null)));let T=n.concat(s.slice(0,b+1)),O=()=>{let M;return S?M=C:w?M=R:h.route.Component?M=v.createElement(h.route.Component,null):h.route.element?M=h.route.element:M=y,v.createElement(SL,{match:h,routeContext:{outlet:y,matches:T,isDataRoute:o!=null},children:M})};return o&&(h.route.ErrorBoundary||h.route.errorElement||b===0)?v.createElement(JT,{location:o.location,revalidation:o.revalidation,component:C,error:S,children:O(),routeContext:{outlet:null,matches:T,isDataRoute:!0},onError:g}):O()},null)}function Ov(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function RL(e){let n=v.useContext(Es);return _t(n,Ov(e)),n}function WT(e){let n=v.useContext(Uc);return _t(n,Ov(e)),n}function EL(e){let n=v.useContext(Ga);return _t(n,Ov(e)),n}function Mv(e){let n=EL(e),a=n.matches[n.matches.length-1];return _t(a.route.id,`${e} can only be used on routes that contain a unique "id"`),a.route.id}function CL(){return Mv("useRouteId")}function TL(){let{matches:e,loaderData:n}=WT("useMatches");return v.useMemo(()=>e.map(a=>CT(a,n)),[e,n])}function OL(){let e=v.useContext(Tv),n=WT("useRouteError"),a=Mv("useRouteError");return e!==void 0?e:n.errors?.[a]}function ML(){let{router:e}=RL("useNavigate"),n=Mv("useNavigate"),a=v.useRef(!1);return ZT(()=>{a.current=!0}),v.useCallback(async(s,u={})=>{Un(a.current,QT),a.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:n,...u}))},[e,n])}var Fw={};function eO(e,n,a){!n&&!Fw[e]&&(Fw[e]=!0,Un(!1,a))}var Bw={};function Vw(e,n){!e&&!Bw[n]&&(Bw[n]=!0,console.warn(n))}var AL="useOptimistic",qw=VR[AL],DL=()=>{};function NL(e){return qw?qw(e):[e,DL]}function jL(e){let n={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&Un(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(n,{element:v.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&Un(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(n,{hydrateFallbackElement:v.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&Un(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(n,{errorElement:v.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),n}var IL=["HydrateFallback","hydrateFallbackElement"],kL=class{constructor(){this.status="pending",this.promise=new Promise((e,n)=>{this.resolve=a=>{this.status==="pending"&&(this.status="resolved",e(a))},this.reject=a=>{this.status==="pending"&&(this.status="rejected",n(a))}})}};function PL({router:e,flushSync:n,onError:a,useTransitions:o}){o=GT()||o;let[u,c]=v.useState(e.state),[d,p]=NL(u),[g,y]=v.useState(),[h,b]=v.useState({isTransitioning:!1}),[S,w]=v.useState(),[C,R]=v.useState(),[T,O]=v.useState(),M=v.useRef(new Map),A=v.useCallback((D,{deletedFetchers:z,newErrors:F,flushSync:G,viewTransitionOpts:J})=>{F&&a&&Object.values(F).forEach(U=>a(U,{location:D.location,params:D.matches[0]?.params??{},pattern:Hc(D.matches)})),D.fetchers.forEach((U,H)=>{U.data!==void 0&&M.current.set(H,U.data)}),z.forEach(U=>M.current.delete(U)),Vw(G===!1||n!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let Y=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(Vw(J==null||Y,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!J||!Y){n&&G?n(()=>c(D)):o===!1?c(D):v.startTransition(()=>{o===!0&&p(U=>Yw(U,D)),c(D)});return}if(n&&G){n(()=>{C&&(S?.resolve(),C.skipTransition()),b({isTransitioning:!0,flushSync:!0,currentLocation:J.currentLocation,nextLocation:J.nextLocation})});let U=e.window.document.startViewTransition(()=>{n(()=>c(D))});U.finished.finally(()=>{n(()=>{w(void 0),R(void 0),y(void 0),b({isTransitioning:!1})})}),n(()=>R(U));return}C?(S?.resolve(),C.skipTransition(),O({state:D,currentLocation:J.currentLocation,nextLocation:J.nextLocation})):(y(D),b({isTransitioning:!0,flushSync:!1,currentLocation:J.currentLocation,nextLocation:J.nextLocation}))},[e.window,n,C,S,o,p,a]);v.useLayoutEffect(()=>e.subscribe(A),[e,A]),v.useEffect(()=>{h.isTransitioning&&!h.flushSync&&w(new kL)},[h]),v.useEffect(()=>{if(S&&g&&e.window){let D=g,z=S.promise,F=e.window.document.startViewTransition(async()=>{o===!1?c(D):v.startTransition(()=>{o===!0&&p(G=>Yw(G,D)),c(D)}),await z});F.finished.finally(()=>{w(void 0),R(void 0),y(void 0),b({isTransitioning:!1})}),R(F)}},[g,S,e.window,o,p]),v.useEffect(()=>{S&&g&&d.location.key===g.location.key&&S.resolve()},[S,C,d.location,g]),v.useEffect(()=>{!h.isTransitioning&&T&&(y(T.state),b({isTransitioning:!0,flushSync:!1,currentLocation:T.currentLocation,nextLocation:T.nextLocation}),O(void 0))},[h.isTransitioning,T]);let N=v.useMemo(()=>({createHref:e.createHref,createURL:e.createURL,encodeLocation:e.encodeLocation,go:D=>e.navigate(D),push:(D,z,F)=>e.navigate(D,{state:z,preventScrollReset:F?.preventScrollReset}),replace:(D,z,F)=>e.navigate(D,{replace:!0,state:z,preventScrollReset:F?.preventScrollReset})}),[e]),P=e.basename||"/",I=v.useMemo(()=>({router:e,navigator:N,static:!1,basename:P,onError:a}),[e,N,P,a]);return v.createElement(v.Fragment,null,v.createElement(Es.Provider,{value:I},v.createElement(Uc.Provider,{value:d},v.createElement($T.Provider,{value:M.current},v.createElement(Cv.Provider,{value:h},v.createElement(HL,{basename:P,location:d.location,navigationType:d.historyAction,navigator:N,useTransitions:o},v.createElement(LL,{routes:e.routes,manifest:e.manifest,future:e.future,state:d,isStatic:!1,onError:a})))))),null)}function Yw(e,n){return{...e,navigation:n.navigation.state!=="idle"?n.navigation:e.navigation,revalidation:n.revalidation!=="idle"?n.revalidation:e.revalidation,actionData:n.navigation.state!=="submitting"?n.actionData:e.actionData,fetchers:n.fetchers}}var LL=v.memo(zL);function zL({routes:e,manifest:n,future:a,state:o,isStatic:s,onError:u}){return yL(e,void 0,{manifest:n,state:o,isStatic:s,onError:u})}function _L({to:e,replace:n,state:a,relative:o}){_t(ql(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s,navigator:u}=v.useContext(ha);Un(!s,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:c}=v.useContext(Ga),{pathname:d}=Hr(),p=vp(),g=zc(e,mp(c),d,o==="path");Ml(typeof e=="string"?e:zr(e),u.createHref(g),Sv(u),"reject");let y=JSON.stringify(g);return v.useEffect(()=>{p(JSON.parse(y),{replace:n,state:a,relative:o})},[p,y,o,n,a]),null}function tO(e){return mL(e.context)}function HL({basename:e="/",children:n=null,location:a,navigationType:o="POP",navigator:s,static:u=!1,useTransitions:c}){_t(!ql(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),p=v.useMemo(()=>({basename:d,navigator:s,static:u,useTransitions:c,future:{}}),[d,s,u,c]);typeof a=="string"&&(a=Ka(a));let{pathname:g="/",search:y="",hash:h="",state:b=null,key:S="default",mask:w}=a,C=v.useMemo(()=>{let R=Na(g,d);return R==null?null:{location:{pathname:R,search:y,hash:h,state:b,key:S,mask:w},navigationType:o}},[d,g,y,h,b,S,o,w]);return Un(C!=null,`<Router basename="${d}"> is not able to match the URL "${g}${y}${h}" because it does not start with the basename, so the <Router> won't render anything.`),C==null?null:v.createElement(ha.Provider,{value:p},v.createElement(yp.Provider,{children:n,value:C}))}var Zf="get",Jf="application/x-www-form-urlencoded";function bp(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function UL(e){return bp(e)&&e.tagName.toLowerCase()==="button"}function FL(e){return bp(e)&&e.tagName.toLowerCase()==="form"}function BL(e){return bp(e)&&e.tagName.toLowerCase()==="input"}function VL(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function qL(e,n){return e.button===0&&(!n||n==="_self")&&!VL(e)}function yy(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((n,a)=>{let o=e[a];return n.concat(Array.isArray(o)?o.map(s=>[a,s]):[[a,o]])},[]))}function YL(e,n){let a=yy(e);return n&&n.forEach((o,s)=>{a.has(s)||n.getAll(s).forEach(u=>{a.append(s,u)})}),a}var Nf=null;function KL(){if(Nf===null)try{new FormData(document.createElement("form"),0),Nf=!1}catch{Nf=!0}return Nf}var GL=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function z0(e){return e!=null&&!GL.has(e)?(Un(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Jf}"`),null):e}function $L(e,n){let a,o,s,u,c;if(FL(e)){let d=e.getAttribute("action");o=d?Na(d,n):null,a=e.getAttribute("method")||Zf,s=z0(e.getAttribute("enctype"))||Jf,u=new FormData(e)}else if(UL(e)||BL(e)&&(e.type==="submit"||e.type==="image")){let d=e.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=e.getAttribute("formaction")||d.getAttribute("action");if(o=p?Na(p,n):null,a=e.getAttribute("formmethod")||d.getAttribute("method")||Zf,s=z0(e.getAttribute("formenctype"))||z0(d.getAttribute("enctype"))||Jf,u=new FormData(d,e),!KL()){let{name:g,type:y,value:h}=e;if(y==="image"){let b=g?`${g}.`:"";u.append(`${b}x`,"0"),u.append(`${b}y`,"0")}else g&&u.append(g,h)}}else{if(bp(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');a=Zf,o=null,s=Jf,c=e}return u&&s==="text/plain"&&(c=u,u=void 0),{action:o,method:a.toLowerCase(),encType:s,formData:u,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Av(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function nO(e,n,a,o){let s=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return a?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${o}`:s.pathname=`${s.pathname}.${o}`:s.pathname==="/"?s.pathname=`_root.${o}`:n&&Na(s.pathname,n)==="/"?s.pathname=`${zl(n)}/_root.${o}`:s.pathname=`${zl(s.pathname)}.${o}`,s}async function XL(e,n){if(e.id in n)return n[e.id];try{let a=await import(e.module);return n[e.id]=a,a}catch(a){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(a),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function QL(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function ZL(e,n,a){let o=await Promise.all(e.map(async s=>{let u=n.routes[s.route.id];if(u){let c=await XL(u,a);return c.links?c.links():[]}return[]}));return tz(o.flat(1).filter(QL).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function Kw(e,n,a,o,s,u){let c=(p,g)=>a[g]?p.route.id!==a[g].route.id:!0,d=(p,g)=>a[g].pathname!==p.pathname||a[g].route.path?.endsWith("*")&&a[g].params["*"]!==p.params["*"];return u==="assets"?n.filter((p,g)=>c(p,g)||d(p,g)):u==="data"?n.filter((p,g)=>{let y=o.routes[p.route.id];if(!y||!y.hasLoader)return!1;if(c(p,g)||d(p,g))return!0;if(p.route.shouldRevalidate){let h=p.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:a[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function JL(e,n,{includeHydrateFallback:a}={}){return WL(e.map(o=>{let s=n.routes[o.route.id];if(!s)return[];let u=[s.module];return s.clientActionModule&&(u=u.concat(s.clientActionModule)),s.clientLoaderModule&&(u=u.concat(s.clientLoaderModule)),a&&s.hydrateFallbackModule&&(u=u.concat(s.hydrateFallbackModule)),s.imports&&(u=u.concat(s.imports)),u}).flat(1))}function WL(e){return[...new Set(e)]}function ez(e){let n={},a=Object.keys(e).sort();for(let o of a)n[o]=e[o];return n}function tz(e,n){let a=new Set;return new Set(n),e.reduce((o,s)=>{let u=JSON.stringify(ez(s));return a.has(u)||(a.add(u),o.push({key:u,link:s})),o},[])}function Dv(){let e=v.useContext(Es);return Av(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function nz(){let e=v.useContext(Uc);return Av(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Nv=v.createContext(void 0);Nv.displayName="FrameworkContext";function xp(){let e=v.useContext(Nv);return Av(e,"You must render this element inside a <HydratedRouter> element"),e}function rz(e,n){let a=v.useContext(Nv),[o,s]=v.useState(!1),[u,c]=v.useState(!1),{onFocus:d,onBlur:p,onMouseEnter:g,onMouseLeave:y,onTouchStart:h}=n,b=v.useRef(null);v.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let C=T=>{T.forEach(O=>{c(O.isIntersecting)})},R=new IntersectionObserver(C,{threshold:.5});return b.current&&R.observe(b.current),()=>{R.disconnect()}}},[e]),v.useEffect(()=>{if(o){let C=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(C)}}},[o]);let S=()=>{s(!0)},w=()=>{s(!1),c(!1)};return a?e!=="intent"?[u,b,{}]:[u,b,{onFocus:Xu(d,S),onBlur:Xu(p,w),onMouseEnter:Xu(g,S),onMouseLeave:Xu(y,w),onTouchStart:Xu(h,S)}]:[!1,b,{}]}function Xu(e,n){return a=>{e&&e(a),a.defaultPrevented||n(a)}}function az({page:e,...n}){let a=GT(),{nonce:o}=xp(),{router:s}=Dv(),u=v.useMemo(()=>ET(s.routes,e,s.basename),[s.routes,e,s.basename]);return u?(n.nonce==null&&o&&(n={...n,nonce:o}),a?v.createElement(iz,{page:e,matches:u,...n}):v.createElement(sz,{page:e,matches:u,...n})):null}function oz(e){let{manifest:n,routeModules:a}=xp(),[o,s]=v.useState([]);return v.useEffect(()=>{let u=!1;return ZL(e,n,a).then(c=>{u||s(c)}),()=>{u=!0}},[e,n,a]),o}function iz({page:e,matches:n,...a}){let o=Hr(),{future:s}=xp(),{basename:u}=Dv(),c=v.useMemo(()=>{if(e===o.pathname+o.search+o.hash)return[];let d=nO(e,u,s.v8_trailingSlashAwareDataRequests,"rsc"),p=!1,g=[];for(let y of n)typeof y.route.shouldRevalidate=="function"?p=!0:g.push(y.route.id);return p&&g.length>0&&d.searchParams.set("_routes",g.join(",")),[d.pathname+d.search]},[u,s.v8_trailingSlashAwareDataRequests,e,o,n]);return v.createElement(v.Fragment,null,c.map(d=>v.createElement("link",{key:d,rel:"prefetch",as:"fetch",href:d,...a})))}function sz({page:e,matches:n,...a}){let o=Hr(),{future:s,manifest:u,routeModules:c}=xp(),{basename:d}=Dv(),{loaderData:p,matches:g}=nz(),y=v.useMemo(()=>Kw(e,n,g,u,o,"data"),[e,n,g,u,o]),h=v.useMemo(()=>Kw(e,n,g,u,o,"assets"),[e,n,g,u,o]),b=v.useMemo(()=>{if(e===o.pathname+o.search+o.hash)return[];let C=new Set,R=!1;if(n.forEach(O=>{let M=u.routes[O.route.id];!M||!M.hasLoader||(!y.some(A=>A.route.id===O.route.id)&&O.route.id in p&&c[O.route.id]?.shouldRevalidate||M.hasClientLoader?R=!0:C.add(O.route.id))}),C.size===0)return[];let T=nO(e,d,s.v8_trailingSlashAwareDataRequests,"data");return R&&C.size>0&&T.searchParams.set("_routes",n.filter(O=>C.has(O.route.id)).map(O=>O.route.id).join(",")),[T.pathname+T.search]},[d,s.v8_trailingSlashAwareDataRequests,p,o,u,y,n,e,c]),S=v.useMemo(()=>JL(h,u),[h,u]),w=oz(h);return v.createElement(v.Fragment,null,b.map(C=>v.createElement("link",{key:C,rel:"prefetch",as:"fetch",href:C,...a})),S.map(C=>v.createElement("link",{key:C,rel:"modulepreload",href:C,...a})),w.map(({key:C,link:R})=>v.createElement("link",{key:C,nonce:a.nonce,...R,crossOrigin:R.crossOrigin??a.crossOrigin})))}function lz(...e){return n=>{e.forEach(a=>{typeof a=="function"?a(n):a!=null&&(a.current=n)})}}var uz=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{uz&&(window.__reactRouterVersion="7.18.5")}catch{}function cz(e,n){return L5({basename:n?.basename,getContext:n?.getContext,future:n?.future,history:ZP({window:n?.window}),hydrationData:dz(),routes:e,mapRouteProperties:jL,hydrationRouteProperties:IL,dataStrategy:n?.dataStrategy,patchRoutesOnNavigation:n?.patchRoutesOnNavigation,window:n?.window,instrumentations:n?.instrumentations}).initialize()}function dz(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:fz(e.errors)}),e}function fz(e){if(!e)return null;let n=Object.entries(e),a={};for(let[o,s]of n)if(s&&s.__type==="RouteErrorResponse")a[o]=new _c(s.status,s.statusText,s.data,s.internal===!0);else if(s&&s.__type==="Error"){if(typeof s.__subType=="string"&&S5.includes(s.__subType)){let u=window[s.__subType];if(typeof u=="function")try{let c=new u(s.message);c.stack="",a[o]=c}catch{}}if(a[o]==null){let u=new Error(s.message);u.stack="",a[o]=u}}else a[o]=s;return a}var rO=v.forwardRef(function({onClick:n,discover:a="render",prefetch:o="none",relative:s,reloadDocument:u,replace:c,mask:d,state:p,target:g,to:y,preventScrollReset:h,viewTransition:b,defaultShouldRevalidate:S,...w},C){let{basename:R,navigator:T,useTransitions:O}=v.useContext(ha),M=typeof y=="string"&&pp.test(y),A=jT(y,R);y=A.to;let N=hL(y,{relative:s}),P=Hr(),I=null;if(d){let H=zc(d,[],P.mask?P.mask.pathname:"/",!0);R!=="/"&&(H.pathname=H.pathname==="/"?R:Aa([R,H.pathname])),I=T.createHref(H)}let[D,z,F]=rz(o,w),G=gz(y,{replace:c,mask:d,state:p,target:g,preventScrollReset:h,relative:s,viewTransition:b,defaultShouldRevalidate:S,useTransitions:O});function J(H){n&&n(H),H.defaultPrevented||G(H)}let Y=!(A.isExternal||u),U=v.createElement("a",{...w,...F,href:(Y?I:void 0)||A.absoluteURL||N,onClick:Y?J:n,ref:lz(C,z),target:g,"data-discover":!M&&a==="render"?"true":void 0});return D&&!M?v.createElement(v.Fragment,null,U,v.createElement(az,{page:N})):U});rO.displayName="Link";var oc=v.forwardRef(function({"aria-current":n="page",caseSensitive:a=!1,className:o="",end:s=!1,style:u,to:c,viewTransition:d,children:p,...g},y){let h=Fc(c,{relative:g.relative}),b=Hr(),S=v.useContext(Uc),{navigator:w,basename:C}=v.useContext(ha),R=S!=null&&Sz(h)&&d===!0,T=w.encodeLocation?w.encodeLocation(h).pathname:h.pathname,O=b.pathname,M=S&&S.navigation&&S.navigation.location?S.navigation.location.pathname:null;a||(O=O.toLowerCase(),M=M?M.toLowerCase():null,T=T.toLowerCase()),M&&C&&(M=Na(M,C)||M);const A=T!=="/"&&T.endsWith("/")?T.length-1:T.length;let N=O===T||!s&&O.startsWith(T)&&O.charAt(A)==="/",P=M!=null&&(M===T||!s&&M.startsWith(T)&&M.charAt(T.length)==="/"),I={isActive:N,isPending:P,isTransitioning:R},D=N?n:void 0,z;typeof o=="function"?z=o(I):z=[o,N?"active":null,P?"pending":null,R?"transitioning":null].filter(Boolean).join(" ");let F=typeof u=="function"?u(I):u;return v.createElement(rO,{...g,"aria-current":D,className:z,ref:y,style:F,to:c,viewTransition:d},typeof p=="function"?p(I):p)});oc.displayName="NavLink";var hz=v.forwardRef(({discover:e="render",fetcherKey:n,navigate:a,reloadDocument:o,replace:s,state:u,method:c=Zf,action:d,onSubmit:p,relative:g,preventScrollReset:y,viewTransition:h,defaultShouldRevalidate:b,...S},w)=>{let{useTransitions:C}=v.useContext(ha),R=bz(),T=xz(d,{relative:g}),O=c.toLowerCase()==="get"?"get":"post",M=typeof d=="string"&&pp.test(d),A=N=>{if(p&&p(N),N.defaultPrevented)return;N.preventDefault();let P=N.nativeEvent.submitter,I=P?.getAttribute("formmethod")||c,D=()=>R(P||N.currentTarget,{fetcherKey:n,method:I,navigate:a,replace:s,state:u,relative:g,preventScrollReset:y,viewTransition:h,defaultShouldRevalidate:b});C&&a!==!1?v.startTransition(()=>D()):D()};return v.createElement("form",{ref:w,method:O,action:T,onSubmit:o?p:A,...S,"data-discover":!M&&e==="render"?"true":void 0})});hz.displayName="Form";function pz(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function aO(e){let n=v.useContext(Es);return _t(n,pz(e)),n}function gz(e,{target:n,replace:a,mask:o,state:s,preventScrollReset:u,relative:c,viewTransition:d,defaultShouldRevalidate:p,useTransitions:g}={}){let y=vp(),h=Hr(),b=Fc(e,{relative:c});return v.useCallback(S=>{if(qL(S,n)){S.preventDefault();let w=a!==void 0?a:zr(h)===zr(b),C=()=>y(e,{replace:w,mask:o,state:s,preventScrollReset:u,relative:c,viewTransition:d,defaultShouldRevalidate:p});g?v.startTransition(()=>C()):C()}},[h,y,b,a,o,s,n,e,u,c,d,p,g])}function mz(e){Un(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let n=v.useRef(yy(e)),a=v.useRef(!1),o=Hr(),s=v.useMemo(()=>YL(o.search,a.current?null:n.current),[o.search]),u=vp(),c=v.useCallback((d,p)=>{const g=yy(typeof d=="function"?d(new URLSearchParams(s)):d);a.current=!0,u("?"+g,p)},[u,s]);return[s,c]}var yz=0,vz=()=>`__${String(++yz)}__`;function bz(){let{router:e}=aO("useSubmit"),{basename:n}=v.useContext(ha),a=CL(),o=e.fetch,s=e.navigate;return v.useCallback(async(u,c={})=>{let{action:d,method:p,encType:g,formData:y,body:h}=$L(u,n);if(c.navigate===!1){let b=c.fetcherKey||vz();await o(b,a,c.action||d,{defaultShouldRevalidate:c.defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:h,formMethod:c.method||p,formEncType:c.encType||g,flushSync:c.flushSync})}else await s(c.action||d,{defaultShouldRevalidate:c.defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:h,formMethod:c.method||p,formEncType:c.encType||g,replace:c.replace,state:c.state,fromRouteId:a,flushSync:c.flushSync,viewTransition:c.viewTransition})},[o,s,n,a])}function xz(e,{relative:n}={}){let{basename:a}=v.useContext(ha),o=v.useContext(Ga);_t(o,"useFormAction must be used inside a RouteContext");let[s]=o.matches.slice(-1),u={...Fc(e||".",{relative:n})},c=Hr();if(e==null){u.search=c.search;let d=new URLSearchParams(u.search),p=d.getAll("index");if(p.some(y=>y==="")){d.delete("index"),p.filter(h=>h).forEach(h=>d.append("index",h));let y=d.toString();u.search=y?`?${y}`:""}}return(!e||e===".")&&s.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),a!=="/"&&(u.pathname=u.pathname==="/"?a:Aa([a,u.pathname])),zr(u)}function Sz(e,{relative:n}={}){let a=v.useContext(Cv);_t(a!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=aO("useViewTransitionState"),s=Fc(e,{relative:n});if(!a.isTransitioning)return!1;let u=Na(a.currentLocation.pathname,o)||a.currentLocation.pathname,c=Na(a.nextLocation.pathname,o)||a.nextLocation.pathname;return xh(s.pathname,c)!=null||xh(s.pathname,u)!=null}function wz(e){return v.createElement(PL,{flushSync:cr.flushSync,...e})}function bs({controlled:e,default:n,name:a,state:o="value"}){const{current:s}=v.useRef(e!==void 0),[u,c]=v.useState(()=>n),d=s&&e!==void 0?e:u,p=v.useCallback(g=>{s||c(g)},[]);return[d,p]}function Rz(e){const{open:n,defaultOpen:a=!1,onOpenChange:o,disabled:s}=e,[u,c]=bs({controlled:n,default:a,name:"Collapsible",state:"open"}),{mounted:d,setMounted:p,transitionStatus:g}=ws(u,!0,!0),y=Tr(),[h,b]=v.useState(),S=h===null?void 0:h??y,w=Be(C=>{const R=!u,T=dt(Va,C.nativeEvent);o(R,T),!T.isCanceled&&c(R)});return v.useMemo(()=>({defaultPanelId:y,disabled:s,handleTrigger:w,mounted:d,open:u,panelId:S,setMounted:p,setOpen:c,setPanelIdState:b,transitionStatus:g}),[y,s,w,d,u,S,p,c,b,g])}const oO=v.createContext(void 0);function iO(){const e=v.useContext(oO);if(e===void 0)throw new Error(Rn(15));return e}const Ez="data-open",Cz="data-closed",jf=Yy,Tz="data-panel-open",Oz={[Ez]:""},Mz={[Cz]:""},Az={open(e){return e?{[Tz]:""}:null}},Dz={open(e){return e?Oz:Mz}},sO={...Dz,...po},Nz=v.forwardRef(function(n,a){const{render:o,className:s,defaultOpen:u=!1,disabled:c=!1,onOpenChange:d,open:p,style:g,...y}=n,h=Be(d),b=Rz({open:p,defaultOpen:u,onOpenChange:h,disabled:c}),S=v.useMemo(()=>({open:b.open,disabled:b.disabled,transitionStatus:b.transitionStatus}),[b.open,b.disabled,b.transitionStatus]),w=v.useMemo(()=>({...b,onOpenChange:h,state:S}),[b,h,S]),C=Mt("div",n,{state:S,ref:a,props:y,stateAttributesMapping:sO});return x.jsx(oO.Provider,{value:w,children:C})}),lO=v.createContext(void 0);function jv(e=!1){const n=v.useContext(lO);if(n===void 0&&!e)throw new Error(Rn(16));return n}function jz(e){const{focusableWhenDisabled:n,disabled:a,composite:o=!1,tabIndex:s=0,isNativeButton:u}=e,c=o&&n!==!1,d=o&&n===!1;return{props:v.useMemo(()=>{const g={onKeyDown(y){a&&n&&y.key!=="Tab"&&y.preventDefault()}};return o||(g.tabIndex=s,!u&&a&&(g.tabIndex=n?s:-1)),(u&&(n||c)||!u&&a)&&(g["aria-disabled"]=a),u&&(!n||d)&&(g.disabled=a),g},[o,a,n,c,d,u,s])}}function hs(e,n,{detail:a=0,pointerType:o=""}={}){e.dispatchEvent(new(wn(e)).PointerEvent("click",{bubbles:!0,cancelable:!0,composed:!0,detail:a,pointerType:o,shiftKey:n.shiftKey,ctrlKey:n.ctrlKey,altKey:n.altKey,metaKey:n.metaKey}))}function mo(e={}){const{disabled:n=!1,focusableWhenDisabled:a,tabIndex:o=0,native:s=!0,composite:u}=e,c=v.useRef(null),d=jv(!0),p=u??d!==void 0,{props:g}=jz({focusableWhenDisabled:a,disabled:n,composite:p,tabIndex:o,isNativeButton:s}),y=v.useCallback(()=>{const S=c.current;_0(S)&&p&&n&&g.disabled===void 0&&S.disabled&&(S.disabled=!1)},[n,g.disabled,p]);_e(y,[y]);const h=v.useCallback((S={})=>{const{onClick:w,onMouseDown:C,onKeyUp:R,onKeyDown:T,onPointerDown:O,...M}=S;return Lr({onClick(A){if(n){A.preventDefault();return}w?.(A)},onMouseDown(A){n||C?.(A)},onKeyDown(A){if(n||(ch(A),T?.(A),A.baseUIHandlerPrevented))return;const N=A.target===A.currentTarget,P=A.currentTarget,I=_0(P),D=!s&&Iz(P),z=N&&(s?I:!D),F=A.key==="Enter",G=A.key===" ",J=P.getAttribute("role"),Y=J?.startsWith("menuitem")||J==="option"||J==="gridcell";if(N&&p&&G){if(A.defaultPrevented&&Y)return;A.preventDefault(),(!s||I)&&(A.preventBaseUIHandler(),hs(P,A));return}if(!z||s||!G&&!F){N&&D&&G&&A.preventDefault();return}A.defaultPrevented||(A.preventDefault(),F&&(A.preventBaseUIHandler(),hs(P,A)))},onKeyUp(A){if(!n){if(ch(A),R?.(A),A.target===A.currentTarget&&s&&p&&_0(A.currentTarget)&&A.key===" "){A.preventDefault();return}A.baseUIHandlerPrevented||A.target===A.currentTarget&&!s&&!p&&!A.defaultPrevented&&A.key===" "&&(A.preventBaseUIHandler(),hs(A.currentTarget,A))}},onPointerDown(A){if(n){A.preventDefault();return}O?.(A)}},s?{type:"button"}:{role:"button"},g,M)},[n,g,p,s]),b=Be(S=>{c.current=S,y()});return{getButtonProps:h,buttonRef:b}}function _0(e){return yn(e)&&e.tagName==="BUTTON"}function Iz(e){return yn(e)&&e.tagName==="A"&&!!e.href}const kz={...Az,...po},Pz=v.forwardRef(function(n,a){const{panelId:o,open:s,handleTrigger:u,state:c,disabled:d}=iO(),{className:p,disabled:g=d,render:y,nativeButton:h=!0,style:b,...S}=n,{getButtonProps:w,buttonRef:C}=mo({disabled:g,native:h});return Mt("button",n,{state:c,ref:[a,C],props:[{"aria-controls":s?o:void 0,"aria-expanded":s,onClick:u},S,w],stateAttributesMapping:kz})}),pl={height:void 0,width:void 0};function Lz(e){const{externalRef:n,hiddenUntilFound:a,id:o,keepMounted:s,mounted:u,onOpenChange:c,open:d,setMounted:p,setOpen:g,transitionStatus:y}=e,h=v.useRef(null),b=v.useRef(null),[S,w]=v.useState(pl),C=v.useRef(pl),R=v.useRef(!1),T=v.useRef(d),O=v.useRef(!1),[M,A]=v.useState(!1),N=v.useRef(null),P=Xr(n,h),I=Pn(d),D=Qh(h),z=!d&&!u,F=M?"idle":y,G=d&&(T.current||O.current),J=!d&&u&&b.current==="css-animation"&&S.height===void 0&&S.width===void 0?C.current:S,Y=a&&z&&b.current!=="css-animation",U=Be((V,X=!0)=>{X&&(C.current=V),w(V)}),H=Be(()=>{N.current?.(),N.current=null}),L=Be(V=>{H(),N.current=()=>{N.current=null,V()}}),$=Be(()=>{d&&u&&b.current==="css-animation"&&(O.current=!0)});_e(()=>{!M||y==="starting"||A(!1)},[M,y]),v.useEffect(()=>()=>{$(),H()},[$,H]),_e(()=>{d||(T.current=!1,O.current=!1);const V=h.current;if(!V)return;!d&&N.current&&H();const X=zz(V,G);if(b.current=X,d&&y==="idle"&&T.current&&X==="css-animation"){C.current=gl(V);return}if(d&&y==="starting"){const se=R.current;if(R.current=!1,X==="none"){U(gl(V)),A(!0);return}if(X==="css-transition"){const W=_z(V);if(U(gl(V)),!se)return W;const re=If(V,"transition-duration","0s");return L(re),A(!0),W}U(gl(V));const j=If(V,"animation-name","none");if(!se){j();return}const B=If(V,"animation-duration","0s");j(),L(B),A(!0);return}if(!d&&u&&(y==="idle"||y==="starting")){if(X==="none"){U(pl,!1),p(!1);return}U(gl(V));return}if(y!=="ending")return;if(X==="none"){p(!1);return}const ee=gl(V);if(!(ee.height>0||ee.width>0)){p(!1);return}U(ee),X==="css-animation"&&If(V,"animation-name","none")()},[u,d,H,U,p,L,G,y]),ja({enabled:d&&u&&F==="idle",open:!0,ref:h,onComplete(){d&&U(pl,!1)}}),v.useEffect(()=>{if(d||!u||F!=="ending")return;if(!h.current){p(!1),U(pl,!1);return}const X=new AbortController;let ee=-1;function q(){I.current||(p(!1),U(pl,!1))}return ee=Cr.request(()=>{D(q,X.signal)}),()=>{Cr.cancel(ee),X.abort()}},[I,u,d,F,D,U,p]),_e(()=>{const V=h.current;!V||!a||!z||V.setAttribute("hidden","until-found")},[z,a]),v.useEffect(function(){const X=h.current;if(!X)return;const ee=Da.create();let q=-1;const se=(W,re)=>{ee.start(0,()=>{I.current||(q=Cr.request(()=>{I.current||(W&&(R.current=!1),re&&X.setAttribute(jf,""),X.setAttribute("hidden","until-found"))}))})},B=It(X,"beforematch",W=>{const re=dt(_r,W);if(c(!0,re),re.isCanceled){se(!1,!1);return}R.current=!0;const Re=X.hasAttribute(jf);X.removeAttribute(jf),g(!0),se(!0,Re)});return()=>{ee.clear(),Cr.cancel(q),B()}},[I,c,g]);const K=s||a||u||d;return{height:J.height,props:{...Y?{[jf]:""}:void 0,hidden:z,id:o},ref:P,shouldPreventOpenAnimation:G,shouldRender:K,transitionStatus:F,width:J.width}}function gl(e){return{height:e.scrollHeight,width:e.scrollWidth}}function zz(e,n){const a=wn(e).getComputedStyle(e),o=(a.animationName.split(",").map(u=>u.trim()).some(u=>u!==""&&u!=="none")||n)&&Gw(a.animationDuration),s=Gw(a.transitionDuration);return o&&s||s?"css-transition":o?"css-animation":"none"}function Gw(e){return e.split(",").map(n=>n.trim()).some(n=>n!==""&&Number.parseFloat(n)>0)}function If(e,n,a){const o=e.style.getPropertyValue(n),s=e.style.getPropertyPriority(n);return e.style.setProperty(n,a),()=>{if(o===""){e.style.removeProperty(n);return}e.style.setProperty(n,o,s)}}function _z(e){const n={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(n).forEach(s=>{e.style.setProperty(s,"initial","important")});function a(){Object.entries(n).forEach(([s,u])=>{if(u===""){e.style.removeProperty(s);return}e.style.setProperty(s,u)})}const o=Cr.request(a);return()=>{Cr.cancel(o),a()}}const Hz="--collapsible-panel-height",Uz="--collapsible-panel-width",Fz=v.forwardRef(function(n,a){const{className:o,hiddenUntilFound:s,keepMounted:u,render:c,id:d,style:p,...g}=n,{defaultPanelId:y,mounted:h,onOpenChange:b,open:S,setMounted:w,setPanelIdState:C,setOpen:R,state:T,transitionStatus:O}=iO(),M=s??!1,A=u??!1,N=d||void 0,P=N??y;_e(()=>(C($=>N??($===null?void 0:$)),()=>{C($=>$===N?null:$)}),[N,C]);const{height:I,props:D,ref:z,shouldPreventOpenAnimation:F,shouldRender:G,transitionStatus:J,width:Y}=Lz({externalRef:a,hiddenUntilFound:M,id:P,keepMounted:A,mounted:h,onOpenChange:b,open:S,setMounted:w,setOpen:R,transitionStatus:O}),U={...T,transitionStatus:J},H=vE(p,U),L=Mt("div",{...n,style:void 0},{state:U,ref:z,props:[D,{style:{[Hz]:I===void 0?"auto":`${I}px`,[Uz]:Y===void 0?"auto":`${Y}px`}},g,H?{style:H}:void 0,F?{style:{animationName:"none"}}:void 0],stateAttributesMapping:sO});return G?L:null});function Bz({...e}){return x.jsx(Nz,{"data-slot":"collapsible",...e})}function Vz({...e}){return x.jsx(Pz,{"data-slot":"collapsible-trigger",...e})}function qz({...e}){return x.jsx(Fz,{"data-slot":"collapsible-content",...e})}const uO=v.createContext(void 0);function Yz(e){const n=v.useContext(uO);if(n===void 0)throw new Error(Rn(33));return n}const Sp=v.createContext(void 0);function Vo(e){const n=v.useContext(Sp);if(n===void 0&&!e)throw new Error(Rn(36));return n}const cO=v.createContext(void 0);function wp(e=!0){const n=v.useContext(cO);if(n===void 0&&!e)throw new Error(Rn(25));return n}const dO=v.createContext(null);function Rp(e="root"){const n=v.useContext(dO),a=v.useContext(Sp);return n===null||a===void 0?null:(e==="submenu-trigger"?a.virtualFocus||a.parentVirtualFocus:a.virtualFocus)?n:null}const Kz={visible:!0,ref:null};function Gz(){return Kz}function fO(e,n,a="root"){const o=Rp(a),u=((a==="submenu-trigger"?o?.useSubmenuTrigger:o?.useItem)??Gz)({label:e.label,children:e.children,render:e.render}),c=Xr(n,u.ref);return{visible:u.visible,ref:c,props:u.props}}function $z(e){e.preventDefault()}function Xz(e){const{closeOnClick:n,highlighted:a,id:o,nodeId:s,store:u,typingRef:c,itemRef:d,itemMetadata:p}=e,g=Vo(),y=wp(!0),h=p.type==="submenu-trigger",b=h?g.parentVirtualFocus:g.virtualFocus,w=(h&&g.parent.type==="menu"?g.parent.store:g.store).useState("webkitAriaSelected",a),{events:C}=u.useState("floatingTreeRoot"),R=u.useState("open"),T=y!==void 0,O=!b&&R&&a?0:-1;return v.useMemo(()=>({id:o,role:"menuitem",tabIndex:O,"aria-selected":w,onMouseDown:b?$z:void 0,onKeyDown(M){M.key===" "&&c?.current&&M.preventDefault()},onMouseMove(M){s&&C.emit("itemhover",{nodeId:s,target:M.currentTarget})},onClick(M){n&&C.emit("close",{domEvent:M.nativeEvent,reason:fs})},onMouseUp(M){if(y){const A=y.initialCursorPointRef.current;if(y.initialCursorPointRef.current=null,T&&A&&Math.abs(M.clientX-A.x)<=1&&Math.abs(M.clientY-A.y)<=1||T&&!_y&&M.button===2)return}d.current&&u.context.allowMouseUpTriggerRef.current&&(!T||M.button===2)&&p.type==="regular-item"&&hs(d.current,M,{detail:1,pointerType:"mouse"})}}),[n,O,o,C,s,u.context.allowMouseUpTriggerRef,c,d,y,T,p.type,w,b])}const hO={type:"regular-item"};function pO(e){const{closeOnClick:n,disabled:a,highlighted:o,id:s,store:u,typingRef:c=u.context.typingRef,nativeButton:d,itemMetadata:p,nodeId:g}=e,y=v.useRef(null),{getButtonProps:h,buttonRef:b}=mo({disabled:a,focusableWhenDisabled:!0,native:d,composite:!0}),S=Xz({closeOnClick:n,highlighted:o,id:s,nodeId:g,store:u,typingRef:c,itemRef:y,itemMetadata:p}),w=v.useCallback(R=>Lr(S,{onMouseEnter(T){p.type==="submenu-trigger"&&p.setActive(T.nativeEvent)}},R,h),[S,h,p]),C=Xr(y,b);return v.useMemo(()=>({getItemProps:w,itemRef:C}),[w,C])}const gO=v.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function Qz(){return v.useContext(gO)}function Ep(e={}){const{guess:n,label:a,metadata:o,textRef:s,index:u}=e,{register:c,unregister:d,subscribeMapChange:p,nextIndexRef:g}=Qz(),y=v.useRef(-1),[h,b]=v.useState(u==null&&n?()=>{if(y.current===-1){const R=g.current;g.current+=1,y.current=R}return y.current}:-1),S=u??h,w=v.useRef(null),C=v.useCallback(R=>{const T=w.current;T&&d(T),w.current=R,R&&c(R,{metadata:o??null,index:u??null,label:a,textRef:s})},[u,c,d,o,a,s]);return _e(()=>{if(u==null)return p(R=>{const T=w.current?R.get(w.current)?.index:null;T!=null&&b(T)})},[u,p]),{ref:C,index:S}}const Zz="data-checked",Jz="data-unchecked",mO={checked(e){return e?{[Zz]:""}:{[Jz]:""}},...po},Iv=v.createContext(void 0);function Wz(){const e=v.useContext(Iv);if(e===void 0)throw new Error(Rn(31));return e}const e_=v.forwardRef(function(n,a){const{render:o,className:s,style:u,...c}=n,[d,p]=v.useState(void 0),g=Mt("div",n,{ref:a,props:{role:"group","aria-labelledby":d,...c}});return x.jsx(Iv.Provider,{value:p,children:g})}),t_=v.forwardRef(function(n,a){const o=Rp()?.Group??e_;return x.jsx(o,{...n,ref:a})}),n_=v.forwardRef(function(n,a){const{render:o,className:s,style:u,id:c,...d}=n,p=Tr(c),g=Wz();return _e(()=>(g(p),()=>{g(y=>y===p?void 0:y)}),[g,p]),Mt("div",n,{ref:a,props:{id:p,"aria-hidden":!0,...d}})}),r_=v.forwardRef(function(n,a){const{render:o,className:s,id:u,label:c,nativeButton:d=!1,disabled:p=!1,closeOnClick:g=!0,style:y,...h}=n,{store:b}=Vo(),S=Ep({guess:!0,label:c}),w=Tr(u),C=b.useState("disabled"),R=b.useState("isActive",S.index),T=b.useState("floatingNodeId"),O=b.useState("itemProps"),M=p||C,{getItemProps:A,itemRef:N}=pO({closeOnClick:g,disabled:M,highlighted:R,id:w,store:b,nativeButton:d,nodeId:T,itemMetadata:hO});return Mt("div",n,{state:{disabled:M,highlighted:R},props:[O,h,A],ref:[N,a,S.ref]})}),yO=v.forwardRef(function(n,a){const o=fO(n,a);return o.visible?x.jsx(r_,{...n,ref:o.ref}):null}),a_=v.createContext(void 0);function kv(e){return v.useContext(a_)}const vy="ArrowUp",by="ArrowDown",xy="ArrowLeft",Sy="ArrowRight",wy="Home",Ry="End",Bc=new Set([vy,by,xy,Sy,wy,Ry]),vO="Shift",o_=[vO,"Control","Alt","Meta"];function i_(e){return yn(e)&&e.tagName==="INPUT"}function $w(e){return!!(i_(e)&&e.selectionStart!=null||yn(e)&&e.tagName==="TEXTAREA")}function Xw(e,n,a,o){if(!e||!n||!n.scrollTo)return;let s=e.scrollLeft,u=e.scrollTop;const c=e.clientWidth<e.scrollWidth,d=e.clientHeight<e.scrollHeight;if(c&&o!=="vertical"){const p=Qw(e,n,"left"),g=kf(e),y=kf(n);a==="ltr"&&(p+n.offsetWidth+y.scrollMarginRight>e.scrollLeft+e.clientWidth-g.scrollPaddingRight?s=p+n.offsetWidth+y.scrollMarginRight-e.clientWidth+g.scrollPaddingRight:p-y.scrollMarginLeft<e.scrollLeft+g.scrollPaddingLeft&&(s=p-y.scrollMarginLeft-g.scrollPaddingLeft)),a==="rtl"&&(p-y.scrollMarginLeft<e.scrollLeft+g.scrollPaddingLeft?s=p-y.scrollMarginLeft-g.scrollPaddingLeft:p+n.offsetWidth+y.scrollMarginRight>e.scrollLeft+e.clientWidth-g.scrollPaddingRight&&(s=p+n.offsetWidth+y.scrollMarginRight-e.clientWidth+g.scrollPaddingRight))}if(d&&o!=="horizontal"){const p=Qw(e,n,"top"),g=kf(e),y=kf(n);p-y.scrollMarginTop<e.scrollTop+g.scrollPaddingTop?u=p-y.scrollMarginTop-g.scrollPaddingTop:p+n.offsetHeight+y.scrollMarginBottom>e.scrollTop+e.clientHeight-g.scrollPaddingBottom&&(u=p+n.offsetHeight+y.scrollMarginBottom-e.clientHeight+g.scrollPaddingBottom)}e.scrollTo({left:s,top:u,behavior:"auto"})}function Qw(e,n,a){const o=a==="left"?"offsetLeft":"offsetTop";let s=0;for(;n.offsetParent&&(s+=n[o],n.offsetParent!==e);)n=n.offsetParent;return s}function kf(e){const n=getComputedStyle(e);return{scrollMarginTop:parseFloat(n.scrollMarginTop)||0,scrollMarginRight:parseFloat(n.scrollMarginRight)||0,scrollMarginBottom:parseFloat(n.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(n.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(n.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(n.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(n.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(n.scrollPaddingLeft)||0}}const s_=v.createContext(void 0);function l_(){return v.useContext(s_)}function u_(e,n){const a=ev(e.render);if(v.isValidElement(a)){const o=a.props;if(Object.hasOwn(o,"id"))return o.id??""}return e.id??n}function c_(e,n,a){const o=u_(e,n),s=o===n?void 0:o,u=v.useCallback(c=>a?.(c?s:void 0),[s,a]);return[o,u]}function d_(e,n,a){const o=ev(e.render),s=v.isValidElement(o)?o.props:void 0,u=e["aria-label"]??s?.["aria-label"];let c=e["aria-labelledby"]??s?.["aria-labelledby"];return c==null&&!u&&(c=n?n.id||void 0:a||void 0),c}const f_=v.forwardRef(function(n,a){const{render:o,className:s,style:u,finalFocus:c,id:d,initialFocus:p,...g}=n,{store:y,defaultFloatingId:h,setRenderedFloatingId:b,virtualFocus:S,orientation:w}=Vo(),C=l_(),{side:R,align:T}=Yz(),O=kv()!=null,M=y.useState("open"),A=y.useState("transitionStatus"),N=y.useState("popupProps"),P=y.useState("mounted"),I=y.useState("instantType"),D=y.useState("activeTriggerElement"),z=y.useState("parent"),F=y.useState("lastOpenChangeReason"),G=y.useState("rootId"),J=y.useState("floatingRootContext"),Y=y.useState("floatingTreeRoot"),U=y.useState("closeDelay"),H=y.useState("hoverEnabled"),L=y.useState("disabled"),$=y.useState("openMethod"),K=y.useState("activeTriggerId"),V=y.useState("listElement"),[X,ee]=c_(n,h,b),q=d_(n,D,K),se=z.type==="menu"?C:void 0,j=z.type==="context-menu";let B=p??z.type!=="menu";p===void 0&&V&&z.type!=="menu"&&(B=()=>y.state.activeIndex!==null?!1:V),ja({open:M,ref:y.context.popupRef,onComplete(){M&&y.context.onOpenChangeComplete?.(!0)}}),v.useEffect(()=>{function ve(Pe){y.setOpen(!1,dt(Pe.reason,Pe.domEvent))}return Y.events.on("close",ve),()=>{Y.events.off("close",ve)}},[Y.events,y]),lv(J,{enabled:H&&!L&&!j&&z.type!=="menubar",closeDelay:U});const W=y.useStateSetter("popupElement"),re=v.useContext(dO)?.useParentHandoff??p_,{parentVirtualFocusRef:Re,handleFocus:le}=re(y,z,M,S),me={transitionStatus:A,side:R,align:T,open:M,nested:z.type==="menu",instant:I},ge=Mt("div",n,{state:me,ref:[a,y.context.popupRef,W,ee],stateAttributesMapping:Bh,props:[N,{id:X,...V?{role:"presentation"}:{role:"menu","aria-orientation":w==="horizontal"?"horizontal":void 0,"aria-labelledby":q},onKeyDown(ve){se?.onPopupKeyDown?.(ve),O&&Bc.has(ve.key)&&ve.stopPropagation()},onFocus:le},Lc(A),g,{"data-rootownerid":G}]});let ce=z.type===void 0||j;(D||z.type==="menubar"&&F!==Vh)&&(ce=!0);const Te=se?.getReturnElement??Re;return x.jsx(Xh,{context:J,openInteractionType:$,modal:j,disabled:!P,returnFocus:c??Te??ce,explicitReturnFocus:c===void 0&&Te?!1:void 0,initialFocus:B,restoreFocus:!0,getInsideElements:z.type===void 0?()=>[y.context.beforeTriggerFocusGuardRef.current]:void 0,externalTree:z.type!=="menubar"?Y:void 0,previousFocusableElement:D,nextFocusableElement:z.type===void 0?y.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:y.context.beforeContentFocusGuardRef,children:ge})}),h_={parentVirtualFocusRef:void 0,handleFocus:void 0};function p_(){return h_}const bO=v.forwardRef(function(n,a){const o=Rp()?.Popup??f_;return x.jsx(o,{...n,ref:a})}),xO=v.createContext(void 0);function g_(){const e=v.useContext(xO);if(e===void 0)throw new Error(Rn(32));return e}const SO=v.forwardRef(function(n,a){const{keepMounted:o=!1,...s}=n,{store:u,parent:c}=Vo();if(!(u.useState("mounted")||o))return null;const g=c.type==="menu"||c.type==="menubar"?"group":void 0;return x.jsx(xO.Provider,{value:o,children:x.jsx($h,{ref:a,...s,portalOwnerRole:g})})});function Pv(e){const{children:n,elementsRef:a,labelsRef:o,onMapChange:s}=e,u=Be(s),[,c]=v.useState(0),d=er(y_).current,p=er(m_).current,g=v.useRef(0),y=v.useRef(!0),h=v.useRef(null),b=v.useRef(null),S=Be(()=>{y.current||(y.current=!0,c(N=>N+1))}),w=Be((N,P)=>{p.set(N,P),S()}),C=Be(N=>{p.delete(N),S()}),R=Be(N=>{const P=new Map;return a.current.length=0,o&&(o.current.length=0),N.forEach(I=>{P.set(I.element,{...I.registration.metadata??{},index:I.index}),a.current[I.index]=I.element,o&&(o.current[I.index]=I.registration.label!==void 0?I.registration.label:I.registration.textRef?.current?.textContent??I.element.textContent)}),g.current=a.current.length,P});function T(N){if(b.current?.disconnect(),b.current=null,typeof MutationObserver!="function"||N.length<2)return;const P=new MutationObserver(D=>{if(!x_(D))return;let z=null;for(const F of N)if(F.isConnected){if(z&&wO(z,F)>0){P.disconnect(),S();return}z=F}});b.current=P;const I=new Set;for(let D=1;D<N.length;D+=1){const z=b_(N[D-1],N[D]);z&&I.add(z)}I.forEach(D=>P.observe(D,{childList:!0}))}const O=Be(()=>{const[N,P]=v_(p),I=R(N),D=h.current,z=!D||D.length!==N.length||N.some((F,G)=>{const J=D[G];return F.index!==J.index||F.element!==J.element||F.registration.index!==J.registration.index||F.registration.metadata!==J.registration.metadata});T(P),h.current=N,y.current=!1,z&&(d.forEach(F=>F(I)),u(I))});_e(()=>(!y.current&&h.current&&R(h.current),()=>{a.current=[],o&&(o.current=[])}),[a,o,R]),_e(()=>{y.current&&O()}),_e(()=>()=>{b.current?.disconnect(),y.current=!0},[]);const M=Be(N=>(d.add(N),()=>{d.delete(N)})),A=v.useMemo(()=>({register:w,unregister:C,subscribeMapChange:M,nextIndexRef:g}),[w,C,M,g]);return x.jsx(gO.Provider,{value:A,children:n})}function m_(){return new Map}function y_(){return new Set}function v_(e){const n=new Set,a=[],o=[];e.forEach((u,c)=>{if(!c.isConnected)return;const d=u.index,p={index:d??-1,element:c,registration:u};d===null?o.push(p):d>=0&&(n.add(d),a.push(p))});let s=0;return o.sort((u,c)=>wO(u.element,c.element)),o.forEach(u=>{for(;n.has(s);)s+=1;u.index=s,a.push(u),s+=1}),n.size>0&&a.sort((u,c)=>u.index-c.index),[a,o.map(u=>u.element)]}function b_(e,n){let a=e.parentElement;for(;a&&!a.contains(n);)a=a.parentElement;return a}function x_(e){for(const n of e)for(let a=0;a<n.removedNodes.length;a+=1)if(n.removedNodes[a].isConnected)return!0;return!1}function wO(e,n){return e.nextElementSibling===n?-1:n.nextElementSibling===e?1:e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}const Cp=v.forwardRef(function(n,a){const{cutout:o,...s}=n;let u;if(o){const c=o.getBoundingClientRect();u=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${c.left}px ${c.top}px,${c.left}px ${c.bottom}px,${c.right}px ${c.bottom}px,${c.right}px ${c.top}px,${c.left}px ${c.top}px)`}return x.jsx("div",{ref:a,role:"presentation","data-base-ui-inert":"",...s,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:u}})});function RO(e){const{store:n,domReference:a,positionerElement:o,open:s}=e,u=v.useRef(null),c=v.useRef(null),d=Qh(o);_e(()=>{s||(c.current?.abort(),c.current=null,n.state.instantType==="trigger-change"&&n.set("instantType",void 0))},[s,n]),_e(()=>{const p=a,g=u.current;if(p&&(u.current=p),!g||!p||p===g||!n.select("open"))return;n.set("instantType",void 0);const y=new AbortController;return c.current=y,d(()=>{n.select("open")&&n.set("instantType","trigger-change")},y.signal),()=>{y.abort()}},[a,d,n])}let Zw={},Jw={},Ww="";function Tp(e,n){return Oc(e)?e:n}function eR(e,n,a){return/hidden|clip/.test(e.getComputedStyle(Tp(n,a)).overflowY)}function S_(e){if(typeof document>"u")return!1;const n=Kt(e);return wn(n).innerWidth-n.documentElement.clientWidth>0}function w_(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const a=Kt(e),o=a.documentElement,s=a.body,u=Tp(o,s),c=u.style.overflowY,d=o.style.scrollbarGutter;o.style.scrollbarGutter="stable",u.style.overflowY="scroll";const p=u.offsetWidth;u.style.overflowY="hidden";const g=u.offsetWidth;return u.style.overflowY=c,o.style.scrollbarGutter=d,p===g}function R_(e){const n=Kt(e),a=n.documentElement,o=n.body,s=Tp(a,o),u={overflowY:s.style.overflowY,overflowX:s.style.overflowX};return Object.assign(s.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(s.style,u)}}function E_(e){const n=Kt(e),a=n.documentElement,o=n.body,s=wn(a);let u=0,c=0,d=!1;const p=Cr.create();if(ho&&(s.visualViewport?.scale??1)!==1)return()=>{};function g(){const S=s.getComputedStyle(a),w=s.getComputedStyle(o),T=(S.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";u=a.scrollTop,c=a.scrollLeft,Zw={scrollbarGutter:a.style.scrollbarGutter,overflowY:a.style.overflowY,overflowX:a.style.overflowX},Ww=a.style.scrollBehavior,Jw={position:o.style.position,height:o.style.height,width:o.style.width,boxSizing:o.style.boxSizing,overflowY:o.style.overflowY,overflowX:o.style.overflowX,scrollBehavior:o.style.scrollBehavior};const O=a.scrollHeight>a.clientHeight,M=a.scrollWidth>a.clientWidth,A=S.overflowY==="scroll"||w.overflowY==="scroll",N=S.overflowX==="scroll"||w.overflowX==="scroll",P=Math.max(0,s.innerWidth-o.clientWidth),I=Math.max(0,s.innerHeight-o.clientHeight),D=parseFloat(w.marginTop)+parseFloat(w.marginBottom),z=parseFloat(w.marginLeft)+parseFloat(w.marginRight),F=Tp(a,o);if(d=w_(e),d){a.style.scrollbarGutter=T,F.style.overflowY="hidden",F.style.overflowX="hidden";return}Object.assign(a.style,{scrollbarGutter:T,overflowY:"hidden",overflowX:"hidden"}),(O||A)&&(a.style.overflowY="scroll"),(M||N)&&(a.style.overflowX="scroll"),Object.assign(o.style,{position:"relative",height:D||I?`calc(100dvh - ${D+I}px)`:"100dvh",width:z||P?`calc(100vw - ${z+P}px)`:"100vw",boxSizing:"border-box",overflowY:"hidden",overflowX:"hidden",scrollBehavior:"unset"}),o.scrollTop=u,o.scrollLeft=c,a.setAttribute("data-base-ui-scroll-locked",""),a.style.scrollBehavior="unset"}function y(){Object.assign(a.style,Zw),Object.assign(o.style,Jw),d||(a.scrollTop=u,a.scrollLeft=c,a.removeAttribute("data-base-ui-scroll-locked"),a.style.scrollBehavior=Ww)}function h(){y(),p.request(g)}g();const b=It(s,"resize",h);return()=>{p.cancel(),y(),typeof s.removeEventListener=="function"&&b()}}class C_{lockCount=0;restore=null;timeoutLock=Da.create();timeoutUnlock=Da.create();acquire(n){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(n)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(n){if(this.lockCount===0||this.restore!==null)return;const a=Kt(n),o=a.documentElement,s=a.body,u=wn(o);if(eR(u,o,s)){const d=new u.MutationObserver(()=>{eR(u,o,s)||(d.disconnect(),this.restore=null,this.lock(n))}),p={attributes:!0};d.observe(o,p),d.observe(s,p),this.restore=()=>d.disconnect();return}const c=Lh||!S_(n);this.restore=c?R_(n):E_(n)}}const T_=new C_;function EO(e=!0,n=null){_e(()=>{if(e)return T_.acquire(n)},[e,n])}const O_=20;function Lv(e,n,a,o){const[s,u]=v.useState(!1);_e(()=>{if(!e||!n||a==null){u(!1);return}const c=Kt(a).documentElement.clientWidth,d=a.offsetWidth;u(c>0&&d>0&&d>=c-O_)},[e,n,a]),EO(e&&(!n||s),o)}const CO=v.forwardRef(function(n,a){const{anchor:o,positionMethod:s="absolute",className:u,render:c,side:d,align:p,sideOffset:g=0,alignOffset:y=0,collisionBoundary:h="clipping-ancestors",collisionPadding:b=5,arrowPadding:S=5,sticky:w=!1,disableAnchorTracking:C=!1,collisionAvoidance:R=TE,style:T,...O}=n,{store:M,virtualFocus:A,syncHighlightedItem:N}=Vo(),P=g_(),I=wp(!0),D=M.useState("parent"),z=M.useState("floatingRootContext"),F=M.useState("floatingTreeRoot"),G=M.useState("mounted"),J=M.useState("open"),Y=M.useState("modal"),U=M.useState("openMethod"),H=M.useState("activeTriggerElement"),L=M.useState("transitionStatus"),$=M.useState("positionerElement"),K=M.useState("instantType"),V=M.useState("adaptiveOrigin"),X=M.useState("lastOpenChangeReason"),ee=M.useState("floatingNodeId"),q=M.useState("floatingParentNodeId"),se=z.useState("domReferenceElement");let j=o,B=g,W=y,re=p,Re=R;D.type==="context-menu"&&(j=o??D.context?.anchor,re=re??"start",!d&&re!=="center"&&(W=n.alignOffset??2,B=n.sideOffset??-5));let le=d,me=re;D.type==="menu"?(le=le??"inline-end",me=me??"start",Re=n.collisionAvoidance??tv):D.type==="menubar"&&(le=le??(D.context.orientation==="vertical"?"inline-end":"bottom"),me=me??"start");const ge=D.type==="context-menu",ce=lp({anchor:j,floatingRootContext:z,positionMethod:I?"fixed":s,mounted:G,side:le,sideOffset:B,align:me,alignOffset:W,arrowPadding:ge?0:S,collisionBoundary:h,collisionPadding:b,sticky:w,nodeId:ee,keepMounted:P,disableAnchorTracking:C,collisionAvoidance:Re,shift:ge?{crossAxis:!("side"in Re&&Re.side==="flip"),rootBoundary:"layoutViewport"}:void 0,externalTree:F,adaptiveOrigin:V,lazyFlip:A?"placement":!1});v.useEffect(()=>{function He(be){be.open&&(be.parentNodeId===ee&&M.set("hoverEnabled",!1),be.nodeId!==ee&&be.parentNodeId===M.select("floatingParentNodeId")&&M.setOpen(!1,dt(Zu)))}return F.events.on("menuopenchange",He),()=>{F.events.off("menuopenchange",He)}},[M,F.events,ee]),v.useEffect(()=>{if(M.select("floatingParentNodeId")==null)return;function He(be){if(be.open||be.nodeId!==M.select("floatingParentNodeId"))return;const Ue=be.reason??Zu;M.setOpen(!1,dt(Ue))}return F.events.on("menuopenchange",He),()=>{F.events.off("menuopenchange",He)}},[F.events,M]);const Te=Hn();v.useEffect(()=>{J||Te.clear()},[J,Te]),v.useEffect(()=>{function He(be){if(!(!J||be.nodeId!==M.select("floatingParentNodeId")))if(be.target&&H&&H!==be.target){const Ue=M.select("closeDelay");Ue>0?Te.isStarted()||Te.start(Ue,()=>{M.setOpen(!1,dt(Zu))}):M.setOpen(!1,dt(Zu))}else Te.clear()}return F.events.on("itemhover",He),()=>{F.events.off("itemhover",He)}},[F.events,J,H,M,Te]),v.useEffect(()=>{const He={open:J,nodeId:ee,parentNodeId:q,reason:M.select("lastOpenChangeReason")};F.events.emit("menuopenchange",He)},[F.events,J,M,ee,q]),RO({store:M,domReference:se,positionerElement:$,open:J});const ve={open:J,side:ce.side,align:ce.align,anchorHidden:ce.anchorHidden,nested:D.type==="menu",instant:K},Pe=D.type==="menubar"&&D.context.modal;Lv(J&&(Pe||Y&&X!==qn),U==="touch",$,H);const Le=up(n,ve,{styles:ce.positionerStyles,transitionStatus:L,props:O,refs:[a,M.useStateSetter("positionerElement")],hidden:!G,inert:!J}),Fe=G&&D.type!=="menu"&&(D.type!=="menubar"&&Y&&X!==qn||D.type==="menubar"&&D.context.modal);let Oe=null;return D.type==="menubar"?Oe=D.context.contentElement:D.type===void 0&&(Oe=H),x.jsxs(uO.Provider,{value:ce,children:[Fe&&x.jsx(Cp,{ref:D.type==="context-menu"||D.type==="nested-context-menu"?D.context.internalBackdropRef:null,inert:cp(!J),cutout:Oe}),x.jsx(IE,{id:ee,children:x.jsx(Pv,{elementsRef:M.context.itemDomElements,labelsRef:M.context.itemLabels,onMapChange:N,children:Le})})]})}),TO=v.createContext(void 0);function M_(){const e=v.useContext(TO);if(e===void 0)throw new Error(Rn(34));return e}const A_=v.forwardRef(function(n,a){const{render:o,className:s,value:u,defaultValue:c,onValueChange:d,disabled:p=!1,style:g,"aria-labelledby":y,...h}=n,[b,S]=v.useState(void 0),[w,C]=bs({controlled:u,default:c,name:"MenuRadioGroup"}),R=Be((A,N)=>{d?.(A,N),!N.isCanceled&&C(A)}),O=Mt("div",n,{state:{disabled:p},ref:a,props:{role:"group","aria-labelledby":y??b,"aria-disabled":p||void 0,...h}}),M=v.useMemo(()=>({value:w,setValue:R,disabled:p}),[w,R,p]);return x.jsx(Iv.Provider,{value:S,children:x.jsx(TO.Provider,{value:M,children:O})})}),D_=v.memo(v.forwardRef(function(n,a){const o=Rp()?.RadioGroup??A_;return x.jsx(o,{...n,ref:a})})),OO=v.createContext(void 0);function N_(){const e=v.useContext(OO);if(e===void 0)throw new Error(Rn(35));return e}const j_=v.forwardRef(function(n,a){const{render:o,className:s,id:u,label:c,nativeButton:d=!1,disabled:p=!1,closeOnClick:g=!1,value:y,style:h,...b}=n,{store:S}=Vo(),{value:w,setValue:C,disabled:R}=M_(),T=Ep({guess:!0,label:c}),O=Tr(u),M=S.useState("isActive",T.index),A=S.useState("floatingNodeId"),N=S.useState("itemProps"),P=S.useState("disabled"),I=p||R||P,D=w===y,{getItemProps:z,itemRef:F}=pO({closeOnClick:g,disabled:I,highlighted:M,id:O,store:S,nativeButton:d,nodeId:A,itemMetadata:hO}),G=v.useMemo(()=>({disabled:I,highlighted:M,checked:D}),[I,M,D]);function J(U){const H=dt(fs,U.nativeEvent,void 0,{preventUnmountOnClose:Sn});C(y,H)}const Y=Mt("div",n,{state:G,stateAttributesMapping:mO,props:[N,{role:"menuitemradio","aria-checked":D,onClick:J},b,z],ref:[F,a,T.ref]});return x.jsx(OO.Provider,{value:G,children:Y})}),I_=v.forwardRef(function(n,a){const o=fO(n,a);return o.visible?x.jsx(j_,{...n,ref:o.ref}):null}),k_=v.forwardRef(function(n,a){const{render:o,className:s,style:u,keepMounted:c=!1,...d}=n,p=N_(),g=v.useRef(null),{transitionStatus:y,mounted:h,setMounted:b}=ws(p.checked);ja({batch:!0,enabled:!p.checked,open:p.checked,ref:g,onComplete(){p.checked||b(!1)}});const S={checked:p.checked,disabled:p.disabled,highlighted:p.highlighted,transitionStatus:y};return Mt("span",n,{state:S,stateAttributesMapping:mO,ref:[a,g],props:{"aria-hidden":!0,...d},enabled:c||h})}),P_=v.createContext(null);function MO(e){return v.useContext(P_)}function L_(e){const n=v.useRef(""),a=v.useCallback(s=>{s.defaultPrevented||(n.current=s.pointerType,e(s,s.pointerType))},[e]);return{onClick:v.useCallback(s=>{if(s.detail===0){e(s,"keyboard");return}"pointerType"in s?e(s,s.pointerType):e(s,n.current),n.current=""},[e]),onPointerDown:a}}function Yl(e,n){const a=v.useRef(e),o=Be(n);_e(()=>{a.current!==e&&o(a.current),a.current=e},[e,o])}function z_(e,n){const a=Be((u,c)=>{(typeof e=="function"?e():e)||n(c||(Lh?"touch":""))}),{onClick:o,onPointerDown:s}=L_(a);return v.useMemo(()=>({onClick:o,onPointerDown:s}),[o,s])}function AO(e){const[n,a]=v.useState(null),o=z_(e,a);return Yl(e,s=>{s&&!e&&a(null)}),v.useMemo(()=>({openMethod:n,triggerProps:o}),[n,o])}function __(e){return e==null?_r:e.type.startsWith("key")?eE:e.type.startsWith("mouse")||e.type.startsWith("pointer")?j4:_r}const H_={...Po,disabled:e=>e.parent.type==="menubar"&&e.parent.context.disabled||e.disabled,modal:e=>(e.parent.type===void 0||e.parent.type==="context-menu")&&(e.modal??!0),openMethod:e=>e.openMethod,keyboardOpen:e=>e.keyboardOpen,allowMouseEnter:e=>e.allowMouseEnter,highlightItemOnHover:e=>e.highlightItemOnHover,parent:e=>e.parent,rootId:e=>e.parent.type==="menu"?e.parent.store.select("rootId"):e.parent.type!==void 0?e.parent.context.rootId:e.rootId,activeIndex:e=>e.activeIndex,listElement:e=>e.listElement,triggerControlsId:(e,n)=>{const a=Po.triggerPopupId(e,n);return a?e.listElement?.id||a:void 0},filterTriggerProps:e=>e.filterTriggerProps,inputProps:e=>e.inputProps,webkitAriaSelected:(e,n)=>ho&&e.inputFocused&&n?!0:void 0,highlightedItemId:e=>e.highlightedItem?.id||void 0,isActive:(e,n)=>e.activeIndex===n,hoverEnabled:e=>e.hoverEnabled,instantType:e=>e.instantType==="trigger-change"&&!Po.open(e)?void 0:e.instantType,lastOpenChangeReason:e=>e.openChangeReason,floatingTreeRoot:e=>e.parent.type==="menu"?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot,floatingNodeId:e=>e.floatingNodeId,floatingParentNodeId:e=>e.floatingParentNodeId,itemProps:e=>e.itemProps,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin,keyboardEventRelay:e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type==="menu")return e.parent.store.select("keyboardEventRelay")}};class U_ extends Fl{constructor(n,a,o=!1){const s=new Pc,u=B_(s,a,o,n);super(u,F_(s),H_),this.observe("parent",c=>{c.type==="menu"?this.context.allowMouseUpTriggerRef=c.store.context.allowMouseUpTriggerRef:c.type!==void 0&&(this.context.allowMouseUpTriggerRef=c.context.allowMouseUpTriggerRef)})}subscribeToParentMenu(){const n=this.state.parent;if(n.type!=="menu")return;let a=n.store.select("rootId"),o=n.store.select("floatingTreeRoot"),s=n.store.select("keyboardEventRelay");return n.store.subscribe(()=>{const u=n.store.select("rootId"),c=n.store.select("floatingTreeRoot"),d=n.store.select("keyboardEventRelay");a===u&&o===c&&s===d||(a=u,o=c,s=d,this.notifyAll())})}setOpen(n,a){this.state.floatingRootContext.context.events.emit("setOpen",{open:n,eventDetails:a})}setActiveIndex(n,a,o){if(this.state.activeIndex!==n){const u=(n===null?void 0:this.context.itemDomElements.current[n])===this.context.reportedItem;this.context.highlightReason=u?"none":a,this.context.highlightEvent=u?void 0:o}this.set("activeIndex",n)}highlightItem(n,a,o){const s=this.context.itemDomElements.current.indexOf(n);s>-1&&this.setActiveIndex(s,a,o)}}function F_(e){return{positionerRef:v.createRef(),popupRef:v.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},highlightReason:"none",highlightEvent:void 0,reportedItem:void 0,allowMouseUpTriggerRef:{current:!1},virtualFocusRef:void 0,triggerFocusTargetRef:v.createRef(),beforeTriggerFocusGuardRef:v.createRef(),beforeContentFocusGuardRef:v.createRef(),onOpenChangeComplete:void 0,triggerElements:e}}function B_(e,n,a=!1,o){return{...ap(e,n,a),disabled:!1,modal:!0,openMethod:null,keyboardOpen:!1,allowMouseEnter:!1,highlightItemOnHover:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,listElement:null,filterTriggerProps:Gt,inputProps:Gt,inputFocused:!1,highlightedItem:void 0,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new nv,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:Gt,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...o}}const tR=v.createContext(null);function DO(e,n){return(e===Va||e===fs)&&n?.detail===0}function V_(e,n){return e===ih||DO(e,n)}const q_=Cc(function(n){const{children:a,open:o,onOpenChange:s,onOpenChangeComplete:u,onItemHighlighted:c,defaultOpen:d=!1,disabled:p=!1,modal:g,loopFocus:y=!0,orientation:h="vertical",actionsRef:b,closeParentOnEsc:S=!1,handle:w,triggerId:C,defaultTriggerId:R=null,highlightItemOnHover:T=!0,isSubmenu:O=!1,virtualFocus:M=!1,virtualFocusRef:A,allowEscape:N=!0,resetOnPointerLeave:P=!0}=n,I=wp(!0),D=Vo(!0),z=MO(!0),F=D?.store,G=D?.virtualFocus??!1,J=v.useMemo(()=>O&&F?{type:"menu",store:F}:z?{type:"menubar",context:z}:I&&!F?{type:"context-menu",context:I}:{type:void 0},[I,F,z,O]),Y=Tr(),U=Tr(),[H,L]=v.useState(void 0),$=(H??U)||void 0,K=Ni(),V=J.type==="menu"?J.store:void 0,X=(o??d)&&V?.state.transitionStatus==="starting",ee=er(()=>X?V?.state.instantType:void 0).current,q=er(()=>{const ke=new U_({open:d,openProp:o,activeTriggerId:R,triggerIdProp:C,parent:J,disabled:p,highlightItemOnHover:T,modal:J.type===void 0?g:void 0,rootId:Y,instantType:ee},$,K!=null);return ke.context.virtualFocusRef=A,ke}).current;q.useControlledProp("openProp",o),q.useControlledProp("triggerIdProp",C),q.useContextCallback("onOpenChangeComplete",u);const se=q.useState("floatingTreeRoot"),j=rv(se),B=q.useState("open"),W=q.useState("activeTriggerElement"),re=q.useState("positionerElement"),Re=q.useState("hoverEnabled"),le=q.useState("disabled"),me=q.useState("lastOpenChangeReason"),ge=q.useState("parent"),ce=q.useState("activeIndex"),Te=q.useState("keyboardOpen"),ve=q.useState("payload"),Pe=q.useState("floatingParentNodeId"),Me=v.useRef(null),Le=v.useRef(ge.type!=="context-menu"),Fe=Hn(),Oe=v.useRef(!0),He=Hn(),be=Pe!=null,{openMethod:Ue,triggerProps:Ze}=AO(B);q.useSyncedValues({disabled:p,highlightItemOnHover:T,modal:ge.type===void 0?g:void 0,openMethod:Ue,rootId:Y}),ep(q);const{forceUnmount:it,transitionStatus:de}=tp(B,q,()=>{q.set("allowMouseEnter",!1)},X),we=Qh(q.context.popupRef);v.useEffect(()=>{if(ee===void 0)return;const ke=()=>{q.state.instantType===ee&&q.set("instantType",void 0)};if(!B){ke();return}if(de!==void 0)return;if(q.context.popupRef.current==null){ke();return}const ze=new AbortController;return we(ke,ze.signal),()=>{ze.abort()}},[ee,B,de,we,q]),_e(()=>{I&&!D?q.update({parent:{type:"context-menu",context:I},floatingNodeId:j,floatingParentNodeId:K}):(D||!q.select("activeTriggerElement"))&&q.update({floatingNodeId:j,floatingParentNodeId:K})},[I,D,j,K,W,q]),v.useEffect(()=>{if(B||(Me.current=null),ge.type==="context-menu"){if(!B){Fe.clear(),Le.current=!1;return}Fe.start(500,()=>{Le.current=!0})}},[Fe,B,ge.type]),_e(()=>{!B&&!Re&&q.set("hoverEnabled",!0)},[B,Re,q]);const Ke=Be((ke,ze)=>{const Ge=ze.reason;if(!ke&&!q.select("open")||B===ke&&ze.trigger===W&&me===Ge)return;const et=Wh(ze);if(!ke&&ze.trigger==null&&(ze.trigger=W??void 0),s?.(ke,ze),ze.isCanceled)return;q.state.floatingRootContext.dispatchOpenChange(ke,ze);const Et=ze.event;if(ke===!1&&Ge!==fs&&Et?.type==="click"&&Et.pointerType==="touch"&&!Oe.current)return;ke&&Ge===Sl?(Oe.current=!1,He.start(300,()=>{Oe.current=!0})):(Oe.current=!0,He.clear());const _=!ke&&(Ge===Dc||Ge==null);Me.current=ze.event;const Z=Jh(q.state,ke,ze.trigger,et());Z.openChangeReason=Ge,Z.keyboardOpen=ke&&V_(Ge,Et),ge.type==="menubar"&&(Ge===Sl||Ge===Ti||Ge===qn||Ge===ih||Ge===Zu)?Z.instantType="group":DO(Ge,Et)?Z.instantType="click":_?Z.instantType="dismiss":Z.instantType=void 0,q.update(Z)}),De=LE({popupStore:q,floatingRootContext:q.state.floatingRootContext,floatingId:$,nested:K!=null,onOpenChange:Ke}),je=De.context.events;_e(()=>{const ke=({open:ze,eventDetails:Ge})=>Ke(ze,Ge);return je.on("setOpen",ke),()=>{je?.off("setOpen",ke)}},[je,Ke]),_e(()=>q.subscribeToParentMenu(),[q]);const yt=v.useCallback(()=>{q.setOpen(!1,dt(Nc))},[q]);v.useImperativeHandle(b,()=>({unmount:it,close:yt}),[it,yt]);let ut;ge.type==="context-menu"&&(ut=ge.context),v.useImperativeHandle(ut?.positionerRef,()=>re,[re]),v.useImperativeHandle(ut?.actionsRef,()=>({setOpen:Ke}),[Ke]);const ht=Ic(De,{enabled:!le,bubbles:{escapeKey:S&&ge.type==="menu"},outsidePress(){return ge.type!=="context-menu"||Me.current?.type==="contextmenu"?!0:Le.current},externalTree:be?se:void 0}),Ot=sp(),Dt=XE(De,{enabled:!le,listRef:q.context.itemDomElements,activeIndex:ce,virtual:M,nested:ge.type==="menubar"||!M&&ge.type!==void 0,parentOrientation:ge.type==="menubar"?ge.context.orientation:void 0,loopFocus:y,focusItemOnOpen:M?Te:void 0,allowEscape:M&&y&&N,orientation:h,triggerOrientation:M?"vertical":h,rtl:Ot==="rtl",disabledIndices:fo,onNavigate(ke,ze){q.setActiveIndex(ke,__(ze),ze?.nativeEvent)},openOnArrowKeyDown:ge.type!=="context-menu"&&!(M&&O),externalTree:!M&&be?se:void 0,nestedReturnFocusRef:V?.context.virtualFocusRef,focusItemOnHover:T,resetOnPointerLeave:P}),Wt=v.useCallback(ke=>{q.context.typingRef.current=ke},[q]),rn=QE(De,{enabled:!le&&!M,listRef:q.context.itemLabels,elementsRef:q.context.itemDomElements,activeIndex:ce,resetMs:R3,onMatch:(ke,ze)=>{B&&ke!==ce&&q.setActiveIndex(ke,eE,ze.nativeEvent)},onTyping:Wt}),en=Be(c),We=v.useRef(-1),xt=Be(()=>{const ke=q.state.activeIndex,ze=ke===null?void 0:q.context.itemDomElements.current[ke]??void 0;if(ze?.isConnected===!1)return;const Ge=ze===void 0?-1:ke;if(We.current===Ge&&q.context.reportedItem===ze)return;We.current=Ge,q.context.reportedItem=ze,M&&q.set("highlightedItem",ze);const{highlightReason:et,highlightEvent:Et}=q.context;q.context.highlightReason=_r,q.context.highlightEvent=void 0,c&&en(ze,N4(et,Et,{label:ze===void 0?void 0:q.context.itemLabels.current[Ge]??void 0}))});_e(()=>{xt()},[ce,xt]);const $t=v.useMemo(()=>{if(!M)return Dt.reference;if(!Dt.trigger)return Gt;const{onFocus:ke,...ze}=Dt.trigger;return ze},[M,Dt.reference,Dt.trigger]);q.useSyncedValue("inputProps",M?Dt.reference??Gt:Gt);const ft=v.useMemo(()=>{const ke=Lr(rn.reference,$t,ht.reference,{onMouseMove(){q.set("allowMouseEnter",!0)}},Ze);return ke["aria-haspopup"]="menu",ke["aria-expanded"]=B,ke},[q,rn.reference,$t,ht.reference,Ze,B]),vt=v.useMemo(()=>{const ke=Lr(Dt.trigger,ht.trigger,Ze);return ke["aria-haspopup"]="menu",ke["aria-expanded"]=!1,ke},[Dt.trigger,ht.trigger,Ze]);er(()=>(q.update({inactiveTriggerProps:vt}),null));const gt=v.useMemo(()=>Lr(kc,{onMouseMove(){q.set("allowMouseEnter",!0),ge.type==="menu"&&q.set("hoverEnabled",!1)},onClick(){q.select("hoverEnabled")&&q.set("hoverEnabled",!1)},onKeyDown(ke){const ze=q.select("keyboardEventRelay");ze&&!ke.isPropagationStopped()&&ze(ke)}},rn.floating,Dt.floating,ht.floating),[ge.type,q,rn.floating,Dt.floating,ht.floating]),Lt=Dt.item??Gt;np(q,{floatingRootContext:De,activeTriggerProps:ft,inactiveTriggerProps:vt,popupProps:gt,itemProps:Lt});const un=v.useMemo(()=>({store:q,parent:J,orientation:h,loopFocus:y,allowEscape:N,defaultFloatingId:U,setRenderedFloatingId:L,virtualFocus:M,parentVirtualFocus:G,syncHighlightedItem:xt}),[q,J,h,y,N,U,M,G,xt]),Ie=typeof a=="function"?a({payload:ve}):a;let ot=x.jsxs(Sp.Provider,{value:un,children:[w&&x.jsx(Zh,{handle:w,store:q}),Ie]});return(ge.type===void 0||ge.type==="context-menu")&&(ot=x.jsx(kE,{externalTree:se,children:ot})),ot});function NO(e){const n=v.useContext(tR);if(n===null)return x.jsx(q_,{...e});const a=n.Root;return x.jsx(tR.Provider,{value:null,children:x.jsx(a,{...n.options,...e})})}const Pf=5;function jO(e,n){const a=Y_(n);return e.clientX>=a.left-Pf&&e.clientX<=a.right+Pf&&e.clientY>=a.top-Pf&&e.clientY<=a.bottom+Pf}function Y_(e){const n=e.getBoundingClientRect(),a=wn(e);if(Hy)return n;const o=a.getComputedStyle(e,"::before"),s=a.getComputedStyle(e,"::after");if(!(o.content!=="none"||s.content!=="none"))return n;const c=parseFloat(o.width)||0,d=parseFloat(o.height)||0,p=parseFloat(s.width)||0,g=parseFloat(s.height)||0,y=Math.max(n.width,c,p),h=Math.max(n.height,d,g),b=y-n.width,S=h-n.height;return{left:n.left-b/2,right:n.right+b/2,top:n.top-S/2,bottom:n.bottom+S/2}}function K_(e={}){const{highlightItemOnHover:n,highlightedIndex:a,onHighlightedIndexChange:o}=jv(),{ref:s,index:u}=Ep(e),c=a===u,d=v.useRef(null),p=Xr(s,d);return{compositeProps:{tabIndex:c?0:-1,onFocus(){o(u)},onMouseMove(){const y=d.current;if(!n||!y)return;const h=y.hasAttribute("disabled")||y.ariaDisabled==="true";!c&&!h&&y.focus()}},compositeRef:p,index:u}}function IO(e){const{render:n,className:a,style:o,state:s=Gt,props:u=fo,refs:c=fo,metadata:d,stateAttributesMapping:p,tag:g="div",...y}=e,{compositeProps:h,compositeRef:b}=K_({metadata:d});return Mt(g,e,{state:s,ref:[b,...c],props:[h,...u,y],stateAttributesMapping:p})}function zv(e){if(yn(e)&&e.hasAttribute("data-rootownerid"))return e.getAttribute("data-rootownerid");if(!zo(e))return zv(Uo(e))}function G_(e,n){function a(u,c,d){const p=u.currentTarget;cr.flushSync(()=>{e.setOpen(!1,dt(Ti,u.nativeEvent,p))}),i3(p.isConnected?p:n.current,c,d)?.focus()}function o(u){a(u,-1,e.select("positionerElement"))}function s(u){const c=e.select("positionerElement");c&&Cl(u,c)?e.context.beforeContentFocusGuardRef.current?.focus():a(u,1,c)}return{handlePreFocusGuardFocus:o,handleFocusTargetFocus:s}}function $_(e){const{enabled:n=!0,mouseDownAction:a,open:o}=e,s=v.useRef(!1);return v.useMemo(()=>n?{onMouseDown:u=>{(a==="open"&&!o||a==="close"&&o)&&(s.current=!0,Kt(u.currentTarget).addEventListener("click",()=>{s.current=!1},{once:!0}))},onClick:u=>{s.current&&(s.current=!1,u.preventBaseUIHandler())}}:Gt,[n,a,o])}const X_=YR(function(n,a){const{render:o,className:s,style:u,disabled:c=!1,nativeButton:d=!0,id:p,openOnHover:g,delay:y=100,closeDelay:h=0,handle:b,payload:S,...w}=n,C=Vo(!0),T=YE(b)??C?.store;if(!T)throw new Error(Rn(85));const O=Tr(p),M=T.useState("isTriggerActive",O),A=T.useState("floatingRootContext"),N=T.useState("isOpenedByTrigger",O),P=T.useState("triggerControlsId",O),I=v.useRef(null),D=Z_(),z=jv(!0),F=ji(),G=v.useMemo(()=>F??new nv,[F]),J=rv(G),Y=Ni(),{registerTrigger:U,isMountedByThisTrigger:H}=HE(O,I,T,{payload:S,closeDelay:h,parent:D,floatingTreeRoot:G,floatingNodeId:J,floatingParentNodeId:Y,keyboardEventRelay:z?.relayKeyboardEvent}),L=D.type==="menubar",$=T.useState("disabled"),K=c||$||L&&D.context.disabled,{getButtonProps:V,buttonRef:X}=mo({disabled:K,native:d});v.useEffect(()=>{!N&&D.type===void 0&&(T.context.allowMouseUpTriggerRef.current=!1)},[T,N,D.type]);const ee=v.useRef(null),q=Hn(),se=Be(He=>{if(!ee.current)return;q.clear(),T.context.allowMouseUpTriggerRef.current=!1;const be=He.target;at(ee.current,be)||at(T.select("positionerElement"),be)||be===ee.current||be!=null&&zv(be)===T.select("rootId")||jO(He,ee.current)||G.events.emit("close",{domEvent:He,reason:Ky})});v.useEffect(()=>{const He=Kt(ee.current);if(N&&T.select("lastOpenChangeReason")===qn)return He.addEventListener("mouseup",se,{once:!0}),()=>{He.removeEventListener("mouseup",se)}},[N,se,T]);const j=L&&D.context.hasSubmenuOpen,W=$E(A,{enabled:(g??j)&&!K&&(!L||j&&!H),handleClose:ZE({blockPointerEvents:!L}),mouseOnly:!0,move:!1,restMs:D.type===void 0?y:void 0,delay:{close:h},triggerElementRef:I,externalTree:G,isActiveTrigger:M,isClosing:()=>T.select("transitionStatus")==="ending"}),re=Q_(N,T.select("lastOpenChangeReason")),Re=PE(A,{enabled:!K,event:N&&L?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:D.type===void 0?re:!1}),le=KE(A,{enabled:!K&&j}),me=$_({open:N,enabled:L,mouseDownAction:"open"}),ge=v.useMemo(()=>Lr(le.reference,Re.reference),[le.reference,Re.reference]),ce=T.useState("triggerProps",H),Te=T.useState("filterTriggerProps"),{handlePreFocusGuardFocus:ve,handleFocusTargetFocus:Pe}=G_(T,I),Me={disabled:K,open:N},Le=[ee,a,X,U,I],Fe=[ge,W??Gt,ce,{"aria-haspopup":"menu","aria-controls":P,id:O,onMouseDown:He=>{if(T.select("open"))return;q.start(200,()=>{T.context.allowMouseUpTriggerRef.current=!0}),Kt(He.currentTarget).addEventListener("mouseup",se,{once:!0})}},Te,L?{role:"menuitem"}:{},me,w,V],Oe=Mt("button",n,{enabled:!L,stateAttributesMapping:rh,state:Me,ref:Le,props:Fe});return L?x.jsx(IO,{tag:"button",render:o,className:s,style:u,state:Me,refs:Le,props:Fe,stateAttributesMapping:rh}):N?x.jsxs(v.Fragment,{children:[x.jsx(kl,{ref:T.context.beforeTriggerFocusGuardRef,onFocus:ve},`${O}-pre-focus-guard`),x.jsx(v.Fragment,{children:Oe},O),x.jsx(kl,{ref:T.context.triggerFocusTargetRef,onFocus:Pe},`${O}-post-focus-guard`)]}):x.jsx(v.Fragment,{children:Oe},O)});function Q_(e,n){const a=Hn(),[o,s]=v.useState(!1);return _e(()=>{e&&n===qn?(s(!0),a.start(CE,()=>{s(!1)})):e||(a.clear(),s(!1))},[e,n,a]),o}function Z_(){const e=MO();return v.useMemo(()=>e?{type:"menubar",context:e}:{type:void 0},[e])}const kO=v.forwardRef(function(n,a){const{className:o,render:s,orientation:u="horizontal",style:c,...d}=n;return Mt("div",n,{state:{orientation:u},ref:a,props:[{role:"separator","aria-orientation":u},d]})});function PO(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}function Sh(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function J_(e){return typeof e=="object"&&e!=null&&Array.isArray(e.items)}function LO(e){return J_(e?.[0])}function W_(e){return LO(e)?e.flatMap(n=>n.items):e}function e6(e){if(!Array.isArray(e))return e!=null&&"null"in e;const n=e;if(LO(n)){for(const a of n)for(const o of a.items)if(o&&o.value==null&&o.label!=null)return!0;return!1}for(const a of n)if(a&&a.value==null&&a.label!=null)return!0;return!1}function zO(e,n){if(n&&e!=null)return n(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return Sh(e)}function bl(e,n){return n&&e!=null?n(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?Sh(e.value):Sh(e)}function _O(e,n,a){function o(){return zO(e,a)}if(a&&e!=null)return a(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(n&&!Array.isArray(n))return(Object.hasOwn(n,e)?n[e]:void 0)??o();if(Array.isArray(n)){const u=W_(n);if(e==null||typeof e!="object"){const c=u.find(d=>d.value===e);return c&&c.label!=null?c.label:o()}if("value"in e){const c=u.find(d=>d&&d.value===e.value);if(c&&c.label!=null)return c.label}}return o()}function t6(e,n,a){return e.reduce((o,s,u)=>(u>0&&o.push(", "),o.push(x.jsx(v.Fragment,{children:_O(s,n,a)},u)),o),[])}function Op({...e}){return x.jsx(NO,{"data-slot":"dropdown-menu",...e})}function Mp({...e}){return x.jsx(X_,{"data-slot":"dropdown-menu-trigger",...e})}function Ap({align:e="start",alignOffset:n=0,side:a="bottom",sideOffset:o=4,className:s,...u}){return x.jsx(SO,{children:x.jsx(CO,{className:"isolate z-50 outline-none",align:e,alignOffset:n,side:a,sideOffset:o,children:x.jsx(bO,{"data-slot":"dropdown-menu-content",className:Qe("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",s),...u})})})}function wh({...e}){return x.jsx(t_,{"data-slot":"dropdown-menu-group",...e})}function _v({className:e,inset:n,...a}){return x.jsx(n_,{"data-slot":"dropdown-menu-label","data-inset":n,className:Qe("px-2 py-1.5 text-xs text-muted-foreground data-inset:pl-7.5",e),...a})}function Rh({className:e,inset:n,variant:a="default",...o}){return x.jsx(yO,{"data-slot":"dropdown-menu-item","data-inset":n,"data-variant":a,className:Qe("group/dropdown-menu-item relative flex min-h-7 cursor-default items-center gap-2 rounded-md px-2 py-1 text-xs/relaxed outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 data-[variant=destructive]:*:[svg]:text-destructive",e),...o})}function n6({...e}){return x.jsx(D_,{"data-slot":"dropdown-menu-radio-group",...e})}function r6({className:e,children:n,inset:a,...o}){return x.jsxs(I_,{"data-slot":"dropdown-menu-radio-item","data-inset":a,className:Qe("relative flex min-h-7 cursor-default items-center gap-2 rounded-md py-1.5 pr-8 pl-2 text-xs outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7.5 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",e),...o,children:[x.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center","data-slot":"dropdown-menu-radio-item-indicator",children:x.jsx(k_,{children:x.jsx(fp,{})})}),n]})}function a6({className:e,...n}){return x.jsx(kO,{"data-slot":"dropdown-menu-separator",className:Qe("-mx-1 my-1 h-px bg-border/50",e),...n})}function o6({className:e,...n}){return x.jsx("span",{"data-slot":"dropdown-menu-shortcut",className:Qe("ml-auto text-[0.625rem] tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground",e),...n})}function HO(e){return Mt(e.defaultTagName??"div",e,e)}function UO(e){var n,a,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(n=0;n<s;n++)e[n]&&(a=UO(e[n]))&&(o&&(o+=" "),o+=a)}else for(a in e)e[a]&&(o&&(o+=" "),o+=a);return o}function i6(){for(var e,n,a=0,o="",s=arguments.length;a<s;a++)(e=arguments[a])&&(n=UO(e))&&(o&&(o+=" "),o+=n);return o}const nR=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,rR=i6,Dp=(e,n)=>a=>{var o;if(n?.variants==null)return rR(e,a?.class,a?.className);const{variants:s,defaultVariants:u}=n,c=Object.keys(s).map(g=>{const y=a?.[g],h=u?.[g];if(y===null)return null;const b=nR(y)||nR(h);return s[g][b]}),d=a&&Object.entries(a).reduce((g,y)=>{let[h,b]=y;return b===void 0||(g[h]=b),g},{}),p=n==null||(o=n.compoundVariants)===null||o===void 0?void 0:o.reduce((g,y)=>{let{class:h,className:b,...S}=y;return Object.entries(S).every(w=>{let[C,R]=w;return Array.isArray(R)?R.includes({...u,...d}[C]):{...u,...d}[C]===R})?[...g,h,b]:g},[]);return rR(e,c,p,a?.class,a?.className)},H0=768;function s6(){const[e,n]=v.useState(void 0);return v.useEffect(()=>{const a=window.matchMedia(`(max-width: ${H0-1}px)`),o=()=>{n(window.innerWidth<H0)};return a.addEventListener("change",o),n(window.innerWidth<H0),()=>a.removeEventListener("change",o)},[]),!!e}const l6=v.forwardRef(function(n,a){const{render:o,className:s,disabled:u=!1,focusableWhenDisabled:c=!1,nativeButton:d=!0,style:p,...g}=n,{getButtonProps:y,buttonRef:h}=mo({disabled:u,focusableWhenDisabled:c,native:d});return Mt("button",n,{state:{disabled:u},ref:[a,h],props:[g,y]})}),u6=Dp("group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-xs/relaxed font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border hover:bg-input/50 hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:bg-input/30",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-7 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",xs:"h-5 gap-1 rounded-sm px-2 text-[0.625rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-2.5",sm:"h-6 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",lg:"h-8 gap-1 px-2.5 text-xs/relaxed has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-4",icon:"size-7 [&_svg:not([class*='size-'])]:size-3.5","icon-xs":"size-5 rounded-sm [&_svg:not([class*='size-'])]:size-2.5","icon-sm":"size-6 [&_svg:not([class*='size-'])]:size-3","icon-lg":"size-8 [&_svg:not([class*='size-'])]:size-4"}},defaultVariants:{variant:"default",size:"default"}});function Jt({className:e,variant:n="default",size:a="default",...o}){return x.jsx(l6,{"data-slot":"button",className:Qe(u6({variant:n,size:a,className:e})),...o})}const c6="data-valid",d6="data-invalid",f6={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},h6={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},p6={disabled:!1,...h6},Kl={valid(e){return e===null?null:e?{[c6]:""}:{[d6]:""}}},g6={invalid:void 0,name:void 0,validityData:{state:f6,errors:[],error:"",value:"",initialValue:null},setValidityData:Sn,disabled:void 0,setTouched:Sn,setDirty:Sn,setFilled:Sn,setFocused:Sn,focusOwnerRef:{current:void 0},validationMode:"onSubmit",shouldValidateOnChange:()=>!1,state:p6,registerFieldControl:Sn,validation:{getValidationProps:(e,n=Gt)=>n,inputRef:{current:null},registeredInputs:new Map,registerInput:Sn,getInputControl:()=>null,commit:async()=>{},change:Sn}},m6=v.createContext(g6);function qo(e=!0){const n=v.useContext(m6);if(n.setValidityData===Sn&&!e)throw new Error(Rn(28));return n}const y6=v.createContext(void 0);function v6(e=!1){const n=v.useContext(y6);if(!n&&!e)throw new Error(Rn(86));return n}const b6=v.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:Sn,validationMode:"onSubmit",submitCountRef:{current:0}});function Vc(){return v.useContext(b6)}const x6=v.createContext({controlId:void 0,registerControlId:Sn,resetControlId:Sn,labelId:void 0,setLabelId:Sn,messageIds:[],setMessageIds:Sn,getDescriptionProps:e=>e});function Cs(){return v.useContext(x6)}function Hv(e,n,a,o=!0,s,u){const[c,d]=v.useState(),p=Tr(s?`${s}-label`:void 0),g=!!u?.trim(),h=e??(g?void 0:n)??c;return _e(()=>{const b=e||n||g||!o?void 0:S6(a.current,p);c!==b&&d(b)}),h}function S6(e,n){const a=w6(e);if(a)return!a.id&&n&&(a.id=n),a.id||void 0}function w6(e){if(!e)return;const n=e.parentElement;if(n&&n.tagName==="LABEL")return n;const a=e.id;if(a){const s=e.nextElementSibling;if(s&&s.htmlFor===a)return s}const o=e.labels;return o&&o[0]}function Gl(e={}){const{id:n,enabled:a=!0}=e,{controlId:o,registerControlId:s,resetControlId:u}=Cs(),c=Tr(),d=er(()=>Symbol()),p=v.useRef(!1),g=v.useRef(!1),y=Be(()=>{!p.current||s===Sn||(p.current=!1,s(d.current,void 0))});return _e(()=>{if(!a||s===Sn){y();return}let h;if(n!==void 0)g.current=!0,h=n;else if(g.current)h=c;else{u();return}if(h===void 0){y();return}p.current=!0,s(d.current,h)},[n,a,s,u,c,d,y]),_e(()=>y,[y]),(a?o:void 0)??n??c}function R6(e,n){return e.matches(":disabled")?!1:!n||e.form===n?!0:e.form===null&&!e.hasAttribute("form")}const E6=v.createContext({disabled:!1});function FO(){return v.useContext(E6)}function qc(e,n,a){const{setFocused:o,focusOwnerRef:s}=qo(),u=Be(c=>{(c?!e:s.current===u)&&(s.current=c&&u,o(c))});return _e(()=>{const c=n.current;return c?.getRootNode()?.activeElement===c&&u(!0),()=>u(!1)},[e,n,u]),u}function Yc(e,n,a,o,s=!0,u){const{registerFieldControl:c}=qo(),d=er(()=>Symbol());_e(()=>{const p=d.current;if(!s){c(p,void 0);return}c(p,{controlRef:e,getValue:o,id:n,name:u,value:a})},[e,s,o,n,u,c,d,a]),_e(()=>{const p=d.current;return()=>{c(p,void 0)}},[c,d])}const C6=v.forwardRef(function(n,a){const{render:o,className:s,id:u,name:c,value:d,disabled:p=!1,onValueChange:g,defaultValue:y,autoFocus:h=!1,style:b,...S}=n,{state:w,name:C,disabled:R,setTouched:T,setDirty:O,validityData:M,setFilled:A,validationMode:N,validation:P}=qo(),{clearErrors:I,elementRef:D,submitCountRef:z}=Vc(),F=R||p,G=C??c,J={...w,disabled:F},{labelId:Y}=Cs(),U=Gl({id:u}),H=d!==void 0,L=d==null?void 0:String(d),$=Be(()=>P.inputRef.current?.value);Yc(P.inputRef,U,L,$,!F,c),_e(()=>{const q=L??P.inputRef.current?.value;q!==void 0&&A(q!=="")},[L,y,P.inputRef,A]),Yl(L,()=>{L!==void 0&&(I(G),O(L!==(M.initialValue??"")),P.change(L))});const K=v.useRef(null),V=qc(F,K),X=Hn();return Mt("input",n,{ref:[a,K],state:J,props:[{id:U,disabled:F,name:G,ref:P.inputRef,"aria-labelledby":Y,autoFocus:h,...H?{value:d}:{defaultValue:y},onChange(q){const se=q.currentTarget.value,j=dt(_r,q.nativeEvent);g?.(se,j),!H&&(O(se!==(M.initialValue??"")),A(se!==""),!q.nativeEvent.defaultPrevented&&!j.isCanceled&&(I(G),P.change(se)))},onFocus(){V(!0)},onBlur(q){if(T(!0),V(!1),N==="onBlur"){const se=q.currentTarget.value;P.commit(se),H&&queueMicrotask(()=>{const j=P.inputRef.current?.value;j!==void 0&&j!==se&&j!==(M.initialValue??"")&&P.commit(j)})}},onKeyDown(q){if(q.currentTarget.tagName==="INPUT"&&q.key==="Enter"){T(!0);const se=q.currentTarget.value,j=q.currentTarget.form;if(j&&j===D.current&&!q.defaultPrevented){const B=q.currentTarget,W=z.current;X.start(0,()=>{z.current===W&&P.commit(B.value)})}else P.commit(se)}}},S,q=>P.getValidationProps(F,q)],stateAttributesMapping:Kl})}),T6=v.forwardRef(function(n,a){return x.jsx(C6,{ref:a,...n})});function BO({className:e,type:n,...a}){return x.jsx(T6,{type:n,"data-slot":"input",className:Qe("h-7 w-full min-w-0 rounded-md border border-input bg-input/20 px-2 py-0.5 text-sm transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-xs/relaxed file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 md:text-xs/relaxed dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...a})}function VO({className:e,orientation:n="horizontal",...a}){return x.jsx(kO,{"data-slot":"separator",orientation:n,className:Qe("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",e),...a})}const qO=v.createContext(void 0);function Ts(e){const n=v.useContext(qO);if(!e&&n===void 0)throw new Error(Rn(27));return n}const YO=v.forwardRef(function(n,a){const{render:o,className:s,style:u,forceRender:c=!1,...d}=n,p=Ts(),g=p.useState("open"),y=p.useState("nested"),h=p.useState("mounted"),b=p.useState("transitionStatus");return Mt("div",n,{state:{open:g,transitionStatus:b},ref:[p.context.backdropRef,a],stateAttributesMapping:Bh,props:[{role:"presentation",hidden:!h,style:{userSelect:"none",WebkitUserSelect:"none"}},d],enabled:c||!y})}),Np=v.forwardRef(function(n,a){const{render:o,className:s,style:u,disabled:c=!1,nativeButton:d=!0,...p}=n,g=Ts(),y=g.useState("open"),{getButtonProps:h,buttonRef:b}=mo({disabled:c,native:d}),S={disabled:c};function w(C){y&&g.setOpen(!1,dt(WR,C.nativeEvent))}return Mt("button",n,{state:S,ref:[a,b],props:[{onClick:w},p,h]})}),KO=v.forwardRef(function(n,a){const{render:o,className:s,style:u,id:c,...d}=n,p=Ts(),g=Tr(c);return p.useSyncedValueWithCleanup("descriptionElementId",g),Mt("p",n,{ref:a,props:[{id:g},d]})}),GO=v.createContext(void 0);function O6(){const e=v.useContext(GO);if(e===void 0)throw new Error(Rn(26));return e}const M6="--nested-dialogs",A6="data-nested-dialog-open",D6={...Mc,...po,nestedDialogOpen(e){return e?{[A6]:""}:null}},$O=v.forwardRef(function(n,a){const{render:o,className:s,style:u,finalFocus:c,initialFocus:d,...p}=n,g=Ts(),y=g.useState("descriptionElementId"),h=g.useState("disablePointerDismissal"),b=g.useState("floatingRootContext"),S=g.useState("popupProps"),w=g.useState("modal"),C=g.useState("mounted"),R=g.useState("nested"),T=g.useState("nestedOpenDialogCount"),O=g.useState("open"),M=g.useState("openMethod"),A=g.useState("titleElementId"),N=g.useState("transitionStatus"),P=g.useState("role"),I=b.useState("floatingId");O6(),ja({open:O,ref:g.context.popupRef,onComplete(){O&&g.context.onOpenChangeComplete?.(!0)}});const D=d===void 0?_E(g.context.popupRef):d,z=T>0,F=g.useStateSetter("popupElement"),J=Mt("div",n,{state:{open:O,nested:R,transitionStatus:N,nestedDialogOpen:z},props:[S,{id:I,"aria-labelledby":A,"aria-describedby":y,role:P,...kc,hidden:!C,onKeyDown(Y){Bc.has(Y.key)&&Y.stopPropagation()},style:{[M6]:T}},p],ref:[a,g.context.popupRef,F],stateAttributesMapping:D6});return x.jsx(Xh,{context:b,openInteractionType:M,disabled:!C,closeOnFocusOut:!h,initialFocus:D,returnFocus:c,modal:w!==!1,restoreFocus:"popup",children:J})}),XO=v.forwardRef(function(n,a){const{keepMounted:o=!1,...s}=n,u=Ts(),c=u.useState("mounted"),d=u.useState("modal"),p=u.useState("open");return c||o?x.jsx(GO.Provider,{value:o,children:x.jsxs($h,{ref:a,...s,children:[c&&d===!0&&x.jsx(Cp,{ref:u.context.internalBackdropRef,inert:cp(!p)}),n.children]})}):null});function N6({store:e,parentContext:n,isDrawer:a}){const o=e.useState("open"),s=e.useState("mounted"),u=e.useState("disablePointerDismissal"),c=e.useState("modal"),d=e.useState("popupElement"),p=e.useState("floatingRootContext"),[g,y]=v.useState(0),[h,b]=v.useState(0),S=g===0,w=Ic(p,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:c==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(C){if(!e.context.outsidePressEnabledRef.current||"button"in C&&C.button!==0)return!1;if("touches"in C){if(C.type==="touchend"){if(C.changedTouches.length!==1||C.touches.length!==0)return!1}else if(C.touches.length!==1)return!1}const R=tr(C);if(S&&!u){if(c){const T=e.context.internalBackdropRef.current,O=e.context.backdropRef.current;return T||O?T===R||O===R||at(R,d)&&!R?.hasAttribute("data-base-ui-portal"):!0}return!0}return!1},escapeKey:S});return EO(o&&c===!0,d),e.useContextCallback("onNestedDialogOpen",(C,R)=>{!e.select("open")&&!e.select("mounted")||(y(C),b(R))}),_e(()=>{!o&&!s&&(y(0),b(0))},[o,s]),_e(()=>(n?.onNestedDialogOpen&&o&&n.onNestedDialogOpen(g+1,h+(a?1:0)),()=>{n?.onNestedDialogOpen&&o&&n.onNestedDialogOpen(0,0)}),[a,o,g,h,n]),np(e,{activeTriggerProps:w.reference,inactiveTriggerProps:w.trigger,popupProps:w.floating,nestedOpenDialogCount:g,nestedOpenDrawerCount:h}),null}const j6={...Po,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role};class I6 extends Fl{constructor(n,a,o){const s=new Pc,u=k6(n,s,a,o);super(u,P6(s),j6)}setOpen=(n,a)=>{a.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!n&&a.trigger==null&&this.state.activeTriggerId!=null&&(a.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(n,a),!a.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(n,a),this.update(Jh(this.state,n,a.trigger)))}}function k6(e,n,a,o=!1){return{...ap(n,a,o),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}function P6(e){return{popupRef:v.createRef(),backdropRef:v.createRef(),internalBackdropRef:v.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function L6(e,n){const{children:a,open:o,defaultOpen:s=!1,onOpenChange:u,onOpenChangeComplete:c,disablePointerDismissal:d=!1,modal:p=!0,actionsRef:g,handle:y,triggerId:h,defaultTriggerId:b=null}=n,S=e==="drawer",w=p,C=d,R="dialog",T=Ts(!0),O=T!=null,M={modal:w,disablePointerDismissal:C,nested:O,role:R},A=ov((F,G)=>new I6({open:s,openProp:o,activeTriggerId:b,triggerIdProp:h,...M},F,G),!0);A.useControlledProp("openProp",o),A.useControlledProp("triggerIdProp",h),A.useSyncedValues(M),A.useContextCallback("onOpenChange",u),A.useContextCallback("onOpenChangeComplete",c);const N=A.useState("open"),P=A.useState("mounted"),I=A.useState("payload");UE(A,N),ep(A);const{forceUnmount:D}=tp(N,A);v.useImperativeHandle(g,()=>({unmount:D,close:()=>A.setOpen(!1,dt(Nc))}),[D,A]);const z=N||P||y!=null;return x.jsxs(qO.Provider,{value:A,children:[y&&x.jsx(Zh,{handle:y,store:A}),z&&x.jsx(N6,{store:A,parentContext:T?.context,isDrawer:S}),typeof a=="function"?a({payload:I}):a]})}const QO=Cc(function(n){return L6("dialog",n)}),ZO=v.forwardRef(function(n,a){const{render:o,className:s,style:u,id:c,...d}=n,p=Ts(),g=Tr(c);return p.useSyncedValueWithCleanup("titleElementId",g),Mt("h2",n,{ref:a,props:[{id:g},d]})}),Rt=e=>typeof e=="string",Qu=()=>{let e,n;const a=new Promise((o,s)=>{e=o,n=s});return a.resolve=e,a.reject=n,a},Lf=e=>e==null?"":String(e),z6=(e,n,a)=>{e.forEach(o=>{n[o]&&(a[o]=n[o])})},_6=/###/g,aR=e=>e&&e.includes("###")?e.replace(_6,"."):e,oR=e=>!e||Rt(e),ic=(e,n,a)=>{const o=Rt(n)?n.split("."):n;let s=0;for(;s<o.length-1;){if(oR(e))return{};const u=aR(o[s]);!e[u]&&a&&(e[u]=new a),Object.prototype.hasOwnProperty.call(e,u)?e=e[u]:e={},++s}return oR(e)?{}:{obj:e,k:aR(o[s])}},iR=(e,n,a)=>{const{obj:o,k:s}=ic(e,n,Object);if(o!==void 0||n.length===1){o[s]=a;return}let u=n[n.length-1],c=n.slice(0,n.length-1),d=ic(e,c,Object);for(;d.obj===void 0&&c.length;)u=`${c[c.length-1]}.${u}`,c=c.slice(0,c.length-1),d=ic(e,c,Object),d?.obj&&typeof d.obj[`${d.k}.${u}`]<"u"&&(d.obj=void 0);d.obj[`${d.k}.${u}`]=a},H6=(e,n,a,o)=>{const{obj:s,k:u}=ic(e,n,Object);s[u]=s[u]||[],s[u].push(a)},Eh=(e,n)=>{const{obj:a,k:o}=ic(e,n);if(a&&Object.prototype.hasOwnProperty.call(a,o))return a[o]},U6=(e,n,a)=>{const o=Eh(e,a);return o!==void 0?o:Eh(n,a)},JO=(e,n,a)=>{for(const o in n)o!=="__proto__"&&o!=="constructor"&&(Object.prototype.hasOwnProperty.call(e,o)?Rt(e[o])||e[o]instanceof String||Rt(n[o])||n[o]instanceof String?a&&(e[o]=n[o]):JO(e[o],n[o],a):e[o]=n[o]);return e},Io=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),F6={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},B6=e=>Rt(e)?e.replace(/[&<>"'\/]/g,n=>F6[n]):e;class V6{constructor(n){this.capacity=n,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(n){const a=this.regExpMap.get(n);if(a!==void 0)return a;const o=new RegExp(n);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(n,o),this.regExpQueue.push(n),o}}const q6=[" ",",","?","!",";"],Y6=new V6(20),K6=(e,n,a)=>{n=n||"",a=a||"";const o=q6.filter(c=>!n.includes(c)&&!a.includes(c));if(o.length===0)return!0;const s=Y6.getRegExp(`(${o.map(c=>c==="?"?"\\?":c).join("|")})`);let u=!s.test(e);if(!u){const c=e.indexOf(a);c>0&&!s.test(e.substring(0,c))&&(u=!0)}return u},Ey=(e,n,a=".")=>{if(!e)return;if(e[n])return Object.prototype.hasOwnProperty.call(e,n)?e[n]:void 0;const o=n.split(a);let s=e;for(let u=0;u<o.length;){if(!s||typeof s!="object")return;let c,d="";for(let p=u;p<o.length;++p)if(p!==u&&(d+=a),d+=o[p],c=s[d],(typeof c=="function"||d==="__proto__")&&!Object.prototype.hasOwnProperty.call(s,d)&&(c=void 0),c!==void 0){if(["string","number","boolean"].includes(typeof c)&&p<o.length-1)continue;u+=p-u+1;break}s=c}return s},_l=e=>e?.replace(/_/g,"-"),G6={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,n){console?.[e]?.apply?.(console,n)}};class Ch{constructor(n,a={}){this.init(n,a)}init(n,a={}){this.prefix=a.prefix||"i18next:",this.logger=n||G6,this.options=a,this.debug=a.debug}log(...n){return this.forward(n,"log","",!0)}warn(...n){return this.forward(n,"warn","",!0)}error(...n){return this.forward(n,"error","")}deprecate(...n){return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(n,a,o,s){return s&&!this.debug?null:(n=n.map(u=>Rt(u)?u.replace(/[\r\n\x00-\x1F\x7F]/g," "):u),Rt(n[0])&&(n[0]=`${o}${this.prefix} ${n[0]}`),this.logger[a](n))}create(n){return new Ch(this.logger,{prefix:`${this.prefix}:${n}:`,...this.options})}clone(n){return n=n||this.options,n.prefix=n.prefix||this.prefix,new Ch(this.logger,n)}}var lo=new Ch;class jp{constructor(){this.observers={}}on(n,a){return n.split(" ").forEach(o=>{this.observers[o]||(this.observers[o]=new Map);const s=this.observers[o].get(a)||0;this.observers[o].set(a,s+1)}),this}off(n,a){if(this.observers[n]){if(!a){delete this.observers[n];return}this.observers[n].delete(a)}}once(n,a){const o=(...s)=>{a(...s),this.off(n,o)};return this.on(n,o),this}emit(n,...a){this.observers[n]&&Array.from(this.observers[n].entries()).forEach(([s,u])=>{for(let c=0;c<u;c++)s(...a)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,u])=>{for(let c=0;c<u;c++)s(n,...a)})}}const sR=new WeakSet;class lR extends jp{constructor(n,a={ns:["translation"],defaultNS:"translation"}){super(),this.data=n||{},this.options=a,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(n){this.options.ns.includes(n)||this.options.ns.push(n)}removeNamespaces(n){const a=this.options.ns.indexOf(n);a>-1&&this.options.ns.splice(a,1)}getResource(n,a,o,s={}){const u=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,c=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let d;n.includes(".")?d=n.split("."):(d=[n,a],o&&(Array.isArray(o)?d.push(...o):Rt(o)&&u?d.push(...o.split(u)):d.push(o)));const p=Eh(this.data,d);return p==null&&!a&&!o&&n.includes(".")&&(n=d[0],a=d[1],o=d.slice(2).join(".")),p!=null||!c||!Rt(o)?p:Ey(this.data?.[n]?.[a],o,u)}addResource(n,a,o,s,u={silent:!1}){const c=u.keySeparator!==void 0?u.keySeparator:this.options.keySeparator;let d=[n,a];o&&(d=d.concat(c?o.split(c):o)),n.includes(".")&&(d=n.split("."),s=a,a=d[1]),this.addNamespaces(a),iR(this.data,d,s),u.silent||this.emit("added",n,a,o,s)}addResources(n,a,o,s={silent:!1}){for(const u in o)(Rt(o[u])||Array.isArray(o[u]))&&this.addResource(n,a,u,o[u],{silent:!0});s.silent||this.emit("added",n,a,o)}addResourceBundle(n,a,o,s,u,c={silent:!1,skipCopy:!1}){let d=[n,a];n.includes(".")&&(d=n.split("."),s=o,o=a,a=d[1]),this.addNamespaces(a);let p=Eh(this.data,d)||{};c.skipCopy||(o=JSON.parse(JSON.stringify(o))),s?JO(p,o,u):p={...p,...o},iR(this.data,d,p),c.silent||this.emit("added",n,a,o)}removeResourceBundle(n,a){this.hasResourceBundle(n,a)&&delete this.data[n][a],this.removeNamespaces(a),this.emit("removed",n,a)}hasResourceBundle(n,a){return this.getResource(n,a)!==void 0}getResourceBundle(n,a){return a||(a=this.options.defaultNS),this.getResource(n,a)}getDataByLanguage(n){return this.data[n]}hasLanguageSomeTranslations(n){const a=this.getDataByLanguage(n);return!!(a&&Object.keys(a)||[]).find(s=>{const u=a[s];return sR.has(u)?!0:!u||Object.keys(u).length===0?!1:(typeof u=="object"&&sR.add(u),!0)})}toJSON(){return this.data}}var WO={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,n,a,o,s){return e.forEach(u=>{n=this.processors[u]?.process(n,a,o,s)??n}),n}};const eM=Symbol("i18next/PATH_KEY");function $6(){const e=[],n=Object.create(null);let a;return n.get=(o,s)=>(a?.revoke?.(),s===eM?e:(e.push(s),a=Proxy.revocable(o,n),a.proxy)),Proxy.revocable(Object.create(null),n).proxy}function ps(e,n){const{[eM]:a}=e($6()),o=n?.keySeparator??".",s=n?.nsSeparator??":",u=n?.enableSelector==="strict";if(a.length>1&&s){const c=n?.ns,d=u?Array.isArray(c)?c:c?[c]:null:Array.isArray(c)?c:null;if(d&&(u?d:d.length>1?d.slice(1):[]).includes(a[0]))return`${a[0]}${s}${a.slice(1).join(o)}`}return a.join(o)}const U0=e=>!Rt(e)&&typeof e!="boolean"&&typeof e!="number";class Th extends jp{constructor(n,a={}){super(),z6(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],n,this),this.options=a,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=lo.create("translator"),this.checkedLoadedFor={}}changeLanguage(n){n&&(this.language=n)}exists(n,a={interpolation:{}}){const o={...a};if(n==null)return!1;const s=this.resolve(n,o);if(s?.res===void 0)return!1;const u=U0(s.res);return!(o.returnObjects===!1&&u)}extractFromKey(n,a){let o=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;o===void 0&&(o=":");const s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let u=a.ns||this.options.defaultNS||[];const c=o&&n.includes(o),d=!this.options.userDefinedKeySeparator&&!a.keySeparator&&!this.options.userDefinedNsSeparator&&!a.nsSeparator&&!K6(n,o,s);if(c&&!d){const p=n.match(this.interpolator.nestingRegexp);if(p&&p.length>0)return{key:n,namespaces:Rt(u)?[u]:u};const g=n.split(o);(o!==s||o===s&&this.options.ns.includes(g[0]))&&(u=g.shift()),n=g.join(s)}return{key:n,namespaces:Rt(u)?[u]:u}}translate(n,a,o){let s=typeof a=="object"?{...a}:a;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof s=="object"&&(s={...s}),s||(s={}),n==null)return"";typeof n=="function"&&(n=ps(n,{...this.options,...s})),Array.isArray(n)||(n=[String(n)]),n=n.map(Y=>typeof Y=="function"?ps(Y,{...this.options,...s}):String(Y));const u=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,c=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:d,namespaces:p}=this.extractFromKey(n[n.length-1],s),g=p[p.length-1];let y=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;y===void 0&&(y=":");const h=s.lng||this.language,b=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h?.toLowerCase()==="cimode")return b?u?{res:`${g}${y}${d}`,usedKey:d,exactUsedKey:d,usedLng:h,usedNS:g,usedParams:this.getUsedParamsDetails(s)}:`${g}${y}${d}`:u?{res:d,usedKey:d,exactUsedKey:d,usedLng:h,usedNS:g,usedParams:this.getUsedParamsDetails(s)}:d;const S=this.resolve(n,s);let w=S?.res;const C=S?.usedKey||d,R=S?.exactUsedKey||d,T=["[object Number]","[object Function]","[object RegExp]"],O=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,M=!this.i18nFormat||this.i18nFormat.handleAsObject,A=s.count!==void 0&&!Rt(s.count),N=Th.hasDefaultValue(s),P=A?this.pluralResolver.getSuffix(h,s.count,s):"",I=s.ordinal&&A?this.pluralResolver.getSuffix(h,s.count,{ordinal:!1}):"",D=A&&!s.ordinal&&s.count===0,z=D&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${P}`]||s[`defaultValue${I}`]||s.defaultValue;let F=w;M&&!w&&N&&(F=z);const G=U0(F),J=Object.prototype.toString.apply(F);if(M&&F&&G&&!T.includes(J)&&!(Rt(O)&&Array.isArray(F))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const Y=this.options.returnedObjectHandler?this.options.returnedObjectHandler(C,F,{...s,ns:p}):`key '${d} (${this.language})' returned an object instead of string.`;return u?(S.res=Y,S.usedParams=this.getUsedParamsDetails(s),S):Y}if(c){const Y=Array.isArray(F),U=Y?[]:{},H=Y?R:C;for(const L in F)if(Object.prototype.hasOwnProperty.call(F,L)){const $=`${H}${c}${L}`;N&&!w?U[L]=this.translate($,{...s,defaultValue:U0(z)?z[L]:void 0,joinArrays:!1,ns:p}):U[L]=this.translate($,{...s,joinArrays:!1,ns:p}),U[L]===$&&(U[L]=F[L])}w=U}}else if(M&&Rt(O)&&Array.isArray(w))w=w.join(O),w&&(w=this.extendTranslation(w,n,s,S,o));else{let Y=!1,U=!1;!this.isValidLookup(w)&&N&&(Y=!0,w=z),this.isValidLookup(w)||(U=!0,w=d);const L=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&U?void 0:w,$=N&&z!==w&&this.options.updateMissing;if(U||Y||$){if(this.logger.log($?"updateKey":"missingKey",h,g,A&&!$?`${d}${this.pluralResolver.getSuffix(h,s.count,s)}`:d,$?z:w),c){const ee=this.resolve(d,{...s,keySeparator:!1});ee&&ee.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let K=[];const V=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&V&&V[0])for(let ee=0;ee<V.length;ee++)K.push(V[ee]);else this.options.saveMissingTo==="all"?K=this.languageUtils.toResolveHierarchy(s.lng||this.language):K.push(s.lng||this.language);const X=(ee,q,se)=>{const j=N&&se!==w?se:L;this.options.missingKeyHandler?this.options.missingKeyHandler(ee,g,q,j,$,s):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(ee,g,q,j,$,s),this.emit("missingKey",ee,g,q,w)};this.options.saveMissing&&(this.options.saveMissingPlurals&&A?K.forEach(ee=>{const q=this.pluralResolver.getSuffixes(ee,s);D&&s[`defaultValue${this.options.pluralSeparator}zero`]&&!q.includes(`${this.options.pluralSeparator}zero`)&&q.push(`${this.options.pluralSeparator}zero`),q.forEach(se=>{X([ee],d+se,s[`defaultValue${se}`]||z)})}):X(K,d,z))}w=this.extendTranslation(w,n,s,S,o),U&&w===d&&this.options.appendNamespaceToMissingKey&&(w=`${g}${y}${d}`),(U||Y)&&this.options.parseMissingKeyHandler&&(w=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${g}${y}${d}`:d,Y?w:void 0,s))}return u?(S.res=w,S.usedParams=this.getUsedParamsDetails(s),S):w}extendTranslation(n,a,o,s,u){if(this.i18nFormat?.parse)n=this.i18nFormat.parse(n,{...this.options.interpolation.defaultVariables,...o},o.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!o.skipInterpolation){o.interpolation&&this.interpolator.init({...o,interpolation:{...this.options.interpolation,...o.interpolation}});const p=Rt(n)&&(o?.interpolation?.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let g;if(p){const h=n.match(this.interpolator.nestingRegexp);g=h&&h.length}let y=o.replace&&!Rt(o.replace)?o.replace:o;if(this.options.interpolation.defaultVariables&&(y={...this.options.interpolation.defaultVariables,...y}),n=this.interpolator.interpolate(n,y,o.lng||this.language||s.usedLng,o),p){const h=n.match(this.interpolator.nestingRegexp),b=h&&h.length;g<b&&(o.nest=!1)}!o.lng&&s&&s.res&&(o.lng=this.language||s.usedLng),o.nest!==!1&&(n=this.interpolator.nest(n,(...h)=>u?.[0]===h[0]&&!o.context?(this.logger.warn(`It seems you are nesting recursively key: ${h[0]} in key: ${a[0]}`),null):this.translate(...h,a),o)),o.interpolation&&this.interpolator.reset()}const c=o.postProcess||this.options.postProcess,d=Rt(c)?[c]:c;return n!=null&&d?.length&&o.applyPostProcessor!==!1&&(n=WO.handle(d,n,a,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(o)},...o}:o,this)),n}resolve(n,a={}){let o,s,u,c,d;return Rt(n)&&(n=[n]),Array.isArray(n)&&(n=n.map(p=>typeof p=="function"?ps(p,{...this.options,...a}):p)),n.forEach(p=>{if(this.isValidLookup(o))return;const g=this.extractFromKey(p,a),y=g.key;s=y;let h=g.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const b=a.count!==void 0&&!Rt(a.count),S=b&&!a.ordinal&&a.count===0,w=a.context!==void 0&&(Rt(a.context)||typeof a.context=="number")&&a.context!=="",C=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);h.forEach(R=>{this.isValidLookup(o)||(d=R,!this.checkedLoadedFor[`${C[0]}-${R}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(d)&&(this.checkedLoadedFor[`${C[0]}-${R}`]=!0,this.logger.warn(`key "${s}" for languages "${C.join(", ")}" won't get resolved as namespace "${d}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),C.forEach(T=>{if(this.isValidLookup(o))return;c=T;const O=[y];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(O,y,T,R,a);else{let A;b&&(A=this.pluralResolver.getSuffix(T,a.count,a));const N=`${this.options.pluralSeparator}zero`,P=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(b&&(a.ordinal&&A.startsWith(P)&&O.push(y+A.replace(P,this.options.pluralSeparator)),O.push(y+A),S&&O.push(y+N)),w){const I=`${y}${this.options.contextSeparator||"_"}${a.context}`;O.push(I),b&&(a.ordinal&&A.startsWith(P)&&O.push(I+A.replace(P,this.options.pluralSeparator)),O.push(I+A),S&&O.push(I+N))}}let M;for(;M=O.pop();)this.isValidLookup(o)||(u=M,o=this.getResource(T,R,M,a))}))})}),{res:o,usedKey:s,exactUsedKey:u,usedLng:c,usedNS:d}}isValidLookup(n){return n!==void 0&&!(!this.options.returnNull&&n===null)&&!(!this.options.returnEmptyString&&n==="")}getResource(n,a,o,s={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(n,a,o,s):this.resourceStore.getResource(n,a,o,s)}getUsedParamsDetails(n={}){const a=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],o=n.replace&&!Rt(n.replace);let s=o?n.replace:n;if(o&&typeof n.count<"u"&&(s={...s,count:n.count}),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!o){s={...s};for(const u of a)delete s[u]}return s}static hasDefaultValue(n){const a="defaultValue";for(const o in n)if(Object.prototype.hasOwnProperty.call(n,o)&&o.startsWith(a)&&n[o]!==void 0)return!0;return!1}}class uR{constructor(n){this.options=n,this.supportedLngs=this.options.supportedLngs||!1,this.logger=lo.create("languageUtils"),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(n){if(n=_l(n),!n||!n.includes("-"))return null;const a=n.split("-");return a.length===2||(a.pop(),a[a.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(a.join("-"))}getLanguagePartFromCode(n){if(n=_l(n),!n||!n.includes("-"))return n;const a=n.split("-");return this.formatLanguageCode(a[0])}formatLanguageCode(n){if(Rt(n)&&n.includes("-")){let a;try{a=Intl.getCanonicalLocales(n)[0]}catch{}return a&&this.options.lowerCaseLng&&(a=a.toLowerCase()),a||(this.options.lowerCaseLng?n.toLowerCase():n)}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}isSupportedCode(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(n)}getBestMatchFromCodes(n){if(!n)return null;let a;return n.forEach(o=>{if(a)return;const s=this.formatLanguageCode(o);(!this.options.supportedLngs||this.isSupportedCode(s))&&(a=s)}),!a&&this.options.supportedLngs&&n.forEach(o=>{if(a)return;const s=this.getScriptPartFromCode(o);if(this.isSupportedCode(s))return a=s;const u=this.getLanguagePartFromCode(o);if(this.isSupportedCode(u))return a=u;a=this.options.supportedLngs.find(c=>c===u?!0:!c.includes("-")&&!u.includes("-")?!1:!!(c.includes("-")&&!u.includes("-")&&c.slice(0,c.indexOf("-"))===u))}),a||(a=this.getFallbackCodes(this.options.fallbackLng)[0]),a}getFallbackCodes(n,a){if(!n)return[];if(typeof n=="function"&&(n=n(a)),Rt(n)&&(n=[n]),Array.isArray(n))return n;if(!a)return n.default||[];let o=n[a];return o||(o=n[this.getScriptPartFromCode(a)]),o||(o=n[this.formatLanguageCode(a)]),o||(o=n[this.getLanguagePartFromCode(a)]),o||(o=n.default),o||[]}toResolveHierarchy(n,a){const o=this.options.fallbackLng,s=Array.isArray(o)?o.join("|"):o;s!==this._cachedFallbackLng&&(this.resolveHierarchyCache={},this._cachedFallbackLng=s);const u=a===void 0||a===!1||Rt(a),c=a===void 0&&typeof this.options.fallbackLng=="function",d=Rt(n)&&u&&!c;let p=null;if(d){let b;a===void 0?b="undefined":a===!1?b="boolean:false":b=`string:${a}`,p=`${n.length}:${n}|${b}`}if(p!==null){const b=this.resolveHierarchyCache[p];if(b!==void 0)return b.slice()}const g=this.getFallbackCodes((a===!1?[]:a)||this.options.fallbackLng||[],n),y=[],h=b=>{b&&(this.isSupportedCode(b)?y.push(b):this.logger.warn(`rejecting language code not found in supportedLngs: ${b}`))};return Rt(n)&&(n.includes("-")||n.includes("_"))?(this.options.load!=="languageOnly"&&h(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&h(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&h(this.getLanguagePartFromCode(n))):Rt(n)&&h(this.formatLanguageCode(n)),g.forEach(b=>{const S=this.formatLanguageCode(b);y.includes(S)||h(S)}),p!==null?(this.resolveHierarchyCache[p]=y,y.slice()):y}}const cR={zero:0,one:1,two:2,few:3,many:4,other:5},dR={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class X6{constructor(n,a={}){this.languageUtils=n,this.options=a,this.logger=lo.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(n,a={}){const o=_l(n==="dev"?"en":n),s=a.ordinal?"ordinal":"cardinal",u=JSON.stringify({cleanedCode:o,type:s});if(u in this.pluralRulesCache)return this.pluralRulesCache[u];let c;try{c=new Intl.PluralRules(o,{type:s})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),dR;if(!n.match(/-|_/))return dR;const p=this.languageUtils.getLanguagePartFromCode(n);c=this.getRule(p,a)}return this.pluralRulesCache[u]=c,c}needsPlural(n,a={}){let o=this.getRule(n,a);return o||(o=this.getRule("dev",a)),o?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(n,a,o={}){return this.getSuffixes(n,o).map(s=>`${a}${s}`)}getSuffixes(n,a={}){let o=this.getRule(n,a);return o||(o=this.getRule("dev",a)),o?o.resolvedOptions().pluralCategories.sort((s,u)=>cR[s]-cR[u]).map(s=>`${this.options.prepend}${a.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(n,a,o={}){const s=this.getRule(n,o);return s?`${this.options.prepend}${o.ordinal?`ordinal${this.options.prepend}`:""}${s.select(a)}`:(this.logger.warn(`no plural rule found for: ${n}`),this.getSuffix("dev",a,o))}}const fR=(e,n,a,o=".",s=!0)=>{let u=U6(e,n,a);return!u&&s&&Rt(a)&&(u=Ey(e,a,o),u===void 0&&(u=Ey(n,a,o))),u};class hR{constructor(n={}){this.logger=lo.create("interpolator"),this.options=n,this.format=n?.interpolation?.format||(a=>a),this.init(n)}init(n={}){n.interpolation||(n.interpolation={escapeValue:!0});const{escape:a,escapeValue:o,useRawValueToEscape:s,prefix:u,prefixEscaped:c,suffix:d,suffixEscaped:p,formatSeparator:g,unescapeSuffix:y,unescapePrefix:h,nestingPrefix:b,nestingPrefixEscaped:S,nestingSuffix:w,nestingSuffixEscaped:C,nestingOptionsSeparator:R,maxReplaces:T,alwaysFormat:O}=n.interpolation;this.escape=a!==void 0?a:B6,this.escapeValue=o!==void 0?o:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=u?Io(u):c||"{{",this.suffix=d?Io(d):p||"}}",this.formatSeparator=g||",",this.unescapePrefix=y?"":h?Io(h):"-",this.unescapeSuffix=this.unescapePrefix?"":y?Io(y):"",this.nestingPrefix=b?Io(b):S||Io("$t("),this.nestingSuffix=w?Io(w):C||Io(")"),this.nestingOptionsSeparator=R||",",this.maxReplaces=T||1e3,this.alwaysFormat=O!==void 0?O:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const n=(a,o)=>a?.source===o?(a.lastIndex=0,a):new RegExp(o,"g");this.regexp=n(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=n(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=n(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']|"[^"]*"|'[^']*'|\\((?:[^()"']|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(n,a,o,s){let u,c,d;const p=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},g=C=>{if(!C.includes(this.formatSeparator)){const M=fR(a,p,C,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(M,void 0,o,{...s,...a,interpolationkey:C}):M}const R=C.split(this.formatSeparator),T=R.shift().trim(),O=R.join(this.formatSeparator).trim();return this.format(fR(a,p,T,this.options.keySeparator,this.options.ignoreJSONStructure),O,o,{...s,...a,interpolationkey:T})};this.resetRegExp(),!this.escapeValue&&typeof n=="string"&&/\$t\([^)]*\{[^}]*\{\{/.test(n)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const y=s?.missingInterpolationHandler||this.options.missingInterpolationHandler,h=s?.interpolation?.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,b=[{regex:this.regexpUnescape,safeValue:C=>C},{regex:this.regexp,safeValue:C=>this.escapeValue?this.escape(C):C}],S=[];let w=0;return b.forEach(C=>{for(d=0;u=C.regex.exec(n);){const R=u.index-w,T=S.find(([A,N])=>R>=A&&R<N);if(T){C.regex.lastIndex=T[1]+w;continue}const O=u[1].trim();if(c=g(O),c===void 0)if(typeof y=="function"){const A=y(n,u,s);c=Rt(A)?A:""}else if(s&&Object.prototype.hasOwnProperty.call(s,O))c="";else if(h){c=u[0];continue}else this.logger.warn(`missed to pass in variable ${O} for interpolating ${n}`),c="";else!Rt(c)&&!this.useRawValueToEscape&&(c=Lf(c));const M=Lf(C.safeValue(c));if(n=n.slice(0,u.index)+M+n.slice(u.index+u[0].length),h?(C.regex===this.regexpUnescape?S.push([u.index,u.index+M.length]):w+=M.length-u[0].length,C.regex.lastIndex+=M.length,C.regex.lastIndex-=u[0].length):C.regex.lastIndex=0,d++,d>=this.maxReplaces)break}}),n}nest(n,a,o={}){let s,u,c;const d=(h,b)=>{const S=this.nestingOptionsSeparator;if(!h.includes(S))return h;const w=h.split(new RegExp(`${Io(S)}[ ]*{`));let C=`{${w[1]}`;h=w[0],C=this.interpolate(C,c);const R=C.match(/'/g),T=C.match(/"/g);((R?.length??0)%2===0&&!T||(T?.length??0)%2!==0)&&(C=C.replace(/'/g,'"'));try{c=JSON.parse(C),b&&(c={...b,...c})}catch(O){return this.logger.warn(`failed parsing options string in nesting for key ${h}`,O),`${h}${S}${C}`}return c.defaultValue&&c.defaultValue.includes(this.prefix)&&delete c.defaultValue,h},p=new RegExp(this.nestingRegexp);let g="",y=0;for(;s=p.exec(n);){let h=[];c={...o},c=c.replace&&!Rt(c.replace)?c.replace:c,c.applyPostProcessor=!1,delete c.defaultValue;const b=/{.*}/s.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(b!==-1&&(h=s[1].slice(b).split(this.formatSeparator).map(S=>S.trim()).filter(Boolean),s[1]=s[1].slice(0,b)),u=a(d.call(this,s[1].trim(),c),c),u&&s[0]===n&&!Rt(u))return u;Rt(u)||(u=Lf(u)),u||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${n}`),u=""),h.length&&(u=h.reduce((S,w)=>this.format(S,w,o.lng,{...o,interpolationkey:s[1].trim()}),u.trim())),g+=n.slice(y,s.index)+Lf(u),y=p.lastIndex,this.regexp.lastIndex=0}return y?g+n.slice(y):n}}const Q6=e=>{let n=e.toLowerCase().trim();const a={};if(e.includes("(")){const o=e.split("(");n=o[0].toLowerCase().trim();const s=o[1].slice(0,-1);n==="currency"&&!s.includes(":")?a.currency||(a.currency=s.trim()):n==="relativetime"&&!s.includes(":")?a.range||(a.range=s.trim()):s.split(";").forEach(c=>{if(c){const[d,...p]=c.split(":"),g=p.join(":").trim().replace(/^'+|'+$/g,""),y=d.trim();a[y]||(a[y]=g),g==="false"&&(a[y]=!1),g==="true"&&(a[y]=!0),isNaN(g)||(a[y]=parseInt(g,10))}})}return{formatName:n,formatOptions:a}},pR=e=>{const n={};return(a,o,s)=>{let u=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(u={...u,[s.interpolationkey]:void 0});let c;try{c=o+JSON.stringify(u)}catch{return e(_l(o),s)(a)}let d=n[c];return d||(d=e(_l(o),s),n[c]=d),d(a)}},Z6=e=>(n,a,o)=>e(_l(a),o)(n);class J6{constructor(n={}){this.logger=lo.create("formatter"),this.options=n,this.init(n)}init(n,a={interpolation:{}}){this.formatSeparator=a.interpolation.formatSeparator||",";const o=a.cacheInBuiltFormats?pR:Z6;this.formats={number:o((s,u)=>{const c=new Intl.NumberFormat(s,{...u});return d=>c.format(d)}),currency:o((s,u)=>{const c=new Intl.NumberFormat(s,{...u,style:"currency"});return d=>c.format(d)}),datetime:o((s,u)=>{const c=new Intl.DateTimeFormat(s,{...u});return d=>c.format(d)}),relativetime:o((s,u)=>{const c=new Intl.RelativeTimeFormat(s,{...u});return d=>c.format(d,u.range||"day")}),list:o((s,u)=>{const c=new Intl.ListFormat(s,{...u});return d=>c.format(d)})}}add(n,a){this.formats[n.toLowerCase().trim()]=a}addCached(n,a){this.formats[n.toLowerCase().trim()]=pR(a)}format(n,a,o,s={}){if(!a||n==null)return n;const u=a.split(this.formatSeparator),c=[];for(let p=0;p<u.length;p++){let g=u[p];for(;g.indexOf("(")>-1&&!g.includes(")")&&p+1<u.length;)g=`${g}${this.formatSeparator}${u[++p]}`;c.push(g)}return c.reduce((p,g)=>{const{formatName:y,formatOptions:h}=Q6(g);if(this.formats[y]){let b=p;try{const S=s?.formatParams?.[s.interpolationkey]||{},w=S.locale||S.lng||s.locale||s.lng||o;b=this.formats[y](p,w,{...h,...s,...S})}catch(S){this.logger.warn(S)}return b}else this.logger.warn(`there was no format function for ${y}`);return p},n)}}const W6=(e,n)=>{e.pending[n]!==void 0&&(delete e.pending[n],e.pendingCount--)};class e8 extends jp{constructor(n,a,o,s={}){super(),this.backend=n,this.store=a,this.services=o,this.languageUtils=o.languageUtils,this.options=s,this.logger=lo.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(o,s.backend,s)}queueLoad(n,a,o,s){const u={},c={},d={},p={};return n.forEach(g=>{let y=!0;a.forEach(h=>{const b=`${g}|${h}`;!o.reload&&this.store.hasResourceBundle(g,h)?this.state[b]=2:this.state[b]<0||(this.state[b]===1?c[b]===void 0&&(c[b]=!0):(this.state[b]=1,y=!1,c[b]===void 0&&(c[b]=!0),u[b]===void 0&&(u[b]=!0),p[h]===void 0&&(p[h]=!0)))}),y||(d[g]=!0)}),(Object.keys(u).length||Object.keys(c).length)&&this.queue.push({pending:c,pendingCount:Object.keys(c).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(u),pending:Object.keys(c),toLoadLanguages:Object.keys(d),toLoadNamespaces:Object.keys(p)}}loaded(n,a,o){const s=n.split("|"),u=s[0],c=s[1];a&&this.emit("failedLoading",u,c,a),!a&&o&&this.store.addResourceBundle(u,c,o,void 0,void 0,{skipCopy:!0}),this.state[n]=a?-1:2,a&&o&&(this.state[n]=0);const d={};this.queue.forEach(p=>{H6(p.loaded,[u],c),W6(p,n),a&&p.errors.push(a),p.pendingCount===0&&!p.done&&(Object.keys(p.loaded).forEach(g=>{d[g]||(d[g]={});const y=p.loaded[g];y.length&&y.forEach(h=>{d[g][h]===void 0&&(d[g][h]=!0)})}),p.done=!0,p.errors.length?p.callback(p.errors):p.callback())}),this.emit("loaded",d),this.queue=this.queue.filter(p=>!p.done)}read(n,a,o,s=0,u=this.retryTimeout,c){if(!n.length)return c(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:n,ns:a,fcName:o,tried:s,wait:u,callback:c});return}this.readingCalls++;const d=(g,y)=>{if(this.readingCalls--,this.waitingReads.length>0){const h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(g&&y&&s<this.maxRetries){setTimeout(()=>{this.read(n,a,o,s+1,u*2,c)},u);return}c(g,y)},p=this.backend[o].bind(this.backend);if(p.length===2){try{const g=p(n,a);g&&typeof g.then=="function"?g.then(y=>d(null,y)).catch(d):d(null,g)}catch(g){d(g)}return}return p(n,a,d)}prepareLoading(n,a,o={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();Rt(n)&&(n=this.languageUtils.toResolveHierarchy(n)),Rt(a)&&(a=[a]);const u=this.queueLoad(n,a,o,s);if(!u.toLoad.length)return u.pending.length||s(),null;u.toLoad.forEach(c=>{this.loadOne(c)})}load(n,a,o){this.prepareLoading(n,a,{},o)}reload(n,a,o){this.prepareLoading(n,a,{reload:!0},o)}loadOne(n,a=""){const o=n.split("|"),s=o[0],u=o[1];this.read(s,u,"read",void 0,void 0,(c,d)=>{c&&this.logger.warn(`${a}loading namespace ${u} for language ${s} failed`,c),!c&&d&&this.logger.log(`${a}loaded namespace ${u} for language ${s}`,d),this.loaded(n,c,d)})}saveMissing(n,a,o,s,u,c={},d=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(a)){this.logger.warn(`did not save key "${o}" as the namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(o==null||o==="")){if(this.backend?.create){const p={...c,isUpdate:u},g=this.backend.create.bind(this.backend);if(g.length<6)try{let y;g.length===5?y=g(n,a,o,s,p):y=g(n,a,o,s),y&&typeof y.then=="function"?y.then(h=>d(null,h)).catch(d):d(null,y)}catch(y){d(y)}else g(n,a,o,s,d,p)}!n||!n[0]||this.store.addResource(n[0],a,o,s)}}}const F0=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let n={};if(typeof e[1]=="object"&&(n=e[1]),Rt(e[1])&&(n.defaultValue=e[1]),Rt(e[2])&&(n.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const a=e[3]||e[2];Object.keys(a).forEach(o=>{n[o]=a[o]})}return n},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),gR=e=>(Rt(e.ns)&&(e.ns=[e.ns]),Rt(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Rt(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),zf=()=>{},t8=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(a=>{typeof e[a]=="function"&&(e[a]=e[a].bind(e))})};class sc extends jp{constructor(n={},a){if(super(),this.options=gR(n),this.services={},this.logger=lo,this.modules={external:[]},t8(this),a&&!this.isInitialized&&!n.isClone){if(!this.options.initAsync)return this.init(n,a),this;setTimeout(()=>{this.init(n,a)},0)}}init(n={},a){this.isInitializing=!0,typeof n=="function"&&(a=n,n={}),n.defaultNS==null&&n.ns&&(Rt(n.ns)?n.defaultNS=n.ns:n.ns.includes("translation")||(n.defaultNS=n.ns[0]));const o=F0();this.options={...o,...this.options,...gR(n)},this.options.interpolation={...o.interpolation,...this.options.interpolation},n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=o.overloadTranslationOptionHandler);const s=g=>g?typeof g=="function"?new g:g:null;if(!this.options.isClone){this.modules.logger?lo.init(s(this.modules.logger),this.options):lo.init(null,this.options);let g;this.modules.formatter?g=this.modules.formatter:g=J6;const y=new uR(this.options);this.store=new lR(this.options.resources,this.options);const h=this.services;h.logger=lo,h.resourceStore=this.store,h.languageUtils=y,h.pluralResolver=new X6(y,{prepend:this.options.pluralSeparator}),g&&(h.formatter=s(g),h.formatter.init&&h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new hR(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new e8(s(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",(b,...S)=>{this.emit(b,...S)}),this.modules.languageDetector&&(h.languageDetector=s(this.modules.languageDetector),h.languageDetector.init&&h.languageDetector.init(h,this.options.detection,this.options)),this.modules.i18nFormat&&(h.i18nFormat=s(this.modules.i18nFormat),h.i18nFormat.init&&h.i18nFormat.init(this)),this.translator=new Th(this.services,this.options),this.translator.on("*",(b,...S)=>{this.emit(b,...S)}),this.modules.external.forEach(b=>{b.init&&b.init(this)})}if(this.format=this.options.interpolation.format,a||(a=zf),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const g=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);g.length>0&&g[0]!=="dev"&&(this.options.lng=g[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(g=>{this[g]=(...y)=>this.store[g](...y)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(g=>{this[g]=(...y)=>(this.store[g](...y),this)});const d=Qu(),p=()=>{const g=(y,h)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),d.resolve(h),a(y,h)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return g(null,this.t.bind(this));this.changeLanguage(this.options.lng,g)};return this.options.resources||!this.options.initAsync?p():setTimeout(p,0),d}loadResources(n,a=zf){let o=a;const s=Rt(n)?n:this.language;if(typeof n=="function"&&(o=n),!this.options.resources||this.options.partialBundledLanguages){if(s?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return o();const u=[],c=d=>{if(!d||d==="cimode")return;this.services.languageUtils.toResolveHierarchy(d).forEach(g=>{g!=="cimode"&&(u.includes(g)||u.push(g))})};s?c(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(p=>c(p)),this.options.preload?.forEach?.(d=>c(d)),this.services.backendConnector.load(u,this.options.ns,d=>{!d&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),o(d)})}else o(null)}reloadResources(n,a,o){const s=Qu();return typeof n=="function"&&(o=n,n=void 0),typeof a=="function"&&(o=a,a=void 0),n||(n=this.languages),a||(a=this.options.ns),o||(o=zf),this.services.backendConnector.reload(n,a,u=>{s.resolve(),o(u)}),s}use(n){if(!n)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!n.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return n.type==="backend"&&(this.modules.backend=n),(n.type==="logger"||n.log&&n.warn&&n.error)&&(this.modules.logger=n),n.type==="languageDetector"&&(this.modules.languageDetector=n),n.type==="i18nFormat"&&(this.modules.i18nFormat=n),n.type==="postProcessor"&&WO.addPostProcessor(n),n.type==="formatter"&&(this.modules.formatter=n),n.type==="3rdParty"&&this.modules.external.push(n),this}setResolvedLanguage(n){if(!(!n||!this.languages)&&!["cimode","dev"].includes(n)){for(let a=0;a<this.languages.length;a++){const o=this.languages[a];if(!["cimode","dev"].includes(o)&&this.store.hasLanguageSomeTranslations(o)){this.resolvedLanguage=o;break}}!this.resolvedLanguage&&!this.languages.includes(n)&&this.store.hasLanguageSomeTranslations(n)&&(this.resolvedLanguage=n,this.languages.unshift(n))}}changeLanguage(n,a){this.isLanguageChangingTo=n;const o=Qu();this.emit("languageChanging",n);const s=d=>{this.language=d,this.languages=this.services.languageUtils.toResolveHierarchy(d),this.resolvedLanguage=void 0,this.setResolvedLanguage(d)},u=(d,p)=>{p?this.isLanguageChangingTo===n&&(s(p),this.translator.changeLanguage(p),this.isLanguageChangingTo=void 0,this.emit("languageChanged",p),this.logger.log("languageChanged",p)):this.isLanguageChangingTo=void 0,o.resolve((...g)=>this.t(...g)),a&&a(d,(...g)=>this.t(...g))},c=d=>{!n&&!d&&this.services.languageDetector&&(d=[]);const p=Rt(d)?d:d&&d[0],g=this.store.hasLanguageSomeTranslations(p)?p:this.services.languageUtils.getBestMatchFromCodes(Rt(d)?[d]:d);g&&(this.language||s(g),this.translator.language||this.translator.changeLanguage(g),this.services.languageDetector?.cacheUserLanguage?.(g)),this.loadResources(g,y=>{u(y,g)})};return!n&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!n&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(c):this.services.languageDetector.detect(c):c(n),o}getFixedT(n,a,o,s){const u=s?.scopeNs,c=(d,p,...g)=>{let y;typeof p!="object"?y=this.options.overloadTranslationOptionHandler([d,p].concat(g)):y={...p},y.lng=y.lng||c.lng,y.lngs=y.lngs||c.lngs;const h=y.ns!==void 0&&y.ns!==null;y.ns=y.ns||c.ns,y.keyPrefix!==""&&(y.keyPrefix=y.keyPrefix||o||c.keyPrefix);const b={...this.options,...y};Array.isArray(u)&&!h&&(b.ns=u),typeof y.keyPrefix=="function"&&(y.keyPrefix=ps(y.keyPrefix,b));const S=this.options.keySeparator||".";let w;return y.keyPrefix&&Array.isArray(d)?w=d.map(C=>(typeof C=="function"&&(C=ps(C,b)),`${y.keyPrefix}${S}${C}`)):(typeof d=="function"&&(d=ps(d,b)),w=y.keyPrefix?`${y.keyPrefix}${S}${d}`:d),this.t(w,y)};return Rt(n)?c.lng=n:c.lngs=n,c.ns=a,c.keyPrefix=o,c}t(...n){return this.translator?.translate(...n)}exists(...n){return this.translator?.exists(...n)}setDefaultNamespace(n){this.options.defaultNS=n}hasLoadedNamespace(n,a={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const o=a.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,u=this.languages[this.languages.length-1];if(o.toLowerCase()==="cimode")return!0;const c=(g,y)=>{const h=this.services.backendConnector.state[`${g}|${y}`];return h===-1||h===0||h===2};if(a.precheck){const g=a.precheck(this,c);if(g!==void 0)return g}if(this.hasResourceBundle(o,n)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages)return!0;const{languageUtils:d}=this.services,p=a.lng?d.isSupportedCode(o)&&d.toResolveHierarchy(o,!1)[0]:o;return!!((!p||c(p,n))&&(!s||c(u,n)))}loadNamespaces(n,a){const o=Qu();return this.options.ns?(Rt(n)&&(n=[n]),n.forEach(s=>{this.options.ns.includes(s)||this.options.ns.push(s)}),this.loadResources(s=>{o.resolve(),a&&a(s)}),o):(a&&a(),Promise.resolve())}loadLanguages(n,a){const o=Qu();Rt(n)&&(n=[n]);const s=this.options.preload||[],u=n.filter(c=>!s.includes(c)&&this.services.languageUtils.isSupportedCode(c));return u.length?(this.options.preload=s.concat(u),this.loadResources(c=>{o.resolve(),a&&a(c)}),o):(a&&a(),Promise.resolve())}dir(n){if(n||(n=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!n)return"rtl";try{const s=new Intl.Locale(n);if(s&&s.getTextInfo){const u=s.getTextInfo();if(u&&u.direction)return u.direction}}catch{}const a=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],o=this.services?.languageUtils||new uR(F0());return n.toLowerCase().indexOf("-latn")>1?"ltr":a.includes(o.getLanguagePartFromCode(n))||n.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(n={},a){const o=new sc(n,a);return o.createInstance=sc.createInstance,o}cloneInstance(n={},a=zf){const o=n.forkResourceStore;o&&delete n.forkResourceStore;const s={...this.options,preload:!1,...n,isClone:!0},u=new sc(s);if((n.debug!==void 0||n.prefix!==void 0)&&(u.logger=u.logger.clone(n)),["store","services","language"].forEach(d=>{u[d]=this[d]}),u.services={...this.services},u.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},o){const d=g=>{const y=Array.isArray(g)?[...g]:{...g};return Object.keys(y).forEach(h=>{y[h]&&typeof y[h]=="object"&&(y[h]=d(y[h]))}),y},p=d(this.store.data);u.store=new lR(p,s),u.services.resourceStore=u.store}if(n.interpolation){const p={...F0().interpolation,...this.options.interpolation,...n.interpolation},g={...s,interpolation:p};u.services.interpolator=new hR(g)}return u.translator=new Th(u.services,s),u.translator.on("*",(d,...p)=>{u.emit(d,...p)}),u.init(s,a),u.translator.options=s,u.translator.backendConnector.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},u}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const dr=sc.createInstance();dr.createInstance;dr.dir;dr.init;dr.loadResources;dr.reloadResources;dr.use;dr.changeLanguage;dr.getFixedT;dr.t;dr.exists;dr.setDefaultNamespace;dr.hasLoadedNamespace;dr.loadNamespaces;dr.loadLanguages;const n8=(e,n,a,o)=>{const s=[a,{code:n,...o||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(s,"warn","react-i18next::",!0);xs(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...s):console?.warn&&console.warn(...s)},mR={},Wf=(e,n,a,o)=>{xs(a)&&mR[a]||(xs(a)&&(mR[a]=new Date),n8(e,n,a,o))},tM=(e,n)=>()=>{if(e.isInitialized)n();else{const a=()=>{setTimeout(()=>{e.off("initialized",a)},0),n()};e.on("initialized",a)}},Cy=(e,n,a)=>{e.loadNamespaces(n,tM(e,a))},yR=(e,n,a,o)=>{if(xs(a)&&(a=[a]),e.options.preload&&e.options.preload.indexOf(n)>-1)return Cy(e,a,o);a.forEach(s=>{e.options.ns.indexOf(s)<0&&e.options.ns.push(s)}),e.loadLanguages(n,tM(e,o))},r8=(e,n,a={})=>!n.languages||!n.languages.length?(Wf(n,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:n.languages}),!0):n.hasLoadedNamespace(e,{lng:a.lng,precheck:(o,s)=>{if(a.bindI18n&&a.bindI18n.indexOf("languageChanging")>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!s(o.isLanguageChangingTo,e))return!1}}),xs=e=>typeof e=="string",a8=e=>typeof e=="object"&&e!==null,o8=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,i8={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},s8=e=>i8[e],l8=e=>e.replace(o8,s8);let Ty={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:l8,transDefaultProps:void 0};const u8=(e={})=>{Ty={...Ty,...e}},c8=()=>Ty;let nM;const d8=e=>{nM=e},f8=()=>nM,h8={type:"3rdParty",init(e){u8(e.options.react),d8(e)}},p8=v.createContext();class g8{constructor(){this.usedNamespaces={}}addUsedNamespaces(n){n.forEach(a=>{this.usedNamespaces[a]||(this.usedNamespaces[a]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const m8=(e,n)=>{if(xs(n))return n;if(a8(n)&&xs(n.defaultValue))return n.defaultValue;if(typeof e=="function")return"";if(Array.isArray(e)){const a=e[e.length-1];return typeof a=="function"?"":a}return e},y8={t:m8,ready:!1},v8=()=>()=>{},sn=(e,n={})=>{const{i18n:a}=n,{i18n:o,defaultNS:s}=v.useContext(p8)||{},u=a||o||f8();u&&!u.reportNamespaces&&(u.reportNamespaces=new g8),u||Wf(u,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.");const c=v.useMemo(()=>({...c8(),...u?.options?.react,...n}),[u,n]),{useSuspense:d,keyPrefix:p,bindI18n:g,bindI18nStore:y}=c,h=s||u?.options?.defaultNS,b=xs(h)?[h]:h||["translation"],S=JSON.stringify(b),w=v.useMemo(()=>b,[S]);u?.reportNamespaces?.addUsedNamespaces?.(w);const C=v.useRef(0),R=v.useCallback(U=>{if(!u)return v8;const H=()=>{C.current+=1,U()};return g&&u.on(g,H),y&&u.store.on(y,H),()=>{g&&g.split(" ").forEach(L=>u.off(L,H)),y&&y.split(" ").forEach(L=>u.store.off(L,H))}},[u,g,y]),T=v.useRef(),O=v.useCallback(()=>{if(!u)return y8;const U=!!(u.isInitialized||u.initializedStoreOnce)&&w.every(ee=>r8(ee,u,c)),H=n.lng||u.language,L=C.current,$=typeof p=="function"?ps(p,{...u.options,ns:w}):p,K=T.current;if(K&&K.i18n===u&&K.ready===U&&K.lng===H&&K.namespaces===w&&K.keyPrefix===$&&K.revision===L)return K;const X={t:u.getFixedT(H,c.nsMode==="fallback"?w:w[0],p,{scopeNs:w}),i18n:u,ready:U,lng:H,namespaces:w,keyPrefix:$,revision:L};return T.current=X,X},[u,w,p,c,n.lng]),[M,A]=v.useState(0);let{t:N,ready:P}=rp.useSyncExternalStore(R,O,O),I;u&&d&&!P&&(I=new Promise(U=>{const H=()=>U();n.lng?yR(u,n.lng,w,H):Cy(u,w,H)}),{t:N,ready:P}=O()),v.useEffect(()=>{if(u&&!P&&!d){const U=()=>A(H=>H+1);n.lng?yR(u,n.lng,w,U):Cy(u,w,U)}},[u,n.lng,w,P,d,M]);const D=u||{},z=v.useRef(null),F=v.useRef(),G=U=>`${U.language}|${U.resolvedLanguage}|${U.languages?.join(",")}`,J=U=>{const H=Object.getOwnPropertyDescriptors(U);H.__original&&delete H.__original;const L=Object.create(Object.getPrototypeOf(U),H);if(!Object.prototype.hasOwnProperty.call(L,"__original"))try{Object.defineProperty(L,"__original",{value:U,writable:!1,enumerable:!1,configurable:!1})}catch{}return L},Y=v.useMemo(()=>{const U=D,H=U&&G(U);let L=U;U&&(z.current&&z.current.__original===U?F.current!==H?(L=J(U),z.current=L,F.current=H):L=z.current:(L=J(U),z.current=L,F.current=H));const $=!P&&!d?(...V)=>(Wf(u,"USE_T_BEFORE_READY","useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."),N(...V)):N,K=[$,L,P];return K.t=$,K.i18n=L,K.ready=P,K},[N,D,P,D.resolvedLanguage,D.language,D.languages]);if(u&&d&&!P){let U=!1;try{U=!1}catch{}throw U&&Wf(u,"SUSPENDED_WHILE_LOADING","useTranslation: suspended while translations are loading (useSuspense is true by default). Add a <Suspense> boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook"),I}return Y};function b8({...e}){return x.jsx(QO,{"data-slot":"sheet",...e})}function x8({...e}){return x.jsx(XO,{"data-slot":"sheet-portal",...e})}function S8({className:e,...n}){return x.jsx(YO,{"data-slot":"sheet-overlay",className:Qe("fixed inset-0 z-50 bg-black/80 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",e),...n})}function w8({className:e,children:n,side:a="right",showCloseButton:o=!0,...s}){const{t:u}=sn();return x.jsxs(x8,{children:[x.jsx(S8,{}),x.jsxs($O,{"data-slot":"sheet-content","data-side":a,className:Qe("fixed z-50 flex flex-col bg-popover bg-clip-padding text-xs/relaxed text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-10 data-[side=bottom]:data-starting-style:translate-y-10 data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:-translate-x-10 data-[side=left]:data-starting-style:-translate-x-10 data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-10 data-[side=right]:data-starting-style:translate-x-10 data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:-translate-y-10 data-[side=top]:data-starting-style:-translate-y-10 data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",e),...s,children:[n,o&&x.jsxs(Np,{"data-slot":"sheet-close",render:x.jsx(Jt,{variant:"ghost",className:"absolute top-4 right-4",size:"icon-sm"}),children:[x.jsx(Rs,{}),x.jsx("span",{className:"sr-only",children:u("a11y.close")})]})]})]})}function R8({className:e,...n}){return x.jsx("div",{"data-slot":"sheet-header",className:Qe("flex flex-col gap-1.5 p-6",e),...n})}function E8({className:e,...n}){return x.jsx(ZO,{"data-slot":"sheet-title",className:Qe("font-heading text-sm font-medium text-foreground",e),...n})}function C8({className:e,...n}){return x.jsx(KO,{"data-slot":"sheet-description",className:Qe("text-xs/relaxed text-muted-foreground",e),...n})}function ca({className:e,...n}){return x.jsx("div",{"data-slot":"skeleton",className:Qe("animate-pulse rounded-md bg-muted",e),...n})}const T8="sidebar_state",O8=3600*24*7,M8="16rem",A8="18rem",D8="3rem",N8="b",rM=v.createContext(null);function Os(){const e=v.useContext(rM);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function j8({defaultOpen:e=!0,open:n,onOpenChange:a,className:o,style:s,children:u,...c}){const d=s6(),[p,g]=v.useState(!1),[y,h]=v.useState(e),b=n??y,S=v.useCallback(T=>{const O=typeof T=="function"?T(b):T;a?a(O):h(O),document.cookie=`${T8}=${O}; path=/; max-age=${O8}`},[a,b]),w=v.useCallback(()=>d?g(T=>!T):S(T=>!T),[d,S,g]);v.useEffect(()=>{const T=O=>{O.key===N8&&(O.metaKey||O.ctrlKey)&&(O.preventDefault(),w())};return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)},[w]);const C=b?"expanded":"collapsed",R=v.useMemo(()=>({state:C,open:b,setOpen:S,isMobile:d,openMobile:p,setOpenMobile:g,toggleSidebar:w}),[C,b,S,d,p,g,w]);return x.jsx(rM.Provider,{value:R,children:x.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":M8,"--sidebar-width-icon":D8,...s},className:Qe("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",o),...c,children:u})})}function I8({side:e="left",variant:n="sidebar",collapsible:a="offcanvas",className:o,children:s,dir:u,...c}){const{t:d}=sn(),{isMobile:p,state:g,openMobile:y,setOpenMobile:h}=Os();return a==="none"?x.jsx("div",{"data-slot":"sidebar",className:Qe("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",o),...c,children:s}):p?x.jsx(b8,{open:y,onOpenChange:h,...c,children:x.jsxs(w8,{dir:u,"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":A8},side:e,children:[x.jsxs(R8,{className:"sr-only",children:[x.jsx(E8,{children:d("a11y.sidebar")}),x.jsx(C8,{children:d("a11y.sidebarDescription")})]}),x.jsx("div",{className:"flex h-full w-full flex-col",children:s})]})}):x.jsxs("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":g,"data-collapsible":g==="collapsed"?a:"","data-variant":n,"data-side":e,"data-slot":"sidebar",children:[x.jsx("div",{"data-slot":"sidebar-gap",className:Qe("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",n==="floating"||n==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),x.jsx("div",{"data-slot":"sidebar-container","data-side":e,className:Qe("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:-left-(--sidebar-width) data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:-right-(--sidebar-width) md:flex",n==="floating"||n==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",o),...c,children:x.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",children:s})})]})}function k8({className:e,onClick:n,...a}){const{t:o}=sn(),{toggleSidebar:s}=Os();return x.jsxs(Jt,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:Qe(e),onClick:u=>{n?.(u),s()},...a,children:[x.jsx(tP,{}),x.jsx("span",{className:"sr-only",children:o("a11y.toggleSidebar")})]})}function P8({className:e,...n}){const{t:a}=sn(),{toggleSidebar:o}=Os();return x.jsx("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":a("a11y.toggleSidebar"),tabIndex:-1,onClick:o,title:a("a11y.toggleSidebar"),className:Qe("absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:inset-s-1/2 after:w-0.5 hover:after:bg-sidebar-border sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...n})}function L8({className:e,...n}){return x.jsx("main",{"data-slot":"sidebar-inset",className:Qe("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",e),...n})}function z8({className:e,...n}){return x.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:Qe("flex flex-col gap-2 p-2",e),...n})}function _8({className:e,...n}){return x.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:Qe("flex flex-col gap-2 p-2",e),...n})}function H8({className:e,...n}){return x.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:Qe("no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...n})}function U8({className:e,...n}){return x.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:Qe("relative flex w-full min-w-0 flex-col px-2 py-1",e),...n})}function Uv({className:e,...n}){return x.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:Qe("flex w-full min-w-0 flex-col gap-px",e),...n})}function lc({className:e,...n}){return x.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:Qe("group/menu-item relative",e),...n})}const F8=Dp("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-[calc(var(--radius-sm)+2px)] p-2 text-left text-xs ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"},size:{default:"h-8 text-xs",sm:"h-7 text-xs",lg:"h-12 text-xs group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function uc({render:e,isActive:n=!1,variant:a="default",size:o="default",tooltip:s,className:u,...c}){const{isMobile:d,state:p}=Os(),g=HO({defaultTagName:"button",props:Lr({className:Qe(F8({variant:a,size:o}),u)},c),render:s?x.jsx(yh,{render:e}):e,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:o,active:n}});return s?(typeof s=="string"&&(s={children:s}),x.jsxs(mh,{children:[g,x.jsx(vh,{side:"right",align:"center",hidden:p!=="collapsed"||d,...s})]})):g}function B8({className:e,...n}){return x.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:Qe("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 group-data-[collapsible=icon]:hidden",e),...n})}function V8({className:e,...n}){return x.jsx("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:Qe("group/menu-sub-item relative",e),...n})}function q8({render:e,size:n="md",isActive:a=!1,className:o,...s}){return HO({defaultTagName:"a",props:Lr({className:Qe("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-xs data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",o)},s),render:e,state:{slot:"sidebar-menu-sub-button",sidebar:"menu-sub-button",size:n,active:a}})}function Y8({items:e}){const{t:n}=sn(),{pathname:a}=Hr(),{isMobile:o,state:s}=Os(),u=s==="collapsed"&&!o;return x.jsx(U8,{children:x.jsx(Uv,{children:e.map(c=>{const d=c.icon,p=c.items?.some(g=>g.url===a)??!1;return c.items?u?x.jsx(lc,{children:x.jsxs(Op,{children:[x.jsxs(Mp,{render:x.jsx(uc,{tooltip:n(c.titleKey),isActive:p}),children:[x.jsx(d,{}),x.jsx("span",{children:n(c.titleKey)})]}),x.jsx(Ap,{className:"w-40",side:"right",align:"start",sideOffset:4,children:x.jsxs(wh,{children:[x.jsx(_v,{children:n(c.titleKey)}),c.items.map(g=>x.jsx(Rh,{className:"cursor-pointer",render:x.jsx(oc,{to:g.url}),children:x.jsx("span",{children:n(g.titleKey)})},g.titleKey))]})})]})},c.titleKey):x.jsxs(Bz,{defaultOpen:p,className:"group/collapsible",render:x.jsx(lc,{}),children:[x.jsxs(Vz,{render:x.jsx(uc,{tooltip:n(c.titleKey),isActive:p}),children:[x.jsx(d,{}),x.jsx("span",{children:n(c.titleKey)}),x.jsx(Pk,{className:`
|
|
14
|
-
ml-auto transition-transform duration-200
|
|
15
|
-
group-data-open/collapsible:rotate-90
|
|
16
|
-
`})]}),x.jsx(qz,{children:x.jsx(B8,{children:c.items.map(g=>x.jsx(V8,{children:x.jsx(q8,{isActive:a===g.url,render:x.jsx(oc,{to:g.url}),children:x.jsx("span",{children:n(g.titleKey)})})},g.titleKey))})})]},`${c.titleKey}-${p?"active":"inactive"}`):x.jsx(lc,{children:x.jsxs(uc,{tooltip:n(c.titleKey),isActive:a===c.url,render:x.jsx(oc,{to:c.url??"/dashboard"}),children:[x.jsx(d,{}),x.jsx("span",{children:n(c.titleKey)})]})},c.titleKey)})})})}const B0=[{id:"acme-inc",nameKey:"sidebar.team.acmeInc",logo:x.jsx(Kk,{}),planKey:"sidebar.plan.enterprise"},{id:"acme-corp",nameKey:"sidebar.team.acmeCorp",logo:x.jsx(kk,{}),planKey:"sidebar.plan.startup"},{id:"evil-corp",nameKey:"sidebar.team.evilCorp",logo:x.jsx(sP,{}),planKey:"sidebar.plan.free"}];function K8(){const{t:e}=sn(),{isMobile:n}=Os(),[a,o]=v.useState(B0[0]?.id),s=B0.find(u=>u.id===a);return s?x.jsx(Uv,{children:x.jsx(lc,{children:x.jsxs(Op,{children:[x.jsxs(Mp,{render:x.jsx(uc,{size:"lg",className:`
|
|
17
|
-
data-open:bg-sidebar-accent
|
|
18
|
-
data-open:text-sidebar-accent-foreground
|
|
19
|
-
`}),children:[x.jsx("div",{className:`
|
|
20
|
-
flex aspect-square size-8 items-center justify-center rounded-lg
|
|
21
|
-
bg-sidebar-primary text-sidebar-primary-foreground
|
|
22
|
-
`,children:s.logo}),x.jsxs("div",{className:"grid flex-1 text-left text-sm/tight",children:[x.jsx("span",{className:"truncate font-medium",children:e(s.nameKey)}),x.jsx("span",{className:"truncate text-xs",children:e(s.planKey)})]}),x.jsx(zk,{className:"ml-auto"})]}),x.jsxs(Ap,{className:"w-fit",align:"start",side:n?"bottom":"right",sideOffset:4,children:[x.jsxs(wh,{children:[x.jsx(_v,{className:"text-xs text-muted-foreground",children:e("sidebar.teams")}),B0.map((u,c)=>x.jsxs(Rh,{onClick:()=>o(u.id),className:"gap-2 p-2",children:[x.jsx("div",{className:`
|
|
23
|
-
flex size-6 items-center justify-center rounded-md border
|
|
24
|
-
`,children:u.logo}),e(u.nameKey),x.jsxs(o6,{children:["⌘",c+1]})]},u.id))]}),x.jsx(a6,{}),x.jsx(wh,{children:x.jsxs(Rh,{className:"gap-2 p-2",children:[x.jsx("div",{className:`
|
|
25
|
-
flex size-6 items-center justify-center rounded-md border
|
|
26
|
-
bg-transparent
|
|
27
|
-
`,children:x.jsx(dv,{className:"size-4"})}),x.jsx("div",{className:"font-medium text-muted-foreground",children:e("sidebar.addTeam")})]})})]})]})})}):null}const Fv=[{titleKey:"nav.dashboard",url:"/dashboard",icon:Xk},{titleKey:"nav.library",icon:Qk,items:[{titleKey:"nav.instructions",url:"/library/instructions"},{titleKey:"nav.skills",url:"/library/skills"}]},{titleKey:"nav.models",icon:vC,items:[{titleKey:"nav.genesis",url:"/models/genesis"},{titleKey:"nav.explorer",url:"/models/explorer"},{titleKey:"nav.quantum",url:"/models/quantum"}]}],G8=new Map([["/settings","nav.settings"],...Fv.flatMap(e=>[...e.url?[[e.url,e.titleKey]]:[],...e.items?.map(n=>[n.url,n.titleKey])??[]])]);function aM(e){return G8.get(e)??"nav.dashboard"}const $8=Fv.flatMap(e=>[...e.url?[e.url]:[],...e.items?.map(n=>n.url)??[]]),X8=$8;function Q8({...e}){const{t:n}=sn(),{pathname:a}=Hr(),{isMobile:o,setOpenMobile:s}=Os();return v.useEffect(()=>{o&&s(!1)},[o,a,s]),x.jsxs(I8,{collapsible:"icon",...e,children:[x.jsx(z8,{children:x.jsx(K8,{})}),x.jsx(H8,{children:x.jsx(Y8,{items:Fv})}),x.jsx(_8,{children:x.jsx(Uv,{children:x.jsx(lc,{children:x.jsxs(uc,{tooltip:n("nav.settings"),render:x.jsx(oc,{to:"/settings"}),children:[x.jsx(oP,{}),x.jsx("span",{children:n("nav.settings")})]})})})}),x.jsx(P8,{})]})}const Ip=v.createContext(null);Ip.displayName="PageHeaderActionsContext";function Z8({children:e}){const[n,a]=v.useState(null);return x.jsx(Ip,{value:{container:n,setContainer:a},children:e})}function J8(){const e=v.use(Ip);if(!e)throw new Error("PageHeaderActionsSlot must be used within PageHeaderActionsProvider");const n=e.setContainer,a=v.useCallback(o=>{n(o)},[n]);return x.jsx("div",{ref:a,className:"ml-auto flex shrink-0 items-center gap-2 px-4"})}function W8({children:e}){const n=v.use(Ip);return n?.container?cr.createPortal(e,n.container):null}function eH(){const{t:e}=sn(),{pathname:n}=Hr();return x.jsx(Z8,{children:x.jsxs(j8,{children:[x.jsx(Q8,{}),x.jsxs(L8,{children:[x.jsxs("header",{className:`
|
|
28
|
-
flex h-16 shrink-0 items-center gap-2 transition-[width,height]
|
|
29
|
-
ease-linear
|
|
30
|
-
group-has-data-[collapsible=icon]/sidebar-wrapper:h-12
|
|
31
|
-
`,children:[x.jsxs("div",{className:"flex min-w-0 items-center gap-2 px-4",children:[x.jsx(k8,{size:"icon",className:"-ml-1"}),x.jsx(VO,{orientation:"vertical",className:`
|
|
32
|
-
mr-2
|
|
33
|
-
data-vertical:h-4 data-vertical:self-auto
|
|
34
|
-
`}),x.jsx("span",{className:"truncate text-sm font-medium",children:e(aM(n))})]}),x.jsx(J8,{})]}),x.jsx(tO,{})]})]})})}function tH(){const{t:e}=sn(),{pathname:n}=Hr(),a=TL(),o=vp();let s;for(const c of a.toReversed())if(nH(c.handle)){s=c.handle.backTo;break}const u=()=>{if(s===void 0){o(-1);return}o(s)};return x.jsxs("div",{className:"flex h-dvh flex-col overflow-hidden bg-background",children:[x.jsx("header",{className:`
|
|
35
|
-
flex h-16 shrink-0 items-center gap-2 transition-[width,height]
|
|
36
|
-
ease-linear
|
|
37
|
-
`,children:x.jsxs("div",{className:"flex items-center gap-2 px-4",children:[x.jsxs(Jt,{variant:"ghost",size:"icon",className:"-ml-1",onClick:u,children:[x.jsx(Ik,{}),x.jsx("span",{className:"sr-only",children:e("a11y.goBack")})]}),x.jsx(VO,{orientation:"vertical",className:`
|
|
38
|
-
mr-2
|
|
39
|
-
data-vertical:h-4 data-vertical:self-auto
|
|
40
|
-
`}),x.jsx("span",{className:"text-sm font-medium",children:e(aM(n))})]})}),x.jsx("main",{className:"min-h-0 flex-1 overflow-hidden",children:x.jsx(tO,{})})]})}function nH(e){return typeof e=="object"&&e!==null&&"backTo"in e&&typeof e.backTo=="string"}function rH(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];return v.useMemo(()=>o=>{n.forEach(s=>s(o))},n)}const kp=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function $l(e){const n=Object.prototype.toString.call(e);return n==="[object Window]"||n==="[object global]"}function Bv(e){return"nodeType"in e}function Ur(e){var n,a;return e?$l(e)?e:Bv(e)&&(n=(a=e.ownerDocument)==null?void 0:a.defaultView)!=null?n:window:window}function Vv(e){const{Document:n}=Ur(e);return e instanceof n}function Kc(e){return $l(e)?!1:e instanceof Ur(e).HTMLElement}function oM(e){return e instanceof Ur(e).SVGElement}function Xl(e){return e?$l(e)?e.document:Bv(e)?Vv(e)?e:Kc(e)||oM(e)?e.ownerDocument:document:document:document}const qa=kp?v.useLayoutEffect:v.useEffect;function Pp(e){const n=v.useRef(e);return qa(()=>{n.current=e}),v.useCallback(function(){for(var a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];return n.current==null?void 0:n.current(...o)},[])}function aH(){const e=v.useRef(null),n=v.useCallback((o,s)=>{e.current=setInterval(o,s)},[]),a=v.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[n,a]}function xc(e,n){n===void 0&&(n=[e]);const a=v.useRef(e);return qa(()=>{a.current!==e&&(a.current=e)},n),a}function Gc(e,n){const a=v.useRef();return v.useMemo(()=>{const o=e(a.current);return a.current=o,o},[...n])}function Oh(e){const n=Pp(e),a=v.useRef(null),o=v.useCallback(s=>{s!==a.current&&n?.(s,a.current),a.current=s},[]);return[a,o]}function Mh(e){const n=v.useRef();return v.useEffect(()=>{n.current=e},[e]),n.current}let V0={};function $c(e,n){return v.useMemo(()=>{if(n)return n;const a=V0[e]==null?0:V0[e]+1;return V0[e]=a,e+"-"+a},[e,n])}function iM(e){return function(n){for(var a=arguments.length,o=new Array(a>1?a-1:0),s=1;s<a;s++)o[s-1]=arguments[s];return o.reduce((u,c)=>{const d=Object.entries(c);for(const[p,g]of d){const y=u[p];y!=null&&(u[p]=y+e*g)}return u},{...n})}}const Dl=iM(1),Sc=iM(-1);function oH(e){return"clientX"in e&&"clientY"in e}function Lp(e){if(!e)return!1;const{KeyboardEvent:n}=Ur(e.target);return n&&e instanceof n}function iH(e){if(!e)return!1;const{TouchEvent:n}=Ur(e.target);return n&&e instanceof n}function Ah(e){if(iH(e)){if(e.touches&&e.touches.length){const{clientX:n,clientY:a}=e.touches[0];return{x:n,y:a}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:n,clientY:a}=e.changedTouches[0];return{x:n,y:a}}}return oH(e)?{x:e.clientX,y:e.clientY}:null}const Di=Object.freeze({Translate:{toString(e){if(!e)return;const{x:n,y:a}=e;return"translate3d("+(n?Math.round(n):0)+"px, "+(a?Math.round(a):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:n,scaleY:a}=e;return"scaleX("+n+") scaleY("+a+")"}},Transform:{toString(e){if(e)return[Di.Translate.toString(e),Di.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:n,duration:a,easing:o}=e;return n+" "+a+"ms "+o}}}),vR="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function sH(e){return e.matches(vR)?e:e.querySelector(vR)}const lH={display:"none"};function uH(e){let{id:n,value:a}=e;return Ne.createElement("div",{id:n,style:lH},a)}function cH(e){let{id:n,announcement:a,ariaLiveType:o="assertive"}=e;const s={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return Ne.createElement("div",{id:n,style:s,role:"status","aria-live":o,"aria-atomic":!0},a)}function dH(){const[e,n]=v.useState("");return{announce:v.useCallback(o=>{o!=null&&n(o)},[]),announcement:e}}const sM=v.createContext(null);function fH(e){const n=v.useContext(sM);v.useEffect(()=>{if(!n)throw new Error("useDndMonitor must be used within a children of <DndContext>");return n(e)},[e,n])}function hH(){const[e]=v.useState(()=>new Set),n=v.useCallback(o=>(e.add(o),()=>e.delete(o)),[e]);return[v.useCallback(o=>{let{type:s,event:u}=o;e.forEach(c=>{var d;return(d=c[s])==null?void 0:d.call(c,u)})},[e]),n]}const pH={draggable:`
|
|
41
|
-
To pick up a draggable item, press the space bar.
|
|
42
|
-
While dragging, use the arrow keys to move the item.
|
|
43
|
-
Press space again to drop the item in its new position, or press escape to cancel.
|
|
44
|
-
`},gH={onDragStart(e){let{active:n}=e;return"Picked up draggable item "+n.id+"."},onDragOver(e){let{active:n,over:a}=e;return a?"Draggable item "+n.id+" was moved over droppable area "+a.id+".":"Draggable item "+n.id+" is no longer over a droppable area."},onDragEnd(e){let{active:n,over:a}=e;return a?"Draggable item "+n.id+" was dropped over droppable area "+a.id:"Draggable item "+n.id+" was dropped."},onDragCancel(e){let{active:n}=e;return"Dragging was cancelled. Draggable item "+n.id+" was dropped."}};function mH(e){let{announcements:n=gH,container:a,hiddenTextDescribedById:o,screenReaderInstructions:s=pH}=e;const{announce:u,announcement:c}=dH(),d=$c("DndLiveRegion"),[p,g]=v.useState(!1);if(v.useEffect(()=>{g(!0)},[]),fH(v.useMemo(()=>({onDragStart(h){let{active:b}=h;u(n.onDragStart({active:b}))},onDragMove(h){let{active:b,over:S}=h;n.onDragMove&&u(n.onDragMove({active:b,over:S}))},onDragOver(h){let{active:b,over:S}=h;u(n.onDragOver({active:b,over:S}))},onDragEnd(h){let{active:b,over:S}=h;u(n.onDragEnd({active:b,over:S}))},onDragCancel(h){let{active:b,over:S}=h;u(n.onDragCancel({active:b,over:S}))}}),[u,n])),!p)return null;const y=Ne.createElement(Ne.Fragment,null,Ne.createElement(uH,{id:o,value:s.draggable}),Ne.createElement(cH,{id:d,announcement:c}));return a?cr.createPortal(y,a):y}var ar;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(ar||(ar={}));function Dh(){}function q0(e,n){return v.useMemo(()=>({sensor:e,options:n??{}}),[e,n])}function yH(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];return v.useMemo(()=>[...n].filter(o=>o!=null),[...n])}const Ya=Object.freeze({x:0,y:0});function qv(e,n){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function vH(e,n){const a=Ah(e);if(!a)return"0 0";const o={x:(a.x-n.left)/n.width*100,y:(a.y-n.top)/n.height*100};return o.x+"% "+o.y+"%"}function Yv(e,n){let{data:{value:a}}=e,{data:{value:o}}=n;return a-o}function bH(e,n){let{data:{value:a}}=e,{data:{value:o}}=n;return o-a}function Oy(e){let{left:n,top:a,height:o,width:s}=e;return[{x:n,y:a},{x:n+s,y:a},{x:n,y:a+o},{x:n+s,y:a+o}]}function lM(e,n){if(!e||e.length===0)return null;const[a]=e;return a[n]}function bR(e,n,a){return n===void 0&&(n=e.left),a===void 0&&(a=e.top),{x:n+e.width*.5,y:a+e.height*.5}}const xH=e=>{let{collisionRect:n,droppableRects:a,droppableContainers:o}=e;const s=bR(n,n.left,n.top),u=[];for(const c of o){const{id:d}=c,p=a.get(d);if(p){const g=qv(bR(p),s);u.push({id:d,data:{droppableContainer:c,value:g}})}}return u.sort(Yv)},SH=e=>{let{collisionRect:n,droppableRects:a,droppableContainers:o}=e;const s=Oy(n),u=[];for(const c of o){const{id:d}=c,p=a.get(d);if(p){const g=Oy(p),y=s.reduce((b,S,w)=>b+qv(g[w],S),0),h=Number((y/4).toFixed(4));u.push({id:d,data:{droppableContainer:c,value:h}})}}return u.sort(Yv)};function wH(e,n){const a=Math.max(n.top,e.top),o=Math.max(n.left,e.left),s=Math.min(n.left+n.width,e.left+e.width),u=Math.min(n.top+n.height,e.top+e.height),c=s-o,d=u-a;if(o<s&&a<u){const p=n.width*n.height,g=e.width*e.height,y=c*d,h=y/(p+g-y);return Number(h.toFixed(4))}return 0}const RH=e=>{let{collisionRect:n,droppableRects:a,droppableContainers:o}=e;const s=[];for(const u of o){const{id:c}=u,d=a.get(c);if(d){const p=wH(d,n);p>0&&s.push({id:c,data:{droppableContainer:u,value:p}})}}return s.sort(bH)};function EH(e,n){const{top:a,left:o,bottom:s,right:u}=n;return a<=e.y&&e.y<=s&&o<=e.x&&e.x<=u}const CH=e=>{let{droppableContainers:n,droppableRects:a,pointerCoordinates:o}=e;if(!o)return[];const s=[];for(const u of n){const{id:c}=u,d=a.get(c);if(d&&EH(o,d)){const g=Oy(d).reduce((h,b)=>h+qv(o,b),0),y=Number((g/4).toFixed(4));s.push({id:c,data:{droppableContainer:u,value:y}})}}return s.sort(Yv)};function TH(e,n,a){return{...e,scaleX:n&&a?n.width/a.width:1,scaleY:n&&a?n.height/a.height:1}}function uM(e,n){return e&&n?{x:e.left-n.left,y:e.top-n.top}:Ya}function OH(e){return function(a){for(var o=arguments.length,s=new Array(o>1?o-1:0),u=1;u<o;u++)s[u-1]=arguments[u];return s.reduce((c,d)=>({...c,top:c.top+e*d.y,bottom:c.bottom+e*d.y,left:c.left+e*d.x,right:c.right+e*d.x}),{...a})}}const MH=OH(1);function cM(e){if(e.startsWith("matrix3d(")){const n=e.slice(9,-1).split(/, /);return{x:+n[12],y:+n[13],scaleX:+n[0],scaleY:+n[5]}}else if(e.startsWith("matrix(")){const n=e.slice(7,-1).split(/, /);return{x:+n[4],y:+n[5],scaleX:+n[0],scaleY:+n[3]}}return null}function AH(e,n,a){const o=cM(n);if(!o)return e;const{scaleX:s,scaleY:u,x:c,y:d}=o,p=e.left-c-(1-s)*parseFloat(a),g=e.top-d-(1-u)*parseFloat(a.slice(a.indexOf(" ")+1)),y=s?e.width/s:e.width,h=u?e.height/u:e.height;return{width:y,height:h,top:g,right:p+y,bottom:g+h,left:p}}const DH={ignoreTransform:!1};function Ql(e,n){n===void 0&&(n=DH);let a=e.getBoundingClientRect();if(n.ignoreTransform){const{transform:g,transformOrigin:y}=Ur(e).getComputedStyle(e);g&&(a=AH(a,g,y))}const{top:o,left:s,width:u,height:c,bottom:d,right:p}=a;return{top:o,left:s,width:u,height:c,bottom:d,right:p}}function xR(e){return Ql(e,{ignoreTransform:!0})}function NH(e){const n=e.innerWidth,a=e.innerHeight;return{top:0,left:0,right:n,bottom:a,width:n,height:a}}function jH(e,n){return n===void 0&&(n=Ur(e).getComputedStyle(e)),n.position==="fixed"}function IH(e,n){n===void 0&&(n=Ur(e).getComputedStyle(e));const a=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(s=>{const u=n[s];return typeof u=="string"?a.test(u):!1})}function zp(e,n){const a=[];function o(s){if(n!=null&&a.length>=n||!s)return a;if(Vv(s)&&s.scrollingElement!=null&&!a.includes(s.scrollingElement))return a.push(s.scrollingElement),a;if(!Kc(s)||oM(s)||a.includes(s))return a;const u=Ur(e).getComputedStyle(s);return s!==e&&IH(s,u)&&a.push(s),jH(s,u)?a:o(s.parentNode)}return e?o(e):a}function dM(e){const[n]=zp(e,1);return n??null}function Y0(e){return!kp||!e?null:$l(e)?e:Bv(e)?Vv(e)||e===Xl(e).scrollingElement?window:Kc(e)?e:null:null}function fM(e){return $l(e)?e.scrollX:e.scrollLeft}function hM(e){return $l(e)?e.scrollY:e.scrollTop}function My(e){return{x:fM(e),y:hM(e)}}var ur;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(ur||(ur={}));function pM(e){return!kp||!e?!1:e===document.scrollingElement}function gM(e){const n={x:0,y:0},a=pM(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},o={x:e.scrollWidth-a.width,y:e.scrollHeight-a.height},s=e.scrollTop<=n.y,u=e.scrollLeft<=n.x,c=e.scrollTop>=o.y,d=e.scrollLeft>=o.x;return{isTop:s,isLeft:u,isBottom:c,isRight:d,maxScroll:o,minScroll:n}}const kH={x:.2,y:.2};function PH(e,n,a,o,s){let{top:u,left:c,right:d,bottom:p}=a;o===void 0&&(o=10),s===void 0&&(s=kH);const{isTop:g,isBottom:y,isLeft:h,isRight:b}=gM(e),S={x:0,y:0},w={x:0,y:0},C={height:n.height*s.y,width:n.width*s.x};return!g&&u<=n.top+C.height?(S.y=ur.Backward,w.y=o*Math.abs((n.top+C.height-u)/C.height)):!y&&p>=n.bottom-C.height&&(S.y=ur.Forward,w.y=o*Math.abs((n.bottom-C.height-p)/C.height)),!b&&d>=n.right-C.width?(S.x=ur.Forward,w.x=o*Math.abs((n.right-C.width-d)/C.width)):!h&&c<=n.left+C.width&&(S.x=ur.Backward,w.x=o*Math.abs((n.left+C.width-c)/C.width)),{direction:S,speed:w}}function LH(e){if(e===document.scrollingElement){const{innerWidth:u,innerHeight:c}=window;return{top:0,left:0,right:u,bottom:c,width:u,height:c}}const{top:n,left:a,right:o,bottom:s}=e.getBoundingClientRect();return{top:n,left:a,right:o,bottom:s,width:e.clientWidth,height:e.clientHeight}}function mM(e){return e.reduce((n,a)=>Dl(n,My(a)),Ya)}function zH(e){return e.reduce((n,a)=>n+fM(a),0)}function _H(e){return e.reduce((n,a)=>n+hM(a),0)}function yM(e,n){if(n===void 0&&(n=Ql),!e)return;const{top:a,left:o,bottom:s,right:u}=n(e);dM(e)&&(s<=0||u<=0||a>=window.innerHeight||o>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const HH=[["x",["left","right"],zH],["y",["top","bottom"],_H]];class Kv{constructor(n,a){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const o=zp(a),s=mM(o);this.rect={...n},this.width=n.width,this.height=n.height;for(const[u,c,d]of HH)for(const p of c)Object.defineProperty(this,p,{get:()=>{const g=d(o),y=s[u]-g;return this.rect[p]+y},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class cc{constructor(n){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(a=>{var o;return(o=this.target)==null?void 0:o.removeEventListener(...a)})},this.target=n}add(n,a,o){var s;(s=this.target)==null||s.addEventListener(n,a,o),this.listeners.push([n,a,o])}}function UH(e){const{EventTarget:n}=Ur(e);return e instanceof n?e:Xl(e)}function K0(e,n){const a=Math.abs(e.x),o=Math.abs(e.y);return typeof n=="number"?Math.sqrt(a**2+o**2)>n:"x"in n&&"y"in n?a>n.x&&o>n.y:"x"in n?a>n.x:"y"in n?o>n.y:!1}var Ta;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Ta||(Ta={}));function SR(e){e.preventDefault()}function FH(e){e.stopPropagation()}var Zt;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(Zt||(Zt={}));const vM={start:[Zt.Space,Zt.Enter],cancel:[Zt.Esc],end:[Zt.Space,Zt.Enter,Zt.Tab]},BH=(e,n)=>{let{currentCoordinates:a}=n;switch(e.code){case Zt.Right:return{...a,x:a.x+25};case Zt.Left:return{...a,x:a.x-25};case Zt.Down:return{...a,y:a.y+25};case Zt.Up:return{...a,y:a.y-25}}};class Gv{constructor(n){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=n;const{event:{target:a}}=n;this.props=n,this.listeners=new cc(Xl(a)),this.windowListeners=new cc(Ur(a)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Ta.Resize,this.handleCancel),this.windowListeners.add(Ta.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Ta.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:n,onStart:a}=this.props,o=n.node.current;o&&yM(o),a(Ya)}handleKeyDown(n){if(Lp(n)){const{active:a,context:o,options:s}=this.props,{keyboardCodes:u=vM,coordinateGetter:c=BH,scrollBehavior:d="smooth"}=s,{code:p}=n;if(u.end.includes(p)){this.handleEnd(n);return}if(u.cancel.includes(p)){this.handleCancel(n);return}const{collisionRect:g}=o.current,y=g?{x:g.left,y:g.top}:Ya;this.referenceCoordinates||(this.referenceCoordinates=y);const h=c(n,{active:a,context:o.current,currentCoordinates:y});if(h){const b=Sc(h,y),S={x:0,y:0},{scrollableAncestors:w}=o.current;for(const C of w){const R=n.code,{isTop:T,isRight:O,isLeft:M,isBottom:A,maxScroll:N,minScroll:P}=gM(C),I=LH(C),D={x:Math.min(R===Zt.Right?I.right-I.width/2:I.right,Math.max(R===Zt.Right?I.left:I.left+I.width/2,h.x)),y:Math.min(R===Zt.Down?I.bottom-I.height/2:I.bottom,Math.max(R===Zt.Down?I.top:I.top+I.height/2,h.y))},z=R===Zt.Right&&!O||R===Zt.Left&&!M,F=R===Zt.Down&&!A||R===Zt.Up&&!T;if(z&&D.x!==h.x){const G=C.scrollLeft+b.x,J=R===Zt.Right&&G<=N.x||R===Zt.Left&&G>=P.x;if(J&&!b.y){C.scrollTo({left:G,behavior:d});return}J?S.x=C.scrollLeft-G:S.x=R===Zt.Right?C.scrollLeft-N.x:C.scrollLeft-P.x,S.x&&C.scrollBy({left:-S.x,behavior:d});break}else if(F&&D.y!==h.y){const G=C.scrollTop+b.y,J=R===Zt.Down&&G<=N.y||R===Zt.Up&&G>=P.y;if(J&&!b.x){C.scrollTo({top:G,behavior:d});return}J?S.y=C.scrollTop-G:S.y=R===Zt.Down?C.scrollTop-N.y:C.scrollTop-P.y,S.y&&C.scrollBy({top:-S.y,behavior:d});break}}this.handleMove(n,Dl(Sc(h,this.referenceCoordinates),S))}}}handleMove(n,a){const{onMove:o}=this.props;n.preventDefault(),o(a)}handleEnd(n){const{onEnd:a}=this.props;n.preventDefault(),this.detach(),a()}handleCancel(n){const{onCancel:a}=this.props;n.preventDefault(),this.detach(),a()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Gv.activators=[{eventName:"onKeyDown",handler:(e,n,a)=>{let{keyboardCodes:o=vM,onActivation:s}=n,{active:u}=a;const{code:c}=e.nativeEvent;if(o.start.includes(c)){const d=u.activatorNode.current;return d&&e.target!==d?!1:(e.preventDefault(),s?.({event:e.nativeEvent}),!0)}return!1}}];function wR(e){return!!(e&&"distance"in e)}function RR(e){return!!(e&&"delay"in e)}class $v{constructor(n,a,o){var s;o===void 0&&(o=UH(n.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=n,this.events=a;const{event:u}=n,{target:c}=u;this.props=n,this.events=a,this.document=Xl(c),this.documentListeners=new cc(this.document),this.listeners=new cc(o),this.windowListeners=new cc(Ur(c)),this.initialCoordinates=(s=Ah(u))!=null?s:Ya,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:n,props:{options:{activationConstraint:a,bypassActivationConstraint:o}}}=this;if(this.listeners.add(n.move.name,this.handleMove,{passive:!1}),this.listeners.add(n.end.name,this.handleEnd),n.cancel&&this.listeners.add(n.cancel.name,this.handleCancel),this.windowListeners.add(Ta.Resize,this.handleCancel),this.windowListeners.add(Ta.DragStart,SR),this.windowListeners.add(Ta.VisibilityChange,this.handleCancel),this.windowListeners.add(Ta.ContextMenu,SR),this.documentListeners.add(Ta.Keydown,this.handleKeydown),a){if(o!=null&&o({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(RR(a)){this.timeoutId=setTimeout(this.handleStart,a.delay),this.handlePending(a);return}if(wR(a)){this.handlePending(a);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(n,a){const{active:o,onPending:s}=this.props;s(o,n,this.initialCoordinates,a)}handleStart(){const{initialCoordinates:n}=this,{onStart:a}=this.props;n&&(this.activated=!0,this.documentListeners.add(Ta.Click,FH,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Ta.SelectionChange,this.removeTextSelection),a(n))}handleMove(n){var a;const{activated:o,initialCoordinates:s,props:u}=this,{onMove:c,options:{activationConstraint:d}}=u;if(!s)return;const p=(a=Ah(n))!=null?a:Ya,g=Sc(s,p);if(!o&&d){if(wR(d)){if(d.tolerance!=null&&K0(g,d.tolerance))return this.handleCancel();if(K0(g,d.distance))return this.handleStart()}if(RR(d)&&K0(g,d.tolerance))return this.handleCancel();this.handlePending(d,g);return}n.cancelable&&n.preventDefault(),c(p)}handleEnd(){const{onAbort:n,onEnd:a}=this.props;this.detach(),this.activated||n(this.props.active),a()}handleCancel(){const{onAbort:n,onCancel:a}=this.props;this.detach(),this.activated||n(this.props.active),a()}handleKeydown(n){n.code===Zt.Esc&&this.handleCancel()}removeTextSelection(){var n;(n=this.document.getSelection())==null||n.removeAllRanges()}}const VH={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class bM extends $v{constructor(n){const{event:a}=n,o=Xl(a.target);super(n,VH,o)}}bM.activators=[{eventName:"onPointerDown",handler:(e,n)=>{let{nativeEvent:a}=e,{onActivation:o}=n;return!a.isPrimary||a.button!==0?!1:(o?.({event:a}),!0)}}];const qH={move:{name:"mousemove"},end:{name:"mouseup"}};var Ay;(function(e){e[e.RightClick=2]="RightClick"})(Ay||(Ay={}));class xM extends $v{constructor(n){super(n,qH,Xl(n.event.target))}}xM.activators=[{eventName:"onMouseDown",handler:(e,n)=>{let{nativeEvent:a}=e,{onActivation:o}=n;return a.button===Ay.RightClick?!1:(o?.({event:a}),!0)}}];const G0={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class SM extends $v{constructor(n){super(n,G0)}static setup(){return window.addEventListener(G0.move.name,n,{capture:!1,passive:!1}),function(){window.removeEventListener(G0.move.name,n)};function n(){}}}SM.activators=[{eventName:"onTouchStart",handler:(e,n)=>{let{nativeEvent:a}=e,{onActivation:o}=n;const{touches:s}=a;return s.length>1?!1:(o?.({event:a}),!0)}}];var dc;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(dc||(dc={}));var Nh;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Nh||(Nh={}));function YH(e){let{acceleration:n,activator:a=dc.Pointer,canScroll:o,draggingRect:s,enabled:u,interval:c=5,order:d=Nh.TreeOrder,pointerCoordinates:p,scrollableAncestors:g,scrollableAncestorRects:y,delta:h,threshold:b}=e;const S=GH({delta:h,disabled:!u}),[w,C]=aH(),R=v.useRef({x:0,y:0}),T=v.useRef({x:0,y:0}),O=v.useMemo(()=>{switch(a){case dc.Pointer:return p?{top:p.y,bottom:p.y,left:p.x,right:p.x}:null;case dc.DraggableRect:return s}},[a,s,p]),M=v.useRef(null),A=v.useCallback(()=>{const P=M.current;if(!P)return;const I=R.current.x*T.current.x,D=R.current.y*T.current.y;P.scrollBy(I,D)},[]),N=v.useMemo(()=>d===Nh.TreeOrder?[...g].reverse():g,[d,g]);v.useEffect(()=>{if(!u||!g.length||!O){C();return}for(const P of N){if(o?.(P)===!1)continue;const I=g.indexOf(P),D=y[I];if(!D)continue;const{direction:z,speed:F}=PH(P,D,O,n,b);for(const G of["x","y"])S[G][z[G]]||(F[G]=0,z[G]=0);if(F.x>0||F.y>0){C(),M.current=P,w(A,c),R.current=F,T.current=z;return}}R.current={x:0,y:0},T.current={x:0,y:0},C()},[n,A,o,C,u,c,JSON.stringify(O),JSON.stringify(S),w,g,N,y,JSON.stringify(b)])}const KH={x:{[ur.Backward]:!1,[ur.Forward]:!1},y:{[ur.Backward]:!1,[ur.Forward]:!1}};function GH(e){let{delta:n,disabled:a}=e;const o=Mh(n);return Gc(s=>{if(a||!o||!s)return KH;const u={x:Math.sign(n.x-o.x),y:Math.sign(n.y-o.y)};return{x:{[ur.Backward]:s.x[ur.Backward]||u.x===-1,[ur.Forward]:s.x[ur.Forward]||u.x===1},y:{[ur.Backward]:s.y[ur.Backward]||u.y===-1,[ur.Forward]:s.y[ur.Forward]||u.y===1}}},[a,n,o])}function $H(e,n){const a=n!=null?e.get(n):void 0,o=a?a.node.current:null;return Gc(s=>{var u;return n==null?null:(u=o??s)!=null?u:null},[o,n])}function XH(e,n){return v.useMemo(()=>e.reduce((a,o)=>{const{sensor:s}=o,u=s.activators.map(c=>({eventName:c.eventName,handler:n(c.handler,o)}));return[...a,...u]},[]),[e,n])}var wc;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(wc||(wc={}));var Dy;(function(e){e.Optimized="optimized"})(Dy||(Dy={}));const ER=new Map;function QH(e,n){let{dragging:a,dependencies:o,config:s}=n;const[u,c]=v.useState(null),{frequency:d,measure:p,strategy:g}=s,y=v.useRef(e),h=R(),b=xc(h),S=v.useCallback(function(T){T===void 0&&(T=[]),!b.current&&c(O=>O===null?T:O.concat(T.filter(M=>!O.includes(M))))},[b]),w=v.useRef(null),C=Gc(T=>{if(h&&!a)return ER;if(!T||T===ER||y.current!==e||u!=null){const O=new Map;for(let M of e){if(!M)continue;if(u&&u.length>0&&!u.includes(M.id)&&M.rect.current){O.set(M.id,M.rect.current);continue}const A=M.node.current,N=A?new Kv(p(A),A):null;M.rect.current=N,N&&O.set(M.id,N)}return O}return T},[e,u,a,h,p]);return v.useEffect(()=>{y.current=e},[e]),v.useEffect(()=>{h||S()},[a,h]),v.useEffect(()=>{u&&u.length>0&&c(null)},[JSON.stringify(u)]),v.useEffect(()=>{h||typeof d!="number"||w.current!==null||(w.current=setTimeout(()=>{S(),w.current=null},d))},[d,h,S,...o]),{droppableRects:C,measureDroppableContainers:S,measuringScheduled:u!=null};function R(){switch(g){case wc.Always:return!1;case wc.BeforeDragging:return a;default:return!a}}}function Xv(e,n){return Gc(a=>e?a||(typeof n=="function"?n(e):e):null,[n,e])}function ZH(e,n){return Xv(e,n)}function JH(e){let{callback:n,disabled:a}=e;const o=Pp(n),s=v.useMemo(()=>{if(a||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:u}=window;return new u(o)},[o,a]);return v.useEffect(()=>()=>s?.disconnect(),[s]),s}function _p(e){let{callback:n,disabled:a}=e;const o=Pp(n),s=v.useMemo(()=>{if(a||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:u}=window;return new u(o)},[a]);return v.useEffect(()=>()=>s?.disconnect(),[s]),s}function WH(e){return new Kv(Ql(e),e)}function CR(e,n,a){n===void 0&&(n=WH);const[o,s]=v.useState(null);function u(){s(p=>{if(!e)return null;if(e.isConnected===!1){var g;return(g=p??a)!=null?g:null}const y=n(e);return JSON.stringify(p)===JSON.stringify(y)?p:y})}const c=JH({callback(p){if(e)for(const g of p){const{type:y,target:h}=g;if(y==="childList"&&h instanceof HTMLElement&&h.contains(e)){u();break}}}}),d=_p({callback:u});return qa(()=>{u(),e?(d?.observe(e),c?.observe(document.body,{childList:!0,subtree:!0})):(d?.disconnect(),c?.disconnect())},[e]),o}function eU(e){const n=Xv(e);return uM(e,n)}const TR=[];function tU(e){const n=v.useRef(e),a=Gc(o=>e?o&&o!==TR&&e&&n.current&&e.parentNode===n.current.parentNode?o:zp(e):TR,[e]);return v.useEffect(()=>{n.current=e},[e]),a}function nU(e){const[n,a]=v.useState(null),o=v.useRef(e),s=v.useCallback(u=>{const c=Y0(u.target);c&&a(d=>d?(d.set(c,My(c)),new Map(d)):null)},[]);return v.useEffect(()=>{const u=o.current;if(e!==u){c(u);const d=e.map(p=>{const g=Y0(p);return g?(g.addEventListener("scroll",s,{passive:!0}),[g,My(g)]):null}).filter(p=>p!=null);a(d.length?new Map(d):null),o.current=e}return()=>{c(e),c(u)};function c(d){d.forEach(p=>{const g=Y0(p);g?.removeEventListener("scroll",s)})}},[s,e]),v.useMemo(()=>e.length?n?Array.from(n.values()).reduce((u,c)=>Dl(u,c),Ya):mM(e):Ya,[e,n])}function OR(e,n){n===void 0&&(n=[]);const a=v.useRef(null);return v.useEffect(()=>{a.current=null},n),v.useEffect(()=>{const o=e!==Ya;o&&!a.current&&(a.current=e),!o&&a.current&&(a.current=null)},[e]),a.current?Sc(e,a.current):Ya}function rU(e){v.useEffect(()=>{if(!kp)return;const n=e.map(a=>{let{sensor:o}=a;return o.setup==null?void 0:o.setup()});return()=>{for(const a of n)a?.()}},e.map(n=>{let{sensor:a}=n;return a}))}function aU(e,n){return v.useMemo(()=>e.reduce((a,o)=>{let{eventName:s,handler:u}=o;return a[s]=c=>{u(c,n)},a},{}),[e,n])}function wM(e){return v.useMemo(()=>e?NH(e):null,[e])}const MR=[];function oU(e,n){n===void 0&&(n=Ql);const[a]=e,o=wM(a?Ur(a):null),[s,u]=v.useState(MR);function c(){u(()=>e.length?e.map(p=>pM(p)?o:new Kv(n(p),p)):MR)}const d=_p({callback:c});return qa(()=>{d?.disconnect(),c(),e.forEach(p=>d?.observe(p))},[e]),s}function RM(e){if(!e)return null;if(e.children.length>1)return e;const n=e.children[0];return Kc(n)?n:e}function iU(e){let{measure:n}=e;const[a,o]=v.useState(null),s=v.useCallback(g=>{for(const{target:y}of g)if(Kc(y)){o(h=>{const b=n(y);return h?{...h,width:b.width,height:b.height}:b});break}},[n]),u=_p({callback:s}),c=v.useCallback(g=>{const y=RM(g);u?.disconnect(),y&&u?.observe(y),o(y?n(y):null)},[n,u]),[d,p]=Oh(c);return v.useMemo(()=>({nodeRef:d,rect:a,setRef:p}),[a,d,p])}const sU=[{sensor:bM,options:{}},{sensor:Gv,options:{}}],lU={current:{}},eh={draggable:{measure:xR},droppable:{measure:xR,strategy:wc.WhileDragging,frequency:Dy.Optimized},dragOverlay:{measure:Ql}};class fc extends Map{get(n){var a;return n!=null&&(a=super.get(n))!=null?a:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(n=>{let{disabled:a}=n;return!a})}getNodeFor(n){var a,o;return(a=(o=this.get(n))==null?void 0:o.node.current)!=null?a:void 0}}const uU={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new fc,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Dh},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:eh,measureDroppableContainers:Dh,windowRect:null,measuringScheduled:!1},EM={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Dh,draggableNodes:new Map,over:null,measureDroppableContainers:Dh},Xc=v.createContext(EM),CM=v.createContext(uU);function cU(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new fc}}}function dU(e,n){switch(n.type){case ar.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:n.initialCoordinates,active:n.active}};case ar.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:n.coordinates.x-e.draggable.initialCoordinates.x,y:n.coordinates.y-e.draggable.initialCoordinates.y}}};case ar.DragEnd:case ar.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ar.RegisterDroppable:{const{element:a}=n,{id:o}=a,s=new fc(e.droppable.containers);return s.set(o,a),{...e,droppable:{...e.droppable,containers:s}}}case ar.SetDroppableDisabled:{const{id:a,key:o,disabled:s}=n,u=e.droppable.containers.get(a);if(!u||o!==u.key)return e;const c=new fc(e.droppable.containers);return c.set(a,{...u,disabled:s}),{...e,droppable:{...e.droppable,containers:c}}}case ar.UnregisterDroppable:{const{id:a,key:o}=n,s=e.droppable.containers.get(a);if(!s||o!==s.key)return e;const u=new fc(e.droppable.containers);return u.delete(a),{...e,droppable:{...e.droppable,containers:u}}}default:return e}}function fU(e){let{disabled:n}=e;const{active:a,activatorEvent:o,draggableNodes:s}=v.useContext(Xc),u=Mh(o),c=Mh(a?.id);return v.useEffect(()=>{if(!n&&!o&&u&&c!=null){if(!Lp(u)||document.activeElement===u.target)return;const d=s.get(c);if(!d)return;const{activatorNode:p,node:g}=d;if(!p.current&&!g.current)return;requestAnimationFrame(()=>{for(const y of[p.current,g.current]){if(!y)continue;const h=sH(y);if(h){h.focus();break}}})}},[o,n,s,c,u]),null}function TM(e,n){let{transform:a,...o}=n;return e!=null&&e.length?e.reduce((s,u)=>u({transform:s,...o}),a):a}function hU(e){return v.useMemo(()=>({draggable:{...eh.draggable,...e?.draggable},droppable:{...eh.droppable,...e?.droppable},dragOverlay:{...eh.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function pU(e){let{activeNode:n,measure:a,initialRect:o,config:s=!0}=e;const u=v.useRef(!1),{x:c,y:d}=typeof s=="boolean"?{x:s,y:s}:s;qa(()=>{if(!c&&!d||!n){u.current=!1;return}if(u.current||!o)return;const g=n?.node.current;if(!g||g.isConnected===!1)return;const y=a(g),h=uM(y,o);if(c||(h.x=0),d||(h.y=0),u.current=!0,Math.abs(h.x)>0||Math.abs(h.y)>0){const b=dM(g);b&&b.scrollBy({top:h.y,left:h.x})}},[n,c,d,o,a])}const Hp=v.createContext({...Ya,scaleX:1,scaleY:1});var Si;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Si||(Si={}));const gU=v.memo(function(n){var a,o,s,u;let{id:c,accessibility:d,autoScroll:p=!0,children:g,sensors:y=sU,collisionDetection:h=RH,measuring:b,modifiers:S,...w}=n;const C=v.useReducer(dU,void 0,cU),[R,T]=C,[O,M]=hH(),[A,N]=v.useState(Si.Uninitialized),P=A===Si.Initialized,{draggable:{active:I,nodes:D,translate:z},droppable:{containers:F}}=R,G=I!=null?D.get(I):null,J=v.useRef({initial:null,translated:null}),Y=v.useMemo(()=>{var vt;return I!=null?{id:I,data:(vt=G?.data)!=null?vt:lU,rect:J}:null},[I,G]),U=v.useRef(null),[H,L]=v.useState(null),[$,K]=v.useState(null),V=xc(w,Object.values(w)),X=$c("DndDescribedBy",c),ee=v.useMemo(()=>F.getEnabled(),[F]),q=hU(b),{droppableRects:se,measureDroppableContainers:j,measuringScheduled:B}=QH(ee,{dragging:P,dependencies:[z.x,z.y],config:q.droppable}),W=$H(D,I),re=v.useMemo(()=>$?Ah($):null,[$]),Re=ft(),le=ZH(W,q.draggable.measure);pU({activeNode:I!=null?D.get(I):null,config:Re.layoutShiftCompensation,initialRect:le,measure:q.draggable.measure});const me=CR(W,q.draggable.measure,le),ge=CR(W?W.parentElement:null),ce=v.useRef({activatorEvent:null,active:null,activeNode:W,collisionRect:null,collisions:null,droppableRects:se,draggableNodes:D,draggingNode:null,draggingNodeRect:null,droppableContainers:F,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Te=F.getNodeFor((a=ce.current.over)==null?void 0:a.id),ve=iU({measure:q.dragOverlay.measure}),Pe=(o=ve.nodeRef.current)!=null?o:W,Me=P?(s=ve.rect)!=null?s:me:null,Le=!!(ve.nodeRef.current&&ve.rect),Fe=eU(Le?null:me),Oe=wM(Pe?Ur(Pe):null),He=tU(P?Te??W:null),be=oU(He),Ue=TM(S,{transform:{x:z.x-Fe.x,y:z.y-Fe.y,scaleX:1,scaleY:1},activatorEvent:$,active:Y,activeNodeRect:me,containerNodeRect:ge,draggingNodeRect:Me,over:ce.current.over,overlayNodeRect:ve.rect,scrollableAncestors:He,scrollableAncestorRects:be,windowRect:Oe}),Ze=re?Dl(re,z):null,it=nU(He),de=OR(it),we=OR(it,[me]),Ke=Dl(Ue,de),De=Me?MH(Me,Ue):null,je=Y&&De?h({active:Y,collisionRect:De,droppableRects:se,droppableContainers:ee,pointerCoordinates:Ze}):null,yt=lM(je,"id"),[ut,ht]=v.useState(null),Ot=Le?Ue:Dl(Ue,we),Dt=TH(Ot,(u=ut?.rect)!=null?u:null,me),Wt=v.useRef(null),rn=v.useCallback((vt,gt)=>{let{sensor:Lt,options:un}=gt;if(U.current==null)return;const Ie=D.get(U.current);if(!Ie)return;const ot=vt.nativeEvent,ke=new Lt({active:U.current,activeNode:Ie,event:ot,options:un,context:ce,onAbort(Ge){if(!D.get(Ge))return;const{onDragAbort:Et}=V.current,_={id:Ge};Et?.(_),O({type:"onDragAbort",event:_})},onPending(Ge,et,Et,_){if(!D.get(Ge))return;const{onDragPending:ne}=V.current,ye={id:Ge,constraint:et,initialCoordinates:Et,offset:_};ne?.(ye),O({type:"onDragPending",event:ye})},onStart(Ge){const et=U.current;if(et==null)return;const Et=D.get(et);if(!Et)return;const{onDragStart:_}=V.current,Z={activatorEvent:ot,active:{id:et,data:Et.data,rect:J}};cr.unstable_batchedUpdates(()=>{_?.(Z),N(Si.Initializing),T({type:ar.DragStart,initialCoordinates:Ge,active:et}),O({type:"onDragStart",event:Z}),L(Wt.current),K(ot)})},onMove(Ge){T({type:ar.DragMove,coordinates:Ge})},onEnd:ze(ar.DragEnd),onCancel:ze(ar.DragCancel)});Wt.current=ke;function ze(Ge){return async function(){const{active:Et,collisions:_,over:Z,scrollAdjustedTranslate:ne}=ce.current;let ye=null;if(Et&&ne){const{cancelDrop:xe}=V.current;ye={activatorEvent:ot,active:Et,collisions:_,delta:ne,over:Z},Ge===ar.DragEnd&&typeof xe=="function"&&await Promise.resolve(xe(ye))&&(Ge=ar.DragCancel)}U.current=null,cr.unstable_batchedUpdates(()=>{T({type:Ge}),N(Si.Uninitialized),ht(null),L(null),K(null),Wt.current=null;const xe=Ge===ar.DragEnd?"onDragEnd":"onDragCancel";if(ye){const qe=V.current[xe];qe?.(ye),O({type:xe,event:ye})}})}}},[D]),en=v.useCallback((vt,gt)=>(Lt,un)=>{const Ie=Lt.nativeEvent,ot=D.get(un);if(U.current!==null||!ot||Ie.dndKit||Ie.defaultPrevented)return;const ke={active:ot};vt(Lt,gt.options,ke)===!0&&(Ie.dndKit={capturedBy:gt.sensor},U.current=un,rn(Lt,gt))},[D,rn]),We=XH(y,en);rU(y),qa(()=>{me&&A===Si.Initializing&&N(Si.Initialized)},[me,A]),v.useEffect(()=>{const{onDragMove:vt}=V.current,{active:gt,activatorEvent:Lt,collisions:un,over:Ie}=ce.current;if(!gt||!Lt)return;const ot={active:gt,activatorEvent:Lt,collisions:un,delta:{x:Ke.x,y:Ke.y},over:Ie};cr.unstable_batchedUpdates(()=>{vt?.(ot),O({type:"onDragMove",event:ot})})},[Ke.x,Ke.y]),v.useEffect(()=>{const{active:vt,activatorEvent:gt,collisions:Lt,droppableContainers:un,scrollAdjustedTranslate:Ie}=ce.current;if(!vt||U.current==null||!gt||!Ie)return;const{onDragOver:ot}=V.current,ke=un.get(yt),ze=ke&&ke.rect.current?{id:ke.id,rect:ke.rect.current,data:ke.data,disabled:ke.disabled}:null,Ge={active:vt,activatorEvent:gt,collisions:Lt,delta:{x:Ie.x,y:Ie.y},over:ze};cr.unstable_batchedUpdates(()=>{ht(ze),ot?.(Ge),O({type:"onDragOver",event:Ge})})},[yt]),qa(()=>{ce.current={activatorEvent:$,active:Y,activeNode:W,collisionRect:De,collisions:je,droppableRects:se,draggableNodes:D,draggingNode:Pe,draggingNodeRect:Me,droppableContainers:F,over:ut,scrollableAncestors:He,scrollAdjustedTranslate:Ke},J.current={initial:Me,translated:De}},[Y,W,je,De,D,Pe,Me,se,F,ut,He,Ke]),YH({...Re,delta:z,draggingRect:De,pointerCoordinates:Ze,scrollableAncestors:He,scrollableAncestorRects:be});const xt=v.useMemo(()=>({active:Y,activeNode:W,activeNodeRect:me,activatorEvent:$,collisions:je,containerNodeRect:ge,dragOverlay:ve,draggableNodes:D,droppableContainers:F,droppableRects:se,over:ut,measureDroppableContainers:j,scrollableAncestors:He,scrollableAncestorRects:be,measuringConfiguration:q,measuringScheduled:B,windowRect:Oe}),[Y,W,me,$,je,ge,ve,D,F,se,ut,j,He,be,q,B,Oe]),$t=v.useMemo(()=>({activatorEvent:$,activators:We,active:Y,activeNodeRect:me,ariaDescribedById:{draggable:X},dispatch:T,draggableNodes:D,over:ut,measureDroppableContainers:j}),[$,We,Y,me,T,X,D,ut,j]);return Ne.createElement(sM.Provider,{value:M},Ne.createElement(Xc.Provider,{value:$t},Ne.createElement(CM.Provider,{value:xt},Ne.createElement(Hp.Provider,{value:Dt},g)),Ne.createElement(fU,{disabled:d?.restoreFocus===!1})),Ne.createElement(mH,{...d,hiddenTextDescribedById:X}));function ft(){const vt=H?.autoScrollEnabled===!1,gt=typeof p=="object"?p.enabled===!1:p===!1,Lt=P&&!vt&&!gt;return typeof p=="object"?{...p,enabled:Lt}:{enabled:Lt}}}),mU=v.createContext(null),AR="button",yU="Draggable";function OM(e){let{id:n,data:a,disabled:o=!1,attributes:s}=e;const u=$c(yU),{activators:c,activatorEvent:d,active:p,activeNodeRect:g,ariaDescribedById:y,draggableNodes:h,over:b}=v.useContext(Xc),{role:S=AR,roleDescription:w="draggable",tabIndex:C=0}=s??{},R=p?.id===n,T=v.useContext(R?Hp:mU),[O,M]=Oh(),[A,N]=Oh(),P=aU(c,n),I=xc(a);qa(()=>(h.set(n,{id:n,key:u,node:O,activatorNode:A,data:I}),()=>{const z=h.get(n);z&&z.key===u&&h.delete(n)}),[h,n]);const D=v.useMemo(()=>({role:S,tabIndex:C,"aria-disabled":o,"aria-pressed":R&&S===AR?!0:void 0,"aria-roledescription":w,"aria-describedby":y.draggable}),[o,S,C,R,w,y.draggable]);return{active:p,activatorEvent:d,activeNodeRect:g,attributes:D,isDragging:R,listeners:o?void 0:P,node:O,over:b,setNodeRef:M,setActivatorNodeRef:N,transform:T}}function MM(){return v.useContext(CM)}const vU="Droppable",bU={timeout:25};function AM(e){let{data:n,disabled:a=!1,id:o,resizeObserverConfig:s}=e;const u=$c(vU),{active:c,dispatch:d,over:p,measureDroppableContainers:g}=v.useContext(Xc),y=v.useRef({disabled:a}),h=v.useRef(!1),b=v.useRef(null),S=v.useRef(null),{disabled:w,updateMeasurementsFor:C,timeout:R}={...bU,...s},T=xc(C??o),O=v.useCallback(()=>{if(!h.current){h.current=!0;return}S.current!=null&&clearTimeout(S.current),S.current=setTimeout(()=>{g(Array.isArray(T.current)?T.current:[T.current]),S.current=null},R)},[R]),M=_p({callback:O,disabled:w||!c}),A=v.useCallback((D,z)=>{M&&(z&&(M.unobserve(z),h.current=!1),D&&M.observe(D))},[M]),[N,P]=Oh(A),I=xc(n);return v.useEffect(()=>{!M||!N.current||(M.disconnect(),h.current=!1,M.observe(N.current))},[N,M]),v.useEffect(()=>(d({type:ar.RegisterDroppable,element:{id:o,key:u,disabled:a,node:N,rect:b,data:I}}),()=>d({type:ar.UnregisterDroppable,key:u,id:o})),[o]),v.useEffect(()=>{a!==y.current.disabled&&(d({type:ar.SetDroppableDisabled,id:o,key:u,disabled:a}),y.current.disabled=a)},[o,u,a,d]),{active:c,rect:b,isOver:p?.id===o,node:N,over:p,setNodeRef:P}}function xU(e){let{animation:n,children:a}=e;const[o,s]=v.useState(null),[u,c]=v.useState(null),d=Mh(a);return!a&&!o&&d&&s(d),qa(()=>{if(!u)return;const p=o?.key,g=o?.props.id;if(p==null||g==null){s(null);return}Promise.resolve(n(g,u)).then(()=>{s(null)})},[n,o,u]),Ne.createElement(Ne.Fragment,null,a,o?v.cloneElement(o,{ref:c}):null)}const SU={x:0,y:0,scaleX:1,scaleY:1};function wU(e){let{children:n}=e;return Ne.createElement(Xc.Provider,{value:EM},Ne.createElement(Hp.Provider,{value:SU},n))}const RU={position:"fixed",touchAction:"none"},EU=e=>Lp(e)?"transform 250ms ease":void 0,CU=v.forwardRef((e,n)=>{let{as:a,activatorEvent:o,adjustScale:s,children:u,className:c,rect:d,style:p,transform:g,transition:y=EU}=e;if(!d)return null;const h=s?g:{...g,scaleX:1,scaleY:1},b={...RU,width:d.width,height:d.height,top:d.top,left:d.left,transform:Di.Transform.toString(h),transformOrigin:s&&o?vH(o,d):void 0,transition:typeof y=="function"?y(o):y,...p};return Ne.createElement(a,{className:c,style:b,ref:n},u)}),TU=e=>n=>{let{active:a,dragOverlay:o}=n;const s={},{styles:u,className:c}=e;if(u!=null&&u.active)for(const[d,p]of Object.entries(u.active))p!==void 0&&(s[d]=a.node.style.getPropertyValue(d),a.node.style.setProperty(d,p));if(u!=null&&u.dragOverlay)for(const[d,p]of Object.entries(u.dragOverlay))p!==void 0&&o.node.style.setProperty(d,p);return c!=null&&c.active&&a.node.classList.add(c.active),c!=null&&c.dragOverlay&&o.node.classList.add(c.dragOverlay),function(){for(const[p,g]of Object.entries(s))a.node.style.setProperty(p,g);c!=null&&c.active&&a.node.classList.remove(c.active)}},OU=e=>{let{transform:{initial:n,final:a}}=e;return[{transform:Di.Transform.toString(n)},{transform:Di.Transform.toString(a)}]},MU={duration:250,easing:"ease",keyframes:OU,sideEffects:TU({styles:{active:{opacity:"0"}}})};function AU(e){let{config:n,draggableNodes:a,droppableContainers:o,measuringConfiguration:s}=e;return Pp((u,c)=>{if(n===null)return;const d=a.get(u);if(!d)return;const p=d.node.current;if(!p)return;const g=RM(c);if(!g)return;const{transform:y}=Ur(c).getComputedStyle(c),h=cM(y);if(!h)return;const b=typeof n=="function"?n:DU(n);return yM(p,s.draggable.measure),b({active:{id:u,data:d.data,node:p,rect:s.draggable.measure(p)},draggableNodes:a,dragOverlay:{node:c,rect:s.dragOverlay.measure(g)},droppableContainers:o,measuringConfiguration:s,transform:h})})}function DU(e){const{duration:n,easing:a,sideEffects:o,keyframes:s}={...MU,...e};return u=>{let{active:c,dragOverlay:d,transform:p,...g}=u;if(!n)return;const y={x:d.rect.left-c.rect.left,y:d.rect.top-c.rect.top},h={scaleX:p.scaleX!==1?c.rect.width*p.scaleX/d.rect.width:1,scaleY:p.scaleY!==1?c.rect.height*p.scaleY/d.rect.height:1},b={x:p.x-y.x,y:p.y-y.y,...h},S=s({...g,active:c,dragOverlay:d,transform:{initial:p,final:b}}),[w]=S,C=S[S.length-1];if(JSON.stringify(w)===JSON.stringify(C))return;const R=o?.({active:c,dragOverlay:d,...g}),T=d.node.animate(S,{duration:n,easing:a,fill:"forwards"});return new Promise(O=>{T.onfinish=()=>{R?.(),O()}})}}let DR=0;function NU(e){return v.useMemo(()=>{if(e!=null)return DR++,DR},[e])}const jU=Ne.memo(e=>{let{adjustScale:n=!1,children:a,dropAnimation:o,style:s,transition:u,modifiers:c,wrapperElement:d="div",className:p,zIndex:g=999}=e;const{activatorEvent:y,active:h,activeNodeRect:b,containerNodeRect:S,draggableNodes:w,droppableContainers:C,dragOverlay:R,over:T,measuringConfiguration:O,scrollableAncestors:M,scrollableAncestorRects:A,windowRect:N}=MM(),P=v.useContext(Hp),I=NU(h?.id),D=TM(c,{activatorEvent:y,active:h,activeNodeRect:b,containerNodeRect:S,draggingNodeRect:R.rect,over:T,overlayNodeRect:R.rect,scrollableAncestors:M,scrollableAncestorRects:A,transform:P,windowRect:N}),z=Xv(b),F=AU({config:o,draggableNodes:w,droppableContainers:C,measuringConfiguration:O}),G=z?R.setRef:void 0;return Ne.createElement(wU,null,Ne.createElement(xU,{animation:F},h&&I?Ne.createElement(CU,{key:I,id:h.id,ref:G,as:d,activatorEvent:y,adjustScale:n,className:p,transition:u,rect:z,style:{zIndex:g,...s},transform:D},a):null))});function Qv(e,n,a){const o=e.slice();return o.splice(a<0?o.length+a:a,0,o.splice(n,1)[0]),o}function IU(e,n){return e.reduce((a,o,s)=>{const u=n.get(o);return u&&(a[s]=u),a},Array(e.length))}function _f(e){return e!==null&&e>=0}function kU(e,n){if(e===n)return!0;if(e.length!==n.length)return!1;for(let a=0;a<e.length;a++)if(e[a]!==n[a])return!1;return!0}function PU(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const DM=e=>{let{rects:n,activeIndex:a,overIndex:o,index:s}=e;const u=Qv(n,o,a),c=n[s],d=u[s];return!d||!c?null:{x:d.left-c.left,y:d.top-c.top,scaleX:d.width/c.width,scaleY:d.height/c.height}},Hf={scaleX:1,scaleY:1},LU=e=>{var n;let{activeIndex:a,activeNodeRect:o,index:s,rects:u,overIndex:c}=e;const d=(n=u[a])!=null?n:o;if(!d)return null;if(s===a){const g=u[c];return g?{x:0,y:a<c?g.top+g.height-(d.top+d.height):g.top-d.top,...Hf}:null}const p=zU(u,s,a);return s>a&&s<=c?{x:0,y:-d.height-p,...Hf}:s<a&&s>=c?{x:0,y:d.height+p,...Hf}:{x:0,y:0,...Hf}};function zU(e,n,a){const o=e[n],s=e[n-1],u=e[n+1];return o?a<n?s?o.top-(s.top+s.height):u?u.top-(o.top+o.height):0:u?u.top-(o.top+o.height):s?o.top-(s.top+s.height):0:0}const NM="Sortable",jM=Ne.createContext({activeIndex:-1,containerId:NM,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:DM,disabled:{draggable:!1,droppable:!1}});function _U(e){let{children:n,id:a,items:o,strategy:s=DM,disabled:u=!1}=e;const{active:c,dragOverlay:d,droppableRects:p,over:g,measureDroppableContainers:y}=MM(),h=$c(NM,a),b=d.rect!==null,S=v.useMemo(()=>o.map(P=>typeof P=="object"&&"id"in P?P.id:P),[o]),w=c!=null,C=c?S.indexOf(c.id):-1,R=g?S.indexOf(g.id):-1,T=v.useRef(S),O=!kU(S,T.current),M=R!==-1&&C===-1||O,A=PU(u);qa(()=>{O&&w&&y(S)},[O,S,w,y]),v.useEffect(()=>{T.current=S},[S]);const N=v.useMemo(()=>({activeIndex:C,containerId:h,disabled:A,disableTransforms:M,items:S,overIndex:R,useDragOverlay:b,sortedRects:IU(S,p),strategy:s}),[C,h,A.draggable,A.droppable,M,S,R,p,b,s]);return Ne.createElement(jM.Provider,{value:N},n)}const HU=e=>{let{id:n,items:a,activeIndex:o,overIndex:s}=e;return Qv(a,o,s).indexOf(n)},UU=e=>{let{containerId:n,isSorting:a,wasDragging:o,index:s,items:u,newIndex:c,previousItems:d,previousContainerId:p,transition:g}=e;return!g||!o||d!==u&&s===c?!1:a?!0:c!==s&&n===p},FU={duration:200,easing:"ease"},IM="transform",BU=Di.Transition.toString({property:IM,duration:0,easing:"linear"}),VU={roleDescription:"sortable"};function qU(e){let{disabled:n,index:a,node:o,rect:s}=e;const[u,c]=v.useState(null),d=v.useRef(a);return qa(()=>{if(!n&&a!==d.current&&o.current){const p=s.current;if(p){const g=Ql(o.current,{ignoreTransform:!0}),y={x:p.left-g.left,y:p.top-g.top,scaleX:p.width/g.width,scaleY:p.height/g.height};(y.x||y.y)&&c(y)}}a!==d.current&&(d.current=a)},[n,a,o,s]),v.useEffect(()=>{u&&c(null)},[u]),u}function YU(e){let{animateLayoutChanges:n=UU,attributes:a,disabled:o,data:s,getNewIndex:u=HU,id:c,strategy:d,resizeObserverConfig:p,transition:g=FU}=e;const{items:y,containerId:h,activeIndex:b,disabled:S,disableTransforms:w,sortedRects:C,overIndex:R,useDragOverlay:T,strategy:O}=v.useContext(jM),M=KU(o,S),A=y.indexOf(c),N=v.useMemo(()=>({sortable:{containerId:h,index:A,items:y},...s}),[h,s,A,y]),P=v.useMemo(()=>y.slice(y.indexOf(c)),[y,c]),{rect:I,node:D,isOver:z,setNodeRef:F}=AM({id:c,data:N,disabled:M.droppable,resizeObserverConfig:{updateMeasurementsFor:P,...p}}),{active:G,activatorEvent:J,activeNodeRect:Y,attributes:U,setNodeRef:H,listeners:L,isDragging:$,over:K,setActivatorNodeRef:V,transform:X}=OM({id:c,data:N,attributes:{...VU,...a},disabled:M.draggable}),ee=rH(F,H),q=!!G,se=q&&!w&&_f(b)&&_f(R),j=!T&&$,B=j&&se?X:null,re=se?B??(d??O)({rects:C,activeNodeRect:Y,activeIndex:b,overIndex:R,index:A}):null,Re=_f(b)&&_f(R)?u({id:c,items:y,activeIndex:b,overIndex:R}):A,le=G?.id,me=v.useRef({activeId:le,items:y,newIndex:Re,containerId:h}),ge=y!==me.current.items,ce=n({active:G,containerId:h,isDragging:$,isSorting:q,id:c,index:A,items:y,newIndex:me.current.newIndex,previousItems:me.current.items,previousContainerId:me.current.containerId,transition:g,wasDragging:me.current.activeId!=null}),Te=qU({disabled:!ce,index:A,node:D,rect:I});return v.useEffect(()=>{q&&me.current.newIndex!==Re&&(me.current.newIndex=Re),h!==me.current.containerId&&(me.current.containerId=h),y!==me.current.items&&(me.current.items=y)},[q,Re,h,y]),v.useEffect(()=>{if(le===me.current.activeId)return;if(le!=null&&me.current.activeId==null){me.current.activeId=le;return}const Pe=setTimeout(()=>{me.current.activeId=le},50);return()=>clearTimeout(Pe)},[le]),{active:G,activeIndex:b,attributes:U,data:N,rect:I,index:A,newIndex:Re,items:y,isOver:z,isSorting:q,isDragging:$,listeners:L,node:D,overIndex:R,over:K,setNodeRef:ee,setActivatorNodeRef:V,setDroppableNodeRef:F,setDraggableNodeRef:H,transform:Te??re,transition:ve()};function ve(){if(Te||ge&&me.current.newIndex===A)return BU;if(!(j&&!Lp(J)||!g)&&(q||ce))return Di.Transition.toString({...g,property:IM})}}function KU(e,n){var a,o;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(a=e?.draggable)!=null?a:n.draggable,droppable:(o=e?.droppable)!=null?o:n.droppable}}function jh(e){if(!e)return!1;const n=e.data.current;return!!(n&&"sortable"in n&&typeof n.sortable=="object"&&"containerId"in n.sortable&&"items"in n.sortable&&"index"in n.sortable)}const GU=[Zt.Down,Zt.Right,Zt.Up,Zt.Left],$U=(e,n)=>{let{context:{active:a,collisionRect:o,droppableRects:s,droppableContainers:u,over:c,scrollableAncestors:d}}=n;if(GU.includes(e.code)){if(e.preventDefault(),!a||!o)return;const p=[];u.getEnabled().forEach(h=>{if(!h||h!=null&&h.disabled)return;const b=s.get(h.id);if(b)switch(e.code){case Zt.Down:o.top<b.top&&p.push(h);break;case Zt.Up:o.top>b.top&&p.push(h);break;case Zt.Left:o.left>b.left&&p.push(h);break;case Zt.Right:o.left<b.left&&p.push(h);break}});const g=SH({collisionRect:o,droppableRects:s,droppableContainers:p});let y=lM(g,"id");if(y===c?.id&&g.length>1&&(y=g[1].id),y!=null){const h=u.get(a.id),b=u.get(y),S=b?s.get(b.id):null,w=b?.node.current;if(w&&S&&h&&b){const R=zp(w).some((P,I)=>d[I]!==P),T=kM(h,b),O=XU(h,b),M=R||!T?{x:0,y:0}:{x:O?o.width-S.width:0,y:O?o.height-S.height:0},A={x:S.left,y:S.top};return M.x&&M.y?A:Sc(A,M)}}}};function kM(e,n){return!jh(e)||!jh(n)?!1:e.data.current.sortable.containerId===n.data.current.sortable.containerId}function XU(e,n){return!jh(e)||!jh(n)||!kM(e,n)?!1:e.data.current.sortable.index<n.data.current.sortable.index}function Lo({className:e,size:n="default",...a}){return x.jsx("div",{"data-slot":"card","data-size":n,className:Qe("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-lg bg-card py-(--card-spacing) text-xs/relaxed text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] *:[img:first-child]:rounded-t-lg *:[img:last-child]:rounded-b-lg",e),...a})}function QU({className:e,...n}){return x.jsx("div",{"data-slot":"card-header",className:Qe("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-lg px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...n})}function ZU({className:e,...n}){return x.jsx("div",{"data-slot":"card-content",className:Qe("px-(--card-spacing)",e),...n})}const PM=v.createContext(void 0);function JU(){const e=v.useContext(PM);if(e===void 0)throw new Error(Rn(63));return e}const WU="data-checked",eF="data-unchecked",LM={...Kl,checked(e){return e?{[WU]:""}:{[eF]:""}}},tF=v.forwardRef(function(n,a){const{checked:o,className:s,defaultChecked:u,"aria-labelledby":c,form:d,id:p,inputRef:g,name:y,nativeButton:h=!1,onCheckedChange:b,readOnly:S=!1,required:w=!1,disabled:C=!1,render:R,uncheckedValue:T,value:O,style:M,...A}=n,{clearErrors:N}=Vc(),{state:P,setTouched:I,setDirty:D,validityData:z,setFilled:F,validationMode:G,disabled:J,name:Y,validation:U}=qo(),{labelId:H}=Cs(),L=J||C,$=Y??y,K=v.useRef(null),V=Xr(K,g,U.inputRef),X=v.useRef(null),ee=qc(L,X),q=Tr(),se=Gl({id:p}),j=h?void 0:se,[B,W]=bs({controlled:o,default:!!u,name:"Switch",state:"checked"});Yc(X,q,B,void 0,!L,y),_e(()=>{F(B)},[B,F]),Yl(B,()=>{N($),D(B!==z.initialValue),U.change(B)});const{getButtonProps:re,buttonRef:Re}=mo({disabled:L,native:h}),le=Hv(c,H,K,!h,j,A["aria-label"]),me={id:h?se:q,role:"switch","aria-checked":B,"aria-readonly":S||void 0,"aria-required":w||void 0,"aria-labelledby":le,onFocus(){ee(!0)},onBlur(){const ve=K.current;!ve||L||(I(!0),ee(!1),G==="onBlur"&&U.commit(ve.checked))},onClick(ve){if(S||L)return;ve.preventDefault();const Pe=K.current;Pe&&hs(Pe,ve)}},ge={...U.getValidationProps(L),checked:B,disabled:L,form:d,id:j,name:$,required:w,style:$?qh:jc,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:V,onChange(ve){if(ve.nativeEvent.defaultPrevented)return;if(S){ve.preventDefault();return}const Pe=ve.currentTarget.checked,Me=dt(_r,ve.nativeEvent);b?.(Pe,Me),!Me.isCanceled&&W(Pe)},onClick(ve){ve.stopPropagation()},onFocus(){X.current?.focus()},...O!==void 0?{value:O}:Gt},ce=v.useMemo(()=>({...P,checked:B,disabled:L,readOnly:S,required:w}),[P,B,L,S,w]),Te=Mt("span",n,{state:ce,ref:[a,X,Re],props:[me,A,re,ve=>U.getValidationProps(L,ve)],stateAttributesMapping:LM});return x.jsxs(PM.Provider,{value:ce,children:[Te,!B&&$&&T!==void 0&&x.jsx("input",{type:"hidden",form:d,name:$,value:T,disabled:L}),x.jsx("input",{...ge,suppressHydrationWarning:!0})]})}),nF=v.forwardRef(function(n,a){const{render:o,className:s,style:u,...c}=n,d=JU();return Mt("span",n,{state:d,ref:a,stateAttributesMapping:LM,props:c})});function rF({className:e,...n}){return x.jsx(tF,{"data-slot":"switch",className:Qe(`
|
|
45
|
-
peer relative inline-flex h-4 w-7 shrink-0 items-center rounded-full
|
|
46
|
-
border border-transparent bg-input p-0.5 transition-colors outline-none
|
|
47
|
-
focus-visible:border-ring focus-visible:ring-2
|
|
48
|
-
focus-visible:ring-ring/30 disabled:cursor-not-allowed
|
|
49
|
-
disabled:opacity-50 data-checked:bg-primary
|
|
50
|
-
`,e),...n,children:x.jsx(nF,{"data-slot":"switch-thumb",className:`
|
|
51
|
-
pointer-events-none block size-3 rounded-full bg-background shadow-sm
|
|
52
|
-
transition-transform data-checked:translate-x-3
|
|
53
|
-
`})})}function aF(e){return`library:${e}`}function zM(e,n){return`assigned:${e}:${n}`}function _M(e){return`agent:${e}`}function oF(e){return String(e).startsWith("assigned:")}function Ny(e){return Zv(e)&&e.type==="library-instruction"&&typeof e.instructionId=="string"}function Nl(e){return Zv(e)&&e.type==="assigned-instruction"&&typeof e.agentId=="string"&&typeof e.instructionId=="string"}function NR(e){return Zv(e)&&e.type==="agent"&&typeof e.agentId=="string"}function Zv(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const iF="data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eOpenAI%3c/title%3e%3cpath%20d='M9.205%208.658v-2.26c0-.19.072-.333.238-.428l4.543-2.616c.619-.357%201.356-.523%202.117-.523%202.854%200%204.662%202.212%204.662%204.566%200%20.167%200%20.357-.024.547l-4.71-2.759a.797.797%200%2000-.856%200l-5.97%203.473zm10.609%208.8V12.06c0-.333-.143-.57-.429-.737l-5.97-3.473%201.95-1.118a.433.433%200%2001.476%200l4.543%202.617c1.309.76%202.189%202.378%202.189%203.948%200%201.808-1.07%203.473-2.76%204.163zM7.802%2012.703l-1.95-1.142c-.167-.095-.239-.238-.239-.428V5.899c0-2.545%201.95-4.472%204.591-4.472%201%200%201.927.333%202.712.928L8.23%205.067c-.285.166-.428.404-.428.737v6.898zM12%2015.128l-2.795-1.57v-3.33L12%208.658l2.795%201.57v3.33L12%2015.128zm1.796%207.23c-1%200-1.927-.332-2.712-.927l4.686-2.712c.285-.166.428-.404.428-.737v-6.898l1.974%201.142c.167.095.238.238.238.428v5.233c0%202.545-1.974%204.472-4.614%204.472zm-5.637-5.303l-4.544-2.617c-1.308-.761-2.188-2.378-2.188-3.948A4.482%204.482%200%20014.21%206.327v5.423c0%20.333.143.571.428.738l5.947%203.449-1.95%201.118a.432.432%200%2001-.476%200zm-.262%203.9c-2.688%200-4.662-2.021-4.662-4.519%200-.19.024-.38.047-.57l4.686%202.71c.286.167.571.167.856%200l5.97-3.448v2.26c0%20.19-.07.333-.237.428l-4.543%202.616c-.619.357-1.356.523-2.117.523zm5.899%202.83a5.947%205.947%200%20005.827-4.756C22.287%2018.339%2024%2015.84%2024%2013.296c0-1.665-.713-3.282-1.998-4.448.119-.5.19-.999.19-1.498%200-3.401-2.759-5.947-5.946-5.947-.642%200-1.26.095-1.88.31A5.962%205.962%200%200010.205%200a5.947%205.947%200%2000-5.827%204.757C1.713%205.447%200%207.945%200%2010.49c0%201.666.713%203.283%201.998%204.448-.119.5-.19%201-.19%201.499%200%203.401%202.759%205.946%205.946%205.946.642%200%201.26-.095%201.88-.309a5.96%205.96%200%20004.162%201.713z'%3e%3c/path%3e%3c/svg%3e",sF="data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eClaude%20Code%3c/title%3e%3cpath%20clip-rule='evenodd'%20d='M20.998%2010.949H24v3.102h-3v3.028h-1.487V20H18v-2.921h-1.487V20H15v-2.921H9V20H7.488v-2.921H6V20H4.487v-2.921H3V14.05H0V10.95h3V5h17.998v5.949zM6%2010.949h1.488V8.102H6v2.847zm10.51%200H18V8.102h-1.49v2.847z'%20fill='%23D97757'%20fill-rule='evenodd'%3e%3c/path%3e%3c/svg%3e",lF=new Map([["openai",{src:iF,className:"dark:invert"}],["claudecode",{src:sF}]]);function uF({icon:e,className:n}){const a=lF.get(e);return x.jsx("div",{"aria-hidden":"true",className:Qe(`
|
|
54
|
-
flex size-8 shrink-0 items-center justify-center rounded-md bg-muted
|
|
55
|
-
text-foreground
|
|
56
|
-
`,n),children:a?x.jsx("img",{src:a.src,alt:"",draggable:!1,className:Qe("size-4",a.className)}):x.jsx(vC,{className:"size-4"})})}function cF({agent:e,instructionsById:n,isInstructionsLoading:a,isPending:o,isReapplying:s,onRemoveInstruction:u,onToggle:c,onReapply:d,onOpenFile:p}){const{t:g}=sn(),{isOver:y,setNodeRef:h}=AM({id:_M(e.id),data:{type:"agent",agentId:e.id},disabled:o}),b=e.enabled||e.instructionIds.length>0,S=e.enabled?g("agents.reapplyHint"):g("agents.reapplyDisabledHint"),w=g(b?e.enabled?"agents.toggleOnHint":"agents.toggleOffHint":"agents.enableRequiresInstruction");return x.jsxs(Lo,{"data-agent-id":e.id,ref:h,className:Qe("gap-0 py-0 transition-shadow",y&&"ring-2 ring-ring/40"),children:[x.jsxs("div",{className:"flex items-center gap-3 p-3",children:[x.jsx(uF,{icon:e.icon}),x.jsxs("div",{className:"min-w-0 flex-1",children:[x.jsx("div",{className:"truncate text-sm font-medium",children:e.name}),x.jsx("button",{type:"button",className:`
|
|
57
|
-
block max-w-full truncate font-mono text-[11px]
|
|
58
|
-
text-muted-foreground
|
|
59
|
-
hover:text-foreground hover:underline
|
|
60
|
-
`,"aria-label":g("agents.openFileAria",{name:e.name}),onClick:()=>{p(e.id)},children:e.instructionFile})]}),x.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[x.jsxs(mh,{children:[x.jsx(yh,{render:x.jsx("span",{className:"inline-flex"}),children:x.jsx(Jt,{type:"button",variant:"ghost",size:"icon","aria-label":g("agents.reapplyAria",{name:e.name}),disabled:o||!e.enabled,onClick:()=>{d(e.id)},children:x.jsx(rP,{className:Qe(s&&"animate-spin")})})}),x.jsx(vh,{children:S})]}),x.jsxs(mh,{children:[x.jsx(yh,{render:x.jsx("span",{className:"inline-flex"}),children:x.jsx(rF,{checked:e.enabled,disabled:o||!b,"aria-label":g("agents.toggleAria",{name:e.name}),onCheckedChange:C=>{c(e.id,C)}})}),x.jsx(vh,{children:w})]})]})]}),x.jsx("div",{className:"border-t border-border/60 p-3",children:e.instructionIds.length===0?x.jsx("div",{className:`
|
|
61
|
-
flex min-h-20 items-center justify-center rounded-md border
|
|
62
|
-
border-dashed border-border px-4 text-center text-xs
|
|
63
|
-
text-muted-foreground
|
|
64
|
-
`,children:g("agents.emptyAssigned")}):x.jsx(_U,{items:e.instructionIds.map(C=>zM(e.id,C)),strategy:LU,children:x.jsx("ol",{className:"flex flex-col gap-1",children:e.instructionIds.map((C,R)=>{const T=n.get(C),O=T?.name??C;return x.jsx(dF,{agentId:e.id,index:R,instructionId:C,instructionName:a&&!T?g("agents.loadingInstruction"):O,isPending:o,onRemove:u},C)})})})})]})}function dF({agentId:e,index:n,instructionId:a,instructionName:o,isPending:s,onRemove:u}){const{t:c}=sn(),{attributes:d,isDragging:p,isOver:g,listeners:y,setNodeRef:h,transform:b,transition:S}=YU({id:zM(e,a),animateLayoutChanges:()=>!1,data:{type:"assigned-instruction",agentId:e,instructionId:a},disabled:s});return x.jsxs("li",{...d,...y,ref:h,"data-instruction-id":a,style:{transform:Di.Transform.toString(b),transition:S},className:Qe(`
|
|
65
|
-
group flex items-center gap-2 rounded-md border border-transparent
|
|
66
|
-
bg-muted/40 px-2 py-1.5
|
|
67
|
-
`,g&&"border-ring bg-muted",p&&"z-10",s?"cursor-default":`
|
|
68
|
-
cursor-grab
|
|
69
|
-
active:cursor-grabbing
|
|
70
|
-
`),children:[x.jsx(cv,{"aria-hidden":"true",className:`
|
|
71
|
-
size-3.5 shrink-0 text-muted-foreground
|
|
72
|
-
group-active:cursor-grabbing
|
|
73
|
-
`}),x.jsx("span",{className:`
|
|
74
|
-
w-4 shrink-0 text-center font-mono text-[10px] text-muted-foreground
|
|
75
|
-
`,children:n+1}),x.jsx("span",{className:"min-w-0 flex-1 truncate text-xs",children:o}),x.jsx(Jt,{type:"button",variant:"ghost",size:"icon","aria-label":c("agents.removeInstructionAria",{name:o}),disabled:s,onClick:()=>{u(e,a)},onKeyDown:w=>{w.stopPropagation()},onPointerDown:w=>{w.stopPropagation()},children:x.jsx(Rs,{})})]})}const HM="/api/agents";class UM extends Error{constructor(n,a){super(a),this.code=n,this.name="AgentApiError"}code}function fF(e){return Qc(HM,{signal:e})}function hF(e,n){return Qc(Up(e,"instructions"),{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({instructionIds:n})})}function pF(e,n){return Qc(Up(e,"enabled"),{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({enabled:n})})}function gF(e){return Qc(Up(e,"reapply"),{method:"POST"})}function mF(e){return Qc(Up(e,"open-file"),{method:"POST"})}function Up(e,n){return`${HM}/${encodeURIComponent(e)}/${n}`}async function Qc(e,n){const a=await fetch(e,n);if(!a.ok){const o=await yF(a);throw new UM(o.code,o.message)}return a.json()}async function yF(e){try{const n=await e.json();return{code:n.error?.code??"AGENT_REQUEST_FAILED",message:n.error?.message??`Request failed with status ${e.status}`}}catch{return{code:"AGENT_REQUEST_FAILED",message:`Request failed with status ${e.status}`}}}const kr=["agents"],Uf=["agents","update"];function vF(){const{t:e}=sn(),n=Bo(),a=hp({queryKey:kr,queryFn:({signal:h})=>fF(h),retry:!1});function o(h){n.setQueryData(kr,b=>b?.map(S=>S.id===h.id?h:S))}const s=Ma({mutationKey:Uf,mutationFn:({agentId:h,instructionIds:b})=>hF(h,b),onMutate:async({previous:h})=>(await n.cancelQueries({queryKey:kr}),{previous:h}),onError:(h,b,S)=>{S?.previous&&n.setQueryData(kr,S.previous),_n.error(e("agents.updateError"))},onSuccess:o,onSettled:()=>n.invalidateQueries({queryKey:kr})}),u=Ma({mutationKey:Uf,mutationFn:({agentId:h,enabled:b})=>pF(h,b),onMutate:async({agentId:h,enabled:b})=>{await n.cancelQueries({queryKey:kr});const S=n.getQueryData(kr);return n.setQueryData(kr,w=>w?.map(C=>C.id===h?{...C,enabled:b}:C)),{previous:S}},onError:(h,b,S)=>{S?.previous&&n.setQueryData(kr,S.previous),_n.error(e("agents.enableError"))},onSuccess:h=>{o(h),_n.success(e(h.enabled?"agents.applied":"agents.removed"))},onSettled:()=>n.invalidateQueries({queryKey:kr})}),c=Ma({mutationKey:Uf,mutationFn:h=>gF(h),onSuccess:h=>{o(h),_n.success(e("agents.reapplied"))},onError:()=>{_n.error(e("agents.reapplyError"))},onSettled:()=>n.invalidateQueries({queryKey:kr})}),d=Ma({mutationKey:Uf,mutationFn:h=>mF(h),onError:h=>{_n.error(e(h instanceof UM&&h.code==="AGENT_FILE_NOT_FOUND"?"agents.fileMissing":"agents.openFileError"))}}),p=[s,u,c,d],g=new Set;for(const h of p){if(!h.isPending)continue;const b=bF(h.variables);b&&g.add(b)}const y=new Set(c.isPending&&typeof c.variables=="string"?[c.variables]:[]);return{agents:a.data??[],isLoading:a.isPending,isError:a.isError&&a.data===void 0,retry:a.refetch,pendingAgentIds:g,reapplyingAgentIds:y,updateInstructions:(h,b)=>{const S=n.getQueryData(kr);n.setQueryData(kr,w=>w?.map(C=>C.id===h?{...C,instructionIds:b,enabled:b.length>0&&C.enabled}:C)),s.mutate({agentId:h,instructionIds:b,previous:S})},setEnabled:(h,b)=>{u.mutate({agentId:h,enabled:b})},reapply:h=>{c.mutate(h)},openFile:h=>{d.mutate(h)}}}function bF(e){if(typeof e=="string")return e;if(e&&typeof e=="object"&&"agentId"in e){const n=e.agentId;return typeof n=="string"?n:void 0}}const Jv="/api/instructions";class FM extends Error{constructor(n,a){super(a),this.code=n,this.name="InstructionApiError"}code}function xF(e){return Wv(Jv,{signal:e})}function SF(e){return Wv(Jv,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)})}function wF(e,n){return Wv(BM(e),{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(n)})}async function RF(e){const n=await fetch(BM(e),{method:"DELETE"});if(n.ok)return;const a=await VM(n);throw new FM(a.code,a.message)}async function Wv(e,n){const a=await fetch(e,n);if(!a.ok){const o=await VM(a);throw new FM(o.code,o.message)}return a.json()}function BM(e){return`${Jv}/${encodeURIComponent(e)}`}async function VM(e){try{const n=await e.json();return{code:n.error?.code??"INSTRUCTION_REQUEST_FAILED",message:n.error?.message??`Request failed with status ${e.status}`}}catch{return{code:"INSTRUCTION_REQUEST_FAILED",message:`Request failed with status ${e.status}`}}}function EF({className:e,description:n,icon:a,title:o}){let s=null;return n!=null&&(s=x.jsx("p",{className:"max-w-64 text-xs/relaxed text-muted-foreground",children:n})),x.jsxs("div",{"data-slot":"empty",className:Qe("flex flex-col items-center gap-2 px-4 py-10 text-center",e),children:[a&&x.jsx("div",{className:`
|
|
76
|
-
flex size-8 items-center justify-center rounded-md bg-muted
|
|
77
|
-
text-muted-foreground
|
|
78
|
-
`,children:x.jsx(a,{"aria-hidden":"true",className:"size-4"})}),x.jsx("div",{className:"text-sm font-medium",children:o}),s]})}function CF(e){const[n,a]=v.useState({getBoundingClientRect(){return DOMRect.fromRect({width:0,height:0,x:0,y:0})}}),o=v.useRef(null),s=v.useRef(null),u=v.useRef(null),c=v.useRef(null),d=v.useRef(!0),p=v.useRef(null),g=Ul(),y=v.useMemo(()=>({anchor:n,setAnchor:a,actionsRef:u,backdropRef:o,internalBackdropRef:s,positionerRef:c,allowMouseUpTriggerRef:d,initialCursorPointRef:p,rootId:g}),[n,g]);return x.jsx(cO.Provider,{value:y,children:x.jsx(Sp.Provider,{value:void 0,children:x.jsx(NO,{...e})})})}const jR=500,TF=v.forwardRef(function(n,a){const{render:o,className:s,style:u,...c}=n,{setAnchor:d,actionsRef:p,internalBackdropRef:g,backdropRef:y,positionerRef:h,allowMouseUpTriggerRef:b,initialCursorPointRef:S,rootId:w}=wp(!1),{store:C}=Vo(!1),R=C.useState("open"),T=C.useState("disabled"),O=v.useRef(null),M=v.useRef(null),A=Hn(),N=Hn(),P=v.useRef(!1),I=v.useRef(null);function D(H,L,$){const K=$.type.startsWith("touch");S.current={x:H,y:L},d({getBoundingClientRect(){return DOMRect.fromRect({width:K?10:0,height:K?10:0,x:H,y:L})}}),P.current=!1,p.current?.setOpen(!0,dt(Va,$)),N.start(jR,()=>{P.current=!0})}function z(H){if(T)return;b.current=!0,Fa(H),D(H.clientX,H.clientY,H.nativeEvent);const L=Kt(O.current);I.current?.abort();const $=new AbortController;I.current=$,L.addEventListener("mouseup",K=>{if(b.current=!1,!P.current)return;N.clear(),P.current=!1;const V=tr(K);at(h.current,V)||w&&V&&zv(V)===w||p.current?.setOpen(!1,dt(Ky,K))},{once:!0,signal:$.signal})}function F(){A.clear(),M.current=null}function G(H){if(T){F();return}if(b.current=!1,H.touches.length!==1){F();return}H.stopPropagation();const L=H.touches[0],$={x:L.clientX,y:L.clientY};M.current=$,A.start(jR,()=>{D($.x,$.y,H.nativeEvent)})}function J(H){if(H.touches.length!==1){F();return}if(A.isStarted()&&M.current){const L=H.touches[0],$=10,K=Math.abs(L.clientX-M.current.x),V=Math.abs(L.clientY-M.current.y);(K>$||V>$)&&F()}}return v.useEffect(()=>()=>{I.current?.abort()},[]),v.useEffect(()=>{function H($){if(T)return;const V=tr($);(at(O.current,V)||at(g.current,V)||at(y.current,V))&&$.preventDefault()}const L=Kt(O.current);return It(L,"contextmenu",H)},[y,T,g]),Mt("div",n,{state:{open:R},ref:[O,a],props:[{onContextMenu:z,onTouchStart:G,onTouchMove:J,onTouchEnd:F,onTouchCancel:F,style:{WebkitTouchCallout:"none"}},c],stateAttributesMapping:rh})}),OF=CO;function MF({...e}){return x.jsx(CF,{"data-slot":"context-menu",...e})}function AF({className:e,...n}){return x.jsx(TF,{"data-slot":"context-menu-trigger",className:Qe("select-none",e),...n})}function DF({className:e,align:n="start",alignOffset:a=4,side:o="right",sideOffset:s=0,...u}){return x.jsx(SO,{children:x.jsx(OF,{className:"isolate z-50 outline-none",align:n,alignOffset:a,side:o,sideOffset:s,children:x.jsx(bO,{"data-slot":"context-menu-content",className:Qe("z-50 max-h-(--available-height) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...u})})})}function NF({className:e,inset:n,variant:a="default",...o}){return x.jsx(yO,{"data-slot":"context-menu-item","data-inset":n,"data-variant":a,className:Qe("group/context-menu-item relative flex min-h-7 cursor-default items-center gap-2 rounded-md px-2 py-1 text-xs/relaxed outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 data-[variant=destructive]:*:[svg]:text-destructive",e),...o})}const qM=v.createContext(void 0);function Fp(e){const n=v.useContext(qM);if(n===void 0&&!e)throw new Error(Rn(47));return n}const jF={...Po,disabled:e=>e.disabled,instantType:e=>e.instantType==="trigger-change"&&!Po.open(e)?void 0:e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,isPressOpenedByTrigger:(e,n)=>e.openChangeReason===Va&&Po.isOpenedByTrigger(e,n),isTouchPressOpen:(e,n)=>n&&e.openMethod==="touch"&&e.openChangeReason===Va,hasTriggerFocusGuards:(e,n)=>Po.isOpenedByTrigger(e,n)&&!e.focusManagerModal,modal:e=>e.modal,titleElementId:e=>e.titleElementId,descriptionElementId:e=>e.descriptionElementId,openOnHover:e=>e.openOnHover,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin};class IF extends Fl{constructor(n,a,o){const s=new Pc;super(kF(n,s,a,o),PF(s),jF)}setOpen=(n,a)=>{const o=a.reason===qn,s=a.reason===Va&&a.event.detail===0,u=!n&&(a.reason===Dc||a.reason==null),c=Wh(a),d=this.select("activeTriggerId");if(!n&&a.reason===WR&&a.trigger==null&&d!=null&&(a.trigger=this.context.triggerElements.getById(d)??this.select("activeTriggerElement")??void 0),this.context.onOpenChange?.(n,a),a.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(n,a);const p=()=>{const y=Jh(this.state,n,a.trigger,c());y.openChangeReason=a.reason,this.update(y)};o?(this.context.stickIfOpen=!0,this.context.stickIfOpenTimeout.start(CE,()=>{this.context.stickIfOpen=!1}),cr.flushSync(p)):p();let g;s?g="click":u?g="dismiss":a.reason===Ti&&(g="focus"),this.set("instantType",g)}}function kF(e,n,a,o=!1){const s={...ap(n,a,o),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,openOnHover:!1,closeDelay:0,adaptiveOrigin:void 0,...e};return s.open&&e?.mounted===void 0&&(s.mounted=!0),s}function PF(e){return{popupRef:v.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:v.createRef(),beforeTriggerFocusGuardRef:v.createRef(),beforeContentFocusGuardRef:v.createRef(),stickIfOpenTimeout:new Da,stickIfOpen:!0,triggerElements:e}}const IR=Cc(function({props:n}){const{children:a,open:o,defaultOpen:s=!1,onOpenChange:u,onOpenChangeComplete:c,modal:d=!1,handle:p,triggerId:g,defaultTriggerId:y=null}=n,h=zF(p,{modal:d,open:s,openProp:o,activeTriggerId:y,triggerIdProp:g});h.useControlledProp("openProp",o),h.useControlledProp("triggerIdProp",g);const b=h.useState("open"),S=h.useState("mounted"),w=h.useState("payload");h.useContextCallback("onOpenChange",u),h.useContextCallback("onOpenChangeComplete",c),UE(h,b),ep(h);const{forceUnmount:C}=tp(b,h,()=>{h.context.stickIfOpen=!0,h.set("openChangeReason",null)});h.useSyncedValues({modal:d}),v.useEffect(()=>{b||h.context.stickIfOpenTimeout.clear()},[h,b]),v.useImperativeHandle(n.actionsRef,()=>({unmount:C,close:()=>h.setOpen(!1,dt(Nc))}),[C,h]);const R=b||S||p!=null;return x.jsxs(qM.Provider,{value:h,children:[p&&x.jsx(Zh,{handle:p,store:h}),R&&x.jsx(_F,{store:h,modal:d}),typeof a=="function"?a({payload:w}):a]})});function LF(e){return Fp(!0)?x.jsx(IR,{props:e}):x.jsx(kE,{children:x.jsx(IR,{props:e})})}function zF(e,n){const a=ov((o,s)=>new IF(n,o,s));return v.useEffect(()=>a.context.stickIfOpenTimeout.disposeEffect(),[a]),a}function _F({store:e,modal:n}){const a=e.useState("floatingRootContext"),o=Ic(a,{outsidePressEvent:{mouse:n==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),s=o.reference,u=o.floating;return np(e,{activeTriggerProps:s,inactiveTriggerProps:s,popupProps:u}),null}const YM=v.createContext(void 0);function HF(){const e=v.useContext(YM);if(e===void 0)throw new Error(Rn(45));return e}const UF=v.forwardRef(function(n,a){const{keepMounted:o=!1,...s}=n;return Fp().useState("mounted")||o?x.jsx(YM.Provider,{value:o,children:x.jsx($h,{ref:a,...s})}):null}),KM=v.createContext(void 0);function FF(){const e=v.useContext(KM);if(!e)throw new Error(Rn(46));return e}const BF=v.forwardRef(function(n,a){const{render:o,className:s,style:u,anchor:c,positionMethod:d,side:p,align:g,sideOffset:y,alignOffset:h,collisionBoundary:b="clipping-ancestors",collisionPadding:S,arrowPadding:w,sticky:C,disableAnchorTracking:R=!1,collisionAvoidance:T=tv,...O}=n,M=Fp(),A=HF(),N=rv(),P=M.useState("floatingRootContext"),I=M.useState("mounted"),D=M.useState("open"),z=M.useState("openChangeReason"),F=M.useState("activeTriggerElement"),G=M.useState("modal"),J=M.useState("openMethod"),Y=M.useState("positionerElement"),U=M.useState("instantType"),H=M.useState("transitionStatus"),L=M.useState("adaptiveOrigin"),$=lp({anchor:c,floatingRootContext:P,positionMethod:d,mounted:I,side:p,sideOffset:y,align:g,alignOffset:h,arrowPadding:w,collisionBoundary:b,collisionPadding:S,sticky:C,disableAnchorTracking:R,keepMounted:A,nodeId:N,collisionAvoidance:T,adaptiveOrigin:L}),K=P.useState("domReferenceElement");RO({store:M,domReference:K,positionerElement:Y,open:D});const V=G===!0&&z!==qn;Lv(D&&V,J==="touch",Y,F);const X=M.useStateSetter("positionerElement"),ee={open:D,side:$.side,align:$.align,anchorHidden:$.anchorHidden,instant:U},q=up(n,ee,{styles:$.positionerStyles,transitionStatus:H,props:O,refs:[a,X],hidden:!I,inert:!D});return x.jsxs(KM.Provider,{value:$,children:[I&&V&&x.jsx(Cp,{inert:cp(!D),cutout:F}),x.jsx(IE,{id:N,children:q})]})}),VF=v.createContext(void 0);function qF(){const[e,n]=v.useState(0),a=Be(()=>(n(s=>s+1),()=>{n(s=>Math.max(0,s-1))}));return{context:v.useMemo(()=>({register:a}),[a]),hasClosePart:e>0}}const YF=v.forwardRef(function(n,a){const{render:o,className:s,style:u,initialFocus:c,finalFocus:d,...p}=n,g=Fp(),y=FF(),h=kv()!=null,{context:b,hasClosePart:S}=qF(),w=g.useState("open"),C=g.useState("openMethod"),R=g.useState("instantType"),T=g.useState("transitionStatus"),O=g.useState("popupProps"),M=g.useState("titleElementId"),A=g.useState("descriptionElementId"),N=g.useState("modal"),P=g.useState("mounted"),I=g.useState("openChangeReason"),D=g.useState("activeTriggerElement"),z=g.useState("floatingRootContext"),F=z.useState("floatingId"),G=g.useState("disabled"),J=g.useState("openOnHover"),Y=g.useState("closeDelay");ja({open:w,ref:g.context.popupRef,onComplete(){w&&g.context.onOpenChangeComplete?.(!0)}}),lv(z,{enabled:J&&!G,closeDelay:Y});const U=c===void 0?_E(g.context.popupRef):c,H=N!==!1&&S;g.useSyncedValue("focusManagerModal",H);const L=g.useStateSetter("popupElement"),$={open:w,side:y.side,align:y.align,instant:R,transitionStatus:T},K=Mt("div",n,{state:$,ref:[a,g.context.popupRef,L],props:[O,{id:F,role:"dialog",...kc,"aria-labelledby":M,"aria-describedby":A,onKeyDown(V){h&&Bc.has(V.key)&&V.stopPropagation()}},Lc(T),p],stateAttributesMapping:Bh});return x.jsx(Xh,{context:z,openInteractionType:C,modal:H,disabled:!P||I===qn,initialFocus:U,returnFocus:d,restoreFocus:"popup",getInsideElements:()=>[g.context.beforeTriggerFocusGuardRef.current],previousFocusableElement:yn(D)?D:void 0,nextFocusableElement:g.context.triggerFocusTargetRef,beforeContentFocusGuardRef:g.context.beforeContentFocusGuardRef,children:x.jsx(VF.Provider,{value:b,children:K})})});function KF({...e}){return x.jsx(LF,{"data-slot":"popover",...e})}function GF({anchor:e,align:n="center",alignOffset:a=0,side:o="bottom",sideOffset:s=4,className:u,...c}){return x.jsx(UF,{children:x.jsx(BF,{anchor:e,className:"isolate z-50 outline-none",align:n,alignOffset:a,side:o,sideOffset:s,children:x.jsx(YF,{"data-slot":"popover-content",className:Qe("z-50 w-72 origin-(--transform-origin) rounded-lg bg-popover p-4 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",u),...c})})})}function $F({instructions:e,isLoading:n,isError:a,onRetry:o,onEdit:s,onDelete:u,onPreload:c}){const{t:d}=sn(),[p,g]=v.useState(null);return n?x.jsx(Lo,{className:"gap-0 py-0",children:x.jsx("div",{className:"divide-y",children:[0,1,2].map(y=>x.jsxs("div",{className:"flex items-center gap-2 p-3",children:[x.jsx(ca,{className:"size-3.5 rounded-sm"}),x.jsx(ca,{className:"h-4 w-2/3"})]},y))})}):a?x.jsxs(Lo,{className:"items-start gap-3 p-4",children:[x.jsx("p",{className:"text-xs text-muted-foreground",children:d("instructions.loadError")}),x.jsxs(Jt,{type:"button",variant:"outline",onClick:o,children:[x.jsx(tT,{}),x.jsx("span",{children:d("common.retry")})]})]}):e.length===0?x.jsx(Lo,{className:"gap-0 py-0",children:x.jsx(EF,{icon:qk,title:d("instructions.emptyTitle"),description:d("instructions.emptyDescription")})}):x.jsxs(Lo,{className:"gap-0 py-0",children:[x.jsx("ul",{"aria-label":d("instructions.listAria"),className:"divide-y",children:e.map(y=>x.jsx(XF,{instruction:y,onRequestDelete:h=>{g({anchor:h,instruction:y})},onEdit:()=>{s(y)},onPreload:c},y.id))}),x.jsx(KF,{open:p!==null,onOpenChange:y=>{y||g(null)},children:x.jsxs(GF,{anchor:p?.anchor,side:"bottom",align:"start",sideOffset:6,className:"w-64 p-3",children:[x.jsxs("div",{className:"flex flex-col gap-1",children:[x.jsx("div",{className:"text-xs font-medium",children:d("instructions.deleteConfirmTitle")}),x.jsx("p",{className:"text-xs/relaxed text-muted-foreground",children:d("instructions.deleteConfirmDescription",{name:p?.instruction.name??""})})]}),x.jsxs("div",{className:"mt-3 flex justify-end gap-2",children:[x.jsx(Jt,{type:"button",variant:"ghost",onClick:()=>{g(null)},children:d("common.cancel")}),x.jsx(Jt,{type:"button",variant:"destructive",onClick:()=>{if(!p)return;const{instruction:y}=p;g(null),u(y)},children:d("instructions.delete")})]})]})})]})}function XF({instruction:e,onEdit:n,onPreload:a,onRequestDelete:o}){const{t:s}=sn(),u=v.useRef(null),{attributes:c,isDragging:d,listeners:p,setNodeRef:g}=OM({id:aF(e.id),data:{type:"library-instruction",instructionId:e.id}});function y(){const h=u.current;h&&o(h)}return x.jsxs(MF,{children:[x.jsxs(AF,{ref:h=>{u.current=h,g(h)},render:x.jsx("li",{...p,"data-instruction-id":e.id,className:Qe(`
|
|
79
|
-
group flex cursor-grab items-center gap-2 py-2.5 pr-1 pl-3
|
|
80
|
-
hover:bg-muted/40
|
|
81
|
-
active:cursor-grabbing
|
|
82
|
-
`,d&&"opacity-40")}),children:[x.jsx(cv,{"aria-hidden":"true",className:"size-3.5 shrink-0 text-muted-foreground"}),x.jsx("button",{...c,type:"button",className:`
|
|
83
|
-
flex min-w-0 flex-1 cursor-grab items-center gap-2 text-left text-xs
|
|
84
|
-
outline-none
|
|
85
|
-
focus-visible:underline focus-visible:underline-offset-3
|
|
86
|
-
active:cursor-grabbing
|
|
87
|
-
`,onClick:n,onFocus:a,onPointerEnter:a,children:x.jsx("span",{className:"min-w-0 flex-1 truncate",children:e.name})}),x.jsxs(Op,{children:[x.jsx(Mp,{render:x.jsx(Jt,{type:"button",variant:"ghost",size:"icon","aria-label":s("instructions.actionsAria",{name:e.name}),className:`
|
|
88
|
-
-my-1.5 shrink-0 text-muted-foreground opacity-0
|
|
89
|
-
transition-opacity
|
|
90
|
-
group-hover:opacity-100
|
|
91
|
-
focus-visible:opacity-100
|
|
92
|
-
data-popup-open:opacity-100
|
|
93
|
-
[@media(hover:none)]:opacity-100
|
|
94
|
-
`,onKeyDown:h=>{h.stopPropagation()},onMouseDown:h=>{h.stopPropagation()},onPointerDown:h=>{h.stopPropagation()},onTouchStart:h=>{h.stopPropagation()}}),children:x.jsx(Fk,{})}),x.jsx(Ap,{align:"end",className:"w-40",children:x.jsx(kR,{Item:Rh,onDelete:y,onEdit:n})})]})]}),x.jsx(DF,{children:x.jsx(kR,{Item:NF,onDelete:y,onEdit:n})})]})}function kR({Item:e,onEdit:n,onDelete:a}){const{t:o}=sn();return x.jsxs(x.Fragment,{children:[x.jsxs(e,{onClick:n,children:[x.jsx(nP,{}),x.jsx("span",{children:o("instructions.edit")})]}),x.jsxs(e,{variant:"destructive",onClick:a,children:[x.jsx(lP,{}),x.jsx("span",{children:o("instructions.delete")})]})]})}function GM({className:e,...n}){return x.jsx("label",{"data-slot":"label",className:Qe("flex items-center gap-2 text-xs/relaxed leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...n})}function Hl({children:e,className:n,...a}){return x.jsxs(GM,{className:Qe("gap-1",n),...a,children:[e,x.jsx("span",{"aria-hidden":"true",className:"text-destructive",children:"*"})]})}function Bp({...e}){return x.jsx(QO,{"data-slot":"dialog",...e})}function QF({...e}){return x.jsx(XO,{"data-slot":"dialog-portal",...e})}function eb({...e}){return x.jsx(Np,{"data-slot":"dialog-close",...e})}function ZF({className:e,...n}){return x.jsx(YO,{"data-slot":"dialog-overlay",className:Qe("fixed inset-0 isolate z-50 bg-black/80 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...n})}function Vp({className:e,children:n,showCloseButton:a=!0,...o}){return x.jsxs(QF,{children:[x.jsx(ZF,{}),x.jsxs($O,{"data-slot":"dialog-content",className:Qe("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-xs/relaxed text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...o,children:[n,a&&x.jsxs(Np,{"data-slot":"dialog-close",render:x.jsx(Jt,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm"}),children:[x.jsx(Rs,{}),x.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function qp({className:e,...n}){return x.jsx("div",{"data-slot":"dialog-header",className:Qe("flex flex-col gap-1",e),...n})}function Yp({className:e,showCloseButton:n=!1,children:a,...o}){return x.jsxs("div",{"data-slot":"dialog-footer",className:Qe("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...o,children:[a,n&&x.jsx(Np,{render:x.jsx(Jt,{variant:"outline"}),children:"Close"})]})}function Kp({className:e,...n}){return x.jsx(ZO,{"data-slot":"dialog-title",className:Qe("font-heading text-sm font-medium",e),...n})}function tb({className:e,...n}){return x.jsx(KO,{"data-slot":"dialog-description",className:Qe("text-xs/relaxed text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...n})}const Rc=["instructions"];function JF(){const e=hp({queryKey:Rc,queryFn:({signal:n})=>xF(n),retry:!1});return{instructions:e.data??[],isLoading:e.isPending,isError:e.isError&&e.data===void 0,retry:e.refetch}}const WF="modulepreload",e7=function(e){return"/"+e},PR={},t7=function(n,a,o){let s=Promise.resolve();if(a&&a.length>0){let p=function(g){return Promise.all(g.map(y=>Promise.resolve(y).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),d=c?.nonce||c?.getAttribute("nonce");s=p(a.map(g=>{if(g=e7(g),g in PR)return;PR[g]=!0;const y=g.endsWith(".css"),h=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${h}`))return;const b=document.createElement("link");if(b.rel=y?"stylesheet":WF,y||(b.as="script"),b.crossOrigin="",b.href=g,d&&b.setAttribute("nonce",d),document.head.appendChild(b),y)return new Promise((S,w)=>{b.addEventListener("load",S),b.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${g}`)))})}))}function u(c){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=c,window.dispatchEvent(d),!d.defaultPrevented)throw c}return s.then(c=>{for(const d of c||[])d.status==="rejected"&&u(d.reason);return n().catch(u)})},$M=()=>t7(()=>import("./markdown-editor-DON6nMR6.js"),__vite__mapDeps([0,1]));function $0(){$M()}const n7=v.lazy(async()=>({default:(await $M()).MarkdownEditor}));function r7(e){const{t:n}=sn();return x.jsx(v.Suspense,{fallback:x.jsx("div",{style:{height:e.height??"16rem"},className:`
|
|
95
|
-
flex items-center justify-center text-xs text-muted-foreground
|
|
96
|
-
`,children:n("instructions.editorLoading")}),children:x.jsx(n7,{...e})})}const a7="16rem";function LR({instruction:e,onClose:n}){const{t:a}=sn(),o=Bo(),s=v.useId(),u=v.useId(),c=e!==void 0,[d,p]=v.useState(e?.name??""),[g,y]=v.useState(e?.content??""),h=Ma({mutationFn:M=>e?wF(e.id,M):SF(M),onSuccess:M=>{o.setQueryData(Rc,A=>[...(A??[]).filter(N=>N.id!==M.id),M].toSorted((N,P)=>P.updatedAt-N.updatedAt)),o.invalidateQueries({queryKey:Rc}),_n.success(a(c?"instructions.updated":"instructions.created")),n()},onError:()=>{_n.error(a(c?"instructions.updateError":"instructions.error"))}}),b=h.isPending,S=!!(d.trim()&&g.trim())&&!b,w=c?"instructions.editTitle":"instructions.createTitle",C=c?"instructions.updating":"instructions.creating",R=c?"instructions.updateSave":"instructions.save",T=c?aP:dv;function O(){b||n()}return x.jsx(Bp,{open:!0,onOpenChange:M=>{M||O()},children:x.jsxs(Vp,{showCloseButton:!1,className:`
|
|
97
|
-
grid max-h-[calc(100vh-2rem)] grid-rows-[auto_minmax(0,1fr)_auto]
|
|
98
|
-
overflow-hidden
|
|
99
|
-
sm:max-w-3xl
|
|
100
|
-
`,children:[x.jsxs("form",{className:"contents","aria-busy":b,onSubmit:M=>{M.preventDefault(),S&&h.mutate({name:d.trim(),content:g})},children:[x.jsx(qp,{className:"pr-8",children:x.jsx(Kp,{children:a(w)})}),x.jsxs("div",{className:"flex min-h-0 flex-col gap-3 overflow-y-auto pr-1",children:[x.jsxs("div",{className:"flex flex-col gap-2",children:[x.jsx(Hl,{htmlFor:s,children:a("instructions.name")}),x.jsx(BO,{id:s,autoFocus:!0,required:!0,maxLength:200,value:d,disabled:b,placeholder:a("instructions.namePlaceholder"),onChange:M=>{p(M.target.value)}})]}),x.jsxs("div",{className:"flex flex-col gap-2",children:[x.jsx(Hl,{id:u,children:a("instructions.content")}),x.jsx("div",{role:"group","aria-labelledby":u,"aria-required":"true",className:`
|
|
101
|
-
overflow-hidden rounded-md border border-input bg-input/20
|
|
102
|
-
focus-within:border-ring focus-within:ring-2
|
|
103
|
-
focus-within:ring-ring/30
|
|
104
|
-
`,children:x.jsx(r7,{height:a7,value:g,ariaLabel:a("instructions.content"),placeholder:a("instructions.contentPlaceholder"),readOnly:b,onChange:y})})]})]}),x.jsxs(Yp,{children:[x.jsx(Jt,{type:"button",variant:"ghost",disabled:b,onClick:O,children:a("common.cancel")}),x.jsxs(Jt,{type:"submit",disabled:!S,children:[b?x.jsx(Bl,{className:"animate-spin"}):x.jsx(T,{}),x.jsx("span",{children:a(b?C:R)})]})]})]}),x.jsxs(eb,{disabled:b,render:x.jsx(Jt,{variant:"ghost",size:"icon",className:"absolute top-2 right-2"}),children:[x.jsx(Rs,{}),x.jsx("span",{className:"sr-only",children:a("a11y.close")})]})]})})}const o7=e=>{const n=e.active.data.current;if(Nl(n))return i7(e,n.agentId);const a=e.pointerCoordinates?CH(e):xH(e),o=a.filter(({id:s})=>oF(s));return o.length>0?o:a};function i7(e,n){const a=e.collisionRect.left+e.collisionRect.width/2,o=e.collisionRect.top+e.collisionRect.height/2,s=e.droppableRects.get(_M(n));if(s&&(a<s.left||a>s.left+s.width||o<s.top||o>s.top+s.height))return[];let u;for(const c of e.droppableContainers){const d=c.data.current;if(!Nl(d)||d.agentId!==n)continue;const p=e.droppableRects.get(c.id);if(!p)continue;const g=(p.left+p.width/2-a)**2+(p.top+p.height/2-o)**2;(!u||g<u.distance)&&(u={id:c.id,distance:g})}return u?[{id:u.id}]:[]}function s7(){const{t:e}=sn(),n=Bo(),[a,o]=v.useState(null),[s,u]=v.useState(!1),[c,d]=v.useState(null),p=JF(),g=vF(),y=yH(q0(xM,{activationConstraint:{distance:4}}),q0(SM,{activationConstraint:{delay:200,tolerance:8}}),q0(Gv,{coordinateGetter:$U})),h=v.useMemo(()=>new Map(p.instructions.map(N=>[N.id,N])),[p.instructions]),b=c?p.instructions.find(({id:N})=>N===c):void 0,S=a?.data.current,w=l7(S),C=w?h.get(w)?.name??w:"",R=a?.rect.current.initial?.width,T=Ma({mutationFn:N=>RF(N.id),onSuccess:(N,P)=>{n.setQueryData(Rc,I=>I?.filter(({id:D})=>D!==P.id)),n.setQueryData(kr,I=>I?.map(D=>{const z=D.instructionIds.filter(F=>F!==P.id);return{...D,instructionIds:z,enabled:z.length>0&&D.enabled}})),n.invalidateQueries({queryKey:Rc}),n.invalidateQueries({queryKey:kr}),_n.success(e("instructions.deleted"))},onError:()=>{_n.error(e("instructions.deleteError"))}});function O(N,P,I){const D=g.agents.find(({id:G})=>G===N);if(!D||g.pendingAgentIds.has(N))return;if(D.instructionIds.includes(P)){_n.error(e("agents.duplicateError"));return}const z=[...D.instructionIds],F=I?z.indexOf(I):-1;z.splice(F<0?z.length:F,0,P),g.updateInstructions(N,z)}function M(N,P){const I=g.agents.find(({id:D})=>D===N);!I||g.pendingAgentIds.has(N)||g.updateInstructions(N,I.instructionIds.filter(D=>D!==P))}function A({active:N,over:P}){if(o(null),!P)return;const I=N.data.current,D=P.data.current;if(Ny(I)){if(NR(D)){O(D.agentId,I.instructionId);return}Nl(D)&&O(D.agentId,I.instructionId,D.instructionId);return}if(!Nl(I))return;const z=g.agents.find(({id:U})=>U===I.agentId);if(!z||g.pendingAgentIds.has(z.id))return;const F=z.instructionIds,G=F.indexOf(I.instructionId),J=Nl(D)&&D.agentId===I.agentId?F.indexOf(D.instructionId):NR(D)&&D.agentId===I.agentId?F.length-1:-1;if(G===J||G===-1||J===-1)return;const Y=Qv([...F],G,J);Y.length===F.length&&Y.every((U,H)=>U===F[H])||g.updateInstructions(z.id,Y)}return x.jsxs(gU,{sensors:y,collisionDetection:o7,onDragStart:({active:N})=>{o(N)},onDragCancel:()=>{o(null)},onDragEnd:A,children:[x.jsxs("div",{className:`
|
|
105
|
-
grid min-h-0 flex-1 gap-4 overflow-hidden p-4
|
|
106
|
-
max-md:overflow-y-auto
|
|
107
|
-
md:grid-cols-[minmax(220px,0.8fr)_minmax(0,1.2fr)]
|
|
108
|
-
`,children:[x.jsx(W8,{children:x.jsxs(Jt,{type:"button",onFocus:$0,onPointerEnter:$0,onClick:()=>{u(!0)},children:[x.jsx(dv,{}),x.jsx("span",{children:e("instructions.create")})]})}),x.jsxs("section",{className:"flex min-h-0 flex-col gap-2",children:[x.jsxs("div",{className:"flex items-baseline justify-between gap-3 px-1",children:[x.jsx("h2",{className:"text-xs font-medium text-muted-foreground",children:e("nav.instructions")}),x.jsx("span",{className:"truncate text-[11px] text-muted-foreground",children:e("instructions.dragHint")})]}),x.jsx("div",{className:`
|
|
109
|
-
min-h-0 flex-1 overflow-y-auto p-1
|
|
110
|
-
max-md:max-h-64
|
|
111
|
-
`,children:x.jsx($F,{instructions:p.instructions,isLoading:p.isLoading,isError:p.isError,onRetry:()=>{p.retry()},onEdit:N=>{d(N.id)},onDelete:N=>{T.mutate(N)},onPreload:$0})})]}),x.jsxs("section",{className:"flex min-h-0 flex-col gap-2",children:[x.jsxs("div",{className:"flex items-baseline justify-between gap-3 px-1",children:[x.jsx("h2",{className:"text-xs font-medium text-muted-foreground",children:e("agents.title")}),x.jsx("span",{className:"truncate text-[11px] text-muted-foreground",children:e("agents.orderHint")})]}),x.jsxs("div",{className:`
|
|
112
|
-
flex min-h-0 flex-1 flex-col gap-3 p-1
|
|
113
|
-
max-md:pb-2
|
|
114
|
-
md:overflow-y-auto
|
|
115
|
-
`,children:[g.isLoading&&x.jsx(u7,{}),!g.isLoading&&g.isError&&x.jsxs(Lo,{className:"items-start gap-3 p-4",children:[x.jsx("p",{className:"text-xs text-muted-foreground",children:e("agents.loadError")}),x.jsxs(Jt,{type:"button",variant:"outline",onClick:()=>{g.retry()},children:[x.jsx(tT,{}),x.jsx("span",{children:e("common.retry")})]})]}),!g.isLoading&&!g.isError&&g.agents.map(N=>x.jsx(cF,{agent:N,instructionsById:h,isInstructionsLoading:p.isLoading,isPending:g.pendingAgentIds.has(N.id),isReapplying:g.reapplyingAgentIds.has(N.id),onRemoveInstruction:M,onToggle:(P,I)=>{g.setEnabled(P,I)},onReapply:P=>{g.reapply(P)},onOpenFile:P=>{g.openFile(P)}},N.id))]})]}),s&&x.jsx(LR,{onClose:()=>{u(!1)}}),b&&x.jsx(LR,{instruction:b,onClose:()=>{d(null)}})]}),Ny(S)&&x.jsx(jU,{dropAnimation:null,children:C&&x.jsxs("div",{style:{width:R},className:"flex items-center gap-2 bg-card px-3 py-2.5 text-xs",children:[x.jsx(cv,{className:"size-3.5 text-muted-foreground"}),x.jsx("span",{className:"truncate",children:C})]})})]})}function l7(e){if(Ny(e)||Nl(e))return e.instructionId}function u7(){return x.jsx(x.Fragment,{children:[0,1].map(e=>x.jsxs(Lo,{className:"gap-0 py-0",children:[x.jsxs("div",{className:"flex items-center gap-3 p-3",children:[x.jsx(ca,{className:"size-8 rounded-md"}),x.jsxs("div",{className:"min-w-0 flex-1",children:[x.jsx(ca,{className:"h-4 w-24"}),x.jsx(ca,{className:"mt-2 h-3 w-40"})]}),x.jsx(ca,{className:"h-4 w-7 rounded-full"})]}),x.jsx("div",{className:"border-t border-border/60 p-3",children:x.jsx(ca,{className:"h-20 w-full"})})]},e))})}const Gp="/api/settings";function c7(e){return Zc({signal:e})}function d7(e){return Zc({method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(e)})}function f7(){return Zc({method:"POST"},`${Gp}/config-folder/open`)}function h7(e){return Zc({signal:e},`${Gp}/skill-copy`)}function p7(e){return Zc({method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)},`${Gp}/skill-copy`)}async function Zc(e,n=Gp){const a=await fetch(n,e);if(!a.ok)throw new Error(await g7(a));return a.json()}async function g7(e){try{return(await e.json()).error?.message??`Request failed with status ${e.status}`}catch{return`Request failed with status ${e.status}`}}function Ii({label:e,description:n,children:a,className:o,controlClassName:s}){return x.jsxs("div",{className:Qe(`
|
|
116
|
-
flex flex-col items-start gap-3 p-4
|
|
117
|
-
min-[680px]:min-h-16 min-[680px]:flex-row min-[680px]:items-center
|
|
118
|
-
min-[680px]:justify-between min-[680px]:gap-8
|
|
119
|
-
`,o),children:[x.jsxs("div",{className:"min-w-0",children:[x.jsx("div",{className:"text-sm font-medium",children:e}),n&&x.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:n})]}),x.jsx("div",{className:Qe(`
|
|
120
|
-
min-w-0
|
|
121
|
-
max-[680px]:w-full
|
|
122
|
-
min-[680px]:shrink-0
|
|
123
|
-
`,s),children:a})]})}function m7({configFolder:e}){const{t:n}=sn(),a=v.useRef(null),o=Ma({mutationFn:async p=>{await navigator.clipboard.writeText(p)},onSuccess:()=>{_n.success(n("settings.configFolderCopied"))},onError:()=>{_n.error(n("settings.errors.copyConfigFolder"))}}),s=Ma({mutationFn:f7,onError:()=>{_n.error(n("settings.errors.openConfigFolder"))}}),u=o.isSuccess&&o.variables===e,c=!e||o.isPending||s.isPending,d=n(u?"settings.configFolderCopied":"settings.copyConfigFolder");return x.jsx(Ii,{label:n("settings.configFolder"),controlClassName:"min-[680px]:shrink",children:x.jsxs("div",{className:`
|
|
124
|
-
flex min-w-0 items-center justify-end gap-2
|
|
125
|
-
max-[680px]:justify-start
|
|
126
|
-
`,children:[e&&x.jsx("span",{className:`
|
|
127
|
-
min-w-0 font-mono text-xs break-all text-muted-foreground
|
|
128
|
-
select-text
|
|
129
|
-
`,children:e}),x.jsx(Jt,{type:"button",variant:"ghost",size:"icon","aria-label":d,title:d,disabled:c,"aria-busy":o.isPending,onClick:()=>{!e||c||(a.current&&clearTimeout(a.current),o.mutate(e,{onSuccess:()=>{a.current=setTimeout(()=>o.reset(),2e3)}}))},children:u?x.jsx(fp,{}):x.jsx(Uk,{})}),x.jsxs(Jt,{type:"button",variant:"outline",disabled:c,"aria-busy":s.isPending,onClick:()=>{c||s.mutate()},children:[s.isPending?x.jsx(Bl,{className:"animate-spin"}):x.jsx(Yk,{}),x.jsx("span",{children:n("settings.openFolder")})]})]})})}function y7(e){if(!e)return null;for(const n of e.elements){const a=n.tagName;if(a==="BUTTON"||a==="INPUT"){const o=n;if(o.type==="submit")return o}}return null}const v7="data-checked",b7="data-unchecked";function XM(e){return{checked(n){return e.indeterminate?{}:n?{[v7]:""}:{[b7]:""}},...Kl}}const x7=v.createContext(void 0);function S7(){return v.useContext(x7)}const QM=v.createContext(void 0);function w7(){const e=v.useContext(QM);if(e===void 0)throw new Error(Rn(14));return e}const R7="data-parent",E7=v.forwardRef(function(n,a){const{checked:o,className:s,defaultChecked:u=!1,"aria-labelledby":c,disabled:d=!1,form:p,id:g,indeterminate:y=!1,inputRef:h,name:b,onCheckedChange:S,parent:w=!1,readOnly:C=!1,render:R,required:T=!1,uncheckedValue:O,value:M,nativeButton:A=!1,style:N,...P}=n,{clearErrors:I}=Vc(),{disabled:D,name:z,setDirty:F,setFilled:G,setTouched:J,state:Y,validationMode:U,validityData:H,validation:L}=qo(),$=FO(),{labelId:K,registerControlId:V,getDescriptionProps:X}=Cs(),ee=S7(),q=ee?.allValues===void 0?void 0:ee.parent,se=q!==void 0,j=D||$.disabled||ee?.disabled||d,B=z??b,W=M??B,re=Tr(),Re=ee?.registerControlId!==V,le=Gl({id:g||void 0,enabled:Re}),me=A?le:re;let ge={};se&&(w?ge=q.getParentProps():W!==void 0&&(ge=q.getChildProps(W)));const{checked:ce=o,indeterminate:Te=y,onCheckedChange:ve,...Pe}=ge,Me=ee?.value,Le=v.useRef(null),Fe=qc(j,Le),{getButtonProps:Oe,buttonRef:He}=mo({disabled:j,native:A}),be=ee?.validation??L,[Ue,Ze]=bs({controlled:W!==void 0&&Me!==void 0&&!w?Me.includes(W):ce,default:u,name:"Checkbox",state:"checked"}),it=se?!!ce:Ue,de=se&&Te||y;Yc(Le,re,Ue,void 0,!ee&&!j,b);const we=q?.registerChildId,Ke=v.useRef(null),De=be.registerInput,je=ee?W:void 0,yt=v.useCallback(We=>De(We,{controlRef:Le,value:je}),[De,je]),ut=Xr(h,Ke,w?void 0:yt),ht=Hv(c,K,Ke,!A,le,P["aria-label"]);_e(()=>{Ke.current&&(Ke.current.indeterminate=de),ee||G(Ue)},[Ue,de,ee,G]),Yl(Ue,()=>{ee||(I(B),F(Ue!==H.initialValue),be.change(Ue))});const Ot=Lr({checked:Ue,disabled:j,form:p,name:w?void 0:B,id:A?void 0:le,required:T,ref:ut,style:B?qh:jc,tabIndex:-1,type:"checkbox","aria-hidden":!0,onChange(We){if(We.nativeEvent.defaultPrevented)return;if(C){We.preventDefault();return}const xt=We.currentTarget.checked,$t=dt(_r,We.nativeEvent);if(S?.(xt,$t),!$t.isCanceled&&(ve?.(xt,$t),!$t.isCanceled&&(Ze(xt),W!==void 0&&ee!==void 0&&!w&&!se))){const ft=xt?[...ee.value,W]:ee.value.filter(vt=>vt!==W);ee.setValue(ft,$t)}},onClick(We){We.stopPropagation()},onFocus(){Le.current?.focus()}},M!==void 0?{value:(ee?Ue&&M:M)||""}:Gt,X,We=>be.getValidationProps(j,We));v.useEffect(()=>{if(!q||W===void 0)return;const We=q.disabledStatesRef.current;return We.set(W,j),()=>{We.delete(W)}},[q,j,W]);const Dt=v.useMemo(()=>({...Y,checked:it,disabled:j,readOnly:C,required:T,indeterminate:de}),[Y,it,j,C,T,de]),Wt=XM(Dt),rn=Mt("span",n,{state:Dt,ref:[He,Le,a],props:[{id:me,role:"checkbox","aria-checked":de?"mixed":it,"aria-readonly":C||void 0,"aria-required":T||void 0,"aria-labelledby":ht,[R7]:w?"":void 0,onFocus(){Fe(!0)},onBlur(){const We=Ke.current;We&&(J(!0),Fe(!1),U==="onBlur"&&be.commit(ee?Me:We.checked))},onKeyDown(We){if(We.key!=="Enter"||(We.preventBaseUIHandler(),We.defaultPrevented))return;const xt=Ke.current?.form??null,$t=We.currentTarget,ft=We.nativeEvent,vt=We.preventDefault,gt=ft.preventDefault;let Lt=!1;We.preventDefault=()=>{Lt=!0,vt.call(We)},ft.preventDefault=()=>{Lt=!0,gt.call(ft)},gt.call(ft),wn($t).queueMicrotask(()=>{We.preventDefault=vt,ft.preventDefault=gt,Lt||y7(xt)?.click()})},onClick(We){if(C||j)return;We.preventDefault();const xt=Ke.current;xt&&hs(xt,We)}},P,Pe,Oe,X,We=>be.getValidationProps(j,We)],stateAttributesMapping:Wt}),en=rn.props.id;return _e(()=>{if(!(!we||w||W===void 0||en===void 0))return we(W,en)},[we,w,W,en]),x.jsxs(QM.Provider,{value:Dt,children:[rn,!Ue&&!ee&&B&&!w&&O!==void 0&&x.jsx("input",{type:"hidden",form:p,name:B,value:O,disabled:j}),x.jsx("input",{...Ot,suppressHydrationWarning:!0})]})}),C7=v.forwardRef(function(n,a){const{render:o,className:s,style:u,keepMounted:c=!1,...d}=n,p=w7(),g=p.checked||p.indeterminate,{mounted:y,transitionStatus:h,setMounted:b}=ws(g),S=v.useRef(null),w={...p,transitionStatus:h};ja({batch:!0,enabled:!g,open:g,ref:S,onComplete(){g||b(!1)}});const R={...XM(p),...po},T=c||y,O=Mt("span",n,{ref:[a,S],state:w,stateAttributesMapping:R,props:d});return T?O:null});function T7({className:e,...n}){return x.jsx(E7,{"data-slot":"checkbox",className:Qe("peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-shadow outline-none group-has-disabled/field:opacity-50 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary",e),...n,children:x.jsx(C7,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none [&>svg]:size-3.5",children:x.jsx(fp,{})})})}function O7({onClose:e}){const{t:n}=sn(),a=v.useId(),[o,s]=v.useState(["agents"]),u=hp({queryKey:["skill-targets"],queryFn:({signal:d})=>h7(d),retry:!1}),c=Ma({mutationFn:p7,onSuccess:()=>{_n.success(n("settings.skillDownloaded")),e()},onError:()=>_n.error(n("settings.errors.downloadSkill"))});return x.jsx(Bp,{open:!0,onOpenChange:d=>{!d&&!c.isPending&&e()},children:x.jsxs(Vp,{showCloseButton:!1,children:[x.jsxs("form",{className:"flex flex-col gap-4","aria-busy":c.isPending,onSubmit:d=>{d.preventDefault(),o.length>0&&u.isSuccess&&!c.isPending&&c.mutate({targets:o})},children:[x.jsxs(qp,{children:[x.jsx(Kp,{children:n("settings.downloadSkill")}),x.jsx(tb,{children:n("settings.downloadSkillDescription")})]}),x.jsxs("div",{className:"flex flex-col gap-2",children:[x.jsx(Hl,{id:a,children:n("settings.skillTargets")}),u.isPending&&x.jsxs("div",{className:"space-y-2",children:[x.jsx(ca,{className:"h-12 w-full"}),x.jsx(ca,{className:"h-12 w-full"})]}),u.isError&&x.jsx(Jt,{type:"button",variant:"outline",disabled:u.isFetching,onClick:()=>{u.refetch()},children:n("common.retry")}),u.data&&x.jsx("div",{role:"group","aria-labelledby":a,"aria-required":"true",className:"flex flex-col gap-2",children:u.data.targets.map(({target:d,destination:p})=>x.jsxs(GM,{className:"flex items-start gap-3 rounded-lg border p-3",children:[x.jsx(T7,{checked:o.includes(d),disabled:c.isPending,onCheckedChange:g=>{s(y=>g?[...y,d]:y.filter(h=>h!==d))}}),x.jsxs("span",{className:"flex min-w-0 flex-col gap-1",children:[x.jsx("span",{children:d==="agents"?".agents":".claude"}),x.jsx("span",{className:`
|
|
130
|
-
font-mono text-xs font-normal break-all
|
|
131
|
-
text-muted-foreground
|
|
132
|
-
`,children:p})]})]},d))})]}),x.jsxs(Yp,{children:[x.jsx(Jt,{type:"button",variant:"ghost",disabled:c.isPending,onClick:e,children:n("common.cancel")}),x.jsxs(Jt,{type:"submit",disabled:o.length===0||!u.isSuccess||c.isPending,children:[c.isPending?x.jsx(Bl,{className:"animate-spin"}):x.jsx(AC,{}),x.jsx("span",{children:n(c.isPending?"settings.downloadingSkill":"settings.downloadSkill")})]})]})]}),x.jsxs(eb,{disabled:c.isPending,render:x.jsx(Jt,{variant:"ghost",size:"icon",className:"absolute top-2 right-2"}),children:[x.jsx(Rs,{}),x.jsx("span",{className:"sr-only",children:n("a11y.close")})]})]})})}function M7({disabled:e=!1}){const{t:n}=sn(),[a,o]=v.useState(!1);return x.jsxs(Ii,{label:x.jsxs("span",{className:"flex items-center gap-1",children:[n("settings.downloadSkill"),x.jsxs(mh,{children:[x.jsx(yh,{render:x.jsx(Jt,{type:"button",variant:"ghost",size:"icon",className:"shrink-0 text-muted-foreground","aria-label":n("settings.aboutFoundrySkill")}),children:x.jsx(Hk,{})}),x.jsx(vh,{children:n("settings.foundrySkillHint")})]})]}),children:[x.jsxs(Jt,{type:"button",variant:"outline",disabled:e,onClick:()=>o(!0),children:[x.jsx(AC,{}),n("settings.downloadSkill")]}),a&&x.jsx(O7,{onClose:()=>o(!1)})]})}function A7({className:e,...n}){return x.jsx("div",{"data-slot":"input-group",role:"group",className:Qe("group/input-group relative flex h-7 w-full min-w-0 items-center rounded-md border border-input bg-input/20 transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-data-[align=block-end]:rounded-md has-data-[align=block-start]:rounded-md has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-2 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/30 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-2 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[textarea]:rounded-md has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",e),...n})}const D7=Dp("flex h-auto cursor-text items-center justify-center gap-1 py-2 text-xs/relaxed font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 **:data-[slot=kbd]:rounded-[calc(var(--radius-sm)-2px)] **:data-[slot=kbd]:bg-muted-foreground/10 **:data-[slot=kbd]:px-1 **:data-[slot=kbd]:text-[0.625rem] [&>svg:not([class*='size-'])]:size-3.5",{variants:{align:{"inline-start":"order-first pl-2 has-[>button]:ml-[-0.275rem] has-[>kbd]:ml-[-0.275rem]","inline-end":"order-last pr-2 has-[>button]:mr-[-0.275rem] has-[>kbd]:mr-[-0.275rem]","block-start":"order-first w-full justify-start px-2 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}});function N7({className:e,align:n="inline-start",...a}){return x.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":n,className:Qe(D7({align:n}),e),onClick:o=>{o.target.closest("button")||o.currentTarget.parentElement?.querySelector("input")?.focus()},...a})}const j7=Dp("flex items-center gap-2 rounded-md text-xs/relaxed shadow-none",{variants:{size:{xs:"h-5 gap-1 rounded-[calc(var(--radius-sm)-2px)] px-1 [&>svg:not([class*='size-'])]:size-3",sm:"gap-1","icon-xs":"size-6 p-0 has-[>svg]:p-0","icon-sm":"size-7 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});function I7({className:e,type:n="button",variant:a="ghost",size:o="xs",...s}){return x.jsx(Jt,{type:n,"data-size":o,variant:a,className:Qe(j7({size:o}),e),...s})}function k7({className:e,...n}){return x.jsx(BO,{"data-slot":"input-group-control",className:Qe("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",e),...n})}function jy({id:e,disabled:n,...a}){const{t:o}=sn(),s=v.useId(),u=e??s,[c,d]=v.useState(!1),p=o(c?"a11y.hidePassword":"a11y.showPassword");return x.jsxs(A7,{"data-disabled":n,children:[x.jsx(k7,{...a,id:u,type:c?"text":"password",disabled:n}),x.jsx(N7,{align:"inline-end",children:x.jsx(I7,{type:"button",size:"icon-xs","aria-label":p,"aria-controls":u,title:p,disabled:n,onClick:()=>d(g=>!g),children:c?x.jsx(Bk,{}):x.jsx(Vk,{})})})]})}function P7(e,n){const a=URL.createObjectURL(e),o=document.createElement("a");o.href=a,o.download=n,document.body.append(o),o.click(),o.remove(),setTimeout(()=>URL.revokeObjectURL(a),1e3)}async function L7(e){const n=await fetch("/api/data-export",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)});if(!n.ok)throw new Error("Unable to export data");const a=n.headers.get("content-disposition")??"",o=/filename="([^"]+)"/u.exec(a)?.[1]??"foundry.foundry-backup";P7(await n.blob(),o)}function z7({onClose:e}){const{t:n}=sn(),a=v.useId(),o=v.useId(),[s,u]=v.useState(""),[c,d]=v.useState(""),p=Ma({mutationFn:L7,onSuccess:()=>{_n.success(n("dataExport.exported")),e()},onError:()=>{_n.error(n("dataExport.error"))}});return x.jsx(Bp,{open:!0,onOpenChange:g=>{!g&&!p.isPending&&e()},children:x.jsxs(Vp,{showCloseButton:!1,children:[x.jsxs("form",{className:"flex flex-col gap-4","aria-busy":p.isPending,onSubmit:g=>{if(g.preventDefault(),!(!s||!c||p.isPending)){if(s!==c){_n.error(n("dataExport.passphraseMismatch"));return}p.mutate({passphrase:s})}},children:[x.jsxs(qp,{children:[x.jsx(Kp,{children:n("dataExport.title")}),x.jsx(tb,{children:n("dataExport.description")})]}),x.jsxs("div",{className:"flex flex-col gap-2",children:[x.jsx(Hl,{htmlFor:a,children:n("dataExport.passphrase")}),x.jsx(jy,{id:a,autoComplete:"new-password",required:!0,value:s,disabled:p.isPending,onChange:g=>u(g.target.value)})]}),x.jsxs("div",{className:"flex flex-col gap-2",children:[x.jsx(Hl,{htmlFor:o,children:n("dataExport.confirmPassphrase")}),x.jsx(jy,{id:o,autoComplete:"new-password",required:!0,value:c,disabled:p.isPending,"aria-invalid":c.length>0&&s!==c,onChange:g=>d(g.target.value)})]}),x.jsxs("p",{className:"flex items-start gap-2 text-xs text-muted-foreground",children:[x.jsx(Zk,{className:"size-4 shrink-0"}),x.jsx("span",{children:n("dataExport.passphraseHint")})]}),x.jsxs(Yp,{children:[x.jsx(Jt,{type:"button",variant:"ghost",disabled:p.isPending,onClick:e,children:n("common.cancel")}),x.jsxs(Jt,{type:"submit",disabled:!s||!c||p.isPending,children:[p.isPending?x.jsx(Bl,{className:"animate-spin"}):x.jsx(LC,{}),x.jsx("span",{children:n(p.isPending?"dataExport.exporting":"dataExport.action")})]})]})]}),x.jsxs(eb,{disabled:p.isPending,render:x.jsx(Jt,{variant:"ghost",size:"icon",className:"absolute top-2 right-2"}),children:[x.jsx(Rs,{}),x.jsx("span",{className:"sr-only",children:n("a11y.close")})]})]})})}function _7({disabled:e=!1}){const{t:n}=sn(),[a,o]=v.useState(!1);return x.jsxs(Ii,{label:n("settings.export"),children:[x.jsxs(Jt,{type:"button",variant:"outline",disabled:e,onClick:()=>o(!0),children:[x.jsx(LC,{}),n("settings.export")]}),a&&x.jsx(z7,{onClose:()=>o(!1)})]})}class ZM extends Error{constructor(n){super(n),this.code=n}code}async function H7(e,n){const a=await fetch("/api/data-import",{method:"POST",headers:{"content-type":"application/octet-stream","x-foundry-passphrase":encodeURIComponent(n)},body:e});await U7(a)}async function U7(e){if(e.ok)return;let n="IMPORT_FAILED";try{const o=(await e.json()).error?.code;(o==="INVALID_BACKUP"||o==="INVALID_PASSPHRASE")&&(n=o)}catch{}throw new ZM(n)}function F7({file:e,onClose:n}){const{t:a}=sn(),o=v.useId(),[s,u]=v.useState(""),c=Ma({mutationFn:()=>H7(e,s),onSuccess:()=>{location.replace(`${location.pathname}${location.search}`)},onError:g=>_n.error(a(B7(g)))}),d=c.isPending||c.isSuccess,p=()=>{d||n()};return x.jsx(Bp,{open:!0,onOpenChange:g=>{g||p()},children:x.jsxs(Vp,{showCloseButton:!1,children:[x.jsxs("form",{className:"flex flex-col gap-4","aria-busy":d,onSubmit:g=>{g.preventDefault(),!d&&s&&c.mutate()},children:[x.jsxs(qp,{children:[x.jsx(Kp,{children:a("dataImport.title")}),x.jsx(tb,{className:"break-all",children:e.name})]}),x.jsxs("div",{className:"flex flex-col gap-2",children:[x.jsx(Hl,{htmlFor:o,children:a("dataImport.passphrase")}),x.jsx(jy,{id:o,autoComplete:"current-password",required:!0,value:s,disabled:d,onChange:g=>u(g.target.value)})]}),x.jsx("p",{className:"text-xs text-muted-foreground",children:a("dataImport.replaceWarning")}),x.jsxs(Yp,{children:[x.jsx(Jt,{type:"button",variant:"ghost",disabled:d,onClick:p,children:a("common.cancel")}),x.jsxs(Jt,{type:"submit",variant:"destructive",disabled:d||!s,children:[d?x.jsx(Bl,{className:"animate-spin"}):x.jsx(kC,{}),x.jsx("span",{children:a("dataImport.replaceAction")})]})]})]}),x.jsxs(Jt,{type:"button",disabled:d,onClick:p,variant:"ghost",size:"icon",className:"absolute top-2 right-2",children:[x.jsx(Rs,{}),x.jsx("span",{className:"sr-only",children:a("a11y.close")})]})]})})}function B7(e){if(e instanceof ZM)switch(e.code){case"INVALID_BACKUP":return"dataImport.invalidBackup";case"INVALID_PASSPHRASE":return"dataImport.invalidPassphrase"}return"dataImport.error"}function V7({disabled:e=!1}){const{t:n}=sn(),a=v.useRef(null),[o,s]=v.useState(null);return x.jsxs(Ii,{label:n("settings.import"),children:[x.jsx("input",{ref:a,type:"file",accept:".foundry-backup,application/octet-stream",hidden:!0,onChange:u=>{s(u.target.files?.[0]??null),u.target.value=""}}),x.jsxs(Jt,{type:"button",variant:"outline",disabled:e,onClick:()=>a.current?.click(),children:[x.jsx(kC,{}),n("settings.import")]}),o&&x.jsx(F7,{file:o,onClose:()=>s(null)})]})}const q7="data-checked",Y7="data-unchecked",Iy={checked(e){return e?{[q7]:""}:{[Y7]:""}},...po,...Kl},nb="data-composite-item-active",JM=v.createContext(void 0);function K7(){return v.useContext(JM)}const WM=v.createContext(void 0);function G7(){const e=v.useContext(WM);if(e===void 0)throw new Error(Rn(52));return e}const $7=v.forwardRef(function(n,a){const{render:o,className:s,disabled:u=!1,readOnly:c=!1,required:d=!1,"aria-labelledby":p,value:g,inputRef:y,nativeButton:h=!1,id:b,style:S,...w}=n,C=K7(),{disabled:R,readOnly:T,required:O,form:M,checkedValue:A,touched:N=!1,validation:P,name:I,setCheckedValue:D=Sn,setTouched:z=Sn,registerInputRef:F=Sn}=C??{},{setTouched:G,setFilled:J,state:Y,disabled:U}=qo(),H=FO(),{labelId:L,getDescriptionProps:$}=Cs(),K=U||H.disabled||R||u,V=T||c,X=O||d,ee=M,q=C?A===g:g==="",se=v.useRef(null),j=qc(K,se),B=v.useRef(null),W=P?.registerInput,re=v.useCallback(Ze=>W?.(Ze,{controlRef:se,value:void 0}),[W]),Re=Xr(y,B,F,re);_e(()=>{B.current?.checked&&J(!0)},[J]),_e(()=>{if(B.current){if(K&&q){F(null);return}F(B.current)}},[q,K,F]);const le=Tr(),me=Gl({id:b}),ge=h?void 0:me,ce=Hv(p,L,B,!h,ge,w["aria-label"]),Te={role:"radio","aria-checked":q,"aria-labelledby":ce,[nb]:q?"":void 0,id:h?me:le,onKeyDown(Ze){Ze.key==="Enter"&&Ze.preventDefault()},onClick(Ze){if(Ze.defaultPrevented||K||V)return;Ze.preventDefault();const it=B.current;it&&hs(it,Ze)},onFocus(Ze){j(!0),!(Ze.defaultPrevented||K||V||!N)&&(B.current?.click(),z(!1))},onBlur(){C||j(!1)}},{getButtonProps:ve,buttonRef:Pe}=mo({disabled:K,native:h,composite:!1}),Me={type:"radio",ref:Re,form:ee,id:ge,name:I,tabIndex:-1,style:I?qh:jc,"aria-hidden":!0,...g!==void 0?{value:Sh(g)}:Gt,disabled:K,checked:q,required:X,readOnly:V,onChange(Ze){if(Ze.nativeEvent.defaultPrevented||K||V||g===void 0)return;const it=dt(_r,Ze.nativeEvent);D(g,it),!it.isCanceled&&G(!0)},onClick(Ze){Ze.stopPropagation()},onFocus(){se.current?.focus()}},Le=v.useMemo(()=>({...Y,required:X,disabled:K,readOnly:V,checked:q}),[Y,K,V,q,X]),Fe=Le,Oe=C!==void 0,He=[a,se,Pe],be=[Te,w,ve,$,P?Ze=>P.getValidationProps(K,Ze):Gt],Ue=Mt("span",n,{enabled:!Oe,state:Le,ref:He,props:be,stateAttributesMapping:Iy});return x.jsxs(WM.Provider,{value:Fe,children:[Oe?x.jsx(IO,{tag:"span",render:o,className:s,style:S,state:Le,refs:He,props:be,stateAttributesMapping:Iy}):Ue,x.jsx("input",{...Me,suppressHydrationWarning:!0})]})}),X7=v.forwardRef(function(n,a){const{render:o,className:s,style:u,keepMounted:c=!1,...d}=n,p=G7(),g=p.checked,{mounted:y,transitionStatus:h,setMounted:b}=ws(g),S={...p,transitionStatus:h},w=v.useRef(null),C=c||y,R=Mt("span",n,{ref:[a,w],state:S,props:d,stateAttributesMapping:Iy});return ja({batch:!0,enabled:!g,open:g,ref:w,onComplete(){g||b(!1)}}),C?R:null});function Q7(e){const{loopFocus:n=!0,orientation:a="both",grid:o,onLoop:s,direction:u,highlightedIndex:c,onHighlightedIndexChange:d,rootRef:p,enableHomeAndEndKeys:g=!1,stopEventPropagation:y,disabledIndices:h,modifierKeys:b=fo}=e,[S,w]=v.useState(0),C=o!=null,R=v.useRef(null),T=Xr(R,p),O=v.useRef([]),M=v.useRef(!1),A=v.useRef(null),N=c??S,P=Be((G,J=!1)=>{if(A.current=O.current[G]??null,(d??w)(G),J){const Y=O.current[G];Xw(R.current,Y,u,a)}}),I=Be(G=>{if(G.size===0)return;if(M.current){const H=O.current,L=H.indexOf(A.current);if(L===-1){const $=H[N];!$||El(H,N,h)?P(Z7(H,h)):A.current=$}else L!==N&&P(L);return}M.current=!0;const J=Array.from(G.keys()),Y=J.find(H=>H?.hasAttribute(nb))??null,U=Y?G.get(Y)?.index??-1:-1;if(U!==-1)P(U);else if(El(J,N,h)){const H=Rl(J,{disabledIndices:h});wl(J,H)||P(H)}Xw(R.current,Y,u,a)});_e(()=>{if(h==null||c!=null||!M.current)return;const G=O.current;if(El(G,N,h)){const J=Rl(G,{disabledIndices:h});wl(G,J)||P(J)}},[h,c,N,O,P]);const D=Be((G,J,Y)=>s?s(G,J,Y,O):Y),z=Be(G=>{const J=G.key===wy||G.key===Ry;if(!Bc.has(G.key)||!g&&J||J7(G,b)||!R.current)return;const U=u==="rtl",H=U?xy:Sy,L=U?Sy:xy,$=a==="vertical"?by:H,K=a==="vertical"?vy:L,V=tr(G.nativeEvent);if(V!=null&&$w(V)&&!PO(V)){const B=V.selectionStart,W=V.selectionEnd,re=V.value;if(B==null||G.shiftKey||B!==W||G.key!==K&&B<re.length||G.key!==$&&B>0)return}let X=N;const ee=qf(O,h),q=ry(O,h);o!=null&&(X=o({disabledIndices:h,elementsRef:O,event:G,highlightedIndex:N,loopFocus:n,maxIndex:q,minIndex:ee,onLoop:D,orientation:a,rtl:U}));const se=a!=="vertical"&&G.key===H||a!=="horizontal"&&G.key===by,j=a!=="vertical"&&G.key===L||a!=="horizontal"&&G.key===vy;g&&(G.key===wy?X=ee:G.key===Ry&&(X=q)),X===N&&(se||j)&&(n&&X===q&&se?(X=ee,s&&(X=s(G,N,X,O))):n&&X===ee&&j?(X=q,s&&(X=s(G,N,X,O))):X=Rl(O.current,{startingIndex:X,decrement:j,disabledIndices:h})),X!==N&&!wl(O.current,X)&&(y&&G.stopPropagation(),(C||J||se||j)&&G.preventDefault(),P(X,!0),queueMicrotask(()=>{O.current[X]?.focus()}))});return{props:{ref:T,onFocus(G){const J=R.current,Y=tr(G.nativeEvent);!J||Y==null||!$w(Y)||Y.setSelectionRange(0,Y.value.length)},onKeyDown:z},highlightedIndex:N,onHighlightedIndexChange:P,elementsRef:O,onMapChange:I,relayKeyboardEvent:z}}function Z7(e,n){let a=-1;for(let o=0;o<e.length;o+=1){const s=e[o];if(!(!s||El(e,o,n))){if(s.hasAttribute(nb))return o;a===-1&&(a=o)}}return Math.max(a,0)}function J7(e,n){for(const a of o_)if(!n.includes(a)&&e.getModifierState(a))return!0;return!1}function W7(e){const{render:n,className:a,style:o,refs:s=fo,props:u=fo,state:c=Gt,stateAttributesMapping:d,highlightedIndex:p,onHighlightedIndexChange:g,orientation:y,grid:h,loopFocus:b,onLoop:S,enableHomeAndEndKeys:w,onMapChange:C,stopEventPropagation:R=!0,rootRef:T,disabledIndices:O,modifierKeys:M,highlightItemOnHover:A=!1,tag:N="div",...P}=e,I=sp(),{props:D,highlightedIndex:z,onHighlightedIndexChange:F,elementsRef:G,onMapChange:J,relayKeyboardEvent:Y}=Q7({grid:h,loopFocus:b,onLoop:S,orientation:y,highlightedIndex:p,onHighlightedIndexChange:g,rootRef:T,stopEventPropagation:R,enableHomeAndEndKeys:w,direction:I,disabledIndices:O,modifierKeys:M}),U=Mt(N,e,{state:c,ref:s,props:[D,...u,P],stateAttributesMapping:d}),H=v.useMemo(()=>({highlightedIndex:z,onHighlightedIndexChange:F,highlightItemOnHover:A,relayKeyboardEvent:Y}),[z,F,A,Y]);return x.jsx(lO.Provider,{value:H,children:x.jsx(Pv,{elementsRef:G,onMapChange:L=>{C?.(L),J(L)},children:U})})}const eB=[vO],tB=v.forwardRef(function(n,a){const{render:o,className:s,disabled:u,readOnly:c,required:d,onValueChange:p,value:g,defaultValue:y,form:h,name:b,inputRef:S,id:w,style:C,...R}=n,{setTouched:T,setFocused:O,validationMode:M,name:A,disabled:N,state:P,validation:I,setDirty:D,setFilled:z,validityData:F}=qo(),{labelId:G}=Cs(),{clearErrors:J,elementRef:Y}=Vc(),U=v6(!0),H=N||u,L=A??b,$=Tr(w),[K,V]=bs({controlled:g,default:y,name:"RadioGroup",state:"value"}),[X,ee]=v.useState(!1),q=Be((Me,Le)=>{p?.(Me,Le),!Le.isCanceled&&V(Me)}),se=I.getInputControl,j=v.useMemo(()=>({get current(){return se()}}),[se]),B=v.useRef(null),W=v.useRef(null),re=Xr(B,S),Re=v.useRef(re),le=Be(Me=>{B.current===Me&&Re.current===re||(Re.current=re,re?.(Me))});_e(()=>{le(B.current)},[re,le]);const me=Be(Me=>{if(Me){if(!Me.disabled){W.current||(W.current=Me);const Le=B.current;(Me.checked||Le==null||Le.disabled)&&le(Me)}return()=>{W.current===Me&&(W.current=null),B.current===Me&&le(null)}}}),ge=Be(()=>{const Me=Y.current;if(!Me)return K??null;for(const Le of I.registeredInputs.keys())if(Le.checked&&R6(Le,Me))return K??null;return null});Yc(j,$,K??null,ge,!H,b),Yl(K,()=>{J(L),D(K!==F.initialValue),z(K!=null),I.change(K);const Me=W.current;K==null&&Me&&!Me.disabled&&le(Me)});const ce=G??U?.legendId,Te={...P,disabled:H??!1,required:d??!1,readOnly:c??!1},ve=v.useMemo(()=>({checkedValue:K,disabled:H,form:h,validation:I,name:L,readOnly:c,registerInputRef:me,required:d,setCheckedValue:q,setTouched:ee,touched:X}),[K,H,h,I,L,c,me,d,q,ee,X]),Pe={id:w,role:"radiogroup","aria-required":d||void 0,"aria-disabled":H||void 0,"aria-readonly":c||void 0,"aria-labelledby":ce,onBlur(Me){at(Me.currentTarget,Me.relatedTarget)||(ee(!1),T(!0),O(!1),M==="onBlur"&&I.commit(K))},onKeyDownCapture(Me){Me.key.startsWith("Arrow")&&ee(!0)}};return x.jsx(JM.Provider,{value:ve,children:x.jsx(W7,{render:o,className:s,style:C,state:Te,props:[Pe,R,Me=>I.getValidationProps(H??!1,Me)],refs:[a],stateAttributesMapping:Kl,enableHomeAndEndKeys:!1,modifierKeys:eB})})});function nB({className:e,...n}){return x.jsx(tB,{"data-slot":"radio-group",className:Qe("grid w-full gap-3",e),...n})}function rB({className:e,...n}){return x.jsx($7,{"data-slot":"radio-group-item",className:Qe("group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none group-has-focus-visible/field-label:ring-0 group-has-focus-visible/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 dark:data-checked:bg-primary",e),...n,children:x.jsx(X7,{"data-slot":"radio-group-indicator",className:"flex size-4 items-center justify-center",children:x.jsx("span",{className:"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground"})})})}const aB=[{value:"system",labelKey:"common.system"},{value:"light",labelKey:"theme.light"},{value:"dark",labelKey:"theme.dark"}];function oB({value:e,onValueChange:n,disabled:a=!1}){const{t:o}=sn();return x.jsx(Ii,{label:o("settings.colorTheme"),children:x.jsx(nB,{"aria-label":o("settings.colorTheme"),value:e,onValueChange:n,disabled:a,"aria-busy":a,className:"flex w-auto flex-row flex-wrap items-center gap-x-6 gap-y-2",children:aB.map(s=>x.jsxs("label",{className:Qe("flex items-center gap-2 text-sm select-none",s.value===e?"font-medium text-foreground":"text-muted-foreground",a?"cursor-not-allowed opacity-60":"cursor-pointer"),children:[x.jsx(rB,{value:s.value,disabled:a}),x.jsx("span",{children:o(s.labelKey)})]},s.value))})})}function iB(e){const n=v.useRef(!0);n.current&&(n.current=!1,e())}const eA=v.createContext(void 0),tA=v.createContext(void 0);function yo(){const e=v.useContext(eA);if(e===void 0)throw new Error(Rn(60));return e}function nA(){const e=v.useContext(tA);if(e===void 0)throw new Error(Rn(61));return e}function sB(e,n,a=Object.is){const{length:o}=e;if(o!==n.length)return!1;for(let s=0;s<o;s+=1)if(!a(e[s],n[s]))return!1;return!0}const rA=(e,n)=>Object.is(e,n);function Ss(e,n,a){return e==null||n==null?Object.is(e,n):a(e,n)}function lB(e,n,a){return Array.isArray(e)&&Array.isArray(n)?!sB(e,n,(o,s)=>Ss(o,s,a)):e!==n}function ky(e,n,a){return e?e.some(o=>o===void 0?!1:Ss(n,o,a)):!1}function th(e,n,a){return e?e.findIndex(o=>o===void 0?!1:Ss(o,n,a)):-1}function uB(e,n){if(n!==rA)return o=>ky(e,o,n);const a=new Set(e);return a.delete(void 0),o=>a.has(o)&&(o!==0||e.some(s=>Object.is(o,s)))}function aA(e,n,a,o){const s=o&&Array.isArray(n)?e.findIndex(uB(n,a)):th(e,n,a);return s===-1?null:s}function cB(e,n,a,o,s,u){return ky(o,n,s)?u!=null&&e>u&&ky(o,a[u],s)?u:e:e===u?aA(a,o,s,!0):u}function dB(e,n,a){return e.filter(o=>!Ss(n,o,a))}const fB={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,multiple:e=>e.multiple,disabled:e=>e.disabled,readOnly:e=>e.readOnly,required:e=>e.required,highlightItemOnHover:e=>e.highlightItemOnHover,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{const{value:n,multiple:a,itemToStringValue:o}=e;return n==null?!1:a&&Array.isArray(n)?n.length>0:bl(n,o)!==""},hasNullItemLabel:(e,n)=>n?e6(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,n)=>e.activeIndex===n,isSelected:(e,n)=>{const a=e.isItemEqualToValue,o=e.value;return e.multiple?Array.isArray(o)&&o.some(s=>Ss(n,s,a)):Ss(n,o,a)},isSelectedByFocus:(e,n)=>e.selectedIndex===n,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,itemRoot:e=>e.itemRoot,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows};function tc(e,n=Number.MIN_SAFE_INTEGER,a=Number.MAX_SAFE_INTEGER){return Math.max(n,Math.min(e,a))}const Ba=1;function rb(e,n){return Math.max(0,e-n)}function Ih(e,n){if(n<=0)return 0;const a=tc(e,0,n),o=a,s=n-a,u=o<=Ba,c=s<=Ba;return u&&c?o<=s?0:n:u?0:c?n:a}function hB(e){const{id:n,value:a,defaultValue:o=null,onValueChange:s,open:u,defaultOpen:c=!1,onOpenChange:d,name:p,form:g,autoComplete:y,disabled:h=!1,readOnly:b=!1,required:S=!1,modal:w=!0,actionsRef:C,inputRef:R,onOpenChangeComplete:T,items:O,multiple:M=!1,itemToStringLabel:A,itemToStringValue:N,isItemEqualToValue:P=rA,highlightItemOnHover:I=!0,children:D}=e,{clearErrors:z}=Vc(),{setDirty:F,setTouched:G,setFocused:J,validityData:Y,setFilled:U,name:H,disabled:L,validation:$,validationMode:K}=qo(),V=Gl({id:n}),X=L||h,ee=H??p,[q,se]=bs({controlled:a,default:M?o??fo:o,name:"Select",state:"value"}),[j,B]=bs({controlled:u,default:c,name:"Select",state:"open"}),W=v.useRef([]),re=v.useRef([]),Re=v.useRef(null),le=v.useRef(null),me=v.useRef(0),ge=v.useRef(null),ce=v.useRef([]),Te=v.useRef(!1),ve=v.useRef(null),Pe=v.useRef(null),Me=v.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),Le=v.useRef(!1),Fe=v.useRef(q),{openMethod:Oe,triggerProps:He}=AO(j),be=er(()=>new Fl({id:V,labelId:void 0,modal:w,multiple:M,disabled:X,readOnly:b,required:S,highlightItemOnHover:I,itemToStringLabel:A,itemToStringValue:N,isItemEqualToValue:P,value:q,open:j,mounted:j,transitionStatus:void 0,items:O,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:Gt,triggerProps:Gt,itemRoot:{props:Gt,multiple:M,disabled:X,readOnly:b,isItemEqualToValue:P},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1},{setValue:Sn,setOpen:Sn,handleScrollArrowVisibility:Sn,onOpenChangeComplete:Sn,listRef:W,popupRef:Re,scrollHandlerRef:le,scrollArrowsMountedCountRef:me,valueRef:ge,valuesRef:ce,labelsRef:re,typingRef:Te,selectionRef:Me,firstItemTextRef:ve,selectedItemTextRef:Pe,alignItemWithTriggerActiveRef:Le,initialValueRef:Fe},fB)).current,[Ue,Ze]=v.useState(!1),{mounted:it,transitionStatus:de,forceUnmount:we}=zE({open:j,ref:Re,preventUnmountOnClose:Ue,setPreventUnmountOnClose:Ze,onUnmount(){be.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),T?.(!1)}}),Ke=be.useState("activeIndex"),De=be.useState("selectedIndex"),je=be.useState("triggerElement"),yt=be.useState("positionerElement"),ut=hI(Oe),ht=Oe??ut,Ot=v.useMemo(()=>M?"":bl(q,N),[M,q,N]),Dt=v.useMemo(()=>M&&Array.isArray(q)?q.map(_=>bl(_,N)):bl(q,N),[M,q,N]),Wt=Pn(je),rn=Be(()=>Dt);Yc(Wt,V,q,rn,!X,p);const en=M?Array.isArray(q)&&q.length>0:q!=null&&Ot!=="";_e(()=>{U(en)},[en,U]),_e(function(){const Z=aA(ce.current,q,P,M);Z===null&&(Pe.current=null),!j&&be.set("selectedIndex",Z)},[M,j,q,P,be]),Yl(q,()=>{z(ee),F(lB(q,Y.initialValue,P)),$.change(q)});const We=Be((_,Z)=>{const ne=Z,ye=Wh(ne);d?.(_,ne),!Z.isCanceled&&(_||Ze(ye()),B(_),!_&&(Z.reason===Ti||Z.reason===Vh)&&(G(!0),J(!1),K==="onBlur"&&$.commit(q)))});v.useImperativeHandle(C,()=>({unmount:we,close:()=>{be.state.open&&We(!1,dt(Nc))}}),[we,We,be]);const xt=Be((_,Z)=>{s?.(_,Z),!Z.isCanceled&&se(_)}),$t=Be(_=>{const Z=rb(_.scrollHeight,_.clientHeight),ne=Ih(_.scrollTop,Z),ye=ne>0,xe=ne<Z;be.set("scrollUpArrowVisible",ye),be.set("scrollDownArrowVisible",xe)}),ft=X3({open:j,onOpenChange:We,elements:{reference:je,floating:yt}}),vt=PE(ft,{enabled:!X,event:"mousedown"}),gt=Ic(ft),Lt=XE(ft,{enabled:!X,listRef:W,activeIndex:Ke,selectedIndex:De,disabledIndices:fo,onNavigate(_){_===null&&!j||be.set("activeIndex",_)},focusItemOnHover:I}),un=QE(ft,{enabled:!X&&(j||!b&&!M),listRef:re,activeIndex:Ke,selectedIndex:De,disabledIndices:_=>PO(W.current[_]),onMatch(_){j?be.set("activeIndex",_):xt(ce.current[_],dt(_r))},onTyping(_){Te.current=_}}),Ie=v.useMemo(()=>Lr(un.reference,Lt.reference,gt.reference,vt.reference,He),[vt.reference,un.reference,Lt.reference,gt.reference,He]),ot=v.useMemo(()=>Lr(kc,un.floating,Lt.floating,gt.floating),[un.floating,Lt.floating,gt.floating]),ke=Lt.item??Gt,ze=v.useMemo(()=>({props:ke,multiple:M,disabled:X,readOnly:b,isItemEqualToValue:P}),[ke,M,X,b,P]);be.useContextCallback("setValue",xt),be.useContextCallback("setOpen",We),be.useContextCallback("handleScrollArrowVisibility",$t),be.useContextCallback("onOpenChangeComplete",T),iB(()=>{be.update({popupProps:ot,triggerProps:Ie,itemRoot:ze})}),be.useSyncedValues({id:V,modal:w,multiple:M,disabled:X,readOnly:b,required:S,highlightItemOnHover:I,value:q,open:j,mounted:it,transitionStatus:de,popupProps:ot,triggerProps:Ie,itemRoot:ze,items:O,itemToStringLabel:A,itemToStringValue:N,isItemEqualToValue:P,openMethod:ht});const Ge=Xr(R,$.inputRef),et=M?void 0:ee,Et=v.useMemo(()=>!M||!Array.isArray(q)||!ee?null:q.map(_=>{const Z=bl(_,N);return x.jsx("input",{type:"hidden",form:g,name:ee,value:Z,disabled:X},Z)}),[M,q,g,ee,N,X]);return x.jsxs(eA.Provider,{value:be,children:[x.jsx(tA.Provider,{value:ft,children:D}),x.jsx("input",{...$.getValidationProps(X,{onFocus(){be.state.triggerElement?.focus({focusVisible:!0})},onChange(_){if(_.nativeEvent.defaultPrevented||X||b)return;const Z=_.currentTarget.value,ne=dt(_r,_.nativeEvent);function ye(){if(M)return;const xe=Z.toLowerCase();let qe=ce.current.findIndex(Xe=>bl(Xe,N).toLowerCase()===xe||zO(Xe,A).toLowerCase()===xe);qe===-1&&(qe=ce.current.findIndex((Xe,$e)=>{const st=re.current[$e];return st!=null&&st.toLowerCase()===xe}));const Ve=ce.current[qe];Ve!=null&&xt(Ve,ne)}be.set("forceMount",!0),queueMicrotask(ye)}}),id:V&&et==null?`${V}-hidden-input`:void 0,form:g,name:et,autoComplete:y,value:Ot,disabled:X,required:S&&!(M&&en),readOnly:b,ref:Ge,style:ee?qh:jc,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Et]})}function pB(e,n){return e??n}const gB="data-popup-side",mB=400,yB={...rh,...Kl,popupSide:e=>e?{[gB]:e}:null,value:()=>null},vB=v.forwardRef(function(n,a){const{render:o,className:s,id:u,disabled:c=!1,nativeButton:d=!0,style:p,...g}=n,{setTouched:y,validationMode:h,validation:b,state:S,disabled:w}=qo(),{labelId:C}=Cs(),R=yo(),T=R.useState("readOnly"),O=R.useState("required"),M=R.useState("disabled"),A=w||M||c,N=R.useState("open"),P=R.useState("mounted"),I=R.useState("value"),D=R.useState("triggerProps"),z=R.useState("positionerElement"),F=R.useState("listElement"),G=R.useState("popupSide"),J=R.useState("id"),Y=R.useState("labelId"),U=R.useState("hasSelectedValue"),H=P&&z?G:null,L=u??J,$=pB(C,Y);Gl({id:u});const K=Pn(z),V=v.useRef(null),X=qc(A,V),{getButtonProps:ee,buttonRef:q}=mo({disabled:A,native:d}),se=R.useStateSetter("triggerElement"),j=Hn(),B=Hn(),W=Hn();v.useEffect(()=>{if(N)return W.start(mB,()=>{R.context.selectionRef.current.allowUnselectedMouseUp=!0,R.context.selectionRef.current.allowSelectedMouseUp=!0}),()=>{W.clear()};R.context.selectionRef.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},B.clear()},[N,R,B,W]);const re=Lr(D,{id:L,role:"combobox","aria-expanded":N,"aria-haspopup":"listbox","aria-controls":N?F?.id??oh(z)?.id:void 0,"aria-labelledby":$,"aria-readonly":T||void 0,"aria-required":O||void 0,tabIndex:A?-1:0,onFocus(me){X(!0),N&&R.context.alignItemWithTriggerActiveRef.current&&R.context.setOpen(!1,dt(_r,me.nativeEvent)),j.start(0,()=>{R.set("forceMount",!0)})},onBlur(me){at(z,me.relatedTarget)||(y(!0),X(!1),h==="onBlur"&&b.commit(I))},onMouseDown(me){if(N)return;const ge=Kt(me.currentTarget);function ce(Te){if(!V.current)return;const ve=Te.target;at(V.current,ve)||at(K.current,ve)||jO(Te,V.current)||R.context.setOpen(!1,dt(Ky,Te))}B.start(0,()=>{ge.addEventListener("mouseup",ce,{once:!0})})}},g,ee),Re=b.getValidationProps(A,re);Re.role="combobox";const le={...S,open:N,disabled:A,value:I,readOnly:T,popupSide:H,placeholder:!U};return Mt("button",n,{ref:[a,V,q,se],state:le,stateAttributesMapping:yB,props:Re})}),bB={value:()=>null},xB=v.forwardRef(function(n,a){const{className:o,render:s,children:u,placeholder:c,style:d,...p}=n,g=yo(),y=g.useState("value"),h=g.useState("items"),b=g.useState("itemToStringLabel"),S=g.useState("hasSelectedValue"),w=!S&&c!=null&&u==null,C=g.useState("hasNullItemLabel",w),R={value:y,placeholder:!S};let T=null;return typeof u=="function"?T=u(y):u!=null?T=u:w&&!C?T=c:Array.isArray(y)?T=t6(y,h,b):T=_O(y,h,b),Mt("span",n,{state:R,ref:[a,g.context.valueRef],props:[{children:T},p],stateAttributesMapping:bB})}),SB=v.forwardRef(function(n,a){const{render:o,className:s,style:u,...c}=n,g={open:yo().useState("open")};return Mt("span",n,{state:g,ref:a,props:[{"aria-hidden":!0,children:"▼"},c],stateAttributesMapping:ZR})}),wB=v.forwardRef(function(n,a){const o=yo(),s=o.useState("mounted"),u=o.useState("forceMount");return s||u?x.jsx($h,{ref:a,...n}):null}),oA=v.createContext(void 0);function ab(){const e=v.useContext(oA);if(!e)throw new Error(Rn(59));return e}function kh(e,n){e&&Object.assign(e.style,n)}const iA={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},RB={position:"fixed"},EB=v.forwardRef(function(n,a){const{anchor:o,className:s,render:u,positionMethod:c,side:d,align:p,sideOffset:g,alignOffset:y,collisionBoundary:h="clipping-ancestors",collisionPadding:b,arrowPadding:S,sticky:w,disableAnchorTracking:C,alignItemWithTrigger:R=!0,collisionAvoidance:T=TE,style:O,...M}=n,A=yo(),N=nA(),P=A.useState("open"),I=A.useState("mounted"),D=A.useState("modal"),z=A.useState("value"),F=A.useState("openMethod"),G=A.useState("positionerElement"),J=A.useState("triggerElement"),Y=A.useState("isItemEqualToValue"),U=A.useState("transitionStatus"),H=v.useRef(null),L=v.useRef(null),[$,K]=v.useState(R),V=I&&$&&F!=="touch";!I&&$!==R&&K(R),v.useImperativeHandle(A.context.alignItemWithTriggerActiveRef,()=>V),Lv((V||D)&&P,F==="touch",G,J);const X=lp({anchor:o,floatingRootContext:N,positionMethod:c,mounted:I,side:d,sideOffset:g,align:p,alignOffset:y,arrowPadding:S,collisionBoundary:h,collisionPadding:b,sticky:w,disableAnchorTracking:C??V,collisionAvoidance:T,keepMounted:!0}),ee=V?"none":X.side,q=V?RB:X.positionerStyles,se={open:P,side:ee,align:X.align,anchorHidden:X.anchorHidden};_e(()=>{A.set("popupSide",X.side)},[A,X.side]);const j=A.useStateSetter("positionerElement"),B=up(n,se,{styles:q,transitionStatus:U,props:M,refs:[a,j],hidden:!I,inert:!P}),W=v.useRef(0),re=Be(le=>{if(A.context.valuesRef.current.length===0)return;const me=W.current;W.current=le.size;const ge=dt(_r);if(me!==0&&!A.state.multiple&&z!==null&&th(A.context.valuesRef.current,z,Y)===-1){const Te=A.context.initialValueRef.current,Pe=Te!=null&&th(A.context.valuesRef.current,Te,Y)!==-1?Te:null;A.context.setValue(Pe,ge),Pe===null&&(A.set("selectedIndex",null),A.context.selectedItemTextRef.current=null)}if(me!==0&&A.state.multiple&&Array.isArray(z)){const ce=z.filter(Te=>th(A.context.valuesRef.current,Te,Y)!==-1);ce.length!==z.length&&(A.context.setValue(ce,ge),ce.length===0&&(A.set("selectedIndex",null),A.context.selectedItemTextRef.current=null))}if(P&&V){A.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const ce={height:""};kh(G,ce),kh(A.context.popupRef.current,ce)}}),Re=v.useMemo(()=>({...X,side:ee,alignItemWithTriggerActive:V,setControlledAlignItemWithTrigger:K,scrollUpArrowRef:H,scrollDownArrowRef:L}),[X,ee,V,K]);return x.jsx(Pv,{elementsRef:A.context.listRef,labelsRef:A.context.labelsRef,onMapChange:re,children:x.jsxs(oA.Provider,{value:Re,children:[I&&D&&x.jsx(Cp,{inert:cp(!P),cutout:J}),B]})})}),Ff="base-ui-disable-scrollbar",Py={className:Ff,getElement(e){return x.jsx("style",{nonce:e,href:Ff,precedence:"base-ui:low",children:`.${Ff}{scrollbar-width:none}.${Ff}::-webkit-scrollbar{display:none}`})}},CB=v.createContext(void 0),TB={disableStyleElements:!1};function OB(){return v.useContext(CB)??TB}const zR="--transform-origin",MB={...Mc,...po},AB=v.forwardRef(function(n,a){const{render:o,className:s,style:u,finalFocus:c,...d}=n,p=yo(),g=p.useState("multiple"),y=p.useState("readOnly"),h=p.useState("highlightItemOnHover"),b=nA(),{side:S,align:w,alignItemWithTriggerActive:C,isPositioned:R,setControlledAlignItemWithTrigger:T}=ab(),O=kv()!=null,M=sp(),{nonce:A,disableStyleElements:N}=OB(),P=p.useState("id"),I=p.useState("open"),D=p.useState("openMethod"),z=p.useState("mounted"),F=p.useState("popupProps"),G=p.useState("transitionStatus"),J=p.useState("triggerElement"),Y=p.useState("positionerElement"),U=p.useState("listElement"),H=v.useRef(!1),L=v.useRef(!1),$=v.useRef({}),K=Il(),V=Be(se=>{if(!Y||!p.context.popupRef.current||!L.current)return;const j=Y.style.top==="0px",B=Y.style.bottom==="0px";if(H.current||!C||!j&&!B){p.context.handleScrollArrowVisibility(se);return}const W=HR(Y),re=nc(Y.getBoundingClientRect().height,"y",W),Re=Kt(Y),le=wn(Y),me=le.getComputedStyle(Y),ge=parseFloat(me.marginTop),ce=parseFloat(me.marginBottom),Te=_R(le.getComputedStyle(p.context.popupRef.current)),ve=Math.min(Re.documentElement.clientHeight-ge-ce,Te),Pe=se.scrollTop,Me=Bf(se);let Le=null;const Fe=Ue=>{Y.style.height=`${Ue}px`},Oe=j?Me-Pe:Pe,He=Math.min(re+Oe,ve);if(Oe<=Ba){const Ue=tc(Oe,0,ve-re);Ue>0&&Fe(re+Ue),se.scrollTop=j?Me:0,ve-(re+Ue)<=Ba&&(H.current=!0),p.context.handleScrollArrowVisibility(se);return}if(ve-He>Ba)Le=j?1/0:0;else if(B&&Pe<Me){const Ue=re+Oe-ve;Le=Pe-(Oe-Ue)}const be=Math.ceil(He);if(be!==0&&Fe(be),Le!=null){const Ue=tc(Le,0,Bf(se));Math.abs(se.scrollTop-Ue)>Ba&&(se.scrollTop=Ue)}be>=ve-Ba&&(H.current=!0),p.context.handleScrollArrowVisibility(se)});v.useImperativeHandle(p.context.scrollHandlerRef,()=>V,[V]),ja({open:I,ref:p.context.popupRef,onComplete(){I&&p.context.onOpenChangeComplete(!0)}});const X={open:I,transitionStatus:G,side:S,align:w};_e(()=>{!Y||!p.context.popupRef.current||Object.keys($.current).length||($.current={top:Y.style.top||"0",left:Y.style.left||"0",right:Y.style.right,height:Y.style.height,bottom:Y.style.bottom,minHeight:Y.style.minHeight,maxHeight:Y.style.maxHeight,marginTop:Y.style.marginTop,marginBottom:Y.style.marginBottom})},[p,Y]),_e(()=>{I||C||(L.current=!1,H.current=!1,kh(Y,$.current))},[I,C,Y]),_e(()=>{const se=p.context.popupRef.current;if(!I||!J||!Y||!se||C&&!R||p.state.transitionStatus==="ending")return;if(L.current=!0,se.style.removeProperty(zR),!C){K.request(()=>p.context.handleScrollArrowVisibility(U||se));return}const j=DB(se);try{let B=p.context.selectedItemTextRef.current;B?.isConnected||(B=!p.select("hasSelectedValue")&&p.context.firstItemTextRef.current?.isConnected?p.context.firstItemTextRef.current:null);const W=p.context.valueRef.current,re=wn(Y),Re=re.getComputedStyle(Y),le=re.getComputedStyle(se),me=Kt(J),ge=HR(J),ce=Vf(J.getBoundingClientRect(),ge),Te=Vf(Y.getBoundingClientRect(),ge),ve=ce.height,Pe=U||se,Me=Pe.scrollHeight,Le=parseFloat(le.borderBottomWidth),Fe=parseFloat(Re.marginTop)||10,Oe=parseFloat(Re.marginBottom)||10,He=parseFloat(Re.minHeight)||100,be=_R(le),Ue=5,Ze=5,it=20,de=me.documentElement.clientHeight-Fe-Oe,we=me.documentElement.clientWidth,Ke=de-ce.bottom+ve;let De,je=M==="rtl"?ce.right-Te.width:ce.left,yt=0;if(B&&W){const ft=Vf(W.getBoundingClientRect(),ge);De=Vf(B.getBoundingClientRect(),ge),je=Te.left+(M==="rtl"?ft.right-De.right:ft.left-De.left);const vt=ft.top-ce.top+ft.height/2;yt=De.top-Te.top+De.height/2-vt}const ut=Ke+yt+Oe+Le;let ht=Math.min(de,ut);const Ot=de-Fe-Oe,Dt=ut-ht,Wt=we-Ze;Y.style.left=`${tc(je,Ue,Wt-Te.width)}px`,Y.style.height=`${ht}px`,Y.style.maxHeight="none",Y.style.marginTop=`${Fe}px`,Y.style.marginBottom=`${Oe}px`,se.style.height="100%";const rn=Bf(Pe),en=Dt>=rn-Ba;en&&(ht=Math.min(de,Te.height)-(Dt-rn));const We=ce.top<it||ce.bottom>de-it||Math.ceil(ht)+Ba<Math.min(Me,He),xt=(re.visualViewport?.scale??1)!==1&&ho;if(We||xt){kh(Y,$.current),T(!1);return}const $t=Math.max(He,ht);if(en){const ft=Math.max(0,de-ut);Y.style.top=Te.height>=Ot?"0":`${ft}px`,Y.style.height=`${ht}px`,Pe.scrollTop=Bf(Pe)}else Y.style.bottom="0",Pe.scrollTop=Dt;if(De){const ft=Te.top,vt=Te.height,gt=De.top+De.height/2,Lt=tc(vt>0?(gt-ft)/vt*100:50,0,100);se.style.setProperty(zR,`50% ${Lt}%`)}($t===de||ht>=be)&&(H.current=!0),p.context.handleScrollArrowVisibility(Pe),h&&p.state.selectedIndex===null&&p.state.activeIndex===null&&p.context.listRef.current[0]!=null&&p.set("activeIndex",0)}finally{j()}},[p,I,Y,J,C,T,K,U,h,M,R]),v.useEffect(()=>{if(!C||!Y||!I)return;const se=wn(Y);function j(B){p.context.setOpen(!1,dt(k4,B))}return It(se,"resize",j)},[p,C,Y,I]);const ee={...U?{role:"presentation"}:{role:"listbox","aria-multiselectable":g||void 0,"aria-readonly":y||void 0,id:`${P}-list`},onKeyDown(se){O&&Bc.has(se.key)&&se.stopPropagation()},onScroll(se){U||V(se.currentTarget)},...C&&{style:U?{height:"100%"}:iA},className:!U&&C?Py.className:void 0},q=Mt("div",n,{ref:[a,p.context.popupRef],state:X,stateAttributesMapping:MB,props:[F,ee,Lc(G),d]});return x.jsxs(v.Fragment,{children:[!N&&Py.getElement(A),x.jsx(Xh,{context:b,modal:!1,disabled:!z,openInteractionType:D,returnFocus:c,restoreFocus:!0,children:q})]})});function _R(e){const n=e.maxHeight;return n.endsWith("px")&&parseFloat(n)||1/0}function Bf(e){return rb(e.scrollHeight,e.clientHeight)}function HR(e){return rC.getScale(e)}function nc(e,n,a){return e/a[n]}function Vf(e,n){return mc({x:nc(e.x,"x",n),y:nc(e.y,"y",n),width:nc(e.width,"x",n),height:nc(e.height,"y",n)})}const UR=[["transform","none"],["scale","1"],["translate","0 0"]];function DB(e){const{style:n}=e,a={};for(const[o,s]of UR)a[o]=n.getPropertyValue(o),n.setProperty(o,s,"important");return()=>{for(const[o]of UR){const s=a[o];s?n.setProperty(o,s):n.removeProperty(o)}}}const NB=v.forwardRef(function(n,a){const{render:o,className:s,style:u,...c}=n,d=yo(),p=d.useState("multiple"),g=d.useState("readOnly"),{alignItemWithTriggerActive:y}=ab(),h=d.useState("hasScrollArrows"),b=d.useState("openMethod"),w={id:`${d.useState("id")}-list`,role:"listbox","aria-multiselectable":p||void 0,"aria-readonly":g||void 0,onScroll(R){d.context.scrollHandlerRef.current?.(R.currentTarget)},...y&&{style:iA},className:h&&b!=="touch"?Py.className:void 0},C=d.useStateSetter("listElement");return Mt("div",n,{ref:[a,C],props:[w,c]})}),sA=v.createContext(void 0);function lA(){const e=v.useContext(sA);if(!e)throw new Error(Rn(57));return e}const jB=v.memo(v.forwardRef(function(n,a){const{render:o,className:s,style:u,value:c=null,label:d,disabled:p=!1,nativeButton:g=!1,...y}=n,h=v.useRef(null),b=Ep({guess:!0,label:d,textRef:h}),S=yo(),{props:w,multiple:C,disabled:R,readOnly:T,isItemEqualToValue:O}=S.useState("itemRoot"),M=R||p,A=S.useState("isActive",b.index),N=S.useState("open"),P=S.useState("isSelected",c),I=S.useState("isSelectedByFocus",b.index),D=b.index,z=v.useRef(null);_e(()=>{const X=S.context.valuesRef.current;return X[D]=c,()=>{delete X[D]}},[D,c,S]),_e(()=>{const X=S.state.value,ee=S.state.selectedIndex;let q=ee,se;C&&Array.isArray(X)?(q=cB(D,c,S.context.valuesRef.current,X,O,ee),se=q===D,D===ee&&!se&&(S.context.selectedItemTextRef.current=null)):(se=X!==void 0&&Ss(c,X,O),se&&(q=D)),S.set("selectedIndex",q),se&&h.current&&(S.context.selectedItemTextRef.current=h.current)},[D,C,O,S,c]);const F=v.useRef("mouse"),G=v.useRef(!1),{getButtonProps:J,buttonRef:Y}=mo({disabled:M,focusableWhenDisabled:!0,native:g,composite:!0}),U={disabled:M,selected:P,highlighted:A};function H(X){if(R||T)return;const ee=S.state.value;if(C){const q=Array.isArray(ee)?ee:[],se=P?dB(q,c,O):[...q,c];S.context.setValue(se,dt(fs,X))}else S.context.setValue(c,dt(fs,X)),S.context.setOpen(!1,dt(fs,X))}function L(){S.context.selectionRef.current.dragY=0}const $={role:"option","aria-selected":P,tabIndex:N&&A?0:-1,onKeyDown(X){S.set("activeIndex",D),X.key===" "&&S.context.typingRef.current&&X.preventDefault()},onClick(X){const ee=F.current!=="touch",q=X.nativeEvent.pointerType,se=ee&&jl(X.nativeEvent)&&(q!==void 0||A),j=ee&&!se&&!G.current;G.current=!1,!(M||j)&&H(X.nativeEvent)},onPointerEnter(X){F.current=X.pointerType},onPointerMove(X){if(X.pointerType==="mouse"&&X.buttons===1){const ee=S.context.selectionRef.current;ee.dragY+=X.movementY,ee.dragY**2>=64&&(ee.allowUnselectedMouseUp=!0)}},onPointerDown(X){F.current=X.pointerType,G.current=!0,L()},onMouseUp(){if(L(),M||F.current==="touch"||G.current)return;const X=!S.context.selectionRef.current.allowSelectedMouseUp&&P,ee=!S.context.selectionRef.current.allowUnselectedMouseUp&&!P;X||ee||(G.current=!0,z.current?.click(),G.current=!1)}},K=Mt("div",n,{ref:[Y,a,b.ref,z],state:U,props:[w,$,y,J]}),V=v.useMemo(()=>({selected:P,index:D,textRef:h,selectedByFocus:I}),[P,D,h,I]);return x.jsx(sA.Provider,{value:V,children:K})})),IB=v.memo(v.forwardRef(function(n,a){const{render:o,className:s,style:u,keepMounted:c,selected:d,...p}=n,g=v.useRef(null),{transitionStatus:y,setMounted:h}=ws(d),S=Mt("span",n,{ref:[a,g],state:{selected:d,transitionStatus:y},props:[{"aria-hidden":!0,children:"✔️"},p],stateAttributesMapping:po});return ja({batch:!0,enabled:!d,open:d,ref:g,onComplete(){d||h(!1)}}),S})),kB=v.forwardRef(function(n,a){const{selected:o}=lA();return n.keepMounted||o?x.jsx(IB,{...n,selected:o,ref:a}):null}),PB=v.memo(v.forwardRef(function(n,a){const{index:o,textRef:s,selectedByFocus:u}=lA(),c=yo(),{render:d,className:p,style:g,...y}=n,h=v.useCallback(S=>{S&&(o===0&&(c.context.firstItemTextRef.current=S),u&&(c.context.selectedItemTextRef.current=S))},[c,o,u]);return Mt("div",n,{ref:[h,a,s],props:y})})),uA=v.forwardRef(function(n,a){const{render:o,className:s,style:u,direction:c,keepMounted:d,...p}=n,g=c==="up",y=yo(),{side:h,scrollDownArrowRef:b,scrollUpArrowRef:S}=ab(),w=g?"scrollUpArrowVisible":"scrollDownArrowVisible",C=y.useState(w),R=y.useState("openMethod"),T=C&&R!=="touch",O=Hn(),M=g?S:b,{mounted:A,transitionStatus:N,setMounted:P}=ws(T);_e(()=>(y.context.scrollArrowsMountedCountRef.current+=1,y.set("hasScrollArrows",!0),()=>{y.context.scrollArrowsMountedCountRef.current=Math.max(0,y.context.scrollArrowsMountedCountRef.current-1),y.context.scrollArrowsMountedCountRef.current===0&&y.set("hasScrollArrows",!1)}),[y]),ja({open:T,ref:M,onComplete(){T||P(!1)}});const z=Mt("div",n,{ref:[a,M],state:{direction:c,visible:T,side:h,transitionStatus:N},props:[{"aria-hidden":!0,children:g?"▲":"▼",style:{position:"absolute"},onMouseMove(G){if(G.movementX===0&&G.movementY===0||O.isStarted())return;y.set("activeIndex",null);function J(){const Y=y.state.listElement??y.context.popupRef.current;if(!Y)return;y.set("activeIndex",null),y.context.handleScrollArrowVisibility(Y);const U=rb(Y.scrollHeight,Y.clientHeight),H=Ih(Y.scrollTop,U),L=H===(g?0:U),$=y.context.listRef.current;if(H!==Y.scrollTop&&(Y.scrollTop=H),L){O.clear();return}if($.length>0){const K=M.current?.offsetHeight||0;Y.scrollTop=LB($,g,H,Y.clientHeight,K,U)}O.start(40,J)}O.start(40,J)},onMouseLeave(){O.clear()}},p],stateAttributesMapping:po});return A||d?z:null});function LB(e,n,a,o,s,u){if(n){let y=0;const h=a+s-Ba;for(let w=0;w<e.length;w+=1){const C=e[w];if(C&&C.offsetTop>=h){y=w;break}}const b=Math.max(0,y-1),S=e[b];return b<y&&S?Ih(S.offsetTop-s,u):0}let c=e.length-1;const d=a+o-s+Ba;for(let y=0;y<e.length;y+=1){const h=e[y];if(h&&h.offsetTop+h.offsetHeight>d){c=Math.max(0,y-1);break}}const p=Math.min(e.length-1,c+1),g=e[p];return p>c&&g?Ih(g.offsetTop+g.offsetHeight-o+s,u):u}const zB=v.forwardRef(function(n,a){return x.jsx(uA,{...n,ref:a,direction:"down"})}),_B=v.forwardRef(function(n,a){return x.jsx(uA,{...n,ref:a,direction:"up"})}),ob=hB;function ib({className:e,...n}){return x.jsx(xB,{"data-slot":"select-value",className:Qe("flex flex-1 text-left",e),...n})}function sb({className:e,size:n="default",children:a,...o}){return x.jsxs(vB,{"data-slot":"select-trigger","data-size":n,className:Qe("flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-input/20 px-2 py-1.5 text-xs/relaxed whitespace-nowrap transition-colors outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-7 data-[size=sm]:h-6 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",e),...o,children:[a,x.jsx(SB,{render:x.jsx(SC,{className:"pointer-events-none size-3.5 text-muted-foreground"})})]})}function lb({className:e,children:n,side:a="bottom",sideOffset:o=4,align:s="center",alignOffset:u=0,alignItemWithTrigger:c=!0,...d}){return x.jsx(wB,{children:x.jsx(EB,{side:a,sideOffset:o,align:s,alignOffset:u,alignItemWithTrigger:c,className:"isolate z-50",children:x.jsxs(AB,{"data-slot":"select-content","data-align-trigger":c,className:Qe("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...d,children:[x.jsx(HB,{}),x.jsx(NB,{children:n}),x.jsx(UB,{})]})})})}function ub({className:e,children:n,...a}){return x.jsxs(jB,{"data-slot":"select-item",className:Qe("relative flex min-h-7 w-full cursor-default items-center gap-2 rounded-md px-2 py-1 text-xs/relaxed outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...a,children:[x.jsx(PB,{className:"flex flex-1 shrink-0 gap-2 whitespace-nowrap",children:n}),x.jsx(kB,{render:x.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center"}),children:x.jsx(fp,{className:"pointer-events-none"})})]})}function HB({className:e,...n}){return x.jsx(_B,{"data-slot":"select-scroll-up-button",className:Qe("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-3.5",e),...n,children:x.jsx(Lk,{})})}function UB({className:e,...n}){return x.jsx(zB,{"data-slot":"select-scroll-down-button",className:Qe("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-3.5",e),...n,children:x.jsx(SC,{})})}const cA=["en-US","zh-CN","zh-TW","ja-JP"],FB={"en-US":"English","zh-CN":"简体中文","zh-TW":"繁體中文","ja-JP":"日本語"},BB={"nav.dashboard":"Dashboard","nav.library":"Library","nav.skills":"Skills","nav.instructions":"Instructions","nav.models":"Models","nav.genesis":"Genesis","nav.explorer":"Explorer","nav.quantum":"Quantum","instructions.create":"New instruction","instructions.createTitle":"New instruction","instructions.name":"Name","instructions.namePlaceholder":"e.g. Code review checklist","instructions.content":"Content","instructions.contentPlaceholder":"Write Markdown instructions. Content is saved as Markdown.","instructions.editorLoading":"Loading editor…","instructions.save":"Create instruction","instructions.creating":"Creating…","instructions.created":"Instruction created.","instructions.error":"Unable to create the instruction. Please try again.","instructions.editTitle":"Edit instruction","instructions.updateSave":"Save changes","instructions.updating":"Saving…","instructions.updated":"Instruction updated. Reapply enabled agents to write the new content.","instructions.updateError":"Unable to update the instruction. Please try again.","instructions.edit":"Edit","instructions.delete":"Delete","instructions.deleted":"Instruction deleted.","instructions.deleteError":"Unable to delete the instruction. Please try again.","instructions.deleteConfirmTitle":"Delete instruction?","instructions.deleteConfirmDescription":'"{{name}}" will be removed from the library and every agent. This cannot be undone.',"instructions.dragHint":"Drag an instruction to an agent","instructions.listAria":"Instructions","instructions.actionsAria":"Actions for {{name}}","instructions.emptyTitle":"No instructions yet","instructions.emptyDescription":"Create an instruction from the New instruction action in the page header.","instructions.loadError":"Unable to load instructions. Please try again.","agents.title":"Agents","agents.orderHint":"Order controls how instructions are combined","agents.loadError":"Unable to load agents. Please try again.","agents.updateError":"Unable to update the agent instructions.","agents.enableError":"Unable to update the agent.","agents.reapplyError":"Unable to reapply the agent instructions.","agents.reapplyHint":"Rewrite the managed instruction block.","agents.reapplyDisabledHint":"Enable instructions before reapplying.","agents.openFileError":"Unable to open the instruction file.","agents.fileMissing":"The instruction file does not exist yet.","agents.duplicateError":"This instruction is already assigned to the agent.","agents.applied":"Instructions applied.","agents.removed":"Foundry instructions removed.","agents.reapplied":"Instructions reapplied.","agents.enableRequiresInstruction":"Add at least one instruction first.","agents.toggleOnHint":"Remove Foundry instructions from this file.","agents.toggleOffHint":"Write Foundry instructions to this file.","agents.emptyAssigned":"Drag instructions here","agents.loadingInstruction":"Loading instruction…","agents.openFileAria":"Open instruction file for {{name}}","agents.reapplyAria":"Reapply instructions for {{name}}","agents.toggleAria":"Apply instructions to {{name}}","agents.removeInstructionAria":"Remove {{name}} from this agent","sidebar.teams":"Teams","sidebar.addTeam":"Add team","sidebar.team.acmeInc":"Acme Inc","sidebar.team.acmeCorp":"Acme Corp.","sidebar.team.evilCorp":"Evil Corp.","sidebar.plan.enterprise":"Enterprise","sidebar.plan.startup":"Startup","sidebar.plan.free":"Free","common.retry":"Retry","settings.downloadSkill":"Download Skill","settings.skillTargets":"Install targets","settings.aboutFoundrySkill":"About the Foundry Skill","settings.foundrySkillHint":"Download the Foundry Skill to teach agents how to operate Foundry through the Foundry CLI.","settings.downloadSkillDescription":"Choose user-level folders to install the Foundry agent skill. Existing copies will be replaced.","settings.skillDownloaded":"Skill installed.","settings.errors.downloadSkill":"Unable to download the skill. Please try again.","settings.errors.skillTargets":"Unable to load skill destinations. Please try again.","settings.downloadingSkill":"Downloading…","timeZone.losAngeles":"Los Angeles","timeZone.newYork":"New York","timeZone.shanghai":"Shanghai","timeZone.taipei":"Taipei","timeZone.tokyo":"Tokyo","timeZone.utc":"Coordinated Universal Time (UTC)","dataImport.title":"Import data","dataImport.passphrase":"Backup passphrase","dataImport.replaceAction":"Replace and import","dataImport.replaceWarning":"Importing completely replaces current Foundry data with this backup. Existing data will not be merged. This cannot be undone.","dataImport.error":"Unable to import data. Please try again.","dataImport.invalidBackup":"This backup is invalid or unsupported.","dataImport.invalidPassphrase":"The passphrase is incorrect or the backup is corrupted.","nav.settings":"Settings","settings.workspace":"Workspace","settings.appearance":"Appearance","settings.appearanceAria":"Appearance settings","settings.languageRegion":"Language & Region","settings.languageRegionAria":"Language & Region settings","settings.advanced":"Advanced","settings.advancedAria":"Advanced settings","settings.export":"Export","dataExport.title":"Export data","dataExport.action":"Export","dataExport.description":"Download an encrypted backup of your Foundry data.","dataExport.passphrase":"Passphrase","dataExport.confirmPassphrase":"Confirm passphrase","dataExport.passphraseHint":"Keep this passphrase. You will need it to import the backup; it cannot be recovered.","dataExport.passphraseMismatch":"The passphrases do not match.","dataExport.exporting":"Exporting…","dataExport.exported":"Backup download started.","dataExport.error":"Unable to export data. Please try again.","common.cancel":"Cancel","settings.import":"Import","settings.configFolder":"Config Folder","settings.openFolder":"Open","settings.copyConfigFolder":"Copy config folder path","settings.configFolderCopied":"Config folder path copied","settings.errors.copyConfigFolder":"Unable to copy the config folder path.","settings.errors.openConfigFolder":"Unable to open the config folder.","settings.language":"Language","settings.timeFormat":"Time format","settings.timeZone":"Time zone","settings.colorTheme":"Color theme","settings.navigation":"Settings navigation","settings.openNavigation":"Open settings navigation","settings.errors.load":"Unable to load settings.","settings.errors.theme":"Unable to update the color theme.","settings.errors.language":"Unable to update the language.","settings.errors.timeFormat":"Unable to update the time format.","settings.errors.timeZone":"Unable to update the time zone.","common.system":"System","theme.light":"Light","theme.dark":"Dark","a11y.goBack":"Go back","a11y.close":"Close","a11y.showPassword":"Reveal password","a11y.hidePassword":"Hide password","a11y.sidebar":"Sidebar","a11y.sidebarDescription":"Displays the mobile sidebar.","a11y.toggleSidebar":"Toggle sidebar"},VB={"nav.dashboard":"仪表盘","nav.library":"资料库","nav.skills":"技能","nav.instructions":"指令","nav.models":"模型","nav.genesis":"创世","nav.explorer":"探索","nav.quantum":"量子","instructions.create":"新建指令","instructions.createTitle":"新建指令","instructions.name":"名称","instructions.namePlaceholder":"例如:代码审查清单","instructions.content":"内容","instructions.contentPlaceholder":"编写 Markdown 指令。内容将以 Markdown 格式保存。","instructions.editorLoading":"正在加载编辑器…","instructions.save":"创建指令","instructions.creating":"创建中…","instructions.created":"指令已创建。","instructions.error":"无法创建指令,请重试。","instructions.editTitle":"编辑指令","instructions.updateSave":"保存修改","instructions.updating":"保存中…","instructions.updated":"指令已更新。对已启用的 Agent 执行重新写入后才会使用新内容。","instructions.updateError":"无法更新指令,请重试。","instructions.edit":"编辑","instructions.delete":"删除","instructions.deleted":"指令已删除。","instructions.deleteError":"无法删除指令,请重试。","instructions.deleteConfirmTitle":"删除指令?","instructions.deleteConfirmDescription":"“{{name}}”将从指令库和所有 Agent 中移除,此操作无法撤销。","instructions.dragHint":"将指令拖到 Agent 上","instructions.listAria":"指令列表","instructions.actionsAria":"{{name}} 的操作","instructions.emptyTitle":"还没有指令","instructions.emptyDescription":"使用页面右上角的“新建指令”操作创建第一条指令。","instructions.loadError":"无法加载指令,请重试。","agents.title":"Agents","agents.orderHint":"顺序决定指令的拼接方式","agents.loadError":"无法加载 Agent,请重试。","agents.updateError":"无法更新 Agent 的指令。","agents.enableError":"无法更新 Agent。","agents.reapplyError":"无法重新写入 Agent 指令。","agents.reapplyHint":"重新生成文件中的 Foundry 指令块。","agents.reapplyDisabledHint":"启用指令后才能重新写入。","agents.openFileError":"无法打开指令文件。","agents.fileMissing":"指令文件尚不存在。","agents.duplicateError":"该指令已经添加到此 Agent。","agents.applied":"指令已写入。","agents.removed":"Foundry 指令已移除。","agents.reapplied":"指令已重新写入。","agents.enableRequiresInstruction":"请先添加至少一条指令。","agents.toggleOnHint":"从文件中移除 Foundry 指令。","agents.toggleOffHint":"将 Foundry 指令写入此文件。","agents.emptyAssigned":"将指令拖到这里","agents.loadingInstruction":"正在加载指令…","agents.openFileAria":"打开 {{name}} 的指令文件","agents.reapplyAria":"重新写入 {{name}} 的指令","agents.toggleAria":"将指令应用到 {{name}}","agents.removeInstructionAria":"从此 Agent 移除 {{name}}","sidebar.teams":"团队","sidebar.addTeam":"添加团队","sidebar.team.acmeInc":"Acme Inc","sidebar.team.acmeCorp":"Acme Corp.","sidebar.team.evilCorp":"Evil Corp.","sidebar.plan.enterprise":"企业版","sidebar.plan.startup":"初创版","sidebar.plan.free":"免费版","common.retry":"重试","settings.downloadSkill":"下载 Skill","settings.skillTargets":"安装目标","settings.aboutFoundrySkill":"关于 Foundry Skill","settings.foundrySkillHint":"下载 Foundry Skill,让 Agent 了解如何通过 Foundry CLI 操作 Foundry。","settings.downloadSkillDescription":"选择用于安装 Foundry Agent Skill 的用户目录,已有副本将被替换。","settings.skillDownloaded":"Skill 已安装。","settings.errors.downloadSkill":"无法下载 Skill,请重试。","settings.errors.skillTargets":"无法加载 Skill 目标路径,请重试。","settings.downloadingSkill":"下载中…","timeZone.losAngeles":"洛杉矶","timeZone.newYork":"纽约","timeZone.shanghai":"上海","timeZone.taipei":"台北","timeZone.tokyo":"东京","timeZone.utc":"协调世界时(UTC)","dataImport.title":"导入数据","dataImport.passphrase":"备份密码","dataImport.replaceAction":"覆盖并导入","dataImport.replaceWarning":"导入会用备份完全覆盖当前 Foundry 数据,不会合并现有数据。此操作无法撤销。","dataImport.error":"无法导入数据,请重试。","dataImport.invalidBackup":"备份无效或不受支持。","dataImport.invalidPassphrase":"密码不正确或备份已损坏。","nav.settings":"设置","settings.workspace":"工作区","settings.appearance":"外观","settings.appearanceAria":"外观设置","settings.languageRegion":"语言和地区","settings.languageRegionAria":"语言和地区设置","settings.advanced":"高级","settings.advancedAria":"高级设置","settings.export":"导出","dataExport.title":"导出数据","dataExport.action":"导出","dataExport.description":"下载当前 Foundry 数据的加密备份。","dataExport.passphrase":"密码","dataExport.confirmPassphrase":"确认密码","dataExport.passphraseHint":"请保存此密码,导入备份时需要使用。密码无法找回。","dataExport.passphraseMismatch":"两次输入的密码不一致。","dataExport.exporting":"导出中…","dataExport.exported":"已开始下载数据备份。","dataExport.error":"无法导出数据,请重试。","common.cancel":"取消","settings.import":"导入","settings.configFolder":"配置文件夹","settings.openFolder":"打开","settings.copyConfigFolder":"复制配置文件夹路径","settings.configFolderCopied":"已复制配置文件夹路径","settings.errors.copyConfigFolder":"无法复制配置文件夹路径。","settings.errors.openConfigFolder":"无法打开配置文件夹。","settings.language":"语言","settings.timeFormat":"时间格式","settings.timeZone":"时区","settings.colorTheme":"颜色主题","settings.navigation":"设置导航","settings.openNavigation":"打开设置导航","settings.errors.load":"无法加载设置。","settings.errors.theme":"无法更新颜色主题。","settings.errors.language":"无法更新语言。","settings.errors.timeFormat":"无法更新时间格式。","settings.errors.timeZone":"无法更新时区。","common.system":"跟随系统","theme.light":"浅色","theme.dark":"深色","a11y.goBack":"返回","a11y.close":"关闭","a11y.showPassword":"显示密码","a11y.hidePassword":"隐藏密码","a11y.sidebar":"侧边栏","a11y.sidebarDescription":"显示移动端侧边栏。","a11y.toggleSidebar":"切换侧边栏"},qB={"nav.dashboard":"儀表板","nav.library":"資料庫","nav.skills":"技能","nav.instructions":"指令","nav.models":"模型","nav.genesis":"創世","nav.explorer":"探索","nav.quantum":"量子","instructions.create":"新增指令","instructions.createTitle":"新增指令","instructions.name":"名稱","instructions.namePlaceholder":"例如:程式碼審查清單","instructions.content":"內容","instructions.contentPlaceholder":"撰寫 Markdown 指令。內容將以 Markdown 格式儲存。","instructions.editorLoading":"正在載入編輯器…","instructions.save":"建立指令","instructions.creating":"建立中…","instructions.created":"指令已建立。","instructions.error":"無法建立指令,請重試。","instructions.editTitle":"編輯指令","instructions.updateSave":"儲存修改","instructions.updating":"儲存中…","instructions.updated":"指令已更新。對已啟用的 Agent 執行重新寫入後才會使用新內容。","instructions.updateError":"無法更新指令,請重試。","instructions.edit":"編輯","instructions.delete":"刪除","instructions.deleted":"指令已刪除。","instructions.deleteError":"無法刪除指令,請重試。","instructions.deleteConfirmTitle":"刪除指令?","instructions.deleteConfirmDescription":"「{{name}}」將從指令庫和所有 Agent 中移除,此操作無法復原。","instructions.dragHint":"將指令拖到 Agent 上","instructions.listAria":"指令列表","instructions.actionsAria":"{{name}} 的操作","instructions.emptyTitle":"尚無指令","instructions.emptyDescription":"使用頁面右上角的「新增指令」操作建立第一條指令。","instructions.loadError":"無法載入指令,請重試。","agents.title":"Agents","agents.orderHint":"順序決定指令的拼接方式","agents.loadError":"無法載入 Agent,請重試。","agents.updateError":"無法更新 Agent 的指令。","agents.enableError":"無法更新 Agent。","agents.reapplyError":"無法重新寫入 Agent 指令。","agents.reapplyHint":"重新產生檔案中的 Foundry 指令區塊。","agents.reapplyDisabledHint":"啟用指令後才能重新寫入。","agents.openFileError":"無法開啟指令檔案。","agents.fileMissing":"指令檔案尚不存在。","agents.duplicateError":"此指令已經加入此 Agent。","agents.applied":"指令已寫入。","agents.removed":"Foundry 指令已移除。","agents.reapplied":"指令已重新寫入。","agents.enableRequiresInstruction":"請先加入至少一條指令。","agents.toggleOnHint":"從檔案中移除 Foundry 指令。","agents.toggleOffHint":"將 Foundry 指令寫入此檔案。","agents.emptyAssigned":"將指令拖到這裡","agents.loadingInstruction":"正在載入指令…","agents.openFileAria":"開啟 {{name}} 的指令檔案","agents.reapplyAria":"重新寫入 {{name}} 的指令","agents.toggleAria":"將指令套用到 {{name}}","agents.removeInstructionAria":"從此 Agent 移除 {{name}}","sidebar.teams":"團隊","sidebar.addTeam":"新增團隊","sidebar.team.acmeInc":"Acme Inc","sidebar.team.acmeCorp":"Acme Corp.","sidebar.team.evilCorp":"Evil Corp.","sidebar.plan.enterprise":"企業版","sidebar.plan.startup":"新創版","sidebar.plan.free":"免費版","common.retry":"重試","settings.downloadSkill":"下載 Skill","settings.skillTargets":"安裝目標","settings.aboutFoundrySkill":"關於 Foundry Skill","settings.foundrySkillHint":"下載 Foundry Skill,讓 Agent 瞭解如何透過 Foundry CLI 操作 Foundry。","settings.downloadSkillDescription":"選擇用於安裝 Foundry Agent Skill 的使用者目錄,已有副本將被替換。","settings.skillDownloaded":"Skill 已安裝。","settings.errors.downloadSkill":"無法下載 Skill,請重試。","settings.errors.skillTargets":"無法載入 Skill 目標路徑,請重試。","settings.downloadingSkill":"下載中…","timeZone.losAngeles":"洛杉磯","timeZone.newYork":"紐約","timeZone.shanghai":"上海","timeZone.taipei":"臺北","timeZone.tokyo":"東京","timeZone.utc":"協調世界時(UTC)","dataImport.title":"匯入資料","dataImport.passphrase":"備份密碼","dataImport.replaceAction":"覆蓋並匯入","dataImport.replaceWarning":"匯入會以備份完全覆蓋目前的 Foundry 資料,不會合併現有資料。此操作無法復原。","dataImport.error":"無法匯入資料,請重試。","dataImport.invalidBackup":"備份無效或不受支援。","dataImport.invalidPassphrase":"密碼不正確或備份已損壞。","nav.settings":"設定","settings.workspace":"工作區","settings.appearance":"外觀","settings.appearanceAria":"外觀設定","settings.languageRegion":"語言與地區","settings.languageRegionAria":"語言與地區設定","settings.advanced":"進階","settings.advancedAria":"進階設定","settings.export":"匯出","dataExport.title":"匯出資料","dataExport.action":"匯出","dataExport.description":"下載目前 Foundry 資料的加密備份。","dataExport.passphrase":"密碼","dataExport.confirmPassphrase":"確認密碼","dataExport.passphraseHint":"請保留此密碼,匯入備份時需要使用。密碼無法復原。","dataExport.passphraseMismatch":"兩次輸入的密碼不一致。","dataExport.exporting":"匯出中…","dataExport.exported":"已開始下載資料備份。","dataExport.error":"無法匯出資料,請重試。","common.cancel":"取消","settings.import":"匯入","settings.configFolder":"設定資料夾","settings.openFolder":"開啟","settings.copyConfigFolder":"複製設定資料夾路徑","settings.configFolderCopied":"已複製設定資料夾路徑","settings.errors.copyConfigFolder":"無法複製設定資料夾路徑。","settings.errors.openConfigFolder":"無法開啟設定資料夾。","settings.language":"語言","settings.timeFormat":"時間格式","settings.timeZone":"時區","settings.colorTheme":"色彩主題","settings.navigation":"設定導覽","settings.openNavigation":"開啟設定導覽","settings.errors.load":"無法載入設定。","settings.errors.theme":"無法更新色彩主題。","settings.errors.language":"無法更新語言。","settings.errors.timeFormat":"無法更新時間格式。","settings.errors.timeZone":"無法更新時區。","common.system":"跟隨系統","theme.light":"淺色","theme.dark":"深色","a11y.goBack":"返回","a11y.close":"關閉","a11y.showPassword":"顯示密碼","a11y.hidePassword":"隱藏密碼","a11y.sidebar":"側邊欄","a11y.sidebarDescription":"顯示行動版側邊欄。","a11y.toggleSidebar":"切換側邊欄"},YB={"nav.dashboard":"ダッシュボード","nav.library":"ライブラリ","nav.skills":"スキル","nav.instructions":"指示","nav.models":"モデル","nav.genesis":"ジェネシス","nav.explorer":"エクスプローラー","nav.quantum":"クォンタム","instructions.create":"新しい指示","instructions.createTitle":"新しい指示","instructions.name":"名前","instructions.namePlaceholder":"例:コードレビューチェックリスト","instructions.content":"内容","instructions.contentPlaceholder":"Markdown の指示を入力。内容は Markdown 形式で保存されます。","instructions.editorLoading":"エディターを読み込み中…","instructions.save":"指示を作成","instructions.creating":"作成中…","instructions.created":"指示を作成しました。","instructions.error":"指示を作成できませんでした。もう一度お試しください。","instructions.editTitle":"指示を編集","instructions.updateSave":"変更を保存","instructions.updating":"保存中…","instructions.updated":"指示を更新しました。有効な Agent は再書き込みすると新しい内容が反映されます。","instructions.updateError":"指示を更新できませんでした。もう一度お試しください。","instructions.edit":"編集","instructions.delete":"削除","instructions.deleted":"指示を削除しました。","instructions.deleteError":"指示を削除できませんでした。もう一度お試しください。","instructions.deleteConfirmTitle":"指示を削除しますか?","instructions.deleteConfirmDescription":"「{{name}}」はライブラリとすべての Agent から削除されます。この操作は取り消せません。","instructions.dragHint":"指示を Agent にドラッグ","instructions.listAria":"指示一覧","instructions.actionsAria":"{{name}} の操作","instructions.emptyTitle":"指示はまだありません","instructions.emptyDescription":"ページ右上の「新しい指示」から最初の指示を作成してください。","instructions.loadError":"指示を読み込めませんでした。もう一度お試しください。","agents.title":"Agents","agents.orderHint":"順序が指示の結合順になります","agents.loadError":"Agent を読み込めませんでした。もう一度お試しください。","agents.updateError":"Agent の指示を更新できませんでした。","agents.enableError":"Agent を更新できませんでした。","agents.reapplyError":"Agent の指示を再書き込みできませんでした。","agents.reapplyHint":"管理対象の指示ブロックを再生成します。","agents.reapplyDisabledHint":"再書き込みするには指示を有効にしてください。","agents.openFileError":"指示ファイルを開けませんでした。","agents.fileMissing":"指示ファイルはまだ存在しません。","agents.duplicateError":"この指示はすでに Agent に追加されています。","agents.applied":"指示を書き込みました。","agents.removed":"Foundry の指示を削除しました。","agents.reapplied":"指示を再書き込みしました。","agents.enableRequiresInstruction":"先に指示を 1 つ以上追加してください。","agents.toggleOnHint":"このファイルから Foundry の指示を削除します。","agents.toggleOffHint":"Foundry の指示をこのファイルに書き込みます。","agents.emptyAssigned":"ここに指示をドラッグ","agents.loadingInstruction":"指示を読み込み中…","agents.openFileAria":"{{name}} の指示ファイルを開く","agents.reapplyAria":"{{name}} の指示を再書き込み","agents.toggleAria":"{{name}} に指示を適用","agents.removeInstructionAria":"この Agent から {{name}} を削除","sidebar.teams":"チーム","sidebar.addTeam":"チームを追加","sidebar.team.acmeInc":"Acme Inc","sidebar.team.acmeCorp":"Acme Corp.","sidebar.team.evilCorp":"Evil Corp.","sidebar.plan.enterprise":"エンタープライズ","sidebar.plan.startup":"スタートアップ","sidebar.plan.free":"無料","common.retry":"再試行","settings.downloadSkill":"Skill をダウンロード","settings.skillTargets":"インストール先","settings.aboutFoundrySkill":"Foundry Skill について","settings.foundrySkillHint":"Foundry Skill をダウンロードして、Agent に Foundry CLI を使った Foundry の操作方法を伝えます。","settings.downloadSkillDescription":"Foundry Agent Skill のインストール先を選択します。既存のコピーは置き換えられます。","settings.skillDownloaded":"Skill をインストールしました。","settings.errors.downloadSkill":"Skill をダウンロードできません。再試行してください。","settings.errors.skillTargets":"Skill の保存先を取得できません。再試行してください。","settings.downloadingSkill":"ダウンロード中…","timeZone.losAngeles":"ロサンゼルス","timeZone.newYork":"ニューヨーク","timeZone.shanghai":"上海","timeZone.taipei":"台北","timeZone.tokyo":"東京","timeZone.utc":"協定世界時(UTC)","dataImport.title":"データをインポート","dataImport.passphrase":"バックアップのパスフレーズ","dataImport.replaceAction":"上書きしてインポート","dataImport.replaceWarning":"現在の Foundry データはバックアップの内容で完全に置き換えられます。既存データとの結合は行われません。この操作は取り消せません。","dataImport.error":"データをインポートできませんでした。もう一度お試しください。","dataImport.invalidBackup":"バックアップが無効または未対応です。","dataImport.invalidPassphrase":"パスフレーズが違うか、バックアップが破損しています。","nav.settings":"設定","settings.workspace":"ワークスペース","settings.appearance":"外観","settings.appearanceAria":"外観設定","settings.languageRegion":"言語と地域","settings.languageRegionAria":"言語と地域の設定","settings.advanced":"詳細設定","settings.advancedAria":"詳細設定","settings.export":"エクスポート","dataExport.title":"データをエクスポート","dataExport.action":"エクスポート","dataExport.description":"Foundry のデータを暗号化したバックアップとしてダウンロードします。","dataExport.passphrase":"パスフレーズ","dataExport.confirmPassphrase":"パスフレーズの確認","dataExport.passphraseHint":"インポート時に必要なため、このパスフレーズを保管してください。復元はできません。","dataExport.passphraseMismatch":"パスフレーズが一致しません。","dataExport.exporting":"エクスポート中…","dataExport.exported":"バックアップのダウンロードを開始しました。","dataExport.error":"データをエクスポートできませんでした。もう一度お試しください。","common.cancel":"キャンセル","settings.import":"インポート","settings.configFolder":"設定フォルダー","settings.openFolder":"開く","settings.copyConfigFolder":"設定フォルダーのパスをコピー","settings.configFolderCopied":"設定フォルダーのパスをコピーしました","settings.errors.copyConfigFolder":"設定フォルダーのパスをコピーできませんでした。","settings.errors.openConfigFolder":"設定フォルダーを開けませんでした。","settings.language":"言語","settings.timeFormat":"時刻形式","settings.timeZone":"タイムゾーン","settings.colorTheme":"カラーテーマ","settings.navigation":"設定ナビゲーション","settings.openNavigation":"設定ナビゲーションを開く","settings.errors.load":"設定を読み込めませんでした。","settings.errors.theme":"カラーテーマを更新できませんでした。","settings.errors.language":"言語を更新できませんでした。","settings.errors.timeFormat":"時刻形式を更新できませんでした。","settings.errors.timeZone":"タイムゾーンを更新できませんでした。","common.system":"システム","theme.light":"ライト","theme.dark":"ダーク","a11y.goBack":"戻る","a11y.close":"閉じる","a11y.showPassword":"パスワードを表示","a11y.hidePassword":"パスワードを非表示","a11y.sidebar":"サイドバー","a11y.sidebarDescription":"モバイル用サイドバーを表示します。","a11y.toggleSidebar":"サイドバーを切り替える"},KB={"en-US":{translation:BB},"zh-CN":{translation:VB},"zh-TW":{translation:qB},"ja-JP":{translation:YB}};function GB({value:e,onValueChange:n,disabled:a=!1}){const{t:o}=sn(),s=[{value:"system",label:o("common.system")},...cA.map(u=>({value:u,label:FB[u]}))];return x.jsx(Ii,{label:o("settings.language"),children:x.jsxs(ob,{items:s,value:e,onValueChange:u=>{u&&n(u)},disabled:a,children:[x.jsx(sb,{"aria-label":o("settings.language"),className:"w-52",children:x.jsx(ib,{})}),x.jsx(lb,{children:s.map(u=>x.jsx(ub,{value:u.value,children:u.label},u.value))})]})})}const $B=["YYYY-MM-DD HH:mm:ss","YYYY-MM-DD","YYYY/MM/DD HH:mm:ss","DD/MM/YYYY HH:mm:ss","MM/DD/YYYY hh:mm:ss A","HH:mm:ss"],XB=["America/Los_Angeles","America/New_York","Asia/Shanghai","Asia/Taipei","Asia/Tokyo","UTC"],QB=1,ZB="settings.changed",FR=$B.map(e=>({value:e,label:e}));function JB({value:e,onValueChange:n,disabled:a=!1}){const{t:o}=sn();return x.jsx(Ii,{label:o("settings.timeFormat"),children:x.jsxs(ob,{items:FR,value:e,onValueChange:s=>{s&&n(s)},disabled:a,children:[x.jsx(sb,{"aria-label":o("settings.timeFormat"),className:"w-52",children:x.jsx(ib,{})}),x.jsx(lb,{children:FR.map(s=>x.jsx(ub,{value:s.value,children:s.label},s.value))})]})})}const WB={"America/Los_Angeles":"timeZone.losAngeles","America/New_York":"timeZone.newYork","Asia/Shanghai":"timeZone.shanghai","Asia/Taipei":"timeZone.taipei","Asia/Tokyo":"timeZone.tokyo",UTC:"timeZone.utc"};function e9({value:e,onValueChange:n,disabled:a=!1}){const{t:o}=sn(),s=XB.map(u=>({value:u,label:o(WB[u])}));return x.jsx(Ii,{label:o("settings.timeZone"),children:x.jsxs(ob,{items:s,value:e,onValueChange:u=>{u&&n(u)},disabled:a,children:[x.jsx(sb,{"aria-label":o("settings.timeZone"),className:"w-52",children:x.jsx(ib,{})}),x.jsx(lb,{children:s.map(u=>x.jsx(ub,{value:u.value,children:u.label},u.value))})]})})}const xi=["settings"],nh=["settings","update"];function cb(){const{t:e}=sn(),n=Bo(),a=$P({mutationKey:nh})>0,o=hp({queryKey:xi,queryFn:({signal:h})=>c7(h),staleTime:1/0,retry:!1}),s=Ma({mutationKey:nh,mutationFn:d7,onMutate:async h=>{await n.cancelQueries({queryKey:xi});const b=n.getQueryData(xi);return b&&n.setQueryData(xi,t9(b,h)),{previous:b}},onSuccess:h=>{n.setQueryData(xi,h)},onError:(h,b,S)=>{S?.previous&&n.setQueryData(xi,S.previous),_n.error(e(n9(b)))},onSettled:()=>n.invalidateQueries({queryKey:xi})}),u=o.data??null,c=u?.workspace.appearance["color-theme"]??"system",d=u?.workspace["language-region"].language??"system",p=u?.workspace["language-region"]["time-format"]??"YYYY-MM-DD HH:mm:ss",g=u?.workspace["language-region"]["time-zone"]??"America/Los_Angeles";function y(h){!u||n.isMutating({mutationKey:nh})>0||s.mutate(h)}return{settings:u,theme:c,language:d,timeFormat:p,timeZone:g,isLoading:o.isPending,isUpdating:a,setTheme:h=>{h!==c&&y({theme:h})},setLanguage:h=>{h!==d&&y({language:h})},setTimeFormat:h=>{h!==p&&y({timeFormat:h})},setTimeZone:h=>{h!==g&&y({timezone:h})}}}function t9(e,n){const a=e.workspace,o=a["language-region"];return{...e,workspace:{appearance:{"color-theme":n.theme??a.appearance["color-theme"]},"language-region":{language:n.language??o.language,"time-format":n.timeFormat??o["time-format"],"time-zone":n.timezone??o["time-zone"]}}}}function n9(e){return e.theme!==void 0?"settings.errors.theme":e.language!==void 0?"settings.errors.language":e.timeFormat!==void 0?"settings.errors.timeFormat":"settings.errors.timeZone"}const us=[{id:"appearance",labelKey:"settings.appearance",ariaKey:"settings.appearanceAria",icon:eP},{id:"language-region",labelKey:"settings.languageRegion",ariaKey:"settings.languageRegionAria",icon:$k},{id:"advanced",labelKey:"settings.advanced",ariaKey:"settings.advancedAria",icon:iP}];function r9(){const{t:e}=sn(),[n,a]=mz(),o=us.find(({id:O})=>O===n.get("panel"))?.id??us[0].id,s=O=>{a(M=>{const A=new URLSearchParams(M);return A.set("panel",O),A})},{settings:u,theme:c,language:d,timeFormat:p,timeZone:g,isLoading:y,isUpdating:h,setTheme:b,setLanguage:S,setTimeFormat:w,setTimeZone:C}=cb(),R=us.find(O=>O.id===o)?.ariaKey??"settings.appearanceAria",T=us.find(O=>O.id===o)?.labelKey??"settings.appearance";return x.jsxs("div",{className:`
|
|
133
|
-
grid h-full min-h-0 grid-cols-[260px_minmax(0,1fr)]
|
|
134
|
-
max-[680px]:grid-cols-1
|
|
135
|
-
`,children:[x.jsx("aside",{className:`
|
|
136
|
-
hidden min-h-0 overflow-y-auto p-4
|
|
137
|
-
min-[680px]:block
|
|
138
|
-
`,children:x.jsx(a9,{activeSection:o,onSectionChange:s})}),x.jsxs("section",{"aria-label":e(R),className:"min-h-0 overflow-y-auto p-4",children:[x.jsxs("div",{className:`
|
|
139
|
-
mb-3 flex items-center gap-3
|
|
140
|
-
min-[680px]:hidden
|
|
141
|
-
`,children:[x.jsxs(Op,{children:[x.jsx(Mp,{render:x.jsx(Jt,{type:"button",variant:"outline",size:"icon","aria-label":e("settings.openNavigation")}),children:x.jsx(Jk,{})}),x.jsx(Ap,{side:"bottom",align:"start",sideOffset:8,"aria-label":e("settings.navigation"),className:"w-56",children:x.jsxs(wh,{children:[x.jsx(_v,{children:e("settings.workspace")}),x.jsx(n6,{value:o,onValueChange:O=>{const M=us.find(({id:A})=>A===O);M&&s(M.id)},children:us.map(({id:O,labelKey:M,icon:A})=>x.jsxs(r6,{value:O,closeOnClick:!0,children:[x.jsx(A,{}),e(M)]},O))})]})})]}),x.jsx("span",{className:"min-w-0 truncate text-sm font-medium",children:e(T)})]}),x.jsxs(Lo,{className:"gap-0 py-0",children:[y&&x.jsxs("div",{className:`
|
|
142
|
-
flex flex-col items-start gap-3 p-4
|
|
143
|
-
min-[680px]:min-h-16 min-[680px]:flex-row
|
|
144
|
-
min-[680px]:items-center min-[680px]:justify-between
|
|
145
|
-
min-[680px]:gap-8
|
|
146
|
-
`,children:[x.jsx(ca,{className:"h-4 w-24"}),x.jsxs("div",{className:"flex items-center gap-6",children:[x.jsx(ca,{className:"h-4 w-16"}),x.jsx(ca,{className:"h-4 w-10"}),x.jsx(ca,{className:"h-4 w-10"})]})]}),!y&&o==="appearance"&&x.jsx(oB,{value:c,onValueChange:O=>{b(O)},disabled:h||!u}),!y&&o==="language-region"&&x.jsxs("div",{className:"divide-y",children:[x.jsx(GB,{value:d,onValueChange:O=>{S(O)},disabled:h||!u}),x.jsx(e9,{value:g,onValueChange:O=>{C(O)},disabled:h||!u}),x.jsx(JB,{value:p,onValueChange:O=>{w(O)},disabled:h||!u})]}),!y&&o==="advanced"&&x.jsxs("div",{className:"divide-y",children:[x.jsx(_7,{disabled:h||!u}),x.jsx(V7,{disabled:h||!u}),x.jsx(m7,{configFolder:u?.configFolder}),x.jsx(M7,{disabled:h||!u})]})]})]})]})}function a9({activeSection:e,onSectionChange:n}){const{t:a}=sn();return x.jsx("nav",{"aria-label":a("settings.navigation"),children:x.jsxs(Lo,{size:"sm",children:[x.jsx(QU,{children:x.jsx("h2",{className:"text-xs font-medium text-muted-foreground",children:a("settings.workspace")})}),x.jsx(ZU,{className:"flex flex-col gap-1",children:us.map(({id:o,labelKey:s,icon:u})=>{const c=o===e;return x.jsxs(Jt,{type:"button",variant:c?"secondary":"ghost","aria-current":c?"page":void 0,onClick:()=>{n(o)},className:"w-full justify-start gap-2",children:[x.jsx(u,{className:c?void 0:"text-muted-foreground"}),x.jsx("span",{children:a(s)})]},o)})})]})})}dr.use(h8).init({resources:KB,lng:dA(),fallbackLng:"en-US",supportedLngs:[...cA],keySeparator:!1,interpolation:{escapeValue:!1},react:{useSuspense:!1}});function dA(){const e=new Intl.DateTimeFormat().resolvedOptions().locale.toLowerCase();return e.startsWith("zh-tw")||e.startsWith("zh-hk")||e.startsWith("zh-mo")||e.startsWith("zh-hant")?"zh-TW":e.startsWith("zh")?"zh-CN":e.startsWith("ja")?"ja-JP":"en-US"}function o9(){const e=Bo();v.useEffect(()=>{const n=new EventSource("/api/events"),a=()=>{e.invalidateQueries({queryKey:xi,refetchType:e.isMutating({mutationKey:nh})>0?"none":"active"})},o=s=>{try{const u=JSON.parse(s.data);typeof u=="object"&&u!==null&&"version"in u&&u.version===QB&&"type"in u&&u.type===ZB&&a()}catch{}};return n.addEventListener("open",a),n.addEventListener("foundry",o),()=>{n.removeEventListener("open",a),n.removeEventListener("foundry",o),n.close()}},[e])}const Ly=matchMedia("(prefers-color-scheme: dark)");function i9(e){return Ly.addEventListener("change",e),()=>Ly.removeEventListener("change",e)}function s9(){return Ly.matches?"dark":"light"}function l9({children:e}){o9();const{theme:n,language:a}=cb(),o=v.useSyncExternalStore(i9,s9),s=n==="system"?o:n,u=a==="system"?dA():a;return v.useLayoutEffect(()=>{const c=document.documentElement;c.classList.toggle("dark",s==="dark"),c.style.colorScheme=s},[s]),v.useLayoutEffect(()=>{dr.changeLanguage(u),document.documentElement.lang=u},[u]),e}const u9=new LP({queryCache:new vT({onError:(e,n)=>{n.queryKey[0]==="skill-targets"?_n.error(dr.t("settings.errors.skillTargets")):n.queryKey[0]==="settings"&&_n.error(dr.t("settings.errors.load"))}})});function c9(){return null}const d9=cz([{element:x.jsx(eH,{}),children:X8.map(e=>({path:e,element:e==="/library/instructions"?x.jsx(s7,{}):x.jsx(c9,{})}))},{element:x.jsx(tH,{}),children:[{path:"/settings",element:x.jsx(r9,{}),handle:{backTo:"/dashboard"}}]},{path:"*",element:x.jsx(_L,{to:"/dashboard",replace:!0})}]);function f9(){return x.jsx(dP,{client:u9,children:x.jsx(VI,{children:x.jsx(l9,{children:x.jsx(h9,{})})})})}function h9(){const{theme:e}=cb();return x.jsxs(x.Fragment,{children:[x.jsx(wz,{router:d9}),x.jsx(cP,{theme:e})]})}QN.createRoot(document.getElementById("root")).render(x.jsx(v.StrictMode,{children:x.jsx(f9,{})}));export{Ne as W,t7 as _,x as j,v as r,sn as u};
|