vskill 0.2.97 → 0.2.103

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,70 @@
1
+ (function(){const u=document.createElement("link").relList;if(u&&u.supports&&u.supports("modulepreload"))return;for(const m of document.querySelectorAll('link[rel="modulepreload"]'))o(m);new MutationObserver(m=>{for(const h of m)if(h.type==="childList")for(const v of h.addedNodes)v.tagName==="LINK"&&v.rel==="modulepreload"&&o(v)}).observe(document,{childList:!0,subtree:!0});function f(m){const h={};return m.integrity&&(h.integrity=m.integrity),m.referrerPolicy&&(h.referrerPolicy=m.referrerPolicy),m.crossOrigin==="use-credentials"?h.credentials="include":m.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function o(m){if(m.ep)return;m.ep=!0;const h=f(m);fetch(m.href,h)}})();var fc={exports:{}},Cn={};/**
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 Bf;function Bp(){if(Bf)return Cn;Bf=1;var r=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function f(o,m,h){var v=null;if(h!==void 0&&(v=""+h),m.key!==void 0&&(v=""+m.key),"key"in m){h={};for(var E in m)E!=="key"&&(h[E]=m[E])}else h=m;return m=h.ref,{$$typeof:r,type:o,key:v,ref:m!==void 0?m:null,props:h}}return Cn.Fragment=u,Cn.jsx=f,Cn.jsxs=f,Cn}var Uf;function Up(){return Uf||(Uf=1,fc.exports=Bp()),fc.exports}var n=Up(),mc={exports:{}},oe={};/**
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 Hf;function Hp(){if(Hf)return oe;Hf=1;var r=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),v=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),M=Symbol.iterator;function G(j){return j===null||typeof j!="object"?null:(j=M&&j[M]||j["@@iterator"],typeof j=="function"?j:null)}var B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Y=Object.assign,V={};function J(j,N,D){this.props=j,this.context=N,this.refs=V,this.updater=D||B}J.prototype.isReactComponent={},J.prototype.setState=function(j,N){if(typeof j!="object"&&typeof j!="function"&&j!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,j,N,"setState")},J.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function F(){}F.prototype=J.prototype;function re(j,N,D){this.props=j,this.context=N,this.refs=V,this.updater=D||B}var K=re.prototype=new F;K.constructor=re,Y(K,J.prototype),K.isPureReactComponent=!0;var se=Array.isArray;function le(){}var ae={H:null,A:null,T:null,S:null},$=Object.prototype.hasOwnProperty;function xe(j,N,D){var q=D.ref;return{$$typeof:r,type:j,key:N,ref:q!==void 0?q:null,props:D}}function I(j,N){return xe(j.type,N,j.props)}function fe(j){return typeof j=="object"&&j!==null&&j.$$typeof===r}function pe(j){var N={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(D){return N[D]})}var Z=/\/+/g;function W(j,N){return typeof j=="object"&&j!==null&&j.key!=null?pe(""+j.key):N.toString(36)}function ve(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(le,le):(j.status="pending",j.then(function(N){j.status==="pending"&&(j.status="fulfilled",j.value=N)},function(N){j.status==="pending"&&(j.status="rejected",j.reason=N)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function R(j,N,D,q,Q){var te=typeof j;(te==="undefined"||te==="boolean")&&(j=null);var ce=!1;if(j===null)ce=!0;else switch(te){case"bigint":case"string":case"number":ce=!0;break;case"object":switch(j.$$typeof){case r:case u:ce=!0;break;case T:return ce=j._init,R(ce(j._payload),N,D,q,Q)}}if(ce)return Q=Q(j),ce=q===""?"."+W(j,0):q,se(Q)?(D="",ce!=null&&(D=ce.replace(Z,"$&/")+"/"),R(Q,N,D,"",function(za){return za})):Q!=null&&(fe(Q)&&(Q=I(Q,D+(Q.key==null||j&&j.key===Q.key?"":(""+Q.key).replace(Z,"$&/")+"/")+ce)),N.push(Q)),1;ce=0;var Ze=q===""?".":q+":";if(se(j))for(var Ue=0;Ue<j.length;Ue++)q=j[Ue],te=Ze+W(q,Ue),ce+=R(q,N,D,te,Q);else if(Ue=G(j),typeof Ue=="function")for(j=Ue.call(j),Ue=0;!(q=j.next()).done;)q=q.value,te=Ze+W(q,Ue++),ce+=R(q,N,D,te,Q);else if(te==="object"){if(typeof j.then=="function")return R(ve(j),N,D,q,Q);throw N=String(j),Error("Objects are not valid as a React child (found: "+(N==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":N)+"). If you meant to render a collection of children, use an array instead.")}return ce}function O(j,N,D){if(j==null)return j;var q=[],Q=0;return R(j,q,"","",function(te){return N.call(D,te,Q++)}),q}function L(j){if(j._status===-1){var N=j._result;N=N(),N.then(function(D){(j._status===0||j._status===-1)&&(j._status=1,j._result=D)},function(D){(j._status===0||j._status===-1)&&(j._status=2,j._result=D)}),j._status===-1&&(j._status=0,j._result=N)}if(j._status===1)return j._result.default;throw j._result}var ee=typeof reportError=="function"?reportError:function(j){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var N=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof j=="object"&&j!==null&&typeof j.message=="string"?String(j.message):String(j),error:j});if(!window.dispatchEvent(N))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",j);return}console.error(j)},X={map:O,forEach:function(j,N,D){O(j,function(){N.apply(this,arguments)},D)},count:function(j){var N=0;return O(j,function(){N++}),N},toArray:function(j){return O(j,function(N){return N})||[]},only:function(j){if(!fe(j))throw Error("React.Children.only expected to receive a single React element child.");return j}};return oe.Activity=g,oe.Children=X,oe.Component=J,oe.Fragment=f,oe.Profiler=m,oe.PureComponent=re,oe.StrictMode=o,oe.Suspense=p,oe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ae,oe.__COMPILER_RUNTIME={__proto__:null,c:function(j){return ae.H.useMemoCache(j)}},oe.cache=function(j){return function(){return j.apply(null,arguments)}},oe.cacheSignal=function(){return null},oe.cloneElement=function(j,N,D){if(j==null)throw Error("The argument must be a React element, but you passed "+j+".");var q=Y({},j.props),Q=j.key;if(N!=null)for(te in N.key!==void 0&&(Q=""+N.key),N)!$.call(N,te)||te==="key"||te==="__self"||te==="__source"||te==="ref"&&N.ref===void 0||(q[te]=N[te]);var te=arguments.length-2;if(te===1)q.children=D;else if(1<te){for(var ce=Array(te),Ze=0;Ze<te;Ze++)ce[Ze]=arguments[Ze+2];q.children=ce}return xe(j.type,Q,q)},oe.createContext=function(j){return j={$$typeof:v,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null},j.Provider=j,j.Consumer={$$typeof:h,_context:j},j},oe.createElement=function(j,N,D){var q,Q={},te=null;if(N!=null)for(q in N.key!==void 0&&(te=""+N.key),N)$.call(N,q)&&q!=="key"&&q!=="__self"&&q!=="__source"&&(Q[q]=N[q]);var ce=arguments.length-2;if(ce===1)Q.children=D;else if(1<ce){for(var Ze=Array(ce),Ue=0;Ue<ce;Ue++)Ze[Ue]=arguments[Ue+2];Q.children=Ze}if(j&&j.defaultProps)for(q in ce=j.defaultProps,ce)Q[q]===void 0&&(Q[q]=ce[q]);return xe(j,te,Q)},oe.createRef=function(){return{current:null}},oe.forwardRef=function(j){return{$$typeof:E,render:j}},oe.isValidElement=fe,oe.lazy=function(j){return{$$typeof:T,_payload:{_status:-1,_result:j},_init:L}},oe.memo=function(j,N){return{$$typeof:x,type:j,compare:N===void 0?null:N}},oe.startTransition=function(j){var N=ae.T,D={};ae.T=D;try{var q=j(),Q=ae.S;Q!==null&&Q(D,q),typeof q=="object"&&q!==null&&typeof q.then=="function"&&q.then(le,ee)}catch(te){ee(te)}finally{N!==null&&D.types!==null&&(N.types=D.types),ae.T=N}},oe.unstable_useCacheRefresh=function(){return ae.H.useCacheRefresh()},oe.use=function(j){return ae.H.use(j)},oe.useActionState=function(j,N,D){return ae.H.useActionState(j,N,D)},oe.useCallback=function(j,N){return ae.H.useCallback(j,N)},oe.useContext=function(j){return ae.H.useContext(j)},oe.useDebugValue=function(){},oe.useDeferredValue=function(j,N){return ae.H.useDeferredValue(j,N)},oe.useEffect=function(j,N){return ae.H.useEffect(j,N)},oe.useEffectEvent=function(j){return ae.H.useEffectEvent(j)},oe.useId=function(){return ae.H.useId()},oe.useImperativeHandle=function(j,N,D){return ae.H.useImperativeHandle(j,N,D)},oe.useInsertionEffect=function(j,N){return ae.H.useInsertionEffect(j,N)},oe.useLayoutEffect=function(j,N){return ae.H.useLayoutEffect(j,N)},oe.useMemo=function(j,N){return ae.H.useMemo(j,N)},oe.useOptimistic=function(j,N){return ae.H.useOptimistic(j,N)},oe.useReducer=function(j,N,D){return ae.H.useReducer(j,N,D)},oe.useRef=function(j){return ae.H.useRef(j)},oe.useState=function(j){return ae.H.useState(j)},oe.useSyncExternalStore=function(j,N,D){return ae.H.useSyncExternalStore(j,N,D)},oe.useTransition=function(){return ae.H.useTransition()},oe.version="19.2.4",oe}var qf;function Mc(){return qf||(qf=1,mc.exports=Hp()),mc.exports}var b=Mc(),xc={exports:{}},An={},pc={exports:{}},vc={};/**
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 Yf;function qp(){return Yf||(Yf=1,(function(r){function u(R,O){var L=R.length;R.push(O);e:for(;0<L;){var ee=L-1>>>1,X=R[ee];if(0<m(X,O))R[ee]=O,R[L]=X,L=ee;else break e}}function f(R){return R.length===0?null:R[0]}function o(R){if(R.length===0)return null;var O=R[0],L=R.pop();if(L!==O){R[0]=L;e:for(var ee=0,X=R.length,j=X>>>1;ee<j;){var N=2*(ee+1)-1,D=R[N],q=N+1,Q=R[q];if(0>m(D,L))q<X&&0>m(Q,D)?(R[ee]=Q,R[q]=L,ee=q):(R[ee]=D,R[N]=L,ee=N);else if(q<X&&0>m(Q,L))R[ee]=Q,R[q]=L,ee=q;else break e}}return O}function m(R,O){var L=R.sortIndex-O.sortIndex;return L!==0?L:R.id-O.id}if(r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;r.unstable_now=function(){return h.now()}}else{var v=Date,E=v.now();r.unstable_now=function(){return v.now()-E}}var p=[],x=[],T=1,g=null,M=3,G=!1,B=!1,Y=!1,V=!1,J=typeof setTimeout=="function"?setTimeout:null,F=typeof clearTimeout=="function"?clearTimeout:null,re=typeof setImmediate<"u"?setImmediate:null;function K(R){for(var O=f(x);O!==null;){if(O.callback===null)o(x);else if(O.startTime<=R)o(x),O.sortIndex=O.expirationTime,u(p,O);else break;O=f(x)}}function se(R){if(Y=!1,K(R),!B)if(f(p)!==null)B=!0,le||(le=!0,pe());else{var O=f(x);O!==null&&ve(se,O.startTime-R)}}var le=!1,ae=-1,$=5,xe=-1;function I(){return V?!0:!(r.unstable_now()-xe<$)}function fe(){if(V=!1,le){var R=r.unstable_now();xe=R;var O=!0;try{e:{B=!1,Y&&(Y=!1,F(ae),ae=-1),G=!0;var L=M;try{t:{for(K(R),g=f(p);g!==null&&!(g.expirationTime>R&&I());){var ee=g.callback;if(typeof ee=="function"){g.callback=null,M=g.priorityLevel;var X=ee(g.expirationTime<=R);if(R=r.unstable_now(),typeof X=="function"){g.callback=X,K(R),O=!0;break t}g===f(p)&&o(p),K(R)}else o(p);g=f(p)}if(g!==null)O=!0;else{var j=f(x);j!==null&&ve(se,j.startTime-R),O=!1}}break e}finally{g=null,M=L,G=!1}O=void 0}}finally{O?pe():le=!1}}}var pe;if(typeof re=="function")pe=function(){re(fe)};else if(typeof MessageChannel<"u"){var Z=new MessageChannel,W=Z.port2;Z.port1.onmessage=fe,pe=function(){W.postMessage(null)}}else pe=function(){J(fe,0)};function ve(R,O){ae=J(function(){R(r.unstable_now())},O)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(R){R.callback=null},r.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<R?Math.floor(1e3/R):5},r.unstable_getCurrentPriorityLevel=function(){return M},r.unstable_next=function(R){switch(M){case 1:case 2:case 3:var O=3;break;default:O=M}var L=M;M=O;try{return R()}finally{M=L}},r.unstable_requestPaint=function(){V=!0},r.unstable_runWithPriority=function(R,O){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var L=M;M=R;try{return O()}finally{M=L}},r.unstable_scheduleCallback=function(R,O,L){var ee=r.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?ee+L:ee):L=ee,R){case 1:var X=-1;break;case 2:X=250;break;case 5:X=1073741823;break;case 4:X=1e4;break;default:X=5e3}return X=L+X,R={id:T++,callback:O,priorityLevel:R,startTime:L,expirationTime:X,sortIndex:-1},L>ee?(R.sortIndex=L,u(x,R),f(p)===null&&R===f(x)&&(Y?(F(ae),ae=-1):Y=!0,ve(se,L-ee))):(R.sortIndex=X,u(p,R),B||G||(B=!0,le||(le=!0,pe()))),R},r.unstable_shouldYield=I,r.unstable_wrapCallback=function(R){var O=M;return function(){var L=M;M=O;try{return R.apply(this,arguments)}finally{M=L}}}})(vc)),vc}var Gf;function Yp(){return Gf||(Gf=1,pc.exports=qp()),pc.exports}var hc={exports:{}},et={};/**
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 Vf;function Gp(){if(Vf)return et;Vf=1;var r=Mc();function u(p){var x="https://react.dev/errors/"+p;if(1<arguments.length){x+="?args[]="+encodeURIComponent(arguments[1]);for(var T=2;T<arguments.length;T++)x+="&args[]="+encodeURIComponent(arguments[T])}return"Minified React error #"+p+"; visit "+x+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(){}var o={d:{f,r:function(){throw Error(u(522))},D:f,C:f,L:f,m:f,X:f,S:f,M:f},p:0,findDOMNode:null},m=Symbol.for("react.portal");function h(p,x,T){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:m,key:g==null?null:""+g,children:p,containerInfo:x,implementation:T}}var v=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function E(p,x){if(p==="font")return"";if(typeof x=="string")return x==="use-credentials"?x:""}return et.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,et.createPortal=function(p,x){var T=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!x||x.nodeType!==1&&x.nodeType!==9&&x.nodeType!==11)throw Error(u(299));return h(p,x,null,T)},et.flushSync=function(p){var x=v.T,T=o.p;try{if(v.T=null,o.p=2,p)return p()}finally{v.T=x,o.p=T,o.d.f()}},et.preconnect=function(p,x){typeof p=="string"&&(x?(x=x.crossOrigin,x=typeof x=="string"?x==="use-credentials"?x:"":void 0):x=null,o.d.C(p,x))},et.prefetchDNS=function(p){typeof p=="string"&&o.d.D(p)},et.preinit=function(p,x){if(typeof p=="string"&&x&&typeof x.as=="string"){var T=x.as,g=E(T,x.crossOrigin),M=typeof x.integrity=="string"?x.integrity:void 0,G=typeof x.fetchPriority=="string"?x.fetchPriority:void 0;T==="style"?o.d.S(p,typeof x.precedence=="string"?x.precedence:void 0,{crossOrigin:g,integrity:M,fetchPriority:G}):T==="script"&&o.d.X(p,{crossOrigin:g,integrity:M,fetchPriority:G,nonce:typeof x.nonce=="string"?x.nonce:void 0})}},et.preinitModule=function(p,x){if(typeof p=="string")if(typeof x=="object"&&x!==null){if(x.as==null||x.as==="script"){var T=E(x.as,x.crossOrigin);o.d.M(p,{crossOrigin:T,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0})}}else x==null&&o.d.M(p)},et.preload=function(p,x){if(typeof p=="string"&&typeof x=="object"&&x!==null&&typeof x.as=="string"){var T=x.as,g=E(T,x.crossOrigin);o.d.L(p,T,{crossOrigin:g,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0,type:typeof x.type=="string"?x.type:void 0,fetchPriority:typeof x.fetchPriority=="string"?x.fetchPriority:void 0,referrerPolicy:typeof x.referrerPolicy=="string"?x.referrerPolicy:void 0,imageSrcSet:typeof x.imageSrcSet=="string"?x.imageSrcSet:void 0,imageSizes:typeof x.imageSizes=="string"?x.imageSizes:void 0,media:typeof x.media=="string"?x.media:void 0})}},et.preloadModule=function(p,x){if(typeof p=="string")if(x){var T=E(x.as,x.crossOrigin);o.d.m(p,{as:typeof x.as=="string"&&x.as!=="script"?x.as:void 0,crossOrigin:T,integrity:typeof x.integrity=="string"?x.integrity:void 0})}else o.d.m(p)},et.requestFormReset=function(p){o.d.r(p)},et.unstable_batchedUpdates=function(p,x){return p(x)},et.useFormState=function(p,x,T){return v.H.useFormState(p,x,T)},et.useFormStatus=function(){return v.H.useHostTransitionStatus()},et.version="19.2.4",et}var Qf;function Vp(){if(Qf)return hc.exports;Qf=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(u){console.error(u)}}return r(),hc.exports=Gp(),hc.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 Xf;function Qp(){if(Xf)return An;Xf=1;var r=Yp(),u=Mc(),f=Vp();function o(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 m(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function h(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 v(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 E(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 p(e){if(h(e)!==e)throw Error(o(188))}function x(e){var t=e.alternate;if(!t){if(t=h(e),t===null)throw Error(o(188));return t!==e?null:e}for(var l=e,a=t;;){var s=l.return;if(s===null)break;var i=s.alternate;if(i===null){if(a=s.return,a!==null){l=a;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===l)return p(s),e;if(i===a)return p(s),t;i=i.sibling}throw Error(o(188))}if(l.return!==a.return)l=s,a=i;else{for(var c=!1,d=s.child;d;){if(d===l){c=!0,l=s,a=i;break}if(d===a){c=!0,a=s,l=i;break}d=d.sibling}if(!c){for(d=i.child;d;){if(d===l){c=!0,l=i,a=s;break}if(d===a){c=!0,a=i,l=s;break}d=d.sibling}if(!c)throw Error(o(189))}}if(l.alternate!==a)throw Error(o(190))}if(l.tag!==3)throw Error(o(188));return l.stateNode.current===l?e:t}function T(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=T(e),t!==null)return t;e=e.sibling}return null}var g=Object.assign,M=Symbol.for("react.element"),G=Symbol.for("react.transitional.element"),B=Symbol.for("react.portal"),Y=Symbol.for("react.fragment"),V=Symbol.for("react.strict_mode"),J=Symbol.for("react.profiler"),F=Symbol.for("react.consumer"),re=Symbol.for("react.context"),K=Symbol.for("react.forward_ref"),se=Symbol.for("react.suspense"),le=Symbol.for("react.suspense_list"),ae=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),xe=Symbol.for("react.activity"),I=Symbol.for("react.memo_cache_sentinel"),fe=Symbol.iterator;function pe(e){return e===null||typeof e!="object"?null:(e=fe&&e[fe]||e["@@iterator"],typeof e=="function"?e:null)}var Z=Symbol.for("react.client.reference");function W(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Z?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Y:return"Fragment";case J:return"Profiler";case V:return"StrictMode";case se:return"Suspense";case le:return"SuspenseList";case xe:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case B:return"Portal";case re:return e.displayName||"Context";case F:return(e._context.displayName||"Context")+".Consumer";case K:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ae:return t=e.displayName||null,t!==null?t:W(e.type)||"Memo";case $:t=e._payload,e=e._init;try{return W(e(t))}catch{}}return null}var ve=Array.isArray,R=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,O=f.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L={pending:!1,data:null,method:null,action:null},ee=[],X=-1;function j(e){return{current:e}}function N(e){0>X||(e.current=ee[X],ee[X]=null,X--)}function D(e,t){X++,ee[X]=e.current,e.current=t}var q=j(null),Q=j(null),te=j(null),ce=j(null);function Ze(e,t){switch(D(te,t),D(Q,e),D(q,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?sf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=sf(t),e=rf(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}N(q),D(q,e)}function Ue(){N(q),N(Q),N(te)}function za(e){e.memoizedState!==null&&D(ce,e);var t=q.current,l=rf(t,e.type);t!==l&&(D(Q,e),D(q,l))}function _n(e){Q.current===e&&(N(q),N(Q)),ce.current===e&&(N(ce),Sn._currentValue=L)}var Js,wc;function _l(e){if(Js===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);Js=t&&t[1]||"",wc=-1<l.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+Js+e+wc}var $s=!1;function Ws(e,t){if(!e||$s)return"";$s=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var H=function(){throw Error()};if(Object.defineProperty(H.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(H,[])}catch(z){var k=z}Reflect.construct(e,[],H)}else{try{H.call()}catch(z){k=z}e.call(H.prototype)}}else{try{throw Error()}catch(z){k=z}(H=e())&&typeof H.catch=="function"&&H.catch(function(){})}}catch(z){if(z&&k&&typeof z.stack=="string")return[z.stack,k.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=a.DetermineComponentFrameRoot(),c=i[0],d=i[1];if(c&&d){var y=c.split(`
44
+ `),_=d.split(`
45
+ `);for(s=a=0;a<y.length&&!y[a].includes("DetermineComponentFrameRoot");)a++;for(;s<_.length&&!_[s].includes("DetermineComponentFrameRoot");)s++;if(a===y.length||s===_.length)for(a=y.length-1,s=_.length-1;1<=a&&0<=s&&y[a]!==_[s];)s--;for(;1<=a&&0<=s;a--,s--)if(y[a]!==_[s]){if(a!==1||s!==1)do if(a--,s--,0>s||y[a]!==_[s]){var w=`
46
+ `+y[a].replace(" at new "," at ");return e.displayName&&w.includes("<anonymous>")&&(w=w.replace("<anonymous>",e.displayName)),w}while(1<=a&&0<=s);break}}}finally{$s=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?_l(l):""}function xm(e,t){switch(e.tag){case 26:case 27:case 5:return _l(e.type);case 16:return _l("Lazy");case 13:return e.child!==t&&t!==null?_l("Suspense Fallback"):_l("Suspense");case 19:return _l("SuspenseList");case 0:case 15:return Ws(e.type,!1);case 11:return Ws(e.type.render,!1);case 1:return Ws(e.type,!0);case 31:return _l("Activity");default:return""}}function Dc(e){try{var t="",l=null;do t+=xm(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
47
+ Error generating stack: `+a.message+`
48
+ `+a.stack}}var Fs=Object.prototype.hasOwnProperty,Is=r.unstable_scheduleCallback,Ps=r.unstable_cancelCallback,pm=r.unstable_shouldYield,vm=r.unstable_requestPaint,ot=r.unstable_now,hm=r.unstable_getCurrentPriorityLevel,Lc=r.unstable_ImmediatePriority,Bc=r.unstable_UserBlockingPriority,kn=r.unstable_NormalPriority,ym=r.unstable_LowPriority,Uc=r.unstable_IdlePriority,gm=r.log,bm=r.unstable_setDisableYieldValue,Oa=null,dt=null;function ll(e){if(typeof gm=="function"&&bm(e),dt&&typeof dt.setStrictMode=="function")try{dt.setStrictMode(Oa,e)}catch{}}var ft=Math.clz32?Math.clz32:Nm,jm=Math.log,Sm=Math.LN2;function Nm(e){return e>>>=0,e===0?32:31-(jm(e)/Sm|0)|0}var Mn=256,Rn=262144,zn=4194304;function kl(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 On(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var s=0,i=e.suspendedLanes,c=e.pingedLanes;e=e.warmLanes;var d=a&134217727;return d!==0?(a=d&~i,a!==0?s=kl(a):(c&=d,c!==0?s=kl(c):l||(l=d&~e,l!==0&&(s=kl(l))))):(d=a&~i,d!==0?s=kl(d):c!==0?s=kl(c):l||(l=a&~e,l!==0&&(s=kl(l)))),s===0?0:t!==0&&t!==s&&(t&i)===0&&(i=s&-s,l=t&-t,i>=l||i===32&&(l&4194048)!==0)?t:s}function wa(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Em(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 Hc(){var e=zn;return zn<<=1,(zn&62914560)===0&&(zn=4194304),e}function ei(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Da(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Tm(e,t,l,a,s,i){var c=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 d=e.entanglements,y=e.expirationTimes,_=e.hiddenUpdates;for(l=c&~l;0<l;){var w=31-ft(l),H=1<<w;d[w]=0,y[w]=-1;var k=_[w];if(k!==null)for(_[w]=null,w=0;w<k.length;w++){var z=k[w];z!==null&&(z.lane&=-536870913)}l&=~H}a!==0&&qc(e,a,0),i!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=i&~(c&~t))}function qc(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-ft(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function Yc(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-ft(l),s=1<<a;s&t|e[a]&t&&(e[a]|=t),l&=~s}}function Gc(e,t){var l=t&-t;return l=(l&42)!==0?1:ti(l),(l&(e.suspendedLanes|t))!==0?0:l}function ti(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 li(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Vc(){var e=O.p;return e!==0?e:(e=window.event,e===void 0?32:Mf(e.type))}function Qc(e,t){var l=O.p;try{return O.p=e,t()}finally{O.p=l}}var al=Math.random().toString(36).slice(2),$e="__reactFiber$"+al,at="__reactProps$"+al,Jl="__reactContainer$"+al,ai="__reactEvents$"+al,Cm="__reactListeners$"+al,Am="__reactHandles$"+al,Xc="__reactResources$"+al,La="__reactMarker$"+al;function ni(e){delete e[$e],delete e[at],delete e[ai],delete e[Cm],delete e[Am]}function $l(e){var t=e[$e];if(t)return t;for(var l=e.parentNode;l;){if(t=l[Jl]||l[$e]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=xf(e);e!==null;){if(l=e[$e])return l;e=xf(e)}return t}e=l,l=e.parentNode}return null}function Wl(e){if(e=e[$e]||e[Jl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ba(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Fl(e){var t=e[Xc];return t||(t=e[Xc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ke(e){e[La]=!0}var Zc=new Set,Kc={};function Ml(e,t){Il(e,t),Il(e+"Capture",t)}function Il(e,t){for(Kc[e]=t,e=0;e<t.length;e++)Zc.add(t[e])}var _m=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]*$"),Jc={},$c={};function km(e){return Fs.call($c,e)?!0:Fs.call(Jc,e)?!1:_m.test(e)?$c[e]=!0:(Jc[e]=!0,!1)}function wn(e,t,l){if(km(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 Dn(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 Bt(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 bt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Wc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Mm(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 s=a.get,i=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(c){l=""+c,i.call(this,c)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(c){l=""+c},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function si(e){if(!e._valueTracker){var t=Wc(e)?"checked":"value";e._valueTracker=Mm(e,t,""+e[t])}}function Fc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=Wc(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}function Ln(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 Rm=/[\n"\\]/g;function jt(e){return e.replace(Rm,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ii(e,t,l,a,s,i,c,d){e.name="",c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"?e.type=c:e.removeAttribute("type"),t!=null?c==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+bt(t)):e.value!==""+bt(t)&&(e.value=""+bt(t)):c!=="submit"&&c!=="reset"||e.removeAttribute("value"),t!=null?ri(e,c,bt(t)):l!=null?ri(e,c,bt(l)):a!=null&&e.removeAttribute("value"),s==null&&i!=null&&(e.defaultChecked=!!i),s!=null&&(e.checked=s&&typeof s!="function"&&typeof s!="symbol"),d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?e.name=""+bt(d):e.removeAttribute("name")}function Ic(e,t,l,a,s,i,c,d){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||l!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){si(e);return}l=l!=null?""+bt(l):"",t=t!=null?""+bt(t):l,d||t===e.value||(e.value=t),e.defaultValue=t}a=a??s,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=d?e.checked:!!a,e.defaultChecked=!!a,c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.name=c),si(e)}function ri(e,t,l){t==="number"&&Ln(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function Pl(e,t,l,a){if(e=e.options,t){t={};for(var s=0;s<l.length;s++)t["$"+l[s]]=!0;for(l=0;l<e.length;l++)s=t.hasOwnProperty("$"+e[l].value),e[l].selected!==s&&(e[l].selected=s),s&&a&&(e[l].defaultSelected=!0)}else{for(l=""+bt(l),t=null,s=0;s<e.length;s++){if(e[s].value===l){e[s].selected=!0,a&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Pc(e,t,l){if(t!=null&&(t=""+bt(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+bt(l):""}function eu(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(o(92));if(ve(a)){if(1<a.length)throw Error(o(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=bt(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),si(e)}function ea(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var zm=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 tu(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||zm.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function lu(e,t,l){if(t!=null&&typeof t!="object")throw Error(o(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 s in t)a=t[s],t.hasOwnProperty(s)&&l[s]!==a&&tu(e,s,a)}else for(var i in t)t.hasOwnProperty(i)&&tu(e,i,t[i])}function ci(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 Om=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"]]),wm=/^[\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 Bn(e){return wm.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ut(){}var ui=null;function oi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ta=null,la=null;function au(e){var t=Wl(e);if(t&&(e=t.stateNode)){var l=e[at]||null;e:switch(e=t.stateNode,t.type){case"input":if(ii(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 s=a[at]||null;if(!s)throw Error(o(90));ii(a,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(t=0;t<l.length;t++)a=l[t],a.form===e.form&&Fc(a)}break e;case"textarea":Pc(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&Pl(e,!!l.multiple,t,!1)}}}var di=!1;function nu(e,t,l){if(di)return e(t,l);di=!0;try{var a=e(t);return a}finally{if(di=!1,(ta!==null||la!==null)&&(Es(),ta&&(t=ta,e=la,la=ta=null,au(t),e)))for(t=0;t<e.length;t++)au(e[t])}}function Ua(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(o(231,t,typeof l));return l}var Ht=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fi=!1;if(Ht)try{var Ha={};Object.defineProperty(Ha,"passive",{get:function(){fi=!0}}),window.addEventListener("test",Ha,Ha),window.removeEventListener("test",Ha,Ha)}catch{fi=!1}var nl=null,mi=null,Un=null;function su(){if(Un)return Un;var e,t=mi,l=t.length,a,s="value"in nl?nl.value:nl.textContent,i=s.length;for(e=0;e<l&&t[e]===s[e];e++);var c=l-e;for(a=1;a<=c&&t[l-a]===s[i-a];a++);return Un=s.slice(e,1<a?1-a:void 0)}function Hn(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 qn(){return!0}function iu(){return!1}function nt(e){function t(l,a,s,i,c){this._reactName=l,this._targetInst=s,this.type=a,this.nativeEvent=i,this.target=c,this.currentTarget=null;for(var d in e)e.hasOwnProperty(d)&&(l=e[d],this[d]=l?l(i):i[d]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?qn:iu,this.isPropagationStopped=iu,this}return g(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=qn)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=qn)},persist:function(){},isPersistent:qn}),t}var Rl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Yn=nt(Rl),qa=g({},Rl,{view:0,detail:0}),Dm=nt(qa),xi,pi,Ya,Gn=g({},qa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:hi,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!==Ya&&(Ya&&e.type==="mousemove"?(xi=e.screenX-Ya.screenX,pi=e.screenY-Ya.screenY):pi=xi=0,Ya=e),xi)},movementY:function(e){return"movementY"in e?e.movementY:pi}}),ru=nt(Gn),Lm=g({},Gn,{dataTransfer:0}),Bm=nt(Lm),Um=g({},qa,{relatedTarget:0}),vi=nt(Um),Hm=g({},Rl,{animationName:0,elapsedTime:0,pseudoElement:0}),qm=nt(Hm),Ym=g({},Rl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Gm=nt(Ym),Vm=g({},Rl,{data:0}),cu=nt(Vm),Qm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Xm={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"},Zm={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Km(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Zm[e])?!!t[e]:!1}function hi(){return Km}var Jm=g({},qa,{key:function(e){if(e.key){var t=Qm[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Hn(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Xm[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:hi,charCode:function(e){return e.type==="keypress"?Hn(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Hn(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),$m=nt(Jm),Wm=g({},Gn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),uu=nt(Wm),Fm=g({},qa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:hi}),Im=nt(Fm),Pm=g({},Rl,{propertyName:0,elapsedTime:0,pseudoElement:0}),ex=nt(Pm),tx=g({},Gn,{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}),lx=nt(tx),ax=g({},Rl,{newState:0,oldState:0}),nx=nt(ax),sx=[9,13,27,32],yi=Ht&&"CompositionEvent"in window,Ga=null;Ht&&"documentMode"in document&&(Ga=document.documentMode);var ix=Ht&&"TextEvent"in window&&!Ga,ou=Ht&&(!yi||Ga&&8<Ga&&11>=Ga),du=" ",fu=!1;function mu(e,t){switch(e){case"keyup":return sx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var aa=!1;function rx(e,t){switch(e){case"compositionend":return xu(t);case"keypress":return t.which!==32?null:(fu=!0,du);case"textInput":return e=t.data,e===du&&fu?null:e;default:return null}}function cx(e,t){if(aa)return e==="compositionend"||!yi&&mu(e,t)?(e=su(),Un=mi=nl=null,aa=!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 ou&&t.locale!=="ko"?null:t.data;default:return null}}var ux={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 pu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ux[e.type]:t==="textarea"}function vu(e,t,l,a){ta?la?la.push(a):la=[a]:ta=a,t=Rs(t,"onChange"),0<t.length&&(l=new Yn("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var Va=null,Qa=null;function ox(e){Pd(e,0)}function Vn(e){var t=Ba(e);if(Fc(t))return e}function hu(e,t){if(e==="change")return t}var yu=!1;if(Ht){var gi;if(Ht){var bi="oninput"in document;if(!bi){var gu=document.createElement("div");gu.setAttribute("oninput","return;"),bi=typeof gu.oninput=="function"}gi=bi}else gi=!1;yu=gi&&(!document.documentMode||9<document.documentMode)}function bu(){Va&&(Va.detachEvent("onpropertychange",ju),Qa=Va=null)}function ju(e){if(e.propertyName==="value"&&Vn(Qa)){var t=[];vu(t,Qa,e,oi(e)),nu(ox,t)}}function dx(e,t,l){e==="focusin"?(bu(),Va=t,Qa=l,Va.attachEvent("onpropertychange",ju)):e==="focusout"&&bu()}function fx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Vn(Qa)}function mx(e,t){if(e==="click")return Vn(t)}function xx(e,t){if(e==="input"||e==="change")return Vn(t)}function px(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var mt=typeof Object.is=="function"?Object.is:px;function Xa(e,t){if(mt(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 s=l[a];if(!Fs.call(t,s)||!mt(e[s],t[s]))return!1}return!0}function Su(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Nu(e,t){var l=Su(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=Su(l)}}function Eu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Eu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Tu(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ln(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=Ln(e.document)}return t}function ji(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 vx=Ht&&"documentMode"in document&&11>=document.documentMode,na=null,Si=null,Za=null,Ni=!1;function Cu(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Ni||na==null||na!==Ln(a)||(a=na,"selectionStart"in a&&ji(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}),Za&&Xa(Za,a)||(Za=a,a=Rs(Si,"onSelect"),0<a.length&&(t=new Yn("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=na)))}function zl(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var sa={animationend:zl("Animation","AnimationEnd"),animationiteration:zl("Animation","AnimationIteration"),animationstart:zl("Animation","AnimationStart"),transitionrun:zl("Transition","TransitionRun"),transitionstart:zl("Transition","TransitionStart"),transitioncancel:zl("Transition","TransitionCancel"),transitionend:zl("Transition","TransitionEnd")},Ei={},Au={};Ht&&(Au=document.createElement("div").style,"AnimationEvent"in window||(delete sa.animationend.animation,delete sa.animationiteration.animation,delete sa.animationstart.animation),"TransitionEvent"in window||delete sa.transitionend.transition);function Ol(e){if(Ei[e])return Ei[e];if(!sa[e])return e;var t=sa[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in Au)return Ei[e]=t[l];return e}var _u=Ol("animationend"),ku=Ol("animationiteration"),Mu=Ol("animationstart"),hx=Ol("transitionrun"),yx=Ol("transitionstart"),gx=Ol("transitioncancel"),Ru=Ol("transitionend"),zu=new Map,Ti="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(" ");Ti.push("scrollEnd");function Mt(e,t){zu.set(e,t),Ml(t,[e])}var Qn=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)},St=[],ia=0,Ci=0;function Xn(){for(var e=ia,t=Ci=ia=0;t<e;){var l=St[t];St[t++]=null;var a=St[t];St[t++]=null;var s=St[t];St[t++]=null;var i=St[t];if(St[t++]=null,a!==null&&s!==null){var c=a.pending;c===null?s.next=s:(s.next=c.next,c.next=s),a.pending=s}i!==0&&Ou(l,s,i)}}function Zn(e,t,l,a){St[ia++]=e,St[ia++]=t,St[ia++]=l,St[ia++]=a,Ci|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Ai(e,t,l,a){return Zn(e,t,l,a),Kn(e)}function wl(e,t){return Zn(e,null,null,t),Kn(e)}function Ou(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var s=!1,i=e.return;i!==null;)i.childLanes|=l,a=i.alternate,a!==null&&(a.childLanes|=l),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(s=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,s&&t!==null&&(s=31-ft(l),e=i.hiddenUpdates,a=e[s],a===null?e[s]=[t]:a.push(t),t.lane=l|536870912),i):null}function Kn(e){if(50<pn)throw pn=0,Lr=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ra={};function bx(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 xt(e,t,l,a){return new bx(e,t,l,a)}function _i(e){return e=e.prototype,!(!e||!e.isReactComponent)}function qt(e,t){var l=e.alternate;return l===null?(l=xt(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 wu(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 Jn(e,t,l,a,s,i){var c=0;if(a=e,typeof e=="function")_i(e)&&(c=1);else if(typeof e=="string")c=Tp(e,l,q.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case xe:return e=xt(31,l,t,s),e.elementType=xe,e.lanes=i,e;case Y:return Dl(l.children,s,i,t);case V:c=8,s|=24;break;case J:return e=xt(12,l,t,s|2),e.elementType=J,e.lanes=i,e;case se:return e=xt(13,l,t,s),e.elementType=se,e.lanes=i,e;case le:return e=xt(19,l,t,s),e.elementType=le,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case re:c=10;break e;case F:c=9;break e;case K:c=11;break e;case ae:c=14;break e;case $:c=16,a=null;break e}c=29,l=Error(o(130,e===null?"null":typeof e,"")),a=null}return t=xt(c,l,t,s),t.elementType=e,t.type=a,t.lanes=i,t}function Dl(e,t,l,a){return e=xt(7,e,a,t),e.lanes=l,e}function ki(e,t,l){return e=xt(6,e,null,t),e.lanes=l,e}function Du(e){var t=xt(18,null,null,0);return t.stateNode=e,t}function Mi(e,t,l){return t=xt(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Lu=new WeakMap;function Nt(e,t){if(typeof e=="object"&&e!==null){var l=Lu.get(e);return l!==void 0?l:(t={value:e,source:t,stack:Dc(t)},Lu.set(e,t),t)}return{value:e,source:t,stack:Dc(t)}}var ca=[],ua=0,$n=null,Ka=0,Et=[],Tt=0,sl=null,Ot=1,wt="";function Yt(e,t){ca[ua++]=Ka,ca[ua++]=$n,$n=e,Ka=t}function Bu(e,t,l){Et[Tt++]=Ot,Et[Tt++]=wt,Et[Tt++]=sl,sl=e;var a=Ot;e=wt;var s=32-ft(a)-1;a&=~(1<<s),l+=1;var i=32-ft(t)+s;if(30<i){var c=s-s%5;i=(a&(1<<c)-1).toString(32),a>>=c,s-=c,Ot=1<<32-ft(t)+s|l<<s|a,wt=i+e}else Ot=1<<i|l<<s|a,wt=e}function Ri(e){e.return!==null&&(Yt(e,1),Bu(e,1,0))}function zi(e){for(;e===$n;)$n=ca[--ua],ca[ua]=null,Ka=ca[--ua],ca[ua]=null;for(;e===sl;)sl=Et[--Tt],Et[Tt]=null,wt=Et[--Tt],Et[Tt]=null,Ot=Et[--Tt],Et[Tt]=null}function Uu(e,t){Et[Tt++]=Ot,Et[Tt++]=wt,Et[Tt++]=sl,Ot=t.id,wt=t.overflow,sl=e}var We=null,ze=null,je=!1,il=null,Ct=!1,Oi=Error(o(519));function rl(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ja(Nt(t,e)),Oi}function Hu(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[$e]=e,t[at]=a,l){case"dialog":ye("cancel",t),ye("close",t);break;case"iframe":case"object":case"embed":ye("load",t);break;case"video":case"audio":for(l=0;l<hn.length;l++)ye(hn[l],t);break;case"source":ye("error",t);break;case"img":case"image":case"link":ye("error",t),ye("load",t);break;case"details":ye("toggle",t);break;case"input":ye("invalid",t),Ic(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":ye("invalid",t);break;case"textarea":ye("invalid",t),eu(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||af(t.textContent,l)?(a.popover!=null&&(ye("beforetoggle",t),ye("toggle",t)),a.onScroll!=null&&ye("scroll",t),a.onScrollEnd!=null&&ye("scrollend",t),a.onClick!=null&&(t.onclick=Ut),t=!0):t=!1,t||rl(e,!0)}function qu(e){for(We=e.return;We;)switch(We.tag){case 5:case 31:case 13:Ct=!1;return;case 27:case 3:Ct=!0;return;default:We=We.return}}function oa(e){if(e!==We)return!1;if(!je)return qu(e),je=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Fr(e.type,e.memoizedProps)),l=!l),l&&ze&&rl(e),qu(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ze=mf(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ze=mf(e)}else t===27?(t=ze,jl(e.type)?(e=lc,lc=null,ze=e):ze=t):ze=We?_t(e.stateNode.nextSibling):null;return!0}function Ll(){ze=We=null,je=!1}function wi(){var e=il;return e!==null&&(ct===null?ct=e:ct.push.apply(ct,e),il=null),e}function Ja(e){il===null?il=[e]:il.push(e)}var Di=j(null),Bl=null,Gt=null;function cl(e,t,l){D(Di,t._currentValue),t._currentValue=l}function Vt(e){e._currentValue=Di.current,N(Di)}function Li(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 Bi(e,t,l,a){var s=e.child;for(s!==null&&(s.return=e);s!==null;){var i=s.dependencies;if(i!==null){var c=s.child;i=i.firstContext;e:for(;i!==null;){var d=i;i=s;for(var y=0;y<t.length;y++)if(d.context===t[y]){i.lanes|=l,d=i.alternate,d!==null&&(d.lanes|=l),Li(i.return,l,e),a||(c=null);break e}i=d.next}}else if(s.tag===18){if(c=s.return,c===null)throw Error(o(341));c.lanes|=l,i=c.alternate,i!==null&&(i.lanes|=l),Li(c,l,e),c=null}else c=s.child;if(c!==null)c.return=s;else for(c=s;c!==null;){if(c===e){c=null;break}if(s=c.sibling,s!==null){s.return=c.return,c=s;break}c=c.return}s=c}}function da(e,t,l,a){e=null;for(var s=t,i=!1;s!==null;){if(!i){if((s.flags&524288)!==0)i=!0;else if((s.flags&262144)!==0)break}if(s.tag===10){var c=s.alternate;if(c===null)throw Error(o(387));if(c=c.memoizedProps,c!==null){var d=s.type;mt(s.pendingProps.value,c.value)||(e!==null?e.push(d):e=[d])}}else if(s===ce.current){if(c=s.alternate,c===null)throw Error(o(387));c.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push(Sn):e=[Sn])}s=s.return}e!==null&&Bi(t,e,l,a),t.flags|=262144}function Wn(e){for(e=e.firstContext;e!==null;){if(!mt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ul(e){Bl=e,Gt=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Fe(e){return Yu(Bl,e)}function Fn(e,t){return Bl===null&&Ul(e),Yu(e,t)}function Yu(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},Gt===null){if(e===null)throw Error(o(308));Gt=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Gt=Gt.next=t;return l}var jx=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()})}},Sx=r.unstable_scheduleCallback,Nx=r.unstable_NormalPriority,Ye={$$typeof:re,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ui(){return{controller:new jx,data:new Map,refCount:0}}function $a(e){e.refCount--,e.refCount===0&&Sx(Nx,function(){e.controller.abort()})}var Wa=null,Hi=0,fa=0,ma=null;function Ex(e,t){if(Wa===null){var l=Wa=[];Hi=0,fa=Gr(),ma={status:"pending",value:void 0,then:function(a){l.push(a)}}}return Hi++,t.then(Gu,Gu),t}function Gu(){if(--Hi===0&&Wa!==null){ma!==null&&(ma.status="fulfilled");var e=Wa;Wa=null,fa=0,ma=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Tx(e,t){var l=[],a={status:"pending",value:null,reason:null,then:function(s){l.push(s)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var s=0;s<l.length;s++)(0,l[s])(t)},function(s){for(a.status="rejected",a.reason=s,s=0;s<l.length;s++)(0,l[s])(void 0)}),a}var Vu=R.S;R.S=function(e,t){Ad=ot(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Ex(e,t),Vu!==null&&Vu(e,t)};var Hl=j(null);function qi(){var e=Hl.current;return e!==null?e:Re.pooledCache}function In(e,t){t===null?D(Hl,Hl.current):D(Hl,t.pool)}function Qu(){var e=qi();return e===null?null:{parent:Ye._currentValue,pool:e}}var xa=Error(o(460)),Yi=Error(o(474)),Pn=Error(o(542)),es={then:function(){}};function Xu(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Zu(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(Ut,Ut),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ju(e),e;default:if(typeof t.status=="string")t.then(Ut,Ut);else{if(e=Re,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var s=t;s.status="fulfilled",s.value=a}},function(a){if(t.status==="pending"){var s=t;s.status="rejected",s.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ju(e),e}throw Yl=t,xa}}function ql(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Yl=l,xa):l}}var Yl=null;function Ku(){if(Yl===null)throw Error(o(459));var e=Yl;return Yl=null,e}function Ju(e){if(e===xa||e===Pn)throw Error(o(483))}var pa=null,Fa=0;function ts(e){var t=Fa;return Fa+=1,pa===null&&(pa=[]),Zu(pa,e,t)}function Ia(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ls(e,t){throw t.$$typeof===M?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function $u(e){function t(C,S){if(e){var A=C.deletions;A===null?(C.deletions=[S],C.flags|=16):A.push(S)}}function l(C,S){if(!e)return null;for(;S!==null;)t(C,S),S=S.sibling;return null}function a(C){for(var S=new Map;C!==null;)C.key!==null?S.set(C.key,C):S.set(C.index,C),C=C.sibling;return S}function s(C,S){return C=qt(C,S),C.index=0,C.sibling=null,C}function i(C,S,A){return C.index=A,e?(A=C.alternate,A!==null?(A=A.index,A<S?(C.flags|=67108866,S):A):(C.flags|=67108866,S)):(C.flags|=1048576,S)}function c(C){return e&&C.alternate===null&&(C.flags|=67108866),C}function d(C,S,A,U){return S===null||S.tag!==6?(S=ki(A,C.mode,U),S.return=C,S):(S=s(S,A),S.return=C,S)}function y(C,S,A,U){var ie=A.type;return ie===Y?w(C,S,A.props.children,U,A.key):S!==null&&(S.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===$&&ql(ie)===S.type)?(S=s(S,A.props),Ia(S,A),S.return=C,S):(S=Jn(A.type,A.key,A.props,null,C.mode,U),Ia(S,A),S.return=C,S)}function _(C,S,A,U){return S===null||S.tag!==4||S.stateNode.containerInfo!==A.containerInfo||S.stateNode.implementation!==A.implementation?(S=Mi(A,C.mode,U),S.return=C,S):(S=s(S,A.children||[]),S.return=C,S)}function w(C,S,A,U,ie){return S===null||S.tag!==7?(S=Dl(A,C.mode,U,ie),S.return=C,S):(S=s(S,A),S.return=C,S)}function H(C,S,A){if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return S=ki(""+S,C.mode,A),S.return=C,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case G:return A=Jn(S.type,S.key,S.props,null,C.mode,A),Ia(A,S),A.return=C,A;case B:return S=Mi(S,C.mode,A),S.return=C,S;case $:return S=ql(S),H(C,S,A)}if(ve(S)||pe(S))return S=Dl(S,C.mode,A,null),S.return=C,S;if(typeof S.then=="function")return H(C,ts(S),A);if(S.$$typeof===re)return H(C,Fn(C,S),A);ls(C,S)}return null}function k(C,S,A,U){var ie=S!==null?S.key:null;if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return ie!==null?null:d(C,S,""+A,U);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case G:return A.key===ie?y(C,S,A,U):null;case B:return A.key===ie?_(C,S,A,U):null;case $:return A=ql(A),k(C,S,A,U)}if(ve(A)||pe(A))return ie!==null?null:w(C,S,A,U,null);if(typeof A.then=="function")return k(C,S,ts(A),U);if(A.$$typeof===re)return k(C,S,Fn(C,A),U);ls(C,A)}return null}function z(C,S,A,U,ie){if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return C=C.get(A)||null,d(S,C,""+U,ie);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case G:return C=C.get(U.key===null?A:U.key)||null,y(S,C,U,ie);case B:return C=C.get(U.key===null?A:U.key)||null,_(S,C,U,ie);case $:return U=ql(U),z(C,S,A,U,ie)}if(ve(U)||pe(U))return C=C.get(A)||null,w(S,C,U,ie,null);if(typeof U.then=="function")return z(C,S,A,ts(U),ie);if(U.$$typeof===re)return z(C,S,A,Fn(S,U),ie);ls(S,U)}return null}function P(C,S,A,U){for(var ie=null,Ne=null,ne=S,me=S=0,be=null;ne!==null&&me<A.length;me++){ne.index>me?(be=ne,ne=null):be=ne.sibling;var Ee=k(C,ne,A[me],U);if(Ee===null){ne===null&&(ne=be);break}e&&ne&&Ee.alternate===null&&t(C,ne),S=i(Ee,S,me),Ne===null?ie=Ee:Ne.sibling=Ee,Ne=Ee,ne=be}if(me===A.length)return l(C,ne),je&&Yt(C,me),ie;if(ne===null){for(;me<A.length;me++)ne=H(C,A[me],U),ne!==null&&(S=i(ne,S,me),Ne===null?ie=ne:Ne.sibling=ne,Ne=ne);return je&&Yt(C,me),ie}for(ne=a(ne);me<A.length;me++)be=z(ne,C,me,A[me],U),be!==null&&(e&&be.alternate!==null&&ne.delete(be.key===null?me:be.key),S=i(be,S,me),Ne===null?ie=be:Ne.sibling=be,Ne=be);return e&&ne.forEach(function(Cl){return t(C,Cl)}),je&&Yt(C,me),ie}function ue(C,S,A,U){if(A==null)throw Error(o(151));for(var ie=null,Ne=null,ne=S,me=S=0,be=null,Ee=A.next();ne!==null&&!Ee.done;me++,Ee=A.next()){ne.index>me?(be=ne,ne=null):be=ne.sibling;var Cl=k(C,ne,Ee.value,U);if(Cl===null){ne===null&&(ne=be);break}e&&ne&&Cl.alternate===null&&t(C,ne),S=i(Cl,S,me),Ne===null?ie=Cl:Ne.sibling=Cl,Ne=Cl,ne=be}if(Ee.done)return l(C,ne),je&&Yt(C,me),ie;if(ne===null){for(;!Ee.done;me++,Ee=A.next())Ee=H(C,Ee.value,U),Ee!==null&&(S=i(Ee,S,me),Ne===null?ie=Ee:Ne.sibling=Ee,Ne=Ee);return je&&Yt(C,me),ie}for(ne=a(ne);!Ee.done;me++,Ee=A.next())Ee=z(ne,C,me,Ee.value,U),Ee!==null&&(e&&Ee.alternate!==null&&ne.delete(Ee.key===null?me:Ee.key),S=i(Ee,S,me),Ne===null?ie=Ee:Ne.sibling=Ee,Ne=Ee);return e&&ne.forEach(function(Lp){return t(C,Lp)}),je&&Yt(C,me),ie}function Me(C,S,A,U){if(typeof A=="object"&&A!==null&&A.type===Y&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case G:e:{for(var ie=A.key;S!==null;){if(S.key===ie){if(ie=A.type,ie===Y){if(S.tag===7){l(C,S.sibling),U=s(S,A.props.children),U.return=C,C=U;break e}}else if(S.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===$&&ql(ie)===S.type){l(C,S.sibling),U=s(S,A.props),Ia(U,A),U.return=C,C=U;break e}l(C,S);break}else t(C,S);S=S.sibling}A.type===Y?(U=Dl(A.props.children,C.mode,U,A.key),U.return=C,C=U):(U=Jn(A.type,A.key,A.props,null,C.mode,U),Ia(U,A),U.return=C,C=U)}return c(C);case B:e:{for(ie=A.key;S!==null;){if(S.key===ie)if(S.tag===4&&S.stateNode.containerInfo===A.containerInfo&&S.stateNode.implementation===A.implementation){l(C,S.sibling),U=s(S,A.children||[]),U.return=C,C=U;break e}else{l(C,S);break}else t(C,S);S=S.sibling}U=Mi(A,C.mode,U),U.return=C,C=U}return c(C);case $:return A=ql(A),Me(C,S,A,U)}if(ve(A))return P(C,S,A,U);if(pe(A)){if(ie=pe(A),typeof ie!="function")throw Error(o(150));return A=ie.call(A),ue(C,S,A,U)}if(typeof A.then=="function")return Me(C,S,ts(A),U);if(A.$$typeof===re)return Me(C,S,Fn(C,A),U);ls(C,A)}return typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint"?(A=""+A,S!==null&&S.tag===6?(l(C,S.sibling),U=s(S,A),U.return=C,C=U):(l(C,S),U=ki(A,C.mode,U),U.return=C,C=U),c(C)):l(C,S)}return function(C,S,A,U){try{Fa=0;var ie=Me(C,S,A,U);return pa=null,ie}catch(ne){if(ne===xa||ne===Pn)throw ne;var Ne=xt(29,ne,null,C.mode);return Ne.lanes=U,Ne.return=C,Ne}finally{}}}var Gl=$u(!0),Wu=$u(!1),ul=!1;function Gi(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Vi(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 ol(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function dl(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Te&2)!==0){var s=a.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),a.pending=t,t=Kn(e),Ou(e,null,l),t}return Zn(e,a,t,l),Kn(e)}function Pa(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,Yc(e,l)}}function Qi(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var s=null,i=null;if(l=l.firstBaseUpdate,l!==null){do{var c={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};i===null?s=i=c:i=i.next=c,l=l.next}while(l!==null);i===null?s=i=t:i=i.next=t}else s=i=t;l={baseState:a.baseState,firstBaseUpdate:s,lastBaseUpdate:i,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 Xi=!1;function en(){if(Xi){var e=ma;if(e!==null)throw e}}function tn(e,t,l,a){Xi=!1;var s=e.updateQueue;ul=!1;var i=s.firstBaseUpdate,c=s.lastBaseUpdate,d=s.shared.pending;if(d!==null){s.shared.pending=null;var y=d,_=y.next;y.next=null,c===null?i=_:c.next=_,c=y;var w=e.alternate;w!==null&&(w=w.updateQueue,d=w.lastBaseUpdate,d!==c&&(d===null?w.firstBaseUpdate=_:d.next=_,w.lastBaseUpdate=y))}if(i!==null){var H=s.baseState;c=0,w=_=y=null,d=i;do{var k=d.lane&-536870913,z=k!==d.lane;if(z?(ge&k)===k:(a&k)===k){k!==0&&k===fa&&(Xi=!0),w!==null&&(w=w.next={lane:0,tag:d.tag,payload:d.payload,callback:null,next:null});e:{var P=e,ue=d;k=t;var Me=l;switch(ue.tag){case 1:if(P=ue.payload,typeof P=="function"){H=P.call(Me,H,k);break e}H=P;break e;case 3:P.flags=P.flags&-65537|128;case 0:if(P=ue.payload,k=typeof P=="function"?P.call(Me,H,k):P,k==null)break e;H=g({},H,k);break e;case 2:ul=!0}}k=d.callback,k!==null&&(e.flags|=64,z&&(e.flags|=8192),z=s.callbacks,z===null?s.callbacks=[k]:z.push(k))}else z={lane:k,tag:d.tag,payload:d.payload,callback:d.callback,next:null},w===null?(_=w=z,y=H):w=w.next=z,c|=k;if(d=d.next,d===null){if(d=s.shared.pending,d===null)break;z=d,d=z.next,z.next=null,s.lastBaseUpdate=z,s.shared.pending=null}}while(!0);w===null&&(y=H),s.baseState=y,s.firstBaseUpdate=_,s.lastBaseUpdate=w,i===null&&(s.shared.lanes=0),vl|=c,e.lanes=c,e.memoizedState=H}}function Fu(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Iu(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Fu(l[e],t)}var va=j(null),as=j(0);function Pu(e,t){e=It,D(as,e),D(va,t),It=e|t.baseLanes}function Zi(){D(as,It),D(va,va.current)}function Ki(){It=as.current,N(va),N(as)}var pt=j(null),At=null;function fl(e){var t=e.alternate;D(He,He.current&1),D(pt,e),At===null&&(t===null||va.current!==null||t.memoizedState!==null)&&(At=e)}function Ji(e){D(He,He.current),D(pt,e),At===null&&(At=e)}function eo(e){e.tag===22?(D(He,He.current),D(pt,e),At===null&&(At=e)):ml()}function ml(){D(He,He.current),D(pt,pt.current)}function vt(e){N(pt),At===e&&(At=null),N(He)}var He=j(0);function ns(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||ec(l)||tc(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 Qt=0,de=null,_e=null,Ge=null,ss=!1,ha=!1,Vl=!1,is=0,ln=0,ya=null,Cx=0;function De(){throw Error(o(321))}function $i(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!mt(e[l],t[l]))return!1;return!0}function Wi(e,t,l,a,s,i){return Qt=i,de=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,R.H=e===null||e.memoizedState===null?Uo:dr,Vl=!1,i=l(a,s),Vl=!1,ha&&(i=lo(t,l,a,s)),to(e),i}function to(e){R.H=sn;var t=_e!==null&&_e.next!==null;if(Qt=0,Ge=_e=de=null,ss=!1,ln=0,ya=null,t)throw Error(o(300));e===null||Ve||(e=e.dependencies,e!==null&&Wn(e)&&(Ve=!0))}function lo(e,t,l,a){de=e;var s=0;do{if(ha&&(ya=null),ln=0,ha=!1,25<=s)throw Error(o(301));if(s+=1,Ge=_e=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}R.H=Ho,i=t(l,a)}while(ha);return i}function Ax(){var e=R.H,t=e.useState()[0];return t=typeof t.then=="function"?an(t):t,e=e.useState()[0],(_e!==null?_e.memoizedState:null)!==e&&(de.flags|=1024),t}function Fi(){var e=is!==0;return is=0,e}function Ii(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Pi(e){if(ss){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ss=!1}Qt=0,Ge=_e=de=null,ha=!1,ln=is=0,ya=null}function tt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ge===null?de.memoizedState=Ge=e:Ge=Ge.next=e,Ge}function qe(){if(_e===null){var e=de.alternate;e=e!==null?e.memoizedState:null}else e=_e.next;var t=Ge===null?de.memoizedState:Ge.next;if(t!==null)Ge=t,_e=e;else{if(e===null)throw de.alternate===null?Error(o(467)):Error(o(310));_e=e,e={memoizedState:_e.memoizedState,baseState:_e.baseState,baseQueue:_e.baseQueue,queue:_e.queue,next:null},Ge===null?de.memoizedState=Ge=e:Ge=Ge.next=e}return Ge}function rs(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function an(e){var t=ln;return ln+=1,ya===null&&(ya=[]),e=Zu(ya,e,t),t=de,(Ge===null?t.memoizedState:Ge.next)===null&&(t=t.alternate,R.H=t===null||t.memoizedState===null?Uo:dr),e}function cs(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return an(e);if(e.$$typeof===re)return Fe(e)}throw Error(o(438,String(e)))}function er(e){var t=null,l=de.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=de.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(s){return s.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=rs(),de.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]=I;return t.index++,l}function Xt(e,t){return typeof t=="function"?t(e):t}function us(e){var t=qe();return tr(t,_e,e)}function tr(e,t,l){var a=e.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=l;var s=e.baseQueue,i=a.pending;if(i!==null){if(s!==null){var c=s.next;s.next=i.next,i.next=c}t.baseQueue=s=i,a.pending=null}if(i=e.baseState,s===null)e.memoizedState=i;else{t=s.next;var d=c=null,y=null,_=t,w=!1;do{var H=_.lane&-536870913;if(H!==_.lane?(ge&H)===H:(Qt&H)===H){var k=_.revertLane;if(k===0)y!==null&&(y=y.next={lane:0,revertLane:0,gesture:null,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null}),H===fa&&(w=!0);else if((Qt&k)===k){_=_.next,k===fa&&(w=!0);continue}else H={lane:0,revertLane:_.revertLane,gesture:null,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null},y===null?(d=y=H,c=i):y=y.next=H,de.lanes|=k,vl|=k;H=_.action,Vl&&l(i,H),i=_.hasEagerState?_.eagerState:l(i,H)}else k={lane:H,revertLane:_.revertLane,gesture:_.gesture,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null},y===null?(d=y=k,c=i):y=y.next=k,de.lanes|=H,vl|=H;_=_.next}while(_!==null&&_!==t);if(y===null?c=i:y.next=d,!mt(i,e.memoizedState)&&(Ve=!0,w&&(l=ma,l!==null)))throw l;e.memoizedState=i,e.baseState=c,e.baseQueue=y,a.lastRenderedState=i}return s===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function lr(e){var t=qe(),l=t.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=e;var a=l.dispatch,s=l.pending,i=t.memoizedState;if(s!==null){l.pending=null;var c=s=s.next;do i=e(i,c.action),c=c.next;while(c!==s);mt(i,t.memoizedState)||(Ve=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),l.lastRenderedState=i}return[i,a]}function ao(e,t,l){var a=de,s=qe(),i=je;if(i){if(l===void 0)throw Error(o(407));l=l()}else l=t();var c=!mt((_e||s).memoizedState,l);if(c&&(s.memoizedState=l,Ve=!0),s=s.queue,sr(io.bind(null,a,s,e),[e]),s.getSnapshot!==t||c||Ge!==null&&Ge.memoizedState.tag&1){if(a.flags|=2048,ga(9,{destroy:void 0},so.bind(null,a,s,l,t),null),Re===null)throw Error(o(349));i||(Qt&127)!==0||no(a,t,l)}return l}function no(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=de.updateQueue,t===null?(t=rs(),de.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function so(e,t,l,a){t.value=l,t.getSnapshot=a,ro(t)&&co(e)}function io(e,t,l){return l(function(){ro(t)&&co(e)})}function ro(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!mt(e,l)}catch{return!0}}function co(e){var t=wl(e,2);t!==null&&ut(t,e,2)}function ar(e){var t=tt();if(typeof e=="function"){var l=e;if(e=l(),Vl){ll(!0);try{l()}finally{ll(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xt,lastRenderedState:e},t}function uo(e,t,l,a){return e.baseState=l,tr(e,_e,typeof a=="function"?a:Xt)}function _x(e,t,l,a,s){if(fs(e))throw Error(o(485));if(e=t.action,e!==null){var i={payload:s,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(c){i.listeners.push(c)}};R.T!==null?l(!0):i.isTransition=!1,a(i),l=t.pending,l===null?(i.next=t.pending=i,oo(t,i)):(i.next=l.next,t.pending=l.next=i)}}function oo(e,t){var l=t.action,a=t.payload,s=e.state;if(t.isTransition){var i=R.T,c={};R.T=c;try{var d=l(s,a),y=R.S;y!==null&&y(c,d),fo(e,t,d)}catch(_){nr(e,t,_)}finally{i!==null&&c.types!==null&&(i.types=c.types),R.T=i}}else try{i=l(s,a),fo(e,t,i)}catch(_){nr(e,t,_)}}function fo(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){mo(e,t,a)},function(a){return nr(e,t,a)}):mo(e,t,l)}function mo(e,t,l){t.status="fulfilled",t.value=l,xo(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,oo(e,l)))}function nr(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,xo(t),t=t.next;while(t!==a)}e.action=null}function xo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function po(e,t){return t}function vo(e,t){if(je){var l=Re.formState;if(l!==null){e:{var a=de;if(je){if(ze){t:{for(var s=ze,i=Ct;s.nodeType!==8;){if(!i){s=null;break t}if(s=_t(s.nextSibling),s===null){s=null;break t}}i=s.data,s=i==="F!"||i==="F"?s:null}if(s){ze=_t(s.nextSibling),a=s.data==="F!";break e}}rl(a)}a=!1}a&&(t=l[0])}}return l=tt(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:po,lastRenderedState:t},l.queue=a,l=Do.bind(null,de,a),a.dispatch=l,a=ar(!1),i=or.bind(null,de,!1,a.queue),a=tt(),s={state:t,dispatch:null,action:e,pending:null},a.queue=s,l=_x.bind(null,de,s,i,l),s.dispatch=l,a.memoizedState=e,[t,l,!1]}function ho(e){var t=qe();return yo(t,_e,e)}function yo(e,t,l){if(t=tr(e,t,po)[0],e=us(Xt)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=an(t)}catch(c){throw c===xa?Pn:c}else a=t;t=qe();var s=t.queue,i=s.dispatch;return l!==t.memoizedState&&(de.flags|=2048,ga(9,{destroy:void 0},kx.bind(null,s,l),null)),[a,i,e]}function kx(e,t){e.action=t}function go(e){var t=qe(),l=_e;if(l!==null)return yo(t,l,e);qe(),t=t.memoizedState,l=qe();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function ga(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=de.updateQueue,t===null&&(t=rs(),de.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 bo(){return qe().memoizedState}function os(e,t,l,a){var s=tt();de.flags|=e,s.memoizedState=ga(1|t,{destroy:void 0},l,a===void 0?null:a)}function ds(e,t,l,a){var s=qe();a=a===void 0?null:a;var i=s.memoizedState.inst;_e!==null&&a!==null&&$i(a,_e.memoizedState.deps)?s.memoizedState=ga(t,i,l,a):(de.flags|=e,s.memoizedState=ga(1|t,i,l,a))}function jo(e,t){os(8390656,8,e,t)}function sr(e,t){ds(2048,8,e,t)}function Mx(e){de.flags|=4;var t=de.updateQueue;if(t===null)t=rs(),de.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function So(e){var t=qe().memoizedState;return Mx({ref:t,nextImpl:e}),function(){if((Te&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function No(e,t){return ds(4,2,e,t)}function Eo(e,t){return ds(4,4,e,t)}function To(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 Co(e,t,l){l=l!=null?l.concat([e]):null,ds(4,4,To.bind(null,t,e),l)}function ir(){}function Ao(e,t){var l=qe();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&$i(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function _o(e,t){var l=qe();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&$i(t,a[1]))return a[0];if(a=e(),Vl){ll(!0);try{e()}finally{ll(!1)}}return l.memoizedState=[a,t],a}function rr(e,t,l){return l===void 0||(Qt&1073741824)!==0&&(ge&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=kd(),de.lanes|=e,vl|=e,l)}function ko(e,t,l,a){return mt(l,t)?l:va.current!==null?(e=rr(e,l,a),mt(e,t)||(Ve=!0),e):(Qt&42)===0||(Qt&1073741824)!==0&&(ge&261930)===0?(Ve=!0,e.memoizedState=l):(e=kd(),de.lanes|=e,vl|=e,t)}function Mo(e,t,l,a,s){var i=O.p;O.p=i!==0&&8>i?i:8;var c=R.T,d={};R.T=d,or(e,!1,t,l);try{var y=s(),_=R.S;if(_!==null&&_(d,y),y!==null&&typeof y=="object"&&typeof y.then=="function"){var w=Tx(y,a);nn(e,t,w,gt(e))}else nn(e,t,a,gt(e))}catch(H){nn(e,t,{then:function(){},status:"rejected",reason:H},gt())}finally{O.p=i,c!==null&&d.types!==null&&(c.types=d.types),R.T=c}}function Rx(){}function cr(e,t,l,a){if(e.tag!==5)throw Error(o(476));var s=Ro(e).queue;Mo(e,s,t,L,l===null?Rx:function(){return zo(e),l(a)})}function Ro(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:L,baseState:L,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xt,lastRenderedState:L},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xt,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function zo(e){var t=Ro(e);t.next===null&&(t=e.alternate.memoizedState),nn(e,t.next.queue,{},gt())}function ur(){return Fe(Sn)}function Oo(){return qe().memoizedState}function wo(){return qe().memoizedState}function zx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=gt();e=ol(l);var a=dl(t,e,l);a!==null&&(ut(a,t,l),Pa(a,t,l)),t={cache:Ui()},e.payload=t;return}t=t.return}}function Ox(e,t,l){var a=gt();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},fs(e)?Lo(t,l):(l=Ai(e,t,l,a),l!==null&&(ut(l,e,a),Bo(l,t,a)))}function Do(e,t,l){var a=gt();nn(e,t,l,a)}function nn(e,t,l,a){var s={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(fs(e))Lo(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var c=t.lastRenderedState,d=i(c,l);if(s.hasEagerState=!0,s.eagerState=d,mt(d,c))return Zn(e,t,s,0),Re===null&&Xn(),!1}catch{}finally{}if(l=Ai(e,t,s,a),l!==null)return ut(l,e,a),Bo(l,t,a),!0}return!1}function or(e,t,l,a){if(a={lane:2,revertLane:Gr(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},fs(e)){if(t)throw Error(o(479))}else t=Ai(e,l,a,2),t!==null&&ut(t,e,2)}function fs(e){var t=e.alternate;return e===de||t!==null&&t===de}function Lo(e,t){ha=ss=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function Bo(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,Yc(e,l)}}var sn={readContext:Fe,use:cs,useCallback:De,useContext:De,useEffect:De,useImperativeHandle:De,useLayoutEffect:De,useInsertionEffect:De,useMemo:De,useReducer:De,useRef:De,useState:De,useDebugValue:De,useDeferredValue:De,useTransition:De,useSyncExternalStore:De,useId:De,useHostTransitionStatus:De,useFormState:De,useActionState:De,useOptimistic:De,useMemoCache:De,useCacheRefresh:De};sn.useEffectEvent=De;var Uo={readContext:Fe,use:cs,useCallback:function(e,t){return tt().memoizedState=[e,t===void 0?null:t],e},useContext:Fe,useEffect:jo,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,os(4194308,4,To.bind(null,t,e),l)},useLayoutEffect:function(e,t){return os(4194308,4,e,t)},useInsertionEffect:function(e,t){os(4,2,e,t)},useMemo:function(e,t){var l=tt();t=t===void 0?null:t;var a=e();if(Vl){ll(!0);try{e()}finally{ll(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=tt();if(l!==void 0){var s=l(t);if(Vl){ll(!0);try{l(t)}finally{ll(!1)}}}else s=t;return a.memoizedState=a.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},a.queue=e,e=e.dispatch=Ox.bind(null,de,e),[a.memoizedState,e]},useRef:function(e){var t=tt();return e={current:e},t.memoizedState=e},useState:function(e){e=ar(e);var t=e.queue,l=Do.bind(null,de,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:ir,useDeferredValue:function(e,t){var l=tt();return rr(l,e,t)},useTransition:function(){var e=ar(!1);return e=Mo.bind(null,de,e.queue,!0,!1),tt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=de,s=tt();if(je){if(l===void 0)throw Error(o(407));l=l()}else{if(l=t(),Re===null)throw Error(o(349));(ge&127)!==0||no(a,t,l)}s.memoizedState=l;var i={value:l,getSnapshot:t};return s.queue=i,jo(io.bind(null,a,i,e),[e]),a.flags|=2048,ga(9,{destroy:void 0},so.bind(null,a,i,l,t),null),l},useId:function(){var e=tt(),t=Re.identifierPrefix;if(je){var l=wt,a=Ot;l=(a&~(1<<32-ft(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=is++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=Cx++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:ur,useFormState:vo,useActionState:vo,useOptimistic:function(e){var t=tt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=or.bind(null,de,!0,l),l.dispatch=t,[e,t]},useMemoCache:er,useCacheRefresh:function(){return tt().memoizedState=zx.bind(null,de)},useEffectEvent:function(e){var t=tt(),l={impl:e};return t.memoizedState=l,function(){if((Te&2)!==0)throw Error(o(440));return l.impl.apply(void 0,arguments)}}},dr={readContext:Fe,use:cs,useCallback:Ao,useContext:Fe,useEffect:sr,useImperativeHandle:Co,useInsertionEffect:No,useLayoutEffect:Eo,useMemo:_o,useReducer:us,useRef:bo,useState:function(){return us(Xt)},useDebugValue:ir,useDeferredValue:function(e,t){var l=qe();return ko(l,_e.memoizedState,e,t)},useTransition:function(){var e=us(Xt)[0],t=qe().memoizedState;return[typeof e=="boolean"?e:an(e),t]},useSyncExternalStore:ao,useId:Oo,useHostTransitionStatus:ur,useFormState:ho,useActionState:ho,useOptimistic:function(e,t){var l=qe();return uo(l,_e,e,t)},useMemoCache:er,useCacheRefresh:wo};dr.useEffectEvent=So;var Ho={readContext:Fe,use:cs,useCallback:Ao,useContext:Fe,useEffect:sr,useImperativeHandle:Co,useInsertionEffect:No,useLayoutEffect:Eo,useMemo:_o,useReducer:lr,useRef:bo,useState:function(){return lr(Xt)},useDebugValue:ir,useDeferredValue:function(e,t){var l=qe();return _e===null?rr(l,e,t):ko(l,_e.memoizedState,e,t)},useTransition:function(){var e=lr(Xt)[0],t=qe().memoizedState;return[typeof e=="boolean"?e:an(e),t]},useSyncExternalStore:ao,useId:Oo,useHostTransitionStatus:ur,useFormState:go,useActionState:go,useOptimistic:function(e,t){var l=qe();return _e!==null?uo(l,_e,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:er,useCacheRefresh:wo};Ho.useEffectEvent=So;function fr(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:g({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var mr={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=gt(),s=ol(a);s.payload=t,l!=null&&(s.callback=l),t=dl(e,s,a),t!==null&&(ut(t,e,a),Pa(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=gt(),s=ol(a);s.tag=1,s.payload=t,l!=null&&(s.callback=l),t=dl(e,s,a),t!==null&&(ut(t,e,a),Pa(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=gt(),a=ol(l);a.tag=2,t!=null&&(a.callback=t),t=dl(e,a,l),t!==null&&(ut(t,e,l),Pa(t,e,l))}};function qo(e,t,l,a,s,i,c){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,i,c):t.prototype&&t.prototype.isPureReactComponent?!Xa(l,a)||!Xa(s,i):!0}function Yo(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&&mr.enqueueReplaceState(t,t.state,null)}function Ql(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=g({},l));for(var s in e)l[s]===void 0&&(l[s]=e[s])}return l}function Go(e){Qn(e)}function Vo(e){console.error(e)}function Qo(e){Qn(e)}function ms(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Xo(e,t,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(s){setTimeout(function(){throw s})}}function xr(e,t,l){return l=ol(l),l.tag=3,l.payload={element:null},l.callback=function(){ms(e,t)},l}function Zo(e){return e=ol(e),e.tag=3,e}function Ko(e,t,l,a){var s=l.type.getDerivedStateFromError;if(typeof s=="function"){var i=a.value;e.payload=function(){return s(i)},e.callback=function(){Xo(t,l,a)}}var c=l.stateNode;c!==null&&typeof c.componentDidCatch=="function"&&(e.callback=function(){Xo(t,l,a),typeof s!="function"&&(hl===null?hl=new Set([this]):hl.add(this));var d=a.stack;this.componentDidCatch(a.value,{componentStack:d!==null?d:""})})}function wx(e,t,l,a,s){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&da(t,l,s,!0),l=pt.current,l!==null){switch(l.tag){case 31:case 13:return At===null?Ts():l.alternate===null&&Le===0&&(Le=3),l.flags&=-257,l.flags|=65536,l.lanes=s,a===es?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),Hr(e,a,s)),!1;case 22:return l.flags|=65536,a===es?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)),Hr(e,a,s)),!1}throw Error(o(435,l.tag))}return Hr(e,a,s),Ts(),!1}if(je)return t=pt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=s,a!==Oi&&(e=Error(o(422),{cause:a}),Ja(Nt(e,l)))):(a!==Oi&&(t=Error(o(423),{cause:a}),Ja(Nt(t,l))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,a=Nt(a,l),s=xr(e.stateNode,a,s),Qi(e,s),Le!==4&&(Le=2)),!1;var i=Error(o(520),{cause:a});if(i=Nt(i,l),xn===null?xn=[i]:xn.push(i),Le!==4&&(Le=2),t===null)return!0;a=Nt(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=s&-s,l.lanes|=e,e=xr(l.stateNode,a,e),Qi(l,e),!1;case 1:if(t=l.type,i=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(hl===null||!hl.has(i))))return l.flags|=65536,s&=-s,l.lanes|=s,s=Zo(s),Ko(s,e,l,a),Qi(l,s),!1}l=l.return}while(l!==null);return!1}var pr=Error(o(461)),Ve=!1;function Ie(e,t,l,a){t.child=e===null?Wu(t,null,l,a):Gl(t,e.child,l,a)}function Jo(e,t,l,a,s){l=l.render;var i=t.ref;if("ref"in a){var c={};for(var d in a)d!=="ref"&&(c[d]=a[d])}else c=a;return Ul(t),a=Wi(e,t,l,c,i,s),d=Fi(),e!==null&&!Ve?(Ii(e,t,s),Zt(e,t,s)):(je&&d&&Ri(t),t.flags|=1,Ie(e,t,a,s),t.child)}function $o(e,t,l,a,s){if(e===null){var i=l.type;return typeof i=="function"&&!_i(i)&&i.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=i,Wo(e,t,i,a,s)):(e=Jn(l.type,null,a,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!Nr(e,s)){var c=i.memoizedProps;if(l=l.compare,l=l!==null?l:Xa,l(c,a)&&e.ref===t.ref)return Zt(e,t,s)}return t.flags|=1,e=qt(i,a),e.ref=t.ref,e.return=t,t.child=e}function Wo(e,t,l,a,s){if(e!==null){var i=e.memoizedProps;if(Xa(i,a)&&e.ref===t.ref)if(Ve=!1,t.pendingProps=a=i,Nr(e,s))(e.flags&131072)!==0&&(Ve=!0);else return t.lanes=e.lanes,Zt(e,t,s)}return vr(e,t,l,a,s)}function Fo(e,t,l,a){var s=a.children,i=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(i=i!==null?i.baseLanes|l:l,e!==null){for(a=t.child=e.child,s=0;a!==null;)s=s|a.lanes|a.childLanes,a=a.sibling;a=s&~i}else a=0,t.child=null;return Io(e,t,i,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&In(t,i!==null?i.cachePool:null),i!==null?Pu(t,i):Zi(),eo(t);else return a=t.lanes=536870912,Io(e,t,i!==null?i.baseLanes|l:l,l,a)}else i!==null?(In(t,i.cachePool),Pu(t,i),ml(),t.memoizedState=null):(e!==null&&In(t,null),Zi(),ml());return Ie(e,t,s,l),t.child}function rn(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Io(e,t,l,a,s){var i=qi();return i=i===null?null:{parent:Ye._currentValue,pool:i},t.memoizedState={baseLanes:l,cachePool:i},e!==null&&In(t,null),Zi(),eo(t),e!==null&&da(e,t,a,!0),t.childLanes=s,null}function xs(e,t){return t=vs({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Po(e,t,l){return Gl(t,e.child,null,l),e=xs(t,t.pendingProps),e.flags|=2,vt(t),t.memoizedState=null,e}function Dx(e,t,l){var a=t.pendingProps,s=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(je){if(a.mode==="hidden")return e=xs(t,a),t.lanes=536870912,rn(null,e);if(Ji(t),(e=ze)?(e=ff(e,Ct),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:sl!==null?{id:Ot,overflow:wt}:null,retryLane:536870912,hydrationErrors:null},l=Du(e),l.return=t,t.child=l,We=t,ze=null)):e=null,e===null)throw rl(t);return t.lanes=536870912,null}return xs(t,a)}var i=e.memoizedState;if(i!==null){var c=i.dehydrated;if(Ji(t),s)if(t.flags&256)t.flags&=-257,t=Po(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Ve||da(e,t,l,!1),s=(l&e.childLanes)!==0,Ve||s){if(a=Re,a!==null&&(c=Gc(a,l),c!==0&&c!==i.retryLane))throw i.retryLane=c,wl(e,c),ut(a,e,c),pr;Ts(),t=Po(e,t,l)}else e=i.treeContext,ze=_t(c.nextSibling),We=t,je=!0,il=null,Ct=!1,e!==null&&Uu(t,e),t=xs(t,a),t.flags|=4096;return t}return e=qt(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ps(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(o(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function vr(e,t,l,a,s){return Ul(t),l=Wi(e,t,l,a,void 0,s),a=Fi(),e!==null&&!Ve?(Ii(e,t,s),Zt(e,t,s)):(je&&a&&Ri(t),t.flags|=1,Ie(e,t,l,s),t.child)}function ed(e,t,l,a,s,i){return Ul(t),t.updateQueue=null,l=lo(t,a,l,s),to(e),a=Fi(),e!==null&&!Ve?(Ii(e,t,i),Zt(e,t,i)):(je&&a&&Ri(t),t.flags|=1,Ie(e,t,l,i),t.child)}function td(e,t,l,a,s){if(Ul(t),t.stateNode===null){var i=ra,c=l.contextType;typeof c=="object"&&c!==null&&(i=Fe(c)),i=new l(a,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=mr,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=a,i.state=t.memoizedState,i.refs={},Gi(t),c=l.contextType,i.context=typeof c=="object"&&c!==null?Fe(c):ra,i.state=t.memoizedState,c=l.getDerivedStateFromProps,typeof c=="function"&&(fr(t,l,c,a),i.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(c=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),c!==i.state&&mr.enqueueReplaceState(i,i.state,null),tn(t,a,i,s),en(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){i=t.stateNode;var d=t.memoizedProps,y=Ql(l,d);i.props=y;var _=i.context,w=l.contextType;c=ra,typeof w=="object"&&w!==null&&(c=Fe(w));var H=l.getDerivedStateFromProps;w=typeof H=="function"||typeof i.getSnapshotBeforeUpdate=="function",d=t.pendingProps!==d,w||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(d||_!==c)&&Yo(t,i,a,c),ul=!1;var k=t.memoizedState;i.state=k,tn(t,a,i,s),en(),_=t.memoizedState,d||k!==_||ul?(typeof H=="function"&&(fr(t,l,H,a),_=t.memoizedState),(y=ul||qo(t,l,y,a,k,_,c))?(w||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=_),i.props=a,i.state=_,i.context=c,a=y):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{i=t.stateNode,Vi(e,t),c=t.memoizedProps,w=Ql(l,c),i.props=w,H=t.pendingProps,k=i.context,_=l.contextType,y=ra,typeof _=="object"&&_!==null&&(y=Fe(_)),d=l.getDerivedStateFromProps,(_=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(c!==H||k!==y)&&Yo(t,i,a,y),ul=!1,k=t.memoizedState,i.state=k,tn(t,a,i,s),en();var z=t.memoizedState;c!==H||k!==z||ul||e!==null&&e.dependencies!==null&&Wn(e.dependencies)?(typeof d=="function"&&(fr(t,l,d,a),z=t.memoizedState),(w=ul||qo(t,l,w,a,k,z,y)||e!==null&&e.dependencies!==null&&Wn(e.dependencies))?(_||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(a,z,y),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(a,z,y)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||c===e.memoizedProps&&k===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&k===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=z),i.props=a,i.state=z,i.context=y,a=w):(typeof i.componentDidUpdate!="function"||c===e.memoizedProps&&k===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&k===e.memoizedState||(t.flags|=1024),a=!1)}return i=a,ps(e,t),a=(t.flags&128)!==0,i||a?(i=t.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&a?(t.child=Gl(t,e.child,null,s),t.child=Gl(t,null,l,s)):Ie(e,t,l,s),t.memoizedState=i.state,e=t.child):e=Zt(e,t,s),e}function ld(e,t,l,a){return Ll(),t.flags|=256,Ie(e,t,l,a),t.child}var hr={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function yr(e){return{baseLanes:e,cachePool:Qu()}}function gr(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=yt),e}function ad(e,t,l){var a=t.pendingProps,s=!1,i=(t.flags&128)!==0,c;if((c=i)||(c=e!==null&&e.memoizedState===null?!1:(He.current&2)!==0),c&&(s=!0,t.flags&=-129),c=(t.flags&32)!==0,t.flags&=-33,e===null){if(je){if(s?fl(t):ml(),(e=ze)?(e=ff(e,Ct),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:sl!==null?{id:Ot,overflow:wt}:null,retryLane:536870912,hydrationErrors:null},l=Du(e),l.return=t,t.child=l,We=t,ze=null)):e=null,e===null)throw rl(t);return tc(e)?t.lanes=32:t.lanes=536870912,null}var d=a.children;return a=a.fallback,s?(ml(),s=t.mode,d=vs({mode:"hidden",children:d},s),a=Dl(a,s,l,null),d.return=t,a.return=t,d.sibling=a,t.child=d,a=t.child,a.memoizedState=yr(l),a.childLanes=gr(e,c,l),t.memoizedState=hr,rn(null,a)):(fl(t),br(t,d))}var y=e.memoizedState;if(y!==null&&(d=y.dehydrated,d!==null)){if(i)t.flags&256?(fl(t),t.flags&=-257,t=jr(e,t,l)):t.memoizedState!==null?(ml(),t.child=e.child,t.flags|=128,t=null):(ml(),d=a.fallback,s=t.mode,a=vs({mode:"visible",children:a.children},s),d=Dl(d,s,l,null),d.flags|=2,a.return=t,d.return=t,a.sibling=d,t.child=a,Gl(t,e.child,null,l),a=t.child,a.memoizedState=yr(l),a.childLanes=gr(e,c,l),t.memoizedState=hr,t=rn(null,a));else if(fl(t),tc(d)){if(c=d.nextSibling&&d.nextSibling.dataset,c)var _=c.dgst;c=_,a=Error(o(419)),a.stack="",a.digest=c,Ja({value:a,source:null,stack:null}),t=jr(e,t,l)}else if(Ve||da(e,t,l,!1),c=(l&e.childLanes)!==0,Ve||c){if(c=Re,c!==null&&(a=Gc(c,l),a!==0&&a!==y.retryLane))throw y.retryLane=a,wl(e,a),ut(c,e,a),pr;ec(d)||Ts(),t=jr(e,t,l)}else ec(d)?(t.flags|=192,t.child=e.child,t=null):(e=y.treeContext,ze=_t(d.nextSibling),We=t,je=!0,il=null,Ct=!1,e!==null&&Uu(t,e),t=br(t,a.children),t.flags|=4096);return t}return s?(ml(),d=a.fallback,s=t.mode,y=e.child,_=y.sibling,a=qt(y,{mode:"hidden",children:a.children}),a.subtreeFlags=y.subtreeFlags&65011712,_!==null?d=qt(_,d):(d=Dl(d,s,l,null),d.flags|=2),d.return=t,a.return=t,a.sibling=d,t.child=a,rn(null,a),a=t.child,d=e.child.memoizedState,d===null?d=yr(l):(s=d.cachePool,s!==null?(y=Ye._currentValue,s=s.parent!==y?{parent:y,pool:y}:s):s=Qu(),d={baseLanes:d.baseLanes|l,cachePool:s}),a.memoizedState=d,a.childLanes=gr(e,c,l),t.memoizedState=hr,rn(e.child,a)):(fl(t),l=e.child,e=l.sibling,l=qt(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(c=t.deletions,c===null?(t.deletions=[e],t.flags|=16):c.push(e)),t.child=l,t.memoizedState=null,l)}function br(e,t){return t=vs({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function vs(e,t){return e=xt(22,e,null,t),e.lanes=0,e}function jr(e,t,l){return Gl(t,e.child,null,l),e=br(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function nd(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Li(e.return,t,l)}function Sr(e,t,l,a,s,i){var c=e.memoizedState;c===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:s,treeForkCount:i}:(c.isBackwards=t,c.rendering=null,c.renderingStartTime=0,c.last=a,c.tail=l,c.tailMode=s,c.treeForkCount=i)}function sd(e,t,l){var a=t.pendingProps,s=a.revealOrder,i=a.tail;a=a.children;var c=He.current,d=(c&2)!==0;if(d?(c=c&1|2,t.flags|=128):c&=1,D(He,c),Ie(e,t,a,l),a=je?Ka:0,!d&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&nd(e,l,t);else if(e.tag===19)nd(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(s){case"forwards":for(l=t.child,s=null;l!==null;)e=l.alternate,e!==null&&ns(e)===null&&(s=l),l=l.sibling;l=s,l===null?(s=t.child,t.child=null):(s=l.sibling,l.sibling=null),Sr(t,!1,s,l,i,a);break;case"backwards":case"unstable_legacy-backwards":for(l=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&ns(e)===null){t.child=s;break}e=s.sibling,s.sibling=l,l=s,s=e}Sr(t,!0,l,null,i,a);break;case"together":Sr(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function Zt(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),vl|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(da(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,l=qt(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=qt(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function Nr(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Wn(e)))}function Lx(e,t,l){switch(t.tag){case 3:Ze(t,t.stateNode.containerInfo),cl(t,Ye,e.memoizedState.cache),Ll();break;case 27:case 5:za(t);break;case 4:Ze(t,t.stateNode.containerInfo);break;case 10:cl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ji(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(fl(t),t.flags|=128,null):(l&t.child.childLanes)!==0?ad(e,t,l):(fl(t),e=Zt(e,t,l),e!==null?e.sibling:null);fl(t);break;case 19:var s=(e.flags&128)!==0;if(a=(l&t.childLanes)!==0,a||(da(e,t,l,!1),a=(l&t.childLanes)!==0),s){if(a)return sd(e,t,l);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),D(He,He.current),a)break;return null;case 22:return t.lanes=0,Fo(e,t,l,t.pendingProps);case 24:cl(t,Ye,e.memoizedState.cache)}return Zt(e,t,l)}function id(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ve=!0;else{if(!Nr(e,l)&&(t.flags&128)===0)return Ve=!1,Lx(e,t,l);Ve=(e.flags&131072)!==0}else Ve=!1,je&&(t.flags&1048576)!==0&&Bu(t,Ka,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=ql(t.elementType),t.type=e,typeof e=="function")_i(e)?(a=Ql(e,a),t.tag=1,t=td(null,t,e,a,l)):(t.tag=0,t=vr(null,t,e,a,l));else{if(e!=null){var s=e.$$typeof;if(s===K){t.tag=11,t=Jo(null,t,e,a,l);break e}else if(s===ae){t.tag=14,t=$o(null,t,e,a,l);break e}}throw t=W(e)||e,Error(o(306,t,""))}}return t;case 0:return vr(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,s=Ql(a,t.pendingProps),td(e,t,a,s,l);case 3:e:{if(Ze(t,t.stateNode.containerInfo),e===null)throw Error(o(387));a=t.pendingProps;var i=t.memoizedState;s=i.element,Vi(e,t),tn(t,a,null,l);var c=t.memoizedState;if(a=c.cache,cl(t,Ye,a),a!==i.cache&&Bi(t,[Ye],l,!0),en(),a=c.element,i.isDehydrated)if(i={element:a,isDehydrated:!1,cache:c.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=ld(e,t,a,l);break e}else if(a!==s){s=Nt(Error(o(424)),t),Ja(s),t=ld(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(ze=_t(e.firstChild),We=t,je=!0,il=null,Ct=!0,l=Wu(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Ll(),a===s){t=Zt(e,t,l);break e}Ie(e,t,a,l)}t=t.child}return t;case 26:return ps(e,t),e===null?(l=yf(t.type,null,t.pendingProps,null))?t.memoizedState=l:je||(l=t.type,e=t.pendingProps,a=zs(te.current).createElement(l),a[$e]=t,a[at]=e,Pe(a,l,e),Ke(a),t.stateNode=a):t.memoizedState=yf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return za(t),e===null&&je&&(a=t.stateNode=pf(t.type,t.pendingProps,te.current),We=t,Ct=!0,s=ze,jl(t.type)?(lc=s,ze=_t(a.firstChild)):ze=s),Ie(e,t,t.pendingProps.children,l),ps(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&je&&((s=a=ze)&&(a=fp(a,t.type,t.pendingProps,Ct),a!==null?(t.stateNode=a,We=t,ze=_t(a.firstChild),Ct=!1,s=!0):s=!1),s||rl(t)),za(t),s=t.type,i=t.pendingProps,c=e!==null?e.memoizedProps:null,a=i.children,Fr(s,i)?a=null:c!==null&&Fr(s,c)&&(t.flags|=32),t.memoizedState!==null&&(s=Wi(e,t,Ax,null,null,l),Sn._currentValue=s),ps(e,t),Ie(e,t,a,l),t.child;case 6:return e===null&&je&&((e=l=ze)&&(l=mp(l,t.pendingProps,Ct),l!==null?(t.stateNode=l,We=t,ze=null,e=!0):e=!1),e||rl(t)),null;case 13:return ad(e,t,l);case 4:return Ze(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Gl(t,null,a,l):Ie(e,t,a,l),t.child;case 11:return Jo(e,t,t.type,t.pendingProps,l);case 7:return Ie(e,t,t.pendingProps,l),t.child;case 8:return Ie(e,t,t.pendingProps.children,l),t.child;case 12:return Ie(e,t,t.pendingProps.children,l),t.child;case 10:return a=t.pendingProps,cl(t,t.type,a.value),Ie(e,t,a.children,l),t.child;case 9:return s=t.type._context,a=t.pendingProps.children,Ul(t),s=Fe(s),a=a(s),t.flags|=1,Ie(e,t,a,l),t.child;case 14:return $o(e,t,t.type,t.pendingProps,l);case 15:return Wo(e,t,t.type,t.pendingProps,l);case 19:return sd(e,t,l);case 31:return Dx(e,t,l);case 22:return Fo(e,t,l,t.pendingProps);case 24:return Ul(t),a=Fe(Ye),e===null?(s=qi(),s===null&&(s=Re,i=Ui(),s.pooledCache=i,i.refCount++,i!==null&&(s.pooledCacheLanes|=l),s=i),t.memoizedState={parent:a,cache:s},Gi(t),cl(t,Ye,s)):((e.lanes&l)!==0&&(Vi(e,t),tn(t,null,null,l),en()),s=e.memoizedState,i=t.memoizedState,s.parent!==a?(s={parent:a,cache:a},t.memoizedState=s,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=s),cl(t,Ye,a)):(a=i.cache,cl(t,Ye,a),a!==s.cache&&Bi(t,[Ye],l,!0))),Ie(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Kt(e){e.flags|=4}function Er(e,t,l,a,s){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(s&335544128)===s)if(e.stateNode.complete)e.flags|=8192;else if(Od())e.flags|=8192;else throw Yl=es,Yi}else e.flags&=-16777217}function rd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Nf(t))if(Od())e.flags|=8192;else throw Yl=es,Yi}function hs(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Hc():536870912,e.lanes|=t,Na|=t)}function cn(e,t){if(!je)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 Oe(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var s=e.child;s!==null;)l|=s.lanes|s.childLanes,a|=s.subtreeFlags&65011712,a|=s.flags&65011712,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)l|=s.lanes|s.childLanes,a|=s.subtreeFlags,a|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=a,e.childLanes=l,t}function Bx(e,t,l){var a=t.pendingProps;switch(zi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Oe(t),null;case 1:return Oe(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Vt(Ye),Ue(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(oa(t)?Kt(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,wi())),Oe(t),null;case 26:var s=t.type,i=t.memoizedState;return e===null?(Kt(t),i!==null?(Oe(t),rd(t,i)):(Oe(t),Er(t,s,null,a,l))):i?i!==e.memoizedState?(Kt(t),Oe(t),rd(t,i)):(Oe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&Kt(t),Oe(t),Er(t,s,e,a,l)),null;case 27:if(_n(t),l=te.current,s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Kt(t);else{if(!a){if(t.stateNode===null)throw Error(o(166));return Oe(t),null}e=q.current,oa(t)?Hu(t):(e=pf(s,a,l),t.stateNode=e,Kt(t))}return Oe(t),null;case 5:if(_n(t),s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Kt(t);else{if(!a){if(t.stateNode===null)throw Error(o(166));return Oe(t),null}if(i=q.current,oa(t))Hu(t);else{var c=zs(te.current);switch(i){case 1:i=c.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:i=c.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":i=c.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":i=c.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":i=c.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof a.is=="string"?c.createElement("select",{is:a.is}):c.createElement("select"),a.multiple?i.multiple=!0:a.size&&(i.size=a.size);break;default:i=typeof a.is=="string"?c.createElement(s,{is:a.is}):c.createElement(s)}}i[$e]=t,i[at]=a;e:for(c=t.child;c!==null;){if(c.tag===5||c.tag===6)i.appendChild(c.stateNode);else if(c.tag!==4&&c.tag!==27&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===t)break e;for(;c.sibling===null;){if(c.return===null||c.return===t)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}t.stateNode=i;e:switch(Pe(i,s,a),s){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Kt(t)}}return Oe(t),Er(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Kt(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(o(166));if(e=te.current,oa(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,s=We,s!==null)switch(s.tag){case 27:case 5:a=s.memoizedProps}e[$e]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||af(e.nodeValue,l)),e||rl(t,!0)}else e=zs(e).createTextNode(a),e[$e]=t,t.stateNode=e}return Oe(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=oa(t),l!==null){if(e===null){if(!a)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[$e]=t}else Ll(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Oe(t),e=!1}else l=wi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(vt(t),t):(vt(t),null);if((t.flags&128)!==0)throw Error(o(558))}return Oe(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=oa(t),a!==null&&a.dehydrated!==null){if(e===null){if(!s)throw Error(o(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(o(317));s[$e]=t}else Ll(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Oe(t),s=!1}else s=wi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return t.flags&256?(vt(t),t):(vt(t),null)}return vt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,s=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(s=a.alternate.memoizedState.cachePool.pool),i=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==s&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),hs(t,t.updateQueue),Oe(t),null);case 4:return Ue(),e===null&&Zr(t.stateNode.containerInfo),Oe(t),null;case 10:return Vt(t.type),Oe(t),null;case 19:if(N(He),a=t.memoizedState,a===null)return Oe(t),null;if(s=(t.flags&128)!==0,i=a.rendering,i===null)if(s)cn(a,!1);else{if(Le!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=ns(e),i!==null){for(t.flags|=128,cn(a,!1),e=i.updateQueue,t.updateQueue=e,hs(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)wu(l,e),l=l.sibling;return D(He,He.current&1|2),je&&Yt(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&ot()>Ss&&(t.flags|=128,s=!0,cn(a,!1),t.lanes=4194304)}else{if(!s)if(e=ns(i),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,hs(t,e),cn(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!je)return Oe(t),null}else 2*ot()-a.renderingStartTime>Ss&&l!==536870912&&(t.flags|=128,s=!0,cn(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(e=a.last,e!==null?e.sibling=i:t.child=i,a.last=i)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=ot(),e.sibling=null,l=He.current,D(He,s?l&1|2:l&1),je&&Yt(t,a.treeForkCount),e):(Oe(t),null);case 22:case 23:return vt(t),Ki(),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&&(Oe(t),t.subtreeFlags&6&&(t.flags|=8192)):Oe(t),l=t.updateQueue,l!==null&&hs(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(Hl),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Vt(Ye),Oe(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function Ux(e,t){switch(zi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vt(Ye),Ue(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return _n(t),null;case 31:if(t.memoizedState!==null){if(vt(t),t.alternate===null)throw Error(o(340));Ll()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(vt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Ll()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return N(He),null;case 4:return Ue(),null;case 10:return Vt(t.type),null;case 22:case 23:return vt(t),Ki(),e!==null&&N(Hl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Vt(Ye),null;case 25:return null;default:return null}}function cd(e,t){switch(zi(t),t.tag){case 3:Vt(Ye),Ue();break;case 26:case 27:case 5:_n(t);break;case 4:Ue();break;case 31:t.memoizedState!==null&&vt(t);break;case 13:vt(t);break;case 19:N(He);break;case 10:Vt(t.type);break;case 22:case 23:vt(t),Ki(),e!==null&&N(Hl);break;case 24:Vt(Ye)}}function un(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var s=a.next;l=s;do{if((l.tag&e)===e){a=void 0;var i=l.create,c=l.inst;a=i(),c.destroy=a}l=l.next}while(l!==s)}}catch(d){Ae(t,t.return,d)}}function xl(e,t,l){try{var a=t.updateQueue,s=a!==null?a.lastEffect:null;if(s!==null){var i=s.next;a=i;do{if((a.tag&e)===e){var c=a.inst,d=c.destroy;if(d!==void 0){c.destroy=void 0,s=t;var y=l,_=d;try{_()}catch(w){Ae(s,y,w)}}}a=a.next}while(a!==i)}}catch(w){Ae(t,t.return,w)}}function ud(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Iu(t,l)}catch(a){Ae(e,e.return,a)}}}function od(e,t,l){l.props=Ql(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){Ae(e,t,a)}}function on(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(s){Ae(e,t,s)}}function Dt(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(s){Ae(e,t,s)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(s){Ae(e,t,s)}else l.current=null}function dd(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(s){Ae(e,e.return,s)}}function Tr(e,t,l){try{var a=e.stateNode;ip(a,e.type,l,t),a[at]=t}catch(s){Ae(e,e.return,s)}}function fd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&jl(e.type)||e.tag===4}function Cr(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||fd(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&&jl(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 Ar(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=Ut));else if(a!==4&&(a===27&&jl(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(Ar(e,t,l),e=e.sibling;e!==null;)Ar(e,t,l),e=e.sibling}function ys(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&&jl(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(ys(e,t,l),e=e.sibling;e!==null;)ys(e,t,l),e=e.sibling}function md(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,s=t.attributes;s.length;)t.removeAttributeNode(s[0]);Pe(t,a,l),t[$e]=e,t[at]=l}catch(i){Ae(e,e.return,i)}}var Jt=!1,Qe=!1,_r=!1,xd=typeof WeakSet=="function"?WeakSet:Set,Je=null;function Hx(e,t){if(e=e.containerInfo,$r=Hs,e=Tu(e),ji(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 s=a.anchorOffset,i=a.focusNode;a=a.focusOffset;try{l.nodeType,i.nodeType}catch{l=null;break e}var c=0,d=-1,y=-1,_=0,w=0,H=e,k=null;t:for(;;){for(var z;H!==l||s!==0&&H.nodeType!==3||(d=c+s),H!==i||a!==0&&H.nodeType!==3||(y=c+a),H.nodeType===3&&(c+=H.nodeValue.length),(z=H.firstChild)!==null;)k=H,H=z;for(;;){if(H===e)break t;if(k===l&&++_===s&&(d=c),k===i&&++w===a&&(y=c),(z=H.nextSibling)!==null)break;H=k,k=H.parentNode}H=z}l=d===-1||y===-1?null:{start:d,end:y}}else l=null}l=l||{start:0,end:0}}else l=null;for(Wr={focusedElem:e,selectionRange:l},Hs=!1,Je=t;Je!==null;)if(t=Je,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Je=e;else for(;Je!==null;){switch(t=Je,i=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++)s=e[l],s.ref.impl=s.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,l=t,s=i.memoizedProps,i=i.memoizedState,a=l.stateNode;try{var P=Ql(l.type,s);e=a.getSnapshotBeforeUpdate(P,i),a.__reactInternalSnapshotBeforeUpdate=e}catch(ue){Ae(l,l.return,ue)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)Pr(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Pr(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(o(163))}if(e=t.sibling,e!==null){e.return=t.return,Je=e;break}Je=t.return}}function pd(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:Wt(e,l),a&4&&un(5,l);break;case 1:if(Wt(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(c){Ae(l,l.return,c)}else{var s=Ql(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(c){Ae(l,l.return,c)}}a&64&&ud(l),a&512&&on(l,l.return);break;case 3:if(Wt(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{Iu(e,t)}catch(c){Ae(l,l.return,c)}}break;case 27:t===null&&a&4&&md(l);case 26:case 5:Wt(e,l),t===null&&a&4&&dd(l),a&512&&on(l,l.return);break;case 12:Wt(e,l);break;case 31:Wt(e,l),a&4&&yd(e,l);break;case 13:Wt(e,l),a&4&&gd(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Jx.bind(null,l),xp(e,l))));break;case 22:if(a=l.memoizedState!==null||Jt,!a){t=t!==null&&t.memoizedState!==null||Qe,s=Jt;var i=Qe;Jt=a,(Qe=t)&&!i?Ft(e,l,(l.subtreeFlags&8772)!==0):Wt(e,l),Jt=s,Qe=i}break;case 30:break;default:Wt(e,l)}}function vd(e){var t=e.alternate;t!==null&&(e.alternate=null,vd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ni(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 we=null,st=!1;function $t(e,t,l){for(l=l.child;l!==null;)hd(e,t,l),l=l.sibling}function hd(e,t,l){if(dt&&typeof dt.onCommitFiberUnmount=="function")try{dt.onCommitFiberUnmount(Oa,l)}catch{}switch(l.tag){case 26:Qe||Dt(l,t),$t(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Qe||Dt(l,t);var a=we,s=st;jl(l.type)&&(we=l.stateNode,st=!1),$t(e,t,l),gn(l.stateNode),we=a,st=s;break;case 5:Qe||Dt(l,t);case 6:if(a=we,s=st,we=null,$t(e,t,l),we=a,st=s,we!==null)if(st)try{(we.nodeType===9?we.body:we.nodeName==="HTML"?we.ownerDocument.body:we).removeChild(l.stateNode)}catch(i){Ae(l,t,i)}else try{we.removeChild(l.stateNode)}catch(i){Ae(l,t,i)}break;case 18:we!==null&&(st?(e=we,of(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),Ra(e)):of(we,l.stateNode));break;case 4:a=we,s=st,we=l.stateNode.containerInfo,st=!0,$t(e,t,l),we=a,st=s;break;case 0:case 11:case 14:case 15:xl(2,l,t),Qe||xl(4,l,t),$t(e,t,l);break;case 1:Qe||(Dt(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&od(l,t,a)),$t(e,t,l);break;case 21:$t(e,t,l);break;case 22:Qe=(a=Qe)||l.memoizedState!==null,$t(e,t,l),Qe=a;break;default:$t(e,t,l)}}function yd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ra(e)}catch(l){Ae(t,t.return,l)}}}function gd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ra(e)}catch(l){Ae(t,t.return,l)}}function qx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new xd),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new xd),t;default:throw Error(o(435,e.tag))}}function gs(e,t){var l=qx(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var s=$x.bind(null,e,a);a.then(s,s)}})}function it(e,t){var l=t.deletions;if(l!==null)for(var a=0;a<l.length;a++){var s=l[a],i=e,c=t,d=c;e:for(;d!==null;){switch(d.tag){case 27:if(jl(d.type)){we=d.stateNode,st=!1;break e}break;case 5:we=d.stateNode,st=!1;break e;case 3:case 4:we=d.stateNode.containerInfo,st=!0;break e}d=d.return}if(we===null)throw Error(o(160));hd(i,c,s),we=null,st=!1,i=s.alternate,i!==null&&(i.return=null),s.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)bd(t,e),t=t.sibling}var Rt=null;function bd(e,t){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:it(t,e),rt(e),a&4&&(xl(3,e,e.return),un(3,e),xl(5,e,e.return));break;case 1:it(t,e),rt(e),a&512&&(Qe||l===null||Dt(l,l.return)),a&64&&Jt&&(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 s=Rt;if(it(t,e),rt(e),a&512&&(Qe||l===null||Dt(l,l.return)),a&4){var i=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,s=s.ownerDocument||s;t:switch(a){case"title":i=s.getElementsByTagName("title")[0],(!i||i[La]||i[$e]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=s.createElement(a),s.head.insertBefore(i,s.querySelector("head > title"))),Pe(i,a,l),i[$e]=e,Ke(i),a=i;break e;case"link":var c=jf("link","href",s).get(a+(l.href||""));if(c){for(var d=0;d<c.length;d++)if(i=c[d],i.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&i.getAttribute("rel")===(l.rel==null?null:l.rel)&&i.getAttribute("title")===(l.title==null?null:l.title)&&i.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){c.splice(d,1);break t}}i=s.createElement(a),Pe(i,a,l),s.head.appendChild(i);break;case"meta":if(c=jf("meta","content",s).get(a+(l.content||""))){for(d=0;d<c.length;d++)if(i=c[d],i.getAttribute("content")===(l.content==null?null:""+l.content)&&i.getAttribute("name")===(l.name==null?null:l.name)&&i.getAttribute("property")===(l.property==null?null:l.property)&&i.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&i.getAttribute("charset")===(l.charSet==null?null:l.charSet)){c.splice(d,1);break t}}i=s.createElement(a),Pe(i,a,l),s.head.appendChild(i);break;default:throw Error(o(468,a))}i[$e]=e,Ke(i),a=i}e.stateNode=a}else Sf(s,e.type,e.stateNode);else e.stateNode=bf(s,a,e.memoizedProps);else i!==a?(i===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):i.count--,a===null?Sf(s,e.type,e.stateNode):bf(s,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Tr(e,e.memoizedProps,l.memoizedProps)}break;case 27:it(t,e),rt(e),a&512&&(Qe||l===null||Dt(l,l.return)),l!==null&&a&4&&Tr(e,e.memoizedProps,l.memoizedProps);break;case 5:if(it(t,e),rt(e),a&512&&(Qe||l===null||Dt(l,l.return)),e.flags&32){s=e.stateNode;try{ea(s,"")}catch(P){Ae(e,e.return,P)}}a&4&&e.stateNode!=null&&(s=e.memoizedProps,Tr(e,s,l!==null?l.memoizedProps:s)),a&1024&&(_r=!0);break;case 6:if(it(t,e),rt(e),a&4){if(e.stateNode===null)throw Error(o(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(P){Ae(e,e.return,P)}}break;case 3:if(Ds=null,s=Rt,Rt=Os(t.containerInfo),it(t,e),Rt=s,rt(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{Ra(t.containerInfo)}catch(P){Ae(e,e.return,P)}_r&&(_r=!1,jd(e));break;case 4:a=Rt,Rt=Os(e.stateNode.containerInfo),it(t,e),rt(e),Rt=a;break;case 12:it(t,e),rt(e);break;case 31:it(t,e),rt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,gs(e,a)));break;case 13:it(t,e),rt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(js=ot()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,gs(e,a)));break;case 22:s=e.memoizedState!==null;var y=l!==null&&l.memoizedState!==null,_=Jt,w=Qe;if(Jt=_||s,Qe=w||y,it(t,e),Qe=w,Jt=_,rt(e),a&8192)e:for(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,s&&(l===null||y||Jt||Qe||Xl(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){y=l=t;try{if(i=y.stateNode,s)c=i.style,typeof c.setProperty=="function"?c.setProperty("display","none","important"):c.display="none";else{d=y.stateNode;var H=y.memoizedProps.style,k=H!=null&&H.hasOwnProperty("display")?H.display:null;d.style.display=k==null||typeof k=="boolean"?"":(""+k).trim()}}catch(P){Ae(y,y.return,P)}}}else if(t.tag===6){if(l===null){y=t;try{y.stateNode.nodeValue=s?"":y.memoizedProps}catch(P){Ae(y,y.return,P)}}}else if(t.tag===18){if(l===null){y=t;try{var z=y.stateNode;s?df(z,!0):df(y.stateNode,!1)}catch(P){Ae(y,y.return,P)}}}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,gs(e,l))));break;case 19:it(t,e),rt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,gs(e,a)));break;case 30:break;case 21:break;default:it(t,e),rt(e)}}function rt(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(fd(a)){l=a;break}a=a.return}if(l==null)throw Error(o(160));switch(l.tag){case 27:var s=l.stateNode,i=Cr(e);ys(e,i,s);break;case 5:var c=l.stateNode;l.flags&32&&(ea(c,""),l.flags&=-33);var d=Cr(e);ys(e,d,c);break;case 3:case 4:var y=l.stateNode.containerInfo,_=Cr(e);Ar(e,_,y);break;default:throw Error(o(161))}}catch(w){Ae(e,e.return,w)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function jd(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;jd(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Wt(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)pd(e,t.alternate,t),t=t.sibling}function Xl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:xl(4,t,t.return),Xl(t);break;case 1:Dt(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&od(t,t.return,l),Xl(t);break;case 27:gn(t.stateNode);case 26:case 5:Dt(t,t.return),Xl(t);break;case 22:t.memoizedState===null&&Xl(t);break;case 30:Xl(t);break;default:Xl(t)}e=e.sibling}}function Ft(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,s=e,i=t,c=i.flags;switch(i.tag){case 0:case 11:case 15:Ft(s,i,l),un(4,i);break;case 1:if(Ft(s,i,l),a=i,s=a.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(_){Ae(a,a.return,_)}if(a=i,s=a.updateQueue,s!==null){var d=a.stateNode;try{var y=s.shared.hiddenCallbacks;if(y!==null)for(s.shared.hiddenCallbacks=null,s=0;s<y.length;s++)Fu(y[s],d)}catch(_){Ae(a,a.return,_)}}l&&c&64&&ud(i),on(i,i.return);break;case 27:md(i);case 26:case 5:Ft(s,i,l),l&&a===null&&c&4&&dd(i),on(i,i.return);break;case 12:Ft(s,i,l);break;case 31:Ft(s,i,l),l&&c&4&&yd(s,i);break;case 13:Ft(s,i,l),l&&c&4&&gd(s,i);break;case 22:i.memoizedState===null&&Ft(s,i,l),on(i,i.return);break;case 30:break;default:Ft(s,i,l)}t=t.sibling}}function kr(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&&$a(l))}function Mr(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&$a(e))}function zt(e,t,l,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Sd(e,t,l,a),t=t.sibling}function Sd(e,t,l,a){var s=t.flags;switch(t.tag){case 0:case 11:case 15:zt(e,t,l,a),s&2048&&un(9,t);break;case 1:zt(e,t,l,a);break;case 3:zt(e,t,l,a),s&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&$a(e)));break;case 12:if(s&2048){zt(e,t,l,a),e=t.stateNode;try{var i=t.memoizedProps,c=i.id,d=i.onPostCommit;typeof d=="function"&&d(c,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(y){Ae(t,t.return,y)}}else zt(e,t,l,a);break;case 31:zt(e,t,l,a);break;case 13:zt(e,t,l,a);break;case 23:break;case 22:i=t.stateNode,c=t.alternate,t.memoizedState!==null?i._visibility&2?zt(e,t,l,a):dn(e,t):i._visibility&2?zt(e,t,l,a):(i._visibility|=2,ba(e,t,l,a,(t.subtreeFlags&10256)!==0||!1)),s&2048&&kr(c,t);break;case 24:zt(e,t,l,a),s&2048&&Mr(t.alternate,t);break;default:zt(e,t,l,a)}}function ba(e,t,l,a,s){for(s=s&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,c=t,d=l,y=a,_=c.flags;switch(c.tag){case 0:case 11:case 15:ba(i,c,d,y,s),un(8,c);break;case 23:break;case 22:var w=c.stateNode;c.memoizedState!==null?w._visibility&2?ba(i,c,d,y,s):dn(i,c):(w._visibility|=2,ba(i,c,d,y,s)),s&&_&2048&&kr(c.alternate,c);break;case 24:ba(i,c,d,y,s),s&&_&2048&&Mr(c.alternate,c);break;default:ba(i,c,d,y,s)}t=t.sibling}}function dn(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,a=t,s=a.flags;switch(a.tag){case 22:dn(l,a),s&2048&&kr(a.alternate,a);break;case 24:dn(l,a),s&2048&&Mr(a.alternate,a);break;default:dn(l,a)}t=t.sibling}}var fn=8192;function ja(e,t,l){if(e.subtreeFlags&fn)for(e=e.child;e!==null;)Nd(e,t,l),e=e.sibling}function Nd(e,t,l){switch(e.tag){case 26:ja(e,t,l),e.flags&fn&&e.memoizedState!==null&&Cp(l,Rt,e.memoizedState,e.memoizedProps);break;case 5:ja(e,t,l);break;case 3:case 4:var a=Rt;Rt=Os(e.stateNode.containerInfo),ja(e,t,l),Rt=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=fn,fn=16777216,ja(e,t,l),fn=a):ja(e,t,l));break;default:ja(e,t,l)}}function Ed(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 mn(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];Je=a,Cd(a,e)}Ed(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Td(e),e=e.sibling}function Td(e){switch(e.tag){case 0:case 11:case 15:mn(e),e.flags&2048&&xl(9,e,e.return);break;case 3:mn(e);break;case 12:mn(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,bs(e)):mn(e);break;default:mn(e)}}function bs(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];Je=a,Cd(a,e)}Ed(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:xl(8,t,t.return),bs(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,bs(t));break;default:bs(t)}e=e.sibling}}function Cd(e,t){for(;Je!==null;){var l=Je;switch(l.tag){case 0:case 11:case 15:xl(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:$a(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,Je=a;else e:for(l=e;Je!==null;){a=Je;var s=a.sibling,i=a.return;if(vd(a),a===l){Je=null;break e}if(s!==null){s.return=i,Je=s;break e}Je=i}}}var Yx={getCacheForType:function(e){var t=Fe(Ye),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return Fe(Ye).controller.signal}},Gx=typeof WeakMap=="function"?WeakMap:Map,Te=0,Re=null,he=null,ge=0,Ce=0,ht=null,pl=!1,Sa=!1,Rr=!1,It=0,Le=0,vl=0,Zl=0,zr=0,yt=0,Na=0,xn=null,ct=null,Or=!1,js=0,Ad=0,Ss=1/0,Ns=null,hl=null,Xe=0,yl=null,Ea=null,Pt=0,wr=0,Dr=null,_d=null,pn=0,Lr=null;function gt(){return(Te&2)!==0&&ge!==0?ge&-ge:R.T!==null?Gr():Vc()}function kd(){if(yt===0)if((ge&536870912)===0||je){var e=Rn;Rn<<=1,(Rn&3932160)===0&&(Rn=262144),yt=e}else yt=536870912;return e=pt.current,e!==null&&(e.flags|=32),yt}function ut(e,t,l){(e===Re&&(Ce===2||Ce===9)||e.cancelPendingCommit!==null)&&(Ta(e,0),gl(e,ge,yt,!1)),Da(e,l),((Te&2)===0||e!==Re)&&(e===Re&&((Te&2)===0&&(Zl|=l),Le===4&&gl(e,ge,yt,!1)),Lt(e))}function Md(e,t,l){if((Te&6)!==0)throw Error(o(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||wa(e,t),s=a?Xx(e,t):Ur(e,t,!0),i=a;do{if(s===0){Sa&&!a&&gl(e,t,0,!1);break}else{if(l=e.current.alternate,i&&!Vx(l)){s=Ur(e,t,!1),i=!1;continue}if(s===2){if(i=t,e.errorRecoveryDisabledLanes&i)var c=0;else c=e.pendingLanes&-536870913,c=c!==0?c:c&536870912?536870912:0;if(c!==0){t=c;e:{var d=e;s=xn;var y=d.current.memoizedState.isDehydrated;if(y&&(Ta(d,c).flags|=256),c=Ur(d,c,!1),c!==2){if(Rr&&!y){d.errorRecoveryDisabledLanes|=i,Zl|=i,s=4;break e}i=ct,ct=s,i!==null&&(ct===null?ct=i:ct.push.apply(ct,i))}s=c}if(i=!1,s!==2)continue}}if(s===1){Ta(e,0),gl(e,t,0,!0);break}e:{switch(a=e,i=s,i){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:gl(a,t,yt,!pl);break e;case 2:ct=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(s=js+300-ot(),10<s)){if(gl(a,t,yt,!pl),On(a,0,!0)!==0)break e;Pt=t,a.timeoutHandle=cf(Rd.bind(null,a,l,ct,Ns,Or,t,yt,Zl,Na,pl,i,"Throttled",-0,0),s);break e}Rd(a,l,ct,Ns,Or,t,yt,Zl,Na,pl,i,null,-0,0)}}break}while(!0);Lt(e)}function Rd(e,t,l,a,s,i,c,d,y,_,w,H,k,z){if(e.timeoutHandle=-1,H=t.subtreeFlags,H&8192||(H&16785408)===16785408){H={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ut},Nd(t,i,H);var P=(i&62914560)===i?js-ot():(i&4194048)===i?Ad-ot():0;if(P=Ap(H,P),P!==null){Pt=i,e.cancelPendingCommit=P(Hd.bind(null,e,t,i,l,a,s,c,d,y,w,H,null,k,z)),gl(e,i,c,!_);return}}Hd(e,t,i,l,a,s,c,d,y)}function Vx(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 s=l[a],i=s.getSnapshot;s=s.value;try{if(!mt(i(),s))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 gl(e,t,l,a){t&=~zr,t&=~Zl,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var s=t;0<s;){var i=31-ft(s),c=1<<i;a[i]=-1,s&=~c}l!==0&&qc(e,l,t)}function Es(){return(Te&6)===0?(vn(0),!1):!0}function Br(){if(he!==null){if(Ce===0)var e=he.return;else e=he,Gt=Bl=null,Pi(e),pa=null,Fa=0,e=he;for(;e!==null;)cd(e.alternate,e),e=e.return;he=null}}function Ta(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,up(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),Pt=0,Br(),Re=e,he=l=qt(e.current,null),ge=t,Ce=0,ht=null,pl=!1,Sa=wa(e,t),Rr=!1,Na=yt=zr=Zl=vl=Le=0,ct=xn=null,Or=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var s=31-ft(a),i=1<<s;t|=e[s],a&=~i}return It=t,Xn(),l}function zd(e,t){de=null,R.H=sn,t===xa||t===Pn?(t=Ku(),Ce=3):t===Yi?(t=Ku(),Ce=4):Ce=t===pr?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,ht=t,he===null&&(Le=1,ms(e,Nt(t,e.current)))}function Od(){var e=pt.current;return e===null?!0:(ge&4194048)===ge?At===null:(ge&62914560)===ge||(ge&536870912)!==0?e===At:!1}function wd(){var e=R.H;return R.H=sn,e===null?sn:e}function Dd(){var e=R.A;return R.A=Yx,e}function Ts(){Le=4,pl||(ge&4194048)!==ge&&pt.current!==null||(Sa=!0),(vl&134217727)===0&&(Zl&134217727)===0||Re===null||gl(Re,ge,yt,!1)}function Ur(e,t,l){var a=Te;Te|=2;var s=wd(),i=Dd();(Re!==e||ge!==t)&&(Ns=null,Ta(e,t)),t=!1;var c=Le;e:do try{if(Ce!==0&&he!==null){var d=he,y=ht;switch(Ce){case 8:Br(),c=6;break e;case 3:case 2:case 9:case 6:pt.current===null&&(t=!0);var _=Ce;if(Ce=0,ht=null,Ca(e,d,y,_),l&&Sa){c=0;break e}break;default:_=Ce,Ce=0,ht=null,Ca(e,d,y,_)}}Qx(),c=Le;break}catch(w){zd(e,w)}while(!0);return t&&e.shellSuspendCounter++,Gt=Bl=null,Te=a,R.H=s,R.A=i,he===null&&(Re=null,ge=0,Xn()),c}function Qx(){for(;he!==null;)Ld(he)}function Xx(e,t){var l=Te;Te|=2;var a=wd(),s=Dd();Re!==e||ge!==t?(Ns=null,Ss=ot()+500,Ta(e,t)):Sa=wa(e,t);e:do try{if(Ce!==0&&he!==null){t=he;var i=ht;t:switch(Ce){case 1:Ce=0,ht=null,Ca(e,t,i,1);break;case 2:case 9:if(Xu(i)){Ce=0,ht=null,Bd(t);break}t=function(){Ce!==2&&Ce!==9||Re!==e||(Ce=7),Lt(e)},i.then(t,t);break e;case 3:Ce=7;break e;case 4:Ce=5;break e;case 7:Xu(i)?(Ce=0,ht=null,Bd(t)):(Ce=0,ht=null,Ca(e,t,i,7));break;case 5:var c=null;switch(he.tag){case 26:c=he.memoizedState;case 5:case 27:var d=he;if(c?Nf(c):d.stateNode.complete){Ce=0,ht=null;var y=d.sibling;if(y!==null)he=y;else{var _=d.return;_!==null?(he=_,Cs(_)):he=null}break t}}Ce=0,ht=null,Ca(e,t,i,5);break;case 6:Ce=0,ht=null,Ca(e,t,i,6);break;case 8:Br(),Le=6;break e;default:throw Error(o(462))}}Zx();break}catch(w){zd(e,w)}while(!0);return Gt=Bl=null,R.H=a,R.A=s,Te=l,he!==null?0:(Re=null,ge=0,Xn(),Le)}function Zx(){for(;he!==null&&!pm();)Ld(he)}function Ld(e){var t=id(e.alternate,e,It);e.memoizedProps=e.pendingProps,t===null?Cs(e):he=t}function Bd(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=ed(l,t,t.pendingProps,t.type,void 0,ge);break;case 11:t=ed(l,t,t.pendingProps,t.type.render,t.ref,ge);break;case 5:Pi(t);default:cd(l,t),t=he=wu(t,It),t=id(l,t,It)}e.memoizedProps=e.pendingProps,t===null?Cs(e):he=t}function Ca(e,t,l,a){Gt=Bl=null,Pi(t),pa=null,Fa=0;var s=t.return;try{if(wx(e,s,t,l,ge)){Le=1,ms(e,Nt(l,e.current)),he=null;return}}catch(i){if(s!==null)throw he=s,i;Le=1,ms(e,Nt(l,e.current)),he=null;return}t.flags&32768?(je||a===1?e=!0:Sa||(ge&536870912)!==0?e=!1:(pl=e=!0,(a===2||a===9||a===3||a===6)&&(a=pt.current,a!==null&&a.tag===13&&(a.flags|=16384))),Ud(t,e)):Cs(t)}function Cs(e){var t=e;do{if((t.flags&32768)!==0){Ud(t,pl);return}e=t.return;var l=Bx(t.alternate,t,It);if(l!==null){he=l;return}if(t=t.sibling,t!==null){he=t;return}he=t=e}while(t!==null);Le===0&&(Le=5)}function Ud(e,t){do{var l=Ux(e.alternate,e);if(l!==null){l.flags&=32767,he=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){he=e;return}he=e=l}while(e!==null);Le=6,he=null}function Hd(e,t,l,a,s,i,c,d,y){e.cancelPendingCommit=null;do As();while(Xe!==0);if((Te&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(i=t.lanes|t.childLanes,i|=Ci,Tm(e,l,i,c,d,y),e===Re&&(he=Re=null,ge=0),Ea=t,yl=e,Pt=l,wr=i,Dr=s,_d=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Wx(kn,function(){return Qd(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=R.T,R.T=null,s=O.p,O.p=2,c=Te,Te|=4;try{Hx(e,t,l)}finally{Te=c,O.p=s,R.T=a}}Xe=1,qd(),Yd(),Gd()}}function qd(){if(Xe===1){Xe=0;var e=yl,t=Ea,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=R.T,R.T=null;var a=O.p;O.p=2;var s=Te;Te|=4;try{bd(t,e);var i=Wr,c=Tu(e.containerInfo),d=i.focusedElem,y=i.selectionRange;if(c!==d&&d&&d.ownerDocument&&Eu(d.ownerDocument.documentElement,d)){if(y!==null&&ji(d)){var _=y.start,w=y.end;if(w===void 0&&(w=_),"selectionStart"in d)d.selectionStart=_,d.selectionEnd=Math.min(w,d.value.length);else{var H=d.ownerDocument||document,k=H&&H.defaultView||window;if(k.getSelection){var z=k.getSelection(),P=d.textContent.length,ue=Math.min(y.start,P),Me=y.end===void 0?ue:Math.min(y.end,P);!z.extend&&ue>Me&&(c=Me,Me=ue,ue=c);var C=Nu(d,ue),S=Nu(d,Me);if(C&&S&&(z.rangeCount!==1||z.anchorNode!==C.node||z.anchorOffset!==C.offset||z.focusNode!==S.node||z.focusOffset!==S.offset)){var A=H.createRange();A.setStart(C.node,C.offset),z.removeAllRanges(),ue>Me?(z.addRange(A),z.extend(S.node,S.offset)):(A.setEnd(S.node,S.offset),z.addRange(A))}}}}for(H=[],z=d;z=z.parentNode;)z.nodeType===1&&H.push({element:z,left:z.scrollLeft,top:z.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d<H.length;d++){var U=H[d];U.element.scrollLeft=U.left,U.element.scrollTop=U.top}}Hs=!!$r,Wr=$r=null}finally{Te=s,O.p=a,R.T=l}}e.current=t,Xe=2}}function Yd(){if(Xe===2){Xe=0;var e=yl,t=Ea,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=R.T,R.T=null;var a=O.p;O.p=2;var s=Te;Te|=4;try{pd(e,t.alternate,t)}finally{Te=s,O.p=a,R.T=l}}Xe=3}}function Gd(){if(Xe===4||Xe===3){Xe=0,vm();var e=yl,t=Ea,l=Pt,a=_d;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Xe=5:(Xe=0,Ea=yl=null,Vd(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(hl=null),li(l),t=t.stateNode,dt&&typeof dt.onCommitFiberRoot=="function")try{dt.onCommitFiberRoot(Oa,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=R.T,s=O.p,O.p=2,R.T=null;try{for(var i=e.onRecoverableError,c=0;c<a.length;c++){var d=a[c];i(d.value,{componentStack:d.stack})}}finally{R.T=t,O.p=s}}(Pt&3)!==0&&As(),Lt(e),s=e.pendingLanes,(l&261930)!==0&&(s&42)!==0?e===Lr?pn++:(pn=0,Lr=e):pn=0,vn(0)}}function Vd(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,$a(t)))}function As(){return qd(),Yd(),Gd(),Qd()}function Qd(){if(Xe!==5)return!1;var e=yl,t=wr;wr=0;var l=li(Pt),a=R.T,s=O.p;try{O.p=32>l?32:l,R.T=null,l=Dr,Dr=null;var i=yl,c=Pt;if(Xe=0,Ea=yl=null,Pt=0,(Te&6)!==0)throw Error(o(331));var d=Te;if(Te|=4,Td(i.current),Sd(i,i.current,c,l),Te=d,vn(0,!1),dt&&typeof dt.onPostCommitFiberRoot=="function")try{dt.onPostCommitFiberRoot(Oa,i)}catch{}return!0}finally{O.p=s,R.T=a,Vd(e,t)}}function Xd(e,t,l){t=Nt(l,t),t=xr(e.stateNode,t,2),e=dl(e,t,2),e!==null&&(Da(e,2),Lt(e))}function Ae(e,t,l){if(e.tag===3)Xd(e,e,l);else for(;t!==null;){if(t.tag===3){Xd(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(hl===null||!hl.has(a))){e=Nt(l,e),l=Zo(2),a=dl(t,l,2),a!==null&&(Ko(l,a,t,e),Da(a,2),Lt(a));break}}t=t.return}}function Hr(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new Gx;var s=new Set;a.set(t,s)}else s=a.get(t),s===void 0&&(s=new Set,a.set(t,s));s.has(l)||(Rr=!0,s.add(l),e=Kx.bind(null,e,t,l),t.then(e,e))}function Kx(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Re===e&&(ge&l)===l&&(Le===4||Le===3&&(ge&62914560)===ge&&300>ot()-js?(Te&2)===0&&Ta(e,0):zr|=l,Na===ge&&(Na=0)),Lt(e)}function Zd(e,t){t===0&&(t=Hc()),e=wl(e,t),e!==null&&(Da(e,t),Lt(e))}function Jx(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),Zd(e,l)}function $x(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,s=e.memoizedState;s!==null&&(l=s.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(o(314))}a!==null&&a.delete(t),Zd(e,l)}function Wx(e,t){return Is(e,t)}var _s=null,Aa=null,qr=!1,ks=!1,Yr=!1,bl=0;function Lt(e){e!==Aa&&e.next===null&&(Aa===null?_s=Aa=e:Aa=Aa.next=e),ks=!0,qr||(qr=!0,Ix())}function vn(e,t){if(!Yr&&ks){Yr=!0;do for(var l=!1,a=_s;a!==null;){if(e!==0){var s=a.pendingLanes;if(s===0)var i=0;else{var c=a.suspendedLanes,d=a.pingedLanes;i=(1<<31-ft(42|e)+1)-1,i&=s&~(c&~d),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(l=!0,Wd(a,i))}else i=ge,i=On(a,a===Re?i:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(i&3)===0||wa(a,i)||(l=!0,Wd(a,i));a=a.next}while(l);Yr=!1}}function Fx(){Kd()}function Kd(){ks=qr=!1;var e=0;bl!==0&&cp()&&(e=bl);for(var t=ot(),l=null,a=_s;a!==null;){var s=a.next,i=Jd(a,t);i===0?(a.next=null,l===null?_s=s:l.next=s,s===null&&(Aa=l)):(l=a,(e!==0||(i&3)!==0)&&(ks=!0)),a=s}Xe!==0&&Xe!==5||vn(e),bl!==0&&(bl=0)}function Jd(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var c=31-ft(i),d=1<<c,y=s[c];y===-1?((d&l)===0||(d&a)!==0)&&(s[c]=Em(d,t)):y<=t&&(e.expiredLanes|=d),i&=~d}if(t=Re,l=ge,l=On(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(Ce===2||Ce===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Ps(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||wa(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&Ps(a),li(l)){case 2:case 8:l=Bc;break;case 32:l=kn;break;case 268435456:l=Uc;break;default:l=kn}return a=$d.bind(null,e),l=Is(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&Ps(a),e.callbackPriority=2,e.callbackNode=null,2}function $d(e,t){if(Xe!==0&&Xe!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(As()&&e.callbackNode!==l)return null;var a=ge;return a=On(e,e===Re?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Md(e,a,t),Jd(e,ot()),e.callbackNode!=null&&e.callbackNode===l?$d.bind(null,e):null)}function Wd(e,t){if(As())return null;Md(e,t,!0)}function Ix(){op(function(){(Te&6)!==0?Is(Lc,Fx):Kd()})}function Gr(){if(bl===0){var e=fa;e===0&&(e=Mn,Mn<<=1,(Mn&261888)===0&&(Mn=256)),bl=e}return bl}function Fd(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Bn(""+e)}function Id(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 Px(e,t,l,a,s){if(t==="submit"&&l&&l.stateNode===s){var i=Fd((s[at]||null).action),c=a.submitter;c&&(t=(t=c[at]||null)?Fd(t.formAction):c.getAttribute("formAction"),t!==null&&(i=t,c=null));var d=new Yn("action","action",null,a,s);e.push({event:d,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(bl!==0){var y=c?Id(s,c):new FormData(s);cr(l,{pending:!0,data:y,method:s.method,action:i},null,y)}}else typeof i=="function"&&(d.preventDefault(),y=c?Id(s,c):new FormData(s),cr(l,{pending:!0,data:y,method:s.method,action:i},i,y))},currentTarget:s}]})}}for(var Vr=0;Vr<Ti.length;Vr++){var Qr=Ti[Vr],ep=Qr.toLowerCase(),tp=Qr[0].toUpperCase()+Qr.slice(1);Mt(ep,"on"+tp)}Mt(_u,"onAnimationEnd"),Mt(ku,"onAnimationIteration"),Mt(Mu,"onAnimationStart"),Mt("dblclick","onDoubleClick"),Mt("focusin","onFocus"),Mt("focusout","onBlur"),Mt(hx,"onTransitionRun"),Mt(yx,"onTransitionStart"),Mt(gx,"onTransitionCancel"),Mt(Ru,"onTransitionEnd"),Il("onMouseEnter",["mouseout","mouseover"]),Il("onMouseLeave",["mouseout","mouseover"]),Il("onPointerEnter",["pointerout","pointerover"]),Il("onPointerLeave",["pointerout","pointerover"]),Ml("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ml("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ml("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ml("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ml("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ml("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var hn="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(" "),lp=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(hn));function Pd(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],s=a.event;a=a.listeners;e:{var i=void 0;if(t)for(var c=a.length-1;0<=c;c--){var d=a[c],y=d.instance,_=d.currentTarget;if(d=d.listener,y!==i&&s.isPropagationStopped())break e;i=d,s.currentTarget=_;try{i(s)}catch(w){Qn(w)}s.currentTarget=null,i=y}else for(c=0;c<a.length;c++){if(d=a[c],y=d.instance,_=d.currentTarget,d=d.listener,y!==i&&s.isPropagationStopped())break e;i=d,s.currentTarget=_;try{i(s)}catch(w){Qn(w)}s.currentTarget=null,i=y}}}}function ye(e,t){var l=t[ai];l===void 0&&(l=t[ai]=new Set);var a=e+"__bubble";l.has(a)||(ef(t,e,2,!1),l.add(a))}function Xr(e,t,l){var a=0;t&&(a|=4),ef(l,e,a,t)}var Ms="_reactListening"+Math.random().toString(36).slice(2);function Zr(e){if(!e[Ms]){e[Ms]=!0,Zc.forEach(function(l){l!=="selectionchange"&&(lp.has(l)||Xr(l,!1,e),Xr(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ms]||(t[Ms]=!0,Xr("selectionchange",!1,t))}}function ef(e,t,l,a){switch(Mf(t)){case 2:var s=Mp;break;case 8:s=Rp;break;default:s=rc}l=s.bind(null,t,l,e),s=void 0,!fi||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),a?s!==void 0?e.addEventListener(t,l,{capture:!0,passive:s}):e.addEventListener(t,l,!0):s!==void 0?e.addEventListener(t,l,{passive:s}):e.addEventListener(t,l,!1)}function Kr(e,t,l,a,s){var i=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var c=a.tag;if(c===3||c===4){var d=a.stateNode.containerInfo;if(d===s)break;if(c===4)for(c=a.return;c!==null;){var y=c.tag;if((y===3||y===4)&&c.stateNode.containerInfo===s)return;c=c.return}for(;d!==null;){if(c=$l(d),c===null)return;if(y=c.tag,y===5||y===6||y===26||y===27){a=i=c;continue e}d=d.parentNode}}a=a.return}nu(function(){var _=i,w=oi(l),H=[];e:{var k=zu.get(e);if(k!==void 0){var z=Yn,P=e;switch(e){case"keypress":if(Hn(l)===0)break e;case"keydown":case"keyup":z=$m;break;case"focusin":P="focus",z=vi;break;case"focusout":P="blur",z=vi;break;case"beforeblur":case"afterblur":z=vi;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=ru;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":z=Bm;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":z=Im;break;case _u:case ku:case Mu:z=qm;break;case Ru:z=ex;break;case"scroll":case"scrollend":z=Dm;break;case"wheel":z=lx;break;case"copy":case"cut":case"paste":z=Gm;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":z=uu;break;case"toggle":case"beforetoggle":z=nx}var ue=(t&4)!==0,Me=!ue&&(e==="scroll"||e==="scrollend"),C=ue?k!==null?k+"Capture":null:k;ue=[];for(var S=_,A;S!==null;){var U=S;if(A=U.stateNode,U=U.tag,U!==5&&U!==26&&U!==27||A===null||C===null||(U=Ua(S,C),U!=null&&ue.push(yn(S,U,A))),Me)break;S=S.return}0<ue.length&&(k=new z(k,P,null,l,w),H.push({event:k,listeners:ue}))}}if((t&7)===0){e:{if(k=e==="mouseover"||e==="pointerover",z=e==="mouseout"||e==="pointerout",k&&l!==ui&&(P=l.relatedTarget||l.fromElement)&&($l(P)||P[Jl]))break e;if((z||k)&&(k=w.window===w?w:(k=w.ownerDocument)?k.defaultView||k.parentWindow:window,z?(P=l.relatedTarget||l.toElement,z=_,P=P?$l(P):null,P!==null&&(Me=h(P),ue=P.tag,P!==Me||ue!==5&&ue!==27&&ue!==6)&&(P=null)):(z=null,P=_),z!==P)){if(ue=ru,U="onMouseLeave",C="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(ue=uu,U="onPointerLeave",C="onPointerEnter",S="pointer"),Me=z==null?k:Ba(z),A=P==null?k:Ba(P),k=new ue(U,S+"leave",z,l,w),k.target=Me,k.relatedTarget=A,U=null,$l(w)===_&&(ue=new ue(C,S+"enter",P,l,w),ue.target=A,ue.relatedTarget=Me,U=ue),Me=U,z&&P)t:{for(ue=ap,C=z,S=P,A=0,U=C;U;U=ue(U))A++;U=0;for(var ie=S;ie;ie=ue(ie))U++;for(;0<A-U;)C=ue(C),A--;for(;0<U-A;)S=ue(S),U--;for(;A--;){if(C===S||S!==null&&C===S.alternate){ue=C;break t}C=ue(C),S=ue(S)}ue=null}else ue=null;z!==null&&tf(H,k,z,ue,!1),P!==null&&Me!==null&&tf(H,Me,P,ue,!0)}}e:{if(k=_?Ba(_):window,z=k.nodeName&&k.nodeName.toLowerCase(),z==="select"||z==="input"&&k.type==="file")var Ne=hu;else if(pu(k))if(yu)Ne=xx;else{Ne=fx;var ne=dx}else z=k.nodeName,!z||z.toLowerCase()!=="input"||k.type!=="checkbox"&&k.type!=="radio"?_&&ci(_.elementType)&&(Ne=hu):Ne=mx;if(Ne&&(Ne=Ne(e,_))){vu(H,Ne,l,w);break e}ne&&ne(e,k,_),e==="focusout"&&_&&k.type==="number"&&_.memoizedProps.value!=null&&ri(k,"number",k.value)}switch(ne=_?Ba(_):window,e){case"focusin":(pu(ne)||ne.contentEditable==="true")&&(na=ne,Si=_,Za=null);break;case"focusout":Za=Si=na=null;break;case"mousedown":Ni=!0;break;case"contextmenu":case"mouseup":case"dragend":Ni=!1,Cu(H,l,w);break;case"selectionchange":if(vx)break;case"keydown":case"keyup":Cu(H,l,w)}var me;if(yi)e:{switch(e){case"compositionstart":var be="onCompositionStart";break e;case"compositionend":be="onCompositionEnd";break e;case"compositionupdate":be="onCompositionUpdate";break e}be=void 0}else aa?mu(e,l)&&(be="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(be="onCompositionStart");be&&(ou&&l.locale!=="ko"&&(aa||be!=="onCompositionStart"?be==="onCompositionEnd"&&aa&&(me=su()):(nl=w,mi="value"in nl?nl.value:nl.textContent,aa=!0)),ne=Rs(_,be),0<ne.length&&(be=new cu(be,e,null,l,w),H.push({event:be,listeners:ne}),me?be.data=me:(me=xu(l),me!==null&&(be.data=me)))),(me=ix?rx(e,l):cx(e,l))&&(be=Rs(_,"onBeforeInput"),0<be.length&&(ne=new cu("onBeforeInput","beforeinput",null,l,w),H.push({event:ne,listeners:be}),ne.data=me)),Px(H,e,_,l,w)}Pd(H,t)})}function yn(e,t,l){return{instance:e,listener:t,currentTarget:l}}function Rs(e,t){for(var l=t+"Capture",a=[];e!==null;){var s=e,i=s.stateNode;if(s=s.tag,s!==5&&s!==26&&s!==27||i===null||(s=Ua(e,l),s!=null&&a.unshift(yn(e,s,i)),s=Ua(e,t),s!=null&&a.push(yn(e,s,i))),e.tag===3)return a;e=e.return}return[]}function ap(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function tf(e,t,l,a,s){for(var i=t._reactName,c=[];l!==null&&l!==a;){var d=l,y=d.alternate,_=d.stateNode;if(d=d.tag,y!==null&&y===a)break;d!==5&&d!==26&&d!==27||_===null||(y=_,s?(_=Ua(l,i),_!=null&&c.unshift(yn(l,_,y))):s||(_=Ua(l,i),_!=null&&c.push(yn(l,_,y)))),l=l.return}c.length!==0&&e.push({event:t,listeners:c})}var np=/\r\n?/g,sp=/\u0000|\uFFFD/g;function lf(e){return(typeof e=="string"?e:""+e).replace(np,`
49
+ `).replace(sp,"")}function af(e,t){return t=lf(t),lf(e)===t}function ke(e,t,l,a,s,i){switch(l){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||ea(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&ea(e,""+a);break;case"className":Dn(e,"class",a);break;case"tabIndex":Dn(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Dn(e,l,a);break;case"style":lu(e,a,i);break;case"data":if(t!=="object"){Dn(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=Bn(""+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 i=="function"&&(l==="formAction"?(t!=="input"&&ke(e,t,"name",s.name,s,null),ke(e,t,"formEncType",s.formEncType,s,null),ke(e,t,"formMethod",s.formMethod,s,null),ke(e,t,"formTarget",s.formTarget,s,null)):(ke(e,t,"encType",s.encType,s,null),ke(e,t,"method",s.method,s,null),ke(e,t,"target",s.target,s,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=Bn(""+a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=Ut);break;case"onScroll":a!=null&&ye("scroll",e);break;case"onScrollEnd":a!=null&&ye("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(o(61));if(l=a.__html,l!=null){if(s.children!=null)throw Error(o(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=Bn(""+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":ye("beforetoggle",e),ye("toggle",e),wn(e,"popover",a);break;case"xlinkActuate":Bt(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Bt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Bt(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Bt(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Bt(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Bt(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Bt(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Bt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Bt(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":wn(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=Om.get(l)||l,wn(e,l,a))}}function Jr(e,t,l,a,s,i){switch(l){case"style":lu(e,a,i);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(o(61));if(l=a.__html,l!=null){if(s.children!=null)throw Error(o(60));e.innerHTML=l}}break;case"children":typeof a=="string"?ea(e,a):(typeof a=="number"||typeof a=="bigint")&&ea(e,""+a);break;case"onScroll":a!=null&&ye("scroll",e);break;case"onScrollEnd":a!=null&&ye("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Ut);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Kc.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(s=l.endsWith("Capture"),t=l.slice(2,s?l.length-7:void 0),i=e[at]||null,i=i!=null?i[l]:null,typeof i=="function"&&e.removeEventListener(t,i,s),typeof a=="function")){typeof i!="function"&&i!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,a,s);break e}l in e?e[l]=a:a===!0?e.setAttribute(l,""):wn(e,l,a)}}}function Pe(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ye("error",e),ye("load",e);var a=!1,s=!1,i;for(i in l)if(l.hasOwnProperty(i)){var c=l[i];if(c!=null)switch(i){case"src":a=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:ke(e,t,i,c,l,null)}}s&&ke(e,t,"srcSet",l.srcSet,l,null),a&&ke(e,t,"src",l.src,l,null);return;case"input":ye("invalid",e);var d=i=c=s=null,y=null,_=null;for(a in l)if(l.hasOwnProperty(a)){var w=l[a];if(w!=null)switch(a){case"name":s=w;break;case"type":c=w;break;case"checked":y=w;break;case"defaultChecked":_=w;break;case"value":i=w;break;case"defaultValue":d=w;break;case"children":case"dangerouslySetInnerHTML":if(w!=null)throw Error(o(137,t));break;default:ke(e,t,a,w,l,null)}}Ic(e,i,d,y,_,c,s,!1);return;case"select":ye("invalid",e),a=c=i=null;for(s in l)if(l.hasOwnProperty(s)&&(d=l[s],d!=null))switch(s){case"value":i=d;break;case"defaultValue":c=d;break;case"multiple":a=d;default:ke(e,t,s,d,l,null)}t=i,l=c,e.multiple=!!a,t!=null?Pl(e,!!a,t,!1):l!=null&&Pl(e,!!a,l,!0);return;case"textarea":ye("invalid",e),i=s=a=null;for(c in l)if(l.hasOwnProperty(c)&&(d=l[c],d!=null))switch(c){case"value":a=d;break;case"defaultValue":s=d;break;case"children":i=d;break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(o(91));break;default:ke(e,t,c,d,l,null)}eu(e,a,s,i);return;case"option":for(y in l)if(l.hasOwnProperty(y)&&(a=l[y],a!=null))switch(y){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:ke(e,t,y,a,l,null)}return;case"dialog":ye("beforetoggle",e),ye("toggle",e),ye("cancel",e),ye("close",e);break;case"iframe":case"object":ye("load",e);break;case"video":case"audio":for(a=0;a<hn.length;a++)ye(hn[a],e);break;case"image":ye("error",e),ye("load",e);break;case"details":ye("toggle",e);break;case"embed":case"source":case"link":ye("error",e),ye("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(_ in l)if(l.hasOwnProperty(_)&&(a=l[_],a!=null))switch(_){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:ke(e,t,_,a,l,null)}return;default:if(ci(t)){for(w in l)l.hasOwnProperty(w)&&(a=l[w],a!==void 0&&Jr(e,t,w,a,l,void 0));return}}for(d in l)l.hasOwnProperty(d)&&(a=l[d],a!=null&&ke(e,t,d,a,l,null))}function ip(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 s=null,i=null,c=null,d=null,y=null,_=null,w=null;for(z in l){var H=l[z];if(l.hasOwnProperty(z)&&H!=null)switch(z){case"checked":break;case"value":break;case"defaultValue":y=H;default:a.hasOwnProperty(z)||ke(e,t,z,null,a,H)}}for(var k in a){var z=a[k];if(H=l[k],a.hasOwnProperty(k)&&(z!=null||H!=null))switch(k){case"type":i=z;break;case"name":s=z;break;case"checked":_=z;break;case"defaultChecked":w=z;break;case"value":c=z;break;case"defaultValue":d=z;break;case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(o(137,t));break;default:z!==H&&ke(e,t,k,z,a,H)}}ii(e,c,d,y,_,w,i,s);return;case"select":z=c=d=k=null;for(i in l)if(y=l[i],l.hasOwnProperty(i)&&y!=null)switch(i){case"value":break;case"multiple":z=y;default:a.hasOwnProperty(i)||ke(e,t,i,null,a,y)}for(s in a)if(i=a[s],y=l[s],a.hasOwnProperty(s)&&(i!=null||y!=null))switch(s){case"value":k=i;break;case"defaultValue":d=i;break;case"multiple":c=i;default:i!==y&&ke(e,t,s,i,a,y)}t=d,l=c,a=z,k!=null?Pl(e,!!l,k,!1):!!a!=!!l&&(t!=null?Pl(e,!!l,t,!0):Pl(e,!!l,l?[]:"",!1));return;case"textarea":z=k=null;for(d in l)if(s=l[d],l.hasOwnProperty(d)&&s!=null&&!a.hasOwnProperty(d))switch(d){case"value":break;case"children":break;default:ke(e,t,d,null,a,s)}for(c in a)if(s=a[c],i=l[c],a.hasOwnProperty(c)&&(s!=null||i!=null))switch(c){case"value":k=s;break;case"defaultValue":z=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(o(91));break;default:s!==i&&ke(e,t,c,s,a,i)}Pc(e,k,z);return;case"option":for(var P in l)if(k=l[P],l.hasOwnProperty(P)&&k!=null&&!a.hasOwnProperty(P))switch(P){case"selected":e.selected=!1;break;default:ke(e,t,P,null,a,k)}for(y in a)if(k=a[y],z=l[y],a.hasOwnProperty(y)&&k!==z&&(k!=null||z!=null))switch(y){case"selected":e.selected=k&&typeof k!="function"&&typeof k!="symbol";break;default:ke(e,t,y,k,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 ue in l)k=l[ue],l.hasOwnProperty(ue)&&k!=null&&!a.hasOwnProperty(ue)&&ke(e,t,ue,null,a,k);for(_ in a)if(k=a[_],z=l[_],a.hasOwnProperty(_)&&k!==z&&(k!=null||z!=null))switch(_){case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(o(137,t));break;default:ke(e,t,_,k,a,z)}return;default:if(ci(t)){for(var Me in l)k=l[Me],l.hasOwnProperty(Me)&&k!==void 0&&!a.hasOwnProperty(Me)&&Jr(e,t,Me,void 0,a,k);for(w in a)k=a[w],z=l[w],!a.hasOwnProperty(w)||k===z||k===void 0&&z===void 0||Jr(e,t,w,k,a,z);return}}for(var C in l)k=l[C],l.hasOwnProperty(C)&&k!=null&&!a.hasOwnProperty(C)&&ke(e,t,C,null,a,k);for(H in a)k=a[H],z=l[H],!a.hasOwnProperty(H)||k===z||k==null&&z==null||ke(e,t,H,k,a,z)}function nf(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function rp(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var s=l[a],i=s.transferSize,c=s.initiatorType,d=s.duration;if(i&&d&&nf(c)){for(c=0,d=s.responseEnd,a+=1;a<l.length;a++){var y=l[a],_=y.startTime;if(_>d)break;var w=y.transferSize,H=y.initiatorType;w&&nf(H)&&(y=y.responseEnd,c+=w*(y<d?1:(d-_)/(y-_)))}if(--a,t+=8*(i+c)/(s.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 $r=null,Wr=null;function zs(e){return e.nodeType===9?e:e.ownerDocument}function sf(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 rf(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 Fr(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 Ir=null;function cp(){var e=window.event;return e&&e.type==="popstate"?e===Ir?!1:(Ir=e,!0):(Ir=null,!1)}var cf=typeof setTimeout=="function"?setTimeout:void 0,up=typeof clearTimeout=="function"?clearTimeout:void 0,uf=typeof Promise=="function"?Promise:void 0,op=typeof queueMicrotask=="function"?queueMicrotask:typeof uf<"u"?function(e){return uf.resolve(null).then(e).catch(dp)}:cf;function dp(e){setTimeout(function(){throw e})}function jl(e){return e==="head"}function of(e,t){var l=t,a=0;do{var s=l.nextSibling;if(e.removeChild(l),s&&s.nodeType===8)if(l=s.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(s),Ra(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")gn(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,gn(l);for(var i=l.firstChild;i;){var c=i.nextSibling,d=i.nodeName;i[La]||d==="SCRIPT"||d==="STYLE"||d==="LINK"&&i.rel.toLowerCase()==="stylesheet"||l.removeChild(i),i=c}}else l==="body"&&gn(e.ownerDocument.body);l=s}while(l);Ra(t)}function df(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 Pr(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":Pr(l),ni(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function fp(e,t,l,a){for(;e.nodeType===1;){var s=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[La])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==s.rel||e.getAttribute("href")!==(s.href==null||s.href===""?null:s.href)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin)||e.getAttribute("title")!==(s.title==null?null:s.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(s.src==null?null:s.src)||e.getAttribute("type")!==(s.type==null?null:s.type)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=s.name==null?null:""+s.name;if(s.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=_t(e.nextSibling),e===null)break}return null}function mp(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=_t(e.nextSibling),e===null))return null;return e}function ff(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=_t(e.nextSibling),e===null))return null;return e}function ec(e){return e.data==="$?"||e.data==="$~"}function tc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function xp(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 _t(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 lc=null;function mf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return _t(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function xf(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 pf(e,t,l){switch(t=zs(l),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function gn(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ni(e)}var kt=new Map,vf=new Set;function Os(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var el=O.d;O.d={f:pp,r:vp,D:hp,C:yp,L:gp,m:bp,X:Sp,S:jp,M:Np};function pp(){var e=el.f(),t=Es();return e||t}function vp(e){var t=Wl(e);t!==null&&t.tag===5&&t.type==="form"?zo(t):el.r(e)}var _a=typeof document>"u"?null:document;function hf(e,t,l){var a=_a;if(a&&typeof t=="string"&&t){var s=jt(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof l=="string"&&(s+='[crossorigin="'+l+'"]'),vf.has(s)||(vf.add(s),e={rel:e,crossOrigin:l,href:t},a.querySelector(s)===null&&(t=a.createElement("link"),Pe(t,"link",e),Ke(t),a.head.appendChild(t)))}}function hp(e){el.D(e),hf("dns-prefetch",e,null)}function yp(e,t){el.C(e,t),hf("preconnect",e,t)}function gp(e,t,l){el.L(e,t,l);var a=_a;if(a&&e&&t){var s='link[rel="preload"][as="'+jt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(s+='[imagesrcset="'+jt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(s+='[imagesizes="'+jt(l.imageSizes)+'"]')):s+='[href="'+jt(e)+'"]';var i=s;switch(t){case"style":i=ka(e);break;case"script":i=Ma(e)}kt.has(i)||(e=g({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),kt.set(i,e),a.querySelector(s)!==null||t==="style"&&a.querySelector(bn(i))||t==="script"&&a.querySelector(jn(i))||(t=a.createElement("link"),Pe(t,"link",e),Ke(t),a.head.appendChild(t)))}}function bp(e,t){el.m(e,t);var l=_a;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+jt(a)+'"][href="'+jt(e)+'"]',i=s;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Ma(e)}if(!kt.has(i)&&(e=g({rel:"modulepreload",href:e},t),kt.set(i,e),l.querySelector(s)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(jn(i)))return}a=l.createElement("link"),Pe(a,"link",e),Ke(a),l.head.appendChild(a)}}}function jp(e,t,l){el.S(e,t,l);var a=_a;if(a&&e){var s=Fl(a).hoistableStyles,i=ka(e);t=t||"default";var c=s.get(i);if(!c){var d={loading:0,preload:null};if(c=a.querySelector(bn(i)))d.loading=5;else{e=g({rel:"stylesheet",href:e,"data-precedence":t},l),(l=kt.get(i))&&ac(e,l);var y=c=a.createElement("link");Ke(y),Pe(y,"link",e),y._p=new Promise(function(_,w){y.onload=_,y.onerror=w}),y.addEventListener("load",function(){d.loading|=1}),y.addEventListener("error",function(){d.loading|=2}),d.loading|=4,ws(c,t,a)}c={type:"stylesheet",instance:c,count:1,state:d},s.set(i,c)}}}function Sp(e,t){el.X(e,t);var l=_a;if(l&&e){var a=Fl(l).hoistableScripts,s=Ma(e),i=a.get(s);i||(i=l.querySelector(jn(s)),i||(e=g({src:e,async:!0},t),(t=kt.get(s))&&nc(e,t),i=l.createElement("script"),Ke(i),Pe(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(s,i))}}function Np(e,t){el.M(e,t);var l=_a;if(l&&e){var a=Fl(l).hoistableScripts,s=Ma(e),i=a.get(s);i||(i=l.querySelector(jn(s)),i||(e=g({src:e,async:!0,type:"module"},t),(t=kt.get(s))&&nc(e,t),i=l.createElement("script"),Ke(i),Pe(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(s,i))}}function yf(e,t,l,a){var s=(s=te.current)?Os(s):null;if(!s)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=ka(l.href),l=Fl(s).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=ka(l.href);var i=Fl(s).hoistableStyles,c=i.get(e);if(c||(s=s.ownerDocument||s,c={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,c),(i=s.querySelector(bn(e)))&&!i._p&&(c.instance=i,c.state.loading=5),kt.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},kt.set(e,l),i||Ep(s,e,l,c.state))),t&&a===null)throw Error(o(528,""));return c}if(t&&a!==null)throw Error(o(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ma(l),l=Fl(s).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(o(444,e))}}function ka(e){return'href="'+jt(e)+'"'}function bn(e){return'link[rel="stylesheet"]['+e+"]"}function gf(e){return g({},e,{"data-precedence":e.precedence,precedence:null})}function Ep(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}),Pe(t,"link",l),Ke(t),e.head.appendChild(t))}function Ma(e){return'[src="'+jt(e)+'"]'}function jn(e){return"script[async]"+e}function bf(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,Ke(a),a;var s=g({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Ke(a),Pe(a,"style",s),ws(a,l.precedence,e),t.instance=a;case"stylesheet":s=ka(l.href);var i=e.querySelector(bn(s));if(i)return t.state.loading|=4,t.instance=i,Ke(i),i;a=gf(l),(s=kt.get(s))&&ac(a,s),i=(e.ownerDocument||e).createElement("link"),Ke(i);var c=i;return c._p=new Promise(function(d,y){c.onload=d,c.onerror=y}),Pe(i,"link",a),t.state.loading|=4,ws(i,l.precedence,e),t.instance=i;case"script":return i=Ma(l.src),(s=e.querySelector(jn(i)))?(t.instance=s,Ke(s),s):(a=l,(s=kt.get(i))&&(a=g({},l),nc(a,s)),e=e.ownerDocument||e,s=e.createElement("script"),Ke(s),Pe(s,"link",a),e.head.appendChild(s),t.instance=s);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,ws(a,l.precedence,e));return t.instance}function ws(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=a.length?a[a.length-1]:null,i=s,c=0;c<a.length;c++){var d=a[c];if(d.dataset.precedence===t)i=d;else if(i!==s)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function ac(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function nc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ds=null;function jf(e,t,l){if(Ds===null){var a=new Map,s=Ds=new Map;s.set(l,a)}else s=Ds,a=s.get(l),a||(a=new Map,s.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),s=0;s<l.length;s++){var i=l[s];if(!(i[La]||i[$e]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var c=i.getAttribute(t)||"";c=e+c;var d=a.get(c);d?d.push(i):a.set(c,[i])}}return a}function Sf(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function Tp(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 Nf(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Cp(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 s=ka(a.href),i=t.querySelector(bn(s));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ls.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=i,Ke(i);return}i=t.ownerDocument||t,a=gf(a),(s=kt.get(s))&&ac(a,s),i=i.createElement("link"),Ke(i);var c=i;c._p=new Promise(function(d,y){c.onload=d,c.onerror=y}),Pe(i,"link",a),l.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=Ls.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var sc=0;function Ap(e,t){return e.stylesheets&&e.count===0&&Us(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&Us(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&sc===0&&(sc=62500*rp());var s=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Us(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>sc?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(s)}}:null}function Ls(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Us(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Bs=null;function Us(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Bs=new Map,t.forEach(_p,e),Bs=null,Ls.call(e))}function _p(e,t){if(!(t.state.loading&4)){var l=Bs.get(e);if(l)var a=l.get(null);else{l=new Map,Bs.set(e,l);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<s.length;i++){var c=s[i];(c.nodeName==="LINK"||c.getAttribute("media")!=="not all")&&(l.set(c.dataset.precedence,c),a=c)}a&&l.set(null,a)}s=t.instance,c=s.getAttribute("data-precedence"),i=l.get(c)||a,i===a&&l.set(null,s),l.set(c,s),this.count++,a=Ls.bind(this),s.addEventListener("load",a),s.addEventListener("error",a),i?i.parentNode.insertBefore(s,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(s,e.firstChild)),t.state.loading|=4}}var Sn={$$typeof:re,Provider:null,Consumer:null,_currentValue:L,_currentValue2:L,_threadCount:0};function kp(e,t,l,a,s,i,c,d,y){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=ei(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ei(0),this.hiddenUpdates=ei(null),this.identifierPrefix=a,this.onUncaughtError=s,this.onCaughtError=i,this.onRecoverableError=c,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=y,this.incompleteTransitions=new Map}function Ef(e,t,l,a,s,i,c,d,y,_,w,H){return e=new kp(e,t,l,c,y,_,w,H,d),t=1,i===!0&&(t|=24),i=xt(3,null,null,t),e.current=i,i.stateNode=e,t=Ui(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:a,isDehydrated:l,cache:t},Gi(i),e}function Tf(e){return e?(e=ra,e):ra}function Cf(e,t,l,a,s,i){s=Tf(s),a.context===null?a.context=s:a.pendingContext=s,a=ol(t),a.payload={element:l},i=i===void 0?null:i,i!==null&&(a.callback=i),l=dl(e,a,t),l!==null&&(ut(l,e,t),Pa(l,e,t))}function Af(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function ic(e,t){Af(e,t),(e=e.alternate)&&Af(e,t)}function _f(e){if(e.tag===13||e.tag===31){var t=wl(e,67108864);t!==null&&ut(t,e,67108864),ic(e,67108864)}}function kf(e){if(e.tag===13||e.tag===31){var t=gt();t=ti(t);var l=wl(e,t);l!==null&&ut(l,e,t),ic(e,t)}}var Hs=!0;function Mp(e,t,l,a){var s=R.T;R.T=null;var i=O.p;try{O.p=2,rc(e,t,l,a)}finally{O.p=i,R.T=s}}function Rp(e,t,l,a){var s=R.T;R.T=null;var i=O.p;try{O.p=8,rc(e,t,l,a)}finally{O.p=i,R.T=s}}function rc(e,t,l,a){if(Hs){var s=cc(a);if(s===null)Kr(e,t,a,qs,l),Rf(e,a);else if(Op(s,e,t,l,a))a.stopPropagation();else if(Rf(e,a),t&4&&-1<zp.indexOf(e)){for(;s!==null;){var i=Wl(s);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var c=kl(i.pendingLanes);if(c!==0){var d=i;for(d.pendingLanes|=2,d.entangledLanes|=2;c;){var y=1<<31-ft(c);d.entanglements[1]|=y,c&=~y}Lt(i),(Te&6)===0&&(Ss=ot()+500,vn(0))}}break;case 31:case 13:d=wl(i,2),d!==null&&ut(d,i,2),Es(),ic(i,2)}if(i=cc(a),i===null&&Kr(e,t,a,qs,l),i===s)break;s=i}s!==null&&a.stopPropagation()}else Kr(e,t,a,null,l)}}function cc(e){return e=oi(e),uc(e)}var qs=null;function uc(e){if(qs=null,e=$l(e),e!==null){var t=h(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=v(t),e!==null)return e;e=null}else if(l===31){if(e=E(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 qs=e,null}function Mf(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(hm()){case Lc:return 2;case Bc:return 8;case kn:case ym:return 32;case Uc:return 268435456;default:return 32}default:return 32}}var oc=!1,Sl=null,Nl=null,El=null,Nn=new Map,En=new Map,Tl=[],zp="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 Rf(e,t){switch(e){case"focusin":case"focusout":Sl=null;break;case"dragenter":case"dragleave":Nl=null;break;case"mouseover":case"mouseout":El=null;break;case"pointerover":case"pointerout":Nn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":En.delete(t.pointerId)}}function Tn(e,t,l,a,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:i,targetContainers:[s]},t!==null&&(t=Wl(t),t!==null&&_f(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function Op(e,t,l,a,s){switch(t){case"focusin":return Sl=Tn(Sl,e,t,l,a,s),!0;case"dragenter":return Nl=Tn(Nl,e,t,l,a,s),!0;case"mouseover":return El=Tn(El,e,t,l,a,s),!0;case"pointerover":var i=s.pointerId;return Nn.set(i,Tn(Nn.get(i)||null,e,t,l,a,s)),!0;case"gotpointercapture":return i=s.pointerId,En.set(i,Tn(En.get(i)||null,e,t,l,a,s)),!0}return!1}function zf(e){var t=$l(e.target);if(t!==null){var l=h(t);if(l!==null){if(t=l.tag,t===13){if(t=v(l),t!==null){e.blockedOn=t,Qc(e.priority,function(){kf(l)});return}}else if(t===31){if(t=E(l),t!==null){e.blockedOn=t,Qc(e.priority,function(){kf(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 Ys(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=cc(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);ui=a,l.target.dispatchEvent(a),ui=null}else return t=Wl(l),t!==null&&_f(t),e.blockedOn=l,!1;t.shift()}return!0}function Of(e,t,l){Ys(e)&&l.delete(t)}function wp(){oc=!1,Sl!==null&&Ys(Sl)&&(Sl=null),Nl!==null&&Ys(Nl)&&(Nl=null),El!==null&&Ys(El)&&(El=null),Nn.forEach(Of),En.forEach(Of)}function Gs(e,t){e.blockedOn===t&&(e.blockedOn=null,oc||(oc=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,wp)))}var Vs=null;function wf(e){Vs!==e&&(Vs=e,r.unstable_scheduleCallback(r.unstable_NormalPriority,function(){Vs===e&&(Vs=null);for(var t=0;t<e.length;t+=3){var l=e[t],a=e[t+1],s=e[t+2];if(typeof a!="function"){if(uc(a||l)===null)continue;break}var i=Wl(l);i!==null&&(e.splice(t,3),t-=3,cr(i,{pending:!0,data:s,method:l.method,action:a},a,s))}}))}function Ra(e){function t(y){return Gs(y,e)}Sl!==null&&Gs(Sl,e),Nl!==null&&Gs(Nl,e),El!==null&&Gs(El,e),Nn.forEach(t),En.forEach(t);for(var l=0;l<Tl.length;l++){var a=Tl[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Tl.length&&(l=Tl[0],l.blockedOn===null);)zf(l),l.blockedOn===null&&Tl.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var s=l[a],i=l[a+1],c=s[at]||null;if(typeof i=="function")c||wf(l);else if(c){var d=null;if(i&&i.hasAttribute("formAction")){if(s=i,c=i[at]||null)d=c.formAction;else if(uc(s)!==null)continue}else d=c.action;typeof d=="function"?l[a+1]=d:(l.splice(a,3),a-=3),wf(l)}}}function Df(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(c){return s=c})},focusReset:"manual",scroll:"manual"})}function t(){s!==null&&(s(),s=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,s=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),s!==null&&(s(),s=null)}}}function dc(e){this._internalRoot=e}Qs.prototype.render=dc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var l=t.current,a=gt();Cf(l,a,e,t,null,null)},Qs.prototype.unmount=dc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Cf(e.current,2,null,e,null,null),Es(),t[Jl]=null}};function Qs(e){this._internalRoot=e}Qs.prototype.unstable_scheduleHydration=function(e){if(e){var t=Vc();e={blockedOn:null,target:e,priority:t};for(var l=0;l<Tl.length&&t!==0&&t<Tl[l].priority;l++);Tl.splice(l,0,e),l===0&&zf(e)}};var Lf=u.version;if(Lf!=="19.2.4")throw Error(o(527,Lf,"19.2.4"));O.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=x(t),e=e!==null?T(e):null,e=e===null?null:e.stateNode,e};var Dp={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:R,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Xs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xs.isDisabled&&Xs.supportsFiber)try{Oa=Xs.inject(Dp),dt=Xs}catch{}}return An.createRoot=function(e,t){if(!m(e))throw Error(o(299));var l=!1,a="",s=Go,i=Vo,c=Qo;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(s=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=Ef(e,1,!1,null,null,l,a,null,s,i,c,Df),e[Jl]=t.current,Zr(e),new dc(t)},An.hydrateRoot=function(e,t,l){if(!m(e))throw Error(o(299));var a=!1,s="",i=Go,c=Vo,d=Qo,y=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(s=l.identifierPrefix),l.onUncaughtError!==void 0&&(i=l.onUncaughtError),l.onCaughtError!==void 0&&(c=l.onCaughtError),l.onRecoverableError!==void 0&&(d=l.onRecoverableError),l.formState!==void 0&&(y=l.formState)),t=Ef(e,1,!0,t,l??null,a,s,y,i,c,d,Df),t.context=Tf(null),l=t.current,a=gt(),a=ti(a),s=ol(a),s.callback=null,dl(l,s,a),l=a,t.current.lanes=l,Da(t,l),Lt(t),e[Jl]=t.current,Zr(e),new Qs(t)},An.version="19.2.4",An}var Zf;function Xp(){if(Zf)return xc.exports;Zf=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(u){console.error(u)}}return r(),xc.exports=Qp(),xc.exports}var Zp=Xp();const Kp="";class Jp extends Error{constructor(u,f){super(u),this.name="ApiError",this.status=f}}async function Be(r,u){const f=await fetch(`${Kp}${r}`,u);if(!f.ok){const o=await f.json().catch(()=>({error:f.statusText}));throw new Jp(o.error||`HTTP ${f.status}`,f.status)}return f.json()}const Se={getConfig(){return Be("/api/config")},setConfig(r,u){return Be("/api/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r,model:u})})},getSkills(){return Be("/api/skills")},getSkillDetail(r,u){return Be(`/api/skills/${r}/${u}`)},getEvals(r,u){return Be(`/api/skills/${r}/${u}/evals`)},saveEvals(r,u,f){return Be(`/api/skills/${r}/${u}/evals`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)})},generateEvals(r,u){return Be(`/api/skills/${r}/${u}/generate-evals`,{method:"POST"})},getLatestBenchmark(r,u){return Be(`/api/skills/${r}/${u}/benchmark/latest`)},getHistory(r,u,f){const o=new URLSearchParams;f!=null&&f.model&&o.set("model",f.model),f!=null&&f.type&&o.set("type",f.type),f!=null&&f.from&&o.set("from",f.from),f!=null&&f.to&&o.set("to",f.to);const m=o.toString();return Be(`/api/skills/${r}/${u}/history${m?"?"+m:""}`)},getHistoryEntry(r,u,f){return Be(`/api/skills/${r}/${u}/history/${encodeURIComponent(f)}`)},compareRuns(r,u,f,o){return Be(`/api/skills/${r}/${u}/history-compare?a=${encodeURIComponent(f)}&b=${encodeURIComponent(o)}`)},getCaseHistory(r,u,f,o){const m=new URLSearchParams;o&&m.set("model",o);const h=m.toString();return Be(`/api/skills/${r}/${u}/history/case/${f}${h?"?"+h:""}`)},deleteHistoryEntry(r,u,f){return Be(`/api/skills/${r}/${u}/history/${encodeURIComponent(f)}`,{method:"DELETE"})},improveSkill(r,u,f){return Be(`/api/skills/${r}/${u}/improve`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)})},instructEdit(r,u,f){return Be(`/api/skills/${r}/${u}/improve`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:"instruct",...f})})},applyImprovement(r,u,f){return Be(`/api/skills/${r}/${u}/apply-improvement`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:f})})},getStats(r,u){return Be(`/api/skills/${r}/${u}/stats`)},getDependencies(r,u){return Be(`/api/skills/${r}/${u}/dependencies`)},getProjectLayout(){return Be("/api/project-layout")},createSkill(r){return Be("/api/skills/create",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)})},getSkillCreatorStatus(){return Be("/api/skill-creator-status")},generateSkill(r){return Be("/api/skills/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)})}};function $p(r){const[u,f]=b.useState(()=>typeof window>"u"?!1:window.matchMedia(r).matches);return b.useEffect(()=>{const o=window.matchMedia(r);f(o.matches);const m=h=>f(h.matches);return o.addEventListener("change",m),()=>o.removeEventListener("change",m)},[r]),u}const Wp={selectedSkill:null,mode:"browse",searchQuery:"",skills:[],skillsLoading:!0,skillsError:null,isMobile:!1,mobileView:"list"};function Fp(r,u){switch(u.type){case"SELECT_SKILL":return{...r,selectedSkill:u.skill,mode:"browse",mobileView:r.isMobile?"detail":r.mobileView};case"CLEAR_SELECTION":return{...r,selectedSkill:null};case"SET_MODE":return{...r,mode:u.mode,selectedSkill:u.mode==="create"?null:r.selectedSkill};case"SET_SEARCH":return{...r,searchQuery:u.query};case"SET_SKILLS":return{...r,skills:u.skills,skillsLoading:!1,skillsError:null};case"SET_SKILLS_ERROR":return{...r,skillsError:u.error,skillsLoading:!1};case"SET_SKILLS_LOADING":return{...r,skillsLoading:u.loading};case"SET_MOBILE":return{...r,isMobile:u.isMobile};case"SET_MOBILE_VIEW":return{...r,mobileView:u.view};default:return r}}const im=b.createContext(null);function Kl(){const r=b.useContext(im);if(!r)throw new Error("useStudio must be used within StudioProvider");return r}function Ip({children:r}){const[u,f]=b.useReducer(Fp,Wp),o=$p("(max-width: 767px)");b.useEffect(()=>{f({type:"SET_MOBILE",isMobile:o})},[o]);const m=b.useCallback(()=>{f({type:"SET_SKILLS_LOADING",loading:!0}),Se.getSkills().then(g=>f({type:"SET_SKILLS",skills:g})).catch(g=>f({type:"SET_SKILLS_ERROR",error:g.message}))},[]);b.useEffect(()=>{m()},[m]);const h=b.useCallback(g=>{f({type:"SELECT_SKILL",skill:g})},[]),v=b.useCallback(()=>{f({type:"CLEAR_SELECTION"})},[]),E=b.useCallback(g=>{f({type:"SET_MODE",mode:g})},[]),p=b.useCallback(g=>{f({type:"SET_SEARCH",query:g})},[]),x=b.useCallback(g=>{f({type:"SET_MOBILE_VIEW",view:g})},[]),T=b.useMemo(()=>({state:u,selectSkill:h,clearSelection:v,setMode:E,setSearch:p,setMobileView:x,refreshSkills:m}),[u,h,v,E,p,x,m]);return n.jsx(im.Provider,{value:T,children:r})}function Pp({left:r,right:u}){const{state:f}=Kl();return f.isMobile?n.jsx("div",{style:{height:"100vh",overflow:"hidden",background:"var(--surface-0)"},children:f.mobileView==="list"?n.jsx("div",{style:{height:"100%",overflowY:"auto",background:"var(--surface-1)"},children:r}):n.jsx("div",{style:{height:"100%",overflowY:"auto"},children:u})}):n.jsxs("div",{className:"studio-grid",style:{display:"grid",gridTemplateColumns:"280px 1px 1fr",height:"100vh",overflow:"hidden"},children:[n.jsx("div",{style:{overflowY:"auto",background:"var(--surface-1)"},children:r}),n.jsx("div",{style:{background:"var(--border-subtle)"}}),n.jsx("div",{style:{overflowY:"auto",background:"var(--surface-0)"},children:u})]})}function ev(){const{state:r,setSearch:u}=Kl(),[f,o]=b.useState(r.searchQuery),m=b.useRef(null);b.useEffect(()=>(m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{u(f)},200),()=>{m.current&&clearTimeout(m.current)}),[f,u]),b.useEffect(()=>{r.searchQuery===""&&f!==""&&o("")},[r.searchQuery]);const h=new Set(r.skills.map(v=>v.plugin)).size;return n.jsxs("div",{className:"px-3 py-2",children:[n.jsxs("div",{className:"relative",children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{position:"absolute",left:10,top:"50%",transform:"translateY(-50%)"},children:[n.jsx("circle",{cx:"11",cy:"11",r:"8"}),n.jsx("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]}),n.jsx("input",{type:"text",value:f,onChange:v=>o(v.target.value),placeholder:"Search skills...",className:"w-full py-2 pl-8 pr-3 rounded-lg text-[13px] transition-colors duration-150",style:{background:"var(--surface-2)",color:"var(--text-primary)",border:"1px solid var(--border-subtle)",outline:"none"},onFocus:v=>{v.currentTarget.style.borderColor="var(--accent)"},onBlur:v=>{v.currentTarget.style.borderColor="var(--border-subtle)"}}),f&&n.jsx("button",{onClick:()=>{o(""),u("")},style:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",background:"none",border:"none",cursor:"pointer",color:"var(--text-tertiary)",padding:2},children:n.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),!r.skillsLoading&&n.jsxs("div",{className:"text-[11px] mt-1.5 px-1",style:{color:"var(--text-tertiary)"},children:[r.skills.length," skill",r.skills.length!==1?"s":""," across ",h," plugin",h!==1?"s":""]})]})}const Kf={pass:{bg:"var(--green-muted)",text:"var(--green)",dot:"var(--green)",label:"Passing"},fail:{bg:"var(--red-muted)",text:"var(--red)",dot:"var(--red)",label:"Failing"},pending:{bg:"var(--yellow-muted)",text:"var(--yellow)",dot:"var(--yellow)",label:"Pending"},stale:{bg:"var(--orange-muted)",text:"var(--orange)",dot:"var(--orange)",label:"Stale"},missing:{bg:"var(--surface-3)",text:"var(--text-tertiary)",dot:"var(--text-tertiary)",label:"No evals"}};function tv({skill:r,isSelected:u,onSelect:f}){const o=Kf[r.benchmarkStatus]||Kf.missing;return n.jsxs("button",{onClick:f,className:"w-full text-left px-3 py-2.5 transition-all duration-150",style:{background:u?"var(--surface-2)":"transparent",cursor:"pointer",borderTop:"none",borderRight:"none",borderBottom:"1px solid var(--border-subtle)",borderLeft:u?"2px solid var(--accent)":"2px solid transparent",display:"block"},onMouseEnter:m=>{u||(m.currentTarget.style.background="var(--surface-2)")},onMouseLeave:m=>{u||(m.currentTarget.style.background="transparent")},children:[n.jsxs("div",{className:"flex items-center justify-between mb-1",children:[n.jsx("span",{className:"text-[13px] font-medium truncate",style:{color:"var(--text-primary)"},children:r.skill}),n.jsxs("span",{className:"flex items-center gap-1 text-[10px] font-medium px-1.5 py-0.5 rounded-full flex-shrink-0 ml-2",style:{background:o.bg,color:o.text},children:[n.jsx("span",{className:"rounded-full",style:{width:5,height:5,background:o.dot}}),o.label]})]}),n.jsxs("div",{className:"flex items-center gap-2 text-[11px]",style:{color:"var(--text-tertiary)"},children:[n.jsxs("span",{children:[r.evalCount," eval",r.evalCount!==1?"s":""]}),n.jsx("span",{style:{color:"var(--border-subtle)"},children:"|"}),n.jsxs("span",{children:[r.assertionCount," assert",r.assertionCount!==1?"s":""]}),r.lastBenchmark&&n.jsxs(n.Fragment,{children:[n.jsx("span",{style:{color:"var(--border-subtle)"},children:"|"}),n.jsx("span",{children:new Date(r.lastBenchmark).toLocaleDateString()})]})]})]})}function lv(){const{state:r,selectSkill:u}=Kl(),{skills:f,searchQuery:o,selectedSkill:m}=r,h=b.useMemo(()=>{var T;const E=o.toLowerCase(),p=E?f.filter(g=>g.skill.toLowerCase().includes(E)||g.plugin.toLowerCase().includes(E)):f,x={};for(const g of p)(x[T=g.plugin]||(x[T]=[])).push(g);return x},[f,o]),v=Object.entries(h);return r.skillsLoading?n.jsx("div",{className:"px-3 py-4 space-y-3",children:[1,2,3].map(E=>n.jsx("div",{className:"skeleton h-14 w-full rounded-lg"},E))}):v.length===0?n.jsx("div",{className:"px-4 py-8 text-center",children:n.jsx("p",{className:"text-[13px]",style:{color:"var(--text-tertiary)"},children:"No skills match your search"})}):n.jsx("div",{className:"flex-1",children:v.map(([E,p])=>n.jsxs("div",{children:[n.jsx(av,{plugin:E,count:p.length}),p.map(x=>{const T=(m==null?void 0:m.plugin)===x.plugin&&(m==null?void 0:m.skill)===x.skill;return n.jsx(tv,{skill:x,isSelected:T,onSelect:()=>u({plugin:x.plugin,skill:x.skill})},`${x.plugin}/${x.skill}`)})]},E))})}function av({plugin:r,count:u}){const[f,o]=b.useState(!1),m=`/images/icons/${r}.webp`;return n.jsxs("div",{className:"flex items-center gap-2 px-3 py-2",children:[f?n.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"})}):n.jsx("img",{src:m,width:16,height:16,alt:"",onError:()=>o(!0),style:{objectFit:"contain"}}),n.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-widest",style:{color:"var(--text-tertiary)"},children:r}),n.jsxs("span",{className:"text-[10px]",style:{color:"var(--text-tertiary)"},children:["(",u,")"]}),n.jsx("div",{className:"flex-1 h-px",style:{background:"var(--border-subtle)"}})]})}function nv(){const[r,u]=b.useState(null),[f,o]=b.useState(!1),[m,h]=b.useState(!1),v=b.useRef(null);b.useEffect(()=>{Se.getConfig().then(u).catch(()=>{})},[]),b.useEffect(()=>{function T(g){v.current&&!v.current.contains(g.target)&&o(!1)}return f&&document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)},[f]);async function E(T,g){h(!0);try{const M=await Se.setConfig(T.id,g.id);u(M),o(!1)}catch{const M=await Se.getConfig();u(M)}finally{h(!1)}}if(!r)return null;const p=iv(r),x=sv(r);return n.jsxs("div",{ref:v,className:"relative",children:[n.jsxs("button",{onClick:()=>o(!f),className:"w-full flex items-center gap-2 px-2.5 py-1.5 rounded-lg text-[11px] transition-all duration-150",style:{background:f?"var(--surface-3)":"var(--surface-2)",border:`1px solid ${f?"var(--accent)":"var(--border-subtle)"}`,cursor:"pointer"},onMouseEnter:T=>{f||(T.currentTarget.style.borderColor="var(--accent)")},onMouseLeave:T=>{f||(T.currentTarget.style.borderColor="var(--border-subtle)")},children:[n.jsx("span",{className:"w-1.5 h-1.5 rounded-full flex-shrink-0",style:{background:x!=null&&x.available?"var(--green)":"var(--text-tertiary)"}}),n.jsx("span",{className:"flex-1 text-left font-medium truncate",style:{color:"var(--text-primary)"},children:p}),n.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2.5",style:{transform:f?"rotate(180deg)":"rotate(0)",transition:"transform 0.15s ease",flexShrink:0},children:n.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),f&&n.jsxs("div",{className:"absolute top-full mt-1 left-0 right-0 rounded-xl shadow-xl z-50 overflow-hidden animate-fade-in",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)",minWidth:"240px"},children:[n.jsx("div",{className:"px-3 py-2",style:{borderBottom:"1px solid var(--border-subtle)"},children:n.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-widest",style:{color:"var(--text-tertiary)"},children:"Select Model"})}),n.jsx("div",{className:"py-1 max-h-72 overflow-y-auto",children:r.providers.map(T=>n.jsxs("div",{children:[n.jsxs("div",{className:"px-3 py-1.5 flex items-center gap-2",children:[n.jsx("span",{className:"w-1.5 h-1.5 rounded-full flex-shrink-0",style:{background:T.available?"var(--green)":"var(--text-tertiary)",opacity:T.available?1:.3}}),n.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--text-tertiary)",opacity:T.available?1:.5},children:T.label})]}),T.models.map(g=>{const M=rm(r,T.id,g.id),G=!T.available||m;return n.jsxs("button",{onClick:()=>!G&&E(T,g),disabled:G,className:"w-full px-3 py-1.5 flex items-center gap-2.5 text-left transition-all duration-100",style:{background:M?"var(--accent-muted)":"transparent",color:G?"var(--text-tertiary)":"var(--text-primary)",opacity:G?.4:1,cursor:G?"not-allowed":"pointer"},onMouseEnter:B=>{!G&&!M&&(B.currentTarget.style.background="var(--surface-3)")},onMouseLeave:B=>{M||(B.currentTarget.style.background="transparent")},children:[n.jsx("div",{className:"w-3 h-3 rounded-full flex-shrink-0 flex items-center justify-center",style:{border:`2px solid ${M?"var(--accent)":"var(--border-subtle)"}`},children:M&&n.jsx("div",{className:"w-1.5 h-1.5 rounded-full",style:{background:"var(--accent)"}})}),n.jsx("span",{className:"text-[12px]",style:{fontWeight:M?600:400},title:g.id,children:g.label})]},`${T.id}-${g.id}`)})]},T.id))})]})]})}function rm(r,u,f){return r.provider!==u?!1:u==="claude-cli"?r.model===`claude-${f}`:r.model===f}function sv(r){return r.providers.find(u=>u.id===r.provider)}function iv(r){for(const u of r.providers)for(const f of u.models)if(rm(r,u.id,f.id))return f.label;return r.model}function rv(){const{state:r,setMode:u}=Kl(),[f,o]=b.useState(null);return b.useEffect(()=>{Se.getConfig().then(m=>o(m.projectName)).catch(()=>{})},[]),n.jsxs("div",{className:"flex flex-col h-full",children:[n.jsxs("div",{className:"px-4 py-4 flex-shrink-0",style:{borderBottom:"1px solid var(--border-subtle)"},children:[n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center flex-shrink-0",style:{background:"var(--accent-muted)"},children:n.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"22 12 18 12 15 21 9 3 6 12 2 12"})})}),n.jsxs("div",{className:"min-w-0 flex-1",children:[n.jsx("div",{className:"text-[14px] font-semibold truncate",style:{color:"var(--text-primary)",letterSpacing:"-0.01em"},children:"Skill Studio"}),n.jsx("div",{className:"text-[11px] truncate",style:{color:"var(--text-tertiary)"},children:f||"vskill"})]})]}),n.jsx("div",{className:"mt-3",children:n.jsx(nv,{})})]}),n.jsx(ev,{}),n.jsx("div",{className:"px-3 pb-2 flex-shrink-0",children:n.jsxs("button",{onClick:()=>u("create"),className:"w-full flex items-center justify-center gap-2 px-3 py-2 rounded-lg text-[12px] font-medium transition-all duration-150",style:{background:r.mode==="create"?"var(--accent)":"var(--surface-3)",color:r.mode==="create"?"#fff":"var(--text-secondary)",border:"none",cursor:"pointer"},onMouseEnter:m=>{r.mode!=="create"&&(m.currentTarget.style.background="var(--surface-4)",m.currentTarget.style.color="var(--text-primary)")},onMouseLeave:m=>{r.mode!=="create"&&(m.currentTarget.style.background="var(--surface-3)",m.currentTarget.style.color="var(--text-secondary)")},children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),n.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),"New Skill"]})}),n.jsx("div",{className:"flex-1 overflow-y-auto",style:{borderTop:"1px solid var(--border-subtle)"},children:n.jsx(lv,{})})]})}const cv="modulepreload",uv=function(r){return"/"+r},Jf={},ov=function(u,f,o){let m=Promise.resolve();if(f&&f.length>0){let v=function(x){return Promise.all(x.map(T=>Promise.resolve(T).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const E=document.querySelector("meta[property=csp-nonce]"),p=(E==null?void 0:E.nonce)||(E==null?void 0:E.getAttribute("nonce"));m=v(f.map(x=>{if(x=uv(x),x in Jf)return;Jf[x]=!0;const T=x.endsWith(".css"),g=T?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${x}"]${g}`))return;const M=document.createElement("link");if(M.rel=T?"stylesheet":cv,T||(M.as="script"),M.crossOrigin="",M.href=x,p&&M.setAttribute("nonce",p),document.head.appendChild(M),T)return new Promise((G,B)=>{M.addEventListener("load",G),M.addEventListener("error",()=>B(new Error(`Unable to preload CSS for ${x}`)))})}))}function h(v){const E=new Event("vite:preloadError",{cancelable:!0});if(E.payload=v,window.dispatchEvent(E),!E.defaultPrevented)throw v}return m.then(v=>{for(const E of v||[])E.status==="rejected"&&h(E.reason);return u().catch(h)})};function yc(){const[r,u]=b.useState([]),[f,o]=b.useState(!1),[m,h]=b.useState(!1),[v,E]=b.useState(null),p=b.useRef(null),x=b.useCallback(async(g,M)=>{u([]),o(!0),h(!1),E(null);const G=new AbortController;p.current=G;try{const B=await fetch(g,{method:"POST",headers:{"Content-Type":"application/json"},body:M?JSON.stringify(M):void 0,signal:G.signal});if(!B.ok||!B.body)throw new Error(`HTTP ${B.status}`);const Y=B.body.getReader(),V=new TextDecoder;let J="",F="";for(;;){const{done:re,value:K}=await Y.read();if(re)break;J+=V.decode(K,{stream:!0});const se=J.split(`
50
+ `);J=se.pop()||"";for(const le of se)if(le.startsWith("event: "))F=le.slice(7).trim();else if(le.startsWith("data: ")){try{const ae=JSON.parse(le.slice(6)),$={event:F,data:ae};F==="done"?(h(!0),u(xe=>[...xe,$])):u(xe=>[...xe,$])}catch{}F=""}}}catch(B){B.name!=="AbortError"&&E(B.message)}finally{o(!1),p.current=null}},[]),T=b.useCallback(()=>{var g;(g=p.current)==null||g.abort()},[]);return{events:r,running:f,done:m,error:v,start:x,stop:T}}function dv(r){const u=b.useRef(r);u.current=r;const[f,o]=b.useState(new Set),m=b.useRef(new Map),h=b.useCallback(async(x,T,g)=>{var G;(G=m.current.get(x))==null||G.abort();const M=new AbortController;m.current.set(x,M),o(B=>{const Y=new Set(B);return Y.add(x),Y});try{const B=await fetch(T,{method:"POST",headers:{"Content-Type":"application/json"},body:g?JSON.stringify(g):void 0,signal:M.signal});if(!B.ok||!B.body)throw new Error(`HTTP ${B.status}`);const Y=B.body.getReader(),V=new TextDecoder;let J="",F="";for(;;){const{done:re,value:K}=await Y.read();if(re)break;J+=V.decode(K,{stream:!0});const se=J.split(`
51
+ `);J=se.pop()||"";for(const le of se)if(le.startsWith("event: "))F=le.slice(7).trim();else if(le.startsWith("data: ")){try{const ae=JSON.parse(le.slice(6)),$={event:F,data:ae};u.current.onEvent(x,$)}catch{}F=""}}u.current.onDone(x)}catch(B){B.name!=="AbortError"&&u.current.onError(x,B.message)}finally{o(B=>{const Y=new Set(B);return Y.delete(x),Y}),m.current.delete(x)}},[]),v=b.useCallback(x=>{var T;(T=m.current.get(x))==null||T.abort()},[]),E=b.useCallback(()=>{for(const x of m.current.values())x.abort()},[]),p=f.size>0;return{runningSet:f,startCase:h,stopCase:v,stopAll:E,isAnyCaseRunning:p}}const fv={plugin:"",skill:"",skillContent:"",savedContent:"",isDirty:!1,evals:null,activePanel:"tests",selectedCaseId:null,caseRunStates:new Map,bulkRunActive:!1,runMode:null,latestBenchmark:null,inlineResults:new Map,improveTarget:null,aiEditOpen:!1,aiEditLoading:!1,aiEditResult:null,aiEditError:null,aiEditClassifiedError:null,aiEditProgress:[],aiEditEvalChanges:[],aiEditEvalSelections:new Map,aiEditEvalsRetry:null,generateEvalsLoading:!1,generateEvalsProgress:[],generateEvalsError:null,regressions:[],iterationCount:0,activationPrompts:"",activationResults:[],activationSummary:null,activationRunning:!1,activationError:null,loading:!0,error:null};function mv(r,u){var f,o;switch(u.type){case"SET_LOADING":return{...r,loading:u.loading};case"SET_ERROR":return{...r,error:u.error};case"INIT_DATA":{const m=new Map;if(u.benchmark)for(const v of u.benchmark.cases)m.set(v.eval_id,{status:v.status,passRate:v.pass_rate,errorMessage:v.error_message||void 0,durationMs:v.durationMs,tokens:v.tokens,output:v.output,assertions:v.assertions.map(E=>({assertion_id:E.id,text:E.text,pass:E.pass,reasoning:E.reasoning}))});const h=((o=(f=u.evals)==null?void 0:f.evals[0])==null?void 0:o.id)??null;return{...r,skillContent:u.skillContent,savedContent:u.skillContent,isDirty:!1,evals:u.evals,latestBenchmark:u.benchmark,inlineResults:m,selectedCaseId:h,loading:!1,error:null}}case"SET_PANEL":return{...r,activePanel:u.panel};case"SET_CONTENT":return{...r,skillContent:u.content,isDirty:u.content!==r.savedContent};case"CONTENT_SAVED":return{...r,savedContent:r.skillContent,isDirty:!1};case"SET_EVALS":return{...r,evals:u.evals};case"SELECT_CASE":return{...r,selectedCaseId:u.caseId};case"CASE_RUN_START":{const m=new Map(r.caseRunStates);return m.set(u.caseId,{status:"running",startedAt:Date.now(),mode:u.mode}),{...r,caseRunStates:m,runMode:u.mode,activePanel:"run"}}case"CASE_RUN_COMPLETE":{const m=new Map(r.caseRunStates),h=m.get(u.caseId);m.set(u.caseId,{status:"complete",mode:h==null?void 0:h.mode});const v=new Map(r.inlineResults);return v.set(u.caseId,u.result),{...r,caseRunStates:m,inlineResults:v}}case"CASE_RUN_ERROR":{const m=new Map(r.caseRunStates),h=m.get(u.caseId);m.set(u.caseId,{status:"error",mode:h==null?void 0:h.mode});const v=new Map(r.inlineResults);return v.set(u.caseId,{status:"error",errorMessage:u.error,assertions:[]}),{...r,caseRunStates:m,inlineResults:v}}case"CASE_RUN_CANCEL":{const m=new Map(r.caseRunStates),h=m.get(u.caseId);return m.set(u.caseId,{status:"cancelled",mode:h==null?void 0:h.mode}),{...r,caseRunStates:m}}case"BULK_RUN_START":{const m=new Map(r.caseRunStates);for(const h of u.caseIds)m.set(h,{status:"queued",mode:u.mode});return{...r,caseRunStates:m,bulkRunActive:!0,runMode:u.mode,activePanel:"run"}}case"BULK_RUN_COMPLETE":return{...r,bulkRunActive:!1,latestBenchmark:u.benchmark??r.latestBenchmark,iterationCount:r.iterationCount+1};case"CANCEL_ALL":{const m=new Map(r.caseRunStates);for(const[h,v]of m)(v.status==="running"||v.status==="queued")&&m.set(h,{status:"cancelled"});return{...r,caseRunStates:m,bulkRunActive:!1}}case"UPDATE_INLINE_RESULT":{const m=new Map(r.inlineResults);return m.set(u.evalId,u.result),{...r,inlineResults:m}}case"OPEN_IMPROVE":return{...r,improveTarget:u.evalId,activePanel:"editor"};case"CLOSE_IMPROVE":return{...r,improveTarget:null};case"OPEN_AI_EDIT":return{...r,aiEditOpen:!0,aiEditResult:null,aiEditError:null,aiEditClassifiedError:null,aiEditProgress:[],aiEditEvalChanges:[],aiEditEvalSelections:new Map,aiEditEvalsRetry:null};case"CLOSE_AI_EDIT":return{...r,aiEditOpen:!1,aiEditLoading:!1,aiEditResult:null,aiEditError:null,aiEditClassifiedError:null,aiEditProgress:[],aiEditEvalChanges:[],aiEditEvalSelections:new Map,aiEditEvalsRetry:null};case"AI_EDIT_LOADING":return{...r,aiEditLoading:!0,aiEditError:null,aiEditClassifiedError:null,aiEditProgress:[]};case"AI_EDIT_PROGRESS":return{...r,aiEditProgress:[...r.aiEditProgress,u.entry]};case"AI_EDIT_RESULT":{const m=u.evalChanges??[],h=new Map;for(let v=0;v<m.length;v++)h.set(v,!0);return{...r,aiEditLoading:!1,aiEditResult:{improved:u.improved,reasoning:u.reasoning,evalChanges:m},aiEditEvalChanges:m,aiEditEvalSelections:h}}case"AI_EDIT_ERROR":return{...r,aiEditLoading:!1,aiEditError:u.message,aiEditClassifiedError:u.classified??null};case"GENERATE_EVALS_START":return{...r,generateEvalsLoading:!0,generateEvalsProgress:[],generateEvalsError:null};case"GENERATE_EVALS_PROGRESS":return{...r,generateEvalsProgress:[...r.generateEvalsProgress,u.entry]};case"GENERATE_EVALS_DONE":return{...r,generateEvalsLoading:!1,evals:u.evals};case"GENERATE_EVALS_ERROR":return{...r,generateEvalsLoading:!1,generateEvalsError:u.classified};case"TOGGLE_EVAL_CHANGE":{const m=new Map(r.aiEditEvalSelections);return m.set(u.index,!m.get(u.index)),{...r,aiEditEvalSelections:m}}case"SELECT_ALL_EVAL_CHANGES":{const m=new Map(r.aiEditEvalSelections);for(const h of m.keys())m.set(h,!0);return{...r,aiEditEvalSelections:m}}case"DESELECT_ALL_EVAL_CHANGES":{const m=new Map(r.aiEditEvalSelections);for(const h of m.keys())m.set(h,!1);return{...r,aiEditEvalSelections:m}}case"SET_EVALS_RETRY":return{...r,aiEditEvalsRetry:u.evalsFile};case"SET_REGRESSIONS":return{...r,regressions:u.regressions};case"INCREMENT_ITERATION":return{...r,iterationCount:r.iterationCount+1};case"SET_ACTIVATION_PROMPTS":return{...r,activationPrompts:u.prompts};case"ACTIVATION_START":return{...r,activationRunning:!0,activationResults:[],activationSummary:null,activationError:null};case"ACTIVATION_RESULT":return{...r,activationResults:[...r.activationResults,u.result]};case"ACTIVATION_DONE":return{...r,activationRunning:!1,activationSummary:u.summary};case"ACTIVATION_ERROR":return{...r,activationRunning:!1,activationError:u.error};case"ACTIVATION_RESET":return{...r,activationResults:[],activationSummary:null,activationError:null};default:return r}}const cm=b.createContext(null);function tl(){const r=b.useContext(cm);if(!r)throw new Error("useWorkspace must be used within WorkspaceProvider");return r}function xv({plugin:r,skill:u,children:f}){const[o,m]=b.useReducer(mv,{...fv,plugin:r,skill:u}),h=b.useRef(new Set),v=b.useRef(new Set),E=b.useRef(new Map),p=b.useCallback((N,D)=>{const q=D.data;let Q=E.current.get(N);if(Q||(Q={assertions:[]},E.current.set(N,Q)),D.event==="output_ready"&&(Q.output=q.output,q.durationMs!=null&&(Q.durationMs=q.durationMs),q.tokens!=null&&(Q.tokens=q.tokens)),D.event==="assertion_result"){const te={assertion_id:q.assertion_id,text:q.text,pass:q.pass,reasoning:q.reasoning};Q.assertions.find(ce=>ce.assertion_id===te.assertion_id)||Q.assertions.push(te)}D.event==="case_complete"&&(Q.status=q.status,Q.passRate=q.pass_rate,Q.errorMessage=q.error_message||void 0),m({type:"UPDATE_INLINE_RESULT",evalId:N,result:{...Q,assertions:[...Q.assertions]}})},[]),x=b.useCallback(N=>{if(v.current.has(N))return;v.current.add(N);const D=E.current.get(N)??{assertions:[]};m({type:"CASE_RUN_COMPLETE",caseId:N,result:{...D,assertions:[...D.assertions]}}),h.current.has(N)&&(h.current.delete(N),h.current.size===0&&Se.getLatestBenchmark(r,u).then(q=>m({type:"BULK_RUN_COMPLETE",benchmark:q})).catch(()=>m({type:"BULK_RUN_COMPLETE",benchmark:null})))},[r,u]),T=b.useCallback((N,D)=>{v.current.has(N)||(v.current.add(N),m({type:"CASE_RUN_ERROR",caseId:N,error:D}),h.current.has(N)&&(h.current.delete(N),h.current.size===0&&Se.getLatestBenchmark(r,u).then(q=>m({type:"BULK_RUN_COMPLETE",benchmark:q})).catch(()=>m({type:"BULK_RUN_COMPLETE",benchmark:null}))))},[r,u]),{startCase:g,stopCase:M,stopAll:G}=dv({onEvent:p,onDone:x,onError:T});b.useEffect(()=>()=>{G()},[G]),b.useEffect(()=>{let N=!1;async function D(){try{const[q,Q,te]=await Promise.allSettled([Se.getSkillDetail(r,u),Se.getEvals(r,u),Se.getLatestBenchmark(r,u)]);if(N)return;m({type:"INIT_DATA",skillContent:q.status==="fulfilled"?q.value.skillContent:"",evals:Q.status==="fulfilled"?Q.value:null,benchmark:te.status==="fulfilled"?te.value:null})}catch(q){N||m({type:"SET_ERROR",error:q.message})}}return D(),()=>{N=!0}},[r,u]);const B=b.useCallback(async()=>{try{await Se.applyImprovement(r,u,o.skillContent),m({type:"CONTENT_SAVED"})}catch(N){m({type:"SET_ERROR",error:N.message})}},[r,u,o.skillContent]),Y=b.useCallback(async N=>{try{const D=await Se.saveEvals(r,u,N);m({type:"SET_EVALS",evals:D})}catch(D){m({type:"SET_ERROR",error:D.message})}},[r,u]),V=b.useCallback((N,D="benchmark")=>{const q=o.caseRunStates.get(N);if((q==null?void 0:q.status)!=="running")if(E.current.delete(N),v.current.delete(N),m({type:"CASE_RUN_START",caseId:N,mode:D}),D==="comparison"){const Q=`/api/skills/${r}/${u}/compare`;g(N,Q,{eval_ids:[N]})}else{const Q=`/api/skills/${r}/${u}/benchmark/case/${N}`;g(N,Q,D==="baseline"?{baseline_only:!0}:void 0)}},[r,u,o.caseRunStates,g]),J=b.useCallback((N="benchmark")=>{var Q;const D=((Q=o.evals)==null?void 0:Q.evals)??[];if(D.length===0)return;const q=D.map(te=>te.id);for(const te of q)E.current.delete(te),v.current.delete(te);m({type:"BULK_RUN_START",caseIds:q,mode:N}),h.current=new Set(q);for(const te of q)if(N==="comparison")g(te,`/api/skills/${r}/${u}/compare`,{eval_ids:[te]});else{const ce=`/api/skills/${r}/${u}/benchmark/case/${te}`;g(te,ce,N==="baseline"?{baseline_only:!0}:void 0)}},[r,u,o.evals,g]),F=b.useCallback(N=>{M(N),m({type:"CASE_RUN_CANCEL",caseId:N}),h.current.delete(N),v.current.add(N)},[M]),re=b.useCallback(()=>{G(),m({type:"CANCEL_ALL"}),h.current.clear()},[G]),K=b.useCallback(async(N,D)=>{m({type:"OPEN_IMPROVE",evalId:N})},[]),se=b.useCallback(async(N,D)=>{try{await Se.applyImprovement(r,u,D),m({type:"SET_CONTENT",content:D}),m({type:"CONTENT_SAVED"}),m({type:"CLOSE_IMPROVE"}),V(N,"benchmark")}catch(q){m({type:"SET_ERROR",error:q.message})}},[r,u,V]),le=yc(),ae=b.useRef(null);b.useEffect(()=>{if(le.events.length)for(const N of le.events){const D=N.data;if(N.event==="progress"&&m({type:"AI_EDIT_PROGRESS",entry:{timestamp:Date.now(),phase:D.phase,message:D.message}}),N.event==="done"){const q=D.improved,Q=D.reasoning,te=D.evalChanges??[];m({type:"AI_EDIT_RESULT",improved:q,reasoning:Q,evalChanges:te})}if(N.event==="error"){const q=D;m({type:"AI_EDIT_ERROR",message:q.description||"Unknown error",classified:q})}}},[le.events]),b.useEffect(()=>{le.error&&m({type:"AI_EDIT_ERROR",message:le.error})},[le.error]),b.useEffect(()=>()=>{le.stop()},[le.stop]);const $=b.useCallback(async(N,D,q)=>{m({type:"AI_EDIT_LOADING"}),ae.current=le.stop,le.start(`/api/skills/${r}/${u}/improve?sse`,{mode:"instruct",instruction:N,content:o.skillContent,evals:o.evals??{skill_name:u,evals:[]},provider:D,model:q})},[r,u,o.skillContent,o.evals,le]),xe=b.useCallback(()=>{le.stop(),m({type:"AI_EDIT_ERROR",message:"Cancelled"})},[le]),I=b.useCallback(async()=>{const N=o.aiEditResult;if(N!=null&&N.improved)try{if(await Se.applyImprovement(r,u,N.improved),m({type:"SET_CONTENT",content:N.improved}),m({type:"CONTENT_SAVED"}),o.aiEditEvalChanges.length>0&&Array.from(o.aiEditEvalSelections.values()).some(Boolean)){const{mergeEvalChanges:q}=await ov(async()=>{const{mergeEvalChanges:ce}=await import("./mergeEvalChanges-Dpbbs4d4.js");return{mergeEvalChanges:ce}},[]),Q=o.evals??{skill_name:u,evals:[]},te=q(Q,o.aiEditEvalChanges,o.aiEditEvalSelections);try{const ce=await Se.saveEvals(r,u,te);m({type:"SET_EVALS",evals:ce})}catch(ce){m({type:"SET_EVALS_RETRY",evalsFile:te}),m({type:"SET_ERROR",error:`SKILL.md saved, but test cases failed to save: ${ce.message}. You can retry from the AI Edit panel.`});return}}m({type:"CLOSE_AI_EDIT"})}catch(D){m({type:"SET_ERROR",error:D.message})}},[r,u,o.aiEditResult,o.evals,o.aiEditEvalChanges,o.aiEditEvalSelections]),fe=b.useCallback(()=>{m({type:"CLOSE_AI_EDIT"})},[]),pe=b.useCallback(N=>{m({type:"TOGGLE_EVAL_CHANGE",index:N})},[]),Z=b.useCallback(()=>{m({type:"SELECT_ALL_EVAL_CHANGES"})},[]),W=b.useCallback(()=>{m({type:"DESELECT_ALL_EVAL_CHANGES"})},[]),ve=b.useCallback(async()=>{const N=o.aiEditEvalsRetry;if(N)try{const D=await Se.saveEvals(r,u,N);m({type:"SET_EVALS",evals:D}),m({type:"SET_ERROR",error:null}),m({type:"CLOSE_AI_EDIT"})}catch(D){m({type:"SET_ERROR",error:`Retry failed: ${D.message}`})}},[r,u,o.aiEditEvalsRetry]),R=b.useCallback(async()=>{try{const N=await Se.getSkillDetail(r,u);m({type:"SET_CONTENT",content:N.skillContent}),m({type:"CONTENT_SAVED"})}catch{}},[r,u]),O=yc();b.useEffect(()=>{if(O.events.length)for(const N of O.events){const D=N.data;if(N.event==="progress"&&m({type:"GENERATE_EVALS_PROGRESS",entry:{timestamp:Date.now(),phase:D.phase,message:D.message}}),N.event==="done"){const q=D;Se.saveEvals(r,u,q).then(Q=>m({type:"GENERATE_EVALS_DONE",evals:Q})).catch(Q=>m({type:"SET_ERROR",error:Q.message}))}N.event==="error"&&m({type:"GENERATE_EVALS_ERROR",classified:D})}},[O.events,r,u]),b.useEffect(()=>{O.error&&m({type:"SET_ERROR",error:O.error})},[O.error]),b.useEffect(()=>()=>{O.stop()},[O.stop]);const L=b.useCallback(async()=>{m({type:"GENERATE_EVALS_START"}),O.start(`/api/skills/${r}/${u}/generate-evals?sse`)},[r,u,O]),ee=yc();b.useEffect(()=>()=>{ee.stop()},[ee.stop]),b.useEffect(()=>{if(ee.events.length)for(const N of ee.events)N.event==="prompt_result"&&m({type:"ACTIVATION_RESULT",result:N.data}),N.event==="done"&&m({type:"ACTIVATION_DONE",summary:N.data})},[ee.events]),b.useEffect(()=>{ee.error&&m({type:"ACTIVATION_ERROR",error:ee.error})},[ee.error]);const X=b.useCallback(N=>{const q=N.trim().split(`
52
+ `).filter(Boolean).map(Q=>Q.startsWith("!")?{prompt:Q.slice(1).trim(),expected:"should_not_activate"}:Q.startsWith("+")?{prompt:Q.slice(1).trim(),expected:"should_activate"}:{prompt:Q.trim(),expected:"auto"});m({type:"ACTIVATION_START"}),ee.start(`/api/skills/${r}/${u}/activation-test`,{prompts:q})},[r,u,ee]),j=b.useMemo(()=>({state:o,dispatch:m,saveContent:B,saveEvals:Y,runCase:V,runAll:J,cancelCase:F,cancelAll:re,improveForCase:K,applyImproveAndRerun:se,refreshSkillContent:R,generateEvals:L,runActivationTest:X,submitAiEdit:$,cancelAiEdit:xe,applyAiEdit:I,discardAiEdit:fe,toggleEvalChange:pe,selectAllEvalChanges:Z,deselectAllEvalChanges:W,retryEvalsSave:ve}),[o,B,Y,V,J,F,re,K,se,R,L,X,$,xe,I,fe,pe,Z,W,ve]);return n.jsx(cm.Provider,{value:j,children:f})}function pv({state:r}){const{plugin:u,skill:f,evals:o,latestBenchmark:m,isDirty:h,caseRunStates:v,regressions:E,iterationCount:p}=r,x=Array.from(v.values()).some(Y=>Y.status==="running"||Y.status==="queued"),T=m==null?void 0:m.overall_pass_rate,g=(o==null?void 0:o.evals.reduce((Y,V)=>Y+V.assertions.length,0))??0,M=(o==null?void 0:o.evals.length)??0,G=T!=null?T>=80?"var(--green)":T>=50?"var(--yellow)":"var(--red)":"var(--text-tertiary)",B=T!=null?T>=80?"var(--green-muted)":T>=50?"var(--yellow-muted)":"var(--red-muted)":"var(--surface-3)";return n.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5",style:{borderBottom:"1px solid var(--border-subtle)",background:"var(--surface-1)",flexShrink:0},children:[n.jsxs("div",{className:"flex items-center gap-2 text-[13px]",children:[n.jsx("span",{style:{color:"var(--text-tertiary)"},children:u}),n.jsx(vv,{}),n.jsx("span",{className:"font-medium",style:{color:"var(--text-primary)"},children:f}),h&&n.jsx("span",{className:"ml-2 text-[10px] font-semibold uppercase tracking-wider px-1.5 py-0.5 rounded",style:{background:"var(--yellow-muted)",color:"var(--yellow)"},children:"unsaved"}),x&&n.jsxs("span",{className:"ml-2 flex items-center gap-1.5 text-[11px]",style:{color:"var(--accent)"},children:[n.jsx("span",{className:"spinner",style:{width:12,height:12,borderWidth:1.5}}),"Running..."]})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[E.length>0&&n.jsxs("span",{className:"pill",style:{background:"var(--red-muted)",color:"var(--red)"},children:[n.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[n.jsx("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),n.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),n.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),E.length," regression",E.length>1?"s":""]}),p>0&&n.jsxs("span",{className:"pill",style:{background:"var(--purple-muted)",color:"var(--purple)"},children:["Iter ",p]}),n.jsx("span",{className:"pill",style:{background:B,color:G},children:T!=null?`${Math.round(T*100)}%`:"--"}),n.jsxs("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:[M," case",M!==1?"s":""," / ",g," assert",g!==1?"s":""]})]})]})}function vv(){return n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",children:n.jsx("polyline",{points:"9 18 15 12 9 6"})})}const hv=[{label:"Build",tabs:[{id:"editor",label:"Editor",shortcut:"1"},{id:"tests",label:"Tests",shortcut:"2"}]},{label:"Evaluate",tabs:[{id:"run",label:"Run",shortcut:"3"},{id:"activation",label:"Activation",shortcut:"4"}]},{label:"Insights",tabs:[{id:"history",label:"History",shortcut:"5"},{id:"deps",label:"Deps",shortcut:"6"}]}];function yv({id:r}){const u={width:14,height:14,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"};switch(r){case"editor":return n.jsxs("svg",{...u,children:[n.jsx("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),n.jsx("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]});case"tests":return n.jsxs("svg",{...u,children:[n.jsx("path",{d:"M9 11l3 3L22 4"}),n.jsx("path",{d:"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"})]});case"run":return n.jsx("svg",{...u,children:n.jsx("polygon",{points:"5 3 19 12 5 21 5 3"})});case"activation":return n.jsxs("svg",{...u,children:[n.jsx("circle",{cx:"12",cy:"12",r:"10"}),n.jsx("circle",{cx:"12",cy:"12",r:"6"}),n.jsx("circle",{cx:"12",cy:"12",r:"2"})]});case"history":return n.jsxs("svg",{...u,children:[n.jsx("circle",{cx:"12",cy:"12",r:"10"}),n.jsx("polyline",{points:"12 6 12 12 16 14"})]});case"deps":return n.jsxs("svg",{...u,children:[n.jsx("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),n.jsx("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})]})}}function gv({activePanel:r,onPanelChange:u,isDirty:f,isRunning:o,hasRegressions:m,isActivationRunning:h}){return n.jsx("div",{className:"flex items-center gap-0.5 px-3 overflow-x-auto",style:{borderBottom:"1px solid var(--border-subtle)",background:"var(--surface-1)",flexShrink:0},children:hv.map((v,E)=>n.jsxs("div",{className:"flex items-center",children:[E>0&&n.jsx("div",{style:{width:1,height:20,background:"var(--border-subtle)",margin:"0 6px",flexShrink:0}}),v.tabs.map(p=>{const x=r===p.id,T=p.id==="editor"&&f||p.id==="run"&&o||p.id==="activation"&&h||p.id==="history"&&m,g=p.id==="run"||p.id==="activation"?"var(--accent)":p.id==="history"?"var(--red)":"var(--yellow)";return n.jsxs("button",{onClick:()=>u(p.id),title:`${p.label} (Ctrl+${p.shortcut})`,className:"relative flex items-center gap-1.5 px-3 py-2.5 text-[12px] font-medium transition-colors duration-150",style:{background:"transparent",color:x?"var(--text-primary)":"var(--text-tertiary)",borderBottom:x?"2px solid var(--accent)":"2px solid transparent",cursor:"pointer",border:"none",borderBottomWidth:2,borderBottomStyle:"solid",borderBottomColor:x?"var(--accent)":"transparent",whiteSpace:"nowrap"},onMouseEnter:M=>{x||(M.currentTarget.style.color="var(--text-secondary)")},onMouseLeave:M=>{x||(M.currentTarget.style.color="var(--text-tertiary)")},children:[n.jsx(yv,{id:p.id}),p.label,T&&n.jsx("span",{className:"absolute top-1.5 right-1 rounded-full",style:{width:5,height:5,background:g}})]},p.id)})]},v.label))})}function bv(r){const u=r.match(/^---\n([\s\S]*?)\n---\n?([\s\S]*)$/);if(!u)return{metadata:{},body:r};const f=u[1],o=u[2].trim(),m={},h=f.split(`
53
+ `);let v="",E=!1;for(const p of h){const x=p.match(/^[ \t]+([\w-]+):\s*(.*)$/);if(x&&v&&E){const M=x[1],G=x[2].trim();let B=m[v];if((typeof B!="object"||Array.isArray(B))&&(B={},m[v]=B),!G)B[M]=[];else{const Y=G.match(/^\[(.+)\]$/);Y?B[M]=Y[1].split(",").map(V=>V.trim().replace(/^["']|["']$/g,"")).filter(Boolean):B[M]=G.replace(/^["']|["']$/g,"")}continue}const T=p.match(/^\s+-\s+(.+)$/);if(T&&v){E=!1;const M=m[v];Array.isArray(M)?M.push(T[1].trim().replace(/^["']|["']$/g,"")):m[v]=[T[1].trim().replace(/^["']|["']$/g,"")];continue}const g=p.match(/^([\w-]+):\s*(.*)$/);if(g){v=g[1];const M=g[2].trim();if(E=!1,!M){m[v]={},E=!0;continue}const G=M.match(/^\[(.+)\]$/);if(G){m[v]=G[1].split(",").map(B=>B.trim().replace(/^["']|["']$/g,"")).filter(Boolean);continue}m[v]=M.replace(/^["']|["']$/g,"")}}return{metadata:m,body:o}}function um(r){if(!r)return"";let u=jv(r);return u=u.replace(/```(\w*)\n([\s\S]*?)```/g,'<pre style="background:var(--surface-2);padding:0.75rem;border-radius:6px;overflow-x:auto;font-size:12px;line-height:1.5;margin:0.5rem 0;border:1px solid var(--border-subtle)"><code>$2</code></pre>'),u=u.replace(/^### (.+)$/gm,'<div style="font-weight:600;font-size:14px;margin:0.75rem 0 0.25rem;color:var(--text-primary)">$1</div>'),u=u.replace(/^## (.+)$/gm,'<div style="font-weight:700;font-size:15px;margin:0.75rem 0 0.25rem;color:var(--text-primary)">$1</div>'),u=u.replace(/^# (.+)$/gm,'<div style="font-weight:700;font-size:1rem;margin:0.75rem 0 0.25rem;color:var(--text-primary)">$1</div>'),u=u.replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" target="_blank" rel="noopener noreferrer" style="color:var(--accent);text-decoration:underline">$1</a>'),u=u.replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>"),u=u.replace(/\*([^*]+)\*/g,"<em>$1</em>"),u=u.replace(/`([^`]+)`/g,'<code style="background:var(--surface-3);padding:0.1rem 0.3rem;border-radius:3px;font-size:0.85em">$1</code>'),u=u.replace(/^- (.+)$/gm,'<div style="padding-left:1rem;margin:0.15rem 0">• $1</div>'),u=u.replace(/^(\d+)\. (.+)$/gm,'<div style="padding-left:1rem;margin:0.15rem 0">$1. $2</div>'),u=u.replace(/\n\n/g,'<div style="height:0.5rem"></div>'),u=u.replace(/\n/g,"<br/>"),u}function jv(r){const u=r.split(`
54
+ `),f=[];let o=0;for(;o<u.length;)if(u[o].trim().startsWith("|")&&o+1<u.length&&u[o+1].trim().startsWith("|")&&/\|[\s-:]+\|/.test(u[o+1])){const m=$f(u[o]);o+=2;const h=[];for(;o<u.length&&u[o].trim().startsWith("|");)h.push($f(u[o])),o++;const v='style="text-align:left;padding:0.4rem 0.6rem;font-weight:600;font-size:12px;color:var(--text-primary);border-bottom:1px solid var(--border-default)"',E='style="padding:0.4rem 0.6rem;font-size:12px;color:var(--text-secondary);border-bottom:1px solid var(--border-subtle)"';let p='<table style="width:100%;border-collapse:collapse;margin:0.5rem 0;border:1px solid var(--border-subtle);border-radius:6px;overflow:hidden">';p+="<thead><tr>";for(const x of m)p+=`<th ${v}>${x}</th>`;p+="</tr></thead><tbody>";for(const x of h){p+="<tr>";for(const T of x)p+=`<td ${E}>${T}</td>`;p+="</tr>"}p+="</tbody></table>",f.push(p)}else f.push(u[o]),o++;return f.join(`
55
+ `)}function $f(r){return r.split("|").map(u=>u.trim()).filter(u=>u.length>0)}function Rc(r,u){const f=r.split(`
56
+ `),o=u.split(`
57
+ `);if(f.length>1e3||o.length>1e3)return[...f.map(T=>({type:"unchanged",content:T}))];const m=f.length,h=o.length,v=Array.from({length:m+1},()=>new Array(h+1).fill(0));for(let T=1;T<=m;T++)for(let g=1;g<=h;g++)f[T-1]===o[g-1]?v[T][g]=v[T-1][g-1]+1:v[T][g]=Math.max(v[T-1][g],v[T][g-1]);const E=[];let p=m,x=h;for(;p>0||x>0;)p>0&&x>0&&f[p-1]===o[x-1]?(E.push({type:"unchanged",content:f[p-1]}),p--,x--):x>0&&(p===0||v[p][x-1]>=v[p-1][x])?(E.push({type:"added",content:o[x-1]}),x--):(E.push({type:"removed",content:f[p-1]}),p--);return E.reverse()}function Sv(r,u){if(u&&new Set(["generating","comparing","judging","judging_assertion","preparing","parsing"]).has(r))return n.jsx("div",{className:"spinner",style:{width:10,height:10,flexShrink:0}});const o=new Set(["generating","comparing","preparing"]);return n.jsx("div",{className:"w-2.5 h-2.5 rounded-full flex-shrink-0",style:{background:o.has(r)?"var(--accent)":"var(--green)"}})}function zc({entries:r,isRunning:u}){const[f,o]=b.useState(!1),m=b.useRef(null);return b.useEffect(()=>{m.current&&!f&&(m.current.scrollTop=m.current.scrollHeight)},[r,f]),r.length===0&&!u?null:n.jsxs("div",{className:"mt-2 animate-fade-in",style:{borderTop:"1px solid var(--border-subtle)"},children:[n.jsxs("button",{onClick:()=>o(!f),className:"w-full flex items-center justify-between px-3 py-2 text-[11px] font-medium transition-colors duration-150",style:{color:"var(--text-tertiary)"},onMouseEnter:h=>{h.currentTarget.style.color="var(--text-primary)"},onMouseLeave:h=>{h.currentTarget.style.color="var(--text-tertiary)"},children:[n.jsxs("span",{className:"flex items-center gap-2",children:[u&&n.jsx("div",{className:"spinner",style:{width:10,height:10}}),"Progress Log (",r.length,")"]}),n.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",style:{transform:f?"rotate(0)":"rotate(180deg)",transition:"transform 0.2s ease"},children:n.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),!f&&n.jsx("div",{ref:m,className:"px-3 pb-3 space-y-1 max-h-48 overflow-y-auto",children:r.map((h,v)=>{const E=v===r.length-1&&u,p=v===0?"0s":`+${((h.timestamp-r[0].timestamp)/1e3).toFixed(1)}s`;return n.jsxs("div",{className:"flex items-center gap-2 text-[11px] animate-fade-in",style:{opacity:E?1:.7},children:[Sv(h.phase,E),n.jsx("span",{className:"font-mono flex-shrink-0",style:{color:"var(--text-tertiary)",width:40},children:p}),n.jsx("span",{style:{color:E?"var(--text-primary)":"var(--text-secondary)"},children:h.message}),h.current!=null&&h.total!=null&&n.jsxs("span",{className:"font-mono flex-shrink-0",style:{color:"var(--text-tertiary)"},children:["[",h.current,"/",h.total,"]"]})]},v)})})]})}const Wf={rate_limit:{icon:"⏱",color:"var(--amber, #f59e0b)"},context_window:{icon:"⚠",color:"var(--amber, #f59e0b)"},auth:{icon:"🔒",color:"var(--red, #ef4444)"},timeout:{icon:"⌛",color:"var(--amber, #f59e0b)"},provider_unavailable:{icon:"⚡",color:"var(--red, #ef4444)"},parse_error:{icon:"❓",color:"var(--amber, #f59e0b)"},unknown:{icon:"❌",color:"var(--red, #ef4444)"}};function Oc({error:r,onRetry:u,onDismiss:f}){const[o,m]=b.useState(null),h=b.useRef(null);b.useEffect(()=>(r.category==="rate_limit"&&r.retryAfterMs?m(Math.ceil(r.retryAfterMs/1e3)):m(null),()=>{h.current&&clearInterval(h.current)}),[r]),b.useEffect(()=>{if(!(o==null||o<=0))return h.current=setInterval(()=>{m(p=>p==null||p<=1?(h.current&&clearInterval(h.current),0):p-1)},1e3),()=>{h.current&&clearInterval(h.current)}},[o!=null&&o>0]);const v=Wf[r.category]||Wf.unknown,E=o!=null&&o>0;return n.jsxs("div",{className:"rounded-lg overflow-hidden animate-fade-in",style:{border:`1px solid color-mix(in srgb, ${v.color} 30%, transparent)`,background:`color-mix(in srgb, ${v.color} 6%, var(--surface-1))`},children:[n.jsxs("div",{className:"flex items-center justify-between px-3.5 py-2.5",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{style:{fontSize:14},children:v.icon}),n.jsx("span",{className:"text-[12px] font-semibold",style:{color:v.color},children:r.title})]}),f&&n.jsx("button",{onClick:f,className:"w-5 h-5 rounded flex items-center justify-center",style:{color:"var(--text-tertiary)"},children:n.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),n.jsxs("div",{className:"px-3.5 pb-3",children:[n.jsx("p",{className:"text-[11.5px] mb-1.5",style:{color:"var(--text-secondary)"},children:r.description}),n.jsx("p",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:r.hint}),(u||o!=null)&&n.jsx("div",{className:"flex items-center gap-2 mt-2.5",children:u&&n.jsx("button",{onClick:u,disabled:E,className:"btn btn-secondary text-[11px]",style:{padding:"4px 10px",opacity:E?.5:1},children:E?`Retry in ${o}s`:"Retry"})})]})]})}function Nv({plugin:r,skill:u,skillContent:f,onApplied:o}){const[m,h]=b.useState("closed"),[v,E]=b.useState(null),[p,x]=b.useState("claude-cli"),[T,g]=b.useState("opus"),[M,G]=b.useState([]),[B,Y]=b.useState(""),[V,J]=b.useState(""),[F,re]=b.useState(null),[K,se]=b.useState(null),[le,ae]=b.useState([]),[$,xe]=b.useState(!1),I=b.useRef(null);b.useEffect(()=>{Se.getConfig().then(O=>{E(O),O.providers.find(ee=>ee.id==="claude-cli"&&ee.available)&&(x("claude-cli"),g("opus"))}).catch(()=>{})},[]),b.useEffect(()=>()=>{var O;(O=I.current)==null||O.abort()},[]);function fe(){return v==null?void 0:v.providers.find(O=>O.id===p&&O.available)}const pe=b.useCallback(()=>{var O;(O=I.current)==null||O.abort(),h("open")},[]);async function Z(){h("loading"),re(null),se(null),ae([]);const O=new AbortController;I.current=O;try{const L=await fetch(`/api/skills/${encodeURIComponent(r)}/${encodeURIComponent(u)}/improve?sse`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:p,model:T}),signal:O.signal});if(!L.ok||!L.body)throw new Error(`HTTP ${L.status}`);const ee=L.body.getReader(),X=new TextDecoder;let j="",N="";for(;;){const{done:D,value:q}=await ee.read();if(D)break;j+=X.decode(q,{stream:!0});const Q=j.split(`
58
+ `);j=Q.pop()||"";for(const te of Q)if(te.startsWith("event: "))N=te.slice(7).trim();else if(te.startsWith("data: ")){try{const ce=JSON.parse(te.slice(6));N==="progress"?ae(Ze=>[...Ze,{phase:ce.phase,message:ce.message,timestamp:Date.now()}]):N==="done"||N==="complete"?(Y(ce.improved),J(ce.reasoning||""),G(Rc(ce.original||f,ce.improved)),h("diff_shown")):N==="error"&&(re(ce.message||ce.description||"Unknown error"),ce.category&&se(ce),h("open"))}catch{}N=""}}}catch(L){L.name!=="AbortError"&&(re(L.message),h("open"))}finally{I.current=null}}async function W(){xe(!0);try{await Se.applyImprovement(r,u,B),o(B),h("closed")}catch(O){re(O.message)}finally{xe(!1)}}function ve(){h("closed"),G([]),Y(""),J(""),re(null)}if(m==="closed")return n.jsxs("button",{onClick:()=>h("open"),className:"btn btn-secondary mb-5",disabled:!f,children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M12 2L2 7l10 5 10-5-10-5z"}),n.jsx("path",{d:"M2 17l10 5 10-5"}),n.jsx("path",{d:"M2 12l10 5 10-5"})]}),"Improve Skill"]});const R=fe();return n.jsxs("div",{className:"mb-5 rounded-xl overflow-hidden animate-fade-in",style:{border:"1px solid var(--border-subtle)",background:"var(--surface-1)"},children:[n.jsxs("div",{className:"flex items-center justify-between px-5 py-3.5",style:{background:"var(--surface-2)",borderBottom:"1px solid var(--border-subtle)"},children:[n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("div",{className:"w-7 h-7 rounded-lg flex items-center justify-center",style:{background:"rgba(168,85,247,0.15)"},children:n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"#a855f7",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M12 2L2 7l10 5 10-5-10-5z"}),n.jsx("path",{d:"M2 17l10 5 10-5"}),n.jsx("path",{d:"M2 12l10 5 10-5"})]})}),n.jsx("span",{className:"text-[13px] font-semibold",style:{color:"var(--text-primary)"},children:"AI Skill Improvement"})]}),n.jsx("button",{onClick:ve,className:"w-7 h-7 rounded-lg flex items-center justify-center transition-colors duration-150",style:{color:"var(--text-tertiary)"},onMouseEnter:O=>{O.currentTarget.style.background="var(--surface-3)"},onMouseLeave:O=>{O.currentTarget.style.background="transparent"},children:n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),n.jsxs("div",{className:"px-5 py-4",children:[(m==="open"||m==="loading")&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"flex items-end gap-3 mb-4",children:[n.jsxs("div",{className:"flex-1",children:[n.jsx("label",{className:"text-[11px] font-medium mb-1 block",style:{color:"var(--text-tertiary)"},children:"Provider"}),n.jsx("select",{className:"input-field text-[12px] py-1.5",value:p,onChange:O=>{x(O.target.value);const L=v==null?void 0:v.providers.find(ee=>ee.id===O.target.value);L!=null&&L.models[0]&&g(L.models[0].id)},disabled:m==="loading",children:v==null?void 0:v.providers.filter(O=>O.available).map(O=>n.jsx("option",{value:O.id,children:O.label},O.id))})]}),n.jsxs("div",{className:"flex-1",children:[n.jsx("label",{className:"text-[11px] font-medium mb-1 block",style:{color:"var(--text-tertiary)"},children:"Model"}),n.jsx("select",{className:"input-field text-[12px] py-1.5",value:T,onChange:O=>g(O.target.value),disabled:m==="loading",children:R==null?void 0:R.models.map(O=>n.jsx("option",{value:O.id,children:O.label},O.id))})]}),m==="loading"?n.jsx("button",{onClick:pe,className:"btn btn-secondary flex-shrink-0",children:"Cancel"}):n.jsx("button",{onClick:Z,className:"btn btn-primary flex-shrink-0",children:"Improve"})]}),m==="loading"&&le.length>0&&n.jsx("div",{className:"mt-3",children:n.jsx(zc,{entries:le,isRunning:!0})})]}),F&&n.jsx("div",{className:"mb-4",children:K?n.jsx(Oc,{error:K,onRetry:Z,onDismiss:()=>{re(null),se(null)}}):n.jsx("div",{className:"px-4 py-3 rounded-lg text-[13px]",style:{background:"var(--red-muted)",color:"var(--red)"},children:F})}),m==="diff_shown"&&n.jsxs(n.Fragment,{children:[V&&n.jsxs("div",{className:"mb-4 px-4 py-3 rounded-lg text-[12px]",style:{background:"rgba(168,85,247,0.08)",color:"var(--text-secondary)",border:"1px solid rgba(168,85,247,0.2)"},children:[n.jsx("span",{className:"font-semibold",style:{color:"#a855f7"},children:"AI Reasoning: "}),V]}),n.jsx("div",{className:"rounded-lg overflow-hidden mb-4",style:{border:"1px solid var(--border-subtle)",maxHeight:"400px",overflowY:"auto"},children:M.map((O,L)=>n.jsxs("div",{className:"px-3 py-0.5 text-[11px] font-mono",style:{background:O.type==="added"?"rgba(34,197,94,0.1)":O.type==="removed"?"rgba(239,68,68,0.1)":"transparent",color:O.type==="added"?"var(--green)":O.type==="removed"?"var(--red)":"var(--text-secondary)",borderLeft:O.type==="added"?"3px solid var(--green)":O.type==="removed"?"3px solid var(--red)":"3px solid transparent"},children:[n.jsx("span",{style:{userSelect:"none",opacity:.5,marginRight:8},children:O.type==="added"?"+":O.type==="removed"?"-":" "}),O.content]},L))}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("button",{onClick:W,disabled:$,className:"btn btn-primary",children:$?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"spinner",style:{width:12,height:12}})," Applying..."]}):n.jsxs(n.Fragment,{children:[n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"20 6 9 17 4 12"})})," Apply"]})}),n.jsx("button",{onClick:ve,className:"btn btn-secondary",children:"Discard"})]})]})]})]})}const Ff={remove:{bg:"var(--red-muted)",color:"var(--red)",label:"REMOVE"},modify:{bg:"rgba(251,191,36,0.15)",color:"#fbbf24",label:"MODIFY"},add:{bg:"var(--green-muted)",color:"var(--green)",label:"ADD"}},Ev={remove:"var(--red)",modify:"#fbbf24",add:"var(--green)"};function Tv({change:r,index:u,selected:f,onToggle:o,originalEval:m}){var g;const[h,v]=b.useState(!1),E=Ff[r.action]??Ff.add,p=Ev[r.action]??"var(--border-subtle)",x=r.action==="remove"?(m==null?void 0:m.name)??`Eval #${r.evalId}`:((g=r.eval)==null?void 0:g.name)??"Unnamed",T=b.useCallback(()=>o(u),[o,u]);return n.jsxs("div",{className:"rounded-lg transition-all duration-150",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)",borderLeft:`3px solid ${p}`,opacity:f?1:.5},children:[n.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5",children:[n.jsx("input",{type:"checkbox",checked:f,onChange:T,className:"flex-shrink-0",style:{accentColor:"var(--accent)"}}),n.jsx("span",{className:"pill text-[9px] font-bold flex-shrink-0",style:{background:E.bg,color:E.color,padding:"1px 6px"},children:E.label}),n.jsx("span",{className:"text-[12px] font-medium truncate",style:{color:"var(--text-primary)"},children:x}),n.jsx("span",{className:"text-[11px] truncate flex-1",style:{color:"var(--text-tertiary)"},children:r.reason}),n.jsx("button",{onClick:()=>v(!h),className:"flex-shrink-0 w-5 h-5 flex items-center justify-center rounded transition-colors duration-150",style:{color:"var(--text-tertiary)"},onMouseEnter:M=>{M.currentTarget.style.background="var(--surface-3)"},onMouseLeave:M=>{M.currentTarget.style.background="transparent"},children:n.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{transform:h?"rotate(90deg)":"rotate(0)",transition:"transform 0.15s ease"},children:n.jsx("polyline",{points:"9 18 15 12 9 6"})})})]}),h&&n.jsxs("div",{className:"px-4 pb-3 animate-fade-in",style:{borderTop:"1px solid var(--border-subtle)"},children:[r.action==="add"&&r.eval&&n.jsx(Cv,{evalCase:r.eval}),r.action==="modify"&&r.eval&&m&&n.jsx(Av,{original:m,proposed:r.eval}),r.action==="remove"&&m&&n.jsx(_v,{evalCase:m})]})]})}function Cv({evalCase:r}){var u;return n.jsxs("div",{className:"pt-2.5 space-y-2",children:[n.jsx(Tc,{label:"Prompt",value:r.prompt}),n.jsx(Tc,{label:"Expected",value:r.expected_output}),n.jsxs("div",{children:[n.jsxs("span",{className:"text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--text-tertiary)"},children:["Assertions (",((u=r.assertions)==null?void 0:u.length)??0,")"]}),n.jsx("div",{className:"mt-1 space-y-1",children:(r.assertions??[]).map(f=>n.jsxs("div",{className:"text-[11px] flex items-start gap-1.5",style:{color:"var(--text-secondary)"},children:[n.jsx("span",{style:{color:"var(--green)"},children:"+"})," ",f.text]},f.id))})]})]})}function Av({original:r,proposed:u}){const f=[];r.name!==u.name&&f.push({label:"Name",old:r.name,new:u.name}),r.prompt!==u.prompt&&f.push({label:"Prompt",old:r.prompt,new:u.prompt}),r.expected_output!==u.expected_output&&f.push({label:"Expected",old:r.expected_output,new:u.expected_output});const o=r.assertions??[],m=u.assertions??[],h=new Set(o.map(x=>x.text)),v=new Set(m.map(x=>x.text)),E=m.filter(x=>!h.has(x.text)),p=o.filter(x=>!v.has(x.text));return n.jsxs("div",{className:"pt-2.5 space-y-2",children:[f.map(x=>n.jsxs("div",{children:[n.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--text-tertiary)"},children:x.label}),n.jsxs("div",{className:"mt-1 text-[11px] font-mono rounded p-2",style:{background:"var(--surface-1)"},children:[n.jsxs("div",{style:{color:"var(--red)",textDecoration:"line-through"},children:["- ",Cc(x.old,120)]}),n.jsxs("div",{style:{color:"var(--green)"},children:["+ ",Cc(x.new,120)]})]})]},x.label)),(E.length>0||p.length>0)&&n.jsxs("div",{children:[n.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--text-tertiary)"},children:"Assertions"}),n.jsxs("div",{className:"mt-1 space-y-0.5",children:[p.map(x=>n.jsxs("div",{className:"text-[11px]",style:{color:"var(--red)"},children:["- ",x.text]},x.id)),E.map(x=>n.jsxs("div",{className:"text-[11px]",style:{color:"var(--green)"},children:["+ ",x.text]},x.id))]})]}),f.length===0&&E.length===0&&p.length===0&&n.jsx("div",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:"No visible field changes"})]})}function _v({evalCase:r}){var u;return n.jsxs("div",{className:"pt-2.5 space-y-2",style:{opacity:.7},children:[n.jsx(Tc,{label:"Prompt",value:r.prompt}),n.jsxs("div",{children:[n.jsxs("span",{className:"text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--text-tertiary)"},children:["Assertions (",((u=r.assertions)==null?void 0:u.length)??0,")"]}),n.jsx("div",{className:"mt-1 space-y-0.5",children:(r.assertions??[]).map(f=>n.jsx("div",{className:"text-[11px]",style:{color:"var(--red)",textDecoration:"line-through"},children:f.text},f.id))})]})]})}function Tc({label:r,value:u}){return n.jsxs("div",{children:[n.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--text-tertiary)"},children:r}),n.jsx("div",{className:"mt-0.5 text-[11px] p-2 rounded font-mono",style:{background:"var(--surface-1)",color:"var(--text-secondary)",whiteSpace:"pre-wrap"},children:Cc(u,300)})]})}function Cc(r,u){return r.length>u?r.slice(0,u)+"...":r}const If={remove:0,modify:1,add:2};function kv({changes:r,selections:u,currentEvals:f,onToggle:o,onSelectAll:m,onDeselectAll:h}){if(r.length===0)return null;const v=r.map((p,x)=>({change:p,originalIndex:x}));v.sort((p,x)=>(If[p.change.action]??2)-(If[x.change.action]??2));const E=Array.from(u.values()).filter(Boolean).length;return n.jsxs("div",{className:"mt-3 animate-fade-in",children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-[11px] font-semibold",style:{color:"var(--text-primary)"},children:"Test Case Changes"}),n.jsxs("span",{className:"text-[10px]",style:{color:"var(--text-tertiary)"},children:["(",E,"/",r.length," selected)"]})]}),n.jsxs("div",{className:"flex gap-1.5",children:[n.jsx("button",{onClick:m,className:"text-[10px] px-2 py-0.5 rounded transition-colors duration-150",style:{color:"var(--accent)",background:"transparent"},onMouseEnter:p=>{p.currentTarget.style.background="var(--accent-muted)"},onMouseLeave:p=>{p.currentTarget.style.background="transparent"},children:"Select All"}),n.jsx("button",{onClick:h,className:"text-[10px] px-2 py-0.5 rounded transition-colors duration-150",style:{color:"var(--text-tertiary)",background:"transparent"},onMouseEnter:p=>{p.currentTarget.style.background="var(--surface-3)"},onMouseLeave:p=>{p.currentTarget.style.background="transparent"},children:"Deselect All"})]})]}),n.jsx("div",{className:"space-y-1.5 overflow-auto",style:{maxHeight:240},children:v.map(({change:p,originalIndex:x})=>n.jsx(Tv,{change:p,index:x,selected:u.get(x)??!1,onToggle:o,originalEval:p.evalId!=null?f.find(T=>T.id===p.evalId):void 0},x))})]})}function Mv(){var O;const{state:r,dispatch:u,submitAiEdit:f,applyAiEdit:o,discardAiEdit:m,cancelAiEdit:h,toggleEvalChange:v,selectAllEvalChanges:E,deselectAllEvalChanges:p,retryEvalsSave:x}=tl(),{aiEditLoading:T,aiEditResult:g,aiEditError:M,aiEditClassifiedError:G,aiEditProgress:B,aiEditEvalChanges:Y,aiEditEvalSelections:V,aiEditEvalsRetry:J}=r,[F,re]=b.useState(""),[K,se]=b.useState(null),[le,ae]=b.useState("claude-cli"),[$,xe]=b.useState("opus"),I=b.useRef(null);b.useEffect(()=>{var L;(L=I.current)==null||L.focus()},[]),b.useEffect(()=>{Se.getConfig().then(L=>{se(L),L.providers.find(X=>X.id==="claude-cli"&&X.available)&&(ae("claude-cli"),xe("opus"))}).catch(()=>{})},[]);const fe=K==null?void 0:K.providers.find(L=>L.id===le&&L.available),pe=b.useCallback(()=>{const L=F.trim();!L||T||f(L,le,$)},[F,T,f,le,$]),Z=b.useCallback(L=>{L.key==="Enter"&&!L.shiftKey&&(L.preventDefault(),pe()),L.key==="Escape"&&(L.preventDefault(),T?h():m())},[pe,T,h,m]),W=b.useCallback(()=>{u({type:"CLOSE_AI_EDIT"}),u({type:"OPEN_AI_EDIT"})},[u]),ve=g?Rc(r.skillContent,g.improved):[],R=((O=r.evals)==null?void 0:O.evals)??[];return n.jsxs("div",{className:"animate-fade-in",style:{background:"var(--surface-1)",borderTop:"1px solid var(--border-subtle)"},children:[n.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5",style:{borderBottom:"1px solid var(--border-subtle)",background:"var(--surface-2)"},children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:"w-6 h-6 rounded-md flex items-center justify-center",style:{background:"rgba(168,85,247,0.15)"},children:n.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"#a855f7",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M15 4V2"}),n.jsx("path",{d:"M15 16v-2"}),n.jsx("path",{d:"M8 9h2"}),n.jsx("path",{d:"M20 9h2"}),n.jsx("path",{d:"M17.8 11.8L19 13"}),n.jsx("path",{d:"M15 9h.01"}),n.jsx("path",{d:"M17.8 6.2L19 5"}),n.jsx("path",{d:"M11 6.2L9.7 5"}),n.jsx("path",{d:"M3 21l9-9"})]})}),n.jsx("span",{className:"text-[12px] font-semibold",style:{color:"var(--text-primary)"},children:"AI Edit"}),n.jsx("span",{className:"text-[10px]",style:{color:"var(--text-tertiary)"},children:"Describe what to change — Enter to submit, Esc to dismiss"})]}),n.jsx("button",{onClick:m,className:"w-6 h-6 rounded-md flex items-center justify-center transition-colors duration-150",style:{color:"var(--text-tertiary)"},onMouseEnter:L=>{L.currentTarget.style.background="var(--surface-3)"},onMouseLeave:L=>{L.currentTarget.style.background="transparent"},children:n.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),n.jsxs("div",{className:"px-4 py-3",children:[!g&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"flex items-end gap-2.5",children:[n.jsx("div",{className:"flex-1",children:n.jsx("textarea",{ref:I,value:F,onChange:L=>re(L.target.value),onKeyDown:Z,placeholder:"e.g., Add an error handling section...",disabled:T,rows:1,className:"w-full resize-none outline-none",style:{background:"var(--surface-0)",color:"var(--text-primary)",border:"1px solid var(--border-subtle)",borderRadius:6,padding:"8px 12px",fontSize:12.5,lineHeight:1.5,fontFamily:"var(--font-mono, 'JetBrains Mono', ui-monospace, monospace)",minHeight:36,maxHeight:96},onInput:L=>{const ee=L.currentTarget;ee.style.height="auto",ee.style.height=Math.min(ee.scrollHeight,96)+"px"}})}),n.jsxs("div",{style:{minWidth:100},children:[n.jsx("label",{className:"text-[10px] font-medium mb-0.5 block",style:{color:"var(--text-tertiary)"},children:"Provider"}),n.jsx("select",{className:"input-field text-[11px] py-1",value:le,onChange:L=>{ae(L.target.value);const ee=K==null?void 0:K.providers.find(X=>X.id===L.target.value);ee!=null&&ee.models[0]&&xe(ee.models[0].id)},disabled:T,style:{width:"100%"},children:K==null?void 0:K.providers.filter(L=>L.available).map(L=>n.jsx("option",{value:L.id,children:L.label},L.id))})]}),n.jsxs("div",{style:{minWidth:80},children:[n.jsx("label",{className:"text-[10px] font-medium mb-0.5 block",style:{color:"var(--text-tertiary)"},children:"Model"}),n.jsx("select",{className:"input-field text-[11px] py-1",value:$,onChange:L=>xe(L.target.value),disabled:T,style:{width:"100%"},children:fe==null?void 0:fe.models.map(L=>n.jsx("option",{value:L.id,children:L.label},L.id))})]}),T?n.jsx("button",{onClick:h,className:"btn btn-secondary flex-shrink-0 text-[11px]",style:{padding:"6px 14px"},children:"Cancel"}):n.jsx("button",{onClick:pe,disabled:!F.trim(),className:"btn btn-primary flex-shrink-0 text-[11px]",style:{padding:"6px 14px"},children:"Submit"})]}),T&&B.length>0&&n.jsx("div",{className:"mt-2.5",children:n.jsx(zc,{entries:B,isRunning:!0})})]}),M&&n.jsx("div",{className:"mt-3",children:G?n.jsx(Oc,{error:G,onRetry:W,onDismiss:m}):n.jsx("div",{className:"px-3 py-2.5 rounded-lg text-[12px]",style:{background:"var(--red-muted)",color:"var(--red)"},children:M})}),g&&n.jsxs("div",{className:"animate-fade-in",children:[g.reasoning&&n.jsxs("div",{className:"mb-3 px-3 py-2.5 rounded-lg text-[11.5px]",style:{background:"rgba(168,85,247,0.08)",color:"var(--text-secondary)",border:"1px solid rgba(168,85,247,0.2)"},children:[n.jsx("span",{className:"font-semibold",style:{color:"#a855f7"},children:"AI Reasoning: "}),g.reasoning]}),n.jsx("div",{className:"mb-1",children:n.jsx("span",{className:"text-[11px] font-semibold",style:{color:"var(--text-primary)"},children:"SKILL.md Changes"})}),n.jsx("div",{className:"rounded-lg overflow-hidden mb-3",style:{border:"1px solid var(--border-subtle)",maxHeight:300,overflowY:"auto"},children:ve.map((L,ee)=>n.jsxs("div",{className:"px-3 py-0.5 text-[10.5px] font-mono",style:{background:L.type==="added"?"rgba(34,197,94,0.1)":L.type==="removed"?"rgba(239,68,68,0.1)":"transparent",color:L.type==="added"?"var(--green)":L.type==="removed"?"var(--red)":"var(--text-secondary)",borderLeft:L.type==="added"?"3px solid var(--green)":L.type==="removed"?"3px solid var(--red)":"3px solid transparent"},children:[n.jsx("span",{style:{userSelect:"none",opacity:.5,marginRight:8},children:L.type==="added"?"+":L.type==="removed"?"-":" "}),L.content]},ee))}),n.jsx(kv,{changes:Y,selections:V,currentEvals:R,onToggle:v,onSelectAll:E,onDeselectAll:p}),J&&n.jsxs("div",{className:"mt-3 px-3 py-2.5 rounded-lg text-[12px] flex items-center justify-between",style:{background:"rgba(251,191,36,0.12)",border:"1px solid rgba(251,191,36,0.3)",color:"#fbbf24"},children:[n.jsx("span",{children:"Test case save failed. SKILL.md was saved successfully."}),n.jsx("button",{onClick:x,className:"btn text-[11px]",style:{background:"rgba(251,191,36,0.2)",color:"#fbbf24",padding:"3px 10px"},children:"Retry Save"})]}),n.jsxs("div",{className:"flex gap-2 mt-3",children:[n.jsxs("button",{onClick:o,className:"btn btn-primary text-[11px]",style:{padding:"5px 12px"},children:[n.jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"20 6 9 17 4 12"})}),"Apply"]}),n.jsx("button",{onClick:m,className:"btn btn-secondary text-[11px]",style:{padding:"5px 12px"},children:"Discard"}),n.jsx("button",{onClick:W,className:"btn btn-ghost text-[11px]",style:{padding:"5px 12px"},children:"Try Again"})]})]})]})]})}function Rv({size:r=15}){return n.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("polyline",{points:"16 18 22 12 16 6"}),n.jsx("polyline",{points:"8 6 2 12 8 18"})]})}function zv({size:r=15}){return n.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"3"}),n.jsx("line",{x1:"12",y1:"3",x2:"12",y2:"21"})]})}function Ov({size:r=15}){return n.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),n.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}function wv({size:r=15}){return n.jsxs("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M15 4V2"}),n.jsx("path",{d:"M15 16v-2"}),n.jsx("path",{d:"M8 9h2"}),n.jsx("path",{d:"M20 9h2"}),n.jsx("path",{d:"M17.8 11.8L19 13"}),n.jsx("path",{d:"M15 9h.01"}),n.jsx("path",{d:"M17.8 6.2L19 5"}),n.jsx("path",{d:"M11 6.2L9.7 5"}),n.jsx("path",{d:"M3 21l9-9"})]})}function Dv(){const{state:r,dispatch:u,saveContent:f}=tl(),{plugin:o,skill:m,skillContent:h,isDirty:v,improveTarget:E,aiEditOpen:p}=r,[x,T]=b.useState("split"),[g,M]=b.useState(!1),G=b.useRef(null),{metadata:B,body:Y}=bv(h),V=B["allowed-tools"],J=Array.isArray(V)?V:typeof V=="string"?[V]:[],F=B.name,re=B.description,K=B.metadata,se=typeof K=="object"&&!Array.isArray(K)?K:null,le=B.version||(se==null?void 0:se.version),ae=B.tags||(se==null?void 0:se.tags),$=Array.isArray(ae)?ae:typeof ae=="string"?ae.split(",").map(W=>W.trim()).filter(Boolean):[],xe=new Set(["name","description","metadata","allowed-tools","version","tags"]),I=Object.entries(B).filter(([W])=>!xe.has(W)),fe=b.useCallback(async()=>{M(!0),await f(),M(!1)},[f]),pe=b.useCallback(W=>{(W.ctrlKey||W.metaKey)&&W.key==="s"&&(W.preventDefault(),W.stopPropagation(),v&&fe()),(W.ctrlKey||W.metaKey)&&W.key==="k"&&(W.preventDefault(),W.stopPropagation(),u({type:p?"CLOSE_AI_EDIT":"OPEN_AI_EDIT"}))},[v,fe,p,u]),Z=[{mode:"raw",icon:n.jsx(Rv,{}),label:"Editor"},{mode:"split",icon:n.jsx(zv,{}),label:"Split"},{mode:"preview",icon:n.jsx(Ov,{}),label:"Preview"}];return n.jsxs("div",{className:"flex flex-col h-full",onKeyDown:pe,tabIndex:-1,children:[n.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5",style:{borderBottom:"1px solid var(--border-subtle)",background:"var(--surface-1)"},children:[n.jsx("div",{className:"flex items-center",style:{background:"var(--surface-2)",borderRadius:8,padding:2,gap:1},children:Z.map(({mode:W,icon:ve,label:R})=>n.jsxs("button",{onClick:()=>T(W),title:R,className:"flex items-center gap-1.5 rounded-md transition-all duration-150",style:{padding:"5px 10px",background:x===W?"var(--surface-4)":"transparent",color:x===W?"var(--text-primary)":"var(--text-tertiary)",fontSize:11,fontWeight:x===W?600:400,border:"none",cursor:"pointer"},children:[ve,n.jsx("span",{style:{letterSpacing:"0.01em"},children:R})]},W))}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs("button",{onClick:()=>u({type:p?"CLOSE_AI_EDIT":"OPEN_AI_EDIT"}),title:"Edit with AI (Ctrl+K)",className:"flex items-center gap-1.5 rounded-md transition-all duration-150",style:{padding:"4px 10px",fontSize:11,fontWeight:p?600:400,border:"none",cursor:"pointer",color:p?"#a855f7":"var(--text-tertiary)",background:p?"rgba(168,85,247,0.12)":"transparent"},children:[n.jsx(wv,{size:13}),n.jsx("span",{children:"AI Edit"})]}),n.jsx("div",{style:{width:1,height:16,background:"var(--border-subtle)"}}),v&&n.jsx("button",{onClick:()=>u({type:"SET_CONTENT",content:r.savedContent}),className:"btn btn-ghost text-[11px]",style:{padding:"4px 8px"},children:"Discard"}),n.jsx("button",{onClick:fe,disabled:!v||g,className:"btn btn-primary text-[11px]",style:{padding:"5px 14px"},children:g?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"spinner",style:{width:11,height:11,borderWidth:1.5}})," Saving..."]}):"Save"})]})]}),n.jsxs("div",{className:"flex-1 overflow-hidden",style:{display:"grid",gridTemplateColumns:x==="raw"||x==="preview"?"1fr":"1fr 1fr"},children:[x!=="preview"&&n.jsx("div",{className:"flex flex-col overflow-hidden",style:{borderRight:x==="split"?"1px solid var(--border-subtle)":"none"},children:n.jsx("textarea",{ref:G,value:h,onChange:W=>u({type:"SET_CONTENT",content:W.target.value}),onKeyDown:pe,spellCheck:!1,className:"flex-1 w-full resize-none outline-none",style:{background:"var(--surface-0)",color:"var(--text-primary)",fontFamily:"var(--font-mono, 'JetBrains Mono', ui-monospace, monospace)",fontSize:12.5,lineHeight:1.7,tabSize:2,border:"none",padding:"16px 20px"}})}),x!=="raw"&&n.jsx("div",{className:"overflow-auto",style:{background:"var(--surface-0)"},children:n.jsxs("div",{className:"animate-fade-in",style:{padding:"20px 24px",maxWidth:720},children:[(F||le||re)&&n.jsxs("div",{style:{marginBottom:20},children:[n.jsxs("div",{className:"flex items-baseline gap-3",style:{marginBottom:8},children:[F&&n.jsx("h2",{style:{fontSize:18,fontWeight:700,color:"var(--text-primary)",letterSpacing:"-0.02em",lineHeight:1.2,margin:0},children:F}),le&&n.jsxs("span",{style:{fontSize:10,fontWeight:600,color:"var(--accent)",background:"var(--accent-muted)",padding:"2px 7px",borderRadius:4,letterSpacing:"0.03em",fontFamily:"var(--font-mono, ui-monospace, monospace)"},children:["v",le]})]}),re&&n.jsx("p",{style:{fontSize:12.5,lineHeight:1.65,color:"var(--text-secondary)",margin:0,paddingLeft:12,borderLeft:"2px solid var(--accent)",maxWidth:600},children:re})]}),$.length>0&&n.jsx("div",{className:"flex flex-wrap items-center gap-1.5",style:{marginBottom:16},children:$.map(W=>n.jsx("span",{style:{fontSize:10,fontWeight:500,color:"var(--text-tertiary)",background:"var(--surface-2)",padding:"3px 8px",borderRadius:4,letterSpacing:"0.02em"},children:W},W))}),J.length>0&&n.jsx("div",{style:{marginBottom:16},children:n.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[n.jsx("span",{style:{fontSize:10,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.06em",color:"var(--text-tertiary)",marginRight:4},children:"Tools"}),J.map(W=>n.jsx("span",{style:{fontSize:10.5,fontFamily:"var(--font-mono, ui-monospace, monospace)",color:"var(--accent)",background:"var(--accent-muted)",padding:"2px 7px",borderRadius:4},children:W},W))]})}),I.length>0&&n.jsx("div",{style:{marginBottom:16,padding:"8px 0",borderTop:"1px solid var(--border-subtle)",borderBottom:"1px solid var(--border-subtle)"},children:I.map(([W,ve],R)=>{const O=Array.isArray(ve)?ve.join(", "):typeof ve=="object"?Object.entries(ve).map(([L,ee])=>`${L}: ${Array.isArray(ee)?ee.join(", "):ee}`).join(" | "):ve;return n.jsxs("div",{className:"flex items-baseline gap-3",style:{padding:"4px 0",borderTop:R>0?"1px solid var(--border-subtle)":"none"},children:[n.jsx("span",{style:{fontSize:10,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.06em",color:"var(--text-tertiary)",minWidth:80,flexShrink:0},children:W}),n.jsx("span",{style:{fontSize:12,color:"var(--text-secondary)"},children:O})]},W)})}),(F||re||$.length>0||J.length>0||I.length>0)&&Y&&n.jsx("div",{style:{height:1,background:"linear-gradient(90deg, var(--accent) 0%, var(--border-subtle) 40%, transparent 100%)",marginBottom:20,opacity:.5}}),Y&&n.jsx("div",{className:"text-[13px] leading-relaxed overflow-x-auto",style:{color:"var(--text-secondary)",wordBreak:"break-word"},dangerouslySetInnerHTML:{__html:um(Y)}})]})})]}),p&&n.jsx(Mv,{}),E!==null&&o&&m&&n.jsx("div",{style:{borderTop:"1px solid var(--border-subtle)"},children:n.jsx(Nv,{plugin:o,skill:m,skillContent:h,onApplied:W=>{u({type:"SET_CONTENT",content:W}),u({type:"CONTENT_SAVED"}),u({type:"CLOSE_IMPROVE"})}})})]})}function Ac(r){return r>=.8?"var(--green)":r>=.5?"var(--yellow)":"var(--red)"}function om(r){const u=new Date(r);return u.toLocaleDateString(void 0,{month:"short",day:"numeric"})+", "+u.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",hour12:!1})}function dm(r){return r==null?"--":r>=1e3?`${(r/1e3).toFixed(1)}s`:`${r}ms`}function fm({entries:r}){if(r.length<2)return null;const u=80,f=24,o=2,m=r.slice().reverse(),h=m.length,v=m.map((E,p)=>{const x=o+p/(h-1)*(u-o*2),T=o+(f-o*2)-E.pass_rate*(f-o*2);return`${x},${T}`});return n.jsxs("svg",{width:u,height:f,style:{display:"block",flexShrink:0},children:[n.jsx("polyline",{points:v.join(" "),fill:"none",stroke:"var(--accent)",strokeWidth:1.5,strokeLinejoin:"round"}),v.length>0&&n.jsx("circle",{cx:parseFloat(v[v.length-1].split(",")[0]),cy:parseFloat(v[v.length-1].split(",")[1]),r:2.5,fill:"var(--accent)"})]})}function Lv(){var ae;const{state:r,dispatch:u,saveEvals:f,runCase:o,runAll:m,cancelCase:h,cancelAll:v,generateEvals:E}=tl(),{evals:p,selectedCaseId:x,inlineResults:T,caseRunStates:g,generateEvalsLoading:M,generateEvalsProgress:G,generateEvalsError:B}=r,Y=b.useMemo(()=>{for(const $ of g.values())if($.status==="running"||$.status==="queued")return!0;return!1},[g]),[V,J]=b.useState(!1),F={skill_name:r.skill,evals:[]},re=p??F,K=re.evals,se=K.find($=>$.id===x)??null,le=b.useCallback(()=>{E()},[E]);return!p||K.length===0?n.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 px-8",children:[n.jsx("div",{className:"w-12 h-12 rounded-xl flex items-center justify-center",style:{background:"var(--accent-muted)"},children:n.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M9 11l3 3L22 4"}),n.jsx("path",{d:"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"})]})}),n.jsxs("div",{className:"text-center",children:[n.jsx("div",{className:"text-[14px] font-medium mb-1",style:{color:"var(--text-primary)"},children:"No test cases yet"}),n.jsx("div",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:"Create test cases to start evaluating your skill"})]}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("button",{onClick:()=>J(!0),className:"btn btn-primary text-[12px]",children:"Create Test Case"}),n.jsx("button",{onClick:le,disabled:M,className:"btn btn-secondary text-[12px]",children:M?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"spinner",style:{width:12,height:12,borderWidth:1.5}})," Generating..."]}):"Generate with AI"})]}),M&&G.length>0&&n.jsx("div",{className:"w-full max-w-md mt-3",children:n.jsx(zc,{entries:G,isRunning:!0})}),B&&n.jsx("div",{className:"w-full max-w-md mt-3",children:n.jsx(Oc,{error:B,onRetry:le})}),V&&n.jsx(Pf,{evals:re,onSave:$=>{f($),J(!1)},onCancel:()=>J(!1)})]}):n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"280px 1fr",height:"100%",overflow:"hidden"},children:[n.jsxs("div",{className:"overflow-auto",style:{borderRight:"1px solid var(--border-subtle)",background:"var(--surface-1)"},children:[n.jsxs("div",{className:"px-3 py-2 flex items-center justify-between",style:{borderBottom:"1px solid var(--border-subtle)"},children:[n.jsxs("span",{className:"text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--text-tertiary)"},children:["Test Cases (",K.length,")"]}),n.jsx("div",{className:"flex items-center gap-1.5",children:Y?n.jsx("button",{onClick:v,className:"btn text-[10px] px-2 py-0.5",style:{background:"var(--red-muted)",color:"var(--red)",border:"1px solid rgba(239,68,68,0.3)"},children:"Cancel All"}):n.jsxs(n.Fragment,{children:[n.jsx("button",{onClick:()=>m("benchmark"),disabled:K.length===0,className:"btn btn-primary text-[10px] px-2 py-0.5",children:"Run All"}),n.jsx("button",{onClick:()=>m("comparison"),disabled:K.length===0,className:"btn btn-purple text-[10px] px-2 py-0.5",children:"Compare All"})]})})]}),n.jsx("div",{className:"py-1",children:K.map($=>{const xe=T.get($.id),I=x===$.id;return n.jsxs("button",{onClick:()=>u({type:"SELECT_CASE",caseId:$.id}),className:"w-full text-left px-3 py-2.5 transition-all duration-150",style:{background:I?"var(--accent-muted)":"transparent",borderLeft:I?"3px solid var(--accent)":"3px solid transparent"},onMouseEnter:fe=>{I||(fe.currentTarget.style.background="var(--surface-2)")},onMouseLeave:fe=>{I||(fe.currentTarget.style.background="transparent")},children:[n.jsxs("div",{className:"flex items-center justify-between mb-0.5",children:[n.jsxs("span",{className:"text-[12px] font-medium truncate",style:{color:I?"var(--text-primary)":"var(--text-secondary)"},children:["#",$.id," ",$.name]}),n.jsx(mm,{result:xe})]}),n.jsxs("div",{className:"text-[11px] flex items-center gap-2",style:{color:"var(--text-tertiary)"},children:[$.assertions.length," assertion",$.assertions.length!==1?"s":"",(xe==null?void 0:xe.passRate)!=null&&n.jsx(Hv,{passRate:xe.passRate})]})]},$.id)})}),n.jsx("div",{className:"px-3 py-2",children:n.jsx("button",{onClick:()=>J(!0),className:"w-full py-2 rounded-lg text-[12px] font-medium transition-all duration-150",style:{border:"1px dashed var(--border-default)",color:"var(--text-tertiary)",background:"transparent"},onMouseEnter:$=>{$.currentTarget.style.borderColor="var(--accent)",$.currentTarget.style.color="var(--accent)"},onMouseLeave:$=>{$.currentTarget.style.borderColor="var(--border-default)",$.currentTarget.style.color="var(--text-tertiary)"},children:"+ Add Test Case"})})]}),n.jsx("div",{className:"overflow-auto",children:se?n.jsx(Bv,{evalCase:se,result:T.get(se.id),evals:p,caseStatus:((ae=g.get(se.id))==null?void 0:ae.status)??"idle",onSaveEvals:f,onRun:$=>o($,"benchmark"),onCompare:$=>o($,"comparison"),onCancel:$=>h($),onImprove:$=>u({type:"OPEN_IMPROVE",evalId:$})}):n.jsx("div",{className:"flex items-center justify-center h-full text-[13px]",style:{color:"var(--text-tertiary)"},children:"Select a test case"})}),V&&n.jsx(Pf,{evals:re,onSave:$=>{f($),J(!1)},onCancel:()=>J(!1)})]})}function Bv({evalCase:r,result:u,evals:f,caseStatus:o,onSaveEvals:m,onRun:h,onCompare:v,onCancel:E,onImprove:p}){const[x,T]=b.useState(!1),[g,M]=b.useState(r.prompt),[G,B]=b.useState(!1),[Y,V]=b.useState(r.expected_output);b.useState(()=>{M(r.prompt),V(r.expected_output)});const J=b.useCallback(I=>{m({...f,evals:f.evals.map(fe=>fe.id===I.id?I:fe)})},[f,m]),F=b.useCallback(()=>{J({...r,prompt:g}),T(!1)},[r,g,J]),re=b.useCallback(()=>{J({...r,expected_output:Y}),B(!1)},[r,Y,J]),K=b.useCallback(()=>{J({...r,assertions:[...r.assertions,{id:`assert-${Date.now()}`,text:"New assertion",type:"boolean"}]})},[r,J]),se=b.useCallback((I,fe)=>{J({...r,assertions:r.assertions.map(pe=>pe.id===I?{...pe,text:fe}:pe)})},[r,J]),le=b.useCallback(I=>{J({...r,assertions:r.assertions.filter(fe=>fe.id!==I)})},[r,J]),ae=b.useCallback(()=>{confirm("Delete this test case?")&&m({...f,evals:f.evals.filter(I=>I.id!==r.id)})},[f,r.id,m]),$=u&&u.assertions.length>0&&u.assertions.every(I=>I.pass),xe=u&&u.assertions.some(I=>!I.pass);return n.jsxs("div",{className:"p-5 animate-fade-in",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs("span",{className:"text-[16px] font-semibold",style:{color:"var(--text-primary)"},children:["#",r.id," ",r.name]}),n.jsx(mm,{result:u})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[o==="running"||o==="queued"?n.jsxs("button",{onClick:()=>E(r.id),className:"btn text-[12px]",style:{background:"var(--red-muted)",color:"var(--red)",border:"1px solid rgba(239,68,68,0.3)"},children:[n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",style:{marginRight:4},children:n.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"1"})}),"Cancel"]}):n.jsxs(n.Fragment,{children:[n.jsx("button",{onClick:()=>h(r.id),className:"btn btn-primary text-[12px]",children:"Run"}),n.jsx("button",{onClick:()=>v(r.id),className:"btn btn-purple text-[12px]",children:"A/B Compare"})]}),xe&&o!=="running"&&o!=="queued"&&n.jsx("button",{onClick:()=>p(r.id),className:"btn btn-secondary text-[12px]",children:"Fix with AI"}),o!=="running"&&o!=="queued"&&n.jsx("button",{onClick:ae,className:"btn btn-ghost text-[12px]",style:{color:"var(--red)"},children:n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[n.jsx("polyline",{points:"3 6 5 6 21 6"}),n.jsx("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})]})})]})]}),$&&n.jsxs("div",{className:"mb-4 px-4 py-3 rounded-xl flex items-center gap-3",style:{background:"var(--green-muted)",border:"1px solid rgba(52, 211, 153, 0.2)"},children:[n.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"var(--green)",strokeWidth:"2.5",children:[n.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),n.jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]}),n.jsx("span",{className:"text-[13px] font-medium",style:{color:"var(--green)"},children:"All assertions passing"})]}),n.jsx(gc,{title:"Prompt",children:x?n.jsxs("div",{children:[n.jsx("textarea",{value:g,onChange:I=>M(I.target.value),className:"input-field w-full",rows:4,style:{fontFamily:"var(--font-mono, ui-monospace, monospace)",fontSize:12},autoFocus:!0}),n.jsxs("div",{className:"flex gap-2 mt-2",children:[n.jsx("button",{onClick:F,className:"btn btn-primary text-[12px]",children:"Save"}),n.jsx("button",{onClick:()=>{M(r.prompt),T(!1)},className:"btn btn-ghost text-[12px]",children:"Cancel"})]})]}):n.jsx("div",{className:"p-3 rounded-lg text-[12px] cursor-pointer transition-all duration-150",style:{background:"var(--surface-2)",color:"var(--text-secondary)",fontFamily:"var(--font-mono, ui-monospace, monospace)",whiteSpace:"pre-wrap",border:"1px solid var(--border-subtle)",maxHeight:200,overflowY:"auto"},onClick:()=>T(!0),onMouseEnter:I=>{I.currentTarget.style.borderColor="var(--border-hover)"},onMouseLeave:I=>{I.currentTarget.style.borderColor="var(--border-subtle)"},children:r.prompt||n.jsx("span",{style:{color:"var(--text-tertiary)",fontStyle:"italic"},children:"Click to edit prompt..."})})}),n.jsx(gc,{title:"Expected Output",children:G?n.jsxs("div",{children:[n.jsx("textarea",{value:Y,onChange:I=>V(I.target.value),className:"input-field w-full",rows:3,style:{fontFamily:"var(--font-mono, ui-monospace, monospace)",fontSize:12},autoFocus:!0}),n.jsxs("div",{className:"flex gap-2 mt-2",children:[n.jsx("button",{onClick:re,className:"btn btn-primary text-[12px]",children:"Save"}),n.jsx("button",{onClick:()=>{V(r.expected_output),B(!1)},className:"btn btn-ghost text-[12px]",children:"Cancel"})]})]}):n.jsx("div",{className:"p-3 rounded-lg text-[12px] cursor-pointer transition-all duration-150",style:{background:"var(--surface-2)",color:"var(--text-tertiary)",fontFamily:"var(--font-mono, ui-monospace, monospace)",whiteSpace:"pre-wrap",border:"1px solid var(--border-subtle)",maxHeight:200,overflowY:"auto"},onClick:()=>B(!0),onMouseEnter:I=>{I.currentTarget.style.borderColor="var(--border-hover)"},onMouseLeave:I=>{I.currentTarget.style.borderColor="var(--border-subtle)"},children:r.expected_output||n.jsx("span",{style:{fontStyle:"italic"},children:"Click to edit expected output..."})})}),n.jsx(gc,{title:`Assertions (${r.assertions.length})`,action:n.jsx("button",{onClick:K,className:"btn btn-ghost text-[11px]",children:"+ Add"}),children:r.assertions.length===0?n.jsx("div",{className:"text-[12px] text-center py-4",style:{color:"var(--text-tertiary)"},children:'No assertions. Click "+ Add" to create one.'}):n.jsx("div",{className:"space-y-2",children:r.assertions.map(I=>{const fe=u==null?void 0:u.assertions.find(pe=>pe.assertion_id===I.id);return n.jsx(Uv,{assertion:I,result:fe,onUpdate:pe=>se(I.id,pe),onDelete:()=>le(I.id)},I.id)})})}),(u==null?void 0:u.output)&&n.jsx(qv,{output:u.output,durationMs:u.durationMs,tokens:u.tokens}),n.jsx(Yv,{evalId:r.id})]},r.id)}function Uv({assertion:r,result:u,onUpdate:f,onDelete:o}){const[m,h]=b.useState(!1),[v,E]=b.useState(r.text),[p,x]=b.useState(!1),T=()=>{f(v),h(!1)};return n.jsx("div",{className:"rounded-lg px-3 py-2.5 transition-all duration-150",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)"},children:n.jsxs("div",{className:"flex items-start gap-2",children:[u?n.jsx("span",{className:"mt-0.5 rounded-full flex-shrink-0",style:{width:18,height:18,display:"flex",alignItems:"center",justifyContent:"center",background:u.pass?"var(--green-muted)":"var(--red-muted)"},children:u.pass?n.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"var(--green)",strokeWidth:"3",children:n.jsx("polyline",{points:"20 6 9 17 4 12"})}):n.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"var(--red)",strokeWidth:"3",children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}):n.jsx("span",{className:"mt-0.5 rounded-full flex-shrink-0",style:{width:18,height:18,border:"1.5px dashed var(--text-tertiary)",background:"transparent"},title:"Not run yet"}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:"flex items-center gap-2 mb-0.5",children:n.jsx("span",{className:"text-[10px] font-mono font-semibold",style:{color:"var(--text-tertiary)"},children:r.id})}),m?n.jsxs("div",{className:"flex gap-2",children:[n.jsx("input",{value:v,onChange:g=>E(g.target.value),onKeyDown:g=>{g.key==="Enter"&&T(),g.key==="Escape"&&h(!1)},className:"input-field flex-1 text-[12px]",autoFocus:!0}),n.jsx("button",{onClick:T,className:"btn btn-primary text-[11px]",children:"Save"})]}):n.jsx("div",{className:"text-[12px] cursor-pointer",style:{color:"var(--text-secondary)"},onClick:()=>{E(r.text),h(!0)},children:r.text}),(u==null?void 0:u.reasoning)&&n.jsx("button",{onClick:()=>x(!p),className:"text-[11px] mt-1 transition-colors duration-150",style:{color:"var(--text-tertiary)"},children:p?"Hide reasoning":"Show reasoning"}),p&&(u==null?void 0:u.reasoning)&&n.jsx("div",{className:"mt-1 text-[11px] p-2 rounded",style:{background:"var(--surface-1)",color:"var(--text-tertiary)"},children:u.reasoning})]}),n.jsx("button",{onClick:o,className:"btn btn-ghost p-1 opacity-0 group-hover:opacity-100",style:{color:"var(--text-tertiary)"},onMouseEnter:g=>{g.currentTarget.style.color="var(--red)",g.currentTarget.style.opacity="1"},onMouseLeave:g=>{g.currentTarget.style.color="var(--text-tertiary)",g.currentTarget.style.opacity=""},children:n.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})})}function gc({title:r,action:u,children:f}){return n.jsxs("div",{className:"mb-5",children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider",style:{color:"var(--text-tertiary)"},children:r}),u]}),f]})}function mm({result:r}){if(!r||r.status==null)return n.jsx("span",{className:"pill text-[10px]",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:"--"});const u=r.status==="pass";return n.jsx("span",{className:"pill text-[10px]",style:{background:u?"var(--green-muted)":"var(--red-muted)",color:u?"var(--green)":"var(--red)"},children:r.passRate!=null?`${Math.round(r.passRate*100)}%`:r.status})}function Hv({passRate:r}){const u=Math.round(r*100);return n.jsx("div",{className:"flex items-center gap-1",children:n.jsx("div",{className:"rounded-full overflow-hidden",style:{width:32,height:4,background:"var(--surface-4)"},children:n.jsx("div",{className:"h-full rounded-full",style:{width:`${u}%`,background:u>=80?"var(--green)":u>=50?"var(--yellow)":"var(--red)"}})})})}function qv({output:r,durationMs:u,tokens:f}){const[o,m]=b.useState(!1);return n.jsxs("div",{className:"mb-5",children:[n.jsxs("button",{onClick:()=>m(!o),className:"flex items-center gap-2 text-[11px] font-semibold uppercase tracking-wider mb-2 transition-colors duration-150",style:{color:"var(--text-tertiary)"},children:[n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{transform:o?"rotate(90deg)":"rotate(0)",transition:"transform 0.2s ease"},children:n.jsx("polyline",{points:"9 18 15 12 9 6"})}),"LLM Output",u!=null&&n.jsxs("span",{style:{fontWeight:400},children:["(",(u/1e3).toFixed(1),"s)"]}),f!=null&&n.jsxs("span",{style:{fontWeight:400},children:["(",f," tokens)"]})]}),o&&n.jsx("pre",{className:"text-[12px] p-4 rounded-lg overflow-auto animate-fade-in",style:{background:"var(--surface-1)",color:"var(--text-secondary)",border:"1px solid var(--border-subtle)",maxHeight:400,fontFamily:"var(--font-mono, ui-monospace, monospace)",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:r})]})}function Yv({evalId:r}){const{state:u,dispatch:f}=tl(),{plugin:o,skill:m}=u,[h,v]=b.useState(!0),[E,p]=b.useState(!1),[x,T]=b.useState({}),g=x[r]??null,M=b.useCallback(async Y=>{p(!0);try{const V=await Se.getCaseHistory(o,m,Y);T(J=>({...J,[Y]:V}))}catch{T(V=>({...V,[Y]:[]}))}finally{p(!1)}},[o,m]);b.useEffect(()=>{h&&!x[r]&&M(r)},[r,o,m]);const G=b.useCallback(()=>{const Y=!h;v(Y),Y&&!x[r]&&M(r)},[h,r,x,M]),B=g?g.slice(0,10):[];return n.jsxs("div",{className:"mb-5",children:[n.jsxs("button",{onClick:G,className:"flex items-center gap-2 text-[11px] font-semibold uppercase tracking-wider mb-2 transition-colors duration-150",style:{color:"var(--text-tertiary)"},children:[n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{transform:h?"rotate(90deg)":"rotate(0)",transition:"transform 0.2s ease"},children:n.jsx("polyline",{points:"9 18 15 12 9 6"})}),"Execution History",g&&g.length>0&&n.jsxs("span",{style:{fontWeight:400},children:["(",g.length," run",g.length!==1?"s":"",")"]})]}),h&&n.jsx("div",{className:"animate-fade-in",children:E?n.jsxs("div",{className:"flex items-center gap-2 py-3",children:[n.jsx("div",{className:"spinner",style:{width:14,height:14,borderWidth:1.5}}),n.jsx("span",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:"Loading history..."})]}):!g||g.length===0?n.jsx("div",{className:"text-[12px] py-3",style:{color:"var(--text-tertiary)"},children:"No history for this case"}):n.jsxs("div",{children:[B.length>=2&&n.jsx("div",{className:"mb-2",children:n.jsx(fm,{entries:B})}),n.jsx("div",{className:"space-y-2",children:B.map((Y,V)=>n.jsxs("div",{className:"rounded-lg px-3 py-2.5",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)"},children:[n.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[n.jsx("span",{className:"text-[12px] font-medium",style:{color:"var(--text-primary)"},children:om(Y.timestamp)}),n.jsx("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:Y.model}),n.jsx("span",{className:"pill",style:{fontSize:9,padding:"1px 6px",background:Y.type==="benchmark"?"rgba(99,131,255,0.15)":Y.type==="comparison"?"var(--purple-muted)":"rgba(251,146,60,0.15)",color:Y.type==="benchmark"?"#6383ff":Y.type==="comparison"?"var(--purple)":"#fb923c"},children:Y.type}),n.jsxs("span",{className:"text-[12px] font-semibold ml-auto",style:{color:Ac(Y.pass_rate)},children:[Math.round(Y.pass_rate*100),"%"]})]}),n.jsxs("div",{className:"flex items-center gap-4 mb-1.5 text-[10px]",style:{fontFamily:"var(--font-mono, monospace)",color:"var(--text-tertiary)"},children:[Y.durationMs!=null&&n.jsx("span",{children:dm(Y.durationMs)}),Y.tokens!=null&&n.jsxs("span",{children:[Y.tokens>=1e3?`${(Y.tokens/1e3).toFixed(1)}k`:Y.tokens," tok"]})]}),n.jsx("div",{className:"space-y-0.5",children:Y.assertions.map(J=>n.jsxs("div",{className:"flex items-start gap-1.5",children:[n.jsx("span",{className:"mt-0.5 rounded-full flex-shrink-0",style:{width:14,height:14,display:"flex",alignItems:"center",justifyContent:"center",background:J.pass?"var(--green-muted)":"var(--red-muted)"},children:J.pass?n.jsx("svg",{width:"8",height:"8",viewBox:"0 0 24 24",fill:"none",stroke:"var(--green)",strokeWidth:"3",children:n.jsx("polyline",{points:"20 6 9 17 4 12"})}):n.jsxs("svg",{width:"8",height:"8",viewBox:"0 0 24 24",fill:"none",stroke:"var(--red)",strokeWidth:"3",children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),n.jsx("span",{className:"text-[11px]",style:{color:"var(--text-secondary)"},children:J.text})]},J.id))})]},V))}),n.jsx("button",{onClick:()=>f({type:"SET_PANEL",panel:"history"}),className:"mt-2 text-[11px] font-medium transition-colors duration-150",style:{color:"var(--accent)"},onMouseEnter:Y=>{Y.currentTarget.style.textDecoration="underline"},onMouseLeave:Y=>{Y.currentTarget.style.textDecoration="none"},children:"View full history →"})]})})]})}function Pf({evals:r,onSave:u,onCancel:f}){const[o,m]=b.useState(""),[h,v]=b.useState(""),[E,p]=b.useState(""),[x,T]=b.useState([{id:`assert-${Date.now()}`,text:"",type:"boolean"}]),g=Math.max(0,...r.evals.map(G=>G.id))+1,M=()=>{if(!o.trim()||!h.trim())return;const G={id:g,name:o.trim(),prompt:h.trim(),expected_output:E.trim(),files:[],assertions:x.filter(B=>B.text.trim())};u({...r,evals:[...r.evals,G]})};return n.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center animate-overlay-in",style:{background:"rgba(0,0,0,0.6)"},children:n.jsxs("div",{className:"w-full max-w-lg rounded-xl p-6 animate-modal-in",style:{background:"var(--surface-1)",border:"1px solid var(--border-subtle)"},children:[n.jsx("div",{className:"text-[15px] font-semibold mb-4",style:{color:"var(--text-primary)"},children:"New Test Case"}),n.jsxs("label",{className:"block mb-3",children:[n.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider mb-1 block",style:{color:"var(--text-tertiary)"},children:"Name"}),n.jsx("input",{value:o,onChange:G=>m(G.target.value),className:"input-field",placeholder:"e.g., auth-check",autoFocus:!0})]}),n.jsxs("label",{className:"block mb-3",children:[n.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider mb-1 block",style:{color:"var(--text-tertiary)"},children:"Prompt"}),n.jsx("textarea",{value:h,onChange:G=>v(G.target.value),className:"input-field",rows:3,placeholder:"User prompt to test..."})]}),n.jsxs("label",{className:"block mb-3",children:[n.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider mb-1 block",style:{color:"var(--text-tertiary)"},children:"Expected Output"}),n.jsx("textarea",{value:E,onChange:G=>p(G.target.value),className:"input-field",rows:2,placeholder:"Description of expected behavior..."})]}),n.jsxs("div",{className:"mb-4",children:[n.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider mb-2 block",style:{color:"var(--text-tertiary)"},children:"Assertions"}),x.map((G,B)=>n.jsxs("div",{className:"flex gap-2 mb-2",children:[n.jsx("input",{value:G.text,onChange:Y=>T(x.map((V,J)=>J===B?{...V,text:Y.target.value}:V)),className:"input-field flex-1 text-[12px]",placeholder:"e.g., Output includes a greeting"}),x.length>1&&n.jsx("button",{onClick:()=>T(x.filter((Y,V)=>V!==B)),className:"btn btn-ghost p-1",style:{color:"var(--text-tertiary)"},children:n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]},G.id)),n.jsx("button",{onClick:()=>T([...x,{id:`assert-${Date.now()}`,text:"",type:"boolean"}]),className:"text-[11px] mt-1 transition-colors duration-150",style:{color:"var(--accent)"},children:"+ Add Assertion"})]}),n.jsxs("div",{className:"flex justify-end gap-2",children:[n.jsx("button",{onClick:f,className:"btn btn-secondary text-[12px]",children:"Cancel"}),n.jsx("button",{onClick:M,disabled:!o.trim()||!h.trim(),className:"btn btn-primary text-[12px]",children:"Save"})]})]})})}function Gv(){const{state:r,runCase:u,runAll:f,cancelCase:o,cancelAll:m}=tl(),{evals:h,caseRunStates:v,bulkRunActive:E,latestBenchmark:p,inlineResults:x}=r,T=(h==null?void 0:h.evals)??[],g=b.useMemo(()=>{for(const B of v.values())if(B.status==="running"||B.status==="queued")return!0;return!1},[v]),M=T.filter(B=>{const Y=v.get(B.id);return Y&&(Y.status==="complete"||Y.status==="error"||Y.status==="cancelled")}).length,G=T.filter(B=>{const Y=v.get(B.id);return Y&&(Y.status==="running"||Y.status==="queued")}).length;return n.jsxs("div",{className:"p-5",children:[n.jsxs("div",{className:"rounded-xl p-4 mb-5",style:{background:"var(--surface-1)",border:"1px solid var(--border-subtle)"},children:[n.jsxs("div",{className:"flex items-center justify-between mb-3",children:[n.jsx("span",{className:"text-[13px] font-semibold",style:{color:"var(--text-primary)"},children:"Benchmark"}),g&&n.jsxs("span",{className:"text-[11px] font-medium",style:{color:"var(--accent)"},children:[G," running"]})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[g&&n.jsxs("button",{onClick:m,className:"btn text-[12px]",style:{background:"var(--red-muted)",color:"var(--red)",border:"1px solid rgba(239,68,68,0.3)"},children:[n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",style:{marginRight:4},children:n.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"1"})}),"Cancel All"]}),n.jsx("button",{onClick:()=>f("comparison"),disabled:T.length===0||g,className:"btn btn-primary text-[12px]",children:"Compare All"}),n.jsx("button",{onClick:()=>f("benchmark"),disabled:T.length===0||g,className:"btn btn-secondary text-[12px]",children:"Skill Only"}),n.jsx("button",{onClick:()=>f("baseline"),disabled:T.length===0||g,className:"btn btn-secondary text-[12px]",children:"Baseline Only"})]})]}),g&&T.length>0&&n.jsxs("div",{className:"mb-5",children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsxs("span",{className:"text-[12px] font-medium",style:{color:"var(--text-secondary)"},children:["Progress: ",M,"/",T.length," cases"]}),n.jsxs("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:[Math.round(M/T.length*100),"%"]})]}),n.jsx("div",{className:"rounded-full overflow-hidden",style:{height:6,background:"var(--surface-3)"},children:n.jsx("div",{className:"h-full rounded-full transition-all duration-500",style:{width:`${M/T.length*100}%`,background:"var(--accent)"}})})]}),n.jsx("div",{className:"space-y-3 stagger-children",children:T.map(B=>{const Y=x.get(B.id),V=v.get(B.id),J=(V==null?void 0:V.status)??"idle";return n.jsx(Qv,{name:B.name,evalId:B.id,result:Y,caseStatus:J,runMode:(V==null?void 0:V.mode)??null,onRun:F=>u(F,"benchmark"),onBaseline:F=>u(F,"baseline"),onCompare:F=>u(F,"comparison"),onCancel:F=>o(F)},B.id)})}),!g&&p&&p.cases.length>0&&n.jsxs("div",{className:"mt-5",children:[n.jsxs("div",{className:"rounded-xl p-4 mb-4",style:{background:"var(--surface-1)",border:"1px solid var(--border-subtle)"},children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-[13px] font-semibold",style:{color:"var(--text-primary)"},children:"Overall Pass Rate"}),n.jsx("span",{className:"text-[20px] font-bold",style:{color:(p.overall_pass_rate??0)>=.8?"var(--green)":(p.overall_pass_rate??0)>=.5?"var(--yellow)":"var(--red)"},children:p.overall_pass_rate!=null?`${Math.round(p.overall_pass_rate*100)}%`:"--"})]}),p.totalDurationMs!=null&&n.jsxs("div",{className:"text-[11px] mt-1",style:{color:"var(--text-tertiary)"},children:["Total: ",(p.totalDurationMs/1e3).toFixed(1),"s",p.model&&` | Model: ${p.model}`]})]}),p.comparison&&n.jsxs("div",{className:"rounded-xl p-4",style:{background:"var(--surface-1)",border:"1px solid var(--border-subtle)"},children:[n.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-wider mb-3",style:{color:"var(--text-tertiary)"},children:"Skill vs Baseline"}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsx(em,{label:"Skill",value:p.comparison.skillPassRate,color:"var(--accent)"}),n.jsx(em,{label:"Baseline",value:p.comparison.baselinePassRate,color:"var(--text-tertiary)"})]}),n.jsxs("div",{className:"mt-3 text-[12px] font-medium",style:{color:p.comparison.delta>0?"var(--green)":p.comparison.delta<0?"var(--red)":"var(--text-tertiary)"},children:["Delta: ",p.comparison.delta>0?"+":"",(p.comparison.delta*100).toFixed(1),"%",p.verdict&&` | ${p.verdict}`]})]})]})]})}const Vv={benchmark:{label:"Skill",bg:"var(--accent-muted)",color:"var(--accent)"},baseline:{label:"Baseline",bg:"var(--surface-3)",color:"var(--text-tertiary)"},comparison:{label:"Compare",bg:"rgba(168,85,247,0.12)",color:"rgb(168,85,247)"}};function Qv({name:r,evalId:u,result:f,caseStatus:o,runMode:m,onRun:h,onBaseline:v,onCompare:E,onCancel:p}){const[x,T]=b.useState(!1),g=o==="running"||o==="queued",M=o==="complete"||o==="error";return n.jsxs("div",{className:"rounded-xl overflow-hidden transition-all duration-200",style:{background:"var(--surface-1)",border:g?"1px solid var(--accent)":"1px solid var(--border-subtle)",boxShadow:g?"0 0 12px rgba(99, 131, 255, 0.15)":"none"},children:[n.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[o==="running"&&n.jsx("span",{className:"spinner",style:{width:14,height:14,borderWidth:1.5}}),o==="queued"&&n.jsx("span",{className:"text-[10px] font-medium",style:{color:"var(--text-tertiary)"},children:"queued"}),n.jsxs("span",{className:"text-[13px] font-medium",style:{color:"var(--text-primary)"},children:["#",u," ",r]}),m&&(g||M)&&(()=>{const G=Vv[m];return G?n.jsx("span",{className:"pill text-[9px] font-semibold",style:{background:G.bg,color:G.color,padding:"1px 6px"},children:G.label}):null})()]}),n.jsxs("div",{className:"flex items-center gap-2",children:[g?n.jsx("button",{onClick:()=>p(u),className:"btn text-[10px] px-2 py-1",style:{background:"var(--red-muted)",color:"var(--red)",border:"1px solid rgba(239,68,68,0.3)"},children:"Cancel"}):n.jsxs(n.Fragment,{children:[n.jsx("button",{onClick:()=>E(u),className:"btn btn-primary text-[10px] px-2 py-1",children:"Compare"}),n.jsx("button",{onClick:()=>h(u),className:"btn btn-secondary text-[10px] px-2 py-1",children:"Skill"}),n.jsx("button",{onClick:()=>v(u),className:"btn btn-secondary text-[10px] px-2 py-1",children:"Base"})]}),f&&f.status!=null&&n.jsx("span",{className:"pill text-[10px]",style:{background:f.status==="pass"?"var(--green-muted)":(f.status==="error","var(--red-muted)"),color:f.status==="pass"?"var(--green)":"var(--red)"},children:f.passRate!=null?`${Math.round(f.passRate*100)}%`:f.status}),o==="cancelled"&&n.jsx("span",{className:"pill text-[10px]",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:"cancelled"})]})]}),f&&f.assertions.length>0&&n.jsxs("div",{className:"px-4 pb-3",children:[n.jsx("div",{className:"space-y-1",children:f.assertions.map(G=>n.jsxs("div",{className:"flex items-center gap-2 text-[11px]",children:[n.jsx("span",{style:{color:G.pass?"var(--green)":"var(--red)"},children:G.pass?"PASS":"FAIL"}),n.jsx("span",{style:{color:"var(--text-secondary)"},children:G.text})]},G.assertion_id))}),f.output&&n.jsx("button",{onClick:()=>T(!x),className:"text-[11px] mt-2 transition-colors duration-150",style:{color:"var(--text-tertiary)"},children:x?"Hide output":"Show output"}),x&&f.output&&n.jsx("pre",{className:"text-[11px] mt-2 p-3 rounded-lg overflow-auto",style:{background:"var(--surface-0)",color:"var(--text-secondary)",border:"1px solid var(--border-subtle)",maxHeight:200,fontFamily:"var(--font-mono, ui-monospace, monospace)",whiteSpace:"pre-wrap"},children:f.output})]}),f&&f.errorMessage&&n.jsx("div",{className:"px-4 pb-3",children:n.jsx("div",{className:"text-[11px] p-2 rounded-lg",style:{background:"var(--red-muted)",color:"var(--red)"},children:f.errorMessage})})]})}function em({label:r,value:u,color:f}){return n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center justify-between mb-1",children:[n.jsx("span",{className:"text-[11px]",style:{color:"var(--text-secondary)"},children:r}),n.jsxs("span",{className:"text-[12px] font-semibold",style:{color:f},children:[Math.round(u*100),"%"]})]}),n.jsx("div",{className:"rounded-full overflow-hidden",style:{height:6,background:"var(--surface-3)"},children:n.jsx("div",{className:"h-full rounded-full transition-all duration-500",style:{width:`${u*100}%`,background:f}})})]})}const tm={TP:{bg:"var(--green-muted)",text:"var(--green)"},TN:{bg:"rgba(52,211,153,0.06)",text:"rgba(52,211,153,0.6)"},FP:{bg:"var(--red-muted)",text:"var(--red)"},FN:{bg:"rgba(248,113,113,0.06)",text:"rgba(248,113,113,0.6)"}},Xv=[{label:"Should activate",prompts:["+How do I use this feature?","+Show me best practices for this","+What's the recommended approach?"]},{label:"Should NOT activate",prompts:["!What's the weather today?","!Write me a poem","!How do I cook pasta?"]}];function Zv(){const{state:r,dispatch:u,runActivationTest:f}=tl(),{plugin:o,skill:m,activationPrompts:h,activationResults:v,activationSummary:E,activationRunning:p,activationError:x}=r,[T,g]=b.useState(h),[M,G]=b.useState(null),[B,Y]=b.useState(!1);b.useEffect(()=>{u({type:"SET_ACTIVATION_PROMPTS",prompts:T})},[T,u]),b.useEffect(()=>{fetch(`/api/skills/${o}/${m}/description`).then(K=>K.json()).then(K=>G(K.rawContent||K.description||null)).catch(()=>G(null))},[o,m]);function V(){f(T)}function J(K){const se=T.trim(),le=se?`${se}
59
+ ${K.join(`
60
+ `)}`:K.join(`
61
+ `);g(le)}const F=v.filter(K=>K.classification==="TP"||K.classification==="TN"),re=v.filter(K=>K.classification==="FP"||K.classification==="FN");return n.jsxs("div",{className:"p-5",children:[n.jsxs("div",{className:"mb-5",children:[n.jsx("div",{className:"text-[14px] font-semibold",style:{color:"var(--text-primary)"},children:"Activation Test"}),n.jsx("div",{className:"text-[12px] mt-1",style:{color:"var(--text-tertiary)"},children:"Test whether this skill's description activates for relevant prompts and stays silent for irrelevant ones."})]}),n.jsxs("div",{className:"grid grid-cols-5 gap-4 mb-5",children:[n.jsxs("div",{className:"col-span-3",children:[n.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[n.jsx("label",{className:"text-[12px] font-medium",style:{color:"var(--text-secondary)"},children:"Test Prompts"}),n.jsx("div",{className:"flex gap-1.5",children:Xv.map(K=>n.jsxs("button",{onClick:()=>J(K.prompts),className:"text-[10px] px-2 py-1 rounded-md transition-colors duration-150",style:{background:"var(--surface-2)",color:"var(--text-tertiary)"},onMouseEnter:se=>{se.currentTarget.style.color="var(--text-primary)",se.currentTarget.style.background="var(--surface-3)"},onMouseLeave:se=>{se.currentTarget.style.color="var(--text-tertiary)",se.currentTarget.style.background="var(--surface-2)"},children:["+ ",K.label]},K.label))})]}),n.jsx("textarea",{className:"input-field h-32 resize-y font-mono text-[12px]",value:T,onChange:K=>g(K.target.value),placeholder:`How do I write a unit test?
62
+ What edge cases should I test?
63
+ +Deploy this to production
64
+ !What's the weather like today?
65
+ !Write me a poem about flowers`}),n.jsxs("div",{className:"flex items-center gap-4 mt-1.5 text-[11px]",style:{color:"var(--text-tertiary)"},children:[n.jsx("span",{children:"One prompt per line"}),n.jsx("span",{children:"No prefix = auto-classify"}),n.jsxs("span",{className:"flex items-center gap-1",children:[n.jsx("code",{className:"px-1 rounded",style:{background:"var(--surface-2)"},children:"+"})," = must activate"]}),n.jsxs("span",{className:"flex items-center gap-1",children:[n.jsx("code",{className:"px-1 rounded",style:{background:"var(--surface-2)"},children:"!"})," = must NOT activate"]}),n.jsxs("span",{children:[T.trim().split(`
66
+ `).filter(Boolean).length," prompt",T.trim().split(`
67
+ `).filter(Boolean).length!==1?"s":""]})]})]}),n.jsx("div",{className:"col-span-2 flex flex-col",children:n.jsxs("div",{className:`glass-card flex flex-col ${B?"flex-1":""}`,children:[n.jsxs("button",{onClick:()=>Y(!B),className:"w-full p-3 flex items-center justify-between text-left flex-shrink-0",style:{borderBottom:B?"1px solid var(--border-subtle)":void 0},children:[n.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-widest",style:{color:"var(--text-tertiary)"},children:"Skill Description"}),n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2.5",style:{transform:B?"rotate(180deg)":"rotate(0)",transition:"transform 0.2s ease"},children:n.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),B&&M&&n.jsx("div",{className:"p-3 flex-1 overflow-auto animate-fade-in",style:{maxHeight:320},children:n.jsx("div",{className:"text-[12px] leading-relaxed",style:{color:"var(--text-secondary)"},dangerouslySetInnerHTML:{__html:um(M)}})}),!B&&M&&n.jsx("div",{className:"px-3 pb-3 pt-1",children:n.jsx("div",{className:"text-[11px] line-clamp-2 leading-relaxed",style:{color:"var(--text-tertiary)"},children:M.replace(/^---[\s\S]*?---\s*/,"").trim().slice(0,150)})})]})})]}),n.jsx("button",{onClick:V,disabled:p||!T.trim(),className:"btn btn-primary mb-5",children:p?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"spinner",style:{borderTopColor:"#fff",borderColor:"rgba(255,255,255,0.2)",width:14,height:14}})," Testing..."]}):n.jsxs(n.Fragment,{children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("circle",{cx:"12",cy:"12",r:"10"}),n.jsx("circle",{cx:"12",cy:"12",r:"6"}),n.jsx("circle",{cx:"12",cy:"12",r:"2"})]})," Run Activation Test"]})}),x&&n.jsx("div",{className:"mb-5 px-4 py-3 rounded-lg text-[13px]",style:{background:"var(--red-muted)",color:"var(--red)",border:"1px solid rgba(248,113,113,0.2)"},children:x}),v.length>0&&n.jsxs("div",{className:"space-y-5 mb-5",children:[re.length>0&&n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--red)",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("circle",{cx:"12",cy:"12",r:"10"}),n.jsx("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),n.jsx("line",{x1:"9",y1:"9",x2:"15",y2:"15"})]}),n.jsxs("span",{className:"text-[12px] font-semibold",style:{color:"var(--red)"},children:["Incorrect (",re.length,")"]}),n.jsx("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:"— These need attention"})]}),n.jsx("div",{className:"space-y-1.5 stagger-children",children:re.map((K,se)=>n.jsx(lm,{result:K},`incorrect-${se}`))})]}),F.length>0&&n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--green)",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("circle",{cx:"12",cy:"12",r:"10"}),n.jsx("polyline",{points:"16 10 11 15 8 12"})]}),n.jsxs("span",{className:"text-[12px] font-semibold",style:{color:"var(--green)"},children:["Correct (",F.length,")"]})]}),n.jsx("div",{className:"space-y-1.5 stagger-children",children:F.map((K,se)=>n.jsx(lm,{result:K},`correct-${se}`))})]})]}),E&&n.jsxs("div",{className:"glass-card p-6 animate-fade-in-scale",style:{borderColor:"var(--border-active)",borderWidth:2},children:[n.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-widest mb-2",style:{color:"var(--text-tertiary)"},children:"Summary"}),E.autoClassifiedCount!=null&&E.autoClassifiedCount>0&&n.jsxs("div",{className:"text-[11px] mb-3",style:{color:"var(--text-tertiary)"},children:[E.autoClassifiedCount," of ",E.total," prompts auto-classified from skill name and tags"]}),n.jsxs("div",{className:"grid grid-cols-3 gap-6 mb-5",children:[n.jsx(bc,{label:"Precision",value:E.precision,description:"Of all activations, how many were correct?",detail:`${E.tp} true / ${E.tp+E.fp} total activations`}),n.jsx(bc,{label:"Recall",value:E.recall,description:"Of expected activations, how many fired?",detail:`${E.tp} activated / ${E.tp+E.fn} expected`}),n.jsx(bc,{label:"Reliability",value:E.reliability,description:"Overall correct classification rate",detail:`${E.tp+E.tn} correct / ${E.total} total`})]}),n.jsxs("div",{className:"pt-4",style:{borderTop:"1px solid var(--border-subtle)"},children:[n.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-widest mb-3 text-center",style:{color:"var(--text-tertiary)"},children:"Confusion Matrix"}),n.jsxs("div",{className:"grid grid-cols-2 gap-2 max-w-xs mx-auto",children:[n.jsx(Zs,{label:"True Positive",abbr:"TP",count:E.tp,bg:"var(--green-muted)",color:"var(--green)",description:"Correctly activated"}),n.jsx(Zs,{label:"False Positive",abbr:"FP",count:E.fp,bg:"var(--red-muted)",color:"var(--red)",description:"Wrongly activated"}),n.jsx(Zs,{label:"False Negative",abbr:"FN",count:E.fn,bg:"rgba(248,113,113,0.06)",color:"rgba(248,113,113,0.6)",description:"Missed activation"}),n.jsx(Zs,{label:"True Negative",abbr:"TN",count:E.tn,bg:"rgba(52,211,153,0.06)",color:"rgba(52,211,153,0.6)",description:"Correctly silent"})]})]})]}),p&&v.length===0&&n.jsxs("div",{className:"text-center py-16 animate-fade-in",children:[n.jsx("div",{className:"spinner-lg mx-auto mb-4"}),n.jsx("p",{className:"text-[14px]",style:{color:"var(--text-secondary)"},children:"Testing activation against skill description..."})]})]})}function lm({result:r}){const u=tm[r.classification]||tm.FN,f=r.classification==="TP"||r.classification==="TN";return n.jsxs("div",{className:"flex items-start gap-3 p-4 rounded-xl transition-all duration-200",style:{background:u.bg,border:"1px solid transparent"},children:[n.jsx("div",{className:"flex-shrink-0 mt-0.5",children:n.jsx("div",{className:"w-7 h-7 rounded-lg flex items-center justify-center",style:{background:`color-mix(in srgb, ${u.text} 20%, transparent)`},children:f?n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:u.text,strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"20 6 9 17 4 12"})}):n.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:u.text,strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:"flex items-center gap-2 mb-1",children:n.jsx("span",{className:"text-[13px] font-medium",style:{color:"var(--text-primary)"},children:r.prompt})}),n.jsxs("div",{className:"flex items-center gap-3 text-[12px]",children:[n.jsx("span",{className:"pill",style:{background:"rgba(0,0,0,0.1)",color:u.text,fontWeight:700,fontSize:"10px",padding:"1px 6px"},children:r.classification}),n.jsx("span",{style:{color:r.activate?"var(--green)":"var(--text-tertiary)"},children:r.activate?"Activated":"Silent"}),n.jsxs("span",{style:{color:"var(--text-tertiary)"},children:["Expected: ",r.expected==="should_activate"?"activate":"stay silent"]}),n.jsxs("span",{style:{color:"var(--text-tertiary)"},children:[r.confidence," confidence"]}),r.autoClassified&&n.jsx("span",{className:"pill",style:{background:"rgba(139,92,246,0.1)",color:"rgba(139,92,246,0.8)",fontSize:"9px",padding:"1px 5px"},children:"auto"})]}),r.reasoning&&n.jsx("div",{className:"text-[11px] mt-1.5",style:{color:"var(--text-tertiary)"},children:r.reasoning})]})]})}function bc({label:r,value:u,description:f,detail:o}){const m=Math.round(u*100),h=m>=80?"var(--green)":m>=60?"var(--yellow)":"var(--red)";return n.jsxs("div",{className:"text-center",children:[n.jsxs("div",{className:"text-[28px] font-bold tracking-tight",style:{color:h},children:[m,"%"]}),n.jsx("div",{className:"text-[12px] font-medium mt-0.5",style:{color:"var(--text-secondary)"},children:r}),n.jsx("div",{className:"text-[10px] mt-1",style:{color:"var(--text-tertiary)"},children:f}),n.jsx("div",{className:"text-[10px] mt-0.5 font-mono",style:{color:"var(--text-tertiary)"},children:o})]})}function Zs({abbr:r,count:u,bg:f,color:o,description:m}){return n.jsxs("div",{className:"text-center p-3 rounded-lg",style:{background:f},children:[n.jsx("div",{className:"text-[20px] font-bold",style:{color:o},children:u}),n.jsx("div",{className:"text-[11px] font-semibold",style:{color:o},children:r}),n.jsx("div",{className:"text-[9px] mt-0.5",style:{color:"var(--text-tertiary)"},children:m})]})}const jc={benchmark:"#6383ff",comparison:"#a78bfa",baseline:"#fb923c"},am={benchmark:"Benchmark",comparison:"Comparison",baseline:"Baseline"},_c=600,kc=180,lt=40,Sc=_c-lt*2,Al=kc-lt*2,Kv=[25,50,75,100];function nm(r){return new Date(r).toLocaleDateString(void 0,{month:"short",day:"numeric"})}function Jv({entries:r}){const[u,f]=b.useState(null);if(r.length<2)return null;const o=r.length,m=r.map((E,p)=>{const x=lt+p/(o-1)*Sc,T=E.passRate*100,g=lt+Al-T/100*Al;return{x,y:g,pct:T,entry:E}}),h=m.map(E=>`${E.x},${E.y}`).join(" "),v=Array.from(new Set(r.map(E=>E.type)));return n.jsxs("div",{className:"glass-card p-5 animate-fade-in",style:{position:"relative"},children:[n.jsx("div",{className:"text-[13px] font-semibold mb-2",style:{color:"var(--text-primary)"},children:"Pass Rate Trend"}),n.jsx("div",{className:"flex items-center gap-5 mb-3",children:v.map(E=>n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("div",{className:"w-3 h-3 rounded-full",style:{background:jc[E]??"var(--text-tertiary)"}}),n.jsx("span",{className:"text-[11px]",style:{color:"var(--text-secondary)"},children:am[E]??E})]},E))}),n.jsxs("svg",{width:_c,height:kc,viewBox:`0 0 ${_c} ${kc}`,style:{display:"block",overflow:"visible"},children:[Kv.map(E=>{const p=lt+Al-E/100*Al;return n.jsxs("g",{children:[n.jsx("line",{x1:lt,y1:p,x2:lt+Sc,y2:p,stroke:"var(--border-subtle)",strokeWidth:.5,strokeDasharray:"4 4"}),n.jsxs("text",{x:lt-8,y:p+3.5,textAnchor:"end",style:{fill:"var(--text-tertiary)",fontSize:10},children:[E,"%"]})]},E)}),n.jsx("line",{x1:lt,y1:lt+Al,x2:lt+Sc,y2:lt+Al,stroke:"var(--border-subtle)",strokeWidth:1}),n.jsx("text",{x:lt-8,y:lt+Al+3.5,textAnchor:"end",style:{fill:"var(--text-tertiary)",fontSize:10},children:"0%"}),n.jsx("polyline",{points:h,fill:"none",stroke:"var(--border-subtle)",strokeWidth:1.5,strokeLinejoin:"round"}),m.map((E,p)=>n.jsx("circle",{cx:E.x,cy:E.y,r:5,fill:jc[E.entry.type]??"var(--text-tertiary)",stroke:"var(--surface-2)",strokeWidth:2,style:{cursor:"pointer",transition:"r 0.15s ease"},onMouseEnter:x=>{x.currentTarget.setAttribute("r","7"),f({x:E.x,y:E.y,entry:E.entry})},onMouseLeave:x=>{x.currentTarget.setAttribute("r","5"),f(null)}},p)),$v(o).map(E=>n.jsx("text",{x:m[E].x,y:lt+Al+16,textAnchor:"middle",style:{fill:"var(--text-tertiary)",fontSize:10},children:nm(r[E].timestamp)},E))]}),u&&n.jsxs("div",{style:{position:"absolute",left:u.x,top:u.y-12,transform:"translate(-50%, -100%)",background:"var(--surface-3)",border:"1px solid var(--border-subtle)",borderRadius:8,padding:"8px 12px",pointerEvents:"none",zIndex:10,whiteSpace:"nowrap"},children:[n.jsx("div",{className:"text-[11px] font-medium",style:{color:"var(--text-primary)"},children:nm(u.entry.timestamp)}),n.jsx("div",{className:"text-[11px] mt-0.5",style:{color:"var(--text-tertiary)"},children:u.entry.model}),n.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[n.jsx("span",{className:"text-[9px] font-semibold px-1.5 py-0.5 rounded-full",style:{background:jc[u.entry.type]??"var(--text-tertiary)",color:"#fff"},children:am[u.entry.type]??u.entry.type}),n.jsxs("span",{className:"text-[12px] font-semibold",style:{color:"var(--text-primary)"},children:[Math.round(u.entry.passRate*100),"%"]})]})]})]})}function $v(r){return r<=3?Array.from({length:r},(u,f)=>f):r<=6?[0,Math.floor(r/2),r-1]:[0,Math.floor(r/3),Math.floor(2*r/3),r-1]}function Ks(r){return r>=.8?"var(--green)":r>=.5?"var(--yellow)":"var(--red)"}function Wv(r){return r>=1e3?`${(r/1e3).toFixed(1)}s`:`${Math.round(r)}ms`}function Fv({rate:r,label:u}){const f=Math.round(r*100);return n.jsx("div",{className:"flex items-center gap-3",children:n.jsxs("div",{className:"flex-1",children:[n.jsxs("div",{className:"flex items-center justify-between mb-1",children:[n.jsx("span",{className:"text-[11px] truncate",style:{color:"var(--text-primary)",maxWidth:"70%"},children:u}),n.jsxs("span",{className:"text-[11px] font-semibold",style:{color:Ks(r)},children:[f,"%"]})]}),n.jsx("div",{className:"h-1.5 rounded-full overflow-hidden",style:{background:"var(--surface-3)"},children:n.jsx("div",{className:"h-full rounded-full transition-all duration-500",style:{width:`${f}%`,background:Ks(r)}})})]})})}function Iv({points:r}){if(r.length<2)return null;const u=200,f=48,o=4,m=r.length,h=r.map((p,x)=>{const T=o+x/(m-1)*(u-o*2),g=o+(f-o*2)-p.passRate*(f-o*2);return{x:T,y:g}}),v=`M ${h[0].x},${f-o} `+h.map(p=>`L ${p.x},${p.y}`).join(" ")+` L ${h[h.length-1].x},${f-o} Z`,E=h.map((p,x)=>`${x===0?"M":"L"} ${p.x},${p.y}`).join(" ");return n.jsxs("svg",{width:u,height:f,style:{display:"block"},children:[n.jsx("path",{d:v,fill:"var(--accent-muted)"}),n.jsx("path",{d:E,fill:"none",stroke:"var(--accent)",strokeWidth:1.5,strokeLinejoin:"round"}),n.jsx("circle",{cx:h[h.length-1].x,cy:h[h.length-1].y,r:3,fill:"var(--accent)"})]})}function Pv({plugin:r,skill:u}){const[f,o]=b.useState(null),[m,h]=b.useState(!0);if(b.useEffect(()=>{h(!0),Se.getStats(r,u).then(o).catch(()=>o(null)).finally(()=>h(!1))},[r,u]),m)return n.jsxs("div",{className:"space-y-4",children:[n.jsx("div",{className:"skeleton h-24 rounded-xl"}),n.jsx("div",{className:"skeleton h-48 rounded-xl"}),n.jsx("div",{className:"skeleton h-36 rounded-xl"})]});if(!f||f.totalRuns===0)return n.jsxs("div",{className:"text-center py-12",children:[n.jsx("div",{className:"w-12 h-12 rounded-xl flex items-center justify-center mx-auto mb-3",style:{background:"var(--surface-2)"},children:n.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"1.5",children:[n.jsx("path",{d:"M18 20V10"}),n.jsx("path",{d:"M12 20V4"}),n.jsx("path",{d:"M6 20v-6"})]})}),n.jsx("p",{className:"text-[13px]",style:{color:"var(--text-tertiary)"},children:"No benchmark data yet"}),n.jsx("p",{className:"text-[11px] mt-1",style:{color:"var(--text-tertiary)"},children:"Run some benchmarks to see statistics"})]});const v=f.trendPoints.length>0?f.trendPoints[f.trendPoints.length-1].passRate:0,E=f.trendPoints.length>0?f.trendPoints[0].passRate:0,p=v-E,x=f.assertionStats.slice(0,10);return n.jsxs("div",{className:"space-y-4 stagger-children",children:[n.jsxs("div",{className:"grid grid-cols-4 gap-3",children:[n.jsxs("div",{className:"glass-card p-4",children:[n.jsx("div",{className:"text-[10px] uppercase tracking-widest font-semibold mb-1",style:{color:"var(--text-tertiary)"},children:"Total Runs"}),n.jsx("div",{className:"text-[24px] font-bold",style:{color:"var(--text-primary)"},children:f.totalRuns})]}),n.jsxs("div",{className:"glass-card p-4",children:[n.jsx("div",{className:"text-[10px] uppercase tracking-widest font-semibold mb-1",style:{color:"var(--text-tertiary)"},children:"Latest Pass Rate"}),n.jsxs("div",{className:"text-[24px] font-bold",style:{color:Ks(v)},children:[Math.round(v*100),"%"]})]}),n.jsxs("div",{className:"glass-card p-4",children:[n.jsx("div",{className:"text-[10px] uppercase tracking-widest font-semibold mb-1",style:{color:"var(--text-tertiary)"},children:"Trend"}),n.jsxs("div",{className:"text-[24px] font-bold",style:{color:p>=0?"var(--green)":"var(--red)"},children:[p>=0?"+":"",Math.round(p*100),"%"]})]}),n.jsxs("div",{className:"glass-card p-4",children:[n.jsx("div",{className:"text-[10px] uppercase tracking-widest font-semibold mb-1",style:{color:"var(--text-tertiary)"},children:"Models Tested"}),n.jsx("div",{className:"text-[24px] font-bold",style:{color:"var(--text-primary)"},children:f.modelStats.length})]})]}),f.trendPoints.length>=2&&n.jsxs("div",{className:"glass-card p-5",children:[n.jsx("div",{className:"text-[13px] font-semibold mb-3",style:{color:"var(--text-primary)"},children:"Pass Rate Over Time"}),n.jsx(Iv,{points:f.trendPoints})]}),f.modelStats.length>0&&n.jsxs("div",{className:"glass-card p-5",children:[n.jsx("div",{className:"text-[13px] font-semibold mb-3",style:{color:"var(--text-primary)"},children:"Model Performance"}),n.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:12},children:[n.jsx("thead",{children:n.jsxs("tr",{style:{borderBottom:"1px solid var(--border-subtle)"},children:[n.jsx("th",{style:{textAlign:"left",padding:"6px 8px",color:"var(--text-tertiary)",fontWeight:600,fontSize:11},children:"Model"}),n.jsx("th",{style:{textAlign:"center",padding:"6px 8px",color:"var(--text-tertiary)",fontWeight:600,fontSize:11},children:"Runs"}),n.jsx("th",{style:{textAlign:"center",padding:"6px 8px",color:"var(--text-tertiary)",fontWeight:600,fontSize:11},children:"Avg Pass Rate"}),n.jsx("th",{style:{textAlign:"center",padding:"6px 8px",color:"var(--text-tertiary)",fontWeight:600,fontSize:11},children:"Avg Duration"})]})}),n.jsx("tbody",{children:f.modelStats.map(T=>n.jsxs("tr",{style:{borderBottom:"1px solid var(--border-subtle)"},children:[n.jsx("td",{style:{padding:"8px",color:"var(--text-primary)",fontWeight:500},children:T.model}),n.jsx("td",{style:{padding:"8px",textAlign:"center",fontFamily:"var(--font-mono, monospace)",color:"var(--text-secondary)"},children:T.runs}),n.jsx("td",{style:{padding:"8px",textAlign:"center"},children:n.jsxs("span",{className:"font-semibold",style:{color:Ks(T.avgPassRate)},children:[Math.round(T.avgPassRate*100),"%"]})}),n.jsx("td",{style:{padding:"8px",textAlign:"center",fontFamily:"var(--font-mono, monospace)",color:"var(--text-secondary)"},children:Wv(T.avgDurationMs)})]},T.model))})]})]}),x.length>0&&n.jsxs("div",{className:"glass-card p-5",children:[n.jsx("div",{className:"text-[13px] font-semibold mb-3",style:{color:"var(--text-primary)"},children:"Weakest Assertions"}),n.jsx("div",{className:"space-y-3",children:x.map(T=>n.jsxs("button",{className:"block w-full text-left rounded-lg p-2 -mx-2 transition-colors duration-150",style:{background:"transparent"},onMouseEnter:g=>{g.currentTarget.style.background="var(--surface-2)"},onMouseLeave:g=>{g.currentTarget.style.background="transparent"},onClick:()=>{},children:[n.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[n.jsxs("span",{className:"text-[10px] font-mono px-1 py-0.5 rounded flex-shrink-0",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:["#",T.evalId]}),n.jsx("span",{className:"text-[10px] truncate",style:{color:"var(--text-tertiary)"},children:T.evalName}),n.jsxs("span",{className:"text-[10px] ml-auto flex-shrink-0",style:{color:"var(--text-tertiary)",fontFamily:"var(--font-mono, monospace)"},children:[T.totalRuns," runs"]})]}),n.jsx(Fv,{rate:T.passRate,label:T.text})]},`${T.evalId}:${T.id}`))})]})]})}function eh({plugin:r,skill:u}){const[f,o]=b.useState(null),[m,h]=b.useState(null),[v,E]=b.useState({}),[p,x]=b.useState({});b.useEffect(()=>{Se.getEvals(r,u).then(o).catch(()=>o(null))},[r,u]);async function T(g){if(m===g){h(null);return}if(h(g),!v[g]){x(M=>({...M,[g]:!0}));try{const M=await Se.getCaseHistory(r,u,g);E(G=>({...G,[g]:M}))}catch{E(M=>({...M,[g]:[]}))}finally{x(M=>({...M,[g]:!1}))}}}return f?n.jsx("div",{className:"space-y-2 stagger-children",children:f.evals.map(g=>{const M=v[g.id]||[],G=m===g.id,B=p[g.id],Y=M.length>0?M[0].pass_rate:null;return n.jsxs("div",{className:"glass-card overflow-hidden",children:[n.jsxs("button",{onClick:()=>T(g.id),className:"w-full text-left p-4 flex items-center gap-3 transition-colors duration-150",style:{background:G?"var(--surface-2)":"transparent"},onMouseEnter:V=>{G||(V.currentTarget.style.background="var(--surface-2)")},onMouseLeave:V=>{G||(V.currentTarget.style.background="transparent")},children:[n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2.5",strokeLinecap:"round",style:{transform:G?"rotate(90deg)":"rotate(0)",transition:"transform 0.2s ease",flexShrink:0},children:n.jsx("polyline",{points:"9 18 15 12 9 6"})}),n.jsxs("span",{className:"text-[11px] font-mono px-1.5 py-0.5 rounded flex-shrink-0",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:["#",g.id]}),n.jsx("span",{className:"text-[13px] font-medium flex-1 truncate",style:{color:"var(--text-primary)"},children:g.name}),M.length>=2&&n.jsx(fm,{entries:M}),Y!=null&&n.jsxs("span",{className:"text-[12px] font-semibold flex-shrink-0",style:{color:Ac(Y)},children:[Math.round(Y*100),"%"]}),M.length>0&&n.jsxs("span",{className:"text-[10px] flex-shrink-0",style:{color:"var(--text-tertiary)",fontFamily:"var(--font-mono, monospace)"},children:[M.length," runs"]})]}),G&&n.jsx("div",{className:"border-t animate-fade-in",style:{borderColor:"var(--border-subtle)"},children:B?n.jsxs("div",{className:"p-4 flex items-center gap-2",children:[n.jsx("div",{className:"spinner",style:{width:14,height:14}}),n.jsx("span",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:"Loading history..."})]}):M.length===0?n.jsx("div",{className:"p-4",children:n.jsx("p",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:"No history for this eval case"})}):n.jsx("div",{className:"divide-y",style:{borderColor:"var(--border-subtle)"},children:M.map((V,J)=>n.jsxs("div",{className:"p-4",style:{background:J===0?"var(--surface-2)":"transparent"},children:[n.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[n.jsx("span",{className:"text-[12px] font-medium",style:{color:"var(--text-primary)"},children:om(V.timestamp)}),n.jsx("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:V.model}),n.jsx("span",{className:"pill",style:{fontSize:9,padding:"1px 6px",background:V.type==="benchmark"?"rgba(99,131,255,0.15)":V.type==="comparison"?"var(--purple-muted)":"rgba(251,146,60,0.15)",color:V.type==="benchmark"?"#6383ff":V.type==="comparison"?"var(--purple)":"#fb923c"},children:V.type}),n.jsxs("span",{className:"text-[12px] font-semibold ml-auto",style:{color:Ac(V.pass_rate)},children:[Math.round(V.pass_rate*100),"%"]})]}),n.jsxs("div",{className:"flex items-center gap-4 mb-2 text-[10px]",style:{fontFamily:"var(--font-mono, monospace)",color:"var(--text-tertiary)"},children:[V.durationMs!=null&&n.jsx("span",{children:dm(V.durationMs)}),V.tokens!=null&&n.jsxs("span",{children:[V.tokens>=1e3?`${(V.tokens/1e3).toFixed(1)}k`:V.tokens," tok"]})]}),n.jsx("div",{className:"space-y-1",children:V.assertions.map(F=>n.jsxs("div",{className:"flex items-start gap-2 py-0.5",children:[n.jsx("div",{className:"w-3.5 h-3.5 rounded-full flex items-center justify-center flex-shrink-0 mt-0.5",style:{background:F.pass?"var(--green)":"var(--red)"},children:n.jsx("svg",{width:"7",height:"7",viewBox:"0 0 24 24",fill:"none",stroke:"#fff",strokeWidth:"3.5",strokeLinecap:"round",strokeLinejoin:"round",children:F.pass?n.jsx("polyline",{points:"20 6 9 17 4 12"}):n.jsxs(n.Fragment,{children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:"text-[11px]",style:{color:"var(--text-primary)"},children:F.text}),F.reasoning&&n.jsx("div",{className:"text-[10px] mt-0.5",style:{color:"var(--text-tertiary)"},children:F.reasoning})]})]},F.id))})]},J))})})]},g.id)})}):n.jsx("div",{className:"text-center py-12",children:n.jsx("p",{className:"text-[13px]",style:{color:"var(--text-tertiary)"},children:"No eval cases found"})})}function th(){const{state:r,dispatch:u}=tl(),{plugin:f,skill:o}=r,[m,h]=b.useState("timeline"),[v,E]=b.useState([]),[p,x]=b.useState(!0),[T,g]=b.useState(""),[M,G]=b.useState(""),[B,Y]=b.useState(!1),[V,J]=b.useState([]),[F,re]=b.useState(null),[K,se]=b.useState(!1),[le,ae]=b.useState(null),[$,xe]=b.useState(!1);b.useEffect(()=>{x(!0),Se.getHistory(f,o,{model:T||void 0,type:M||void 0}).then(Z=>{E(Z),Z.length>=2&&Se.compareRuns(f,o,Z[0].timestamp,Z[1].timestamp).then(W=>{const ve=W.regressions.filter(R=>R.change==="regression");u({type:"SET_REGRESSIONS",regressions:ve})}).catch(()=>{})}).catch(()=>{}).finally(()=>x(!1))},[f,o,T,M]);const I=b.useCallback(async Z=>{if(B){J(W=>W.includes(Z)?W.filter(ve=>ve!==Z):W.length>=2?[W[1],Z]:[...W,Z]);return}xe(!0);try{const W=await Se.getHistoryEntry(f,o,Z);ae(W)}catch{}finally{xe(!1)}},[f,o,B]),fe=b.useCallback(async()=>{if(V.length===2){se(!0);try{const Z=await Se.compareRuns(f,o,V[0],V[1]);re(Z)}catch{}finally{se(!1)}}},[f,o,V]),pe=[...new Set(v.map(Z=>Z.model))];return p?n.jsxs("div",{className:"p-5",children:[n.jsx("div",{className:"skeleton h-5 w-32 mb-4"}),n.jsx("div",{className:"skeleton h-48 rounded-xl mb-4"}),n.jsxs("div",{className:"space-y-2",children:[n.jsx("div",{className:"skeleton h-12 rounded-lg"}),n.jsx("div",{className:"skeleton h-12 rounded-lg"})]})]}):n.jsxs("div",{className:"p-5",children:[n.jsx("div",{className:"flex items-center gap-1 mb-4",children:["timeline","per-eval","statistics"].map(Z=>n.jsx("button",{onClick:()=>h(Z),className:"px-4 py-2 rounded-lg text-[12px] font-medium transition-all duration-150",style:{background:m===Z?"var(--accent-muted)":"transparent",color:m===Z?"var(--accent)":"var(--text-tertiary)"},children:Z==="timeline"?"Timeline":Z==="per-eval"?"Per Eval":"Statistics"},Z))}),m==="timeline"&&n.jsxs("div",{children:[v.length>0&&n.jsx("div",{className:"mb-5 rounded-xl p-4",style:{background:"var(--surface-1)",border:"1px solid var(--border-subtle)"},children:n.jsx(Jv,{entries:v})}),n.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[n.jsxs("select",{value:T,onChange:Z=>g(Z.target.value),className:"input-field text-[12px]",style:{width:150},children:[n.jsx("option",{value:"",children:"All Models"}),pe.map(Z=>n.jsx("option",{value:Z,children:Z},Z))]}),n.jsxs("select",{value:M,onChange:Z=>G(Z.target.value),className:"input-field text-[12px]",style:{width:150},children:[n.jsx("option",{value:"",children:"All Types"}),n.jsx("option",{value:"benchmark",children:"Benchmark"}),n.jsx("option",{value:"comparison",children:"Comparison"}),n.jsx("option",{value:"baseline",children:"Baseline"}),n.jsx("option",{value:"model-compare",children:"Model Compare"}),n.jsx("option",{value:"improve",children:"AI Improve"})]}),n.jsx("div",{className:"flex-1"}),n.jsx("button",{onClick:()=>{Y(!B),J([]),re(null)},className:`btn text-[12px] ${B?"btn-primary":"btn-secondary"}`,children:B?"Exit Compare":"Compare Runs"}),B&&V.length===2&&n.jsx("button",{onClick:fe,disabled:K,className:"btn btn-primary text-[12px]",children:K?"Comparing...":"Compare"})]}),n.jsx("div",{className:"space-y-2",children:v.length===0?n.jsx("div",{className:"text-center py-8 text-[13px]",style:{color:"var(--text-tertiary)"},children:"No benchmark runs yet"}):v.map(Z=>{const W=V.includes(Z.timestamp);return n.jsx("button",{onClick:()=>I(Z.timestamp),className:"w-full text-left rounded-lg px-4 py-3 transition-all duration-150",style:{background:W?"var(--accent-muted)":"var(--surface-1)",border:W?"1px solid var(--accent)":"1px solid var(--border-subtle)"},onMouseEnter:ve=>{W||(ve.currentTarget.style.borderColor="var(--border-hover)")},onMouseLeave:ve=>{W||(ve.currentTarget.style.borderColor="var(--border-subtle)")},children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[B&&n.jsx("span",{className:"w-4 h-4 rounded border flex items-center justify-center",style:{borderColor:W?"var(--accent)":"var(--border-default)",background:W?"var(--accent)":"transparent"},children:W&&n.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"#fff",strokeWidth:"3",children:n.jsx("polyline",{points:"20 6 9 17 4 12"})})}),n.jsx("span",{className:"text-[12px] font-medium",style:{color:"var(--text-primary)"},children:new Date(Z.timestamp).toLocaleString()}),n.jsx("span",{className:"pill text-[9px]",style:{background:Z.type==="comparison"?"var(--purple-muted)":Z.type==="baseline"?"var(--surface-3)":Z.type==="model-compare"?"rgba(56,189,248,0.15)":Z.type==="improve"||Z.type==="instruct"?"rgba(168,85,247,0.15)":"var(--accent-muted)",color:Z.type==="comparison"?"var(--purple)":Z.type==="baseline"?"var(--text-tertiary)":Z.type==="model-compare"?"#38bdf8":Z.type==="improve"||Z.type==="instruct"?"#a855f7":"var(--accent)"},children:Z.type==="model-compare"?"model compare":Z.type==="improve"?"ai improve":Z.type==="instruct"?"ai edit":Z.type})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:Z.model}),n.jsxs("span",{className:"text-[12px] font-semibold",style:{color:Z.passRate>=.8?"var(--green)":Z.passRate>=.5?"var(--yellow)":"var(--red)"},children:[Math.round(Z.passRate*100),"%"]})]})]})},Z.timestamp)})}),F&&n.jsx(lh,{result:F}),le&&!B&&n.jsx(ah,{run:le,onClose:()=>ae(null)})]}),m==="per-eval"&&n.jsx(eh,{plugin:f,skill:o}),m==="statistics"&&n.jsx(Pv,{plugin:f,skill:o})]})}function lh({result:r}){const u=r.regressions.filter(o=>o.change==="regression"),f=r.regressions.filter(o=>o.change==="improvement");return n.jsxs("div",{className:"mt-4 rounded-xl p-4",style:{background:"var(--surface-1)",border:"1px solid var(--border-subtle)"},children:[n.jsxs("div",{className:"text-[13px] font-semibold mb-3",style:{color:"var(--text-primary)"},children:["Comparison: ",new Date(r.runA.timestamp).toLocaleDateString()," vs ",new Date(r.runB.timestamp).toLocaleDateString()]}),u.length>0&&n.jsxs("div",{className:"mb-3",children:[n.jsxs("div",{className:"text-[11px] font-semibold uppercase tracking-wider mb-1",style:{color:"var(--red)"},children:["Regressions (",u.length,")"]}),u.map(o=>n.jsxs("div",{className:"text-[12px] py-1",style:{color:"var(--text-secondary)"},children:["#",o.evalId," ",o.evalName,": ",n.jsx("span",{style:{color:"var(--red)"},children:o.assertionId})," (was passing, now failing)"]},`${o.evalId}-${o.assertionId}`))]}),f.length>0&&n.jsxs("div",{className:"mb-3",children:[n.jsxs("div",{className:"text-[11px] font-semibold uppercase tracking-wider mb-1",style:{color:"var(--green)"},children:["Improvements (",f.length,")"]}),f.map(o=>n.jsxs("div",{className:"text-[12px] py-1",style:{color:"var(--text-secondary)"},children:["#",o.evalId," ",o.evalName,": ",n.jsx("span",{style:{color:"var(--green)"},children:o.assertionId})," (was failing, now passing)"]},`${o.evalId}-${o.assertionId}`))]}),n.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-wider mb-2 mt-3",style:{color:"var(--text-tertiary)"},children:"Case Diffs"}),n.jsx("div",{className:"rounded-lg overflow-hidden",style:{border:"1px solid var(--border-subtle)"},children:n.jsxs("table",{className:"w-full text-[12px]",children:[n.jsx("thead",{children:n.jsxs("tr",{style:{background:"var(--surface-2)"},children:[n.jsx("th",{className:"text-left px-3 py-2 font-medium",style:{color:"var(--text-tertiary)"},children:"Case"}),n.jsx("th",{className:"text-right px-3 py-2 font-medium",style:{color:"var(--text-tertiary)"},children:"Run A"}),n.jsx("th",{className:"text-right px-3 py-2 font-medium",style:{color:"var(--text-tertiary)"},children:"Run B"})]})}),n.jsx("tbody",{children:r.caseDiffs.map(o=>n.jsxs("tr",{style:{borderTop:"1px solid var(--border-subtle)"},children:[n.jsxs("td",{className:"px-3 py-2",style:{color:"var(--text-secondary)"},children:["#",o.eval_id," ",o.eval_name]}),n.jsx("td",{className:"text-right px-3 py-2",style:{color:o.passRateA!=null?o.passRateA>=.8?"var(--green)":o.passRateA>=.5?"var(--yellow)":"var(--red)":"var(--text-tertiary)"},children:o.passRateA!=null?`${Math.round(o.passRateA*100)}%`:o.statusA}),n.jsx("td",{className:"text-right px-3 py-2",style:{color:o.passRateB!=null?o.passRateB>=.8?"var(--green)":o.passRateB>=.5?"var(--yellow)":"var(--red)":"var(--text-tertiary)"},children:o.passRateB!=null?`${Math.round(o.passRateB*100)}%`:o.statusB})]},o.eval_id))})]})})]})}function ah({run:r,onClose:u}){return(r.type==="improve"||r.type==="instruct")&&r.improve?n.jsx(nh,{run:r,onClose:u}):n.jsxs("div",{className:"mt-4 rounded-xl p-4",style:{background:"var(--surface-1)",border:"1px solid var(--border-subtle)"},children:[n.jsxs("div",{className:"flex items-center justify-between mb-3",children:[n.jsxs("span",{className:"text-[13px] font-semibold",style:{color:"var(--text-primary)"},children:["Run: ",new Date(r.timestamp).toLocaleString()]}),n.jsx("button",{onClick:u,className:"btn btn-ghost text-[11px]",children:"Close"})]}),n.jsxs("div",{className:"text-[11px] mb-3",style:{color:"var(--text-tertiary)"},children:["Model: ",r.model," | Cases: ",r.cases.length," | Pass Rate: ",r.overall_pass_rate!=null?`${Math.round(r.overall_pass_rate*100)}%`:"--"]}),n.jsx("div",{className:"space-y-2",children:r.cases.map(f=>n.jsx("div",{className:"rounded-lg px-3 py-2",style:{background:"var(--surface-2)"},children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("span",{className:"text-[12px]",style:{color:"var(--text-secondary)"},children:["#",f.eval_id," ",f.eval_name]}),n.jsx("span",{className:"text-[11px] font-semibold",style:{color:f.status==="pass"?"var(--green)":"var(--red)"},children:f.pass_rate!=null?`${Math.round(f.pass_rate*100)}%`:f.status})]})},f.eval_id))})]})}function nh({run:r,onClose:u}){var h;const f=b.useMemo(()=>r.improve?Rc(r.improve.original,r.improve.improved):[],[r.improve]),o=b.useMemo(()=>{const v=f.filter(p=>p.type==="added").length,E=f.filter(p=>p.type==="removed").length;return{added:v,removed:E}},[f]),m=b.useMemo(()=>{let v=0,E=0;return f.map(p=>p.type==="removed"?(v++,{...p,origNum:v,newNum:null}):p.type==="added"?(E++,{...p,origNum:null,newNum:E}):(v++,E++,{...p,origNum:v,newNum:E}))},[f]);return n.jsxs("div",{className:"mt-4 rounded-xl overflow-hidden animate-fade-in",style:{background:"var(--surface-1)",border:"1px solid var(--border-subtle)"},children:[n.jsxs("div",{className:"flex items-center justify-between px-5 py-3.5",style:{background:"var(--surface-2)",borderBottom:"1px solid var(--border-subtle)"},children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center",style:{background:"rgba(168,85,247,0.15)"},children:n.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#a855f7",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M12 2L2 7l10 5 10-5-10-5z"}),n.jsx("path",{d:"M2 17l10 5 10-5"}),n.jsx("path",{d:"M2 12l10 5 10-5"})]})}),n.jsxs("div",{children:[n.jsx("div",{className:"text-[13px] font-semibold",style:{color:"var(--text-primary)"},children:"SKILL.md Changes"}),n.jsxs("div",{className:"text-[10px]",style:{color:"var(--text-tertiary)"},children:[new Date(r.timestamp).toLocaleString()," · ",r.model]})]})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsxs("div",{className:"flex items-center gap-2 text-[11px]",children:[n.jsxs("span",{style:{color:"var(--green)"},children:["+",o.added]}),n.jsxs("span",{style:{color:"var(--red)"},children:["-",o.removed]})]}),n.jsx("button",{onClick:u,className:"w-7 h-7 rounded-lg flex items-center justify-center transition-colors duration-150",style:{color:"var(--text-tertiary)"},onMouseEnter:v=>{v.currentTarget.style.background="var(--surface-3)"},onMouseLeave:v=>{v.currentTarget.style.background="transparent"},children:n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})]}),((h=r.improve)==null?void 0:h.reasoning)&&n.jsxs("div",{className:"mx-4 mt-4 px-4 py-3 rounded-lg text-[12px]",style:{background:"rgba(168,85,247,0.06)",border:"1px solid rgba(168,85,247,0.15)",color:"var(--text-secondary)"},children:[n.jsx("span",{className:"font-semibold",style:{color:"#a855f7"},children:"AI Reasoning: "}),r.improve.reasoning]}),n.jsx("div",{className:"mx-4 my-4 rounded-lg overflow-hidden",style:{border:"1px solid var(--border-subtle)",maxHeight:480,overflowY:"auto"},children:n.jsx("table",{className:"w-full",style:{borderCollapse:"collapse",fontFamily:"var(--font-mono, monospace)"},children:n.jsx("tbody",{children:m.map((v,E)=>n.jsxs("tr",{style:{background:v.type==="added"?"rgba(34,197,94,0.08)":v.type==="removed"?"rgba(239,68,68,0.08)":"transparent"},children:[n.jsx("td",{className:"text-right select-none px-2",style:{width:40,fontSize:10,color:v.type==="removed"?"rgba(239,68,68,0.5)":"var(--text-tertiary)",opacity:v.origNum?.6:.2,borderRight:"1px solid var(--border-subtle)"},children:v.origNum??""}),n.jsx("td",{className:"text-right select-none px-2",style:{width:40,fontSize:10,color:v.type==="added"?"rgba(34,197,94,0.5)":"var(--text-tertiary)",opacity:v.newNum?.6:.2,borderRight:"1px solid var(--border-subtle)"},children:v.newNum??""}),n.jsx("td",{className:"select-none text-center",style:{width:20,fontSize:11,fontWeight:700,color:v.type==="added"?"var(--green)":v.type==="removed"?"var(--red)":"transparent",borderRight:v.type==="added"?"2px solid var(--green)":v.type==="removed"?"2px solid var(--red)":"2px solid transparent"},children:v.type==="added"?"+":v.type==="removed"?"-":" "}),n.jsx("td",{className:"px-3 py-px whitespace-pre-wrap",style:{fontSize:11,lineHeight:1.6,color:v.type==="added"?"var(--green)":v.type==="removed"?"var(--red)":"var(--text-secondary)"},children:v.content||"​"})]},E))})})})]})}function sh({plugin:r,skill:u}){const[f,o]=b.useState([]),[m,h]=b.useState([]),[v,E]=b.useState(!0),[p,x]=b.useState(null);b.useEffect(()=>{Se.getDependencies(r,u).then(g=>{o(g.mcpDependencies),h(g.skillDependencies)}).catch(()=>{}).finally(()=>E(!1))},[r,u]);async function T(g,M){try{await navigator.clipboard.writeText(M),x(g),setTimeout(()=>x(null),2e3)}catch{}}return v?null:f.length===0&&m.length===0?n.jsx("div",{className:"mb-5 px-4 py-3 rounded-lg text-[12px]",style:{background:"var(--surface-2)",color:"var(--text-tertiary)",border:"1px solid var(--border-subtle)"},children:"No dependencies detected"}):n.jsxs("div",{className:"mb-5 rounded-xl overflow-hidden",style:{border:"1px solid var(--border-subtle)",background:"var(--surface-1)"},children:[n.jsxs("div",{className:"flex items-center gap-2.5 px-5 py-3.5",style:{background:"var(--surface-2)",borderBottom:"1px solid var(--border-subtle)"},children:[n.jsx("div",{className:"w-7 h-7 rounded-lg flex items-center justify-center",style:{background:"rgba(234,179,8,0.15)"},children:n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"#eab308",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),n.jsx("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})]})}),n.jsx("span",{className:"text-[13px] font-semibold",style:{color:"var(--text-primary)"},children:"Dependencies"}),n.jsx("span",{className:"pill text-[10px]",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:f.length+m.length})]}),n.jsxs("div",{className:"px-5 py-4",children:[f.length>0&&n.jsxs("div",{className:"space-y-3 mb-4",children:[n.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--text-tertiary)"},children:"MCP Servers"}),f.map(g=>n.jsxs("div",{className:"p-3 rounded-lg",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)"},children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-[13px] font-medium",style:{color:"var(--text-primary)"},children:g.server}),n.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:g.transport})]}),n.jsx("button",{onClick:()=>T(g.server,g.configSnippet),className:"btn btn-ghost text-[11px] py-1 px-2",style:{color:p===g.server?"var(--green)":"var(--accent)"},children:p===g.server?n.jsxs(n.Fragment,{children:[n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"20 6 9 17 4 12"})})," Copied!"]}):n.jsxs(n.Fragment,{children:[n.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),n.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})," Copy Config"]})})]}),n.jsx("div",{className:"text-[11px] mb-2 font-mono",style:{color:"var(--text-tertiary)"},children:g.url}),n.jsx("div",{className:"flex flex-wrap gap-1.5",children:g.matchedTools.map(M=>n.jsx("span",{className:"px-2 py-0.5 rounded text-[10px] font-mono",style:{background:"var(--surface-3)",color:"var(--text-secondary)"},children:M},M))})]},g.server))]}),m.length>0&&n.jsxs("div",{children:[n.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wider mb-2",style:{color:"var(--text-tertiary)"},children:"Skill Dependencies"}),n.jsx("div",{className:"space-y-1.5",children:m.map(g=>n.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)"},children:[n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"})}),n.jsx("span",{className:"text-[12px] font-medium",style:{color:"var(--text-primary)"},children:g.name}),n.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:g.source==="frontmatter"?"frontmatter":"referenced"})]},g.name))})]})]})]})}function ih(){const{state:r}=tl(),{plugin:u,skill:f}=r,[o,m]=b.useState(null),[h,v]=b.useState(!0);return b.useEffect(()=>{Se.getDependencies(u,f).then(m).catch(()=>{}).finally(()=>v(!1))},[u,f]),h?n.jsxs("div",{className:"p-5",children:[n.jsx("div",{className:"skeleton h-5 w-32 mb-4"}),n.jsx("div",{className:"skeleton h-32 rounded-xl"})]}):o?n.jsx("div",{className:"p-5 max-w-3xl",children:n.jsx(sh,{plugin:u,skill:f})}):n.jsx("div",{className:"flex items-center justify-center h-full text-[13px]",style:{color:"var(--text-tertiary)"},children:"No dependency information available"})}function rh(){const{state:r,dispatch:u,saveContent:f}=tl(),o=b.useCallback(h=>{const v=h.ctrlKey||h.metaKey;if(v&&h.key>="1"&&h.key<="6"){h.preventDefault(),u({type:"SET_PANEL",panel:["editor","tests","run","activation","history","deps"][parseInt(h.key)-1]});return}if(v&&h.key==="s"&&!h.shiftKey){h.preventDefault(),r.isDirty&&f();return}},[r.isDirty,f,u]);if(b.useEffect(()=>(window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)),[o]),r.loading)return n.jsx("div",{className:"flex items-center justify-center h-full",style:{background:"var(--surface-0)"},children:n.jsxs("div",{className:"flex flex-col items-center gap-3",children:[n.jsx("div",{className:"spinner spinner-lg"}),n.jsx("span",{className:"text-[13px]",style:{color:"var(--text-tertiary)"},children:"Loading workspace..."})]})});const m=Array.from(r.caseRunStates.values()).some(h=>h.status==="running"||h.status==="queued");return n.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[n.jsx(pv,{state:r}),n.jsx(gv,{activePanel:r.activePanel,onPanelChange:h=>u({type:"SET_PANEL",panel:h}),isDirty:r.isDirty,isRunning:m,hasRegressions:r.regressions.length>0,isActivationRunning:r.activationRunning}),n.jsx("div",{className:"flex-1 overflow-hidden",style:{background:"var(--surface-0)"},children:n.jsxs("div",{className:"animate-fade-in",style:{height:"100%",overflow:"auto"},children:[r.activePanel==="editor"&&n.jsx(Dv,{}),r.activePanel==="tests"&&n.jsx(Lv,{}),r.activePanel==="run"&&n.jsx(Gv,{}),r.activePanel==="activation"&&n.jsx(Zv,{}),r.activePanel==="history"&&n.jsx(th,{}),r.activePanel==="deps"&&n.jsx(ih,{})]},r.activePanel)})]})}function Nc(r,u=!0){let f=r.toLowerCase().replace(/[^a-z0-9]+/g,"-");return u&&(f=f.replace(/^-+|-+$/g,"")),f}function ch(r,u,f,o){const h=`.../${r.split("/").slice(-2).join("/")}`;switch(u){case 1:return`${h}/${f}/skills/${o}/SKILL.md`;case 2:return`${h}/plugins/${f}/skills/${o}/SKILL.md`;case 3:return`${h}/skills/${o}/SKILL.md`}}function uh({onCreated:r,onCancel:u}){const[f,o]=b.useState(null),[m,h]=b.useState(!0),[v,E]=b.useState(null),[p,x]=b.useState(null),[T,g]=b.useState(""),[M,G]=b.useState(3),[B,Y]=b.useState(""),[V,J]=b.useState(""),[F,re]=b.useState(""),[K,se]=b.useState(""),[le,ae]=b.useState(""),[$,xe]=b.useState(""),[I,fe]=b.useState(!1),[pe,Z]=b.useState(null);b.useEffect(()=>{Se.getProjectLayout().then(X=>{o(X),G(X.suggestedLayout);const j=X.detectedLayouts.find(N=>N.layout===X.suggestedLayout);j!=null&&j.existingPlugins.length&&Y(j.existingPlugins[0])}).catch(()=>{}).finally(()=>h(!1)),Se.getConfig().then(x).catch(()=>{}),Se.getSkillCreatorStatus().then(E).catch(()=>{})},[]);const W=b.useMemo(()=>{var X;return f?((X=f.detectedLayouts.find(j=>j.layout===M))==null?void 0:X.existingPlugins)||[]:[]},[f,M]),ve=B==="__new__"?V:B,R=f?ch(f.root,M,ve||"{plugin}",T||"{skill}"):"",O=b.useMemo(()=>f?f.detectedLayouts.filter(X=>X.layout!==4):[],[f]),L=(p==null?void 0:p.provider)==="claude-cli"&&v!==null;async function ee(){if(Z(null),!T.trim()){Z("Skill name is required");return}if(!F.trim()){Z("Description is required");return}if(M!==3&&!ve.trim()){Z("Plugin name is required");return}fe(!0);try{const X=await Se.createSkill({name:Nc(T),plugin:ve||"",layout:M,description:F,model:K||void 0,allowedTools:le||void 0,body:$});r(X.plugin,X.skill)}catch(X){Z(X.message)}finally{fe(!1)}}return n.jsxs("div",{className:"px-8 py-6 max-w-4xl animate-fade-in overflow-auto h-full",children:[n.jsxs("div",{className:"mb-5",children:[n.jsx("h2",{className:"text-[20px] font-semibold tracking-tight",style:{color:"var(--text-primary)"},children:"Create a New Skill"}),n.jsx("p",{className:"text-[13px] mt-1",style:{color:"var(--text-tertiary)"},children:"Define your skill's metadata, content, and placement"})]}),L&&n.jsx("div",{className:"mb-5 px-4 py-3 rounded-lg text-[13px]",style:{background:v.installed?"var(--accent-muted)":"var(--surface-2)",border:v.installed?"1px solid var(--accent)":"1px solid var(--border-subtle)",color:"var(--text-primary)"},children:v.installed?n.jsxs("span",{children:[n.jsx("span",{className:"font-medium",children:"AI-Assisted Authoring Available"}),n.jsxs("span",{className:"ml-1",style:{color:"var(--text-secondary)"},children:["— Run ",n.jsx("code",{className:"px-1.5 py-0.5 rounded text-[11px]",style:{background:"var(--surface-3)"},children:"/skill-creator"})," in Claude Code for guided creation."]})]}):n.jsxs("span",{style:{color:"var(--text-secondary)"},children:["Tip: Install the Skill Creator — ",n.jsx("code",{className:"px-1.5 py-0.5 rounded text-[11px]",style:{background:"var(--surface-3)"},children:v.installCommand})]})}),m?n.jsxs("div",{className:"space-y-3",children:[n.jsx("div",{className:"skeleton h-10 w-full rounded-lg"}),n.jsx("div",{className:"skeleton h-10 w-full rounded-lg"})]}):f?n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"glass-card p-4",children:[n.jsx("h3",{className:"text-[13px] font-semibold mb-3",style:{color:"var(--text-primary)"},children:"Location"}),O.length>1&&n.jsxs("div",{className:"mb-3",children:[n.jsx("label",{className:"text-[11px] font-medium uppercase tracking-wider mb-2 block",style:{color:"var(--text-tertiary)"},children:"Layout"}),n.jsx("div",{className:"flex gap-2",children:O.map(X=>n.jsx("button",{onClick:()=>{G(X.layout),Y(X.existingPlugins[0]||""),J("")},className:"px-3 py-1.5 rounded-lg text-[12px] font-medium transition-all duration-150",style:{background:M===X.layout?"var(--accent)":"var(--surface-3)",color:M===X.layout?"#fff":"var(--text-secondary)",border:`1px solid ${M===X.layout?"var(--accent)":"var(--border-subtle)"}`,cursor:"pointer"},children:X.label},X.layout))})]}),M!==3&&n.jsxs("div",{className:"mb-3",children:[n.jsx("label",{className:"text-[11px] font-medium uppercase tracking-wider mb-2 block",style:{color:"var(--text-tertiary)"},children:"Plugin"}),n.jsxs("select",{value:B,onChange:X=>{Y(X.target.value),J("")},className:"w-full px-3 py-2 rounded-lg text-[13px]",style:{background:"var(--surface-3)",color:"var(--text-primary)",border:"1px solid var(--border-subtle)"},children:[W.map(X=>n.jsx("option",{value:X,children:X},X)),n.jsx("option",{value:"__new__",children:"+ New plugin..."})]}),B==="__new__"&&n.jsx("input",{type:"text",value:V,onChange:X=>J(Nc(X.target.value)),placeholder:"my-plugin",className:"w-full mt-2 px-3 py-2 rounded-lg text-[13px]",style:{background:"var(--surface-3)",color:"var(--text-primary)",border:"1px solid var(--border-subtle)"}})]}),n.jsx("div",{className:"px-3 py-2 rounded-lg text-[11px] font-mono",style:{background:"var(--surface-0)",color:"var(--text-tertiary)",border:"1px solid var(--border-subtle)"},children:R})]}),n.jsxs("div",{className:"glass-card p-4",children:[n.jsx("h3",{className:"text-[13px] font-semibold mb-3",style:{color:"var(--text-primary)"},children:"Skill Details"}),n.jsxs("div",{className:"mb-3",children:[n.jsxs("label",{className:"text-[11px] font-medium uppercase tracking-wider mb-1 block",style:{color:"var(--text-tertiary)"},children:["Name ",n.jsx("span",{style:{color:"var(--red)"},children:"*"})]}),n.jsx("input",{type:"text",value:T,onChange:X=>g(Nc(X.target.value,!1)),placeholder:"my-skill",className:"w-full px-3 py-2 rounded-lg text-[13px]",style:{background:"var(--surface-3)",color:"var(--text-primary)",border:"1px solid var(--border-subtle)"}})]}),n.jsxs("div",{className:"mb-3",children:[n.jsxs("label",{className:"text-[11px] font-medium uppercase tracking-wider mb-1 block",style:{color:"var(--text-tertiary)"},children:["Description ",n.jsx("span",{style:{color:"var(--red)"},children:"*"})]}),n.jsx("textarea",{value:F,onChange:X=>re(X.target.value),placeholder:"Brief description",rows:2,className:"w-full px-3 py-2 rounded-lg text-[13px] resize-none",style:{background:"var(--surface-3)",color:"var(--text-primary)",border:"1px solid var(--border-subtle)"}})]}),n.jsxs("div",{className:"flex gap-3",children:[n.jsxs("div",{className:"flex-1",children:[n.jsx("label",{className:"text-[11px] font-medium uppercase tracking-wider mb-1 block",style:{color:"var(--text-tertiary)"},children:"Model"}),n.jsxs("select",{value:K,onChange:X=>se(X.target.value),className:"w-full px-3 py-2 rounded-lg text-[13px]",style:{background:"var(--surface-3)",color:"var(--text-primary)",border:"1px solid var(--border-subtle)"},children:[n.jsx("option",{value:"",children:"Any"}),n.jsx("option",{value:"opus",children:"Opus"}),n.jsx("option",{value:"sonnet",children:"Sonnet"}),n.jsx("option",{value:"haiku",children:"Haiku"})]})]}),n.jsxs("div",{className:"flex-1",children:[n.jsx("label",{className:"text-[11px] font-medium uppercase tracking-wider mb-1 block",style:{color:"var(--text-tertiary)"},children:"Allowed Tools"}),n.jsx("input",{type:"text",value:le,onChange:X=>ae(X.target.value),placeholder:"Read, Write, Edit...",className:"w-full px-3 py-2 rounded-lg text-[13px]",style:{background:"var(--surface-3)",color:"var(--text-primary)",border:"1px solid var(--border-subtle)"}})]})]})]}),n.jsxs("div",{className:"glass-card p-4",children:[n.jsx("h3",{className:"text-[13px] font-semibold mb-3",style:{color:"var(--text-primary)"},children:"System Prompt"}),n.jsx("textarea",{value:$,onChange:X=>xe(X.target.value),placeholder:`# /my-skill
68
+
69
+ You are an expert at...
70
+ `,rows:8,className:"w-full px-3 py-2 rounded-lg text-[13px] font-mono resize-y",style:{background:"var(--surface-3)",color:"var(--text-primary)",border:"1px solid var(--border-subtle)",minHeight:"150px"}})]}),pe&&n.jsx("div",{className:"px-4 py-3 rounded-lg text-[13px]",style:{background:"var(--red-muted)",color:"var(--red)",border:"1px solid rgba(248,113,113,0.2)"},children:pe}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("button",{onClick:ee,disabled:I||!T||!F,className:"px-5 py-2.5 rounded-lg text-[13px] font-medium transition-all duration-150",style:{background:I||!T||!F?"var(--surface-3)":"var(--accent)",color:I||!T||!F?"var(--text-tertiary)":"#fff",cursor:I||!T||!F?"not-allowed":"pointer",border:"none"},children:I?"Creating...":"Create Skill"}),n.jsx("button",{onClick:u,className:"px-4 py-2.5 rounded-lg text-[13px] font-medium",style:{color:"var(--text-secondary)",background:"none",border:"none",cursor:"pointer"},children:"Cancel"})]})]}):null]})}function oh(){return n.jsx("div",{className:"w-16 h-16 rounded-2xl flex items-center justify-center",style:{background:"var(--surface-2)"},children:n.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"}),n.jsx("polyline",{points:"3.27 6.96 12 12.01 20.73 6.96"}),n.jsx("line",{x1:"12",y1:"22.08",x2:"12",y2:"12"})]})})}function Ec({variant:r,message:u,onRetry:f}){const{setMode:o,setSearch:m}=Kl(),[h,v]=b.useState(!1);return r==="no-selection"?n.jsxs("div",{className:"flex flex-col items-center justify-center h-full px-8 animate-fade-in",children:[n.jsx("div",{className:"mb-5",children:h?n.jsx(oh,{}):n.jsx("img",{src:"/images/empty-studio.webp",width:128,height:128,alt:"",onError:()=>v(!0),style:{objectFit:"contain"}})}),n.jsx("p",{className:"text-[14px] font-medium mb-1",style:{color:"var(--text-secondary)"},children:"Select a skill to view details"}),n.jsx("p",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:"Choose a skill from the list to edit, test, and evaluate"})]}):r==="no-skills"?n.jsxs("div",{className:"text-center py-12 px-4 animate-fade-in-scale",children:[n.jsx("div",{className:"w-14 h-14 rounded-2xl flex items-center justify-center mx-auto mb-4",style:{background:"var(--surface-2)"},children:n.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"})})}),n.jsx("p",{className:"text-[14px] font-medium",style:{color:"var(--text-secondary)"},children:"No skills found"}),n.jsxs("p",{className:"text-[12px] mt-1 mb-4",style:{color:"var(--text-tertiary)"},children:["Check your ",n.jsx("code",{className:"px-1.5 py-0.5 rounded text-[11px]",style:{background:"var(--surface-2)"},children:"--root"})," directory, or create your first skill"]}),n.jsxs("button",{onClick:()=>o("create"),className:"inline-flex items-center gap-2 px-5 py-2.5 rounded-lg text-[13px] font-medium transition-all duration-150",style:{background:"var(--accent)",color:"#fff",border:"none",cursor:"pointer"},onMouseEnter:E=>{E.currentTarget.style.opacity="0.9"},onMouseLeave:E=>{E.currentTarget.style.opacity="1"},children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),n.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),"Create Your First Skill"]})]}):r==="error"?n.jsx("div",{className:"flex flex-col items-center justify-center h-full px-8 animate-fade-in",children:n.jsxs("div",{className:"px-5 py-4 rounded-lg text-center max-w-sm",style:{background:"var(--red-muted)",border:"1px solid rgba(248,113,113,0.2)"},children:[n.jsx("p",{className:"text-[13px] mb-3",style:{color:"var(--red)"},children:u||"Failed to load skill data"}),f&&n.jsx("button",{onClick:f,className:"px-4 py-2 rounded-lg text-[12px] font-medium",style:{background:"var(--surface-3)",color:"var(--text-primary)",border:"none",cursor:"pointer"},children:"Retry"})]})}):n.jsxs("div",{className:"px-4 py-8 text-center animate-fade-in",children:[n.jsx("p",{className:"text-[13px] mb-2",style:{color:"var(--text-tertiary)"},children:"No skills match your search"}),n.jsx("button",{onClick:()=>m(""),className:"text-[12px] font-medium",style:{color:"var(--accent)",background:"none",border:"none",cursor:"pointer",textDecoration:"underline"},children:"Clear search"})]})}function sm(){const{state:r,setMobileView:u}=Kl();return r.isMobile?n.jsxs("button",{onClick:()=>u("list"),className:"flex items-center gap-1.5 px-3 py-2 text-[12px] font-medium",style:{background:"var(--surface-1)",color:"var(--text-secondary)",border:"none",borderBottom:"1px solid var(--border-subtle)",cursor:"pointer",width:"100%"},children:[n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"15 18 9 12 15 6"})}),"Back to skills"]}):null}function dh(){const{state:r,selectSkill:u,setMode:f,refreshSkills:o}=Kl();if(r.mode==="create")return n.jsxs("div",{className:"h-full overflow-auto animate-fade-in",children:[n.jsx(sm,{}),n.jsx(uh,{onCreated:(v,E)=>{f("browse"),o(),u({plugin:v,skill:E})},onCancel:()=>f("browse")})]});if(!r.selectedSkill)return r.skillsError?n.jsx(Ec,{variant:"error",message:r.skillsError,onRetry:o}):!r.skillsLoading&&r.skills.length===0?n.jsx(Ec,{variant:"no-skills"}):n.jsx(Ec,{variant:"no-selection"});const{plugin:m,skill:h}=r.selectedSkill;return n.jsxs("div",{className:"flex flex-col h-full",children:[n.jsx(sm,{}),n.jsx("div",{className:"flex-1 overflow-hidden",children:n.jsx(xv,{plugin:m,skill:h,children:n.jsx(rh,{})},`${m}/${h}`)})]})}function fh(){return n.jsx(Ip,{children:n.jsx(Pp,{left:n.jsx(rv,{}),right:n.jsx(dh,{})})})}Zp.createRoot(document.getElementById("root")).render(n.jsx(b.StrictMode,{children:n.jsx(fh,{})}));