llm-relay 0.84.0 → 0.85.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -2
- package/dist/availability.d.ts +1 -1
- package/dist/backend.d.ts +1 -1
- package/dist/circuit-breaker.d.ts +1 -1
- package/dist/cli.d.ts +1 -1
- package/dist/config-types.d.ts +10 -10
- package/dist/config.d.ts +1 -1
- package/dist/dashboard/.vite/manifest.json +2 -2
- package/dist/dashboard/assets/index-C-I6hPeY.js +403 -0
- package/dist/dashboard/assets/index-CrSNlLMD.css +1 -0
- package/dist/dashboard/index.html +2 -2
- package/dist/dashboard-auth.d.ts +2 -0
- package/dist/dashboard-auth.js +5 -0
- package/dist/dashboard-auth.js.map +1 -1
- package/dist/dashboard-routes.d.ts +2 -1
- package/dist/dashboard-routes.js +12 -4
- package/dist/dashboard-routes.js.map +1 -1
- package/dist/dashboard-static.js +34 -4
- package/dist/dashboard-static.js.map +1 -1
- package/dist/dispatch-lane-stats.d.ts +1 -1
- package/dist/dispatch.d.ts +3 -3
- package/dist/hedge-trigger.d.ts +1 -1
- package/dist/lane-cadence.d.ts +1 -1
- package/dist/lane-manifest.d.ts +1 -1
- package/dist/lane-probe.d.ts +2 -2
- package/dist/latency-demotion.d.ts +1 -1
- package/dist/mcp/lane-runner.d.ts +1 -1
- package/dist/mcp/protocol.d.ts +1 -1
- package/dist/mcp/readonly-boundary.d.ts +1 -1
- package/dist/mcp/server.d.ts +4 -4
- package/dist/process-safety-net.d.ts +1 -1
- package/dist/responses-request.d.ts +1 -1
- package/dist/routes/admin.js +1 -1
- package/dist/routes/admin.js.map +1 -1
- package/dist/stream-commit.d.ts +1 -1
- package/dist/stream-pipeline.d.ts +1 -1
- package/dist/tool-dialects.d.ts +1 -1
- package/docs/README.md +43 -0
- package/package.json +1 -1
- package/scripts/install-skill.mjs +1 -0
- package/skills/llm-relay/SKILL.md +4 -0
- package/skills/llm-relay/references/lane-field-notes.md +202 -0
- package/dist/dashboard/assets/index-B2UQHoym.js +0 -74
- package/dist/dashboard/assets/index-DFEP3XPr.css +0 -1
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
(function(){const d=document.createElement("link").relList;if(d&&d.supports&&d.supports("modulepreload"))return;for(const p of document.querySelectorAll('link[rel="modulepreload"]'))u(p);new MutationObserver(p=>{for(const y of p)if(y.type==="childList")for(const R of y.addedNodes)R.tagName==="LINK"&&R.rel==="modulepreload"&&u(R)}).observe(document,{childList:!0,subtree:!0});function f(p){const y={};return p.integrity&&(y.integrity=p.integrity),p.referrerPolicy&&(y.referrerPolicy=p.referrerPolicy),p.crossOrigin==="use-credentials"?y.credentials="include":p.crossOrigin==="anonymous"?y.credentials="omit":y.credentials="same-origin",y}function u(p){if(p.ep)return;p.ep=!0;const y=f(p);fetch(p.href,y)}})();var zc={exports:{}},_i={};/**
|
|
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 Xm;function ny(){if(Xm)return _i;Xm=1;var s=Symbol.for("react.transitional.element"),d=Symbol.for("react.fragment");function f(u,p,y){var R=null;if(y!==void 0&&(R=""+y),p.key!==void 0&&(R=""+p.key),"key"in p){y={};for(var q in p)q!=="key"&&(y[q]=p[q])}else y=p;return p=y.ref,{$$typeof:s,type:u,key:R,ref:p!==void 0?p:null,props:y}}return _i.Fragment=d,_i.jsx=f,_i.jsxs=f,_i}var Vm;function iy(){return Vm||(Vm=1,zc.exports=ny()),zc.exports}var n=iy(),Tc={exports:{}},se={};/**
|
|
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 Qm;function ry(){if(Qm)return se;Qm=1;var s=Symbol.for("react.transitional.element"),d=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),p=Symbol.for("react.profiler"),y=Symbol.for("react.consumer"),R=Symbol.for("react.context"),q=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),k=Symbol.for("react.activity"),V=Symbol.iterator;function L(h){return h===null||typeof h!="object"?null:(h=V&&h[V]||h["@@iterator"],typeof h=="function"?h:null)}var Q={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},I=Object.assign,oe={};function ae(h,N,A){this.props=h,this.context=N,this.refs=oe,this.updater=A||Q}ae.prototype.isReactComponent={},ae.prototype.setState=function(h,N){if(typeof h!="object"&&typeof h!="function"&&h!=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,h,N,"setState")},ae.prototype.forceUpdate=function(h){this.updater.enqueueForceUpdate(this,h,"forceUpdate")};function be(){}be.prototype=ae.prototype;function $(h,N,A){this.props=h,this.context=N,this.refs=oe,this.updater=A||Q}var ee=$.prototype=new be;ee.constructor=$,I(ee,ae.prototype),ee.isPureReactComponent=!0;var Y=Array.isArray;function ce(){}var X={H:null,A:null,T:null,S:null},xe=Object.prototype.hasOwnProperty;function he(h,N,A){var B=A.ref;return{$$typeof:s,type:h,key:N,ref:B!==void 0?B:null,props:A}}function De(h,N){return he(h.type,N,h.props)}function ke(h){return typeof h=="object"&&h!==null&&h.$$typeof===s}function qe(h){var N={"=":"=0",":":"=2"};return"$"+h.replace(/[=:]/g,function(A){return N[A]})}var ie=/\/+/g;function ye(h,N){return typeof h=="object"&&h!==null&&h.key!=null?qe(""+h.key):N.toString(36)}function re(h){switch(h.status){case"fulfilled":return h.value;case"rejected":throw h.reason;default:switch(typeof h.status=="string"?h.then(ce,ce):(h.status="pending",h.then(function(N){h.status==="pending"&&(h.status="fulfilled",h.value=N)},function(N){h.status==="pending"&&(h.status="rejected",h.reason=N)})),h.status){case"fulfilled":return h.value;case"rejected":throw h.reason}}throw h}function E(h,N,A,B,J){var te=typeof h;(te==="undefined"||te==="boolean")&&(h=null);var ve=!1;if(h===null)ve=!0;else switch(te){case"bigint":case"string":case"number":ve=!0;break;case"object":switch(h.$$typeof){case s:case d:ve=!0;break;case U:return ve=h._init,E(ve(h._payload),N,A,B,J)}}if(ve)return J=J(h),ve=B===""?"."+ye(h,0):B,Y(J)?(A="",ve!=null&&(A=ve.replace(ie,"$&/")+"/"),E(J,N,A,"",function(Qt){return Qt})):J!=null&&(ke(J)&&(J=De(J,A+(J.key==null||h&&h.key===J.key?"":(""+J.key).replace(ie,"$&/")+"/")+ve)),N.push(J)),1;ve=0;var et=B===""?".":B+":";if(Y(h))for(var Ye=0;Ye<h.length;Ye++)B=h[Ye],te=et+ye(B,Ye),ve+=E(B,N,A,te,J);else if(Ye=L(h),typeof Ye=="function")for(h=Ye.call(h),Ye=0;!(B=h.next()).done;)B=B.value,te=et+ye(B,Ye++),ve+=E(B,N,A,te,J);else if(te==="object"){if(typeof h.then=="function")return E(re(h),N,A,B,J);throw N=String(h),Error("Objects are not valid as a React child (found: "+(N==="[object Object]"?"object with keys {"+Object.keys(h).join(", ")+"}":N)+"). If you meant to render a collection of children, use an array instead.")}return ve}function H(h,N,A){if(h==null)return h;var B=[],J=0;return E(h,B,"","",function(te){return N.call(A,te,J++)}),B}function K(h){if(h._status===-1){var N=h._result;N=N(),N.then(function(A){(h._status===0||h._status===-1)&&(h._status=1,h._result=A)},function(A){(h._status===0||h._status===-1)&&(h._status=2,h._result=A)}),h._status===-1&&(h._status=0,h._result=N)}if(h._status===1)return h._result.default;throw h._result}var ue=typeof reportError=="function"?reportError:function(h){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var N=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof h=="object"&&h!==null&&typeof h.message=="string"?String(h.message):String(h),error:h});if(!window.dispatchEvent(N))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",h);return}console.error(h)},Te={map:H,forEach:function(h,N,A){H(h,function(){N.apply(this,arguments)},A)},count:function(h){var N=0;return H(h,function(){N++}),N},toArray:function(h){return H(h,function(N){return N})||[]},only:function(h){if(!ke(h))throw Error("React.Children.only expected to receive a single React element child.");return h}};return se.Activity=k,se.Children=Te,se.Component=ae,se.Fragment=f,se.Profiler=p,se.PureComponent=$,se.StrictMode=u,se.Suspense=x,se.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=X,se.__COMPILER_RUNTIME={__proto__:null,c:function(h){return X.H.useMemoCache(h)}},se.cache=function(h){return function(){return h.apply(null,arguments)}},se.cacheSignal=function(){return null},se.cloneElement=function(h,N,A){if(h==null)throw Error("The argument must be a React element, but you passed "+h+".");var B=I({},h.props),J=h.key;if(N!=null)for(te in N.key!==void 0&&(J=""+N.key),N)!xe.call(N,te)||te==="key"||te==="__self"||te==="__source"||te==="ref"&&N.ref===void 0||(B[te]=N[te]);var te=arguments.length-2;if(te===1)B.children=A;else if(1<te){for(var ve=Array(te),et=0;et<te;et++)ve[et]=arguments[et+2];B.children=ve}return he(h.type,J,B)},se.createContext=function(h){return h={$$typeof:R,_currentValue:h,_currentValue2:h,_threadCount:0,Provider:null,Consumer:null},h.Provider=h,h.Consumer={$$typeof:y,_context:h},h},se.createElement=function(h,N,A){var B,J={},te=null;if(N!=null)for(B in N.key!==void 0&&(te=""+N.key),N)xe.call(N,B)&&B!=="key"&&B!=="__self"&&B!=="__source"&&(J[B]=N[B]);var ve=arguments.length-2;if(ve===1)J.children=A;else if(1<ve){for(var et=Array(ve),Ye=0;Ye<ve;Ye++)et[Ye]=arguments[Ye+2];J.children=et}if(h&&h.defaultProps)for(B in ve=h.defaultProps,ve)J[B]===void 0&&(J[B]=ve[B]);return he(h,te,J)},se.createRef=function(){return{current:null}},se.forwardRef=function(h){return{$$typeof:q,render:h}},se.isValidElement=ke,se.lazy=function(h){return{$$typeof:U,_payload:{_status:-1,_result:h},_init:K}},se.memo=function(h,N){return{$$typeof:v,type:h,compare:N===void 0?null:N}},se.startTransition=function(h){var N=X.T,A={};X.T=A;try{var B=h(),J=X.S;J!==null&&J(A,B),typeof B=="object"&&B!==null&&typeof B.then=="function"&&B.then(ce,ue)}catch(te){ue(te)}finally{N!==null&&A.types!==null&&(N.types=A.types),X.T=N}},se.unstable_useCacheRefresh=function(){return X.H.useCacheRefresh()},se.use=function(h){return X.H.use(h)},se.useActionState=function(h,N,A){return X.H.useActionState(h,N,A)},se.useCallback=function(h,N){return X.H.useCallback(h,N)},se.useContext=function(h){return X.H.useContext(h)},se.useDebugValue=function(){},se.useDeferredValue=function(h,N){return X.H.useDeferredValue(h,N)},se.useEffect=function(h,N){return X.H.useEffect(h,N)},se.useEffectEvent=function(h){return X.H.useEffectEvent(h)},se.useId=function(){return X.H.useId()},se.useImperativeHandle=function(h,N,A){return X.H.useImperativeHandle(h,N,A)},se.useInsertionEffect=function(h,N){return X.H.useInsertionEffect(h,N)},se.useLayoutEffect=function(h,N){return X.H.useLayoutEffect(h,N)},se.useMemo=function(h,N){return X.H.useMemo(h,N)},se.useOptimistic=function(h,N){return X.H.useOptimistic(h,N)},se.useReducer=function(h,N,A){return X.H.useReducer(h,N,A)},se.useRef=function(h){return X.H.useRef(h)},se.useState=function(h){return X.H.useState(h)},se.useSyncExternalStore=function(h,N,A){return X.H.useSyncExternalStore(h,N,A)},se.useTransition=function(){return X.H.useTransition()},se.version="19.2.8",se}var Km;function wc(){return Km||(Km=1,Tc.exports=ry()),Tc.exports}var T=wc(),Ec={exports:{}},Ni={},Mc={exports:{}},Rc={};/**
|
|
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 Zm;function sy(){return Zm||(Zm=1,(function(s){function d(E,H){var K=E.length;E.push(H);e:for(;0<K;){var ue=K-1>>>1,Te=E[ue];if(0<p(Te,H))E[ue]=H,E[K]=Te,K=ue;else break e}}function f(E){return E.length===0?null:E[0]}function u(E){if(E.length===0)return null;var H=E[0],K=E.pop();if(K!==H){E[0]=K;e:for(var ue=0,Te=E.length,h=Te>>>1;ue<h;){var N=2*(ue+1)-1,A=E[N],B=N+1,J=E[B];if(0>p(A,K))B<Te&&0>p(J,A)?(E[ue]=J,E[B]=K,ue=B):(E[ue]=A,E[N]=K,ue=N);else if(B<Te&&0>p(J,K))E[ue]=J,E[B]=K,ue=B;else break e}}return H}function p(E,H){var K=E.sortIndex-H.sortIndex;return K!==0?K:E.id-H.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var y=performance;s.unstable_now=function(){return y.now()}}else{var R=Date,q=R.now();s.unstable_now=function(){return R.now()-q}}var x=[],v=[],U=1,k=null,V=3,L=!1,Q=!1,I=!1,oe=!1,ae=typeof setTimeout=="function"?setTimeout:null,be=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;function ee(E){for(var H=f(v);H!==null;){if(H.callback===null)u(v);else if(H.startTime<=E)u(v),H.sortIndex=H.expirationTime,d(x,H);else break;H=f(v)}}function Y(E){if(I=!1,ee(E),!Q)if(f(x)!==null)Q=!0,ce||(ce=!0,qe());else{var H=f(v);H!==null&&re(Y,H.startTime-E)}}var ce=!1,X=-1,xe=5,he=-1;function De(){return oe?!0:!(s.unstable_now()-he<xe)}function ke(){if(oe=!1,ce){var E=s.unstable_now();he=E;var H=!0;try{e:{Q=!1,I&&(I=!1,be(X),X=-1),L=!0;var K=V;try{t:{for(ee(E),k=f(x);k!==null&&!(k.expirationTime>E&&De());){var ue=k.callback;if(typeof ue=="function"){k.callback=null,V=k.priorityLevel;var Te=ue(k.expirationTime<=E);if(E=s.unstable_now(),typeof Te=="function"){k.callback=Te,ee(E),H=!0;break t}k===f(x)&&u(x),ee(E)}else u(x);k=f(x)}if(k!==null)H=!0;else{var h=f(v);h!==null&&re(Y,h.startTime-E),H=!1}}break e}finally{k=null,V=K,L=!1}H=void 0}}finally{H?qe():ce=!1}}}var qe;if(typeof $=="function")qe=function(){$(ke)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,ye=ie.port2;ie.port1.onmessage=ke,qe=function(){ye.postMessage(null)}}else qe=function(){ae(ke,0)};function re(E,H){X=ae(function(){E(s.unstable_now())},H)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(E){E.callback=null},s.unstable_forceFrameRate=function(E){0>E||125<E?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):xe=0<E?Math.floor(1e3/E):5},s.unstable_getCurrentPriorityLevel=function(){return V},s.unstable_next=function(E){switch(V){case 1:case 2:case 3:var H=3;break;default:H=V}var K=V;V=H;try{return E()}finally{V=K}},s.unstable_requestPaint=function(){oe=!0},s.unstable_runWithPriority=function(E,H){switch(E){case 1:case 2:case 3:case 4:case 5:break;default:E=3}var K=V;V=E;try{return H()}finally{V=K}},s.unstable_scheduleCallback=function(E,H,K){var ue=s.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?ue+K:ue):K=ue,E){case 1:var Te=-1;break;case 2:Te=250;break;case 5:Te=1073741823;break;case 4:Te=1e4;break;default:Te=5e3}return Te=K+Te,E={id:U++,callback:H,priorityLevel:E,startTime:K,expirationTime:Te,sortIndex:-1},K>ue?(E.sortIndex=K,d(v,E),f(x)===null&&E===f(v)&&(I?(be(X),X=-1):I=!0,re(Y,K-ue))):(E.sortIndex=Te,d(x,E),Q||L||(Q=!0,ce||(ce=!0,qe()))),E},s.unstable_shouldYield=De,s.unstable_wrapCallback=function(E){var H=V;return function(){var K=V;V=H;try{return E.apply(this,arguments)}finally{V=K}}}})(Rc)),Rc}var Jm;function oy(){return Jm||(Jm=1,Mc.exports=sy()),Mc.exports}var Oc={exports:{}},yt={};/**
|
|
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 Wm;function cy(){if(Wm)return yt;Wm=1;var s=wc();function d(x){var v="https://react.dev/errors/"+x;if(1<arguments.length){v+="?args[]="+encodeURIComponent(arguments[1]);for(var U=2;U<arguments.length;U++)v+="&args[]="+encodeURIComponent(arguments[U])}return"Minified React error #"+x+"; visit "+v+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(){}var u={d:{f,r:function(){throw Error(d(522))},D:f,C:f,L:f,m:f,X:f,S:f,M:f},p:0,findDOMNode:null},p=Symbol.for("react.portal");function y(x,v,U){var k=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:p,key:k==null?null:""+k,children:x,containerInfo:v,implementation:U}}var R=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function q(x,v){if(x==="font")return"";if(typeof v=="string")return v==="use-credentials"?v:""}return yt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,yt.createPortal=function(x,v){var U=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!v||v.nodeType!==1&&v.nodeType!==9&&v.nodeType!==11)throw Error(d(299));return y(x,v,null,U)},yt.flushSync=function(x){var v=R.T,U=u.p;try{if(R.T=null,u.p=2,x)return x()}finally{R.T=v,u.p=U,u.d.f()}},yt.preconnect=function(x,v){typeof x=="string"&&(v?(v=v.crossOrigin,v=typeof v=="string"?v==="use-credentials"?v:"":void 0):v=null,u.d.C(x,v))},yt.prefetchDNS=function(x){typeof x=="string"&&u.d.D(x)},yt.preinit=function(x,v){if(typeof x=="string"&&v&&typeof v.as=="string"){var U=v.as,k=q(U,v.crossOrigin),V=typeof v.integrity=="string"?v.integrity:void 0,L=typeof v.fetchPriority=="string"?v.fetchPriority:void 0;U==="style"?u.d.S(x,typeof v.precedence=="string"?v.precedence:void 0,{crossOrigin:k,integrity:V,fetchPriority:L}):U==="script"&&u.d.X(x,{crossOrigin:k,integrity:V,fetchPriority:L,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},yt.preinitModule=function(x,v){if(typeof x=="string")if(typeof v=="object"&&v!==null){if(v.as==null||v.as==="script"){var U=q(v.as,v.crossOrigin);u.d.M(x,{crossOrigin:U,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0})}}else v==null&&u.d.M(x)},yt.preload=function(x,v){if(typeof x=="string"&&typeof v=="object"&&v!==null&&typeof v.as=="string"){var U=v.as,k=q(U,v.crossOrigin);u.d.L(x,U,{crossOrigin:k,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})}},yt.preloadModule=function(x,v){if(typeof x=="string")if(v){var U=q(v.as,v.crossOrigin);u.d.m(x,{as:typeof v.as=="string"&&v.as!=="script"?v.as:void 0,crossOrigin:U,integrity:typeof v.integrity=="string"?v.integrity:void 0})}else u.d.m(x)},yt.requestFormReset=function(x){u.d.r(x)},yt.unstable_batchedUpdates=function(x,v){return x(v)},yt.useFormState=function(x,v,U){return R.H.useFormState(x,v,U)},yt.useFormStatus=function(){return R.H.useHostTransitionStatus()},yt.version="19.2.8",yt}var $m;function uy(){if($m)return Oc.exports;$m=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(d){console.error(d)}}return s(),Oc.exports=cy(),Oc.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 Im;function dy(){if(Im)return Ni;Im=1;var s=oy(),d=wc(),f=uy();function u(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}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 p(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function y(e){var t=e,l=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(l=t.return),e=t.return;while(e)}return t.tag===3?l:null}function R(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 q(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 x(e){if(y(e)!==e)throw Error(u(188))}function v(e){var t=e.alternate;if(!t){if(t=y(e),t===null)throw Error(u(188));return t!==e?null:e}for(var l=e,a=t;;){var i=l.return;if(i===null)break;var r=i.alternate;if(r===null){if(a=i.return,a!==null){l=a;continue}break}if(i.child===r.child){for(r=i.child;r;){if(r===l)return x(i),e;if(r===a)return x(i),t;r=r.sibling}throw Error(u(188))}if(l.return!==a.return)l=i,a=r;else{for(var o=!1,c=i.child;c;){if(c===l){o=!0,l=i,a=r;break}if(c===a){o=!0,a=i,l=r;break}c=c.sibling}if(!o){for(c=r.child;c;){if(c===l){o=!0,l=r,a=i;break}if(c===a){o=!0,a=r,l=i;break}c=c.sibling}if(!o)throw Error(u(189))}}if(l.alternate!==a)throw Error(u(190))}if(l.tag!==3)throw Error(u(188));return l.stateNode.current===l?e:t}function U(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=U(e),t!==null)return t;e=e.sibling}return null}var k=Object.assign,V=Symbol.for("react.element"),L=Symbol.for("react.transitional.element"),Q=Symbol.for("react.portal"),I=Symbol.for("react.fragment"),oe=Symbol.for("react.strict_mode"),ae=Symbol.for("react.profiler"),be=Symbol.for("react.consumer"),$=Symbol.for("react.context"),ee=Symbol.for("react.forward_ref"),Y=Symbol.for("react.suspense"),ce=Symbol.for("react.suspense_list"),X=Symbol.for("react.memo"),xe=Symbol.for("react.lazy"),he=Symbol.for("react.activity"),De=Symbol.for("react.memo_cache_sentinel"),ke=Symbol.iterator;function qe(e){return e===null||typeof e!="object"?null:(e=ke&&e[ke]||e["@@iterator"],typeof e=="function"?e:null)}var ie=Symbol.for("react.client.reference");function ye(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 I:return"Fragment";case ae:return"Profiler";case oe:return"StrictMode";case Y:return"Suspense";case ce:return"SuspenseList";case he:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case Q:return"Portal";case $:return e.displayName||"Context";case be:return(e._context.displayName||"Context")+".Consumer";case ee:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case X:return t=e.displayName||null,t!==null?t:ye(e.type)||"Memo";case xe:t=e._payload,e=e._init;try{return ye(e(t))}catch{}}return null}var re=Array.isArray,E=d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=f.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K={pending:!1,data:null,method:null,action:null},ue=[],Te=-1;function h(e){return{current:e}}function N(e){0>Te||(e.current=ue[Te],ue[Te]=null,Te--)}function A(e,t){Te++,ue[Te]=e.current,e.current=t}var B=h(null),J=h(null),te=h(null),ve=h(null);function et(e,t){switch(A(te,t),A(J,e),A(B,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?fm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=fm(t),e=mm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}N(B),A(B,e)}function Ye(){N(B),N(J),N(te)}function Qt(e){e.memoizedState!==null&&A(ve,e);var t=B.current,l=mm(t,e.type);t!==l&&(A(J,e),A(B,l))}function nl(e){J.current===e&&(N(B),N(J)),ve.current===e&&(N(ve),Ei._currentValue=K)}var il,ba;function St(e){if(il===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);il=t&&t[1]||"",ba=-1<l.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+il+e+ba}var _t=!1;function xa(e,t){if(!e||_t)return"";_t=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var w=function(){throw Error()};if(Object.defineProperty(w.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(w,[])}catch(z){var C=z}Reflect.construct(e,[],w)}else{try{w.call()}catch(z){C=z}e.call(w.prototype)}}else{try{throw Error()}catch(z){C=z}(w=e())&&typeof w.catch=="function"&&w.catch(function(){})}}catch(z){if(z&&C&&typeof z.stack=="string")return[z.stack,C.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var r=a.DetermineComponentFrameRoot(),o=r[0],c=r[1];if(o&&c){var m=o.split(`
|
|
44
|
+
`),j=c.split(`
|
|
45
|
+
`);for(i=a=0;a<m.length&&!m[a].includes("DetermineComponentFrameRoot");)a++;for(;i<j.length&&!j[i].includes("DetermineComponentFrameRoot");)i++;if(a===m.length||i===j.length)for(a=m.length-1,i=j.length-1;1<=a&&0<=i&&m[a]!==j[i];)i--;for(;1<=a&&0<=i;a--,i--)if(m[a]!==j[i]){if(a!==1||i!==1)do if(a--,i--,0>i||m[a]!==j[i]){var O=`
|
|
46
|
+
`+m[a].replace(" at new "," at ");return e.displayName&&O.includes("<anonymous>")&&(O=O.replace("<anonymous>",e.displayName)),O}while(1<=a&&0<=i);break}}}finally{_t=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?St(l):""}function Sa(e,t){switch(e.tag){case 26:case 27:case 5:return St(e.type);case 16:return St("Lazy");case 13:return e.child!==t&&t!==null?St("Suspense Fallback"):St("Suspense");case 19:return St("SuspenseList");case 0:case 15:return xa(e.type,!1);case 11:return xa(e.type.render,!1);case 1:return xa(e.type,!0);case 31:return St("Activity");default:return""}}function Qa(e){try{var t="",l=null;do t+=Sa(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
|
|
47
|
+
Error generating stack: `+a.message+`
|
|
48
|
+
`+a.stack}}var rl=Object.prototype.hasOwnProperty,Xl=s.unstable_scheduleCallback,jl=s.unstable_cancelCallback,Ka=s.unstable_shouldYield,_=s.unstable_requestPaint,ne=s.unstable_now,ge=s.unstable_getCurrentPriorityLevel,Ge=s.unstable_ImmediatePriority,Me=s.unstable_UserBlockingPriority,tt=s.unstable_NormalPriority,sl=s.unstable_LowPriority,ja=s.unstable_IdlePriority,Kt=s.log,Nt=s.unstable_setDisableYieldValue,M=null,G=null;function F(e){if(typeof Kt=="function"&&Nt(e),G&&typeof G.setStrictMode=="function")try{G.setStrictMode(M,e)}catch{}}var de=Math.clz32?Math.clz32:Bi,Xe=Math.log,jt=Math.LN2;function Bi(e){return e>>>=0,e===0?32:31-(Xe(e)/jt|0)|0}var Aa=256,gt=262144,ht=4194304;function Ne(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 ol(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var i=0,r=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var c=a&134217727;return c!==0?(a=c&~r,a!==0?i=Ne(a):(o&=c,o!==0?i=Ne(o):l||(l=c&~e,l!==0&&(i=Ne(l))))):(c=a&~r,c!==0?i=Ne(c):o!==0?i=Ne(o):l||(l=a&~e,l!==0&&(i=Ne(l)))),i===0?0:t!==0&&t!==i&&(t&r)===0&&(r=i&-i,l=t&-t,r>=l||r===32&&(l&4194048)!==0)?t:i}function vt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ms(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 Li(){var e=ht;return ht<<=1,(ht&62914560)===0&&(ht=4194304),e}function Za(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Ca(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Hn(e,t,l,a,i,r){var o=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var c=e.entanglements,m=e.expirationTimes,j=e.hiddenUpdates;for(l=o&~l;0<l;){var O=31-de(l),w=1<<O;c[O]=0,m[O]=-1;var C=j[O];if(C!==null)for(j[O]=null,O=0;O<C.length;O++){var z=C[O];z!==null&&(z.lane&=-536870913)}l&=~w}a!==0&&Bn(e,a,0),r!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=r&~(o&~t))}function Bn(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-de(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function ps(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-de(l),i=1<<a;i&t|e[a]&t&&(e[a]|=t),l&=~i}}function Ln(e,t){var l=t&-t;return l=(l&42)!==0?1:Yn(l),(l&(e.suspendedLanes|t))!==0?0:l}function Yn(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 za(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function $c(){var e=H.p;return e!==0?e:(e=window.event,e===void 0?32:Um(e.type))}function Ic(e,t){var l=H.p;try{return H.p=e,t()}finally{H.p=l}}var Vl=Math.random().toString(36).slice(2),ut="__reactFiber$"+Vl,At="__reactProps$"+Vl,Ja="__reactContainer$"+Vl,hs="__reactEvents$"+Vl,Zp="__reactListeners$"+Vl,Jp="__reactHandles$"+Vl,Fc="__reactResources$"+Vl,Gn="__reactMarker$"+Vl;function ys(e){delete e[ut],delete e[At],delete e[hs],delete e[Zp],delete e[Jp]}function Wa(e){var t=e[ut];if(t)return t;for(var l=e.parentNode;l;){if(t=l[Ja]||l[ut]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=xm(e);e!==null;){if(l=e[ut])return l;e=xm(e)}return t}e=l,l=e.parentNode}return null}function $a(e){if(e=e[ut]||e[Ja]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Xn(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function Ia(e){var t=e[Fc];return t||(t=e[Fc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ot(e){e[Gn]=!0}var Pc=new Set,eu={};function Ta(e,t){Fa(e,t),Fa(e+"Capture",t)}function Fa(e,t){for(eu[e]=t,e=0;e<t.length;e++)Pc.add(t[e])}var Wp=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]*$"),tu={},lu={};function $p(e){return rl.call(lu,e)?!0:rl.call(tu,e)?!1:Wp.test(e)?lu[e]=!0:(tu[e]=!0,!1)}function Yi(e,t,l){if($p(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function Gi(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+l)}}function Al(e,t,l,a){if(a===null)e.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+a)}}function Zt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function au(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ip(e,t,l){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var i=a.get,r=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){l=""+o,r.call(this,o)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(o){l=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function gs(e){if(!e._valueTracker){var t=au(e)?"checked":"value";e._valueTracker=Ip(e,t,""+e[t])}}function nu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=au(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}function Xi(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 Fp=/[\n"\\]/g;function Jt(e){return e.replace(Fp,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function vs(e,t,l,a,i,r,o,c){e.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.type=o:e.removeAttribute("type"),t!=null?o==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Zt(t)):e.value!==""+Zt(t)&&(e.value=""+Zt(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?bs(e,o,Zt(t)):l!=null?bs(e,o,Zt(l)):a!=null&&e.removeAttribute("value"),i==null&&r!=null&&(e.defaultChecked=!!r),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"?e.name=""+Zt(c):e.removeAttribute("name")}function iu(e,t,l,a,i,r,o,c){if(r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(e.type=r),t!=null||l!=null){if(!(r!=="submit"&&r!=="reset"||t!=null)){gs(e);return}l=l!=null?""+Zt(l):"",t=t!=null?""+Zt(t):l,c||t===e.value||(e.value=t),e.defaultValue=t}a=a??i,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=c?e.checked:!!a,e.defaultChecked=!!a,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.name=o),gs(e)}function bs(e,t,l){t==="number"&&Xi(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function Pa(e,t,l,a){if(e=e.options,t){t={};for(var i=0;i<l.length;i++)t["$"+l[i]]=!0;for(l=0;l<e.length;l++)i=t.hasOwnProperty("$"+e[l].value),e[l].selected!==i&&(e[l].selected=i),i&&a&&(e[l].defaultSelected=!0)}else{for(l=""+Zt(l),t=null,i=0;i<e.length;i++){if(e[i].value===l){e[i].selected=!0,a&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function ru(e,t,l){if(t!=null&&(t=""+Zt(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+Zt(l):""}function su(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(u(92));if(re(a)){if(1<a.length)throw Error(u(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=Zt(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),gs(e)}function en(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var Pp=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 ou(e,t,l){var a=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,l):typeof l!="number"||l===0||Pp.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function cu(e,t,l){if(t!=null&&typeof t!="object")throw Error(u(62));if(e=e.style,l!=null){for(var a in l)!l.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var i in t)a=t[i],t.hasOwnProperty(i)&&l[i]!==a&&ou(e,i,a)}else for(var r in t)t.hasOwnProperty(r)&&ou(e,r,t[r])}function xs(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 eh=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"]]),th=/^[\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 Vi(e){return th.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Cl(){}var Ss=null;function js(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var tn=null,ln=null;function uu(e){var t=$a(e);if(t&&(e=t.stateNode)){var l=e[At]||null;e:switch(e=t.stateNode,t.type){case"input":if(vs(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Jt(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var i=a[At]||null;if(!i)throw Error(u(90));vs(a,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<l.length;t++)a=l[t],a.form===e.form&&nu(a)}break e;case"textarea":ru(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&Pa(e,!!l.multiple,t,!1)}}}var As=!1;function du(e,t,l){if(As)return e(t,l);As=!0;try{var a=e(t);return a}finally{if(As=!1,(tn!==null||ln!==null)&&(_r(),tn&&(t=tn,e=ln,ln=tn=null,uu(t),e)))for(t=0;t<e.length;t++)uu(e[t])}}function Vn(e,t){var l=e.stateNode;if(l===null)return null;var a=l[At]||null;if(a===null)return null;l=a[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":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(u(231,t,typeof l));return l}var zl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Cs=!1;if(zl)try{var Qn={};Object.defineProperty(Qn,"passive",{get:function(){Cs=!0}}),window.addEventListener("test",Qn,Qn),window.removeEventListener("test",Qn,Qn)}catch{Cs=!1}var Ql=null,zs=null,Qi=null;function fu(){if(Qi)return Qi;var e,t=zs,l=t.length,a,i="value"in Ql?Ql.value:Ql.textContent,r=i.length;for(e=0;e<l&&t[e]===i[e];e++);var o=l-e;for(a=1;a<=o&&t[l-a]===i[r-a];a++);return Qi=i.slice(e,1<a?1-a:void 0)}function Ki(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 Zi(){return!0}function mu(){return!1}function Ct(e){function t(l,a,i,r,o){this._reactName=l,this._targetInst=i,this.type=a,this.nativeEvent=r,this.target=o,this.currentTarget=null;for(var c in e)e.hasOwnProperty(c)&&(l=e[c],this[c]=l?l(r):r[c]);return this.isDefaultPrevented=(r.defaultPrevented!=null?r.defaultPrevented:r.returnValue===!1)?Zi:mu,this.isPropagationStopped=mu,this}return k(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Zi)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Zi)},persist:function(){},isPersistent:Zi}),t}var Ea={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ji=Ct(Ea),Kn=k({},Ea,{view:0,detail:0}),lh=Ct(Kn),Ts,Es,Zn,Wi=k({},Kn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Rs,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!==Zn&&(Zn&&e.type==="mousemove"?(Ts=e.screenX-Zn.screenX,Es=e.screenY-Zn.screenY):Es=Ts=0,Zn=e),Ts)},movementY:function(e){return"movementY"in e?e.movementY:Es}}),pu=Ct(Wi),ah=k({},Wi,{dataTransfer:0}),nh=Ct(ah),ih=k({},Kn,{relatedTarget:0}),Ms=Ct(ih),rh=k({},Ea,{animationName:0,elapsedTime:0,pseudoElement:0}),sh=Ct(rh),oh=k({},Ea,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ch=Ct(oh),uh=k({},Ea,{data:0}),hu=Ct(uh),dh={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},fh={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"},mh={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ph(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=mh[e])?!!t[e]:!1}function Rs(){return ph}var hh=k({},Kn,{key:function(e){if(e.key){var t=dh[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ki(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?fh[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Rs,charCode:function(e){return e.type==="keypress"?Ki(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ki(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),yh=Ct(hh),gh=k({},Wi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),yu=Ct(gh),vh=k({},Kn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Rs}),bh=Ct(vh),xh=k({},Ea,{propertyName:0,elapsedTime:0,pseudoElement:0}),Sh=Ct(xh),jh=k({},Wi,{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}),Ah=Ct(jh),Ch=k({},Ea,{newState:0,oldState:0}),zh=Ct(Ch),Th=[9,13,27,32],Os=zl&&"CompositionEvent"in window,Jn=null;zl&&"documentMode"in document&&(Jn=document.documentMode);var Eh=zl&&"TextEvent"in window&&!Jn,gu=zl&&(!Os||Jn&&8<Jn&&11>=Jn),vu=" ",bu=!1;function xu(e,t){switch(e){case"keyup":return Th.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Su(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var an=!1;function Mh(e,t){switch(e){case"compositionend":return Su(t);case"keypress":return t.which!==32?null:(bu=!0,vu);case"textInput":return e=t.data,e===vu&&bu?null:e;default:return null}}function Rh(e,t){if(an)return e==="compositionend"||!Os&&xu(e,t)?(e=fu(),Qi=zs=Ql=null,an=!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 gu&&t.locale!=="ko"?null:t.data;default:return null}}var Oh={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 ju(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Oh[e.type]:t==="textarea"}function Au(e,t,l,a){tn?ln?ln.push(a):ln=[a]:tn=a,t=Hr(t,"onChange"),0<t.length&&(l=new Ji("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var Wn=null,$n=null;function _h(e){rm(e,0)}function $i(e){var t=Xn(e);if(nu(t))return e}function Cu(e,t){if(e==="change")return t}var zu=!1;if(zl){var _s;if(zl){var Ns="oninput"in document;if(!Ns){var Tu=document.createElement("div");Tu.setAttribute("oninput","return;"),Ns=typeof Tu.oninput=="function"}_s=Ns}else _s=!1;zu=_s&&(!document.documentMode||9<document.documentMode)}function Eu(){Wn&&(Wn.detachEvent("onpropertychange",Mu),$n=Wn=null)}function Mu(e){if(e.propertyName==="value"&&$i($n)){var t=[];Au(t,$n,e,js(e)),du(_h,t)}}function Nh(e,t,l){e==="focusin"?(Eu(),Wn=t,$n=l,Wn.attachEvent("onpropertychange",Mu)):e==="focusout"&&Eu()}function Dh(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return $i($n)}function kh(e,t){if(e==="click")return $i(t)}function wh(e,t){if(e==="input"||e==="change")return $i(t)}function Uh(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Dt=typeof Object.is=="function"?Object.is:Uh;function In(e,t){if(Dt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),a=Object.keys(t);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var i=l[a];if(!rl.call(t,i)||!Dt(e[i],t[i]))return!1}return!0}function Ru(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ou(e,t){var l=Ru(e);e=0;for(var a;l;){if(l.nodeType===3){if(a=e+l.textContent.length,e<=t&&a>=t)return{node:l,offset:t-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Ru(l)}}function _u(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_u(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Nu(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Xi(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=Xi(e.document)}return t}function Ds(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 qh=zl&&"documentMode"in document&&11>=document.documentMode,nn=null,ks=null,Fn=null,ws=!1;function Du(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;ws||nn==null||nn!==Xi(a)||(a=nn,"selectionStart"in a&&Ds(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Fn&&In(Fn,a)||(Fn=a,a=Hr(ks,"onSelect"),0<a.length&&(t=new Ji("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=nn)))}function Ma(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var rn={animationend:Ma("Animation","AnimationEnd"),animationiteration:Ma("Animation","AnimationIteration"),animationstart:Ma("Animation","AnimationStart"),transitionrun:Ma("Transition","TransitionRun"),transitionstart:Ma("Transition","TransitionStart"),transitioncancel:Ma("Transition","TransitionCancel"),transitionend:Ma("Transition","TransitionEnd")},Us={},ku={};zl&&(ku=document.createElement("div").style,"AnimationEvent"in window||(delete rn.animationend.animation,delete rn.animationiteration.animation,delete rn.animationstart.animation),"TransitionEvent"in window||delete rn.transitionend.transition);function Ra(e){if(Us[e])return Us[e];if(!rn[e])return e;var t=rn[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in ku)return Us[e]=t[l];return e}var wu=Ra("animationend"),Uu=Ra("animationiteration"),qu=Ra("animationstart"),Hh=Ra("transitionrun"),Bh=Ra("transitionstart"),Lh=Ra("transitioncancel"),Hu=Ra("transitionend"),Bu=new Map,qs="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(" ");qs.push("scrollEnd");function cl(e,t){Bu.set(e,t),Ta(t,[e])}var Ii=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)},Wt=[],sn=0,Hs=0;function Fi(){for(var e=sn,t=Hs=sn=0;t<e;){var l=Wt[t];Wt[t++]=null;var a=Wt[t];Wt[t++]=null;var i=Wt[t];Wt[t++]=null;var r=Wt[t];if(Wt[t++]=null,a!==null&&i!==null){var o=a.pending;o===null?i.next=i:(i.next=o.next,o.next=i),a.pending=i}r!==0&&Lu(l,i,r)}}function Pi(e,t,l,a){Wt[sn++]=e,Wt[sn++]=t,Wt[sn++]=l,Wt[sn++]=a,Hs|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Bs(e,t,l,a){return Pi(e,t,l,a),er(e)}function Oa(e,t){return Pi(e,null,null,t),er(e)}function Lu(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var i=!1,r=e.return;r!==null;)r.childLanes|=l,a=r.alternate,a!==null&&(a.childLanes|=l),r.tag===22&&(e=r.stateNode,e===null||e._visibility&1||(i=!0)),e=r,r=r.return;return e.tag===3?(r=e.stateNode,i&&t!==null&&(i=31-de(l),e=r.hiddenUpdates,a=e[i],a===null?e[i]=[t]:a.push(t),t.lane=l|536870912),r):null}function er(e){if(50<xi)throw xi=0,Wo=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var on={};function Yh(e,t,l,a){this.tag=e,this.key=l,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=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function kt(e,t,l,a){return new Yh(e,t,l,a)}function Ls(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Tl(e,t){var l=e.alternate;return l===null?(l=kt(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function Yu(e,t){e.flags&=65011714;var l=e.alternate;return l===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=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function tr(e,t,l,a,i,r){var o=0;if(a=e,typeof e=="function")Ls(e)&&(o=1);else if(typeof e=="string")o=K0(e,l,B.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case he:return e=kt(31,l,t,i),e.elementType=he,e.lanes=r,e;case I:return _a(l.children,i,r,t);case oe:o=8,i|=24;break;case ae:return e=kt(12,l,t,i|2),e.elementType=ae,e.lanes=r,e;case Y:return e=kt(13,l,t,i),e.elementType=Y,e.lanes=r,e;case ce:return e=kt(19,l,t,i),e.elementType=ce,e.lanes=r,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case $:o=10;break e;case be:o=9;break e;case ee:o=11;break e;case X:o=14;break e;case xe:o=16,a=null;break e}o=29,l=Error(u(130,e===null?"null":typeof e,"")),a=null}return t=kt(o,l,t,i),t.elementType=e,t.type=a,t.lanes=r,t}function _a(e,t,l,a){return e=kt(7,e,a,t),e.lanes=l,e}function Ys(e,t,l){return e=kt(6,e,null,t),e.lanes=l,e}function Gu(e){var t=kt(18,null,null,0);return t.stateNode=e,t}function Gs(e,t,l){return t=kt(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Xu=new WeakMap;function $t(e,t){if(typeof e=="object"&&e!==null){var l=Xu.get(e);return l!==void 0?l:(t={value:e,source:t,stack:Qa(t)},Xu.set(e,t),t)}return{value:e,source:t,stack:Qa(t)}}var cn=[],un=0,lr=null,Pn=0,It=[],Ft=0,Kl=null,hl=1,yl="";function El(e,t){cn[un++]=Pn,cn[un++]=lr,lr=e,Pn=t}function Vu(e,t,l){It[Ft++]=hl,It[Ft++]=yl,It[Ft++]=Kl,Kl=e;var a=hl;e=yl;var i=32-de(a)-1;a&=~(1<<i),l+=1;var r=32-de(t)+i;if(30<r){var o=i-i%5;r=(a&(1<<o)-1).toString(32),a>>=o,i-=o,hl=1<<32-de(t)+i|l<<i|a,yl=r+e}else hl=1<<r|l<<i|a,yl=e}function Xs(e){e.return!==null&&(El(e,1),Vu(e,1,0))}function Vs(e){for(;e===lr;)lr=cn[--un],cn[un]=null,Pn=cn[--un],cn[un]=null;for(;e===Kl;)Kl=It[--Ft],It[Ft]=null,yl=It[--Ft],It[Ft]=null,hl=It[--Ft],It[Ft]=null}function Qu(e,t){It[Ft++]=hl,It[Ft++]=yl,It[Ft++]=Kl,hl=t.id,yl=t.overflow,Kl=e}var dt=null,Qe=null,Ee=!1,Zl=null,Pt=!1,Qs=Error(u(519));function Jl(e){var t=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ei($t(t,e)),Qs}function Ku(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[ut]=e,t[At]=a,l){case"dialog":je("cancel",t),je("close",t);break;case"iframe":case"object":case"embed":je("load",t);break;case"video":case"audio":for(l=0;l<ji.length;l++)je(ji[l],t);break;case"source":je("error",t);break;case"img":case"image":case"link":je("error",t),je("load",t);break;case"details":je("toggle",t);break;case"input":je("invalid",t),iu(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":je("invalid",t);break;case"textarea":je("invalid",t),su(t,a.value,a.defaultValue,a.children)}l=a.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||a.suppressHydrationWarning===!0||um(t.textContent,l)?(a.popover!=null&&(je("beforetoggle",t),je("toggle",t)),a.onScroll!=null&&je("scroll",t),a.onScrollEnd!=null&&je("scrollend",t),a.onClick!=null&&(t.onclick=Cl),t=!0):t=!1,t||Jl(e,!0)}function Zu(e){for(dt=e.return;dt;)switch(dt.tag){case 5:case 31:case 13:Pt=!1;return;case 27:case 3:Pt=!0;return;default:dt=dt.return}}function dn(e){if(e!==dt)return!1;if(!Ee)return Zu(e),Ee=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||uc(e.type,e.memoizedProps)),l=!l),l&&Qe&&Jl(e),Zu(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));Qe=bm(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));Qe=bm(e)}else t===27?(t=Qe,oa(e.type)?(e=hc,hc=null,Qe=e):Qe=t):Qe=dt?tl(e.stateNode.nextSibling):null;return!0}function Na(){Qe=dt=null,Ee=!1}function Ks(){var e=Zl;return e!==null&&(Mt===null?Mt=e:Mt.push.apply(Mt,e),Zl=null),e}function ei(e){Zl===null?Zl=[e]:Zl.push(e)}var Zs=h(null),Da=null,Ml=null;function Wl(e,t,l){A(Zs,t._currentValue),t._currentValue=l}function Rl(e){e._currentValue=Zs.current,N(Zs)}function Js(e,t,l){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===l)break;e=e.return}}function Ws(e,t,l,a){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var r=i.dependencies;if(r!==null){var o=i.child;r=r.firstContext;e:for(;r!==null;){var c=r;r=i;for(var m=0;m<t.length;m++)if(c.context===t[m]){r.lanes|=l,c=r.alternate,c!==null&&(c.lanes|=l),Js(r.return,l,e),a||(o=null);break e}r=c.next}}else if(i.tag===18){if(o=i.return,o===null)throw Error(u(341));o.lanes|=l,r=o.alternate,r!==null&&(r.lanes|=l),Js(o,l,e),o=null}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===e){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}}function fn(e,t,l,a){e=null;for(var i=t,r=!1;i!==null;){if(!r){if((i.flags&524288)!==0)r=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var o=i.alternate;if(o===null)throw Error(u(387));if(o=o.memoizedProps,o!==null){var c=i.type;Dt(i.pendingProps.value,o.value)||(e!==null?e.push(c):e=[c])}}else if(i===ve.current){if(o=i.alternate,o===null)throw Error(u(387));o.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(Ei):e=[Ei])}i=i.return}e!==null&&Ws(t,e,l,a),t.flags|=262144}function ar(e){for(e=e.firstContext;e!==null;){if(!Dt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ka(e){Da=e,Ml=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ft(e){return Ju(Da,e)}function nr(e,t){return Da===null&&ka(e),Ju(e,t)}function Ju(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},Ml===null){if(e===null)throw Error(u(308));Ml=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ml=Ml.next=t;return l}var Gh=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},Xh=s.unstable_scheduleCallback,Vh=s.unstable_NormalPriority,lt={$$typeof:$,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function $s(){return{controller:new Gh,data:new Map,refCount:0}}function ti(e){e.refCount--,e.refCount===0&&Xh(Vh,function(){e.controller.abort()})}var li=null,Is=0,mn=0,pn=null;function Qh(e,t){if(li===null){var l=li=[];Is=0,mn=tc(),pn={status:"pending",value:void 0,then:function(a){l.push(a)}}}return Is++,t.then(Wu,Wu),t}function Wu(){if(--Is===0&&li!==null){pn!==null&&(pn.status="fulfilled");var e=li;li=null,mn=0,pn=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Kh(e,t){var l=[],a={status:"pending",value:null,reason:null,then:function(i){l.push(i)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var i=0;i<l.length;i++)(0,l[i])(t)},function(i){for(a.status="rejected",a.reason=i,i=0;i<l.length;i++)(0,l[i])(void 0)}),a}var $u=E.S;E.S=function(e,t){kf=ne(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Qh(e,t),$u!==null&&$u(e,t)};var wa=h(null);function Fs(){var e=wa.current;return e!==null?e:Ve.pooledCache}function ir(e,t){t===null?A(wa,wa.current):A(wa,t.pool)}function Iu(){var e=Fs();return e===null?null:{parent:lt._currentValue,pool:e}}var hn=Error(u(460)),Ps=Error(u(474)),rr=Error(u(542)),sr={then:function(){}};function Fu(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Pu(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(Cl,Cl),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,td(e),e;default:if(typeof t.status=="string")t.then(Cl,Cl);else{if(e=Ve,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=a}},function(a){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,td(e),e}throw qa=t,hn}}function Ua(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(qa=l,hn):l}}var qa=null;function ed(){if(qa===null)throw Error(u(459));var e=qa;return qa=null,e}function td(e){if(e===hn||e===rr)throw Error(u(483))}var yn=null,ai=0;function or(e){var t=ai;return ai+=1,yn===null&&(yn=[]),Pu(yn,e,t)}function ni(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function cr(e,t){throw t.$$typeof===V?Error(u(525)):(e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function ld(e){function t(b,g){if(e){var S=b.deletions;S===null?(b.deletions=[g],b.flags|=16):S.push(g)}}function l(b,g){if(!e)return null;for(;g!==null;)t(b,g),g=g.sibling;return null}function a(b){for(var g=new Map;b!==null;)b.key!==null?g.set(b.key,b):g.set(b.index,b),b=b.sibling;return g}function i(b,g){return b=Tl(b,g),b.index=0,b.sibling=null,b}function r(b,g,S){return b.index=S,e?(S=b.alternate,S!==null?(S=S.index,S<g?(b.flags|=67108866,g):S):(b.flags|=67108866,g)):(b.flags|=1048576,g)}function o(b){return e&&b.alternate===null&&(b.flags|=67108866),b}function c(b,g,S,D){return g===null||g.tag!==6?(g=Ys(S,b.mode,D),g.return=b,g):(g=i(g,S),g.return=b,g)}function m(b,g,S,D){var P=S.type;return P===I?O(b,g,S.props.children,D,S.key):g!==null&&(g.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===xe&&Ua(P)===g.type)?(g=i(g,S.props),ni(g,S),g.return=b,g):(g=tr(S.type,S.key,S.props,null,b.mode,D),ni(g,S),g.return=b,g)}function j(b,g,S,D){return g===null||g.tag!==4||g.stateNode.containerInfo!==S.containerInfo||g.stateNode.implementation!==S.implementation?(g=Gs(S,b.mode,D),g.return=b,g):(g=i(g,S.children||[]),g.return=b,g)}function O(b,g,S,D,P){return g===null||g.tag!==7?(g=_a(S,b.mode,D,P),g.return=b,g):(g=i(g,S),g.return=b,g)}function w(b,g,S){if(typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint")return g=Ys(""+g,b.mode,S),g.return=b,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case L:return S=tr(g.type,g.key,g.props,null,b.mode,S),ni(S,g),S.return=b,S;case Q:return g=Gs(g,b.mode,S),g.return=b,g;case xe:return g=Ua(g),w(b,g,S)}if(re(g)||qe(g))return g=_a(g,b.mode,S,null),g.return=b,g;if(typeof g.then=="function")return w(b,or(g),S);if(g.$$typeof===$)return w(b,nr(b,g),S);cr(b,g)}return null}function C(b,g,S,D){var P=g!==null?g.key:null;if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return P!==null?null:c(b,g,""+S,D);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case L:return S.key===P?m(b,g,S,D):null;case Q:return S.key===P?j(b,g,S,D):null;case xe:return S=Ua(S),C(b,g,S,D)}if(re(S)||qe(S))return P!==null?null:O(b,g,S,D,null);if(typeof S.then=="function")return C(b,g,or(S),D);if(S.$$typeof===$)return C(b,g,nr(b,S),D);cr(b,S)}return null}function z(b,g,S,D,P){if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return b=b.get(S)||null,c(g,b,""+D,P);if(typeof D=="object"&&D!==null){switch(D.$$typeof){case L:return b=b.get(D.key===null?S:D.key)||null,m(g,b,D,P);case Q:return b=b.get(D.key===null?S:D.key)||null,j(g,b,D,P);case xe:return D=Ua(D),z(b,g,S,D,P)}if(re(D)||qe(D))return b=b.get(S)||null,O(g,b,D,P,null);if(typeof D.then=="function")return z(b,g,S,or(D),P);if(D.$$typeof===$)return z(b,g,S,nr(g,D),P);cr(g,D)}return null}function Z(b,g,S,D){for(var P=null,Re=null,W=g,pe=g=0,ze=null;W!==null&&pe<S.length;pe++){W.index>pe?(ze=W,W=null):ze=W.sibling;var Oe=C(b,W,S[pe],D);if(Oe===null){W===null&&(W=ze);break}e&&W&&Oe.alternate===null&&t(b,W),g=r(Oe,g,pe),Re===null?P=Oe:Re.sibling=Oe,Re=Oe,W=ze}if(pe===S.length)return l(b,W),Ee&&El(b,pe),P;if(W===null){for(;pe<S.length;pe++)W=w(b,S[pe],D),W!==null&&(g=r(W,g,pe),Re===null?P=W:Re.sibling=W,Re=W);return Ee&&El(b,pe),P}for(W=a(W);pe<S.length;pe++)ze=z(W,b,pe,S[pe],D),ze!==null&&(e&&ze.alternate!==null&&W.delete(ze.key===null?pe:ze.key),g=r(ze,g,pe),Re===null?P=ze:Re.sibling=ze,Re=ze);return e&&W.forEach(function(ma){return t(b,ma)}),Ee&&El(b,pe),P}function le(b,g,S,D){if(S==null)throw Error(u(151));for(var P=null,Re=null,W=g,pe=g=0,ze=null,Oe=S.next();W!==null&&!Oe.done;pe++,Oe=S.next()){W.index>pe?(ze=W,W=null):ze=W.sibling;var ma=C(b,W,Oe.value,D);if(ma===null){W===null&&(W=ze);break}e&&W&&ma.alternate===null&&t(b,W),g=r(ma,g,pe),Re===null?P=ma:Re.sibling=ma,Re=ma,W=ze}if(Oe.done)return l(b,W),Ee&&El(b,pe),P;if(W===null){for(;!Oe.done;pe++,Oe=S.next())Oe=w(b,Oe.value,D),Oe!==null&&(g=r(Oe,g,pe),Re===null?P=Oe:Re.sibling=Oe,Re=Oe);return Ee&&El(b,pe),P}for(W=a(W);!Oe.done;pe++,Oe=S.next())Oe=z(W,b,pe,Oe.value,D),Oe!==null&&(e&&Oe.alternate!==null&&W.delete(Oe.key===null?pe:Oe.key),g=r(Oe,g,pe),Re===null?P=Oe:Re.sibling=Oe,Re=Oe);return e&&W.forEach(function(ay){return t(b,ay)}),Ee&&El(b,pe),P}function Le(b,g,S,D){if(typeof S=="object"&&S!==null&&S.type===I&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case L:e:{for(var P=S.key;g!==null;){if(g.key===P){if(P=S.type,P===I){if(g.tag===7){l(b,g.sibling),D=i(g,S.props.children),D.return=b,b=D;break e}}else if(g.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===xe&&Ua(P)===g.type){l(b,g.sibling),D=i(g,S.props),ni(D,S),D.return=b,b=D;break e}l(b,g);break}else t(b,g);g=g.sibling}S.type===I?(D=_a(S.props.children,b.mode,D,S.key),D.return=b,b=D):(D=tr(S.type,S.key,S.props,null,b.mode,D),ni(D,S),D.return=b,b=D)}return o(b);case Q:e:{for(P=S.key;g!==null;){if(g.key===P)if(g.tag===4&&g.stateNode.containerInfo===S.containerInfo&&g.stateNode.implementation===S.implementation){l(b,g.sibling),D=i(g,S.children||[]),D.return=b,b=D;break e}else{l(b,g);break}else t(b,g);g=g.sibling}D=Gs(S,b.mode,D),D.return=b,b=D}return o(b);case xe:return S=Ua(S),Le(b,g,S,D)}if(re(S))return Z(b,g,S,D);if(qe(S)){if(P=qe(S),typeof P!="function")throw Error(u(150));return S=P.call(S),le(b,g,S,D)}if(typeof S.then=="function")return Le(b,g,or(S),D);if(S.$$typeof===$)return Le(b,g,nr(b,S),D);cr(b,S)}return typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint"?(S=""+S,g!==null&&g.tag===6?(l(b,g.sibling),D=i(g,S),D.return=b,b=D):(l(b,g),D=Ys(S,b.mode,D),D.return=b,b=D),o(b)):l(b,g)}return function(b,g,S,D){try{ai=0;var P=Le(b,g,S,D);return yn=null,P}catch(W){if(W===hn||W===rr)throw W;var Re=kt(29,W,null,b.mode);return Re.lanes=D,Re.return=b,Re}finally{}}}var Ha=ld(!0),ad=ld(!1),$l=!1;function eo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function to(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 Il(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Fl(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(_e&2)!==0){var i=a.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),a.pending=t,t=er(e),Lu(e,null,l),t}return Pi(e,a,t,l),er(e)}function ii(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,ps(e,l)}}function lo(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var i=null,r=null;if(l=l.firstBaseUpdate,l!==null){do{var o={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};r===null?i=r=o:r=r.next=o,l=l.next}while(l!==null);r===null?i=r=t:r=r.next=t}else i=r=t;l={baseState:a.baseState,firstBaseUpdate:i,lastBaseUpdate:r,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var ao=!1;function ri(){if(ao){var e=pn;if(e!==null)throw e}}function si(e,t,l,a){ao=!1;var i=e.updateQueue;$l=!1;var r=i.firstBaseUpdate,o=i.lastBaseUpdate,c=i.shared.pending;if(c!==null){i.shared.pending=null;var m=c,j=m.next;m.next=null,o===null?r=j:o.next=j,o=m;var O=e.alternate;O!==null&&(O=O.updateQueue,c=O.lastBaseUpdate,c!==o&&(c===null?O.firstBaseUpdate=j:c.next=j,O.lastBaseUpdate=m))}if(r!==null){var w=i.baseState;o=0,O=j=m=null,c=r;do{var C=c.lane&-536870913,z=C!==c.lane;if(z?(Ce&C)===C:(a&C)===C){C!==0&&C===mn&&(ao=!0),O!==null&&(O=O.next={lane:0,tag:c.tag,payload:c.payload,callback:null,next:null});e:{var Z=e,le=c;C=t;var Le=l;switch(le.tag){case 1:if(Z=le.payload,typeof Z=="function"){w=Z.call(Le,w,C);break e}w=Z;break e;case 3:Z.flags=Z.flags&-65537|128;case 0:if(Z=le.payload,C=typeof Z=="function"?Z.call(Le,w,C):Z,C==null)break e;w=k({},w,C);break e;case 2:$l=!0}}C=c.callback,C!==null&&(e.flags|=64,z&&(e.flags|=8192),z=i.callbacks,z===null?i.callbacks=[C]:z.push(C))}else z={lane:C,tag:c.tag,payload:c.payload,callback:c.callback,next:null},O===null?(j=O=z,m=w):O=O.next=z,o|=C;if(c=c.next,c===null){if(c=i.shared.pending,c===null)break;z=c,c=z.next,z.next=null,i.lastBaseUpdate=z,i.shared.pending=null}}while(!0);O===null&&(m=w),i.baseState=m,i.firstBaseUpdate=j,i.lastBaseUpdate=O,r===null&&(i.shared.lanes=0),aa|=o,e.lanes=o,e.memoizedState=w}}function nd(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function id(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)nd(l[e],t)}var gn=h(null),ur=h(0);function rd(e,t){e=Hl,A(ur,e),A(gn,t),Hl=e|t.baseLanes}function no(){A(ur,Hl),A(gn,gn.current)}function io(){Hl=ur.current,N(gn),N(ur)}var wt=h(null),el=null;function Pl(e){var t=e.alternate;A(Ie,Ie.current&1),A(wt,e),el===null&&(t===null||gn.current!==null||t.memoizedState!==null)&&(el=e)}function ro(e){A(Ie,Ie.current),A(wt,e),el===null&&(el=e)}function sd(e){e.tag===22?(A(Ie,Ie.current),A(wt,e),el===null&&(el=e)):ea()}function ea(){A(Ie,Ie.current),A(wt,wt.current)}function Ut(e){N(wt),el===e&&(el=null),N(Ie)}var Ie=h(0);function dr(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||mc(l)||pc(l)))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 Ol=0,fe=null,He=null,at=null,fr=!1,vn=!1,Ba=!1,mr=0,oi=0,bn=null,Zh=0;function Je(){throw Error(u(321))}function so(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!Dt(e[l],t[l]))return!1;return!0}function oo(e,t,l,a,i,r){return Ol=r,fe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,E.H=e===null||e.memoizedState===null?Vd:Co,Ba=!1,r=l(a,i),Ba=!1,vn&&(r=cd(t,l,a,i)),od(e),r}function od(e){E.H=di;var t=He!==null&&He.next!==null;if(Ol=0,at=He=fe=null,fr=!1,oi=0,bn=null,t)throw Error(u(300));e===null||nt||(e=e.dependencies,e!==null&&ar(e)&&(nt=!0))}function cd(e,t,l,a){fe=e;var i=0;do{if(vn&&(bn=null),oi=0,vn=!1,25<=i)throw Error(u(301));if(i+=1,at=He=null,e.updateQueue!=null){var r=e.updateQueue;r.lastEffect=null,r.events=null,r.stores=null,r.memoCache!=null&&(r.memoCache.index=0)}E.H=Qd,r=t(l,a)}while(vn);return r}function Jh(){var e=E.H,t=e.useState()[0];return t=typeof t.then=="function"?ci(t):t,e=e.useState()[0],(He!==null?He.memoizedState:null)!==e&&(fe.flags|=1024),t}function co(){var e=mr!==0;return mr=0,e}function uo(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function fo(e){if(fr){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}fr=!1}Ol=0,at=He=fe=null,vn=!1,oi=mr=0,bn=null}function bt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return at===null?fe.memoizedState=at=e:at=at.next=e,at}function Fe(){if(He===null){var e=fe.alternate;e=e!==null?e.memoizedState:null}else e=He.next;var t=at===null?fe.memoizedState:at.next;if(t!==null)at=t,He=e;else{if(e===null)throw fe.alternate===null?Error(u(467)):Error(u(310));He=e,e={memoizedState:He.memoizedState,baseState:He.baseState,baseQueue:He.baseQueue,queue:He.queue,next:null},at===null?fe.memoizedState=at=e:at=at.next=e}return at}function pr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ci(e){var t=oi;return oi+=1,bn===null&&(bn=[]),e=Pu(bn,e,t),t=fe,(at===null?t.memoizedState:at.next)===null&&(t=t.alternate,E.H=t===null||t.memoizedState===null?Vd:Co),e}function hr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ci(e);if(e.$$typeof===$)return ft(e)}throw Error(u(438,String(e)))}function mo(e){var t=null,l=fe.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=fe.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=pr(),fe.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),a=0;a<e;a++)l[a]=De;return t.index++,l}function _l(e,t){return typeof t=="function"?t(e):t}function yr(e){var t=Fe();return po(t,He,e)}function po(e,t,l){var a=e.queue;if(a===null)throw Error(u(311));a.lastRenderedReducer=l;var i=e.baseQueue,r=a.pending;if(r!==null){if(i!==null){var o=i.next;i.next=r.next,r.next=o}t.baseQueue=i=r,a.pending=null}if(r=e.baseState,i===null)e.memoizedState=r;else{t=i.next;var c=o=null,m=null,j=t,O=!1;do{var w=j.lane&-536870913;if(w!==j.lane?(Ce&w)===w:(Ol&w)===w){var C=j.revertLane;if(C===0)m!==null&&(m=m.next={lane:0,revertLane:0,gesture:null,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null}),w===mn&&(O=!0);else if((Ol&C)===C){j=j.next,C===mn&&(O=!0);continue}else w={lane:0,revertLane:j.revertLane,gesture:null,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null},m===null?(c=m=w,o=r):m=m.next=w,fe.lanes|=C,aa|=C;w=j.action,Ba&&l(r,w),r=j.hasEagerState?j.eagerState:l(r,w)}else C={lane:w,revertLane:j.revertLane,gesture:j.gesture,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null},m===null?(c=m=C,o=r):m=m.next=C,fe.lanes|=w,aa|=w;j=j.next}while(j!==null&&j!==t);if(m===null?o=r:m.next=c,!Dt(r,e.memoizedState)&&(nt=!0,O&&(l=pn,l!==null)))throw l;e.memoizedState=r,e.baseState=o,e.baseQueue=m,a.lastRenderedState=r}return i===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function ho(e){var t=Fe(),l=t.queue;if(l===null)throw Error(u(311));l.lastRenderedReducer=e;var a=l.dispatch,i=l.pending,r=t.memoizedState;if(i!==null){l.pending=null;var o=i=i.next;do r=e(r,o.action),o=o.next;while(o!==i);Dt(r,t.memoizedState)||(nt=!0),t.memoizedState=r,t.baseQueue===null&&(t.baseState=r),l.lastRenderedState=r}return[r,a]}function ud(e,t,l){var a=fe,i=Fe(),r=Ee;if(r){if(l===void 0)throw Error(u(407));l=l()}else l=t();var o=!Dt((He||i).memoizedState,l);if(o&&(i.memoizedState=l,nt=!0),i=i.queue,vo(md.bind(null,a,i,e),[e]),i.getSnapshot!==t||o||at!==null&&at.memoizedState.tag&1){if(a.flags|=2048,xn(9,{destroy:void 0},fd.bind(null,a,i,l,t),null),Ve===null)throw Error(u(349));r||(Ol&127)!==0||dd(a,t,l)}return l}function dd(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=fe.updateQueue,t===null?(t=pr(),fe.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function fd(e,t,l,a){t.value=l,t.getSnapshot=a,pd(t)&&hd(e)}function md(e,t,l){return l(function(){pd(t)&&hd(e)})}function pd(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!Dt(e,l)}catch{return!0}}function hd(e){var t=Oa(e,2);t!==null&&Rt(t,e,2)}function yo(e){var t=bt();if(typeof e=="function"){var l=e;if(e=l(),Ba){F(!0);try{l()}finally{F(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_l,lastRenderedState:e},t}function yd(e,t,l,a){return e.baseState=l,po(e,He,typeof a=="function"?a:_l)}function Wh(e,t,l,a,i){if(br(e))throw Error(u(485));if(e=t.action,e!==null){var r={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(o){r.listeners.push(o)}};E.T!==null?l(!0):r.isTransition=!1,a(r),l=t.pending,l===null?(r.next=t.pending=r,gd(t,r)):(r.next=l.next,t.pending=l.next=r)}}function gd(e,t){var l=t.action,a=t.payload,i=e.state;if(t.isTransition){var r=E.T,o={};E.T=o;try{var c=l(i,a),m=E.S;m!==null&&m(o,c),vd(e,t,c)}catch(j){go(e,t,j)}finally{r!==null&&o.types!==null&&(r.types=o.types),E.T=r}}else try{r=l(i,a),vd(e,t,r)}catch(j){go(e,t,j)}}function vd(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){bd(e,t,a)},function(a){return go(e,t,a)}):bd(e,t,l)}function bd(e,t,l){t.status="fulfilled",t.value=l,xd(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,gd(e,l)))}function go(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,xd(t),t=t.next;while(t!==a)}e.action=null}function xd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Sd(e,t){return t}function jd(e,t){if(Ee){var l=Ve.formState;if(l!==null){e:{var a=fe;if(Ee){if(Qe){t:{for(var i=Qe,r=Pt;i.nodeType!==8;){if(!r){i=null;break t}if(i=tl(i.nextSibling),i===null){i=null;break t}}r=i.data,i=r==="F!"||r==="F"?i:null}if(i){Qe=tl(i.nextSibling),a=i.data==="F!";break e}}Jl(a)}a=!1}a&&(t=l[0])}}return l=bt(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sd,lastRenderedState:t},l.queue=a,l=Yd.bind(null,fe,a),a.dispatch=l,a=yo(!1),r=Ao.bind(null,fe,!1,a.queue),a=bt(),i={state:t,dispatch:null,action:e,pending:null},a.queue=i,l=Wh.bind(null,fe,i,r,l),i.dispatch=l,a.memoizedState=e,[t,l,!1]}function Ad(e){var t=Fe();return Cd(t,He,e)}function Cd(e,t,l){if(t=po(e,t,Sd)[0],e=yr(_l)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=ci(t)}catch(o){throw o===hn?rr:o}else a=t;t=Fe();var i=t.queue,r=i.dispatch;return l!==t.memoizedState&&(fe.flags|=2048,xn(9,{destroy:void 0},$h.bind(null,i,l),null)),[a,r,e]}function $h(e,t){e.action=t}function zd(e){var t=Fe(),l=He;if(l!==null)return Cd(t,l,e);Fe(),t=t.memoizedState,l=Fe();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function xn(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=fe.updateQueue,t===null&&(t=pr(),fe.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(a=l.next,l.next=e,e.next=a,t.lastEffect=e),e}function Td(){return Fe().memoizedState}function gr(e,t,l,a){var i=bt();fe.flags|=e,i.memoizedState=xn(1|t,{destroy:void 0},l,a===void 0?null:a)}function vr(e,t,l,a){var i=Fe();a=a===void 0?null:a;var r=i.memoizedState.inst;He!==null&&a!==null&&so(a,He.memoizedState.deps)?i.memoizedState=xn(t,r,l,a):(fe.flags|=e,i.memoizedState=xn(1|t,r,l,a))}function Ed(e,t){gr(8390656,8,e,t)}function vo(e,t){vr(2048,8,e,t)}function Ih(e){fe.flags|=4;var t=fe.updateQueue;if(t===null)t=pr(),fe.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function Md(e){var t=Fe().memoizedState;return Ih({ref:t,nextImpl:e}),function(){if((_e&2)!==0)throw Error(u(440));return t.impl.apply(void 0,arguments)}}function Rd(e,t){return vr(4,2,e,t)}function Od(e,t){return vr(4,4,e,t)}function _d(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Nd(e,t,l){l=l!=null?l.concat([e]):null,vr(4,4,_d.bind(null,t,e),l)}function bo(){}function Dd(e,t){var l=Fe();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&so(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function kd(e,t){var l=Fe();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&so(t,a[1]))return a[0];if(a=e(),Ba){F(!0);try{e()}finally{F(!1)}}return l.memoizedState=[a,t],a}function xo(e,t,l){return l===void 0||(Ol&1073741824)!==0&&(Ce&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=Uf(),fe.lanes|=e,aa|=e,l)}function wd(e,t,l,a){return Dt(l,t)?l:gn.current!==null?(e=xo(e,l,a),Dt(e,t)||(nt=!0),e):(Ol&42)===0||(Ol&1073741824)!==0&&(Ce&261930)===0?(nt=!0,e.memoizedState=l):(e=Uf(),fe.lanes|=e,aa|=e,t)}function Ud(e,t,l,a,i){var r=H.p;H.p=r!==0&&8>r?r:8;var o=E.T,c={};E.T=c,Ao(e,!1,t,l);try{var m=i(),j=E.S;if(j!==null&&j(c,m),m!==null&&typeof m=="object"&&typeof m.then=="function"){var O=Kh(m,a);ui(e,t,O,Bt(e))}else ui(e,t,a,Bt(e))}catch(w){ui(e,t,{then:function(){},status:"rejected",reason:w},Bt())}finally{H.p=r,o!==null&&c.types!==null&&(o.types=c.types),E.T=o}}function Fh(){}function So(e,t,l,a){if(e.tag!==5)throw Error(u(476));var i=qd(e).queue;Ud(e,i,t,K,l===null?Fh:function(){return Hd(e),l(a)})}function qd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:K,baseState:K,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_l,lastRenderedState:K},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_l,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Hd(e){var t=qd(e);t.next===null&&(t=e.alternate.memoizedState),ui(e,t.next.queue,{},Bt())}function jo(){return ft(Ei)}function Bd(){return Fe().memoizedState}function Ld(){return Fe().memoizedState}function Ph(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Bt();e=Il(l);var a=Fl(t,e,l);a!==null&&(Rt(a,t,l),ii(a,t,l)),t={cache:$s()},e.payload=t;return}t=t.return}}function e0(e,t,l){var a=Bt();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},br(e)?Gd(t,l):(l=Bs(e,t,l,a),l!==null&&(Rt(l,e,a),Xd(l,t,a)))}function Yd(e,t,l){var a=Bt();ui(e,t,l,a)}function ui(e,t,l,a){var i={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(br(e))Gd(t,i);else{var r=e.alternate;if(e.lanes===0&&(r===null||r.lanes===0)&&(r=t.lastRenderedReducer,r!==null))try{var o=t.lastRenderedState,c=r(o,l);if(i.hasEagerState=!0,i.eagerState=c,Dt(c,o))return Pi(e,t,i,0),Ve===null&&Fi(),!1}catch{}finally{}if(l=Bs(e,t,i,a),l!==null)return Rt(l,e,a),Xd(l,t,a),!0}return!1}function Ao(e,t,l,a){if(a={lane:2,revertLane:tc(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},br(e)){if(t)throw Error(u(479))}else t=Bs(e,l,a,2),t!==null&&Rt(t,e,2)}function br(e){var t=e.alternate;return e===fe||t!==null&&t===fe}function Gd(e,t){vn=fr=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function Xd(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,ps(e,l)}}var di={readContext:ft,use:hr,useCallback:Je,useContext:Je,useEffect:Je,useImperativeHandle:Je,useLayoutEffect:Je,useInsertionEffect:Je,useMemo:Je,useReducer:Je,useRef:Je,useState:Je,useDebugValue:Je,useDeferredValue:Je,useTransition:Je,useSyncExternalStore:Je,useId:Je,useHostTransitionStatus:Je,useFormState:Je,useActionState:Je,useOptimistic:Je,useMemoCache:Je,useCacheRefresh:Je};di.useEffectEvent=Je;var Vd={readContext:ft,use:hr,useCallback:function(e,t){return bt().memoizedState=[e,t===void 0?null:t],e},useContext:ft,useEffect:Ed,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,gr(4194308,4,_d.bind(null,t,e),l)},useLayoutEffect:function(e,t){return gr(4194308,4,e,t)},useInsertionEffect:function(e,t){gr(4,2,e,t)},useMemo:function(e,t){var l=bt();t=t===void 0?null:t;var a=e();if(Ba){F(!0);try{e()}finally{F(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=bt();if(l!==void 0){var i=l(t);if(Ba){F(!0);try{l(t)}finally{F(!1)}}}else i=t;return a.memoizedState=a.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},a.queue=e,e=e.dispatch=e0.bind(null,fe,e),[a.memoizedState,e]},useRef:function(e){var t=bt();return e={current:e},t.memoizedState=e},useState:function(e){e=yo(e);var t=e.queue,l=Yd.bind(null,fe,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:bo,useDeferredValue:function(e,t){var l=bt();return xo(l,e,t)},useTransition:function(){var e=yo(!1);return e=Ud.bind(null,fe,e.queue,!0,!1),bt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=fe,i=bt();if(Ee){if(l===void 0)throw Error(u(407));l=l()}else{if(l=t(),Ve===null)throw Error(u(349));(Ce&127)!==0||dd(a,t,l)}i.memoizedState=l;var r={value:l,getSnapshot:t};return i.queue=r,Ed(md.bind(null,a,r,e),[e]),a.flags|=2048,xn(9,{destroy:void 0},fd.bind(null,a,r,l,t),null),l},useId:function(){var e=bt(),t=Ve.identifierPrefix;if(Ee){var l=yl,a=hl;l=(a&~(1<<32-de(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=mr++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=Zh++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:jo,useFormState:jd,useActionState:jd,useOptimistic:function(e){var t=bt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=Ao.bind(null,fe,!0,l),l.dispatch=t,[e,t]},useMemoCache:mo,useCacheRefresh:function(){return bt().memoizedState=Ph.bind(null,fe)},useEffectEvent:function(e){var t=bt(),l={impl:e};return t.memoizedState=l,function(){if((_e&2)!==0)throw Error(u(440));return l.impl.apply(void 0,arguments)}}},Co={readContext:ft,use:hr,useCallback:Dd,useContext:ft,useEffect:vo,useImperativeHandle:Nd,useInsertionEffect:Rd,useLayoutEffect:Od,useMemo:kd,useReducer:yr,useRef:Td,useState:function(){return yr(_l)},useDebugValue:bo,useDeferredValue:function(e,t){var l=Fe();return wd(l,He.memoizedState,e,t)},useTransition:function(){var e=yr(_l)[0],t=Fe().memoizedState;return[typeof e=="boolean"?e:ci(e),t]},useSyncExternalStore:ud,useId:Bd,useHostTransitionStatus:jo,useFormState:Ad,useActionState:Ad,useOptimistic:function(e,t){var l=Fe();return yd(l,He,e,t)},useMemoCache:mo,useCacheRefresh:Ld};Co.useEffectEvent=Md;var Qd={readContext:ft,use:hr,useCallback:Dd,useContext:ft,useEffect:vo,useImperativeHandle:Nd,useInsertionEffect:Rd,useLayoutEffect:Od,useMemo:kd,useReducer:ho,useRef:Td,useState:function(){return ho(_l)},useDebugValue:bo,useDeferredValue:function(e,t){var l=Fe();return He===null?xo(l,e,t):wd(l,He.memoizedState,e,t)},useTransition:function(){var e=ho(_l)[0],t=Fe().memoizedState;return[typeof e=="boolean"?e:ci(e),t]},useSyncExternalStore:ud,useId:Bd,useHostTransitionStatus:jo,useFormState:zd,useActionState:zd,useOptimistic:function(e,t){var l=Fe();return He!==null?yd(l,He,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:mo,useCacheRefresh:Ld};Qd.useEffectEvent=Md;function zo(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:k({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var To={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=Bt(),i=Il(a);i.payload=t,l!=null&&(i.callback=l),t=Fl(e,i,a),t!==null&&(Rt(t,e,a),ii(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=Bt(),i=Il(a);i.tag=1,i.payload=t,l!=null&&(i.callback=l),t=Fl(e,i,a),t!==null&&(Rt(t,e,a),ii(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=Bt(),a=Il(l);a.tag=2,t!=null&&(a.callback=t),t=Fl(e,a,l),t!==null&&(Rt(t,e,l),ii(t,e,l))}};function Kd(e,t,l,a,i,r,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,r,o):t.prototype&&t.prototype.isPureReactComponent?!In(l,a)||!In(i,r):!0}function Zd(e,t,l,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,a),t.state!==e&&To.enqueueReplaceState(t,t.state,null)}function La(e,t){var l=t;if("ref"in t){l={};for(var a in t)a!=="ref"&&(l[a]=t[a])}if(e=e.defaultProps){l===t&&(l=k({},l));for(var i in e)l[i]===void 0&&(l[i]=e[i])}return l}function Jd(e){Ii(e)}function Wd(e){console.error(e)}function $d(e){Ii(e)}function xr(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Id(e,t,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function Eo(e,t,l){return l=Il(l),l.tag=3,l.payload={element:null},l.callback=function(){xr(e,t)},l}function Fd(e){return e=Il(e),e.tag=3,e}function Pd(e,t,l,a){var i=l.type.getDerivedStateFromError;if(typeof i=="function"){var r=a.value;e.payload=function(){return i(r)},e.callback=function(){Id(t,l,a)}}var o=l.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(e.callback=function(){Id(t,l,a),typeof i!="function"&&(na===null?na=new Set([this]):na.add(this));var c=a.stack;this.componentDidCatch(a.value,{componentStack:c!==null?c:""})})}function t0(e,t,l,a,i){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&fn(t,l,i,!0),l=wt.current,l!==null){switch(l.tag){case 31:case 13:return el===null?Nr():l.alternate===null&&We===0&&(We=3),l.flags&=-257,l.flags|=65536,l.lanes=i,a===sr?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),Fo(e,a,i)),!1;case 22:return l.flags|=65536,a===sr?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([a]):l.add(a)),Fo(e,a,i)),!1}throw Error(u(435,l.tag))}return Fo(e,a,i),Nr(),!1}if(Ee)return t=wt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,a!==Qs&&(e=Error(u(422),{cause:a}),ei($t(e,l)))):(a!==Qs&&(t=Error(u(423),{cause:a}),ei($t(t,l))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,a=$t(a,l),i=Eo(e.stateNode,a,i),lo(e,i),We!==4&&(We=2)),!1;var r=Error(u(520),{cause:a});if(r=$t(r,l),bi===null?bi=[r]:bi.push(r),We!==4&&(We=2),t===null)return!0;a=$t(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=i&-i,l.lanes|=e,e=Eo(l.stateNode,a,e),lo(l,e),!1;case 1:if(t=l.type,r=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||r!==null&&typeof r.componentDidCatch=="function"&&(na===null||!na.has(r))))return l.flags|=65536,i&=-i,l.lanes|=i,i=Fd(i),Pd(i,e,l,a),lo(l,i),!1}l=l.return}while(l!==null);return!1}var Mo=Error(u(461)),nt=!1;function mt(e,t,l,a){t.child=e===null?ad(t,null,l,a):Ha(t,e.child,l,a)}function ef(e,t,l,a,i){l=l.render;var r=t.ref;if("ref"in a){var o={};for(var c in a)c!=="ref"&&(o[c]=a[c])}else o=a;return ka(t),a=oo(e,t,l,o,r,i),c=co(),e!==null&&!nt?(uo(e,t,i),Nl(e,t,i)):(Ee&&c&&Xs(t),t.flags|=1,mt(e,t,a,i),t.child)}function tf(e,t,l,a,i){if(e===null){var r=l.type;return typeof r=="function"&&!Ls(r)&&r.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=r,lf(e,t,r,a,i)):(e=tr(l.type,null,a,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(r=e.child,!Uo(e,i)){var o=r.memoizedProps;if(l=l.compare,l=l!==null?l:In,l(o,a)&&e.ref===t.ref)return Nl(e,t,i)}return t.flags|=1,e=Tl(r,a),e.ref=t.ref,e.return=t,t.child=e}function lf(e,t,l,a,i){if(e!==null){var r=e.memoizedProps;if(In(r,a)&&e.ref===t.ref)if(nt=!1,t.pendingProps=a=r,Uo(e,i))(e.flags&131072)!==0&&(nt=!0);else return t.lanes=e.lanes,Nl(e,t,i)}return Ro(e,t,l,a,i)}function af(e,t,l,a){var i=a.children,r=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(r=r!==null?r.baseLanes|l:l,e!==null){for(a=t.child=e.child,i=0;a!==null;)i=i|a.lanes|a.childLanes,a=a.sibling;a=i&~r}else a=0,t.child=null;return nf(e,t,r,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ir(t,r!==null?r.cachePool:null),r!==null?rd(t,r):no(),sd(t);else return a=t.lanes=536870912,nf(e,t,r!==null?r.baseLanes|l:l,l,a)}else r!==null?(ir(t,r.cachePool),rd(t,r),ea(),t.memoizedState=null):(e!==null&&ir(t,null),no(),ea());return mt(e,t,i,l),t.child}function fi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function nf(e,t,l,a,i){var r=Fs();return r=r===null?null:{parent:lt._currentValue,pool:r},t.memoizedState={baseLanes:l,cachePool:r},e!==null&&ir(t,null),no(),sd(t),e!==null&&fn(e,t,a,!0),t.childLanes=i,null}function Sr(e,t){return t=Ar({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function rf(e,t,l){return Ha(t,e.child,null,l),e=Sr(t,t.pendingProps),e.flags|=2,Ut(t),t.memoizedState=null,e}function l0(e,t,l){var a=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ee){if(a.mode==="hidden")return e=Sr(t,a),t.lanes=536870912,fi(null,e);if(ro(t),(e=Qe)?(e=vm(e,Pt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Kl!==null?{id:hl,overflow:yl}:null,retryLane:536870912,hydrationErrors:null},l=Gu(e),l.return=t,t.child=l,dt=t,Qe=null)):e=null,e===null)throw Jl(t);return t.lanes=536870912,null}return Sr(t,a)}var r=e.memoizedState;if(r!==null){var o=r.dehydrated;if(ro(t),i)if(t.flags&256)t.flags&=-257,t=rf(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(u(558));else if(nt||fn(e,t,l,!1),i=(l&e.childLanes)!==0,nt||i){if(a=Ve,a!==null&&(o=Ln(a,l),o!==0&&o!==r.retryLane))throw r.retryLane=o,Oa(e,o),Rt(a,e,o),Mo;Nr(),t=rf(e,t,l)}else e=r.treeContext,Qe=tl(o.nextSibling),dt=t,Ee=!0,Zl=null,Pt=!1,e!==null&&Qu(t,e),t=Sr(t,a),t.flags|=4096;return t}return e=Tl(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function jr(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(u(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function Ro(e,t,l,a,i){return ka(t),l=oo(e,t,l,a,void 0,i),a=co(),e!==null&&!nt?(uo(e,t,i),Nl(e,t,i)):(Ee&&a&&Xs(t),t.flags|=1,mt(e,t,l,i),t.child)}function sf(e,t,l,a,i,r){return ka(t),t.updateQueue=null,l=cd(t,a,l,i),od(e),a=co(),e!==null&&!nt?(uo(e,t,r),Nl(e,t,r)):(Ee&&a&&Xs(t),t.flags|=1,mt(e,t,l,r),t.child)}function of(e,t,l,a,i){if(ka(t),t.stateNode===null){var r=on,o=l.contextType;typeof o=="object"&&o!==null&&(r=ft(o)),r=new l(a,r),t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=To,t.stateNode=r,r._reactInternals=t,r=t.stateNode,r.props=a,r.state=t.memoizedState,r.refs={},eo(t),o=l.contextType,r.context=typeof o=="object"&&o!==null?ft(o):on,r.state=t.memoizedState,o=l.getDerivedStateFromProps,typeof o=="function"&&(zo(t,l,o,a),r.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(o=r.state,typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount(),o!==r.state&&To.enqueueReplaceState(r,r.state,null),si(t,a,r,i),ri(),r.state=t.memoizedState),typeof r.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){r=t.stateNode;var c=t.memoizedProps,m=La(l,c);r.props=m;var j=r.context,O=l.contextType;o=on,typeof O=="object"&&O!==null&&(o=ft(O));var w=l.getDerivedStateFromProps;O=typeof w=="function"||typeof r.getSnapshotBeforeUpdate=="function",c=t.pendingProps!==c,O||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(c||j!==o)&&Zd(t,r,a,o),$l=!1;var C=t.memoizedState;r.state=C,si(t,a,r,i),ri(),j=t.memoizedState,c||C!==j||$l?(typeof w=="function"&&(zo(t,l,w,a),j=t.memoizedState),(m=$l||Kd(t,l,m,a,C,j,o))?(O||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount()),typeof r.componentDidMount=="function"&&(t.flags|=4194308)):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=j),r.props=a,r.state=j,r.context=o,a=m):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{r=t.stateNode,to(e,t),o=t.memoizedProps,O=La(l,o),r.props=O,w=t.pendingProps,C=r.context,j=l.contextType,m=on,typeof j=="object"&&j!==null&&(m=ft(j)),c=l.getDerivedStateFromProps,(j=typeof c=="function"||typeof r.getSnapshotBeforeUpdate=="function")||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(o!==w||C!==m)&&Zd(t,r,a,m),$l=!1,C=t.memoizedState,r.state=C,si(t,a,r,i),ri();var z=t.memoizedState;o!==w||C!==z||$l||e!==null&&e.dependencies!==null&&ar(e.dependencies)?(typeof c=="function"&&(zo(t,l,c,a),z=t.memoizedState),(O=$l||Kd(t,l,O,a,C,z,m)||e!==null&&e.dependencies!==null&&ar(e.dependencies))?(j||typeof r.UNSAFE_componentWillUpdate!="function"&&typeof r.componentWillUpdate!="function"||(typeof r.componentWillUpdate=="function"&&r.componentWillUpdate(a,z,m),typeof r.UNSAFE_componentWillUpdate=="function"&&r.UNSAFE_componentWillUpdate(a,z,m)),typeof r.componentDidUpdate=="function"&&(t.flags|=4),typeof r.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof r.componentDidUpdate!="function"||o===e.memoizedProps&&C===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&C===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=z),r.props=a,r.state=z,r.context=m,a=O):(typeof r.componentDidUpdate!="function"||o===e.memoizedProps&&C===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&C===e.memoizedState||(t.flags|=1024),a=!1)}return r=a,jr(e,t),a=(t.flags&128)!==0,r||a?(r=t.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:r.render(),t.flags|=1,e!==null&&a?(t.child=Ha(t,e.child,null,i),t.child=Ha(t,null,l,i)):mt(e,t,l,i),t.memoizedState=r.state,e=t.child):e=Nl(e,t,i),e}function cf(e,t,l,a){return Na(),t.flags|=256,mt(e,t,l,a),t.child}var Oo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function _o(e){return{baseLanes:e,cachePool:Iu()}}function No(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=Ht),e}function uf(e,t,l){var a=t.pendingProps,i=!1,r=(t.flags&128)!==0,o;if((o=r)||(o=e!==null&&e.memoizedState===null?!1:(Ie.current&2)!==0),o&&(i=!0,t.flags&=-129),o=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ee){if(i?Pl(t):ea(),(e=Qe)?(e=vm(e,Pt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Kl!==null?{id:hl,overflow:yl}:null,retryLane:536870912,hydrationErrors:null},l=Gu(e),l.return=t,t.child=l,dt=t,Qe=null)):e=null,e===null)throw Jl(t);return pc(e)?t.lanes=32:t.lanes=536870912,null}var c=a.children;return a=a.fallback,i?(ea(),i=t.mode,c=Ar({mode:"hidden",children:c},i),a=_a(a,i,l,null),c.return=t,a.return=t,c.sibling=a,t.child=c,a=t.child,a.memoizedState=_o(l),a.childLanes=No(e,o,l),t.memoizedState=Oo,fi(null,a)):(Pl(t),Do(t,c))}var m=e.memoizedState;if(m!==null&&(c=m.dehydrated,c!==null)){if(r)t.flags&256?(Pl(t),t.flags&=-257,t=ko(e,t,l)):t.memoizedState!==null?(ea(),t.child=e.child,t.flags|=128,t=null):(ea(),c=a.fallback,i=t.mode,a=Ar({mode:"visible",children:a.children},i),c=_a(c,i,l,null),c.flags|=2,a.return=t,c.return=t,a.sibling=c,t.child=a,Ha(t,e.child,null,l),a=t.child,a.memoizedState=_o(l),a.childLanes=No(e,o,l),t.memoizedState=Oo,t=fi(null,a));else if(Pl(t),pc(c)){if(o=c.nextSibling&&c.nextSibling.dataset,o)var j=o.dgst;o=j,a=Error(u(419)),a.stack="",a.digest=o,ei({value:a,source:null,stack:null}),t=ko(e,t,l)}else if(nt||fn(e,t,l,!1),o=(l&e.childLanes)!==0,nt||o){if(o=Ve,o!==null&&(a=Ln(o,l),a!==0&&a!==m.retryLane))throw m.retryLane=a,Oa(e,a),Rt(o,e,a),Mo;mc(c)||Nr(),t=ko(e,t,l)}else mc(c)?(t.flags|=192,t.child=e.child,t=null):(e=m.treeContext,Qe=tl(c.nextSibling),dt=t,Ee=!0,Zl=null,Pt=!1,e!==null&&Qu(t,e),t=Do(t,a.children),t.flags|=4096);return t}return i?(ea(),c=a.fallback,i=t.mode,m=e.child,j=m.sibling,a=Tl(m,{mode:"hidden",children:a.children}),a.subtreeFlags=m.subtreeFlags&65011712,j!==null?c=Tl(j,c):(c=_a(c,i,l,null),c.flags|=2),c.return=t,a.return=t,a.sibling=c,t.child=a,fi(null,a),a=t.child,c=e.child.memoizedState,c===null?c=_o(l):(i=c.cachePool,i!==null?(m=lt._currentValue,i=i.parent!==m?{parent:m,pool:m}:i):i=Iu(),c={baseLanes:c.baseLanes|l,cachePool:i}),a.memoizedState=c,a.childLanes=No(e,o,l),t.memoizedState=Oo,fi(e.child,a)):(Pl(t),l=e.child,e=l.sibling,l=Tl(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=l,t.memoizedState=null,l)}function Do(e,t){return t=Ar({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ar(e,t){return e=kt(22,e,null,t),e.lanes=0,e}function ko(e,t,l){return Ha(t,e.child,null,l),e=Do(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function df(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Js(e.return,t,l)}function wo(e,t,l,a,i,r){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:i,treeForkCount:r}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=a,o.tail=l,o.tailMode=i,o.treeForkCount=r)}function ff(e,t,l){var a=t.pendingProps,i=a.revealOrder,r=a.tail;a=a.children;var o=Ie.current,c=(o&2)!==0;if(c?(o=o&1|2,t.flags|=128):o&=1,A(Ie,o),mt(e,t,a,l),a=Ee?Pn:0,!c&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&df(e,l,t);else if(e.tag===19)df(e,l,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(i){case"forwards":for(l=t.child,i=null;l!==null;)e=l.alternate,e!==null&&dr(e)===null&&(i=l),l=l.sibling;l=i,l===null?(i=t.child,t.child=null):(i=l.sibling,l.sibling=null),wo(t,!1,i,l,r,a);break;case"backwards":case"unstable_legacy-backwards":for(l=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&dr(e)===null){t.child=i;break}e=i.sibling,i.sibling=l,l=i,i=e}wo(t,!0,l,null,r,a);break;case"together":wo(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function Nl(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),aa|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(fn(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,l=Tl(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=Tl(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function Uo(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&ar(e)))}function a0(e,t,l){switch(t.tag){case 3:et(t,t.stateNode.containerInfo),Wl(t,lt,e.memoizedState.cache),Na();break;case 27:case 5:Qt(t);break;case 4:et(t,t.stateNode.containerInfo);break;case 10:Wl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ro(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(Pl(t),t.flags|=128,null):(l&t.child.childLanes)!==0?uf(e,t,l):(Pl(t),e=Nl(e,t,l),e!==null?e.sibling:null);Pl(t);break;case 19:var i=(e.flags&128)!==0;if(a=(l&t.childLanes)!==0,a||(fn(e,t,l,!1),a=(l&t.childLanes)!==0),i){if(a)return ff(e,t,l);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),A(Ie,Ie.current),a)break;return null;case 22:return t.lanes=0,af(e,t,l,t.pendingProps);case 24:Wl(t,lt,e.memoizedState.cache)}return Nl(e,t,l)}function mf(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)nt=!0;else{if(!Uo(e,l)&&(t.flags&128)===0)return nt=!1,a0(e,t,l);nt=(e.flags&131072)!==0}else nt=!1,Ee&&(t.flags&1048576)!==0&&Vu(t,Pn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=Ua(t.elementType),t.type=e,typeof e=="function")Ls(e)?(a=La(e,a),t.tag=1,t=of(null,t,e,a,l)):(t.tag=0,t=Ro(null,t,e,a,l));else{if(e!=null){var i=e.$$typeof;if(i===ee){t.tag=11,t=ef(null,t,e,a,l);break e}else if(i===X){t.tag=14,t=tf(null,t,e,a,l);break e}}throw t=ye(e)||e,Error(u(306,t,""))}}return t;case 0:return Ro(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,i=La(a,t.pendingProps),of(e,t,a,i,l);case 3:e:{if(et(t,t.stateNode.containerInfo),e===null)throw Error(u(387));a=t.pendingProps;var r=t.memoizedState;i=r.element,to(e,t),si(t,a,null,l);var o=t.memoizedState;if(a=o.cache,Wl(t,lt,a),a!==r.cache&&Ws(t,[lt],l,!0),ri(),a=o.element,r.isDehydrated)if(r={element:a,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=r,t.memoizedState=r,t.flags&256){t=cf(e,t,a,l);break e}else if(a!==i){i=$t(Error(u(424)),t),ei(i),t=cf(e,t,a,l);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(Qe=tl(e.firstChild),dt=t,Ee=!0,Zl=null,Pt=!0,l=ad(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Na(),a===i){t=Nl(e,t,l);break e}mt(e,t,a,l)}t=t.child}return t;case 26:return jr(e,t),e===null?(l=Cm(t.type,null,t.pendingProps,null))?t.memoizedState=l:Ee||(l=t.type,e=t.pendingProps,a=Br(te.current).createElement(l),a[ut]=t,a[At]=e,pt(a,l,e),ot(a),t.stateNode=a):t.memoizedState=Cm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Qt(t),e===null&&Ee&&(a=t.stateNode=Sm(t.type,t.pendingProps,te.current),dt=t,Pt=!0,i=Qe,oa(t.type)?(hc=i,Qe=tl(a.firstChild)):Qe=i),mt(e,t,t.pendingProps.children,l),jr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ee&&((i=a=Qe)&&(a=D0(a,t.type,t.pendingProps,Pt),a!==null?(t.stateNode=a,dt=t,Qe=tl(a.firstChild),Pt=!1,i=!0):i=!1),i||Jl(t)),Qt(t),i=t.type,r=t.pendingProps,o=e!==null?e.memoizedProps:null,a=r.children,uc(i,r)?a=null:o!==null&&uc(i,o)&&(t.flags|=32),t.memoizedState!==null&&(i=oo(e,t,Jh,null,null,l),Ei._currentValue=i),jr(e,t),mt(e,t,a,l),t.child;case 6:return e===null&&Ee&&((e=l=Qe)&&(l=k0(l,t.pendingProps,Pt),l!==null?(t.stateNode=l,dt=t,Qe=null,e=!0):e=!1),e||Jl(t)),null;case 13:return uf(e,t,l);case 4:return et(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Ha(t,null,a,l):mt(e,t,a,l),t.child;case 11:return ef(e,t,t.type,t.pendingProps,l);case 7:return mt(e,t,t.pendingProps,l),t.child;case 8:return mt(e,t,t.pendingProps.children,l),t.child;case 12:return mt(e,t,t.pendingProps.children,l),t.child;case 10:return a=t.pendingProps,Wl(t,t.type,a.value),mt(e,t,a.children,l),t.child;case 9:return i=t.type._context,a=t.pendingProps.children,ka(t),i=ft(i),a=a(i),t.flags|=1,mt(e,t,a,l),t.child;case 14:return tf(e,t,t.type,t.pendingProps,l);case 15:return lf(e,t,t.type,t.pendingProps,l);case 19:return ff(e,t,l);case 31:return l0(e,t,l);case 22:return af(e,t,l,t.pendingProps);case 24:return ka(t),a=ft(lt),e===null?(i=Fs(),i===null&&(i=Ve,r=$s(),i.pooledCache=r,r.refCount++,r!==null&&(i.pooledCacheLanes|=l),i=r),t.memoizedState={parent:a,cache:i},eo(t),Wl(t,lt,i)):((e.lanes&l)!==0&&(to(e,t),si(t,null,null,l),ri()),i=e.memoizedState,r=t.memoizedState,i.parent!==a?(i={parent:a,cache:a},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),Wl(t,lt,a)):(a=r.cache,Wl(t,lt,a),a!==i.cache&&Ws(t,[lt],l,!0))),mt(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function Dl(e){e.flags|=4}function qo(e,t,l,a,i){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Lf())e.flags|=8192;else throw qa=sr,Ps}else e.flags&=-16777217}function pf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Rm(t))if(Lf())e.flags|=8192;else throw qa=sr,Ps}function Cr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Li():536870912,e.lanes|=t,Cn|=t)}function mi(e,t){if(!Ee)switch(e.tailMode){case"hidden":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Ke(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var i=e.child;i!==null;)l|=i.lanes|i.childLanes,a|=i.subtreeFlags&65011712,a|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)l|=i.lanes|i.childLanes,a|=i.subtreeFlags,a|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=a,e.childLanes=l,t}function n0(e,t,l){var a=t.pendingProps;switch(Vs(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ke(t),null;case 1:return Ke(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Rl(lt),Ye(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(dn(t)?Dl(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ks())),Ke(t),null;case 26:var i=t.type,r=t.memoizedState;return e===null?(Dl(t),r!==null?(Ke(t),pf(t,r)):(Ke(t),qo(t,i,null,a,l))):r?r!==e.memoizedState?(Dl(t),Ke(t),pf(t,r)):(Ke(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&Dl(t),Ke(t),qo(t,i,e,a,l)),null;case 27:if(nl(t),l=te.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Dl(t);else{if(!a){if(t.stateNode===null)throw Error(u(166));return Ke(t),null}e=B.current,dn(t)?Ku(t):(e=Sm(i,a,l),t.stateNode=e,Dl(t))}return Ke(t),null;case 5:if(nl(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Dl(t);else{if(!a){if(t.stateNode===null)throw Error(u(166));return Ke(t),null}if(r=B.current,dn(t))Ku(t);else{var o=Br(te.current);switch(r){case 1:r=o.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:r=o.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":r=o.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":r=o.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":r=o.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild);break;case"select":r=typeof a.is=="string"?o.createElement("select",{is:a.is}):o.createElement("select"),a.multiple?r.multiple=!0:a.size&&(r.size=a.size);break;default:r=typeof a.is=="string"?o.createElement(i,{is:a.is}):o.createElement(i)}}r[ut]=t,r[At]=a;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)r.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=r;e:switch(pt(r,i,a),i){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Dl(t)}}return Ke(t),qo(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Dl(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(u(166));if(e=te.current,dn(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,i=dt,i!==null)switch(i.tag){case 27:case 5:a=i.memoizedProps}e[ut]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||um(e.nodeValue,l)),e||Jl(t,!0)}else e=Br(e).createTextNode(a),e[ut]=t,t.stateNode=e}return Ke(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=dn(t),l!==null){if(e===null){if(!a)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[ut]=t}else Na(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ke(t),e=!1}else l=Ks(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(Ut(t),t):(Ut(t),null);if((t.flags&128)!==0)throw Error(u(558))}return Ke(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=dn(t),a!==null&&a.dehydrated!==null){if(e===null){if(!i)throw Error(u(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(u(317));i[ut]=t}else Na(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ke(t),i=!1}else i=Ks(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(Ut(t),t):(Ut(t),null)}return Ut(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,i=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(i=a.alternate.memoizedState.cachePool.pool),r=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(r=a.memoizedState.cachePool.pool),r!==i&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),Cr(t,t.updateQueue),Ke(t),null);case 4:return Ye(),e===null&&ic(t.stateNode.containerInfo),Ke(t),null;case 10:return Rl(t.type),Ke(t),null;case 19:if(N(Ie),a=t.memoizedState,a===null)return Ke(t),null;if(i=(t.flags&128)!==0,r=a.rendering,r===null)if(i)mi(a,!1);else{if(We!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(r=dr(e),r!==null){for(t.flags|=128,mi(a,!1),e=r.updateQueue,t.updateQueue=e,Cr(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Yu(l,e),l=l.sibling;return A(Ie,Ie.current&1|2),Ee&&El(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&ne()>Rr&&(t.flags|=128,i=!0,mi(a,!1),t.lanes=4194304)}else{if(!i)if(e=dr(r),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Cr(t,e),mi(a,!0),a.tail===null&&a.tailMode==="hidden"&&!r.alternate&&!Ee)return Ke(t),null}else 2*ne()-a.renderingStartTime>Rr&&l!==536870912&&(t.flags|=128,i=!0,mi(a,!1),t.lanes=4194304);a.isBackwards?(r.sibling=t.child,t.child=r):(e=a.last,e!==null?e.sibling=r:t.child=r,a.last=r)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=ne(),e.sibling=null,l=Ie.current,A(Ie,i?l&1|2:l&1),Ee&&El(t,a.treeForkCount),e):(Ke(t),null);case 22:case 23:return Ut(t),io(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(l&536870912)!==0&&(t.flags&128)===0&&(Ke(t),t.subtreeFlags&6&&(t.flags|=8192)):Ke(t),l=t.updateQueue,l!==null&&Cr(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==l&&(t.flags|=2048),e!==null&&N(wa),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Rl(lt),Ke(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function i0(e,t){switch(Vs(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Rl(lt),Ye(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return nl(t),null;case 31:if(t.memoizedState!==null){if(Ut(t),t.alternate===null)throw Error(u(340));Na()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Ut(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));Na()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return N(Ie),null;case 4:return Ye(),null;case 10:return Rl(t.type),null;case 22:case 23:return Ut(t),io(),e!==null&&N(wa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Rl(lt),null;case 25:return null;default:return null}}function hf(e,t){switch(Vs(t),t.tag){case 3:Rl(lt),Ye();break;case 26:case 27:case 5:nl(t);break;case 4:Ye();break;case 31:t.memoizedState!==null&&Ut(t);break;case 13:Ut(t);break;case 19:N(Ie);break;case 10:Rl(t.type);break;case 22:case 23:Ut(t),io(),e!==null&&N(wa);break;case 24:Rl(lt)}}function pi(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var i=a.next;l=i;do{if((l.tag&e)===e){a=void 0;var r=l.create,o=l.inst;a=r(),o.destroy=a}l=l.next}while(l!==i)}}catch(c){Ue(t,t.return,c)}}function ta(e,t,l){try{var a=t.updateQueue,i=a!==null?a.lastEffect:null;if(i!==null){var r=i.next;a=r;do{if((a.tag&e)===e){var o=a.inst,c=o.destroy;if(c!==void 0){o.destroy=void 0,i=t;var m=l,j=c;try{j()}catch(O){Ue(i,m,O)}}}a=a.next}while(a!==r)}}catch(O){Ue(t,t.return,O)}}function yf(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{id(t,l)}catch(a){Ue(e,e.return,a)}}}function gf(e,t,l){l.props=La(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){Ue(e,t,a)}}function hi(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof l=="function"?e.refCleanup=l(a):l.current=a}}catch(i){Ue(e,t,i)}}function gl(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(i){Ue(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(i){Ue(e,t,i)}else l.current=null}function vf(e){var t=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break e;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(i){Ue(e,e.return,i)}}function Ho(e,t,l){try{var a=e.stateNode;E0(a,e.type,l,t),a[At]=t}catch(i){Ue(e,e.return,i)}}function bf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&oa(e.type)||e.tag===4}function Bo(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||bf(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&&oa(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 Lo(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=Cl));else if(a!==4&&(a===27&&oa(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(Lo(e,t,l),e=e.sibling;e!==null;)Lo(e,t,l),e=e.sibling}function zr(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(a!==4&&(a===27&&oa(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(zr(e,t,l),e=e.sibling;e!==null;)zr(e,t,l),e=e.sibling}function xf(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);pt(t,a,l),t[ut]=e,t[At]=l}catch(r){Ue(e,e.return,r)}}var kl=!1,it=!1,Yo=!1,Sf=typeof WeakSet=="function"?WeakSet:Set,ct=null;function r0(e,t){if(e=e.containerInfo,oc=Kr,e=Nu(e),Ds(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var i=a.anchorOffset,r=a.focusNode;a=a.focusOffset;try{l.nodeType,r.nodeType}catch{l=null;break e}var o=0,c=-1,m=-1,j=0,O=0,w=e,C=null;t:for(;;){for(var z;w!==l||i!==0&&w.nodeType!==3||(c=o+i),w!==r||a!==0&&w.nodeType!==3||(m=o+a),w.nodeType===3&&(o+=w.nodeValue.length),(z=w.firstChild)!==null;)C=w,w=z;for(;;){if(w===e)break t;if(C===l&&++j===i&&(c=o),C===r&&++O===a&&(m=o),(z=w.nextSibling)!==null)break;w=C,C=w.parentNode}w=z}l=c===-1||m===-1?null:{start:c,end:m}}else l=null}l=l||{start:0,end:0}}else l=null;for(cc={focusedElem:e,selectionRange:l},Kr=!1,ct=t;ct!==null;)if(t=ct,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ct=e;else for(;ct!==null;){switch(t=ct,r=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(l=0;l<e.length;l++)i=e[l],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&r!==null){e=void 0,l=t,i=r.memoizedProps,r=r.memoizedState,a=l.stateNode;try{var Z=La(l.type,i);e=a.getSnapshotBeforeUpdate(Z,r),a.__reactInternalSnapshotBeforeUpdate=e}catch(le){Ue(l,l.return,le)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)fc(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":fc(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(u(163))}if(e=t.sibling,e!==null){e.return=t.return,ct=e;break}ct=t.return}}function jf(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:Ul(e,l),a&4&&pi(5,l);break;case 1:if(Ul(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(o){Ue(l,l.return,o)}else{var i=La(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){Ue(l,l.return,o)}}a&64&&yf(l),a&512&&hi(l,l.return);break;case 3:if(Ul(e,l),a&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{id(e,t)}catch(o){Ue(l,l.return,o)}}break;case 27:t===null&&a&4&&xf(l);case 26:case 5:Ul(e,l),t===null&&a&4&&vf(l),a&512&&hi(l,l.return);break;case 12:Ul(e,l);break;case 31:Ul(e,l),a&4&&zf(e,l);break;case 13:Ul(e,l),a&4&&Tf(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=h0.bind(null,l),w0(e,l))));break;case 22:if(a=l.memoizedState!==null||kl,!a){t=t!==null&&t.memoizedState!==null||it,i=kl;var r=it;kl=a,(it=t)&&!r?ql(e,l,(l.subtreeFlags&8772)!==0):Ul(e,l),kl=i,it=r}break;case 30:break;default:Ul(e,l)}}function Af(e){var t=e.alternate;t!==null&&(e.alternate=null,Af(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ys(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 Ze=null,zt=!1;function wl(e,t,l){for(l=l.child;l!==null;)Cf(e,t,l),l=l.sibling}function Cf(e,t,l){if(G&&typeof G.onCommitFiberUnmount=="function")try{G.onCommitFiberUnmount(M,l)}catch{}switch(l.tag){case 26:it||gl(l,t),wl(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:it||gl(l,t);var a=Ze,i=zt;oa(l.type)&&(Ze=l.stateNode,zt=!1),wl(e,t,l),Ci(l.stateNode),Ze=a,zt=i;break;case 5:it||gl(l,t);case 6:if(a=Ze,i=zt,Ze=null,wl(e,t,l),Ze=a,zt=i,Ze!==null)if(zt)try{(Ze.nodeType===9?Ze.body:Ze.nodeName==="HTML"?Ze.ownerDocument.body:Ze).removeChild(l.stateNode)}catch(r){Ue(l,t,r)}else try{Ze.removeChild(l.stateNode)}catch(r){Ue(l,t,r)}break;case 18:Ze!==null&&(zt?(e=Ze,ym(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),Nn(e)):ym(Ze,l.stateNode));break;case 4:a=Ze,i=zt,Ze=l.stateNode.containerInfo,zt=!0,wl(e,t,l),Ze=a,zt=i;break;case 0:case 11:case 14:case 15:ta(2,l,t),it||ta(4,l,t),wl(e,t,l);break;case 1:it||(gl(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&gf(l,t,a)),wl(e,t,l);break;case 21:wl(e,t,l);break;case 22:it=(a=it)||l.memoizedState!==null,wl(e,t,l),it=a;break;default:wl(e,t,l)}}function zf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Nn(e)}catch(l){Ue(t,t.return,l)}}}function Tf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Nn(e)}catch(l){Ue(t,t.return,l)}}function s0(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Sf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Sf),t;default:throw Error(u(435,e.tag))}}function Tr(e,t){var l=s0(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var i=y0.bind(null,e,a);a.then(i,i)}})}function Tt(e,t){var l=t.deletions;if(l!==null)for(var a=0;a<l.length;a++){var i=l[a],r=e,o=t,c=o;e:for(;c!==null;){switch(c.tag){case 27:if(oa(c.type)){Ze=c.stateNode,zt=!1;break e}break;case 5:Ze=c.stateNode,zt=!1;break e;case 3:case 4:Ze=c.stateNode.containerInfo,zt=!0;break e}c=c.return}if(Ze===null)throw Error(u(160));Cf(r,o,i),Ze=null,zt=!1,r=i.alternate,r!==null&&(r.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Ef(t,e),t=t.sibling}var ul=null;function Ef(e,t){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Tt(t,e),Et(e),a&4&&(ta(3,e,e.return),pi(3,e),ta(5,e,e.return));break;case 1:Tt(t,e),Et(e),a&512&&(it||l===null||gl(l,l.return)),a&64&&kl&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?a:l.concat(a))));break;case 26:var i=ul;if(Tt(t,e),Et(e),a&512&&(it||l===null||gl(l,l.return)),a&4){var r=l!==null?l.memoizedState:null;if(a=e.memoizedState,l===null)if(a===null)if(e.stateNode===null){e:{a=e.type,l=e.memoizedProps,i=i.ownerDocument||i;t:switch(a){case"title":r=i.getElementsByTagName("title")[0],(!r||r[Gn]||r[ut]||r.namespaceURI==="http://www.w3.org/2000/svg"||r.hasAttribute("itemprop"))&&(r=i.createElement(a),i.head.insertBefore(r,i.querySelector("head > title"))),pt(r,a,l),r[ut]=e,ot(r),a=r;break e;case"link":var o=Em("link","href",i).get(a+(l.href||""));if(o){for(var c=0;c<o.length;c++)if(r=o[c],r.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&r.getAttribute("rel")===(l.rel==null?null:l.rel)&&r.getAttribute("title")===(l.title==null?null:l.title)&&r.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){o.splice(c,1);break t}}r=i.createElement(a),pt(r,a,l),i.head.appendChild(r);break;case"meta":if(o=Em("meta","content",i).get(a+(l.content||""))){for(c=0;c<o.length;c++)if(r=o[c],r.getAttribute("content")===(l.content==null?null:""+l.content)&&r.getAttribute("name")===(l.name==null?null:l.name)&&r.getAttribute("property")===(l.property==null?null:l.property)&&r.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&r.getAttribute("charset")===(l.charSet==null?null:l.charSet)){o.splice(c,1);break t}}r=i.createElement(a),pt(r,a,l),i.head.appendChild(r);break;default:throw Error(u(468,a))}r[ut]=e,ot(r),a=r}e.stateNode=a}else Mm(i,e.type,e.stateNode);else e.stateNode=Tm(i,a,e.memoizedProps);else r!==a?(r===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):r.count--,a===null?Mm(i,e.type,e.stateNode):Tm(i,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Ho(e,e.memoizedProps,l.memoizedProps)}break;case 27:Tt(t,e),Et(e),a&512&&(it||l===null||gl(l,l.return)),l!==null&&a&4&&Ho(e,e.memoizedProps,l.memoizedProps);break;case 5:if(Tt(t,e),Et(e),a&512&&(it||l===null||gl(l,l.return)),e.flags&32){i=e.stateNode;try{en(i,"")}catch(Z){Ue(e,e.return,Z)}}a&4&&e.stateNode!=null&&(i=e.memoizedProps,Ho(e,i,l!==null?l.memoizedProps:i)),a&1024&&(Yo=!0);break;case 6:if(Tt(t,e),Et(e),a&4){if(e.stateNode===null)throw Error(u(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(Z){Ue(e,e.return,Z)}}break;case 3:if(Gr=null,i=ul,ul=Lr(t.containerInfo),Tt(t,e),ul=i,Et(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{Nn(t.containerInfo)}catch(Z){Ue(e,e.return,Z)}Yo&&(Yo=!1,Mf(e));break;case 4:a=ul,ul=Lr(e.stateNode.containerInfo),Tt(t,e),Et(e),ul=a;break;case 12:Tt(t,e),Et(e);break;case 31:Tt(t,e),Et(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Tr(e,a)));break;case 13:Tt(t,e),Et(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Mr=ne()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Tr(e,a)));break;case 22:i=e.memoizedState!==null;var m=l!==null&&l.memoizedState!==null,j=kl,O=it;if(kl=j||i,it=O||m,Tt(t,e),it=O,kl=j,Et(e),a&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(l===null||m||kl||it||Ya(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){m=l=t;try{if(r=m.stateNode,i)o=r.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none";else{c=m.stateNode;var w=m.memoizedProps.style,C=w!=null&&w.hasOwnProperty("display")?w.display:null;c.style.display=C==null||typeof C=="boolean"?"":(""+C).trim()}}catch(Z){Ue(m,m.return,Z)}}}else if(t.tag===6){if(l===null){m=t;try{m.stateNode.nodeValue=i?"":m.memoizedProps}catch(Z){Ue(m,m.return,Z)}}}else if(t.tag===18){if(l===null){m=t;try{var z=m.stateNode;i?gm(z,!0):gm(m.stateNode,!1)}catch(Z){Ue(m,m.return,Z)}}}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;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(l=a.retryQueue,l!==null&&(a.retryQueue=null,Tr(e,l))));break;case 19:Tt(t,e),Et(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Tr(e,a)));break;case 30:break;case 21:break;default:Tt(t,e),Et(e)}}function Et(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(bf(a)){l=a;break}a=a.return}if(l==null)throw Error(u(160));switch(l.tag){case 27:var i=l.stateNode,r=Bo(e);zr(e,r,i);break;case 5:var o=l.stateNode;l.flags&32&&(en(o,""),l.flags&=-33);var c=Bo(e);zr(e,c,o);break;case 3:case 4:var m=l.stateNode.containerInfo,j=Bo(e);Lo(e,j,m);break;default:throw Error(u(161))}}catch(O){Ue(e,e.return,O)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Mf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Mf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ul(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)jf(e,t.alternate,t),t=t.sibling}function Ya(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:ta(4,t,t.return),Ya(t);break;case 1:gl(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&gf(t,t.return,l),Ya(t);break;case 27:Ci(t.stateNode);case 26:case 5:gl(t,t.return),Ya(t);break;case 22:t.memoizedState===null&&Ya(t);break;case 30:Ya(t);break;default:Ya(t)}e=e.sibling}}function ql(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,i=e,r=t,o=r.flags;switch(r.tag){case 0:case 11:case 15:ql(i,r,l),pi(4,r);break;case 1:if(ql(i,r,l),a=r,i=a.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(j){Ue(a,a.return,j)}if(a=r,i=a.updateQueue,i!==null){var c=a.stateNode;try{var m=i.shared.hiddenCallbacks;if(m!==null)for(i.shared.hiddenCallbacks=null,i=0;i<m.length;i++)nd(m[i],c)}catch(j){Ue(a,a.return,j)}}l&&o&64&&yf(r),hi(r,r.return);break;case 27:xf(r);case 26:case 5:ql(i,r,l),l&&a===null&&o&4&&vf(r),hi(r,r.return);break;case 12:ql(i,r,l);break;case 31:ql(i,r,l),l&&o&4&&zf(i,r);break;case 13:ql(i,r,l),l&&o&4&&Tf(i,r);break;case 22:r.memoizedState===null&&ql(i,r,l),hi(r,r.return);break;case 30:break;default:ql(i,r,l)}t=t.sibling}}function Go(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&ti(l))}function Xo(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ti(e))}function dl(e,t,l,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Rf(e,t,l,a),t=t.sibling}function Rf(e,t,l,a){var i=t.flags;switch(t.tag){case 0:case 11:case 15:dl(e,t,l,a),i&2048&&pi(9,t);break;case 1:dl(e,t,l,a);break;case 3:dl(e,t,l,a),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ti(e)));break;case 12:if(i&2048){dl(e,t,l,a),e=t.stateNode;try{var r=t.memoizedProps,o=r.id,c=r.onPostCommit;typeof c=="function"&&c(o,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(m){Ue(t,t.return,m)}}else dl(e,t,l,a);break;case 31:dl(e,t,l,a);break;case 13:dl(e,t,l,a);break;case 23:break;case 22:r=t.stateNode,o=t.alternate,t.memoizedState!==null?r._visibility&2?dl(e,t,l,a):yi(e,t):r._visibility&2?dl(e,t,l,a):(r._visibility|=2,Sn(e,t,l,a,(t.subtreeFlags&10256)!==0||!1)),i&2048&&Go(o,t);break;case 24:dl(e,t,l,a),i&2048&&Xo(t.alternate,t);break;default:dl(e,t,l,a)}}function Sn(e,t,l,a,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var r=e,o=t,c=l,m=a,j=o.flags;switch(o.tag){case 0:case 11:case 15:Sn(r,o,c,m,i),pi(8,o);break;case 23:break;case 22:var O=o.stateNode;o.memoizedState!==null?O._visibility&2?Sn(r,o,c,m,i):yi(r,o):(O._visibility|=2,Sn(r,o,c,m,i)),i&&j&2048&&Go(o.alternate,o);break;case 24:Sn(r,o,c,m,i),i&&j&2048&&Xo(o.alternate,o);break;default:Sn(r,o,c,m,i)}t=t.sibling}}function yi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,a=t,i=a.flags;switch(a.tag){case 22:yi(l,a),i&2048&&Go(a.alternate,a);break;case 24:yi(l,a),i&2048&&Xo(a.alternate,a);break;default:yi(l,a)}t=t.sibling}}var gi=8192;function jn(e,t,l){if(e.subtreeFlags&gi)for(e=e.child;e!==null;)Of(e,t,l),e=e.sibling}function Of(e,t,l){switch(e.tag){case 26:jn(e,t,l),e.flags&gi&&e.memoizedState!==null&&Z0(l,ul,e.memoizedState,e.memoizedProps);break;case 5:jn(e,t,l);break;case 3:case 4:var a=ul;ul=Lr(e.stateNode.containerInfo),jn(e,t,l),ul=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=gi,gi=16777216,jn(e,t,l),gi=a):jn(e,t,l));break;default:jn(e,t,l)}}function _f(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 vi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];ct=a,Df(a,e)}_f(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Nf(e),e=e.sibling}function Nf(e){switch(e.tag){case 0:case 11:case 15:vi(e),e.flags&2048&&ta(9,e,e.return);break;case 3:vi(e);break;case 12:vi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Er(e)):vi(e);break;default:vi(e)}}function Er(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];ct=a,Df(a,e)}_f(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ta(8,t,t.return),Er(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,Er(t));break;default:Er(t)}e=e.sibling}}function Df(e,t){for(;ct!==null;){var l=ct;switch(l.tag){case 0:case 11:case 15:ta(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var a=l.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:ti(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,ct=a;else e:for(l=e;ct!==null;){a=ct;var i=a.sibling,r=a.return;if(Af(a),a===l){ct=null;break e}if(i!==null){i.return=r,ct=i;break e}ct=r}}}var o0={getCacheForType:function(e){var t=ft(lt),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return ft(lt).controller.signal}},c0=typeof WeakMap=="function"?WeakMap:Map,_e=0,Ve=null,Se=null,Ce=0,we=0,qt=null,la=!1,An=!1,Vo=!1,Hl=0,We=0,aa=0,Ga=0,Qo=0,Ht=0,Cn=0,bi=null,Mt=null,Ko=!1,Mr=0,kf=0,Rr=1/0,Or=null,na=null,rt=0,ia=null,zn=null,Bl=0,Zo=0,Jo=null,wf=null,xi=0,Wo=null;function Bt(){return(_e&2)!==0&&Ce!==0?Ce&-Ce:E.T!==null?tc():$c()}function Uf(){if(Ht===0)if((Ce&536870912)===0||Ee){var e=gt;gt<<=1,(gt&3932160)===0&&(gt=262144),Ht=e}else Ht=536870912;return e=wt.current,e!==null&&(e.flags|=32),Ht}function Rt(e,t,l){(e===Ve&&(we===2||we===9)||e.cancelPendingCommit!==null)&&(Tn(e,0),ra(e,Ce,Ht,!1)),Ca(e,l),((_e&2)===0||e!==Ve)&&(e===Ve&&((_e&2)===0&&(Ga|=l),We===4&&ra(e,Ce,Ht,!1)),vl(e))}function qf(e,t,l){if((_e&6)!==0)throw Error(u(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||vt(e,t),i=a?f0(e,t):Io(e,t,!0),r=a;do{if(i===0){An&&!a&&ra(e,t,0,!1);break}else{if(l=e.current.alternate,r&&!u0(l)){i=Io(e,t,!1),r=!1;continue}if(i===2){if(r=t,e.errorRecoveryDisabledLanes&r)var o=0;else o=e.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){t=o;e:{var c=e;i=bi;var m=c.current.memoizedState.isDehydrated;if(m&&(Tn(c,o).flags|=256),o=Io(c,o,!1),o!==2){if(Vo&&!m){c.errorRecoveryDisabledLanes|=r,Ga|=r,i=4;break e}r=Mt,Mt=i,r!==null&&(Mt===null?Mt=r:Mt.push.apply(Mt,r))}i=o}if(r=!1,i!==2)continue}}if(i===1){Tn(e,0),ra(e,t,0,!0);break}e:{switch(a=e,r=i,r){case 0:case 1:throw Error(u(345));case 4:if((t&4194048)!==t)break;case 6:ra(a,t,Ht,!la);break e;case 2:Mt=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(i=Mr+300-ne(),10<i)){if(ra(a,t,Ht,!la),ol(a,0,!0)!==0)break e;Bl=t,a.timeoutHandle=pm(Hf.bind(null,a,l,Mt,Or,Ko,t,Ht,Ga,Cn,la,r,"Throttled",-0,0),i);break e}Hf(a,l,Mt,Or,Ko,t,Ht,Ga,Cn,la,r,null,-0,0)}}break}while(!0);vl(e)}function Hf(e,t,l,a,i,r,o,c,m,j,O,w,C,z){if(e.timeoutHandle=-1,w=t.subtreeFlags,w&8192||(w&16785408)===16785408){w={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Cl},Of(t,r,w);var Z=(r&62914560)===r?Mr-ne():(r&4194048)===r?kf-ne():0;if(Z=J0(w,Z),Z!==null){Bl=r,e.cancelPendingCommit=Z(Kf.bind(null,e,t,r,l,a,i,o,c,m,O,w,null,C,z)),ra(e,r,o,!j);return}}Kf(e,t,r,l,a,i,o,c,m)}function u0(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var i=l[a],r=i.getSnapshot;i=i.value;try{if(!Dt(r(),i))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;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 ra(e,t,l,a){t&=~Qo,t&=~Ga,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var i=t;0<i;){var r=31-de(i),o=1<<r;a[r]=-1,i&=~o}l!==0&&Bn(e,l,t)}function _r(){return(_e&6)===0?(Si(0),!1):!0}function $o(){if(Se!==null){if(we===0)var e=Se.return;else e=Se,Ml=Da=null,fo(e),yn=null,ai=0,e=Se;for(;e!==null;)hf(e.alternate,e),e=e.return;Se=null}}function Tn(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,O0(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),Bl=0,$o(),Ve=e,Se=l=Tl(e.current,null),Ce=t,we=0,qt=null,la=!1,An=vt(e,t),Vo=!1,Cn=Ht=Qo=Ga=aa=We=0,Mt=bi=null,Ko=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var i=31-de(a),r=1<<i;t|=e[i],a&=~r}return Hl=t,Fi(),l}function Bf(e,t){fe=null,E.H=di,t===hn||t===rr?(t=ed(),we=3):t===Ps?(t=ed(),we=4):we=t===Mo?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,qt=t,Se===null&&(We=1,xr(e,$t(t,e.current)))}function Lf(){var e=wt.current;return e===null?!0:(Ce&4194048)===Ce?el===null:(Ce&62914560)===Ce||(Ce&536870912)!==0?e===el:!1}function Yf(){var e=E.H;return E.H=di,e===null?di:e}function Gf(){var e=E.A;return E.A=o0,e}function Nr(){We=4,la||(Ce&4194048)!==Ce&&wt.current!==null||(An=!0),(aa&134217727)===0&&(Ga&134217727)===0||Ve===null||ra(Ve,Ce,Ht,!1)}function Io(e,t,l){var a=_e;_e|=2;var i=Yf(),r=Gf();(Ve!==e||Ce!==t)&&(Or=null,Tn(e,t)),t=!1;var o=We;e:do try{if(we!==0&&Se!==null){var c=Se,m=qt;switch(we){case 8:$o(),o=6;break e;case 3:case 2:case 9:case 6:wt.current===null&&(t=!0);var j=we;if(we=0,qt=null,En(e,c,m,j),l&&An){o=0;break e}break;default:j=we,we=0,qt=null,En(e,c,m,j)}}d0(),o=We;break}catch(O){Bf(e,O)}while(!0);return t&&e.shellSuspendCounter++,Ml=Da=null,_e=a,E.H=i,E.A=r,Se===null&&(Ve=null,Ce=0,Fi()),o}function d0(){for(;Se!==null;)Xf(Se)}function f0(e,t){var l=_e;_e|=2;var a=Yf(),i=Gf();Ve!==e||Ce!==t?(Or=null,Rr=ne()+500,Tn(e,t)):An=vt(e,t);e:do try{if(we!==0&&Se!==null){t=Se;var r=qt;t:switch(we){case 1:we=0,qt=null,En(e,t,r,1);break;case 2:case 9:if(Fu(r)){we=0,qt=null,Vf(t);break}t=function(){we!==2&&we!==9||Ve!==e||(we=7),vl(e)},r.then(t,t);break e;case 3:we=7;break e;case 4:we=5;break e;case 7:Fu(r)?(we=0,qt=null,Vf(t)):(we=0,qt=null,En(e,t,r,7));break;case 5:var o=null;switch(Se.tag){case 26:o=Se.memoizedState;case 5:case 27:var c=Se;if(o?Rm(o):c.stateNode.complete){we=0,qt=null;var m=c.sibling;if(m!==null)Se=m;else{var j=c.return;j!==null?(Se=j,Dr(j)):Se=null}break t}}we=0,qt=null,En(e,t,r,5);break;case 6:we=0,qt=null,En(e,t,r,6);break;case 8:$o(),We=6;break e;default:throw Error(u(462))}}m0();break}catch(O){Bf(e,O)}while(!0);return Ml=Da=null,E.H=a,E.A=i,_e=l,Se!==null?0:(Ve=null,Ce=0,Fi(),We)}function m0(){for(;Se!==null&&!Ka();)Xf(Se)}function Xf(e){var t=mf(e.alternate,e,Hl);e.memoizedProps=e.pendingProps,t===null?Dr(e):Se=t}function Vf(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=sf(l,t,t.pendingProps,t.type,void 0,Ce);break;case 11:t=sf(l,t,t.pendingProps,t.type.render,t.ref,Ce);break;case 5:fo(t);default:hf(l,t),t=Se=Yu(t,Hl),t=mf(l,t,Hl)}e.memoizedProps=e.pendingProps,t===null?Dr(e):Se=t}function En(e,t,l,a){Ml=Da=null,fo(t),yn=null,ai=0;var i=t.return;try{if(t0(e,i,t,l,Ce)){We=1,xr(e,$t(l,e.current)),Se=null;return}}catch(r){if(i!==null)throw Se=i,r;We=1,xr(e,$t(l,e.current)),Se=null;return}t.flags&32768?(Ee||a===1?e=!0:An||(Ce&536870912)!==0?e=!1:(la=e=!0,(a===2||a===9||a===3||a===6)&&(a=wt.current,a!==null&&a.tag===13&&(a.flags|=16384))),Qf(t,e)):Dr(t)}function Dr(e){var t=e;do{if((t.flags&32768)!==0){Qf(t,la);return}e=t.return;var l=n0(t.alternate,t,Hl);if(l!==null){Se=l;return}if(t=t.sibling,t!==null){Se=t;return}Se=t=e}while(t!==null);We===0&&(We=5)}function Qf(e,t){do{var l=i0(e.alternate,e);if(l!==null){l.flags&=32767,Se=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){Se=e;return}Se=e=l}while(e!==null);We=6,Se=null}function Kf(e,t,l,a,i,r,o,c,m){e.cancelPendingCommit=null;do kr();while(rt!==0);if((_e&6)!==0)throw Error(u(327));if(t!==null){if(t===e.current)throw Error(u(177));if(r=t.lanes|t.childLanes,r|=Hs,Hn(e,l,r,o,c,m),e===Ve&&(Se=Ve=null,Ce=0),zn=t,ia=e,Bl=l,Zo=r,Jo=i,wf=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,g0(tt,function(){return If(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=E.T,E.T=null,i=H.p,H.p=2,o=_e,_e|=4;try{r0(e,t,l)}finally{_e=o,H.p=i,E.T=a}}rt=1,Zf(),Jf(),Wf()}}function Zf(){if(rt===1){rt=0;var e=ia,t=zn,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=E.T,E.T=null;var a=H.p;H.p=2;var i=_e;_e|=4;try{Ef(t,e);var r=cc,o=Nu(e.containerInfo),c=r.focusedElem,m=r.selectionRange;if(o!==c&&c&&c.ownerDocument&&_u(c.ownerDocument.documentElement,c)){if(m!==null&&Ds(c)){var j=m.start,O=m.end;if(O===void 0&&(O=j),"selectionStart"in c)c.selectionStart=j,c.selectionEnd=Math.min(O,c.value.length);else{var w=c.ownerDocument||document,C=w&&w.defaultView||window;if(C.getSelection){var z=C.getSelection(),Z=c.textContent.length,le=Math.min(m.start,Z),Le=m.end===void 0?le:Math.min(m.end,Z);!z.extend&&le>Le&&(o=Le,Le=le,le=o);var b=Ou(c,le),g=Ou(c,Le);if(b&&g&&(z.rangeCount!==1||z.anchorNode!==b.node||z.anchorOffset!==b.offset||z.focusNode!==g.node||z.focusOffset!==g.offset)){var S=w.createRange();S.setStart(b.node,b.offset),z.removeAllRanges(),le>Le?(z.addRange(S),z.extend(g.node,g.offset)):(S.setEnd(g.node,g.offset),z.addRange(S))}}}}for(w=[],z=c;z=z.parentNode;)z.nodeType===1&&w.push({element:z,left:z.scrollLeft,top:z.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;c<w.length;c++){var D=w[c];D.element.scrollLeft=D.left,D.element.scrollTop=D.top}}Kr=!!oc,cc=oc=null}finally{_e=i,H.p=a,E.T=l}}e.current=t,rt=2}}function Jf(){if(rt===2){rt=0;var e=ia,t=zn,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=E.T,E.T=null;var a=H.p;H.p=2;var i=_e;_e|=4;try{jf(e,t.alternate,t)}finally{_e=i,H.p=a,E.T=l}}rt=3}}function Wf(){if(rt===4||rt===3){rt=0,_();var e=ia,t=zn,l=Bl,a=wf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?rt=5:(rt=0,zn=ia=null,$f(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(na=null),za(l),t=t.stateNode,G&&typeof G.onCommitFiberRoot=="function")try{G.onCommitFiberRoot(M,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=E.T,i=H.p,H.p=2,E.T=null;try{for(var r=e.onRecoverableError,o=0;o<a.length;o++){var c=a[o];r(c.value,{componentStack:c.stack})}}finally{E.T=t,H.p=i}}(Bl&3)!==0&&kr(),vl(e),i=e.pendingLanes,(l&261930)!==0&&(i&42)!==0?e===Wo?xi++:(xi=0,Wo=e):xi=0,Si(0)}}function $f(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ti(t)))}function kr(){return Zf(),Jf(),Wf(),If()}function If(){if(rt!==5)return!1;var e=ia,t=Zo;Zo=0;var l=za(Bl),a=E.T,i=H.p;try{H.p=32>l?32:l,E.T=null,l=Jo,Jo=null;var r=ia,o=Bl;if(rt=0,zn=ia=null,Bl=0,(_e&6)!==0)throw Error(u(331));var c=_e;if(_e|=4,Nf(r.current),Rf(r,r.current,o,l),_e=c,Si(0,!1),G&&typeof G.onPostCommitFiberRoot=="function")try{G.onPostCommitFiberRoot(M,r)}catch{}return!0}finally{H.p=i,E.T=a,$f(e,t)}}function Ff(e,t,l){t=$t(l,t),t=Eo(e.stateNode,t,2),e=Fl(e,t,2),e!==null&&(Ca(e,2),vl(e))}function Ue(e,t,l){if(e.tag===3)Ff(e,e,l);else for(;t!==null;){if(t.tag===3){Ff(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(na===null||!na.has(a))){e=$t(l,e),l=Fd(2),a=Fl(t,l,2),a!==null&&(Pd(l,a,t,e),Ca(a,2),vl(a));break}}t=t.return}}function Fo(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new c0;var i=new Set;a.set(t,i)}else i=a.get(t),i===void 0&&(i=new Set,a.set(t,i));i.has(l)||(Vo=!0,i.add(l),e=p0.bind(null,e,t,l),t.then(e,e))}function p0(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Ve===e&&(Ce&l)===l&&(We===4||We===3&&(Ce&62914560)===Ce&&300>ne()-Mr?(_e&2)===0&&Tn(e,0):Qo|=l,Cn===Ce&&(Cn=0)),vl(e)}function Pf(e,t){t===0&&(t=Li()),e=Oa(e,t),e!==null&&(Ca(e,t),vl(e))}function h0(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),Pf(e,l)}function y0(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,i=e.memoizedState;i!==null&&(l=i.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(u(314))}a!==null&&a.delete(t),Pf(e,l)}function g0(e,t){return Xl(e,t)}var wr=null,Mn=null,Po=!1,Ur=!1,ec=!1,sa=0;function vl(e){e!==Mn&&e.next===null&&(Mn===null?wr=Mn=e:Mn=Mn.next=e),Ur=!0,Po||(Po=!0,b0())}function Si(e,t){if(!ec&&Ur){ec=!0;do for(var l=!1,a=wr;a!==null;){if(e!==0){var i=a.pendingLanes;if(i===0)var r=0;else{var o=a.suspendedLanes,c=a.pingedLanes;r=(1<<31-de(42|e)+1)-1,r&=i&~(o&~c),r=r&201326741?r&201326741|1:r?r|2:0}r!==0&&(l=!0,am(a,r))}else r=Ce,r=ol(a,a===Ve?r:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(r&3)===0||vt(a,r)||(l=!0,am(a,r));a=a.next}while(l);ec=!1}}function v0(){em()}function em(){Ur=Po=!1;var e=0;sa!==0&&R0()&&(e=sa);for(var t=ne(),l=null,a=wr;a!==null;){var i=a.next,r=tm(a,t);r===0?(a.next=null,l===null?wr=i:l.next=i,i===null&&(Mn=l)):(l=a,(e!==0||(r&3)!==0)&&(Ur=!0)),a=i}rt!==0&&rt!==5||Si(e),sa!==0&&(sa=0)}function tm(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,i=e.expirationTimes,r=e.pendingLanes&-62914561;0<r;){var o=31-de(r),c=1<<o,m=i[o];m===-1?((c&l)===0||(c&a)!==0)&&(i[o]=ms(c,t)):m<=t&&(e.expiredLanes|=c),r&=~c}if(t=Ve,l=Ce,l=ol(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(we===2||we===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&jl(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||vt(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&jl(a),za(l)){case 2:case 8:l=Me;break;case 32:l=tt;break;case 268435456:l=ja;break;default:l=tt}return a=lm.bind(null,e),l=Xl(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&jl(a),e.callbackPriority=2,e.callbackNode=null,2}function lm(e,t){if(rt!==0&&rt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(kr()&&e.callbackNode!==l)return null;var a=Ce;return a=ol(e,e===Ve?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(qf(e,a,t),tm(e,ne()),e.callbackNode!=null&&e.callbackNode===l?lm.bind(null,e):null)}function am(e,t){if(kr())return null;qf(e,t,!0)}function b0(){_0(function(){(_e&6)!==0?Xl(Ge,v0):em()})}function tc(){if(sa===0){var e=mn;e===0&&(e=Aa,Aa<<=1,(Aa&261888)===0&&(Aa=256)),sa=e}return sa}function nm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Vi(""+e)}function im(e,t){var l=t.ownerDocument.createElement("input");return l.name=t.name,l.value=t.value,e.id&&l.setAttribute("form",e.id),t.parentNode.insertBefore(l,t),e=new FormData(e),l.parentNode.removeChild(l),e}function x0(e,t,l,a,i){if(t==="submit"&&l&&l.stateNode===i){var r=nm((i[At]||null).action),o=a.submitter;o&&(t=(t=o[At]||null)?nm(t.formAction):o.getAttribute("formAction"),t!==null&&(r=t,o=null));var c=new Ji("action","action",null,a,i);e.push({event:c,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(sa!==0){var m=o?im(i,o):new FormData(i);So(l,{pending:!0,data:m,method:i.method,action:r},null,m)}}else typeof r=="function"&&(c.preventDefault(),m=o?im(i,o):new FormData(i),So(l,{pending:!0,data:m,method:i.method,action:r},r,m))},currentTarget:i}]})}}for(var lc=0;lc<qs.length;lc++){var ac=qs[lc],S0=ac.toLowerCase(),j0=ac[0].toUpperCase()+ac.slice(1);cl(S0,"on"+j0)}cl(wu,"onAnimationEnd"),cl(Uu,"onAnimationIteration"),cl(qu,"onAnimationStart"),cl("dblclick","onDoubleClick"),cl("focusin","onFocus"),cl("focusout","onBlur"),cl(Hh,"onTransitionRun"),cl(Bh,"onTransitionStart"),cl(Lh,"onTransitionCancel"),cl(Hu,"onTransitionEnd"),Fa("onMouseEnter",["mouseout","mouseover"]),Fa("onMouseLeave",["mouseout","mouseover"]),Fa("onPointerEnter",["pointerout","pointerover"]),Fa("onPointerLeave",["pointerout","pointerover"]),Ta("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ta("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ta("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ta("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ta("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ta("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ji="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(" "),A0=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ji));function rm(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],i=a.event;a=a.listeners;e:{var r=void 0;if(t)for(var o=a.length-1;0<=o;o--){var c=a[o],m=c.instance,j=c.currentTarget;if(c=c.listener,m!==r&&i.isPropagationStopped())break e;r=c,i.currentTarget=j;try{r(i)}catch(O){Ii(O)}i.currentTarget=null,r=m}else for(o=0;o<a.length;o++){if(c=a[o],m=c.instance,j=c.currentTarget,c=c.listener,m!==r&&i.isPropagationStopped())break e;r=c,i.currentTarget=j;try{r(i)}catch(O){Ii(O)}i.currentTarget=null,r=m}}}}function je(e,t){var l=t[hs];l===void 0&&(l=t[hs]=new Set);var a=e+"__bubble";l.has(a)||(sm(t,e,2,!1),l.add(a))}function nc(e,t,l){var a=0;t&&(a|=4),sm(l,e,a,t)}var qr="_reactListening"+Math.random().toString(36).slice(2);function ic(e){if(!e[qr]){e[qr]=!0,Pc.forEach(function(l){l!=="selectionchange"&&(A0.has(l)||nc(l,!1,e),nc(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[qr]||(t[qr]=!0,nc("selectionchange",!1,t))}}function sm(e,t,l,a){switch(Um(t)){case 2:var i=I0;break;case 8:i=F0;break;default:i=xc}l=i.bind(null,t,l,e),i=void 0,!Cs||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),a?i!==void 0?e.addEventListener(t,l,{capture:!0,passive:i}):e.addEventListener(t,l,!0):i!==void 0?e.addEventListener(t,l,{passive:i}):e.addEventListener(t,l,!1)}function rc(e,t,l,a,i){var r=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var o=a.tag;if(o===3||o===4){var c=a.stateNode.containerInfo;if(c===i)break;if(o===4)for(o=a.return;o!==null;){var m=o.tag;if((m===3||m===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;c!==null;){if(o=Wa(c),o===null)return;if(m=o.tag,m===5||m===6||m===26||m===27){a=r=o;continue e}c=c.parentNode}}a=a.return}du(function(){var j=r,O=js(l),w=[];e:{var C=Bu.get(e);if(C!==void 0){var z=Ji,Z=e;switch(e){case"keypress":if(Ki(l)===0)break e;case"keydown":case"keyup":z=yh;break;case"focusin":Z="focus",z=Ms;break;case"focusout":Z="blur",z=Ms;break;case"beforeblur":case"afterblur":z=Ms;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":z=pu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":z=nh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":z=bh;break;case wu:case Uu:case qu:z=sh;break;case Hu:z=Sh;break;case"scroll":case"scrollend":z=lh;break;case"wheel":z=Ah;break;case"copy":case"cut":case"paste":z=ch;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":z=yu;break;case"toggle":case"beforetoggle":z=zh}var le=(t&4)!==0,Le=!le&&(e==="scroll"||e==="scrollend"),b=le?C!==null?C+"Capture":null:C;le=[];for(var g=j,S;g!==null;){var D=g;if(S=D.stateNode,D=D.tag,D!==5&&D!==26&&D!==27||S===null||b===null||(D=Vn(g,b),D!=null&&le.push(Ai(g,D,S))),Le)break;g=g.return}0<le.length&&(C=new z(C,Z,null,l,O),w.push({event:C,listeners:le}))}}if((t&7)===0){e:{if(C=e==="mouseover"||e==="pointerover",z=e==="mouseout"||e==="pointerout",C&&l!==Ss&&(Z=l.relatedTarget||l.fromElement)&&(Wa(Z)||Z[Ja]))break e;if((z||C)&&(C=O.window===O?O:(C=O.ownerDocument)?C.defaultView||C.parentWindow:window,z?(Z=l.relatedTarget||l.toElement,z=j,Z=Z?Wa(Z):null,Z!==null&&(Le=y(Z),le=Z.tag,Z!==Le||le!==5&&le!==27&&le!==6)&&(Z=null)):(z=null,Z=j),z!==Z)){if(le=pu,D="onMouseLeave",b="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(le=yu,D="onPointerLeave",b="onPointerEnter",g="pointer"),Le=z==null?C:Xn(z),S=Z==null?C:Xn(Z),C=new le(D,g+"leave",z,l,O),C.target=Le,C.relatedTarget=S,D=null,Wa(O)===j&&(le=new le(b,g+"enter",Z,l,O),le.target=S,le.relatedTarget=Le,D=le),Le=D,z&&Z)t:{for(le=C0,b=z,g=Z,S=0,D=b;D;D=le(D))S++;D=0;for(var P=g;P;P=le(P))D++;for(;0<S-D;)b=le(b),S--;for(;0<D-S;)g=le(g),D--;for(;S--;){if(b===g||g!==null&&b===g.alternate){le=b;break t}b=le(b),g=le(g)}le=null}else le=null;z!==null&&om(w,C,z,le,!1),Z!==null&&Le!==null&&om(w,Le,Z,le,!0)}}e:{if(C=j?Xn(j):window,z=C.nodeName&&C.nodeName.toLowerCase(),z==="select"||z==="input"&&C.type==="file")var Re=Cu;else if(ju(C))if(zu)Re=wh;else{Re=Dh;var W=Nh}else z=C.nodeName,!z||z.toLowerCase()!=="input"||C.type!=="checkbox"&&C.type!=="radio"?j&&xs(j.elementType)&&(Re=Cu):Re=kh;if(Re&&(Re=Re(e,j))){Au(w,Re,l,O);break e}W&&W(e,C,j),e==="focusout"&&j&&C.type==="number"&&j.memoizedProps.value!=null&&bs(C,"number",C.value)}switch(W=j?Xn(j):window,e){case"focusin":(ju(W)||W.contentEditable==="true")&&(nn=W,ks=j,Fn=null);break;case"focusout":Fn=ks=nn=null;break;case"mousedown":ws=!0;break;case"contextmenu":case"mouseup":case"dragend":ws=!1,Du(w,l,O);break;case"selectionchange":if(qh)break;case"keydown":case"keyup":Du(w,l,O)}var pe;if(Os)e:{switch(e){case"compositionstart":var ze="onCompositionStart";break e;case"compositionend":ze="onCompositionEnd";break e;case"compositionupdate":ze="onCompositionUpdate";break e}ze=void 0}else an?xu(e,l)&&(ze="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(ze="onCompositionStart");ze&&(gu&&l.locale!=="ko"&&(an||ze!=="onCompositionStart"?ze==="onCompositionEnd"&&an&&(pe=fu()):(Ql=O,zs="value"in Ql?Ql.value:Ql.textContent,an=!0)),W=Hr(j,ze),0<W.length&&(ze=new hu(ze,e,null,l,O),w.push({event:ze,listeners:W}),pe?ze.data=pe:(pe=Su(l),pe!==null&&(ze.data=pe)))),(pe=Eh?Mh(e,l):Rh(e,l))&&(ze=Hr(j,"onBeforeInput"),0<ze.length&&(W=new hu("onBeforeInput","beforeinput",null,l,O),w.push({event:W,listeners:ze}),W.data=pe)),x0(w,e,j,l,O)}rm(w,t)})}function Ai(e,t,l){return{instance:e,listener:t,currentTarget:l}}function Hr(e,t){for(var l=t+"Capture",a=[];e!==null;){var i=e,r=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||r===null||(i=Vn(e,l),i!=null&&a.unshift(Ai(e,i,r)),i=Vn(e,t),i!=null&&a.push(Ai(e,i,r))),e.tag===3)return a;e=e.return}return[]}function C0(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function om(e,t,l,a,i){for(var r=t._reactName,o=[];l!==null&&l!==a;){var c=l,m=c.alternate,j=c.stateNode;if(c=c.tag,m!==null&&m===a)break;c!==5&&c!==26&&c!==27||j===null||(m=j,i?(j=Vn(l,r),j!=null&&o.unshift(Ai(l,j,m))):i||(j=Vn(l,r),j!=null&&o.push(Ai(l,j,m)))),l=l.return}o.length!==0&&e.push({event:t,listeners:o})}var z0=/\r\n?/g,T0=/\u0000|\uFFFD/g;function cm(e){return(typeof e=="string"?e:""+e).replace(z0,`
|
|
49
|
+
`).replace(T0,"")}function um(e,t){return t=cm(t),cm(e)===t}function Be(e,t,l,a,i,r){switch(l){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||en(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&en(e,""+a);break;case"className":Gi(e,"class",a);break;case"tabIndex":Gi(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Gi(e,l,a);break;case"style":cu(e,a,r);break;case"data":if(t!=="object"){Gi(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=Vi(""+a),e.setAttribute(l,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(l,"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 r=="function"&&(l==="formAction"?(t!=="input"&&Be(e,t,"name",i.name,i,null),Be(e,t,"formEncType",i.formEncType,i,null),Be(e,t,"formMethod",i.formMethod,i,null),Be(e,t,"formTarget",i.formTarget,i,null)):(Be(e,t,"encType",i.encType,i,null),Be(e,t,"method",i.method,i,null),Be(e,t,"target",i.target,i,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=Vi(""+a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=Cl);break;case"onScroll":a!=null&&je("scroll",e);break;case"onScrollEnd":a!=null&&je("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(u(61));if(l=a.__html,l!=null){if(i.children!=null)throw Error(u(60));e.innerHTML=l}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}l=Vi(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""+a):e.removeAttribute(l);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":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":a===!0?e.setAttribute(l,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,a):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(l,a):e.removeAttribute(l);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(l):e.setAttribute(l,a);break;case"popover":je("beforetoggle",e),je("toggle",e),Yi(e,"popover",a);break;case"xlinkActuate":Al(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Al(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Al(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Al(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Al(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Al(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Al(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Al(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Al(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Yi(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=eh.get(l)||l,Yi(e,l,a))}}function sc(e,t,l,a,i,r){switch(l){case"style":cu(e,a,r);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(u(61));if(l=a.__html,l!=null){if(i.children!=null)throw Error(u(60));e.innerHTML=l}}break;case"children":typeof a=="string"?en(e,a):(typeof a=="number"||typeof a=="bigint")&&en(e,""+a);break;case"onScroll":a!=null&&je("scroll",e);break;case"onScrollEnd":a!=null&&je("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Cl);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!eu.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(i=l.endsWith("Capture"),t=l.slice(2,i?l.length-7:void 0),r=e[At]||null,r=r!=null?r[l]:null,typeof r=="function"&&e.removeEventListener(t,r,i),typeof a=="function")){typeof r!="function"&&r!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,a,i);break e}l in e?e[l]=a:a===!0?e.setAttribute(l,""):Yi(e,l,a)}}}function pt(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":je("error",e),je("load",e);var a=!1,i=!1,r;for(r in l)if(l.hasOwnProperty(r)){var o=l[r];if(o!=null)switch(r){case"src":a=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Be(e,t,r,o,l,null)}}i&&Be(e,t,"srcSet",l.srcSet,l,null),a&&Be(e,t,"src",l.src,l,null);return;case"input":je("invalid",e);var c=r=o=i=null,m=null,j=null;for(a in l)if(l.hasOwnProperty(a)){var O=l[a];if(O!=null)switch(a){case"name":i=O;break;case"type":o=O;break;case"checked":m=O;break;case"defaultChecked":j=O;break;case"value":r=O;break;case"defaultValue":c=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(u(137,t));break;default:Be(e,t,a,O,l,null)}}iu(e,r,c,m,j,o,i,!1);return;case"select":je("invalid",e),a=o=r=null;for(i in l)if(l.hasOwnProperty(i)&&(c=l[i],c!=null))switch(i){case"value":r=c;break;case"defaultValue":o=c;break;case"multiple":a=c;default:Be(e,t,i,c,l,null)}t=r,l=o,e.multiple=!!a,t!=null?Pa(e,!!a,t,!1):l!=null&&Pa(e,!!a,l,!0);return;case"textarea":je("invalid",e),r=i=a=null;for(o in l)if(l.hasOwnProperty(o)&&(c=l[o],c!=null))switch(o){case"value":a=c;break;case"defaultValue":i=c;break;case"children":r=c;break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(u(91));break;default:Be(e,t,o,c,l,null)}su(e,a,i,r);return;case"option":for(m in l)if(l.hasOwnProperty(m)&&(a=l[m],a!=null))switch(m){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:Be(e,t,m,a,l,null)}return;case"dialog":je("beforetoggle",e),je("toggle",e),je("cancel",e),je("close",e);break;case"iframe":case"object":je("load",e);break;case"video":case"audio":for(a=0;a<ji.length;a++)je(ji[a],e);break;case"image":je("error",e),je("load",e);break;case"details":je("toggle",e);break;case"embed":case"source":case"link":je("error",e),je("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(j in l)if(l.hasOwnProperty(j)&&(a=l[j],a!=null))switch(j){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Be(e,t,j,a,l,null)}return;default:if(xs(t)){for(O in l)l.hasOwnProperty(O)&&(a=l[O],a!==void 0&&sc(e,t,O,a,l,void 0));return}}for(c in l)l.hasOwnProperty(c)&&(a=l[c],a!=null&&Be(e,t,c,a,l,null))}function E0(e,t,l,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,r=null,o=null,c=null,m=null,j=null,O=null;for(z in l){var w=l[z];if(l.hasOwnProperty(z)&&w!=null)switch(z){case"checked":break;case"value":break;case"defaultValue":m=w;default:a.hasOwnProperty(z)||Be(e,t,z,null,a,w)}}for(var C in a){var z=a[C];if(w=l[C],a.hasOwnProperty(C)&&(z!=null||w!=null))switch(C){case"type":r=z;break;case"name":i=z;break;case"checked":j=z;break;case"defaultChecked":O=z;break;case"value":o=z;break;case"defaultValue":c=z;break;case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(u(137,t));break;default:z!==w&&Be(e,t,C,z,a,w)}}vs(e,o,c,m,j,O,r,i);return;case"select":z=o=c=C=null;for(r in l)if(m=l[r],l.hasOwnProperty(r)&&m!=null)switch(r){case"value":break;case"multiple":z=m;default:a.hasOwnProperty(r)||Be(e,t,r,null,a,m)}for(i in a)if(r=a[i],m=l[i],a.hasOwnProperty(i)&&(r!=null||m!=null))switch(i){case"value":C=r;break;case"defaultValue":c=r;break;case"multiple":o=r;default:r!==m&&Be(e,t,i,r,a,m)}t=c,l=o,a=z,C!=null?Pa(e,!!l,C,!1):!!a!=!!l&&(t!=null?Pa(e,!!l,t,!0):Pa(e,!!l,l?[]:"",!1));return;case"textarea":z=C=null;for(c in l)if(i=l[c],l.hasOwnProperty(c)&&i!=null&&!a.hasOwnProperty(c))switch(c){case"value":break;case"children":break;default:Be(e,t,c,null,a,i)}for(o in a)if(i=a[o],r=l[o],a.hasOwnProperty(o)&&(i!=null||r!=null))switch(o){case"value":C=i;break;case"defaultValue":z=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(u(91));break;default:i!==r&&Be(e,t,o,i,a,r)}ru(e,C,z);return;case"option":for(var Z in l)if(C=l[Z],l.hasOwnProperty(Z)&&C!=null&&!a.hasOwnProperty(Z))switch(Z){case"selected":e.selected=!1;break;default:Be(e,t,Z,null,a,C)}for(m in a)if(C=a[m],z=l[m],a.hasOwnProperty(m)&&C!==z&&(C!=null||z!=null))switch(m){case"selected":e.selected=C&&typeof C!="function"&&typeof C!="symbol";break;default:Be(e,t,m,C,a,z)}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 le in l)C=l[le],l.hasOwnProperty(le)&&C!=null&&!a.hasOwnProperty(le)&&Be(e,t,le,null,a,C);for(j in a)if(C=a[j],z=l[j],a.hasOwnProperty(j)&&C!==z&&(C!=null||z!=null))switch(j){case"children":case"dangerouslySetInnerHTML":if(C!=null)throw Error(u(137,t));break;default:Be(e,t,j,C,a,z)}return;default:if(xs(t)){for(var Le in l)C=l[Le],l.hasOwnProperty(Le)&&C!==void 0&&!a.hasOwnProperty(Le)&&sc(e,t,Le,void 0,a,C);for(O in a)C=a[O],z=l[O],!a.hasOwnProperty(O)||C===z||C===void 0&&z===void 0||sc(e,t,O,C,a,z);return}}for(var b in l)C=l[b],l.hasOwnProperty(b)&&C!=null&&!a.hasOwnProperty(b)&&Be(e,t,b,null,a,C);for(w in a)C=a[w],z=l[w],!a.hasOwnProperty(w)||C===z||C==null&&z==null||Be(e,t,w,C,a,z)}function dm(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function M0(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var i=l[a],r=i.transferSize,o=i.initiatorType,c=i.duration;if(r&&c&&dm(o)){for(o=0,c=i.responseEnd,a+=1;a<l.length;a++){var m=l[a],j=m.startTime;if(j>c)break;var O=m.transferSize,w=m.initiatorType;O&&dm(w)&&(m=m.responseEnd,o+=O*(m<c?1:(c-j)/(m-j)))}if(--a,t+=8*(r+o)/(i.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 oc=null,cc=null;function Br(e){return e.nodeType===9?e:e.ownerDocument}function fm(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 mm(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 uc(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 dc=null;function R0(){var e=window.event;return e&&e.type==="popstate"?e===dc?!1:(dc=e,!0):(dc=null,!1)}var pm=typeof setTimeout=="function"?setTimeout:void 0,O0=typeof clearTimeout=="function"?clearTimeout:void 0,hm=typeof Promise=="function"?Promise:void 0,_0=typeof queueMicrotask=="function"?queueMicrotask:typeof hm<"u"?function(e){return hm.resolve(null).then(e).catch(N0)}:pm;function N0(e){setTimeout(function(){throw e})}function oa(e){return e==="head"}function ym(e,t){var l=t,a=0;do{var i=l.nextSibling;if(e.removeChild(l),i&&i.nodeType===8)if(l=i.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(i),Nn(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")Ci(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Ci(l);for(var r=l.firstChild;r;){var o=r.nextSibling,c=r.nodeName;r[Gn]||c==="SCRIPT"||c==="STYLE"||c==="LINK"&&r.rel.toLowerCase()==="stylesheet"||l.removeChild(r),r=o}}else l==="body"&&Ci(e.ownerDocument.body);l=i}while(l);Nn(t)}function gm(e,t){var l=e;e=0;do{var a=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),a&&a.nodeType===8)if(l=a.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=a}while(l)}function fc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":fc(l),ys(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function D0(e,t,l,a){for(;e.nodeType===1;){var i=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Gn])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(r=e.getAttribute("rel"),r==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(r!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(r=e.getAttribute("src"),(r!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&r&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var r=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===r)return e}else return e;if(e=tl(e.nextSibling),e===null)break}return null}function k0(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=tl(e.nextSibling),e===null))return null;return e}function vm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=tl(e.nextSibling),e===null))return null;return e}function mc(e){return e.data==="$?"||e.data==="$~"}function pc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function w0(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var a=function(){t(),l.removeEventListener("DOMContentLoaded",a)};l.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function tl(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 hc=null;function bm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return tl(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function xm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function Sm(e,t,l){switch(t=Br(l),e){case"html":if(e=t.documentElement,!e)throw Error(u(452));return e;case"head":if(e=t.head,!e)throw Error(u(453));return e;case"body":if(e=t.body,!e)throw Error(u(454));return e;default:throw Error(u(451))}}function Ci(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ys(e)}var ll=new Map,jm=new Set;function Lr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ll=H.d;H.d={f:U0,r:q0,D:H0,C:B0,L:L0,m:Y0,X:X0,S:G0,M:V0};function U0(){var e=Ll.f(),t=_r();return e||t}function q0(e){var t=$a(e);t!==null&&t.tag===5&&t.type==="form"?Hd(t):Ll.r(e)}var Rn=typeof document>"u"?null:document;function Am(e,t,l){var a=Rn;if(a&&typeof t=="string"&&t){var i=Jt(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof l=="string"&&(i+='[crossorigin="'+l+'"]'),jm.has(i)||(jm.add(i),e={rel:e,crossOrigin:l,href:t},a.querySelector(i)===null&&(t=a.createElement("link"),pt(t,"link",e),ot(t),a.head.appendChild(t)))}}function H0(e){Ll.D(e),Am("dns-prefetch",e,null)}function B0(e,t){Ll.C(e,t),Am("preconnect",e,t)}function L0(e,t,l){Ll.L(e,t,l);var a=Rn;if(a&&e&&t){var i='link[rel="preload"][as="'+Jt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(i+='[imagesrcset="'+Jt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(i+='[imagesizes="'+Jt(l.imageSizes)+'"]')):i+='[href="'+Jt(e)+'"]';var r=i;switch(t){case"style":r=On(e);break;case"script":r=_n(e)}ll.has(r)||(e=k({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),ll.set(r,e),a.querySelector(i)!==null||t==="style"&&a.querySelector(zi(r))||t==="script"&&a.querySelector(Ti(r))||(t=a.createElement("link"),pt(t,"link",e),ot(t),a.head.appendChild(t)))}}function Y0(e,t){Ll.m(e,t);var l=Rn;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+Jt(a)+'"][href="'+Jt(e)+'"]',r=i;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":r=_n(e)}if(!ll.has(r)&&(e=k({rel:"modulepreload",href:e},t),ll.set(r,e),l.querySelector(i)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Ti(r)))return}a=l.createElement("link"),pt(a,"link",e),ot(a),l.head.appendChild(a)}}}function G0(e,t,l){Ll.S(e,t,l);var a=Rn;if(a&&e){var i=Ia(a).hoistableStyles,r=On(e);t=t||"default";var o=i.get(r);if(!o){var c={loading:0,preload:null};if(o=a.querySelector(zi(r)))c.loading=5;else{e=k({rel:"stylesheet",href:e,"data-precedence":t},l),(l=ll.get(r))&&yc(e,l);var m=o=a.createElement("link");ot(m),pt(m,"link",e),m._p=new Promise(function(j,O){m.onload=j,m.onerror=O}),m.addEventListener("load",function(){c.loading|=1}),m.addEventListener("error",function(){c.loading|=2}),c.loading|=4,Yr(o,t,a)}o={type:"stylesheet",instance:o,count:1,state:c},i.set(r,o)}}}function X0(e,t){Ll.X(e,t);var l=Rn;if(l&&e){var a=Ia(l).hoistableScripts,i=_n(e),r=a.get(i);r||(r=l.querySelector(Ti(i)),r||(e=k({src:e,async:!0},t),(t=ll.get(i))&&gc(e,t),r=l.createElement("script"),ot(r),pt(r,"link",e),l.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},a.set(i,r))}}function V0(e,t){Ll.M(e,t);var l=Rn;if(l&&e){var a=Ia(l).hoistableScripts,i=_n(e),r=a.get(i);r||(r=l.querySelector(Ti(i)),r||(e=k({src:e,async:!0,type:"module"},t),(t=ll.get(i))&&gc(e,t),r=l.createElement("script"),ot(r),pt(r,"link",e),l.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},a.set(i,r))}}function Cm(e,t,l,a){var i=(i=te.current)?Lr(i):null;if(!i)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=On(l.href),l=Ia(i).hoistableStyles,a=l.get(t),a||(a={type:"style",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=On(l.href);var r=Ia(i).hoistableStyles,o=r.get(e);if(o||(i=i.ownerDocument||i,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},r.set(e,o),(r=i.querySelector(zi(e)))&&!r._p&&(o.instance=r,o.state.loading=5),ll.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},ll.set(e,l),r||Q0(i,e,l,o.state))),t&&a===null)throw Error(u(528,""));return o}if(t&&a!==null)throw Error(u(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=_n(l),l=Ia(i).hoistableScripts,a=l.get(t),a||(a={type:"script",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function On(e){return'href="'+Jt(e)+'"'}function zi(e){return'link[rel="stylesheet"]['+e+"]"}function zm(e){return k({},e,{"data-precedence":e.precedence,precedence:null})}function Q0(e,t,l,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),pt(t,"link",l),ot(t),e.head.appendChild(t))}function _n(e){return'[src="'+Jt(e)+'"]'}function Ti(e){return"script[async]"+e}function Tm(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Jt(l.href)+'"]');if(a)return t.instance=a,ot(a),a;var i=k({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),ot(a),pt(a,"style",i),Yr(a,l.precedence,e),t.instance=a;case"stylesheet":i=On(l.href);var r=e.querySelector(zi(i));if(r)return t.state.loading|=4,t.instance=r,ot(r),r;a=zm(l),(i=ll.get(i))&&yc(a,i),r=(e.ownerDocument||e).createElement("link"),ot(r);var o=r;return o._p=new Promise(function(c,m){o.onload=c,o.onerror=m}),pt(r,"link",a),t.state.loading|=4,Yr(r,l.precedence,e),t.instance=r;case"script":return r=_n(l.src),(i=e.querySelector(Ti(r)))?(t.instance=i,ot(i),i):(a=l,(i=ll.get(r))&&(a=k({},l),gc(a,i)),e=e.ownerDocument||e,i=e.createElement("script"),ot(i),pt(i,"link",a),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Yr(a,l.precedence,e));return t.instance}function Yr(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=a.length?a[a.length-1]:null,r=i,o=0;o<a.length;o++){var c=a[o];if(c.dataset.precedence===t)r=c;else if(r!==i)break}r?r.parentNode.insertBefore(e,r.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function yc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function gc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Gr=null;function Em(e,t,l){if(Gr===null){var a=new Map,i=Gr=new Map;i.set(l,a)}else i=Gr,a=i.get(l),a||(a=new Map,i.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),i=0;i<l.length;i++){var r=l[i];if(!(r[Gn]||r[ut]||e==="link"&&r.getAttribute("rel")==="stylesheet")&&r.namespaceURI!=="http://www.w3.org/2000/svg"){var o=r.getAttribute(t)||"";o=e+o;var c=a.get(o);c?c.push(r):a.set(o,[r])}}return a}function Mm(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function K0(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Rm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Z0(e,t,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var i=On(a.href),r=t.querySelector(zi(i));if(r){t=r._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Xr.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=r,ot(r);return}r=t.ownerDocument||t,a=zm(a),(i=ll.get(i))&&yc(a,i),r=r.createElement("link"),ot(r);var o=r;o._p=new Promise(function(c,m){o.onload=c,o.onerror=m}),pt(r,"link",a),l.instance=r}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=Xr.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var vc=0;function J0(e,t){return e.stylesheets&&e.count===0&&Qr(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&Qr(e,e.stylesheets),e.unsuspend){var r=e.unsuspend;e.unsuspend=null,r()}},6e4+t);0<e.imgBytes&&vc===0&&(vc=62500*M0());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Qr(e,e.stylesheets),e.unsuspend)){var r=e.unsuspend;e.unsuspend=null,r()}},(e.imgBytes>vc?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(i)}}:null}function Xr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Qr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Vr=null;function Qr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Vr=new Map,t.forEach(W0,e),Vr=null,Xr.call(e))}function W0(e,t){if(!(t.state.loading&4)){var l=Vr.get(e);if(l)var a=l.get(null);else{l=new Map,Vr.set(e,l);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),r=0;r<i.length;r++){var o=i[r];(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")&&(l.set(o.dataset.precedence,o),a=o)}a&&l.set(null,a)}i=t.instance,o=i.getAttribute("data-precedence"),r=l.get(o)||a,r===a&&l.set(null,i),l.set(o,i),this.count++,a=Xr.bind(this),i.addEventListener("load",a),i.addEventListener("error",a),r?r.parentNode.insertBefore(i,r.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Ei={$$typeof:$,Provider:null,Consumer:null,_currentValue:K,_currentValue2:K,_threadCount:0};function $0(e,t,l,a,i,r,o,c,m){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=Za(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Za(0),this.hiddenUpdates=Za(null),this.identifierPrefix=a,this.onUncaughtError=i,this.onCaughtError=r,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=m,this.incompleteTransitions=new Map}function Om(e,t,l,a,i,r,o,c,m,j,O,w){return e=new $0(e,t,l,o,m,j,O,w,c),t=1,r===!0&&(t|=24),r=kt(3,null,null,t),e.current=r,r.stateNode=e,t=$s(),t.refCount++,e.pooledCache=t,t.refCount++,r.memoizedState={element:a,isDehydrated:l,cache:t},eo(r),e}function _m(e){return e?(e=on,e):on}function Nm(e,t,l,a,i,r){i=_m(i),a.context===null?a.context=i:a.pendingContext=i,a=Il(t),a.payload={element:l},r=r===void 0?null:r,r!==null&&(a.callback=r),l=Fl(e,a,t),l!==null&&(Rt(l,e,t),ii(l,e,t))}function Dm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function bc(e,t){Dm(e,t),(e=e.alternate)&&Dm(e,t)}function km(e){if(e.tag===13||e.tag===31){var t=Oa(e,67108864);t!==null&&Rt(t,e,67108864),bc(e,67108864)}}function wm(e){if(e.tag===13||e.tag===31){var t=Bt();t=Yn(t);var l=Oa(e,t);l!==null&&Rt(l,e,t),bc(e,t)}}var Kr=!0;function I0(e,t,l,a){var i=E.T;E.T=null;var r=H.p;try{H.p=2,xc(e,t,l,a)}finally{H.p=r,E.T=i}}function F0(e,t,l,a){var i=E.T;E.T=null;var r=H.p;try{H.p=8,xc(e,t,l,a)}finally{H.p=r,E.T=i}}function xc(e,t,l,a){if(Kr){var i=Sc(a);if(i===null)rc(e,t,a,Zr,l),qm(e,a);else if(ey(i,e,t,l,a))a.stopPropagation();else if(qm(e,a),t&4&&-1<P0.indexOf(e)){for(;i!==null;){var r=$a(i);if(r!==null)switch(r.tag){case 3:if(r=r.stateNode,r.current.memoizedState.isDehydrated){var o=Ne(r.pendingLanes);if(o!==0){var c=r;for(c.pendingLanes|=2,c.entangledLanes|=2;o;){var m=1<<31-de(o);c.entanglements[1]|=m,o&=~m}vl(r),(_e&6)===0&&(Rr=ne()+500,Si(0))}}break;case 31:case 13:c=Oa(r,2),c!==null&&Rt(c,r,2),_r(),bc(r,2)}if(r=Sc(a),r===null&&rc(e,t,a,Zr,l),r===i)break;i=r}i!==null&&a.stopPropagation()}else rc(e,t,a,null,l)}}function Sc(e){return e=js(e),jc(e)}var Zr=null;function jc(e){if(Zr=null,e=Wa(e),e!==null){var t=y(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=R(t),e!==null)return e;e=null}else if(l===31){if(e=q(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Zr=e,null}function Um(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(ge()){case Ge:return 2;case Me:return 8;case tt:case sl:return 32;case ja:return 268435456;default:return 32}default:return 32}}var Ac=!1,ca=null,ua=null,da=null,Mi=new Map,Ri=new Map,fa=[],P0="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 qm(e,t){switch(e){case"focusin":case"focusout":ca=null;break;case"dragenter":case"dragleave":ua=null;break;case"mouseover":case"mouseout":da=null;break;case"pointerover":case"pointerout":Mi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ri.delete(t.pointerId)}}function Oi(e,t,l,a,i,r){return e===null||e.nativeEvent!==r?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:r,targetContainers:[i]},t!==null&&(t=$a(t),t!==null&&km(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function ey(e,t,l,a,i){switch(t){case"focusin":return ca=Oi(ca,e,t,l,a,i),!0;case"dragenter":return ua=Oi(ua,e,t,l,a,i),!0;case"mouseover":return da=Oi(da,e,t,l,a,i),!0;case"pointerover":var r=i.pointerId;return Mi.set(r,Oi(Mi.get(r)||null,e,t,l,a,i)),!0;case"gotpointercapture":return r=i.pointerId,Ri.set(r,Oi(Ri.get(r)||null,e,t,l,a,i)),!0}return!1}function Hm(e){var t=Wa(e.target);if(t!==null){var l=y(t);if(l!==null){if(t=l.tag,t===13){if(t=R(l),t!==null){e.blockedOn=t,Ic(e.priority,function(){wm(l)});return}}else if(t===31){if(t=q(l),t!==null){e.blockedOn=t,Ic(e.priority,function(){wm(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Jr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Sc(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);Ss=a,l.target.dispatchEvent(a),Ss=null}else return t=$a(l),t!==null&&km(t),e.blockedOn=l,!1;t.shift()}return!0}function Bm(e,t,l){Jr(e)&&l.delete(t)}function ty(){Ac=!1,ca!==null&&Jr(ca)&&(ca=null),ua!==null&&Jr(ua)&&(ua=null),da!==null&&Jr(da)&&(da=null),Mi.forEach(Bm),Ri.forEach(Bm)}function Wr(e,t){e.blockedOn===t&&(e.blockedOn=null,Ac||(Ac=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,ty)))}var $r=null;function Lm(e){$r!==e&&($r=e,s.unstable_scheduleCallback(s.unstable_NormalPriority,function(){$r===e&&($r=null);for(var t=0;t<e.length;t+=3){var l=e[t],a=e[t+1],i=e[t+2];if(typeof a!="function"){if(jc(a||l)===null)continue;break}var r=$a(l);r!==null&&(e.splice(t,3),t-=3,So(r,{pending:!0,data:i,method:l.method,action:a},a,i))}}))}function Nn(e){function t(m){return Wr(m,e)}ca!==null&&Wr(ca,e),ua!==null&&Wr(ua,e),da!==null&&Wr(da,e),Mi.forEach(t),Ri.forEach(t);for(var l=0;l<fa.length;l++){var a=fa[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<fa.length&&(l=fa[0],l.blockedOn===null);)Hm(l),l.blockedOn===null&&fa.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var i=l[a],r=l[a+1],o=i[At]||null;if(typeof r=="function")o||Lm(l);else if(o){var c=null;if(r&&r.hasAttribute("formAction")){if(i=r,o=r[At]||null)c=o.formAction;else if(jc(i)!==null)continue}else c=o.action;typeof c=="function"?l[a+1]=c:(l.splice(a,3),a-=3),Lm(l)}}}function Ym(){function e(r){r.canIntercept&&r.info==="react-transition"&&r.intercept({handler:function(){return new Promise(function(o){return i=o})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var r=navigation.currentEntry;r&&r.url!=null&&navigation.navigate(r.url,{state:r.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),i!==null&&(i(),i=null)}}}function Cc(e){this._internalRoot=e}Ir.prototype.render=Cc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var l=t.current,a=Bt();Nm(l,a,e,t,null,null)},Ir.prototype.unmount=Cc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Nm(e.current,2,null,e,null,null),_r(),t[Ja]=null}};function Ir(e){this._internalRoot=e}Ir.prototype.unstable_scheduleHydration=function(e){if(e){var t=$c();e={blockedOn:null,target:e,priority:t};for(var l=0;l<fa.length&&t!==0&&t<fa[l].priority;l++);fa.splice(l,0,e),l===0&&Hm(e)}};var Gm=d.version;if(Gm!=="19.2.8")throw Error(u(527,Gm,"19.2.8"));H.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=v(t),e=e!==null?U(e):null,e=e===null?null:e.stateNode,e};var ly={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:E,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Fr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Fr.isDisabled&&Fr.supportsFiber)try{M=Fr.inject(ly),G=Fr}catch{}}return Ni.createRoot=function(e,t){if(!p(e))throw Error(u(299));var l=!1,a="",i=Jd,r=Wd,o=$d;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(r=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Om(e,1,!1,null,null,l,a,null,i,r,o,Ym),e[Ja]=t.current,ic(e),new Cc(t)},Ni.hydrateRoot=function(e,t,l){if(!p(e))throw Error(u(299));var a=!1,i="",r=Jd,o=Wd,c=$d,m=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(i=l.identifierPrefix),l.onUncaughtError!==void 0&&(r=l.onUncaughtError),l.onCaughtError!==void 0&&(o=l.onCaughtError),l.onRecoverableError!==void 0&&(c=l.onRecoverableError),l.formState!==void 0&&(m=l.formState)),t=Om(e,1,!0,t,l??null,a,i,m,r,o,c,Ym),t.context=_m(null),l=t.current,a=Bt(),a=Yn(a),i=Il(a),i.callback=null,Fl(l,i,a),l=a,t.current.lanes=l,Ca(t,l),vl(t),e[Ja]=t.current,ic(e),new Ir(t)},Ni.version="19.2.8",Ni}var Fm;function fy(){if(Fm)return Ec.exports;Fm=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(d){console.error(d)}}return s(),Ec.exports=dy(),Ec.exports}var my=fy();function py(s){return typeof s=="object"&&s!==null&&!Array.isArray(s)}function $e(s,d){if(!py(s)||Object.getOwnPropertySymbols(s).length!==0)return!1;const f=Object.getPrototypeOf(s);if(f!==Object.prototype&&f!==null)return!1;const u=Object.getOwnPropertyNames(s),p=Object.keys(s);return u.length===d.length&&p.length===d.length&&d.every(y=>Object.prototype.hasOwnProperty.call(s,y))}const hy="application/vnd.llm-relay.dashboard+json",yy=1,hp=`${hy}; version=${yy}`,gy="dashboard.snapshot.v1",vy="dashboard.detail.v1",by="dashboard.error.v1",xy=720,Dn=100,Sy=40,jy=100,Ay=32,Cy=/^[A-Za-z0-9_-]{16,128}$/,zy=1,yp=256,Ty=yp,Ey=Object.freeze(["1h","24h","7d","30d","today","month","lifetime"]),My=Object.freeze(["requests","tokens"]),Ry=Object.freeze(["minute","day","month","unknown"]),Oy=Object.freeze(["complete","partial","unavailable","stale","empty"]),Uc=Object.freeze(["summary","request_timeline","token_timeline","spend","provider","model","client","credential","latency","commit","errors","recent","quotas","cooldowns"]),_y=Object.freeze(["success","error","cancelled","unknown"]),Ny=Object.freeze(["timeout","provider_error","auth_error","rate_limit","aborted","protocol","unknown"]),Dy=Object.freeze(["relay_held","caller_operated","unknown"]),ky=Object.freeze(["exclude_caller_operated_from_relay_held_caps","include_all_labeled","unknown"]),wy=Object.freeze(["rate_limit","auth_error","provider_error","manual","unknown"]),Uy=Object.freeze(["meter_not_implemented","retention_pruned","upstream_unavailable","projection_lag","no_matching_rows","unknown"]),gp=Object.freeze(["provider_reported","relay_observed","relay_estimated","unknown","mixed"]),qy=Object.freeze(["serve","repair"]),Hy=Object.freeze(["malformed_query","invalid_auth","forbidden","not_found","method_not_allowed","unsupported_version","replay","oversized","unsupported_content_type","internal"]),By=Object.freeze(["Request could not be completed.","Dashboard session is unavailable.","Requested dashboard data was not found."]),Ly=Object.freeze(["provider_stated","configured","learned","published"]),Yy=Object.freeze(["provider_stated","derived_provider_stated","derived_configured","derived_learned","derived_published"]),Gy=Object.freeze(["reported","estimated","mixed","relay_counted"]),Xy=Object.freeze(["provider_stated","reviewed_rule","derived_boundary"]),Vy=Object.freeze(["relay_held","caller_operated","unknown","all"]),Pe=(s,d)=>typeof d=="string"&&s.includes(d),Qy=s=>Pe(Ey,s),Ky=s=>Pe(My,s),Zy=s=>Pe(Ry,s),qi=s=>Pe(Oy,s),Jy=s=>Pe(Uc,s),qc=s=>Pe(_y,s),Hc=s=>Pe(Ny,s),Wy=s=>Pe(Dy,s),$y=s=>Pe(Vy,s),Iy=s=>Pe(ky,s),Fy=s=>Pe(wy,s),Py=s=>Pe(Uy,s),eg=s=>Pe(gp,s),tg=s=>Pe(qy,s),lg=s=>Pe(Ly,s),ag=s=>Pe(Yy,s),ng=s=>Pe(Gy,s),ig=s=>Pe(Xy,s),rg=s=>Pe(Hy,s),sg=s=>Pe(By,s),bl=s=>typeof s=="number"&&Number.isSafeInteger(s)&&s>=0,vp=s=>{let d=0;for(let f=0;f<s.length;f+=1){const u=s.charCodeAt(f);if(u<=31||u>=127&&u<=159)return null;let p=u;if(u>=55296&&u<=56319){const y=s.charCodeAt(f+1);if(Number.isNaN(y)||y<56320||y>57343)return null;p=65536+(u-55296<<10)+(y-56320),f+=1}else if(u>=56320&&u<=57343)return null;d+=p<=127?1:p<=2047?2:p<=65535?3:4}return d},Xt=s=>{if(typeof s!="string")return!1;const d=vp(s);return s.length>=1&&d!==null&&d<=yp},og=s=>{if(typeof s!="string")return!1;const d=vp(s);return s.length>=zy&&d!==null&&d<=Ty},bp=s=>typeof s=="string"&&Cy.test(s),xp=s=>typeof s=="string",Sp=s=>typeof s=="boolean",Ot=(s,d)=>s===null||d(s),Lt=(s,d,f)=>Array.isArray(s)&&s.length<=d&&s.every(f),cg=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.\d+)?Z$/,Sl=s=>{if(typeof s!="string")return!1;const d=cg.exec(s);if(d===null)return!1;const f=Number(d[1]),u=Number(d[2]),p=Number(d[3]),y=Number(d[4]),R=Number(d[5]),q=Number(d[6]);if(u<1||u>12||y>23||R>59||q>59)return!1;const v=[31,f%4===0&&(f%100!==0||f%400===0)?29:28,31,30,31,30,31,31,30,31,30,31][u-1];return p>=1&&p<=(v??0)},al=s=>Ot(s,Sl),Vt=s=>Ot(s,bl),ug=s=>s===null||typeof s=="number"&&Number.isSafeInteger(s),dg=s=>s===null||typeof s=="number"&&Number.isFinite(s)&&s>=0&&s<=1,fg=s=>Ot(s,xp),Yl=s=>Ot(s,Xt),_c=s=>$e(s,["value","source","observedAt"])&&Vt(s.value)&&s.source==="provider_reported"&&al(s.observedAt),Pm=s=>$e(s,["value","source","observedAt","method"])&&Vt(s.value)&&s.source==="relay_estimated"&&al(s.observedAt)&&fg(s.method),mg=s=>$e(s,["reportedInput","reportedOutput","reportedCachedInput"])&&_c(s.reportedInput)&&_c(s.reportedOutput)&&_c(s.reportedCachedInput),pg=s=>$e(s,["estimatedInput","estimatedOutput"])&&Pm(s.estimatedInput)&&Pm(s.estimatedOutput),Bc=s=>$e(s,["reported","estimated"])&&mg(s.reported)&&pg(s.estimated),os=(s,d,f,u)=>$e(s,["amountMicrousd","priceSource","tokenBasis","source","observedAt"])&&Vt(s.amountMicrousd)&&s.priceSource===d&&s.tokenBasis===f&&Pe(u,s.source)&&al(s.observedAt),hg=s=>os(s,"provider_published","reported",["provider_reported","unknown"]),yg=s=>os(s,"provider_published","estimated",["relay_estimated","unknown"]),gg=s=>os(s,"reference","reported",["provider_reported","unknown"]),vg=s=>os(s,"reference","estimated",["relay_estimated","unknown"]),Lc=s=>$e(s,["providerPublishedReported","providerPublishedEstimated","referenceReported","referenceEstimated","unpricedRequests","partiallyPricedRequests"])&&hg(s.providerPublishedReported)&&yg(s.providerPublishedEstimated)&&gg(s.referenceReported)&&vg(s.referenceEstimated)&&bl(s.unpricedRequests)&&bl(s.partiallyPricedRequests),jp=s=>$e(s,["panel","state","reason","provenance","observedAt"])&&Jy(s.panel)&&qi(s.state)&&Ot(s.reason,Py)&&Lt(s.provenance,gp.length,eg)&&al(s.observedAt),Un=s=>bl(s.requests)&&bl(s.attempts)&&bl(s.served)&&bl(s.errored)&&bl(s.cancelled)&&dg(s.successRate)&&Bc(s.tokens)&&Lc(s.spend)&&Vt(s.avgLatencyMs)&&Vt(s.avgCommitMs),bg=s=>$e(s,["requests","attempts","served","errored","cancelled","successRate","tokens","spend","avgLatencyMs","p95LatencyMs","avgCommitMs"])&&Un(s)&&Vt(s.p95LatencyMs),xg=s=>$e(s,["from","to","requests","attempts","served","errored","cancelled","successRate","tokens","spend","avgLatencyMs","p95LatencyMs","avgCommitMs"])&&Sl(s.from)&&Sl(s.to)&&Un(s)&&Vt(s.p95LatencyMs),Sg=s=>$e(s,["requests","attempts","served","errored","cancelled","successRate","tokens","spend","avgLatencyMs","avgCommitMs","coverage","dimension","provider"])&&Un(s)&&qi(s.coverage)&&s.dimension==="provider"&&Xt(s.provider),jg=s=>$e(s,["requests","attempts","served","errored","cancelled","successRate","tokens","spend","avgLatencyMs","avgCommitMs","coverage","dimension","provider","model"])&&Un(s)&&qi(s.coverage)&&s.dimension==="model"&&Xt(s.provider)&&Xt(s.model),Ag=s=>$e(s,["requests","attempts","served","errored","cancelled","successRate","tokens","spend","avgLatencyMs","avgCommitMs","coverage","dimension","client"])&&Un(s)&&qi(s.coverage)&&s.dimension==="client"&&Xt(s.client),Cg=s=>$e(s,["requests","attempts","served","errored","cancelled","successRate","tokens","spend","avgLatencyMs","avgCommitMs","coverage","dimension","provider","credentialId","label"])&&Un(s)&&qi(s.coverage)&&s.dimension==="credential"&&Xt(s.provider)&&Xt(s.credentialId)&&Xt(s.label),zg=s=>$e(s,["failureKind","outcome","requests"])&&Hc(s.failureKind)&&qc(s.outcome)&&bl(s.requests),Ap=s=>$e(s,["requestId","occurredAt","client","attribution","outcome","failureKind","attemptCount","latencyMs","commitMs","provider","model","credentialId","tokens","spend","repairIncluded"])&&bp(s.requestId)&&Sl(s.occurredAt)&&Yl(s.client)&&Wy(s.attribution)&&qc(s.outcome)&&Ot(s.failureKind,Hc)&&bl(s.attemptCount)&&Vt(s.latencyMs)&&Vt(s.commitMs)&&Yl(s.provider)&&Yl(s.model)&&Yl(s.credentialId)&&Bc(s.tokens)&&Lc(s.spend)&&Sp(s.repairIncluded),Tg=s=>$e(s,["attemptId","role","startedAt","endedAt","status","latencyMs","commitMs","provider","model","credentialId","failureKind","tokens","spend"])&&og(s.attemptId)&&tg(s.role)&&Sl(s.startedAt)&&al(s.endedAt)&&qc(s.status)&&Vt(s.latencyMs)&&Vt(s.commitMs)&&Yl(s.provider)&&Yl(s.model)&&Yl(s.credentialId)&&Ot(s.failureKind,Hc)&&Ot(s.tokens,Bc)&&Ot(s.spend,Lc),Eg=s=>$e(s,["credentialId","label","provider","deployment","axis","period","limit","remaining","localUsed","resetsAt","observedAt","limitBasis","remainingBasis","localUsedBasis","resetsAtBasis"])&&Xt(s.credentialId)&&Xt(s.label)&&Xt(s.provider)&&Yl(s.deployment)&&Ky(s.axis)&&Zy(s.period)&&Vt(s.limit)&&ug(s.remaining)&&Vt(s.localUsed)&&al(s.resetsAt)&&al(s.observedAt)&&Ot(s.limitBasis,lg)&&Ot(s.remainingBasis,ag)&&Ot(s.localUsedBasis,ng)&&Ot(s.resetsAtBasis,ig),Mg=s=>$e(s,["credentialId","provider","deployment","reason","until","observedAt"])&&Xt(s.credentialId)&&Xt(s.provider)&&Yl(s.deployment)&&Fy(s.reason)&&al(s.until)&&al(s.observedAt),Rg=s=>$e(s,["schema","relayVersion","window","includeRepair","attribution","attributionPolicy","generatedAt","asOf","from","to","retentionFrom","retentionTo","panelCoverage","summary","buckets","providers","models","clients","credentials","errors","quotas","cooldowns","recentRequests"])&&s.schema===gy&&xp(s.relayVersion)&&Qy(s.window)&&Sp(s.includeRepair)&&$y(s.attribution)&&Iy(s.attributionPolicy)&&Sl(s.generatedAt)&&Sl(s.asOf)&&al(s.from)&&Sl(s.to)&&al(s.retentionFrom)&&al(s.retentionTo)&&Lt(s.panelCoverage,Uc.length,jp)&&bg(s.summary)&&Lt(s.buckets,xy,xg)&&Lt(s.providers,Dn,Sg)&&Lt(s.models,Dn,jg)&&Lt(s.clients,Dn,Ag)&&Lt(s.credentials,Dn,Cg)&&Lt(s.errors,Sy,zg)&&Lt(s.quotas,Dn,Eg)&&Lt(s.cooldowns,Dn,Mg)&&Lt(s.recentRequests,jy,Ap),Og=s=>$e(s,["schema","request","attempts","panelCoverage"])&&s.schema===vy&&Ap(s.request)&&Lt(s.attempts,Ay,Tg)&&Lt(s.panelCoverage,Uc.length,jp),_g=s=>$e(s,["schema","code","message","requestId"])&&s.schema===by&&rg(s.code)&&sg(s.message)&&Ot(s.requestId,bp),Ng=Rg,Dg=Og,Yc="llm-relay.dashboard.session.v1",kg="X-LLM-Relay-Dashboard-Session",Cp="application/json",wg=Object.freeze({window:"24h",includeRepair:!0,attribution:"all"});class va extends Error{constructor(d,f="Dashboard request failed."){super(f),this.status=d,this.name="DashboardApiError"}}function cs(s){return{Accept:hp,...s===void 0?{}:{[kg]:s}}}function Ug(s){return s.headers.get("content-type")===hp}async function qg(s){if(!Ug(s))throw new va(s.status);try{return await s.json()}catch{throw new va(s.status)}}async function Gc(s){const d=await qg(s);if(s.ok)return d;throw new va(s.status,_g(d)?d.message:"Dashboard request failed.")}function Hg(s){if(typeof s!="object"||s===null||Array.isArray(s))return!1;const d=s,f=["schema","session","scope","idleExpiresAt","absoluteExpiresAt"];return Object.keys(d).length===f.length&&f.every(u=>Object.prototype.hasOwnProperty.call(d,u))&&d.schema==="dashboard.session.v1"&&typeof d.session=="string"&&d.session.length>0&&d.scope==="dashboard:read"&&Sl(d.idleExpiresAt)&&Sl(d.absoluteExpiresAt)}function ep(s){return s instanceof va&&s.status===401}function zp(s){const d=new URLSearchParams({window:s.window,includeRepair:s.includeRepair?"1":"0",attribution:s.attribution});for(const f of["provider","model","client","credentialId","outcome","failureKind"]){const u=s[f];u!==void 0&&d.set(f,u)}return`/dashboard/api/v1/snapshot?${d.toString()}`}function Bg(s,d){return`/dashboard/api/v1/requests/${encodeURIComponent(s)}?includeRepair=${d?"1":"0"}`}async function Lg(s,d){const f=s?{schema:"dashboard.session.request.v1",bootstrap:s}:{schema:"dashboard.session.request.v1"},u=await fetch("/dashboard/api/v1/session",{method:"POST",credentials:"omit",...d===void 0?{}:{signal:d},headers:{...cs(),"Content-Type":Cp},body:JSON.stringify(f)}),p=await Gc(u);if(!Hg(p))throw new va(u.status);return p}async function Yg(s,d){const f=await fetch("/dashboard/api/v1/logout",{method:"POST",credentials:"omit",...d===void 0?{}:{signal:d},headers:{...cs(s),"Content-Type":Cp},body:JSON.stringify({schema:"dashboard.logout.request.v1"})}),u=await f.text();if(f.status!==204||u.length!==0)throw new va(f.status)}async function Gg(s,d,f){const u=await Gc(await fetch(zp(d),{credentials:"omit",...f===void 0?{}:{signal:f},headers:cs(s)}));if(!Ng(u))throw new va(200);return u}async function Xg(s,d,f,u){const p=await Gc(await fetch(Bg(d,f),{credentials:"omit",...u===void 0?{}:{signal:u},headers:cs(s)}));if(!Dg(p))throw new va(200);return p}function Vg(s,d){const f=s.hash.startsWith("#")?s.hash.slice(1):s.hash,u=new URLSearchParams(f),p=u.get("bootstrap");if(p!==null){u.delete("bootstrap");const y=u.toString(),R=y.length>0?`#${y}`:"";d.replaceState(null,"",`${s.pathname}${s.search}${R}`)}return p}function Qg(s=sessionStorage){return s.getItem(Yc)}function Kg(s,d=sessionStorage){d.setItem(Yc,s)}function Tp(s=sessionStorage){s.removeItem(Yc)}/**
|
|
50
|
+
* @license lucide-react v0.468.0 - ISC
|
|
51
|
+
*
|
|
52
|
+
* This source code is licensed under the ISC license.
|
|
53
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
54
|
+
*/const Zg=s=>s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ep=(...s)=>s.filter((d,f,u)=>!!d&&d.trim()!==""&&u.indexOf(d)===f).join(" ").trim();/**
|
|
55
|
+
* @license lucide-react v0.468.0 - ISC
|
|
56
|
+
*
|
|
57
|
+
* This source code is licensed under the ISC license.
|
|
58
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
59
|
+
*/var Jg={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"};/**
|
|
60
|
+
* @license lucide-react v0.468.0 - ISC
|
|
61
|
+
*
|
|
62
|
+
* This source code is licensed under the ISC license.
|
|
63
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
64
|
+
*/const Wg=T.forwardRef(({color:s="currentColor",size:d=24,strokeWidth:f=2,absoluteStrokeWidth:u,className:p="",children:y,iconNode:R,...q},x)=>T.createElement("svg",{ref:x,...Jg,width:d,height:d,stroke:s,strokeWidth:u?Number(f)*24/Number(d):f,className:Ep("lucide",p),...q},[...R.map(([v,U])=>T.createElement(v,U)),...Array.isArray(y)?y:[y]]));/**
|
|
65
|
+
* @license lucide-react v0.468.0 - ISC
|
|
66
|
+
*
|
|
67
|
+
* This source code is licensed under the ISC license.
|
|
68
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
69
|
+
*/const me=(s,d)=>{const f=T.forwardRef(({className:u,...p},y)=>T.createElement(Wg,{ref:y,iconNode:d,className:Ep(`lucide-${Zg(s)}`,u),...p}));return f.displayName=`${s}`,f};/**
|
|
70
|
+
* @license lucide-react v0.468.0 - ISC
|
|
71
|
+
*
|
|
72
|
+
* This source code is licensed under the ISC license.
|
|
73
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
74
|
+
*/const us=me("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"}]]);/**
|
|
75
|
+
* @license lucide-react v0.468.0 - ISC
|
|
76
|
+
*
|
|
77
|
+
* This source code is licensed under the ISC license.
|
|
78
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
79
|
+
*/const $g=me("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
|
|
80
|
+
* @license lucide-react v0.468.0 - ISC
|
|
81
|
+
*
|
|
82
|
+
* This source code is licensed under the ISC license.
|
|
83
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
84
|
+
*/const Ig=me("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
85
|
+
* @license lucide-react v0.468.0 - ISC
|
|
86
|
+
*
|
|
87
|
+
* This source code is licensed under the ISC license.
|
|
88
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
89
|
+
*/const Fg=me("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
|
|
90
|
+
* @license lucide-react v0.468.0 - ISC
|
|
91
|
+
*
|
|
92
|
+
* This source code is licensed under the ISC license.
|
|
93
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
94
|
+
*/const ds=me("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
|
|
95
|
+
* @license lucide-react v0.468.0 - ISC
|
|
96
|
+
*
|
|
97
|
+
* This source code is licensed under the ISC license.
|
|
98
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
99
|
+
*/const Xc=me("ChartLine",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]]);/**
|
|
100
|
+
* @license lucide-react v0.468.0 - ISC
|
|
101
|
+
*
|
|
102
|
+
* This source code is licensed under the ISC license.
|
|
103
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
104
|
+
*/const Gt=me("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
105
|
+
* @license lucide-react v0.468.0 - ISC
|
|
106
|
+
*
|
|
107
|
+
* This source code is licensed under the ISC license.
|
|
108
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
109
|
+
*/const Pg=me("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
110
|
+
* @license lucide-react v0.468.0 - ISC
|
|
111
|
+
*
|
|
112
|
+
* This source code is licensed under the ISC license.
|
|
113
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
114
|
+
*/const Va=me("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
115
|
+
* @license lucide-react v0.468.0 - ISC
|
|
116
|
+
*
|
|
117
|
+
* This source code is licensed under the ISC license.
|
|
118
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
119
|
+
*/const Mp=me("CircleDollarSign",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 18V6",key:"zqpxq5"}]]);/**
|
|
120
|
+
* @license lucide-react v0.468.0 - ISC
|
|
121
|
+
*
|
|
122
|
+
* This source code is licensed under the ISC license.
|
|
123
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
124
|
+
*/const Rp=me("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
125
|
+
* @license lucide-react v0.468.0 - ISC
|
|
126
|
+
*
|
|
127
|
+
* This source code is licensed under the ISC license.
|
|
128
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
129
|
+
*/const e1=me("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
|
|
130
|
+
* @license lucide-react v0.468.0 - ISC
|
|
131
|
+
*
|
|
132
|
+
* This source code is licensed under the ISC license.
|
|
133
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
134
|
+
*/const t1=me("Coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]]);/**
|
|
135
|
+
* @license lucide-react v0.468.0 - ISC
|
|
136
|
+
*
|
|
137
|
+
* This source code is licensed under the ISC license.
|
|
138
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
139
|
+
*/const ml=me("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"}]]);/**
|
|
140
|
+
* @license lucide-react v0.468.0 - ISC
|
|
141
|
+
*
|
|
142
|
+
* This source code is licensed under the ISC license.
|
|
143
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
144
|
+
*/const l1=me("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
|
|
145
|
+
* @license lucide-react v0.468.0 - ISC
|
|
146
|
+
*
|
|
147
|
+
* This source code is licensed under the ISC license.
|
|
148
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
149
|
+
*/const a1=me("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"}]]);/**
|
|
150
|
+
* @license lucide-react v0.468.0 - ISC
|
|
151
|
+
*
|
|
152
|
+
* This source code is licensed under the ISC license.
|
|
153
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
154
|
+
*/const Vc=me("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/**
|
|
155
|
+
* @license lucide-react v0.468.0 - ISC
|
|
156
|
+
*
|
|
157
|
+
* This source code is licensed under the ISC license.
|
|
158
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
159
|
+
*/const n1=me("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
160
|
+
* @license lucide-react v0.468.0 - ISC
|
|
161
|
+
*
|
|
162
|
+
* This source code is licensed under the ISC license.
|
|
163
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
164
|
+
*/const fs=me("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"}]]);/**
|
|
165
|
+
* @license lucide-react v0.468.0 - ISC
|
|
166
|
+
*
|
|
167
|
+
* This source code is licensed under the ISC license.
|
|
168
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
169
|
+
*/const ki=me("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"}]]);/**
|
|
170
|
+
* @license lucide-react v0.468.0 - ISC
|
|
171
|
+
*
|
|
172
|
+
* This source code is licensed under the ISC license.
|
|
173
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
174
|
+
*/const Op=me("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/**
|
|
175
|
+
* @license lucide-react v0.468.0 - ISC
|
|
176
|
+
*
|
|
177
|
+
* This source code is licensed under the ISC license.
|
|
178
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
179
|
+
*/const _p=me("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
|
|
180
|
+
* @license lucide-react v0.468.0 - ISC
|
|
181
|
+
*
|
|
182
|
+
* This source code is licensed under the ISC license.
|
|
183
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
184
|
+
*/const Qc=me("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
|
|
185
|
+
* @license lucide-react v0.468.0 - ISC
|
|
186
|
+
*
|
|
187
|
+
* This source code is licensed under the ISC license.
|
|
188
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
189
|
+
*/const i1=me("Paperclip",[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486",key:"1pkts6"}]]);/**
|
|
190
|
+
* @license lucide-react v0.468.0 - ISC
|
|
191
|
+
*
|
|
192
|
+
* This source code is licensed under the ISC license.
|
|
193
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
194
|
+
*/const r1=me("PinOff",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]]);/**
|
|
195
|
+
* @license lucide-react v0.468.0 - ISC
|
|
196
|
+
*
|
|
197
|
+
* This source code is licensed under the ISC license.
|
|
198
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
199
|
+
*/const tp=me("Pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]);/**
|
|
200
|
+
* @license lucide-react v0.468.0 - ISC
|
|
201
|
+
*
|
|
202
|
+
* This source code is licensed under the ISC license.
|
|
203
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
204
|
+
*/const Pr=me("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
205
|
+
* @license lucide-react v0.468.0 - ISC
|
|
206
|
+
*
|
|
207
|
+
* This source code is licensed under the ISC license.
|
|
208
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
209
|
+
*/const ga=me("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
210
|
+
* @license lucide-react v0.468.0 - ISC
|
|
211
|
+
*
|
|
212
|
+
* This source code is licensed under the ISC license.
|
|
213
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
214
|
+
*/const Kc=me("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
215
|
+
* @license lucide-react v0.468.0 - ISC
|
|
216
|
+
*
|
|
217
|
+
* This source code is licensed under the ISC license.
|
|
218
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
219
|
+
*/const s1=me("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
|
|
220
|
+
* @license lucide-react v0.468.0 - ISC
|
|
221
|
+
*
|
|
222
|
+
* This source code is licensed under the ISC license.
|
|
223
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
224
|
+
*/const Np=me("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
|
|
225
|
+
* @license lucide-react v0.468.0 - ISC
|
|
226
|
+
*
|
|
227
|
+
* This source code is licensed under the ISC license.
|
|
228
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
229
|
+
*/const Zc=me("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
230
|
+
* @license lucide-react v0.468.0 - ISC
|
|
231
|
+
*
|
|
232
|
+
* This source code is licensed under the ISC license.
|
|
233
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
234
|
+
*/const Dp=me("Shield",[["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"}]]);/**
|
|
235
|
+
* @license lucide-react v0.468.0 - ISC
|
|
236
|
+
*
|
|
237
|
+
* This source code is licensed under the ISC license.
|
|
238
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
239
|
+
*/const o1=me("SlidersVertical",[["line",{x1:"4",x2:"4",y1:"21",y2:"14",key:"1p332r"}],["line",{x1:"4",x2:"4",y1:"10",y2:"3",key:"gb41h5"}],["line",{x1:"12",x2:"12",y1:"21",y2:"12",key:"hf2csr"}],["line",{x1:"12",x2:"12",y1:"8",y2:"3",key:"1kfi7u"}],["line",{x1:"20",x2:"20",y1:"21",y2:"16",key:"1lhrwl"}],["line",{x1:"20",x2:"20",y1:"12",y2:"3",key:"16vvfq"}],["line",{x1:"2",x2:"6",y1:"14",y2:"14",key:"1uebub"}],["line",{x1:"10",x2:"14",y1:"8",y2:"8",key:"1yglbp"}],["line",{x1:"18",x2:"22",y1:"16",y2:"16",key:"1jxqpz"}]]);/**
|
|
240
|
+
* @license lucide-react v0.468.0 - ISC
|
|
241
|
+
*
|
|
242
|
+
* This source code is licensed under the ISC license.
|
|
243
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
244
|
+
*/const c1=me("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
|
|
245
|
+
* @license lucide-react v0.468.0 - ISC
|
|
246
|
+
*
|
|
247
|
+
* This source code is licensed under the ISC license.
|
|
248
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
249
|
+
*/const u1=me("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
|
|
250
|
+
* @license lucide-react v0.468.0 - ISC
|
|
251
|
+
*
|
|
252
|
+
* This source code is licensed under the ISC license.
|
|
253
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
254
|
+
*/const Jc=me("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"}]]);/**
|
|
255
|
+
* @license lucide-react v0.468.0 - ISC
|
|
256
|
+
*
|
|
257
|
+
* This source code is licensed under the ISC license.
|
|
258
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
259
|
+
*/const d1=me("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
|
260
|
+
* @license lucide-react v0.468.0 - ISC
|
|
261
|
+
*
|
|
262
|
+
* This source code is licensed under the ISC license.
|
|
263
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
264
|
+
*/const kp=me("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"}]]);/**
|
|
265
|
+
* @license lucide-react v0.468.0 - ISC
|
|
266
|
+
*
|
|
267
|
+
* This source code is licensed under the ISC license.
|
|
268
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
269
|
+
*/const ss=me("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
270
|
+
* @license lucide-react v0.468.0 - ISC
|
|
271
|
+
*
|
|
272
|
+
* This source code is licensed under the ISC license.
|
|
273
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
274
|
+
*/const wn=me("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
275
|
+
* @license lucide-react v0.468.0 - ISC
|
|
276
|
+
*
|
|
277
|
+
* This source code is licensed under the ISC license.
|
|
278
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
279
|
+
*/const wi=me("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function Ae(s,d=""){return s===null?"Unavailable":`${new Intl.NumberFormat("en-US").format(s)}${d}`}function Wc(s){return s===null?"Unavailable":`${(s*100).toFixed(1)}%`}function Yt(s){return s===null?"Unavailable":`${Ae(s)} ms`}function st(s){return s===null?"Unavailable":new Intl.DateTimeFormat("en-US",{dateStyle:"medium",timeStyle:"medium",timeZone:"UTC"}).format(new Date(s))}function ya(s){return s===null?"Unpriced":`$${(s/1e6).toFixed(4)}`}function lp(s){return s==="complete"?"Complete":s[0].toUpperCase()+s.slice(1)}function Ui(s,d=Date.now()){if(s===null)return"Unavailable";const f=new Date(s).getTime();if(Number.isNaN(f))return"Unavailable";const u=f-d,p=u<0,y=Math.abs(u),R=6e4,q=36e5,x=864e5,[v,U]=y<R?[Math.round(y/1e3),"s"]:y<q?[Math.round(y/R),"m"]:y<x?[Math.round(y/q),"h"]:[Math.round(y/x),"d"];return p?`${v}${U} ago`:`in ${v}${U}`}function f1(s){return s===null?"Unavailable":s.split("_").map(d=>d.charAt(0).toUpperCase()+d.slice(1)).join(" ")}function m1(s,d){const f=d==="1h"||d==="24h"||d==="today"?{hour:"2-digit",minute:"2-digit",timeZone:"UTC",hour12:!1}:{year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",timeZone:"UTC",hour12:!1};return`${new Intl.DateTimeFormat("en-US",f).format(new Date(s))} UTC`}function p1(s){return s.limit===null||s.remaining===null||s.limit===0?null:Math.max(0,Math.min(1,s.remaining/s.limit))}function h1(s){const d=[],f=new Map;for(const u of s){let p=f.get(u.provider);p===void 0&&(p=[],f.set(u.provider,p),d.push(u.provider)),p.push(u)}return d.map(u=>[u,f.get(u)])}function y1(s){return s===null?"unknown":s==="provider_stated"||s==="reported"?"strong":s.startsWith("derived_")||s==="configured"||s==="relay_counted"?"derived":"weak"}function es({value:s}){return n.jsx("span",{className:`basis-badge basis-${y1(s)}`,children:f1(s)})}function Gl({value:s,label:d}){if(s===void 0)return n.jsxs("aside",{className:"coverage sr-only unavailable","aria-label":`${d} data status`,"aria-description":"Unavailable; reason unavailable; provenance unavailable; observed unavailable",children:[n.jsx("strong",{children:"Unavailable"}),n.jsx("span",{children:"State: unavailable. Reason: unavailable. Provenance: unavailable. Observed: unavailable."})]});const f=`${lp(s.state)}; reason ${s.reason??"unavailable"}; provenance ${s.provenance.length===0?"unavailable":s.provenance.join(", ")}; observed ${st(s.observedAt)}.`;return n.jsxs("aside",{className:`coverage sr-only ${s.state}`,"aria-label":`${d} data status`,"aria-description":f,children:[n.jsx("strong",{children:lp(s.state)}),n.jsx("span",{children:f})]})}function ap({tokens:s}){if(s===null)return n.jsx("p",{className:"null-value",children:"Token details unavailable."});const d=[["Reported input",s.reported.reportedInput.value,s.reported.reportedInput.source,s.reported.reportedInput.observedAt,null],["Reported output",s.reported.reportedOutput.value,s.reported.reportedOutput.source,s.reported.reportedOutput.observedAt,null],["Reported cached input",s.reported.reportedCachedInput.value,s.reported.reportedCachedInput.source,s.reported.reportedCachedInput.observedAt,null],["Estimated input",s.estimated.estimatedInput.value,s.estimated.estimatedInput.source,s.estimated.estimatedInput.observedAt,s.estimated.estimatedInput.method],["Estimated output",s.estimated.estimatedOutput.value,s.estimated.estimatedOutput.source,s.estimated.estimatedOutput.observedAt,s.estimated.estimatedOutput.method]];return n.jsx("dl",{className:"cell-list",children:d.map(([f,u,p,y,R])=>n.jsxs("div",{children:[n.jsx("dt",{children:f}),n.jsxs("dd",{children:[Ae(u)," ",n.jsxs("small",{children:["(",p,"; observed ",st(y),R===null?"":`; ${R}`,")"]})]})]},f))})}function np({spend:s}){if(s===null)return n.jsx("p",{className:"null-value",children:"Spend details unavailable."});const d=[["Provider-published / reported",s.providerPublishedReported],["Provider-published / estimated",s.providerPublishedEstimated],["Reference / reported",s.referenceReported],["Reference / estimated",s.referenceEstimated]],f=s.partiallyPricedRequests>0;return n.jsxs("dl",{className:"cell-list spend-cells",children:[d.map(([u,p])=>n.jsxs("div",{children:[n.jsx("dt",{children:u}),n.jsxs("dd",{children:[ya(p.amountMicrousd),f?" (lower bound)":""," ",n.jsxs("small",{children:["(",p.priceSource,"; ",p.tokenBasis,"; ",p.source,"; observed ",st(p.observedAt),")"]})]})]},u)),n.jsxs("div",{children:[n.jsx("dt",{children:"Unpriced requests"}),n.jsx("dd",{children:Ae(s.unpricedRequests)})]}),n.jsxs("div",{children:[n.jsx("dt",{children:"Partially priced requests"}),n.jsx("dd",{children:Ae(s.partiallyPricedRequests)})]})]})}const Nc=960,ts=230,Di=62,ip=18,Dc=14,g1=42,rp=4,sp=5;function wp(s){return typeof s=="number"&&Number.isFinite(s)&&s>=0?s:null}function v1(s,d){return Math.max(1,...s.flatMap(f=>d.map(u=>wp(f[u.key])??0)))}function b1({rows:s,columns:d}){const f=Nc-Di-ip,u=ts-Dc-g1,p=v1(s,d),y=f/s.length,R=y*.8/Math.max(1,d.length),q=Math.max(1,Math.ceil(s.length/8));return n.jsxs(n.Fragment,{children:[n.jsxs("svg",{className:"metric-chart-svg",viewBox:`0 0 ${Nc} ${ts}`,width:"100%",height:ts,focusable:"false",children:[Array.from({length:rp+1},(x,v)=>{const U=v/rp,k=Dc+U*u,V=p*(1-U);return n.jsxs("g",{children:[n.jsx("line",{className:"chart-grid",x1:Di,y1:k,x2:Nc-ip,y2:k}),n.jsx("text",{className:"chart-axis-label",x:Di-8,y:k+4,textAnchor:"end",children:Ae(V)})]},`grid-${v}`)}),s.flatMap((x,v)=>d.map((U,k)=>{const V=wp(x[U.key]);if(V===null)return null;const L=V/p*u,Q=Di+v*y+y*.1+k*R,I=Dc+u-L;return n.jsx("rect",{className:`metric-bar chart-series-${k%sp}`,x:Q,y:I,width:Math.max(1,R-1),height:Math.max(1,L),rx:Math.min(3,R/2),ry:Math.min(3,R/2),children:n.jsx("title",{children:`${U.label}: ${Ae(V)} (${x.label})`})},`${x.id}-${String(U.key)}`)})),s.map((x,v)=>v%q!==0&&v!==s.length-1?null:n.jsx("text",{className:"chart-axis-label",x:Di+(v+.5)*y,y:ts-12,textAnchor:"middle",children:x.label},x.id))]}),n.jsx("ul",{className:"chart-legend",children:d.map((x,v)=>n.jsxs("li",{children:[n.jsx("span",{className:`chart-swatch chart-series-${v%sp}`,"aria-hidden":"true"}),x.label]},String(x.key)))})]})}function ls({id:s,title:d,icon:f,rows:u,columns:p,panelCoverage:y}){const R=`chart-${s}-heading`;return n.jsxs("section",{className:"panel chart-panel","aria-labelledby":R,children:[n.jsx("div",{className:"panel-header",children:n.jsxs("h2",{id:R,className:"panel-title",children:[f&&n.jsx(f,{className:"panel-icon","aria-hidden":"true"}),d]})}),n.jsx(Gl,{label:d,value:y}),u.length===0?n.jsx("p",{className:"empty-row",children:"No matching measurements."}):n.jsx("div",{className:"chart",children:n.jsx(b1,{rows:u,columns:p})})]})}const x1={anthropic:"#d97706",openai:"#10a37f",google:"#4285f4",deepseek:"#0ea5e9",groq:"#f55036",cerebras:"#8b5cf6",nvidia:"#76b900",mistral:"#f59e0b",openrouter:"#ec4899",github:"#6e7b8b",cohere:"#d946ef",cloudflare:"#f38020",zhipu:"#06b6d4",ollama:"#64748b",huggingface:"#ff9d00"};function S1(s){if(!s)return"#94a3b8";const d=s.toLowerCase().trim();return x1[d]??"#94a3b8"}function pl({provider:s,className:d}){const f=S1(s);return n.jsx("span",{className:`platform-dot ${d??""}`,style:{backgroundColor:f},"aria-hidden":"true"})}function j1(s){if(!s)return"muted";switch(s.toLowerCase().trim()){case"success":return"success";case"error":case"provider_error":case"auth_error":case"protocol":return"error";case"cancelled":case"timeout":case"rate_limit":case"aborted":return"warning";default:return"muted"}}function A1(s){return s?s.replace(/_/g," "):"Unavailable"}function xt({value:s,className:d}){if(!s)return n.jsx("span",{className:"null-value",children:"Unavailable"});const f=j1(s),u=A1(s);return n.jsx("span",{className:`status-badge status-badge-${f} ${d??""}`,children:u})}function fl({label:s,value:d}){return n.jsxs("div",{className:"detail-item",children:[n.jsx("dt",{className:"detail-label",children:s}),n.jsx("dd",{className:"detail-value",children:d})]})}function C1({detail:s,onClose:d}){const f=T.useRef(null),u=T.useRef(null);T.useEffect(()=>{var R;(R=f.current)==null||R.focus();const y=q=>{var k;if(q.key==="Escape"){d();return}if(q.key!=="Tab")return;const x=[...((k=u.current)==null?void 0:k.querySelectorAll("button, [href], input, select, textarea, [tabindex]:not([tabindex='-1'])"))??[]].filter(V=>!V.hasAttribute("disabled"));if(x.length===0)return;const v=x[0],U=x.at(-1);q.shiftKey&&document.activeElement===v?(q.preventDefault(),U.focus()):!q.shiftKey&&document.activeElement===U&&(q.preventDefault(),v.focus())};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[d]);const p=s.request;return n.jsx("div",{className:"dialog-backdrop",role:"presentation",onMouseDown:y=>{y.target===y.currentTarget&&d()},children:n.jsxs("section",{ref:u,className:"dialog",role:"dialog","aria-modal":"true","aria-labelledby":"detail-title","aria-describedby":"detail-description",children:[n.jsxs("div",{className:"dialog-header",children:[n.jsxs("div",{className:"dialog-header-title",children:[n.jsx(us,{className:"dialog-icon","aria-hidden":"true"}),n.jsxs("h2",{id:"detail-title",children:["Request ",p.requestId]}),n.jsx(xt,{value:p.outcome})]}),n.jsx("button",{ref:f,type:"button",className:"dialog-close-btn",onClick:d,"aria-label":"Close details",children:n.jsx(wn,{className:"dialog-close-icon","aria-hidden":"true"})})]}),n.jsxs("p",{id:"detail-description",className:"dialog-description",children:[p.attemptCount," recorded attempt",p.attemptCount===1?"":"s"," (",s.attempts.map(y=>y.attemptId).join(", ")||"none","). Coverage states include reason, provenance, and observed timestamp."]}),n.jsxs("section",{"aria-labelledby":"request-projection",className:"dialog-section",children:[n.jsx("h3",{id:"request-projection",className:"dialog-section-title",children:"Request projection"}),n.jsxs("dl",{className:"detail-grid-v2",children:[n.jsx(fl,{label:"Occurred",value:st(p.occurredAt)}),n.jsx(fl,{label:"Status",value:n.jsx(xt,{value:p.outcome})}),n.jsx(fl,{label:"Provider",value:p.provider?n.jsxs("span",{className:"inline-flex items-center",children:[n.jsx(pl,{provider:p.provider}),p.provider]}):"Unavailable"}),n.jsx(fl,{label:"Model",value:p.model??"Unavailable"}),n.jsx(fl,{label:"Client",value:p.client??"Unavailable"}),n.jsx(fl,{label:"Attribution",value:p.attribution}),n.jsx(fl,{label:"Latency",value:Yt(p.latencyMs)}),n.jsx(fl,{label:"Commit / TTFB",value:Yt(p.commitMs)}),n.jsx(fl,{label:"Failure kind",value:p.failureKind?n.jsx(xt,{value:p.failureKind}):"None"}),n.jsx(fl,{label:"Credential",value:p.credentialId??"Unavailable"}),n.jsx(fl,{label:"Repair included",value:p.repairIncluded?"Yes":"No"})]}),n.jsxs("div",{className:"detail-cards-row",children:[n.jsxs("div",{className:"detail-subcard",children:[n.jsx("h4",{children:"Request tokens"}),n.jsx(ap,{tokens:p.tokens})]}),n.jsxs("div",{className:"detail-subcard",children:[n.jsx("h4",{children:"Request spend"}),n.jsx(np,{spend:p.spend})]})]})]}),n.jsxs("section",{"aria-labelledby":"attempt-projection",className:"dialog-section",children:[n.jsx("h3",{id:"attempt-projection",className:"dialog-section-title",children:"Attempts Ladder"}),s.attempts.length===0?n.jsx("p",{className:"empty-row",children:"No recorded attempts are available for this request."}):n.jsxs(n.Fragment,{children:[s.attempts.length>1&&n.jsxs("div",{style:{marginBottom:"0.75rem",padding:"0.5rem 0.75rem",borderRadius:"0.375rem",background:"rgba(234, 179, 8, 0.1)",border:"1px solid rgba(234, 179, 8, 0.2)",fontSize:"0.8125rem",color:"var(--foreground)"},children:[n.jsx("strong",{children:"Failover Sequence:"})," This request executed ",s.attempts.length," sequential attempts across providers."]}),n.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"0.5rem",marginBottom:"1rem"},children:s.attempts.map((y,R)=>{const q=y.status==="success";return n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.75rem",padding:"0.5rem 0.75rem",borderRadius:"0.375rem",border:"1px solid var(--border)",backgroundColor:q?"rgba(34, 197, 94, 0.05)":"rgba(239, 68, 68, 0.05)",fontSize:"0.8125rem",flexWrap:"wrap"},children:[n.jsxs("span",{style:{fontWeight:600,color:"var(--muted-foreground)",width:"1.75rem"},children:["#",R+1]}),n.jsxs("span",{className:"inline-flex items-center",style:{gap:"0.25rem",fontWeight:500},children:[y.provider?n.jsx(pl,{provider:y.provider}):null,y.provider??"Unknown"]}),n.jsx("span",{style:{fontFamily:"monospace",color:"var(--foreground)",opacity:.9},children:y.model??"Unknown model"}),n.jsx("span",{className:"badge",style:{textTransform:"uppercase",fontSize:"0.7rem"},children:y.role}),n.jsx(xt,{value:y.status}),n.jsxs("span",{style:{marginLeft:"auto",fontSize:"0.75rem",color:"var(--muted-foreground)",fontFamily:"monospace"},children:[Yt(y.latencyMs),y.commitMs!==null?` (commit ${Yt(y.commitMs)})`:""]}),y.failureKind&&n.jsxs("div",{style:{width:"100%",paddingLeft:"2.5rem",fontSize:"0.75rem",color:"#dc2626"},children:["Failure: ",y.failureKind]})]},y.attemptId)})}),n.jsx("div",{className:"table-wrap",children:n.jsxs("table",{className:"responsive-table",children:[n.jsx("caption",{children:"Bounded request attempts"}),n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{scope:"col",children:"Attempt ID"}),n.jsx("th",{scope:"col",children:"Role"}),n.jsx("th",{scope:"col",children:"Status"}),n.jsx("th",{scope:"col",children:"Started"}),n.jsx("th",{scope:"col",children:"Ended"}),n.jsx("th",{scope:"col",children:"Latency"}),n.jsx("th",{scope:"col",children:"Commit"}),n.jsx("th",{scope:"col",children:"Provider"}),n.jsx("th",{scope:"col",children:"Model"}),n.jsx("th",{scope:"col",children:"Credential"}),n.jsx("th",{scope:"col",children:"Failure"}),n.jsx("th",{scope:"col",children:"Tokens"}),n.jsx("th",{scope:"col",children:"Spend"})]})}),n.jsx("tbody",{children:s.attempts.map(y=>n.jsxs("tr",{children:[n.jsx("th",{scope:"row","data-label":"Attempt ID",children:y.attemptId}),n.jsx("td",{"data-label":"Role",children:y.role}),n.jsx("td",{"data-label":"Status",children:n.jsx(xt,{value:y.status})}),n.jsx("td",{"data-label":"Started",children:st(y.startedAt)}),n.jsx("td",{"data-label":"Ended",children:st(y.endedAt)}),n.jsx("td",{"data-label":"Latency",children:Yt(y.latencyMs)}),n.jsx("td",{"data-label":"Commit",children:Yt(y.commitMs)}),n.jsx("td",{"data-label":"Provider",children:y.provider?n.jsxs("span",{className:"inline-flex items-center",children:[n.jsx(pl,{provider:y.provider}),y.provider]}):"Unavailable"}),n.jsx("td",{"data-label":"Model",children:y.model??"Unavailable"}),n.jsx("td",{"data-label":"Credential",children:y.credentialId??"Unavailable"}),n.jsx("td",{"data-label":"Failure",children:y.failureKind?n.jsx(xt,{value:y.failureKind}):"None"}),n.jsx("td",{"data-label":"Tokens",children:n.jsx(ap,{tokens:y.tokens})}),n.jsx("td",{"data-label":"Spend",children:n.jsx(np,{spend:y.spend})})]},y.attemptId))})]})})]})]}),n.jsxs("section",{"aria-labelledby":"detail-coverage",className:"dialog-section",children:[n.jsx("h3",{id:"detail-coverage",className:"dialog-section-title",children:"Detail coverage"}),s.panelCoverage.length===0?n.jsx("p",{className:"null-value",children:"No panel coverage record was supplied."}):s.panelCoverage.map(y=>n.jsx(Gl,{label:`Detail ${y.panel}`,value:y},y.panel))]})]})})}function Up({value:s,onValueChange:d,options:f,ariaLabel:u,className:p}){const y=f.map(R=>typeof R=="string"?{value:R,label:R}:R);return n.jsx("div",{role:"tablist","aria-label":u,className:`segmented-control ${p??""}`,children:y.map(R=>{const q=s===R.value;return n.jsx("button",{type:"button",role:"tab","aria-selected":q,onClick:()=>d(R.value),className:`segmented-option ${q?"active":""}`,children:R.label},R.value)})})}function kn(s){return s===null?"Unavailable":s>=1e6?`${(s/1e6).toFixed(1)}M`:s>=1e3?`${(s/1e3).toFixed(1)}K`:String(s)}function pa({icon:s,label:d,value:f,hint:u,subtitle:p,className:y}){return n.jsxs("article",{className:`card ${y??""}`,title:u,children:[n.jsxs("div",{className:"card-header",children:[n.jsx("h2",{className:"card-label",children:d}),n.jsx("span",{className:"card-icon-pill",children:n.jsx(s,{className:"card-icon","aria-hidden":"true"})})]}),n.jsx("p",{className:"card-value",children:f}),p?n.jsx("small",{className:"card-hint",children:p}):null]})}function z1({snapshot:s}){const d=s.summary,f=s.panelCoverage.find(be=>be.panel==="summary"),u=d.tokens.reported.reportedInput,p=d.tokens.estimated.estimatedInput,y=u.value??p.value,R=[`Reported: ${Ae(u.value)} (${u.source}; observed ${st(u.observedAt)})`,`Estimated: ${Ae(p.value)} (${p.source}; observed ${st(p.observedAt)}${p.method===null?"":`; ${p.method}`})`].join(`
|
|
280
|
+
`),q=u.value!==null&&p.value!==null&&u.value!==p.value?`Rep: ${kn(u.value)} · Est: ${kn(p.value)}`:u.value!==null?"Provider reported":p.value!==null?"Relay estimated":"No token counts",x=d.tokens.reported.reportedOutput,v=d.tokens.estimated.estimatedOutput,U=x.value??v.value,k=[`Reported: ${Ae(x.value)} (${x.source}; observed ${st(x.observedAt)})`,`Estimated: ${Ae(v.value)} (${v.source}; observed ${st(v.observedAt)}${v.method===null?"":`; ${v.method}`})`].join(`
|
|
281
|
+
`),V=x.value!==null&&v.value!==null&&x.value!==v.value?`Rep: ${kn(x.value)} · Est: ${kn(v.value)}`:x.value!==null?"Provider reported":v.value!==null?"Relay estimated":"No token counts",L=d.spend,Q=L===null?null:L.providerPublishedReported.amountMicrousd??L.providerPublishedEstimated.amountMicrousd??L.referenceReported.amountMicrousd??L.referenceEstimated.amountMicrousd,I=L===null?null:L.providerPublishedReported.amountMicrousd!==null?"Provider reported":L.providerPublishedEstimated.amountMicrousd!==null?"Provider estimated":L.referenceReported.amountMicrousd!==null?"Reference reported":L.referenceEstimated.amountMicrousd!==null?"Reference estimated":null,oe=L===null?"Spend details unavailable":[`Provider reported: ${ya(L.providerPublishedReported.amountMicrousd)}`,`Provider estimated: ${ya(L.providerPublishedEstimated.amountMicrousd)}`,`Reference reported: ${ya(L.referenceReported.amountMicrousd)}`,`Reference estimated: ${ya(L.referenceEstimated.amountMicrousd)}`,`Unpriced requests: ${Ae(L.unpricedRequests)}`,`Partially priced requests: ${Ae(L.partiallyPricedRequests)}`].join(`
|
|
282
|
+
`),ae=L===null?"Unavailable":n.jsxs(n.Fragment,{children:[n.jsx("span",{children:"Unpriced requests"}),": ",Ae(L.unpricedRequests),I!==null?` · ${I}`:""]});return n.jsxs("section",{className:"summary","aria-label":"Summary",children:[n.jsx(Gl,{label:"Summary",value:f}),n.jsxs("div",{className:"summary-grid",children:[n.jsx(pa,{icon:us,label:"Requests",value:Ae(d.requests),subtitle:`${Ae(d.attempts)} attempts · ${Ae(d.served)} served`,hint:`${Ae(d.attempts)} attempts; ${Ae(d.served)} served; ${Ae(d.errored)} errors; ${Ae(d.cancelled)} cancelled`}),n.jsx(pa,{icon:Va,label:"Success rate",value:Wc(d.successRate),subtitle:d.requests>0?`${Ae(d.served)} of ${Ae(d.requests)} requests`:"No requests"}),n.jsx(pa,{icon:$g,label:"Input tokens",value:kn(y),subtitle:q,hint:R}),n.jsx(pa,{icon:Fg,label:"Output tokens",value:kn(U),subtitle:V,hint:k}),n.jsx(pa,{icon:Vc,label:"Avg latency",value:Yt(d.avgLatencyMs),subtitle:"Mean request duration"}),n.jsx(pa,{icon:Rp,label:"P95 latency",value:Yt(d.p95LatencyMs),subtitle:"95th percentile"}),n.jsx(pa,{icon:wi,label:"Avg commit",value:Yt(d.avgCommitMs),subtitle:"Time to first byte"}),n.jsx(pa,{icon:Mp,label:"Spend",value:ya(Q),subtitle:ae,hint:oe,className:"spend-card"})]})]})}const op=["1h","24h","7d","30d","today","month","lifetime"],qp="llm-relay.dashboard.theme.v1";function T1(){try{const s=window.localStorage.getItem(qp);return s==="light"||s==="dark"?s:null}catch{return null}}function E1(s){try{window.localStorage.setItem(qp,s)}catch{}}const M1=[["chart-request-timeline-heading","Requests"],["chart-token-timeline-heading","Tokens"],["chart-latency-timeline-heading","Latency"],["chart-commit-timeline-heading","Commit"],["provider-heading","Providers"],["model-heading","Models"],["client-heading","Clients"],["credential-heading","Credentials"],["spend-heading","Spend"],["errors-heading","Errors"],["quotas-heading","Quotas"],["cooldowns-heading","Cooldowns"]];function R1(){const[s,d]=T.useState(()=>({visible:document.visibilityState==="visible",online:navigator.onLine}));return T.useEffect(()=>{const f=()=>d({visible:document.visibilityState==="visible",online:navigator.onLine});return window.addEventListener("online",f),window.addEventListener("offline",f),document.addEventListener("visibilitychange",f),()=>{window.removeEventListener("online",f),window.removeEventListener("offline",f),document.removeEventListener("visibilitychange",f)}},[]),s}function cp(s){return(s instanceof DOMException||s instanceof Error)&&s.name==="AbortError"}function ha({label:s,value:d,values:f,onChange:u}){return n.jsxs("label",{children:[s,n.jsx("select",{value:d,onChange:p=>u(p.target.value),children:f.map(p=>n.jsx("option",{value:p,children:p},p))})]})}function O1({session:s,onSessionExpired:d,onLogout:f,showRecentTable:u=!1}){const[p,y]=T.useState(wg),[R,q]=T.useState(u);T.useEffect(()=>{q(u)},[u]);const[x,v]=T.useState(()=>T1()??"dark"),U=()=>{const A=x==="light"?"dark":"light";v(A),E1(A)},[k,V]=T.useState(!1),[L,Q]=T.useState(null),I=T.useRef(null),oe=T.useRef(null),ae=T.useRef(!1),be=T.useRef(null),$=T.useRef(null),ee=T.useRef(null),Y=T.useRef(0),ce=T.useRef(0),X=R1(),xe=zp(p),he=X.visible&&X.online,[De,ke]=T.useState(()=>({key:xe,data:null,lastGoodAt:null,loading:!1,error:null})),[qe,ie]=T.useState({requestId:null,data:null,loading:!1,error:null}),ye=T.useCallback(()=>{var A;(A=be.current)==null||A.controller.abort(),be.current=null},[]),re=T.useCallback(()=>{var A;(A=$.current)==null||A.controller.abort(),$.current=null},[]),E=T.useCallback(()=>{queueMicrotask(()=>{var B;const A=I.current;A!=null&&A.isConnected?A.focus():(B=oe.current)==null||B.focus()})},[]),H=T.useCallback(()=>{if(!he)return;ye();const A=++Y.current,B=new AbortController;be.current={controller:B,sequence:A},ke(J=>J.key===xe?{...J,loading:!0,error:null}:{key:xe,data:null,lastGoodAt:null,loading:!0,error:null}),Gg(s,p,B.signal).then(J=>{B.signal.aborted||A!==Y.current||ke({key:xe,data:J,lastGoodAt:new Date().toISOString(),loading:!1,error:null})}).catch(J=>{if(!(B.signal.aborted||A!==Y.current||cp(J))){if(ep(J)){d();return}ke(te=>te.key===xe?{...te,loading:!1,error:"Refresh failed. Showing the last good snapshot when available."}:te)}}).finally(()=>{var J;((J=be.current)==null?void 0:J.sequence)===A&&(be.current=null)})},[ye,p,d,he,s,xe]);T.useEffect(()=>{if(!he){ye();return}return H(),ye},[ye,H,he,xe]),T.useEffect(()=>{if(!he)return;const A=window.setInterval(()=>{be.current||H()},3e4);return()=>window.clearInterval(A)},[H,he]),T.useEffect(()=>()=>{var A;ye(),re(),(A=ee.current)==null||A.abort()},[re,ye]),T.useEffect(()=>{re(),ie({requestId:null,data:null,loading:!1,error:null})},[re,p,he]),T.useEffect(()=>{if(qe.data!==null){ae.current=!0;return}ae.current&&(ae.current=!1,E())},[qe.data,E]);const K=(A,B)=>y(J=>({...J,[A]:B})),ue=T.useMemo(()=>({providers:De.data?["all",...De.data.providers.map(A=>A.provider)]:["all"],models:De.data?["all",...De.data.models.map(A=>A.model)]:["all"],clients:De.data?["all",...De.data.clients.map(A=>A.client)]:["all"],credentials:De.data?["all",...De.data.credentials.map(A=>A.credentialId)]:["all"]}),[De.data]),Te=A=>{if(!he)return;re();const B=++ce.current,J=new AbortController;$.current={controller:J,sequence:B},ie({requestId:A,data:null,loading:!0,error:null}),Xg(s,A,p.includeRepair,J.signal).then(te=>{!J.signal.aborted&&B===ce.current&&ie({requestId:A,data:te,loading:!1,error:null})}).catch(te=>{if(!(J.signal.aborted||B!==ce.current||cp(te))){if(ep(te)){d();return}ie({requestId:A,data:null,loading:!1,error:"Request details are unavailable."})}}).finally(()=>{var te;((te=$.current)==null?void 0:te.sequence)===B&&($.current=null)})},h=De.key===xe?De.data:null,N=X.online?X.visible?De.loading?"Refreshing measurements…":De.error??(h?"Last updated "+st(De.lastGoodAt)+".":"Loading measurements…"):"Polling paused while this tab is hidden.":h?"Offline: showing the last good snapshot.":"Offline: no snapshot available.";return n.jsxs("main",{className:"app "+x,"data-theme":x,"aria-busy":De.loading,children:[n.jsxs("header",{children:[n.jsxs("div",{children:[n.jsx("p",{className:"eyebrow",children:"Read-only relay analytics"}),n.jsx("h1",{ref:oe,tabIndex:-1,children:"Usage and fleet health"})]}),n.jsxs("div",{className:"header-actions",children:[n.jsxs("button",{type:"button",onClick:()=>q(A=>!A),children:[n.jsx(Op,{"aria-hidden":"true",size:16})," ",R?"Hide recent requests":"Show recent requests"]}),n.jsxs("button",{type:"button",onClick:U,children:["Use ",x==="light"?"dark":"light"," theme"]}),n.jsxs("button",{type:"button",onClick:H,disabled:!he,children:[n.jsx(ga,{"aria-hidden":"true",size:16})," Refresh"]})]})]}),n.jsx("p",{className:"status",role:"status","aria-live":"polite",children:N}),L&&n.jsx("p",{className:"status error",role:"alert",children:L}),h&&n.jsx("nav",{className:"panel-nav","aria-label":"Jump to a panel",children:n.jsxs("ul",{children:[M1.map(([A,B])=>n.jsx("li",{children:n.jsx("a",{href:`#${A}`,children:B})},A)),R&&n.jsx("li",{children:n.jsx("a",{href:"#recent-heading",children:"Recent"})})]})}),n.jsxs("div",{className:"range-nav",children:[n.jsx("span",{className:"range-nav-label",children:"Window:"}),n.jsx(Up,{ariaLabel:"Quick time window",value:p.window,options:op,onValueChange:A=>K("window",A)})]}),n.jsxs("section",{className:"filters","aria-label":"Snapshot filters",children:[n.jsx(ha,{label:"Window",value:p.window,values:op,onChange:A=>K("window",A)}),n.jsx(ha,{label:"Attribution",value:p.attribution,values:["all","relay-held","caller-operated"],onChange:A=>K("attribution",A)}),n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:p.includeRepair,onChange:A=>K("includeRepair",A.target.checked)})," Include repair attempts"]}),n.jsx(ha,{label:"Provider",value:p.provider??"all",values:ue.providers,onChange:A=>K("provider",A==="all"?void 0:A)}),n.jsx(ha,{label:"Model",value:p.model??"all",values:ue.models,onChange:A=>K("model",A==="all"?void 0:A)}),n.jsx(ha,{label:"Client",value:p.client??"all",values:ue.clients,onChange:A=>K("client",A==="all"?void 0:A)}),n.jsx(ha,{label:"Credential",value:p.credentialId??"all",values:ue.credentials,onChange:A=>K("credentialId",A==="all"?void 0:A)}),n.jsx(ha,{label:"Outcome",value:p.outcome??"all",values:["all","success","error","cancelled","unknown"],onChange:A=>K("outcome",A==="all"?void 0:A)}),n.jsx(ha,{label:"Failure",value:p.failureKind??"all",values:["all","timeout","provider_error","auth_error","rate_limit","aborted","protocol","unknown"],onChange:A=>K("failureKind",A==="all"?void 0:A)})]}),De.error!==null&&h===null&&n.jsxs("section",{className:"panel error",role:"alert",children:[n.jsx("h2",{children:"Dashboard unavailable"}),n.jsx("p",{children:"Unable to read dashboard measurements."})]}),h&&n.jsx(N1,{snapshot:h,onDetail:Te,rememberTrigger:A=>{I.current=A},showRecentTable:R}),qe.loading&&n.jsx("p",{className:"status",role:"status",children:"Loading request details…"}),qe.error&&n.jsxs("section",{className:"panel error",role:"alert",children:[n.jsx("h2",{children:"Request details unavailable"}),n.jsx("p",{children:qe.error})]}),qe.data&&n.jsx(C1,{detail:qe.data,onClose:()=>{ie({requestId:null,data:null,loading:!1,error:null})}})]})}function xl(s,d){return s.panelCoverage.find(f=>f.panel===d)}function Hi({caption:s,headers:d,children:f}){return n.jsx("div",{className:"table-wrap",children:n.jsxs("table",{className:"responsive-table",children:[n.jsx("caption",{children:s}),n.jsx("thead",{children:n.jsx("tr",{children:d.map(u=>n.jsx("th",{scope:"col",children:u},u))})}),n.jsx("tbody",{children:f})]})})}function qn({id:s,title:d,icon:f,rowCount:u,children:p}){return n.jsxs("section",{className:"panel","aria-labelledby":s+"-heading",children:[n.jsx("div",{className:"panel-header",children:n.jsxs("h2",{id:s+"-heading",className:"panel-title",children:[f&&n.jsx(f,{className:"panel-icon","aria-hidden":"true"}),d," ",n.jsxs("span",{className:"panel-count",children:["(",Ae(u)," row",u===1?"":"s",")"]})]})}),p]})}function rs(s){return s??"Unavailable"}function Hp(s){return JSON.stringify([s.credentialId,s.provider,s.deployment,s.axis,s.period,s.limit,s.resetsAt,s.observedAt])}function _1(s){return JSON.stringify([s.credentialId,s.provider,s.deployment,s.reason,s.until,s.observedAt])}function N1({snapshot:s,onDetail:d,rememberTrigger:f,showRecentTable:u=!1}){const p=s.buckets.map(y=>({id:y.from,label:m1(y.from,s.window),requests:y.requests,attempts:y.attempts,reportedInput:y.tokens.reported.reportedInput.value,reportedOutput:y.tokens.reported.reportedOutput.value,cachedInput:y.tokens.reported.reportedCachedInput.value,estimatedInput:y.tokens.estimated.estimatedInput.value,estimatedOutput:y.tokens.estimated.estimatedOutput.value,avgLatency:y.avgLatencyMs,p95Latency:y.p95LatencyMs,avgCommit:y.avgCommitMs}));return n.jsxs(n.Fragment,{children:[n.jsx(z1,{snapshot:s}),n.jsxs("div",{className:"analytics-grid",children:[n.jsx("div",{className:"col-span-2",children:n.jsx(ls,{id:"request-timeline",title:"Request timeline",icon:Xc,rows:p,columns:[{key:"requests",label:"Requests"},{key:"attempts",label:"Attempts"}],panelCoverage:xl(s,"request_timeline")})}),n.jsx("div",{className:"col-span-2",children:n.jsx(ls,{id:"token-timeline",title:"Token timeline",icon:t1,rows:p,columns:[{key:"reportedInput",label:"Reported input"},{key:"reportedOutput",label:"Reported output"},{key:"cachedInput",label:"Reported cached input"},{key:"estimatedInput",label:"Estimated input"},{key:"estimatedOutput",label:"Estimated output"}],panelCoverage:xl(s,"token_timeline")})}),n.jsx("div",{children:n.jsx(ls,{id:"latency-timeline",title:"Latency timeline",icon:Vc,rows:p,columns:[{key:"avgLatency",label:"Average latency (ms)"},{key:"p95Latency",label:"P95 latency (ms)"}],panelCoverage:xl(s,"latency")})}),n.jsx("div",{children:n.jsx(ls,{id:"commit-timeline",title:"Commit timeline",icon:wi,rows:p,columns:[{key:"avgCommit",label:"Average commit (ms)"}],panelCoverage:xl(s,"commit")})}),n.jsx("div",{className:"col-span-2",children:n.jsx(as,{snapshot:s,panel:"provider",title:"Providers",icon:Np,rows:s.providers,label:y=>y.provider})}),n.jsx("div",{className:"col-span-2",children:n.jsx(as,{snapshot:s,panel:"model",title:"Models",icon:ki,rows:s.models,label:y=>{const R=y;return R.provider+" / "+R.model}})}),n.jsx("div",{className:"col-span-2",children:n.jsx(as,{snapshot:s,panel:"client",title:"Clients",icon:ds,rows:s.clients,label:y=>y.client})}),n.jsx("div",{className:"col-span-2",children:n.jsx(as,{snapshot:s,panel:"credential",title:"Credentials",icon:fs,rows:s.credentials,label:y=>{const R=y;return R.provider+" / "+R.label+" ("+R.credentialId+")"}})}),n.jsx("div",{className:"col-span-2",children:n.jsx(D1,{snapshot:s})}),n.jsx("div",{className:"col-span-2",children:n.jsx(k1,{snapshot:s})}),n.jsx("div",{className:"col-span-2",children:n.jsx(U1,{snapshot:s})}),n.jsx("div",{className:"col-span-2",children:n.jsx(q1,{snapshot:s})}),u&&n.jsx("div",{className:"col-span-2",children:n.jsx(H1,{snapshot:s,onDetail:d,rememberTrigger:f})})]})]})}function D1({snapshot:s}){const d=s.summary.spend,f=[["Provider-published / reported",d.providerPublishedReported],["Provider-published / estimated",d.providerPublishedEstimated],["Reference / reported",d.referenceReported],["Reference / estimated",d.referenceEstimated]];return n.jsxs(qn,{id:"spend",title:"Spend detail",icon:Mp,rowCount:f.length,children:[n.jsx(Gl,{label:"Spend",value:xl(s,"spend")}),n.jsxs(Hi,{caption:"Spend cells are intentionally not blended",headers:["Cell","Amount","Price source","Token basis","Measurement source","Observed"],children:[f.map(([u,p])=>n.jsxs("tr",{children:[n.jsx("th",{scope:"row","data-label":"Cell",style:{whiteSpace:"nowrap"},children:u}),n.jsx("td",{"data-label":"Amount",style:{whiteSpace:"nowrap"},children:ya(p.amountMicrousd)}),n.jsx("td",{"data-label":"Price source",style:{whiteSpace:"nowrap"},children:p.priceSource}),n.jsx("td",{"data-label":"Token basis",style:{whiteSpace:"nowrap"},children:p.tokenBasis}),n.jsx("td",{"data-label":"Measurement source",style:{whiteSpace:"nowrap"},children:p.source}),n.jsx("td",{"data-label":"Observed",style:{whiteSpace:"nowrap"},children:st(p.observedAt)})]},u)),n.jsxs("tr",{children:[n.jsx("th",{scope:"row","data-label":"Cell",children:"Unpriced requests"}),n.jsx("td",{"data-label":"Amount",colSpan:5,children:Ae(d.unpricedRequests)})]}),n.jsxs("tr",{children:[n.jsx("th",{scope:"row","data-label":"Cell",children:"Partially priced requests"}),n.jsx("td",{"data-label":"Amount",colSpan:5,children:d.partiallyPricedRequests>0?Ae(d.partiallyPricedRequests)+" — amounts above are lower bounds":"0"})]})]})]})}function Bp(s){if(s===null)return"Unavailable";const d=s.reported.reportedInput.value??s.estimated.estimatedInput.value,f=s.reported.reportedOutput.value??s.estimated.estimatedOutput.value;return d===null&&f===null?"Unavailable":`${Ae(d)} in / ${Ae(f)} out`}function Lp(s){if(s===null)return"Unavailable";const d=s.providerPublishedReported.amountMicrousd??s.providerPublishedEstimated.amountMicrousd??s.referenceReported.amountMicrousd??s.referenceEstimated.amountMicrousd;return d===null?"Unavailable":ya(d)+(s.partiallyPricedRequests>0?" (lower bound)":"")}function as({snapshot:s,panel:d,title:f,icon:u,rows:p,label:y}){return n.jsxs(qn,{id:d,title:f,icon:u,rowCount:p.length,children:[n.jsx(Gl,{label:f,value:xl(s,d)}),n.jsx(Hi,{caption:f+" breakdown",headers:["Dimension","Requests","Attempts","Served","Errors","Cancelled","Success","Latency","Commit","Tokens","Spend"],children:p.length===0?n.jsx("tr",{children:n.jsx("td",{className:"empty-row",colSpan:11,children:"No matching measurements."})}):p.map(R=>{const q=d==="provider"||d==="model"||d==="credential"?R.provider:null;return n.jsxs("tr",{children:[n.jsx("th",{scope:"row","data-label":"Dimension",children:n.jsxs("span",{className:"inline-flex items-center",children:[q&&n.jsx(pl,{provider:q}),y(R)]})}),n.jsx("td",{"data-label":"Requests",children:Ae(R.requests)}),n.jsx("td",{"data-label":"Attempts",children:Ae(R.attempts)}),n.jsx("td",{"data-label":"Served",children:Ae(R.served)}),n.jsx("td",{"data-label":"Errors",children:Ae(R.errored)}),n.jsx("td",{"data-label":"Cancelled",children:Ae(R.cancelled)}),n.jsx("td",{"data-label":"Success",children:Wc(R.successRate)}),n.jsx("td",{"data-label":"Latency",children:Yt(R.avgLatencyMs)}),n.jsx("td",{"data-label":"Commit",children:Yt(R.avgCommitMs)}),n.jsx("td",{"data-label":"Tokens",children:Bp(R.tokens)}),n.jsx("td",{"data-label":"Spend",children:Lp(R.spend)})]},y(R))})})]})}function k1({snapshot:s}){return n.jsxs(qn,{id:"errors",title:"Normalized errors",icon:ss,rowCount:s.errors.length,children:[n.jsx(Gl,{label:"Errors",value:xl(s,"errors")}),n.jsx(Hi,{caption:"Normalized error distribution",headers:["Failure kind","Outcome","Requests"],children:s.errors.length===0?n.jsx("tr",{children:n.jsx("td",{className:"empty-row",colSpan:3,children:"No matching measurements."})}):s.errors.map(d=>n.jsxs("tr",{children:[n.jsx("th",{scope:"row","data-label":"Failure kind",children:n.jsx(xt,{value:d.failureKind})}),n.jsx("td",{"data-label":"Outcome",children:n.jsx(xt,{value:d.outcome})}),n.jsx("td",{"data-label":"Requests",children:Ae(d.requests)})]},d.failureKind+"-"+d.outcome))})]})}const kc=["Deployment","Axis / period","Remaining","Limit","Local used","Headroom","Resets","Observed"];function w1({row:s}){return n.jsxs("tr",{children:[n.jsxs("th",{scope:"row","data-label":"Deployment",children:[n.jsxs("span",{className:"inline-flex items-center",children:[n.jsx(pl,{provider:s.provider}),n.jsx("strong",{children:s.label})]}),s.deployment!==null&&n.jsxs("span",{className:"muted",children:[" · ",s.deployment]}),n.jsxs("small",{className:"muted",children:[" (",s.credentialId,")"]})]}),n.jsxs("td",{"data-label":"Axis / period",children:[s.axis," / ",s.period]}),n.jsxs("td",{"data-label":"Remaining",children:[n.jsx("span",{className:"quota-value",children:Ae(s.remaining)})," ",n.jsx(es,{value:s.remainingBasis})]}),n.jsxs("td",{"data-label":"Limit",children:[n.jsx("span",{className:"quota-value",children:Ae(s.limit)})," ",n.jsx(es,{value:s.limitBasis})]}),n.jsxs("td",{"data-label":"Local used",children:[n.jsx("span",{className:"quota-value",children:Ae(s.localUsed)})," ",n.jsx(es,{value:s.localUsedBasis})]}),n.jsx("td",{"data-label":"Headroom",children:Wc(p1(s))}),n.jsxs("td",{"data-label":"Resets",children:[s.resetsAt===null?"Unavailable":n.jsx("span",{className:"quota-relative",title:st(s.resetsAt),children:Ui(s.resetsAt)})," ",s.resetsAtBasis!==null&&n.jsx(es,{value:s.resetsAtBasis})]}),n.jsx("td",{"data-label":"Observed",title:st(s.observedAt),children:s.observedAt===null?"Unavailable":Ui(s.observedAt)})]},Hp(s))}function U1({snapshot:s}){const d=s.quotas,f=h1(d);return n.jsxs(qn,{id:"quotas",title:"Quota headroom",icon:Vc,rowCount:d.length,children:[n.jsx(Gl,{label:"Quotas",value:xl(s,"quotas")}),n.jsx("div",{className:"table-wrap",children:n.jsxs("table",{className:"responsive-table quota-table",children:[n.jsx("caption",{children:"Quota measurements and derived headroom, grouped by provider"}),n.jsx("thead",{children:n.jsx("tr",{children:kc.map(u=>n.jsx("th",{scope:"col",children:u},u))})}),d.length===0?n.jsx("tbody",{children:n.jsx("tr",{children:n.jsx("td",{className:"empty-row",colSpan:kc.length,children:"No matching measurements."})})}):f.map(([u,p])=>n.jsxs("tbody",{children:[n.jsx("tr",{className:"group-row",children:n.jsxs("th",{scope:"rowgroup",colSpan:kc.length,children:[n.jsxs("span",{className:"group-name",children:[n.jsx(pl,{provider:u}),u]})," ",n.jsxs("span",{className:"muted",children:["(",p.length,")"]})]})}),p.map(y=>n.jsx(w1,{row:y},Hp(y)))]},u))]})})]})}function q1({snapshot:s}){return n.jsxs(qn,{id:"cooldowns",title:"Cooldowns",icon:Rp,rowCount:s.cooldowns.length,children:[n.jsx(Gl,{label:"Cooldowns",value:xl(s,"cooldowns")}),n.jsx(Hi,{caption:"Normalized cooldowns",headers:["Credential","Provider","Deployment","Reason","Until","Observed"],children:s.cooldowns.length===0?n.jsx("tr",{children:n.jsx("td",{className:"empty-row",colSpan:6,children:"No matching measurements."})}):s.cooldowns.map(d=>n.jsxs("tr",{children:[n.jsx("th",{scope:"row","data-label":"Credential",children:d.credentialId}),n.jsx("td",{"data-label":"Provider",children:n.jsxs("span",{className:"inline-flex items-center",children:[n.jsx(pl,{provider:d.provider}),d.provider]})}),n.jsx("td",{"data-label":"Deployment",children:rs(d.deployment)}),n.jsx("td",{"data-label":"Reason",children:n.jsx(xt,{value:d.reason})}),n.jsx("td",{"data-label":"Until",children:st(d.until)}),n.jsx("td",{"data-label":"Observed",children:st(d.observedAt)})]},_1(d)))})]})}function H1({snapshot:s,onDetail:d,rememberTrigger:f}){return n.jsxs(qn,{id:"recent",title:"Recent requests",icon:Op,rowCount:s.recentRequests.length,children:[n.jsx(Gl,{label:"Recent requests",value:xl(s,"recent")}),n.jsx(Hi,{caption:"Bounded recent request projection",headers:["Request","Occurred","Client","Attribution","Outcome","Failure","Attempts","Latency","Commit","Provider","Model","Credential","Tokens","Spend","Repair included","Details"],children:s.recentRequests.length===0?n.jsx("tr",{children:n.jsx("td",{className:"empty-row",colSpan:16,children:"No matching measurements."})}):s.recentRequests.map(u=>n.jsxs("tr",{children:[n.jsx("th",{scope:"row","data-label":"Request",children:u.requestId}),n.jsx("td",{"data-label":"Occurred",title:st(u.occurredAt),children:Ui(u.occurredAt)}),n.jsx("td",{"data-label":"Client",children:rs(u.client)}),n.jsx("td",{"data-label":"Attribution",children:u.attribution}),n.jsx("td",{"data-label":"Outcome",children:n.jsx(xt,{value:u.outcome})}),n.jsx("td",{"data-label":"Failure",children:u.failureKind?n.jsx(xt,{value:u.failureKind}):"None"}),n.jsx("td",{"data-label":"Attempts",children:Ae(u.attemptCount)}),n.jsx("td",{"data-label":"Latency",children:Yt(u.latencyMs)}),n.jsx("td",{"data-label":"Commit",children:Yt(u.commitMs)}),n.jsx("td",{"data-label":"Provider",children:u.provider?n.jsxs("span",{className:"inline-flex items-center",children:[n.jsx(pl,{provider:u.provider}),u.provider]}):"Unavailable"}),n.jsx("td",{"data-label":"Model",children:rs(u.model)}),n.jsx("td",{"data-label":"Credential",children:rs(u.credentialId)}),n.jsx("td",{"data-label":"Tokens",children:Bp(u.tokens)}),n.jsx("td",{"data-label":"Spend",children:Lp(u.spend)}),n.jsx("td",{"data-label":"Repair included",children:u.repairIncluded?"Yes":"No"}),n.jsx("td",{"data-label":"Details",children:n.jsxs("button",{type:"button",onClick:p=>{f(p.currentTarget),d(u.requestId)},children:[n.jsx("span",{className:"sr-only",children:"View request "}),u.requestId]})})]},u.requestId))})]})}const B1=["all","low","medium","high","xhigh"];function L1(s){return s===void 0||Number.isNaN(s)?"—":s>=6e4?`${(s/6e4).toFixed(1)}m`:s>=1e3?`${(s/1e3).toFixed(1)}s`:`${Math.round(s)}ms`}function Y1({onTestInPlayground:s,controlToken:d,onSetControlToken:f}={}){var tt,sl,ja,Kt,Nt;const[u,p]=T.useState("all"),[y,R]=T.useState("resolution"),[q,x]=T.useState(null),[v,U]=T.useState([]),[k,V]=T.useState(null),[L,Q]=T.useState(!1),[I,oe]=T.useState(null),[ae,be]=T.useState(""),[$,ee]=T.useState(0),[Y,ce]=T.useState(!1),[X,xe]=T.useState(!1),[he,De]=T.useState(!1),[ke,qe]=T.useState(!0),[ie,ye]=T.useState({}),[re,E]=T.useState(null),[H,K]=T.useState("curl"),[ue,Te]=T.useState(!1),[h,N]=T.useState(!1),[A,B]=T.useState(null),[J,te]=T.useState(""),ve=d??J,et=M=>{te(M),f==null||f(M)},[Ye,Qt]=T.useState(!1),[nl,il]=T.useState(null),[ba,St]=T.useState(null),[_t,xa]=T.useState(""),Sa=async M=>{ye(F=>({...F,[M]:{status:"testing"}}));const G=performance.now();try{const F=await fetch("/v1/chat/completions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:M,messages:[{role:"user",content:"ping"}],max_tokens:1})}),de=Math.round(performance.now()-G);if(F.ok)ye(Xe=>({...Xe,[M]:{status:"ok",latencyMs:de}}));else{const Xe=await F.text().catch(()=>`HTTP ${F.status}`);ye(jt=>({...jt,[M]:{status:"err",error:`HTTP ${F.status}`,latencyMs:de}}))}}catch{const F=Math.round(performance.now()-G);ye(de=>({...de,[M]:{status:"err",error:"Failed to connect",latencyMs:F}}))}},Qa=async()=>{N(!0),B(null);try{const M={"Content-Type":"application/json"};ve&&(M["x-llm-relay-control-token"]=ve);const G=await fetch("/cooldowns/clear",{method:"POST",headers:M});G.ok?(B("All active cooldowns and circuit breakers cleared."),rl()):B(`Failed to clear cooldowns (HTTP ${G.status}).`)}catch{B("Failed to reach relay endpoint.")}finally{N(!1),setTimeout(()=>B(null),3500)}},rl=T.useCallback(async()=>{Q(!0),oe(null);try{const M=u==="all"?"/dispatch":`/dispatch?tier=${encodeURIComponent(u)}`,[G,F,de]=await Promise.all([fetch(M,{headers:{Accept:"application/json"}}),fetch("/v1/models",{headers:{Accept:"application/json"}}),fetch("/telemetry",{headers:{Accept:"application/json"}}).catch(()=>null)]);if(G.ok){const Xe=await G.json();x(Xe)}if(F.ok){const Xe=await F.json();Array.isArray(Xe.data)&&U(Xe.data)}if(de&&de.ok){const Xe=await de.json();Xe&&typeof Xe=="object"&&V(Xe)}}catch{oe("Failed to load dispatch ladder or models from local relay.")}finally{Q(!1)}},[u]);T.useEffect(()=>{rl()},[rl]),T.useEffect(()=>{const M=setInterval(()=>{fetch("/telemetry",{headers:{Accept:"application/json"}}).then(G=>G.ok?G.json():null).then(G=>{G&&V(G)}).catch(()=>{})},1e4);return()=>clearInterval(M)},[]);const Xl=async(M,G,F)=>{St(null);try{const de={[M]:G};u!=="all"&&(de.tier=u);const Xe=await fetch("/dispatch",{method:"POST",headers:{"Content-Type":"application/json","x-llm-relay-control-token":F.trim()},body:JSON.stringify(de)});if(Xe.ok){const jt=Xe.headers.get("x-llm-relay-lane-pin");St(jt??`${M==="pin"?"Pinned":"Unpinned"} lane ${G}`),rl()}else{const jt=await Xe.text();oe(`Failed to ${M} lane: ${jt}`)}}catch(de){oe(de instanceof Error?de.message:"Pin operation failed")}},jl=(M,G)=>{if(!ve){il({action:M,laneId:G}),Qt(!0);return}Xl(M,G,ve)},Ka=M=>{M.preventDefault(),_t.trim()&&(et(_t.trim()),Qt(!1),nl&&(Xl(nl.action,nl.laneId,_t.trim()),il(null)))},_=T.useMemo(()=>{let M=v;const G=ae.trim().toLowerCase();return G&&(M=M.filter(F=>F.id.toLowerCase().includes(G)||(F.description??"").toLowerCase().includes(G))),$>0&&(M=M.filter(F=>(F.context_window??0)>=$)),Y&&(M=M.filter(F=>F.id.toLowerCase().includes("vision")||(F.description??"").toLowerCase().includes("vision"))),X&&(M=M.filter(F=>!F.id.toLowerCase().includes("no-tool")&&!(F.description??"").toLowerCase().includes("no tool"))),M},[v,ae,$,Y,X]),ne=T.useMemo(()=>{const M=(q==null?void 0:q.ladder)??[];if(y==="configured")return[...M].sort((F,de)=>F.position-de.position);const G=(q==null?void 0:q.order)??[];return[...M].sort((F,de)=>{const Xe=G.indexOf(F.id),jt=G.indexOf(de.id);return Xe!==-1&&jt!==-1?Xe-jt:Xe!==-1?-1:jt!==-1?1:F.position-de.position})},[q,y]),ge=T.useMemo(()=>{const M=[];if(k!=null&&k.providers)for(const G of k.providers)G.cooldownRemainingMs>0&&M.push({name:G.displayName||G.provider,remainingMs:G.cooldownRemainingMs,status:G.lastStatus});if(q!=null&&q.ladder)for(const G of q.ladder)(G.state==="cooldown"||G.state==="demoted")&&(M.some(F=>F.name===G.id)||M.push({name:G.id,remainingMs:3e4}));return M},[k,q]),Ge=(q==null?void 0:q.order)??[],Me=q==null?void 0:q.next;return n.jsxs("div",{className:"space-y-6",style:{display:"flex",flexDirection:"column",gap:"1.5rem"},children:[n.jsxs("section",{style:{borderRadius:"0.5rem",border:ge.length>0?"1px solid rgba(239, 68, 68, 0.4)":"1px solid var(--border)",backgroundColor:ge.length>0?"rgba(239, 68, 68, 0.05)":"var(--card)",overflow:"hidden"},children:[n.jsxs("button",{type:"button",onClick:()=>qe(M=>!M),style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0.85rem 1.25rem",background:"none",border:"none",color:"var(--foreground)",cursor:"pointer",textAlign:"left"},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.75rem"},children:[n.jsx("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"2rem",height:"2rem",borderRadius:"9999px",backgroundColor:ge.length>0?"rgba(239, 68, 68, 0.15)":"rgba(16, 185, 129, 0.15)",color:ge.length>0?"var(--danger)":"#10b981"},children:ge.length>0?n.jsx(ss,{size:16}):n.jsx(Va,{size:16})}),n.jsxs("div",{children:[n.jsx("div",{style:{fontWeight:600,fontSize:"0.95rem"},children:"Active Cooldowns & Penalty Inspector"}),n.jsx("div",{style:{fontSize:"0.75rem",color:"var(--muted-foreground)"},children:ge.length>0?`${ge.length} provider(s) or model(s) currently held in cooldown or penalty backoff`:"No active rate limits, cooldowns, or penalty demotions"})]})]}),n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.75rem"},children:[ge.length>0&&n.jsxs("span",{style:{fontSize:"0.72rem",padding:"0.2rem 0.5rem",borderRadius:"9999px",backgroundColor:"rgba(239, 68, 68, 0.2)",color:"var(--danger)",fontWeight:700},children:[ge.length," in cooldown"]}),n.jsx(Pg,{size:18,style:{color:"var(--muted-foreground)",transform:ke?"rotate(0deg)":"rotate(-90deg)",transition:"transform 0.2s ease"}})]})]}),ke&&n.jsxs("div",{style:{padding:"0.85rem 1.25rem 1.25rem",borderTop:"1px solid var(--border)",display:"flex",flexDirection:"column",gap:"0.75rem"},children:[ge.length===0?n.jsx("div",{style:{fontSize:"0.8125rem",color:"var(--muted-foreground)"},children:"No active rate limits, auth errors, or circuit breaker trips recorded. Requests will proceed without penalty demotion."}):n.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"0.5rem"},children:ge.map((M,G)=>n.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0.5rem 0.75rem",borderRadius:"0.375rem",backgroundColor:"var(--surface)",border:"1px solid var(--border)",fontSize:"0.8125rem"},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[n.jsx("span",{style:{fontFamily:"monospace",fontWeight:700},children:M.name}),M.status&&n.jsxs("span",{style:{fontSize:"0.7rem",padding:"0.1rem 0.35rem",borderRadius:"0.2rem",backgroundColor:"rgba(239, 68, 68, 0.15)",color:"var(--danger)",fontWeight:600},children:["HTTP ",M.status]})]}),n.jsx("div",{style:{display:"flex",alignItems:"center",gap:"0.75rem"},children:n.jsxs("span",{style:{fontSize:"0.75rem",color:"var(--danger)",fontFamily:"monospace"},children:["~",Math.ceil(M.remainingMs/1e3),"s remaining"]})})]},G))}),n.jsx("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"0.25rem"},children:n.jsxs("button",{type:"button",onClick:()=>void Qa(),disabled:h,style:{display:"inline-flex",alignItems:"center",gap:"0.35rem",fontSize:"0.75rem",padding:"0.35rem 0.75rem",borderRadius:"0.375rem",border:"1px solid var(--border)",background:"var(--surface)",color:"var(--danger)",cursor:h?"wait":"pointer",fontWeight:600},children:[n.jsx(ga,{size:12,className:h?"animate-spin":""}),h?"Clearing Cooldowns…":"Clear All Cooldowns Now"]})})]})]}),Me&&n.jsxs("div",{style:{padding:"1.25rem",borderRadius:"0.5rem",border:"1px solid rgba(59, 130, 246, 0.35)",backgroundColor:"rgba(59, 130, 246, 0.07)",display:"flex",flexDirection:"column",gap:"0.875rem"},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:"0.75rem"},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.75rem"},children:[n.jsx("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"2.25rem",height:"2.25rem",borderRadius:"9999px",backgroundColor:"rgba(59, 130, 246, 0.2)",color:"#3b82f6"},children:n.jsx(wi,{size:18})}),n.jsxs("div",{children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[n.jsx("span",{style:{fontSize:"0.75rem",textTransform:"uppercase",fontWeight:700,color:"var(--muted-foreground)",letterSpacing:"0.05em"},children:"Next Dispatch Target"}),n.jsx(xt,{value:Me.state}),n.jsx("span",{className:"badge",style:{textTransform:"uppercase",fontSize:"0.7rem"},children:Me.kind})]}),n.jsxs("div",{style:{fontSize:"1.25rem",fontWeight:700,fontFamily:"monospace",color:"var(--foreground)"},children:[Me.id,Me.spec&&n.jsxs("span",{style:{fontSize:"0.875rem",fontWeight:400,color:"var(--muted-foreground)",marginLeft:"0.5rem"},children:["(",Me.spec,")"]})]})]})]}),n.jsx("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:s&&(Me.spec??Me.id)&&n.jsxs("button",{type:"button",onClick:()=>s(Me.spec??Me.id),style:{display:"inline-flex",alignItems:"center",gap:"0.375rem",fontSize:"0.8125rem",fontWeight:600,padding:"0.4rem 0.8rem",borderRadius:"0.375rem",border:"1px solid rgba(59, 130, 246, 0.4)",backgroundColor:"rgba(59, 130, 246, 0.15)",color:"#3b82f6",cursor:"pointer"},children:[n.jsx(Pr,{size:13})," Test Next Lane in Playground"]})})]}),(q==null?void 0:q.reason)&&n.jsxs("div",{style:{fontSize:"0.8125rem",color:"var(--muted-foreground)"},children:[n.jsx("strong",{style:{color:"var(--foreground)"},children:"Selection reason:"})," ",q.reason]}),Ge.length>0&&n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem",flexWrap:"wrap",fontSize:"0.8125rem",paddingTop:"0.5rem",borderTop:"1px solid rgba(59, 130, 246, 0.15)"},children:[n.jsx("span",{style:{fontWeight:600,color:"var(--muted-foreground)"},children:"Active resolution order:"}),Ge.map((M,G)=>{const F=M===Me.id;return n.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:"0.35rem"},children:[n.jsxs("span",{style:{padding:"0.2rem 0.55rem",borderRadius:"0.25rem",fontFamily:"monospace",fontSize:"0.8rem",fontWeight:F?700:500,backgroundColor:F?"rgba(59, 130, 246, 0.25)":"var(--row-hover)",color:F?"#3b82f6":"var(--foreground)",border:F?"1px solid rgba(59, 130, 246, 0.5)":"1px solid var(--border)"},children:["#",G+1," ",M]}),G<Ge.length-1&&n.jsx(Ig,{size:12,style:{color:"var(--muted-foreground)",opacity:.6}})]},M)})]})]}),n.jsxs("section",{className:"panel",children:[n.jsxs("div",{className:"panel-header",style:{display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap",gap:"1rem"},children:[n.jsxs("div",{children:[n.jsxs("h2",{className:"panel-title",style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[n.jsx(wi,{size:20,style:{color:"var(--primary)"}}),"Live Dispatch Ladder"]}),n.jsxs("p",{className:"muted",style:{fontSize:"0.875rem",marginTop:"0.25rem"},children:["Dynamic failover priority across peer CLIs and backend relay pools",k&&k.healthyProvidersCount!==void 0&&k.activeProvidersCount!==void 0&&n.jsxs("span",{style:{marginLeft:"0.75rem",fontWeight:500,color:"var(--foreground)"},children:["· ",k.healthyProvidersCount," of ",k.activeProvidersCount," providers healthy"]})]})]}),n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.75rem",flexWrap:"wrap"},children:[n.jsxs("div",{style:{display:"inline-flex",border:"1px solid var(--border)",borderRadius:"0.375rem",overflow:"hidden",fontSize:"0.75rem"},children:[n.jsx("button",{type:"button",onClick:()=>R("resolution"),style:{padding:"0.3rem 0.6rem",background:y==="resolution"?"var(--row-hover)":"transparent",color:y==="resolution"?"var(--accent)":"var(--muted)",border:"none",fontWeight:y==="resolution"?600:400,cursor:"pointer"},children:"Failover Order"}),n.jsx("button",{type:"button",onClick:()=>R("configured"),style:{padding:"0.3rem 0.6rem",background:y==="configured"?"var(--row-hover)":"transparent",color:y==="configured"?"var(--accent)":"var(--muted)",border:"none",borderLeft:"1px solid var(--border)",fontWeight:y==="configured"?600:400,cursor:"pointer"},children:"Config Order"})]}),n.jsx(Up,{ariaLabel:"Dispatch Tier",value:u,options:B1,onValueChange:M=>p(M)}),n.jsxs("button",{type:"button",onClick:()=>void rl(),disabled:L,className:"button-secondary",style:{display:"inline-flex",alignItems:"center",gap:"0.375rem"},children:[n.jsx(ga,{size:14,className:L?"animate-spin":""})," Refresh"]})]})]}),A&&n.jsxs("div",{style:{margin:"0.5rem 1rem",padding:"0.6rem 0.85rem",borderRadius:"0.375rem",backgroundColor:"rgba(59, 130, 246, 0.12)",color:"var(--accent)",fontSize:"0.8125rem",display:"flex",alignItems:"center",gap:"0.5rem"},children:[n.jsx(Va,{size:16})," ",A]}),ba&&n.jsxs("div",{style:{margin:"1rem 0",padding:"0.75rem 1rem",borderRadius:"0.375rem",backgroundColor:"rgba(34, 197, 94, 0.1)",color:"#16a34a",fontSize:"0.875rem",display:"flex",alignItems:"center",gap:"0.5rem"},children:[n.jsx(Va,{size:16}),ba]}),I&&n.jsx("div",{style:{margin:"1rem 0",padding:"0.75rem 1rem",borderRadius:"0.375rem",backgroundColor:"rgba(239, 68, 68, 0.1)",color:"#dc2626",fontSize:"0.875rem"},children:I}),n.jsx("div",{className:"table-wrap",children:n.jsxs("table",{className:"responsive-table",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{scope:"col",style:{width:"4rem"},children:y==="resolution"?"Order":"Pos"}),n.jsx("th",{scope:"col",children:"Lane ID"}),n.jsx("th",{scope:"col",children:"Type"}),n.jsx("th",{scope:"col",children:"Target / Spec"}),n.jsx("th",{scope:"col",children:"Capability"}),n.jsx("th",{scope:"col",children:"State"}),n.jsx("th",{scope:"col",children:"History"}),n.jsx("th",{scope:"col",style:{textAlign:"right"},children:"Actions"})]})}),n.jsx("tbody",{children:ne.length===0?n.jsx("tr",{children:n.jsx("td",{colSpan:8,className:"empty-row",children:L?"Loading dispatch rungs…":"No dispatch rungs configured for this tier."})}):ne.map(M=>{const G=!!M.pinned,F=M.id===(Me==null?void 0:Me.id),de=M.spec??M.target,Xe=Ge.indexOf(M.id);return n.jsxs("tr",{style:{backgroundColor:F?"rgba(59, 130, 246, 0.05)":void 0},children:[n.jsx("td",{"data-label":"Pos",style:{fontWeight:600},children:y==="resolution"?Xe!==-1?n.jsxs("span",{style:{color:F?"#3b82f6":void 0,fontWeight:700},children:["#",Xe+1]}):n.jsx("span",{className:"muted",children:"—"}):`#${M.position}`}),n.jsxs("th",{scope:"row","data-label":"Lane ID",children:[n.jsx("span",{style:{fontFamily:"monospace",fontSize:"0.875rem",fontWeight:F?700:500},children:M.id}),F&&n.jsx("span",{style:{marginLeft:"0.5rem",fontSize:"0.7rem",color:"#3b82f6",backgroundColor:"rgba(59, 130, 246, 0.15)",padding:"0.1rem 0.35rem",borderRadius:"0.25rem",fontWeight:700},children:"NEXT"}),M.pinned&&n.jsxs("span",{style:{marginLeft:"0.5rem",fontSize:"0.75rem",color:"#eab308",display:"inline-flex",alignItems:"center",gap:"0.25rem"},children:[n.jsx(tp,{size:12})," Pinned"]})]}),n.jsx("td",{"data-label":"Type",children:n.jsx("span",{className:"badge",style:{textTransform:"uppercase",fontSize:"0.75rem"},children:M.kind})}),n.jsx("td",{"data-label":"Target",style:{fontFamily:"monospace",fontSize:"0.875rem"},children:de??"—"}),n.jsx("td",{"data-label":"Capability",children:M.capability?n.jsx(xt,{value:M.capability}):n.jsx("span",{title:"No tier limit; available to all tiers",className:"muted",children:"— (any)"})}),n.jsx("td",{"data-label":"State",children:n.jsx(xt,{value:M.state})}),n.jsx("td",{"data-label":"History",style:{fontSize:"0.8125rem",whiteSpace:"nowrap"},children:M.stats?n.jsxs("span",{children:[M.stats.calls??M.stats.successes??0," runs · ",M.stats.failures??0," errs",M.stats.medianWallClockMs!==void 0?n.jsxs("span",{title:`${Math.round(M.stats.medianWallClockMs)}ms`,children:[" ","· ",L1(M.stats.medianWallClockMs)]}):""]}):n.jsx("span",{className:"muted",children:"No runs"})}),n.jsx("td",{"data-label":"Actions",style:{textAlign:"right"},children:n.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:"0.375rem"},children:[s&&de&&n.jsxs("button",{type:"button",onClick:()=>s(de),title:"Test target in playground",style:{display:"inline-flex",alignItems:"center",gap:"0.25rem",fontSize:"0.75rem",padding:"0.25rem 0.5rem",borderRadius:"0.25rem",border:"1px solid var(--border)",background:"transparent",cursor:"pointer",color:"var(--accent)"},children:[n.jsx(Pr,{size:11})," Test"]}),G?n.jsxs("button",{type:"button",onClick:()=>jl("unpin",M.id),style:{display:"inline-flex",alignItems:"center",gap:"0.375rem",fontSize:"0.75rem",padding:"0.25rem 0.5rem",borderRadius:"0.25rem",border:"1px solid var(--border)",background:"transparent",cursor:"pointer"},children:[n.jsx(r1,{size:12})," Unpin"]}):n.jsxs("button",{type:"button",onClick:()=>jl("pin",M.id),style:{display:"inline-flex",alignItems:"center",gap:"0.375rem",fontSize:"0.75rem",padding:"0.25rem 0.5rem",borderRadius:"0.25rem",border:"1px solid var(--border)",background:"transparent",cursor:"pointer"},children:[n.jsx(tp,{size:12})," Pin"]})]})})]},M.id)})})]})})]}),n.jsxs("section",{className:"panel",children:[n.jsxs("div",{className:"panel-header",style:{display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap",gap:"1rem"},children:[n.jsxs("div",{children:[n.jsxs("h2",{className:"panel-title",style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[n.jsx(ki,{size:20,style:{color:"var(--primary)"}}),"Configured Pools & Models"]}),n.jsxs("p",{className:"muted",style:{fontSize:"0.875rem",marginTop:"0.25rem"},children:["All models, auto-routing aliases, and dynamic effort pools advertised by the relay (",_.length," models)"]})]}),n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.6rem",flexWrap:"wrap"},children:[n.jsx("div",{style:{display:"inline-flex",gap:"0.2rem",border:"1px solid var(--border)",borderRadius:"0.4rem",padding:"0.15rem"},children:[{label:"Any Ctx",val:0},{label:"32K+",val:32e3},{label:"128K+",val:128e3},{label:"1M+",val:1e6}].map(M=>n.jsx("button",{type:"button",onClick:()=>ee(M.val),style:{fontSize:"0.72rem",padding:"0.2rem 0.45rem",borderRadius:"0.25rem",border:"none",background:$===M.val?"var(--accent)":"transparent",color:$===M.val?"#fff":"var(--muted)",fontWeight:$===M.val?600:400,cursor:"pointer"},children:M.label},M.label))}),n.jsx("button",{type:"button",onClick:()=>ce(M=>!M),style:{fontSize:"0.72rem",padding:"0.25rem 0.5rem",borderRadius:"0.35rem",border:"1px solid var(--border)",background:Y?"rgba(59, 130, 246, 0.15)":"transparent",color:Y?"var(--accent)":"var(--muted)",fontWeight:Y?600:400,cursor:"pointer"},children:"Vision"}),n.jsx("button",{type:"button",onClick:()=>xe(M=>!M),style:{fontSize:"0.72rem",padding:"0.25rem 0.5rem",borderRadius:"0.35rem",border:"1px solid var(--border)",background:X?"rgba(59, 130, 246, 0.15)":"transparent",color:X?"var(--accent)":"var(--muted)",fontWeight:X?600:400,cursor:"pointer"},children:"Tools"}),n.jsxs("div",{style:{position:"relative",minWidth:"200px"},children:[n.jsx(Kc,{size:14,style:{position:"absolute",left:"0.6rem",top:"50%",transform:"translateY(-50%)",color:"var(--muted-foreground)"}}),n.jsx("input",{type:"text",value:ae,onChange:M=>be(M.target.value),placeholder:"Search models or pools…",style:{width:"100%",padding:"0.3rem 0.5rem 0.3rem 1.85rem",borderRadius:"0.35rem",border:"1px solid var(--border)",backgroundColor:"var(--card)",color:"var(--foreground)",fontSize:"0.8rem"}})]})]})]}),n.jsx("div",{className:"table-wrap",children:n.jsxs("table",{className:"responsive-table",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{scope:"col",children:"Identifier / Target"}),n.jsx("th",{scope:"col",children:"Context Window"}),n.jsx("th",{scope:"col",children:"Ping / Latency"}),n.jsx("th",{scope:"col",children:"Capabilities"}),n.jsx("th",{scope:"col",children:"Description"}),n.jsx("th",{scope:"col",style:{textAlign:"right"},children:"Action"})]})}),n.jsx("tbody",{children:_.length===0?n.jsx("tr",{children:n.jsx("td",{colSpan:6,className:"empty-row",children:L?"Loading models catalog…":"No matching models found in relay catalog."})}):_.map(M=>{const G=ie[M.id],F=M.id.toLowerCase().includes("vision")||(M.description??"").toLowerCase().includes("vision"),de=!M.id.toLowerCase().includes("no-tool")&&!(M.description??"").toLowerCase().includes("no tool");return n.jsxs("tr",{children:[n.jsx("th",{scope:"row","data-label":"Identifier",children:n.jsx("span",{style:{fontFamily:"monospace",fontSize:"0.875rem",fontWeight:600,whiteSpace:"nowrap"},children:M.id})}),n.jsx("td",{"data-label":"Context Window",style:{fontSize:"0.8125rem"},children:M.context_window?n.jsx("span",{className:"badge",style:{backgroundColor:"var(--row-hover)"},children:M.context_window>=1e6?`${(M.context_window/1e6).toFixed(0)}M`:`${Math.round(M.context_window/1e3)}K`}):n.jsx("span",{className:"muted",children:"Dynamic"})}),n.jsx("td",{"data-label":"Ping / Latency",style:{fontSize:"0.8125rem"},children:(G==null?void 0:G.status)==="testing"?n.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:"0.25rem",color:"var(--muted)"},children:[n.jsx(ga,{size:12,className:"animate-spin"})," testing…"]}):(G==null?void 0:G.status)==="ok"?n.jsxs("span",{style:{color:"#10b981",fontWeight:600,display:"inline-flex",alignItems:"center",gap:"0.25rem"},children:[n.jsx(Gt,{size:12})," ",G.latencyMs,"ms"]}):(G==null?void 0:G.status)==="err"?n.jsx("span",{style:{color:"var(--danger)",fontSize:"0.75rem"},title:G.error,children:G.error??"Failed"}):n.jsx("button",{type:"button",onClick:()=>void Sa(M.id),style:{fontSize:"0.72rem",padding:"0.15rem 0.4rem",borderRadius:"0.25rem",border:"1px solid var(--border)",background:"transparent",cursor:"pointer",color:"var(--foreground)"},children:"Ping"})}),n.jsx("td",{"data-label":"Capabilities",style:{fontSize:"0.75rem"},children:n.jsxs("div",{style:{display:"flex",gap:"0.3rem",flexWrap:"wrap"},children:[de&&n.jsx("span",{style:{padding:"0.1rem 0.35rem",borderRadius:"0.25rem",backgroundColor:"rgba(59, 130, 246, 0.12)",color:"#3b82f6",fontWeight:600},children:"Tools"}),F&&n.jsx("span",{style:{padding:"0.1rem 0.35rem",borderRadius:"0.25rem",backgroundColor:"rgba(16, 185, 129, 0.12)",color:"#10b981",fontWeight:600},children:"Vision"}),n.jsx("span",{style:{padding:"0.1rem 0.35rem",borderRadius:"0.25rem",backgroundColor:"var(--row-hover)",color:"var(--muted-foreground)"},children:"SSE"})]})}),n.jsx("td",{"data-label":"Description",style:{fontSize:"0.8125rem",color:"var(--muted)"},children:M.description||"Relay routing target"}),n.jsx("td",{"data-label":"Action",style:{textAlign:"right"},children:n.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:"0.375rem"},children:[n.jsxs("button",{type:"button",onClick:()=>E(M),style:{display:"inline-flex",alignItems:"center",gap:"0.25rem",fontSize:"0.75rem",padding:"0.25rem 0.5rem",borderRadius:"0.25rem",border:"1px solid var(--border)",background:"transparent",cursor:"pointer"},children:[n.jsx(n1,{size:11})," Details"]}),s&&n.jsxs("button",{type:"button",onClick:()=>s(M.id),style:{display:"inline-flex",alignItems:"center",gap:"0.25rem",fontSize:"0.75rem",padding:"0.25rem 0.5rem",borderRadius:"0.25rem",border:"1px solid var(--border)",background:"transparent",cursor:"pointer",color:"var(--accent)"},children:[n.jsx(Pr,{size:11})," Test"]})]})})]},M.id)})})]})})]}),re&&n.jsx("div",{role:"dialog","aria-modal":"true","aria-labelledby":"model-detail-dialog-title",style:{position:"fixed",inset:0,backgroundColor:"rgba(0, 0, 0, 0.6)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:50,padding:"1rem"},onClick:M=>{M.target===M.currentTarget&&E(null)},children:n.jsxs("div",{style:{backgroundColor:"var(--surface)",border:"1px solid var(--border)",borderRadius:"0.75rem",padding:"1.5rem",maxWidth:"36rem",width:"100%",boxShadow:"0 25px 50px -12px rgba(0, 0, 0, 0.4)",color:"var(--ink)",maxHeight:"90vh",overflowY:"auto"},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"1rem"},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[n.jsx(ki,{size:20,style:{color:"var(--accent)"}}),n.jsx("h3",{id:"model-detail-dialog-title",style:{fontSize:"1.125rem",fontWeight:700,margin:0,fontFamily:"monospace"},children:re.id})]}),n.jsx("button",{type:"button",onClick:()=>E(null),style:{background:"transparent",border:"none",color:"var(--muted)",cursor:"pointer"},children:n.jsx(wn,{size:18})})]}),n.jsx("p",{style:{fontSize:"0.8125rem",color:"var(--muted)",margin:"0 0 1rem"},children:re.description??"Relay capability pool or provider model target."}),n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"0.75rem",background:"var(--row-hover)",padding:"0.85rem",borderRadius:"0.5rem",border:"1px solid var(--border)",marginBottom:"1.25rem",fontSize:"0.8125rem"},children:[n.jsxs("div",{children:[n.jsx("span",{style:{color:"var(--muted)",display:"block",fontSize:"0.7rem",textTransform:"uppercase",fontWeight:600},children:"Context Window"}),n.jsx("span",{style:{fontWeight:600},children:re.context_window?`${re.context_window.toLocaleString()} tokens`:"Dynamic / Pool"})]}),n.jsxs("div",{children:[n.jsx("span",{style:{color:"var(--muted)",display:"block",fontSize:"0.7rem",textTransform:"uppercase",fontWeight:600},children:"Streaming"}),n.jsx("span",{style:{fontWeight:600,color:"#10b981"},children:"Supported (SSE)"})]}),n.jsxs("div",{children:[n.jsx("span",{style:{color:"var(--muted)",display:"block",fontSize:"0.7rem",textTransform:"uppercase",fontWeight:600},children:"Tool Calling"}),n.jsx("span",{style:{fontWeight:600},children:re.id.toLowerCase().includes("no-tool")?"Disabled":"Supported (with Dialect Repair)"})]}),n.jsxs("div",{children:[n.jsx("span",{style:{color:"var(--muted)",display:"block",fontSize:"0.7rem",textTransform:"uppercase",fontWeight:600},children:"Vision"}),n.jsx("span",{style:{fontWeight:600},children:re.id.toLowerCase().includes("vision")?"Supported":"Text Only"})]}),n.jsxs("div",{style:{gridColumn:"span 2"},children:[n.jsx("span",{style:{color:"var(--muted)",display:"block",fontSize:"0.7rem",textTransform:"uppercase",fontWeight:600},children:"Measured Latency"}),n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem",marginTop:"0.25rem"},children:[((tt=ie[re.id])==null?void 0:tt.status)==="ok"?n.jsxs("span",{style:{color:"#10b981",fontWeight:700},children:["✓ ",(sl=ie[re.id])==null?void 0:sl.latencyMs,"ms round-trip"]}):((ja=ie[re.id])==null?void 0:ja.status)==="err"?n.jsxs("span",{style:{color:"#ef4444"},children:["✗ ",(Kt=ie[re.id])==null?void 0:Kt.error," (",(Nt=ie[re.id])==null?void 0:Nt.latencyMs,"ms)"]}):n.jsx("span",{style:{color:"var(--muted)"},children:"Not pinged yet"}),n.jsxs("button",{type:"button",onClick:()=>void Sa(re.id),style:{fontSize:"0.72rem",padding:"0.2rem 0.5rem",borderRadius:"0.25rem",border:"1px solid var(--border)",background:"var(--surface)",cursor:"pointer",display:"inline-flex",alignItems:"center",gap:"0.25rem"},children:[n.jsx(us,{size:11})," Ping Now"]})]})]})]}),n.jsxs("div",{style:{marginBottom:"1.25rem"},children:[n.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"0.5rem"},children:[n.jsx("span",{style:{fontSize:"0.75rem",fontWeight:600,textTransform:"uppercase",color:"var(--muted-foreground)"},children:"Invocation Snippet"}),n.jsxs("div",{style:{display:"flex",gap:"0.35rem"},children:[n.jsx("button",{type:"button",onClick:()=>K("curl"),style:{fontSize:"0.72rem",padding:"0.15rem 0.4rem",borderRadius:"0.2rem",border:"1px solid var(--border)",background:H==="curl"?"var(--accent)":"transparent",color:H==="curl"?"#fff":"var(--foreground)",cursor:"pointer"},children:"cURL"}),n.jsx("button",{type:"button",onClick:()=>K("python"),style:{fontSize:"0.72rem",padding:"0.15rem 0.4rem",borderRadius:"0.2rem",border:"1px solid var(--border)",background:H==="python"?"var(--accent)":"transparent",color:H==="python"?"#fff":"var(--foreground)",cursor:"pointer"},children:"Python"})]})]}),n.jsxs("div",{style:{position:"relative"},children:[n.jsx("pre",{style:{margin:0,padding:"0.75rem",borderRadius:"0.375rem",backgroundColor:"var(--row-hover)",border:"1px solid var(--border)",fontFamily:"monospace",fontSize:"0.75rem",lineHeight:1.4,overflowX:"auto"},children:H==="curl"?`curl http://127.0.0.1:8791/v1/chat/completions \\
|
|
283
|
+
-H "Content-Type: application/json" \\
|
|
284
|
+
-d '{"model": "${re.id}", "messages": [{"role": "user", "content": "Hello"}]}'`:`from openai import OpenAI
|
|
285
|
+
|
|
286
|
+
client = OpenAI(base_url="http://127.0.0.1:8791/v1", api_key="loopback")
|
|
287
|
+
res = client.chat.completions.create(
|
|
288
|
+
model="${re.id}",
|
|
289
|
+
messages=[{"role": "user", "content": "Hello"}],
|
|
290
|
+
)
|
|
291
|
+
print(res.choices[0].message.content)`}),n.jsxs("button",{type:"button",onClick:()=>{const M=H==="curl"?`curl http://127.0.0.1:8791/v1/chat/completions -H "Content-Type: application/json" -d '{"model": "${re.id}", "messages": [{"role": "user", "content": "Hello"}]}'`:`from openai import OpenAI
|
|
292
|
+
client = OpenAI(base_url="http://127.0.0.1:8791/v1", api_key="loopback")
|
|
293
|
+
res = client.chat.completions.create(model="${re.id}", messages=[{"role": "user", "content": "Hello"}])
|
|
294
|
+
print(res.choices[0].message.content)`;navigator.clipboard.writeText(M),Te(!0),setTimeout(()=>Te(!1),2e3)},style:{position:"absolute",top:"0.35rem",right:"0.35rem",display:"inline-flex",alignItems:"center",gap:"0.2rem",padding:"0.15rem 0.35rem",borderRadius:"0.2rem",border:"1px solid var(--border)",background:"var(--surface)",fontSize:"0.7rem",cursor:"pointer"},children:[ue?n.jsx(Gt,{size:11}):n.jsx(ml,{size:11}),n.jsx("span",{children:ue?"Copied":"Copy"})]})]})]}),n.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:"0.5rem"},children:[n.jsx("button",{type:"button",onClick:()=>E(null),style:{padding:"0.4rem 0.85rem",fontSize:"0.8125rem",borderRadius:"0.375rem",border:"1px solid var(--border)",background:"transparent",color:"var(--ink)",cursor:"pointer"},children:"Close"}),s&&n.jsxs("button",{type:"button",onClick:()=>{const M=re.id;E(null),s(M)},style:{padding:"0.4rem 0.85rem",fontSize:"0.8125rem",borderRadius:"0.375rem",border:"none",backgroundColor:"var(--accent)",color:"#ffffff",cursor:"pointer",display:"inline-flex",alignItems:"center",gap:"0.375rem",fontWeight:600},children:[n.jsx(Pr,{size:13})," Test in Playground"]})]})]})}),Ye&&n.jsx("div",{role:"dialog","aria-modal":"true","aria-labelledby":"token-dialog-title",style:{position:"fixed",inset:0,backgroundColor:"rgba(0, 0, 0, 0.6)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:50,padding:"1rem"},children:n.jsxs("div",{style:{backgroundColor:"var(--card)",border:"1px solid var(--border)",borderRadius:"0.5rem",padding:"1.5rem",maxWidth:"28rem",width:"100%",boxShadow:"0 20px 25px -5px rgba(0, 0, 0, 0.3)"},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem",marginBottom:"1rem"},children:[n.jsx(Dp,{size:20,style:{color:"var(--accent)"}}),n.jsx("h3",{id:"token-dialog-title",style:{fontSize:"1.125rem",fontWeight:600,margin:0},children:"Operator Control Authorization"})]}),n.jsxs("p",{className:"muted",style:{fontSize:"0.875rem",marginBottom:"1rem",lineHeight:1.5},children:["Pinning or unpinning a lane writes to the relay control plane. Paste your operator control token from ",n.jsx("code",{style:{fontSize:"0.8rem",padding:"0.1rem 0.3rem",borderRadius:"0.2rem",backgroundColor:"var(--row-hover)"},children:"~/.llm-relay/control-token"}),". It will be kept strictly in-memory during this browser session."]}),n.jsxs("form",{onSubmit:Ka,children:[n.jsx("div",{style:{marginBottom:"1.25rem"},children:n.jsx("input",{type:"password",value:_t,onChange:M=>xa(M.target.value),placeholder:"Paste control token…",autoFocus:!0,style:{width:"100%",padding:"0.5rem 0.75rem",borderRadius:"0.375rem",border:"1px solid var(--border)",backgroundColor:"var(--input)",color:"var(--foreground)",fontSize:"0.875rem"}})}),n.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:"0.5rem"},children:[n.jsx("button",{type:"button",onClick:()=>{Qt(!1),il(null)},className:"button-secondary",style:{padding:"0.4rem 0.8rem",fontSize:"0.875rem"},children:"Cancel"}),n.jsx("button",{type:"submit",disabled:!_t.trim(),className:"button-primary",style:{padding:"0.4rem 0.8rem",fontSize:"0.875rem"},children:"Authorize & Proceed"})]})]})]})})]})}function up({code:s,language:d}){const[f,u]=T.useState(!1),p=async()=>{try{await navigator.clipboard.writeText(s),u(!0),setTimeout(()=>u(!1),2e3)}catch{}};return n.jsxs("div",{style:{margin:"0.75rem 0",borderRadius:"0.5rem",border:"1px solid var(--border)",backgroundColor:"var(--card)",overflow:"hidden"},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0.35rem 0.75rem",backgroundColor:"var(--row-hover)",borderBottom:"1px solid var(--border)",fontSize:"0.72rem",color:"var(--muted-foreground)",fontFamily:"monospace"},children:[n.jsx("span",{children:d||"code"}),n.jsxs("button",{type:"button",onClick:()=>void p(),style:{display:"inline-flex",alignItems:"center",gap:"0.25rem",background:"transparent",border:"none",color:f?"var(--accent)":"var(--muted-foreground)",fontSize:"0.72rem",cursor:"pointer",padding:"0.15rem 0.35rem",borderRadius:"0.25rem"},title:"Copy code to clipboard",children:[f?n.jsx(Gt,{size:12}):n.jsx(ml,{size:12}),n.jsx("span",{children:f?"Copied":"Copy"})]})]}),n.jsx("pre",{style:{margin:0,padding:"0.75rem",overflowX:"auto",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSize:"0.8125rem",lineHeight:1.5,color:"var(--foreground)"},children:n.jsx("code",{children:s})})]})}function Xa(s){const d=[];let f=s,u=0;for(;f.length>0;){const p=f.match(/^`([^`]+)`/);if(p&&p[1]){d.push(n.jsx("code",{style:{fontFamily:"monospace",fontSize:"0.85em",backgroundColor:"var(--row-hover)",padding:"0.15em 0.35em",borderRadius:"0.25rem",border:"1px solid var(--border)",color:"var(--accent)"},children:p[1]},u++)),f=f.slice(p[0].length);continue}const y=f.match(/^\*\*([^*]+)\*\*/);if(y&&y[1]){d.push(n.jsx("strong",{style:{fontWeight:600},children:y[1]},u++)),f=f.slice(y[0].length);continue}const R=f.match(/^\*([^*]+)\*/);if(R&&R[1]){d.push(n.jsx("em",{style:{fontStyle:"italic"},children:R[1]},u++)),f=f.slice(R[0].length);continue}const q=f.match(/^\[([^\]]+)\]\(([^)]+)\)/);if(q&&q[1]&&q[2]){d.push(n.jsx("a",{href:q[2],target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent)",textDecoration:"underline",textUnderlineOffset:"2px"},children:q[1]},u++)),f=f.slice(q[0].length);continue}const x=f.search(/[`*[]/);if(x===-1){d.push(n.jsx("span",{children:f},u++));break}else x===0?(d.push(n.jsx("span",{children:f[0]},u++)),f=f.slice(1)):(d.push(n.jsx("span",{children:f.slice(0,x)},u++)),f=f.slice(x))}return d}function G1({content:s}){if(!s)return n.jsx("span",{});const d=s.split(`
|
|
295
|
+
`),f=[];let u=!1,p="",y=[],R=0,q=[];const x=()=>{if(q.length===0)return;const v=q.join(`
|
|
296
|
+
`).trim();v&&f.push(n.jsx("p",{style:{margin:"0.5rem 0",lineHeight:1.55},children:Xa(v)},R++)),q=[]};for(let v=0;v<d.length;v++){const U=d[v],k=U.trim();if(k.startsWith("```")){u?(f.push(n.jsx(up,{code:y.join(`
|
|
297
|
+
`),language:p},R++)),u=!1,y=[],p=""):(x(),u=!0,p=k.slice(3).trim());continue}if(u){y.push(U);continue}if(k.startsWith("### ")){x(),f.push(n.jsx("h4",{style:{margin:"0.75rem 0 0.35rem",fontSize:"0.95rem",fontWeight:600},children:Xa(k.slice(4))},R++));continue}if(k.startsWith("## ")){x(),f.push(n.jsx("h3",{style:{margin:"0.85rem 0 0.4rem",fontSize:"1.05rem",fontWeight:600},children:Xa(k.slice(3))},R++));continue}if(k.startsWith("# ")){x(),f.push(n.jsx("h2",{style:{margin:"1rem 0 0.5rem",fontSize:"1.2rem",fontWeight:700},children:Xa(k.slice(2))},R++));continue}if(k.startsWith("> ")){x(),f.push(n.jsx("blockquote",{style:{margin:"0.5rem 0",paddingLeft:"0.75rem",borderLeft:"3px solid var(--accent)",color:"var(--muted-foreground)",fontStyle:"italic"},children:Xa(k.slice(2))},R++));continue}if(k.startsWith("- ")||k.startsWith("* ")){x(),f.push(n.jsxs("div",{style:{display:"flex",gap:"0.5rem",margin:"0.25rem 0 0.25rem 0.5rem"},children:[n.jsx("span",{style:{color:"var(--accent)"},children:"•"}),n.jsx("div",{children:Xa(k.slice(2))})]},R++));continue}const V=k.match(/^(\d+)\.\s+(.*)$/);if(V&&V[1]&&V[2]){x(),f.push(n.jsxs("div",{style:{display:"flex",gap:"0.5rem",margin:"0.25rem 0 0.25rem 0.5rem"},children:[n.jsxs("span",{style:{color:"var(--muted-foreground)",fontFamily:"monospace",minWidth:"1.2rem"},children:[V[1],"."]}),n.jsx("div",{children:Xa(V[2])})]},R++));continue}if(k===""){x();continue}q.push(U)}return u?f.push(n.jsx(up,{code:y.join(`
|
|
298
|
+
`),language:p},R++)):x(),n.jsx("div",{style:{fontSize:"0.875rem",lineHeight:1.6,wordBreak:"break-word"},children:f})}const Yp=1024,dp=12e5,fp=128e3,mp=5,Gp=["image/png","image/jpeg","image/webp","image/gif"],Xp=["txt","md","markdown","csv","tsv","json","log"],X1=[...Gp,...Xp.map(s=>`.${s}`)].join(",");function Vp(s){const d=s.lastIndexOf(".");return d===-1?"":s.slice(d+1).toLowerCase()}function V1(s){const d=(s.type??"").toLowerCase();if(Gp.includes(d))return"image";const f=Vp(s.name);return Xp.includes(f)?"text":!d&&f===""?null:d.startsWith("text/")||d==="application/json"?"text":null}function Q1(s,d,f=Yp){const u=Math.max(s,d);if(u<=f)return{width:s,height:d};const p=f/u;return{width:Math.max(1,Math.round(s*p)),height:Math.max(1,Math.round(d*p))}}function Qp(s){return s<1024?`${s} B`:s<1024*1024?`${(s/1024).toFixed(1)} KB`:`${(s/(1024*1024)).toFixed(1)} MB`}function K1(s){const d=s.indexOf(",");if(d===-1)return 0;const f=s.slice(d+1);return Math.floor(f.length*3/4)}async function Z1(s){if(s.size>fp)throw new Error(`Text file exceeds maximum size of ${Qp(fp)}`);return new Promise((d,f)=>{const u=new FileReader;u.onload=()=>d(String(u.result??"")),u.onerror=()=>f(new Error(`Failed to read file ${s.name}`)),u.readAsText(s)})}async function J1(s){const d=URL.createObjectURL(s);try{const f=await new Promise((U,k)=>{const V=new Image;V.onload=()=>U(V),V.onerror=()=>k(new Error(`Failed to decode image ${s.name}`)),V.src=d}),{width:u,height:p}=Q1(f.naturalWidth,f.naturalHeight,Yp),y=document.createElement("canvas");y.width=u,y.height=p;const R=y.getContext("2d");if(!R)throw new Error("Canvas 2D context unavailable");R.drawImage(f,0,0,u,p);const q=s.type==="image/png"?"image/png":"image/jpeg",x=q==="image/jpeg"?.85:void 0,v=y.toDataURL(q,x);if(K1(v)>dp)throw new Error(`Encoded image exceeds maximum size of ${Qp(dp)}`);return v}finally{URL.revokeObjectURL(d)}}function W1(s,d){const f=Vp(s);return`
|
|
299
|
+
|
|
300
|
+
[File: ${s}]
|
|
301
|
+
\`\`\`${f==="md"||f==="markdown"?"markdown":f==="json"?"json":f==="csv"?"csv":"text"}
|
|
302
|
+
${d.trimEnd()}
|
|
303
|
+
\`\`\``}function $1(s,d){let f=s;for(const u of d)u.kind==="text"&&u.text&&(f+=W1(u.name,u.text));return f}function I1(s){return s.filter(d=>d.kind==="image"&&typeof d.dataUrl=="string").map(d=>d.dataUrl)}const ns=["auto","pool/xhigh","pool/high","pool/medium","pool/low"];function F1({initialModel:s}={}){var Ka;const[d,f]=T.useState([]),[u,p]=T.useState({}),[y,R]=T.useState(()=>s??"auto"),[q,x]=T.useState([{id:"welcome",role:"assistant",content:"Hello! This is the llm-relay live sandbox. Select a pool or model above, attach text or images, and send a message to test routing, failover, and streaming responsiveness."}]),[v,U]=T.useState(""),[k,V]=T.useState([]),[L,Q]=T.useState(!1),[I,oe]=T.useState(null),[ae,be]=T.useState(()=>{try{return sessionStorage.getItem("llm-relay.playground.sysprompt")??""}catch{return""}}),[$,ee]=T.useState(!1),[Y,ce]=T.useState(!1),[X,xe]=T.useState(.7),[he,De]=T.useState(2048),[ke,qe]=T.useState(!0),[ie,ye]=T.useState(!1),[re,E]=T.useState("curl"),[H,K]=T.useState(!1),[ue,Te]=T.useState(!1),[h,N]=T.useState(null),[A,B]=T.useState(null),[J,te]=T.useState([]),ve=T.useRef(null),et=T.useRef(null),Ye=T.useRef(null);T.useEffect(()=>{s&&R(s)},[s]);const Qt=_=>{be(_);try{sessionStorage.setItem("llm-relay.playground.sysprompt",_)}catch{}};T.useEffect(()=>{fetch("/v1/models").then(_=>_.ok?_.json():null).then(_=>{if(_!=null&&_.data&&Array.isArray(_.data)){const ne=_.data.map(Me=>Me.id),ge=Array.from(new Set([...ns,...ne]));f(ge);const Ge={};for(const Me of _.data)Ge[Me.id]=Me;p(Ge),s||(ge.includes("auto")?R("auto"):ge.includes("pool/medium")?R("pool/medium"):ge.length>0&&R(ge[0]))}}).catch(()=>{f([...ns])})},[s]);const nl=T.useCallback(()=>{var _;(_=ve.current)==null||_.scrollIntoView({behavior:"smooth"})},[]);T.useEffect(()=>{nl()},[q,nl]);const il=async _=>{oe(null);const ne=Array.from(_);if(ne.length===0)return;if(k.length+ne.length>mp){oe(`Maximum ${mp} attachments allowed per turn.`);return}const ge=[];for(const Ge of ne){const Me=V1(Ge);if(!Me){oe(`Unsupported file format: ${Ge.name}`);continue}try{if(Me==="image"){const tt=await J1(Ge);ge.push({id:`${Date.now()}-${Ge.name}`,kind:"image",name:Ge.name,dataUrl:tt})}else{const tt=await Z1(Ge);ge.push({id:`${Date.now()}-${Ge.name}`,kind:"text",name:Ge.name,text:tt})}}catch(tt){oe(tt instanceof Error?tt.message:`Failed to read ${Ge.name}`)}}ge.length>0&&V(Ge=>[...Ge,...ge])},ba=_=>{V(ne=>ne.filter(ge=>ge.id!==_))},St=I1(k),_t=u[y],xa=y==="auto"||y.startsWith("pool/")||y.toLowerCase().includes("vision")||y.toLowerCase().includes("gemini")||y.toLowerCase().includes("claude")||y.toLowerCase().includes("4o")||!!(_t!=null&&_t.supports_vision),Sa=async _=>{var F,de,Xe,jt,Bi,Aa;_==null||_.preventDefault();const ne=v.trim();if(!ne&&k.length===0||ue)return;const ge=$1(ne,k),Ge={id:"user-"+Date.now(),role:"user",content:ge,images:St.length>0?St:void 0},Me=[...q,Ge];x(Me),U(""),V([]),Te(!0);const tt=new AbortController;N(tt);const sl="assistant-"+Date.now(),ja={id:sl,role:"assistant",content:""};x([...Me,ja]);const Kt=performance.now();let Nt=null,M="",G;try{const gt=[];ae.trim()&>.push({role:"system",content:ae.trim()});for(const Ne of Me)if(Ne.id!=="welcome")if(Ne.images&&Ne.images.length>0){const ol=[{type:"text",text:Ne.content}];for(const vt of Ne.images)ol.push({type:"image_url",image_url:{url:vt}});gt.push({role:Ne.role,content:ol})}else gt.push({role:Ne.role,content:Ne.content});const ht=await fetch("/v1/chat/completions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:y,messages:gt,temperature:X,max_tokens:he,stream:ke}),signal:tt.signal});if(G=ht.headers.get("x-llm-relay-served-by")??void 0,!ht.ok){const Ne=await ht.text();throw new Error(`HTTP ${ht.status}: ${Ne}`)}if(!ke)M=((Xe=(de=(F=(await ht.json()).choices)==null?void 0:F[0])==null?void 0:de.message)==null?void 0:Xe.content)??"",x(ol=>ol.map(vt=>vt.id===sl?{...vt,content:M,meta:{servedBy:G,totalDurationMs:Math.round(performance.now()-Kt)}}:vt));else{if(!ht.body)throw new Error("No response body received from relay.");const Ne=ht.body.getReader(),ol=new TextDecoder("utf-8");let vt="";for(;;){const{done:ms,value:Li}=await Ne.read();if(ms)break;vt+=ol.decode(Li,{stream:!0});const Za=vt.split(`
|
|
304
|
+
`);vt=Za.pop()??"";for(const Ca of Za){const Hn=Ca.trim();if(!Hn||!Hn.startsWith("data:"))continue;const Bn=Hn.replace(/^data:\s*/,"");if(Bn==="[DONE]")break;try{const Ln=(Aa=(Bi=(jt=JSON.parse(Bn).choices)==null?void 0:jt[0])==null?void 0:Bi.delta)==null?void 0:Aa.content;Ln&&(Nt===null&&(Nt=performance.now()),M+=Ln,x(Yn=>Yn.map(za=>za.id===sl?{...za,content:M,meta:{servedBy:G,ttftMs:Nt?Math.round(Nt-Kt):void 0,totalDurationMs:Math.round(performance.now()-Kt)}}:za)))}catch{}}}}}catch(gt){tt.signal.aborted?M+=`
|
|
305
|
+
|
|
306
|
+
[Request cancelled by operator]`:M+=`
|
|
307
|
+
|
|
308
|
+
[Error: ${gt instanceof Error?gt.message:String(gt)}]`,x(ht=>ht.map(Ne=>Ne.id===sl?{...Ne,content:M,meta:{servedBy:G,ttftMs:Nt?Math.round(Nt-Kt):void 0,totalDurationMs:Math.round(performance.now()-Kt)}}:Ne))}finally{const gt=Math.round(performance.now()-Kt),ht=Nt?Math.round(Nt-Kt):void 0;te(Ne=>[{id:"h-"+Date.now(),timestamp:new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"}),model:y,prompt:ne,ttftMs:ht,totalDurationMs:gt,servedBy:G},...Ne.slice(0,9)]),Te(!1),N(null),setTimeout(()=>{var Ne;return(Ne=Ye.current)==null?void 0:Ne.focus()},0)}},Qa=()=>{h==null||h.abort()},rl=()=>{var _;x([]),V([]),(_=Ye.current)==null||_.focus()},Xl=(_,ne)=>{navigator.clipboard.writeText(_),B(ne),setTimeout(()=>B(null),2e3)},jl=_=>{const ne=[...ae.trim()?[{role:"system",content:ae.trim()}]:[],...q.filter(ge=>ge.id!=="welcome").map(ge=>({role:ge.role,content:ge.content}))];return ne.length===0&&ne.push({role:"user",content:v.trim()||"Hello world"}),_==="curl"?`curl http://127.0.0.1:8791/v1/chat/completions \\
|
|
309
|
+
-H "Content-Type: application/json" \\
|
|
310
|
+
-d '${JSON.stringify({model:y,messages:ne,temperature:X,max_tokens:he,stream:ke},null,2)}'`:_==="python"?`from openai import OpenAI
|
|
311
|
+
|
|
312
|
+
client = OpenAI(
|
|
313
|
+
base_url="http://127.0.0.1:8791/v1",
|
|
314
|
+
api_key="anything", # llm-relay loopback requires no remote key
|
|
315
|
+
)
|
|
316
|
+
|
|
317
|
+
response = client.chat.completions.create(
|
|
318
|
+
model="${y}",
|
|
319
|
+
messages=${JSON.stringify(ne,null,4)},
|
|
320
|
+
temperature=${X},
|
|
321
|
+
max_tokens=${he},
|
|
322
|
+
stream=${ke?"True":"False"},
|
|
323
|
+
)
|
|
324
|
+
|
|
325
|
+
${ke?`for chunk in response:
|
|
326
|
+
content = chunk.choices[0].delta.content
|
|
327
|
+
if content:
|
|
328
|
+
print(content, end="", flush=True)
|
|
329
|
+
print()`:"print(response.choices[0].message.content)"}`:`import OpenAI from "openai";
|
|
330
|
+
|
|
331
|
+
const client = new OpenAI({
|
|
332
|
+
baseURL: "http://127.0.0.1:8791/v1",
|
|
333
|
+
apiKey: "anything",
|
|
334
|
+
});
|
|
335
|
+
|
|
336
|
+
async function main() {
|
|
337
|
+
const stream = await client.chat.completions.create({
|
|
338
|
+
model: "${y}",
|
|
339
|
+
messages: ${JSON.stringify(ne,null,4)},
|
|
340
|
+
temperature: ${X},
|
|
341
|
+
max_tokens: ${he},
|
|
342
|
+
stream: ${ke},
|
|
343
|
+
});
|
|
344
|
+
|
|
345
|
+
${ke?`for await (const chunk of stream) {
|
|
346
|
+
process.stdout.write(chunk.choices[0]?.delta?.content || "");
|
|
347
|
+
}
|
|
348
|
+
console.log();`:"console.log(stream.choices[0].message.content);"}
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
main();`};return n.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"calc(100vh - 8rem)",gap:"1rem"},children:[n.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap",gap:"0.75rem",padding:"0.85rem 1.25rem",borderRadius:"0.5rem",backgroundColor:"var(--card)",border:"1px solid var(--border)"},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.75rem",flexWrap:"wrap"},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[n.jsx("span",{style:{fontSize:"0.85rem",fontWeight:600,color:"var(--muted-foreground)"},children:"Target:"}),n.jsxs("select",{value:y,onChange:_=>R(_.target.value),"aria-label":"Select target model or pool",style:{fontFamily:"monospace",fontSize:"0.85rem",padding:"0.35rem 0.65rem",borderRadius:"0.375rem",border:"1px solid var(--border)",backgroundColor:"var(--surface)",color:"var(--foreground)",fontWeight:600,minWidth:"160px"},children:[n.jsx("optgroup",{label:"Dynamic Effort Pools",children:ns.map(_=>n.jsx("option",{value:_,children:_},_))}),n.jsx("optgroup",{label:"Discovered Models & Rungs",children:d.filter(_=>!ns.includes(_)).map(_=>n.jsx("option",{value:_,children:_},_))})]})]}),n.jsxs("button",{type:"button",onClick:()=>ee(_=>!_),style:{display:"inline-flex",alignItems:"center",gap:"0.35rem",fontSize:"0.8rem",padding:"0.35rem 0.65rem",borderRadius:"0.375rem",border:"1px solid var(--border)",background:$||ae?"var(--row-hover)":"transparent",color:ae?"var(--accent)":"var(--foreground)",cursor:"pointer"},children:[n.jsx("span",{children:"System Prompt"}),ae.trim()&&n.jsx("span",{style:{width:"6px",height:"6px",borderRadius:"9999px",backgroundColor:"var(--accent)"}})]}),n.jsxs("button",{type:"button",onClick:()=>ce(_=>!_),style:{display:"inline-flex",alignItems:"center",gap:"0.35rem",fontSize:"0.8rem",padding:"0.35rem 0.65rem",borderRadius:"0.375rem",border:"1px solid var(--border)",background:Y?"var(--row-hover)":"transparent",color:"var(--foreground)",cursor:"pointer"},children:[n.jsx(o1,{size:13}),n.jsx("span",{children:"Parameters"})]})]}),n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[n.jsxs("button",{type:"button",onClick:()=>ye(!0),style:{display:"inline-flex",alignItems:"center",gap:"0.35rem",fontSize:"0.8rem",padding:"0.35rem 0.65rem",borderRadius:"0.375rem",border:"1px solid var(--border)",background:"transparent",color:"var(--foreground)",cursor:"pointer"},children:[n.jsx(e1,{size:14})," View Code"]}),q.length>0&&n.jsxs("button",{type:"button",onClick:rl,style:{display:"inline-flex",alignItems:"center",gap:"0.35rem",fontSize:"0.8rem",padding:"0.35rem 0.65rem",borderRadius:"0.375rem",border:"1px solid var(--border)",background:"transparent",color:"var(--muted-foreground)",cursor:"pointer"},children:[n.jsx(kp,{size:13})," Clear"]})]})]}),$&&n.jsxs("div",{style:{padding:"0.85rem 1.25rem",borderRadius:"0.5rem",backgroundColor:"var(--card)",border:"1px solid var(--border)",display:"flex",flexDirection:"column",gap:"0.5rem"},children:[n.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[n.jsx("span",{style:{fontSize:"0.8125rem",fontWeight:600,color:"var(--foreground)"},children:"System Prompt (Prepended to conversation)"}),ae.trim()&&n.jsx("button",{type:"button",onClick:()=>Qt(""),style:{fontSize:"0.75rem",color:"var(--muted-foreground)",background:"none",border:"none",cursor:"pointer"},children:"Clear"})]}),n.jsx("textarea",{value:ae,onChange:_=>Qt(_.target.value),placeholder:"E.g., You are an expert TypeScript coding assistant. Answer concisely with code snippets.",rows:2,style:{width:"100%",padding:"0.5rem 0.75rem",borderRadius:"0.375rem",border:"1px solid var(--border)",backgroundColor:"var(--surface)",color:"var(--foreground)",fontSize:"0.85rem",lineHeight:1.4,resize:"vertical"}})]}),Y&&n.jsxs("div",{style:{padding:"0.85rem 1.25rem",borderRadius:"0.5rem",backgroundColor:"var(--card)",border:"1px solid var(--border)",display:"flex",alignItems:"center",flexWrap:"wrap",gap:"1.5rem"},children:[n.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"0.5rem",fontSize:"0.8125rem"},children:[n.jsx("span",{style:{color:"var(--muted-foreground)"},children:"Temperature:"}),n.jsx("input",{type:"range",min:"0",max:"2",step:"0.1",value:X,onChange:_=>xe(parseFloat(_.target.value)),style:{width:"80px"}}),n.jsx("span",{style:{fontFamily:"monospace",fontWeight:600},children:X.toFixed(1)})]}),n.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"0.5rem",fontSize:"0.8125rem"},children:[n.jsx("span",{style:{color:"var(--muted-foreground)"},children:"Max Tokens:"}),n.jsx("input",{type:"number",min:"64",max:"16384",step:"128",value:he,onChange:_=>De(parseInt(_.target.value,10)||2048),style:{width:"90px",padding:"0.2rem 0.4rem",borderRadius:"0.25rem",border:"1px solid var(--border)",backgroundColor:"var(--surface)",color:"var(--foreground)",fontFamily:"monospace"}})]}),n.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"0.5rem",fontSize:"0.8125rem",cursor:"pointer"},children:[n.jsx("input",{type:"checkbox",checked:ke,onChange:_=>qe(_.target.checked),style:{accentColor:"var(--accent)"}}),n.jsx("span",{children:"Stream SSE Responses"})]})]}),n.jsxs("div",{style:{flex:1,minHeight:0,borderRadius:"0.5rem",border:"1px solid var(--border)",backgroundColor:"var(--card)",display:"flex",flexDirection:"column",overflow:"hidden"},children:[n.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"1.25rem",display:"flex",flexDirection:"column",gap:"1.25rem"},children:[q.map(_=>{var ge,Ge,Me;const ne=_.role==="user";return n.jsx("div",{style:{display:"flex",justifyContent:ne?"flex-end":"flex-start"},children:n.jsxs("div",{style:{maxWidth:"85%",display:"flex",flexDirection:"column",alignItems:ne?"flex-end":"flex-start",gap:"0.35rem"},children:[n.jsxs("div",{style:{padding:"0.75rem 1rem",borderRadius:ne?"0.75rem 0.75rem 0.15rem 0.75rem":"0.75rem 0.75rem 0.75rem 0.15rem",backgroundColor:ne?"var(--accent)":"var(--row-hover)",color:ne?"#ffffff":"var(--foreground)",border:ne?"none":"1px solid var(--border)",fontSize:"0.875rem",lineHeight:1.55,wordBreak:"break-word",boxShadow:"0 1px 2px rgba(0,0,0,0.05)"},children:[_.images&&_.images.length>0&&n.jsx("div",{style:{display:"flex",gap:"0.5rem",flexWrap:"wrap",marginBottom:"0.5rem"},children:_.images.map((tt,sl)=>n.jsx("img",{src:tt,alt:"",style:{width:"70px",height:"70px",objectFit:"cover",borderRadius:"0.375rem",border:"1px solid rgba(255,255,255,0.2)"}},sl))}),ne?n.jsx("div",{style:{whiteSpace:"pre-wrap"},children:_.content}):n.jsx(G1,{content:_.content})]}),!ne&&n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.75rem",fontSize:"0.72rem",color:"var(--muted-foreground)",padding:"0 0.25rem",flexWrap:"wrap"},children:[((ge=_.meta)==null?void 0:ge.servedBy)&&n.jsxs("span",{children:["Served by: ",n.jsx("strong",{style:{color:"var(--foreground)",fontFamily:"monospace"},children:_.meta.servedBy})]}),((Ge=_.meta)==null?void 0:Ge.ttftMs)!==void 0&&n.jsxs("span",{children:["TTFT: ",n.jsxs("strong",{style:{color:"var(--foreground)"},children:[_.meta.ttftMs,"ms"]})]}),((Me=_.meta)==null?void 0:Me.totalDurationMs)!==void 0&&n.jsxs("span",{children:["Total: ",n.jsxs("strong",{style:{color:"var(--foreground)"},children:[_.meta.totalDurationMs,"ms"]})]}),_.content&&n.jsxs("button",{type:"button",onClick:()=>Xl(_.content,_.id),style:{display:"inline-flex",alignItems:"center",gap:"0.25rem",background:"transparent",border:"none",color:A===_.id?"var(--accent)":"var(--muted-foreground)",cursor:"pointer",padding:0},children:[A===_.id?n.jsx(Gt,{size:11}):n.jsx(ml,{size:11}),n.jsx("span",{children:A===_.id?"Copied":"Copy"})]})]})]})},_.id)}),ue&&!((Ka=q[q.length-1])!=null&&Ka.content)&&n.jsx("div",{style:{display:"flex",justifyContent:"flex-start"},children:n.jsxs("div",{style:{padding:"0.6rem 0.9rem",borderRadius:"0.75rem",backgroundColor:"var(--row-hover)",border:"1px solid var(--border)",display:"flex",alignItems:"center",gap:"0.4rem"},children:[n.jsx("span",{className:"animate-spin",children:n.jsx(ga,{size:14,style:{color:"var(--accent)"}})}),n.jsx("span",{style:{fontSize:"0.8125rem",color:"var(--muted-foreground)"},children:"Waiting for first token…"})]})}),n.jsx("div",{ref:ve})]}),n.jsxs("div",{onDragOver:_=>{_.preventDefault(),Q(!0)},onDragLeave:_=>{_.currentTarget.contains(_.relatedTarget)||Q(!1)},onDrop:_=>{_.preventDefault(),Q(!1),_.dataTransfer.files&&il(_.dataTransfer.files)},style:{padding:"0.75rem 1rem",borderTop:"1px solid var(--border)",backgroundColor:L?"rgba(59, 130, 246, 0.08)":"var(--surface)",display:"flex",flexDirection:"column",gap:"0.5rem"},children:[k.length>0&&n.jsx("div",{style:{display:"flex",gap:"0.5rem",flexWrap:"wrap"},children:k.map(_=>n.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:"0.35rem",padding:"0.2rem 0.5rem",borderRadius:"0.375rem",border:"1px solid var(--border)",backgroundColor:"var(--card)",fontSize:"0.75rem"},children:[_.kind==="image"&&_.dataUrl?n.jsx("img",{src:_.dataUrl,alt:"",style:{width:"20px",height:"20px",objectFit:"cover",borderRadius:"0.2rem"}}):n.jsx(a1,{size:14,style:{color:"var(--muted-foreground)"}}),n.jsx("span",{style:{maxWidth:"120px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:_.name}),n.jsx("button",{type:"button",onClick:()=>ba(_.id),style:{background:"transparent",border:"none",cursor:"pointer",padding:"0 0.15rem",color:"var(--muted-foreground)"},children:n.jsx(wn,{size:12})})]},_.id))}),I&&n.jsxs("div",{style:{fontSize:"0.75rem",color:"var(--danger)",display:"flex",alignItems:"center",gap:"0.35rem"},children:[n.jsx(ss,{size:12})," ",I]}),St.length>0&&!xa&&n.jsxs("div",{style:{fontSize:"0.75rem",color:"#eab308",display:"flex",alignItems:"center",gap:"0.35rem"},children:[n.jsx(ss,{size:12}),' Note: Model "',y,'" may not support vision or image analysis.']}),n.jsxs("form",{onSubmit:Sa,style:{display:"flex",gap:"0.5rem",alignItems:"flex-end"},children:[n.jsx("input",{ref:et,type:"file",multiple:!0,accept:X1,style:{display:"none"},onChange:_=>{_.target.files&&il(_.target.files),_.target.value=""}}),n.jsx("button",{type:"button",onClick:()=>{var _;return(_=et.current)==null?void 0:_.click()},disabled:ue,title:"Attach text files (.txt, .md, .json, .csv) or images",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",padding:"0.6rem",borderRadius:"0.375rem",border:"1px solid var(--border)",background:"var(--card)",color:"var(--muted-foreground)",cursor:ue?"not-allowed":"pointer"},children:n.jsx(i1,{size:16})}),n.jsx("textarea",{ref:Ye,value:v,onChange:_=>U(_.target.value),onKeyDown:_=>{_.key==="Enter"&&!_.shiftKey&&(_.preventDefault(),Sa())},onPaste:_=>{var ge;const ne=(ge=_.clipboardData)==null?void 0:ge.files;ne&&ne.length>0&&(_.preventDefault(),il(ne))},placeholder:"Send a message or drop files/images… (Enter to send, Shift+Enter for newline)",rows:2,style:{flex:1,padding:"0.5rem 0.75rem",borderRadius:"0.375rem",border:"1px solid var(--border)",backgroundColor:"var(--card)",color:"var(--foreground)",fontSize:"0.875rem",lineHeight:1.4,resize:"none"}}),ue?n.jsxs("button",{type:"button",onClick:Qa,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"0.35rem",padding:"0.6rem 1rem",borderRadius:"0.375rem",border:"1px solid var(--danger)",background:"rgba(239, 68, 68, 0.1)",color:"var(--danger)",cursor:"pointer",fontWeight:600,fontSize:"0.85rem"},children:[n.jsx(u1,{size:14})," Stop"]}):n.jsxs("button",{type:"submit",disabled:!v.trim()&&k.length===0,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"0.35rem",padding:"0.6rem 1.15rem",borderRadius:"0.375rem",border:"none",backgroundColor:!v.trim()&&k.length===0?"var(--row-hover)":"var(--accent)",color:!v.trim()&&k.length===0?"var(--muted-foreground)":"#ffffff",cursor:!v.trim()&&k.length===0?"not-allowed":"pointer",fontWeight:600,fontSize:"0.85rem"},children:[n.jsx(s1,{size:14})," Send"]})]})]})]}),ie&&n.jsx("div",{role:"dialog","aria-modal":"true","aria-labelledby":"code-modal-title",style:{position:"fixed",inset:0,backgroundColor:"rgba(0, 0, 0, 0.6)",backdropFilter:"blur(2px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:50,padding:"1rem"},onClick:_=>{_.target===_.currentTarget&&ye(!1)},children:n.jsxs("div",{style:{backgroundColor:"var(--card)",borderRadius:"0.75rem",border:"1px solid var(--border)",boxShadow:"0 20px 25px -5px rgba(0, 0, 0, 0.3)",width:"100%",maxWidth:"640px",overflow:"hidden",display:"flex",flexDirection:"column"},children:[n.jsxs("div",{style:{padding:"1rem 1.25rem",borderBottom:"1px solid var(--border)",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[n.jsx("h3",{id:"code-modal-title",style:{margin:0,fontSize:"1.1rem",fontWeight:700},children:"API Request Code Snippet"}),n.jsx("button",{type:"button",onClick:()=>ye(!1),style:{background:"none",border:"none",cursor:"pointer",color:"var(--muted)"},children:n.jsx(wn,{size:18})})]}),n.jsxs("div",{style:{padding:"1.25rem",display:"flex",flexDirection:"column",gap:"1rem"},children:[n.jsx("div",{style:{display:"flex",gap:"0.5rem"},children:["curl","python","node"].map(_=>n.jsx("button",{type:"button",onClick:()=>E(_),style:{padding:"0.35rem 0.75rem",borderRadius:"0.375rem",border:"1px solid var(--border)",background:re===_?"var(--accent)":"var(--surface)",color:re===_?"#ffffff":"var(--foreground)",fontWeight:re===_?600:400,fontSize:"0.8125rem",cursor:"pointer",textTransform:"uppercase"},children:_},_))}),n.jsxs("div",{style:{position:"relative"},children:[n.jsx("pre",{style:{margin:0,padding:"1rem",borderRadius:"0.5rem",backgroundColor:"var(--surface)",border:"1px solid var(--border)",fontFamily:"monospace",fontSize:"0.8rem",lineHeight:1.4,overflowX:"auto",maxHeight:"340px"},children:jl(re)}),n.jsxs("button",{type:"button",onClick:()=>{navigator.clipboard.writeText(jl(re)),K(!0),setTimeout(()=>K(!1),2e3)},style:{position:"absolute",top:"0.5rem",right:"0.5rem",display:"inline-flex",alignItems:"center",gap:"0.25rem",padding:"0.25rem 0.5rem",borderRadius:"0.25rem",border:"1px solid var(--border)",backgroundColor:"var(--card)",color:H?"var(--accent)":"var(--foreground)",fontSize:"0.75rem",cursor:"pointer"},children:[H?n.jsx(Gt,{size:12}):n.jsx(ml,{size:12}),n.jsx("span",{children:H?"Copied":"Copy"})]})]})]}),n.jsx("div",{style:{padding:"0.75rem 1.25rem",borderTop:"1px solid var(--border)",backgroundColor:"var(--row-hover)",display:"flex",justifyContent:"flex-end"},children:n.jsx("button",{type:"button",onClick:()=>ye(!1),className:"button-secondary",style:{padding:"0.4rem 0.8rem",fontSize:"0.8125rem"},children:"Close"})})]})})]})}const P1=[{id:"claude-code",name:"Claude Code CLI",category:"code",protocol:"Anthropic Messages",configType:"Environment Variable",description:"Connect Claude Code to llm-relay loopback. Subagents automatically offload to free pools.",command:"powershell -File C:\\Code\\llm-relay\\scripts\\claude-proxied.ps1",envVars:[["ANTHROPIC_BASE_URL","http://127.0.0.1:8791"],["CLAUDE_CODE_MAX_CONTEXT_TOKENS","131072"],["RP_CONFIG_DIR","C:\\Users\\ethan\\.llm-relay-claude"]],configSnippet:`$env:ANTHROPIC_BASE_URL = "http://127.0.0.1:8791"
|
|
352
|
+
$env:CLAUDE_CODE_MAX_CONTEXT_TOKENS = "131072"
|
|
353
|
+
$env:RP_CONFIG_DIR = "$HOME\\.llm-relay-claude"
|
|
354
|
+
claude --model pool/medium`,clientKeys:["claude-code","claude","anthropic"]},{id:"agy",name:"Antigravity CLI (AGY)",category:"agent",protocol:"Anthropic Messages",configType:"Config File",configPath:"~/.gemini/antigravity-cli/settings.json",description:"Google Antigravity autonomous coding agent with MCP dispatch and shell execution.",command:'agy --add-dir . -p "your task"',configSnippet:`# Spawning an offload task with AGY:
|
|
355
|
+
agy --add-dir . -p "your task"
|
|
356
|
+
|
|
357
|
+
# Relay MCP dispatch loopback (no manual token required):
|
|
358
|
+
llm-relay dispatch -t "your task"`,clientKeys:["agy","antigravity","antigravity-cli","agy-gemini","agy-claude-sonnet","agy-claude-opus"]},{id:"codex",name:"OpenAI Codex CLI",category:"code",protocol:"OpenAI Responses",configType:"Config File",configPath:"~/.codex/config.toml",description:"Configures Codex CLI via the native OpenAI Responses wire API on loopback.",command:"codex --model pool/high",configSnippet:`# ~/.codex/config.toml
|
|
359
|
+
[model_providers.llm_relay]
|
|
360
|
+
base_url = "http://127.0.0.1:8791/v1"
|
|
361
|
+
wire_api = "responses"
|
|
362
|
+
requires_key = false
|
|
363
|
+
|
|
364
|
+
[models.relay_auto]
|
|
365
|
+
provider = "llm_relay"
|
|
366
|
+
model = "auto"`,clientKeys:["codex","codex-cli","openai-codex"]},{id:"opencode",name:"OpenCode",category:"code",protocol:"OpenAI Chat",configType:"Config File",configPath:"~/.config/opencode/opencode.json",description:"Terminal coding assistant configured as the relay-lane agent for headless subagent execution.",configSnippet:`{
|
|
367
|
+
"provider": {
|
|
368
|
+
"llm_relay": {
|
|
369
|
+
"baseURL": "http://127.0.0.1:8791/v1",
|
|
370
|
+
"models": [
|
|
371
|
+
"auto",
|
|
372
|
+
"pool/xhigh",
|
|
373
|
+
"pool/high",
|
|
374
|
+
"pool/medium",
|
|
375
|
+
"pool/low"
|
|
376
|
+
]
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
}`,clientKeys:["opencode","opencode-ai","relay-lane"]},{id:"cline",name:"Cline (VS Code)",category:"code",protocol:"OpenAI Chat",configType:"IDE Settings",description:"Autonomous coding agent extension for VS Code with tool-calling capabilities.",configSnippet:`API Provider: OpenAI Compatible
|
|
380
|
+
Base URL: http://127.0.0.1:8791/v1
|
|
381
|
+
API Key: relay-loopback
|
|
382
|
+
Model ID: auto (or pool/high)`,clientKeys:["cline","cline-bot"]},{id:"continue",name:"Continue.dev",category:"code",protocol:"OpenAI Chat",configType:"Config File",configPath:"~/.continue/config.json",description:"Open-source autopilot extension for VS Code and JetBrains IDEs.",configSnippet:`{
|
|
383
|
+
"models": [
|
|
384
|
+
{
|
|
385
|
+
"title": "LLM Relay (Auto Pool)",
|
|
386
|
+
"provider": "openai",
|
|
387
|
+
"model": "auto",
|
|
388
|
+
"apiBase": "http://127.0.0.1:8791/v1",
|
|
389
|
+
"apiKey": "relay-loopback"
|
|
390
|
+
}
|
|
391
|
+
]
|
|
392
|
+
}`,clientKeys:["continue","continue-dev"]},{id:"aider",name:"Aider",category:"code",protocol:"OpenAI Chat",configType:"Environment Variable",description:"AI pair programming in your terminal, with git worktree support.",command:"aider --openai-api-base http://127.0.0.1:8791/v1 --model openai/auto",configSnippet:`export OPENAI_API_BASE="http://127.0.0.1:8791/v1"
|
|
393
|
+
export OPENAI_API_KEY="relay-loopback"
|
|
394
|
+
aider --model openai/pool/high`,clientKeys:["aider","aider-chat"]},{id:"cursor",name:"Cursor",category:"code",protocol:"OpenAI Chat",configType:"IDE Settings",description:"AI code editor pointing at the local relay endpoint for model inference.",configSnippet:`Cursor Settings > Models > OpenAI API:
|
|
395
|
+
Base URL: http://127.0.0.1:8791/v1
|
|
396
|
+
API Key: relay-loopback
|
|
397
|
+
Override Model: pool/high`,clientKeys:["cursor","cursor-ai"]},{id:"roo-code",name:"Roo Code",category:"code",protocol:"OpenAI Chat",configType:"IDE Settings",description:"Community fork of Cline with custom modes, pointing at local relay pools.",configSnippet:`Provider: OpenAI Compatible
|
|
398
|
+
Base URL: http://127.0.0.1:8791/v1
|
|
399
|
+
API Key: relay-loopback
|
|
400
|
+
Model: auto`,clientKeys:["roo","roo-code"]},{id:"goose",name:"Goose CLI",category:"agent",protocol:"OpenAI Chat",configType:"Config File",configPath:"~/.config/goose/config.yaml",description:"Open source on-machine autonomous developer agent by Block.",configSnippet:`GOOSE_PROVIDER: openai
|
|
401
|
+
GOOSE_MODEL: auto
|
|
402
|
+
OPENAI_HOST: http://127.0.0.1:8791/v1
|
|
403
|
+
OPENAI_API_KEY: relay-loopback`,clientKeys:["goose","goose-agent"]}];function ev(){const[s,d]=T.useState(null),[f,u]=T.useState(new Map),[p,y]=T.useState(()=>typeof navigator<"u"&&/win/i.test(navigator.platform||navigator.userAgent)?"ps":"bash");T.useEffect(()=>{Promise.all([fetch("/candidates").then(x=>x.ok?x.json():null).catch(()=>null),fetch("/dispatch").then(x=>x.ok?x.json():null).catch(()=>null)]).then(([x,v])=>{var k,V;const U=new Map;if((k=x==null?void 0:x.accounting)!=null&&k.clients&&Array.isArray(x.accounting.clients))for(const L of x.accounting.clients)U.set(L.client.toLowerCase(),L);if(Array.isArray(v==null?void 0:v.ladder)){for(const L of v.ladder)if((V=L.stats)!=null&&V.calls){const Q=String(L.id).toLowerCase(),I=U.get(Q),oe=((I==null?void 0:I.requests)??0)+L.stats.calls;U.set(Q,{client:L.id,requests:oe,lastSeenAt:L.stats.lastAt?new Date(L.stats.lastAt).toISOString():void 0});const ae=Q.split("-")[0];if(ae&&ae!==Q){const be=U.get(ae);U.set(ae,{client:ae,requests:((be==null?void 0:be.requests)??0)+L.stats.calls,lastSeenAt:L.stats.lastAt?new Date(L.stats.lastAt).toISOString():void 0})}}}U.size>0&&u(U)}).catch(()=>{})},[]);const R=(x,v)=>{var U;(U=navigator.clipboard)==null||U.writeText(x),d(v),setTimeout(()=>d(null),2e3)},q=p==="ps"?'$env:ANTHROPIC_BASE_URL = "http://127.0.0.1:8791"; claude --model pool/medium':'export ANTHROPIC_BASE_URL="http://127.0.0.1:8791" && claude --model pool/medium';return n.jsxs("div",{style:{maxWidth:"1400px",margin:"0 auto",padding:"1rem"},children:[n.jsxs("div",{style:{marginBottom:"1.5rem"},children:[n.jsx("h1",{style:{margin:"0 0 0.25rem",fontSize:"1.6rem",fontWeight:700},children:"Agent Connection Hub"}),n.jsxs("p",{style:{margin:0,color:"var(--muted)",fontSize:"0.9rem"},children:["Configure developer agents and coding CLIs to offload work through ",n.jsx("code",{children:"127.0.0.1:8791"}),"."]})]}),n.jsxs("section",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:"1rem",padding:"1.25rem",marginBottom:"1.75rem"},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:"0.5rem",marginBottom:"0.4rem"},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[n.jsx(c1,{size:18,style:{color:"var(--accent)"}}),n.jsx("h2",{style:{margin:0,fontSize:"1rem",fontWeight:600},children:"Quickstart: Local Loopback"})]}),n.jsxs("div",{style:{display:"inline-flex",border:"1px solid var(--border)",borderRadius:"0.375rem",overflow:"hidden",fontSize:"0.75rem"},children:[n.jsx("button",{type:"button",onClick:()=>y("ps"),style:{padding:"0.2rem 0.55rem",background:p==="ps"?"var(--row-hover)":"transparent",color:p==="ps"?"var(--accent)":"var(--muted)",border:"none",fontWeight:p==="ps"?650:400,cursor:"pointer"},children:"PowerShell"}),n.jsx("button",{type:"button",onClick:()=>y("bash"),style:{padding:"0.2rem 0.55rem",background:p==="bash"?"var(--row-hover)":"transparent",color:p==="bash"?"var(--accent)":"var(--muted)",border:"none",borderLeft:"1px solid var(--border)",fontWeight:p==="bash"?650:400,cursor:"pointer"},children:"Bash / POSIX"})]})]}),n.jsxs("p",{style:{margin:"0 0 0.75rem",fontSize:"0.85rem",color:"var(--muted)",maxWidth:"700px"},children:["The relay operates simultaneously on Anthropic Messages (",n.jsx("code",{children:"/v1/messages"}),"), OpenAI Responses (",n.jsx("code",{children:"/v1/responses"}),"), and OpenAI Chat (",n.jsx("code",{children:"/v1/chat/completions"}),")."]}),n.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",background:"var(--row-hover)",padding:"0.6rem 0.85rem",borderRadius:"0.5rem",border:"1px solid var(--border)",fontFamily:"monospace",fontSize:"0.82rem",overflowX:"auto",gap:"1rem"},children:[n.jsx("code",{children:q}),n.jsxs("button",{type:"button",onClick:()=>R(q,"quickstart"),style:{display:"inline-flex",alignItems:"center",gap:"0.3rem",padding:"0.25rem 0.6rem",fontSize:"0.75rem",background:"var(--surface)",flexShrink:0},children:[s==="quickstart"?n.jsx(Gt,{size:12,color:"#10b981"}):n.jsx(ml,{size:12}),s==="quickstart"?"Copied":"Copy"]})]})]}),n.jsx("h2",{style:{fontSize:"1.1rem",fontWeight:600,marginBottom:"0.85rem"},children:"Supported Developer Agents"}),n.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(340px, 1fr))",gap:"1.25rem",marginBottom:"2rem"},children:P1.map(x=>{const v=s===x.id,U=x.clientKeys.map(V=>f.get(V)).find(Boolean),k=!!(U&&U.requests>0);return n.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:"0.85rem",padding:"1.1rem",display:"flex",flexDirection:"column",justifyContent:"space-between",gap:"0.85rem"},children:[n.jsxs("div",{children:[n.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"0.35rem"},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.45rem"},children:[n.jsx(ds,{size:18,style:{color:"var(--accent)"}}),n.jsx("span",{style:{fontWeight:650,fontSize:"1rem"},children:x.name})]}),n.jsx("span",{style:{fontSize:"0.7rem",padding:"0.1rem 0.4rem",borderRadius:"0.25rem",background:"var(--row-hover)",color:"var(--muted)",fontWeight:600},children:x.configType})]}),n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem",marginBottom:"0.6rem"},children:[n.jsx("span",{style:{fontSize:"0.72rem",color:"var(--muted)",padding:"0.05rem 0.35rem",borderRadius:"0.25rem",border:"1px solid var(--border)"},children:x.protocol}),k?n.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:"0.25rem",fontSize:"0.7rem",color:"#059669",background:"rgba(16, 185, 129, 0.12)",padding:"0.05rem 0.4rem",borderRadius:"9999px",fontWeight:600},children:[n.jsx(Va,{size:11})," Connected (",U==null?void 0:U.requests," reqs)"]}):n.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:"0.25rem",fontSize:"0.7rem",color:"var(--muted)",background:"var(--row-hover)",padding:"0.05rem 0.4rem",borderRadius:"9999px"},children:[n.jsx(us,{size:11})," Ready to connect"]})]}),n.jsx("p",{style:{margin:"0 0 0.65rem",fontSize:"0.82rem",color:"var(--muted)",lineHeight:1.4},children:x.description}),x.configPath&&n.jsxs("div",{style:{marginBottom:"0.5rem",fontSize:"0.75rem",color:"var(--muted)"},children:["Config file: ",n.jsx("code",{style:{fontFamily:"monospace",color:"var(--ink)"},children:x.configPath})]}),n.jsx("div",{style:{position:"relative"},children:n.jsx("pre",{style:{margin:0,padding:"0.65rem",background:"var(--row-hover)",border:"1px solid var(--border)",borderRadius:"0.45rem",fontSize:"0.75rem",fontFamily:"monospace",overflowX:"auto",lineHeight:1.4,color:"var(--ink)"},children:x.configSnippet})})]}),n.jsxs("div",{style:{borderTop:"1px solid var(--border)",paddingTop:"0.65rem",display:"flex",justifyContent:"flex-end",flexWrap:"wrap",gap:"0.5rem"},children:[x.command&&n.jsxs("button",{type:"button",onClick:()=>R(x.command,`${x.id}-cmd`),style:{display:"inline-flex",alignItems:"center",gap:"0.35rem",fontSize:"0.78rem",padding:"0.3rem 0.65rem",background:"transparent",borderColor:"var(--border)"},children:[s===`${x.id}-cmd`?n.jsx(Gt,{size:13,color:"#10b981"}):n.jsx(d1,{size:13}),s===`${x.id}-cmd`?"Copied Command!":"Copy Command"]}),n.jsxs("button",{type:"button",onClick:()=>R(x.configSnippet,x.id),style:{display:"inline-flex",alignItems:"center",gap:"0.35rem",fontSize:"0.78rem",padding:"0.3rem 0.65rem",background:"transparent",borderColor:"var(--border)"},children:[v?n.jsx(Gt,{size:13,color:"#10b981"}):n.jsx(ml,{size:13}),v?"Copied Config!":"Copy Configuration"]})]})]},x.id)})})]})}const is=[{id:"gemini",name:"Google Gemini",authEnv:"GEMINI_API_KEY",tierType:"free",signupUrl:"https://aistudio.google.com/app/apikey",models:["gemini-2.5-flash","gemini-2.5-pro","gemini-1.5-flash"],description:"Free rate-limited tier via Google AI Studio. Excellent speed and large 1M+ context."},{id:"groq",name:"Groq",authEnv:"GROQ_API_KEY",tierType:"free",signupUrl:"https://console.groq.com/keys",models:["llama-3.3-70b-versatile","llama-3.1-8b-instant","mixtral-8x7b-32768"],description:"Ultra-fast LPU inference with generous free-tier requests per minute."},{id:"deepseek",name:"DeepSeek",authEnv:"DEEPSEEK_API_KEY",tierType:"mixed",signupUrl:"https://platform.deepseek.com",models:["deepseek-chat","deepseek-reasoner"],description:"DeepSeek V3 and R1 reasoning models with low token pricing."},{id:"openrouter",name:"OpenRouter",authEnv:"OPENROUTER_API_KEY",tierType:"free",signupUrl:"https://openrouter.ai/keys",models:["meta-llama/llama-3.3-70b-instruct:free","qwen/qwen-2.5-coder-32b-instruct:free"],description:"Unified aggregator providing dozens of 100% free models with `:free` suffix."},{id:"nim",name:"NVIDIA NIM",authEnv:"NVIDIA_API_KEY",tierType:"credits",signupUrl:"https://build.nvidia.com",models:["meta/llama-3.1-70b-instruct","nvidia/nemotron-3-super-120b-a12b"],description:"Free initial developer credits on NVIDIA hosted infrastructure."},{id:"mistral",name:"Mistral / Codestral",authEnv:"MISTRAL_API_KEY",tierType:"free",signupUrl:"https://console.mistral.ai/api-keys",models:["codestral-latest","mistral-small-latest"],description:"Free Codestral tier specialized for code generation and refactoring."},{id:"cerebras",name:"Cerebras",authEnv:"CEREBRAS_API_KEY",tierType:"free",signupUrl:"https://cloud.cerebras.ai",models:["llama3.1-70b","llama3.1-8b"],description:"Fast wafer-scale inference with free developer tier limits."},{id:"cohere",name:"Cohere",authEnv:"COHERE_API_KEY",tierType:"free",signupUrl:"https://dashboard.cohere.com/api-keys",models:["command-r","command-r-plus"],description:"Free trial keys for Command R enterprise models."},{id:"huggingface",name:"Hugging Face",authEnv:"HUGGINGFACE_API_KEY",tierType:"free",signupUrl:"https://huggingface.co/settings/tokens",models:["meta-llama/Llama-3.3-70B-Instruct"],description:"Free serverless inference API across thousands of open community models."},{id:"anthropic",name:"Anthropic",authEnv:"ANTHROPIC_API_KEY",tierType:"paid",signupUrl:"https://console.anthropic.com/settings/keys",models:["claude-3-5-sonnet","claude-3-5-haiku","claude-3-opus"],description:"Primary Claude models. Used for direct fallback and benchmark comparisons."},{id:"ollama",name:"Ollama (Local)",authEnv:"OLLAMA_BASE_URL",tierType:"free",signupUrl:"https://ollama.com",models:["qwen2.5-coder:14b","llama3.2:3b"],description:"Self-hosted loopback models running on local GPU or CPU with zero external network traffic."},{id:"cloudflare",name:"Cloudflare Workers AI",authEnv:"CLOUDFLARE_API_KEY",tierType:"free",signupUrl:"https://dash.cloudflare.com",models:["@cf/meta/llama-3.3-70b-instruct"],description:"Edge serverless AI inference with free daily neuron allocations."}];function tv(){const[s,d]=T.useState(null),[f,u]=T.useState([]),[p,y]=T.useState(!1),[R,q]=T.useState(!1),[x,v]=T.useState(null),[U,k]=T.useState(!1),[V,L]=T.useState(null),Q=T.useCallback(async()=>{y(!0);try{const[Y,ce]=await Promise.all([fetch("/telemetry",{headers:{Accept:"application/json"}}).catch(()=>null),fetch("/candidates",{headers:{Accept:"application/json"}}).catch(()=>null)]);if(Y&&Y.ok){const X=await Y.json();if(d(X),Array.isArray(X.providers)){const xe=[];for(const he of X.providers)he.cooldownRemainingMs>0&&xe.push({provider:he.provider,reason:he.lastStatus?`HTTP ${he.lastStatus}`:"Cooldown backoff",until:new Date(Date.now()+he.cooldownRemainingMs).toISOString(),observedAt:new Date().toISOString()});xe.length>0?u(xe):u([])}}if(ce&&ce.ok){const X=await ce.json();Array.isArray(X.cooldowns)&&X.cooldowns.length>0&&u(X.cooldowns)}}catch{}finally{y(!1)}},[]);T.useEffect(()=>{Q()},[Q]);const I=async()=>{q(!0),L(null);try{(await fetch("/ping",{headers:{Accept:"application/json"}})).ok&&(L("Fleet check initiated. Refreshing provider metrics..."),setTimeout(()=>{Q(),L(null)},2e3))}catch{L("Failed to reach relay ping endpoint.")}finally{q(!1)}},oe=(Y,ce)=>{navigator.clipboard.writeText(Y),v(ce),setTimeout(()=>v(null),2e3)},ae=async Y=>{k(!0),L(null);try{const ce=await fetch("/cooldowns/clear",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:Y})});if(ce.ok)L(`Cooldown cleared for ${Y}`),Q();else{const X=await ce.json().catch(()=>({}));L(`Clear failed: ${X.message??"Unknown error"}`)}}catch{L("Failed to connect to relay.")}finally{k(!1)}},be=new Set(((s==null?void 0:s.providers)??[]).filter(Y=>Y.hasKey).map(Y=>Y.provider.toLowerCase().trim())),$=new Set(((s==null?void 0:s.providers)??[]).filter(Y=>Y.isHealthy===!0).map(Y=>Y.provider.toLowerCase().trim())),ee=is.filter(Y=>be.has(Y.id)||be.has(Y.name.toLowerCase())).length;return n.jsxs("div",{style:{maxWidth:"1400px",margin:"0 auto",padding:"1rem"},children:[n.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",flexWrap:"wrap",gap:"1rem",marginBottom:"1.5rem"},children:[n.jsxs("div",{children:[n.jsx("h1",{style:{margin:"0 0 0.25rem",fontSize:"1.6rem",fontWeight:700},children:"Keys & Providers"}),n.jsx("p",{style:{margin:0,color:"var(--muted)",fontSize:"0.9rem"},children:"Provider configurations, free-tier signup links, and live fleet health."})]}),n.jsxs("div",{style:{display:"flex",gap:"0.5rem",alignItems:"center"},children:[n.jsxs("button",{type:"button",onClick:()=>void Q(),disabled:p,style:{display:"inline-flex",alignItems:"center",gap:"0.4rem",padding:"0.45rem 0.85rem",fontSize:"0.85rem"},children:[n.jsx(ga,{size:14,className:p?"animate-spin":""})," Refresh"]}),n.jsxs("button",{type:"button",onClick:()=>void I(),disabled:R,style:{display:"inline-flex",alignItems:"center",gap:"0.4rem",padding:"0.45rem 0.85rem",fontSize:"0.85rem",background:"var(--accent)",color:"#fff",border:"none",fontWeight:600},children:[n.jsx(wi,{size:14})," ",R?"Checking...":"Check All Providers"]})]})]}),V&&n.jsx("div",{style:{padding:"0.6rem 1rem",marginBottom:"1.25rem",borderRadius:"0.5rem",background:"rgba(59, 130, 246, 0.12)",border:"1px solid rgba(59, 130, 246, 0.3)",color:"var(--accent)",fontSize:"0.85rem"},children:V}),n.jsxs("section",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:"1rem",padding:"1rem 1.25rem",marginBottom:"1.5rem",display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap",gap:"1rem"},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"1rem"},children:[n.jsx("div",{style:{width:"2.5rem",height:"2.5rem",borderRadius:"0.5rem",background:"rgba(16, 185, 129, 0.12)",display:"flex",alignItems:"center",justifyContent:"center",color:"#10b981"},children:n.jsx(fs,{size:20})}),n.jsxs("div",{children:[n.jsxs("div",{style:{fontWeight:600,fontSize:"1rem"},children:[ee," of ",is.length," providers configured"]}),n.jsxs("div",{style:{color:"var(--muted)",fontSize:"0.8rem",marginTop:"0.15rem"},children:[(s==null?void 0:s.healthyProvidersCount)??0," providers currently responding to health checks"]})]})]}),n.jsx("div",{style:{display:"flex",gap:"0.4rem",flexWrap:"wrap"},children:is.map(Y=>{const ce=be.has(Y.id)||be.has(Y.name.toLowerCase());return n.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:"0.3rem",padding:"0.2rem 0.5rem",borderRadius:"9999px",fontSize:"0.75rem",background:ce?"rgba(16, 185, 129, 0.12)":"var(--row-hover)",color:ce?"#059669":"var(--muted)",border:`1px solid ${ce?"rgba(16, 185, 129, 0.25)":"var(--border)"}`},children:[n.jsx(pl,{provider:Y.id}),Y.name,ce&&n.jsx(Gt,{size:12})]},Y.id)})})]}),n.jsxs("section",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:"0.85rem",padding:"1.25rem",marginBottom:"1.5rem",display:"flex",flexDirection:"column",gap:"0.75rem"},children:[n.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap",gap:"0.5rem"},children:[n.jsxs("div",{children:[n.jsx("h3",{style:{margin:0,fontSize:"1rem",fontWeight:700},children:"Unified Relay Endpoint & Key"}),n.jsx("p",{className:"muted",style:{margin:"0.2rem 0 0",fontSize:"0.8rem"},children:"Configure your developer tools, SDKs, and local agents to point directly at this relay loopback."})]}),n.jsxs("button",{type:"button",onClick:()=>oe("http://127.0.0.1:8791/v1","endpoint"),style:{display:"inline-flex",alignItems:"center",gap:"0.35rem",padding:"0.3rem 0.65rem",fontSize:"0.75rem",borderRadius:"0.375rem",border:"1px solid var(--border)",background:"var(--row-hover)",cursor:"pointer"},children:[x==="endpoint"?n.jsx(Gt,{size:12,color:"#10b981"}):n.jsx(ml,{size:12}),n.jsx("span",{children:x==="endpoint"?"Copied Endpoint":"Copy Endpoint"})]})]}),n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(280px, 1fr))",gap:"0.75rem",marginTop:"0.25rem"},children:[n.jsxs("div",{style:{padding:"0.75rem",borderRadius:"0.5rem",backgroundColor:"var(--card)",border:"1px solid var(--border)"},children:[n.jsx("span",{style:{display:"block",fontSize:"0.7rem",textTransform:"uppercase",color:"var(--muted-foreground)",fontWeight:600},children:"Base URL"}),n.jsx("code",{style:{fontSize:"0.85rem",fontFamily:"monospace",color:"var(--foreground)",fontWeight:600},children:"http://127.0.0.1:8791/v1"})]}),n.jsxs("div",{style:{padding:"0.75rem",borderRadius:"0.5rem",backgroundColor:"var(--card)",border:"1px solid var(--border)",display:"flex",justifyContent:"space-between",alignItems:"center",gap:"0.5rem"},children:[n.jsxs("div",{children:[n.jsx("span",{style:{display:"block",fontSize:"0.7rem",textTransform:"uppercase",color:"var(--muted-foreground)",fontWeight:600},children:"API Key / Auth Header"}),n.jsxs("code",{style:{fontSize:"0.85rem",fontFamily:"monospace",color:"var(--muted-foreground)"},children:["Bearer loopback ",n.jsx("span",{style:{fontSize:"0.75rem",opacity:.8},children:"(relay accepts any local token)"})]})]}),n.jsxs("button",{type:"button",onClick:()=>oe("relay-loopback","apikey"),style:{display:"inline-flex",alignItems:"center",gap:"0.3rem",padding:"0.25rem 0.5rem",fontSize:"0.72rem",borderRadius:"0.375rem",border:"1px solid var(--border)",background:"var(--row-hover)",cursor:"pointer",flexShrink:0},children:[x==="apikey"?n.jsx(Gt,{size:11,color:"#10b981"}):n.jsx(ml,{size:11}),n.jsx("span",{children:x==="apikey"?"Copied":"Copy Key"})]})]})]})]}),n.jsx("h2",{style:{fontSize:"1.1rem",fontWeight:600,marginBottom:"0.75rem"},children:"Supported Providers & Free Tiers"}),n.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:"1rem",marginBottom:"2rem"},children:is.map(Y=>{const ce=be.has(Y.id)||be.has(Y.name.toLowerCase()),X=$.has(Y.id)||$.has(Y.name.toLowerCase()),xe=`llm-relay keys --set ${Y.id}`;return n.jsxs("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:"0.85rem",padding:"1rem",display:"flex",flexDirection:"column",justifyContent:"space-between",gap:"0.75rem"},children:[n.jsxs("div",{children:[n.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"0.5rem"},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.4rem"},children:[n.jsx(pl,{provider:Y.id}),n.jsx("span",{style:{fontWeight:650,fontSize:"0.95rem"},children:Y.name})]}),n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.35rem"},children:[n.jsx("span",{style:{fontSize:"0.7rem",padding:"0.1rem 0.4rem",borderRadius:"0.25rem",background:"var(--row-hover)",color:"var(--muted)",fontWeight:600,textTransform:"uppercase"},children:Y.tierType}),ce?n.jsxs("span",{style:{fontSize:"0.72rem",padding:"0.1rem 0.45rem",borderRadius:"9999px",background:X?"rgba(16, 185, 129, 0.15)":"rgba(245, 158, 11, 0.15)",color:X?"#059669":"#d97706",fontWeight:600,display:"inline-flex",alignItems:"center",gap:"0.25rem"},children:[n.jsx(Va,{size:12})," ",X?"Active & Healthy":"Configured"]}):n.jsx("span",{style:{fontSize:"0.72rem",padding:"0.1rem 0.45rem",borderRadius:"9999px",background:"var(--row-hover)",color:"var(--muted)",border:"1px dashed var(--border)"},children:"Needs Key"})]})]}),n.jsx("p",{style:{margin:"0 0 0.6rem",fontSize:"0.8rem",color:"var(--muted)",lineHeight:1.4},children:Y.description}),n.jsxs("div",{style:{marginBottom:"0.6rem"},children:[n.jsx("span",{style:{fontSize:"0.72rem",color:"var(--muted)",display:"block",marginBottom:"0.2rem"},children:"Environment Variable:"}),n.jsx("code",{style:{display:"inline-block",fontSize:"0.75rem",padding:"0.15rem 0.4rem",borderRadius:"0.3rem",background:"var(--row-hover)",border:"1px solid var(--border)",color:"var(--ink)",fontFamily:"monospace"},children:Y.authEnv})]}),n.jsxs("div",{children:[n.jsx("span",{style:{fontSize:"0.72rem",color:"var(--muted)",display:"block",marginBottom:"0.25rem"},children:"Popular Models:"}),n.jsx("div",{style:{display:"flex",gap:"0.3rem",flexWrap:"wrap"},children:Y.models.map(he=>n.jsx("span",{style:{fontSize:"0.7rem",padding:"0.1rem 0.35rem",borderRadius:"0.25rem",background:"var(--row-hover)",color:"var(--muted)",fontFamily:"monospace"},children:he},he))})]})]}),n.jsxs("div",{style:{borderTop:"1px solid var(--border)",paddingTop:"0.65rem",display:"flex",justifyContent:"space-between",alignItems:"center",gap:"0.5rem"},children:[n.jsxs("a",{href:Y.signupUrl,target:"_blank",rel:"noopener noreferrer",style:{display:"inline-flex",alignItems:"center",gap:"0.3rem",fontSize:"0.78rem",color:"var(--accent)",textDecoration:"none",fontWeight:500},children:["Get Free Key ",n.jsx(l1,{size:12})]}),n.jsxs("button",{type:"button",onClick:()=>oe(xe,Y.id),style:{display:"inline-flex",alignItems:"center",gap:"0.3rem",fontSize:"0.75rem",padding:"0.25rem 0.5rem",background:"transparent",borderColor:"var(--border)"},children:[x===Y.id?n.jsx(Gt,{size:12,color:"#10b981"}):n.jsx(ml,{size:12}),x===Y.id?"Copied":"Copy CLI Setup"]})]})]},Y.id)})}),n.jsx("h2",{style:{fontSize:"1.1rem",fontWeight:600,marginBottom:"0.75rem"},children:"Active Cooldowns & Circuit Breakers"}),n.jsx("div",{style:{background:"var(--surface)",border:"1px solid var(--border)",borderRadius:"0.85rem",overflow:"hidden",marginBottom:"2rem"},children:f.length===0?n.jsxs("div",{style:{padding:"2rem",textAlign:"center",color:"var(--muted)"},children:[n.jsx(Va,{size:32,style:{margin:"0 auto 0.5rem",color:"#10b981"}}),n.jsx("div",{style:{fontWeight:600,color:"var(--ink)"},children:"All providers healthy"}),n.jsx("p",{style:{margin:"0.25rem 0 0",fontSize:"0.85rem"},children:"No active cooldowns or rate-limit circuit breakers currently tripped."})]}):n.jsxs("table",{className:"responsive-table",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{children:"Provider / Deployment"}),n.jsx("th",{children:"Credential"}),n.jsx("th",{children:"Reason"}),n.jsx("th",{children:"Cooling Until"}),n.jsx("th",{children:"Observed"}),n.jsx("th",{children:"Actions"})]})}),n.jsx("tbody",{children:f.map(Y=>n.jsxs("tr",{children:[n.jsxs("td",{children:[n.jsxs("span",{className:"inline-flex items-center gap-1",children:[n.jsx(pl,{provider:Y.provider}),n.jsx("strong",{children:Y.provider})]}),Y.deployment&&n.jsxs("small",{className:"muted",children:[" · ",Y.deployment]})]}),n.jsx("td",{children:Y.credentialId??"default"}),n.jsx("td",{children:n.jsx(xt,{value:Y.reason})}),n.jsx("td",{children:n.jsx("span",{title:st(Y.until),children:Ui(Y.until)})}),n.jsx("td",{children:n.jsx("span",{title:st(Y.observedAt),children:Ui(Y.observedAt)})}),n.jsx("td",{children:n.jsxs("button",{type:"button",onClick:()=>void ae(Y.provider),disabled:U,style:{padding:"0.25rem 0.5rem",fontSize:"0.75rem",display:"inline-flex",alignItems:"center",gap:"0.3rem"},children:[n.jsx(kp,{size:12})," Clear Cooldown"]})})]},`${Y.provider}-${Y.reason}-${Y.until}`))})]})})]})}function lv({open:s,onClose:d,onSelectTab:f,onToggleTheme:u,onRefresh:p,onOpenSettings:y,theme:R}){const[q,x]=T.useState(""),[v,U]=T.useState(0),k=T.useRef(null),V=T.useMemo(()=>[{id:"tab-analytics",title:"View Fleet Analytics",category:"Navigation",icon:Xc,run:()=>{f("analytics"),d()}},{id:"tab-routing",title:"View Routing Pools & Dispatch Ladder",category:"Navigation",icon:ki,run:()=>{f("routing"),d()}},{id:"tab-playground",title:"Open Interactive Playground",category:"Navigation",icon:_p,run:()=>{f("playground"),d()}},{id:"tab-keys",title:"View Keys & Provider Management",category:"Navigation",icon:fs,run:()=>{f("keys"),d()}},{id:"tab-agents",title:"View Agent Connection Hub",category:"Navigation",icon:ds,run:()=>{f("agents"),d()}},{id:"action-theme",title:`Switch to ${R==="light"?"Dark":"Light"} Theme`,category:"Actions",icon:R==="light"?Qc:Jc,run:()=>{u(),d()}},{id:"action-refresh",title:"Refresh Telemetry Snapshot",category:"Actions",icon:ga,run:()=>{p(),d()}},{id:"action-settings",title:"Open Dashboard Settings",category:"Actions",icon:Zc,run:()=>{y==null||y(),d()}},{id:"action-copy-url",title:"Copy Base URL (http://127.0.0.1:8791)",category:"Actions",icon:ml,run:()=>{var Q;(Q=navigator.clipboard)==null||Q.writeText("http://127.0.0.1:8791"),d()}}],[d,y,p,f,u,R]),L=T.useMemo(()=>{const Q=q.trim().toLowerCase();return Q?V.filter(I=>I.title.toLowerCase().includes(Q)||I.category.toLowerCase().includes(Q)):V},[V,q]);return T.useEffect(()=>{s&&(x(""),U(0),queueMicrotask(()=>{var Q;return(Q=k.current)==null?void 0:Q.focus()}))},[s]),T.useEffect(()=>{if(!s)return;const Q=I=>{if(I.key==="Escape")I.preventDefault(),d();else if(I.key==="ArrowDown")I.preventDefault(),U(oe=>L.length===0?0:(oe+1)%L.length);else if(I.key==="ArrowUp")I.preventDefault(),U(oe=>L.length===0?0:(oe-1+L.length)%L.length);else if(I.key==="Enter"){I.preventDefault();const oe=L[v];oe&&oe.run()}};return window.addEventListener("keydown",Q),()=>window.removeEventListener("keydown",Q)},[v,L,d,s]),s?n.jsx("div",{className:"dialog-backdrop",role:"presentation",onMouseDown:Q=>{Q.target===Q.currentTarget&&d()},children:n.jsxs("div",{className:"dialog",role:"dialog","aria-modal":"true","aria-label":"Command Palette",style:{maxWidth:"560px",padding:0,overflow:"hidden"},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",borderBottom:"1px solid var(--border)",padding:"0.75rem 1rem",gap:"0.5rem"},children:[n.jsx(Kc,{size:18,style:{color:"var(--muted-foreground)",flexShrink:0},"aria-hidden":"true"}),n.jsx("input",{ref:k,type:"text",value:q,onChange:Q=>{x(Q.target.value),U(0)},placeholder:"Type a command or jump to page…",style:{flex:1,border:"none",outline:"none",background:"transparent",color:"inherit",fontSize:"0.95rem"}}),n.jsx("button",{type:"button",onClick:d,"aria-label":"Close command palette",style:{background:"none",border:"none",cursor:"pointer",color:"var(--muted-foreground)",display:"flex"},children:n.jsx(wn,{size:18})})]}),n.jsx("div",{style:{maxHeight:"320px",overflowY:"auto",padding:"0.5rem"},children:L.length===0?n.jsxs("p",{style:{padding:"1.5rem",textAlign:"center",color:"var(--muted-foreground)",fontSize:"0.875rem"},children:["No commands matching “",q,"”"]}):L.map((Q,I)=>{const oe=Q.icon,ae=I===v;return n.jsxs("div",{onClick:()=>Q.run(),onMouseEnter:()=>U(I),style:{display:"flex",alignItems:"center",gap:"0.75rem",padding:"0.5rem 0.75rem",borderRadius:"0.375rem",cursor:"pointer",backgroundColor:ae?"var(--accent)":"transparent",color:ae?"var(--accent-foreground)":"inherit",fontSize:"0.875rem"},children:[n.jsx(oe,{size:16,style:{flexShrink:0,opacity:.7},"aria-hidden":"true"}),n.jsx("span",{style:{flex:1},children:Q.title}),n.jsx("span",{style:{fontSize:"0.75rem",opacity:.5},children:Q.category})]},Q.id)})}),n.jsxs("div",{style:{borderTop:"1px solid var(--border)",padding:"0.5rem 1rem",fontSize:"0.75rem",color:"var(--muted-foreground)",display:"flex",justifyContent:"space-between"},children:[n.jsx("span",{children:"Navigate with ↑ ↓"}),n.jsx("span",{children:"Execute with ↵ · Dismiss with Esc"})]})]})}):null}function av({open:s,onClose:d,theme:f,onToggleTheme:u,controlToken:p,onSetControlToken:y}){const[R,q]=T.useState(p),[x,v]=T.useState(null),[U,k]=T.useState(!1),[V,L]=T.useState(null),[Q,I]=T.useState(null);if(!s)return null;const oe=$=>{$.preventDefault();const ee=R.trim();y(ee),v(ee?"Control token saved in memory for this session.":"Control token cleared."),setTimeout(()=>v(null),2500)},ae=async()=>{k(!0),L(null);try{const $={"Content-Type":"application/json"};p&&($["x-llm-relay-control-token"]=p);const ee=await fetch("/cooldowns/clear",{method:"POST",headers:$});ee.ok?L("Cooldowns and circuit breakers cleared."):L(`Failed to clear cooldowns (HTTP ${ee.status}).`)}catch{L("Failed to reach relay endpoint.")}finally{k(!1),setTimeout(()=>L(null),3e3)}},be=($,ee)=>{navigator.clipboard.writeText($),I(ee),setTimeout(()=>I(null),2e3)};return n.jsx("div",{role:"dialog","aria-modal":"true","aria-labelledby":"settings-dialog-title",style:{position:"fixed",inset:0,backgroundColor:"rgba(0, 0, 0, 0.6)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:50,padding:"1rem"},onClick:$=>{$.target===$.currentTarget&&d()},children:n.jsxs("div",{style:{backgroundColor:"var(--surface)",color:"var(--ink)",border:"1px solid var(--border)",borderRadius:"0.75rem",maxWidth:"36rem",width:"100%",maxHeight:"90vh",overflowY:"auto",boxShadow:"0 25px 50px -12px rgba(0, 0, 0, 0.4)"},children:[n.jsxs("div",{style:{padding:"1rem 1.25rem",borderBottom:"1px solid var(--border)",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[n.jsx(Zc,{size:18,style:{color:"var(--accent)"}}),n.jsx("h2",{id:"settings-dialog-title",style:{margin:0,fontSize:"1.1rem",fontWeight:700},children:"Relay Dashboard Settings"})]}),n.jsx("button",{type:"button",onClick:d,"aria-label":"Close settings",style:{background:"transparent",border:"none",color:"var(--muted)",cursor:"pointer",padding:"0.25rem",borderRadius:"0.25rem"},children:n.jsx(wn,{size:18})})]}),n.jsxs("div",{style:{padding:"1.25rem",display:"flex",flexDirection:"column",gap:"1.25rem"},children:[n.jsxs("section",{style:{padding:"0.85rem",borderRadius:"0.5rem",background:"var(--row-hover)",border:"1px solid var(--border)"},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem",marginBottom:"0.5rem"},children:[n.jsx(Np,{size:16,style:{color:"var(--accent)"}}),n.jsx("span",{style:{fontWeight:600,fontSize:"0.875rem"},children:"Relay Daemon"}),n.jsx("span",{style:{marginLeft:"auto",fontSize:"0.75rem",padding:"0.15rem 0.5rem",borderRadius:"9999px",background:"#10b98120",color:"#10b981",fontWeight:600},children:"● Active on :8791"})]}),n.jsxs("div",{style:{fontSize:"0.8rem",color:"var(--muted)",display:"grid",gridTemplateColumns:"1fr 1fr",gap:"0.4rem"},children:[n.jsxs("div",{children:["Loopback: ",n.jsx("code",{style:{color:"var(--ink)"},children:"127.0.0.1:8791"})]}),n.jsxs("div",{children:["Mode: ",n.jsx("span",{style:{color:"var(--ink)",fontWeight:500},children:"Loopback Control Plane"})]}),n.jsxs("div",{children:["Wire APIs: ",n.jsx("span",{style:{color:"var(--ink)"},children:"OpenAI + Anthropic"})]}),n.jsxs("div",{children:["Failover: ",n.jsx("span",{style:{color:"var(--ink)"},children:"Automatic Multi-Provider"})]})]})]}),n.jsxs("section",{children:[n.jsx("h3",{style:{fontSize:"0.875rem",fontWeight:600,margin:"0 0 0.5rem",color:"var(--ink)"},children:"Appearance"}),n.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0.6rem 0.85rem",borderRadius:"0.5rem",border:"1px solid var(--border)",background:"var(--surface)"},children:[n.jsxs("div",{children:[n.jsx("div",{style:{fontSize:"0.85rem",fontWeight:500},children:"Interface Theme"}),n.jsx("div",{style:{fontSize:"0.75rem",color:"var(--muted)"},children:"Toggle between light and dark UI themes"})]}),n.jsxs("button",{type:"button",onClick:u,style:{display:"inline-flex",alignItems:"center",gap:"0.4rem",padding:"0.35rem 0.75rem",fontSize:"0.8rem",borderRadius:"0.375rem",border:"1px solid var(--border)",background:"var(--row-hover)",color:"var(--ink)",cursor:"pointer"},children:[f==="dark"?n.jsx(Jc,{size:14}):n.jsx(Qc,{size:14}),f==="dark"?"Light Mode":"Dark Mode"]})]})]}),n.jsxs("section",{children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.4rem",marginBottom:"0.35rem"},children:[n.jsx(Dp,{size:16,style:{color:p?"#10b981":"var(--muted)"}}),n.jsx("h3",{style:{fontSize:"0.875rem",fontWeight:600,margin:0,color:"var(--ink)"},children:"Operator Control Token"}),p&&n.jsx("span",{style:{fontSize:"0.7rem",padding:"0.1rem 0.4rem",borderRadius:"0.25rem",background:"#10b98120",color:"#10b981",fontWeight:600},children:"Unlocked"})]}),n.jsx("p",{style:{fontSize:"0.75rem",color:"var(--muted)",margin:"0 0 0.6rem"},children:"Required for write actions (pinning/unpinning ladder rungs and resetting circuit breakers). Token is stored strictly in memory for this session and never saved to storage."}),n.jsxs("form",{onSubmit:oe,style:{display:"flex",gap:"0.5rem"},children:[n.jsx("input",{type:"password",value:R,onChange:$=>q($.target.value),placeholder:"Paste operator token from ~/.llm-relay/control-token…",style:{flex:1,padding:"0.4rem 0.65rem",fontSize:"0.8125rem",borderRadius:"0.375rem",border:"1px solid var(--border)",backgroundColor:"var(--surface)",color:"var(--ink)",fontFamily:"monospace"}}),n.jsx("button",{type:"submit",style:{padding:"0.4rem 0.85rem",fontSize:"0.8125rem",fontWeight:600,borderRadius:"0.375rem",border:"none",backgroundColor:"var(--accent)",color:"#ffffff",cursor:"pointer"},children:"Save"})]}),x&&n.jsx("p",{style:{fontSize:"0.75rem",color:"#10b981",margin:"0.35rem 0 0",fontWeight:500},children:x})]}),n.jsxs("section",{children:[n.jsx("h3",{style:{fontSize:"0.875rem",fontWeight:600,margin:"0 0 0.5rem",color:"var(--ink)"},children:"Circuit Breakers & Quota Recovery"}),n.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0.6rem 0.85rem",borderRadius:"0.5rem",border:"1px solid var(--border)",background:"var(--surface)"},children:[n.jsxs("div",{children:[n.jsx("div",{style:{fontSize:"0.85rem",fontWeight:500},children:"Clear Active Cooldowns"}),n.jsx("div",{style:{fontSize:"0.75rem",color:"var(--muted)"},children:"Reset backoff timers for all rate-limited backends"})]}),n.jsxs("button",{type:"button",onClick:()=>void ae(),disabled:U,style:{display:"inline-flex",alignItems:"center",gap:"0.4rem",padding:"0.35rem 0.75rem",fontSize:"0.8rem",borderRadius:"0.375rem",border:"1px solid var(--border)",background:"var(--row-hover)",color:"var(--danger)",cursor:U?"wait":"pointer",fontWeight:500},children:[n.jsx(ga,{size:13,className:U?"animate-spin":""}),U?"Clearing…":"Clear Cooldowns"]})]}),V&&n.jsx("p",{style:{fontSize:"0.75rem",color:"var(--accent)",margin:"0.35rem 0 0"},children:V})]}),n.jsxs("section",{children:[n.jsx("h3",{style:{fontSize:"0.875rem",fontWeight:600,margin:"0 0 0.5rem",color:"var(--ink)"},children:"API Endpoints"}),n.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"0.35rem",fontSize:"0.75rem",fontFamily:"monospace"},children:[{label:"OpenAI Chat",url:"http://127.0.0.1:8791/v1/chat/completions",key:"chat"},{label:"Anthropic Messages",url:"http://127.0.0.1:8791/v1/messages",key:"messages"},{label:"Models List",url:"http://127.0.0.1:8791/v1/models",key:"models"},{label:"Dispatch Ladder",url:"http://127.0.0.1:8791/dispatch",key:"dispatch"},{label:"Telemetry & Health",url:"http://127.0.0.1:8791/telemetry",key:"telemetry"}].map($=>n.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0.35rem 0.5rem",borderRadius:"0.25rem",background:"var(--row-hover)"},children:[n.jsxs("span",{style:{color:"var(--muted)",width:"130px"},children:[$.label,":"]}),n.jsx("span",{style:{color:"var(--ink)",flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:$.url}),n.jsx("button",{type:"button",onClick:()=>be($.url,$.key),style:{background:"transparent",border:"none",color:Q===$.key?"#10b981":"var(--muted)",cursor:"pointer",padding:"0.2rem"},title:"Copy URL",children:Q===$.key?n.jsx(Gt,{size:12}):n.jsx(ml,{size:12})})]},$.key))})]})]}),n.jsx("div",{style:{padding:"0.75rem 1.25rem",borderTop:"1px solid var(--border)",display:"flex",justifyContent:"flex-end"},children:n.jsx("button",{type:"button",onClick:d,style:{padding:"0.4rem 1rem",fontSize:"0.8125rem",borderRadius:"0.375rem",border:"1px solid var(--border)",background:"var(--surface)",color:"var(--ink)",cursor:"pointer",fontWeight:500},children:"Done"})})]})})}const Kp="llm-relay.dashboard.theme.v1";function nv(){try{const s=window.localStorage.getItem(Kp);return s==="light"||s==="dark"?s:"dark"}catch{return"dark"}}function iv(s){try{window.localStorage.setItem(Kp,s)}catch{}}function rv(s,d){return s!==null?(Tp(d),null):Qg(d)}function sv({bootstrap:s,storage:d=sessionStorage,showRecentTable:f=!1,initialTab:u="analytics"}){const[p,y]=T.useState(()=>rv(s,d)),[R,q]=T.useState(!1),[x,v]=T.useState(null),[U,k]=T.useState(()=>f?"analytics":u),[V,L]=T.useState("auto"),[Q,I]=T.useState(!1),[oe,ae]=T.useState(!1),[be,$]=T.useState(""),[ee,Y]=T.useState(()=>nv()),ce=T.useRef(!1),X=ie=>{k(ie),typeof window<"u"&&(window.location.hash=ie)};T.useEffect(()=>{const ie=()=>{const ye=window.location.hash.replace(/^#/,"");["routing","playground","keys","agents","analytics"].includes(ye)&&k(ye)};return window.addEventListener("hashchange",ie),()=>window.removeEventListener("hashchange",ie)},[]);const xe=()=>{const ie=ee==="light"?"dark":"light";Y(ie),iv(ie)};T.useEffect(()=>{const ie=ye=>{(ye.metaKey||ye.ctrlKey)&&ye.key.toLowerCase()==="k"&&(ye.preventDefault(),I(re=>!re))};return window.addEventListener("keydown",ie),()=>window.removeEventListener("keydown",ie)},[]),T.useEffect(()=>{if(p!==null||x!==null||ce.current)return;ce.current=!0;const ie=new AbortController;return Lg(s,ie.signal).then(ye=>{ie.signal.aborted||(Kg(ye.session,d),y(ye.session))}).catch(ye=>{ie.signal.aborted||q(!0)}),()=>ie.abort()},[s,x,p,d]);const he=()=>{Tp(d),y(null),v("ended")},De=async ie=>{p!==null&&(await Yg(p,ie),he())},ke=()=>{ce.current=!1,q(!1),v(null)};if(x==="ended")return n.jsx("main",{className:`app ${ee}`,"data-theme":ee,children:n.jsxs("section",{className:"panel",role:"status",children:[n.jsx("h1",{children:"Dashboard session ended"}),n.jsx("p",{children:"Your read-only dashboard session has ended."}),n.jsx("div",{style:{marginTop:"1rem"},children:n.jsx("button",{type:"button",onClick:ke,children:"Start new session"})})]})});if(R)return n.jsx("main",{className:`app ${ee}`,"data-theme":ee,children:n.jsxs("section",{className:"panel error",role:"alert",children:[n.jsx("h1",{children:"Dashboard session unavailable"}),n.jsx("p",{children:"Could not connect to the relay service. Ensure llm-relay is running and refresh the page."}),n.jsx("div",{style:{marginTop:"1rem"},children:n.jsx("button",{type:"button",onClick:ke,children:"Retry"})})]})});if(p===null)return n.jsx("main",{className:`app ${ee}`,"data-theme":ee,children:n.jsx("p",{className:"status",role:"status",children:"Starting read-only dashboard session…"})});const qe=typeof navigator<"u"&&/mac/i.test(navigator.platform);return n.jsxs("div",{className:`app-shell ${ee}`,"data-theme":ee,style:{minHeight:"100vh",backgroundColor:ee==="dark"?"#0f1726":"#f6f8fb"},children:[n.jsxs("header",{style:{borderBottom:"1px solid var(--border)",backgroundColor:ee==="dark"?"#172033":"#ffffff",padding:"0.5rem 1.5rem",margin:0,position:"sticky",top:0,zIndex:10,display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:"1rem"},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"1.5rem"},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[n.jsx("span",{style:{width:"8px",height:"8px",borderRadius:"9999px",backgroundColor:"#10b981",display:"inline-block"}}),n.jsx("span",{style:{fontWeight:700,fontSize:"1rem",letterSpacing:"-0.02em"},children:"llm-relay"}),n.jsx("span",{style:{fontSize:"0.75rem",padding:"0.15rem 0.4rem",borderRadius:"0.25rem",background:"var(--row-hover)",color:"var(--muted)",fontFamily:"monospace"},children:":8791"})]}),n.jsxs("nav",{"aria-label":"Main sections",style:{display:"flex",alignItems:"center",gap:"0.25rem"},children:[n.jsxs("button",{type:"button",onClick:()=>X("routing"),style:{background:U==="routing"?"var(--row-hover)":"transparent",color:U==="routing"?"var(--accent)":"var(--muted)",border:"none",fontWeight:U==="routing"?600:500,fontSize:"0.85rem",padding:"0.4rem 0.75rem",borderRadius:"0.375rem",display:"inline-flex",alignItems:"center",gap:"0.375rem"},children:[n.jsx(ki,{size:15})," Models & Routing"]}),n.jsxs("button",{type:"button",onClick:()=>X("playground"),style:{background:U==="playground"?"var(--row-hover)":"transparent",color:U==="playground"?"var(--accent)":"var(--muted)",border:"none",fontWeight:U==="playground"?600:500,fontSize:"0.85rem",padding:"0.4rem 0.75rem",borderRadius:"0.375rem",display:"inline-flex",alignItems:"center",gap:"0.375rem"},children:[n.jsx(_p,{size:15})," Playground"]}),n.jsxs("button",{type:"button",onClick:()=>X("keys"),style:{background:U==="keys"?"var(--row-hover)":"transparent",color:U==="keys"?"var(--accent)":"var(--muted)",border:"none",fontWeight:U==="keys"?600:500,fontSize:"0.85rem",padding:"0.4rem 0.75rem",borderRadius:"0.375rem",display:"inline-flex",alignItems:"center",gap:"0.375rem"},children:[n.jsx(fs,{size:15})," Keys & Providers"]}),n.jsxs("button",{type:"button",onClick:()=>X("agents"),style:{background:U==="agents"?"var(--row-hover)":"transparent",color:U==="agents"?"var(--accent)":"var(--muted)",border:"none",fontWeight:U==="agents"?600:500,fontSize:"0.85rem",padding:"0.4rem 0.75rem",borderRadius:"0.375rem",display:"inline-flex",alignItems:"center",gap:"0.375rem"},children:[n.jsx(ds,{size:15})," Agent Setup"]}),n.jsxs("button",{type:"button",onClick:()=>X("analytics"),style:{background:U==="analytics"?"var(--row-hover)":"transparent",color:U==="analytics"?"var(--accent)":"var(--muted)",border:"none",fontWeight:U==="analytics"?600:500,fontSize:"0.85rem",padding:"0.4rem 0.75rem",borderRadius:"0.375rem",display:"inline-flex",alignItems:"center",gap:"0.375rem"},children:[n.jsx(Xc,{size:15})," Fleet Analytics"]})]})]}),n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[n.jsxs("button",{type:"button",onClick:()=>I(!0),"aria-label":"Open command palette",style:{display:"inline-flex",alignItems:"center",gap:"0.5rem",padding:"0.35rem 0.65rem",fontSize:"0.8rem",background:"transparent",borderColor:"var(--border)",color:"var(--muted)"},children:[n.jsx(Kc,{size:14}),n.jsx("kbd",{style:{fontSize:"0.7rem",fontFamily:"monospace",opacity:.8},children:qe?"⌘K":"Ctrl K"})]}),n.jsx("button",{type:"button",onClick:xe,"aria-label":`Switch to ${ee==="dark"?"light":"dark"} mode`,title:`Switch to ${ee==="dark"?"light":"dark"} mode`,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",padding:"0.35rem 0.5rem",borderRadius:"0.375rem",background:"transparent",border:"1px solid var(--border)",color:"var(--muted)",cursor:"pointer"},children:ee==="dark"?n.jsx(Jc,{size:15}):n.jsx(Qc,{size:15})}),n.jsx("button",{type:"button",onClick:()=>ae(!0),"aria-label":"Open settings",title:"Open settings",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",padding:"0.35rem 0.5rem",borderRadius:"0.375rem",background:"transparent",border:"1px solid var(--border)",color:"var(--muted)",cursor:"pointer"},children:n.jsx(Zc,{size:15})}),n.jsx("button",{type:"button",onClick:()=>void De(new AbortController().signal),"aria-label":"Logout",title:"Logout",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",padding:"0.35rem 0.65rem",borderRadius:"0.375rem",background:"transparent",border:"1px solid var(--border)",color:"var(--muted)",cursor:"pointer",fontSize:"0.8rem"},children:"Logout"})]})]}),n.jsx("div",{style:{display:U==="analytics"?"block":"none"},children:n.jsx(O1,{session:p,onSessionExpired:he,onLogout:De,showRecentTable:f})}),U==="routing"&&n.jsx("main",{className:`app ${ee}`,"data-theme":ee,children:n.jsx(Y1,{controlToken:be,onSetControlToken:$,onTestInPlayground:ie=>{L(ie),X("playground")}})}),U==="playground"&&n.jsx("main",{className:`app ${ee}`,"data-theme":ee,children:n.jsx(F1,{initialModel:V})}),U==="keys"&&n.jsx("main",{className:`app ${ee}`,"data-theme":ee,children:n.jsx(tv,{})}),U==="agents"&&n.jsx("main",{className:`app ${ee}`,"data-theme":ee,children:n.jsx(ev,{})}),n.jsx(lv,{open:Q,onClose:()=>I(!1),onSelectTab:ie=>X(ie),onToggleTheme:xe,onRefresh:()=>{window.location.reload()},onOpenSettings:()=>ae(!0),theme:ee}),n.jsx(av,{open:oe,onClose:()=>ae(!1),theme:ee,onToggleTheme:xe,controlToken:be,onSetControlToken:$})]})}class ov extends T.Component{constructor(d){super(d),this.state={error:null}}static getDerivedStateFromError(d){return{error:d}}componentDidCatch(d,f){console.error("Dashboard uncaught render error:",d,f)}render(){return this.state.error?n.jsx("main",{className:"app dark","data-theme":"dark",style:{minHeight:"100vh",display:"grid",placeItems:"center",padding:"2rem"},children:n.jsxs("section",{className:"panel error",role:"alert",style:{maxWidth:"600px",width:"100%",padding:"1.5rem"},children:[n.jsx("h1",{style:{fontSize:"1.5rem",marginBottom:"0.5rem"},children:"Dashboard Unavailable"}),n.jsx("p",{style:{color:"var(--muted)",marginBottom:"1rem"},children:"An unexpected error occurred while rendering the dashboard view:"}),n.jsx("pre",{style:{padding:"0.75rem",background:"var(--row-hover)",borderRadius:"0.5rem",overflowX:"auto",fontSize:"0.85rem",color:"var(--danger)"},children:this.state.error.message||String(this.state.error)}),n.jsxs("div",{style:{marginTop:"1.25rem",display:"flex",gap:"0.75rem"},children:[n.jsx("button",{type:"button",onClick:()=>window.location.reload(),children:"Reload Page"}),n.jsx("button",{type:"button",onClick:()=>{sessionStorage.clear(),window.location.hash="",window.location.reload()},children:"Reset Session & Cache"})]})]})}):this.props.children}}const cv=["routing","playground","keys","agents","analytics"],pp=window.location.hash.replace(/^#/,""),uv=cv.includes(pp)?pp:"routing",dv=Vg(window.location,window.history);my.createRoot(document.getElementById("root")).render(n.jsx(ov,{children:n.jsx(sv,{bootstrap:dv,initialTab:uv})}));
|