ldrouter 1.6.2 → 1.6.7

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.
@@ -0,0 +1,256 @@
1
+ var ty=a=>{throw TypeError(a)};var ny=(a,l,o)=>l.has(a)||ty("Cannot "+o);var Pt=(a,l,o)=>(ny(a,l,"read from private field"),o?o.call(a):l.get(a)),ay=(a,l,o)=>l.has(a)?ty("Cannot add the same private member more than once"):l instanceof WeakSet?l.add(a):l.set(a,o),nf=(a,l,o,i)=>(ny(a,l,"write to private field"),i?i.call(a,o):l.set(a,o),o);function Ew(a,l){for(var o=0;o<l.length;o++){const i=l[o];if(typeof i!="string"&&!Array.isArray(i)){for(const u in i)if(u!=="default"&&!(u in a)){const f=Object.getOwnPropertyDescriptor(i,u);f&&Object.defineProperty(a,u,f.get?f:{enumerable:!0,get:()=>i[u]})}}}return Object.freeze(Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}))}(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))i(u);new MutationObserver(u=>{for(const f of u)if(f.type==="childList")for(const h of f.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&i(h)}).observe(document,{childList:!0,subtree:!0});function o(u){const f={};return u.integrity&&(f.integrity=u.integrity),u.referrerPolicy&&(f.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?f.credentials="include":u.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function i(u){if(u.ep)return;u.ep=!0;const f=o(u);fetch(u.href,f)}})();function eh(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var af={exports:{}},mi={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var ly;function Rw(){if(ly)return mi;ly=1;var a=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function o(i,u,f){var h=null;if(f!==void 0&&(h=""+f),u.key!==void 0&&(h=""+u.key),"key"in u){f={};for(var m in u)m!=="key"&&(f[m]=u[m])}else f=u;return u=f.ref,{$$typeof:a,type:i,key:h,ref:u!==void 0?u:null,props:f}}return mi.Fragment=l,mi.jsx=o,mi.jsxs=o,mi}var ry;function Tw(){return ry||(ry=1,af.exports=Rw()),af.exports}var s=Tw(),lf={exports:{}},Re={};/**
10
+ * @license React
11
+ * react.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var oy;function Nw(){if(oy)return Re;oy=1;var a=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),h=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),S=Symbol.for("react.activity"),b=Symbol.iterator;function x(M){return M===null||typeof M!="object"?null:(M=b&&M[b]||M["@@iterator"],typeof M=="function"?M:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,E={};function R(M,B,$){this.props=M,this.context=B,this.refs=E,this.updater=$||T}R.prototype.isReactComponent={},R.prototype.setState=function(M,B){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,B,"setState")},R.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function A(){}A.prototype=R.prototype;function N(M,B,$){this.props=M,this.context=B,this.refs=E,this.updater=$||T}var O=N.prototype=new A;O.constructor=N,j(O,R.prototype),O.isPureReactComponent=!0;var H=Array.isArray;function P(){}var z={H:null,A:null,T:null,S:null},U=Object.prototype.hasOwnProperty;function ee(M,B,$){var ne=$.ref;return{$$typeof:a,type:M,key:B,ref:ne!==void 0?ne:null,props:$}}function se(M,B){return ee(M.type,B,M.props)}function oe(M){return typeof M=="object"&&M!==null&&M.$$typeof===a}function J(M){var B={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function($){return B[$]})}var ie=/\/+/g;function ce(M,B){return typeof M=="object"&&M!==null&&M.key!=null?J(""+M.key):B.toString(36)}function me(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(P,P):(M.status="pending",M.then(function(B){M.status==="pending"&&(M.status="fulfilled",M.value=B)},function(B){M.status==="pending"&&(M.status="rejected",M.reason=B)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function L(M,B,$,ne,ue){var X=typeof M;(X==="undefined"||X==="boolean")&&(M=null);var ae=!1;if(M===null)ae=!0;else switch(X){case"bigint":case"string":case"number":ae=!0;break;case"object":switch(M.$$typeof){case a:case l:ae=!0;break;case w:return ae=M._init,L(ae(M._payload),B,$,ne,ue)}}if(ae)return ue=ue(M),ae=ne===""?"."+ce(M,0):ne,H(ue)?($="",ae!=null&&($=ae.replace(ie,"$&/")+"/"),L(ue,B,$,"",function(De){return De})):ue!=null&&(oe(ue)&&(ue=se(ue,$+(ue.key==null||M&&M.key===ue.key?"":(""+ue.key).replace(ie,"$&/")+"/")+ae)),B.push(ue)),1;ae=0;var le=ne===""?".":ne+":";if(H(M))for(var fe=0;fe<M.length;fe++)ne=M[fe],X=le+ce(ne,fe),ae+=L(ne,B,$,X,ue);else if(fe=x(M),typeof fe=="function")for(M=fe.call(M),fe=0;!(ne=M.next()).done;)ne=ne.value,X=le+ce(ne,fe++),ae+=L(ne,B,$,X,ue);else if(X==="object"){if(typeof M.then=="function")return L(me(M),B,$,ne,ue);throw B=String(M),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return ae}function I(M,B,$){if(M==null)return M;var ne=[],ue=0;return L(M,ne,"","",function(X){return B.call($,X,ue++)}),ne}function te(M){if(M._status===-1){var B=M._result;B=B(),B.then(function($){(M._status===0||M._status===-1)&&(M._status=1,M._result=$)},function($){(M._status===0||M._status===-1)&&(M._status=2,M._result=$)}),M._status===-1&&(M._status=0,M._result=B)}if(M._status===1)return M._result.default;throw M._result}var W=typeof reportError=="function"?reportError:function(M){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",M);return}console.error(M)},Z={map:I,forEach:function(M,B,$){I(M,function(){B.apply(this,arguments)},$)},count:function(M){var B=0;return I(M,function(){B++}),B},toArray:function(M){return I(M,function(B){return B})||[]},only:function(M){if(!oe(M))throw Error("React.Children.only expected to receive a single React element child.");return M}};return Re.Activity=S,Re.Children=Z,Re.Component=R,Re.Fragment=o,Re.Profiler=u,Re.PureComponent=N,Re.StrictMode=i,Re.Suspense=g,Re.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=z,Re.__COMPILER_RUNTIME={__proto__:null,c:function(M){return z.H.useMemoCache(M)}},Re.cache=function(M){return function(){return M.apply(null,arguments)}},Re.cacheSignal=function(){return null},Re.cloneElement=function(M,B,$){if(M==null)throw Error("The argument must be a React element, but you passed "+M+".");var ne=j({},M.props),ue=M.key;if(B!=null)for(X in B.key!==void 0&&(ue=""+B.key),B)!U.call(B,X)||X==="key"||X==="__self"||X==="__source"||X==="ref"&&B.ref===void 0||(ne[X]=B[X]);var X=arguments.length-2;if(X===1)ne.children=$;else if(1<X){for(var ae=Array(X),le=0;le<X;le++)ae[le]=arguments[le+2];ne.children=ae}return ee(M.type,ue,ne)},Re.createContext=function(M){return M={$$typeof:h,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:f,_context:M},M},Re.createElement=function(M,B,$){var ne,ue={},X=null;if(B!=null)for(ne in B.key!==void 0&&(X=""+B.key),B)U.call(B,ne)&&ne!=="key"&&ne!=="__self"&&ne!=="__source"&&(ue[ne]=B[ne]);var ae=arguments.length-2;if(ae===1)ue.children=$;else if(1<ae){for(var le=Array(ae),fe=0;fe<ae;fe++)le[fe]=arguments[fe+2];ue.children=le}if(M&&M.defaultProps)for(ne in ae=M.defaultProps,ae)ue[ne]===void 0&&(ue[ne]=ae[ne]);return ee(M,X,ue)},Re.createRef=function(){return{current:null}},Re.forwardRef=function(M){return{$$typeof:m,render:M}},Re.isValidElement=oe,Re.lazy=function(M){return{$$typeof:w,_payload:{_status:-1,_result:M},_init:te}},Re.memo=function(M,B){return{$$typeof:v,type:M,compare:B===void 0?null:B}},Re.startTransition=function(M){var B=z.T,$={};z.T=$;try{var ne=M(),ue=z.S;ue!==null&&ue($,ne),typeof ne=="object"&&ne!==null&&typeof ne.then=="function"&&ne.then(P,W)}catch(X){W(X)}finally{B!==null&&$.types!==null&&(B.types=$.types),z.T=B}},Re.unstable_useCacheRefresh=function(){return z.H.useCacheRefresh()},Re.use=function(M){return z.H.use(M)},Re.useActionState=function(M,B,$){return z.H.useActionState(M,B,$)},Re.useCallback=function(M,B){return z.H.useCallback(M,B)},Re.useContext=function(M){return z.H.useContext(M)},Re.useDebugValue=function(){},Re.useDeferredValue=function(M,B){return z.H.useDeferredValue(M,B)},Re.useEffect=function(M,B){return z.H.useEffect(M,B)},Re.useEffectEvent=function(M){return z.H.useEffectEvent(M)},Re.useId=function(){return z.H.useId()},Re.useImperativeHandle=function(M,B,$){return z.H.useImperativeHandle(M,B,$)},Re.useInsertionEffect=function(M,B){return z.H.useInsertionEffect(M,B)},Re.useLayoutEffect=function(M,B){return z.H.useLayoutEffect(M,B)},Re.useMemo=function(M,B){return z.H.useMemo(M,B)},Re.useOptimistic=function(M,B){return z.H.useOptimistic(M,B)},Re.useReducer=function(M,B,$){return z.H.useReducer(M,B,$)},Re.useRef=function(M){return z.H.useRef(M)},Re.useState=function(M){return z.H.useState(M)},Re.useSyncExternalStore=function(M,B,$){return z.H.useSyncExternalStore(M,B,$)},Re.useTransition=function(){return z.H.useTransition()},Re.version="19.2.8",Re}var iy;function th(){return iy||(iy=1,lf.exports=Nw()),lf.exports}var p=th();const re=eh(p),ho=Ew({__proto__:null,default:re},[p]);var rf={exports:{}},pi={},of={exports:{}},sf={};/**
18
+ * @license React
19
+ * scheduler.production.js
20
+ *
21
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var sy;function Aw(){return sy||(sy=1,(function(a){function l(L,I){var te=L.length;L.push(I);e:for(;0<te;){var W=te-1>>>1,Z=L[W];if(0<u(Z,I))L[W]=I,L[te]=Z,te=W;else break e}}function o(L){return L.length===0?null:L[0]}function i(L){if(L.length===0)return null;var I=L[0],te=L.pop();if(te!==I){L[0]=te;e:for(var W=0,Z=L.length,M=Z>>>1;W<M;){var B=2*(W+1)-1,$=L[B],ne=B+1,ue=L[ne];if(0>u($,te))ne<Z&&0>u(ue,$)?(L[W]=ue,L[ne]=te,W=ne):(L[W]=$,L[B]=te,W=B);else if(ne<Z&&0>u(ue,te))L[W]=ue,L[ne]=te,W=ne;else break e}}return I}function u(L,I){var te=L.sortIndex-I.sortIndex;return te!==0?te:L.id-I.id}if(a.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;a.unstable_now=function(){return f.now()}}else{var h=Date,m=h.now();a.unstable_now=function(){return h.now()-m}}var g=[],v=[],w=1,S=null,b=3,x=!1,T=!1,j=!1,E=!1,R=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;function O(L){for(var I=o(v);I!==null;){if(I.callback===null)i(v);else if(I.startTime<=L)i(v),I.sortIndex=I.expirationTime,l(g,I);else break;I=o(v)}}function H(L){if(j=!1,O(L),!T)if(o(g)!==null)T=!0,P||(P=!0,J());else{var I=o(v);I!==null&&me(H,I.startTime-L)}}var P=!1,z=-1,U=5,ee=-1;function se(){return E?!0:!(a.unstable_now()-ee<U)}function oe(){if(E=!1,P){var L=a.unstable_now();ee=L;var I=!0;try{e:{T=!1,j&&(j=!1,A(z),z=-1),x=!0;var te=b;try{t:{for(O(L),S=o(g);S!==null&&!(S.expirationTime>L&&se());){var W=S.callback;if(typeof W=="function"){S.callback=null,b=S.priorityLevel;var Z=W(S.expirationTime<=L);if(L=a.unstable_now(),typeof Z=="function"){S.callback=Z,O(L),I=!0;break t}S===o(g)&&i(g),O(L)}else i(g);S=o(g)}if(S!==null)I=!0;else{var M=o(v);M!==null&&me(H,M.startTime-L),I=!1}}break e}finally{S=null,b=te,x=!1}I=void 0}}finally{I?J():P=!1}}}var J;if(typeof N=="function")J=function(){N(oe)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,ce=ie.port2;ie.port1.onmessage=oe,J=function(){ce.postMessage(null)}}else J=function(){R(oe,0)};function me(L,I){z=R(function(){L(a.unstable_now())},I)}a.unstable_IdlePriority=5,a.unstable_ImmediatePriority=1,a.unstable_LowPriority=4,a.unstable_NormalPriority=3,a.unstable_Profiling=null,a.unstable_UserBlockingPriority=2,a.unstable_cancelCallback=function(L){L.callback=null},a.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"):U=0<L?Math.floor(1e3/L):5},a.unstable_getCurrentPriorityLevel=function(){return b},a.unstable_next=function(L){switch(b){case 1:case 2:case 3:var I=3;break;default:I=b}var te=b;b=I;try{return L()}finally{b=te}},a.unstable_requestPaint=function(){E=!0},a.unstable_runWithPriority=function(L,I){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var te=b;b=L;try{return I()}finally{b=te}},a.unstable_scheduleCallback=function(L,I,te){var W=a.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?W+te:W):te=W,L){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=te+Z,L={id:w++,callback:I,priorityLevel:L,startTime:te,expirationTime:Z,sortIndex:-1},te>W?(L.sortIndex=te,l(v,L),o(g)===null&&L===o(v)&&(j?(A(z),z=-1):j=!0,me(H,te-W))):(L.sortIndex=Z,l(g,L),T||x||(T=!0,P||(P=!0,J()))),L},a.unstable_shouldYield=se,a.unstable_wrapCallback=function(L){var I=b;return function(){var te=b;b=I;try{return L.apply(this,arguments)}finally{b=te}}}})(sf)),sf}var cy;function Mw(){return cy||(cy=1,of.exports=Aw()),of.exports}var cf={exports:{}},qt={};/**
26
+ * @license React
27
+ * react-dom.production.js
28
+ *
29
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var uy;function _w(){if(uy)return qt;uy=1;var a=th();function l(g){var v="https://react.dev/errors/"+g;if(1<arguments.length){v+="?args[]="+encodeURIComponent(arguments[1]);for(var w=2;w<arguments.length;w++)v+="&args[]="+encodeURIComponent(arguments[w])}return"Minified React error #"+g+"; visit "+v+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var i={d:{f:o,r:function(){throw Error(l(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},u=Symbol.for("react.portal");function f(g,v,w){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:S==null?null:""+S,children:g,containerInfo:v,implementation:w}}var h=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(g,v){if(g==="font")return"";if(typeof v=="string")return v==="use-credentials"?v:""}return qt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,qt.createPortal=function(g,v){var w=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!v||v.nodeType!==1&&v.nodeType!==9&&v.nodeType!==11)throw Error(l(299));return f(g,v,null,w)},qt.flushSync=function(g){var v=h.T,w=i.p;try{if(h.T=null,i.p=2,g)return g()}finally{h.T=v,i.p=w,i.d.f()}},qt.preconnect=function(g,v){typeof g=="string"&&(v?(v=v.crossOrigin,v=typeof v=="string"?v==="use-credentials"?v:"":void 0):v=null,i.d.C(g,v))},qt.prefetchDNS=function(g){typeof g=="string"&&i.d.D(g)},qt.preinit=function(g,v){if(typeof g=="string"&&v&&typeof v.as=="string"){var w=v.as,S=m(w,v.crossOrigin),b=typeof v.integrity=="string"?v.integrity:void 0,x=typeof v.fetchPriority=="string"?v.fetchPriority:void 0;w==="style"?i.d.S(g,typeof v.precedence=="string"?v.precedence:void 0,{crossOrigin:S,integrity:b,fetchPriority:x}):w==="script"&&i.d.X(g,{crossOrigin:S,integrity:b,fetchPriority:x,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},qt.preinitModule=function(g,v){if(typeof g=="string")if(typeof v=="object"&&v!==null){if(v.as==null||v.as==="script"){var w=m(v.as,v.crossOrigin);i.d.M(g,{crossOrigin:w,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0})}}else v==null&&i.d.M(g)},qt.preload=function(g,v){if(typeof g=="string"&&typeof v=="object"&&v!==null&&typeof v.as=="string"){var w=v.as,S=m(w,v.crossOrigin);i.d.L(g,w,{crossOrigin:S,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,type:typeof v.type=="string"?v.type:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0,referrerPolicy:typeof v.referrerPolicy=="string"?v.referrerPolicy:void 0,imageSrcSet:typeof v.imageSrcSet=="string"?v.imageSrcSet:void 0,imageSizes:typeof v.imageSizes=="string"?v.imageSizes:void 0,media:typeof v.media=="string"?v.media:void 0})}},qt.preloadModule=function(g,v){if(typeof g=="string")if(v){var w=m(v.as,v.crossOrigin);i.d.m(g,{as:typeof v.as=="string"&&v.as!=="script"?v.as:void 0,crossOrigin:w,integrity:typeof v.integrity=="string"?v.integrity:void 0})}else i.d.m(g)},qt.requestFormReset=function(g){i.d.r(g)},qt.unstable_batchedUpdates=function(g,v){return g(v)},qt.useFormState=function(g,v,w){return h.H.useFormState(g,v,w)},qt.useFormStatus=function(){return h.H.useHostTransitionStatus()},qt.version="19.2.8",qt}var dy;function Wy(){if(dy)return cf.exports;dy=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(l){console.error(l)}}return a(),cf.exports=_w(),cf.exports}/**
34
+ * @license React
35
+ * react-dom-client.production.js
36
+ *
37
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
38
+ *
39
+ * This source code is licensed under the MIT license found in the
40
+ * LICENSE file in the root directory of this source tree.
41
+ */var fy;function Ow(){if(fy)return pi;fy=1;var a=Mw(),l=th(),o=Wy();function i(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function h(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function g(e){if(f(e)!==e)throw Error(i(188))}function v(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(i(188));return t!==e?null:e}for(var n=e,r=t;;){var c=n.return;if(c===null)break;var d=c.alternate;if(d===null){if(r=c.return,r!==null){n=r;continue}break}if(c.child===d.child){for(d=c.child;d;){if(d===n)return g(c),e;if(d===r)return g(c),t;d=d.sibling}throw Error(i(188))}if(n.return!==r.return)n=c,r=d;else{for(var y=!1,C=c.child;C;){if(C===n){y=!0,n=c,r=d;break}if(C===r){y=!0,r=c,n=d;break}C=C.sibling}if(!y){for(C=d.child;C;){if(C===n){y=!0,n=d,r=c;break}if(C===r){y=!0,r=d,n=c;break}C=C.sibling}if(!y)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function w(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=w(e),t!==null)return t;e=e.sibling}return null}var S=Object.assign,b=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),N=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),se=Symbol.for("react.memo_cache_sentinel"),oe=Symbol.iterator;function J(e){return e===null||typeof e!="object"?null:(e=oe&&e[oe]||e["@@iterator"],typeof e=="function"?e:null)}var ie=Symbol.for("react.client.reference");function ce(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ie?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case j:return"Fragment";case R:return"Profiler";case E:return"StrictMode";case H:return"Suspense";case P:return"SuspenseList";case ee:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case T:return"Portal";case N:return e.displayName||"Context";case A:return(e._context.displayName||"Context")+".Consumer";case O:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case z:return t=e.displayName||null,t!==null?t:ce(e.type)||"Memo";case U:t=e._payload,e=e._init;try{return ce(e(t))}catch{}}return null}var me=Array.isArray,L=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},W=[],Z=-1;function M(e){return{current:e}}function B(e){0>Z||(e.current=W[Z],W[Z]=null,Z--)}function $(e,t){Z++,W[Z]=e.current,e.current=t}var ne=M(null),ue=M(null),X=M(null),ae=M(null);function le(e,t){switch($(X,t),$(ue,e),$(ne,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Cv(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Cv(t),e=Ev(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(ne),$(ne,e)}function fe(){B(ne),B(ue),B(X)}function De(e){e.memoizedState!==null&&$(ae,e);var t=ne.current,n=Ev(t,e.type);t!==n&&($(ue,e),$(ne,n))}function _e(e){ue.current===e&&(B(ne),B(ue)),ae.current===e&&(B(ae),ui._currentValue=te)}var Oe,qe;function yt(e){if(Oe===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Oe=t&&t[1]||"",qe=-1<n.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+Oe+e+qe}var Ht=!1;function Kt(e,t){if(!e||Ht)return"";Ht=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var F=function(){throw Error()};if(Object.defineProperty(F.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(F,[])}catch(G){var Y=G}Reflect.construct(e,[],F)}else{try{F.call()}catch(G){Y=G}e.call(F.prototype)}}else{try{throw Error()}catch(G){Y=G}(F=e())&&typeof F.catch=="function"&&F.catch(function(){})}}catch(G){if(G&&Y&&typeof G.stack=="string")return[G.stack,Y.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=r.DetermineComponentFrameRoot(),y=d[0],C=d[1];if(y&&C){var _=y.split(`
44
+ `),V=C.split(`
45
+ `);for(c=r=0;r<_.length&&!_[r].includes("DetermineComponentFrameRoot");)r++;for(;c<V.length&&!V[c].includes("DetermineComponentFrameRoot");)c++;if(r===_.length||c===V.length)for(r=_.length-1,c=V.length-1;1<=r&&0<=c&&_[r]!==V[c];)c--;for(;1<=r&&0<=c;r--,c--)if(_[r]!==V[c]){if(r!==1||c!==1)do if(r--,c--,0>c||_[r]!==V[c]){var K=`
46
+ `+_[r].replace(" at new "," at ");return e.displayName&&K.includes("<anonymous>")&&(K=K.replace("<anonymous>",e.displayName)),K}while(1<=r&&0<=c);break}}}finally{Ht=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?yt(n):""}function Wn(e,t){switch(e.tag){case 26:case 27:case 5:return yt(e.type);case 16:return yt("Lazy");case 13:return e.child!==t&&t!==null?yt("Suspense Fallback"):yt("Suspense");case 19:return yt("SuspenseList");case 0:case 15:return Kt(e.type,!1);case 11:return Kt(e.type.render,!1);case 1:return Kt(e.type,!0);case 31:return yt("Activity");default:return""}}function jn(e){try{var t="",n=null;do t+=Wn(e,n),n=e,e=e.return;while(e);return t}catch(r){return`
47
+ Error generating stack: `+r.message+`
48
+ `+r.stack}}var Hl=Object.prototype.hasOwnProperty,nl=a.unstable_scheduleCallback,Bn=a.unstable_cancelCallback,ya=a.unstable_shouldYield,xa=a.unstable_requestPaint,Vt=a.unstable_now,Pc=a.unstable_getCurrentPriorityLevel,Yt=a.unstable_ImmediatePriority,ba=a.unstable_UserBlockingPriority,pr=a.unstable_NormalPriority,qc=a.unstable_LowPriority,Bl=a.unstable_IdlePriority,Vc=a.log,Li=a.unstable_setDisableYieldValue,Sa=null,xt=null;function Pn(e){if(typeof Vc=="function"&&Li(e),xt&&typeof xt.setStrictMode=="function")try{xt.setStrictMode(Sa,e)}catch{}}var bt=Math.clz32?Math.clz32:Ui,Yc=Math.log,Gc=Math.LN2;function Ui(e){return e>>>=0,e===0?32:31-(Yc(e)/Gc|0)|0}var Pl=256,gr=262144,al=4194304;function Bt(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function vr(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var c=0,d=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var C=r&134217727;return C!==0?(r=C&~d,r!==0?c=Bt(r):(y&=C,y!==0?c=Bt(y):n||(n=C&~e,n!==0&&(c=Bt(n))))):(C=r&~d,C!==0?c=Bt(C):y!==0?c=Bt(y):n||(n=r&~e,n!==0&&(c=Bt(n)))),c===0?0:t!==0&&t!==c&&(t&d)===0&&(d=c&-c,n=t&-t,d>=n||d===32&&(n&4194048)!==0)?t:c}function je(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Qe(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 at(){var e=al;return al<<=1,(al&62914560)===0&&(al=4194304),e}function Gt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ot(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ea(e,t,n,r,c,d){var y=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var C=e.entanglements,_=e.expirationTimes,V=e.hiddenUpdates;for(n=y&~n;0<n;){var K=31-bt(n),F=1<<K;C[K]=0,_[K]=-1;var Y=V[K];if(Y!==null)for(V[K]=null,K=0;K<Y.length;K++){var G=Y[K];G!==null&&(G.lane&=-536870913)}n&=~F}r!==0&&ta(e,r,0),d!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=d&~(y&~t))}function ta(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-bt(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Xt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-bt(n),c=1<<r;c&t|e[r]&t&&(e[r]|=t),n&=~c}}function qn(e,t){var n=t&-t;return n=(n&42)!==0?1:Ic(n),(n&(e.suspendedLanes|t))!==0?0:n}function Ic(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function $c(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function cm(){var e=I.p;return e!==0?e:(e=window.event,e===void 0?32:Xv(e.type))}function um(e,t){var n=I.p;try{return I.p=e,t()}finally{I.p=n}}var ll=Math.random().toString(36).slice(2),Dt="__reactFiber$"+ll,Qt="__reactProps$"+ll,yr="__reactContainer$"+ll,Kc="__reactEvents$"+ll,m1="__reactListeners$"+ll,p1="__reactHandles$"+ll,dm="__reactResources$"+ll,Eo="__reactMarker$"+ll;function Xc(e){delete e[Dt],delete e[Qt],delete e[Kc],delete e[m1],delete e[p1]}function xr(e){var t=e[Dt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[yr]||n[Dt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ov(e);e!==null;){if(n=e[Dt])return n;e=Ov(e)}return t}e=n,n=e.parentNode}return null}function br(e){if(e=e[Dt]||e[yr]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ro(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Sr(e){var t=e[dm];return t||(t=e[dm]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Nt(e){e[Eo]=!0}var fm=new Set,hm={};function ql(e,t){wr(e,t),wr(e+"Capture",t)}function wr(e,t){for(hm[e]=t,e=0;e<t.length;e++)fm.add(t[e])}var g1=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]*$"),mm={},pm={};function v1(e){return Hl.call(pm,e)?!0:Hl.call(mm,e)?!1:g1.test(e)?pm[e]=!0:(mm[e]=!0,!1)}function Hi(e,t,n){if(v1(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function Bi(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function wa(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+r)}}function Cn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function gm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function y1(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var c=r.get,d=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(y){n=""+y,d.call(this,y)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(y){n=""+y},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Qc(e){if(!e._valueTracker){var t=gm(e)?"checked":"value";e._valueTracker=y1(e,t,""+e[t])}}function vm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=gm(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Pi(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var x1=/[\n"\\]/g;function En(e){return e.replace(x1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Zc(e,t,n,r,c,d,y,C){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),t!=null?y==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Cn(t)):e.value!==""+Cn(t)&&(e.value=""+Cn(t)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),t!=null?Fc(e,y,Cn(t)):n!=null?Fc(e,y,Cn(n)):r!=null&&e.removeAttribute("value"),c==null&&d!=null&&(e.defaultChecked=!!d),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?e.name=""+Cn(C):e.removeAttribute("name")}function ym(e,t,n,r,c,d,y,C){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),t!=null||n!=null){if(!(d!=="submit"&&d!=="reset"||t!=null)){Qc(e);return}n=n!=null?""+Cn(n):"",t=t!=null?""+Cn(t):n,C||t===e.value||(e.value=t),e.defaultValue=t}r=r??c,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=C?e.checked:!!r,e.defaultChecked=!!r,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),Qc(e)}function Fc(e,t,n){t==="number"&&Pi(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function jr(e,t,n,r){if(e=e.options,t){t={};for(var c=0;c<n.length;c++)t["$"+n[c]]=!0;for(n=0;n<e.length;n++)c=t.hasOwnProperty("$"+e[n].value),e[n].selected!==c&&(e[n].selected=c),c&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Cn(n),t=null,c=0;c<e.length;c++){if(e[c].value===n){e[c].selected=!0,r&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function xm(e,t,n){if(t!=null&&(t=""+Cn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Cn(n):""}function bm(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(me(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n==null&&(n=""),t=n}n=Cn(t),e.defaultValue=n,r=e.textContent,r===n&&r!==""&&r!==null&&(e.value=r),Qc(e)}function Cr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var b1=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 Sm(e,t,n){var r=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,n):typeof n!="number"||n===0||b1.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function wm(e,t,n){if(t!=null&&typeof t!="object")throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="");for(var c in t)r=t[c],t.hasOwnProperty(c)&&n[c]!==r&&Sm(e,c,r)}else for(var d in t)t.hasOwnProperty(d)&&Sm(e,d,t[d])}function Jc(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var S1=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"],["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"]]),w1=/^[\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 qi(e){return w1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ja(){}var Wc=null;function eu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Er=null,Rr=null;function jm(e){var t=br(e);if(t&&(e=t.stateNode)){var n=e[Qt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Zc(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+En(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var c=r[Qt]||null;if(!c)throw Error(i(90));Zc(r,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&vm(r)}break e;case"textarea":xm(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&jr(e,!!n.multiple,t,!1)}}}var tu=!1;function Cm(e,t,n){if(tu)return e(t,n);tu=!0;try{var r=e(t);return r}finally{if(tu=!1,(Er!==null||Rr!==null)&&(Ns(),Er&&(t=Er,e=Rr,Rr=Er=null,jm(t),e)))for(t=0;t<e.length;t++)jm(e[t])}}function To(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Qt]||null;if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(i(231,t,typeof n));return n}var Ca=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),nu=!1;if(Ca)try{var No={};Object.defineProperty(No,"passive",{get:function(){nu=!0}}),window.addEventListener("test",No,No),window.removeEventListener("test",No,No)}catch{nu=!1}var rl=null,au=null,Vi=null;function Em(){if(Vi)return Vi;var e,t=au,n=t.length,r,c="value"in rl?rl.value:rl.textContent,d=c.length;for(e=0;e<n&&t[e]===c[e];e++);var y=n-e;for(r=1;r<=y&&t[n-r]===c[d-r];r++);return Vi=c.slice(e,1<r?1-r:void 0)}function Yi(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Gi(){return!0}function Rm(){return!1}function Zt(e){function t(n,r,c,d,y){this._reactName=n,this._targetInst=c,this.type=r,this.nativeEvent=d,this.target=y,this.currentTarget=null;for(var C in e)e.hasOwnProperty(C)&&(n=e[C],this[C]=n?n(d):d[C]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?Gi:Rm,this.isPropagationStopped=Rm,this}return S(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Gi)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Gi)},persist:function(){},isPersistent:Gi}),t}var Vl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ii=Zt(Vl),Ao=S({},Vl,{view:0,detail:0}),j1=Zt(Ao),lu,ru,Mo,$i=S({},Ao,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:iu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Mo&&(Mo&&e.type==="mousemove"?(lu=e.screenX-Mo.screenX,ru=e.screenY-Mo.screenY):ru=lu=0,Mo=e),lu)},movementY:function(e){return"movementY"in e?e.movementY:ru}}),Tm=Zt($i),C1=S({},$i,{dataTransfer:0}),E1=Zt(C1),R1=S({},Ao,{relatedTarget:0}),ou=Zt(R1),T1=S({},Vl,{animationName:0,elapsedTime:0,pseudoElement:0}),N1=Zt(T1),A1=S({},Vl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),M1=Zt(A1),_1=S({},Vl,{data:0}),Nm=Zt(_1),O1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},D1={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"},z1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function k1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=z1[e])?!!t[e]:!1}function iu(){return k1}var L1=S({},Ao,{key:function(e){if(e.key){var t=O1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Yi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?D1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:iu,charCode:function(e){return e.type==="keypress"?Yi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Yi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),U1=Zt(L1),H1=S({},$i,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Am=Zt(H1),B1=S({},Ao,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:iu}),P1=Zt(B1),q1=S({},Vl,{propertyName:0,elapsedTime:0,pseudoElement:0}),V1=Zt(q1),Y1=S({},$i,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),G1=Zt(Y1),I1=S({},Vl,{newState:0,oldState:0}),$1=Zt(I1),K1=[9,13,27,32],su=Ca&&"CompositionEvent"in window,_o=null;Ca&&"documentMode"in document&&(_o=document.documentMode);var X1=Ca&&"TextEvent"in window&&!_o,Mm=Ca&&(!su||_o&&8<_o&&11>=_o),_m=" ",Om=!1;function Dm(e,t){switch(e){case"keyup":return K1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Tr=!1;function Q1(e,t){switch(e){case"compositionend":return zm(t);case"keypress":return t.which!==32?null:(Om=!0,_m);case"textInput":return e=t.data,e===_m&&Om?null:e;default:return null}}function Z1(e,t){if(Tr)return e==="compositionend"||!su&&Dm(e,t)?(e=Em(),Vi=au=rl=null,Tr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Mm&&t.locale!=="ko"?null:t.data;default:return null}}var F1={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 km(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!F1[e.type]:t==="textarea"}function Lm(e,t,n,r){Er?Rr?Rr.push(r):Rr=[r]:Er=r,t=ks(t,"onChange"),0<t.length&&(n=new Ii("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Oo=null,Do=null;function J1(e){yv(e,0)}function Ki(e){var t=Ro(e);if(vm(t))return e}function Um(e,t){if(e==="change")return t}var Hm=!1;if(Ca){var cu;if(Ca){var uu="oninput"in document;if(!uu){var Bm=document.createElement("div");Bm.setAttribute("oninput","return;"),uu=typeof Bm.oninput=="function"}cu=uu}else cu=!1;Hm=cu&&(!document.documentMode||9<document.documentMode)}function Pm(){Oo&&(Oo.detachEvent("onpropertychange",qm),Do=Oo=null)}function qm(e){if(e.propertyName==="value"&&Ki(Do)){var t=[];Lm(t,Do,e,eu(e)),Cm(J1,t)}}function W1(e,t,n){e==="focusin"?(Pm(),Oo=t,Do=n,Oo.attachEvent("onpropertychange",qm)):e==="focusout"&&Pm()}function eS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ki(Do)}function tS(e,t){if(e==="click")return Ki(t)}function nS(e,t){if(e==="input"||e==="change")return Ki(t)}function aS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var un=typeof Object.is=="function"?Object.is:aS;function zo(e,t){if(un(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var c=n[r];if(!Hl.call(t,c)||!un(e[c],t[c]))return!1}return!0}function Vm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ym(e,t){var n=Vm(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Vm(n)}}function Gm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Gm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Im(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Pi(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Pi(e.document)}return t}function du(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var lS=Ca&&"documentMode"in document&&11>=document.documentMode,Nr=null,fu=null,ko=null,hu=!1;function $m(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;hu||Nr==null||Nr!==Pi(r)||(r=Nr,"selectionStart"in r&&du(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ko&&zo(ko,r)||(ko=r,r=ks(fu,"onSelect"),0<r.length&&(t=new Ii("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Nr)))}function Yl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ar={animationend:Yl("Animation","AnimationEnd"),animationiteration:Yl("Animation","AnimationIteration"),animationstart:Yl("Animation","AnimationStart"),transitionrun:Yl("Transition","TransitionRun"),transitionstart:Yl("Transition","TransitionStart"),transitioncancel:Yl("Transition","TransitionCancel"),transitionend:Yl("Transition","TransitionEnd")},mu={},Km={};Ca&&(Km=document.createElement("div").style,"AnimationEvent"in window||(delete Ar.animationend.animation,delete Ar.animationiteration.animation,delete Ar.animationstart.animation),"TransitionEvent"in window||delete Ar.transitionend.transition);function Gl(e){if(mu[e])return mu[e];if(!Ar[e])return e;var t=Ar[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Km)return mu[e]=t[n];return e}var Xm=Gl("animationend"),Qm=Gl("animationiteration"),Zm=Gl("animationstart"),rS=Gl("transitionrun"),oS=Gl("transitionstart"),iS=Gl("transitioncancel"),Fm=Gl("transitionend"),Jm=new Map,pu="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");pu.push("scrollEnd");function Vn(e,t){Jm.set(e,t),ql(t,[e])}var Xi=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Rn=[],Mr=0,gu=0;function Qi(){for(var e=Mr,t=gu=Mr=0;t<e;){var n=Rn[t];Rn[t++]=null;var r=Rn[t];Rn[t++]=null;var c=Rn[t];Rn[t++]=null;var d=Rn[t];if(Rn[t++]=null,r!==null&&c!==null){var y=r.pending;y===null?c.next=c:(c.next=y.next,y.next=c),r.pending=c}d!==0&&Wm(n,c,d)}}function Zi(e,t,n,r){Rn[Mr++]=e,Rn[Mr++]=t,Rn[Mr++]=n,Rn[Mr++]=r,gu|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function vu(e,t,n,r){return Zi(e,t,n,r),Fi(e)}function Il(e,t){return Zi(e,null,null,t),Fi(e)}function Wm(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var c=!1,d=e.return;d!==null;)d.childLanes|=n,r=d.alternate,r!==null&&(r.childLanes|=n),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(c=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,c&&t!==null&&(c=31-bt(n),e=d.hiddenUpdates,r=e[c],r===null?e[c]=[t]:r.push(t),t.lane=n|536870912),d):null}function Fi(e){if(50<ai)throw ai=0,Rd=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var _r={};function sS(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function dn(e,t,n,r){return new sS(e,t,n,r)}function yu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ea(e,t){var n=e.alternate;return n===null?(n=dn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function ep(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ji(e,t,n,r,c,d){var y=0;if(r=e,typeof e=="function")yu(e)&&(y=1);else if(typeof e=="string")y=hw(e,n,ne.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ee:return e=dn(31,n,t,c),e.elementType=ee,e.lanes=d,e;case j:return $l(n.children,c,d,t);case E:y=8,c|=24;break;case R:return e=dn(12,n,t,c|2),e.elementType=R,e.lanes=d,e;case H:return e=dn(13,n,t,c),e.elementType=H,e.lanes=d,e;case P:return e=dn(19,n,t,c),e.elementType=P,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case N:y=10;break e;case A:y=9;break e;case O:y=11;break e;case z:y=14;break e;case U:y=16,r=null;break e}y=29,n=Error(i(130,e===null?"null":typeof e,"")),r=null}return t=dn(y,n,t,c),t.elementType=e,t.type=r,t.lanes=d,t}function $l(e,t,n,r){return e=dn(7,e,r,t),e.lanes=n,e}function xu(e,t,n){return e=dn(6,e,null,t),e.lanes=n,e}function tp(e){var t=dn(18,null,null,0);return t.stateNode=e,t}function bu(e,t,n){return t=dn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var np=new WeakMap;function Tn(e,t){if(typeof e=="object"&&e!==null){var n=np.get(e);return n!==void 0?n:(t={value:e,source:t,stack:jn(t)},np.set(e,t),t)}return{value:e,source:t,stack:jn(t)}}var Or=[],Dr=0,Wi=null,Lo=0,Nn=[],An=0,ol=null,na=1,aa="";function Ra(e,t){Or[Dr++]=Lo,Or[Dr++]=Wi,Wi=e,Lo=t}function ap(e,t,n){Nn[An++]=na,Nn[An++]=aa,Nn[An++]=ol,ol=e;var r=na;e=aa;var c=32-bt(r)-1;r&=~(1<<c),n+=1;var d=32-bt(t)+c;if(30<d){var y=c-c%5;d=(r&(1<<y)-1).toString(32),r>>=y,c-=y,na=1<<32-bt(t)+c|n<<c|r,aa=d+e}else na=1<<d|n<<c|r,aa=e}function Su(e){e.return!==null&&(Ra(e,1),ap(e,1,0))}function wu(e){for(;e===Wi;)Wi=Or[--Dr],Or[Dr]=null,Lo=Or[--Dr],Or[Dr]=null;for(;e===ol;)ol=Nn[--An],Nn[An]=null,aa=Nn[--An],Nn[An]=null,na=Nn[--An],Nn[An]=null}function lp(e,t){Nn[An++]=na,Nn[An++]=aa,Nn[An++]=ol,na=t.id,aa=t.overflow,ol=e}var zt=null,ct=null,Be=!1,il=null,Mn=!1,ju=Error(i(519));function sl(e){var t=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Uo(Tn(t,e)),ju}function rp(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Dt]=e,t[Qt]=r,n){case"dialog":ke("cancel",t),ke("close",t);break;case"iframe":case"object":case"embed":ke("load",t);break;case"video":case"audio":for(n=0;n<ri.length;n++)ke(ri[n],t);break;case"source":ke("error",t);break;case"img":case"image":case"link":ke("error",t),ke("load",t);break;case"details":ke("toggle",t);break;case"input":ke("invalid",t),ym(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":ke("invalid",t);break;case"textarea":ke("invalid",t),bm(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||r.suppressHydrationWarning===!0||wv(t.textContent,n)?(r.popover!=null&&(ke("beforetoggle",t),ke("toggle",t)),r.onScroll!=null&&ke("scroll",t),r.onScrollEnd!=null&&ke("scrollend",t),r.onClick!=null&&(t.onclick=ja),t=!0):t=!1,t||sl(e,!0)}function op(e){for(zt=e.return;zt;)switch(zt.tag){case 5:case 31:case 13:Mn=!1;return;case 27:case 3:Mn=!0;return;default:zt=zt.return}}function zr(e){if(e!==zt)return!1;if(!Be)return op(e),Be=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||qd(e.type,e.memoizedProps)),n=!n),n&&ct&&sl(e),op(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));ct=_v(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));ct=_v(e)}else t===27?(t=ct,wl(e.type)?(e=$d,$d=null,ct=e):ct=t):ct=zt?On(e.stateNode.nextSibling):null;return!0}function Kl(){ct=zt=null,Be=!1}function Cu(){var e=il;return e!==null&&(en===null?en=e:en.push.apply(en,e),il=null),e}function Uo(e){il===null?il=[e]:il.push(e)}var Eu=M(null),Xl=null,Ta=null;function cl(e,t,n){$(Eu,t._currentValue),t._currentValue=n}function Na(e){e._currentValue=Eu.current,B(Eu)}function Ru(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Tu(e,t,n,r){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var d=c.dependencies;if(d!==null){var y=c.child;d=d.firstContext;e:for(;d!==null;){var C=d;d=c;for(var _=0;_<t.length;_++)if(C.context===t[_]){d.lanes|=n,C=d.alternate,C!==null&&(C.lanes|=n),Ru(d.return,n,e),r||(y=null);break e}d=C.next}}else if(c.tag===18){if(y=c.return,y===null)throw Error(i(341));y.lanes|=n,d=y.alternate,d!==null&&(d.lanes|=n),Ru(y,n,e),y=null}else y=c.child;if(y!==null)y.return=c;else for(y=c;y!==null;){if(y===e){y=null;break}if(c=y.sibling,c!==null){c.return=y.return,y=c;break}y=y.return}c=y}}function kr(e,t,n,r){e=null;for(var c=t,d=!1;c!==null;){if(!d){if((c.flags&524288)!==0)d=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var y=c.alternate;if(y===null)throw Error(i(387));if(y=y.memoizedProps,y!==null){var C=c.type;un(c.pendingProps.value,y.value)||(e!==null?e.push(C):e=[C])}}else if(c===ae.current){if(y=c.alternate,y===null)throw Error(i(387));y.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(ui):e=[ui])}c=c.return}e!==null&&Tu(t,e,n,r),t.flags|=262144}function es(e){for(e=e.firstContext;e!==null;){if(!un(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ql(e){Xl=e,Ta=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function kt(e){return ip(Xl,e)}function ts(e,t){return Xl===null&&Ql(e),ip(e,t)}function ip(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Ta===null){if(e===null)throw Error(i(308));Ta=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ta=Ta.next=t;return n}var cS=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},uS=a.unstable_scheduleCallback,dS=a.unstable_NormalPriority,St={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Nu(){return{controller:new cS,data:new Map,refCount:0}}function Ho(e){e.refCount--,e.refCount===0&&uS(dS,function(){e.controller.abort()})}var Bo=null,Au=0,Lr=0,Ur=null;function fS(e,t){if(Bo===null){var n=Bo=[];Au=0,Lr=Od(),Ur={status:"pending",value:void 0,then:function(r){n.push(r)}}}return Au++,t.then(sp,sp),t}function sp(){if(--Au===0&&Bo!==null){Ur!==null&&(Ur.status="fulfilled");var e=Bo;Bo=null,Lr=0,Ur=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function hS(e,t){var n=[],r={status:"pending",value:null,reason:null,then:function(c){n.push(c)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var c=0;c<n.length;c++)(0,n[c])(t)},function(c){for(r.status="rejected",r.reason=c,c=0;c<n.length;c++)(0,n[c])(void 0)}),r}var cp=L.S;L.S=function(e,t){$g=Vt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&fS(e,t),cp!==null&&cp(e,t)};var Zl=M(null);function Mu(){var e=Zl.current;return e!==null?e:lt.pooledCache}function ns(e,t){t===null?$(Zl,Zl.current):$(Zl,t.pool)}function up(){var e=Mu();return e===null?null:{parent:St._currentValue,pool:e}}var Hr=Error(i(460)),_u=Error(i(474)),as=Error(i(542)),ls={then:function(){}};function dp(e){return e=e.status,e==="fulfilled"||e==="rejected"}function fp(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(ja,ja),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,mp(e),e;default:if(typeof t.status=="string")t.then(ja,ja);else{if(e=lt,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=r}},function(r){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,mp(e),e}throw Jl=t,Hr}}function Fl(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Jl=n,Hr):n}}var Jl=null;function hp(){if(Jl===null)throw Error(i(459));var e=Jl;return Jl=null,e}function mp(e){if(e===Hr||e===as)throw Error(i(483))}var Br=null,Po=0;function rs(e){var t=Po;return Po+=1,Br===null&&(Br=[]),fp(Br,e,t)}function qo(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function os(e,t){throw t.$$typeof===b?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function pp(e){function t(k,D){if(e){var q=k.deletions;q===null?(k.deletions=[D],k.flags|=16):q.push(D)}}function n(k,D){if(!e)return null;for(;D!==null;)t(k,D),D=D.sibling;return null}function r(k){for(var D=new Map;k!==null;)k.key!==null?D.set(k.key,k):D.set(k.index,k),k=k.sibling;return D}function c(k,D){return k=Ea(k,D),k.index=0,k.sibling=null,k}function d(k,D,q){return k.index=q,e?(q=k.alternate,q!==null?(q=q.index,q<D?(k.flags|=67108866,D):q):(k.flags|=67108866,D)):(k.flags|=1048576,D)}function y(k){return e&&k.alternate===null&&(k.flags|=67108866),k}function C(k,D,q,Q){return D===null||D.tag!==6?(D=xu(q,k.mode,Q),D.return=k,D):(D=c(D,q),D.return=k,D)}function _(k,D,q,Q){var ye=q.type;return ye===j?K(k,D,q.props.children,Q,q.key):D!==null&&(D.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===U&&Fl(ye)===D.type)?(D=c(D,q.props),qo(D,q),D.return=k,D):(D=Ji(q.type,q.key,q.props,null,k.mode,Q),qo(D,q),D.return=k,D)}function V(k,D,q,Q){return D===null||D.tag!==4||D.stateNode.containerInfo!==q.containerInfo||D.stateNode.implementation!==q.implementation?(D=bu(q,k.mode,Q),D.return=k,D):(D=c(D,q.children||[]),D.return=k,D)}function K(k,D,q,Q,ye){return D===null||D.tag!==7?(D=$l(q,k.mode,Q,ye),D.return=k,D):(D=c(D,q),D.return=k,D)}function F(k,D,q){if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return D=xu(""+D,k.mode,q),D.return=k,D;if(typeof D=="object"&&D!==null){switch(D.$$typeof){case x:return q=Ji(D.type,D.key,D.props,null,k.mode,q),qo(q,D),q.return=k,q;case T:return D=bu(D,k.mode,q),D.return=k,D;case U:return D=Fl(D),F(k,D,q)}if(me(D)||J(D))return D=$l(D,k.mode,q,null),D.return=k,D;if(typeof D.then=="function")return F(k,rs(D),q);if(D.$$typeof===N)return F(k,ts(k,D),q);os(k,D)}return null}function Y(k,D,q,Q){var ye=D!==null?D.key:null;if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return ye!==null?null:C(k,D,""+q,Q);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case x:return q.key===ye?_(k,D,q,Q):null;case T:return q.key===ye?V(k,D,q,Q):null;case U:return q=Fl(q),Y(k,D,q,Q)}if(me(q)||J(q))return ye!==null?null:K(k,D,q,Q,null);if(typeof q.then=="function")return Y(k,D,rs(q),Q);if(q.$$typeof===N)return Y(k,D,ts(k,q),Q);os(k,q)}return null}function G(k,D,q,Q,ye){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return k=k.get(q)||null,C(D,k,""+Q,ye);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case x:return k=k.get(Q.key===null?q:Q.key)||null,_(D,k,Q,ye);case T:return k=k.get(Q.key===null?q:Q.key)||null,V(D,k,Q,ye);case U:return Q=Fl(Q),G(k,D,q,Q,ye)}if(me(Q)||J(Q))return k=k.get(q)||null,K(D,k,Q,ye,null);if(typeof Q.then=="function")return G(k,D,q,rs(Q),ye);if(Q.$$typeof===N)return G(k,D,q,ts(D,Q),ye);os(D,Q)}return null}function he(k,D,q,Q){for(var ye=null,Ve=null,pe=D,Ne=D=0,He=null;pe!==null&&Ne<q.length;Ne++){pe.index>Ne?(He=pe,pe=null):He=pe.sibling;var Ye=Y(k,pe,q[Ne],Q);if(Ye===null){pe===null&&(pe=He);break}e&&pe&&Ye.alternate===null&&t(k,pe),D=d(Ye,D,Ne),Ve===null?ye=Ye:Ve.sibling=Ye,Ve=Ye,pe=He}if(Ne===q.length)return n(k,pe),Be&&Ra(k,Ne),ye;if(pe===null){for(;Ne<q.length;Ne++)pe=F(k,q[Ne],Q),pe!==null&&(D=d(pe,D,Ne),Ve===null?ye=pe:Ve.sibling=pe,Ve=pe);return Be&&Ra(k,Ne),ye}for(pe=r(pe);Ne<q.length;Ne++)He=G(pe,k,Ne,q[Ne],Q),He!==null&&(e&&He.alternate!==null&&pe.delete(He.key===null?Ne:He.key),D=d(He,D,Ne),Ve===null?ye=He:Ve.sibling=He,Ve=He);return e&&pe.forEach(function(Tl){return t(k,Tl)}),Be&&Ra(k,Ne),ye}function we(k,D,q,Q){if(q==null)throw Error(i(151));for(var ye=null,Ve=null,pe=D,Ne=D=0,He=null,Ye=q.next();pe!==null&&!Ye.done;Ne++,Ye=q.next()){pe.index>Ne?(He=pe,pe=null):He=pe.sibling;var Tl=Y(k,pe,Ye.value,Q);if(Tl===null){pe===null&&(pe=He);break}e&&pe&&Tl.alternate===null&&t(k,pe),D=d(Tl,D,Ne),Ve===null?ye=Tl:Ve.sibling=Tl,Ve=Tl,pe=He}if(Ye.done)return n(k,pe),Be&&Ra(k,Ne),ye;if(pe===null){for(;!Ye.done;Ne++,Ye=q.next())Ye=F(k,Ye.value,Q),Ye!==null&&(D=d(Ye,D,Ne),Ve===null?ye=Ye:Ve.sibling=Ye,Ve=Ye);return Be&&Ra(k,Ne),ye}for(pe=r(pe);!Ye.done;Ne++,Ye=q.next())Ye=G(pe,k,Ne,Ye.value,Q),Ye!==null&&(e&&Ye.alternate!==null&&pe.delete(Ye.key===null?Ne:Ye.key),D=d(Ye,D,Ne),Ve===null?ye=Ye:Ve.sibling=Ye,Ve=Ye);return e&&pe.forEach(function(Cw){return t(k,Cw)}),Be&&Ra(k,Ne),ye}function tt(k,D,q,Q){if(typeof q=="object"&&q!==null&&q.type===j&&q.key===null&&(q=q.props.children),typeof q=="object"&&q!==null){switch(q.$$typeof){case x:e:{for(var ye=q.key;D!==null;){if(D.key===ye){if(ye=q.type,ye===j){if(D.tag===7){n(k,D.sibling),Q=c(D,q.props.children),Q.return=k,k=Q;break e}}else if(D.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===U&&Fl(ye)===D.type){n(k,D.sibling),Q=c(D,q.props),qo(Q,q),Q.return=k,k=Q;break e}n(k,D);break}else t(k,D);D=D.sibling}q.type===j?(Q=$l(q.props.children,k.mode,Q,q.key),Q.return=k,k=Q):(Q=Ji(q.type,q.key,q.props,null,k.mode,Q),qo(Q,q),Q.return=k,k=Q)}return y(k);case T:e:{for(ye=q.key;D!==null;){if(D.key===ye)if(D.tag===4&&D.stateNode.containerInfo===q.containerInfo&&D.stateNode.implementation===q.implementation){n(k,D.sibling),Q=c(D,q.children||[]),Q.return=k,k=Q;break e}else{n(k,D);break}else t(k,D);D=D.sibling}Q=bu(q,k.mode,Q),Q.return=k,k=Q}return y(k);case U:return q=Fl(q),tt(k,D,q,Q)}if(me(q))return he(k,D,q,Q);if(J(q)){if(ye=J(q),typeof ye!="function")throw Error(i(150));return q=ye.call(q),we(k,D,q,Q)}if(typeof q.then=="function")return tt(k,D,rs(q),Q);if(q.$$typeof===N)return tt(k,D,ts(k,q),Q);os(k,q)}return typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint"?(q=""+q,D!==null&&D.tag===6?(n(k,D.sibling),Q=c(D,q),Q.return=k,k=Q):(n(k,D),Q=xu(q,k.mode,Q),Q.return=k,k=Q),y(k)):n(k,D)}return function(k,D,q,Q){try{Po=0;var ye=tt(k,D,q,Q);return Br=null,ye}catch(pe){if(pe===Hr||pe===as)throw pe;var Ve=dn(29,pe,null,k.mode);return Ve.lanes=Q,Ve.return=k,Ve}finally{}}}var Wl=pp(!0),gp=pp(!1),ul=!1;function Ou(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Du(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function dl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function fl(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Xe&2)!==0){var c=r.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),r.pending=t,t=Fi(e),Wm(e,null,n),t}return Zi(e,r,t,n),Fi(e)}function Vo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Xt(e,n)}}function zu(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var c=null,d=null;if(n=n.firstBaseUpdate,n!==null){do{var y={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};d===null?c=d=y:d=d.next=y,n=n.next}while(n!==null);d===null?c=d=t:d=d.next=t}else c=d=t;n={baseState:r.baseState,firstBaseUpdate:c,lastBaseUpdate:d,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var ku=!1;function Yo(){if(ku){var e=Ur;if(e!==null)throw e}}function Go(e,t,n,r){ku=!1;var c=e.updateQueue;ul=!1;var d=c.firstBaseUpdate,y=c.lastBaseUpdate,C=c.shared.pending;if(C!==null){c.shared.pending=null;var _=C,V=_.next;_.next=null,y===null?d=V:y.next=V,y=_;var K=e.alternate;K!==null&&(K=K.updateQueue,C=K.lastBaseUpdate,C!==y&&(C===null?K.firstBaseUpdate=V:C.next=V,K.lastBaseUpdate=_))}if(d!==null){var F=c.baseState;y=0,K=V=_=null,C=d;do{var Y=C.lane&-536870913,G=Y!==C.lane;if(G?(Ue&Y)===Y:(r&Y)===Y){Y!==0&&Y===Lr&&(ku=!0),K!==null&&(K=K.next={lane:0,tag:C.tag,payload:C.payload,callback:null,next:null});e:{var he=e,we=C;Y=t;var tt=n;switch(we.tag){case 1:if(he=we.payload,typeof he=="function"){F=he.call(tt,F,Y);break e}F=he;break e;case 3:he.flags=he.flags&-65537|128;case 0:if(he=we.payload,Y=typeof he=="function"?he.call(tt,F,Y):he,Y==null)break e;F=S({},F,Y);break e;case 2:ul=!0}}Y=C.callback,Y!==null&&(e.flags|=64,G&&(e.flags|=8192),G=c.callbacks,G===null?c.callbacks=[Y]:G.push(Y))}else G={lane:Y,tag:C.tag,payload:C.payload,callback:C.callback,next:null},K===null?(V=K=G,_=F):K=K.next=G,y|=Y;if(C=C.next,C===null){if(C=c.shared.pending,C===null)break;G=C,C=G.next,G.next=null,c.lastBaseUpdate=G,c.shared.pending=null}}while(!0);K===null&&(_=F),c.baseState=_,c.firstBaseUpdate=V,c.lastBaseUpdate=K,d===null&&(c.shared.lanes=0),vl|=y,e.lanes=y,e.memoizedState=F}}function vp(e,t){if(typeof e!="function")throw Error(i(191,e));e.call(t)}function yp(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)vp(n[e],t)}var Pr=M(null),is=M(0);function xp(e,t){e=Ua,$(is,e),$(Pr,t),Ua=e|t.baseLanes}function Lu(){$(is,Ua),$(Pr,Pr.current)}function Uu(){Ua=is.current,B(Pr),B(is)}var fn=M(null),_n=null;function hl(e){var t=e.alternate;$(gt,gt.current&1),$(fn,e),_n===null&&(t===null||Pr.current!==null||t.memoizedState!==null)&&(_n=e)}function Hu(e){$(gt,gt.current),$(fn,e),_n===null&&(_n=e)}function bp(e){e.tag===22?($(gt,gt.current),$(fn,e),_n===null&&(_n=e)):ml()}function ml(){$(gt,gt.current),$(fn,fn.current)}function hn(e){B(fn),_n===e&&(_n=null),B(gt)}var gt=M(0);function ss(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Gd(n)||Id(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Aa=0,Te=null,We=null,wt=null,cs=!1,qr=!1,er=!1,us=0,Io=0,Vr=null,mS=0;function mt(){throw Error(i(321))}function Bu(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!un(e[n],t[n]))return!1;return!0}function Pu(e,t,n,r,c,d){return Aa=d,Te=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,L.H=e===null||e.memoizedState===null?ag:td,er=!1,d=n(r,c),er=!1,qr&&(d=wp(t,n,r,c)),Sp(e),d}function Sp(e){L.H=Xo;var t=We!==null&&We.next!==null;if(Aa=0,wt=We=Te=null,cs=!1,Io=0,Vr=null,t)throw Error(i(300));e===null||jt||(e=e.dependencies,e!==null&&es(e)&&(jt=!0))}function wp(e,t,n,r){Te=e;var c=0;do{if(qr&&(Vr=null),Io=0,qr=!1,25<=c)throw Error(i(301));if(c+=1,wt=We=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}L.H=lg,d=t(n,r)}while(qr);return d}function pS(){var e=L.H,t=e.useState()[0];return t=typeof t.then=="function"?$o(t):t,e=e.useState()[0],(We!==null?We.memoizedState:null)!==e&&(Te.flags|=1024),t}function qu(){var e=us!==0;return us=0,e}function Vu(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Yu(e){if(cs){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}cs=!1}Aa=0,wt=We=Te=null,qr=!1,Io=us=0,Vr=null}function It(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return wt===null?Te.memoizedState=wt=e:wt=wt.next=e,wt}function vt(){if(We===null){var e=Te.alternate;e=e!==null?e.memoizedState:null}else e=We.next;var t=wt===null?Te.memoizedState:wt.next;if(t!==null)wt=t,We=e;else{if(e===null)throw Te.alternate===null?Error(i(467)):Error(i(310));We=e,e={memoizedState:We.memoizedState,baseState:We.baseState,baseQueue:We.baseQueue,queue:We.queue,next:null},wt===null?Te.memoizedState=wt=e:wt=wt.next=e}return wt}function ds(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function $o(e){var t=Io;return Io+=1,Vr===null&&(Vr=[]),e=fp(Vr,e,t),t=Te,(wt===null?t.memoizedState:wt.next)===null&&(t=t.alternate,L.H=t===null||t.memoizedState===null?ag:td),e}function fs(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return $o(e);if(e.$$typeof===N)return kt(e)}throw Error(i(438,String(e)))}function Gu(e){var t=null,n=Te.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=Te.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=ds(),Te.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=se;return t.index++,n}function Ma(e,t){return typeof t=="function"?t(e):t}function hs(e){var t=vt();return Iu(t,We,e)}function Iu(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var c=e.baseQueue,d=r.pending;if(d!==null){if(c!==null){var y=c.next;c.next=d.next,d.next=y}t.baseQueue=c=d,r.pending=null}if(d=e.baseState,c===null)e.memoizedState=d;else{t=c.next;var C=y=null,_=null,V=t,K=!1;do{var F=V.lane&-536870913;if(F!==V.lane?(Ue&F)===F:(Aa&F)===F){var Y=V.revertLane;if(Y===0)_!==null&&(_=_.next={lane:0,revertLane:0,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null}),F===Lr&&(K=!0);else if((Aa&Y)===Y){V=V.next,Y===Lr&&(K=!0);continue}else F={lane:0,revertLane:V.revertLane,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},_===null?(C=_=F,y=d):_=_.next=F,Te.lanes|=Y,vl|=Y;F=V.action,er&&n(d,F),d=V.hasEagerState?V.eagerState:n(d,F)}else Y={lane:F,revertLane:V.revertLane,gesture:V.gesture,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},_===null?(C=_=Y,y=d):_=_.next=Y,Te.lanes|=F,vl|=F;V=V.next}while(V!==null&&V!==t);if(_===null?y=d:_.next=C,!un(d,e.memoizedState)&&(jt=!0,K&&(n=Ur,n!==null)))throw n;e.memoizedState=d,e.baseState=y,e.baseQueue=_,r.lastRenderedState=d}return c===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function $u(e){var t=vt(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,c=n.pending,d=t.memoizedState;if(c!==null){n.pending=null;var y=c=c.next;do d=e(d,y.action),y=y.next;while(y!==c);un(d,t.memoizedState)||(jt=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),n.lastRenderedState=d}return[d,r]}function jp(e,t,n){var r=Te,c=vt(),d=Be;if(d){if(n===void 0)throw Error(i(407));n=n()}else n=t();var y=!un((We||c).memoizedState,n);if(y&&(c.memoizedState=n,jt=!0),c=c.queue,Qu(Rp.bind(null,r,c,e),[e]),c.getSnapshot!==t||y||wt!==null&&wt.memoizedState.tag&1){if(r.flags|=2048,Yr(9,{destroy:void 0},Ep.bind(null,r,c,n,t),null),lt===null)throw Error(i(349));d||(Aa&127)!==0||Cp(r,t,n)}return n}function Cp(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Te.updateQueue,t===null?(t=ds(),Te.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ep(e,t,n,r){t.value=n,t.getSnapshot=r,Tp(t)&&Np(e)}function Rp(e,t,n){return n(function(){Tp(t)&&Np(e)})}function Tp(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!un(e,n)}catch{return!0}}function Np(e){var t=Il(e,2);t!==null&&tn(t,e,2)}function Ku(e){var t=It();if(typeof e=="function"){var n=e;if(e=n(),er){Pn(!0);try{n()}finally{Pn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ma,lastRenderedState:e},t}function Ap(e,t,n,r){return e.baseState=n,Iu(e,We,typeof r=="function"?r:Ma)}function gS(e,t,n,r,c){if(gs(e))throw Error(i(485));if(e=t.action,e!==null){var d={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){d.listeners.push(y)}};L.T!==null?n(!0):d.isTransition=!1,r(d),n=t.pending,n===null?(d.next=t.pending=d,Mp(t,d)):(d.next=n.next,t.pending=n.next=d)}}function Mp(e,t){var n=t.action,r=t.payload,c=e.state;if(t.isTransition){var d=L.T,y={};L.T=y;try{var C=n(c,r),_=L.S;_!==null&&_(y,C),_p(e,t,C)}catch(V){Xu(e,t,V)}finally{d!==null&&y.types!==null&&(d.types=y.types),L.T=d}}else try{d=n(c,r),_p(e,t,d)}catch(V){Xu(e,t,V)}}function _p(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(r){Op(e,t,r)},function(r){return Xu(e,t,r)}):Op(e,t,n)}function Op(e,t,n){t.status="fulfilled",t.value=n,Dp(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Mp(e,n)))}function Xu(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=n,Dp(t),t=t.next;while(t!==r)}e.action=null}function Dp(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function zp(e,t){return t}function kp(e,t){if(Be){var n=lt.formState;if(n!==null){e:{var r=Te;if(Be){if(ct){t:{for(var c=ct,d=Mn;c.nodeType!==8;){if(!d){c=null;break t}if(c=On(c.nextSibling),c===null){c=null;break t}}d=c.data,c=d==="F!"||d==="F"?c:null}if(c){ct=On(c.nextSibling),r=c.data==="F!";break e}}sl(r)}r=!1}r&&(t=n[0])}}return n=It(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zp,lastRenderedState:t},n.queue=r,n=eg.bind(null,Te,r),r.dispatch=n,r=Ku(!1),d=ed.bind(null,Te,!1,r.queue),r=It(),c={state:t,dispatch:null,action:e,pending:null},r.queue=c,n=gS.bind(null,Te,c,d,n),c.dispatch=n,r.memoizedState=e,[t,n,!1]}function Lp(e){var t=vt();return Up(t,We,e)}function Up(e,t,n){if(t=Iu(e,t,zp)[0],e=hs(Ma)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=$o(t)}catch(y){throw y===Hr?as:y}else r=t;t=vt();var c=t.queue,d=c.dispatch;return n!==t.memoizedState&&(Te.flags|=2048,Yr(9,{destroy:void 0},vS.bind(null,c,n),null)),[r,d,e]}function vS(e,t){e.action=t}function Hp(e){var t=vt(),n=We;if(n!==null)return Up(t,n,e);vt(),t=t.memoizedState,n=vt();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Yr(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=Te.updateQueue,t===null&&(t=ds(),Te.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Bp(){return vt().memoizedState}function ms(e,t,n,r){var c=It();Te.flags|=e,c.memoizedState=Yr(1|t,{destroy:void 0},n,r===void 0?null:r)}function ps(e,t,n,r){var c=vt();r=r===void 0?null:r;var d=c.memoizedState.inst;We!==null&&r!==null&&Bu(r,We.memoizedState.deps)?c.memoizedState=Yr(t,d,n,r):(Te.flags|=e,c.memoizedState=Yr(1|t,d,n,r))}function Pp(e,t){ms(8390656,8,e,t)}function Qu(e,t){ps(2048,8,e,t)}function yS(e){Te.flags|=4;var t=Te.updateQueue;if(t===null)t=ds(),Te.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function qp(e){var t=vt().memoizedState;return yS({ref:t,nextImpl:e}),function(){if((Xe&2)!==0)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Vp(e,t){return ps(4,2,e,t)}function Yp(e,t){return ps(4,4,e,t)}function Gp(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ip(e,t,n){n=n!=null?n.concat([e]):null,ps(4,4,Gp.bind(null,t,e),n)}function Zu(){}function $p(e,t){var n=vt();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Bu(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Kp(e,t){var n=vt();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Bu(t,r[1]))return r[0];if(r=e(),er){Pn(!0);try{e()}finally{Pn(!1)}}return n.memoizedState=[r,t],r}function Fu(e,t,n){return n===void 0||(Aa&1073741824)!==0&&(Ue&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Xg(),Te.lanes|=e,vl|=e,n)}function Xp(e,t,n,r){return un(n,t)?n:Pr.current!==null?(e=Fu(e,n,r),un(e,t)||(jt=!0),e):(Aa&42)===0||(Aa&1073741824)!==0&&(Ue&261930)===0?(jt=!0,e.memoizedState=n):(e=Xg(),Te.lanes|=e,vl|=e,t)}function Qp(e,t,n,r,c){var d=I.p;I.p=d!==0&&8>d?d:8;var y=L.T,C={};L.T=C,ed(e,!1,t,n);try{var _=c(),V=L.S;if(V!==null&&V(C,_),_!==null&&typeof _=="object"&&typeof _.then=="function"){var K=hS(_,r);Ko(e,t,K,gn(e))}else Ko(e,t,r,gn(e))}catch(F){Ko(e,t,{then:function(){},status:"rejected",reason:F},gn())}finally{I.p=d,y!==null&&C.types!==null&&(y.types=C.types),L.T=y}}function xS(){}function Ju(e,t,n,r){if(e.tag!==5)throw Error(i(476));var c=Zp(e).queue;Qp(e,c,t,te,n===null?xS:function(){return Fp(e),n(r)})}function Zp(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ma,lastRenderedState:te},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ma,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Fp(e){var t=Zp(e);t.next===null&&(t=e.alternate.memoizedState),Ko(e,t.next.queue,{},gn())}function Wu(){return kt(ui)}function Jp(){return vt().memoizedState}function Wp(){return vt().memoizedState}function bS(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=gn();e=dl(n);var r=fl(t,e,n);r!==null&&(tn(r,t,n),Vo(r,t,n)),t={cache:Nu()},e.payload=t;return}t=t.return}}function SS(e,t,n){var r=gn();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},gs(e)?tg(t,n):(n=vu(e,t,n,r),n!==null&&(tn(n,e,r),ng(n,t,r)))}function eg(e,t,n){var r=gn();Ko(e,t,n,r)}function Ko(e,t,n,r){var c={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(gs(e))tg(t,c);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var y=t.lastRenderedState,C=d(y,n);if(c.hasEagerState=!0,c.eagerState=C,un(C,y))return Zi(e,t,c,0),lt===null&&Qi(),!1}catch{}finally{}if(n=vu(e,t,c,r),n!==null)return tn(n,e,r),ng(n,t,r),!0}return!1}function ed(e,t,n,r){if(r={lane:2,revertLane:Od(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},gs(e)){if(t)throw Error(i(479))}else t=vu(e,n,r,2),t!==null&&tn(t,e,2)}function gs(e){var t=e.alternate;return e===Te||t!==null&&t===Te}function tg(e,t){qr=cs=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ng(e,t,n){if((n&4194048)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Xt(e,n)}}var Xo={readContext:kt,use:fs,useCallback:mt,useContext:mt,useEffect:mt,useImperativeHandle:mt,useLayoutEffect:mt,useInsertionEffect:mt,useMemo:mt,useReducer:mt,useRef:mt,useState:mt,useDebugValue:mt,useDeferredValue:mt,useTransition:mt,useSyncExternalStore:mt,useId:mt,useHostTransitionStatus:mt,useFormState:mt,useActionState:mt,useOptimistic:mt,useMemoCache:mt,useCacheRefresh:mt};Xo.useEffectEvent=mt;var ag={readContext:kt,use:fs,useCallback:function(e,t){return It().memoizedState=[e,t===void 0?null:t],e},useContext:kt,useEffect:Pp,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,ms(4194308,4,Gp.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ms(4194308,4,e,t)},useInsertionEffect:function(e,t){ms(4,2,e,t)},useMemo:function(e,t){var n=It();t=t===void 0?null:t;var r=e();if(er){Pn(!0);try{e()}finally{Pn(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=It();if(n!==void 0){var c=n(t);if(er){Pn(!0);try{n(t)}finally{Pn(!1)}}}else c=t;return r.memoizedState=r.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},r.queue=e,e=e.dispatch=SS.bind(null,Te,e),[r.memoizedState,e]},useRef:function(e){var t=It();return e={current:e},t.memoizedState=e},useState:function(e){e=Ku(e);var t=e.queue,n=eg.bind(null,Te,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Zu,useDeferredValue:function(e,t){var n=It();return Fu(n,e,t)},useTransition:function(){var e=Ku(!1);return e=Qp.bind(null,Te,e.queue,!0,!1),It().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=Te,c=It();if(Be){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),lt===null)throw Error(i(349));(Ue&127)!==0||Cp(r,t,n)}c.memoizedState=n;var d={value:n,getSnapshot:t};return c.queue=d,Pp(Rp.bind(null,r,d,e),[e]),r.flags|=2048,Yr(9,{destroy:void 0},Ep.bind(null,r,d,n,t),null),n},useId:function(){var e=It(),t=lt.identifierPrefix;if(Be){var n=aa,r=na;n=(r&~(1<<32-bt(r)-1)).toString(32)+n,t="_"+t+"R_"+n,n=us++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=mS++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Wu,useFormState:kp,useActionState:kp,useOptimistic:function(e){var t=It();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=ed.bind(null,Te,!0,n),n.dispatch=t,[e,t]},useMemoCache:Gu,useCacheRefresh:function(){return It().memoizedState=bS.bind(null,Te)},useEffectEvent:function(e){var t=It(),n={impl:e};return t.memoizedState=n,function(){if((Xe&2)!==0)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},td={readContext:kt,use:fs,useCallback:$p,useContext:kt,useEffect:Qu,useImperativeHandle:Ip,useInsertionEffect:Vp,useLayoutEffect:Yp,useMemo:Kp,useReducer:hs,useRef:Bp,useState:function(){return hs(Ma)},useDebugValue:Zu,useDeferredValue:function(e,t){var n=vt();return Xp(n,We.memoizedState,e,t)},useTransition:function(){var e=hs(Ma)[0],t=vt().memoizedState;return[typeof e=="boolean"?e:$o(e),t]},useSyncExternalStore:jp,useId:Jp,useHostTransitionStatus:Wu,useFormState:Lp,useActionState:Lp,useOptimistic:function(e,t){var n=vt();return Ap(n,We,e,t)},useMemoCache:Gu,useCacheRefresh:Wp};td.useEffectEvent=qp;var lg={readContext:kt,use:fs,useCallback:$p,useContext:kt,useEffect:Qu,useImperativeHandle:Ip,useInsertionEffect:Vp,useLayoutEffect:Yp,useMemo:Kp,useReducer:$u,useRef:Bp,useState:function(){return $u(Ma)},useDebugValue:Zu,useDeferredValue:function(e,t){var n=vt();return We===null?Fu(n,e,t):Xp(n,We.memoizedState,e,t)},useTransition:function(){var e=$u(Ma)[0],t=vt().memoizedState;return[typeof e=="boolean"?e:$o(e),t]},useSyncExternalStore:jp,useId:Jp,useHostTransitionStatus:Wu,useFormState:Hp,useActionState:Hp,useOptimistic:function(e,t){var n=vt();return We!==null?Ap(n,We,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Gu,useCacheRefresh:Wp};lg.useEffectEvent=qp;function nd(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:S({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ad={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=gn(),c=dl(r);c.payload=t,n!=null&&(c.callback=n),t=fl(e,c,r),t!==null&&(tn(t,e,r),Vo(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=gn(),c=dl(r);c.tag=1,c.payload=t,n!=null&&(c.callback=n),t=fl(e,c,r),t!==null&&(tn(t,e,r),Vo(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=gn(),r=dl(n);r.tag=2,t!=null&&(r.callback=t),t=fl(e,r,n),t!==null&&(tn(t,e,n),Vo(t,e,n))}};function rg(e,t,n,r,c,d,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,d,y):t.prototype&&t.prototype.isPureReactComponent?!zo(n,r)||!zo(c,d):!0}function og(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ad.enqueueReplaceState(t,t.state,null)}function tr(e,t){var n=t;if("ref"in t){n={};for(var r in t)r!=="ref"&&(n[r]=t[r])}if(e=e.defaultProps){n===t&&(n=S({},n));for(var c in e)n[c]===void 0&&(n[c]=e[c])}return n}function ig(e){Xi(e)}function sg(e){console.error(e)}function cg(e){Xi(e)}function vs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function ug(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function ld(e,t,n){return n=dl(n),n.tag=3,n.payload={element:null},n.callback=function(){vs(e,t)},n}function dg(e){return e=dl(e),e.tag=3,e}function fg(e,t,n,r){var c=n.type.getDerivedStateFromError;if(typeof c=="function"){var d=r.value;e.payload=function(){return c(d)},e.callback=function(){ug(t,n,r)}}var y=n.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){ug(t,n,r),typeof c!="function"&&(yl===null?yl=new Set([this]):yl.add(this));var C=r.stack;this.componentDidCatch(r.value,{componentStack:C!==null?C:""})})}function wS(e,t,n,r,c){if(n.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=n.alternate,t!==null&&kr(t,n,c,!0),n=fn.current,n!==null){switch(n.tag){case 31:case 13:return _n===null?As():n.alternate===null&&pt===0&&(pt=3),n.flags&=-257,n.flags|=65536,n.lanes=c,r===ls?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Ad(e,r,c)),!1;case 22:return n.flags|=65536,r===ls?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Ad(e,r,c)),!1}throw Error(i(435,n.tag))}return Ad(e,r,c),As(),!1}if(Be)return t=fn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,r!==ju&&(e=Error(i(422),{cause:r}),Uo(Tn(e,n)))):(r!==ju&&(t=Error(i(423),{cause:r}),Uo(Tn(t,n))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,r=Tn(r,n),c=ld(e.stateNode,r,c),zu(e,c),pt!==4&&(pt=2)),!1;var d=Error(i(520),{cause:r});if(d=Tn(d,n),ni===null?ni=[d]:ni.push(d),pt!==4&&(pt=2),t===null)return!0;r=Tn(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=c&-c,n.lanes|=e,e=ld(n.stateNode,r,e),zu(n,e),!1;case 1:if(t=n.type,d=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(yl===null||!yl.has(d))))return n.flags|=65536,c&=-c,n.lanes|=c,c=dg(c),fg(c,e,n,r),zu(n,c),!1}n=n.return}while(n!==null);return!1}var rd=Error(i(461)),jt=!1;function Lt(e,t,n,r){t.child=e===null?gp(t,null,n,r):Wl(t,e.child,n,r)}function hg(e,t,n,r,c){n=n.render;var d=t.ref;if("ref"in r){var y={};for(var C in r)C!=="ref"&&(y[C]=r[C])}else y=r;return Ql(t),r=Pu(e,t,n,y,d,c),C=qu(),e!==null&&!jt?(Vu(e,t,c),_a(e,t,c)):(Be&&C&&Su(t),t.flags|=1,Lt(e,t,r,c),t.child)}function mg(e,t,n,r,c){if(e===null){var d=n.type;return typeof d=="function"&&!yu(d)&&d.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=d,pg(e,t,d,r,c)):(e=Ji(n.type,null,r,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!hd(e,c)){var y=d.memoizedProps;if(n=n.compare,n=n!==null?n:zo,n(y,r)&&e.ref===t.ref)return _a(e,t,c)}return t.flags|=1,e=Ea(d,r),e.ref=t.ref,e.return=t,t.child=e}function pg(e,t,n,r,c){if(e!==null){var d=e.memoizedProps;if(zo(d,r)&&e.ref===t.ref)if(jt=!1,t.pendingProps=r=d,hd(e,c))(e.flags&131072)!==0&&(jt=!0);else return t.lanes=e.lanes,_a(e,t,c)}return od(e,t,n,r,c)}function gg(e,t,n,r){var c=r.children,d=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((t.flags&128)!==0){if(d=d!==null?d.baseLanes|n:n,e!==null){for(r=t.child=e.child,c=0;r!==null;)c=c|r.lanes|r.childLanes,r=r.sibling;r=c&~d}else r=0,t.child=null;return vg(e,t,d,n,r)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ns(t,d!==null?d.cachePool:null),d!==null?xp(t,d):Lu(),bp(t);else return r=t.lanes=536870912,vg(e,t,d!==null?d.baseLanes|n:n,n,r)}else d!==null?(ns(t,d.cachePool),xp(t,d),ml(),t.memoizedState=null):(e!==null&&ns(t,null),Lu(),ml());return Lt(e,t,c,n),t.child}function Qo(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function vg(e,t,n,r,c){var d=Mu();return d=d===null?null:{parent:St._currentValue,pool:d},t.memoizedState={baseLanes:n,cachePool:d},e!==null&&ns(t,null),Lu(),bp(t),e!==null&&kr(e,t,r,!0),t.childLanes=c,null}function ys(e,t){return t=bs({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function yg(e,t,n){return Wl(t,e.child,null,n),e=ys(t,t.pendingProps),e.flags|=2,hn(t),t.memoizedState=null,e}function jS(e,t,n){var r=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Be){if(r.mode==="hidden")return e=ys(t,r),t.lanes=536870912,Qo(null,e);if(Hu(t),(e=ct)?(e=Mv(e,Mn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ol!==null?{id:na,overflow:aa}:null,retryLane:536870912,hydrationErrors:null},n=tp(e),n.return=t,t.child=n,zt=t,ct=null)):e=null,e===null)throw sl(t);return t.lanes=536870912,null}return ys(t,r)}var d=e.memoizedState;if(d!==null){var y=d.dehydrated;if(Hu(t),c)if(t.flags&256)t.flags&=-257,t=yg(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(jt||kr(e,t,n,!1),c=(n&e.childLanes)!==0,jt||c){if(r=lt,r!==null&&(y=qn(r,n),y!==0&&y!==d.retryLane))throw d.retryLane=y,Il(e,y),tn(r,e,y),rd;As(),t=yg(e,t,n)}else e=d.treeContext,ct=On(y.nextSibling),zt=t,Be=!0,il=null,Mn=!1,e!==null&&lp(t,e),t=ys(t,r),t.flags|=4096;return t}return e=Ea(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function xs(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function od(e,t,n,r,c){return Ql(t),n=Pu(e,t,n,r,void 0,c),r=qu(),e!==null&&!jt?(Vu(e,t,c),_a(e,t,c)):(Be&&r&&Su(t),t.flags|=1,Lt(e,t,n,c),t.child)}function xg(e,t,n,r,c,d){return Ql(t),t.updateQueue=null,n=wp(t,r,n,c),Sp(e),r=qu(),e!==null&&!jt?(Vu(e,t,d),_a(e,t,d)):(Be&&r&&Su(t),t.flags|=1,Lt(e,t,n,d),t.child)}function bg(e,t,n,r,c){if(Ql(t),t.stateNode===null){var d=_r,y=n.contextType;typeof y=="object"&&y!==null&&(d=kt(y)),d=new n(r,d),t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=ad,t.stateNode=d,d._reactInternals=t,d=t.stateNode,d.props=r,d.state=t.memoizedState,d.refs={},Ou(t),y=n.contextType,d.context=typeof y=="object"&&y!==null?kt(y):_r,d.state=t.memoizedState,y=n.getDerivedStateFromProps,typeof y=="function"&&(nd(t,n,y,r),d.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(y=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),y!==d.state&&ad.enqueueReplaceState(d,d.state,null),Go(t,r,d,c),Yo(),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){d=t.stateNode;var C=t.memoizedProps,_=tr(n,C);d.props=_;var V=d.context,K=n.contextType;y=_r,typeof K=="object"&&K!==null&&(y=kt(K));var F=n.getDerivedStateFromProps;K=typeof F=="function"||typeof d.getSnapshotBeforeUpdate=="function",C=t.pendingProps!==C,K||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(C||V!==y)&&og(t,d,r,y),ul=!1;var Y=t.memoizedState;d.state=Y,Go(t,r,d,c),Yo(),V=t.memoizedState,C||Y!==V||ul?(typeof F=="function"&&(nd(t,n,F,r),V=t.memoizedState),(_=ul||rg(t,n,_,r,Y,V,y))?(K||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(t.flags|=4194308)):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=V),d.props=r,d.state=V,d.context=y,r=_):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{d=t.stateNode,Du(e,t),y=t.memoizedProps,K=tr(n,y),d.props=K,F=t.pendingProps,Y=d.context,V=n.contextType,_=_r,typeof V=="object"&&V!==null&&(_=kt(V)),C=n.getDerivedStateFromProps,(V=typeof C=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(y!==F||Y!==_)&&og(t,d,r,_),ul=!1,Y=t.memoizedState,d.state=Y,Go(t,r,d,c),Yo();var G=t.memoizedState;y!==F||Y!==G||ul||e!==null&&e.dependencies!==null&&es(e.dependencies)?(typeof C=="function"&&(nd(t,n,C,r),G=t.memoizedState),(K=ul||rg(t,n,K,r,Y,G,_)||e!==null&&e.dependencies!==null&&es(e.dependencies))?(V||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(r,G,_),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(r,G,_)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||y===e.memoizedProps&&Y===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&Y===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=G),d.props=r,d.state=G,d.context=_,r=K):(typeof d.componentDidUpdate!="function"||y===e.memoizedProps&&Y===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&Y===e.memoizedState||(t.flags|=1024),r=!1)}return d=r,xs(e,t),r=(t.flags&128)!==0,d||r?(d=t.stateNode,n=r&&typeof n.getDerivedStateFromError!="function"?null:d.render(),t.flags|=1,e!==null&&r?(t.child=Wl(t,e.child,null,c),t.child=Wl(t,null,n,c)):Lt(e,t,n,c),t.memoizedState=d.state,e=t.child):e=_a(e,t,c),e}function Sg(e,t,n,r){return Kl(),t.flags|=256,Lt(e,t,n,r),t.child}var id={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function sd(e){return{baseLanes:e,cachePool:up()}}function cd(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=pn),e}function wg(e,t,n){var r=t.pendingProps,c=!1,d=(t.flags&128)!==0,y;if((y=d)||(y=e!==null&&e.memoizedState===null?!1:(gt.current&2)!==0),y&&(c=!0,t.flags&=-129),y=(t.flags&32)!==0,t.flags&=-33,e===null){if(Be){if(c?hl(t):ml(),(e=ct)?(e=Mv(e,Mn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ol!==null?{id:na,overflow:aa}:null,retryLane:536870912,hydrationErrors:null},n=tp(e),n.return=t,t.child=n,zt=t,ct=null)):e=null,e===null)throw sl(t);return Id(e)?t.lanes=32:t.lanes=536870912,null}var C=r.children;return r=r.fallback,c?(ml(),c=t.mode,C=bs({mode:"hidden",children:C},c),r=$l(r,c,n,null),C.return=t,r.return=t,C.sibling=r,t.child=C,r=t.child,r.memoizedState=sd(n),r.childLanes=cd(e,y,n),t.memoizedState=id,Qo(null,r)):(hl(t),ud(t,C))}var _=e.memoizedState;if(_!==null&&(C=_.dehydrated,C!==null)){if(d)t.flags&256?(hl(t),t.flags&=-257,t=dd(e,t,n)):t.memoizedState!==null?(ml(),t.child=e.child,t.flags|=128,t=null):(ml(),C=r.fallback,c=t.mode,r=bs({mode:"visible",children:r.children},c),C=$l(C,c,n,null),C.flags|=2,r.return=t,C.return=t,r.sibling=C,t.child=r,Wl(t,e.child,null,n),r=t.child,r.memoizedState=sd(n),r.childLanes=cd(e,y,n),t.memoizedState=id,t=Qo(null,r));else if(hl(t),Id(C)){if(y=C.nextSibling&&C.nextSibling.dataset,y)var V=y.dgst;y=V,r=Error(i(419)),r.stack="",r.digest=y,Uo({value:r,source:null,stack:null}),t=dd(e,t,n)}else if(jt||kr(e,t,n,!1),y=(n&e.childLanes)!==0,jt||y){if(y=lt,y!==null&&(r=qn(y,n),r!==0&&r!==_.retryLane))throw _.retryLane=r,Il(e,r),tn(y,e,r),rd;Gd(C)||As(),t=dd(e,t,n)}else Gd(C)?(t.flags|=192,t.child=e.child,t=null):(e=_.treeContext,ct=On(C.nextSibling),zt=t,Be=!0,il=null,Mn=!1,e!==null&&lp(t,e),t=ud(t,r.children),t.flags|=4096);return t}return c?(ml(),C=r.fallback,c=t.mode,_=e.child,V=_.sibling,r=Ea(_,{mode:"hidden",children:r.children}),r.subtreeFlags=_.subtreeFlags&65011712,V!==null?C=Ea(V,C):(C=$l(C,c,n,null),C.flags|=2),C.return=t,r.return=t,r.sibling=C,t.child=r,Qo(null,r),r=t.child,C=e.child.memoizedState,C===null?C=sd(n):(c=C.cachePool,c!==null?(_=St._currentValue,c=c.parent!==_?{parent:_,pool:_}:c):c=up(),C={baseLanes:C.baseLanes|n,cachePool:c}),r.memoizedState=C,r.childLanes=cd(e,y,n),t.memoizedState=id,Qo(e.child,r)):(hl(t),n=e.child,e=n.sibling,n=Ea(n,{mode:"visible",children:r.children}),n.return=t,n.sibling=null,e!==null&&(y=t.deletions,y===null?(t.deletions=[e],t.flags|=16):y.push(e)),t.child=n,t.memoizedState=null,n)}function ud(e,t){return t=bs({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function bs(e,t){return e=dn(22,e,null,t),e.lanes=0,e}function dd(e,t,n){return Wl(t,e.child,null,n),e=ud(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function jg(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ru(e.return,t,n)}function fd(e,t,n,r,c,d){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:c,treeForkCount:d}:(y.isBackwards=t,y.rendering=null,y.renderingStartTime=0,y.last=r,y.tail=n,y.tailMode=c,y.treeForkCount=d)}function Cg(e,t,n){var r=t.pendingProps,c=r.revealOrder,d=r.tail;r=r.children;var y=gt.current,C=(y&2)!==0;if(C?(y=y&1|2,t.flags|=128):y&=1,$(gt,y),Lt(e,t,r,n),r=Be?Lo:0,!C&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&jg(e,n,t);else if(e.tag===19)jg(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(c){case"forwards":for(n=t.child,c=null;n!==null;)e=n.alternate,e!==null&&ss(e)===null&&(c=n),n=n.sibling;n=c,n===null?(c=t.child,t.child=null):(c=n.sibling,n.sibling=null),fd(t,!1,c,n,d,r);break;case"backwards":case"unstable_legacy-backwards":for(n=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&ss(e)===null){t.child=c;break}e=c.sibling,c.sibling=n,n=c,c=e}fd(t,!0,n,null,d,r);break;case"together":fd(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function _a(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),vl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(kr(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=Ea(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ea(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function hd(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&es(e)))}function CS(e,t,n){switch(t.tag){case 3:le(t,t.stateNode.containerInfo),cl(t,St,e.memoizedState.cache),Kl();break;case 27:case 5:De(t);break;case 4:le(t,t.stateNode.containerInfo);break;case 10:cl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Hu(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated!==null?(hl(t),t.flags|=128,null):(n&t.child.childLanes)!==0?wg(e,t,n):(hl(t),e=_a(e,t,n),e!==null?e.sibling:null);hl(t);break;case 19:var c=(e.flags&128)!==0;if(r=(n&t.childLanes)!==0,r||(kr(e,t,n,!1),r=(n&t.childLanes)!==0),c){if(r)return Cg(e,t,n);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),$(gt,gt.current),r)break;return null;case 22:return t.lanes=0,gg(e,t,n,t.pendingProps);case 24:cl(t,St,e.memoizedState.cache)}return _a(e,t,n)}function Eg(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)jt=!0;else{if(!hd(e,n)&&(t.flags&128)===0)return jt=!1,CS(e,t,n);jt=(e.flags&131072)!==0}else jt=!1,Be&&(t.flags&1048576)!==0&&ap(t,Lo,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=Fl(t.elementType),t.type=e,typeof e=="function")yu(e)?(r=tr(e,r),t.tag=1,t=bg(null,t,e,r,n)):(t.tag=0,t=od(null,t,e,r,n));else{if(e!=null){var c=e.$$typeof;if(c===O){t.tag=11,t=hg(null,t,e,r,n);break e}else if(c===z){t.tag=14,t=mg(null,t,e,r,n);break e}}throw t=ce(e)||e,Error(i(306,t,""))}}return t;case 0:return od(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,c=tr(r,t.pendingProps),bg(e,t,r,c,n);case 3:e:{if(le(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var d=t.memoizedState;c=d.element,Du(e,t),Go(t,r,null,n);var y=t.memoizedState;if(r=y.cache,cl(t,St,r),r!==d.cache&&Tu(t,[St],n,!0),Yo(),r=y.element,d.isDehydrated)if(d={element:r,isDehydrated:!1,cache:y.cache},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){t=Sg(e,t,r,n);break e}else if(r!==c){c=Tn(Error(i(424)),t),Uo(c),t=Sg(e,t,r,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(ct=On(e.firstChild),zt=t,Be=!0,il=null,Mn=!0,n=gp(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Kl(),r===c){t=_a(e,t,n);break e}Lt(e,t,r,n)}t=t.child}return t;case 26:return xs(e,t),e===null?(n=Lv(t.type,null,t.pendingProps,null))?t.memoizedState=n:Be||(n=t.type,e=t.pendingProps,r=Ls(X.current).createElement(n),r[Dt]=t,r[Qt]=e,Ut(r,n,e),Nt(r),t.stateNode=r):t.memoizedState=Lv(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return De(t),e===null&&Be&&(r=t.stateNode=Dv(t.type,t.pendingProps,X.current),zt=t,Mn=!0,c=ct,wl(t.type)?($d=c,ct=On(r.firstChild)):ct=c),Lt(e,t,t.pendingProps.children,n),xs(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Be&&((c=r=ct)&&(r=ew(r,t.type,t.pendingProps,Mn),r!==null?(t.stateNode=r,zt=t,ct=On(r.firstChild),Mn=!1,c=!0):c=!1),c||sl(t)),De(t),c=t.type,d=t.pendingProps,y=e!==null?e.memoizedProps:null,r=d.children,qd(c,d)?r=null:y!==null&&qd(c,y)&&(t.flags|=32),t.memoizedState!==null&&(c=Pu(e,t,pS,null,null,n),ui._currentValue=c),xs(e,t),Lt(e,t,r,n),t.child;case 6:return e===null&&Be&&((e=n=ct)&&(n=tw(n,t.pendingProps,Mn),n!==null?(t.stateNode=n,zt=t,ct=null,e=!0):e=!1),e||sl(t)),null;case 13:return wg(e,t,n);case 4:return le(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Wl(t,null,r,n):Lt(e,t,r,n),t.child;case 11:return hg(e,t,t.type,t.pendingProps,n);case 7:return Lt(e,t,t.pendingProps,n),t.child;case 8:return Lt(e,t,t.pendingProps.children,n),t.child;case 12:return Lt(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,cl(t,t.type,r.value),Lt(e,t,r.children,n),t.child;case 9:return c=t.type._context,r=t.pendingProps.children,Ql(t),c=kt(c),r=r(c),t.flags|=1,Lt(e,t,r,n),t.child;case 14:return mg(e,t,t.type,t.pendingProps,n);case 15:return pg(e,t,t.type,t.pendingProps,n);case 19:return Cg(e,t,n);case 31:return jS(e,t,n);case 22:return gg(e,t,n,t.pendingProps);case 24:return Ql(t),r=kt(St),e===null?(c=Mu(),c===null&&(c=lt,d=Nu(),c.pooledCache=d,d.refCount++,d!==null&&(c.pooledCacheLanes|=n),c=d),t.memoizedState={parent:r,cache:c},Ou(t),cl(t,St,c)):((e.lanes&n)!==0&&(Du(e,t),Go(t,null,null,n),Yo()),c=e.memoizedState,d=t.memoizedState,c.parent!==r?(c={parent:r,cache:r},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),cl(t,St,r)):(r=d.cache,cl(t,St,r),r!==c.cache&&Tu(t,[St],n,!0))),Lt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Oa(e){e.flags|=4}function md(e,t,n,r,c){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(Jg())e.flags|=8192;else throw Jl=ls,_u}else e.flags&=-16777217}function Rg(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!qv(t))if(Jg())e.flags|=8192;else throw Jl=ls,_u}function Ss(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?at():536870912,e.lanes|=t,Kr|=t)}function Zo(e,t){if(!Be)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ut(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var c=e.child;c!==null;)n|=c.lanes|c.childLanes,r|=c.subtreeFlags&65011712,r|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)n|=c.lanes|c.childLanes,r|=c.subtreeFlags,r|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function ES(e,t,n){var r=t.pendingProps;switch(wu(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ut(t),null;case 1:return ut(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Na(St),fe(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(zr(t)?Oa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Cu())),ut(t),null;case 26:var c=t.type,d=t.memoizedState;return e===null?(Oa(t),d!==null?(ut(t),Rg(t,d)):(ut(t),md(t,c,null,r,n))):d?d!==e.memoizedState?(Oa(t),ut(t),Rg(t,d)):(ut(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&Oa(t),ut(t),md(t,c,e,r,n)),null;case 27:if(_e(t),n=X.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Oa(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return ut(t),null}e=ne.current,zr(t)?rp(t):(e=Dv(c,r,n),t.stateNode=e,Oa(t))}return ut(t),null;case 5:if(_e(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Oa(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return ut(t),null}if(d=ne.current,zr(t))rp(t);else{var y=Ls(X.current);switch(d){case 1:d=y.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:d=y.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":d=y.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":d=y.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":d=y.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof r.is=="string"?y.createElement("select",{is:r.is}):y.createElement("select"),r.multiple?d.multiple=!0:r.size&&(d.size=r.size);break;default:d=typeof r.is=="string"?y.createElement(c,{is:r.is}):y.createElement(c)}}d[Dt]=t,d[Qt]=r;e:for(y=t.child;y!==null;){if(y.tag===5||y.tag===6)d.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===t)break e;for(;y.sibling===null;){if(y.return===null||y.return===t)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}t.stateNode=d;e:switch(Ut(d,c,r),c){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&Oa(t)}}return ut(t),md(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Oa(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(i(166));if(e=X.current,zr(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,c=zt,c!==null)switch(c.tag){case 27:case 5:r=c.memoizedProps}e[Dt]=t,e=!!(e.nodeValue===n||r!==null&&r.suppressHydrationWarning===!0||wv(e.nodeValue,n)),e||sl(t,!0)}else e=Ls(e).createTextNode(r),e[Dt]=t,t.stateNode=e}return ut(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=zr(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(557));e[Dt]=t}else Kl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ut(t),e=!1}else n=Cu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(hn(t),t):(hn(t),null);if((t.flags&128)!==0)throw Error(i(558))}return ut(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=zr(t),r!==null&&r.dehydrated!==null){if(e===null){if(!c)throw Error(i(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(i(317));c[Dt]=t}else Kl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ut(t),c=!1}else c=Cu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(hn(t),t):(hn(t),null)}return hn(t),(t.flags&128)!==0?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,c=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(c=r.alternate.memoizedState.cachePool.pool),d=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(d=r.memoizedState.cachePool.pool),d!==c&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Ss(t,t.updateQueue),ut(t),null);case 4:return fe(),e===null&&Ld(t.stateNode.containerInfo),ut(t),null;case 10:return Na(t.type),ut(t),null;case 19:if(B(gt),r=t.memoizedState,r===null)return ut(t),null;if(c=(t.flags&128)!==0,d=r.rendering,d===null)if(c)Zo(r,!1);else{if(pt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=ss(e),d!==null){for(t.flags|=128,Zo(r,!1),e=d.updateQueue,t.updateQueue=e,Ss(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ep(n,e),n=n.sibling;return $(gt,gt.current&1|2),Be&&Ra(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Vt()>Rs&&(t.flags|=128,c=!0,Zo(r,!1),t.lanes=4194304)}else{if(!c)if(e=ss(d),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,Ss(t,e),Zo(r,!0),r.tail===null&&r.tailMode==="hidden"&&!d.alternate&&!Be)return ut(t),null}else 2*Vt()-r.renderingStartTime>Rs&&n!==536870912&&(t.flags|=128,c=!0,Zo(r,!1),t.lanes=4194304);r.isBackwards?(d.sibling=t.child,t.child=d):(e=r.last,e!==null?e.sibling=d:t.child=d,r.last=d)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Vt(),e.sibling=null,n=gt.current,$(gt,c?n&1|2:n&1),Be&&Ra(t,r.treeForkCount),e):(ut(t),null);case 22:case 23:return hn(t),Uu(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?(n&536870912)!==0&&(t.flags&128)===0&&(ut(t),t.subtreeFlags&6&&(t.flags|=8192)):ut(t),n=t.updateQueue,n!==null&&Ss(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&B(Zl),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Na(St),ut(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function RS(e,t){switch(wu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Na(St),fe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return _e(t),null;case 31:if(t.memoizedState!==null){if(hn(t),t.alternate===null)throw Error(i(340));Kl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(hn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Kl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(gt),null;case 4:return fe(),null;case 10:return Na(t.type),null;case 22:case 23:return hn(t),Uu(),e!==null&&B(Zl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Na(St),null;case 25:return null;default:return null}}function Tg(e,t){switch(wu(t),t.tag){case 3:Na(St),fe();break;case 26:case 27:case 5:_e(t);break;case 4:fe();break;case 31:t.memoizedState!==null&&hn(t);break;case 13:hn(t);break;case 19:B(gt);break;case 10:Na(t.type);break;case 22:case 23:hn(t),Uu(),e!==null&&B(Zl);break;case 24:Na(St)}}function Fo(e,t){try{var n=t.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var c=r.next;n=c;do{if((n.tag&e)===e){r=void 0;var d=n.create,y=n.inst;r=d(),y.destroy=r}n=n.next}while(n!==c)}}catch(C){Je(t,t.return,C)}}function pl(e,t,n){try{var r=t.updateQueue,c=r!==null?r.lastEffect:null;if(c!==null){var d=c.next;r=d;do{if((r.tag&e)===e){var y=r.inst,C=y.destroy;if(C!==void 0){y.destroy=void 0,c=t;var _=n,V=C;try{V()}catch(K){Je(c,_,K)}}}r=r.next}while(r!==d)}}catch(K){Je(t,t.return,K)}}function Ng(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{yp(t,n)}catch(r){Je(e,e.return,r)}}}function Ag(e,t,n){n.props=tr(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){Je(e,t,r)}}function Jo(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n=="function"?e.refCleanup=n(r):n.current=r}}catch(c){Je(e,t,c)}}function la(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r=="function")try{r()}catch(c){Je(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(c){Je(e,t,c)}else n.current=null}function Mg(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(c){Je(e,e.return,c)}}function pd(e,t,n){try{var r=e.stateNode;XS(r,e.type,n,t),r[Qt]=t}catch(c){Je(e,e.return,c)}}function _g(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&wl(e.type)||e.tag===4}function gd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||_g(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&wl(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function vd(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ja));else if(r!==4&&(r===27&&wl(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(vd(e,t,n),e=e.sibling;e!==null;)vd(e,t,n),e=e.sibling}function ws(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&wl(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(ws(e,t,n),e=e.sibling;e!==null;)ws(e,t,n),e=e.sibling}function Og(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);Ut(t,r,n),t[Dt]=e,t[Qt]=n}catch(d){Je(e,e.return,d)}}var Da=!1,Ct=!1,yd=!1,Dg=typeof WeakSet=="function"?WeakSet:Set,At=null;function TS(e,t){if(e=e.containerInfo,Bd=Ys,e=Im(e),du(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var c=r.anchorOffset,d=r.focusNode;r=r.focusOffset;try{n.nodeType,d.nodeType}catch{n=null;break e}var y=0,C=-1,_=-1,V=0,K=0,F=e,Y=null;t:for(;;){for(var G;F!==n||c!==0&&F.nodeType!==3||(C=y+c),F!==d||r!==0&&F.nodeType!==3||(_=y+r),F.nodeType===3&&(y+=F.nodeValue.length),(G=F.firstChild)!==null;)Y=F,F=G;for(;;){if(F===e)break t;if(Y===n&&++V===c&&(C=y),Y===d&&++K===r&&(_=y),(G=F.nextSibling)!==null)break;F=Y,Y=F.parentNode}F=G}n=C===-1||_===-1?null:{start:C,end:_}}else n=null}n=n||{start:0,end:0}}else n=null;for(Pd={focusedElem:e,selectionRange:n},Ys=!1,At=t;At!==null;)if(t=At,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,At=e;else for(;At!==null;){switch(t=At,d=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)c=e[n],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,n=t,c=d.memoizedProps,d=d.memoizedState,r=n.stateNode;try{var he=tr(n.type,c);e=r.getSnapshotBeforeUpdate(he,d),r.__reactInternalSnapshotBeforeUpdate=e}catch(we){Je(n,n.return,we)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Yd(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Yd(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,At=e;break}At=t.return}}function zg(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:ka(e,n),r&4&&Fo(5,n);break;case 1:if(ka(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(y){Je(n,n.return,y)}else{var c=tr(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(y){Je(n,n.return,y)}}r&64&&Ng(n),r&512&&Jo(n,n.return);break;case 3:if(ka(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{yp(e,t)}catch(y){Je(n,n.return,y)}}break;case 27:t===null&&r&4&&Og(n);case 26:case 5:ka(e,n),t===null&&r&4&&Mg(n),r&512&&Jo(n,n.return);break;case 12:ka(e,n);break;case 31:ka(e,n),r&4&&Ug(e,n);break;case 13:ka(e,n),r&4&&Hg(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=LS.bind(null,n),nw(e,n))));break;case 22:if(r=n.memoizedState!==null||Da,!r){t=t!==null&&t.memoizedState!==null||Ct,c=Da;var d=Ct;Da=r,(Ct=t)&&!d?La(e,n,(n.subtreeFlags&8772)!==0):ka(e,n),Da=c,Ct=d}break;case 30:break;default:ka(e,n)}}function kg(e){var t=e.alternate;t!==null&&(e.alternate=null,kg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Xc(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ft=null,Ft=!1;function za(e,t,n){for(n=n.child;n!==null;)Lg(e,t,n),n=n.sibling}function Lg(e,t,n){if(xt&&typeof xt.onCommitFiberUnmount=="function")try{xt.onCommitFiberUnmount(Sa,n)}catch{}switch(n.tag){case 26:Ct||la(n,t),za(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Ct||la(n,t);var r=ft,c=Ft;wl(n.type)&&(ft=n.stateNode,Ft=!1),za(e,t,n),ii(n.stateNode),ft=r,Ft=c;break;case 5:Ct||la(n,t);case 6:if(r=ft,c=Ft,ft=null,za(e,t,n),ft=r,Ft=c,ft!==null)if(Ft)try{(ft.nodeType===9?ft.body:ft.nodeName==="HTML"?ft.ownerDocument.body:ft).removeChild(n.stateNode)}catch(d){Je(n,t,d)}else try{ft.removeChild(n.stateNode)}catch(d){Je(n,t,d)}break;case 18:ft!==null&&(Ft?(e=ft,Nv(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),to(e)):Nv(ft,n.stateNode));break;case 4:r=ft,c=Ft,ft=n.stateNode.containerInfo,Ft=!0,za(e,t,n),ft=r,Ft=c;break;case 0:case 11:case 14:case 15:pl(2,n,t),Ct||pl(4,n,t),za(e,t,n);break;case 1:Ct||(la(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"&&Ag(n,t,r)),za(e,t,n);break;case 21:za(e,t,n);break;case 22:Ct=(r=Ct)||n.memoizedState!==null,za(e,t,n),Ct=r;break;default:za(e,t,n)}}function Ug(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{to(e)}catch(n){Je(t,t.return,n)}}}function Hg(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{to(e)}catch(n){Je(t,t.return,n)}}function NS(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Dg),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Dg),t;default:throw Error(i(435,e.tag))}}function js(e,t){var n=NS(e);t.forEach(function(r){if(!n.has(r)){n.add(r);var c=US.bind(null,e,r);r.then(c,c)}})}function Jt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var c=n[r],d=e,y=t,C=y;e:for(;C!==null;){switch(C.tag){case 27:if(wl(C.type)){ft=C.stateNode,Ft=!1;break e}break;case 5:ft=C.stateNode,Ft=!1;break e;case 3:case 4:ft=C.stateNode.containerInfo,Ft=!0;break e}C=C.return}if(ft===null)throw Error(i(160));Lg(d,y,c),ft=null,Ft=!1,d=c.alternate,d!==null&&(d.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Bg(t,e),t=t.sibling}var Yn=null;function Bg(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Jt(t,e),Wt(e),r&4&&(pl(3,e,e.return),Fo(3,e),pl(5,e,e.return));break;case 1:Jt(t,e),Wt(e),r&512&&(Ct||n===null||la(n,n.return)),r&64&&Da&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var c=Yn;if(Jt(t,e),Wt(e),r&512&&(Ct||n===null||la(n,n.return)),r&4){var d=n!==null?n.memoizedState:null;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){e:{r=e.type,n=e.memoizedProps,c=c.ownerDocument||c;t:switch(r){case"title":d=c.getElementsByTagName("title")[0],(!d||d[Eo]||d[Dt]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=c.createElement(r),c.head.insertBefore(d,c.querySelector("head > title"))),Ut(d,r,n),d[Dt]=e,Nt(d),r=d;break e;case"link":var y=Bv("link","href",c).get(r+(n.href||""));if(y){for(var C=0;C<y.length;C++)if(d=y[C],d.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&d.getAttribute("rel")===(n.rel==null?null:n.rel)&&d.getAttribute("title")===(n.title==null?null:n.title)&&d.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){y.splice(C,1);break t}}d=c.createElement(r),Ut(d,r,n),c.head.appendChild(d);break;case"meta":if(y=Bv("meta","content",c).get(r+(n.content||""))){for(C=0;C<y.length;C++)if(d=y[C],d.getAttribute("content")===(n.content==null?null:""+n.content)&&d.getAttribute("name")===(n.name==null?null:n.name)&&d.getAttribute("property")===(n.property==null?null:n.property)&&d.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&d.getAttribute("charset")===(n.charSet==null?null:n.charSet)){y.splice(C,1);break t}}d=c.createElement(r),Ut(d,r,n),c.head.appendChild(d);break;default:throw Error(i(468,r))}d[Dt]=e,Nt(d),r=d}e.stateNode=r}else Pv(c,e.type,e.stateNode);else e.stateNode=Hv(c,r,e.memoizedProps);else d!==r?(d===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):d.count--,r===null?Pv(c,e.type,e.stateNode):Hv(c,r,e.memoizedProps)):r===null&&e.stateNode!==null&&pd(e,e.memoizedProps,n.memoizedProps)}break;case 27:Jt(t,e),Wt(e),r&512&&(Ct||n===null||la(n,n.return)),n!==null&&r&4&&pd(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Jt(t,e),Wt(e),r&512&&(Ct||n===null||la(n,n.return)),e.flags&32){c=e.stateNode;try{Cr(c,"")}catch(he){Je(e,e.return,he)}}r&4&&e.stateNode!=null&&(c=e.memoizedProps,pd(e,c,n!==null?n.memoizedProps:c)),r&1024&&(yd=!0);break;case 6:if(Jt(t,e),Wt(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(he){Je(e,e.return,he)}}break;case 3:if(Bs=null,c=Yn,Yn=Us(t.containerInfo),Jt(t,e),Yn=c,Wt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{to(t.containerInfo)}catch(he){Je(e,e.return,he)}yd&&(yd=!1,Pg(e));break;case 4:r=Yn,Yn=Us(e.stateNode.containerInfo),Jt(t,e),Wt(e),Yn=r;break;case 12:Jt(t,e),Wt(e);break;case 31:Jt(t,e),Wt(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,js(e,r)));break;case 13:Jt(t,e),Wt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Es=Vt()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,js(e,r)));break;case 22:c=e.memoizedState!==null;var _=n!==null&&n.memoizedState!==null,V=Da,K=Ct;if(Da=V||c,Ct=K||_,Jt(t,e),Ct=K,Da=V,Wt(e),r&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(n===null||_||Da||Ct||nr(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){_=n=t;try{if(d=_.stateNode,c)y=d.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{C=_.stateNode;var F=_.memoizedProps.style,Y=F!=null&&F.hasOwnProperty("display")?F.display:null;C.style.display=Y==null||typeof Y=="boolean"?"":(""+Y).trim()}}catch(he){Je(_,_.return,he)}}}else if(t.tag===6){if(n===null){_=t;try{_.stateNode.nodeValue=c?"":_.memoizedProps}catch(he){Je(_,_.return,he)}}}else if(t.tag===18){if(n===null){_=t;try{var G=_.stateNode;c?Av(G,!0):Av(_.stateNode,!1)}catch(he){Je(_,_.return,he)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,js(e,n))));break;case 19:Jt(t,e),Wt(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,js(e,r)));break;case 30:break;case 21:break;default:Jt(t,e),Wt(e)}}function Wt(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(_g(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode,d=gd(e);ws(e,d,c);break;case 5:var y=n.stateNode;n.flags&32&&(Cr(y,""),n.flags&=-33);var C=gd(e);ws(e,C,y);break;case 3:case 4:var _=n.stateNode.containerInfo,V=gd(e);vd(e,V,_);break;default:throw Error(i(161))}}catch(K){Je(e,e.return,K)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Pg(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Pg(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ka(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)zg(e,t.alternate,t),t=t.sibling}function nr(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:pl(4,t,t.return),nr(t);break;case 1:la(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Ag(t,t.return,n),nr(t);break;case 27:ii(t.stateNode);case 26:case 5:la(t,t.return),nr(t);break;case 22:t.memoizedState===null&&nr(t);break;case 30:nr(t);break;default:nr(t)}e=e.sibling}}function La(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var r=t.alternate,c=e,d=t,y=d.flags;switch(d.tag){case 0:case 11:case 15:La(c,d,n),Fo(4,d);break;case 1:if(La(c,d,n),r=d,c=r.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(V){Je(r,r.return,V)}if(r=d,c=r.updateQueue,c!==null){var C=r.stateNode;try{var _=c.shared.hiddenCallbacks;if(_!==null)for(c.shared.hiddenCallbacks=null,c=0;c<_.length;c++)vp(_[c],C)}catch(V){Je(r,r.return,V)}}n&&y&64&&Ng(d),Jo(d,d.return);break;case 27:Og(d);case 26:case 5:La(c,d,n),n&&r===null&&y&4&&Mg(d),Jo(d,d.return);break;case 12:La(c,d,n);break;case 31:La(c,d,n),n&&y&4&&Ug(c,d);break;case 13:La(c,d,n),n&&y&4&&Hg(c,d);break;case 22:d.memoizedState===null&&La(c,d,n),Jo(d,d.return);break;case 30:break;default:La(c,d,n)}t=t.sibling}}function xd(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Ho(n))}function bd(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ho(e))}function Gn(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)qg(e,t,n,r),t=t.sibling}function qg(e,t,n,r){var c=t.flags;switch(t.tag){case 0:case 11:case 15:Gn(e,t,n,r),c&2048&&Fo(9,t);break;case 1:Gn(e,t,n,r);break;case 3:Gn(e,t,n,r),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ho(e)));break;case 12:if(c&2048){Gn(e,t,n,r),e=t.stateNode;try{var d=t.memoizedProps,y=d.id,C=d.onPostCommit;typeof C=="function"&&C(y,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(_){Je(t,t.return,_)}}else Gn(e,t,n,r);break;case 31:Gn(e,t,n,r);break;case 13:Gn(e,t,n,r);break;case 23:break;case 22:d=t.stateNode,y=t.alternate,t.memoizedState!==null?d._visibility&2?Gn(e,t,n,r):Wo(e,t):d._visibility&2?Gn(e,t,n,r):(d._visibility|=2,Gr(e,t,n,r,(t.subtreeFlags&10256)!==0||!1)),c&2048&&xd(y,t);break;case 24:Gn(e,t,n,r),c&2048&&bd(t.alternate,t);break;default:Gn(e,t,n,r)}}function Gr(e,t,n,r,c){for(c=c&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var d=e,y=t,C=n,_=r,V=y.flags;switch(y.tag){case 0:case 11:case 15:Gr(d,y,C,_,c),Fo(8,y);break;case 23:break;case 22:var K=y.stateNode;y.memoizedState!==null?K._visibility&2?Gr(d,y,C,_,c):Wo(d,y):(K._visibility|=2,Gr(d,y,C,_,c)),c&&V&2048&&xd(y.alternate,y);break;case 24:Gr(d,y,C,_,c),c&&V&2048&&bd(y.alternate,y);break;default:Gr(d,y,C,_,c)}t=t.sibling}}function Wo(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,c=r.flags;switch(r.tag){case 22:Wo(n,r),c&2048&&xd(r.alternate,r);break;case 24:Wo(n,r),c&2048&&bd(r.alternate,r);break;default:Wo(n,r)}t=t.sibling}}var ei=8192;function Ir(e,t,n){if(e.subtreeFlags&ei)for(e=e.child;e!==null;)Vg(e,t,n),e=e.sibling}function Vg(e,t,n){switch(e.tag){case 26:Ir(e,t,n),e.flags&ei&&e.memoizedState!==null&&mw(n,Yn,e.memoizedState,e.memoizedProps);break;case 5:Ir(e,t,n);break;case 3:case 4:var r=Yn;Yn=Us(e.stateNode.containerInfo),Ir(e,t,n),Yn=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=ei,ei=16777216,Ir(e,t,n),ei=r):Ir(e,t,n));break;default:Ir(e,t,n)}}function Yg(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function ti(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];At=r,Ig(r,e)}Yg(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Gg(e),e=e.sibling}function Gg(e){switch(e.tag){case 0:case 11:case 15:ti(e),e.flags&2048&&pl(9,e,e.return);break;case 3:ti(e);break;case 12:ti(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Cs(e)):ti(e);break;default:ti(e)}}function Cs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];At=r,Ig(r,e)}Yg(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:pl(8,t,t.return),Cs(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Cs(t));break;default:Cs(t)}e=e.sibling}}function Ig(e,t){for(;At!==null;){var n=At;switch(n.tag){case 0:case 11:case 15:pl(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Ho(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,At=r;else e:for(n=e;At!==null;){r=At;var c=r.sibling,d=r.return;if(kg(r),r===n){At=null;break e}if(c!==null){c.return=d,At=c;break e}At=d}}}var AS={getCacheForType:function(e){var t=kt(St),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return kt(St).controller.signal}},MS=typeof WeakMap=="function"?WeakMap:Map,Xe=0,lt=null,ze=null,Ue=0,Fe=0,mn=null,gl=!1,$r=!1,Sd=!1,Ua=0,pt=0,vl=0,ar=0,wd=0,pn=0,Kr=0,ni=null,en=null,jd=!1,Es=0,$g=0,Rs=1/0,Ts=null,yl=null,Rt=0,xl=null,Xr=null,Ha=0,Cd=0,Ed=null,Kg=null,ai=0,Rd=null;function gn(){return(Xe&2)!==0&&Ue!==0?Ue&-Ue:L.T!==null?Od():cm()}function Xg(){if(pn===0)if((Ue&536870912)===0||Be){var e=gr;gr<<=1,(gr&3932160)===0&&(gr=262144),pn=e}else pn=536870912;return e=fn.current,e!==null&&(e.flags|=32),pn}function tn(e,t,n){(e===lt&&(Fe===2||Fe===9)||e.cancelPendingCommit!==null)&&(Qr(e,0),bl(e,Ue,pn,!1)),Ot(e,n),((Xe&2)===0||e!==lt)&&(e===lt&&((Xe&2)===0&&(ar|=n),pt===4&&bl(e,Ue,pn,!1)),ra(e))}function Qg(e,t,n){if((Xe&6)!==0)throw Error(i(327));var r=!n&&(t&127)===0&&(t&e.expiredLanes)===0||je(e,t),c=r?DS(e,t):Nd(e,t,!0),d=r;do{if(c===0){$r&&!r&&bl(e,t,0,!1);break}else{if(n=e.current.alternate,d&&!_S(n)){c=Nd(e,t,!1),d=!1;continue}if(c===2){if(d=t,e.errorRecoveryDisabledLanes&d)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){t=y;e:{var C=e;c=ni;var _=C.current.memoizedState.isDehydrated;if(_&&(Qr(C,y).flags|=256),y=Nd(C,y,!1),y!==2){if(Sd&&!_){C.errorRecoveryDisabledLanes|=d,ar|=d,c=4;break e}d=en,en=c,d!==null&&(en===null?en=d:en.push.apply(en,d))}c=y}if(d=!1,c!==2)continue}}if(c===1){Qr(e,0),bl(e,t,0,!0);break}e:{switch(r=e,d=c,d){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:bl(r,t,pn,!gl);break e;case 2:en=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(c=Es+300-Vt(),10<c)){if(bl(r,t,pn,!gl),vr(r,0,!0)!==0)break e;Ha=t,r.timeoutHandle=Rv(Zg.bind(null,r,n,en,Ts,jd,t,pn,ar,Kr,gl,d,"Throttled",-0,0),c);break e}Zg(r,n,en,Ts,jd,t,pn,ar,Kr,gl,d,null,-0,0)}}break}while(!0);ra(e)}function Zg(e,t,n,r,c,d,y,C,_,V,K,F,Y,G){if(e.timeoutHandle=-1,F=t.subtreeFlags,F&8192||(F&16785408)===16785408){F={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ja},Vg(t,d,F);var he=(d&62914560)===d?Es-Vt():(d&4194048)===d?$g-Vt():0;if(he=pw(F,he),he!==null){Ha=d,e.cancelPendingCommit=he(lv.bind(null,e,t,d,n,r,c,y,C,_,K,F,null,Y,G)),bl(e,d,y,!V);return}}lv(e,t,d,n,r,c,y,C,_)}function _S(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var c=n[r],d=c.getSnapshot;c=c.value;try{if(!un(d(),c))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function bl(e,t,n,r){t&=~wd,t&=~ar,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var c=t;0<c;){var d=31-bt(c),y=1<<d;r[d]=-1,c&=~y}n!==0&&ta(e,n,t)}function Ns(){return(Xe&6)===0?(li(0),!1):!0}function Td(){if(ze!==null){if(Fe===0)var e=ze.return;else e=ze,Ta=Xl=null,Yu(e),Br=null,Po=0,e=ze;for(;e!==null;)Tg(e.alternate,e),e=e.return;ze=null}}function Qr(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,FS(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Ha=0,Td(),lt=e,ze=n=Ea(e.current,null),Ue=t,Fe=0,mn=null,gl=!1,$r=je(e,t),Sd=!1,Kr=pn=wd=ar=vl=pt=0,en=ni=null,jd=!1,(t&8)!==0&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var c=31-bt(r),d=1<<c;t|=e[c],r&=~d}return Ua=t,Qi(),n}function Fg(e,t){Te=null,L.H=Xo,t===Hr||t===as?(t=hp(),Fe=3):t===_u?(t=hp(),Fe=4):Fe=t===rd?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,mn=t,ze===null&&(pt=1,vs(e,Tn(t,e.current)))}function Jg(){var e=fn.current;return e===null?!0:(Ue&4194048)===Ue?_n===null:(Ue&62914560)===Ue||(Ue&536870912)!==0?e===_n:!1}function Wg(){var e=L.H;return L.H=Xo,e===null?Xo:e}function ev(){var e=L.A;return L.A=AS,e}function As(){pt=4,gl||(Ue&4194048)!==Ue&&fn.current!==null||($r=!0),(vl&134217727)===0&&(ar&134217727)===0||lt===null||bl(lt,Ue,pn,!1)}function Nd(e,t,n){var r=Xe;Xe|=2;var c=Wg(),d=ev();(lt!==e||Ue!==t)&&(Ts=null,Qr(e,t)),t=!1;var y=pt;e:do try{if(Fe!==0&&ze!==null){var C=ze,_=mn;switch(Fe){case 8:Td(),y=6;break e;case 3:case 2:case 9:case 6:fn.current===null&&(t=!0);var V=Fe;if(Fe=0,mn=null,Zr(e,C,_,V),n&&$r){y=0;break e}break;default:V=Fe,Fe=0,mn=null,Zr(e,C,_,V)}}OS(),y=pt;break}catch(K){Fg(e,K)}while(!0);return t&&e.shellSuspendCounter++,Ta=Xl=null,Xe=r,L.H=c,L.A=d,ze===null&&(lt=null,Ue=0,Qi()),y}function OS(){for(;ze!==null;)tv(ze)}function DS(e,t){var n=Xe;Xe|=2;var r=Wg(),c=ev();lt!==e||Ue!==t?(Ts=null,Rs=Vt()+500,Qr(e,t)):$r=je(e,t);e:do try{if(Fe!==0&&ze!==null){t=ze;var d=mn;t:switch(Fe){case 1:Fe=0,mn=null,Zr(e,t,d,1);break;case 2:case 9:if(dp(d)){Fe=0,mn=null,nv(t);break}t=function(){Fe!==2&&Fe!==9||lt!==e||(Fe=7),ra(e)},d.then(t,t);break e;case 3:Fe=7;break e;case 4:Fe=5;break e;case 7:dp(d)?(Fe=0,mn=null,nv(t)):(Fe=0,mn=null,Zr(e,t,d,7));break;case 5:var y=null;switch(ze.tag){case 26:y=ze.memoizedState;case 5:case 27:var C=ze;if(y?qv(y):C.stateNode.complete){Fe=0,mn=null;var _=C.sibling;if(_!==null)ze=_;else{var V=C.return;V!==null?(ze=V,Ms(V)):ze=null}break t}}Fe=0,mn=null,Zr(e,t,d,5);break;case 6:Fe=0,mn=null,Zr(e,t,d,6);break;case 8:Td(),pt=6;break e;default:throw Error(i(462))}}zS();break}catch(K){Fg(e,K)}while(!0);return Ta=Xl=null,L.H=r,L.A=c,Xe=n,ze!==null?0:(lt=null,Ue=0,Qi(),pt)}function zS(){for(;ze!==null&&!ya();)tv(ze)}function tv(e){var t=Eg(e.alternate,e,Ua);e.memoizedProps=e.pendingProps,t===null?Ms(e):ze=t}function nv(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=xg(n,t,t.pendingProps,t.type,void 0,Ue);break;case 11:t=xg(n,t,t.pendingProps,t.type.render,t.ref,Ue);break;case 5:Yu(t);default:Tg(n,t),t=ze=ep(t,Ua),t=Eg(n,t,Ua)}e.memoizedProps=e.pendingProps,t===null?Ms(e):ze=t}function Zr(e,t,n,r){Ta=Xl=null,Yu(t),Br=null,Po=0;var c=t.return;try{if(wS(e,c,t,n,Ue)){pt=1,vs(e,Tn(n,e.current)),ze=null;return}}catch(d){if(c!==null)throw ze=c,d;pt=1,vs(e,Tn(n,e.current)),ze=null;return}t.flags&32768?(Be||r===1?e=!0:$r||(Ue&536870912)!==0?e=!1:(gl=e=!0,(r===2||r===9||r===3||r===6)&&(r=fn.current,r!==null&&r.tag===13&&(r.flags|=16384))),av(t,e)):Ms(t)}function Ms(e){var t=e;do{if((t.flags&32768)!==0){av(t,gl);return}e=t.return;var n=ES(t.alternate,t,Ua);if(n!==null){ze=n;return}if(t=t.sibling,t!==null){ze=t;return}ze=t=e}while(t!==null);pt===0&&(pt=5)}function av(e,t){do{var n=RS(e.alternate,e);if(n!==null){n.flags&=32767,ze=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){ze=e;return}ze=e=n}while(e!==null);pt=6,ze=null}function lv(e,t,n,r,c,d,y,C,_){e.cancelPendingCommit=null;do _s();while(Rt!==0);if((Xe&6)!==0)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(d=t.lanes|t.childLanes,d|=gu,ea(e,n,d,y,C,_),e===lt&&(ze=lt=null,Ue=0),Xr=t,xl=e,Ha=n,Cd=d,Ed=c,Kg=r,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,HS(pr,function(){return cv(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||r){r=L.T,L.T=null,c=I.p,I.p=2,y=Xe,Xe|=4;try{TS(e,t,n)}finally{Xe=y,I.p=c,L.T=r}}Rt=1,rv(),ov(),iv()}}function rv(){if(Rt===1){Rt=0;var e=xl,t=Xr,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=L.T,L.T=null;var r=I.p;I.p=2;var c=Xe;Xe|=4;try{Bg(t,e);var d=Pd,y=Im(e.containerInfo),C=d.focusedElem,_=d.selectionRange;if(y!==C&&C&&C.ownerDocument&&Gm(C.ownerDocument.documentElement,C)){if(_!==null&&du(C)){var V=_.start,K=_.end;if(K===void 0&&(K=V),"selectionStart"in C)C.selectionStart=V,C.selectionEnd=Math.min(K,C.value.length);else{var F=C.ownerDocument||document,Y=F&&F.defaultView||window;if(Y.getSelection){var G=Y.getSelection(),he=C.textContent.length,we=Math.min(_.start,he),tt=_.end===void 0?we:Math.min(_.end,he);!G.extend&&we>tt&&(y=tt,tt=we,we=y);var k=Ym(C,we),D=Ym(C,tt);if(k&&D&&(G.rangeCount!==1||G.anchorNode!==k.node||G.anchorOffset!==k.offset||G.focusNode!==D.node||G.focusOffset!==D.offset)){var q=F.createRange();q.setStart(k.node,k.offset),G.removeAllRanges(),we>tt?(G.addRange(q),G.extend(D.node,D.offset)):(q.setEnd(D.node,D.offset),G.addRange(q))}}}}for(F=[],G=C;G=G.parentNode;)G.nodeType===1&&F.push({element:G,left:G.scrollLeft,top:G.scrollTop});for(typeof C.focus=="function"&&C.focus(),C=0;C<F.length;C++){var Q=F[C];Q.element.scrollLeft=Q.left,Q.element.scrollTop=Q.top}}Ys=!!Bd,Pd=Bd=null}finally{Xe=c,I.p=r,L.T=n}}e.current=t,Rt=2}}function ov(){if(Rt===2){Rt=0;var e=xl,t=Xr,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=L.T,L.T=null;var r=I.p;I.p=2;var c=Xe;Xe|=4;try{zg(e,t.alternate,t)}finally{Xe=c,I.p=r,L.T=n}}Rt=3}}function iv(){if(Rt===4||Rt===3){Rt=0,xa();var e=xl,t=Xr,n=Ha,r=Kg;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Rt=5:(Rt=0,Xr=xl=null,sv(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(yl=null),$c(n),t=t.stateNode,xt&&typeof xt.onCommitFiberRoot=="function")try{xt.onCommitFiberRoot(Sa,t,void 0,(t.current.flags&128)===128)}catch{}if(r!==null){t=L.T,c=I.p,I.p=2,L.T=null;try{for(var d=e.onRecoverableError,y=0;y<r.length;y++){var C=r[y];d(C.value,{componentStack:C.stack})}}finally{L.T=t,I.p=c}}(Ha&3)!==0&&_s(),ra(e),c=e.pendingLanes,(n&261930)!==0&&(c&42)!==0?e===Rd?ai++:(ai=0,Rd=e):ai=0,li(0)}}function sv(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ho(t)))}function _s(){return rv(),ov(),iv(),cv()}function cv(){if(Rt!==5)return!1;var e=xl,t=Cd;Cd=0;var n=$c(Ha),r=L.T,c=I.p;try{I.p=32>n?32:n,L.T=null,n=Ed,Ed=null;var d=xl,y=Ha;if(Rt=0,Xr=xl=null,Ha=0,(Xe&6)!==0)throw Error(i(331));var C=Xe;if(Xe|=4,Gg(d.current),qg(d,d.current,y,n),Xe=C,li(0,!1),xt&&typeof xt.onPostCommitFiberRoot=="function")try{xt.onPostCommitFiberRoot(Sa,d)}catch{}return!0}finally{I.p=c,L.T=r,sv(e,t)}}function uv(e,t,n){t=Tn(n,t),t=ld(e.stateNode,t,2),e=fl(e,t,2),e!==null&&(Ot(e,2),ra(e))}function Je(e,t,n){if(e.tag===3)uv(e,e,n);else for(;t!==null;){if(t.tag===3){uv(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(yl===null||!yl.has(r))){e=Tn(n,e),n=dg(2),r=fl(t,n,2),r!==null&&(fg(n,r,t,e),Ot(r,2),ra(r));break}}t=t.return}}function Ad(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new MS;var c=new Set;r.set(t,c)}else c=r.get(t),c===void 0&&(c=new Set,r.set(t,c));c.has(n)||(Sd=!0,c.add(n),e=kS.bind(null,e,t,n),t.then(e,e))}function kS(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,lt===e&&(Ue&n)===n&&(pt===4||pt===3&&(Ue&62914560)===Ue&&300>Vt()-Es?(Xe&2)===0&&Qr(e,0):wd|=n,Kr===Ue&&(Kr=0)),ra(e)}function dv(e,t){t===0&&(t=at()),e=Il(e,t),e!==null&&(Ot(e,t),ra(e))}function LS(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),dv(e,n)}function US(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,c=e.memoizedState;c!==null&&(n=c.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),dv(e,n)}function HS(e,t){return nl(e,t)}var Os=null,Fr=null,Md=!1,Ds=!1,_d=!1,Sl=0;function ra(e){e!==Fr&&e.next===null&&(Fr===null?Os=Fr=e:Fr=Fr.next=e),Ds=!0,Md||(Md=!0,PS())}function li(e,t){if(!_d&&Ds){_d=!0;do for(var n=!1,r=Os;r!==null;){if(e!==0){var c=r.pendingLanes;if(c===0)var d=0;else{var y=r.suspendedLanes,C=r.pingedLanes;d=(1<<31-bt(42|e)+1)-1,d&=c&~(y&~C),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(n=!0,pv(r,d))}else d=Ue,d=vr(r,r===lt?d:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(d&3)===0||je(r,d)||(n=!0,pv(r,d));r=r.next}while(n);_d=!1}}function BS(){fv()}function fv(){Ds=Md=!1;var e=0;Sl!==0&&ZS()&&(e=Sl);for(var t=Vt(),n=null,r=Os;r!==null;){var c=r.next,d=hv(r,t);d===0?(r.next=null,n===null?Os=c:n.next=c,c===null&&(Fr=n)):(n=r,(e!==0||(d&3)!==0)&&(Ds=!0)),r=c}Rt!==0&&Rt!==5||li(e),Sl!==0&&(Sl=0)}function hv(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,c=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var y=31-bt(d),C=1<<y,_=c[y];_===-1?((C&n)===0||(C&r)!==0)&&(c[y]=Qe(C,t)):_<=t&&(e.expiredLanes|=C),d&=~C}if(t=lt,n=Ue,n=vr(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Fe===2||Fe===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Bn(r),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||je(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Bn(r),$c(n)){case 2:case 8:n=ba;break;case 32:n=pr;break;case 268435456:n=Bl;break;default:n=pr}return r=mv.bind(null,e),n=nl(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Bn(r),e.callbackPriority=2,e.callbackNode=null,2}function mv(e,t){if(Rt!==0&&Rt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(_s()&&e.callbackNode!==n)return null;var r=Ue;return r=vr(e,e===lt?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Qg(e,r,t),hv(e,Vt()),e.callbackNode!=null&&e.callbackNode===n?mv.bind(null,e):null)}function pv(e,t){if(_s())return null;Qg(e,t,!0)}function PS(){JS(function(){(Xe&6)!==0?nl(Yt,BS):fv()})}function Od(){if(Sl===0){var e=Lr;e===0&&(e=Pl,Pl<<=1,(Pl&261888)===0&&(Pl=256)),Sl=e}return Sl}function gv(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:qi(""+e)}function vv(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function qS(e,t,n,r,c){if(t==="submit"&&n&&n.stateNode===c){var d=gv((c[Qt]||null).action),y=r.submitter;y&&(t=(t=y[Qt]||null)?gv(t.formAction):y.getAttribute("formAction"),t!==null&&(d=t,y=null));var C=new Ii("action","action",null,r,c);e.push({event:C,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Sl!==0){var _=y?vv(c,y):new FormData(c);Ju(n,{pending:!0,data:_,method:c.method,action:d},null,_)}}else typeof d=="function"&&(C.preventDefault(),_=y?vv(c,y):new FormData(c),Ju(n,{pending:!0,data:_,method:c.method,action:d},d,_))},currentTarget:c}]})}}for(var Dd=0;Dd<pu.length;Dd++){var zd=pu[Dd],VS=zd.toLowerCase(),YS=zd[0].toUpperCase()+zd.slice(1);Vn(VS,"on"+YS)}Vn(Xm,"onAnimationEnd"),Vn(Qm,"onAnimationIteration"),Vn(Zm,"onAnimationStart"),Vn("dblclick","onDoubleClick"),Vn("focusin","onFocus"),Vn("focusout","onBlur"),Vn(rS,"onTransitionRun"),Vn(oS,"onTransitionStart"),Vn(iS,"onTransitionCancel"),Vn(Fm,"onTransitionEnd"),wr("onMouseEnter",["mouseout","mouseover"]),wr("onMouseLeave",["mouseout","mouseover"]),wr("onPointerEnter",["pointerout","pointerover"]),wr("onPointerLeave",["pointerout","pointerover"]),ql("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ql("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ql("onBeforeInput",["compositionend","keypress","textInput","paste"]),ql("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ql("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ql("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ri="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(" "),GS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ri));function yv(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],c=r.event;r=r.listeners;e:{var d=void 0;if(t)for(var y=r.length-1;0<=y;y--){var C=r[y],_=C.instance,V=C.currentTarget;if(C=C.listener,_!==d&&c.isPropagationStopped())break e;d=C,c.currentTarget=V;try{d(c)}catch(K){Xi(K)}c.currentTarget=null,d=_}else for(y=0;y<r.length;y++){if(C=r[y],_=C.instance,V=C.currentTarget,C=C.listener,_!==d&&c.isPropagationStopped())break e;d=C,c.currentTarget=V;try{d(c)}catch(K){Xi(K)}c.currentTarget=null,d=_}}}}function ke(e,t){var n=t[Kc];n===void 0&&(n=t[Kc]=new Set);var r=e+"__bubble";n.has(r)||(xv(t,e,2,!1),n.add(r))}function kd(e,t,n){var r=0;t&&(r|=4),xv(n,e,r,t)}var zs="_reactListening"+Math.random().toString(36).slice(2);function Ld(e){if(!e[zs]){e[zs]=!0,fm.forEach(function(n){n!=="selectionchange"&&(GS.has(n)||kd(n,!1,e),kd(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[zs]||(t[zs]=!0,kd("selectionchange",!1,t))}}function xv(e,t,n,r){switch(Xv(t)){case 2:var c=yw;break;case 8:c=xw;break;default:c=Fd}n=c.bind(null,t,n,e),c=void 0,!nu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),r?c!==void 0?e.addEventListener(t,n,{capture:!0,passive:c}):e.addEventListener(t,n,!0):c!==void 0?e.addEventListener(t,n,{passive:c}):e.addEventListener(t,n,!1)}function Ud(e,t,n,r,c){var d=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var y=r.tag;if(y===3||y===4){var C=r.stateNode.containerInfo;if(C===c)break;if(y===4)for(y=r.return;y!==null;){var _=y.tag;if((_===3||_===4)&&y.stateNode.containerInfo===c)return;y=y.return}for(;C!==null;){if(y=xr(C),y===null)return;if(_=y.tag,_===5||_===6||_===26||_===27){r=d=y;continue e}C=C.parentNode}}r=r.return}Cm(function(){var V=d,K=eu(n),F=[];e:{var Y=Jm.get(e);if(Y!==void 0){var G=Ii,he=e;switch(e){case"keypress":if(Yi(n)===0)break e;case"keydown":case"keyup":G=U1;break;case"focusin":he="focus",G=ou;break;case"focusout":he="blur",G=ou;break;case"beforeblur":case"afterblur":G=ou;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":G=Tm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":G=E1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":G=P1;break;case Xm:case Qm:case Zm:G=N1;break;case Fm:G=V1;break;case"scroll":case"scrollend":G=j1;break;case"wheel":G=G1;break;case"copy":case"cut":case"paste":G=M1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":G=Am;break;case"toggle":case"beforetoggle":G=$1}var we=(t&4)!==0,tt=!we&&(e==="scroll"||e==="scrollend"),k=we?Y!==null?Y+"Capture":null:Y;we=[];for(var D=V,q;D!==null;){var Q=D;if(q=Q.stateNode,Q=Q.tag,Q!==5&&Q!==26&&Q!==27||q===null||k===null||(Q=To(D,k),Q!=null&&we.push(oi(D,Q,q))),tt)break;D=D.return}0<we.length&&(Y=new G(Y,he,null,n,K),F.push({event:Y,listeners:we}))}}if((t&7)===0){e:{if(Y=e==="mouseover"||e==="pointerover",G=e==="mouseout"||e==="pointerout",Y&&n!==Wc&&(he=n.relatedTarget||n.fromElement)&&(xr(he)||he[yr]))break e;if((G||Y)&&(Y=K.window===K?K:(Y=K.ownerDocument)?Y.defaultView||Y.parentWindow:window,G?(he=n.relatedTarget||n.toElement,G=V,he=he?xr(he):null,he!==null&&(tt=f(he),we=he.tag,he!==tt||we!==5&&we!==27&&we!==6)&&(he=null)):(G=null,he=V),G!==he)){if(we=Tm,Q="onMouseLeave",k="onMouseEnter",D="mouse",(e==="pointerout"||e==="pointerover")&&(we=Am,Q="onPointerLeave",k="onPointerEnter",D="pointer"),tt=G==null?Y:Ro(G),q=he==null?Y:Ro(he),Y=new we(Q,D+"leave",G,n,K),Y.target=tt,Y.relatedTarget=q,Q=null,xr(K)===V&&(we=new we(k,D+"enter",he,n,K),we.target=q,we.relatedTarget=tt,Q=we),tt=Q,G&&he)t:{for(we=IS,k=G,D=he,q=0,Q=k;Q;Q=we(Q))q++;Q=0;for(var ye=D;ye;ye=we(ye))Q++;for(;0<q-Q;)k=we(k),q--;for(;0<Q-q;)D=we(D),Q--;for(;q--;){if(k===D||D!==null&&k===D.alternate){we=k;break t}k=we(k),D=we(D)}we=null}else we=null;G!==null&&bv(F,Y,G,we,!1),he!==null&&tt!==null&&bv(F,tt,he,we,!0)}}e:{if(Y=V?Ro(V):window,G=Y.nodeName&&Y.nodeName.toLowerCase(),G==="select"||G==="input"&&Y.type==="file")var Ve=Um;else if(km(Y))if(Hm)Ve=nS;else{Ve=eS;var pe=W1}else G=Y.nodeName,!G||G.toLowerCase()!=="input"||Y.type!=="checkbox"&&Y.type!=="radio"?V&&Jc(V.elementType)&&(Ve=Um):Ve=tS;if(Ve&&(Ve=Ve(e,V))){Lm(F,Ve,n,K);break e}pe&&pe(e,Y,V),e==="focusout"&&V&&Y.type==="number"&&V.memoizedProps.value!=null&&Fc(Y,"number",Y.value)}switch(pe=V?Ro(V):window,e){case"focusin":(km(pe)||pe.contentEditable==="true")&&(Nr=pe,fu=V,ko=null);break;case"focusout":ko=fu=Nr=null;break;case"mousedown":hu=!0;break;case"contextmenu":case"mouseup":case"dragend":hu=!1,$m(F,n,K);break;case"selectionchange":if(lS)break;case"keydown":case"keyup":$m(F,n,K)}var Ne;if(su)e:{switch(e){case"compositionstart":var He="onCompositionStart";break e;case"compositionend":He="onCompositionEnd";break e;case"compositionupdate":He="onCompositionUpdate";break e}He=void 0}else Tr?Dm(e,n)&&(He="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(He="onCompositionStart");He&&(Mm&&n.locale!=="ko"&&(Tr||He!=="onCompositionStart"?He==="onCompositionEnd"&&Tr&&(Ne=Em()):(rl=K,au="value"in rl?rl.value:rl.textContent,Tr=!0)),pe=ks(V,He),0<pe.length&&(He=new Nm(He,e,null,n,K),F.push({event:He,listeners:pe}),Ne?He.data=Ne:(Ne=zm(n),Ne!==null&&(He.data=Ne)))),(Ne=X1?Q1(e,n):Z1(e,n))&&(He=ks(V,"onBeforeInput"),0<He.length&&(pe=new Nm("onBeforeInput","beforeinput",null,n,K),F.push({event:pe,listeners:He}),pe.data=Ne)),qS(F,e,V,n,K)}yv(F,t)})}function oi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ks(e,t){for(var n=t+"Capture",r=[];e!==null;){var c=e,d=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||d===null||(c=To(e,n),c!=null&&r.unshift(oi(e,c,d)),c=To(e,t),c!=null&&r.push(oi(e,c,d))),e.tag===3)return r;e=e.return}return[]}function IS(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function bv(e,t,n,r,c){for(var d=t._reactName,y=[];n!==null&&n!==r;){var C=n,_=C.alternate,V=C.stateNode;if(C=C.tag,_!==null&&_===r)break;C!==5&&C!==26&&C!==27||V===null||(_=V,c?(V=To(n,d),V!=null&&y.unshift(oi(n,V,_))):c||(V=To(n,d),V!=null&&y.push(oi(n,V,_)))),n=n.return}y.length!==0&&e.push({event:t,listeners:y})}var $S=/\r\n?/g,KS=/\u0000|\uFFFD/g;function Sv(e){return(typeof e=="string"?e:""+e).replace($S,`
49
+ `).replace(KS,"")}function wv(e,t){return t=Sv(t),Sv(e)===t}function et(e,t,n,r,c,d){switch(n){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||Cr(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&Cr(e,""+r);break;case"className":Bi(e,"class",r);break;case"tabIndex":Bi(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":Bi(e,n,r);break;case"style":wm(e,r,d);break;case"data":if(t!=="object"){Bi(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=qi(""+r),e.setAttribute(n,r);break;case"action":case"formAction":if(typeof r=="function"){e.setAttribute(n,"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 d=="function"&&(n==="formAction"?(t!=="input"&&et(e,t,"name",c.name,c,null),et(e,t,"formEncType",c.formEncType,c,null),et(e,t,"formMethod",c.formMethod,c,null),et(e,t,"formTarget",c.formTarget,c,null)):(et(e,t,"encType",c.encType,c,null),et(e,t,"method",c.method,c,null),et(e,t,"target",c.target,c,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=qi(""+r),e.setAttribute(n,r);break;case"onClick":r!=null&&(e.onclick=ja);break;case"onScroll":r!=null&&ke("scroll",e);break;case"onScrollEnd":r!=null&&ke("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(i(61));if(n=r.__html,n!=null){if(c.children!=null)throw Error(i(60));e.innerHTML=n}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}n=qi(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,""+r):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":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":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":r===!0?e.setAttribute(n,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,r):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case"popover":ke("beforetoggle",e),ke("toggle",e),Hi(e,"popover",r);break;case"xlinkActuate":wa(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":wa(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":wa(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":wa(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":wa(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":wa(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":wa(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":wa(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":wa(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":Hi(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=S1.get(n)||n,Hi(e,n,r))}}function Hd(e,t,n,r,c,d){switch(n){case"style":wm(e,r,d);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(i(61));if(n=r.__html,n!=null){if(c.children!=null)throw Error(i(60));e.innerHTML=n}}break;case"children":typeof r=="string"?Cr(e,r):(typeof r=="number"||typeof r=="bigint")&&Cr(e,""+r);break;case"onScroll":r!=null&&ke("scroll",e);break;case"onScrollEnd":r!=null&&ke("scrollend",e);break;case"onClick":r!=null&&(e.onclick=ja);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!hm.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(c=n.endsWith("Capture"),t=n.slice(2,c?n.length-7:void 0),d=e[Qt]||null,d=d!=null?d[n]:null,typeof d=="function"&&e.removeEventListener(t,d,c),typeof r=="function")){typeof d!="function"&&d!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,c);break e}n in e?e[n]=r:r===!0?e.setAttribute(n,""):Hi(e,n,r)}}}function Ut(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ke("error",e),ke("load",e);var r=!1,c=!1,d;for(d in n)if(n.hasOwnProperty(d)){var y=n[d];if(y!=null)switch(d){case"src":r=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:et(e,t,d,y,n,null)}}c&&et(e,t,"srcSet",n.srcSet,n,null),r&&et(e,t,"src",n.src,n,null);return;case"input":ke("invalid",e);var C=d=y=c=null,_=null,V=null;for(r in n)if(n.hasOwnProperty(r)){var K=n[r];if(K!=null)switch(r){case"name":c=K;break;case"type":y=K;break;case"checked":_=K;break;case"defaultChecked":V=K;break;case"value":d=K;break;case"defaultValue":C=K;break;case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(i(137,t));break;default:et(e,t,r,K,n,null)}}ym(e,d,C,_,V,y,c,!1);return;case"select":ke("invalid",e),r=y=d=null;for(c in n)if(n.hasOwnProperty(c)&&(C=n[c],C!=null))switch(c){case"value":d=C;break;case"defaultValue":y=C;break;case"multiple":r=C;default:et(e,t,c,C,n,null)}t=d,n=y,e.multiple=!!r,t!=null?jr(e,!!r,t,!1):n!=null&&jr(e,!!r,n,!0);return;case"textarea":ke("invalid",e),d=c=r=null;for(y in n)if(n.hasOwnProperty(y)&&(C=n[y],C!=null))switch(y){case"value":r=C;break;case"defaultValue":c=C;break;case"children":d=C;break;case"dangerouslySetInnerHTML":if(C!=null)throw Error(i(91));break;default:et(e,t,y,C,n,null)}bm(e,r,c,d);return;case"option":for(_ in n)if(n.hasOwnProperty(_)&&(r=n[_],r!=null))switch(_){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:et(e,t,_,r,n,null)}return;case"dialog":ke("beforetoggle",e),ke("toggle",e),ke("cancel",e),ke("close",e);break;case"iframe":case"object":ke("load",e);break;case"video":case"audio":for(r=0;r<ri.length;r++)ke(ri[r],e);break;case"image":ke("error",e),ke("load",e);break;case"details":ke("toggle",e);break;case"embed":case"source":case"link":ke("error",e),ke("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(V in n)if(n.hasOwnProperty(V)&&(r=n[V],r!=null))switch(V){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:et(e,t,V,r,n,null)}return;default:if(Jc(t)){for(K in n)n.hasOwnProperty(K)&&(r=n[K],r!==void 0&&Hd(e,t,K,r,n,void 0));return}}for(C in n)n.hasOwnProperty(C)&&(r=n[C],r!=null&&et(e,t,C,r,n,null))}function XS(e,t,n,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,d=null,y=null,C=null,_=null,V=null,K=null;for(G in n){var F=n[G];if(n.hasOwnProperty(G)&&F!=null)switch(G){case"checked":break;case"value":break;case"defaultValue":_=F;default:r.hasOwnProperty(G)||et(e,t,G,null,r,F)}}for(var Y in r){var G=r[Y];if(F=n[Y],r.hasOwnProperty(Y)&&(G!=null||F!=null))switch(Y){case"type":d=G;break;case"name":c=G;break;case"checked":V=G;break;case"defaultChecked":K=G;break;case"value":y=G;break;case"defaultValue":C=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(i(137,t));break;default:G!==F&&et(e,t,Y,G,r,F)}}Zc(e,y,C,_,V,K,d,c);return;case"select":G=y=C=Y=null;for(d in n)if(_=n[d],n.hasOwnProperty(d)&&_!=null)switch(d){case"value":break;case"multiple":G=_;default:r.hasOwnProperty(d)||et(e,t,d,null,r,_)}for(c in r)if(d=r[c],_=n[c],r.hasOwnProperty(c)&&(d!=null||_!=null))switch(c){case"value":Y=d;break;case"defaultValue":C=d;break;case"multiple":y=d;default:d!==_&&et(e,t,c,d,r,_)}t=C,n=y,r=G,Y!=null?jr(e,!!n,Y,!1):!!r!=!!n&&(t!=null?jr(e,!!n,t,!0):jr(e,!!n,n?[]:"",!1));return;case"textarea":G=Y=null;for(C in n)if(c=n[C],n.hasOwnProperty(C)&&c!=null&&!r.hasOwnProperty(C))switch(C){case"value":break;case"children":break;default:et(e,t,C,null,r,c)}for(y in r)if(c=r[y],d=n[y],r.hasOwnProperty(y)&&(c!=null||d!=null))switch(y){case"value":Y=c;break;case"defaultValue":G=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(i(91));break;default:c!==d&&et(e,t,y,c,r,d)}xm(e,Y,G);return;case"option":for(var he in n)if(Y=n[he],n.hasOwnProperty(he)&&Y!=null&&!r.hasOwnProperty(he))switch(he){case"selected":e.selected=!1;break;default:et(e,t,he,null,r,Y)}for(_ in r)if(Y=r[_],G=n[_],r.hasOwnProperty(_)&&Y!==G&&(Y!=null||G!=null))switch(_){case"selected":e.selected=Y&&typeof Y!="function"&&typeof Y!="symbol";break;default:et(e,t,_,Y,r,G)}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 we in n)Y=n[we],n.hasOwnProperty(we)&&Y!=null&&!r.hasOwnProperty(we)&&et(e,t,we,null,r,Y);for(V in r)if(Y=r[V],G=n[V],r.hasOwnProperty(V)&&Y!==G&&(Y!=null||G!=null))switch(V){case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(i(137,t));break;default:et(e,t,V,Y,r,G)}return;default:if(Jc(t)){for(var tt in n)Y=n[tt],n.hasOwnProperty(tt)&&Y!==void 0&&!r.hasOwnProperty(tt)&&Hd(e,t,tt,void 0,r,Y);for(K in r)Y=r[K],G=n[K],!r.hasOwnProperty(K)||Y===G||Y===void 0&&G===void 0||Hd(e,t,K,Y,r,G);return}}for(var k in n)Y=n[k],n.hasOwnProperty(k)&&Y!=null&&!r.hasOwnProperty(k)&&et(e,t,k,null,r,Y);for(F in r)Y=r[F],G=n[F],!r.hasOwnProperty(F)||Y===G||Y==null&&G==null||et(e,t,F,Y,r,G)}function jv(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function QS(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),r=0;r<n.length;r++){var c=n[r],d=c.transferSize,y=c.initiatorType,C=c.duration;if(d&&C&&jv(y)){for(y=0,C=c.responseEnd,r+=1;r<n.length;r++){var _=n[r],V=_.startTime;if(V>C)break;var K=_.transferSize,F=_.initiatorType;K&&jv(F)&&(_=_.responseEnd,y+=K*(_<C?1:(C-V)/(_-V)))}if(--r,t+=8*(d+y)/(c.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Bd=null,Pd=null;function Ls(e){return e.nodeType===9?e:e.ownerDocument}function Cv(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Ev(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function qd(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Vd=null;function ZS(){var e=window.event;return e&&e.type==="popstate"?e===Vd?!1:(Vd=e,!0):(Vd=null,!1)}var Rv=typeof setTimeout=="function"?setTimeout:void 0,FS=typeof clearTimeout=="function"?clearTimeout:void 0,Tv=typeof Promise=="function"?Promise:void 0,JS=typeof queueMicrotask=="function"?queueMicrotask:typeof Tv<"u"?function(e){return Tv.resolve(null).then(e).catch(WS)}:Rv;function WS(e){setTimeout(function(){throw e})}function wl(e){return e==="head"}function Nv(e,t){var n=t,r=0;do{var c=n.nextSibling;if(e.removeChild(n),c&&c.nodeType===8)if(n=c.data,n==="/$"||n==="/&"){if(r===0){e.removeChild(c),to(t);return}r--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")r++;else if(n==="html")ii(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,ii(n);for(var d=n.firstChild;d;){var y=d.nextSibling,C=d.nodeName;d[Eo]||C==="SCRIPT"||C==="STYLE"||C==="LINK"&&d.rel.toLowerCase()==="stylesheet"||n.removeChild(d),d=y}}else n==="body"&&ii(e.ownerDocument.body);n=c}while(n);to(t)}function Av(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),r&&r.nodeType===8)if(n=r.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=r}while(n)}function Yd(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Yd(n),Xc(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function ew(e,t,n,r){for(;e.nodeType===1;){var c=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[Eo])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var d=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=On(e.nextSibling),e===null)break}return null}function tw(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=On(e.nextSibling),e===null))return null;return e}function Mv(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=On(e.nextSibling),e===null))return null;return e}function Gd(e){return e.data==="$?"||e.data==="$~"}function Id(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function nw(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function On(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var $d=null;function _v(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return On(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function Ov(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function Dv(e,t,n){switch(t=Ls(n),e){case"html":if(e=t.documentElement,!e)throw Error(i(452));return e;case"head":if(e=t.head,!e)throw Error(i(453));return e;case"body":if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function ii(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Xc(e)}var Dn=new Map,zv=new Set;function Us(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ba=I.d;I.d={f:aw,r:lw,D:rw,C:ow,L:iw,m:sw,X:uw,S:cw,M:dw};function aw(){var e=Ba.f(),t=Ns();return e||t}function lw(e){var t=br(e);t!==null&&t.tag===5&&t.type==="form"?Fp(t):Ba.r(e)}var Jr=typeof document>"u"?null:document;function kv(e,t,n){var r=Jr;if(r&&typeof t=="string"&&t){var c=En(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof n=="string"&&(c+='[crossorigin="'+n+'"]'),zv.has(c)||(zv.add(c),e={rel:e,crossOrigin:n,href:t},r.querySelector(c)===null&&(t=r.createElement("link"),Ut(t,"link",e),Nt(t),r.head.appendChild(t)))}}function rw(e){Ba.D(e),kv("dns-prefetch",e,null)}function ow(e,t){Ba.C(e,t),kv("preconnect",e,t)}function iw(e,t,n){Ba.L(e,t,n);var r=Jr;if(r&&e&&t){var c='link[rel="preload"][as="'+En(t)+'"]';t==="image"&&n&&n.imageSrcSet?(c+='[imagesrcset="'+En(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(c+='[imagesizes="'+En(n.imageSizes)+'"]')):c+='[href="'+En(e)+'"]';var d=c;switch(t){case"style":d=Wr(e);break;case"script":d=eo(e)}Dn.has(d)||(e=S({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Dn.set(d,e),r.querySelector(c)!==null||t==="style"&&r.querySelector(si(d))||t==="script"&&r.querySelector(ci(d))||(t=r.createElement("link"),Ut(t,"link",e),Nt(t),r.head.appendChild(t)))}}function sw(e,t){Ba.m(e,t);var n=Jr;if(n&&e){var r=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+En(r)+'"][href="'+En(e)+'"]',d=c;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=eo(e)}if(!Dn.has(d)&&(e=S({rel:"modulepreload",href:e},t),Dn.set(d,e),n.querySelector(c)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(ci(d)))return}r=n.createElement("link"),Ut(r,"link",e),Nt(r),n.head.appendChild(r)}}}function cw(e,t,n){Ba.S(e,t,n);var r=Jr;if(r&&e){var c=Sr(r).hoistableStyles,d=Wr(e);t=t||"default";var y=c.get(d);if(!y){var C={loading:0,preload:null};if(y=r.querySelector(si(d)))C.loading=5;else{e=S({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Dn.get(d))&&Kd(e,n);var _=y=r.createElement("link");Nt(_),Ut(_,"link",e),_._p=new Promise(function(V,K){_.onload=V,_.onerror=K}),_.addEventListener("load",function(){C.loading|=1}),_.addEventListener("error",function(){C.loading|=2}),C.loading|=4,Hs(y,t,r)}y={type:"stylesheet",instance:y,count:1,state:C},c.set(d,y)}}}function uw(e,t){Ba.X(e,t);var n=Jr;if(n&&e){var r=Sr(n).hoistableScripts,c=eo(e),d=r.get(c);d||(d=n.querySelector(ci(c)),d||(e=S({src:e,async:!0},t),(t=Dn.get(c))&&Xd(e,t),d=n.createElement("script"),Nt(d),Ut(d,"link",e),n.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},r.set(c,d))}}function dw(e,t){Ba.M(e,t);var n=Jr;if(n&&e){var r=Sr(n).hoistableScripts,c=eo(e),d=r.get(c);d||(d=n.querySelector(ci(c)),d||(e=S({src:e,async:!0,type:"module"},t),(t=Dn.get(c))&&Xd(e,t),d=n.createElement("script"),Nt(d),Ut(d,"link",e),n.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},r.set(c,d))}}function Lv(e,t,n,r){var c=(c=X.current)?Us(c):null;if(!c)throw Error(i(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Wr(n.href),n=Sr(c).hoistableStyles,r=n.get(t),r||(r={type:"style",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Wr(n.href);var d=Sr(c).hoistableStyles,y=d.get(e);if(y||(c=c.ownerDocument||c,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,y),(d=c.querySelector(si(e)))&&!d._p&&(y.instance=d,y.state.loading=5),Dn.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Dn.set(e,n),d||fw(c,e,n,y.state))),t&&r===null)throw Error(i(528,""));return y}if(t&&r!==null)throw Error(i(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=eo(n),n=Sr(c).hoistableScripts,r=n.get(t),r||(r={type:"script",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Wr(e){return'href="'+En(e)+'"'}function si(e){return'link[rel="stylesheet"]['+e+"]"}function Uv(e){return S({},e,{"data-precedence":e.precedence,precedence:null})}function fw(e,t,n,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),Ut(t,"link",n),Nt(t),e.head.appendChild(t))}function eo(e){return'[src="'+En(e)+'"]'}function ci(e){return"script[async]"+e}function Hv(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+En(n.href)+'"]');if(r)return t.instance=r,Nt(r),r;var c=S({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),Nt(r),Ut(r,"style",c),Hs(r,n.precedence,e),t.instance=r;case"stylesheet":c=Wr(n.href);var d=e.querySelector(si(c));if(d)return t.state.loading|=4,t.instance=d,Nt(d),d;r=Uv(n),(c=Dn.get(c))&&Kd(r,c),d=(e.ownerDocument||e).createElement("link"),Nt(d);var y=d;return y._p=new Promise(function(C,_){y.onload=C,y.onerror=_}),Ut(d,"link",r),t.state.loading|=4,Hs(d,n.precedence,e),t.instance=d;case"script":return d=eo(n.src),(c=e.querySelector(ci(d)))?(t.instance=c,Nt(c),c):(r=n,(c=Dn.get(d))&&(r=S({},n),Xd(r,c)),e=e.ownerDocument||e,c=e.createElement("script"),Nt(c),Ut(c,"link",r),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(i(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(r=t.instance,t.state.loading|=4,Hs(r,n.precedence,e));return t.instance}function Hs(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=r.length?r[r.length-1]:null,d=c,y=0;y<r.length;y++){var C=r[y];if(C.dataset.precedence===t)d=C;else if(d!==c)break}d?d.parentNode.insertBefore(e,d.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Kd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Xd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Bs=null;function Bv(e,t,n){if(Bs===null){var r=new Map,c=Bs=new Map;c.set(n,r)}else c=Bs,r=c.get(n),r||(r=new Map,c.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),c=0;c<n.length;c++){var d=n[c];if(!(d[Eo]||d[Dt]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var y=d.getAttribute(t)||"";y=e+y;var C=r.get(y);C?C.push(d):r.set(y,[d])}}return r}function Pv(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function hw(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function qv(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function mw(e,t,n,r){if(n.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var c=Wr(r.href),d=t.querySelector(si(c));if(d){t=d._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ps.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=d,Nt(d);return}d=t.ownerDocument||t,r=Uv(r),(c=Dn.get(c))&&Kd(r,c),d=d.createElement("link"),Nt(d);var y=d;y._p=new Promise(function(C,_){y.onload=C,y.onerror=_}),Ut(d,"link",r),n.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=Ps.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Qd=0;function pw(e,t){return e.stylesheets&&e.count===0&&Vs(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Vs(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+t);0<e.imgBytes&&Qd===0&&(Qd=62500*QS());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Vs(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>Qd?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(c)}}:null}function Ps(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Vs(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var qs=null;function Vs(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,qs=new Map,t.forEach(gw,e),qs=null,Ps.call(e))}function gw(e,t){if(!(t.state.loading&4)){var n=qs.get(e);if(n)var r=n.get(null);else{n=new Map,qs.set(e,n);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<c.length;d++){var y=c[d];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(n.set(y.dataset.precedence,y),r=y)}r&&n.set(null,r)}c=t.instance,y=c.getAttribute("data-precedence"),d=n.get(y)||r,d===r&&n.set(null,c),n.set(y,c),this.count++,r=Ps.bind(this),c.addEventListener("load",r),c.addEventListener("error",r),d?d.parentNode.insertBefore(c,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var ui={$$typeof:N,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function vw(e,t,n,r,c,d,y,C,_){this.tag=1,this.containerInfo=e,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=Gt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gt(0),this.hiddenUpdates=Gt(null),this.identifierPrefix=r,this.onUncaughtError=c,this.onCaughtError=d,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=_,this.incompleteTransitions=new Map}function Vv(e,t,n,r,c,d,y,C,_,V,K,F){return e=new vw(e,t,n,y,_,V,K,F,C),t=1,d===!0&&(t|=24),d=dn(3,null,null,t),e.current=d,d.stateNode=e,t=Nu(),t.refCount++,e.pooledCache=t,t.refCount++,d.memoizedState={element:r,isDehydrated:n,cache:t},Ou(d),e}function Yv(e){return e?(e=_r,e):_r}function Gv(e,t,n,r,c,d){c=Yv(c),r.context===null?r.context=c:r.pendingContext=c,r=dl(t),r.payload={element:n},d=d===void 0?null:d,d!==null&&(r.callback=d),n=fl(e,r,t),n!==null&&(tn(n,e,t),Vo(n,e,t))}function Iv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Zd(e,t){Iv(e,t),(e=e.alternate)&&Iv(e,t)}function $v(e){if(e.tag===13||e.tag===31){var t=Il(e,67108864);t!==null&&tn(t,e,67108864),Zd(e,67108864)}}function Kv(e){if(e.tag===13||e.tag===31){var t=gn();t=Ic(t);var n=Il(e,t);n!==null&&tn(n,e,t),Zd(e,t)}}var Ys=!0;function yw(e,t,n,r){var c=L.T;L.T=null;var d=I.p;try{I.p=2,Fd(e,t,n,r)}finally{I.p=d,L.T=c}}function xw(e,t,n,r){var c=L.T;L.T=null;var d=I.p;try{I.p=8,Fd(e,t,n,r)}finally{I.p=d,L.T=c}}function Fd(e,t,n,r){if(Ys){var c=Jd(r);if(c===null)Ud(e,t,r,Gs,n),Qv(e,r);else if(Sw(c,e,t,n,r))r.stopPropagation();else if(Qv(e,r),t&4&&-1<bw.indexOf(e)){for(;c!==null;){var d=br(c);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var y=Bt(d.pendingLanes);if(y!==0){var C=d;for(C.pendingLanes|=2,C.entangledLanes|=2;y;){var _=1<<31-bt(y);C.entanglements[1]|=_,y&=~_}ra(d),(Xe&6)===0&&(Rs=Vt()+500,li(0))}}break;case 31:case 13:C=Il(d,2),C!==null&&tn(C,d,2),Ns(),Zd(d,2)}if(d=Jd(r),d===null&&Ud(e,t,r,Gs,n),d===c)break;c=d}c!==null&&r.stopPropagation()}else Ud(e,t,r,null,n)}}function Jd(e){return e=eu(e),Wd(e)}var Gs=null;function Wd(e){if(Gs=null,e=xr(e),e!==null){var t=f(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=h(t),e!==null)return e;e=null}else if(n===31){if(e=m(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Gs=e,null}function Xv(e){switch(e){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"resize":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"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"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Pc()){case Yt:return 2;case ba:return 8;case pr:case qc:return 32;case Bl:return 268435456;default:return 32}default:return 32}}var ef=!1,jl=null,Cl=null,El=null,di=new Map,fi=new Map,Rl=[],bw="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 Qv(e,t){switch(e){case"focusin":case"focusout":jl=null;break;case"dragenter":case"dragleave":Cl=null;break;case"mouseover":case"mouseout":El=null;break;case"pointerover":case"pointerout":di.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":fi.delete(t.pointerId)}}function hi(e,t,n,r,c,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:d,targetContainers:[c]},t!==null&&(t=br(t),t!==null&&$v(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function Sw(e,t,n,r,c){switch(t){case"focusin":return jl=hi(jl,e,t,n,r,c),!0;case"dragenter":return Cl=hi(Cl,e,t,n,r,c),!0;case"mouseover":return El=hi(El,e,t,n,r,c),!0;case"pointerover":var d=c.pointerId;return di.set(d,hi(di.get(d)||null,e,t,n,r,c)),!0;case"gotpointercapture":return d=c.pointerId,fi.set(d,hi(fi.get(d)||null,e,t,n,r,c)),!0}return!1}function Zv(e){var t=xr(e.target);if(t!==null){var n=f(t);if(n!==null){if(t=n.tag,t===13){if(t=h(n),t!==null){e.blockedOn=t,um(e.priority,function(){Kv(n)});return}}else if(t===31){if(t=m(n),t!==null){e.blockedOn=t,um(e.priority,function(){Kv(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Is(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Jd(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Wc=r,n.target.dispatchEvent(r),Wc=null}else return t=br(n),t!==null&&$v(t),e.blockedOn=n,!1;t.shift()}return!0}function Fv(e,t,n){Is(e)&&n.delete(t)}function ww(){ef=!1,jl!==null&&Is(jl)&&(jl=null),Cl!==null&&Is(Cl)&&(Cl=null),El!==null&&Is(El)&&(El=null),di.forEach(Fv),fi.forEach(Fv)}function $s(e,t){e.blockedOn===t&&(e.blockedOn=null,ef||(ef=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,ww)))}var Ks=null;function Jv(e){Ks!==e&&(Ks=e,a.unstable_scheduleCallback(a.unstable_NormalPriority,function(){Ks===e&&(Ks=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],c=e[t+2];if(typeof r!="function"){if(Wd(r||n)===null)continue;break}var d=br(n);d!==null&&(e.splice(t,3),t-=3,Ju(d,{pending:!0,data:c,method:n.method,action:r},r,c))}}))}function to(e){function t(_){return $s(_,e)}jl!==null&&$s(jl,e),Cl!==null&&$s(Cl,e),El!==null&&$s(El,e),di.forEach(t),fi.forEach(t);for(var n=0;n<Rl.length;n++){var r=Rl[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Rl.length&&(n=Rl[0],n.blockedOn===null);)Zv(n),n.blockedOn===null&&Rl.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var c=n[r],d=n[r+1],y=c[Qt]||null;if(typeof d=="function")y||Jv(n);else if(y){var C=null;if(d&&d.hasAttribute("formAction")){if(c=d,y=d[Qt]||null)C=y.formAction;else if(Wd(c)!==null)continue}else C=y.action;typeof C=="function"?n[r+1]=C:(n.splice(r,3),r-=3),Jv(n)}}}function Wv(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(y){return c=y})},focusReset:"manual",scroll:"manual"})}function t(){c!==null&&(c(),c=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),c!==null&&(c(),c=null)}}}function tf(e){this._internalRoot=e}Xs.prototype.render=tf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current,r=gn();Gv(n,r,e,t,null,null)},Xs.prototype.unmount=tf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Gv(e.current,2,null,e,null,null),Ns(),t[yr]=null}};function Xs(e){this._internalRoot=e}Xs.prototype.unstable_scheduleHydration=function(e){if(e){var t=cm();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Rl.length&&t!==0&&t<Rl[n].priority;n++);Rl.splice(n,0,e),n===0&&Zv(e)}};var ey=l.version;if(ey!=="19.2.8")throw Error(i(527,ey,"19.2.8"));I.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(i(188)):(e=Object.keys(e).join(","),Error(i(268,e)));return e=v(t),e=e!==null?w(e):null,e=e===null?null:e.stateNode,e};var jw={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Qs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qs.isDisabled&&Qs.supportsFiber)try{Sa=Qs.inject(jw),xt=Qs}catch{}}return pi.createRoot=function(e,t){if(!u(e))throw Error(i(299));var n=!1,r="",c=ig,d=sg,y=cg;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(d=t.onCaughtError),t.onRecoverableError!==void 0&&(y=t.onRecoverableError)),t=Vv(e,1,!1,null,null,n,r,null,c,d,y,Wv),e[yr]=t.current,Ld(e),new tf(t)},pi.hydrateRoot=function(e,t,n){if(!u(e))throw Error(i(299));var r=!1,c="",d=ig,y=sg,C=cg,_=null;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(c=n.identifierPrefix),n.onUncaughtError!==void 0&&(d=n.onUncaughtError),n.onCaughtError!==void 0&&(y=n.onCaughtError),n.onRecoverableError!==void 0&&(C=n.onRecoverableError),n.formState!==void 0&&(_=n.formState)),t=Vv(e,1,!0,t,n??null,r,c,_,d,y,C,Wv),t.context=Yv(null),n=t.current,r=gn(),r=Ic(r),c=dl(r),c.callback=null,fl(n,c,r),n=r,t.current.lanes=n,Ot(t,n),ra(t),e[yr]=t.current,Ld(e),new Xs(t)},pi.version="19.2.8",pi}var hy;function Dw(){if(hy)return rf.exports;hy=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(l){console.error(l)}}return a(),rf.exports=Ow(),rf.exports}var zw=Dw();const kw=eh(zw);/**
50
+ * react-router v7.18.2
51
+ *
52
+ * Copyright (c) Remix Software Inc.
53
+ *
54
+ * This source code is licensed under the MIT license found in the
55
+ * LICENSE.md file in the root directory of this source tree.
56
+ *
57
+ * @license MIT
58
+ */var nh=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,ex=/^[\\/]{2}/;function Lw(a,l){return l+a.replace(/\\/g,"/")}var my="popstate";function py(a){return typeof a=="object"&&a!=null&&"pathname"in a&&"search"in a&&"hash"in a&&"state"in a&&"key"in a}function Uw(a={}){function l(i,u){var v;let f=(v=u.state)==null?void 0:v.masked,{pathname:h,search:m,hash:g}=f||i.location;return Nf("",{pathname:h,search:m,hash:g},u.state&&u.state.usr||null,u.state&&u.state.key||"default",f?{pathname:i.location.pathname,search:i.location.search,hash:i.location.hash}:void 0)}function o(i,u){return typeof u=="string"?u:wi(u)}return Bw(l,o,null,a)}function ht(a,l){if(a===!1||a===null||typeof a>"u")throw new Error(l)}function Un(a,l){if(!a){typeof console<"u"&&console.warn(l);try{throw new Error(l)}catch{}}}function Hw(){return Math.random().toString(36).substring(2,10)}function gy(a,l){return{usr:a.state,key:a.key,idx:l,masked:a.mask?{pathname:a.pathname,search:a.search,hash:a.hash}:void 0}}function Nf(a,l,o=null,i,u){return{pathname:typeof a=="string"?a:a.pathname,search:"",hash:"",...typeof l=="string"?mo(l):l,state:o,key:l&&l.key||i||Hw(),mask:u}}function wi({pathname:a="/",search:l="",hash:o=""}){return l&&l!=="?"&&(a+=l.charAt(0)==="?"?l:"?"+l),o&&o!=="#"&&(a+=o.charAt(0)==="#"?o:"#"+o),a}function mo(a){let l={};if(a){let o=a.indexOf("#");o>=0&&(l.hash=a.substring(o),a=a.substring(0,o));let i=a.indexOf("?");i>=0&&(l.search=a.substring(i),a=a.substring(0,i)),a&&(l.pathname=a)}return l}function Bw(a,l,o,i={}){let{window:u=document.defaultView,v5Compat:f=!1}=i,h=u.history,m="POP",g=null,v=w();v==null&&(v=0,h.replaceState({...h.state,idx:v},""));function w(){return(h.state||{idx:null}).idx}function S(){m="POP";let E=w(),R=E==null?null:E-v;v=E,g&&g({action:m,location:j.location,delta:R})}function b(E,R){m="PUSH";let A=py(E)?E:Nf(j.location,E,R);v=w()+1;let N=gy(A,v),O=j.createHref(A.mask||A);try{h.pushState(N,"",O)}catch(H){if(H instanceof DOMException&&H.name==="DataCloneError")throw H;u.location.assign(O)}f&&g&&g({action:m,location:j.location,delta:1})}function x(E,R){m="REPLACE";let A=py(E)?E:Nf(j.location,E,R);v=w();let N=gy(A,v),O=j.createHref(A.mask||A);h.replaceState(N,"",O),f&&g&&g({action:m,location:j.location,delta:0})}function T(E){return Pw(u,E)}let j={get action(){return m},get location(){return a(u,h)},listen(E){if(g)throw new Error("A history only accepts one active listener");return u.addEventListener(my,S),g=E,()=>{u.removeEventListener(my,S),g=null}},createHref(E){return l(u,E)},createURL:T,encodeLocation(E){let R=T(E);return{pathname:R.pathname,search:R.search,hash:R.hash}},push:b,replace:x,go(E){return h.go(E)}};return j}function Pw(a,l,o=!1){let i="http://localhost";a&&(i=a.location.origin!=="null"?a.location.origin:a.location.href),ht(i,"No window.location.(origin|href) available to create URL");let u=typeof l=="string"?l:wi(l);return u=u.replace(/ $/,"%20"),!o&&ex.test(u)&&(u=i+u),new URL(u,i)}function tx(a,l,o="/"){return qw(a,l,o,!1)}function qw(a,l,o,i,u){let f=typeof l=="string"?mo(l):l,h=Ka(f.pathname||"/",o);if(h==null)return null;let m=Vw(a),g=null,v=Ww(h);for(let w=0;g==null&&w<m.length;++w)g=Jw(m[w],v,i);return g}function Vw(a){let l=nx(a);return Yw(l),l}function nx(a,l=[],o=[],i="",u=!1){let f=(h,m,g=u,v)=>{let w={relativePath:v===void 0?h.path||"":v,caseSensitive:h.caseSensitive===!0,childrenIndex:m,route:h};if(w.relativePath.startsWith("/")){if(!w.relativePath.startsWith(i)&&g)return;ht(w.relativePath.startsWith(i),`Absolute route path "${w.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),w.relativePath=w.relativePath.slice(i.length)}let S=Kn([i,w.relativePath]),b=o.concat(w);h.children&&h.children.length>0&&(ht(h.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${S}".`),nx(h.children,l,b,S,g)),!(h.path==null&&!h.index)&&l.push({path:S,score:Zw(S,h.index),routesMeta:b.map((x,T)=>{let[j,E]=rx(x.relativePath,x.caseSensitive,T===b.length-1);return{...x,matcher:j,compiledParams:E}})})};return a.forEach((h,m)=>{var g;if(h.path===""||!((g=h.path)!=null&&g.includes("?")))f(h,m);else for(let v of ax(h.path))f(h,m,!0,v)}),l}function ax(a){let l=a.split("/");if(l.length===0)return[];let[o,...i]=l,u=o.endsWith("?"),f=o.replace(/\?$/,"");if(i.length===0)return u?[f,""]:[f];let h=ax(i.join("/")),m=[];return m.push(...h.map(g=>g===""?f:[f,g].join("/"))),u&&m.push(...h),m.map(g=>a.startsWith("/")&&g===""?"/":g)}function Yw(a){a.sort((l,o)=>l.score!==o.score?o.score-l.score:Fw(l.routesMeta.map(i=>i.childrenIndex),o.routesMeta.map(i=>i.childrenIndex)))}var Gw=/^:[\w-]+$/,Iw=3,$w=2,Kw=1,Xw=10,Qw=-2,vy=a=>a==="*";function Zw(a,l){let o=a.split("/"),i=o.length;return o.some(vy)&&(i+=Qw),l&&(i+=$w),o.filter(u=>!vy(u)).reduce((u,f)=>u+(Gw.test(f)?Iw:f===""?Kw:Xw),i)}function Fw(a,l){return a.length===l.length&&a.slice(0,-1).every((i,u)=>i===l[u])?a[a.length-1]-l[l.length-1]:0}function Jw(a,l,o=!1){let{routesMeta:i}=a,u={},f="/",h=[];for(let m=0;m<i.length;++m){let g=i[m],v=m===i.length-1,w=f==="/"?l:l.slice(f.length)||"/",S={path:g.relativePath,caseSensitive:g.caseSensitive,end:v},b=g.matcher&&g.compiledParams?lx(S,w,g.matcher,g.compiledParams):fc(S,w),x=g.route;if(!b&&v&&o&&!i[i.length-1].route.index&&(b=fc({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},w)),!b)return null;Object.assign(u,b.params),h.push({params:u,pathname:Kn([f,b.pathname]),pathnameBase:nj(Kn([f,b.pathnameBase])),route:x}),b.pathnameBase!=="/"&&(f=Kn([f,b.pathnameBase]))}return h}function fc(a,l){typeof a=="string"&&(a={path:a,caseSensitive:!1,end:!0});let[o,i]=rx(a.path,a.caseSensitive,a.end);return lx(a,l,o,i)}function lx(a,l,o,i){let u=l.match(o);if(!u)return null;let f=u[0],h=f.replace(/(.)\/+$/,"$1"),m=u.slice(1);return{params:i.reduce((v,{paramName:w,isOptional:S},b)=>{if(w==="*"){let T=m[b]||"";h=f.slice(0,f.length-T.length).replace(/(.)\/+$/,"$1")}const x=m[b];return S&&!x?v[w]=void 0:v[w]=(x||"").replace(/%2F/g,"/"),v},{}),pathname:f,pathnameBase:h,pattern:a}}function rx(a,l=!1,o=!0){Un(a==="*"||!a.endsWith("*")||a.endsWith("/*"),`Route path "${a}" will be treated as if it were "${a.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${a.replace(/\*$/,"/*")}".`);let i=[],u="^"+a.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(h,m,g,v,w)=>{if(i.push({paramName:m,isOptional:g!=null}),g){let S=w.charAt(v+h.length);return S&&S!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return a.endsWith("*")?(i.push({paramName:"*"}),u+=a==="*"||a==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):o?u+="\\/*$":a!==""&&a!=="/"&&(u+="(?:(?=\\/|$))"),[new RegExp(u,l?void 0:"i"),i]}function Ww(a){try{return a.split("/").map(l=>decodeURIComponent(l).replace(/\//g,"%2F")).join("/")}catch(l){return Un(!1,`The URL path "${a}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${l}).`),a}}function Ka(a,l){if(l==="/")return a;if(!a.toLowerCase().startsWith(l.toLowerCase()))return null;let o=l.endsWith("/")?l.length-1:l.length,i=a.charAt(o);return i&&i!=="/"?null:a.slice(o)||"/"}function ej(a,l="/"){let{pathname:o,search:i="",hash:u=""}=typeof a=="string"?mo(a):a,f;return o?(o=ox(o),o.startsWith("/")?f=yy(o.substring(1),"/"):f=yy(o,l)):f=l,{pathname:f,search:aj(i),hash:lj(u)}}function yy(a,l){let o=hc(l).split("/");return a.split("/").forEach(u=>{u===".."?o.length>1&&o.pop():u!=="."&&o.push(u)}),o.length>1?o.join("/"):"/"}function uf(a,l,o,i){return`Cannot include a '${a}' character in a manually specified \`to.${l}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${o}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function tj(a){return a.filter((l,o)=>o===0||l.route.path&&l.route.path.length>0)}function ah(a){let l=tj(a);return l.map((o,i)=>i===l.length-1?o.pathname:o.pathnameBase)}function xc(a,l,o,i=!1){let u;typeof a=="string"?u=mo(a):(u={...a},ht(!u.pathname||!u.pathname.includes("?"),uf("?","pathname","search",u)),ht(!u.pathname||!u.pathname.includes("#"),uf("#","pathname","hash",u)),ht(!u.search||!u.search.includes("#"),uf("#","search","hash",u)));let f=a===""||u.pathname==="",h=f?"/":u.pathname,m;if(h==null)m=o;else{let S=l.length-1;if(!i&&h.startsWith("..")){let b=h.split("/");for(;b[0]==="..";)b.shift(),S-=1;u.pathname=b.join("/")}m=S>=0?l[S]:"/"}let g=ej(u,m),v=h&&h!=="/"&&h.endsWith("/"),w=(f||h===".")&&o.endsWith("/");return!g.pathname.endsWith("/")&&(v||w)&&(g.pathname+="/"),g}var ox=a=>a.replace(/[\\/]{2,}/g,"/"),Kn=a=>ox(a.join("/")),hc=a=>a.replace(/\/+$/,""),nj=a=>hc(a).replace(/^\/*/,"/"),aj=a=>!a||a==="?"?"":a.startsWith("?")?a:"?"+a,lj=a=>!a||a==="#"?"":a.startsWith("#")?a:"#"+a,rj=class{constructor(a,l,o,i=!1){this.status=a,this.statusText=l||"",this.internal=i,o instanceof Error?(this.data=o.toString(),this.error=o):this.data=o}};function oj(a){return a!=null&&typeof a.status=="number"&&typeof a.statusText=="string"&&typeof a.internal=="boolean"&&"data"in a}function ij(a){let l=a.map(o=>o.route.path).filter(Boolean);return Kn(l)||"/"}var ix=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function sx(a,l){let o=a;if(typeof o!="string"||!nh.test(o))return{absoluteURL:void 0,isExternal:!1,to:o};let i=o,u=!1;if(ix)try{let f=new URL(window.location.href),h=ex.test(o)?new URL(Lw(o,f.protocol)):new URL(o),m=Ka(h.pathname,l);h.origin===f.origin&&m!=null?o=m+h.search+h.hash:u=!0}catch{Un(!1,`<Link to="${o}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:i,isExternal:u,to:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var cx=["POST","PUT","PATCH","DELETE"];new Set(cx);var sj=["GET",...cx];new Set(sj);var cj=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function uj(a){try{return cj.includes(new URL(a).protocol)}catch{return!1}}var po=p.createContext(null);po.displayName="DataRouter";var bc=p.createContext(null);bc.displayName="DataRouterState";var ux=p.createContext(!1);function dj(){return p.useContext(ux)}var dx=p.createContext({isTransitioning:!1});dx.displayName="ViewTransition";var fj=p.createContext(new Map);fj.displayName="Fetchers";var hj=p.createContext(null);hj.displayName="Await";var Sn=p.createContext(null);Sn.displayName="Navigation";var Ti=p.createContext(null);Ti.displayName="Location";var ga=p.createContext({outlet:null,matches:[],isDataRoute:!1});ga.displayName="Route";var lh=p.createContext(null);lh.displayName="RouteError";var fx="REACT_ROUTER_ERROR",mj="REDIRECT",pj="ROUTE_ERROR_RESPONSE";function gj(a){if(a.startsWith(`${fx}:${mj}:{`))try{let l=JSON.parse(a.slice(28));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.location=="string"&&typeof l.reloadDocument=="boolean"&&typeof l.replace=="boolean")return l}catch{}}function vj(a){if(a.startsWith(`${fx}:${pj}:{`))try{let l=JSON.parse(a.slice(40));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string")return new rj(l.status,l.statusText,l.data)}catch{}}function yj(a,{relative:l}={}){ht(go(),"useHref() may be used only in the context of a <Router> component.");let{basename:o,navigator:i}=p.useContext(Sn),{hash:u,pathname:f,search:h}=Ni(a,{relative:l}),m=f;return o!=="/"&&(m=f==="/"?o:Kn([o,f])),i.createHref({pathname:m,search:h,hash:u})}function go(){return p.useContext(Ti)!=null}function sn(){return ht(go(),"useLocation() may be used only in the context of a <Router> component."),p.useContext(Ti).location}var hx="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function mx(a){p.useContext(Sn).static||p.useLayoutEffect(a)}function vo(){let{isDataRoute:a}=p.useContext(ga);return a?_j():xj()}function xj(){ht(go(),"useNavigate() may be used only in the context of a <Router> component.");let a=p.useContext(po),{basename:l,navigator:o}=p.useContext(Sn),{matches:i}=p.useContext(ga),{pathname:u}=sn(),f=JSON.stringify(ah(i)),h=p.useRef(!1);return mx(()=>{h.current=!0}),p.useCallback((g,v={})=>{if(Un(h.current,hx),!h.current)return;if(typeof g=="number"){o.go(g);return}let w=xc(g,JSON.parse(f),u,v.relative==="path");a==null&&l!=="/"&&(w.pathname=w.pathname==="/"?l:Kn([l,w.pathname])),(v.replace?o.replace:o.push)(w,v.state,v)},[l,o,f,u,a])}p.createContext(null);function Ni(a,{relative:l}={}){let{matches:o}=p.useContext(ga),{pathname:i}=sn(),u=JSON.stringify(ah(o));return p.useMemo(()=>xc(a,JSON.parse(u),i,l==="path"),[a,u,i,l])}function bj(a,l){return px(a,l)}function px(a,l,o){var E;ht(go(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=p.useContext(Sn),{matches:u}=p.useContext(ga),f=u[u.length-1],h=f?f.params:{},m=f?f.pathname:"/",g=f?f.pathnameBase:"/",v=f&&f.route;{let R=v&&v.path||"";vx(m,!v||R.endsWith("*")||R.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (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.
59
+
60
+ Please change the parent <Route path="${R}"> to <Route path="${R==="/"?"*":`${R}/*`}">.`)}let w=sn(),S;if(l){let R=typeof l=="string"?mo(l):l;ht(g==="/"||((E=R.pathname)==null?void 0:E.startsWith(g)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${g}" but pathname "${R.pathname}" was given in the \`location\` prop.`),S=R}else S=w;let b=S.pathname||"/",x=b;if(g!=="/"){let R=g.replace(/^\//,"").split("/");x="/"+b.replace(/^\//,"").split("/").slice(R.length).join("/")}let T=o&&o.state.matches.length?o.state.matches.map(R=>Object.assign(R,{route:o.manifest[R.route.id]||R.route})):tx(a,{pathname:x});Un(v||T!=null,`No routes matched location "${S.pathname}${S.search}${S.hash}" `),Un(T==null||T[T.length-1].route.element!==void 0||T[T.length-1].route.Component!==void 0||T[T.length-1].route.lazy!==void 0,`Matched leaf route at location "${S.pathname}${S.search}${S.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.`);let j=Ej(T&&T.map(R=>Object.assign({},R,{params:Object.assign({},h,R.params),pathname:Kn([g,i.encodeLocation?i.encodeLocation(R.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathname]),pathnameBase:R.pathnameBase==="/"?g:Kn([g,i.encodeLocation?i.encodeLocation(R.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathnameBase])})),u,o);return l&&j?p.createElement(Ti.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...S},navigationType:"POP"}},j):j}function Sj(){let a=Mj(),l=oj(a)?`${a.status} ${a.statusText}`:a instanceof Error?a.message:JSON.stringify(a),o=a instanceof Error?a.stack:null,i="rgba(200,200,200, 0.5)",u={padding:"0.5rem",backgroundColor:i},f={padding:"2px 4px",backgroundColor:i},h=null;return console.error("Error handled by React Router default ErrorBoundary:",a),h=p.createElement(p.Fragment,null,p.createElement("p",null,"💿 Hey developer 👋"),p.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",p.createElement("code",{style:f},"ErrorBoundary")," or"," ",p.createElement("code",{style:f},"errorElement")," prop on your route.")),p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},l),o?p.createElement("pre",{style:u},o):null,h)}var wj=p.createElement(Sj,null),gx=class extends p.Component{constructor(a){super(a),this.state={location:a.location,revalidation:a.revalidation,error:a.error}}static getDerivedStateFromError(a){return{error:a}}static getDerivedStateFromProps(a,l){return l.location!==a.location||l.revalidation!=="idle"&&a.revalidation==="idle"?{error:a.error,location:a.location,revalidation:a.revalidation}:{error:a.error!==void 0?a.error:l.error,location:l.location,revalidation:a.revalidation||l.revalidation}}componentDidCatch(a,l){this.props.onError?this.props.onError(a,l):console.error("React Router caught the following error during render",a)}render(){let a=this.state.error;if(this.context&&typeof a=="object"&&a&&"digest"in a&&typeof a.digest=="string"){const o=vj(a.digest);o&&(a=o)}let l=a!==void 0?p.createElement(ga.Provider,{value:this.props.routeContext},p.createElement(lh.Provider,{value:a,children:this.props.component})):this.props.children;return this.context?p.createElement(jj,{error:a},l):l}};gx.contextType=ux;var df=new WeakMap;function jj({children:a,error:l}){let{basename:o}=p.useContext(Sn);if(typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){let i=gj(l.digest);if(i){let u=df.get(l);if(u)throw u;let f=sx(i.location,o),h=f.absoluteURL||f.to;if(uj(h))throw new Error("Invalid redirect location");if(ix&&!df.get(l))if(f.isExternal||i.reloadDocument)window.location.href=h;else{const m=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:i.replace}));throw df.set(l,m),m}return p.createElement("meta",{httpEquiv:"refresh",content:`0;url=${h}`})}}return a}function Cj({routeContext:a,match:l,children:o}){let i=p.useContext(po);return i&&i.static&&i.staticContext&&(l.route.errorElement||l.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=l.route.id),p.createElement(ga.Provider,{value:a},o)}function Ej(a,l=[],o){let i=o==null?void 0:o.state;if(a==null){if(!i)return null;if(i.errors)a=i.matches;else if(l.length===0&&!i.initialized&&i.matches.length>0)a=i.matches;else return null}let u=a,f=i==null?void 0:i.errors;if(f!=null){let w=u.findIndex(S=>S.route.id&&(f==null?void 0:f[S.route.id])!==void 0);ht(w>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(f).join(",")}`),u=u.slice(0,Math.min(u.length,w+1))}let h=!1,m=-1;if(o&&i){h=i.renderFallback;for(let w=0;w<u.length;w++){let S=u[w];if((S.route.HydrateFallback||S.route.hydrateFallbackElement)&&(m=w),S.route.id){let{loaderData:b,errors:x}=i,T=S.route.loader&&!b.hasOwnProperty(S.route.id)&&(!x||x[S.route.id]===void 0);if(S.route.lazy||T){o.isStatic&&(h=!0),m>=0?u=u.slice(0,m+1):u=[u[0]];break}}}}let g=o==null?void 0:o.onError,v=i&&g?(w,S)=>{var b,x;g(w,{location:i.location,params:((x=(b=i.matches)==null?void 0:b[0])==null?void 0:x.params)??{},pattern:ij(i.matches),errorInfo:S})}:void 0;return u.reduceRight((w,S,b)=>{let x,T=!1,j=null,E=null;i&&(x=f&&S.route.id?f[S.route.id]:void 0,j=S.route.errorElement||wj,h&&(m<0&&b===0?(vx("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),T=!0,E=null):m===b&&(T=!0,E=S.route.hydrateFallbackElement||null)));let R=l.concat(u.slice(0,b+1)),A=()=>{let N;return x?N=j:T?N=E:S.route.Component?N=p.createElement(S.route.Component,null):S.route.element?N=S.route.element:N=w,p.createElement(Cj,{match:S,routeContext:{outlet:w,matches:R,isDataRoute:i!=null},children:N})};return i&&(S.route.ErrorBoundary||S.route.errorElement||b===0)?p.createElement(gx,{location:i.location,revalidation:i.revalidation,component:j,error:x,children:A(),routeContext:{outlet:null,matches:R,isDataRoute:!0},onError:v}):A()},null)}function rh(a){return`${a} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Rj(a){let l=p.useContext(po);return ht(l,rh(a)),l}function Tj(a){let l=p.useContext(bc);return ht(l,rh(a)),l}function Nj(a){let l=p.useContext(ga);return ht(l,rh(a)),l}function oh(a){let l=Nj(a),o=l.matches[l.matches.length-1];return ht(o.route.id,`${a} can only be used on routes that contain a unique "id"`),o.route.id}function Aj(){return oh("useRouteId")}function Mj(){var i;let a=p.useContext(lh),l=Tj("useRouteError"),o=oh("useRouteError");return a!==void 0?a:(i=l.errors)==null?void 0:i[o]}function _j(){let{router:a}=Rj("useNavigate"),l=oh("useNavigate"),o=p.useRef(!1);return mx(()=>{o.current=!0}),p.useCallback(async(u,f={})=>{Un(o.current,hx),o.current&&(typeof u=="number"?await a.navigate(u):await a.navigate(u,{fromRouteId:l,...f}))},[a,l])}var xy={};function vx(a,l,o){!l&&!xy[a]&&(xy[a]=!0,Un(!1,o))}p.memo(Oj);function Oj({routes:a,manifest:l,future:o,state:i,isStatic:u,onError:f}){return px(a,void 0,{manifest:l,state:i,isStatic:u,onError:f})}function Af({to:a,replace:l,state:o,relative:i}){ht(go(),"<Navigate> may be used only in the context of a <Router> component.");let{static:u}=p.useContext(Sn);Un(!u,"<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:f}=p.useContext(ga),{pathname:h}=sn(),m=vo(),g=xc(a,ah(f),h,i==="path"),v=JSON.stringify(g);return p.useEffect(()=>{m(JSON.parse(v),{replace:l,state:o,relative:i})},[m,v,i,l,o]),null}function nn(a){ht(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Dj({basename:a="/",children:l=null,location:o,navigationType:i="POP",navigator:u,static:f=!1,useTransitions:h}){ht(!go(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let m=a.replace(/^\/*/,"/"),g=p.useMemo(()=>({basename:m,navigator:u,static:f,useTransitions:h,future:{}}),[m,u,f,h]);typeof o=="string"&&(o=mo(o));let{pathname:v="/",search:w="",hash:S="",state:b=null,key:x="default",mask:T}=o,j=p.useMemo(()=>{let E=Ka(v,m);return E==null?null:{location:{pathname:E,search:w,hash:S,state:b,key:x,mask:T},navigationType:i}},[m,v,w,S,b,x,i,T]);return Un(j!=null,`<Router basename="${m}"> is not able to match the URL "${v}${w}${S}" because it does not start with the basename, so the <Router> won't render anything.`),j==null?null:p.createElement(Sn.Provider,{value:g},p.createElement(Ti.Provider,{children:l,value:j}))}function yx({children:a,location:l}){return bj(Mf(a),l)}function Mf(a,l=[]){let o=[];return p.Children.forEach(a,(i,u)=>{if(!p.isValidElement(i))return;let f=[...l,u];if(i.type===p.Fragment){o.push.apply(o,Mf(i.props.children,f));return}ht(i.type===nn,`[${typeof i.type=="string"?i.type:i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ht(!i.props.index||!i.props.children,"An index route cannot have child routes.");let h={id:i.props.id||f.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,middleware:i.props.middleware,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(h.children=Mf(i.props.children,f)),o.push(h)}),o}var oc="get",ic="application/x-www-form-urlencoded";function Sc(a){return typeof HTMLElement<"u"&&a instanceof HTMLElement}function zj(a){return Sc(a)&&a.tagName.toLowerCase()==="button"}function kj(a){return Sc(a)&&a.tagName.toLowerCase()==="form"}function Lj(a){return Sc(a)&&a.tagName.toLowerCase()==="input"}function Uj(a){return!!(a.metaKey||a.altKey||a.ctrlKey||a.shiftKey)}function Hj(a,l){return a.button===0&&(!l||l==="_self")&&!Uj(a)}function _f(a=""){return new URLSearchParams(typeof a=="string"||Array.isArray(a)||a instanceof URLSearchParams?a:Object.keys(a).reduce((l,o)=>{let i=a[o];return l.concat(Array.isArray(i)?i.map(u=>[o,u]):[[o,i]])},[]))}function Bj(a,l){let o=_f(a);return l&&l.forEach((i,u)=>{o.has(u)||l.getAll(u).forEach(f=>{o.append(u,f)})}),o}var Zs=null;function Pj(){if(Zs===null)try{new FormData(document.createElement("form"),0),Zs=!1}catch{Zs=!0}return Zs}var qj=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ff(a){return a!=null&&!qj.has(a)?(Un(!1,`"${a}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ic}"`),null):a}function Vj(a,l){let o,i,u,f,h;if(kj(a)){let m=a.getAttribute("action");i=m?Ka(m,l):null,o=a.getAttribute("method")||oc,u=ff(a.getAttribute("enctype"))||ic,f=new FormData(a)}else if(zj(a)||Lj(a)&&(a.type==="submit"||a.type==="image")){let m=a.form;if(m==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=a.getAttribute("formaction")||m.getAttribute("action");if(i=g?Ka(g,l):null,o=a.getAttribute("formmethod")||m.getAttribute("method")||oc,u=ff(a.getAttribute("formenctype"))||ff(m.getAttribute("enctype"))||ic,f=new FormData(m,a),!Pj()){let{name:v,type:w,value:S}=a;if(w==="image"){let b=v?`${v}.`:"";f.append(`${b}x`,"0"),f.append(`${b}y`,"0")}else v&&f.append(v,S)}}else{if(Sc(a))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');o=oc,i=null,u=ic,h=a}return f&&u==="text/plain"&&(h=f,f=void 0),{action:i,method:o.toLowerCase(),encType:u,formData:f,body:h}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function ih(a,l){if(a===!1||a===null||typeof a>"u")throw new Error(l)}function xx(a,l,o,i){let u=typeof a=="string"?new URL(a,typeof window>"u"?"server://singlefetch/":window.location.origin):a;return o?u.pathname.endsWith("/")?u.pathname=`${u.pathname}_.${i}`:u.pathname=`${u.pathname}.${i}`:u.pathname==="/"?u.pathname=`_root.${i}`:l&&Ka(u.pathname,l)==="/"?u.pathname=`${hc(l)}/_root.${i}`:u.pathname=`${hc(u.pathname)}.${i}`,u}async function Yj(a,l){if(a.id in l)return l[a.id];try{let o=await import(a.module);return l[a.id]=o,o}catch(o){return console.error(`Error loading route module \`${a.module}\`, reloading page...`),console.error(o),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Gj(a){return a==null?!1:a.href==null?a.rel==="preload"&&typeof a.imageSrcSet=="string"&&typeof a.imageSizes=="string":typeof a.rel=="string"&&typeof a.href=="string"}async function Ij(a,l,o){let i=await Promise.all(a.map(async u=>{let f=l.routes[u.route.id];if(f){let h=await Yj(f,o);return h.links?h.links():[]}return[]}));return Qj(i.flat(1).filter(Gj).filter(u=>u.rel==="stylesheet"||u.rel==="preload").map(u=>u.rel==="stylesheet"?{...u,rel:"prefetch",as:"style"}:{...u,rel:"prefetch"}))}function by(a,l,o,i,u,f){let h=(g,v)=>o[v]?g.route.id!==o[v].route.id:!0,m=(g,v)=>{var w;return o[v].pathname!==g.pathname||((w=o[v].route.path)==null?void 0:w.endsWith("*"))&&o[v].params["*"]!==g.params["*"]};return f==="assets"?l.filter((g,v)=>h(g,v)||m(g,v)):f==="data"?l.filter((g,v)=>{var S;let w=i.routes[g.route.id];if(!w||!w.hasLoader)return!1;if(h(g,v)||m(g,v))return!0;if(g.route.shouldRevalidate){let b=g.route.shouldRevalidate({currentUrl:new URL(u.pathname+u.search+u.hash,window.origin),currentParams:((S=o[0])==null?void 0:S.params)||{},nextUrl:new URL(a,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof b=="boolean")return b}return!0}):[]}function $j(a,l,{includeHydrateFallback:o}={}){return Kj(a.map(i=>{let u=l.routes[i.route.id];if(!u)return[];let f=[u.module];return u.clientActionModule&&(f=f.concat(u.clientActionModule)),u.clientLoaderModule&&(f=f.concat(u.clientLoaderModule)),o&&u.hydrateFallbackModule&&(f=f.concat(u.hydrateFallbackModule)),u.imports&&(f=f.concat(u.imports)),f}).flat(1))}function Kj(a){return[...new Set(a)]}function Xj(a){let l={},o=Object.keys(a).sort();for(let i of o)l[i]=a[i];return l}function Qj(a,l){let o=new Set;return new Set(l),a.reduce((i,u)=>{let f=JSON.stringify(Xj(u));return o.has(f)||(o.add(f),i.push({key:f,link:u})),i},[])}function sh(){let a=p.useContext(po);return ih(a,"You must render this element inside a <DataRouterContext.Provider> element"),a}function Zj(){let a=p.useContext(bc);return ih(a,"You must render this element inside a <DataRouterStateContext.Provider> element"),a}var ch=p.createContext(void 0);ch.displayName="FrameworkContext";function wc(){let a=p.useContext(ch);return ih(a,"You must render this element inside a <HydratedRouter> element"),a}function Fj(a,l){let o=p.useContext(ch),[i,u]=p.useState(!1),[f,h]=p.useState(!1),{onFocus:m,onBlur:g,onMouseEnter:v,onMouseLeave:w,onTouchStart:S}=l,b=p.useRef(null);p.useEffect(()=>{if(a==="render"&&h(!0),a==="viewport"){let j=R=>{R.forEach(A=>{h(A.isIntersecting)})},E=new IntersectionObserver(j,{threshold:.5});return b.current&&E.observe(b.current),()=>{E.disconnect()}}},[a]),p.useEffect(()=>{if(i){let j=setTimeout(()=>{h(!0)},100);return()=>{clearTimeout(j)}}},[i]);let x=()=>{u(!0)},T=()=>{u(!1),h(!1)};return o?a!=="intent"?[f,b,{}]:[f,b,{onFocus:gi(m,x),onBlur:gi(g,T),onMouseEnter:gi(v,x),onMouseLeave:gi(w,T),onTouchStart:gi(S,x)}]:[!1,b,{}]}function gi(a,l){return o=>{a&&a(o),o.defaultPrevented||l(o)}}function Jj({page:a,...l}){let o=dj(),{nonce:i}=wc(),{router:u}=sh(),f=p.useMemo(()=>tx(u.routes,a,u.basename),[u.routes,a,u.basename]);return f?(l.nonce==null&&i&&(l={...l,nonce:i}),o?p.createElement(eC,{page:a,matches:f,...l}):p.createElement(tC,{page:a,matches:f,...l})):null}function Wj(a){let{manifest:l,routeModules:o}=wc(),[i,u]=p.useState([]);return p.useEffect(()=>{let f=!1;return Ij(a,l,o).then(h=>{f||u(h)}),()=>{f=!0}},[a,l,o]),i}function eC({page:a,matches:l,...o}){let i=sn(),{future:u}=wc(),{basename:f}=sh(),h=p.useMemo(()=>{if(a===i.pathname+i.search+i.hash)return[];let m=xx(a,f,u.v8_trailingSlashAwareDataRequests,"rsc"),g=!1,v=[];for(let w of l)typeof w.route.shouldRevalidate=="function"?g=!0:v.push(w.route.id);return g&&v.length>0&&m.searchParams.set("_routes",v.join(",")),[m.pathname+m.search]},[f,u.v8_trailingSlashAwareDataRequests,a,i,l]);return p.createElement(p.Fragment,null,h.map(m=>p.createElement("link",{key:m,rel:"prefetch",as:"fetch",href:m,...o})))}function tC({page:a,matches:l,...o}){let i=sn(),{future:u,manifest:f,routeModules:h}=wc(),{basename:m}=sh(),{loaderData:g,matches:v}=Zj(),w=p.useMemo(()=>by(a,l,v,f,i,"data"),[a,l,v,f,i]),S=p.useMemo(()=>by(a,l,v,f,i,"assets"),[a,l,v,f,i]),b=p.useMemo(()=>{if(a===i.pathname+i.search+i.hash)return[];let j=new Set,E=!1;if(l.forEach(A=>{var O;let N=f.routes[A.route.id];!N||!N.hasLoader||(!w.some(H=>H.route.id===A.route.id)&&A.route.id in g&&((O=h[A.route.id])!=null&&O.shouldRevalidate)||N.hasClientLoader?E=!0:j.add(A.route.id))}),j.size===0)return[];let R=xx(a,m,u.v8_trailingSlashAwareDataRequests,"data");return E&&j.size>0&&R.searchParams.set("_routes",l.filter(A=>j.has(A.route.id)).map(A=>A.route.id).join(",")),[R.pathname+R.search]},[m,u.v8_trailingSlashAwareDataRequests,g,i,f,w,l,a,h]),x=p.useMemo(()=>$j(S,f),[S,f]),T=Wj(S);return p.createElement(p.Fragment,null,b.map(j=>p.createElement("link",{key:j,rel:"prefetch",as:"fetch",href:j,...o})),x.map(j=>p.createElement("link",{key:j,rel:"modulepreload",href:j,...o})),T.map(({key:j,link:E})=>p.createElement("link",{key:j,nonce:o.nonce,...E,crossOrigin:E.crossOrigin??o.crossOrigin})))}function nC(...a){return l=>{a.forEach(o=>{typeof o=="function"?o(l):o!=null&&(o.current=l)})}}var aC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{aC&&(window.__reactRouterVersion="7.18.2")}catch{}function lC({basename:a,children:l,useTransitions:o,window:i}){let u=p.useRef();u.current==null&&(u.current=Uw({window:i,v5Compat:!0}));let f=u.current,[h,m]=p.useState({action:f.action,location:f.location}),g=p.useCallback(v=>{o===!1?m(v):p.startTransition(()=>m(v))},[o]);return p.useLayoutEffect(()=>f.listen(g),[f,g]),p.createElement(Dj,{basename:a,children:l,location:h.location,navigationType:h.action,navigator:f,useTransitions:o})}var oo=p.forwardRef(function({onClick:l,discover:o="render",prefetch:i="none",relative:u,reloadDocument:f,replace:h,mask:m,state:g,target:v,to:w,preventScrollReset:S,viewTransition:b,defaultShouldRevalidate:x,...T},j){let{basename:E,navigator:R,useTransitions:A}=p.useContext(Sn),N=typeof w=="string"&&nh.test(w),O=sx(w,E);w=O.to;let H=yj(w,{relative:u}),P=sn(),z=null;if(m){let me=xc(m,[],P.mask?P.mask.pathname:"/",!0);E!=="/"&&(me.pathname=me.pathname==="/"?E:Kn([E,me.pathname])),z=R.createHref(me)}let[U,ee,se]=Fj(i,T),oe=iC(w,{replace:h,mask:m,state:g,target:v,preventScrollReset:S,relative:u,viewTransition:b,defaultShouldRevalidate:x,useTransitions:A});function J(me){l&&l(me),me.defaultPrevented||oe(me)}let ie=!(O.isExternal||f),ce=p.createElement("a",{...T,...se,href:(ie?z:void 0)||O.absoluteURL||H,onClick:ie?J:l,ref:nC(j,ee),target:v,"data-discover":!N&&o==="render"?"true":void 0});return U&&!N?p.createElement(p.Fragment,null,ce,p.createElement(Jj,{page:H})):ce});oo.displayName="Link";var bx=p.forwardRef(function({"aria-current":l="page",caseSensitive:o=!1,className:i="",end:u=!1,style:f,to:h,viewTransition:m,children:g,...v},w){let S=Ni(h,{relative:v.relative}),b=sn(),x=p.useContext(bc),{navigator:T,basename:j}=p.useContext(Sn),E=x!=null&&hC(S)&&m===!0,R=T.encodeLocation?T.encodeLocation(S).pathname:S.pathname,A=b.pathname,N=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;o||(A=A.toLowerCase(),N=N?N.toLowerCase():null,R=R.toLowerCase()),N&&j&&(N=Ka(N,j)||N);const O=R!=="/"&&R.endsWith("/")?R.length-1:R.length;let H=A===R||!u&&A.startsWith(R)&&A.charAt(O)==="/",P=N!=null&&(N===R||!u&&N.startsWith(R)&&N.charAt(R.length)==="/"),z={isActive:H,isPending:P,isTransitioning:E},U=H?l:void 0,ee;typeof i=="function"?ee=i(z):ee=[i,H?"active":null,P?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");let se=typeof f=="function"?f(z):f;return p.createElement(oo,{...v,"aria-current":U,className:ee,ref:w,style:se,to:h,viewTransition:m},typeof g=="function"?g(z):g)});bx.displayName="NavLink";var rC=p.forwardRef(({discover:a="render",fetcherKey:l,navigate:o,reloadDocument:i,replace:u,state:f,method:h=oc,action:m,onSubmit:g,relative:v,preventScrollReset:w,viewTransition:S,defaultShouldRevalidate:b,...x},T)=>{let{useTransitions:j}=p.useContext(Sn),E=dC(),R=fC(m,{relative:v}),A=h.toLowerCase()==="get"?"get":"post",N=typeof m=="string"&&nh.test(m),O=H=>{if(g&&g(H),H.defaultPrevented)return;H.preventDefault();let P=H.nativeEvent.submitter,z=(P==null?void 0:P.getAttribute("formmethod"))||h,U=()=>E(P||H.currentTarget,{fetcherKey:l,method:z,navigate:o,replace:u,state:f,relative:v,preventScrollReset:w,viewTransition:S,defaultShouldRevalidate:b});j&&o!==!1?p.startTransition(()=>U()):U()};return p.createElement("form",{ref:T,method:A,action:R,onSubmit:i?g:O,...x,"data-discover":!N&&a==="render"?"true":void 0})});rC.displayName="Form";function oC(a){return`${a} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Sx(a){let l=p.useContext(po);return ht(l,oC(a)),l}function iC(a,{target:l,replace:o,mask:i,state:u,preventScrollReset:f,relative:h,viewTransition:m,defaultShouldRevalidate:g,useTransitions:v}={}){let w=vo(),S=sn(),b=Ni(a,{relative:h});return p.useCallback(x=>{if(Hj(x,l)){x.preventDefault();let T=o!==void 0?o:wi(S)===wi(b),j=()=>w(a,{replace:T,mask:i,state:u,preventScrollReset:f,relative:h,viewTransition:m,defaultShouldRevalidate:g});v?p.startTransition(()=>j()):j()}},[S,w,b,o,i,u,l,a,f,h,m,g,v])}function sC(a){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 l=p.useRef(_f(a)),o=p.useRef(!1),i=sn(),u=p.useMemo(()=>Bj(i.search,o.current?null:l.current),[i.search]),f=vo(),h=p.useCallback((m,g)=>{const v=_f(typeof m=="function"?m(new URLSearchParams(u)):m);o.current=!0,f("?"+v,g)},[f,u]);return[u,h]}var cC=0,uC=()=>`__${String(++cC)}__`;function dC(){let{router:a}=Sx("useSubmit"),{basename:l}=p.useContext(Sn),o=Aj(),i=a.fetch,u=a.navigate;return p.useCallback(async(f,h={})=>{let{action:m,method:g,encType:v,formData:w,body:S}=Vj(f,l);if(h.navigate===!1){let b=h.fetcherKey||uC();await i(b,o,h.action||m,{defaultShouldRevalidate:h.defaultShouldRevalidate,preventScrollReset:h.preventScrollReset,formData:w,body:S,formMethod:h.method||g,formEncType:h.encType||v,flushSync:h.flushSync})}else await u(h.action||m,{defaultShouldRevalidate:h.defaultShouldRevalidate,preventScrollReset:h.preventScrollReset,formData:w,body:S,formMethod:h.method||g,formEncType:h.encType||v,replace:h.replace,state:h.state,fromRouteId:o,flushSync:h.flushSync,viewTransition:h.viewTransition})},[i,u,l,o])}function fC(a,{relative:l}={}){let{basename:o}=p.useContext(Sn),i=p.useContext(ga);ht(i,"useFormAction must be used inside a RouteContext");let[u]=i.matches.slice(-1),f={...Ni(a||".",{relative:l})},h=sn();if(a==null){f.search=h.search;let m=new URLSearchParams(f.search),g=m.getAll("index");if(g.some(w=>w==="")){m.delete("index"),g.filter(S=>S).forEach(S=>m.append("index",S));let w=m.toString();f.search=w?`?${w}`:""}}return(!a||a===".")&&u.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),o!=="/"&&(f.pathname=f.pathname==="/"?o:Kn([o,f.pathname])),wi(f)}function hC(a,{relative:l}={}){let o=p.useContext(dx);ht(o!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=Sx("useViewTransitionState"),u=Ni(a,{relative:l});if(!o.isTransitioning)return!1;let f=Ka(o.currentLocation.pathname,i)||o.currentLocation.pathname,h=Ka(o.nextLocation.pathname,i)||o.nextLocation.pathname;return fc(u.pathname,h)!=null||fc(u.pathname,f)!=null}var yo=Wy();const mC=eh(yo),pC="";class gC extends Error{constructor(l,o,i){var u;super(typeof i=="object"&&i&&"error"in i?String(((u=i.error)==null?void 0:u.message)??i):"Request failed"),this.status=l,this.type=o,this.body=i}}async function vi(a,l,o,i){var g;const u=o!==void 0,f=await fetch(`${pC}${l}`,{method:a,headers:{...u?{"content-type":"application/json"}:{},...(i==null?void 0:i.headers)??{}},body:u?JSON.stringify(o):void 0,credentials:"include",...i}),h=await f.text();let m;try{m=h?JSON.parse(h):void 0}catch{m=h}if(!f.ok)throw new gC(f.status,typeof m=="object"&&m&&"error"in m?String(((g=m.error)==null?void 0:g.type)??"error"):"error",m);return m}const Ce={get:(a,l)=>vi("GET",a,void 0,l),post:(a,l,o)=>vi("POST",a,l,o),patch:(a,l,o)=>vi("PATCH",a,l,o),put:(a,l,o)=>vi("PUT",a,l,o),del:a=>vi("DELETE",a)},wx=p.createContext(void 0);function vC({children:a}){const[l,o]=p.useState(null),[i,u]=p.useState(!0),f=p.useCallback(async()=>{try{const g=await Ce.get("/api/admin/me");o(g)}catch{o(null)}finally{u(!1)}},[]);p.useEffect(()=>{f()},[f]);const h=p.useCallback(async(g,v,w,S)=>{const b={username:g,password:v};w&&(b.totp=w),S&&(b.recoveryCode=S);try{const x=await Ce.post("/api/admin/login",b);return o({id:"admin",username:x.username,totpEnabled:x.totpEnabled}),{totpRequired:!1}}catch(x){const T=x.status,j=x.type;if(T===401&&j==="totp_required")return{totpRequired:!0};throw x}},[]),m=p.useCallback(async()=>{await Ce.post("/api/admin/logout"),o(null)},[]);return s.jsx(wx.Provider,{value:{user:l,loading:i,login:h,logout:m,refresh:f},children:a})}function uh(){const a=p.useContext(wx);if(!a)throw new Error("useAuth must be inside AuthProvider");return a}/**
61
+ * @license lucide-react v0.469.0 - ISC
62
+ *
63
+ * This source code is licensed under the ISC license.
64
+ * See the LICENSE file in the root directory of this source tree.
65
+ */const yC=a=>a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),jx=(...a)=>a.filter((l,o,i)=>!!l&&l.trim()!==""&&i.indexOf(l)===o).join(" ").trim();/**
66
+ * @license lucide-react v0.469.0 - ISC
67
+ *
68
+ * This source code is licensed under the ISC license.
69
+ * See the LICENSE file in the root directory of this source tree.
70
+ */var xC={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
71
+ * @license lucide-react v0.469.0 - ISC
72
+ *
73
+ * This source code is licensed under the ISC license.
74
+ * See the LICENSE file in the root directory of this source tree.
75
+ */const bC=p.forwardRef(({color:a="currentColor",size:l=24,strokeWidth:o=2,absoluteStrokeWidth:i,className:u="",children:f,iconNode:h,...m},g)=>p.createElement("svg",{ref:g,...xC,width:l,height:l,stroke:a,strokeWidth:i?Number(o)*24/Number(l):o,className:jx("lucide",u),...m},[...h.map(([v,w])=>p.createElement(v,w)),...Array.isArray(f)?f:[f]]));/**
76
+ * @license lucide-react v0.469.0 - ISC
77
+ *
78
+ * This source code is licensed under the ISC license.
79
+ * See the LICENSE file in the root directory of this source tree.
80
+ */const it=(a,l)=>{const o=p.forwardRef(({className:i,...u},f)=>p.createElement(bC,{ref:f,iconNode:l,className:jx(`lucide-${yC(a)}`,i),...u}));return o.displayName=`${a}`,o};/**
81
+ * @license lucide-react v0.469.0 - ISC
82
+ *
83
+ * This source code is licensed under the ISC license.
84
+ * See the LICENSE file in the root directory of this source tree.
85
+ */const SC=it("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
86
+ * @license lucide-react v0.469.0 - ISC
87
+ *
88
+ * This source code is licensed under the ISC license.
89
+ * See the LICENSE file in the root directory of this source tree.
90
+ */const wC=it("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/**
91
+ * @license lucide-react v0.469.0 - ISC
92
+ *
93
+ * This source code is licensed under the ISC license.
94
+ * See the LICENSE file in the root directory of this source tree.
95
+ */const Cx=it("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
96
+ * @license lucide-react v0.469.0 - ISC
97
+ *
98
+ * This source code is licensed under the ISC license.
99
+ * See the LICENSE file in the root directory of this source tree.
100
+ */const jC=it("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
101
+ * @license lucide-react v0.469.0 - ISC
102
+ *
103
+ * This source code is licensed under the ISC license.
104
+ * See the LICENSE file in the root directory of this source tree.
105
+ */const CC=it("CircleArrowUp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]]);/**
106
+ * @license lucide-react v0.469.0 - ISC
107
+ *
108
+ * This source code is licensed under the ISC license.
109
+ * See the LICENSE file in the root directory of this source tree.
110
+ */const EC=it("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
111
+ * @license lucide-react v0.469.0 - ISC
112
+ *
113
+ * This source code is licensed under the ISC license.
114
+ * See the LICENSE file in the root directory of this source tree.
115
+ */const RC=it("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/**
116
+ * @license lucide-react v0.469.0 - ISC
117
+ *
118
+ * This source code is licensed under the ISC license.
119
+ * See the LICENSE file in the root directory of this source tree.
120
+ */const TC=it("Cog",[["path",{d:"M12 20a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z",key:"sobvz5"}],["path",{d:"M12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z",key:"11i496"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 22v-2",key:"1osdcq"}],["path",{d:"m17 20.66-1-1.73",key:"eq3orb"}],["path",{d:"M11 10.27 7 3.34",key:"16pf9h"}],["path",{d:"m20.66 17-1.73-1",key:"sg0v6f"}],["path",{d:"m3.34 7 1.73 1",key:"1ulond"}],["path",{d:"M14 12h8",key:"4f43i9"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"m20.66 7-1.73 1",key:"1ow05n"}],["path",{d:"m3.34 17 1.73-1",key:"nuk764"}],["path",{d:"m17 3.34-1 1.73",key:"2wel8s"}],["path",{d:"m11 13.73-4 6.93",key:"794ttg"}]]);/**
121
+ * @license lucide-react v0.469.0 - ISC
122
+ *
123
+ * This source code is licensed under the ISC license.
124
+ * See the LICENSE file in the root directory of this source tree.
125
+ */const hf=it("Copy",[["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"}]]);/**
126
+ * @license lucide-react v0.469.0 - ISC
127
+ *
128
+ * This source code is licensed under the ISC license.
129
+ * See the LICENSE file in the root directory of this source tree.
130
+ */const Ex=it("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
131
+ * @license lucide-react v0.469.0 - ISC
132
+ *
133
+ * This source code is licensed under the ISC license.
134
+ * See the LICENSE file in the root directory of this source tree.
135
+ */const NC=it("Eye",[["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"}]]);/**
136
+ * @license lucide-react v0.469.0 - ISC
137
+ *
138
+ * This source code is licensed under the ISC license.
139
+ * See the LICENSE file in the root directory of this source tree.
140
+ */const AC=it("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
141
+ * @license lucide-react v0.469.0 - ISC
142
+ *
143
+ * This source code is licensed under the ISC license.
144
+ * See the LICENSE file in the root directory of this source tree.
145
+ */const MC=it("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/**
146
+ * @license lucide-react v0.469.0 - ISC
147
+ *
148
+ * This source code is licensed under the ISC license.
149
+ * See the LICENSE file in the root directory of this source tree.
150
+ */const Rx=it("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
151
+ * @license lucide-react v0.469.0 - ISC
152
+ *
153
+ * This source code is licensed under the ISC license.
154
+ * See the LICENSE file in the root directory of this source tree.
155
+ */const Tx=it("Layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);/**
156
+ * @license lucide-react v0.469.0 - ISC
157
+ *
158
+ * This source code is licensed under the ISC license.
159
+ * See the LICENSE file in the root directory of this source tree.
160
+ */const mf=it("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
161
+ * @license lucide-react v0.469.0 - ISC
162
+ *
163
+ * This source code is licensed under the ISC license.
164
+ * See the LICENSE file in the root directory of this source tree.
165
+ */const _C=it("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
166
+ * @license lucide-react v0.469.0 - ISC
167
+ *
168
+ * This source code is licensed under the ISC license.
169
+ * See the LICENSE file in the root directory of this source tree.
170
+ */const OC=it("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
171
+ * @license lucide-react v0.469.0 - ISC
172
+ *
173
+ * This source code is licensed under the ISC license.
174
+ * See the LICENSE file in the root directory of this source tree.
175
+ */const DC=it("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
176
+ * @license lucide-react v0.469.0 - ISC
177
+ *
178
+ * This source code is licensed under the ISC license.
179
+ * See the LICENSE file in the root directory of this source tree.
180
+ */const Nx=it("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/**
181
+ * @license lucide-react v0.469.0 - ISC
182
+ *
183
+ * This source code is licensed under the ISC license.
184
+ * See the LICENSE file in the root directory of this source tree.
185
+ */const zC=it("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
186
+ * @license lucide-react v0.469.0 - ISC
187
+ *
188
+ * This source code is licensed under the ISC license.
189
+ * See the LICENSE file in the root directory of this source tree.
190
+ */const Ai=it("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
191
+ * @license lucide-react v0.469.0 - ISC
192
+ *
193
+ * This source code is licensed under the ISC license.
194
+ * See the LICENSE file in the root directory of this source tree.
195
+ */const kC=it("ScrollText",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);/**
196
+ * @license lucide-react v0.469.0 - ISC
197
+ *
198
+ * This source code is licensed under the ISC license.
199
+ * See the LICENSE file in the root directory of this source tree.
200
+ */const LC=it("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
201
+ * @license lucide-react v0.469.0 - ISC
202
+ *
203
+ * This source code is licensed under the ISC license.
204
+ * See the LICENSE file in the root directory of this source tree.
205
+ */const UC=it("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
206
+ * @license lucide-react v0.469.0 - ISC
207
+ *
208
+ * This source code is licensed under the ISC license.
209
+ * See the LICENSE file in the root directory of this source tree.
210
+ */const HC=it("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
211
+ * @license lucide-react v0.469.0 - ISC
212
+ *
213
+ * This source code is licensed under the ISC license.
214
+ * See the LICENSE file in the root directory of this source tree.
215
+ */const BC=it("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Ax(a){var l,o,i="";if(typeof a=="string"||typeof a=="number")i+=a;else if(typeof a=="object")if(Array.isArray(a)){var u=a.length;for(l=0;l<u;l++)a[l]&&(o=Ax(a[l]))&&(i&&(i+=" "),i+=o)}else for(o in a)a[o]&&(i&&(i+=" "),i+=o);return i}function Mx(){for(var a,l,o=0,i="",u=arguments.length;o<u;o++)(a=arguments[o])&&(l=Ax(a))&&(i&&(i+=" "),i+=l);return i}const dh="-",PC=a=>{const l=VC(a),{conflictingClassGroups:o,conflictingClassGroupModifiers:i}=a;return{getClassGroupId:h=>{const m=h.split(dh);return m[0]===""&&m.length!==1&&m.shift(),_x(m,l)||qC(h)},getConflictingClassGroupIds:(h,m)=>{const g=o[h]||[];return m&&i[h]?[...g,...i[h]]:g}}},_x=(a,l)=>{var h;if(a.length===0)return l.classGroupId;const o=a[0],i=l.nextPart.get(o),u=i?_x(a.slice(1),i):void 0;if(u)return u;if(l.validators.length===0)return;const f=a.join(dh);return(h=l.validators.find(({validator:m})=>m(f)))==null?void 0:h.classGroupId},Sy=/^\[(.+)\]$/,qC=a=>{if(Sy.test(a)){const l=Sy.exec(a)[1],o=l==null?void 0:l.substring(0,l.indexOf(":"));if(o)return"arbitrary.."+o}},VC=a=>{const{theme:l,prefix:o}=a,i={nextPart:new Map,validators:[]};return GC(Object.entries(a.classGroups),o).forEach(([f,h])=>{Of(h,i,f,l)}),i},Of=(a,l,o,i)=>{a.forEach(u=>{if(typeof u=="string"){const f=u===""?l:wy(l,u);f.classGroupId=o;return}if(typeof u=="function"){if(YC(u)){Of(u(i),l,o,i);return}l.validators.push({validator:u,classGroupId:o});return}Object.entries(u).forEach(([f,h])=>{Of(h,wy(l,f),o,i)})})},wy=(a,l)=>{let o=a;return l.split(dh).forEach(i=>{o.nextPart.has(i)||o.nextPart.set(i,{nextPart:new Map,validators:[]}),o=o.nextPart.get(i)}),o},YC=a=>a.isThemeGetter,GC=(a,l)=>l?a.map(([o,i])=>{const u=i.map(f=>typeof f=="string"?l+f:typeof f=="object"?Object.fromEntries(Object.entries(f).map(([h,m])=>[l+h,m])):f);return[o,u]}):a,IC=a=>{if(a<1)return{get:()=>{},set:()=>{}};let l=0,o=new Map,i=new Map;const u=(f,h)=>{o.set(f,h),l++,l>a&&(l=0,i=o,o=new Map)};return{get(f){let h=o.get(f);if(h!==void 0)return h;if((h=i.get(f))!==void 0)return u(f,h),h},set(f,h){o.has(f)?o.set(f,h):u(f,h)}}},Ox="!",$C=a=>{const{separator:l,experimentalParseClassName:o}=a,i=l.length===1,u=l[0],f=l.length,h=m=>{const g=[];let v=0,w=0,S;for(let E=0;E<m.length;E++){let R=m[E];if(v===0){if(R===u&&(i||m.slice(E,E+f)===l)){g.push(m.slice(w,E)),w=E+f;continue}if(R==="/"){S=E;continue}}R==="["?v++:R==="]"&&v--}const b=g.length===0?m:m.substring(w),x=b.startsWith(Ox),T=x?b.substring(1):b,j=S&&S>w?S-w:void 0;return{modifiers:g,hasImportantModifier:x,baseClassName:T,maybePostfixModifierPosition:j}};return o?m=>o({className:m,parseClassName:h}):h},KC=a=>{if(a.length<=1)return a;const l=[];let o=[];return a.forEach(i=>{i[0]==="["?(l.push(...o.sort(),i),o=[]):o.push(i)}),l.push(...o.sort()),l},XC=a=>({cache:IC(a.cacheSize),parseClassName:$C(a),...PC(a)}),QC=/\s+/,ZC=(a,l)=>{const{parseClassName:o,getClassGroupId:i,getConflictingClassGroupIds:u}=l,f=[],h=a.trim().split(QC);let m="";for(let g=h.length-1;g>=0;g-=1){const v=h[g],{modifiers:w,hasImportantModifier:S,baseClassName:b,maybePostfixModifierPosition:x}=o(v);let T=!!x,j=i(T?b.substring(0,x):b);if(!j){if(!T){m=v+(m.length>0?" "+m:m);continue}if(j=i(b),!j){m=v+(m.length>0?" "+m:m);continue}T=!1}const E=KC(w).join(":"),R=S?E+Ox:E,A=R+j;if(f.includes(A))continue;f.push(A);const N=u(j,T);for(let O=0;O<N.length;++O){const H=N[O];f.push(R+H)}m=v+(m.length>0?" "+m:m)}return m};function FC(){let a=0,l,o,i="";for(;a<arguments.length;)(l=arguments[a++])&&(o=Dx(l))&&(i&&(i+=" "),i+=o);return i}const Dx=a=>{if(typeof a=="string")return a;let l,o="";for(let i=0;i<a.length;i++)a[i]&&(l=Dx(a[i]))&&(o&&(o+=" "),o+=l);return o};function JC(a,...l){let o,i,u,f=h;function h(g){const v=l.reduce((w,S)=>S(w),a());return o=XC(v),i=o.cache.get,u=o.cache.set,f=m,m(g)}function m(g){const v=i(g);if(v)return v;const w=ZC(g,o);return u(g,w),w}return function(){return f(FC.apply(null,arguments))}}const dt=a=>{const l=o=>o[a]||[];return l.isThemeGetter=!0,l},zx=/^\[(?:([a-z-]+):)?(.+)\]$/i,WC=/^\d+\/\d+$/,e2=new Set(["px","full","screen"]),t2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,n2=/\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$/,a2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,l2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,r2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Pa=a=>io(a)||e2.has(a)||WC.test(a),Nl=a=>xo(a,"length",h2),io=a=>!!a&&!Number.isNaN(Number(a)),pf=a=>xo(a,"number",io),yi=a=>!!a&&Number.isInteger(Number(a)),o2=a=>a.endsWith("%")&&io(a.slice(0,-1)),Ae=a=>zx.test(a),Al=a=>t2.test(a),i2=new Set(["length","size","percentage"]),s2=a=>xo(a,i2,kx),c2=a=>xo(a,"position",kx),u2=new Set(["image","url"]),d2=a=>xo(a,u2,p2),f2=a=>xo(a,"",m2),xi=()=>!0,xo=(a,l,o)=>{const i=zx.exec(a);return i?i[1]?typeof l=="string"?i[1]===l:l.has(i[1]):o(i[2]):!1},h2=a=>n2.test(a)&&!a2.test(a),kx=()=>!1,m2=a=>l2.test(a),p2=a=>r2.test(a),g2=()=>{const a=dt("colors"),l=dt("spacing"),o=dt("blur"),i=dt("brightness"),u=dt("borderColor"),f=dt("borderRadius"),h=dt("borderSpacing"),m=dt("borderWidth"),g=dt("contrast"),v=dt("grayscale"),w=dt("hueRotate"),S=dt("invert"),b=dt("gap"),x=dt("gradientColorStops"),T=dt("gradientColorStopPositions"),j=dt("inset"),E=dt("margin"),R=dt("opacity"),A=dt("padding"),N=dt("saturate"),O=dt("scale"),H=dt("sepia"),P=dt("skew"),z=dt("space"),U=dt("translate"),ee=()=>["auto","contain","none"],se=()=>["auto","hidden","clip","visible","scroll"],oe=()=>["auto",Ae,l],J=()=>[Ae,l],ie=()=>["",Pa,Nl],ce=()=>["auto",io,Ae],me=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],L=()=>["solid","dashed","dotted","double","none"],I=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],te=()=>["start","end","center","between","around","evenly","stretch"],W=()=>["","0",Ae],Z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>[io,Ae];return{cacheSize:500,separator:":",theme:{colors:[xi],spacing:[Pa,Nl],blur:["none","",Al,Ae],brightness:M(),borderColor:[a],borderRadius:["none","","full",Al,Ae],borderSpacing:J(),borderWidth:ie(),contrast:M(),grayscale:W(),hueRotate:M(),invert:W(),gap:J(),gradientColorStops:[a],gradientColorStopPositions:[o2,Nl],inset:oe(),margin:oe(),opacity:M(),padding:J(),saturate:M(),scale:M(),sepia:W(),skew:M(),space:J(),translate:J()},classGroups:{aspect:[{aspect:["auto","square","video",Ae]}],container:["container"],columns:[{columns:[Al]}],"break-after":[{"break-after":Z()}],"break-before":[{"break-before":Z()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...me(),Ae]}],overflow:[{overflow:se()}],"overflow-x":[{"overflow-x":se()}],"overflow-y":[{"overflow-y":se()}],overscroll:[{overscroll:ee()}],"overscroll-x":[{"overscroll-x":ee()}],"overscroll-y":[{"overscroll-y":ee()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[j]}],"inset-x":[{"inset-x":[j]}],"inset-y":[{"inset-y":[j]}],start:[{start:[j]}],end:[{end:[j]}],top:[{top:[j]}],right:[{right:[j]}],bottom:[{bottom:[j]}],left:[{left:[j]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",yi,Ae]}],basis:[{basis:oe()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ae]}],grow:[{grow:W()}],shrink:[{shrink:W()}],order:[{order:["first","last","none",yi,Ae]}],"grid-cols":[{"grid-cols":[xi]}],"col-start-end":[{col:["auto",{span:["full",yi,Ae]},Ae]}],"col-start":[{"col-start":ce()}],"col-end":[{"col-end":ce()}],"grid-rows":[{"grid-rows":[xi]}],"row-start-end":[{row:["auto",{span:[yi,Ae]},Ae]}],"row-start":[{"row-start":ce()}],"row-end":[{"row-end":ce()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ae]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ae]}],gap:[{gap:[b]}],"gap-x":[{"gap-x":[b]}],"gap-y":[{"gap-y":[b]}],"justify-content":[{justify:["normal",...te()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...te(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...te(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[A]}],px:[{px:[A]}],py:[{py:[A]}],ps:[{ps:[A]}],pe:[{pe:[A]}],pt:[{pt:[A]}],pr:[{pr:[A]}],pb:[{pb:[A]}],pl:[{pl:[A]}],m:[{m:[E]}],mx:[{mx:[E]}],my:[{my:[E]}],ms:[{ms:[E]}],me:[{me:[E]}],mt:[{mt:[E]}],mr:[{mr:[E]}],mb:[{mb:[E]}],ml:[{ml:[E]}],"space-x":[{"space-x":[z]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[z]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ae,l]}],"min-w":[{"min-w":[Ae,l,"min","max","fit"]}],"max-w":[{"max-w":[Ae,l,"none","full","min","max","fit","prose",{screen:[Al]},Al]}],h:[{h:[Ae,l,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ae,l,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ae,l,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ae,l,"auto","min","max","fit"]}],"font-size":[{text:["base",Al,Nl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",pf]}],"font-family":[{font:[xi]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ae]}],"line-clamp":[{"line-clamp":["none",io,pf]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Pa,Ae]}],"list-image":[{"list-image":["none",Ae]}],"list-style-type":[{list:["none","disc","decimal",Ae]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[a]}],"placeholder-opacity":[{"placeholder-opacity":[R]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[a]}],"text-opacity":[{"text-opacity":[R]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...L(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Pa,Nl]}],"underline-offset":[{"underline-offset":["auto",Pa,Ae]}],"text-decoration-color":[{decoration:[a]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:J()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ae]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[R]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...me(),c2]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",s2]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},d2]}],"bg-color":[{bg:[a]}],"gradient-from-pos":[{from:[T]}],"gradient-via-pos":[{via:[T]}],"gradient-to-pos":[{to:[T]}],"gradient-from":[{from:[x]}],"gradient-via":[{via:[x]}],"gradient-to":[{to:[x]}],rounded:[{rounded:[f]}],"rounded-s":[{"rounded-s":[f]}],"rounded-e":[{"rounded-e":[f]}],"rounded-t":[{"rounded-t":[f]}],"rounded-r":[{"rounded-r":[f]}],"rounded-b":[{"rounded-b":[f]}],"rounded-l":[{"rounded-l":[f]}],"rounded-ss":[{"rounded-ss":[f]}],"rounded-se":[{"rounded-se":[f]}],"rounded-ee":[{"rounded-ee":[f]}],"rounded-es":[{"rounded-es":[f]}],"rounded-tl":[{"rounded-tl":[f]}],"rounded-tr":[{"rounded-tr":[f]}],"rounded-br":[{"rounded-br":[f]}],"rounded-bl":[{"rounded-bl":[f]}],"border-w":[{border:[m]}],"border-w-x":[{"border-x":[m]}],"border-w-y":[{"border-y":[m]}],"border-w-s":[{"border-s":[m]}],"border-w-e":[{"border-e":[m]}],"border-w-t":[{"border-t":[m]}],"border-w-r":[{"border-r":[m]}],"border-w-b":[{"border-b":[m]}],"border-w-l":[{"border-l":[m]}],"border-opacity":[{"border-opacity":[R]}],"border-style":[{border:[...L(),"hidden"]}],"divide-x":[{"divide-x":[m]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[m]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[R]}],"divide-style":[{divide:L()}],"border-color":[{border:[u]}],"border-color-x":[{"border-x":[u]}],"border-color-y":[{"border-y":[u]}],"border-color-s":[{"border-s":[u]}],"border-color-e":[{"border-e":[u]}],"border-color-t":[{"border-t":[u]}],"border-color-r":[{"border-r":[u]}],"border-color-b":[{"border-b":[u]}],"border-color-l":[{"border-l":[u]}],"divide-color":[{divide:[u]}],"outline-style":[{outline:["",...L()]}],"outline-offset":[{"outline-offset":[Pa,Ae]}],"outline-w":[{outline:[Pa,Nl]}],"outline-color":[{outline:[a]}],"ring-w":[{ring:ie()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[a]}],"ring-opacity":[{"ring-opacity":[R]}],"ring-offset-w":[{"ring-offset":[Pa,Nl]}],"ring-offset-color":[{"ring-offset":[a]}],shadow:[{shadow:["","inner","none",Al,f2]}],"shadow-color":[{shadow:[xi]}],opacity:[{opacity:[R]}],"mix-blend":[{"mix-blend":[...I(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":I()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[i]}],contrast:[{contrast:[g]}],"drop-shadow":[{"drop-shadow":["","none",Al,Ae]}],grayscale:[{grayscale:[v]}],"hue-rotate":[{"hue-rotate":[w]}],invert:[{invert:[S]}],saturate:[{saturate:[N]}],sepia:[{sepia:[H]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[g]}],"backdrop-grayscale":[{"backdrop-grayscale":[v]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[w]}],"backdrop-invert":[{"backdrop-invert":[S]}],"backdrop-opacity":[{"backdrop-opacity":[R]}],"backdrop-saturate":[{"backdrop-saturate":[N]}],"backdrop-sepia":[{"backdrop-sepia":[H]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[h]}],"border-spacing-x":[{"border-spacing-x":[h]}],"border-spacing-y":[{"border-spacing-y":[h]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ae]}],duration:[{duration:M()}],ease:[{ease:["linear","in","out","in-out",Ae]}],delay:[{delay:M()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ae]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[O]}],"scale-x":[{"scale-x":[O]}],"scale-y":[{"scale-y":[O]}],rotate:[{rotate:[yi,Ae]}],"translate-x":[{"translate-x":[U]}],"translate-y":[{"translate-y":[U]}],"skew-x":[{"skew-x":[P]}],"skew-y":[{"skew-y":[P]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ae]}],accent:[{accent:["auto",a]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ae]}],"caret-color":[{caret:[a]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":J()}],"scroll-mx":[{"scroll-mx":J()}],"scroll-my":[{"scroll-my":J()}],"scroll-ms":[{"scroll-ms":J()}],"scroll-me":[{"scroll-me":J()}],"scroll-mt":[{"scroll-mt":J()}],"scroll-mr":[{"scroll-mr":J()}],"scroll-mb":[{"scroll-mb":J()}],"scroll-ml":[{"scroll-ml":J()}],"scroll-p":[{"scroll-p":J()}],"scroll-px":[{"scroll-px":J()}],"scroll-py":[{"scroll-py":J()}],"scroll-ps":[{"scroll-ps":J()}],"scroll-pe":[{"scroll-pe":J()}],"scroll-pt":[{"scroll-pt":J()}],"scroll-pr":[{"scroll-pr":J()}],"scroll-pb":[{"scroll-pb":J()}],"scroll-pl":[{"scroll-pl":J()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ae]}],fill:[{fill:[a,"none"]}],"stroke-w":[{stroke:[Pa,Nl,pf]}],stroke:[{stroke:[a,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},v2=JC(g2);function Ee(...a){return v2(Mx(a))}function yn(a,l="—"){return a==null||Number.isNaN(a)?l:a.toLocaleString()}function bi(a,l=1,o="—"){return a==null||Number.isNaN(a)?o:`${(a*100).toFixed(l)}%`}function so(a){return a?a<1e3?`${Math.round(a)} ms`:`${(a/1e3).toFixed(2)} s`:"—"}function fh(a){if(!a)return"—";try{return new Date(a).toLocaleString()}catch{return a}}function y2(a,l=8){return a?a.length>l?`${a.slice(0,l)}…`:a:"—"}const x2=[{to:"/",label:"Dashboard",icon:MC,end:!0},{to:"/providers",label:"Providers",icon:Nx},{to:"/models",label:"Models",icon:wC},{to:"/combos",label:"Combos",icon:Tx},{to:"/aliases",label:"Aliases",icon:RC},{to:"/api-keys",label:"API Keys",icon:Rx},{to:"/requests",label:"Requests",icon:SC},{to:"/statistics",label:"Statistics",icon:AC},{to:"/audit",label:"Audit Logs",icon:kC},{to:"/settings",label:"Settings",icon:TC}];function b2(){return s.jsxs("aside",{className:"hidden w-60 shrink-0 border-r bg-sidebar text-sidebar-foreground md:flex md:flex-col",children:[s.jsxs("div",{className:"flex h-14 items-center gap-2 border-b px-4",children:[s.jsx("img",{src:"/logo.png",alt:"LateDev Router",className:"h-7 w-7 object-contain"}),s.jsx("div",{className:"font-semibold tracking-tight",children:"LateDev Router"})]}),s.jsx("nav",{className:"flex-1 space-y-0.5 p-2",children:x2.map(a=>s.jsxs(bx,{to:a.to,end:a.end,className:({isActive:l})=>Ee("flex items-center gap-2 rounded-md px-3 py-2 text-sm transition-colors",l?"bg-primary/10 text-primary font-medium":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:[s.jsx(a.icon,{className:"h-4 w-4"}),a.label]},a.to))}),s.jsxs("div",{className:"border-t p-3 text-xs text-muted-foreground flex items-center gap-2",children:[s.jsx(LC,{className:"h-3.5 w-3.5 text-primary"})," v0.1.0"]})]})}var S2=Object.defineProperty,hh=(a,l)=>S2(a,"name",{value:l,configurable:!0});function Df(a,l){if(typeof a=="function")return a(l);a!=null&&(a.current=l)}hh(Df,"setRef");function Lx(...a){return l=>{let o=!1;const i=a.map(u=>{const f=Df(u,l);return!o&&typeof f=="function"&&(o=!0),f});if(o)return()=>{for(let u=0;u<i.length;u++){const f=i[u];typeof f=="function"?f():Df(a[u],null)}}}}hh(Lx,"composeRefs");function Pe(...a){return p.useCallback(Lx(...a),a)}hh(Pe,"useComposedRefs");var w2=Object.defineProperty,Fn=(a,l)=>w2(a,"name",{value:l,configurable:!0});function ha(a){const l=p.forwardRef((o,i)=>{let{children:u,...f}=o,h=null,m=!1;const g=[];zf(u)&&typeof Fs=="function"&&(u=Fs(u._payload)),p.Children.forEach(u,b=>{var x;if(qx(b)){m=!0;const T=b;let j="child"in T.props?T.props.child:T.props.children;zf(j)&&typeof Fs=="function"&&(j=Fs(j._payload)),h=C2(T,j),g.push((x=h==null?void 0:h.props)==null?void 0:x.children)}else g.push(b)}),h?h=p.cloneElement(h,void 0,g):!m&&p.Children.count(u)===1&&p.isValidElement(u)&&(h=u);const v=h?Px(h):void 0,w=Pe(i,v);if(!h){if(u||u===0)throw new Error(m?T2(a):R2(a));return u}const S=Bx(f,h.props??{});return h.type!==p.Fragment&&(S.ref=i?w:v),p.cloneElement(h,S)});return l.displayName=`${a}.Slot`,l}Fn(ha,"createSlot");var j2=ha("Slot"),Ux=Symbol.for("radix.slottable");function Hx(a){const l=Fn(o=>"child"in o?o.children(o.child):o.children,"Slottable");return l.displayName=`${a}.Slottable`,l.__radixId=Ux,l}Fn(Hx,"createSlottable");var C2=Fn((a,l)=>{if("child"in a.props){const o=a.props.child;return p.isValidElement(o)?p.cloneElement(o,void 0,a.props.children(o.props.children)):null}return p.isValidElement(l)?l:null},"getSlottableElementFromSlottable");function Bx(a,l){const o={...l};for(const i in l){const u=a[i],f=l[i];/^on[A-Z]/.test(i)?u&&f?o[i]=(...m)=>{const g=f(...m);return u(...m),g}:u&&(o[i]=u):i==="style"?o[i]={...u,...f}:i==="className"&&(o[i]=[u,f].filter(Boolean).join(" "))}return{...a,...o}}Fn(Bx,"mergeProps");function Px(a){var i,u;let l=(i=Object.getOwnPropertyDescriptor(a.props,"ref"))==null?void 0:i.get,o=l&&"isReactWarning"in l&&l.isReactWarning;return o?a.ref:(l=(u=Object.getOwnPropertyDescriptor(a,"ref"))==null?void 0:u.get,o=l&&"isReactWarning"in l&&l.isReactWarning,o?a.props.ref:a.props.ref||a.ref)}Fn(Px,"getElementRef");function qx(a){return p.isValidElement(a)&&typeof a.type=="function"&&"__radixId"in a.type&&a.type.__radixId===Ux}Fn(qx,"isSlottable");var E2=Symbol.for("react.lazy");function zf(a){return a!=null&&typeof a=="object"&&"$$typeof"in a&&a.$$typeof===E2&&"_payload"in a&&Vx(a._payload)}Fn(zf,"isLazyComponent");function Vx(a){return typeof a=="object"&&a!==null&&"then"in a}Fn(Vx,"isPromiseLike");var R2=Fn(a=>`${a} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),T2=Fn(a=>`${a} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),Fs=ho[" use ".trim().toString()];const jy=a=>typeof a=="boolean"?`${a}`:a===0?"0":a,Cy=Mx,Yx=(a,l)=>o=>{var i;if((l==null?void 0:l.variants)==null)return Cy(a,o==null?void 0:o.class,o==null?void 0:o.className);const{variants:u,defaultVariants:f}=l,h=Object.keys(u).map(v=>{const w=o==null?void 0:o[v],S=f==null?void 0:f[v];if(w===null)return null;const b=jy(w)||jy(S);return u[v][b]}),m=o&&Object.entries(o).reduce((v,w)=>{let[S,b]=w;return b===void 0||(v[S]=b),v},{}),g=l==null||(i=l.compoundVariants)===null||i===void 0?void 0:i.reduce((v,w)=>{let{class:S,className:b,...x}=w;return Object.entries(x).every(T=>{let[j,E]=T;return Array.isArray(E)?E.includes({...f,...m}[j]):{...f,...m}[j]===E})?[...v,S,b]:v},[]);return Cy(a,h,g,o==null?void 0:o.class,o==null?void 0:o.className)},N2=Yx("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-6",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),ve=p.forwardRef(({className:a,variant:l,size:o,asChild:i=!1,...u},f)=>{const h=i?j2:"button";return s.jsx(h,{className:Ee(N2({variant:l,size:o,className:a})),ref:f,...u})});ve.displayName="Button";const Gx=p.createContext(void 0);function A2({children:a,defaultTheme:l="system",storageKey:o="latedev-theme"}){const[i,u]=p.useState(()=>localStorage.getItem(o)||l);p.useEffect(()=>{const h=window.document.documentElement;if(h.classList.remove("light","dark"),i==="system"){const m=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";h.classList.add(m);return}h.classList.add(i)},[i]);const f={theme:i,setTheme:h=>{localStorage.setItem(o,h),u(h)}};return s.jsx(Gx.Provider,{value:f,children:a})}function M2(){const a=p.useContext(Gx);if(!a)throw new Error("useTheme must be used within ThemeProvider");return a}var _2=Object.defineProperty,bo=(a,l)=>_2(a,"name",{value:l,configurable:!0}),Ix=!!(typeof window<"u"&&window.document&&window.document.createElement);function xe(a,l,{checkForDefaultPrevented:o=!0}={}){return bo(function(u){if(a==null||a(u),o===!1||!u||!u.defaultPrevented)return l==null?void 0:l(u)},"handleEvent")}bo(xe,"composeEventHandlers");function O2(a){var l;if(!Ix)throw new Error("Cannot access window outside of the DOM");return((l=a==null?void 0:a.ownerDocument)==null?void 0:l.defaultView)??window}bo(O2,"getOwnerWindow");function kf(a){if(!Ix)throw new Error("Cannot access document outside of the DOM");return(a==null?void 0:a.ownerDocument)??document}bo(kf,"getOwnerDocument");function $x(a,l=!1){const{activeElement:o}=kf(a);if(!(o!=null&&o.nodeName))return null;if(Kx(o)&&o.contentDocument)return $x(o.contentDocument.body,l);if(l){const i=o.getAttribute("aria-activedescendant");if(i){const u=kf(o).getElementById(i);if(u)return u}}return o}bo($x,"getActiveElement");function Kx(a){return a.tagName==="IFRAME"}bo(Kx,"isFrame");var D2=Object.defineProperty,zn=(a,l)=>D2(a,"name",{value:l,configurable:!0});function z2(a,l){const o=p.createContext(l);o.displayName=a+"Context";const i=zn(f=>{const{children:h,...m}=f,g=p.useMemo(()=>m,Object.values(m));return s.jsx(o.Provider,{value:g,children:h})},"Provider");i.displayName=a+"Provider";function u(f,h={}){const{optional:m=!1}=h,g=p.useContext(o);if(g)return g;if(l!==void 0)return l;if(!m)throw new Error(`\`${f}\` must be used within \`${a}\``)}return zn(u,"useContext"),[i,u]}zn(z2,"createContext");function cn(a,l=[]){let o=[];function i(f,h){const m=p.createContext(h);m.displayName=f+"Context";const g=o.length;o=[...o,h];const v=zn(S=>{var R;const{scope:b,children:x,...T}=S,j=((R=b==null?void 0:b[a])==null?void 0:R[g])||m,E=p.useMemo(()=>T,Object.values(T));return s.jsx(j.Provider,{value:E,children:x})},"Provider");v.displayName=f+"Provider";function w(S,b,x={}){var R;const{optional:T=!1}=x,j=((R=b==null?void 0:b[a])==null?void 0:R[g])||m,E=p.useContext(j);if(E)return E;if(h!==void 0)return h;if(!T)throw new Error(`\`${S}\` must be used within \`${f}\``)}return zn(w,"useContext"),[v,w]}zn(i,"createContext");const u=zn(()=>{const f=o.map(h=>p.createContext(h));return zn(function(m){const g=(m==null?void 0:m[a])||f;return p.useMemo(()=>({[`__scope${a}`]:{...m,[a]:g}}),[m,g])},"useScope")},"createScope");return u.scopeName=a,[i,Xx(u,...l)]}zn(cn,"createContextScope");function Xx(...a){const l=a[0];if(a.length===1)return l;const o=zn(()=>{const i=a.map(u=>({useScope:u(),scopeName:u.scopeName}));return zn(function(f){const h=i.reduce((m,{useScope:g,scopeName:v})=>{const S=g(f)[`__scope${v}`];return{...m,...S}},{});return p.useMemo(()=>({[`__scope${l.scopeName}`]:h}),[h])},"useComposedScopes")},"createScope");return o.scopeName=l.scopeName,o}zn(Xx,"composeContextScopes");var Tt=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{},k2=Object.defineProperty,L2=(a,l)=>k2(a,"name",{value:l,configurable:!0}),Ey=ho[" useEffectEvent ".trim().toString()],Ry=ho[" useInsertionEffect ".trim().toString()];function Qx(a){if(typeof Ey=="function")return Ey(a);const l=p.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof Ry=="function"?Ry(()=>{l.current=a}):Tt(()=>{l.current=a}),p.useMemo(()=>((...o)=>{var i;return(i=l.current)==null?void 0:i.call(l,...o)}),[])}L2(Qx,"useEffectEvent");var U2=Object.defineProperty,Mi=(a,l)=>U2(a,"name",{value:l,configurable:!0}),H2=ho[" useInsertionEffect ".trim().toString()]||Tt;function Xa({prop:a,defaultProp:l,onChange:o=Mi(()=>{},"onChange"),caller:i}){const[u,f,h]=Zx({defaultProp:l,onChange:o}),m=a!==void 0,g=m?a:u,v=p.useCallback(w=>{var S;if(m){const b=Fx(w)?w(a):w;b!==a&&((S=h.current)==null||S.call(h,b))}else f(w)},[m,a,f,h]);return[g,v]}Mi(Xa,"useControllableState");function Zx({defaultProp:a,onChange:l}){const[o,i]=p.useState(a),u=p.useRef(o),f=p.useRef(l);return H2(()=>{f.current=l},[l]),p.useEffect(()=>{var h;u.current!==o&&((h=f.current)==null||h.call(f,o),u.current=o)},[o,u]),[o,i,f]}Mi(Zx,"useUncontrolledState");function Fx(a){return typeof a=="function"}Mi(Fx,"isFunction");var Ty=Symbol("RADIX:SYNC_STATE");function B2(a,l,o,i){const{prop:u,defaultProp:f,onChange:h,caller:m}=l,g=u!==void 0,v=Qx(h),w=[{...o,state:f}];i&&w.push(i);const[S,b]=p.useReducer((E,R)=>{if(R.type===Ty)return{...E,state:R.state};const A=a(E,R);return g&&!Object.is(A.state,E.state)&&v(A.state),A},...w),x=S.state,T=p.useRef(x);p.useEffect(()=>{T.current!==x&&(T.current=x,g||v(x))},[x,T,g]);const j=p.useMemo(()=>u!==void 0?{...S,state:u}:S,[S,u]);return p.useEffect(()=>{g&&!Object.is(u,S.state)&&b({type:Ty,state:u})},[u,S.state,g]),[j,b]}Mi(B2,"useControllableStateReducer");var P2=Object.defineProperty,q2=(a,l)=>P2(a,"name",{value:l,configurable:!0}),V2=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Le=V2.reduce((a,l)=>{const o=ha(`Primitive.${l}`),i=p.forwardRef((u,f)=>{const{asChild:h,...m}=u,g=h?o:l;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(g,{...m,ref:f})});return i.displayName=`Primitive.${l}`,{...a,[l]:i}},{});function mh(a,l){a&&yo.flushSync(()=>a.dispatchEvent(l))}q2(mh,"dispatchDiscreteCustomEvent");var Y2=Object.defineProperty,_t=(a,l)=>Y2(a,"name",{value:l,configurable:!0});function jc(a){const l=a+"CollectionProvider",[o,i]=cn(l),[u,f]=o(l,{collectionRef:{current:null},itemMap:new Map}),h=_t(j=>{const{scope:E,children:R}=j,A=p.useRef(null),N=p.useRef(new Map).current;return s.jsx(u,{scope:E,itemMap:N,collectionRef:A,children:R})},"CollectionProvider");h.displayName=l;const m=a+"CollectionSlot",g=ha(m),v=p.forwardRef((j,E)=>{const{scope:R,children:A}=j,N=f(m,R),O=Pe(E,N.collectionRef);return s.jsx(g,{ref:O,children:A})});v.displayName=m;const w=a+"CollectionItemSlot",S="data-radix-collection-item",b=ha(w),x=p.forwardRef((j,E)=>{const{scope:R,children:A,...N}=j,O=p.useRef(null),H=Pe(E,O),P=f(w,R);return p.useEffect(()=>(P.itemMap.set(O,{ref:O,...N}),()=>void P.itemMap.delete(O))),s.jsx(b,{[S]:"",ref:H,children:A})});x.displayName=w;function T(j){const E=f(a+"CollectionConsumer",j);return p.useCallback(()=>{const A=E.collectionRef.current;if(!A)return[];const N=Array.from(A.querySelectorAll(`[${S}]`));return Array.from(E.itemMap.values()).sort((P,z)=>N.indexOf(P.ref.current)-N.indexOf(z.ref.current))},[E.collectionRef,E.itemMap])}return _t(T,"useCollection"),[{Provider:h,Slot:v,ItemSlot:x},T,i]}_t(jc,"createCollection");var Ny=new WeakMap,Et,vn,gf=(vn=class extends Map{constructor(o){super(o);ay(this,Et);nf(this,Et,[...super.keys()]),Ny.set(this,!0)}set(o,i){return Ny.get(this)&&(this.has(o)?Pt(this,Et)[Pt(this,Et).indexOf(o)]=o:Pt(this,Et).push(o)),super.set(o,i),this}insert(o,i,u){const f=this.has(i),h=Pt(this,Et).length,m=ph(o);let g=m>=0?m:h+m;const v=g<0||g>=h?-1:g;if(v===this.size||f&&v===this.size-1||v===-1)return this.set(i,u),this;const w=this.size+(f?0:1);m<0&&g++;const S=[...Pt(this,Et)];let b,x=!1;for(let T=g;T<w;T++)if(g===T){let j=S[T];S[T]===i&&(j=S[T+1]),f&&this.delete(i),b=this.get(j),this.set(i,u)}else{!x&&S[T-1]===i&&(x=!0);const j=S[x?T:T-1],E=b;b=this.get(j),this.delete(j),this.set(j,E)}return this}with(o,i,u){const f=new vn(this);return f.insert(o,i,u),f}before(o){const i=Pt(this,Et).indexOf(o)-1;if(!(i<0))return this.entryAt(i)}setBefore(o,i,u){const f=Pt(this,Et).indexOf(o);return f===-1?this:this.insert(f,i,u)}after(o){let i=Pt(this,Et).indexOf(o);if(i=i===-1||i===this.size-1?-1:i+1,i!==-1)return this.entryAt(i)}setAfter(o,i,u){const f=Pt(this,Et).indexOf(o);return f===-1?this:this.insert(f+1,i,u)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return nf(this,Et,[]),super.clear()}delete(o){const i=super.delete(o);return i&&Pt(this,Et).splice(Pt(this,Et).indexOf(o),1),i}deleteAt(o){const i=this.keyAt(o);return i!==void 0?this.delete(i):!1}at(o){const i=sc(Pt(this,Et),o);if(i!==void 0)return this.get(i)}entryAt(o){const i=sc(Pt(this,Et),o);if(i!==void 0)return[i,this.get(i)]}indexOf(o){return Pt(this,Et).indexOf(o)}keyAt(o){return sc(Pt(this,Et),o)}from(o,i){const u=this.indexOf(o);if(u===-1)return;let f=u+i;return f<0&&(f=0),f>=this.size&&(f=this.size-1),this.at(f)}keyFrom(o,i){const u=this.indexOf(o);if(u===-1)return;let f=u+i;return f<0&&(f=0),f>=this.size&&(f=this.size-1),this.keyAt(f)}find(o,i){let u=0;for(const f of this){if(Reflect.apply(o,i,[f,u,this]))return f;u++}}findIndex(o,i){let u=0;for(const f of this){if(Reflect.apply(o,i,[f,u,this]))return u;u++}return-1}filter(o,i){const u=[];let f=0;for(const h of this)Reflect.apply(o,i,[h,f,this])&&u.push(h),f++;return new vn(u)}map(o,i){const u=[];let f=0;for(const h of this)u.push([h[0],Reflect.apply(o,i,[h,f,this])]),f++;return new vn(u)}reduce(...o){const[i,u]=o;let f=0,h=u??this.at(0);for(const m of this)f===0&&o.length===1?h=m:h=Reflect.apply(i,this,[h,m,f,this]),f++;return h}reduceRight(...o){const[i,u]=o;let f=u??this.at(-1);for(let h=this.size-1;h>=0;h--){const m=this.at(h);h===this.size-1&&o.length===1?f=m:f=Reflect.apply(i,this,[f,m,h,this])}return f}toSorted(o){const i=[...this.entries()].sort(o);return new vn(i)}toReversed(){const o=new vn;for(let i=this.size-1;i>=0;i--){const u=this.keyAt(i),f=this.get(u);o.set(u,f)}return o}toSpliced(...o){const i=[...this.entries()];return i.splice(...o),new vn(i)}slice(o,i){const u=new vn;let f=this.size-1;if(o===void 0)return u;o<0&&(o=o+this.size),i!==void 0&&i>0&&(f=i-1);for(let h=o;h<=f;h++){const m=this.keyAt(h),g=this.get(m);u.set(m,g)}return u}every(o,i){let u=0;for(const f of this){if(!Reflect.apply(o,i,[f,u,this]))return!1;u++}return!0}some(o,i){let u=0;for(const f of this){if(Reflect.apply(o,i,[f,u,this]))return!0;u++}return!1}},Et=new WeakMap,_t(vn,"OrderedDict"),vn);function sc(a,l){if("at"in Array.prototype)return Array.prototype.at.call(a,l);const o=Jx(a,l);return o===-1?void 0:a[o]}_t(sc,"at");function Jx(a,l){const o=a.length,i=ph(l),u=i>=0?i:o+i;return u<0||u>=o?-1:u}_t(Jx,"toSafeIndex");function ph(a){return a!==a||a===0?0:Math.trunc(a)}_t(ph,"toSafeInteger");function G2(a){const l=a+"CollectionProvider",[o,i]=cn(l),[u,f]=o(l,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new gf,setItemMap:_t(()=>{},"setItemMap")}),h=_t(({state:N,...O})=>N?s.jsx(g,{...O,state:N}):s.jsx(m,{...O}),"CollectionProvider");h.displayName=l;const m=_t(N=>{const O=E();return s.jsx(g,{...N,state:O})},"CollectionInit");m.displayName=l+"Init";const g=_t(N=>{const{scope:O,children:H,state:P}=N,z=p.useRef(null),[U,ee]=p.useState(null),se=Pe(z,ee),[oe,J]=P;return p.useEffect(()=>{if(!U)return;const ie=tb(()=>{});return ie.observe(U,{childList:!0,subtree:!0}),()=>{ie.disconnect()}},[U]),s.jsx(u,{scope:O,itemMap:oe,setItemMap:J,collectionRef:se,collectionRefObject:z,collectionElement:U,children:H})},"CollectionProviderImpl");g.displayName=l+"Impl";const v=a+"CollectionSlot",w=ha(v),S=p.forwardRef((N,O)=>{const{scope:H,children:P}=N,z=f(v,H),U=Pe(O,z.collectionRef);return s.jsx(w,{ref:U,children:P})});S.displayName=v;const b=a+"CollectionItemSlot",x="data-radix-collection-item",T=ha(b),j=p.forwardRef((N,O)=>{const{scope:H,children:P,...z}=N,U=p.useRef(null),[ee,se]=p.useState(null),oe=Pe(O,U,se),J=f(b,H),{setItemMap:ie}=J,ce=p.useRef(z);Wx(ce.current,z)||(ce.current=z);const me=ce.current;return p.useEffect(()=>{const L=me;return ie(I=>ee?I.has(ee)?I.set(ee,{...L,element:ee}).toSorted(Lf):(I.set(ee,{...L,element:ee}),I.toSorted(Lf)):I),()=>{ie(I=>!ee||!I.has(ee)?I:(I.delete(ee),new gf(I)))}},[ee,me,ie]),s.jsx(T,{[x]:"",ref:oe,children:P})});j.displayName=b;function E(){return p.useState(new gf)}_t(E,"useInitCollection");function R(N){const{itemMap:O}=f(a+"CollectionConsumer",N);return O}return _t(R,"useCollection"),[{Provider:h,Slot:S,ItemSlot:j},{createCollectionScope:i,useCollection:R,useInitCollection:E}]}_t(G2,"createCollection");function Wx(a,l){if(a===l)return!0;if(typeof a!="object"||typeof l!="object"||a==null||l==null)return!1;const o=Object.keys(a),i=Object.keys(l);if(o.length!==i.length)return!1;for(const u of o)if(!Object.prototype.hasOwnProperty.call(l,u)||a[u]!==l[u])return!1;return!0}_t(Wx,"shallowEqual");function eb(a,l){return!!(l.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_PRECEDING)}_t(eb,"isElementPreceding");function Lf(a,l){return!a[1].element||!l[1].element?0:eb(a[1].element,l[1].element)?-1:1}_t(Lf,"sortByDocumentPosition");function tb(a){return new MutationObserver(o=>{for(const i of o)if(i.type==="childList"){a();return}})}_t(tb,"getChildListObserver");var I2=Object.defineProperty,$2=(a,l)=>I2(a,"name",{value:l,configurable:!0}),K2=p.createContext(void 0);function _i(a){const l=p.useContext(K2);return a||l||"ltr"}$2(_i,"useDirection");var X2=Object.defineProperty,Q2=(a,l)=>X2(a,"name",{value:l,configurable:!0});function Hn(a){const l=p.useRef(a);return p.useEffect(()=>{l.current=a}),p.useMemo(()=>((...o)=>{var i;return(i=l.current)==null?void 0:i.call(l,...o)}),[])}Q2(Hn,"useCallbackRef");var Z2=Object.defineProperty,Mt=(a,l)=>Z2(a,"name",{value:l,configurable:!0}),Uf="dismissableLayer.update",F2="dismissableLayer.pointerDownOutside",J2="dismissableLayer.focusOutside",Ay,nb=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Cc=p.forwardRef(Mt(function(l,o){const{disableOutsidePointerEvents:i=!1,deferPointerDownOutside:u=!1,onEscapeKeyDown:f,onPointerDownOutside:h,onFocusOutside:m,onInteractOutside:g,onDismiss:v,...w}=l,S=p.useContext(nb),[b,x]=p.useState(null),T=(b==null?void 0:b.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,j]=p.useState({}),E=Pe(o,x),R=Array.from(S.layers),[A]=[...S.layersWithOutsidePointerEventsDisabled].slice(-1),N=A?R.indexOf(A):-1,O=b?R.indexOf(b):-1,H=S.layersWithOutsidePointerEventsDisabled.size>0,P=O>=N,z=p.useRef(!1),U=lb(J=>{h==null||h(J),g==null||g(J),J.defaultPrevented||v==null||v()},{ownerDocument:T,deferPointerDownOutside:u,isDeferredPointerDownOutsideRef:z,dismissableSurfaces:S.dismissableSurfaces,shouldHandlePointerDownOutside:p.useCallback(J=>{if(!(J instanceof Node))return!1;const ie=[...S.branches].some(ce=>ce.contains(J));return P&&!ie},[S.branches,P])}),ee=rb(J=>{if(u&&z.current)return;const ie=J.target;[...S.branches].some(me=>me.contains(ie))||(m==null||m(J),g==null||g(J),J.defaultPrevented||v==null||v())},T),se=b?O===R.length-1:!1,oe=Hn(J=>{J.key==="Escape"&&(f==null||f(J),!J.defaultPrevented&&v&&(J.preventDefault(),v()))});return p.useEffect(()=>{if(se)return T.addEventListener("keydown",oe,{capture:!0}),()=>T.removeEventListener("keydown",oe,{capture:!0})},[T,se,oe]),p.useEffect(()=>{if(b)return i&&(S.layersWithOutsidePointerEventsDisabled.size===0&&(Ay=T.body.style.pointerEvents,T.body.style.pointerEvents="none"),S.layersWithOutsidePointerEventsDisabled.add(b)),S.layers.add(b),Hf(),()=>{i&&(S.layersWithOutsidePointerEventsDisabled.delete(b),S.layersWithOutsidePointerEventsDisabled.size===0&&(T.body.style.pointerEvents=Ay))}},[b,T,i,S]),p.useEffect(()=>()=>{b&&(S.layers.delete(b),S.layersWithOutsidePointerEventsDisabled.delete(b),Hf())},[b,S]),p.useEffect(()=>{const J=Mt(()=>j({}),"handleUpdate");return document.addEventListener(Uf,J),()=>document.removeEventListener(Uf,J)},[]),s.jsx(Le.div,{...w,ref:E,style:{pointerEvents:H?P?"auto":"none":void 0,...l.style},onFocusCapture:xe(l.onFocusCapture,ee.onFocusCapture),onBlurCapture:xe(l.onBlurCapture,ee.onBlurCapture),onPointerDownCapture:xe(l.onPointerDownCapture,U.onPointerDownCapture)})},"DismissableLayer"));function ab(){const a=p.useContext(nb),[l,o]=p.useState(null);return p.useEffect(()=>{if(l)return a.dismissableSurfaces.add(l),()=>{a.dismissableSurfaces.delete(l)}},[l,a.dismissableSurfaces]),o}Mt(ab,"useDismissableLayerSurface");var W2=Mt(()=>!0,"IS_TRUE");function lb(a,l){const{ownerDocument:o=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:i=!1,isDeferredPointerDownOutsideRef:u,dismissableSurfaces:f,shouldHandlePointerDownOutside:h=W2}=l,m=Hn(a),g=p.useRef(!1),v=p.useRef(!1),w=p.useRef(new Map),S=p.useRef(()=>{});return p.useEffect(()=>{function b(){v.current=!1,u.current=!1,w.current.clear()}Mt(b,"resetOutsideInteraction");function x(){return Array.from(w.current.values()).some(Boolean)}Mt(x,"isOutsideInteractionIntercepted");function T(N){if(!v.current)return;const O=N.target;O instanceof Node&&[...f].some(P=>P.contains(O))||w.current.set(N.type,!0),N.type==="click"&&window.setTimeout(()=>{v.current&&S.current()},0)}Mt(T,"handleInteractionCapture");function j(N){v.current&&w.current.set(N.type,!1)}Mt(j,"handleInteractionBubble");const E=Mt(N=>{if(N.target&&!g.current){let O=function(){o.removeEventListener("click",S.current);const P=x();b(),P||gh(F2,m,H,{discrete:!0})};if(Mt(O,"handleAndDispatchPointerDownOutsideEvent"),!h(N.target)){o.removeEventListener("click",S.current),b(),g.current=!1;return}const H={originalEvent:N};v.current=!0,u.current=i&&N.button===0,w.current.clear(),!i||N.button!==0?O():(o.removeEventListener("click",S.current),S.current=O,o.addEventListener("click",S.current,{once:!0}))}else o.removeEventListener("click",S.current),b();g.current=!1},"handlePointerDown"),R=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const N of R)o.addEventListener(N,T,!0),o.addEventListener(N,j);const A=window.setTimeout(()=>{o.addEventListener("pointerdown",E)},0);return()=>{window.clearTimeout(A),o.removeEventListener("pointerdown",E),o.removeEventListener("click",S.current);for(const N of R)o.removeEventListener(N,T,!0),o.removeEventListener(N,j)}},[o,m,i,u,f,h]),{onPointerDownCapture:Mt(()=>g.current=!0,"onPointerDownCapture")}}Mt(lb,"usePointerDownOutside");function rb(a,l=globalThis==null?void 0:globalThis.document){const o=Hn(a),i=p.useRef(!1);return p.useEffect(()=>{const u=Mt(f=>{f.target&&!i.current&&gh(J2,o,{originalEvent:f},{discrete:!1})},"handleFocus");return l.addEventListener("focusin",u),()=>l.removeEventListener("focusin",u)},[l,o]),{onFocusCapture:Mt(()=>i.current=!0,"onFocusCapture"),onBlurCapture:Mt(()=>i.current=!1,"onBlurCapture")}}Mt(rb,"useFocusOutside");function Hf(){const a=new CustomEvent(Uf);document.dispatchEvent(a)}Mt(Hf,"dispatchUpdate");function gh(a,l,o,{discrete:i}){const u=o.originalEvent.target,f=new CustomEvent(a,{bubbles:!1,cancelable:!0,detail:o});l&&u.addEventListener(a,l,{once:!0}),i?mh(u,f):u.dispatchEvent(f)}Mt(gh,"handleAndDispatchCustomEvent");var eE=Object.defineProperty,vh=(a,l)=>eE(a,"name",{value:l,configurable:!0}),Js=0,oa=null;function tE(a){return Oi(),a.children}vh(tE,"FocusGuards");function Oi(){p.useEffect(()=>{oa||(oa={start:Bf(),end:Bf()});const{start:a,end:l}=oa;return document.body.firstElementChild!==a&&document.body.insertAdjacentElement("afterbegin",a),document.body.lastElementChild!==l&&document.body.insertAdjacentElement("beforeend",l),Js++,()=>{Js===1&&(oa==null||oa.start.remove(),oa==null||oa.end.remove(),oa=null),Js=Math.max(0,Js-1)}},[])}vh(Oi,"useFocusGuards");function Bf(){const a=document.createElement("span");return a.setAttribute("data-radix-focus-guard",""),a.tabIndex=0,a.style.outline="none",a.style.opacity="0",a.style.position="fixed",a.style.pointerEvents="none",a}vh(Bf,"createFocusGuard");var nE=Object.defineProperty,$t=(a,l)=>nE(a,"name",{value:l,configurable:!0}),vf="focusScope.autoFocusOnMount",yf="focusScope.autoFocusOnUnmount",My={bubbles:!1,cancelable:!0},yh=p.forwardRef($t(function(l,o){const{loop:i=!1,trapped:u=!1,onMountAutoFocus:f,onUnmountAutoFocus:h,...m}=l,[g,v]=p.useState(null),w=Hn(f),S=Hn(h),b=p.useRef(null),x=Pe(o,v),T=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(u){let E=function(O){if(T.paused||!g)return;const H=O.target;g.contains(H)?b.current=H:qa(b.current,{select:!0})},R=function(O){if(T.paused||!g)return;const H=O.relatedTarget;H!==null&&(g.contains(H)||qa(b.current,{select:!0}))},A=function(O){if(document.activeElement===document.body)for(const P of O)P.removedNodes.length>0&&qa(g)};$t(E,"handleFocusIn"),$t(R,"handleFocusOut"),$t(A,"handleMutations"),document.addEventListener("focusin",E),document.addEventListener("focusout",R);const N=new MutationObserver(A);return g&&N.observe(g,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",E),document.removeEventListener("focusout",R),N.disconnect()}}},[u,g,T.paused]),p.useEffect(()=>{if(g){_y.add(T);const E=document.activeElement;if(!g.contains(E)){const A=new CustomEvent(vf,My);g.addEventListener(vf,w),g.dispatchEvent(A),A.defaultPrevented||(ob(db(xh(g)),{select:!0}),document.activeElement===E&&qa(g))}return()=>{g.removeEventListener(vf,w),setTimeout(()=>{const A=new CustomEvent(yf,My);g.addEventListener(yf,S),g.dispatchEvent(A),A.defaultPrevented||qa(E??document.body,{select:!0}),g.removeEventListener(yf,S),_y.remove(T)},0)}}},[g,w,S,T]);const j=p.useCallback(E=>{if(!i&&!u||T.paused)return;const R=E.key==="Tab"&&!E.altKey&&!E.ctrlKey&&!E.metaKey,A=document.activeElement;if(R&&A){const N=E.currentTarget,[O,H]=ib(N);O&&H?!E.shiftKey&&A===H?(E.preventDefault(),i&&qa(O,{select:!0})):E.shiftKey&&A===O&&(E.preventDefault(),i&&qa(H,{select:!0})):A===N&&E.preventDefault()}},[i,u,T.paused]);return s.jsx(Le.div,{tabIndex:-1,...m,ref:x,onKeyDown:j})},"FocusScope"));function ob(a,{select:l=!1}={}){const o=document.activeElement;for(const i of a)if(qa(i,{select:l}),document.activeElement!==o)return}$t(ob,"focusFirst");function ib(a){const l=xh(a),o=Pf(l,a),i=Pf(l.reverse(),a);return[o,i]}$t(ib,"getTabbableEdges");function xh(a){const l=[],o=document.createTreeWalker(a,NodeFilter.SHOW_ELEMENT,{acceptNode:$t(i=>{const u=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||u?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;o.nextNode();)l.push(o.currentNode);return l}$t(xh,"getTabbableCandidates");function Pf(a,l){const o=typeof l.checkVisibility=="function"&&l.checkVisibility({checkVisibilityCSS:!0});for(const i of a)if(!(o?!i.checkVisibility({checkVisibilityCSS:!0}):sb(i,{upTo:l})))return i}$t(Pf,"findVisible");function sb(a,{upTo:l}){if(getComputedStyle(a).visibility==="hidden")return!0;for(;a;){if(l!==void 0&&a===l)return!1;if(getComputedStyle(a).display==="none")return!0;a=a.parentElement}return!1}$t(sb,"isHidden");function cb(a){return a instanceof HTMLInputElement&&"select"in a}$t(cb,"isSelectableInput");function qa(a,{select:l=!1}={}){if(a&&a.focus){const o=document.activeElement;a.focus({preventScroll:!0}),a!==o&&cb(a)&&l&&a.select()}}$t(qa,"focus");var _y=ub();function ub(){let a=[];return{add(l){const o=a[0];l!==o&&(o==null||o.pause()),a=qf(a,l),a.unshift(l)},remove(l){var o;a=qf(a,l),(o=a[0])==null||o.resume()}}}$t(ub,"createFocusScopesStack");function qf(a,l){const o=[...a],i=o.indexOf(l);return i!==-1&&o.splice(i,1),o}$t(qf,"arrayRemove");function db(a){return a.filter(l=>l.tagName!=="A")}$t(db,"removeLinks");var aE=Object.defineProperty,lE=(a,l)=>aE(a,"name",{value:l,configurable:!0}),rE=ho[" useId ".trim().toString()]||(()=>{}),oE=0;function ca(a){const[l,o]=p.useState(rE());return Tt(()=>{a||o(i=>i??String(oE++))},[a]),a||(l?`radix-${l}`:"")}lE(ca,"useId");const iE=["top","right","bottom","left"],Dl=Math.min,Va=Math.max,mc=Math.round,Ws=Math.floor,Ya=a=>({x:a,y:a}),sE={left:"right",right:"left",bottom:"top",top:"bottom"};function fb(a,l,o){return Va(a,Dl(l,o))}function Qa(a,l){return typeof a=="function"?a(l):a}function zl(a){return a.split("-")[0]}function So(a){return a.split("-")[1]}function bh(a){return a==="x"?"y":"x"}function Sh(a){return a==="y"?"height":"width"}function sa(a){const l=a[0];return l==="t"||l==="b"?"y":"x"}function wh(a){return bh(sa(a))}function cE(a,l,o){o===void 0&&(o=!1);const i=So(a),u=wh(a),f=Sh(u);let h=u==="x"?i===(o?"end":"start")?"right":"left":i==="start"?"bottom":"top";return l.reference[f]>l.floating[f]&&(h=pc(h)),[h,pc(h)]}function uE(a){const l=pc(a);return[Vf(a),l,Vf(l)]}function Vf(a){return a.includes("start")?a.replace("start","end"):a.replace("end","start")}const Oy=["left","right"],Dy=["right","left"],dE=["top","bottom"],fE=["bottom","top"];function hE(a,l,o){switch(a){case"top":case"bottom":return o?l?Dy:Oy:l?Oy:Dy;case"left":case"right":return l?dE:fE;default:return[]}}function mE(a,l,o,i){const u=So(a);let f=hE(zl(a),o==="start",i);return u&&(f=f.map(h=>h+"-"+u),l&&(f=f.concat(f.map(Vf)))),f}function pc(a){const l=zl(a);return sE[l]+a.slice(l.length)}function pE(a){var l,o,i,u;return{top:(l=a.top)!=null?l:0,right:(o=a.right)!=null?o:0,bottom:(i=a.bottom)!=null?i:0,left:(u=a.left)!=null?u:0}}function hb(a){return typeof a!="number"?pE(a):{top:a,right:a,bottom:a,left:a}}function gc(a){const{x:l,y:o,width:i,height:u}=a;return{width:i,height:u,top:o,left:l,right:l+i,bottom:o+u,x:l,y:o}}function zy(a,l,o){let{reference:i,floating:u}=a;const f=sa(l),h=wh(l),m=Sh(h),g=zl(l),v=f==="y",w=i.x+i.width/2-u.width/2,S=i.y+i.height/2-u.height/2,b=i[m]/2-u[m]/2;let x;switch(g){case"top":x={x:w,y:i.y-u.height};break;case"bottom":x={x:w,y:i.y+i.height};break;case"right":x={x:i.x+i.width,y:S};break;case"left":x={x:i.x-u.width,y:S};break;default:x={x:i.x,y:i.y}}const T=So(l);return T&&(x[h]+=b*(T==="end"?1:-1)*(o&&v?-1:1)),x}async function gE(a,l){var o;l===void 0&&(l={});const{x:i,y:u,platform:f,rects:h,elements:m,strategy:g}=a,{boundary:v="clippingAncestors",rootBoundary:w="viewport",elementContext:S="floating",altBoundary:b=!1,padding:x=0}=Qa(l,a),T=hb(x),E=m[b?S==="floating"?"reference":"floating":S],R=gc(await f.getClippingRect({element:(o=await(f.isElement==null?void 0:f.isElement(E)))==null||o?E:E.contextElement||await(f.getDocumentElement==null?void 0:f.getDocumentElement(m.floating)),boundary:v,rootBoundary:w,strategy:g})),A=S==="floating"?{x:i,y:u,width:h.floating.width,height:h.floating.height}:h.reference,N=await(f.getOffsetParent==null?void 0:f.getOffsetParent(m.floating)),O=await(f.isElement==null?void 0:f.isElement(N))&&await(f.getScale==null?void 0:f.getScale(N))||{x:1,y:1},H=gc(f.convertOffsetParentRelativeRectToViewportRelativeRect?await f.convertOffsetParentRelativeRectToViewportRelativeRect({elements:m,rect:A,offsetParent:N,strategy:g}):A);return{top:(R.top-H.top+T.top)/O.y,bottom:(H.bottom-R.bottom+T.bottom)/O.y,left:(R.left-H.left+T.left)/O.x,right:(H.right-R.right+T.right)/O.x}}const vE=50,yE=async(a,l,o)=>{const{placement:i="bottom",strategy:u="absolute",middleware:f=[],platform:h}=o,m=h.detectOverflow?h:{...h,detectOverflow:gE},g=await(h.isRTL==null?void 0:h.isRTL(l));let v=await h.getElementRects({reference:a,floating:l,strategy:u}),{x:w,y:S}=zy(v,i,g),b=i,x=0;const T={};for(let j=0;j<f.length;j++){const E=f[j];if(!E)continue;const{name:R,fn:A}=E,{x:N,y:O,data:H,reset:P}=await A({x:w,y:S,initialPlacement:i,placement:b,strategy:u,middlewareData:T,rects:v,platform:m,elements:{reference:a,floating:l}});w=N??w,S=O??S,T[R]={...T[R],...H},P&&x<vE&&(x++,typeof P=="object"&&(P.placement&&(b=P.placement),P.rects&&(v=P.rects===!0?await h.getElementRects({reference:a,floating:l,strategy:u}):P.rects),{x:w,y:S}=zy(v,b,g)),j=-1)}return{x:w,y:S,placement:b,strategy:u,middlewareData:T}},xE=a=>({name:"arrow",options:a,async fn(l){const{x:o,y:i,placement:u,rects:f,platform:h,elements:m,middlewareData:g}=l,{element:v,padding:w=0}=Qa(a,l)||{};if(v==null)return{};const S=hb(w),b={x:o,y:i},x=wh(u),T=Sh(x),j=await h.getDimensions(v),E=x==="y",R=E?"top":"left",A=E?"bottom":"right",N=E?"clientHeight":"clientWidth",O=f.reference[T]+f.reference[x]-b[x]-f.floating[T],H=b[x]-f.reference[x],P=await(h.getOffsetParent==null?void 0:h.getOffsetParent(v));let z=P?P[N]:0;(!z||!await(h.isElement==null?void 0:h.isElement(P)))&&(z=m.floating[N]||f.floating[T]);const U=O/2-H/2,ee=z/2-j[T]/2-1,se=Dl(S[R],ee),oe=Dl(S[A],ee),J=z-j[T]-oe,ie=z/2-j[T]/2+U,ce=fb(se,ie,J),me=!g.arrow&&So(u)!=null&&ie!==ce&&f.reference[T]/2-(ie<se?se:oe)-j[T]/2<0,L=me?ie<se?ie-se:ie-J:0;return{[x]:b[x]+L,data:{[x]:ce,centerOffset:ie-ce-L,...me&&{alignmentOffset:L}},reset:me}}}),bE=function(a){return a===void 0&&(a={}),{name:"flip",options:a,async fn(l){var o,i;const{placement:u,middlewareData:f,rects:h,initialPlacement:m,platform:g,elements:v}=l,{mainAxis:w=!0,crossAxis:S=!0,fallbackPlacements:b,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:T="none",flipAlignment:j=!0,...E}=Qa(a,l);if((o=f.arrow)!=null&&o.alignmentOffset)return{};const R=zl(u),A=sa(m),N=zl(m)===m,O=await(g.isRTL==null?void 0:g.isRTL(v.floating)),H=b||(N||!j?[pc(m)]:uE(m)),P=T!=="none";!b&&P&&H.push(...mE(m,j,T,O));const z=[m,...H],U=await g.detectOverflow(l,E),ee=[];let se=((i=f.flip)==null?void 0:i.overflows)||[];if(w&&ee.push(U[R]),S){const ce=cE(u,h,O);ee.push(U[ce[0]],U[ce[1]])}if(se=[...se,{placement:u,overflows:ee}],!ee.every(ce=>ce<=0)){var oe,J;const ce=(((oe=f.flip)==null?void 0:oe.index)||0)+1,me=z[ce];if(me&&(!(S==="alignment"?A!==sa(me):!1)||se.every(te=>sa(te.placement)===A?te.overflows[0]>0:!0)))return{data:{index:ce,overflows:se},reset:{placement:me}};let L=(J=se.filter(I=>I.overflows[0]<=0).sort((I,te)=>I.overflows[1]-te.overflows[1])[0])==null?void 0:J.placement;if(!L)switch(x){case"bestFit":{var ie;const I=(ie=se.filter(te=>{if(P){const W=sa(te.placement);return W===A||W==="y"}return!0}).map(te=>[te.placement,te.overflows.filter(W=>W>0).reduce((W,Z)=>W+Z,0)]).sort((te,W)=>te[1]-W[1])[0])==null?void 0:ie[0];I&&(L=I);break}case"initialPlacement":L=m;break}if(u!==L)return{reset:{placement:L}}}return{}}}};function ky(a,l){return{top:a.top-l.height,right:a.right-l.width,bottom:a.bottom-l.height,left:a.left-l.width}}function Ly(a){return iE.some(l=>a[l]>=0)}const SE=function(a){return a===void 0&&(a={}),{name:"hide",options:a,async fn(l){const{rects:o,platform:i}=l,{strategy:u="referenceHidden",...f}=Qa(a,l);switch(u){case"referenceHidden":{const h=await i.detectOverflow(l,{...f,elementContext:"reference"}),m=ky(h,o.reference);return{data:{referenceHiddenOffsets:m,referenceHidden:Ly(m)}}}case"escaped":{const h=await i.detectOverflow(l,{...f,altBoundary:!0}),m=ky(h,o.floating);return{data:{escapedOffsets:m,escaped:Ly(m)}}}default:return{}}}}},mb=new Set(["left","top"]);async function wE(a,l){const{placement:o,platform:i,elements:u}=a,f=await(i.isRTL==null?void 0:i.isRTL(u.floating)),h=zl(o),m=So(o),g=sa(o)==="y",v=mb.has(h)?-1:1,w=f&&g?-1:1,S=Qa(l,a);let{mainAxis:b,crossAxis:x,alignmentAxis:T}=typeof S=="number"?{mainAxis:S,crossAxis:0,alignmentAxis:null}:{mainAxis:S.mainAxis||0,crossAxis:S.crossAxis||0,alignmentAxis:S.alignmentAxis};return m&&typeof T=="number"&&(x=m==="end"?T*-1:T),g?{x:x*w,y:b*v}:{x:b*v,y:x*w}}const jE=function(a){return a===void 0&&(a=0),{name:"offset",options:a,async fn(l){var o,i;const{x:u,y:f,placement:h,middlewareData:m}=l,g=await wE(l,a);return h===((o=m.offset)==null?void 0:o.placement)&&(i=m.arrow)!=null&&i.alignmentOffset?{}:{x:u+g.x,y:f+g.y,data:{...g,placement:h}}}}},CE=function(a){return a===void 0&&(a={}),{name:"shift",options:a,async fn(l){const{x:o,y:i,placement:u,platform:f}=l,{mainAxis:h=!0,crossAxis:m=!1,limiter:g={fn:A=>{let{x:N,y:O}=A;return{x:N,y:O}}},...v}=Qa(a,l),w={x:o,y:i},S=await f.detectOverflow(l,v),b=sa(u),x=bh(b);let T=w[x],j=w[b];const E=(A,N)=>fb(N+S[A==="y"?"top":"left"],N,N-S[A==="y"?"bottom":"right"]);h&&(T=E(x,T)),m&&(j=E(b,j));const R=g.fn({...l,[x]:T,[b]:j});return{...R,data:{x:R.x-o,y:R.y-i,enabled:{[x]:h,[b]:m}}}}}},EE=function(a){return a===void 0&&(a={}),{options:a,fn(l){var o,i;const{x:u,y:f,placement:h,rects:m,middlewareData:g}=l,{offset:v=0,mainAxis:w=!0,crossAxis:S=!0}=Qa(a,l),b={x:u,y:f},x=sa(h),T=bh(x);let j=b[T],E=b[x];const R=Qa(v,l),A=typeof R=="number"?{mainAxis:R,crossAxis:0}:{mainAxis:(o=R.mainAxis)!=null?o:0,crossAxis:(i=R.crossAxis)!=null?i:0};if(w){const H=T==="y"?"height":"width",P=m.reference[T]-m.floating[H]+A.mainAxis,z=m.reference[T]+m.reference[H]-A.mainAxis;j<P?j=P:j>z&&(j=z)}if(S){var N,O;const H=T==="y"?"width":"height",P=mb.has(zl(h)),z=m.reference[x]-m.floating[H]+(P&&((N=g.offset)==null?void 0:N[x])||0)+(P?0:A.crossAxis),U=m.reference[x]+m.reference[H]+(P?0:((O=g.offset)==null?void 0:O[x])||0)-(P?A.crossAxis:0);E<z?E=z:E>U&&(E=U)}return{[T]:j,[x]:E}}}},RE=function(a){return a===void 0&&(a={}),{name:"size",options:a,async fn(l){const{placement:o,rects:i,platform:u,elements:f}=l,{apply:h=()=>{},...m}=Qa(a,l),g=await u.detectOverflow(l,m),v=zl(o),w=So(o),S=sa(o)==="y",{width:b,height:x}=i.floating;let T,j;v==="top"||v==="bottom"?(T=v,j=w===(await(u.isRTL==null?void 0:u.isRTL(f.floating))?"start":"end")?"left":"right"):(j=v,T=w==="end"?"top":"bottom");const E=x-g.top-g.bottom,R=b-g.left-g.right,A=Dl(x-g[T],E),N=Dl(b-g[j],R),O=l.middlewareData.shift,H=!O;let P=A,z=N;O!=null&&O.enabled.x&&(z=R),O!=null&&O.enabled.y&&(P=E),H&&!w&&(S?z=b-2*Va(g.left,g.right):P=x-2*Va(g.top,g.bottom)),await h({...l,availableWidth:z,availableHeight:P});const U=await u.getDimensions(f.floating);return b!==U.width||x!==U.height?{reset:{rects:!0}}:{}}}};function Ec(){return typeof window<"u"}function wo(a){return pb(a)?(a.nodeName||"").toLowerCase():"#document"}function rn(a){var l;return(a==null||(l=a.ownerDocument)==null?void 0:l.defaultView)||window}function Ja(a){var l;return(l=(pb(a)?a.ownerDocument:a.document)||window.document)==null?void 0:l.documentElement}function pb(a){return Ec()?a instanceof Node||a instanceof rn(a).Node:!1}function ma(a){return Ec()?a instanceof Element||a instanceof rn(a).Element:!1}function Ll(a){return Ec()?a instanceof HTMLElement||a instanceof rn(a).HTMLElement:!1}function Uy(a){return!Ec()||typeof ShadowRoot>"u"?!1:a instanceof ShadowRoot||a instanceof rn(a).ShadowRoot}function Rc(a){const{overflow:l,overflowX:o,overflowY:i,display:u}=pa(a);return/auto|scroll|overlay|hidden|clip/.test(l+i+o)&&u!=="inline"&&u!=="contents"}function TE(a){return/^(table|td|th)$/.test(wo(a))}function Tc(a){try{if(a.matches(":popover-open"))return!0}catch{}try{return a.matches(":modal")}catch{return!1}}const NE=/transform|translate|scale|rotate|perspective|filter/,AE=/paint|layout|strict|content/,lr=a=>!!a&&a!=="none";let xf;function jh(a){const l=ma(a)?pa(a):a;return lr(l.transform)||lr(l.translate)||lr(l.scale)||lr(l.rotate)||lr(l.perspective)||!Ch()&&(lr(l.backdropFilter)||lr(l.filter))||NE.test(l.willChange||"")||AE.test(l.contain||"")}function ME(a){let l=or(a);for(;Ll(l)&&!ji(l);){if(jh(l))return l;if(Tc(l))return null;l=or(l)}return null}function Ch(){return xf==null&&(xf=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),xf}function ji(a){return/^(html|body|#document)$/.test(wo(a))}function pa(a){return rn(a).getComputedStyle(a)}function Nc(a){return ma(a)?{scrollLeft:a.scrollLeft,scrollTop:a.scrollTop}:{scrollLeft:a.scrollX,scrollTop:a.scrollY}}function or(a){if(wo(a)==="html")return a;const l=a.assignedSlot||a.parentNode||Uy(a)&&a.host||Ja(a);return Uy(l)?l.host:l}function gb(a){const l=or(a);return ji(l)?(a.ownerDocument||a).body:Ll(l)&&Rc(l)?l:gb(l)}function Ci(a,l,o){var i;l===void 0&&(l=[]),o===void 0&&(o=!0);const u=gb(a),f=u===((i=a.ownerDocument)==null?void 0:i.body),h=rn(u);if(f){const m=Yf(h);return l.concat(h,h.visualViewport||[],Rc(u)?u:[],m&&o?Ci(m):[])}else return l.concat(u,Ci(u,[],o))}function Yf(a){return a.parent&&Object.getPrototypeOf(a.parent)?a.frameElement:null}function vb(a){const l=pa(a);let o=parseFloat(l.width)||0,i=parseFloat(l.height)||0;const u=Ll(a),f=u?a.offsetWidth:o,h=u?a.offsetHeight:i,m=mc(o)!==f||mc(i)!==h;return m&&(o=f,i=h),{width:o,height:i,$:m}}function Eh(a){return ma(a)?a:a.contextElement}function co(a){const l=Eh(a);if(!Ll(l))return Ya(1);const o=l.getBoundingClientRect(),{width:i,height:u,$:f}=vb(l);let h=(f?mc(o.width):o.width)/i,m=(f?mc(o.height):o.height)/u;return(!h||!Number.isFinite(h))&&(h=1),(!m||!Number.isFinite(m))&&(m=1),{x:h,y:m}}const _E=Ya(0);function yb(a){const l=rn(a);return!Ch()||!l.visualViewport?_E:{x:l.visualViewport.offsetLeft,y:l.visualViewport.offsetTop}}function OE(a,l,o){return l===void 0&&(l=!1),!!o&&l&&o===rn(a)}function ir(a,l,o,i){l===void 0&&(l=!1),o===void 0&&(o=!1);const u=a.getBoundingClientRect(),f=Eh(a);let h=Ya(1);l&&(i?ma(i)&&(h=co(i)):h=co(a));const m=OE(f,o,i)?yb(f):Ya(0);let g=(u.left+m.x)/h.x,v=(u.top+m.y)/h.y,w=u.width/h.x,S=u.height/h.y;if(f&&i){const b=rn(f),x=ma(i)?rn(i):i;let T=b,j=Yf(T);for(;j&&x!==T;){const E=co(j),R=j.getBoundingClientRect(),A=pa(j),N=R.left+(j.clientLeft+parseFloat(A.paddingLeft))*E.x,O=R.top+(j.clientTop+parseFloat(A.paddingTop))*E.y;g*=E.x,v*=E.y,w*=E.x,S*=E.y,g+=N,v+=O,T=rn(j),j=Yf(T)}}return gc({width:w,height:S,x:g,y:v})}function Ac(a,l){const o=Nc(a).scrollLeft;return l?l.left+o:ir(Ja(a)).left+o}function xb(a,l){const o=a.getBoundingClientRect(),i=o.left+l.scrollLeft-Ac(a,o),u=o.top+l.scrollTop;return{x:i,y:u}}function DE(a){let{elements:l,rect:o,offsetParent:i,strategy:u}=a;const f=u==="fixed",h=Ja(i),m=l?Tc(l.floating):!1;if(i===h||m&&f)return o;let g={scrollLeft:0,scrollTop:0},v=Ya(1);const w=Ya(0),S=Ll(i);if((S||!f)&&((wo(i)!=="body"||Rc(h))&&(g=Nc(i)),S)){const x=ir(i);v=co(i),w.x=x.x+i.clientLeft,w.y=x.y+i.clientTop}const b=h&&!S&&!f?xb(h,g):Ya(0);return{width:o.width*v.x,height:o.height*v.y,x:o.x*v.x-g.scrollLeft*v.x+w.x+b.x,y:o.y*v.y-g.scrollTop*v.y+w.y+b.y}}function zE(a){return a.getClientRects?Array.from(a.getClientRects()):[]}function kE(a){const l=Nc(a),o=a.ownerDocument.body,i=Va(a.scrollWidth,a.clientWidth,o.scrollWidth,o.clientWidth),u=Va(a.scrollHeight,a.clientHeight,o.scrollHeight,o.clientHeight);let f=-l.scrollLeft+Ac(a);const h=-l.scrollTop;return pa(o).direction==="rtl"&&(f+=Va(a.clientWidth,o.clientWidth)-i),{width:i,height:u,x:f,y:h}}const LE=25;function UE(a,l,o){o===void 0&&(o="viewport");const i=o==="layoutViewport",u=rn(a),f=Ja(a),h=u.visualViewport;let m=f.clientWidth,g=f.clientHeight,v=0,w=0;if(h){const b=!Ch()||l==="fixed";i?b||(v=-h.offsetLeft,w=-h.offsetTop):(m=h.width,g=h.height,b&&(v=h.offsetLeft,w=h.offsetTop))}if(Ac(f)<=0){const b=f.ownerDocument,x=b.body,T=getComputedStyle(x),j=b.compatMode==="CSS1Compat"&&parseFloat(T.marginLeft)+parseFloat(T.marginRight)||0,E=Math.abs(f.clientWidth-x.clientWidth-j),R=getComputedStyle(f).scrollbarGutter==="stable both-edges"?E/2:E;R<=LE&&(m-=R)}return{width:m,height:g,x:v,y:w}}function HE(a,l){const o=ir(a,!0,l==="fixed"),i=o.top+a.clientTop,u=o.left+a.clientLeft,f=co(a),h=a.clientWidth*f.x,m=a.clientHeight*f.y,g=u*f.x,v=i*f.y;return{width:h,height:m,x:g,y:v}}function Hy(a,l,o){let i;if(l==="viewport"||l==="layoutViewport")i=UE(a,o,l);else if(l==="document")i=kE(Ja(a));else if(ma(l))i=HE(l,o);else{const u=yb(a);i={x:l.x-u.x,y:l.y-u.y,width:l.width,height:l.height}}return gc(i)}function BE(a,l){const o=l.get(a);if(o)return o;let i=Ci(a,[],!1).filter(m=>ma(m)&&wo(m)!=="body"),u=null;const f=pa(a).position==="fixed";let h=f?or(a):a;for(;ma(h)&&!ji(h);){const m=pa(h),g=jh(h),v=u?u.position:f?"fixed":"";!g&&(v==="fixed"||v==="absolute"&&m.position==="static")?i=i.filter(S=>S!==h):u=m,h=or(h)}return l.set(a,i),i}function PE(a){let{element:l,boundary:o,rootBoundary:i,strategy:u}=a;const h=[...o==="clippingAncestors"?Tc(l)?[]:BE(l,this._c):[].concat(o),i],m=Hy(l,h[0],u);let g=m.top,v=m.right,w=m.bottom,S=m.left;for(let b=1;b<h.length;b++){const x=Hy(l,h[b],u);g=Va(x.top,g),v=Dl(x.right,v),w=Dl(x.bottom,w),S=Va(x.left,S)}return{width:v-S,height:w-g,x:S,y:g}}function qE(a){const{width:l,height:o}=vb(a);return{width:l,height:o}}function VE(a,l,o){const i=Ll(l),u=Ja(l),f=o==="fixed",h=ir(a,!0,f,l);let m={scrollLeft:0,scrollTop:0};const g=Ya(0);if((i||!f)&&((wo(l)!=="body"||Rc(u))&&(m=Nc(l)),i)){const b=ir(l,!0,f,l);g.x=b.x+l.clientLeft,g.y=b.y+l.clientTop}!i&&u&&(g.x=Ac(u));const v=u&&!i&&!f?xb(u,m):Ya(0),w=h.left+m.scrollLeft-g.x-v.x,S=h.top+m.scrollTop-g.y-v.y;return{x:w,y:S,width:h.width,height:h.height}}function bf(a){return pa(a).position==="static"}function By(a,l){if(!Ll(a)||pa(a).position==="fixed")return null;if(l)return l(a);let o=a.offsetParent;return Ja(a)===o&&(o=o.ownerDocument.body),o}function bb(a,l){const o=rn(a);if(Tc(a))return o;if(!Ll(a)){let u=or(a);for(;u&&!ji(u);){if(ma(u)&&!bf(u))return u;u=or(u)}return o}let i=By(a,l);for(;i&&TE(i)&&bf(i);)i=By(i,l);return i&&ji(i)&&bf(i)&&!jh(i)?o:i||ME(a)||o}const YE=async function(a){const l=this.getOffsetParent||bb,o=this.getDimensions,i=await o(a.floating);return{reference:VE(a.reference,await l(a.floating),a.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function GE(a){return pa(a).direction==="rtl"}const IE={convertOffsetParentRelativeRectToViewportRelativeRect:DE,getDocumentElement:Ja,getClippingRect:PE,getOffsetParent:bb,getElementRects:YE,getClientRects:zE,getDimensions:qE,getScale:co,isElement:ma,isRTL:GE};function Sb(a,l){return a.x===l.x&&a.y===l.y&&a.width===l.width&&a.height===l.height}function $E(a,l,o){let i=null,u;const f=Ja(a);function h(){var w;clearTimeout(u),(w=i)==null||w.disconnect(),i=null}function m(w,S){w===void 0&&(w=!1),S===void 0&&(S=1),h();const b=a.getBoundingClientRect(),{left:x,top:T,width:j,height:E}=b;if(w||l(),!j||!E)return;const R=Ws(T),A=Ws(f.clientWidth-(x+j)),N=Ws(f.clientHeight-(T+E)),O=Ws(x),P={rootMargin:-R+"px "+-A+"px "+-N+"px "+-O+"px",threshold:Va(0,Dl(1,S))||1};let z=!0;function U(ee){const se=ee[0].intersectionRatio;if(!Sb(b,a.getBoundingClientRect()))return m();if(se!==S){if(!z)return m();se?m(!1,se):u=setTimeout(()=>{m(!1,1e-7)},1e3)}z=!1}try{i=new IntersectionObserver(U,{...P,root:f.ownerDocument})}catch{i=new IntersectionObserver(U,P)}i.observe(a)}const g=rn(a),v=()=>m(o);return g.addEventListener("resize",v),m(!0),()=>{g.removeEventListener("resize",v),h()}}function KE(a,l,o,i){i===void 0&&(i={});const{ancestorScroll:u=!0,ancestorResize:f=!0,elementResize:h=typeof ResizeObserver=="function",layoutShift:m=typeof IntersectionObserver=="function",animationFrame:g=!1}=i,v=Eh(a),w=u||f?[...v?Ci(v):[],...l?Ci(l):[]]:[];w.forEach(R=>{u&&R.addEventListener("scroll",o),f&&R.addEventListener("resize",o)});const S=v&&m?$E(v,o,f):null;let b=-1,x=null;h&&(x=new ResizeObserver(R=>{let[A]=R;A&&A.target===v&&x&&l&&(x.unobserve(l),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var N;(N=x)==null||N.observe(l)})),o()}),v&&!g&&x.observe(v),l&&x.observe(l));let T,j=g?ir(a):null;g&&E();function E(){const R=ir(a);j&&!Sb(j,R)&&o(),j=R,T=requestAnimationFrame(E)}return o(),()=>{var R;w.forEach(A=>{u&&A.removeEventListener("scroll",o),f&&A.removeEventListener("resize",o)}),S==null||S(),(R=x)==null||R.disconnect(),x=null,g&&cancelAnimationFrame(T)}}const XE=jE,QE=CE,ZE=bE,FE=RE,JE=SE,Py=xE,WE=EE,eR=(a,l,o)=>{const i=new Map,u=o??{},f={...IE,...u.platform,_c:i};return yE(a,l,{...u,platform:f})};var tR=typeof document<"u",nR=function(){},cc=tR?p.useLayoutEffect:nR;function vc(a,l){if(a===l)return!0;if(typeof a!=typeof l)return!1;if(typeof a=="function"&&a.toString()===l.toString())return!0;let o,i,u;if(a&&l&&typeof a=="object"){if(Array.isArray(a)){if(o=a.length,o!==l.length)return!1;for(i=o;i--!==0;)if(!vc(a[i],l[i]))return!1;return!0}if(u=Object.keys(a),o=u.length,o!==Object.keys(l).length)return!1;for(i=o;i--!==0;)if(!{}.hasOwnProperty.call(l,u[i]))return!1;for(i=o;i--!==0;){const f=u[i];if(!(f==="_owner"&&a.$$typeof)&&!vc(a[f],l[f]))return!1}return!0}return a!==a&&l!==l}function wb(a){return typeof window>"u"?1:(a.ownerDocument.defaultView||window).devicePixelRatio||1}function qy(a,l){const o=wb(a);return Math.round(l*o)/o}function Sf(a){const l=p.useRef(a);return cc(()=>{l.current=a}),l}function aR(a){a===void 0&&(a={});const{placement:l="bottom",strategy:o="absolute",middleware:i=[],platform:u,elements:{reference:f,floating:h}={},transform:m=!0,whileElementsMounted:g,open:v}=a,[w,S]=p.useState({x:0,y:0,strategy:o,placement:l,middlewareData:{},isPositioned:!1}),[b,x]=p.useState(i);vc(b,i)||x(i);const[T,j]=p.useState(null),[E,R]=p.useState(null),A=p.useCallback(te=>{te!==P.current&&(P.current=te,j(te))},[]),N=p.useCallback(te=>{te!==z.current&&(z.current=te,R(te))},[]),O=f||T,H=h||E,P=p.useRef(null),z=p.useRef(null),U=p.useRef(w),ee=g!=null,se=Sf(g),oe=Sf(u),J=Sf(v),ie=p.useCallback(()=>{if(!P.current||!z.current)return;const te={placement:l,strategy:o,middleware:b};oe.current&&(te.platform=oe.current),eR(P.current,z.current,te).then(W=>{const Z={...W,isPositioned:J.current!==!1};ce.current&&!vc(U.current,Z)&&(U.current=Z,yo.flushSync(()=>{S(Z)}))})},[b,l,o,oe,J]);cc(()=>{v===!1&&U.current.isPositioned&&(U.current.isPositioned=!1,S(te=>({...te,isPositioned:!1})))},[v]);const ce=p.useRef(!1);cc(()=>(ce.current=!0,()=>{ce.current=!1}),[]),cc(()=>{if(O&&(P.current=O),H&&(z.current=H),O&&H){if(se.current)return se.current(O,H,ie);ie()}},[O,H,ie,se,ee]);const me=p.useMemo(()=>({reference:P,floating:z,setReference:A,setFloating:N}),[A,N]),L=p.useMemo(()=>({reference:O,floating:H}),[O,H]),I=p.useMemo(()=>{const te={position:o,left:0,top:0};if(!L.floating)return te;const W=qy(L.floating,w.x),Z=qy(L.floating,w.y);return m?{...te,transform:"translate("+W+"px, "+Z+"px)",...wb(L.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:W,top:Z}},[o,m,L.floating,w.x,w.y]);return p.useMemo(()=>({...w,update:ie,refs:me,elements:L,floatingStyles:I}),[w,ie,me,L,I])}const lR=a=>{function l(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:a,fn(o){const{element:i,padding:u}=typeof a=="function"?a(o):a;return i&&l(i)?i.current!=null?Py({element:i.current,padding:u}).fn(o):{}:i?Py({element:i,padding:u}).fn(o):{}}}},rR=(a,l)=>{const o=XE(a);return{name:o.name,fn:o.fn,options:[a,l]}},oR=(a,l)=>{const o=QE(a);return{name:o.name,fn:o.fn,options:[a,l]}},iR=(a,l)=>({fn:WE(a).fn,options:[a,l]}),sR=(a,l)=>{const o=ZE(a);return{name:o.name,fn:o.fn,options:[a,l]}},cR=(a,l)=>{const o=FE(a);return{name:o.name,fn:o.fn,options:[a,l]}},uR=(a,l)=>{const o=JE(a);return{name:o.name,fn:o.fn,options:[a,l]}},dR=(a,l)=>{const o=lR(a);return{name:o.name,fn:o.fn,options:[a,l]}};var fR=Object.defineProperty,hR=(a,l)=>fR(a,"name",{value:l,configurable:!0});function Mc(a){const[l,o]=p.useState(void 0);return Tt(()=>{if(a){o({width:a.offsetWidth,height:a.offsetHeight});const i=new ResizeObserver(u=>{if(!Array.isArray(u)||!u.length)return;const f=u[0];let h,m;if("borderBoxSize"in f){const g=f.borderBoxSize,v=Array.isArray(g)?g[0]:g;h=v.inlineSize,m=v.blockSize}else h=a.offsetWidth,m=a.offsetHeight;o({width:h,height:m})});return i.observe(a,{box:"border-box"}),()=>i.unobserve(a)}else o(void 0)},[a]),l}hR(Mc,"useSize");var mR=Object.defineProperty,_l=(a,l)=>mR(a,"name",{value:l,configurable:!0}),jb="Popper",[Cb,jo]=cn(jb),[pR,Eb]=Cb(jb),gR=_l(a=>{const{__scopePopper:l,children:o}=a,[i,u]=p.useState(null),[f,h]=p.useState(void 0);return s.jsx(pR,{scope:l,anchor:i,onAnchorChange:u,placementState:f,setPlacementState:h,children:o})},"Popper"),vR="PopperAnchor",yR=p.forwardRef(_l(function(l,o){const{__scopePopper:i,virtualRef:u,...f}=l,h=Eb(vR,i),m=p.useRef(null),g=h.onAnchorChange,v=p.useCallback(j=>{m.current=j,j&&g(j)},[g]),w=Pe(o,v),S=p.useRef(null);p.useEffect(()=>{if(!u)return;const j=S.current;S.current=u.current,j!==S.current&&g(S.current)});const b=h.placementState&&_c(h.placementState),x=b==null?void 0:b[0],T=b==null?void 0:b[1];return u?null:s.jsx(Le.div,{"data-radix-popper-side":x,"data-radix-popper-align":T,...f,ref:w})},"PopperAnchor")),Rb="PopperContent",[xR,E_]=Cb(Rb),bR=p.forwardRef(_l(function(l,o){var fe,De,_e,Oe,qe,yt,Ht;const{__scopePopper:i,side:u="bottom",sideOffset:f=0,align:h="center",alignOffset:m=0,arrowPadding:g=0,avoidCollisions:v=!0,collisionBoundary:w=[],collisionPadding:S=0,sticky:b="partial",hideWhenDetached:x=!1,updatePositionStrategy:T="optimized",onPlaced:j,...E}=l,R=Eb(Rb,i),[A,N]=p.useState(null),O=Pe(o,N),[H,P]=p.useState(null),z=Mc(H),U=(z==null?void 0:z.width)??0,ee=(z==null?void 0:z.height)??0,se=u+(h!=="center"?"-"+h:""),oe=typeof S=="number"?S:{top:0,right:0,bottom:0,left:0,...S},J=Array.isArray(w)?w:[w],ie=J.length>0,ce={padding:oe,boundary:J.filter(Tb),altBoundary:ie},{refs:me,floatingStyles:L,placement:I,isPositioned:te,middlewareData:W}=aR({strategy:"fixed",placement:se,whileElementsMounted:_l((...Kt)=>KE(...Kt,{animationFrame:T==="always"}),"whileElementsMounted"),elements:{reference:R.anchor},middleware:[rR({mainAxis:f+ee,alignmentAxis:m}),v&&oR({mainAxis:!0,crossAxis:!1,limiter:b==="partial"?iR():void 0,...ce}),v&&sR({...ce}),cR({...ce,apply:_l(({elements:Kt,rects:Wn,availableWidth:jn,availableHeight:Hl})=>{const{width:nl,height:Bn}=Wn.reference,ya=Kt.floating.style;ya.setProperty("--radix-popper-available-width",`${jn}px`),ya.setProperty("--radix-popper-available-height",`${Hl}px`),ya.setProperty("--radix-popper-anchor-width",`${nl}px`),ya.setProperty("--radix-popper-anchor-height",`${Bn}px`)},"apply")}),H&&dR({element:H,padding:g}),SR({arrowWidth:U,arrowHeight:ee}),x&&uR({strategy:"referenceHidden",...ce,boundary:ie?ce.boundary:void 0})]}),Z=R.setPlacementState;Tt(()=>(Z(I),()=>{Z(void 0)}),[I,Z]);const[M,B]=_c(I),$=Hn(j);Tt(()=>{te&&($==null||$())},[te,$]);const ne=(fe=W.arrow)==null?void 0:fe.x,ue=(De=W.arrow)==null?void 0:De.y,X=((_e=W.arrow)==null?void 0:_e.centerOffset)!==0,[ae,le]=p.useState();return Tt(()=>{A&&le(window.getComputedStyle(A).zIndex)},[A]),s.jsx("div",{ref:me.setFloating,"data-radix-popper-content-wrapper":"",style:{...L,transform:te?L.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ae,"--radix-popper-transform-origin":[(Oe=W.transformOrigin)==null?void 0:Oe.x,(qe=W.transformOrigin)==null?void 0:qe.y].join(" "),...((yt=W.hide)==null?void 0:yt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:l.dir,children:s.jsx(xR,{scope:i,placedSide:M,placedAlign:B,onArrowChange:P,arrowX:ne,arrowY:ue,shouldHideArrow:X,children:s.jsx(Le.div,{"data-side":M,"data-align":B,...E,ref:O,style:{...E.style,animation:te?(Ht=E.style)==null?void 0:Ht.animation:"none"}})})})},"PopperContent"));function Tb(a){return a!==null}_l(Tb,"isNotNull");var SR=_l(a=>({name:"transformOrigin",options:a,fn(l){var E,R,A;const{placement:o,rects:i,middlewareData:u}=l,h=((E=u.arrow)==null?void 0:E.centerOffset)!==0,m=h?0:a.arrowWidth,g=h?0:a.arrowHeight,[v,w]=_c(o),S={start:"0%",center:"50%",end:"100%"}[w],b=(((R=u.arrow)==null?void 0:R.x)??0)+m/2,x=(((A=u.arrow)==null?void 0:A.y)??0)+g/2;let T="",j="";return v==="bottom"?(T=h?S:`${b}px`,j=`${-g}px`):v==="top"?(T=h?S:`${b}px`,j=`${i.floating.height+g}px`):v==="right"?(T=`${-g}px`,j=h?S:`${x}px`):v==="left"&&(T=`${i.floating.width+g}px`,j=h?S:`${x}px`),{data:{x:T,y:j}}}}),"transformOrigin");function _c(a){const[l,o="center"]=a.split("-");return[l,o]}_l(_c,"getSideAndAlignFromPlacement");var Nb=gR,Ab=yR,Rh=bR,wR=Object.defineProperty,jR=(a,l)=>wR(a,"name",{value:l,configurable:!0}),Th=p.forwardRef(jR(function(l,o){var g;const{container:i,...u}=l,[f,h]=p.useState(!1);Tt(()=>h(!0),[]);const m=i||f&&((g=globalThis==null?void 0:globalThis.document)==null?void 0:g.body);return m?yo.createPortal(s.jsx(Le.div,{...u,ref:o}),m):null},"Portal")),CR=Object.defineProperty,Za=(a,l)=>CR(a,"name",{value:l,configurable:!0});function Mb(a,l){return p.useReducer((o,i)=>l[o][i]??o,a)}Za(Mb,"useStateMachine");var Wa=Za(a=>{const{present:l,children:o}=a,i=_b(l),u=typeof o=="function"?o({present:i.isPresent}):p.Children.only(o),f=Ob(i.ref,Db(u));return typeof o=="function"||i.isPresent?p.cloneElement(u,{ref:f}):null},"Presence");function _b(a){const[l,o]=p.useState(),i=p.useRef(null),u=p.useRef(a),f=p.useRef("none"),h=p.useRef(void 0),m=a?"mounted":"unmounted",[g,v]=Mb(m,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{g==="mounted"?(f.current=h.current??ro(i.current),h.current=void 0):f.current="none"},[g]),Tt(()=>{const w=i.current,S=u.current;if(S!==a){const x=f.current,T=ro(w);a?(h.current=T,v("MOUNT")):T==="none"||(w==null?void 0:w.display)==="none"?v("UNMOUNT"):v(S&&x!==T?"ANIMATION_OUT":"UNMOUNT"),u.current=a}},[a,v]),Tt(()=>{if(l){let w;const S=l.ownerDocument.defaultView??window,b=Za(T=>{const E=ro(i.current).includes(CSS.escape(T.animationName));if(T.target===l&&E&&(v("ANIMATION_END"),!u.current)){const R=l.style.animationFillMode;l.style.animationFillMode="forwards",w=S.setTimeout(()=>{l.style.animationFillMode==="forwards"&&(l.style.animationFillMode=R)})}},"handleAnimationEnd"),x=Za(T=>{T.target===l&&(f.current=ro(i.current))},"handleAnimationStart");return l.addEventListener("animationstart",x),l.addEventListener("animationcancel",b),l.addEventListener("animationend",b),()=>{S.clearTimeout(w),l.removeEventListener("animationstart",x),l.removeEventListener("animationcancel",b),l.removeEventListener("animationend",b)}}else v("ANIMATION_END")},[l,v]),{isPresent:["mounted","unmountSuspended"].includes(g),ref:p.useCallback(w=>{if(w){const S=getComputedStyle(w);i.current=S,h.current=ro(S)}else i.current=null;o(w)},[])}}Za(_b,"usePresence");function Gf(a,l){if(typeof a=="function")return a(l);a!=null&&(a.current=l)}Za(Gf,"setRef");function Ob(...a){const l=p.useRef(a);return l.current=a,p.useCallback(o=>{const i=l.current;let u=!1;const f=i.map(h=>{const m=Gf(h,o);return!u&&typeof m=="function"&&(u=!0),m});if(u)return()=>{for(let h=0;h<f.length;h++){const m=f[h];typeof m=="function"?m():Gf(i[h],null)}}},[])}Za(Ob,"useStableComposedRefs");function ro(a){return(a==null?void 0:a.animationName)||"none"}Za(ro,"getAnimationName");function Db(a){var i,u;let l=(i=Object.getOwnPropertyDescriptor(a.props,"ref"))==null?void 0:i.get,o=l&&"isReactWarning"in l&&l.isReactWarning;return o?a.ref:(l=(u=Object.getOwnPropertyDescriptor(a,"ref"))==null?void 0:u.get,o=l&&"isReactWarning"in l&&l.isReactWarning,o?a.props.ref:a.props.ref||a.ref)}Za(Db,"getElementRef");var ER=Object.defineProperty,Nh=(a,l)=>ER(a,"name",{value:l,configurable:!0}),wf=!1;function zb(){const[a,l]=p.useState(wf);return p.useEffect(()=>{wf||(wf=!0,l(!0))},[]),a}Nh(zb,"useIsHydrated");var kb=ho[" useSyncExternalStore ".trim().toString()];function Lb(){return()=>{}}Nh(Lb,"subscribe");function Ub(){return kb(Lb,()=>!0,()=>!1)}Nh(Ub,"useIsHydratedModern");var RR=typeof kb=="function"?Ub:zb,TR=Object.defineProperty,ur=(a,l)=>TR(a,"name",{value:l,configurable:!0}),jf="rovingFocusGroup.onEntryFocus",NR={bubbles:!1,cancelable:!0},Oc="RovingFocusGroup",[If,Hb,AR]=jc(Oc),[MR,Dc]=cn(Oc,[AR]),[_R,OR]=MR(Oc),DR=p.forwardRef(ur(function(l,o){return s.jsx(If.Provider,{scope:l.__scopeRovingFocusGroup,children:s.jsx(If.Slot,{scope:l.__scopeRovingFocusGroup,children:s.jsx(zR,{...l,ref:o})})})},"RovingFocusGroup")),zR=p.forwardRef(ur(function(l,o){const{__scopeRovingFocusGroup:i,orientation:u,loop:f=!1,dir:h,currentTabStopId:m,defaultCurrentTabStopId:g,onCurrentTabStopIdChange:v,onEntryFocus:w,preventScrollOnEntryFocus:S=!1,...b}=l,x=p.useRef(null),T=Pe(o,x),j=_i(h),[E,R]=Xa({prop:m,defaultProp:g??null,onChange:v,caller:Oc}),[A,N]=p.useState(!1),O=Hn(w),H=Hb(i),P=p.useRef(!1),[z,U]=p.useState(0);return p.useEffect(()=>{const ee=x.current;if(ee)return ee.addEventListener(jf,O),()=>ee.removeEventListener(jf,O)},[O]),s.jsx(_R,{scope:i,orientation:u,dir:j,loop:f,currentTabStopId:E,onItemFocus:p.useCallback(ee=>R(ee),[R]),onItemShiftTab:p.useCallback(()=>N(!0),[]),onFocusableItemAdd:p.useCallback(()=>U(ee=>ee+1),[]),onFocusableItemRemove:p.useCallback(()=>U(ee=>ee-1),[]),children:s.jsx(Le.div,{tabIndex:A||z===0?-1:0,"data-orientation":u,...b,ref:T,style:{outline:"none",...l.style},onMouseDown:xe(l.onMouseDown,()=>{P.current=!0}),onFocus:xe(l.onFocus,ee=>{const se=!P.current;if(ee.target===ee.currentTarget&&se&&!A){const oe=new CustomEvent(jf,NR);if(ee.currentTarget.dispatchEvent(oe),!oe.defaultPrevented){const J=H().filter(I=>I.focusable),ie=J.find(I=>I.active),ce=J.find(I=>I.id===E),L=[ie,ce,...J].filter(Boolean).map(I=>I.ref.current);Ah(L,S)}}P.current=!1}),onBlur:xe(l.onBlur,()=>N(!1))})})},"RovingFocusGroupImpl")),kR="RovingFocusGroupItem",LR=p.forwardRef(ur(function(l,o){const{__scopeRovingFocusGroup:i,focusable:u=!0,active:f=!1,tabStopId:h,children:m,...g}=l,v=ca(),w=h||v,S=OR(kR,i),b=S.currentTabStopId===w,x=Hb(i),{onFocusableItemAdd:T,onFocusableItemRemove:j,currentTabStopId:E}=S,R=RR();return Tt(()=>{if(!(!R||!u))return T(),()=>j()},[R,u,T,j]),p.useEffect(()=>{if(!(R||!u))return T(),()=>j()},[R,u,T,j]),s.jsx(If.ItemSlot,{scope:i,id:w,focusable:u,active:f,children:s.jsx(Le.span,{tabIndex:b?0:-1,"data-orientation":S.orientation,...g,ref:o,onMouseDown:xe(l.onMouseDown,A=>{u?S.onItemFocus(w):A.preventDefault()}),onFocus:xe(l.onFocus,()=>S.onItemFocus(w)),onKeyDown:xe(l.onKeyDown,A=>{if(A.key==="Tab"&&A.shiftKey){S.onItemShiftTab();return}if(A.target!==A.currentTarget)return;const N=Pb(A,S.orientation,S.dir);if(N!==void 0){if(A.metaKey||A.ctrlKey||A.altKey||A.shiftKey)return;A.preventDefault();let H=x().filter(P=>P.focusable).map(P=>P.ref.current);if(N==="last")H.reverse();else if(N==="prev"||N==="next"){N==="prev"&&H.reverse();const P=H.indexOf(A.currentTarget);H=S.loop?qb(H,P+1):H.slice(P+1)}setTimeout(()=>Ah(H))}}),children:typeof m=="function"?m({isCurrentTabStop:b,hasTabStop:E!=null}):m})})},"RovingFocusGroupItem")),UR={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Bb(a,l){return l!=="rtl"?a:a==="ArrowLeft"?"ArrowRight":a==="ArrowRight"?"ArrowLeft":a}ur(Bb,"getDirectionAwareKey");function Pb(a,l,o){const i=Bb(a.key,o);if(!(l==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(l==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return UR[i]}ur(Pb,"getFocusIntent");function Ah(a,l=!1){const o=document.activeElement;for(const i of a)if(i===o||(i.focus({preventScroll:l}),document.activeElement!==o))return}ur(Ah,"focusFirst");function qb(a,l){return a.map((o,i)=>a[(l+i)%a.length])}ur(qb,"wrapArray");var Vb=DR,Yb=LR,HR=function(a){if(typeof document>"u")return null;var l=Array.isArray(a)?a[0]:a;return l.ownerDocument.body},no=new WeakMap,ec=new WeakMap,tc={},Cf=0,Gb=function(a){return a&&(a.host||Gb(a.parentNode))},BR=function(a,l){return l.map(function(o){if(a.contains(o))return o;var i=Gb(o);return i&&a.contains(i)?i:(console.error("aria-hidden",o,"in not contained inside",a,". Doing nothing"),null)}).filter(function(o){return!!o})},PR=function(a,l,o,i){var u=BR(l,Array.isArray(a)?a:[a]);tc[o]||(tc[o]=new WeakMap);var f=tc[o],h=[],m=new Set,g=new Set(u),v=function(S){!S||m.has(S)||(m.add(S),v(S.parentNode))};u.forEach(v);var w=function(S){!S||g.has(S)||Array.prototype.forEach.call(S.children,function(b){if(m.has(b))w(b);else try{var x=b.getAttribute(i),T=x!==null&&x!=="false",j=(no.get(b)||0)+1,E=(f.get(b)||0)+1;no.set(b,j),f.set(b,E),h.push(b),j===1&&T&&ec.set(b,!0),E===1&&b.setAttribute(o,"true"),T||b.setAttribute(i,"true")}catch(R){console.error("aria-hidden: cannot operate on ",b,R)}})};return w(l),m.clear(),Cf++,function(){h.forEach(function(S){var b=no.get(S)-1,x=f.get(S)-1;no.set(S,b),f.set(S,x),b||(ec.has(S)||S.removeAttribute(i),ec.delete(S)),x||S.removeAttribute(o)}),Cf--,Cf||(no=new WeakMap,no=new WeakMap,ec=new WeakMap,tc={})}},Mh=function(a,l,o){o===void 0&&(o="data-aria-hidden");var i=Array.from(Array.isArray(a)?a:[a]),u=HR(a);return u?(i.push.apply(i,Array.from(u.querySelectorAll("[aria-live], script"))),PR(i,u,o,"aria-hidden")):function(){return null}},ia=function(){return ia=Object.assign||function(l){for(var o,i=1,u=arguments.length;i<u;i++){o=arguments[i];for(var f in o)Object.prototype.hasOwnProperty.call(o,f)&&(l[f]=o[f])}return l},ia.apply(this,arguments)};function Ib(a,l){var o={};for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&l.indexOf(i)<0&&(o[i]=a[i]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var u=0,i=Object.getOwnPropertySymbols(a);u<i.length;u++)l.indexOf(i[u])<0&&Object.prototype.propertyIsEnumerable.call(a,i[u])&&(o[i[u]]=a[i[u]]);return o}function qR(a,l,o){if(o||arguments.length===2)for(var i=0,u=l.length,f;i<u;i++)(f||!(i in l))&&(f||(f=Array.prototype.slice.call(l,0,i)),f[i]=l[i]);return a.concat(f||Array.prototype.slice.call(l))}var uc="right-scroll-bar-position",dc="width-before-scroll-bar",VR="with-scroll-bars-hidden",YR="--removed-body-scroll-bar-size";function Ef(a,l){return typeof a=="function"?a(l):a&&(a.current=l),a}function GR(a,l){var o=p.useState(function(){return{value:a,callback:l,facade:{get current(){return o.value},set current(i){var u=o.value;u!==i&&(o.value=i,o.callback(i,u))}}}})[0];return o.callback=l,o.facade}var IR=typeof window<"u"?p.useLayoutEffect:p.useEffect,Vy=new WeakMap;function $R(a,l){var o=GR(null,function(i){return a.forEach(function(u){return Ef(u,i)})});return IR(function(){var i=Vy.get(o);if(i){var u=new Set(i),f=new Set(a),h=o.current;u.forEach(function(m){f.has(m)||Ef(m,null)}),f.forEach(function(m){u.has(m)||Ef(m,h)})}Vy.set(o,a)},[a]),o}function KR(a){return a}function XR(a,l){l===void 0&&(l=KR);var o=[],i=!1,u={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return o.length?o[o.length-1]:a},useMedium:function(f){var h=l(f,i);return o.push(h),function(){o=o.filter(function(m){return m!==h})}},assignSyncMedium:function(f){for(i=!0;o.length;){var h=o;o=[],h.forEach(f)}o={push:function(m){return f(m)},filter:function(){return o}}},assignMedium:function(f){i=!0;var h=[];if(o.length){var m=o;o=[],m.forEach(f),h=o}var g=function(){var w=h;h=[],w.forEach(f)},v=function(){return Promise.resolve().then(g)};v(),o={push:function(w){h.push(w),v()},filter:function(w){return h=h.filter(w),o}}}};return u}function QR(a){a===void 0&&(a={});var l=XR(null);return l.options=ia({async:!0,ssr:!1},a),l}var $b=function(a){var l=a.sideCar,o=Ib(a,["sideCar"]);if(!l)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=l.read();if(!i)throw new Error("Sidecar medium not found");return p.createElement(i,ia({},o))};$b.isSideCarExport=!0;function ZR(a,l){return a.useMedium(l),$b}var Kb=QR(),Rf=function(){},zc=p.forwardRef(function(a,l){var o=p.useRef(null),i=p.useState({onScrollCapture:Rf,onWheelCapture:Rf,onTouchMoveCapture:Rf}),u=i[0],f=i[1],h=a.forwardProps,m=a.children,g=a.className,v=a.removeScrollBar,w=a.enabled,S=a.shards,b=a.sideCar,x=a.noRelative,T=a.noIsolation,j=a.inert,E=a.allowPinchZoom,R=a.as,A=R===void 0?"div":R,N=a.gapMode,O=Ib(a,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),H=b,P=$R([o,l]),z=ia(ia({},O),u);return p.createElement(p.Fragment,null,w&&p.createElement(H,{sideCar:Kb,removeScrollBar:v,shards:S,noRelative:x,noIsolation:T,inert:j,setCallbacks:f,allowPinchZoom:!!E,lockRef:o,gapMode:N}),h?p.cloneElement(p.Children.only(m),ia(ia({},z),{ref:P})):p.createElement(A,ia({},z,{className:g,ref:P}),m))});zc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};zc.classNames={fullWidth:dc,zeroRight:uc};var FR=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function JR(){if(!document)return null;var a=document.createElement("style");a.type="text/css";var l=FR();return l&&a.setAttribute("nonce",l),a}function WR(a,l){a.styleSheet?a.styleSheet.cssText=l:a.appendChild(document.createTextNode(l))}function eT(a){var l=document.head||document.getElementsByTagName("head")[0];l.appendChild(a)}var tT=function(){var a=0,l=null;return{add:function(o){a==0&&(l=JR())&&(WR(l,o),eT(l)),a++},remove:function(){a--,!a&&l&&(l.parentNode&&l.parentNode.removeChild(l),l=null)}}},nT=function(){var a=tT();return function(l,o){p.useEffect(function(){return a.add(l),function(){a.remove()}},[l&&o])}},Xb=function(){var a=nT(),l=function(o){var i=o.styles,u=o.dynamic;return a(i,u),null};return l},aT={left:0,top:0,right:0,gap:0},Tf=function(a){return parseInt(a||"",10)||0},lT=function(a){var l=window.getComputedStyle(document.body),o=l[a==="padding"?"paddingLeft":"marginLeft"],i=l[a==="padding"?"paddingTop":"marginTop"],u=l[a==="padding"?"paddingRight":"marginRight"];return[Tf(o),Tf(i),Tf(u)]},rT=function(a){if(a===void 0&&(a="margin"),typeof window>"u")return aT;var l=lT(a),o=document.documentElement.clientWidth,i=window.innerWidth;return{left:l[0],top:l[1],right:l[2],gap:Math.max(0,i-o+l[2]-l[0])}},oT=Xb(),uo="data-scroll-locked",iT=function(a,l,o,i){var u=a.left,f=a.top,h=a.right,m=a.gap;return o===void 0&&(o="margin"),`
216
+ .`.concat(VR,` {
217
+ overflow: hidden `).concat(i,`;
218
+ padding-right: `).concat(m,"px ").concat(i,`;
219
+ }
220
+ body[`).concat(uo,`] {
221
+ overflow: hidden `).concat(i,`;
222
+ overscroll-behavior: contain;
223
+ `).concat([l&&"position: relative ".concat(i,";"),o==="margin"&&`
224
+ padding-left: `.concat(u,`px;
225
+ padding-top: `).concat(f,`px;
226
+ padding-right: `).concat(h,`px;
227
+ margin-left:0;
228
+ margin-top:0;
229
+ margin-right: `).concat(m,"px ").concat(i,`;
230
+ `),o==="padding"&&"padding-right: ".concat(m,"px ").concat(i,";")].filter(Boolean).join(""),`
231
+ }
232
+
233
+ .`).concat(uc,` {
234
+ right: `).concat(m,"px ").concat(i,`;
235
+ }
236
+
237
+ .`).concat(dc,` {
238
+ margin-right: `).concat(m,"px ").concat(i,`;
239
+ }
240
+
241
+ .`).concat(uc," .").concat(uc,` {
242
+ right: 0 `).concat(i,`;
243
+ }
244
+
245
+ .`).concat(dc," .").concat(dc,` {
246
+ margin-right: 0 `).concat(i,`;
247
+ }
248
+
249
+ body[`).concat(uo,`] {
250
+ `).concat(YR,": ").concat(m,`px;
251
+ }
252
+ `)},Yy=function(){var a=parseInt(document.body.getAttribute(uo)||"0",10);return isFinite(a)?a:0},sT=function(){p.useEffect(function(){return document.body.setAttribute(uo,(Yy()+1).toString()),function(){var a=Yy()-1;a<=0?document.body.removeAttribute(uo):document.body.setAttribute(uo,a.toString())}},[])},cT=function(a){var l=a.noRelative,o=a.noImportant,i=a.gapMode,u=i===void 0?"margin":i;sT();var f=p.useMemo(function(){return rT(u)},[u]);return p.createElement(oT,{styles:iT(f,!l,u,o?"":"!important")})},$f=!1;if(typeof window<"u")try{var nc=Object.defineProperty({},"passive",{get:function(){return $f=!0,!0}});window.addEventListener("test",nc,nc),window.removeEventListener("test",nc,nc)}catch{$f=!1}var ao=$f?{passive:!1}:!1,uT=function(a){return a.tagName==="TEXTAREA"},Qb=function(a,l){if(!(a instanceof Element))return!1;var o=window.getComputedStyle(a);return o[l]!=="hidden"&&!(o.overflowY===o.overflowX&&!uT(a)&&o[l]==="visible")},dT=function(a){return Qb(a,"overflowY")},fT=function(a){return Qb(a,"overflowX")},Gy=function(a,l){var o=l.ownerDocument,i=l;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var u=Zb(a,i);if(u){var f=Fb(a,i),h=f[1],m=f[2];if(h>m)return!0}i=i.parentNode}while(i&&i!==o.body);return!1},hT=function(a){var l=a.scrollTop,o=a.scrollHeight,i=a.clientHeight;return[l,o,i]},mT=function(a){var l=a.scrollLeft,o=a.scrollWidth,i=a.clientWidth;return[l,o,i]},Zb=function(a,l){return a==="v"?dT(l):fT(l)},Fb=function(a,l){return a==="v"?hT(l):mT(l)},pT=function(a,l){return a==="h"&&l==="rtl"?-1:1},gT=function(a,l,o,i,u){var f=pT(a,window.getComputedStyle(l).direction),h=f*i,m=o.target,g=l.contains(m),v=!1,w=h>0,S=0,b=0;do{if(!m)break;var x=Fb(a,m),T=x[0],j=x[1],E=x[2],R=j-E-f*T;(T||R)&&Zb(a,m)&&(S+=R,b+=T);var A=m.parentNode;m=A&&A.nodeType===Node.DOCUMENT_FRAGMENT_NODE?A.host:A}while(!g&&m!==document.body||g&&(l.contains(m)||l===m));return(w&&Math.abs(S)<1||!w&&Math.abs(b)<1)&&(v=!0),v},ac=function(a){return"changedTouches"in a?[a.changedTouches[0].clientX,a.changedTouches[0].clientY]:[0,0]},Iy=function(a){return[a.deltaX,a.deltaY]},$y=function(a){return a&&"current"in a?a.current:a},vT=function(a,l){return a[0]===l[0]&&a[1]===l[1]},yT=function(a){return`
253
+ .block-interactivity-`.concat(a,` {pointer-events: none;}
254
+ .allow-interactivity-`).concat(a,` {pointer-events: all;}
255
+ `)},xT=0,lo=[];function bT(a){var l=p.useRef([]),o=p.useRef([0,0]),i=p.useRef(),u=p.useState(xT++)[0],f=p.useState(Xb)[0],h=p.useRef(a);p.useEffect(function(){h.current=a},[a]),p.useEffect(function(){if(a.inert){document.body.classList.add("block-interactivity-".concat(u));var j=qR([a.lockRef.current],(a.shards||[]).map($y),!0).filter(Boolean);return j.forEach(function(E){return E.classList.add("allow-interactivity-".concat(u))}),function(){document.body.classList.remove("block-interactivity-".concat(u)),j.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(u))})}}},[a.inert,a.lockRef.current,a.shards]);var m=p.useCallback(function(j,E){if("touches"in j&&j.touches.length===2||j.type==="wheel"&&j.ctrlKey)return!h.current.allowPinchZoom;var R=ac(j),A=o.current,N="deltaX"in j?j.deltaX:A[0]-R[0],O="deltaY"in j?j.deltaY:A[1]-R[1],H,P=j.target,z=Math.abs(N)>Math.abs(O)?"h":"v";if("touches"in j&&z==="h"&&P.type==="range")return!1;var U=window.getSelection(),ee=U&&U.anchorNode,se=ee?ee===P||ee.contains(P):!1;if(se)return!1;var oe=Gy(z,P);if(!oe)return!0;if(oe?H=z:(H=z==="v"?"h":"v",oe=Gy(z,P)),!oe)return!1;if(!i.current&&"changedTouches"in j&&(N||O)&&(i.current=H),!H)return!0;var J=i.current||H;return gT(J,E,j,J==="h"?N:O)},[]),g=p.useCallback(function(j){var E=j;if(!(!lo.length||lo[lo.length-1]!==f)){var R="deltaY"in E?Iy(E):ac(E),A=l.current.filter(function(H){return H.name===E.type&&(H.target===E.target||E.target===H.shadowParent)&&vT(H.delta,R)})[0];if(A&&A.should){E.cancelable&&E.preventDefault();return}if(!A){var N=(h.current.shards||[]).map($y).filter(Boolean).filter(function(H){return H.contains(E.target)}),O=N.length>0?m(E,N[0]):!h.current.noIsolation;O&&E.cancelable&&E.preventDefault()}}},[]),v=p.useCallback(function(j,E,R,A){var N={name:j,delta:E,target:R,should:A,shadowParent:ST(R)};l.current.push(N),setTimeout(function(){l.current=l.current.filter(function(O){return O!==N})},1)},[]),w=p.useCallback(function(j){o.current=ac(j),i.current=void 0},[]),S=p.useCallback(function(j){v(j.type,Iy(j),j.target,m(j,a.lockRef.current))},[]),b=p.useCallback(function(j){v(j.type,ac(j),j.target,m(j,a.lockRef.current))},[]);p.useEffect(function(){return lo.push(f),a.setCallbacks({onScrollCapture:S,onWheelCapture:S,onTouchMoveCapture:b}),document.addEventListener("wheel",g,ao),document.addEventListener("touchmove",g,ao),document.addEventListener("touchstart",w,ao),function(){lo=lo.filter(function(j){return j!==f}),document.removeEventListener("wheel",g,ao),document.removeEventListener("touchmove",g,ao),document.removeEventListener("touchstart",w,ao)}},[]);var x=a.removeScrollBar,T=a.inert;return p.createElement(p.Fragment,null,T?p.createElement(f,{styles:yT(u)}):null,x?p.createElement(cT,{noRelative:a.noRelative,gapMode:a.gapMode}):null)}function ST(a){for(var l=null;a!==null;)a instanceof ShadowRoot&&(l=a.host,a=a.host),a=a.parentNode;return l}const wT=ZR(Kb,bT);var kc=p.forwardRef(function(a,l){return p.createElement(zc,ia({},a,{ref:l,sideCar:wT}))});kc.classNames=zc.classNames;var jT=Object.defineProperty,ot=(a,l)=>jT(a,"name",{value:l,configurable:!0}),CT=["Enter"," "],ET=["ArrowDown","PageUp","Home"],Jb=["ArrowUp","PageDown","End"],RT=[...ET,...Jb],Lc="Menu",[Kf,TT,NT]=jc(Lc),[dr,Wb]=cn(Lc,[NT,jo,Dc]),_h=jo(),e0=Dc(),[AT,Di]=dr(Lc),[MT,Oh]=dr(Lc),_T=ot(a=>{const{__scopeMenu:l,open:o=!1,children:i,dir:u,onOpenChange:f,modal:h=!0}=a,m=_h(l),[g,v]=p.useState(null),w=p.useRef(!1),S=Hn(f),b=_i(u);return p.useEffect(()=>{const x=ot(()=>{w.current=!0,document.addEventListener("pointerdown",T,{capture:!0,once:!0}),document.addEventListener("pointermove",T,{capture:!0,once:!0})},"handleKeyDown"),T=ot(()=>w.current=!1,"handlePointer");return document.addEventListener("keydown",x,{capture:!0}),()=>{document.removeEventListener("keydown",x,{capture:!0}),document.removeEventListener("pointerdown",T,{capture:!0}),document.removeEventListener("pointermove",T,{capture:!0})}},[]),p.useEffect(()=>{if(!o)return;const x=ot(()=>S(!1),"handleBlur");return window.addEventListener("blur",x),()=>window.removeEventListener("blur",x)},[o,S]),s.jsx(Nb,{...m,children:s.jsx(AT,{scope:l,open:o,onOpenChange:S,content:g,onContentChange:v,children:s.jsx(MT,{scope:l,onClose:p.useCallback(()=>S(!1),[S]),isUsingKeyboardRef:w,dir:b,modal:h,children:i})})})},"Menu"),OT=p.forwardRef(ot(function(l,o){const{__scopeMenu:i,...u}=l,f=_h(i);return s.jsx(Ab,{...f,...u,ref:o})},"MenuAnchor")),t0="MenuPortal",[DT,zT]=dr(t0,{forceMount:void 0}),kT=ot(a=>{const{__scopeMenu:l,forceMount:o,children:i,container:u}=a,f=Di(t0,l);return s.jsx(DT,{scope:l,forceMount:o,children:s.jsx(Wa,{present:o||f.open,children:s.jsx(Th,{asChild:!0,container:u,children:i})})})},"MenuPortal"),Ol="MenuContent",[LT,n0]=dr(Ol),UT=p.forwardRef(ot(function(l,o){const i=zT(Ol,l.__scopeMenu),{forceMount:u=i.forceMount,...f}=l,h=Di(Ol,l.__scopeMenu),m=Oh(Ol,l.__scopeMenu);return s.jsx(Kf.Provider,{scope:l.__scopeMenu,children:s.jsx(Wa,{present:u||h.open,children:s.jsx(Kf.Slot,{scope:l.__scopeMenu,children:m.modal?s.jsx(HT,{...f,ref:o}):s.jsx(BT,{...f,ref:o})})})})},"MenuContent")),HT=p.forwardRef(ot(function(l,o){const i=Di(Ol,l.__scopeMenu),u=p.useRef(null),f=Pe(o,u);return p.useEffect(()=>{const h=u.current;if(h)return Mh(h)},[]),s.jsx(a0,{...l,ref:f,trapFocus:i.open,disableOutsidePointerEvents:i.open,disableOutsideScroll:!0,onFocusOutside:xe(l.onFocusOutside,h=>h.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>i.onOpenChange(!1)})},"MenuRootContentModal")),BT=p.forwardRef(ot(function(l,o){const i=Di(Ol,l.__scopeMenu);return s.jsx(a0,{...l,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>i.onOpenChange(!1)})},"MenuRootContentNonModal")),PT=ha("MenuContent.ScrollLock"),a0=p.forwardRef(ot(function(l,o){const{__scopeMenu:i,loop:u=!1,trapFocus:f,onOpenAutoFocus:h,onCloseAutoFocus:m,disableOutsidePointerEvents:g,onEntryFocus:v,onEscapeKeyDown:w,onPointerDownOutside:S,onFocusOutside:b,onInteractOutside:x,onDismiss:T,disableOutsideScroll:j,...E}=l,R=Di(Ol,i),A=Oh(Ol,i),N=_h(i),O=e0(i),H=TT(i),[P,z]=p.useState(null),U=p.useRef(null),ee=Pe(o,U,R.onContentChange),se=p.useRef(0),oe=p.useRef(""),J=p.useRef(0),ie=p.useRef(null),ce=p.useRef("right"),me=p.useRef(0),L=j?kc:p.Fragment,I=j?{as:PT,allowPinchZoom:!0}:void 0,te=ot(Z=>{var le,fe;const M=oe.current+Z,B=H().filter(De=>!De.disabled),$=document.activeElement,ne=(le=B.find(De=>De.ref.current===$))==null?void 0:le.textValue,ue=B.map(De=>De.textValue),X=s0(ue,M,ne),ae=(fe=B.find(De=>De.textValue===X))==null?void 0:fe.ref.current;ot((function De(_e){oe.current=_e,window.clearTimeout(se.current),_e!==""&&(se.current=window.setTimeout(()=>De(""),1e3))}),"updateSearch")(M),ae&&setTimeout(()=>ae.focus())},"handleTypeaheadSearch");p.useEffect(()=>()=>window.clearTimeout(se.current),[]),Oi();const W=p.useCallback(Z=>{var B,$;return ce.current===((B=ie.current)==null?void 0:B.side)&&u0(Z,($=ie.current)==null?void 0:$.area)},[]);return s.jsx(LT,{scope:i,searchRef:oe,onItemEnter:p.useCallback(Z=>{W(Z)&&Z.preventDefault()},[W]),onItemLeave:p.useCallback(Z=>{var M;W(Z)||((M=U.current)==null||M.focus(),z(null))},[W]),onTriggerLeave:p.useCallback(Z=>{W(Z)&&Z.preventDefault()},[W]),pointerGraceTimerRef:J,onPointerGraceIntentChange:p.useCallback(Z=>{ie.current=Z},[]),children:s.jsx(L,{...I,children:s.jsx(yh,{asChild:!0,trapped:f,onMountAutoFocus:xe(h,Z=>{var M;Z.preventDefault(),(M=U.current)==null||M.focus({preventScroll:!0})}),onUnmountAutoFocus:m,children:s.jsx(Cc,{asChild:!0,disableOutsidePointerEvents:g,onEscapeKeyDown:w,onPointerDownOutside:S,onFocusOutside:b,onInteractOutside:x,onDismiss:T,children:s.jsx(Vb,{asChild:!0,...O,dir:A.dir,orientation:"vertical",loop:u,currentTabStopId:P,onCurrentTabStopIdChange:z,onEntryFocus:xe(v,Z=>{A.isUsingKeyboardRef.current||Z.preventDefault()}),preventScrollOnEntryFocus:!0,children:s.jsx(Rh,{role:"menu","aria-orientation":"vertical","data-state":l0(R.open),"data-radix-menu-content":"",dir:A.dir,...N,...E,ref:ee,style:{outline:"none",...E.style},onKeyDown:xe(E.onKeyDown,Z=>{const B=Z.target.closest("[data-radix-menu-content]")===Z.currentTarget,$=Z.ctrlKey||Z.altKey||Z.metaKey,ne=Z.key.length===1;B&&(Z.key==="Tab"&&Z.preventDefault(),!$&&ne&&te(Z.key));const ue=U.current;if(Z.target!==ue||!RT.includes(Z.key))return;Z.preventDefault();const ae=H().filter(le=>!le.disabled).map(le=>le.ref.current);Jb.includes(Z.key)&&ae.reverse(),o0(ae)}),onBlur:xe(l.onBlur,Z=>{Z.currentTarget.contains(Z.target)||(window.clearTimeout(se.current),oe.current="")}),onPointerMove:xe(l.onPointerMove,yc(Z=>{const M=Z.target,B=me.current!==Z.clientX;if(Z.currentTarget.contains(M)&&B){const $=Z.clientX>me.current?"right":"left";ce.current=$,me.current=Z.clientX}}))})})})})})})},"MenuContentImpl")),qT=p.forwardRef(ot(function(l,o){const{__scopeMenu:i,...u}=l;return s.jsx(Le.div,{...u,ref:o})},"MenuLabel")),Xf="MenuItem",Ky="menu.itemSelect",VT=p.forwardRef(ot(function(l,o){const{disabled:i=!1,onSelect:u,...f}=l,h=p.useRef(null),m=Oh(Xf,l.__scopeMenu),g=n0(Xf,l.__scopeMenu),v=Pe(o,h),w=p.useRef(!1),S=ot(()=>{const b=h.current;if(!i&&b){const x=new CustomEvent(Ky,{bubbles:!0,cancelable:!0});b.addEventListener(Ky,T=>u==null?void 0:u(T),{once:!0}),mh(b,x),x.defaultPrevented?w.current=!1:m.onClose()}},"handleSelect");return s.jsx(YT,{...f,ref:v,disabled:i,onClick:xe(l.onClick,S),onPointerDown:b=>{var x;(x=l.onPointerDown)==null||x.call(l,b),w.current=!0},onPointerUp:xe(l.onPointerUp,b=>{var x;w.current||(x=b.currentTarget)==null||x.click()}),onKeyDown:xe(l.onKeyDown,b=>{i||b.target!==b.currentTarget||g.searchRef.current!==""&&b.key===" "||CT.includes(b.key)&&(b.currentTarget.click(),b.preventDefault())})})},"MenuItem")),YT=p.forwardRef(ot(function(l,o){const{__scopeMenu:i,disabled:u=!1,textValue:f,...h}=l,m=n0(Xf,i),g=e0(i),v=p.useRef(null),w=Pe(o,v),[S,b]=p.useState(!1),[x,T]=p.useState("");return p.useEffect(()=>{const j=v.current;j&&T((j.textContent??"").trim())},[h.children]),s.jsx(Kf.ItemSlot,{scope:i,disabled:u,textValue:f??x,children:s.jsx(Yb,{asChild:!0,...g,focusable:!u,children:s.jsx(Le.div,{role:"menuitem","data-highlighted":S?"":void 0,"aria-disabled":u||void 0,"data-disabled":u?"":void 0,...h,ref:w,onPointerMove:xe(l.onPointerMove,yc(j=>{u?m.onItemLeave(j):(m.onItemEnter(j),j.defaultPrevented||j.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:xe(l.onPointerLeave,yc(j=>m.onItemLeave(j))),onFocus:xe(l.onFocus,()=>b(!0)),onBlur:xe(l.onBlur,()=>b(!1))})})})},"MenuItemImpl")),GT="MenuRadioGroup",[R_,T_]=dr(GT,{value:void 0,onValueChange:ot(()=>{},"onValueChange")}),IT="MenuItemIndicator",[N_,A_]=dr(IT,{checked:!1}),$T=p.forwardRef(ot(function(l,o){const{__scopeMenu:i,...u}=l;return s.jsx(Le.div,{role:"separator","aria-orientation":"horizontal",...u,ref:o})},"MenuSeparator")),KT="MenuSub",[M_,__]=dr(KT);function l0(a){return a?"open":"closed"}ot(l0,"getOpenState");function r0(a){return a==="indeterminate"}ot(r0,"isIndeterminate");function XT(a){return r0(a)?"indeterminate":a?"checked":"unchecked"}ot(XT,"getCheckedState");function o0(a){const l=document.activeElement;for(const o of a)if(o===l||(o.focus(),document.activeElement!==l))return}ot(o0,"focusFirst");function i0(a,l){return a.map((o,i)=>a[(l+i)%a.length])}ot(i0,"wrapArray");function s0(a,l,o){const u=l.length>1&&Array.from(l).every(v=>v===l[0])?l[0]:l,f=o?a.indexOf(o):-1;let h=i0(a,Math.max(f,0));u.length===1&&(h=h.filter(v=>v!==o));const g=h.find(v=>v.toLowerCase().startsWith(u.toLowerCase()));return g!==o?g:void 0}ot(s0,"getNextMatch");function c0(a,l){const{x:o,y:i}=a;let u=!1;for(let f=0,h=l.length-1;f<l.length;h=f++){const m=l[f],g=l[h],v=m.x,w=m.y,S=g.x,b=g.y;w>i!=b>i&&o<(S-v)*(i-w)/(b-w)+v&&(u=!u)}return u}ot(c0,"isPointInPolygon");function u0(a,l){if(!l)return!1;const o={x:a.clientX,y:a.clientY};return c0(o,l)}ot(u0,"isPointerInGraceArea");function yc(a){return l=>l.pointerType==="mouse"?a(l):void 0}ot(yc,"whenMouse");var QT=_T,ZT=OT,FT=kT,JT=UT,WT=qT,eN=VT,tN=$T,nN=Object.defineProperty,fr=(a,l)=>nN(a,"name",{value:l,configurable:!0}),Dh="DropdownMenu",[aN,O_]=cn(Dh,[Wb]),hr=Wb(),[lN,d0]=aN(Dh),rN=fr(a=>{const{__scopeDropdownMenu:l,children:o,dir:i,open:u,defaultOpen:f,onOpenChange:h,modal:m=!0}=a,g=hr(l),v=p.useRef(null),[w,S]=Xa({prop:u,defaultProp:f??!1,onChange:h,caller:Dh});return s.jsx(lN,{scope:l,triggerId:ca(),triggerRef:v,contentId:ca(),open:w,onOpenChange:S,onOpenToggle:p.useCallback(()=>S(b=>!b),[S]),modal:m,children:s.jsx(QT,{...g,open:w,onOpenChange:S,dir:i,modal:m,children:o})})},"DropdownMenu"),oN="DropdownMenuTrigger",iN=p.forwardRef(fr(function(l,o){const{__scopeDropdownMenu:i,disabled:u=!1,...f}=l,h=d0(oN,i),m=hr(i),g=Pe(o,h.triggerRef);return s.jsx(ZT,{asChild:!0,...m,children:s.jsx(Le.button,{type:"button",id:h.triggerId,"aria-haspopup":"menu","aria-expanded":h.open,"aria-controls":h.open?h.contentId:void 0,"data-state":h.open?"open":"closed","data-disabled":u?"":void 0,disabled:u,...f,ref:g,onPointerDown:xe(l.onPointerDown,v=>{!u&&v.button===0&&v.ctrlKey===!1&&(h.onOpenToggle(),h.open||v.preventDefault())}),onKeyDown:xe(l.onKeyDown,v=>{u||(["Enter"," "].includes(v.key)&&h.onOpenToggle(),v.key==="ArrowDown"&&h.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(v.key)&&v.preventDefault())})})})},"DropdownMenuTrigger")),sN=fr(a=>{const{__scopeDropdownMenu:l,...o}=a,i=hr(l);return s.jsx(FT,{...i,...o})},"DropdownMenuPortal"),cN="DropdownMenuContent",uN=p.forwardRef(fr(function(l,o){const{__scopeDropdownMenu:i,...u}=l,f=d0(cN,i),h=hr(i),m=p.useRef(!1);return s.jsx(JT,{id:f.contentId,"aria-labelledby":f.triggerId,...h,...u,ref:o,onCloseAutoFocus:xe(l.onCloseAutoFocus,g=>{var v;m.current||(v=f.triggerRef.current)==null||v.focus(),m.current=!1,g.preventDefault()}),onInteractOutside:xe(l.onInteractOutside,g=>{const v=g.detail.originalEvent,w=v.button===0&&v.ctrlKey===!0,S=v.button===2||w;(!f.modal||S)&&(m.current=!0)}),style:{...l.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuContent")),dN=p.forwardRef(fr(function(l,o){const{__scopeDropdownMenu:i,...u}=l,f=hr(i);return s.jsx(WT,{...f,...u,ref:o})},"DropdownMenuLabel")),fN=p.forwardRef(fr(function(l,o){const{__scopeDropdownMenu:i,...u}=l,f=hr(i);return s.jsx(eN,{...f,...u,ref:o})},"DropdownMenuItem")),hN=p.forwardRef(fr(function(l,o){const{__scopeDropdownMenu:i,...u}=l,f=hr(i);return s.jsx(tN,{...f,...u,ref:o})},"DropdownMenuSeparator")),mN=rN,pN=iN,gN=sN,f0=uN,h0=dN,m0=fN,p0=hN;const vN=mN,yN=pN,g0=p.forwardRef(({className:a,sideOffset:l=4,...o},i)=>s.jsx(gN,{children:s.jsx(f0,{ref:i,sideOffset:l,className:Ee("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",a),...o})}));g0.displayName=f0.displayName;const v0=p.forwardRef(({className:a,inset:l,...o},i)=>s.jsx(m0,{ref:i,className:Ee("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",l&&"pl-8",a),...o}));v0.displayName=m0.displayName;const xN=p.forwardRef(({className:a,...l},o)=>s.jsx(h0,{ref:o,className:Ee("px-2 py-1.5 text-sm font-semibold",a),...l}));xN.displayName=h0.displayName;const bN=p.forwardRef(({className:a,...l},o)=>s.jsx(p0,{ref:o,className:Ee("-mx-1 my-1 h-px bg-muted",a),...l}));bN.displayName=p0.displayName;function SN(){const{theme:a,setTheme:l}=M2(),{user:o,logout:i}=uh(),[u,f]=p.useState(!1),[h,m]=p.useState(null),g=vo(),v=a==="light"?UC:a==="dark"?DC:OC;return p.useEffect(()=>{Ce.get("/api/admin/update/check").then(w=>m(w)).catch(()=>{})},[]),s.jsxs("header",{className:"flex h-14 items-center justify-between border-b bg-background px-4",children:[s.jsx("div",{className:"text-sm text-muted-foreground",children:"Admin"}),s.jsxs("div",{className:"flex items-center gap-2",children:[(h==null?void 0:h.hasUpdate)&&s.jsxs(ve,{variant:"ghost",size:"sm",title:`New version available: v${h.latestVersion} — go to Settings → System to update`,onClick:()=>g("/settings?tab=system"),children:[s.jsx(CC,{className:"mr-1 h-4 w-4 text-blue-500"}),"Update v",h.latestVersion]}),s.jsx(ve,{variant:"ghost",size:"icon",onClick:()=>l(a==="dark"?"light":"dark"),children:s.jsx(v,{className:"h-4 w-4"})}),s.jsxs(vN,{open:u,onOpenChange:f,children:[s.jsx(yN,{asChild:!0,children:s.jsx(ve,{variant:"ghost",children:(o==null?void 0:o.username)??"admin"})}),s.jsx(g0,{align:"end",children:s.jsxs(v0,{onClick:()=>void i(),children:[s.jsx(_C,{className:"mr-2 h-4 w-4"})," Sign out"]})})]})]})]})}const Me=p.forwardRef(({className:a,type:l,...o},i)=>s.jsx("input",{type:l,className:Ee("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",a),ref:i,...o}));Me.displayName="Input";var wN=Object.defineProperty,jN=(a,l)=>wN(a,"name",{value:l,configurable:!0}),CN=p.forwardRef(jN(function(l,o){return s.jsx(Le.label,{...l,ref:o,onMouseDown:i=>{var f;i.target.closest("button, input, select, textarea")||((f=l.onMouseDown)==null||f.call(l,i),!i.defaultPrevented&&i.detail>1&&i.preventDefault())}})},"Label")),y0=CN;const Se=p.forwardRef(({className:a,...l},o)=>s.jsx(y0,{ref:o,className:Ee("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",a),...l}));Se.displayName=y0.displayName;const Ge=p.forwardRef(({className:a,...l},o)=>s.jsx("div",{ref:o,className:Ee("rounded-lg border bg-card text-card-foreground shadow-sm",a),...l}));Ge.displayName="Card";const Ie=p.forwardRef(({className:a,...l},o)=>s.jsx("div",{ref:o,className:Ee("flex flex-col space-y-1.5 p-6",a),...l}));Ie.displayName="CardHeader";const $e=p.forwardRef(({className:a,...l},o)=>s.jsx("h3",{ref:o,className:Ee("text-lg font-semibold leading-none tracking-tight",a),...l}));$e.displayName="CardTitle";const on=p.forwardRef(({className:a,...l},o)=>s.jsx("p",{ref:o,className:Ee("text-sm text-muted-foreground",a),...l}));on.displayName="CardDescription";const Ke=p.forwardRef(({className:a,...l},o)=>s.jsx("div",{ref:o,className:Ee("p-6 pt-0",a),...l}));Ke.displayName="CardContent";const x0=p.forwardRef(({className:a,...l},o)=>s.jsx("div",{ref:o,className:Ee("flex items-center p-6 pt-0",a),...l}));x0.displayName="CardFooter";var EN=a=>{switch(a){case"success":return NN;case"info":return MN;case"warning":return AN;case"error":return _N;default:return null}},RN=Array(12).fill(0),TN=({visible:a,className:l})=>re.createElement("div",{className:["sonner-loading-wrapper",l].filter(Boolean).join(" "),"data-visible":a},re.createElement("div",{className:"sonner-spinner"},RN.map((o,i)=>re.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${i}`})))),NN=re.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},re.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),AN=re.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},re.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),MN=re.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},re.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),_N=re.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},re.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),ON=re.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},re.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),re.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),DN=()=>{let[a,l]=re.useState(document.hidden);return re.useEffect(()=>{let o=()=>{l(document.hidden)};return document.addEventListener("visibilitychange",o),()=>window.removeEventListener("visibilitychange",o)},[]),a},Qf=1,zN=class{constructor(){this.subscribe=a=>(this.subscribers.push(a),()=>{let l=this.subscribers.indexOf(a);this.subscribers.splice(l,1)}),this.publish=a=>{this.subscribers.forEach(l=>l(a))},this.addToast=a=>{this.publish(a),this.toasts=[...this.toasts,a]},this.create=a=>{var l;let{message:o,...i}=a,u=typeof(a==null?void 0:a.id)=="number"||((l=a.id)==null?void 0:l.length)>0?a.id:Qf++,f=this.toasts.find(m=>m.id===u),h=a.dismissible===void 0?!0:a.dismissible;return this.dismissedToasts.has(u)&&this.dismissedToasts.delete(u),f?this.toasts=this.toasts.map(m=>m.id===u?(this.publish({...m,...a,id:u,title:o}),{...m,...a,id:u,dismissible:h,title:o}):m):this.addToast({title:o,...i,dismissible:h,id:u}),u},this.dismiss=a=>(this.dismissedToasts.add(a),a||this.toasts.forEach(l=>{this.subscribers.forEach(o=>o({id:l.id,dismiss:!0}))}),this.subscribers.forEach(l=>l({id:a,dismiss:!0})),a),this.message=(a,l)=>this.create({...l,message:a}),this.error=(a,l)=>this.create({...l,message:a,type:"error"}),this.success=(a,l)=>this.create({...l,type:"success",message:a}),this.info=(a,l)=>this.create({...l,type:"info",message:a}),this.warning=(a,l)=>this.create({...l,type:"warning",message:a}),this.loading=(a,l)=>this.create({...l,type:"loading",message:a}),this.promise=(a,l)=>{if(!l)return;let o;l.loading!==void 0&&(o=this.create({...l,promise:a,type:"loading",message:l.loading,description:typeof l.description!="function"?l.description:void 0}));let i=a instanceof Promise?a:a(),u=o!==void 0,f,h=i.then(async g=>{if(f=["resolve",g],re.isValidElement(g))u=!1,this.create({id:o,type:"default",message:g});else if(LN(g)&&!g.ok){u=!1;let v=typeof l.error=="function"?await l.error(`HTTP error! status: ${g.status}`):l.error,w=typeof l.description=="function"?await l.description(`HTTP error! status: ${g.status}`):l.description;this.create({id:o,type:"error",message:v,description:w})}else if(l.success!==void 0){u=!1;let v=typeof l.success=="function"?await l.success(g):l.success,w=typeof l.description=="function"?await l.description(g):l.description;this.create({id:o,type:"success",message:v,description:w})}}).catch(async g=>{if(f=["reject",g],l.error!==void 0){u=!1;let v=typeof l.error=="function"?await l.error(g):l.error,w=typeof l.description=="function"?await l.description(g):l.description;this.create({id:o,type:"error",message:v,description:w})}}).finally(()=>{var g;u&&(this.dismiss(o),o=void 0),(g=l.finally)==null||g.call(l)}),m=()=>new Promise((g,v)=>h.then(()=>f[0]==="reject"?v(f[1]):g(f[1])).catch(v));return typeof o!="string"&&typeof o!="number"?{unwrap:m}:Object.assign(o,{unwrap:m})},this.custom=(a,l)=>{let o=(l==null?void 0:l.id)||Qf++;return this.create({jsx:a(o),id:o,...l}),o},this.getActiveToasts=()=>this.toasts.filter(a=>!this.dismissedToasts.has(a.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},an=new zN,kN=(a,l)=>{let o=(l==null?void 0:l.id)||Qf++;return an.addToast({title:a,...l,id:o}),o},LN=a=>a&&typeof a=="object"&&"ok"in a&&typeof a.ok=="boolean"&&"status"in a&&typeof a.status=="number",UN=kN,HN=()=>an.toasts,BN=()=>an.getActiveToasts(),be=Object.assign(UN,{success:an.success,info:an.info,warning:an.warning,error:an.error,custom:an.custom,message:an.message,promise:an.promise,dismiss:an.dismiss,loading:an.loading},{getHistory:HN,getToasts:BN});function PN(a,{insertAt:l}={}){if(typeof document>"u")return;let o=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",l==="top"&&o.firstChild?o.insertBefore(i,o.firstChild):o.appendChild(i),i.styleSheet?i.styleSheet.cssText=a:i.appendChild(document.createTextNode(a))}PN(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
256
+ `);function lc(a){return a.label!==void 0}var qN=3,VN="32px",YN="16px",Xy=4e3,GN=356,IN=14,$N=20,KN=200;function In(...a){return a.filter(Boolean).join(" ")}function XN(a){let[l,o]=a.split("-"),i=[];return l&&i.push(l),o&&i.push(o),i}var QN=a=>{var l,o,i,u,f,h,m,g,v,w,S;let{invert:b,toast:x,unstyled:T,interacting:j,setHeights:E,visibleToasts:R,heights:A,index:N,toasts:O,expanded:H,removeToast:P,defaultRichColors:z,closeButton:U,style:ee,cancelButtonStyle:se,actionButtonStyle:oe,className:J="",descriptionClassName:ie="",duration:ce,position:me,gap:L,loadingIcon:I,expandByDefault:te,classNames:W,icons:Z,closeButtonAriaLabel:M="Close toast",pauseWhenPageIsHidden:B}=a,[$,ne]=re.useState(null),[ue,X]=re.useState(null),[ae,le]=re.useState(!1),[fe,De]=re.useState(!1),[_e,Oe]=re.useState(!1),[qe,yt]=re.useState(!1),[Ht,Kt]=re.useState(!1),[Wn,jn]=re.useState(0),[Hl,nl]=re.useState(0),Bn=re.useRef(x.duration||ce||Xy),ya=re.useRef(null),xa=re.useRef(null),Vt=N===0,Pc=N+1<=R,Yt=x.type,ba=x.dismissible!==!1,pr=x.className||"",qc=x.descriptionClassName||"",Bl=re.useMemo(()=>A.findIndex(je=>je.toastId===x.id)||0,[A,x.id]),Vc=re.useMemo(()=>{var je;return(je=x.closeButton)!=null?je:U},[x.closeButton,U]),Li=re.useMemo(()=>x.duration||ce||Xy,[x.duration,ce]),Sa=re.useRef(0),xt=re.useRef(0),Pn=re.useRef(0),bt=re.useRef(null),[Yc,Gc]=me.split("-"),Ui=re.useMemo(()=>A.reduce((je,Qe,at)=>at>=Bl?je:je+Qe.height,0),[A,Bl]),Pl=DN(),gr=x.invert||b,al=Yt==="loading";xt.current=re.useMemo(()=>Bl*L+Ui,[Bl,Ui]),re.useEffect(()=>{Bn.current=Li},[Li]),re.useEffect(()=>{le(!0)},[]),re.useEffect(()=>{let je=xa.current;if(je){let Qe=je.getBoundingClientRect().height;return nl(Qe),E(at=>[{toastId:x.id,height:Qe,position:x.position},...at]),()=>E(at=>at.filter(Gt=>Gt.toastId!==x.id))}},[E,x.id]),re.useLayoutEffect(()=>{if(!ae)return;let je=xa.current,Qe=je.style.height;je.style.height="auto";let at=je.getBoundingClientRect().height;je.style.height=Qe,nl(at),E(Gt=>Gt.find(Ot=>Ot.toastId===x.id)?Gt.map(Ot=>Ot.toastId===x.id?{...Ot,height:at}:Ot):[{toastId:x.id,height:at,position:x.position},...Gt])},[ae,x.title,x.description,E,x.id]);let Bt=re.useCallback(()=>{De(!0),jn(xt.current),E(je=>je.filter(Qe=>Qe.toastId!==x.id)),setTimeout(()=>{P(x)},KN)},[x,P,E,xt]);re.useEffect(()=>{if(x.promise&&Yt==="loading"||x.duration===1/0||x.type==="loading")return;let je;return H||j||B&&Pl?(()=>{if(Pn.current<Sa.current){let Qe=new Date().getTime()-Sa.current;Bn.current=Bn.current-Qe}Pn.current=new Date().getTime()})():Bn.current!==1/0&&(Sa.current=new Date().getTime(),je=setTimeout(()=>{var Qe;(Qe=x.onAutoClose)==null||Qe.call(x,x),Bt()},Bn.current)),()=>clearTimeout(je)},[H,j,x,Yt,B,Pl,Bt]),re.useEffect(()=>{x.delete&&Bt()},[Bt,x.delete]);function vr(){var je,Qe,at;return Z!=null&&Z.loading?re.createElement("div",{className:In(W==null?void 0:W.loader,(je=x==null?void 0:x.classNames)==null?void 0:je.loader,"sonner-loader"),"data-visible":Yt==="loading"},Z.loading):I?re.createElement("div",{className:In(W==null?void 0:W.loader,(Qe=x==null?void 0:x.classNames)==null?void 0:Qe.loader,"sonner-loader"),"data-visible":Yt==="loading"},I):re.createElement(TN,{className:In(W==null?void 0:W.loader,(at=x==null?void 0:x.classNames)==null?void 0:at.loader),visible:Yt==="loading"})}return re.createElement("li",{tabIndex:0,ref:xa,className:In(J,pr,W==null?void 0:W.toast,(l=x==null?void 0:x.classNames)==null?void 0:l.toast,W==null?void 0:W.default,W==null?void 0:W[Yt],(o=x==null?void 0:x.classNames)==null?void 0:o[Yt]),"data-sonner-toast":"","data-rich-colors":(i=x.richColors)!=null?i:z,"data-styled":!(x.jsx||x.unstyled||T),"data-mounted":ae,"data-promise":!!x.promise,"data-swiped":Ht,"data-removed":fe,"data-visible":Pc,"data-y-position":Yc,"data-x-position":Gc,"data-index":N,"data-front":Vt,"data-swiping":_e,"data-dismissible":ba,"data-type":Yt,"data-invert":gr,"data-swipe-out":qe,"data-swipe-direction":ue,"data-expanded":!!(H||te&&ae),style:{"--index":N,"--toasts-before":N,"--z-index":O.length-N,"--offset":`${fe?Wn:xt.current}px`,"--initial-height":te?"auto":`${Hl}px`,...ee,...x.style},onDragEnd:()=>{Oe(!1),ne(null),bt.current=null},onPointerDown:je=>{al||!ba||(ya.current=new Date,jn(xt.current),je.target.setPointerCapture(je.pointerId),je.target.tagName!=="BUTTON"&&(Oe(!0),bt.current={x:je.clientX,y:je.clientY}))},onPointerUp:()=>{var je,Qe,at,Gt;if(qe||!ba)return;bt.current=null;let Ot=Number(((je=xa.current)==null?void 0:je.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),ea=Number(((Qe=xa.current)==null?void 0:Qe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ta=new Date().getTime()-((at=ya.current)==null?void 0:at.getTime()),Xt=$==="x"?Ot:ea,qn=Math.abs(Xt)/ta;if(Math.abs(Xt)>=$N||qn>.11){jn(xt.current),(Gt=x.onDismiss)==null||Gt.call(x,x),X($==="x"?Ot>0?"right":"left":ea>0?"down":"up"),Bt(),yt(!0),Kt(!1);return}Oe(!1),ne(null)},onPointerMove:je=>{var Qe,at,Gt,Ot;if(!bt.current||!ba||((Qe=window.getSelection())==null?void 0:Qe.toString().length)>0)return;let ea=je.clientY-bt.current.y,ta=je.clientX-bt.current.x,Xt=(at=a.swipeDirections)!=null?at:XN(me);!$&&(Math.abs(ta)>1||Math.abs(ea)>1)&&ne(Math.abs(ta)>Math.abs(ea)?"x":"y");let qn={x:0,y:0};$==="y"?(Xt.includes("top")||Xt.includes("bottom"))&&(Xt.includes("top")&&ea<0||Xt.includes("bottom")&&ea>0)&&(qn.y=ea):$==="x"&&(Xt.includes("left")||Xt.includes("right"))&&(Xt.includes("left")&&ta<0||Xt.includes("right")&&ta>0)&&(qn.x=ta),(Math.abs(qn.x)>0||Math.abs(qn.y)>0)&&Kt(!0),(Gt=xa.current)==null||Gt.style.setProperty("--swipe-amount-x",`${qn.x}px`),(Ot=xa.current)==null||Ot.style.setProperty("--swipe-amount-y",`${qn.y}px`)}},Vc&&!x.jsx?re.createElement("button",{"aria-label":M,"data-disabled":al,"data-close-button":!0,onClick:al||!ba?()=>{}:()=>{var je;Bt(),(je=x.onDismiss)==null||je.call(x,x)},className:In(W==null?void 0:W.closeButton,(u=x==null?void 0:x.classNames)==null?void 0:u.closeButton)},(f=Z==null?void 0:Z.close)!=null?f:ON):null,x.jsx||p.isValidElement(x.title)?x.jsx?x.jsx:typeof x.title=="function"?x.title():x.title:re.createElement(re.Fragment,null,Yt||x.icon||x.promise?re.createElement("div",{"data-icon":"",className:In(W==null?void 0:W.icon,(h=x==null?void 0:x.classNames)==null?void 0:h.icon)},x.promise||x.type==="loading"&&!x.icon?x.icon||vr():null,x.type!=="loading"?x.icon||(Z==null?void 0:Z[Yt])||EN(Yt):null):null,re.createElement("div",{"data-content":"",className:In(W==null?void 0:W.content,(m=x==null?void 0:x.classNames)==null?void 0:m.content)},re.createElement("div",{"data-title":"",className:In(W==null?void 0:W.title,(g=x==null?void 0:x.classNames)==null?void 0:g.title)},typeof x.title=="function"?x.title():x.title),x.description?re.createElement("div",{"data-description":"",className:In(ie,qc,W==null?void 0:W.description,(v=x==null?void 0:x.classNames)==null?void 0:v.description)},typeof x.description=="function"?x.description():x.description):null),p.isValidElement(x.cancel)?x.cancel:x.cancel&&lc(x.cancel)?re.createElement("button",{"data-button":!0,"data-cancel":!0,style:x.cancelButtonStyle||se,onClick:je=>{var Qe,at;lc(x.cancel)&&ba&&((at=(Qe=x.cancel).onClick)==null||at.call(Qe,je),Bt())},className:In(W==null?void 0:W.cancelButton,(w=x==null?void 0:x.classNames)==null?void 0:w.cancelButton)},x.cancel.label):null,p.isValidElement(x.action)?x.action:x.action&&lc(x.action)?re.createElement("button",{"data-button":!0,"data-action":!0,style:x.actionButtonStyle||oe,onClick:je=>{var Qe,at;lc(x.action)&&((at=(Qe=x.action).onClick)==null||at.call(Qe,je),!je.defaultPrevented&&Bt())},className:In(W==null?void 0:W.actionButton,(S=x==null?void 0:x.classNames)==null?void 0:S.actionButton)},x.action.label):null))};function Qy(){if(typeof window>"u"||typeof document>"u")return"ltr";let a=document.documentElement.getAttribute("dir");return a==="auto"||!a?window.getComputedStyle(document.documentElement).direction:a}function ZN(a,l){let o={};return[a,l].forEach((i,u)=>{let f=u===1,h=f?"--mobile-offset":"--offset",m=f?YN:VN;function g(v){["top","right","bottom","left"].forEach(w=>{o[`${h}-${w}`]=typeof v=="number"?`${v}px`:v})}typeof i=="number"||typeof i=="string"?g(i):typeof i=="object"?["top","right","bottom","left"].forEach(v=>{i[v]===void 0?o[`${h}-${v}`]=m:o[`${h}-${v}`]=typeof i[v]=="number"?`${i[v]}px`:i[v]}):g(m)}),o}var FN=p.forwardRef(function(a,l){let{invert:o,position:i="bottom-right",hotkey:u=["altKey","KeyT"],expand:f,closeButton:h,className:m,offset:g,mobileOffset:v,theme:w="light",richColors:S,duration:b,style:x,visibleToasts:T=qN,toastOptions:j,dir:E=Qy(),gap:R=IN,loadingIcon:A,icons:N,containerAriaLabel:O="Notifications",pauseWhenPageIsHidden:H}=a,[P,z]=re.useState([]),U=re.useMemo(()=>Array.from(new Set([i].concat(P.filter(B=>B.position).map(B=>B.position)))),[P,i]),[ee,se]=re.useState([]),[oe,J]=re.useState(!1),[ie,ce]=re.useState(!1),[me,L]=re.useState(w!=="system"?w:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),I=re.useRef(null),te=u.join("+").replace(/Key/g,"").replace(/Digit/g,""),W=re.useRef(null),Z=re.useRef(!1),M=re.useCallback(B=>{z($=>{var ne;return(ne=$.find(ue=>ue.id===B.id))!=null&&ne.delete||an.dismiss(B.id),$.filter(({id:ue})=>ue!==B.id)})},[]);return re.useEffect(()=>an.subscribe(B=>{if(B.dismiss){z($=>$.map(ne=>ne.id===B.id?{...ne,delete:!0}:ne));return}setTimeout(()=>{mC.flushSync(()=>{z($=>{let ne=$.findIndex(ue=>ue.id===B.id);return ne!==-1?[...$.slice(0,ne),{...$[ne],...B},...$.slice(ne+1)]:[B,...$]})})})}),[]),re.useEffect(()=>{if(w!=="system"){L(w);return}if(w==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?L("dark"):L("light")),typeof window>"u")return;let B=window.matchMedia("(prefers-color-scheme: dark)");try{B.addEventListener("change",({matches:$})=>{L($?"dark":"light")})}catch{B.addListener(({matches:ne})=>{try{L(ne?"dark":"light")}catch(ue){console.error(ue)}})}},[w]),re.useEffect(()=>{P.length<=1&&J(!1)},[P]),re.useEffect(()=>{let B=$=>{var ne,ue;u.every(X=>$[X]||$.code===X)&&(J(!0),(ne=I.current)==null||ne.focus()),$.code==="Escape"&&(document.activeElement===I.current||(ue=I.current)!=null&&ue.contains(document.activeElement))&&J(!1)};return document.addEventListener("keydown",B),()=>document.removeEventListener("keydown",B)},[u]),re.useEffect(()=>{if(I.current)return()=>{W.current&&(W.current.focus({preventScroll:!0}),W.current=null,Z.current=!1)}},[I.current]),re.createElement("section",{ref:l,"aria-label":`${O} ${te}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},U.map((B,$)=>{var ne;let[ue,X]=B.split("-");return P.length?re.createElement("ol",{key:B,dir:E==="auto"?Qy():E,tabIndex:-1,ref:I,className:m,"data-sonner-toaster":!0,"data-theme":me,"data-y-position":ue,"data-lifted":oe&&P.length>1&&!f,"data-x-position":X,style:{"--front-toast-height":`${((ne=ee[0])==null?void 0:ne.height)||0}px`,"--width":`${GN}px`,"--gap":`${R}px`,...x,...ZN(g,v)},onBlur:ae=>{Z.current&&!ae.currentTarget.contains(ae.relatedTarget)&&(Z.current=!1,W.current&&(W.current.focus({preventScroll:!0}),W.current=null))},onFocus:ae=>{ae.target instanceof HTMLElement&&ae.target.dataset.dismissible==="false"||Z.current||(Z.current=!0,W.current=ae.relatedTarget)},onMouseEnter:()=>J(!0),onMouseMove:()=>J(!0),onMouseLeave:()=>{ie||J(!1)},onDragEnd:()=>J(!1),onPointerDown:ae=>{ae.target instanceof HTMLElement&&ae.target.dataset.dismissible==="false"||ce(!0)},onPointerUp:()=>ce(!1)},P.filter(ae=>!ae.position&&$===0||ae.position===B).map((ae,le)=>{var fe,De;return re.createElement(QN,{key:ae.id,icons:N,index:le,toast:ae,defaultRichColors:S,duration:(fe=j==null?void 0:j.duration)!=null?fe:b,className:j==null?void 0:j.className,descriptionClassName:j==null?void 0:j.descriptionClassName,invert:o,visibleToasts:T,closeButton:(De=j==null?void 0:j.closeButton)!=null?De:h,interacting:ie,position:B,style:j==null?void 0:j.style,unstyled:j==null?void 0:j.unstyled,classNames:j==null?void 0:j.classNames,cancelButtonStyle:j==null?void 0:j.cancelButtonStyle,actionButtonStyle:j==null?void 0:j.actionButtonStyle,removeToast:M,toasts:P.filter(_e=>_e.position==ae.position),heights:ee.filter(_e=>_e.position==ae.position),setHeights:se,expandByDefault:f,gap:R,loadingIcon:A,expanded:oe,pauseWhenPageIsHidden:H,swipeDirections:a.swipeDirections})})):null}))});function JN(){const{login:a}=uh(),[l,o]=p.useState("admin"),[i,u]=p.useState(""),[f,h]=p.useState(""),[m,g]=p.useState(""),[v,w]=p.useState(!1),[S,b]=p.useState(!1),x=vo(),T=sn();return s.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background p-4",children:s.jsxs(Ge,{className:"w-full max-w-sm",children:[s.jsxs(Ie,{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("img",{src:"/logo.png",alt:"LateDev Router",className:"h-8 w-8 object-contain"}),s.jsx($e,{children:"Sign in"})]}),s.jsx(on,{children:"Enter your admin credentials."})]}),s.jsxs(Ke,{className:"space-y-3",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx(Se,{children:"Username"}),s.jsx(Me,{value:l,onChange:j=>o(j.target.value),autoFocus:!0})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx(Se,{children:"Password"}),s.jsx(Me,{type:"password",value:i,onChange:j=>u(j.target.value)})]}),v&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx(Se,{children:"2FA code (or recovery code)"}),s.jsx(Me,{value:f,onChange:j=>h(j.target.value),placeholder:"123456",maxLength:6})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx(Se,{children:"Recovery code (alternative)"}),s.jsx(Me,{value:m,onChange:j=>g(j.target.value),placeholder:"ABCD12-EF3456"})]})]})]}),s.jsx("div",{className:"px-6 pb-6",children:s.jsx(ve,{className:"w-full",disabled:S,onClick:async()=>{var j,E;b(!0);try{if((await a(l,i,f||void 0,m||void 0)).totpRequired){w(!0);return}const A=((E=(j=T.state)==null?void 0:j.from)==null?void 0:E.pathname)??"/";x(A,{replace:!0})}catch(R){be.error(R.message)}finally{b(!1)}},children:"Sign in"})})]})})}function WN(){const[a,l]=p.useState("admin"),[o,i]=p.useState(""),[u,f]=p.useState(""),[h,m]=p.useState(!1),[g,v]=p.useState(!0),w=vo();p.useEffect(()=>{Ce.get("/api/admin/setup/status").then(x=>v(!x.masterKeyConfigured)).catch(()=>v(!0))},[]);const S=!g||u.trim().length>=32,b=!h&&o.length>=12&&S;return s.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background p-4",children:s.jsxs(Ge,{className:"w-full max-w-md",children:[s.jsxs(Ie,{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("img",{src:"/logo.png",alt:"LateDev Router",className:"h-8 w-8 object-contain rounded"}),s.jsx($e,{children:"Welcome to LateDev Router"})]}),s.jsx(on,{children:"Set up the administrator account to get started."})]}),s.jsxs(Ke,{className:"space-y-3",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx(Se,{children:"Username"}),s.jsx(Me,{value:a,onChange:x=>l(x.target.value)})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx(Se,{children:"Password (12+ chars)"}),s.jsx(Me,{type:"password",value:o,onChange:x=>i(x.target.value)})]}),g&&s.jsxs("div",{className:"space-y-1",children:[s.jsx(Se,{children:"Master encryption key (required, 32+ chars)"}),s.jsx(Me,{type:"password",value:u,onChange:x=>f(x.target.value),placeholder:"Paste or generate a 32+ character key"}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Provider API keys are encrypted with this key (AES-256-GCM). Store it somewhere safe — if it is lost, stored provider credentials cannot be recovered. Generate one with:"," ",s.jsx("code",{className:"break-all",children:`node -e "console.log(require('crypto').randomBytes(32).toString('base64'))"`})]})]})]}),s.jsx(x0,{children:s.jsx(ve,{disabled:!b,onClick:async()=>{m(!0);try{await Ce.post("/api/admin/setup",{username:a,password:o,setupMasterKey:g?u.trim():void 0}),be.success("Admin account created"),w("/login",{replace:!0})}catch(x){be.error(x.message)}finally{m(!1)}},children:"Create admin"})})]})})}function va({title:a,description:l,actions:o,className:i}){return s.jsxs("div",{className:Ee("mb-6 flex items-start justify-between gap-4",i),children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:a}),l&&s.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:l})]}),o&&s.jsx("div",{className:"flex items-center gap-2",children:o})]})}const eA=Yx("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",success:"border-transparent bg-emerald-600 text-white",warning:"border-transparent bg-amber-500 text-white",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function st({className:a,variant:l,...o}){return s.jsx("div",{className:Ee(eA({variant:l}),a),...o})}function tA(){const[a,l]=p.useState(null);return p.useEffect(()=>{Ce.get("/api/admin/dashboard").then(l).catch(()=>l(null))},[]),a?s.jsxs("div",{children:[s.jsx(va,{title:"Dashboard",description:"Operational summary for today",actions:s.jsxs("div",{className:"flex gap-2",children:[s.jsx(ve,{asChild:!0,variant:"outline",size:"sm",children:s.jsxs(oo,{to:"/providers",children:[s.jsx(Ai,{className:"mr-1 h-4 w-4"})," Provider"]})}),s.jsx(ve,{asChild:!0,variant:"outline",size:"sm",children:s.jsxs(oo,{to:"/combos",children:[s.jsx(Tx,{className:"mr-1 h-4 w-4"})," Combo"]})}),s.jsx(ve,{asChild:!0,variant:"outline",size:"sm",children:s.jsxs(oo,{to:"/api-keys",children:[s.jsx(Rx,{className:"mr-1 h-4 w-4"})," API Key"]})})]})}),s.jsxs("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:[s.jsxs(Ge,{children:[s.jsx(Ie,{className:"pb-1",children:s.jsx($e,{className:"text-sm text-muted-foreground",children:"Requests today"})}),s.jsx(Ke,{className:"text-2xl font-semibold",children:yn(a.today.total)})]}),s.jsxs(Ge,{children:[s.jsx(Ie,{className:"pb-1",children:s.jsx($e,{className:"text-sm text-muted-foreground",children:"Success rate"})}),s.jsx(Ke,{className:"text-2xl font-semibold",children:a.today.total?bi(a.today.success/a.today.total):"—"})]}),s.jsxs(Ge,{children:[s.jsx(Ie,{className:"pb-1",children:s.jsx($e,{className:"text-sm text-muted-foreground",children:"Failed"})}),s.jsx(Ke,{className:"text-2xl font-semibold",children:yn(a.today.failed)})]}),s.jsxs(Ge,{children:[s.jsx(Ie,{className:"pb-1",children:s.jsx($e,{className:"text-sm text-muted-foreground",children:"Tokens today"})}),s.jsx(Ke,{className:"text-2xl font-semibold",children:yn(a.today.totalTokens)})]})]}),s.jsxs("div",{className:"mt-6 grid gap-4 lg:grid-cols-2",children:[s.jsxs(Ge,{children:[s.jsxs(Ie,{children:[s.jsx($e,{className:"text-base",children:"Provider health"}),s.jsxs(on,{children:[a.providers.length," configured"]})]}),s.jsxs(Ke,{className:"space-y-2",children:[a.providers.length===0&&s.jsxs("p",{className:"text-sm text-muted-foreground",children:["No providers yet. ",s.jsx(oo,{to:"/providers",className:"text-primary",children:"Add one"}),"."]}),a.providers.map(o=>s.jsxs("div",{className:"flex items-center justify-between rounded border p-2 text-sm",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Nx,{className:"h-4 w-4 text-muted-foreground"}),s.jsx("span",{className:"font-medium",children:o.name}),s.jsx("span",{className:"text-xs text-muted-foreground",children:o.slug}),s.jsx(st,{variant:"outline",className:"ml-2",children:o.type})]}),s.jsx(st,{variant:o.health==="healthy"?"success":o.health==="down"?"destructive":"secondary",children:o.health})]},o.id))]})]}),s.jsxs(Ge,{children:[s.jsxs(Ie,{children:[s.jsx($e,{className:"text-base",children:"Recent failures"}),s.jsx(on,{children:"Today"})]}),s.jsxs(Ke,{className:"space-y-1 text-sm",children:[a.recentFailures.length===0&&s.jsx("p",{className:"text-muted-foreground",children:"No failures today."}),a.recentFailures.map(o=>{var i;return s.jsxs("div",{className:"flex items-center justify-between border-b py-1 last:border-0",children:[s.jsxs("div",{children:[s.jsx("span",{className:"font-mono text-xs",children:o.requestedModel}),s.jsxs("div",{className:"text-xs text-muted-foreground",children:[o.errorType??`HTTP ${o.httpStatus}`," — ",(i=o.errorMessage)==null?void 0:i.slice(0,60)]})]}),s.jsx("span",{className:"text-xs text-muted-foreground",children:fh(o.createdAt)})]},o.id)})]})]})]})]}):s.jsx("div",{className:"text-muted-foreground",children:"Loading…"})}const Xn=p.forwardRef(({className:a,...l},o)=>s.jsx("div",{className:"relative w-full overflow-auto",children:s.jsx("table",{ref:o,className:Ee("w-full caption-bottom text-sm",a),...l})}));Xn.displayName="Table";const Qn=p.forwardRef(({className:a,...l},o)=>s.jsx("thead",{ref:o,className:Ee("[&_tr]:border-b",a),...l}));Qn.displayName="TableHeader";const Zn=p.forwardRef(({className:a,...l},o)=>s.jsx("tbody",{ref:o,className:Ee("[&_tr:last-child]:border-0",a),...l}));Zn.displayName="TableBody";const Ze=p.forwardRef(({className:a,...l},o)=>s.jsx("tr",{ref:o,className:Ee("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",a),...l}));Ze.displayName="TableRow";const ge=p.forwardRef(({className:a,...l},o)=>s.jsx("th",{ref:o,className:Ee("h-10 px-2 text-left align-middle font-medium text-muted-foreground",a),...l}));ge.displayName="TableHead";const de=p.forwardRef(({className:a,...l},o)=>s.jsx("td",{ref:o,className:Ee("p-2 align-middle",a),...l}));de.displayName="TableCell";var nA=Object.defineProperty,wn=(a,l)=>nA(a,"name",{value:l,configurable:!0}),zh="Dialog",[b0,S0]=cn(zh),[aA,Jn]=b0(zh),w0=wn(a=>{const{__scopeDialog:l,children:o,open:i,defaultOpen:u,onOpenChange:f,modal:h=!0}=a,m=p.useRef(null),g=p.useRef(null),[v,w]=Xa({prop:i,defaultProp:u??!1,onChange:f,caller:zh}),[S,b]=p.useState(0),[x,T]=p.useState(0);return s.jsx(aA,{scope:l,triggerRef:m,contentRef:g,contentId:ca(),titleId:ca(),descriptionId:ca(),titlePresent:S>0,descriptionPresent:x>0,setTitleCount:b,setDescriptionCount:T,open:v,onOpenChange:w,onOpenToggle:p.useCallback(()=>w(j=>!j),[w]),modal:h,children:o})},"Dialog"),lA="DialogTrigger",j0=p.forwardRef(wn(function(l,o){const{__scopeDialog:i,...u}=l,f=Jn(lA,i),h=Pe(o,f.triggerRef);return s.jsx(Le.button,{type:"button","aria-haspopup":"dialog","aria-expanded":f.open,"aria-controls":f.open?f.contentId:void 0,"data-state":Uc(f.open),...u,ref:h,onClick:xe(l.onClick,f.onOpenToggle)})},"DialogTrigger")),C0="DialogPortal",[rA,E0]=b0(C0,{forceMount:void 0}),R0=wn(a=>{const{__scopeDialog:l,forceMount:o,children:i,container:u}=a,f=Jn(C0,l);return s.jsx(rA,{scope:l,forceMount:o,children:p.Children.map(i,h=>s.jsx(Wa,{present:o||f.open,children:s.jsx(Th,{asChild:!0,container:u,children:h})}))})},"DialogPortal"),Zf="DialogOverlay",kh=p.forwardRef(wn(function(l,o){const i=E0(Zf,l.__scopeDialog),{forceMount:u=i.forceMount,...f}=l,h=Jn(Zf,l.__scopeDialog);return h.modal?s.jsx(Wa,{present:u||h.open,children:s.jsx(iA,{...f,ref:o})}):null},"DialogOverlay")),oA=ha("DialogOverlay.RemoveScroll"),iA=p.forwardRef(wn(function(l,o){const{__scopeDialog:i,...u}=l,f=Jn(Zf,i),h=ab(),m=Pe(o,h);return s.jsx(kc,{as:oA,allowPinchZoom:!0,shards:[f.contentRef],children:s.jsx(Le.div,{"data-state":Uc(f.open),...u,ref:m,style:{pointerEvents:"auto",...u.style}})})},"DialogOverlayImpl")),Ei="DialogContent",Lh=p.forwardRef(wn(function(l,o){const i=E0(Ei,l.__scopeDialog),{forceMount:u=i.forceMount,...f}=l,h=Jn(Ei,l.__scopeDialog);return s.jsx(Wa,{present:u||h.open,children:h.modal?s.jsx(sA,{...f,ref:o}):s.jsx(cA,{...f,ref:o})})},"DialogContent")),sA=p.forwardRef(wn(function(l,o){const i=Jn(Ei,l.__scopeDialog),u=p.useRef(null),f=Pe(o,i.contentRef,u);return p.useEffect(()=>{const h=u.current;if(h)return Mh(h)},[]),s.jsx(T0,{...l,ref:f,trapFocus:i.open,disableOutsidePointerEvents:i.open,onCloseAutoFocus:xe(l.onCloseAutoFocus,h=>{var m;h.preventDefault(),(m=i.triggerRef.current)==null||m.focus()}),onPointerDownOutside:xe(l.onPointerDownOutside,h=>{const m=h.detail.originalEvent,g=m.button===0&&m.ctrlKey===!0;(m.button===2||g)&&h.preventDefault()}),onFocusOutside:xe(l.onFocusOutside,h=>h.preventDefault())})},"DialogContentModal")),cA=p.forwardRef(wn(function(l,o){const i=Jn(Ei,l.__scopeDialog),u=p.useRef(!1),f=p.useRef(!1);return s.jsx(T0,{...l,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:h=>{var m,g;(m=l.onCloseAutoFocus)==null||m.call(l,h),h.defaultPrevented||(u.current||(g=i.triggerRef.current)==null||g.focus(),h.preventDefault()),u.current=!1,f.current=!1},onInteractOutside:h=>{var v,w;(v=l.onInteractOutside)==null||v.call(l,h),h.defaultPrevented||(u.current=!0,h.detail.originalEvent.type==="pointerdown"&&(f.current=!0));const m=h.target;((w=i.triggerRef.current)==null?void 0:w.contains(m))&&h.preventDefault(),h.detail.originalEvent.type==="focusin"&&f.current&&h.preventDefault()}})},"DialogContentNonModal")),T0=p.forwardRef(wn(function(l,o){const{__scopeDialog:i,trapFocus:u,onOpenAutoFocus:f,onCloseAutoFocus:h,...m}=l,g=Jn(Ei,i);return Oi(),s.jsx(s.Fragment,{children:s.jsx(yh,{asChild:!0,loop:!0,trapped:u,onMountAutoFocus:f,onUnmountAutoFocus:h,children:s.jsx(Cc,{role:"dialog",id:g.contentId,"aria-describedby":g.descriptionPresent?g.descriptionId:void 0,"aria-labelledby":g.titlePresent?g.titleId:void 0,"data-state":Uc(g.open),...m,ref:o,deferPointerDownOutside:!0,onDismiss:()=>g.onOpenChange(!1)})})})},"DialogContentImpl")),uA="DialogTitle",Uh=p.forwardRef(wn(function(l,o){const{__scopeDialog:i,...u}=l,f=Jn(uA,i),{setTitleCount:h}=f;return Tt(()=>(h(m=>m+1),()=>h(m=>m-1)),[h]),s.jsx(Le.h2,{id:f.titleId,...u,ref:o})},"DialogTitle")),dA="DialogDescription",Hh=p.forwardRef(wn(function(l,o){const{__scopeDialog:i,...u}=l,f=Jn(dA,i),{setDescriptionCount:h}=f;return Tt(()=>(h(m=>m+1),()=>h(m=>m-1)),[h]),s.jsx(Le.p,{id:f.descriptionId,...u,ref:o})},"DialogDescription")),fA="DialogClose",Bh=p.forwardRef(wn(function(l,o){const{__scopeDialog:i,...u}=l,f=Jn(fA,i);return s.jsx(Le.button,{type:"button",...u,ref:o,onClick:xe(l.onClick,()=>f.onOpenChange(!1))})},"DialogClose"));function Uc(a){return a?"open":"closed"}wn(Uc,"getState");const Ga=w0,zi=j0,hA=R0,N0=p.forwardRef(({className:a,...l},o)=>s.jsx(kh,{ref:o,className:Ee("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...l}));N0.displayName=kh.displayName;const ua=p.forwardRef(({className:a,children:l,...o},i)=>s.jsxs(hA,{children:[s.jsx(N0,{}),s.jsxs(Lh,{ref:i,className:Ee("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 sm:rounded-lg",a),...o,children:[l,s.jsxs(Bh,{className:"absolute right-4 top-4 rounded-sm opacity-70 hover:opacity-100",children:[s.jsx(BC,{className:"h-4 w-4"}),s.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ua.displayName=Lh.displayName;const da=({className:a,...l})=>s.jsx("div",{className:Ee("flex flex-col space-y-1.5 text-center sm:text-left",a),...l});da.displayName="DialogHeader";const Ia=({className:a,...l})=>s.jsx("div",{className:Ee("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",a),...l});Ia.displayName="DialogFooter";const fa=p.forwardRef(({className:a,...l},o)=>s.jsx(Uh,{ref:o,className:Ee("text-lg font-semibold leading-none tracking-tight",a),...l}));fa.displayName=Uh.displayName;const Ff=p.forwardRef(({className:a,...l},o)=>s.jsx(Hh,{ref:o,className:Ee("text-sm text-muted-foreground",a),...l}));Ff.displayName=Hh.displayName;var mA=Object.defineProperty,el=(a,l)=>mA(a,"name",{value:l,configurable:!0}),pA="AlertDialog",[gA,D_]=cn(pA,[S0]),tl=S0(),vA=el(a=>{const{__scopeAlertDialog:l,...o}=a,i=tl(l);return s.jsx(w0,{...i,...o,modal:!0})},"AlertDialog"),yA=p.forwardRef(el(function(l,o){const{__scopeAlertDialog:i,...u}=l,f=tl(i);return s.jsx(j0,{...f,...u,ref:o})},"AlertDialogTrigger")),xA=el(a=>{const{__scopeAlertDialog:l,...o}=a,i=tl(l);return s.jsx(R0,{...i,...o})},"AlertDialogPortal"),bA=p.forwardRef(el(function(l,o){const{__scopeAlertDialog:i,...u}=l,f=tl(i);return s.jsx(kh,{...f,...u,ref:o})},"AlertDialogOverlay")),SA="AlertDialogContent",[wA,jA]=gA(SA),CA=p.forwardRef(el(function(l,o){const{__scopeAlertDialog:i,children:u,...f}=l,h=tl(i),m=p.useRef(null),g=Pe(o,m),v=p.useRef(null);return s.jsx(wA,{scope:i,cancelRef:v,children:s.jsx(Lh,{role:"alertdialog",...h,...f,ref:g,onOpenAutoFocus:xe(f.onOpenAutoFocus,w=>{var S;w.preventDefault(),(S=v.current)==null||S.focus({preventScroll:!0})}),onPointerDownOutside:w=>w.preventDefault(),onInteractOutside:w=>w.preventDefault(),children:u})})},"AlertDialogContent")),EA=p.forwardRef(el(function(l,o){const{__scopeAlertDialog:i,...u}=l,f=tl(i);return s.jsx(Uh,{...f,...u,ref:o})},"AlertDialogTitle")),RA=p.forwardRef(el(function(l,o){const{__scopeAlertDialog:i,...u}=l,f=tl(i);return s.jsx(Hh,{...f,...u,ref:o})},"AlertDialogDescription")),TA=p.forwardRef(el(function(l,o){const{__scopeAlertDialog:i,...u}=l,f=tl(i);return s.jsx(Bh,{...f,...u,ref:o})},"AlertDialogAction")),NA="AlertDialogCancel",AA=p.forwardRef(el(function(l,o){const{__scopeAlertDialog:i,...u}=l,{cancelRef:f}=jA(NA,i),h=tl(i),m=Pe(o,f);return s.jsx(Bh,{...h,...u,ref:m})},"AlertDialogCancel")),MA=vA,_A=yA,OA=xA,A0=bA,M0=CA,_0=TA,O0=AA,D0=EA,z0=RA;const k0=MA,DA=_A,zA=OA,L0=p.forwardRef(({className:a,...l},o)=>s.jsx(A0,{ref:o,className:Ee("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...l}));L0.displayName=A0.displayName;const Ph=p.forwardRef(({className:a,...l},o)=>s.jsxs(zA,{children:[s.jsx(L0,{}),s.jsx(M0,{ref:o,className:Ee("fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg sm:max-w-[425px]",a),...l})]}));Ph.displayName=M0.displayName;const U0=({className:a,...l})=>s.jsx("div",{className:Ee("flex flex-col space-y-2 text-center sm:text-left",a),...l}),H0=({className:a,...l})=>s.jsx("div",{className:Ee("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",a),...l}),qh=p.forwardRef(({className:a,...l},o)=>s.jsx(D0,{ref:o,className:Ee("text-lg font-semibold",a),...l}));qh.displayName=D0.displayName;const Vh=p.forwardRef(({className:a,...l},o)=>s.jsx(z0,{ref:o,className:Ee("text-sm text-muted-foreground",a),...l}));Vh.displayName=z0.displayName;const Yh=p.forwardRef(({className:a,...l},o)=>s.jsx(_0,{ref:o,className:Ee("inline-flex h-9 items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90",a),...l}));Yh.displayName=_0.displayName;const Gh=p.forwardRef(({className:a,...l},o)=>s.jsx(O0,{ref:o,className:Ee("inline-flex h-9 items-center justify-center rounded-md border border-input bg-background px-4 py-2 text-sm font-medium hover:bg-accent",a),...l}));Gh.displayName=O0.displayName;var kA=Object.defineProperty,LA=(a,l)=>kA(a,"name",{value:l,configurable:!0});function Jf(a,[l,o]){return Math.min(o,Math.max(l,a))}LA(Jf,"clamp");var UA=Object.defineProperty,HA=(a,l)=>UA(a,"name",{value:l,configurable:!0});function B0(a){const l=p.useRef({value:a,previous:a});return p.useMemo(()=>(l.current.value!==a&&(l.current.previous=l.current.value,l.current.value=a),l.current.previous),[a])}HA(B0,"usePrevious");var BA=Object.defineProperty,PA=(a,l)=>BA(a,"name",{value:l,configurable:!0}),P0=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),qA=p.forwardRef(PA(function(l,o){return s.jsx(Le.span,{...l,ref:o,style:{...P0,...l.style}})},"VisuallyHidden")),VA=qA,YA=Object.defineProperty,nt=(a,l)=>YA(a,"name",{value:l,configurable:!0}),GA=[" ","Enter","ArrowUp","ArrowDown"],IA=[" ","Enter"],fo="Select",[Hc,Ih,$A]=jc(fo),[mr,z_]=cn(fo,[$A,jo]),$h=jo(),[KA,Ul]=mr(fo),[XA,QA]=mr(fo);function q0(a){const{__scopeSelect:l,children:o,open:i,defaultOpen:u,onOpenChange:f,value:h,defaultValue:m,onValueChange:g,dir:v,name:w,autoComplete:S,disabled:b,required:x,form:T,internal_do_not_use_render:j}=a,E=$h(l),[R,A]=p.useState(null),[N,O]=p.useState(null),[H,P]=p.useState(!1),z=_i(v),[U,ee]=Xa({prop:i,defaultProp:u??!1,onChange:f,caller:fo}),[se,oe]=Xa({prop:h,defaultProp:m,onChange:g,caller:fo}),J=p.useRef(null),ie=p.useRef(se);p.useEffect(()=>{const B=T?R==null?void 0:R.ownerDocument.getElementById(T):R==null?void 0:R.form;if(B instanceof HTMLFormElement){const $=nt(()=>oe(ie.current),"reset");return B.addEventListener("reset",$),()=>B.removeEventListener("reset",$)}},[T,R,oe]);const ce=R?!!T||!!R.closest("form"):!0,[me,L]=p.useState(new Set),I=ca(),te=Array.from(me).map(B=>B.props.value).join(";"),W=p.useCallback(B=>{L($=>new Set($).add(B))},[]),Z=p.useCallback(B=>{L($=>{const ne=new Set($);return ne.delete(B),ne})},[]),M={required:x,trigger:R,onTriggerChange:A,valueNode:N,onValueNodeChange:O,valueNodeHasChildren:H,onValueNodeHasChildrenChange:P,contentId:I,value:se,onValueChange:oe,open:U,onOpenChange:ee,dir:z,triggerPointerDownPosRef:J,disabled:b,name:w,autoComplete:S,form:T,nativeOptions:me,nativeSelectKey:te,isFormControl:ce};return s.jsx(Nb,{...E,children:s.jsx(KA,{scope:l,...M,children:s.jsx(Hc.Provider,{scope:l,children:s.jsx(XA,{scope:l,onNativeOptionAdd:W,onNativeOptionRemove:Z,children:K0(j)?j(M):o})})})})}nt(q0,"SelectProvider");var ZA=nt(a=>{const{__scopeSelect:l,children:o,...i}=a;return s.jsx(q0,{__scopeSelect:l,...i,internal_do_not_use_render:({isFormControl:u})=>s.jsxs(s.Fragment,{children:[o,u?s.jsx(yM,{__scopeSelect:l}):null]})})},"Select"),FA="SelectTrigger",V0=p.forwardRef(nt(function(l,o){const{__scopeSelect:i,disabled:u=!1,...f}=l,h=$h(i),m=Ul(FA,i),g=m.disabled||u,v=Pe(o,m.onTriggerChange),w=Ih(i),S=p.useRef("touch"),[b,x,T]=Kh(E=>{const R=w().filter(O=>!O.disabled),A=R.find(O=>O.value===m.value),N=Xh(R,E,A);N!==void 0&&m.onValueChange(N.value)}),j=nt(E=>{g||(m.onOpenChange(!0),T()),E&&(m.triggerPointerDownPosRef.current={x:Math.round(E.pageX),y:Math.round(E.pageY)})},"handleOpen");return s.jsx(Ab,{asChild:!0,...h,children:s.jsx(Le.button,{type:"button",role:"combobox","aria-controls":m.open?m.contentId:void 0,"aria-expanded":m.open,"aria-required":m.required,"aria-autocomplete":"none",dir:m.dir,"data-state":m.open?"open":"closed",disabled:g,"data-disabled":g?"":void 0,"data-placeholder":ki(m.value)?"":void 0,...f,ref:v,onClick:xe(f.onClick,E=>{E.currentTarget.focus(),S.current!=="mouse"&&j(E)}),onPointerDown:xe(f.onPointerDown,E=>{S.current=E.pointerType;const R=E.target;R.hasPointerCapture(E.pointerId)&&R.releasePointerCapture(E.pointerId),E.button===0&&E.ctrlKey===!1&&E.pointerType==="mouse"&&(j(E),E.preventDefault())}),onKeyDown:xe(f.onKeyDown,E=>{const R=b.current!=="";!(E.ctrlKey||E.altKey||E.metaKey)&&E.key.length===1&&x(E.key),!(R&&E.key===" ")&&GA.includes(E.key)&&(j(),E.preventDefault())})})})},"SelectTrigger")),JA="SelectValue",WA=p.forwardRef(nt(function(l,o){const{__scopeSelect:i,className:u,style:f,children:h,placeholder:m="",...g}=l,v=Ul(JA,i),{onValueNodeHasChildrenChange:w}=v,S=h!==void 0,b=Pe(o,v.onValueNodeChange);Tt(()=>{w(S)},[w,S]);const x=ki(v.value);return s.jsx(Le.span,{...g,asChild:x?!1:g.asChild,ref:b,style:{pointerEvents:"none"},children:s.jsx(p.Fragment,{children:x?m:h},x?"placeholder":"value")})},"SelectValue")),eM=p.forwardRef(nt(function(l,o){const{__scopeSelect:i,children:u,...f}=l;return s.jsx(Le.span,{"aria-hidden":!0,...f,ref:o,children:u||"▼"})},"SelectIcon")),tM="SelectPortal",[nM,aM]=mr(tM,{forceMount:void 0}),lM=nt(a=>{const{__scopeSelect:l,forceMount:o,...i}=a;return s.jsx(nM,{scope:a.__scopeSelect,forceMount:o,children:s.jsx(Th,{asChild:!0,...i})})},"SelectPortal"),sr="SelectContent",Y0=p.forwardRef(nt(function(l,o){const i=aM(sr,l.__scopeSelect),{forceMount:u=i.forceMount,...f}=l,h=Ul(sr,l.__scopeSelect),[m,g]=p.useState();return Tt(()=>{g(new DocumentFragment)},[]),s.jsx(Wa,{present:u||h.open,children:({present:v})=>v?s.jsx(iM,{...f,ref:o}):s.jsx(rM,{...f,fragment:m})})},"SelectContent")),rM=p.forwardRef(nt(function(l,o){const{__scopeSelect:i,children:u,fragment:f}=l;return f?yo.createPortal(s.jsx(G0,{scope:i,children:s.jsx(Hc.Slot,{scope:i,children:s.jsx("div",{ref:o,children:u})})}),f):null},"SelectContentFragment")),$n=10,[G0,Bc]=mr(sr),oM=ha("SelectContent.RemoveScroll"),iM=p.forwardRef(nt(function(l,o){const{__scopeSelect:i}=l,{position:u="item-aligned",onCloseAutoFocus:f,onEscapeKeyDown:h,onPointerDownOutside:m,side:g,sideOffset:v,align:w,alignOffset:S,arrowPadding:b,collisionBoundary:x,collisionPadding:T,sticky:j,hideWhenDetached:E,avoidCollisions:R,...A}=l,N=Ul(sr,i),[O,H]=p.useState(null),[P,z]=p.useState(null),U=Pe(o,H),[ee,se]=p.useState(null),[oe,J]=p.useState(null),ie=Ih(i),[ce,me]=p.useState(!1),L=p.useRef(!1);p.useEffect(()=>{if(O)return Mh(O)},[O]),Oi();const I=p.useCallback(le=>{const[fe,...De]=ie().map(qe=>qe.ref.current),[_e]=De.slice(-1),Oe=document.activeElement;for(const qe of le)if(qe===Oe||(qe==null||qe.scrollIntoView({block:"nearest"}),qe===fe&&P&&(P.scrollTop=0),qe===_e&&P&&(P.scrollTop=P.scrollHeight),qe==null||qe.focus(),document.activeElement!==Oe))return},[ie,P]),te=p.useCallback(()=>I([ee,O]),[I,ee,O]);p.useEffect(()=>{ce&&te()},[ce,te]);const{onOpenChange:W,triggerPointerDownPosRef:Z}=N;p.useEffect(()=>{if(O){let le={x:0,y:0};const fe=nt(_e=>{var Oe,qe;le={x:Math.abs(Math.round(_e.pageX)-(((Oe=Z.current)==null?void 0:Oe.x)??0)),y:Math.abs(Math.round(_e.pageY)-(((qe=Z.current)==null?void 0:qe.y)??0))}},"handlePointerMove"),De=nt(_e=>{le.x<=10&&le.y<=10?_e.preventDefault():_e.composedPath().includes(O)||W(!1),document.removeEventListener("pointermove",fe),Z.current=null},"handlePointerUp");return Z.current!==null&&(document.addEventListener("pointermove",fe),document.addEventListener("pointerup",De,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",fe),document.removeEventListener("pointerup",De,{capture:!0})}}},[O,W,Z]),p.useEffect(()=>{const le=nt(()=>W(!1),"close");return window.addEventListener("blur",le),window.addEventListener("resize",le),()=>{window.removeEventListener("blur",le),window.removeEventListener("resize",le)}},[W]);const[M,B]=Kh(le=>{const fe=ie().filter(Oe=>!Oe.disabled),De=fe.find(Oe=>Oe.ref.current===document.activeElement),_e=Xh(fe,le,De);_e&&setTimeout(()=>{var Oe;return(Oe=_e.ref.current)==null?void 0:Oe.focus()})}),$=p.useCallback((le,fe,De)=>{const _e=!L.current&&!De;(N.value!==void 0&&N.value===fe||_e)&&(se(le),_e&&(L.current=!0))},[N.value]),ne=p.useCallback(()=>O==null?void 0:O.focus(),[O]),ue=p.useCallback((le,fe,De)=>{const _e=!L.current&&!De;(N.value!==void 0&&N.value===fe||_e)&&J(le)},[N.value]),X=u==="popper"?Zy:sM,ae=X===Zy?{side:g,sideOffset:v,align:w,alignOffset:S,arrowPadding:b,collisionBoundary:x,collisionPadding:T,sticky:j,hideWhenDetached:E,avoidCollisions:R}:{};return s.jsx(G0,{scope:i,content:O,viewport:P,onViewportChange:z,itemRefCallback:$,selectedItem:ee,onItemLeave:ne,itemTextRefCallback:ue,focusSelectedItem:te,selectedItemText:oe,position:u,isPositioned:ce,searchRef:M,children:s.jsx(kc,{as:oM,allowPinchZoom:!0,children:s.jsx(yh,{asChild:!0,trapped:N.open,onMountAutoFocus:le=>{le.preventDefault()},onUnmountAutoFocus:xe(f,le=>{var fe;(fe=N.trigger)==null||fe.focus({preventScroll:!0}),le.preventDefault()}),children:s.jsx(Cc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:h,onPointerDownOutside:m,onFocusOutside:le=>le.preventDefault(),onDismiss:()=>N.onOpenChange(!1),children:s.jsx(X,{role:"listbox",id:N.contentId,"data-state":N.open?"open":"closed",dir:N.dir,onContextMenu:le=>le.preventDefault(),...A,...ae,onPlaced:()=>me(!0),ref:U,style:{display:"flex",flexDirection:"column",outline:"none",...A.style},onKeyDown:xe(A.onKeyDown,le=>{const fe=le.ctrlKey||le.altKey||le.metaKey;if(le.key==="Tab"&&le.preventDefault(),!fe&&le.key.length===1&&B(le.key),["ArrowUp","ArrowDown","Home","End"].includes(le.key)){let _e=ie().filter(Oe=>!Oe.disabled).map(Oe=>Oe.ref.current);if(["ArrowUp","End"].includes(le.key)&&(_e=_e.slice().reverse()),["ArrowUp","ArrowDown"].includes(le.key)){const Oe=le.target,qe=_e.indexOf(Oe);_e=_e.slice(qe+1)}setTimeout(()=>I(_e)),le.preventDefault()}})})})})})})},"SelectContentImpl")),sM=p.forwardRef(nt(function(l,o){const{__scopeSelect:i,onPlaced:u,...f}=l,h=Ul(sr,i),m=Bc(sr,i),[g,v]=p.useState(null),[w,S]=p.useState(null),b=Pe(o,S),x=Ih(i),T=p.useRef(!1),j=p.useRef(!0),{viewport:E,selectedItem:R,selectedItemText:A,focusSelectedItem:N}=m,O=p.useCallback(()=>{if(h.trigger&&h.valueNode&&g&&w&&E&&R&&A){const U=h.trigger.getBoundingClientRect(),ee=w.getBoundingClientRect(),se=h.valueNode.getBoundingClientRect(),oe=A.getBoundingClientRect();if(h.dir!=="rtl"){const Oe=oe.left-ee.left,qe=se.left-Oe,yt=U.left-qe,Ht=U.width+yt,Kt=Math.max(Ht,ee.width),Wn=window.innerWidth-$n,jn=Jf(qe,[$n,Math.max($n,Wn-Kt)]);g.style.minWidth=Ht+"px",g.style.left=jn+"px"}else{const Oe=ee.right-oe.right,qe=window.innerWidth-se.right-Oe,yt=window.innerWidth-U.right-qe,Ht=U.width+yt,Kt=Math.max(Ht,ee.width),Wn=window.innerWidth-$n,jn=Jf(qe,[$n,Math.max($n,Wn-Kt)]);g.style.minWidth=Ht+"px",g.style.right=jn+"px"}const J=x(),ie=window.innerHeight-$n*2,ce=E.scrollHeight,me=window.getComputedStyle(w),L=parseInt(me.borderTopWidth,10),I=parseInt(me.paddingTop,10),te=parseInt(me.borderBottomWidth,10),W=parseInt(me.paddingBottom,10),Z=L+I+ce+W+te,M=Math.min(R.offsetHeight*5,Z),B=window.getComputedStyle(E),$=parseInt(B.paddingTop,10),ne=parseInt(B.paddingBottom,10),ue=U.top+U.height/2-$n,X=ie-ue,ae=R.offsetHeight/2,le=R.offsetTop+ae,fe=L+I+le,De=Z-fe;if(fe<=ue){const Oe=J.length>0&&R===J[J.length-1].ref.current;g.style.bottom="0px";const qe=w.clientHeight-E.offsetTop-E.offsetHeight,yt=Math.max(X,ae+(Oe?ne:0)+qe+te),Ht=fe+yt;g.style.height=Ht+"px"}else{const Oe=J.length>0&&R===J[0].ref.current;g.style.top="0px";const yt=Math.max(ue,L+E.offsetTop+(Oe?$:0)+ae)+De;g.style.height=yt+"px",E.scrollTop=fe-ue+E.offsetTop}g.style.margin=`${$n}px 0`,g.style.minHeight=M+"px",g.style.maxHeight=ie+"px",u==null||u(),requestAnimationFrame(()=>T.current=!0)}},[x,h.trigger,h.valueNode,g,w,E,R,A,h.dir,u]);Tt(()=>O(),[O]);const[H,P]=p.useState();Tt(()=>{w&&P(window.getComputedStyle(w).zIndex)},[w]);const z=p.useCallback(U=>{U&&j.current===!0&&(O(),N==null||N(),j.current=!1)},[O,N]);return s.jsx(cM,{scope:i,contentWrapper:g,shouldExpandOnScrollRef:T,onScrollButtonChange:z,children:s.jsx("div",{ref:v,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:H},children:s.jsx(Le.div,{...f,ref:b,style:{boxSizing:"border-box",maxHeight:"100%",...f.style}})})})},"SelectItemAlignedPosition")),Zy=p.forwardRef(nt(function(l,o){const{__scopeSelect:i,align:u="start",collisionPadding:f=$n,...h}=l,m=$h(i);return s.jsx(Rh,{...m,...h,ref:o,align:u,collisionPadding:f,style:{boxSizing:"border-box",...h.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})},"SelectPopperPosition")),[cM,uM]=mr(sr,{}),Fy="SelectViewport",dM=p.forwardRef(nt(function(l,o){const{__scopeSelect:i,nonce:u,...f}=l,h=Bc(Fy,i),m=uM(Fy,i),g=Pe(o,h.onViewportChange),v=p.useRef(0);return s.jsxs(s.Fragment,{children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:u}),s.jsx(Hc.Slot,{scope:i,children:s.jsx(Le.div,{"data-radix-select-viewport":"",role:"presentation",...f,ref:g,style:{position:"relative",flex:1,overflow:"hidden auto",...f.style},onScroll:xe(f.onScroll,w=>{const S=w.currentTarget,{contentWrapper:b,shouldExpandOnScrollRef:x}=m;if(x!=null&&x.current&&b){const T=Math.abs(v.current-S.scrollTop);if(T>0){const j=window.innerHeight-$n*2,E=parseFloat(b.style.minHeight),R=parseFloat(b.style.height),A=Math.max(E,R);if(A<j){const N=A+T,O=Math.min(j,N),H=N-O;b.style.height=O+"px",b.style.bottom==="0px"&&(S.scrollTop=H>0?H:0,b.style.justifyContent="flex-end")}}}v.current=S.scrollTop})})})]})},"SelectViewport")),fM="SelectGroup",[k_,L_]=mr(fM),Wf="SelectItem",[hM,I0]=mr(Wf),$0=p.forwardRef(nt(function(l,o){const{__scopeSelect:i,value:u,disabled:f=!1,textValue:h,...m}=l,g=Ul(Wf,i),v=Bc(Wf,i),w=g.value===u,[S,b]=p.useState(h??""),[x,T]=p.useState(!1),j=Hn(O=>{var H;return(H=v.itemRefCallback)==null?void 0:H.call(v,O,u,f)}),E=Pe(o,j),R=ca(),A=p.useRef("touch"),N=nt(()=>{f||(g.onValueChange(u),g.onOpenChange(!1))},"handleSelect");return s.jsx(hM,{scope:i,value:u,disabled:f,textId:R,isSelected:w,onItemTextChange:p.useCallback(O=>{b(H=>H||((O==null?void 0:O.textContent)??"").trim())},[]),children:s.jsx(Hc.ItemSlot,{scope:i,value:u,disabled:f,textValue:S,children:s.jsx(Le.div,{role:"option","aria-labelledby":R,"data-highlighted":x?"":void 0,"aria-selected":w&&x,"data-state":w?"checked":"unchecked","aria-disabled":f||void 0,"data-disabled":f?"":void 0,tabIndex:f?void 0:-1,...m,ref:E,onFocus:xe(m.onFocus,()=>T(!0)),onBlur:xe(m.onBlur,()=>T(!1)),onClick:xe(m.onClick,()=>{A.current!=="mouse"&&N()}),onPointerUp:xe(m.onPointerUp,()=>{A.current==="mouse"&&N()}),onPointerDown:xe(m.onPointerDown,O=>{A.current=O.pointerType}),onPointerMove:xe(m.onPointerMove,O=>{var H;A.current=O.pointerType,f?(H=v.onItemLeave)==null||H.call(v):A.current==="mouse"&&O.currentTarget.focus({preventScroll:!0})}),onPointerLeave:xe(m.onPointerLeave,O=>{var H;O.currentTarget===document.activeElement&&((H=v.onItemLeave)==null||H.call(v))}),onKeyDown:xe(m.onKeyDown,O=>{var P;f||O.target!==O.currentTarget||((P=v.searchRef)==null?void 0:P.current)!==""&&O.key===" "||(IA.includes(O.key)&&N(),O.key===" "&&O.preventDefault())})})})})},"SelectItem")),rc="SelectItemText",mM=p.forwardRef(nt(function(l,o){const{__scopeSelect:i,className:u,style:f,...h}=l,m=Ul(rc,i),g=Bc(rc,i),v=I0(rc,i),w=QA(rc,i),[S,b]=p.useState(null),x=Hn(N=>{var O;return(O=g.itemTextRefCallback)==null?void 0:O.call(g,N,v.value,v.disabled)}),T=Pe(o,b,v.onItemTextChange,x),j=S==null?void 0:S.textContent,E=p.useMemo(()=>s.jsx("option",{value:v.value,disabled:v.disabled,children:j},v.value),[v.disabled,v.value,j]),{onNativeOptionAdd:R,onNativeOptionRemove:A}=w;return Tt(()=>(R(E),()=>A(E)),[R,A,E]),s.jsxs(s.Fragment,{children:[s.jsx(Le.span,{id:v.textId,...h,ref:T}),v.isSelected&&m.valueNode&&!m.valueNodeHasChildren&&!ki(m.value)?yo.createPortal(h.children,m.valueNode):null]})},"SelectItemText")),pM="SelectItemIndicator",gM=p.forwardRef(nt(function(l,o){const{__scopeSelect:i,...u}=l;return I0(pM,i).isSelected?s.jsx(Le.span,{"aria-hidden":!0,...u,ref:o}):null},"SelectItemIndicator")),vM="SelectBubbleInput",yM=p.forwardRef(nt(function({__scopeSelect:l,...o},i){const u=Ul(vM,l),{value:f,onValueChange:h,required:m,disabled:g,name:v,autoComplete:w,form:S}=u,{nativeOptions:b,nativeSelectKey:x}=u,T=p.useRef(null),j=Pe(i,T),E=f??"",R=B0(E),A=Array.from(b).some(N=>(N.props.value??"")==="");return p.useEffect(()=>{const N=T.current;if(!N)return;const O=window.HTMLSelectElement.prototype,P=Object.getOwnPropertyDescriptor(O,"value").set;if(R!==E&&P){const z=new Event("change",{bubbles:!0});P.call(N,E),N.dispatchEvent(z)}},[R,E]),s.jsxs(Le.select,{"aria-hidden":!0,required:m,tabIndex:-1,name:v,autoComplete:w,disabled:g,form:S,onChange:N=>h(N.target.value),...o,style:{...P0,...o.style},ref:j,defaultValue:E,children:[ki(f)&&!A?s.jsx("option",{value:""}):null,Array.from(b)]},x)},"SelectBubbleInput"));function K0(a){return typeof a=="function"}nt(K0,"isFunction");function ki(a){return a===""||a===void 0}nt(ki,"shouldShowPlaceholder");function Kh(a){const l=Hn(a),o=p.useRef(""),i=p.useRef(0),u=p.useCallback(h=>{const m=o.current+h;l(m),nt((function g(v){o.current=v,window.clearTimeout(i.current),v!==""&&(i.current=window.setTimeout(()=>g(""),1e3))}),"updateSearch")(m)},[l]),f=p.useCallback(()=>{o.current="",window.clearTimeout(i.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(i.current),[]),[o,u,f]}nt(Kh,"useTypeaheadSearch");function Xh(a,l,o){const u=l.length>1&&Array.from(l).every(v=>v===l[0])?l[0]:l,f=o?a.indexOf(o):-1;let h=X0(a,Math.max(f,0));u.length===1&&(h=h.filter(v=>v!==o));const g=h.find(v=>v.textValue.toLowerCase().startsWith(u.toLowerCase()));return g!==o?g:void 0}nt(Xh,"findNextItem");function X0(a,l){return a.map((o,i)=>a[(l+i)%a.length])}nt(X0,"wrapArray");const kn=ZA,Ln=WA,xn=p.forwardRef(({className:a,children:l,...o},i)=>s.jsxs(V0,{ref:i,className:Ee("flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",a),...o,children:[l,s.jsx(eM,{asChild:!0,children:s.jsx(jC,{className:"h-4 w-4 opacity-50"})})]}));xn.displayName=V0.displayName;const bn=p.forwardRef(({className:a,children:l,position:o="popper",...i},u)=>s.jsx(lM,{children:s.jsx(Y0,{ref:u,className:Ee("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md",a),position:o,...i,children:s.jsx(dM,{className:Ee("p-1",o==="popper"&&"w-full min-w-[var(--radix-select-trigger-width)]"),children:l})})}));bn.displayName=Y0.displayName;const rt=p.forwardRef(({className:a,children:l,...o},i)=>s.jsxs($0,{ref:i,className:Ee("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),...o,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(gM,{children:s.jsx(Cx,{className:"h-4 w-4"})})}),s.jsx(mM,{children:l})]}));rt.displayName=$0.displayName;var xM=Object.defineProperty,kl=(a,l)=>xM(a,"name",{value:l,configurable:!0}),Qh="Switch",[bM,U_]=cn(Qh),[SM,Zh]=bM(Qh);function Q0(a){const{__scopeSwitch:l,checked:o,children:i,defaultChecked:u,disabled:f,form:h,name:m,onCheckedChange:g,required:v,value:w="on",internal_do_not_use_render:S}=a,[b,x]=Xa({prop:o,defaultProp:u??!1,onChange:g,caller:Qh}),[T,j]=p.useState(null),[E,R]=p.useState(null),A=p.useRef(!1),[N,O]=p.useReducer(z=>z+1,0),H=T?!!h||!!T.closest("form"):!0,P={checked:b,setChecked:x,disabled:f,control:T,setControl:j,name:m,form:h,value:w,hasConsumerStoppedPropagationRef:A,userInteractionCount:N,onUserInteraction:O,required:v,defaultChecked:u,isFormControl:H,bubbleInput:E,setBubbleInput:R};return s.jsx(SM,{scope:l,...P,children:F0(S)?S(P):i})}kl(Q0,"SwitchProvider");var wM="SwitchTrigger",jM=p.forwardRef(kl(function({__scopeSwitch:l,onClick:o,...i},u){const{control:f,form:h,value:m,disabled:g,checked:v,required:w,setControl:S,setChecked:b,hasConsumerStoppedPropagationRef:x,onUserInteraction:T,isFormControl:j,bubbleInput:E}=Zh(wM,l),R=Pe(u,S),A=p.useRef(v);return p.useEffect(()=>{const N=h?f==null?void 0:f.ownerDocument.getElementById(h):f==null?void 0:f.form;if(N instanceof HTMLFormElement){const O=kl(()=>b(A.current),"reset");return N.addEventListener("reset",O),()=>N.removeEventListener("reset",O)}},[f,h,b]),s.jsx(Le.button,{type:"button",role:"switch","aria-checked":v,"aria-required":w,"data-state":Fh(v),"data-disabled":g?"":void 0,disabled:g,value:m,...i,ref:R,onClick:xe(o,N=>{T(),b(O=>!O),E&&j&&(x.current=N.isPropagationStopped(),x.current||N.stopPropagation())})})},"SwitchTrigger")),Z0=p.forwardRef(kl(function(l,o){const{__scopeSwitch:i,name:u,checked:f,defaultChecked:h,required:m,disabled:g,value:v,onCheckedChange:w,form:S,...b}=l;return s.jsx(Q0,{__scopeSwitch:i,checked:f,defaultChecked:h,disabled:g,required:m,onCheckedChange:w,name:u,form:S,value:v,internal_do_not_use_render:({isFormControl:x})=>s.jsxs(s.Fragment,{children:[s.jsx(jM,{...b,ref:o,__scopeSwitch:i}),x&&s.jsx(TM,{__scopeSwitch:i})]})})},"Switch")),CM="SwitchThumb",EM=p.forwardRef(kl(function(l,o){const{__scopeSwitch:i,...u}=l,f=Zh(CM,i);return s.jsx(Le.span,{"data-state":Fh(f.checked),"data-disabled":f.disabled?"":void 0,...u,ref:o})},"SwitchThumb")),RM="SwitchBubbleInput",TM=p.forwardRef(kl(function({__scopeSwitch:l,onClick:o,...i},u){const{control:f,hasConsumerStoppedPropagationRef:h,userInteractionCount:m,checked:g,defaultChecked:v,required:w,disabled:S,name:b,value:x,form:T,bubbleInput:j,setBubbleInput:E}=Zh(RM,l),R=Pe(u,E),A=Mc(f),N=p.useRef(!1),O=p.useRef(g),H=p.useRef(m);p.useEffect(()=>{const z=j;if(!z)return;const U=window.HTMLInputElement.prototype,se=Object.getOwnPropertyDescriptor(U,"checked").set,oe=m!==H.current;H.current=m;const J=O.current!==g;O.current=g;const ie=!(oe&&h.current);if(J&&se){N.current=!oe;const ce=new Event("click",{bubbles:ie});se.call(z,g),z.dispatchEvent(ce),N.current=!1}},[j,g,h,m]);const P=p.useRef(g);return s.jsx(Le.input,{type:"checkbox","aria-hidden":!0,defaultChecked:v??P.current,required:w,disabled:S,name:b,value:x,form:T,...i,tabIndex:-1,ref:R,onClick:xe(o,z=>{N.current&&z.stopPropagation()}),style:{...i.style,...A,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"SwitchBubbleInput"));function F0(a){return typeof a=="function"}kl(F0,"isFunction");function Fh(a){return a?"checked":"unchecked"}kl(Fh,"getState");const cr=p.forwardRef(({className:a,...l},o)=>s.jsx(Z0,{className:Ee("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",a),...l,ref:o,children:s.jsx(EM,{className:Ee("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));cr.displayName=Z0.displayName;const rr={name:"",slug:"",type:"openai",baseUrl:"https://api.openai.com",apiKey:"",customHeaders:"",enabled:!0};function NM(){const[a,l]=p.useState([]),[o,i]=p.useState(!1),[u,f]=p.useState(rr),[h,m]=p.useState(!1),[g,v]=p.useState(null),[w,S]=p.useState(null),[b,x]=p.useState(rr),[T,j]=p.useState(null),[E,R]=p.useState(!1),A=()=>Ce.get("/api/admin/providers").then(U=>l(U.providers));p.useEffect(()=>{A()},[]);const N=async()=>{m(!0);try{let U;if(u.customHeaders.trim())try{U=JSON.parse(u.customHeaders)}catch{throw new Error("Custom headers must be valid JSON object")}await Ce.post("/api/admin/providers",{name:u.name,slug:u.slug||void 0,type:u.type,baseUrl:u.baseUrl,apiKey:u.apiKey,customHeaders:U,enabled:u.enabled}),be.success("Provider created"),i(!1),f(rr),A()}catch(U){be.error(U.message)}finally{m(!1)}},O=async U=>{v(U);try{const ee=await Ce.post(`/api/admin/providers/${U}/test`);be.success(ee.ok?`Connection OK: ${ee.detail}`:`Failed: ${ee.detail}`),A()}catch(ee){be.error(ee.message)}finally{v(null)}},H=U=>{S(U.id),x({...rr,name:U.name,slug:U.slug||"",type:U.type,baseUrl:U.baseUrl,apiKey:"",customHeaders:"",enabled:U.enabled})},P=async()=>{if(w){m(!0);try{let U;if(b.customHeaders.trim())try{U=JSON.parse(b.customHeaders)}catch{throw new Error("Custom headers must be valid JSON object")}await Ce.patch("/api/admin/providers",{id:w,name:b.name,slug:b.slug||void 0,type:b.type,baseUrl:b.baseUrl,apiKey:b.apiKey||void 0,customHeaders:U,enabled:b.enabled}),be.success("Provider updated"),S(null),x(rr),A()}catch(U){be.error(U.message)}finally{m(!1)}}},z=async U=>{R(!0);try{await Ce.del(`/api/admin/providers/${U}`),be.success("Provider removed"),A()}catch(ee){be.error(ee.message)}finally{R(!1),j(null)}};return s.jsxs("div",{children:[s.jsx(va,{title:"Providers",description:"Upstream LLM providers and their credentials",actions:s.jsxs(Ga,{open:o,onOpenChange:i,children:[s.jsx(zi,{asChild:!0,children:s.jsxs(ve,{children:[s.jsx(Ai,{className:"mr-1 h-4 w-4"})," Add provider"]})}),s.jsxs(ua,{children:[s.jsx(da,{children:s.jsx(fa,{children:"New provider"})}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx(Se,{children:"Name"}),s.jsx(Me,{value:u.name,onChange:U=>f({...u,name:U.target.value})})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"Slug (optional)"}),s.jsx(Me,{value:u.slug,onChange:U=>f({...u,slug:U.target.value})})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"Type"}),s.jsxs(kn,{value:u.type,onValueChange:U=>f({...u,type:U}),children:[s.jsx(xn,{children:s.jsx(Ln,{})}),s.jsxs(bn,{children:[s.jsx(rt,{value:"openai",children:"OpenAI-compatible"}),s.jsx(rt,{value:"anthropic",children:"Anthropic-compatible"})]})]})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"Base URL"}),s.jsx(Me,{value:u.baseUrl,onChange:U=>f({...u,baseUrl:U.target.value})})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"API key"}),s.jsx(Me,{type:"password",value:u.apiKey,onChange:U=>f({...u,apiKey:U.target.value})})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"Custom headers (JSON)"}),s.jsx(Me,{value:u.customHeaders,onChange:U=>f({...u,customHeaders:U.target.value}),placeholder:'{"X-Org":"acme"}'})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(cr,{checked:u.enabled,onCheckedChange:U=>f({...u,enabled:U})}),s.jsx(Se,{children:"Enabled"})]})]}),s.jsxs(Ia,{children:[s.jsx(ve,{variant:"outline",onClick:()=>i(!1),children:"Cancel"}),s.jsx(ve,{disabled:h||!u.name||!u.apiKey,onClick:N,children:"Create"})]})]})]})}),s.jsxs(Ge,{children:[s.jsxs(Ie,{children:[s.jsx($e,{className:"text-base",children:"All providers"}),s.jsxs(on,{children:[a.length," total"]})]}),s.jsx(Ke,{children:s.jsxs(Xn,{children:[s.jsx(Qn,{children:s.jsxs(Ze,{children:[s.jsx(ge,{children:"Name"}),s.jsx(ge,{children:"Type"}),s.jsx(ge,{children:"Base URL"}),s.jsx(ge,{children:"Models"}),s.jsx(ge,{children:"Health"}),s.jsx(ge,{children:"Enabled"}),s.jsx(ge,{className:"text-right",children:"Actions"})]})}),s.jsxs(Zn,{children:[a.length===0&&s.jsx(Ze,{children:s.jsx(de,{colSpan:7,className:"text-center text-muted-foreground",children:"No providers yet."})}),a.map(U=>s.jsxs(Ze,{children:[s.jsxs(de,{className:"font-medium",children:[U.name," ",s.jsx("span",{className:"text-xs text-muted-foreground",children:U.slug})]}),s.jsx(de,{children:s.jsx(st,{variant:"outline",children:U.type})}),s.jsx(de,{className:"text-xs text-muted-foreground",children:U.baseUrl}),s.jsx(de,{children:U.modelCount}),s.jsx(de,{children:s.jsx(st,{variant:U.health==="healthy"?"success":U.health==="down"?"destructive":"secondary",children:U.health})}),s.jsx(de,{children:U.enabled?"Yes":"No"}),s.jsx(de,{className:"text-right",children:s.jsxs("div",{className:"flex justify-end gap-1",children:[s.jsx(ve,{size:"sm",variant:"outline",disabled:g===U.id,onClick:()=>O(U.id),children:s.jsx(zC,{className:"h-3 w-3"})}),s.jsx(ve,{size:"sm",variant:"outline",onClick:()=>H(U),children:"✎"}),s.jsx(ve,{size:"sm",variant:"outline",onClick:()=>j(U.id),children:s.jsx(HC,{className:"h-3 w-3"})})]})})]},U.id))]})]})})]}),s.jsx(Ga,{open:!!w,onOpenChange:U=>{U||(S(null),x(rr))},children:s.jsxs(ua,{children:[s.jsx(da,{children:s.jsx(fa,{children:"Edit provider"})}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx(Se,{children:"Name"}),s.jsx(Me,{value:b.name,onChange:U=>x({...b,name:U.target.value})})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"Slug (optional)"}),s.jsx(Me,{value:b.slug,onChange:U=>x({...b,slug:U.target.value})})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"Type"}),s.jsxs(kn,{value:b.type,onValueChange:U=>x({...b,type:U}),children:[s.jsx(xn,{children:s.jsx(Ln,{})}),s.jsxs(bn,{children:[s.jsx(rt,{value:"openai",children:"OpenAI-compatible"}),s.jsx(rt,{value:"anthropic",children:"Anthropic-compatible"})]})]})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"Base URL"}),s.jsx(Me,{value:b.baseUrl,onChange:U=>x({...b,baseUrl:U.target.value})})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"API key (leave empty to keep current)"}),s.jsx(Me,{type:"password",value:b.apiKey,onChange:U=>x({...b,apiKey:U.target.value})})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"Custom headers (JSON)"}),s.jsx(Me,{value:b.customHeaders,onChange:U=>x({...b,customHeaders:U.target.value}),placeholder:'{"X-Org":"acme"}'})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(cr,{checked:b.enabled,onCheckedChange:U=>x({...b,enabled:U})}),s.jsx(Se,{children:"Enabled"})]})]}),s.jsxs(Ia,{children:[s.jsx(ve,{variant:"outline",onClick:()=>{S(null),x(rr)},children:"Cancel"}),s.jsx(ve,{disabled:h||!b.name,onClick:P,children:"Save changes"})]})]})}),s.jsx(k0,{open:!!T,onOpenChange:U=>{U||j(null)},children:s.jsxs(Ph,{children:[s.jsxs(U0,{children:[s.jsx(qh,{children:"Delete provider?"}),s.jsx(Vh,{children:"This will soft-disable the provider if models depend on it."})]}),s.jsxs(H0,{children:[s.jsx(Gh,{children:"Cancel"}),s.jsx(Yh,{disabled:E,onClick:U=>{T&&(U.preventDefault(),z(T))},children:E?"Deleting…":"Delete"})]})]})})]})}var AM=Object.defineProperty,Fa=(a,l)=>AM(a,"name",{value:l,configurable:!0}),Jh="Checkbox",[MM,H_]=cn(Jh),[_M,Wh]=MM(Jh);function J0(a){const{__scopeCheckbox:l,checked:o,children:i,defaultChecked:u,disabled:f,form:h,name:m,onCheckedChange:g,required:v,value:w="on",internal_do_not_use_render:S}=a,[b,x]=Xa({prop:o,defaultProp:u??!1,onChange:g,caller:Jh}),[T,j]=p.useState(null),[E,R]=p.useState(null),A=p.useRef(!1),[N,O]=p.useReducer(z=>z+1,0),H=T?!!h||!!T.closest("form"):!0,P={checked:b,disabled:f,setChecked:x,control:T,setControl:j,name:m,form:h,value:w,hasConsumerStoppedPropagationRef:A,userInteractionCount:N,onUserInteraction:O,required:v,defaultChecked:$a(u)?!1:u,isFormControl:H,bubbleInput:E,setBubbleInput:R};return s.jsx(_M,{scope:l,...P,children:e1(S)?S(P):i})}Fa(J0,"CheckboxProvider");var OM="CheckboxTrigger",DM=p.forwardRef(Fa(function({__scopeCheckbox:l,onKeyDown:o,onClick:i,...u},f){const{control:h,value:m,disabled:g,checked:v,required:w,setControl:S,setChecked:b,hasConsumerStoppedPropagationRef:x,onUserInteraction:T,isFormControl:j,bubbleInput:E}=Wh(OM,l),R=Pe(f,S),A=p.useRef(v);return p.useEffect(()=>{const N=h==null?void 0:h.form;if(N){const O=Fa(()=>b(A.current),"reset");return N.addEventListener("reset",O),()=>N.removeEventListener("reset",O)}},[h,b]),s.jsx(Le.button,{type:"button",role:"checkbox","aria-checked":$a(v)?"mixed":v,"aria-required":w,"data-state":em(v),"data-disabled":g?"":void 0,disabled:g,value:m,...u,ref:R,onKeyDown:xe(o,N=>{N.key==="Enter"&&N.preventDefault()}),onClick:xe(i,N=>{T(),b(O=>$a(O)?!0:!O),E&&j&&(x.current=N.isPropagationStopped(),x.current||N.stopPropagation())})})},"CheckboxTrigger")),W0=p.forwardRef(Fa(function(l,o){const{__scopeCheckbox:i,name:u,checked:f,defaultChecked:h,required:m,disabled:g,value:v,onCheckedChange:w,form:S,...b}=l;return s.jsx(J0,{__scopeCheckbox:i,checked:f,defaultChecked:h,disabled:g,required:m,onCheckedChange:w,name:u,form:S,value:v,internal_do_not_use_render:({isFormControl:x})=>s.jsxs(s.Fragment,{children:[s.jsx(DM,{...b,ref:o,__scopeCheckbox:i}),x&&s.jsx(UM,{__scopeCheckbox:i})]})})},"Checkbox")),zM="CheckboxIndicator",kM=p.forwardRef(Fa(function(l,o){const{__scopeCheckbox:i,forceMount:u,...f}=l,h=Wh(zM,i);return s.jsx(Wa,{present:u||$a(h.checked)||h.checked===!0,children:s.jsx(Le.span,{"data-state":em(h.checked),"data-disabled":h.disabled?"":void 0,...f,ref:o,style:{pointerEvents:"none",...l.style}})})},"CheckboxIndicator")),LM="CheckboxBubbleInput",UM=p.forwardRef(Fa(function({__scopeCheckbox:l,onClick:o,...i},u){const{control:f,hasConsumerStoppedPropagationRef:h,userInteractionCount:m,checked:g,defaultChecked:v,required:w,disabled:S,name:b,value:x,form:T,bubbleInput:j,setBubbleInput:E}=Wh(LM,l),R=Pe(u,E),A=Mc(f),N=p.useRef(!1),O=p.useRef(g),H=p.useRef(m);p.useEffect(()=>{const z=j;if(!z)return;const U=window.HTMLInputElement.prototype,se=Object.getOwnPropertyDescriptor(U,"checked").set,oe=m!==H.current;H.current=m;const J=O.current!==g;O.current=g;const ie=!(oe&&h.current);if(J&&se){N.current=!oe;const ce=new Event("click",{bubbles:ie});z.indeterminate=$a(g),se.call(z,$a(g)?!1:g),z.dispatchEvent(ce),N.current=!1}},[j,g,h,m]);const P=p.useRef($a(g)?!1:g);return s.jsx(Le.input,{type:"checkbox","aria-hidden":!0,defaultChecked:v??P.current,required:w,disabled:S,name:b,value:x,form:T,...i,tabIndex:-1,ref:R,onClick:xe(o,z=>{N.current&&z.stopPropagation()}),style:{...i.style,...A,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"CheckboxBubbleInput"));function e1(a){return typeof a=="function"}Fa(e1,"isFunction");function $a(a){return a==="indeterminate"}Fa($a,"isIndeterminate");function em(a){return $a(a)?"indeterminate":a?"checked":"unchecked"}Fa(em,"getState");const tm=p.forwardRef(({className:a,...l},o)=>s.jsx(W0,{ref:o,className:Ee("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",a),...l,children:s.jsx(kM,{className:Ee("flex items-center justify-center text-current"),children:s.jsx(Cx,{className:"h-3.5 w-3.5"})})}));tm.displayName=W0.displayName;function HM(){const[a,l]=p.useState([]),[o,i]=p.useState([]),[u,f]=p.useState("all"),[h,m]=p.useState(!1),[g,v]=p.useState(""),[w,S]=p.useState([]),[b,x]=p.useState(new Set),[T,j]=p.useState(!1),[E,R]=p.useState(""),A=async()=>{const[z,U]=await Promise.all([Ce.get("/api/admin/models"),Ce.get("/api/admin/providers")]);l(z.models),i(U.providers)};p.useEffect(()=>{A()},[]);const N=a.filter(z=>!(u!=="all"&&z.providerId!==u||E&&!z.publicModelId.toLowerCase().includes(E.toLowerCase()))),O=async()=>{if(g){j(!0);try{const z=await Ce.post(`/api/admin/providers/${g}/discover`);S(z.models),x(new Set)}catch(z){be.error(z.message)}finally{j(!1)}}},H=async()=>{if(b.size!==0)try{const z=await Ce.post("/api/admin/models/import",{providerId:g,modelIds:Array.from(b)});be.success(`Imported ${z.imported} of ${z.requested}`),m(!1),S([]),x(new Set),A()}catch(z){be.error(z.message)}},P=(z,U)=>{Ce.post(`/api/admin/models/${z}/toggle`).then(()=>A()).catch(ee=>be.error(ee.message))};return s.jsxs("div",{children:[s.jsx(va,{title:"Models",description:"Physical models imported from providers",actions:s.jsxs(Ga,{open:h,onOpenChange:m,children:[s.jsx(zi,{asChild:!0,children:s.jsxs(ve,{variant:"outline",children:[s.jsx(Ex,{className:"mr-1 h-4 w-4"})," Fetch models"]})}),s.jsxs(ua,{className:"max-w-2xl",children:[s.jsx(da,{children:s.jsx(fa,{children:"Discover models"})}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-end gap-2",children:[s.jsx("div",{className:"flex-1",children:s.jsxs(kn,{value:g,onValueChange:v,children:[s.jsx(xn,{children:s.jsx(Ln,{placeholder:"Choose provider"})}),s.jsx(bn,{children:o.map(z=>s.jsx(rt,{value:z.id,children:z.name},z.id))})]})}),s.jsx(ve,{onClick:O,disabled:!g||T,children:T?"Fetching…":"Fetch"})]}),w.length>0&&s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"text-sm text-muted-foreground",children:[w.length," discovered · ",b.size," selected"]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(ve,{variant:"outline",size:"sm",onClick:()=>x(new Set(w.filter(z=>!z.alreadyImported).map(z=>z.upstreamId))),children:"Select All (new)"}),s.jsx(ve,{variant:"outline",size:"sm",onClick:()=>x(new Set),children:"Clear"})]})]}),s.jsx("div",{className:"max-h-80 space-y-1 overflow-auto rounded border p-2",children:w.map(z=>s.jsxs("label",{className:"flex items-center gap-2 rounded p-1 text-sm hover:bg-accent",children:[s.jsx(tm,{checked:b.has(z.upstreamId),onCheckedChange:U=>{const ee=new Set(b);U?ee.add(z.upstreamId):ee.delete(z.upstreamId),x(ee)}}),s.jsx("span",{className:"font-mono text-xs",children:z.upstreamId}),z.alreadyImported&&s.jsx(st,{variant:"secondary",children:"imported"})]},z.upstreamId))})]})]}),s.jsxs(Ia,{children:[s.jsx(ve,{variant:"outline",onClick:()=>m(!1),children:"Cancel"}),s.jsxs(ve,{disabled:b.size===0,onClick:H,children:["Import ",b.size||""]})]})]})]})}),s.jsxs(Ge,{children:[s.jsxs(Ie,{children:[s.jsx($e,{className:"text-base",children:"All models"}),s.jsxs(on,{children:[a.length," total"]})]}),s.jsxs(Ke,{children:[s.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[s.jsxs(kn,{value:u,onValueChange:f,children:[s.jsx(xn,{className:"w-56",children:s.jsx(Ln,{})}),s.jsxs(bn,{children:[s.jsx(rt,{value:"all",children:"All providers"}),o.map(z=>s.jsx(rt,{value:z.id,children:z.name},z.id))]})]}),s.jsx(Me,{className:"max-w-xs",placeholder:"Search public ID",value:E,onChange:z=>R(z.target.value)})]}),s.jsxs(Xn,{children:[s.jsx(Qn,{children:s.jsxs(Ze,{children:[s.jsx(ge,{children:"Public ID"}),s.jsx(ge,{children:"Provider"}),s.jsx(ge,{children:"Upstream ID"}),s.jsx(ge,{children:"Capabilities"}),s.jsx(ge,{children:"Available"}),s.jsx(ge,{children:"Enabled"}),s.jsx(ge,{})]})}),s.jsxs(Zn,{children:[N.length===0&&s.jsx(Ze,{children:s.jsx(de,{colSpan:7,className:"text-center text-muted-foreground",children:"No models"})}),N.map(z=>s.jsxs(Ze,{children:[s.jsx(de,{className:"font-mono text-xs",children:z.publicModelId}),s.jsx(de,{children:z.providerSlug}),s.jsx(de,{className:"text-xs text-muted-foreground",children:z.upstreamModelId}),s.jsx(de,{className:"space-x-1",children:Object.entries(z.capabilities).filter(([,U])=>U===!0).slice(0,4).map(([U])=>s.jsx(st,{variant:"outline",className:"mr-1",children:U},U))}),s.jsx(de,{children:z.upstreamAvailable?s.jsx(st,{variant:"success",children:"up"}):s.jsx(st,{variant:"destructive",children:"down"})}),s.jsx(de,{children:z.enabled?"Yes":"No"}),s.jsx(de,{className:"text-right",children:s.jsx(ve,{size:"sm",variant:"outline",onClick:()=>P(z.id,!z.enabled),children:z.enabled?"Disable":"Enable"})})]},z.id))]})]})]})]})]})}function BM(){const[a,l]=p.useState([]),[o,i]=p.useState([]),[u,f]=p.useState(!1),[h,m]=p.useState({name:"",slug:"",mode:"fallback",enabled:!0,members:[]}),g=async()=>{const[x,T]=await Promise.all([Ce.get("/api/admin/combos"),Ce.get("/api/admin/models")]);l(x.combos),i(T.models)};p.useEffect(()=>{g()},[]);const v=x=>{m(T=>({...T,members:[...T.members,{modelId:x,weight:1,position:T.members.length,enabled:!0}]}))},w=x=>{m(T=>({...T,members:T.members.filter((j,E)=>E!==x).map((j,E)=>({...j,position:E}))}))},S=async()=>{if(h.members.length===0){be.error("Add at least one member");return}try{await Ce.post("/api/admin/combos",{name:h.name,slug:h.slug||void 0,mode:h.mode,enabled:h.enabled,members:h.members}),be.success("Combo created"),f(!1),m({name:"",slug:"",mode:"fallback",enabled:!0,members:[]}),g()}catch(x){be.error(x.message)}},b=async x=>{if(confirm("Delete this combo?"))try{await Ce.del(`/api/admin/combos/${x}`),be.success("Combo removed"),g()}catch(T){be.error(T.message)}};return s.jsxs("div",{children:[s.jsx(va,{title:"Combos",description:"Virtual models combining physical models",actions:s.jsxs(Ga,{open:u,onOpenChange:f,children:[s.jsx(zi,{asChild:!0,children:s.jsxs(ve,{children:[s.jsx(Ai,{className:"mr-1 h-4 w-4"})," New combo"]})}),s.jsxs(ua,{className:"max-w-2xl",children:[s.jsx(da,{children:s.jsx(fa,{children:"New combo"})}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx(Se,{children:"Name"}),s.jsx(Me,{value:h.name,onChange:x=>m({...h,name:x.target.value})})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"Slug (optional — leave empty to use the name as the model ID)"}),s.jsx(Me,{value:h.slug,onChange:x=>m({...h,slug:x.target.value}),placeholder:"empty → gpt-5.5 · set → combo/gpt-5.5"})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"Mode"}),s.jsxs(kn,{value:h.mode,onValueChange:x=>m({...h,mode:x}),children:[s.jsx(xn,{children:s.jsx(Ln,{})}),s.jsxs(bn,{children:[s.jsx(rt,{value:"fallback",children:"Fallback (ordered)"}),s.jsx(rt,{value:"weighted_round_robin",children:"Weighted round-robin"})]})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(cr,{checked:h.enabled,onCheckedChange:x=>m({...h,enabled:x})}),s.jsx(Se,{children:"Enabled"})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"Members"}),s.jsxs(kn,{onValueChange:v,children:[s.jsx(xn,{children:s.jsx(Ln,{placeholder:"Add a model"})}),s.jsx(bn,{children:o.map(x=>s.jsx(rt,{value:x.id,children:x.publicModelId},x.id))})]}),s.jsx("div",{className:"mt-2 space-y-1",children:h.members.map((x,T)=>{var j;return s.jsxs("div",{className:"flex items-center gap-2 rounded border p-2 text-sm",children:[s.jsx("span",{className:"font-mono text-xs",children:(j=o.find(E=>E.id===x.modelId))==null?void 0:j.publicModelId}),s.jsx(Me,{type:"number",min:1,value:x.weight,onChange:E=>{const R=Number(E.target.value);m(A=>({...A,members:A.members.map((N,O)=>O===T?{...N,weight:R}:N)}))},className:"w-20"}),s.jsx(ve,{size:"sm",variant:"outline",onClick:()=>w(T),children:"Remove"})]},T)})})]})]}),s.jsxs(Ia,{children:[s.jsx(ve,{variant:"outline",onClick:()=>f(!1),children:"Cancel"}),s.jsx(ve,{disabled:!h.name,onClick:S,children:"Create"})]})]})]})}),s.jsxs(Ge,{children:[s.jsxs(Ie,{children:[s.jsx($e,{className:"text-base",children:"All combos"}),s.jsxs(on,{children:[a.length," total"]})]}),s.jsx(Ke,{children:s.jsxs(Xn,{children:[s.jsx(Qn,{children:s.jsxs(Ze,{children:[s.jsx(ge,{children:"Public ID"}),s.jsx(ge,{children:"Mode"}),s.jsx(ge,{children:"Members"}),s.jsx(ge,{children:"Healthy"}),s.jsx(ge,{children:"Enabled"}),s.jsx(ge,{})]})}),s.jsxs(Zn,{children:[a.length===0&&s.jsx(Ze,{children:s.jsx(de,{colSpan:6,className:"text-center text-muted-foreground",children:"No combos yet."})}),a.map(x=>s.jsxs(Ze,{children:[s.jsx(de,{className:"font-mono text-xs",children:x.publicModelId}),s.jsx(de,{children:s.jsx(st,{variant:"outline",children:x.mode})}),s.jsx(de,{children:x.memberCount}),s.jsx(de,{children:x.healthyMemberCount}),s.jsx(de,{children:x.enabled?"Yes":"No"}),s.jsx(de,{className:"text-right",children:s.jsx(ve,{size:"sm",variant:"outline",onClick:()=>b(x.id),children:"Delete"})})]},x.id))]})]})})]})]})}function PM(){const[a,l]=p.useState([]),[o,i]=p.useState([]),[u,f]=p.useState([]),[h,m]=p.useState(!1),[g,v]=p.useState({alias:"",targetKind:"model",targetId:"",enabled:!0}),w=async()=>{const[b,x,T]=await Promise.all([Ce.get("/api/admin/aliases"),Ce.get("/api/admin/models"),Ce.get("/api/admin/combos")]);l(b.aliases),i(x.models),f(T.combos)};p.useEffect(()=>{w()},[]);const S=async()=>{try{await Ce.post("/api/admin/aliases",g),be.success("Alias created"),m(!1),v({alias:"",targetKind:"model",targetId:"",enabled:!0}),w()}catch(b){be.error(b.message)}};return s.jsxs("div",{children:[s.jsx(va,{title:"Aliases",description:"Stable client-visible names for models or combos",actions:s.jsxs(Ga,{open:h,onOpenChange:m,children:[s.jsx(zi,{asChild:!0,children:s.jsxs(ve,{children:[s.jsx(Ai,{className:"mr-1 h-4 w-4"})," New alias"]})}),s.jsxs(ua,{children:[s.jsx(da,{children:s.jsx(fa,{children:"New alias"})}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx(Se,{children:"Alias"}),s.jsx(Me,{value:g.alias,onChange:b=>v({...g,alias:b.target.value}),placeholder:"coding"})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"Target type"}),s.jsxs(kn,{value:g.targetKind,onValueChange:b=>v({...g,targetKind:b}),children:[s.jsx(xn,{children:s.jsx(Ln,{})}),s.jsxs(bn,{children:[s.jsx(rt,{value:"model",children:"Model"}),s.jsx(rt,{value:"combo",children:"Combo"})]})]})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"Target"}),s.jsxs(kn,{value:g.targetId,onValueChange:b=>v({...g,targetId:b}),children:[s.jsx(xn,{children:s.jsx(Ln,{placeholder:"Choose target"})}),s.jsx(bn,{children:(g.targetKind==="model"?o:u).map(b=>s.jsx(rt,{value:b.id,children:b.publicModelId},b.id))})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(cr,{checked:g.enabled,onCheckedChange:b=>v({...g,enabled:b})}),s.jsx(Se,{children:"Enabled"})]})]}),s.jsxs(Ia,{children:[s.jsx(ve,{variant:"outline",onClick:()=>m(!1),children:"Cancel"}),s.jsx(ve,{disabled:!g.alias||!g.targetId,onClick:S,children:"Create"})]})]})]})}),s.jsxs(Ge,{children:[s.jsxs(Ie,{children:[s.jsx($e,{className:"text-base",children:"All aliases"}),s.jsxs(on,{children:[a.length," total"]})]}),s.jsx(Ke,{children:s.jsxs(Xn,{children:[s.jsx(Qn,{children:s.jsxs(Ze,{children:[s.jsx(ge,{children:"Alias"}),s.jsx(ge,{children:"Target"}),s.jsx(ge,{children:"Type"}),s.jsx(ge,{children:"Enabled"}),s.jsx(ge,{})]})}),s.jsxs(Zn,{children:[a.length===0&&s.jsx(Ze,{children:s.jsx(de,{colSpan:5,className:"text-center text-muted-foreground",children:"No aliases yet."})}),a.map(b=>s.jsxs(Ze,{children:[s.jsx(de,{className:"font-mono text-xs",children:b.alias}),s.jsx(de,{className:"font-mono text-xs",children:b.targetName??b.targetId}),s.jsx(de,{children:s.jsx(st,{variant:"outline",children:b.targetKind})}),s.jsx(de,{children:b.enabled?"Yes":"No"}),s.jsx(de,{className:"text-right",children:s.jsx(ve,{size:"sm",variant:"outline",onClick:async()=>{await Ce.del(`/api/admin/aliases/${b.id}`),be.success("Removed"),w()},children:"Delete"})})]},b.id))]})]})})]})]})}function qM(){const[a,l]=p.useState([]),[o,i]=p.useState([]),[u,f]=p.useState([]),[h,m]=p.useState(!1),[g,v]=p.useState(null),[w,S]=p.useState(null),[b,x]=p.useState({name:"",expiresAt:"",allowAll:!0,permissions:[],rpmLimit:"",tpmLimit:"",concurrency:"",customSecret:""}),T=async()=>{const[R,A,N]=await Promise.all([Ce.get("/api/admin/api-keys"),Ce.get("/api/admin/models"),Ce.get("/api/admin/combos")]);l(R.apiKeys),i(A.models),f(N.combos)};p.useEffect(()=>{T()},[]);const j=async()=>{try{const R=await Ce.post("/api/admin/api-keys",{name:b.name,expiresAt:b.expiresAt||null,allowAllModels:b.allowAll,permissions:b.allowAll?void 0:b.permissions,rpmLimit:b.rpmLimit?Number(b.rpmLimit):null,tpmLimit:b.tpmLimit?Number(b.tpmLimit):null,maxConcurrent:b.concurrency?Number(b.concurrency):null,...b.customSecret.trim()?{secret:b.customSecret.trim()}:{}});m(!1),v({secret:R.secret,name:R.name}),x({name:"",expiresAt:"",allowAll:!0,permissions:[],rpmLimit:"",tpmLimit:"",concurrency:"",customSecret:""}),T()}catch(R){be.error(R.message)}},E=async R=>{window.confirm("Revoke this API key?")&&(await Ce.post(`/api/admin/api-keys/${R}/revoke`),be.success("Revoked"),T())};return s.jsxs("div",{children:[s.jsx(va,{title:"API Keys",description:"Gateway bearer keys for client applications",actions:s.jsxs(Ga,{open:h,onOpenChange:m,children:[s.jsx(zi,{asChild:!0,children:s.jsxs(ve,{children:[s.jsx(Ai,{className:"mr-1 h-4 w-4"})," New key"]})}),s.jsxs(ua,{className:"max-w-2xl",children:[s.jsx(da,{children:s.jsx(fa,{children:"New API key"})}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx(Se,{children:"Name"}),s.jsx(Me,{value:b.name,onChange:R=>x({...b,name:R.target.value})})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"Expires (optional)"}),s.jsx(Me,{type:"datetime-local",value:b.expiresAt,onChange:R=>x({...b,expiresAt:R.target.value})})]}),s.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[s.jsxs("div",{children:[s.jsx(Se,{children:"RPM limit"}),s.jsx(Me,{value:b.rpmLimit,onChange:R=>x({...b,rpmLimit:R.target.value}),type:"number"})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"TPM limit"}),s.jsx(Me,{value:b.tpmLimit,onChange:R=>x({...b,tpmLimit:R.target.value}),type:"number"})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"Concurrency"}),s.jsx(Me,{value:b.concurrency,onChange:R=>x({...b,concurrency:R.target.value}),type:"number"})]})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"Key value (optional)"}),s.jsx(Me,{value:b.customSecret,onChange:R=>x({...b,customSecret:R.target.value}),placeholder:"Leave empty to auto-generate ld-…"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"If provided, this exact value is stored as the key. Otherwise a random ld-… key is generated."})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(cr,{checked:b.allowAll,onCheckedChange:R=>x({...b,allowAll:R})}),s.jsx(Se,{children:"Allow all current and future models"})]}),!b.allowAll&&s.jsxs("div",{children:[s.jsx(Se,{children:"Scope"}),s.jsx("div",{className:"max-h-48 space-y-1 overflow-auto rounded border p-2",children:[...o.map(R=>({targetKind:"model",targetId:R.id,label:R.publicModelId})),...u.map(R=>({targetKind:"combo",targetId:R.id,label:R.publicModelId}))].map(R=>{const A=b.permissions.some(N=>N.targetKind===R.targetKind&&N.targetId===R.targetId);return s.jsxs("label",{className:"flex items-center gap-2 rounded p-1 text-sm hover:bg-accent",children:[s.jsx(tm,{checked:A,onCheckedChange:N=>{x(O=>({...O,permissions:N?[...O.permissions,{targetKind:R.targetKind,targetId:R.targetId}]:O.permissions.filter(H=>!(H.targetKind===R.targetKind&&H.targetId===R.targetId))}))}}),s.jsx("span",{className:"font-mono text-xs",children:R.label}),s.jsx(st,{variant:"outline",className:"ml-1",children:R.targetKind})]},`${R.targetKind}:${R.targetId}`)})})]})]}),s.jsxs(Ia,{children:[s.jsx(ve,{variant:"outline",onClick:()=>m(!1),children:"Cancel"}),s.jsx(ve,{disabled:!b.name,onClick:j,children:"Create"})]})]})]})}),s.jsxs(Ge,{children:[s.jsxs(Ie,{children:[s.jsx($e,{className:"text-base",children:"All keys"}),s.jsxs(on,{children:[a.length," total"]})]}),s.jsx(Ke,{children:s.jsxs(Xn,{children:[s.jsx(Qn,{children:s.jsxs(Ze,{children:[s.jsx(ge,{children:"Name"}),s.jsx(ge,{children:"Prefix"}),s.jsx(ge,{children:"Status"}),s.jsx(ge,{children:"Scope"}),s.jsx(ge,{children:"RPM/TPM/Conc"}),s.jsx(ge,{})]})}),s.jsxs(Zn,{children:[a.length===0&&s.jsx(Ze,{children:s.jsx(de,{colSpan:6,className:"text-center text-muted-foreground",children:"No API keys yet."})}),a.map(R=>s.jsxs(Ze,{children:[s.jsx(de,{className:"font-medium",children:R.name}),s.jsxs(de,{className:"font-mono text-xs",children:[R.keyPrefix,"…"]}),s.jsx(de,{children:R.enabled?s.jsx(st,{variant:"success",children:"enabled"}):s.jsx(st,{variant:"destructive",children:"disabled"})}),s.jsx(de,{children:R.allowAllModels?"all":`${R.modelScopeCount} scoped`}),s.jsx(de,{className:"text-xs",children:[R.rpmLimit,R.tpmLimit,R.concurrencyLimit].map((A,N)=>A?["","RPM","TPM","Conc"][N+1]:null).filter(Boolean).join(" / ")||"—"}),s.jsx(de,{className:"text-right",children:s.jsxs("div",{className:"flex items-center justify-end gap-1",children:[R.secret&&s.jsxs(s.Fragment,{children:[s.jsx(ve,{size:"sm",variant:"ghost",title:"Copy secret",onClick:()=>{navigator.clipboard.writeText(R.secret),be.success("Copied")},children:s.jsx(hf,{className:"h-3.5 w-3.5"})}),s.jsx(ve,{size:"sm",variant:"ghost",title:"Show secret",onClick:()=>S({secret:R.secret,name:R.name}),children:s.jsx(NC,{className:"h-3.5 w-3.5"})})]}),s.jsx(ve,{size:"sm",variant:"outline",onClick:()=>E(R.id),children:"Revoke"})]})})]},R.id))]})]})})]}),s.jsx(Ga,{open:!!g,onOpenChange:R=>{R||v(null)},children:s.jsxs(ua,{children:[s.jsxs(da,{children:[s.jsx(fa,{children:"API key created"}),s.jsx(Ff,{children:"Copy now — this secret will not be shown again."})]}),s.jsx("div",{className:"rounded border bg-muted p-3 font-mono text-xs break-all",children:g==null?void 0:g.secret}),s.jsxs(Ia,{children:[s.jsxs(ve,{onClick:()=>{g&&(navigator.clipboard.writeText(g.secret),be.success("Copied"))},children:[s.jsx(hf,{className:"mr-1 h-4 w-4"})," Copy"]}),s.jsx(ve,{variant:"outline",onClick:()=>v(null),children:"I have saved it"})]})]})}),s.jsx(Ga,{open:!!w,onOpenChange:R=>{R||S(null)},children:s.jsxs(ua,{children:[s.jsxs(da,{children:[s.jsxs(fa,{children:["API key: ",w==null?void 0:w.name]}),s.jsx(Ff,{children:"Full secret for this key, readable any time."})]}),s.jsx("div",{className:"rounded border bg-muted p-3 font-mono text-xs break-all",children:w==null?void 0:w.secret}),s.jsxs(Ia,{children:[s.jsxs(ve,{onClick:()=>{w&&(navigator.clipboard.writeText(w.secret),be.success("Copied"))},children:[s.jsx(hf,{className:"mr-1 h-4 w-4"})," Copy"]}),s.jsx(ve,{variant:"outline",onClick:()=>S(null),children:"Close"})]})]})})]})}function VM(){const[a,l]=p.useState([]),[o,i]=p.useState(0),[u,f]=p.useState(0),[h,m]=p.useState({success:"all",protocol:"all",streaming:"all",model:""}),[g,v]=p.useState(null),[w,S]=p.useState(null),b=50,x=p.useCallback(async()=>{const j=new URLSearchParams;j.set("limit",String(b)),j.set("offset",String(u)),h.success!=="all"&&j.set("success",h.success),h.protocol!=="all"&&j.set("protocol",h.protocol),h.streaming!=="all"&&j.set("streaming",h.streaming),h.model&&j.set("requestedModel",h.model);const E=await Ce.get(`/api/admin/requests?${j.toString()}`);l(E.requests),i(E.total)},[u,h]);p.useEffect(()=>{x()},[x]);const T=async j=>{v(j);const E=await Ce.get(`/api/admin/requests/${j}`);S(E)};return s.jsxs("div",{children:[s.jsx(va,{title:"Requests",description:`${o} matching · server-side paginated`}),s.jsxs(Ge,{children:[s.jsxs(Ie,{children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsxs(kn,{value:h.success,onValueChange:j=>{f(0),m({...h,success:j})},children:[s.jsx(xn,{className:"w-36",children:s.jsx(Ln,{})}),s.jsxs(bn,{children:[s.jsx(rt,{value:"all",children:"All"}),s.jsx(rt,{value:"true",children:"Success"}),s.jsx(rt,{value:"false",children:"Failed"})]})]}),s.jsxs(kn,{value:h.protocol,onValueChange:j=>{f(0),m({...h,protocol:j})},children:[s.jsx(xn,{className:"w-32",children:s.jsx(Ln,{})}),s.jsxs(bn,{children:[s.jsx(rt,{value:"all",children:"Any protocol"}),s.jsx(rt,{value:"openai",children:"OpenAI"}),s.jsx(rt,{value:"anthropic",children:"Anthropic"})]})]}),s.jsxs(kn,{value:h.streaming,onValueChange:j=>{f(0),m({...h,streaming:j})},children:[s.jsx(xn,{className:"w-32",children:s.jsx(Ln,{})}),s.jsxs(bn,{children:[s.jsx(rt,{value:"all",children:"Any"}),s.jsx(rt,{value:"true",children:"Streaming"}),s.jsx(rt,{value:"false",children:"Non-stream"})]})]}),s.jsx(Me,{className:"max-w-xs",placeholder:"Model contains…",value:h.model,onChange:j=>{f(0),m({...h,model:j.target.value})}})]}),s.jsx($e,{className:"mt-3 text-base",children:"Results"})]}),s.jsxs(Ke,{children:[s.jsxs(Xn,{children:[s.jsx(Qn,{children:s.jsxs(Ze,{children:[s.jsx(ge,{children:"Time"}),s.jsx(ge,{children:"Status"}),s.jsx(ge,{children:"Requested"}),s.jsx(ge,{children:"Final"}),s.jsx(ge,{children:"Tokens"}),s.jsx(ge,{children:"Latency"}),s.jsx(ge,{children:"Attempts"}),s.jsx(ge,{children:"Key"}),s.jsx(ge,{children:"IP"}),s.jsx(ge,{})]})}),s.jsxs(Zn,{children:[a.length===0&&s.jsx(Ze,{children:s.jsx(de,{colSpan:10,className:"text-center text-muted-foreground",children:"No requests yet."})}),a.map(j=>s.jsxs(Ze,{className:"cursor-pointer",onClick:()=>T(j.id),children:[s.jsx(de,{className:"text-xs",children:fh(j.createdAt)}),s.jsx(de,{children:j.success?s.jsx(st,{variant:"success",children:j.httpStatus}):s.jsx(st,{variant:"destructive",children:j.httpStatus})}),s.jsx(de,{className:"font-mono text-xs",children:j.requestedModel}),s.jsx(de,{className:"font-mono text-xs text-muted-foreground",children:j.finalModelPublicId??"—"}),s.jsxs(de,{className:"text-xs",children:[yn(j.inputTokens+j.outputTokens)," ",j.cacheReadTokens?s.jsxs("span",{className:"text-amber-600",children:["(+",j.cacheReadTokens," cache)"]}):null]}),s.jsxs(de,{className:"text-xs",children:[so(j.totalLatencyMs),j.ttftMs?s.jsxs("span",{className:"text-muted-foreground",children:[" · ttft ",j.ttftMs,"ms"]}):null]}),s.jsxs(de,{className:"text-xs",children:[j.attemptsCount,j.gatewayCacheHit?s.jsx(st,{variant:"secondary",className:"ml-1",children:"cache"}):null]}),s.jsx(de,{className:"text-xs",children:j.apiKeyName??"—"}),s.jsx(de,{className:"text-xs",children:j.clientIp}),s.jsx(de,{className:"text-right",children:s.jsx(ve,{size:"sm",variant:"ghost",children:"View"})})]},j.id))]})]}),s.jsxs("div",{className:"mt-3 flex items-center justify-between",children:[s.jsxs("span",{className:"text-xs text-muted-foreground",children:["Showing ",u+1,"–",Math.min(u+b,o)," of ",o]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(ve,{size:"sm",variant:"outline",disabled:u===0,onClick:()=>f(Math.max(0,u-b)),children:"Prev"}),s.jsx(ve,{size:"sm",variant:"outline",disabled:u+b>=o,onClick:()=>f(u+b),children:"Next"})]})]})]})]}),s.jsx(Ga,{open:!!g,onOpenChange:j=>{j||(v(null),S(null))},children:s.jsxs(ua,{className:"max-w-3xl",children:[s.jsx(da,{children:s.jsxs(fa,{children:["Request ",y2(g,16)]})}),w?s.jsxs("div",{className:"space-y-3 text-sm",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-muted-foreground text-xs",children:"Status"}),w.request.success?s.jsx(st,{variant:"success",children:w.request.httpStatus}):s.jsx(st,{variant:"destructive",children:w.request.httpStatus})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-muted-foreground text-xs",children:"Latency"}),so(w.request.totalLatencyMs)]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-muted-foreground text-xs",children:"Tokens"}),"in ",yn(w.request.inputTokens)," · out ",yn(w.request.outputTokens)," · cache ",yn(w.request.cacheReadTokens)]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-muted-foreground text-xs",children:"Attempts"}),w.request.attemptsCount]})]}),w.request.errorType&&s.jsxs("div",{className:"rounded border border-destructive/40 bg-destructive/10 p-2",children:[s.jsx("div",{className:"text-xs text-muted-foreground",children:"Error"}),s.jsxs("div",{className:"font-mono text-xs",children:[w.request.errorType,": ",w.request.errorMessage]})]}),w.attempts.length>0&&s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-muted-foreground",children:"Attempts"}),s.jsxs(Xn,{children:[s.jsx(Qn,{children:s.jsxs(Ze,{children:[s.jsx(ge,{children:"#"}),s.jsx(ge,{children:"Provider"}),s.jsx(ge,{children:"Model"}),s.jsx(ge,{children:"Status"}),s.jsx(ge,{children:"Latency"}),s.jsx(ge,{children:"Reason"})]})}),s.jsx(Zn,{children:w.attempts.map(j=>s.jsxs(Ze,{children:[s.jsx(de,{children:j.attemptNumber}),s.jsx(de,{children:j.providerName}),s.jsx(de,{className:"font-mono text-xs",children:j.modelPublicId}),s.jsx(de,{children:j.success?s.jsx(st,{variant:"success",children:String(j.statusCode??"OK")}):s.jsx(st,{variant:"destructive",children:String(j.statusCode??"err")})}),s.jsx(de,{className:"text-xs",children:so(j.latencyMs)}),s.jsx(de,{className:"text-xs",children:j.failureReason??j.selectionReason})]},j.id))})]})]})]}):s.jsx("div",{className:"text-muted-foreground",children:"Loading…"})]})})]})}var YM=Object.defineProperty,Co=(a,l)=>YM(a,"name",{value:l,configurable:!0}),nm="Tabs",[GM,B_]=cn(nm,[Dc]),t1=Dc(),[IM,am]=GM(nm),$M=p.forwardRef(Co(function(l,o){const{__scopeTabs:i,value:u,onValueChange:f,defaultValue:h,orientation:m="horizontal",dir:g,activationMode:v="automatic",...w}=l,S=_i(g),[b,x]=Xa({prop:u,onChange:f,defaultProp:h??"",caller:nm});return s.jsx(IM,{scope:i,baseId:ca(),value:b,onValueChange:x,orientation:m,dir:S,activationMode:v,children:s.jsx(Le.div,{dir:S,"data-orientation":m,...w,ref:o})})},"Tabs")),KM="TabsList",XM=p.forwardRef(Co(function(l,o){const{__scopeTabs:i,loop:u=!0,...f}=l,h=am(KM,i),m=t1(i);return s.jsx(Vb,{asChild:!0,...m,orientation:h.orientation,dir:h.dir,loop:u,children:s.jsx(Le.div,{role:"tablist","aria-orientation":h.orientation,...f,ref:o})})},"TabsList")),QM="TabsTrigger",ZM=p.forwardRef(Co(function(l,o){const{__scopeTabs:i,value:u,disabled:f=!1,...h}=l,m=am(QM,i),g=t1(i),v=lm(m.baseId,u),w=rm(m.baseId,u),S=u===m.value;return s.jsx(Yb,{asChild:!0,...g,focusable:!f,active:S,children:s.jsx(Le.button,{type:"button",role:"tab","aria-selected":S,"aria-controls":w,"data-state":S?"active":"inactive","data-disabled":f?"":void 0,disabled:f,id:v,...h,ref:o,onMouseDown:xe(l.onMouseDown,b=>{!f&&b.button===0&&b.ctrlKey===!1?m.onValueChange(u):b.preventDefault()}),onKeyDown:xe(l.onKeyDown,b=>{f||b.target!==b.currentTarget||[" ","Enter"].includes(b.key)&&m.onValueChange(u)}),onFocus:xe(l.onFocus,()=>{const b=m.activationMode!=="manual";!S&&!f&&b&&m.onValueChange(u)})})})},"TabsTrigger")),FM="TabsContent",JM=p.forwardRef(Co(function(l,o){const{__scopeTabs:i,value:u,forceMount:f,children:h,...m}=l,g=am(FM,i),v=lm(g.baseId,u),w=rm(g.baseId,u),S=u===g.value,b=p.useRef(S);return p.useEffect(()=>{const x=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(x)},[]),s.jsx(Wa,{present:f||S,children:({present:x})=>s.jsx(Le.div,{"data-state":S?"active":"inactive","data-orientation":g.orientation,role:"tabpanel","aria-labelledby":v,hidden:!x,id:w,tabIndex:0,...m,ref:o,style:{...l.style,animationDuration:b.current?"0s":void 0},children:x&&h})})},"TabsContent"));function lm(a,l){return`${a}-trigger-${l}`}Co(lm,"makeTriggerId");function rm(a,l){return`${a}-content-${l}`}Co(rm,"makeContentId");var WM=$M,n1=XM,a1=ZM,l1=JM;const r1=WM,om=p.forwardRef(({className:a,...l},o)=>s.jsx(n1,{ref:o,className:Ee("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",a),...l}));om.displayName=n1.displayName;const Ml=p.forwardRef(({className:a,...l},o)=>s.jsx(a1,{ref:o,className:Ee("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",a),...l}));Ml.displayName=a1.displayName;const Si=p.forwardRef(({className:a,...l},o)=>s.jsx(l1,{ref:o,className:Ee("mt-2 ring-offset-background focus-visible:outline-none",a),...l}));Si.displayName=l1.displayName;function e_(){const[a,l]=p.useState("7d"),[o,i]=p.useState(null),[u,f]=p.useState(!0),[h,m]=p.useState(null);if(p.useEffect(()=>{f(!0),m(null),Ce.get(`/api/admin/stats?preset=${a}`).then(v=>{i(v)}).catch(v=>{m(v.message)}).finally(()=>f(!1))},[a]),u)return s.jsx("div",{className:"text-muted-foreground",children:"Loading…"});if(h||!o)return s.jsxs("div",{className:"text-destructive",children:["Failed to load statistics: ",h??"unknown error"]});const g=o.summary;return s.jsxs("div",{children:[s.jsx(va,{title:"Statistics",description:"Aggregated metrics for the selected range",actions:s.jsx(r1,{value:a,onValueChange:v=>l(v),children:s.jsxs(om,{children:[s.jsx(Ml,{value:"today",children:"Today"}),s.jsx(Ml,{value:"7d",children:"7 days"}),s.jsx(Ml,{value:"30d",children:"30 days"})]})})}),s.jsxs("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:[s.jsxs(Ge,{children:[s.jsx(Ie,{className:"pb-1",children:s.jsx($e,{className:"text-sm text-muted-foreground",children:"Requests"})}),s.jsx(Ke,{className:"text-2xl font-semibold",children:yn(g.totalRequests)})]}),s.jsxs(Ge,{children:[s.jsx(Ie,{className:"pb-1",children:s.jsx($e,{className:"text-sm text-muted-foreground",children:"Success rate"})}),s.jsx(Ke,{className:"text-2xl font-semibold",children:bi(g.successRate)})]}),s.jsxs(Ge,{children:[s.jsx(Ie,{className:"pb-1",children:s.jsx($e,{className:"text-sm text-muted-foreground",children:"Total tokens"})}),s.jsx(Ke,{className:"text-2xl font-semibold",children:yn(g.totalTokens)})]}),s.jsxs(Ge,{children:[s.jsx(Ie,{className:"pb-1",children:s.jsx($e,{className:"text-sm text-muted-foreground",children:"Cache hit rate"})}),s.jsx(Ke,{className:"text-2xl font-semibold",children:bi(g.cacheHitRate)})]}),s.jsxs(Ge,{children:[s.jsx(Ie,{className:"pb-1",children:s.jsx($e,{className:"text-sm text-muted-foreground",children:"Avg latency"})}),s.jsx(Ke,{children:so(g.averageLatencyMs)})]}),s.jsxs(Ge,{children:[s.jsx(Ie,{className:"pb-1",children:s.jsx($e,{className:"text-sm text-muted-foreground",children:"p95 latency"})}),s.jsx(Ke,{children:so(g.p95LatencyMs)})]}),s.jsxs(Ge,{children:[s.jsx(Ie,{className:"pb-1",children:s.jsx($e,{className:"text-sm text-muted-foreground",children:"Avg TTFT"})}),s.jsx(Ke,{children:g.averageTtftMs?so(g.averageTtftMs):"—"})]}),s.jsxs(Ge,{children:[s.jsx(Ie,{className:"pb-1",children:s.jsx($e,{className:"text-sm text-muted-foreground",children:"Fallback rate"})}),s.jsx(Ke,{children:bi(g.fallbackRate)})]})]}),s.jsxs("div",{className:"mt-6 grid gap-4 lg:grid-cols-2",children:[s.jsxs(Ge,{children:[s.jsx(Ie,{children:s.jsx($e,{className:"text-base",children:"Top models"})}),s.jsx(Ke,{children:s.jsxs(Xn,{children:[s.jsx(Qn,{children:s.jsxs(Ze,{children:[s.jsx(ge,{children:"Model"}),s.jsx(ge,{children:"Requests"}),s.jsx(ge,{children:"Errors"}),s.jsx(ge,{children:"Tokens"})]})}),s.jsxs(Zn,{children:[o.topModels.length===0&&s.jsx(Ze,{children:s.jsx(de,{colSpan:4,className:"text-muted-foreground text-center",children:"No data"})}),o.topModels.map(v=>s.jsxs(Ze,{children:[s.jsx(de,{className:"font-mono text-xs",children:v.publicId}),s.jsx(de,{children:yn(v.requests)}),s.jsx(de,{children:bi(v.errorRate)}),s.jsx(de,{children:yn(v.totalTokens)})]},v.publicId))]})]})})]}),s.jsxs(Ge,{children:[s.jsx(Ie,{children:s.jsx($e,{className:"text-base",children:"Top API keys"})}),s.jsx(Ke,{children:s.jsxs(Xn,{children:[s.jsx(Qn,{children:s.jsxs(Ze,{children:[s.jsx(ge,{children:"Key"}),s.jsx(ge,{children:"Requests"}),s.jsx(ge,{children:"Tokens"})]})}),s.jsxs(Zn,{children:[o.topApiKeys.length===0&&s.jsx(Ze,{children:s.jsx(de,{colSpan:3,className:"text-muted-foreground text-center",children:"No data"})}),o.topApiKeys.map((v,w)=>s.jsxs(Ze,{children:[s.jsx(de,{children:v.name}),s.jsx(de,{children:yn(v.requests)}),s.jsx(de,{children:yn(v.totalTokens)})]},w))]})]})})]})]}),s.jsxs(Ge,{className:"mt-6",children:[s.jsxs(Ie,{children:[s.jsx($e,{className:"text-base",children:"Series (requests / errors over time)"}),s.jsxs(on,{children:["Buckets: ",o.range.bucket]})]}),s.jsx(Ke,{children:s.jsx("div",{className:"grid grid-cols-12 gap-1 text-xs",children:o.series.map(v=>s.jsxs("div",{className:"flex flex-col items-center",title:`${v.t}: ${v.requests} req, ${v.errors} err`,children:[s.jsx("div",{className:"w-full bg-primary/80",style:{height:`${Math.min(80,v.requests*4)}px`}}),s.jsx("div",{className:"text-[10px] text-muted-foreground",children:v.t.slice(5,10)})]},v.t))})})]})]})}function t_(){const[a,l]=p.useState([]),[o,i]=p.useState(0);return p.useEffect(()=>{Ce.get("/api/admin/audit?limit=200").then(u=>{l(u.rows),i(u.total)})},[]),s.jsxs("div",{children:[s.jsx(va,{title:"Audit Logs",description:`${o} entries · immutable`}),s.jsxs(Ge,{children:[s.jsx(Ie,{children:s.jsx($e,{className:"text-base",children:"All entries"})}),s.jsx(Ke,{children:s.jsxs(Xn,{children:[s.jsx(Qn,{children:s.jsxs(Ze,{children:[s.jsx(ge,{children:"Time"}),s.jsx(ge,{children:"Action"}),s.jsx(ge,{children:"Status"}),s.jsx(ge,{children:"Target"}),s.jsx(ge,{children:"IP"}),s.jsx(ge,{children:"Actor"})]})}),s.jsxs(Zn,{children:[a.length===0&&s.jsx(Ze,{children:s.jsx(de,{colSpan:6,className:"text-center text-muted-foreground",children:"No audit events yet."})}),a.map(u=>s.jsxs(Ze,{children:[s.jsx(de,{className:"text-xs",children:fh(u.createdAt)}),s.jsx(de,{className:"font-mono text-xs",children:u.action}),s.jsx(de,{children:u.success?s.jsx(st,{variant:"success",children:"ok"}):s.jsx(st,{variant:"destructive",children:"fail"})}),s.jsx(de,{className:"text-xs",children:u.targetName??u.targetId??"—"}),s.jsx(de,{className:"text-xs",children:u.ip}),s.jsx(de,{className:"text-xs",children:u.actor})]},u.id))]})]})})]})]})}function n_(){const[a]=sC(),[l,o]=p.useState(null),[i,u]=p.useState(null),[f,h]=p.useState({current:"",next:""}),[m,g]=p.useState(null),[v,w]=p.useState(!1),[S,b]=p.useState("idle"),[x,T]=p.useState(null),j=async(X=!1)=>{b("checking"),T(null);try{const ae=await Ce.get(`/api/admin/update/check${X?"?force=1":""}`);g(ae),b("idle")}catch(ae){T(ae.message),b("error")}},E=async()=>{w(!0),b("installing"),T(null);try{const X=await Ce.post("/api/admin/update/run");b("restarting"),be.success(X.message||"Update started — the gateway will restart shortly.");const ae=setInterval(()=>{fetch("/health").then(le=>{le.ok&&(clearInterval(ae),window.location.reload())}).catch(()=>{})},3e3);setTimeout(()=>clearInterval(ae),12e4)}catch(X){be.error(X.message),T(X.message),b("error")}finally{w(!1)}},[R,A]=p.useState("disabled"),[N,O]=p.useState(""),[H,P]=p.useState(""),[z,U]=p.useState(""),[ee,se]=p.useState([]),[oe,J]=p.useState(""),[ie,ce]=p.useState(""),[me,L]=p.useState(!1),[I,te]=p.useState(null),W=async()=>{const X=await Ce.get("/api/admin/settings");o(X.settings);const ae=await Ce.get("/api/admin/settings/system");u(ae);try{const le=await Ce.get("/api/admin/me");A(le.totpEnabled?"enabled":"disabled")}catch{}};if(p.useEffect(()=>{W(),j()},[]),!l)return s.jsx("div",{className:"text-muted-foreground",children:"Loading…"});const Z=async X=>{try{await Ce.patch("/api/admin/settings",X),be.success("Saved"),W()}catch(ae){be.error(ae.message)}},M=async()=>{try{const X=await Ce.post("/api/admin/account/totp/begin");O(X.secret),P(X.qr),A("setup"),be.info("Scan the QR code with your authenticator app")}catch(X){be.error(X.message)}},B=async()=>{if(!z||z.length!==6){be.error("Enter a 6-digit code");return}try{const X=await Ce.post("/api/admin/account/totp/verify",{code:z});se(X.recoveryCodes),A("showingRecovery"),be.success("TOTP enabled successfully")}catch(X){be.error(X.message)}},$=async()=>{if(!oe){be.error("Enter your password");return}if(!ie){be.error("Enter a TOTP code or recovery code");return}try{await Ce.post("/api/admin/account/totp/disable",{password:oe,totp:ie}),A("disabled"),J(""),ce(""),be.success("TOTP disabled"),W()}catch(X){be.error(X.message)}},ne=async()=>{L(!0);try{const X=await Ce.post("/api/admin/account/totp/recovery/regenerate",{password:oe,totp:ie});se(X.recoveryCodes),A("showingRecovery"),be.success("Recovery codes regenerated")}catch(X){be.error(X.message)}L(!1)},ue=a.get("tab")||"logging";return s.jsxs("div",{children:[s.jsx(va,{title:"Settings",description:"Logging, security, backup, and system info"}),s.jsxs(r1,{defaultValue:ue,children:[s.jsxs(om,{children:[s.jsx(Ml,{value:"logging",children:"Logging"}),s.jsx(Ml,{value:"security",children:"Security"}),s.jsx(Ml,{value:"backup",children:"Backup"}),s.jsx(Ml,{value:"system",children:"System"})]}),s.jsx(Si,{value:"logging",children:s.jsxs(Ge,{children:[s.jsx(Ie,{children:s.jsx($e,{className:"text-base",children:"Logging policy"})}),s.jsxs(Ke,{className:"space-y-3",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx(Se,{children:"Request-content logging"}),s.jsxs(kn,{value:l.contentLogMode,onValueChange:X=>Z({contentLogMode:X}),children:[s.jsx(xn,{children:s.jsx(Ln,{})}),s.jsxs(bn,{children:[s.jsx(rt,{value:"off",children:"Off"}),s.jsx(rt,{value:"metadata",children:"Metadata only (default)"}),s.jsx(rt,{value:"prompt",children:"Prompt (sanitized)"}),s.jsx(rt,{value:"prompt_and_response",children:"Prompt + response (sanitized)"})]})]})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx(Se,{children:"Retention (days)"}),s.jsx(Me,{type:"number",min:1,max:3650,value:l.retentionDays,onChange:X=>Z({retentionDays:Number(X.target.value)})})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx(Se,{children:"Database size limit (MB)"}),s.jsx(Me,{type:"number",min:64,value:l.dbSizeLimitMb,onChange:X=>Z({dbSizeLimitMb:Number(X.target.value)})})]}),s.jsx("div",{className:"flex items-center gap-2 pt-2",children:s.jsx(ve,{onClick:async()=>{const X=await Ce.post("/api/admin/settings/cleanup");be.success(`Deleted ${X.deletedRequests} old requests`)},children:"Run cleanup now"})})]})]})}),s.jsx(Si,{value:"security",children:s.jsxs(Ge,{children:[s.jsxs(Ie,{children:[s.jsx($e,{className:"text-base",children:"Security"}),s.jsx(on,{children:"Change password, 2FA, and trusted proxy configuration"})]}),s.jsxs(Ke,{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(Se,{children:"Trusted proxy hops"}),s.jsx(Me,{type:"number",min:0,max:8,value:l.trustProxyHops,onChange:X=>Z({trustProxyHops:Number(X.target.value)})}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"0 = never trust X-Forwarded-For (direct exposure). 1+ only when behind a single trusted reverse proxy."})]}),s.jsxs("div",{className:"space-y-2 border-t pt-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Se,{className:"text-base",children:"TOTP 2FA"}),R==="enabled"?s.jsx("span",{className:"rounded bg-green-100 px-2 py-0.5 text-xs font-medium text-green-800 dark:bg-green-900 dark:text-green-200",children:"Enabled"}):null,R==="disabled"?s.jsx("span",{className:"rounded bg-muted px-2 py-0.5 text-xs font-medium text-muted-foreground",children:"Disabled"}):null]}),R==="disabled"&&s.jsx(ve,{variant:"outline",onClick:M,children:"Enable TOTP"}),R==="setup"&&s.jsxs("div",{className:"space-y-3 rounded border p-3",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"Scan this QR code with your authenticator app, or enter the secret manually."}),H&&s.jsx("img",{src:H,alt:"TOTP QR code",className:"h-40 w-40"}),s.jsxs("div",{className:"text-xs font-mono text-muted-foreground",children:["Secret: ",N]}),s.jsxs("div",{className:"flex items-end gap-2",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx(Se,{children:"Verify code"}),s.jsx(Me,{value:z,onChange:X=>U(X.target.value),placeholder:"123456",maxLength:6})]}),s.jsx(ve,{disabled:z.length<6,onClick:B,children:"Verify & enable"})]})]}),R==="showingRecovery"&&s.jsxs("div",{className:"space-y-3 rounded border border-amber-500/40 bg-amber-50 p-3 dark:bg-amber-950/20",children:[s.jsx("p",{className:"text-sm font-medium",children:"Recovery codes — save these now!"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Each code can be used once to log in without your TOTP device. They will not be shown again."}),s.jsx("div",{className:"space-y-1",children:ee.map((X,ae)=>s.jsx("div",{className:"font-mono text-xs",children:X},ae))}),s.jsx(ve,{onClick:()=>{A("enabled"),be.success("Recovery codes saved")},children:"I have saved them"})]}),R==="enabled"&&s.jsxs("div",{className:"space-y-3 rounded border p-3",children:[s.jsxs("div",{className:"grid gap-2 sm:grid-cols-2",children:[s.jsxs("div",{children:[s.jsx(Se,{children:"Password"}),s.jsx(Me,{type:"password",value:oe,onChange:X=>J(X.target.value),placeholder:"Current password"})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"TOTP code"}),s.jsx(Me,{value:ie,onChange:X=>ce(X.target.value),placeholder:"123456",maxLength:6})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ve,{variant:"outline",size:"sm",disabled:me||!oe||ie.length<6,onClick:ne,children:"Regenerate recovery codes"}),s.jsx(ve,{variant:"destructive",size:"sm",disabled:!oe||ie.length<6,onClick:$,children:"Disable TOTP"})]})]})]}),s.jsxs("div",{className:"space-y-2 border-t pt-4",children:[s.jsx(Se,{children:"Change password"}),s.jsx(Me,{type:"password",placeholder:"Current password",value:f.current,onChange:X=>h({...f,current:X.target.value})}),s.jsx(Me,{type:"password",placeholder:"New password (12+ chars)",value:f.next,onChange:X=>h({...f,next:X.target.value})}),s.jsx(ve,{disabled:!f.current||f.next.length<12,onClick:async()=>{try{await Ce.post("/api/admin/account/password",{currentPassword:f.current,newPassword:f.next}),be.success("Password changed"),h({current:"",next:""})}catch(X){be.error(X.message)}},children:"Change password"})]})]})]})}),s.jsx(Si,{value:"backup",children:s.jsxs(Ge,{children:[s.jsxs(Ie,{children:[s.jsx($e,{className:"text-base",children:"Backup & restore"}),s.jsx(on,{children:"Download a snapshot or restore from a previous backup"})]}),s.jsxs(Ke,{className:"space-y-3",children:[s.jsx(ve,{onClick:async()=>{try{const X=await fetch("/api/admin/backup/create",{method:"POST",credentials:"include"});if(!X.ok)throw new Error("Backup failed");const ae=await X.blob(),le=URL.createObjectURL(ae),fe=document.createElement("a");fe.href=le,fe.download="latedev-backup.json",fe.click(),URL.revokeObjectURL(le),be.success("Backup downloaded")}catch(X){be.error(X.message)}},children:"Download backup"}),s.jsxs(k0,{open:I!==null,onOpenChange:X=>{X||te(null)},children:[s.jsx(DA,{asChild:!0,children:s.jsxs("div",{children:[s.jsx(Se,{children:"Restore from backup file"}),s.jsx(Me,{type:"file",accept:".json,application/json","data-testid":"restore-file",onChange:X=>{var le;const ae=(le=X.target.files)==null?void 0:le[0];te(ae??null)}})]})}),s.jsxs(Ph,{children:[s.jsxs(U0,{children:[s.jsx(qh,{children:"Restore backup?"}),s.jsxs(Vh,{children:["Restoring will replace the entire current database with the selected backup (",(I==null?void 0:I.name)??"file","). This cannot be undone. A snapshot of the current database is kept for rollback only if validation fails."]})]}),s.jsxs(H0,{children:[s.jsx(Gh,{children:"Cancel"}),s.jsx(Yh,{onClick:async()=>{var ae,le;const X=I;if(X)try{const fe=await fetch("/api/admin/backup/restore",{method:"POST",body:X,credentials:"include",headers:{"content-type":"application/json"}});if(!fe.ok)throw new Error(((le=(ae=await fe.json())==null?void 0:ae.error)==null?void 0:le.message)??"Restore failed");be.success("Restored. Please restart the gateway."),te(null)}catch(fe){be.error(fe.message)}},children:"Restore"})]})]})]})]})]})}),s.jsxs(Si,{value:"system",children:[s.jsxs(Ge,{children:[s.jsx(Ie,{children:s.jsx($e,{className:"text-base",children:"System"})}),s.jsxs(Ke,{className:"space-y-2 text-sm",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-muted-foreground",children:"App version:"})," ",i==null?void 0:i.appVersion]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-muted-foreground",children:"Data directory:"})," ",s.jsx("span",{className:"font-mono",children:i==null?void 0:i.dataDir})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-muted-foreground",children:"Encryption:"})," ",i!=null&&i.masterKeyConfigured?"Configured":"Not configured"," (v",i==null?void 0:i.masterKeyVersion,")"]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-muted-foreground",children:"Environment:"})," ",i==null?void 0:i.environment]}),s.jsxs("div",{className:"flex items-center gap-2 pt-2",children:[s.jsx(cr,{checked:l.gatewayCacheEnabled,onCheckedChange:X=>Z({gatewayCacheEnabled:X})}),s.jsx(Se,{children:"Gateway response cache (disabled by default)"})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[s.jsxs("div",{children:[s.jsx(Se,{children:"Cache TTL (s)"}),s.jsx(Me,{type:"number",min:1,value:l.gatewayCacheDefaultTtlSeconds,onChange:X=>Z({gatewayCacheDefaultTtlSeconds:Number(X.target.value)})})]}),s.jsxs("div",{children:[s.jsx(Se,{children:"Cache max size (MB)"}),s.jsx(Me,{type:"number",min:1,value:l.gatewayCacheMaxSizeMb,onChange:X=>Z({gatewayCacheMaxSizeMb:Number(X.target.value)})})]})]}),s.jsx(ve,{variant:"outline",onClick:async()=>{const X=await Ce.post("/api/admin/settings/cache/clear");be.success(`Cleared ${X.deleted} entries`)},children:"Clear gateway cache"})]})]}),s.jsxs(Ge,{className:"mt-4",children:[s.jsxs(Ie,{children:[s.jsx($e,{className:"text-base",children:"Updates"}),s.jsx(on,{children:"Automatic updates from the npm registry"})]}),s.jsxs(Ke,{className:"space-y-3 text-sm",children:[S==="checking"&&!m&&s.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[s.jsx(mf,{className:"h-4 w-4 animate-spin"})," Checking for updates…"]}),m&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-muted-foreground",children:"Current version"}),s.jsxs("div",{className:"font-mono",children:["v",m.currentVersion]})]}),s.jsx("span",{className:"text-muted-foreground",children:"→"}),s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-muted-foreground",children:"Latest version"}),s.jsx("div",{className:"font-mono",children:m.latestVersion?`v${m.latestVersion}`:"—"})]}),m.status.docker?s.jsx(st,{variant:"secondary",children:m.status.watchtower?"Docker + Watchtower":"Docker"}):m.latestVersion===null?s.jsx(st,{variant:"secondary",children:"Registry unreachable"}):m.hasUpdate?s.jsx(st,{variant:"success",children:"Update available"}):s.jsxs(st,{variant:"outline",children:[s.jsx(EC,{className:"mr-1 h-3 w-3"})," Up to date"]})]}),m.status.docker&&m.status.watchtower&&m.watchtowerReachable&&s.jsx("p",{className:"text-muted-foreground",children:"Watchtower pulls new images automatically every hour — or use Update now for an instant update."}),m.status.docker&&m.status.watchtower&&m.watchtowerReachable===!1&&s.jsxs("p",{className:"text-muted-foreground",children:["The Watchtower sidecar is configured but not running — start it with ",s.jsx("code",{className:"rounded bg-muted px-1 text-xs",children:"docker compose --profile updater up -d"}),"."]}),m.status.docker&&!m.status.watchtower&&s.jsx("p",{className:"text-muted-foreground",children:m.status.reason??"This instance runs in Docker — update by pulling the new image tag."}),!m.status.docker&&m.latestVersion===null&&s.jsxs("p",{className:"text-muted-foreground",children:["Could not reach the npm registry (offline or blocked). ",x&&s.jsx("span",{className:"text-destructive",children:x})]}),S==="installing"&&s.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[s.jsx(mf,{className:"h-4 w-4 animate-spin"})," Applying the update… this can take a minute."]}),S==="restarting"&&s.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[s.jsx(mf,{className:"h-4 w-4 animate-spin"})," Update applied — the gateway is restarting on the new version. This page reloads automatically."]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[m.hasUpdate&&S==="idle"&&(!m.status.docker||m.status.watchtower&&m.watchtowerReachable!==!1)&&s.jsxs(ve,{disabled:v||m.status.docker&&m.watchtowerReachable===!1,onClick:E,children:[s.jsx(Ex,{className:"mr-1 h-4 w-4"})," Update now"]}),m.hasUpdate&&m.changelogUrl&&s.jsx(ve,{variant:"outline",asChild:!0,children:s.jsx("a",{href:m.changelogUrl,target:"_blank",rel:"noreferrer",children:"View changes"})}),S==="idle"&&s.jsx(ve,{variant:"ghost",disabled:v,onClick:()=>j(!0),children:"Check again"})]})]})]})]})]})]})]})}function a_({children:a}){const{user:l,loading:o}=uh(),i=sn();return o?s.jsx("div",{className:"flex h-screen items-center justify-center text-muted-foreground",children:"Loading…"}):l?s.jsx(s.Fragment,{children:a}):s.jsx(Af,{to:"/login",state:{from:i},replace:!0})}function l_(){return s.jsxs("div",{className:"flex h-screen bg-background text-foreground",children:[s.jsx(b2,{}),s.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[s.jsx(SN,{}),s.jsx("main",{className:"flex-1 overflow-auto p-6",children:s.jsxs(yx,{children:[s.jsx(nn,{index:!0,element:s.jsx(tA,{})}),s.jsx(nn,{path:"/providers",element:s.jsx(NM,{})}),s.jsx(nn,{path:"/models",element:s.jsx(HM,{})}),s.jsx(nn,{path:"/combos",element:s.jsx(BM,{})}),s.jsx(nn,{path:"/aliases",element:s.jsx(PM,{})}),s.jsx(nn,{path:"/api-keys",element:s.jsx(qM,{})}),s.jsx(nn,{path:"/requests",element:s.jsx(VM,{})}),s.jsx(nn,{path:"/statistics",element:s.jsx(e_,{})}),s.jsx(nn,{path:"/audit",element:s.jsx(t_,{})}),s.jsx(nn,{path:"/settings/*",element:s.jsx(n_,{})})]})})]})]})}function r_({children:a}){const[l,o]=p.useState(null),i=sn();return p.useEffect(()=>{Ce.get("/api/admin/setup/status").then(u=>o(u.setupComplete)).catch(()=>o(!0))},[]),l===null?s.jsx("div",{className:"flex h-screen items-center justify-center text-muted-foreground",children:"Loading…"}):!l&&i.pathname!=="/setup"?s.jsx(Af,{to:"/setup",replace:!0}):l&&i.pathname==="/setup"?s.jsx(Af,{to:"/",replace:!0}):s.jsx(s.Fragment,{children:a})}function o_(){return s.jsx(vC,{children:s.jsx(r_,{children:s.jsxs(yx,{children:[s.jsx(nn,{path:"/setup",element:s.jsx(WN,{})}),s.jsx(nn,{path:"/login",element:s.jsx(JN,{})}),s.jsx(nn,{path:"/*",element:s.jsx(a_,{children:s.jsx(l_,{})})})]})})})}const i_=FN;var s_=Object.defineProperty,ln=(a,l)=>s_(a,"name",{value:l,configurable:!0}),[im,P_]=cn("Tooltip",[jo]),c_=jo(),u_="TooltipProvider",d_=700,Jy="tooltip.open",[f_,h_]=im(u_),m_=ln(a=>{const{__scopeTooltip:l,delayDuration:o=d_,skipDelayDuration:i=300,disableHoverableContent:u=!1,children:f}=a,h=p.useRef(!0),m=p.useRef(!1),g=p.useRef(0);return p.useEffect(()=>{const v=g.current;return()=>window.clearTimeout(v)},[]),s.jsx(f_,{scope:l,isOpenDelayedRef:h,delayDuration:o,onOpen:p.useCallback(()=>{i<=0||(window.clearTimeout(g.current),h.current=!1)},[i]),onClose:p.useCallback(()=>{i<=0||(window.clearTimeout(g.current),g.current=window.setTimeout(()=>h.current=!0,i))},[i]),isPointerInTransitRef:m,onPointerInTransitChange:p.useCallback(v=>{m.current=v},[]),disableHoverableContent:u,children:f})},"TooltipProvider"),p_="Tooltip",[q_,sm]=im(p_),g_="TooltipPortal",[V_,v_]=im(g_,{forceMount:void 0}),Ri="TooltipContent",y_=p.forwardRef(ln(function(l,o){const i=v_(Ri,l.__scopeTooltip),{forceMount:u=i.forceMount,side:f="top",...h}=l,m=sm(Ri,l.__scopeTooltip);return s.jsx(Wa,{present:u||m.open,children:m.disableHoverableContent?s.jsx(o1,{side:f,...h,ref:o}):s.jsx(x_,{side:f,...h,ref:o})})},"TooltipContent")),x_=p.forwardRef(ln(function(l,o){const i=sm(Ri,l.__scopeTooltip),u=h_(Ri,l.__scopeTooltip),f=p.useRef(null),h=Pe(o,f),[m,g]=p.useState(null),{trigger:v,onClose:w}=i,S=f.current,{onPointerInTransitChange:b}=u,x=p.useCallback(()=>{g(null),b(!1)},[b]),T=p.useCallback((j,E)=>{const R=j.currentTarget,A={x:j.clientX,y:j.clientY},N=i1(A,R.getBoundingClientRect()),O=s1(A,N),H=c1(E.getBoundingClientRect()),P=d1([...O,...H]);g(P),b(!0)},[b]);return p.useEffect(()=>()=>x(),[x]),p.useEffect(()=>{if(v&&S){const j=ln(R=>T(R,S),"handleTriggerLeave"),E=ln(R=>T(R,v),"handleContentLeave");return v.addEventListener("pointerleave",j),S.addEventListener("pointerleave",E),()=>{v.removeEventListener("pointerleave",j),S.removeEventListener("pointerleave",E)}}},[v,S,T,x]),p.useEffect(()=>{if(m){const j=ln(E=>{const R=E.target,A={x:E.clientX,y:E.clientY},N=(v==null?void 0:v.contains(R))||(S==null?void 0:S.contains(R)),O=!u1(A,m);N?x():O&&(x(),w())},"handleTrackPointerGrace");return document.addEventListener("pointermove",j),()=>document.removeEventListener("pointermove",j)}},[v,S,m,w,x]),s.jsx(o1,{...l,ref:h})},"TooltipContentHoverable")),b_=Hx("TooltipContent"),o1=p.forwardRef(ln(function(l,o){const{__scopeTooltip:i,children:u,"aria-label":f,id:h,onEscapeKeyDown:m,onPointerDownOutside:g,...v}=l,w=sm(Ri,i),S=c_(i),{onClose:b}=w;p.useEffect(()=>(document.addEventListener(Jy,b),()=>document.removeEventListener(Jy,b)),[b]),p.useEffect(()=>{if(w.trigger){const T=ln(j=>{j.target instanceof Node&&j.target.contains(w.trigger)&&b()},"handleScroll");return window.addEventListener("scroll",T,{capture:!0}),()=>window.removeEventListener("scroll",T,{capture:!0})}},[w.trigger,b]);const{setContentId:x}=w;return Tt(()=>(x(h),()=>{x(void 0)}),[h,x]),s.jsx(Cc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:m,onPointerDownOutside:g,onFocusOutside:T=>T.preventDefault(),onDismiss:b,children:s.jsxs(Rh,{"data-state":w.stateAttribute,role:f?void 0:"tooltip",id:f?void 0:w.contentId,...S,...v,ref:o,style:{...v.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[s.jsx(b_,{children:u}),f?s.jsx(VA,{id:w.contentId,role:"tooltip",children:f}):null]})})},"TooltipContentImpl"));function i1(a,l){const o=Math.abs(l.top-a.y),i=Math.abs(l.bottom-a.y),u=Math.abs(l.right-a.x),f=Math.abs(l.left-a.x);switch(Math.min(o,i,u,f)){case f:return"left";case u:return"right";case o:return"top";case i:return"bottom";default:throw new Error("unreachable")}}ln(i1,"getExitSideFromRect");function s1(a,l,o=5){const i=[];switch(l){case"top":i.push({x:a.x-o,y:a.y+o},{x:a.x+o,y:a.y+o});break;case"bottom":i.push({x:a.x-o,y:a.y-o},{x:a.x+o,y:a.y-o});break;case"left":i.push({x:a.x+o,y:a.y-o},{x:a.x+o,y:a.y+o});break;case"right":i.push({x:a.x-o,y:a.y-o},{x:a.x-o,y:a.y+o});break}return i}ln(s1,"getPaddedExitPoints");function c1(a){const{top:l,right:o,bottom:i,left:u}=a;return[{x:u,y:l},{x:o,y:l},{x:o,y:i},{x:u,y:i}]}ln(c1,"getPointsFromRect");function u1(a,l){const{x:o,y:i}=a;let u=!1;for(let f=0,h=l.length-1;f<l.length;h=f++){const m=l[f],g=l[h],v=m.x,w=m.y,S=g.x,b=g.y;w>i!=b>i&&o<(S-v)*(i-w)/(b-w)+v&&(u=!u)}return u}ln(u1,"isPointInPolygon");function d1(a){const l=a.slice();return l.sort((o,i)=>o.x<i.x?-1:o.x>i.x?1:o.y<i.y?-1:o.y>i.y?1:0),f1(l)}ln(d1,"getHull");function f1(a){if(a.length<=1)return a.slice();const l=[];for(let i=0;i<a.length;i++){const u=a[i];for(;l.length>=2;){const f=l[l.length-1],h=l[l.length-2];if((f.x-h.x)*(u.y-h.y)>=(f.y-h.y)*(u.x-h.x))l.pop();else break}l.push(u)}l.pop();const o=[];for(let i=a.length-1;i>=0;i--){const u=a[i];for(;o.length>=2;){const f=o[o.length-1],h=o[o.length-2];if((f.x-h.x)*(u.y-h.y)>=(f.y-h.y)*(u.x-h.x))o.pop();else break}o.push(u)}return o.pop(),l.length===1&&o.length===1&&l[0].x===o[0].x&&l[0].y===o[0].y?l:l.concat(o)}ln(f1,"getHullPresorted");var S_=m_,h1=y_;const w_=S_,j_=p.forwardRef(({className:a,sideOffset:l=4,...o},i)=>s.jsx(h1,{ref:i,sideOffset:l,className:Ee("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95",a),...o}));j_.displayName=h1.displayName;kw.createRoot(document.getElementById("root")).render(s.jsx(re.StrictMode,{children:s.jsx(A2,{defaultTheme:"dark",storageKey:"latedev-theme",children:s.jsxs(w_,{children:[s.jsx(lC,{children:s.jsx(o_,{})}),s.jsx(i_,{position:"top-right"})]})})}));