@openafw/openafw 0.5.2 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,20 @@
1
+ (function(){const d=document.createElement("link").relList;if(d&&d.supports&&d.supports("modulepreload"))return;for(const v of document.querySelectorAll('link[rel="modulepreload"]'))o(v);new MutationObserver(v=>{for(const p of v)if(p.type==="childList")for(const j of p.addedNodes)j.tagName==="LINK"&&j.rel==="modulepreload"&&o(j)}).observe(document,{childList:!0,subtree:!0});function f(v){const p={};return v.integrity&&(p.integrity=v.integrity),v.referrerPolicy&&(p.referrerPolicy=v.referrerPolicy),v.crossOrigin==="use-credentials"?p.credentials="include":v.crossOrigin==="anonymous"?p.credentials="omit":p.credentials="same-origin",p}function o(v){if(v.ep)return;v.ep=!0;const p=f(v);fetch(v.href,p)}})();var Sc={exports:{}},zn={};var Gf;function $v(){if(Gf)return zn;Gf=1;var c=Symbol.for("react.transitional.element"),d=Symbol.for("react.fragment");function f(o,v,p){var j=null;if(p!==void 0&&(j=""+p),v.key!==void 0&&(j=""+v.key),"key"in v){p={};for(var N in v)N!=="key"&&(p[N]=v[N])}else p=v;return v=p.ref,{$$typeof:c,type:o,key:j,ref:v!==void 0?v:null,props:p}}return zn.Fragment=d,zn.jsx=f,zn.jsxs=f,zn}var Lf;function Wv(){return Lf||(Lf=1,Sc.exports=$v()),Sc.exports}var n=Wv(),Nc={exports:{}},ae={};var Xf;function Fv(){if(Xf)return ae;Xf=1;var c=Symbol.for("react.transitional.element"),d=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),p=Symbol.for("react.consumer"),j=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),b=Symbol.for("react.memo"),B=Symbol.for("react.lazy"),k=Symbol.for("react.activity"),Q=Symbol.iterator;function C(y){return y===null||typeof y!="object"?null:(y=Q&&y[Q]||y["@@iterator"],typeof y=="function"?y:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ee=Object.assign,se={};function G(y,D,X){this.props=y,this.context=D,this.refs=se,this.updater=X||w}G.prototype.isReactComponent={},G.prototype.setState=function(y,D){if(typeof y!="object"&&typeof y!="function"&&y!=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,y,D,"setState")},G.prototype.forceUpdate=function(y){this.updater.enqueueForceUpdate(this,y,"forceUpdate")};function L(){}L.prototype=G.prototype;function P(y,D,X){this.props=y,this.context=D,this.refs=se,this.updater=X||w}var le=P.prototype=new L;le.constructor=P,ee(le,G.prototype),le.isPureReactComponent=!0;var ve=Array.isArray;function F(){}var V={H:null,A:null,T:null,S:null},q=Object.prototype.hasOwnProperty;function ce(y,D,X){var J=X.ref;return{$$typeof:c,type:y,key:D,ref:J!==void 0?J:null,props:X}}function we(y,D){return ce(y.type,D,y.props)}function Me(y){return typeof y=="object"&&y!==null&&y.$$typeof===c}function Te(y){var D={"=":"=0",":":"=2"};return"$"+y.replace(/[=:]/g,function(X){return D[X]})}var _l=/\/+/g;function Qe(y,D){return typeof y=="object"&&y!==null&&y.key!=null?Te(""+y.key):D.toString(36)}function R(y){switch(y.status){case"fulfilled":return y.value;case"rejected":throw y.reason;default:switch(typeof y.status=="string"?y.then(F,F):(y.status="pending",y.then(function(D){y.status==="pending"&&(y.status="fulfilled",y.value=D)},function(D){y.status==="pending"&&(y.status="rejected",y.reason=D)})),y.status){case"fulfilled":return y.value;case"rejected":throw y.reason}}throw y}function z(y,D,X,J,ne){var re=typeof y;(re==="undefined"||re==="boolean")&&(y=null);var je=!1;if(y===null)je=!0;else switch(re){case"bigint":case"string":case"number":je=!0;break;case"object":switch(y.$$typeof){case c:case d:je=!0;break;case B:return je=y._init,z(je(y._payload),D,X,J,ne)}}if(je)return ne=ne(y),je=J===""?"."+Qe(y,0):J,ve(ne)?(X="",je!=null&&(X=je.replace(_l,"$&/")+"/"),z(ne,D,X,"",function(Da){return Da})):ne!=null&&(Me(ne)&&(ne=we(ne,X+(ne.key==null||y&&y.key===ne.key?"":(""+ne.key).replace(_l,"$&/")+"/")+je)),D.push(ne)),1;je=0;var Fe=J===""?".":J+":";if(ve(y))for(var De=0;De<y.length;De++)J=y[De],re=Fe+Qe(J,De),je+=z(J,D,X,re,ne);else if(De=C(y),typeof De=="function")for(y=De.call(y),De=0;!(J=y.next()).done;)J=J.value,re=Fe+Qe(J,De++),je+=z(J,D,X,re,ne);else if(re==="object"){if(typeof y.then=="function")return z(R(y),D,X,J,ne);throw D=String(y),Error("Objects are not valid as a React child (found: "+(D==="[object Object]"?"object with keys {"+Object.keys(y).join(", ")+"}":D)+"). If you meant to render a collection of children, use an array instead.")}return je}function m(y,D,X){if(y==null)return y;var J=[],ne=0;return z(y,J,"","",function(re){return D.call(X,re,ne++)}),J}function Y(y){if(y._status===-1){var D=y._result;D=D(),D.then(function(X){(y._status===0||y._status===-1)&&(y._status=1,y._result=X)},function(X){(y._status===0||y._status===-1)&&(y._status=2,y._result=X)}),y._status===-1&&(y._status=0,y._result=D)}if(y._status===1)return y._result.default;throw y._result}var Z=typeof reportError=="function"?reportError:function(y){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var D=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof y=="object"&&y!==null&&typeof y.message=="string"?String(y.message):String(y),error:y});if(!window.dispatchEvent(D))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",y);return}console.error(y)},te={map:m,forEach:function(y,D,X){m(y,function(){D.apply(this,arguments)},X)},count:function(y){var D=0;return m(y,function(){D++}),D},toArray:function(y){return m(y,function(D){return D})||[]},only:function(y){if(!Me(y))throw Error("React.Children.only expected to receive a single React element child.");return y}};return ae.Activity=k,ae.Children=te,ae.Component=G,ae.Fragment=f,ae.Profiler=v,ae.PureComponent=P,ae.StrictMode=o,ae.Suspense=T,ae.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=V,ae.__COMPILER_RUNTIME={__proto__:null,c:function(y){return V.H.useMemoCache(y)}},ae.cache=function(y){return function(){return y.apply(null,arguments)}},ae.cacheSignal=function(){return null},ae.cloneElement=function(y,D,X){if(y==null)throw Error("The argument must be a React element, but you passed "+y+".");var J=ee({},y.props),ne=y.key;if(D!=null)for(re in D.key!==void 0&&(ne=""+D.key),D)!q.call(D,re)||re==="key"||re==="__self"||re==="__source"||re==="ref"&&D.ref===void 0||(J[re]=D[re]);var re=arguments.length-2;if(re===1)J.children=X;else if(1<re){for(var je=Array(re),Fe=0;Fe<re;Fe++)je[Fe]=arguments[Fe+2];J.children=je}return ce(y.type,ne,J)},ae.createContext=function(y){return y={$$typeof:j,_currentValue:y,_currentValue2:y,_threadCount:0,Provider:null,Consumer:null},y.Provider=y,y.Consumer={$$typeof:p,_context:y},y},ae.createElement=function(y,D,X){var J,ne={},re=null;if(D!=null)for(J in D.key!==void 0&&(re=""+D.key),D)q.call(D,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(ne[J]=D[J]);var je=arguments.length-2;if(je===1)ne.children=X;else if(1<je){for(var Fe=Array(je),De=0;De<je;De++)Fe[De]=arguments[De+2];ne.children=Fe}if(y&&y.defaultProps)for(J in je=y.defaultProps,je)ne[J]===void 0&&(ne[J]=je[J]);return ce(y,re,ne)},ae.createRef=function(){return{current:null}},ae.forwardRef=function(y){return{$$typeof:N,render:y}},ae.isValidElement=Me,ae.lazy=function(y){return{$$typeof:B,_payload:{_status:-1,_result:y},_init:Y}},ae.memo=function(y,D){return{$$typeof:b,type:y,compare:D===void 0?null:D}},ae.startTransition=function(y){var D=V.T,X={};V.T=X;try{var J=y(),ne=V.S;ne!==null&&ne(X,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then(F,Z)}catch(re){Z(re)}finally{D!==null&&X.types!==null&&(D.types=X.types),V.T=D}},ae.unstable_useCacheRefresh=function(){return V.H.useCacheRefresh()},ae.use=function(y){return V.H.use(y)},ae.useActionState=function(y,D,X){return V.H.useActionState(y,D,X)},ae.useCallback=function(y,D){return V.H.useCallback(y,D)},ae.useContext=function(y){return V.H.useContext(y)},ae.useDebugValue=function(){},ae.useDeferredValue=function(y,D){return V.H.useDeferredValue(y,D)},ae.useEffect=function(y,D){return V.H.useEffect(y,D)},ae.useEffectEvent=function(y){return V.H.useEffectEvent(y)},ae.useId=function(){return V.H.useId()},ae.useImperativeHandle=function(y,D,X){return V.H.useImperativeHandle(y,D,X)},ae.useInsertionEffect=function(y,D){return V.H.useInsertionEffect(y,D)},ae.useLayoutEffect=function(y,D){return V.H.useLayoutEffect(y,D)},ae.useMemo=function(y,D){return V.H.useMemo(y,D)},ae.useOptimistic=function(y,D){return V.H.useOptimistic(y,D)},ae.useReducer=function(y,D,X){return V.H.useReducer(y,D,X)},ae.useRef=function(y){return V.H.useRef(y)},ae.useState=function(y){return V.H.useState(y)},ae.useSyncExternalStore=function(y,D,X){return V.H.useSyncExternalStore(y,D,X)},ae.useTransition=function(){return V.H.useTransition()},ae.version="19.2.7",ae}var Qf;function Uc(){return Qf||(Qf=1,Nc.exports=Fv()),Nc.exports}var H=Uc(),Ec={exports:{}},_n={},Tc={exports:{}},Ac={};var Zf;function Iv(){return Zf||(Zf=1,(function(c){function d(z,m){var Y=z.length;z.push(m);e:for(;0<Y;){var Z=Y-1>>>1,te=z[Z];if(0<v(te,m))z[Z]=m,z[Y]=te,Y=Z;else break e}}function f(z){return z.length===0?null:z[0]}function o(z){if(z.length===0)return null;var m=z[0],Y=z.pop();if(Y!==m){z[0]=Y;e:for(var Z=0,te=z.length,y=te>>>1;Z<y;){var D=2*(Z+1)-1,X=z[D],J=D+1,ne=z[J];if(0>v(X,Y))J<te&&0>v(ne,X)?(z[Z]=ne,z[J]=Y,Z=J):(z[Z]=X,z[D]=Y,Z=D);else if(J<te&&0>v(ne,Y))z[Z]=ne,z[J]=Y,Z=J;else break e}}return m}function v(z,m){var Y=z.sortIndex-m.sortIndex;return Y!==0?Y:z.id-m.id}if(c.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var p=performance;c.unstable_now=function(){return p.now()}}else{var j=Date,N=j.now();c.unstable_now=function(){return j.now()-N}}var T=[],b=[],B=1,k=null,Q=3,C=!1,w=!1,ee=!1,se=!1,G=typeof setTimeout=="function"?setTimeout:null,L=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;function le(z){for(var m=f(b);m!==null;){if(m.callback===null)o(b);else if(m.startTime<=z)o(b),m.sortIndex=m.expirationTime,d(T,m);else break;m=f(b)}}function ve(z){if(ee=!1,le(z),!w)if(f(T)!==null)w=!0,F||(F=!0,Te());else{var m=f(b);m!==null&&R(ve,m.startTime-z)}}var F=!1,V=-1,q=5,ce=-1;function we(){return se?!0:!(c.unstable_now()-ce<q)}function Me(){if(se=!1,F){var z=c.unstable_now();ce=z;var m=!0;try{e:{w=!1,ee&&(ee=!1,L(V),V=-1),C=!0;var Y=Q;try{l:{for(le(z),k=f(T);k!==null&&!(k.expirationTime>z&&we());){var Z=k.callback;if(typeof Z=="function"){k.callback=null,Q=k.priorityLevel;var te=Z(k.expirationTime<=z);if(z=c.unstable_now(),typeof te=="function"){k.callback=te,le(z),m=!0;break l}k===f(T)&&o(T),le(z)}else o(T);k=f(T)}if(k!==null)m=!0;else{var y=f(b);y!==null&&R(ve,y.startTime-z),m=!1}}break e}finally{k=null,Q=Y,C=!1}m=void 0}}finally{m?Te():F=!1}}}var Te;if(typeof P=="function")Te=function(){P(Me)};else if(typeof MessageChannel<"u"){var _l=new MessageChannel,Qe=_l.port2;_l.port1.onmessage=Me,Te=function(){Qe.postMessage(null)}}else Te=function(){G(Me,0)};function R(z,m){V=G(function(){z(c.unstable_now())},m)}c.unstable_IdlePriority=5,c.unstable_ImmediatePriority=1,c.unstable_LowPriority=4,c.unstable_NormalPriority=3,c.unstable_Profiling=null,c.unstable_UserBlockingPriority=2,c.unstable_cancelCallback=function(z){z.callback=null},c.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):q=0<z?Math.floor(1e3/z):5},c.unstable_getCurrentPriorityLevel=function(){return Q},c.unstable_next=function(z){switch(Q){case 1:case 2:case 3:var m=3;break;default:m=Q}var Y=Q;Q=m;try{return z()}finally{Q=Y}},c.unstable_requestPaint=function(){se=!0},c.unstable_runWithPriority=function(z,m){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var Y=Q;Q=z;try{return m()}finally{Q=Y}},c.unstable_scheduleCallback=function(z,m,Y){var Z=c.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0<Y?Z+Y:Z):Y=Z,z){case 1:var te=-1;break;case 2:te=250;break;case 5:te=1073741823;break;case 4:te=1e4;break;default:te=5e3}return te=Y+te,z={id:B++,callback:m,priorityLevel:z,startTime:Y,expirationTime:te,sortIndex:-1},Y>Z?(z.sortIndex=Y,d(b,z),f(T)===null&&z===f(b)&&(ee?(L(V),V=-1):ee=!0,R(ve,Y-Z))):(z.sortIndex=te,d(T,z),w||C||(w=!0,F||(F=!0,Te()))),z},c.unstable_shouldYield=we,c.unstable_wrapCallback=function(z){var m=Q;return function(){var Y=Q;Q=m;try{return z.apply(this,arguments)}finally{Q=Y}}}})(Ac)),Ac}var Kf;function Pv(){return Kf||(Kf=1,Tc.exports=Iv()),Tc.exports}var zc={exports:{}},We={};var Vf;function ey(){if(Vf)return We;Vf=1;var c=Uc();function d(T){var b="https://react.dev/errors/"+T;if(1<arguments.length){b+="?args[]="+encodeURIComponent(arguments[1]);for(var B=2;B<arguments.length;B++)b+="&args[]="+encodeURIComponent(arguments[B])}return"Minified React error #"+T+"; visit "+b+" 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(d(522))},D:f,C:f,L:f,m:f,X:f,S:f,M:f},p:0,findDOMNode:null},v=Symbol.for("react.portal");function p(T,b,B){var k=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:v,key:k==null?null:""+k,children:T,containerInfo:b,implementation:B}}var j=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function N(T,b){if(T==="font")return"";if(typeof b=="string")return b==="use-credentials"?b:""}return We.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,We.createPortal=function(T,b){var B=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!b||b.nodeType!==1&&b.nodeType!==9&&b.nodeType!==11)throw Error(d(299));return p(T,b,null,B)},We.flushSync=function(T){var b=j.T,B=o.p;try{if(j.T=null,o.p=2,T)return T()}finally{j.T=b,o.p=B,o.d.f()}},We.preconnect=function(T,b){typeof T=="string"&&(b?(b=b.crossOrigin,b=typeof b=="string"?b==="use-credentials"?b:"":void 0):b=null,o.d.C(T,b))},We.prefetchDNS=function(T){typeof T=="string"&&o.d.D(T)},We.preinit=function(T,b){if(typeof T=="string"&&b&&typeof b.as=="string"){var B=b.as,k=N(B,b.crossOrigin),Q=typeof b.integrity=="string"?b.integrity:void 0,C=typeof b.fetchPriority=="string"?b.fetchPriority:void 0;B==="style"?o.d.S(T,typeof b.precedence=="string"?b.precedence:void 0,{crossOrigin:k,integrity:Q,fetchPriority:C}):B==="script"&&o.d.X(T,{crossOrigin:k,integrity:Q,fetchPriority:C,nonce:typeof b.nonce=="string"?b.nonce:void 0})}},We.preinitModule=function(T,b){if(typeof T=="string")if(typeof b=="object"&&b!==null){if(b.as==null||b.as==="script"){var B=N(b.as,b.crossOrigin);o.d.M(T,{crossOrigin:B,integrity:typeof b.integrity=="string"?b.integrity:void 0,nonce:typeof b.nonce=="string"?b.nonce:void 0})}}else b==null&&o.d.M(T)},We.preload=function(T,b){if(typeof T=="string"&&typeof b=="object"&&b!==null&&typeof b.as=="string"){var B=b.as,k=N(B,b.crossOrigin);o.d.L(T,B,{crossOrigin:k,integrity:typeof b.integrity=="string"?b.integrity:void 0,nonce:typeof b.nonce=="string"?b.nonce:void 0,type:typeof b.type=="string"?b.type:void 0,fetchPriority:typeof b.fetchPriority=="string"?b.fetchPriority:void 0,referrerPolicy:typeof b.referrerPolicy=="string"?b.referrerPolicy:void 0,imageSrcSet:typeof b.imageSrcSet=="string"?b.imageSrcSet:void 0,imageSizes:typeof b.imageSizes=="string"?b.imageSizes:void 0,media:typeof b.media=="string"?b.media:void 0})}},We.preloadModule=function(T,b){if(typeof T=="string")if(b){var B=N(b.as,b.crossOrigin);o.d.m(T,{as:typeof b.as=="string"&&b.as!=="script"?b.as:void 0,crossOrigin:B,integrity:typeof b.integrity=="string"?b.integrity:void 0})}else o.d.m(T)},We.requestFormReset=function(T){o.d.r(T)},We.unstable_batchedUpdates=function(T,b){return T(b)},We.useFormState=function(T,b,B){return j.H.useFormState(T,b,B)},We.useFormStatus=function(){return j.H.useHostTransitionStatus()},We.version="19.2.7",We}var Jf;function ly(){if(Jf)return zc.exports;Jf=1;function c(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(c)}catch(d){console.error(d)}}return c(),zc.exports=ey(),zc.exports}var $f;function ty(){if($f)return _n;$f=1;var c=Pv(),d=Uc(),f=ly();function o(e){var l="https://react.dev/errors/"+e;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var t=2;t<arguments.length;t++)l+="&args[]="+encodeURIComponent(arguments[t])}return"Minified React error #"+e+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function v(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function p(e){var l=e,t=e;if(e.alternate)for(;l.return;)l=l.return;else{e=l;do l=e,(l.flags&4098)!==0&&(t=l.return),e=l.return;while(e)}return l.tag===3?t:null}function j(e){if(e.tag===13){var l=e.memoizedState;if(l===null&&(e=e.alternate,e!==null&&(l=e.memoizedState)),l!==null)return l.dehydrated}return null}function N(e){if(e.tag===31){var l=e.memoizedState;if(l===null&&(e=e.alternate,e!==null&&(l=e.memoizedState)),l!==null)return l.dehydrated}return null}function T(e){if(p(e)!==e)throw Error(o(188))}function b(e){var l=e.alternate;if(!l){if(l=p(e),l===null)throw Error(o(188));return l!==e?null:e}for(var t=e,a=l;;){var i=t.return;if(i===null)break;var u=i.alternate;if(u===null){if(a=i.return,a!==null){t=a;continue}break}if(i.child===u.child){for(u=i.child;u;){if(u===t)return T(i),e;if(u===a)return T(i),l;u=u.sibling}throw Error(o(188))}if(t.return!==a.return)t=i,a=u;else{for(var s=!1,r=i.child;r;){if(r===t){s=!0,t=i,a=u;break}if(r===a){s=!0,a=i,t=u;break}r=r.sibling}if(!s){for(r=u.child;r;){if(r===t){s=!0,t=u,a=i;break}if(r===a){s=!0,a=u,t=i;break}r=r.sibling}if(!s)throw Error(o(189))}}if(t.alternate!==a)throw Error(o(190))}if(t.tag!==3)throw Error(o(188));return t.stateNode.current===t?e:l}function B(e){var l=e.tag;if(l===5||l===26||l===27||l===6)return e;for(e=e.child;e!==null;){if(l=B(e),l!==null)return l;e=e.sibling}return null}var k=Object.assign,Q=Symbol.for("react.element"),C=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),ee=Symbol.for("react.fragment"),se=Symbol.for("react.strict_mode"),G=Symbol.for("react.profiler"),L=Symbol.for("react.consumer"),P=Symbol.for("react.context"),le=Symbol.for("react.forward_ref"),ve=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),ce=Symbol.for("react.activity"),we=Symbol.for("react.memo_cache_sentinel"),Me=Symbol.iterator;function Te(e){return e===null||typeof e!="object"?null:(e=Me&&e[Me]||e["@@iterator"],typeof e=="function"?e:null)}var _l=Symbol.for("react.client.reference");function Qe(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===_l?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ee:return"Fragment";case G:return"Profiler";case se:return"StrictMode";case ve:return"Suspense";case F:return"SuspenseList";case ce:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case w:return"Portal";case P:return e.displayName||"Context";case L:return(e._context.displayName||"Context")+".Consumer";case le:var l=e.render;return e=e.displayName,e||(e=l.displayName||l.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case V:return l=e.displayName||null,l!==null?l:Qe(e.type)||"Memo";case q:l=e._payload,e=e._init;try{return Qe(e(l))}catch{}}return null}var R=Array.isArray,z=d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,m=f.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y={pending:!1,data:null,method:null,action:null},Z=[],te=-1;function y(e){return{current:e}}function D(e){0>te||(e.current=Z[te],Z[te]=null,te--)}function X(e,l){te++,Z[te]=e.current,e.current=l}var J=y(null),ne=y(null),re=y(null),je=y(null);function Fe(e,l){switch(X(re,l),X(ne,e),X(J,null),l.nodeType){case 9:case 11:e=(e=l.documentElement)&&(e=e.namespaceURI)?df(e):0;break;default:if(e=l.tagName,l=l.namespaceURI)l=df(l),e=of(l,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}D(J),X(J,e)}function De(){D(J),D(ne),D(re)}function Da(e){e.memoizedState!==null&&X(je,e);var l=J.current,t=of(l,e.type);l!==t&&(X(ne,e),X(J,t))}function Cn(e){ne.current===e&&(D(J),D(ne)),je.current===e&&(D(je),Nn._currentValue=Y)}var nu,Bc;function zt(e){if(nu===void 0)try{throw Error()}catch(t){var l=t.stack.trim().match(/\n( *(at )?)/);nu=l&&l[1]||"",Bc=-1<t.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<t.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+nu+e+Bc}var iu=!1;function uu(e,l){if(!e||iu)return"";iu=!0;var t=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(l){var U=function(){throw Error()};if(Object.defineProperty(U.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(U,[])}catch(_){var A=_}Reflect.construct(e,[],U)}else{try{U.call()}catch(_){A=_}e.call(U.prototype)}}else{try{throw Error()}catch(_){A=_}(U=e())&&typeof U.catch=="function"&&U.catch(function(){})}}catch(_){if(_&&A&&typeof _.stack=="string")return[_.stack,A.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=a.DetermineComponentFrameRoot(),s=u[0],r=u[1];if(s&&r){var h=s.split(`
4
+ `),E=r.split(`
5
+ `);for(i=a=0;a<h.length&&!h[a].includes("DetermineComponentFrameRoot");)a++;for(;i<E.length&&!E[i].includes("DetermineComponentFrameRoot");)i++;if(a===h.length||i===E.length)for(a=h.length-1,i=E.length-1;1<=a&&0<=i&&h[a]!==E[i];)i--;for(;1<=a&&0<=i;a--,i--)if(h[a]!==E[i]){if(a!==1||i!==1)do if(a--,i--,0>i||h[a]!==E[i]){var M=`
6
+ `+h[a].replace(" at new "," at ");return e.displayName&&M.includes("<anonymous>")&&(M=M.replace("<anonymous>",e.displayName)),M}while(1<=a&&0<=i);break}}}finally{iu=!1,Error.prepareStackTrace=t}return(t=e?e.displayName||e.name:"")?zt(t):""}function Ah(e,l){switch(e.tag){case 26:case 27:case 5:return zt(e.type);case 16:return zt("Lazy");case 13:return e.child!==l&&l!==null?zt("Suspense Fallback"):zt("Suspense");case 19:return zt("SuspenseList");case 0:case 15:return uu(e.type,!1);case 11:return uu(e.type.render,!1);case 1:return uu(e.type,!0);case 31:return zt("Activity");default:return""}}function Yc(e){try{var l="",t=null;do l+=Ah(e,t),t=e,e=e.return;while(e);return l}catch(a){return`
7
+ Error generating stack: `+a.message+`
8
+ `+a.stack}}var su=Object.prototype.hasOwnProperty,cu=c.unstable_scheduleCallback,ru=c.unstable_cancelCallback,zh=c.unstable_shouldYield,_h=c.unstable_requestPaint,cl=c.unstable_now,Mh=c.unstable_getCurrentPriorityLevel,wc=c.unstable_ImmediatePriority,Gc=c.unstable_UserBlockingPriority,On=c.unstable_NormalPriority,Ch=c.unstable_LowPriority,Lc=c.unstable_IdlePriority,Oh=c.log,Uh=c.unstable_setDisableYieldValue,Ra=null,rl=null;function tt(e){if(typeof Oh=="function"&&Uh(e),rl&&typeof rl.setStrictMode=="function")try{rl.setStrictMode(Ra,e)}catch{}}var dl=Math.clz32?Math.clz32:Hh,Dh=Math.log,Rh=Math.LN2;function Hh(e){return e>>>=0,e===0?32:31-(Dh(e)/Rh|0)|0}var Un=256,Dn=262144,Rn=4194304;function _t(e){var l=e&42;if(l!==0)return l;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 Hn(e,l,t){var a=e.pendingLanes;if(a===0)return 0;var i=0,u=e.suspendedLanes,s=e.pingedLanes;e=e.warmLanes;var r=a&134217727;return r!==0?(a=r&~u,a!==0?i=_t(a):(s&=r,s!==0?i=_t(s):t||(t=r&~e,t!==0&&(i=_t(t))))):(r=a&~u,r!==0?i=_t(r):s!==0?i=_t(s):t||(t=a&~e,t!==0&&(i=_t(t)))),i===0?0:l!==0&&l!==i&&(l&u)===0&&(u=i&-i,t=l&-l,u>=t||u===32&&(t&4194048)!==0)?l:i}function Ha(e,l){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&l)===0}function kh(e,l){switch(e){case 1:case 2:case 4:case 8:case 64:return l+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 l+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 Xc(){var e=Rn;return Rn<<=1,(Rn&62914560)===0&&(Rn=4194304),e}function du(e){for(var l=[],t=0;31>t;t++)l.push(e);return l}function ka(e,l){e.pendingLanes|=l,l!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function qh(e,l,t,a,i,u){var s=e.pendingLanes;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=t,e.entangledLanes&=t,e.errorRecoveryDisabledLanes&=t,e.shellSuspendCounter=0;var r=e.entanglements,h=e.expirationTimes,E=e.hiddenUpdates;for(t=s&~t;0<t;){var M=31-dl(t),U=1<<M;r[M]=0,h[M]=-1;var A=E[M];if(A!==null)for(E[M]=null,M=0;M<A.length;M++){var _=A[M];_!==null&&(_.lane&=-536870913)}t&=~U}a!==0&&Qc(e,a,0),u!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=u&~(s&~l))}function Qc(e,l,t){e.pendingLanes|=l,e.suspendedLanes&=~l;var a=31-dl(l);e.entangledLanes|=l,e.entanglements[a]=e.entanglements[a]|1073741824|t&261930}function Zc(e,l){var t=e.entangledLanes|=l;for(e=e.entanglements;t;){var a=31-dl(t),i=1<<a;i&l|e[a]&l&&(e[a]|=l),t&=~i}}function Kc(e,l){var t=l&-l;return t=(t&42)!==0?1:ou(t),(t&(e.suspendedLanes|l))!==0?0:t}function ou(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 fu(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Vc(){var e=m.p;return e!==0?e:(e=window.event,e===void 0?32:Rf(e.type))}function Jc(e,l){var t=m.p;try{return m.p=e,l()}finally{m.p=t}}var at=Math.random().toString(36).slice(2),Ze="__reactFiber$"+at,ll="__reactProps$"+at,Kt="__reactContainer$"+at,hu="__reactEvents$"+at,Bh="__reactListeners$"+at,Yh="__reactHandles$"+at,$c="__reactResources$"+at,qa="__reactMarker$"+at;function mu(e){delete e[Ze],delete e[ll],delete e[hu],delete e[Bh],delete e[Yh]}function Vt(e){var l=e[Ze];if(l)return l;for(var t=e.parentNode;t;){if(l=t[Kt]||t[Ze]){if(t=l.alternate,l.child!==null||t!==null&&t.child!==null)for(e=pf(e);e!==null;){if(t=e[Ze])return t;e=pf(e)}return l}e=t,t=e.parentNode}return null}function Jt(e){if(e=e[Ze]||e[Kt]){var l=e.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return e}return null}function Ba(e){var l=e.tag;if(l===5||l===26||l===27||l===6)return e.stateNode;throw Error(o(33))}function $t(e){var l=e[$c];return l||(l=e[$c]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function Le(e){e[qa]=!0}var Wc=new Set,Fc={};function Mt(e,l){Wt(e,l),Wt(e+"Capture",l)}function Wt(e,l){for(Fc[e]=l,e=0;e<l.length;e++)Wc.add(l[e])}var wh=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]*$"),Ic={},Pc={};function Gh(e){return su.call(Pc,e)?!0:su.call(Ic,e)?!1:wh.test(e)?Pc[e]=!0:(Ic[e]=!0,!1)}function kn(e,l,t){if(Gh(l))if(t===null)e.removeAttribute(l);else{switch(typeof t){case"undefined":case"function":case"symbol":e.removeAttribute(l);return;case"boolean":var a=l.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(l);return}}e.setAttribute(l,""+t)}}function qn(e,l,t){if(t===null)e.removeAttribute(l);else{switch(typeof t){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttribute(l,""+t)}}function kl(e,l,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttributeNS(l,t,""+a)}}function pl(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function er(e){var l=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function Lh(e,l,t){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,l);if(!e.hasOwnProperty(l)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var i=a.get,u=a.set;return Object.defineProperty(e,l,{configurable:!0,get:function(){return i.call(this)},set:function(s){t=""+s,u.call(this,s)}}),Object.defineProperty(e,l,{enumerable:a.enumerable}),{getValue:function(){return t},setValue:function(s){t=""+s},stopTracking:function(){e._valueTracker=null,delete e[l]}}}}function vu(e){if(!e._valueTracker){var l=er(e)?"checked":"value";e._valueTracker=Lh(e,l,""+e[l])}}function lr(e){if(!e)return!1;var l=e._valueTracker;if(!l)return!0;var t=l.getValue(),a="";return e&&(a=er(e)?e.checked?"true":"false":e.value),e=a,e!==t?(l.setValue(e),!0):!1}function Bn(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 Xh=/[\n"\\]/g;function jl(e){return e.replace(Xh,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function yu(e,l,t,a,i,u,s,r){e.name="",s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.type=s:e.removeAttribute("type"),l!=null?s==="number"?(l===0&&e.value===""||e.value!=l)&&(e.value=""+pl(l)):e.value!==""+pl(l)&&(e.value=""+pl(l)):s!=="submit"&&s!=="reset"||e.removeAttribute("value"),l!=null?gu(e,s,pl(l)):t!=null?gu(e,s,pl(t)):a!=null&&e.removeAttribute("value"),i==null&&u!=null&&(e.defaultChecked=!!u),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"?e.name=""+pl(r):e.removeAttribute("name")}function tr(e,l,t,a,i,u,s,r){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),l!=null||t!=null){if(!(u!=="submit"&&u!=="reset"||l!=null)){vu(e);return}t=t!=null?""+pl(t):"",l=l!=null?""+pl(l):t,r||l===e.value||(e.value=l),e.defaultValue=l}a=a??i,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=r?e.checked:!!a,e.defaultChecked=!!a,s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.name=s),vu(e)}function gu(e,l,t){l==="number"&&Bn(e.ownerDocument)===e||e.defaultValue===""+t||(e.defaultValue=""+t)}function Ft(e,l,t,a){if(e=e.options,l){l={};for(var i=0;i<t.length;i++)l["$"+t[i]]=!0;for(t=0;t<e.length;t++)i=l.hasOwnProperty("$"+e[t].value),e[t].selected!==i&&(e[t].selected=i),i&&a&&(e[t].defaultSelected=!0)}else{for(t=""+pl(t),l=null,i=0;i<e.length;i++){if(e[i].value===t){e[i].selected=!0,a&&(e[i].defaultSelected=!0);return}l!==null||e[i].disabled||(l=e[i])}l!==null&&(l.selected=!0)}}function ar(e,l,t){if(l!=null&&(l=""+pl(l),l!==e.value&&(e.value=l),t==null)){e.defaultValue!==l&&(e.defaultValue=l);return}e.defaultValue=t!=null?""+pl(t):""}function nr(e,l,t,a){if(l==null){if(a!=null){if(t!=null)throw Error(o(92));if(R(a)){if(1<a.length)throw Error(o(93));a=a[0]}t=a}t==null&&(t=""),l=t}t=pl(l),e.defaultValue=t,a=e.textContent,a===t&&a!==""&&a!==null&&(e.value=a),vu(e)}function It(e,l){if(l){var t=e.firstChild;if(t&&t===e.lastChild&&t.nodeType===3){t.nodeValue=l;return}}e.textContent=l}var Qh=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 ir(e,l,t){var a=l.indexOf("--")===0;t==null||typeof t=="boolean"||t===""?a?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="":a?e.setProperty(l,t):typeof t!="number"||t===0||Qh.has(l)?l==="float"?e.cssFloat=t:e[l]=(""+t).trim():e[l]=t+"px"}function ur(e,l,t){if(l!=null&&typeof l!="object")throw Error(o(62));if(e=e.style,t!=null){for(var a in t)!t.hasOwnProperty(a)||l!=null&&l.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var i in l)a=l[i],l.hasOwnProperty(i)&&t[i]!==a&&ir(e,i,a)}else for(var u in l)l.hasOwnProperty(u)&&ir(e,u,l[u])}function pu(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 Zh=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"]]),Kh=/^[\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 Yn(e){return Kh.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ql(){}var ju=null;function xu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Pt=null,ea=null;function sr(e){var l=Jt(e);if(l&&(e=l.stateNode)){var t=e[ll]||null;e:switch(e=l.stateNode,l.type){case"input":if(yu(e,t.value,t.defaultValue,t.defaultValue,t.checked,t.defaultChecked,t.type,t.name),l=t.name,t.type==="radio"&&l!=null){for(t=e;t.parentNode;)t=t.parentNode;for(t=t.querySelectorAll('input[name="'+jl(""+l)+'"][type="radio"]'),l=0;l<t.length;l++){var a=t[l];if(a!==e&&a.form===e.form){var i=a[ll]||null;if(!i)throw Error(o(90));yu(a,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(l=0;l<t.length;l++)a=t[l],a.form===e.form&&lr(a)}break e;case"textarea":ar(e,t.value,t.defaultValue);break e;case"select":l=t.value,l!=null&&Ft(e,!!t.multiple,l,!1)}}}var bu=!1;function cr(e,l,t){if(bu)return e(l,t);bu=!0;try{var a=e(l);return a}finally{if(bu=!1,(Pt!==null||ea!==null)&&(Ai(),Pt&&(l=Pt,e=ea,ea=Pt=null,sr(l),e)))for(l=0;l<e.length;l++)sr(e[l])}}function Ya(e,l){var t=e.stateNode;if(t===null)return null;var a=t[ll]||null;if(a===null)return null;t=a[l];e:switch(l){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(t&&typeof t!="function")throw Error(o(231,l,typeof t));return t}var Bl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Su=!1;if(Bl)try{var wa={};Object.defineProperty(wa,"passive",{get:function(){Su=!0}}),window.addEventListener("test",wa,wa),window.removeEventListener("test",wa,wa)}catch{Su=!1}var nt=null,Nu=null,wn=null;function rr(){if(wn)return wn;var e,l=Nu,t=l.length,a,i="value"in nt?nt.value:nt.textContent,u=i.length;for(e=0;e<t&&l[e]===i[e];e++);var s=t-e;for(a=1;a<=s&&l[t-a]===i[u-a];a++);return wn=i.slice(e,1<a?1-a:void 0)}function Gn(e){var l=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&l===13&&(e=13)):e=l,e===10&&(e=13),32<=e||e===13?e:0}function Ln(){return!0}function dr(){return!1}function tl(e){function l(t,a,i,u,s){this._reactName=t,this._targetInst=i,this.type=a,this.nativeEvent=u,this.target=s,this.currentTarget=null;for(var r in e)e.hasOwnProperty(r)&&(t=e[r],this[r]=t?t(u):u[r]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?Ln:dr,this.isPropagationStopped=dr,this}return k(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():typeof t.returnValue!="unknown"&&(t.returnValue=!1),this.isDefaultPrevented=Ln)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():typeof t.cancelBubble!="unknown"&&(t.cancelBubble=!0),this.isPropagationStopped=Ln)},persist:function(){},isPersistent:Ln}),l}var Ct={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Xn=tl(Ct),Ga=k({},Ct,{view:0,detail:0}),Vh=tl(Ga),Eu,Tu,La,Qn=k({},Ga,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zu,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!==La&&(La&&e.type==="mousemove"?(Eu=e.screenX-La.screenX,Tu=e.screenY-La.screenY):Tu=Eu=0,La=e),Eu)},movementY:function(e){return"movementY"in e?e.movementY:Tu}}),or=tl(Qn),Jh=k({},Qn,{dataTransfer:0}),$h=tl(Jh),Wh=k({},Ga,{relatedTarget:0}),Au=tl(Wh),Fh=k({},Ct,{animationName:0,elapsedTime:0,pseudoElement:0}),Ih=tl(Fh),Ph=k({},Ct,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),em=tl(Ph),lm=k({},Ct,{data:0}),fr=tl(lm),tm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},am={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"},nm={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function im(e){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(e):(e=nm[e])?!!l[e]:!1}function zu(){return im}var um=k({},Ga,{key:function(e){if(e.key){var l=tm[e.key]||e.key;if(l!=="Unidentified")return l}return e.type==="keypress"?(e=Gn(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?am[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zu,charCode:function(e){return e.type==="keypress"?Gn(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Gn(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),sm=tl(um),cm=k({},Qn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),hr=tl(cm),rm=k({},Ga,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zu}),dm=tl(rm),om=k({},Ct,{propertyName:0,elapsedTime:0,pseudoElement:0}),fm=tl(om),hm=k({},Qn,{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}),mm=tl(hm),vm=k({},Ct,{newState:0,oldState:0}),ym=tl(vm),gm=[9,13,27,32],_u=Bl&&"CompositionEvent"in window,Xa=null;Bl&&"documentMode"in document&&(Xa=document.documentMode);var pm=Bl&&"TextEvent"in window&&!Xa,mr=Bl&&(!_u||Xa&&8<Xa&&11>=Xa),vr=" ",yr=!1;function gr(e,l){switch(e){case"keyup":return gm.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function pr(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var la=!1;function jm(e,l){switch(e){case"compositionend":return pr(l);case"keypress":return l.which!==32?null:(yr=!0,vr);case"textInput":return e=l.data,e===vr&&yr?null:e;default:return null}}function xm(e,l){if(la)return e==="compositionend"||!_u&&gr(e,l)?(e=rr(),wn=Nu=nt=null,la=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return mr&&l.locale!=="ko"?null:l.data;default:return null}}var bm={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 jr(e){var l=e&&e.nodeName&&e.nodeName.toLowerCase();return l==="input"?!!bm[e.type]:l==="textarea"}function xr(e,l,t,a){Pt?ea?ea.push(a):ea=[a]:Pt=a,l=Di(l,"onChange"),0<l.length&&(t=new Xn("onChange","change",null,t,a),e.push({event:t,listeners:l}))}var Qa=null,Za=null;function Sm(e){af(e,0)}function Zn(e){var l=Ba(e);if(lr(l))return e}function br(e,l){if(e==="change")return l}var Sr=!1;if(Bl){var Mu;if(Bl){var Cu="oninput"in document;if(!Cu){var Nr=document.createElement("div");Nr.setAttribute("oninput","return;"),Cu=typeof Nr.oninput=="function"}Mu=Cu}else Mu=!1;Sr=Mu&&(!document.documentMode||9<document.documentMode)}function Er(){Qa&&(Qa.detachEvent("onpropertychange",Tr),Za=Qa=null)}function Tr(e){if(e.propertyName==="value"&&Zn(Za)){var l=[];xr(l,Za,e,xu(e)),cr(Sm,l)}}function Nm(e,l,t){e==="focusin"?(Er(),Qa=l,Za=t,Qa.attachEvent("onpropertychange",Tr)):e==="focusout"&&Er()}function Em(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Zn(Za)}function Tm(e,l){if(e==="click")return Zn(l)}function Am(e,l){if(e==="input"||e==="change")return Zn(l)}function zm(e,l){return e===l&&(e!==0||1/e===1/l)||e!==e&&l!==l}var ol=typeof Object.is=="function"?Object.is:zm;function Ka(e,l){if(ol(e,l))return!0;if(typeof e!="object"||e===null||typeof l!="object"||l===null)return!1;var t=Object.keys(e),a=Object.keys(l);if(t.length!==a.length)return!1;for(a=0;a<t.length;a++){var i=t[a];if(!su.call(l,i)||!ol(e[i],l[i]))return!1}return!0}function Ar(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function zr(e,l){var t=Ar(e);e=0;for(var a;t;){if(t.nodeType===3){if(a=e+t.textContent.length,e<=l&&a>=l)return{node:t,offset:l-e};e=a}e:{for(;t;){if(t.nextSibling){t=t.nextSibling;break e}t=t.parentNode}t=void 0}t=Ar(t)}}function _r(e,l){return e&&l?e===l?!0:e&&e.nodeType===3?!1:l&&l.nodeType===3?_r(e,l.parentNode):"contains"in e?e.contains(l):e.compareDocumentPosition?!!(e.compareDocumentPosition(l)&16):!1:!1}function Mr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var l=Bn(e.document);l instanceof e.HTMLIFrameElement;){try{var t=typeof l.contentWindow.location.href=="string"}catch{t=!1}if(t)e=l.contentWindow;else break;l=Bn(e.document)}return l}function Ou(e){var l=e&&e.nodeName&&e.nodeName.toLowerCase();return l&&(l==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||l==="textarea"||e.contentEditable==="true")}var _m=Bl&&"documentMode"in document&&11>=document.documentMode,ta=null,Uu=null,Va=null,Du=!1;function Cr(e,l,t){var a=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;Du||ta==null||ta!==Bn(a)||(a=ta,"selectionStart"in a&&Ou(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}),Va&&Ka(Va,a)||(Va=a,a=Di(Uu,"onSelect"),0<a.length&&(l=new Xn("onSelect","select",null,l,t),e.push({event:l,listeners:a}),l.target=ta)))}function Ot(e,l){var t={};return t[e.toLowerCase()]=l.toLowerCase(),t["Webkit"+e]="webkit"+l,t["Moz"+e]="moz"+l,t}var aa={animationend:Ot("Animation","AnimationEnd"),animationiteration:Ot("Animation","AnimationIteration"),animationstart:Ot("Animation","AnimationStart"),transitionrun:Ot("Transition","TransitionRun"),transitionstart:Ot("Transition","TransitionStart"),transitioncancel:Ot("Transition","TransitionCancel"),transitionend:Ot("Transition","TransitionEnd")},Ru={},Or={};Bl&&(Or=document.createElement("div").style,"AnimationEvent"in window||(delete aa.animationend.animation,delete aa.animationiteration.animation,delete aa.animationstart.animation),"TransitionEvent"in window||delete aa.transitionend.transition);function Ut(e){if(Ru[e])return Ru[e];if(!aa[e])return e;var l=aa[e],t;for(t in l)if(l.hasOwnProperty(t)&&t in Or)return Ru[e]=l[t];return e}var Ur=Ut("animationend"),Dr=Ut("animationiteration"),Rr=Ut("animationstart"),Mm=Ut("transitionrun"),Cm=Ut("transitionstart"),Om=Ut("transitioncancel"),Hr=Ut("transitionend"),kr=new Map,Hu="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(" ");Hu.push("scrollEnd");function Ml(e,l){kr.set(e,l),Mt(l,[e])}var Kn=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=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(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},xl=[],na=0,ku=0;function Vn(){for(var e=na,l=ku=na=0;l<e;){var t=xl[l];xl[l++]=null;var a=xl[l];xl[l++]=null;var i=xl[l];xl[l++]=null;var u=xl[l];if(xl[l++]=null,a!==null&&i!==null){var s=a.pending;s===null?i.next=i:(i.next=s.next,s.next=i),a.pending=i}u!==0&&qr(t,i,u)}}function Jn(e,l,t,a){xl[na++]=e,xl[na++]=l,xl[na++]=t,xl[na++]=a,ku|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function qu(e,l,t,a){return Jn(e,l,t,a),$n(e)}function Dt(e,l){return Jn(e,null,null,l),$n(e)}function qr(e,l,t){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t);for(var i=!1,u=e.return;u!==null;)u.childLanes|=t,a=u.alternate,a!==null&&(a.childLanes|=t),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(i=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,i&&l!==null&&(i=31-dl(t),e=u.hiddenUpdates,a=e[i],a===null?e[i]=[l]:a.push(l),l.lane=t|536870912),u):null}function $n(e){if(50<yn)throw yn=0,Ks=null,Error(o(185));for(var l=e.return;l!==null;)e=l,l=e.return;return e.tag===3?e.stateNode:null}var ia={};function Um(e,l,t,a){this.tag=e,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,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 fl(e,l,t,a){return new Um(e,l,t,a)}function Bu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Yl(e,l){var t=e.alternate;return t===null?(t=fl(e.tag,l,e.key,e.mode),t.elementType=e.elementType,t.type=e.type,t.stateNode=e.stateNode,t.alternate=e,e.alternate=t):(t.pendingProps=l,t.type=e.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=e.flags&65011712,t.childLanes=e.childLanes,t.lanes=e.lanes,t.child=e.child,t.memoizedProps=e.memoizedProps,t.memoizedState=e.memoizedState,t.updateQueue=e.updateQueue,l=e.dependencies,t.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},t.sibling=e.sibling,t.index=e.index,t.ref=e.ref,t.refCleanup=e.refCleanup,t}function Br(e,l){e.flags&=65011714;var t=e.alternate;return t===null?(e.childLanes=0,e.lanes=l,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=t.childLanes,e.lanes=t.lanes,e.child=t.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=t.memoizedProps,e.memoizedState=t.memoizedState,e.updateQueue=t.updateQueue,e.type=t.type,l=t.dependencies,e.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),e}function Wn(e,l,t,a,i,u){var s=0;if(a=e,typeof e=="function")Bu(e)&&(s=1);else if(typeof e=="string")s=qv(e,t,J.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ce:return e=fl(31,t,l,i),e.elementType=ce,e.lanes=u,e;case ee:return Rt(t.children,i,u,l);case se:s=8,i|=24;break;case G:return e=fl(12,t,l,i|2),e.elementType=G,e.lanes=u,e;case ve:return e=fl(13,t,l,i),e.elementType=ve,e.lanes=u,e;case F:return e=fl(19,t,l,i),e.elementType=F,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case P:s=10;break e;case L:s=9;break e;case le:s=11;break e;case V:s=14;break e;case q:s=16,a=null;break e}s=29,t=Error(o(130,e===null?"null":typeof e,"")),a=null}return l=fl(s,t,l,i),l.elementType=e,l.type=a,l.lanes=u,l}function Rt(e,l,t,a){return e=fl(7,e,a,l),e.lanes=t,e}function Yu(e,l,t){return e=fl(6,e,null,l),e.lanes=t,e}function Yr(e){var l=fl(18,null,null,0);return l.stateNode=e,l}function wu(e,l,t){return l=fl(4,e.children!==null?e.children:[],e.key,l),l.lanes=t,l.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},l}var wr=new WeakMap;function bl(e,l){if(typeof e=="object"&&e!==null){var t=wr.get(e);return t!==void 0?t:(l={value:e,source:l,stack:Yc(l)},wr.set(e,l),l)}return{value:e,source:l,stack:Yc(l)}}var ua=[],sa=0,Fn=null,Ja=0,Sl=[],Nl=0,it=null,Ul=1,Dl="";function wl(e,l){ua[sa++]=Ja,ua[sa++]=Fn,Fn=e,Ja=l}function Gr(e,l,t){Sl[Nl++]=Ul,Sl[Nl++]=Dl,Sl[Nl++]=it,it=e;var a=Ul;e=Dl;var i=32-dl(a)-1;a&=~(1<<i),t+=1;var u=32-dl(l)+i;if(30<u){var s=i-i%5;u=(a&(1<<s)-1).toString(32),a>>=s,i-=s,Ul=1<<32-dl(l)+i|t<<i|a,Dl=u+e}else Ul=1<<u|t<<i|a,Dl=e}function Gu(e){e.return!==null&&(wl(e,1),Gr(e,1,0))}function Lu(e){for(;e===Fn;)Fn=ua[--sa],ua[sa]=null,Ja=ua[--sa],ua[sa]=null;for(;e===it;)it=Sl[--Nl],Sl[Nl]=null,Dl=Sl[--Nl],Sl[Nl]=null,Ul=Sl[--Nl],Sl[Nl]=null}function Lr(e,l){Sl[Nl++]=Ul,Sl[Nl++]=Dl,Sl[Nl++]=it,Ul=l.id,Dl=l.overflow,it=e}var Ke=null,ze=null,me=!1,ut=null,El=!1,Xu=Error(o(519));function st(e){var l=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw $a(bl(l,e)),Xu}function Xr(e){var l=e.stateNode,t=e.type,a=e.memoizedProps;switch(l[Ze]=e,l[ll]=a,t){case"dialog":oe("cancel",l),oe("close",l);break;case"iframe":case"object":case"embed":oe("load",l);break;case"video":case"audio":for(t=0;t<pn.length;t++)oe(pn[t],l);break;case"source":oe("error",l);break;case"img":case"image":case"link":oe("error",l),oe("load",l);break;case"details":oe("toggle",l);break;case"input":oe("invalid",l),tr(l,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":oe("invalid",l);break;case"textarea":oe("invalid",l),nr(l,a.value,a.defaultValue,a.children)}t=a.children,typeof t!="string"&&typeof t!="number"&&typeof t!="bigint"||l.textContent===""+t||a.suppressHydrationWarning===!0||cf(l.textContent,t)?(a.popover!=null&&(oe("beforetoggle",l),oe("toggle",l)),a.onScroll!=null&&oe("scroll",l),a.onScrollEnd!=null&&oe("scrollend",l),a.onClick!=null&&(l.onclick=ql),l=!0):l=!1,l||st(e,!0)}function Qr(e){for(Ke=e.return;Ke;)switch(Ke.tag){case 5:case 31:case 13:El=!1;return;case 27:case 3:El=!0;return;default:Ke=Ke.return}}function ca(e){if(e!==Ke)return!1;if(!me)return Qr(e),me=!0,!1;var l=e.tag,t;if((t=l!==3&&l!==27)&&((t=l===5)&&(t=e.type,t=!(t!=="form"&&t!=="button")||sc(e.type,e.memoizedProps)),t=!t),t&&ze&&st(e),Qr(e),l===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ze=gf(e)}else if(l===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ze=gf(e)}else l===27?(l=ze,bt(e.type)?(e=fc,fc=null,ze=e):ze=l):ze=Ke?Al(e.stateNode.nextSibling):null;return!0}function Ht(){ze=Ke=null,me=!1}function Qu(){var e=ut;return e!==null&&(ul===null?ul=e:ul.push.apply(ul,e),ut=null),e}function $a(e){ut===null?ut=[e]:ut.push(e)}var Zu=y(null),kt=null,Gl=null;function ct(e,l,t){X(Zu,l._currentValue),l._currentValue=t}function Ll(e){e._currentValue=Zu.current,D(Zu)}function Ku(e,l,t){for(;e!==null;){var a=e.alternate;if((e.childLanes&l)!==l?(e.childLanes|=l,a!==null&&(a.childLanes|=l)):a!==null&&(a.childLanes&l)!==l&&(a.childLanes|=l),e===t)break;e=e.return}}function Vu(e,l,t,a){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var u=i.dependencies;if(u!==null){var s=i.child;u=u.firstContext;e:for(;u!==null;){var r=u;u=i;for(var h=0;h<l.length;h++)if(r.context===l[h]){u.lanes|=t,r=u.alternate,r!==null&&(r.lanes|=t),Ku(u.return,t,e),a||(s=null);break e}u=r.next}}else if(i.tag===18){if(s=i.return,s===null)throw Error(o(341));s.lanes|=t,u=s.alternate,u!==null&&(u.lanes|=t),Ku(s,t,e),s=null}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===e){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}}function ra(e,l,t,a){e=null;for(var i=l,u=!1;i!==null;){if(!u){if((i.flags&524288)!==0)u=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var s=i.alternate;if(s===null)throw Error(o(387));if(s=s.memoizedProps,s!==null){var r=i.type;ol(i.pendingProps.value,s.value)||(e!==null?e.push(r):e=[r])}}else if(i===je.current){if(s=i.alternate,s===null)throw Error(o(387));s.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(Nn):e=[Nn])}i=i.return}e!==null&&Vu(l,e,t,a),l.flags|=262144}function In(e){for(e=e.firstContext;e!==null;){if(!ol(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function qt(e){kt=e,Gl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ve(e){return Zr(kt,e)}function Pn(e,l){return kt===null&&qt(e),Zr(e,l)}function Zr(e,l){var t=l._currentValue;if(l={context:l,memoizedValue:t,next:null},Gl===null){if(e===null)throw Error(o(308));Gl=l,e.dependencies={lanes:0,firstContext:l},e.flags|=524288}else Gl=Gl.next=l;return t}var Dm=typeof AbortController<"u"?AbortController:function(){var e=[],l=this.signal={aborted:!1,addEventListener:function(t,a){e.push(a)}};this.abort=function(){l.aborted=!0,e.forEach(function(t){return t()})}},Rm=c.unstable_scheduleCallback,Hm=c.unstable_NormalPriority,ke={$$typeof:P,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ju(){return{controller:new Dm,data:new Map,refCount:0}}function Wa(e){e.refCount--,e.refCount===0&&Rm(Hm,function(){e.controller.abort()})}var Fa=null,$u=0,da=0,oa=null;function km(e,l){if(Fa===null){var t=Fa=[];$u=0,da=Is(),oa={status:"pending",value:void 0,then:function(a){t.push(a)}}}return $u++,l.then(Kr,Kr),l}function Kr(){if(--$u===0&&Fa!==null){oa!==null&&(oa.status="fulfilled");var e=Fa;Fa=null,da=0,oa=null;for(var l=0;l<e.length;l++)(0,e[l])()}}function qm(e,l){var t=[],a={status:"pending",value:null,reason:null,then:function(i){t.push(i)}};return e.then(function(){a.status="fulfilled",a.value=l;for(var i=0;i<t.length;i++)(0,t[i])(l)},function(i){for(a.status="rejected",a.reason=i,i=0;i<t.length;i++)(0,t[i])(void 0)}),a}var Vr=z.S;z.S=function(e,l){Oo=cl(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&km(e,l),Vr!==null&&Vr(e,l)};var Bt=y(null);function Wu(){var e=Bt.current;return e!==null?e:Ae.pooledCache}function ei(e,l){l===null?X(Bt,Bt.current):X(Bt,l.pool)}function Jr(){var e=Wu();return e===null?null:{parent:ke._currentValue,pool:e}}var fa=Error(o(460)),Fu=Error(o(474)),li=Error(o(542)),ti={then:function(){}};function $r(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Wr(e,l,t){switch(t=e[t],t===void 0?e.push(l):t!==l&&(l.then(ql,ql),l=t),l.status){case"fulfilled":return l.value;case"rejected":throw e=l.reason,Ir(e),e;default:if(typeof l.status=="string")l.then(ql,ql);else{if(e=Ae,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=l,e.status="pending",e.then(function(a){if(l.status==="pending"){var i=l;i.status="fulfilled",i.value=a}},function(a){if(l.status==="pending"){var i=l;i.status="rejected",i.reason=a}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw e=l.reason,Ir(e),e}throw wt=l,fa}}function Yt(e){try{var l=e._init;return l(e._payload)}catch(t){throw t!==null&&typeof t=="object"&&typeof t.then=="function"?(wt=t,fa):t}}var wt=null;function Fr(){if(wt===null)throw Error(o(459));var e=wt;return wt=null,e}function Ir(e){if(e===fa||e===li)throw Error(o(483))}var ha=null,Ia=0;function ai(e){var l=Ia;return Ia+=1,ha===null&&(ha=[]),Wr(ha,e,l)}function Pa(e,l){l=l.props.ref,e.ref=l!==void 0?l:null}function ni(e,l){throw l.$$typeof===Q?Error(o(525)):(e=Object.prototype.toString.call(l),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":e)))}function Pr(e){function l(x,g){if(e){var S=x.deletions;S===null?(x.deletions=[g],x.flags|=16):S.push(g)}}function t(x,g){if(!e)return null;for(;g!==null;)l(x,g),g=g.sibling;return null}function a(x){for(var g=new Map;x!==null;)x.key!==null?g.set(x.key,x):g.set(x.index,x),x=x.sibling;return g}function i(x,g){return x=Yl(x,g),x.index=0,x.sibling=null,x}function u(x,g,S){return x.index=S,e?(S=x.alternate,S!==null?(S=S.index,S<g?(x.flags|=67108866,g):S):(x.flags|=67108866,g)):(x.flags|=1048576,g)}function s(x){return e&&x.alternate===null&&(x.flags|=67108866),x}function r(x,g,S,O){return g===null||g.tag!==6?(g=Yu(S,x.mode,O),g.return=x,g):(g=i(g,S),g.return=x,g)}function h(x,g,S,O){var W=S.type;return W===ee?M(x,g,S.props.children,O,S.key):g!==null&&(g.elementType===W||typeof W=="object"&&W!==null&&W.$$typeof===q&&Yt(W)===g.type)?(g=i(g,S.props),Pa(g,S),g.return=x,g):(g=Wn(S.type,S.key,S.props,null,x.mode,O),Pa(g,S),g.return=x,g)}function E(x,g,S,O){return g===null||g.tag!==4||g.stateNode.containerInfo!==S.containerInfo||g.stateNode.implementation!==S.implementation?(g=wu(S,x.mode,O),g.return=x,g):(g=i(g,S.children||[]),g.return=x,g)}function M(x,g,S,O,W){return g===null||g.tag!==7?(g=Rt(S,x.mode,O,W),g.return=x,g):(g=i(g,S),g.return=x,g)}function U(x,g,S){if(typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint")return g=Yu(""+g,x.mode,S),g.return=x,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case C:return S=Wn(g.type,g.key,g.props,null,x.mode,S),Pa(S,g),S.return=x,S;case w:return g=wu(g,x.mode,S),g.return=x,g;case q:return g=Yt(g),U(x,g,S)}if(R(g)||Te(g))return g=Rt(g,x.mode,S,null),g.return=x,g;if(typeof g.then=="function")return U(x,ai(g),S);if(g.$$typeof===P)return U(x,Pn(x,g),S);ni(x,g)}return null}function A(x,g,S,O){var W=g!==null?g.key:null;if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return W!==null?null:r(x,g,""+S,O);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case C:return S.key===W?h(x,g,S,O):null;case w:return S.key===W?E(x,g,S,O):null;case q:return S=Yt(S),A(x,g,S,O)}if(R(S)||Te(S))return W!==null?null:M(x,g,S,O,null);if(typeof S.then=="function")return A(x,g,ai(S),O);if(S.$$typeof===P)return A(x,g,Pn(x,S),O);ni(x,S)}return null}function _(x,g,S,O,W){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return x=x.get(S)||null,r(g,x,""+O,W);if(typeof O=="object"&&O!==null){switch(O.$$typeof){case C:return x=x.get(O.key===null?S:O.key)||null,h(g,x,O,W);case w:return x=x.get(O.key===null?S:O.key)||null,E(g,x,O,W);case q:return O=Yt(O),_(x,g,S,O,W)}if(R(O)||Te(O))return x=x.get(S)||null,M(g,x,O,W,null);if(typeof O.then=="function")return _(x,g,S,ai(O),W);if(O.$$typeof===P)return _(x,g,S,Pn(g,O),W);ni(g,O)}return null}function K(x,g,S,O){for(var W=null,ye=null,$=g,ue=g=0,he=null;$!==null&&ue<S.length;ue++){$.index>ue?(he=$,$=null):he=$.sibling;var ge=A(x,$,S[ue],O);if(ge===null){$===null&&($=he);break}e&&$&&ge.alternate===null&&l(x,$),g=u(ge,g,ue),ye===null?W=ge:ye.sibling=ge,ye=ge,$=he}if(ue===S.length)return t(x,$),me&&wl(x,ue),W;if($===null){for(;ue<S.length;ue++)$=U(x,S[ue],O),$!==null&&(g=u($,g,ue),ye===null?W=$:ye.sibling=$,ye=$);return me&&wl(x,ue),W}for($=a($);ue<S.length;ue++)he=_($,x,ue,S[ue],O),he!==null&&(e&&he.alternate!==null&&$.delete(he.key===null?ue:he.key),g=u(he,g,ue),ye===null?W=he:ye.sibling=he,ye=he);return e&&$.forEach(function(At){return l(x,At)}),me&&wl(x,ue),W}function I(x,g,S,O){if(S==null)throw Error(o(151));for(var W=null,ye=null,$=g,ue=g=0,he=null,ge=S.next();$!==null&&!ge.done;ue++,ge=S.next()){$.index>ue?(he=$,$=null):he=$.sibling;var At=A(x,$,ge.value,O);if(At===null){$===null&&($=he);break}e&&$&&At.alternate===null&&l(x,$),g=u(At,g,ue),ye===null?W=At:ye.sibling=At,ye=At,$=he}if(ge.done)return t(x,$),me&&wl(x,ue),W;if($===null){for(;!ge.done;ue++,ge=S.next())ge=U(x,ge.value,O),ge!==null&&(g=u(ge,g,ue),ye===null?W=ge:ye.sibling=ge,ye=ge);return me&&wl(x,ue),W}for($=a($);!ge.done;ue++,ge=S.next())ge=_($,x,ue,ge.value,O),ge!==null&&(e&&ge.alternate!==null&&$.delete(ge.key===null?ue:ge.key),g=u(ge,g,ue),ye===null?W=ge:ye.sibling=ge,ye=ge);return e&&$.forEach(function(Jv){return l(x,Jv)}),me&&wl(x,ue),W}function Ee(x,g,S,O){if(typeof S=="object"&&S!==null&&S.type===ee&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case C:e:{for(var W=S.key;g!==null;){if(g.key===W){if(W=S.type,W===ee){if(g.tag===7){t(x,g.sibling),O=i(g,S.props.children),O.return=x,x=O;break e}}else if(g.elementType===W||typeof W=="object"&&W!==null&&W.$$typeof===q&&Yt(W)===g.type){t(x,g.sibling),O=i(g,S.props),Pa(O,S),O.return=x,x=O;break e}t(x,g);break}else l(x,g);g=g.sibling}S.type===ee?(O=Rt(S.props.children,x.mode,O,S.key),O.return=x,x=O):(O=Wn(S.type,S.key,S.props,null,x.mode,O),Pa(O,S),O.return=x,x=O)}return s(x);case w:e:{for(W=S.key;g!==null;){if(g.key===W)if(g.tag===4&&g.stateNode.containerInfo===S.containerInfo&&g.stateNode.implementation===S.implementation){t(x,g.sibling),O=i(g,S.children||[]),O.return=x,x=O;break e}else{t(x,g);break}else l(x,g);g=g.sibling}O=wu(S,x.mode,O),O.return=x,x=O}return s(x);case q:return S=Yt(S),Ee(x,g,S,O)}if(R(S))return K(x,g,S,O);if(Te(S)){if(W=Te(S),typeof W!="function")throw Error(o(150));return S=W.call(S),I(x,g,S,O)}if(typeof S.then=="function")return Ee(x,g,ai(S),O);if(S.$$typeof===P)return Ee(x,g,Pn(x,S),O);ni(x,S)}return typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint"?(S=""+S,g!==null&&g.tag===6?(t(x,g.sibling),O=i(g,S),O.return=x,x=O):(t(x,g),O=Yu(S,x.mode,O),O.return=x,x=O),s(x)):t(x,g)}return function(x,g,S,O){try{Ia=0;var W=Ee(x,g,S,O);return ha=null,W}catch($){if($===fa||$===li)throw $;var ye=fl(29,$,null,x.mode);return ye.lanes=O,ye.return=x,ye}}}var Gt=Pr(!0),ed=Pr(!1),rt=!1;function Iu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Pu(e,l){e=e.updateQueue,l.updateQueue===e&&(l.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function dt(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ot(e,l,t){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(pe&2)!==0){var i=a.pending;return i===null?l.next=l:(l.next=i.next,i.next=l),a.pending=l,l=$n(e),qr(e,null,t),l}return Jn(e,a,l,t),$n(e)}function en(e,l,t){if(l=l.updateQueue,l!==null&&(l=l.shared,(t&4194048)!==0)){var a=l.lanes;a&=e.pendingLanes,t|=a,l.lanes=t,Zc(e,t)}}function es(e,l){var t=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,t===a)){var i=null,u=null;if(t=t.firstBaseUpdate,t!==null){do{var s={lane:t.lane,tag:t.tag,payload:t.payload,callback:null,next:null};u===null?i=u=s:u=u.next=s,t=t.next}while(t!==null);u===null?i=u=l:u=u.next=l}else i=u=l;t={baseState:a.baseState,firstBaseUpdate:i,lastBaseUpdate:u,shared:a.shared,callbacks:a.callbacks},e.updateQueue=t;return}e=t.lastBaseUpdate,e===null?t.firstBaseUpdate=l:e.next=l,t.lastBaseUpdate=l}var ls=!1;function ln(){if(ls){var e=oa;if(e!==null)throw e}}function tn(e,l,t,a){ls=!1;var i=e.updateQueue;rt=!1;var u=i.firstBaseUpdate,s=i.lastBaseUpdate,r=i.shared.pending;if(r!==null){i.shared.pending=null;var h=r,E=h.next;h.next=null,s===null?u=E:s.next=E,s=h;var M=e.alternate;M!==null&&(M=M.updateQueue,r=M.lastBaseUpdate,r!==s&&(r===null?M.firstBaseUpdate=E:r.next=E,M.lastBaseUpdate=h))}if(u!==null){var U=i.baseState;s=0,M=E=h=null,r=u;do{var A=r.lane&-536870913,_=A!==r.lane;if(_?(fe&A)===A:(a&A)===A){A!==0&&A===da&&(ls=!0),M!==null&&(M=M.next={lane:0,tag:r.tag,payload:r.payload,callback:null,next:null});e:{var K=e,I=r;A=l;var Ee=t;switch(I.tag){case 1:if(K=I.payload,typeof K=="function"){U=K.call(Ee,U,A);break e}U=K;break e;case 3:K.flags=K.flags&-65537|128;case 0:if(K=I.payload,A=typeof K=="function"?K.call(Ee,U,A):K,A==null)break e;U=k({},U,A);break e;case 2:rt=!0}}A=r.callback,A!==null&&(e.flags|=64,_&&(e.flags|=8192),_=i.callbacks,_===null?i.callbacks=[A]:_.push(A))}else _={lane:A,tag:r.tag,payload:r.payload,callback:r.callback,next:null},M===null?(E=M=_,h=U):M=M.next=_,s|=A;if(r=r.next,r===null){if(r=i.shared.pending,r===null)break;_=r,r=_.next,_.next=null,i.lastBaseUpdate=_,i.shared.pending=null}}while(!0);M===null&&(h=U),i.baseState=h,i.firstBaseUpdate=E,i.lastBaseUpdate=M,u===null&&(i.shared.lanes=0),yt|=s,e.lanes=s,e.memoizedState=U}}function ld(e,l){if(typeof e!="function")throw Error(o(191,e));e.call(l)}function td(e,l){var t=e.callbacks;if(t!==null)for(e.callbacks=null,e=0;e<t.length;e++)ld(t[e],l)}var ma=y(null),ii=y(0);function ad(e,l){e=Fl,X(ii,e),X(ma,l),Fl=e|l.baseLanes}function ts(){X(ii,Fl),X(ma,ma.current)}function as(){Fl=ii.current,D(ma),D(ii)}var hl=y(null),Tl=null;function ft(e){var l=e.alternate;X(Re,Re.current&1),X(hl,e),Tl===null&&(l===null||ma.current!==null||l.memoizedState!==null)&&(Tl=e)}function ns(e){X(Re,Re.current),X(hl,e),Tl===null&&(Tl=e)}function nd(e){e.tag===22?(X(Re,Re.current),X(hl,e),Tl===null&&(Tl=e)):ht()}function ht(){X(Re,Re.current),X(hl,hl.current)}function ml(e){D(hl),Tl===e&&(Tl=null),D(Re)}var Re=y(0);function ui(e){for(var l=e;l!==null;){if(l.tag===13){var t=l.memoizedState;if(t!==null&&(t=t.dehydrated,t===null||dc(t)||oc(t)))return l}else if(l.tag===19&&(l.memoizedProps.revealOrder==="forwards"||l.memoizedProps.revealOrder==="backwards"||l.memoizedProps.revealOrder==="unstable_legacy-backwards"||l.memoizedProps.revealOrder==="together")){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===e)break;for(;l.sibling===null;){if(l.return===null||l.return===e)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var Xl=0,ie=null,Se=null,qe=null,si=!1,va=!1,Lt=!1,ci=0,an=0,ya=null,Bm=0;function Oe(){throw Error(o(321))}function is(e,l){if(l===null)return!1;for(var t=0;t<l.length&&t<e.length;t++)if(!ol(e[t],l[t]))return!1;return!0}function us(e,l,t,a,i,u){return Xl=u,ie=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,z.H=e===null||e.memoizedState===null?Gd:bs,Lt=!1,u=t(a,i),Lt=!1,va&&(u=ud(l,t,a,i)),id(e),u}function id(e){z.H=sn;var l=Se!==null&&Se.next!==null;if(Xl=0,qe=Se=ie=null,si=!1,an=0,ya=null,l)throw Error(o(300));e===null||Be||(e=e.dependencies,e!==null&&In(e)&&(Be=!0))}function ud(e,l,t,a){ie=e;var i=0;do{if(va&&(ya=null),an=0,va=!1,25<=i)throw Error(o(301));if(i+=1,qe=Se=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}z.H=Ld,u=l(t,a)}while(va);return u}function Ym(){var e=z.H,l=e.useState()[0];return l=typeof l.then=="function"?nn(l):l,e=e.useState()[0],(Se!==null?Se.memoizedState:null)!==e&&(ie.flags|=1024),l}function ss(){var e=ci!==0;return ci=0,e}function cs(e,l,t){l.updateQueue=e.updateQueue,l.flags&=-2053,e.lanes&=~t}function rs(e){if(si){for(e=e.memoizedState;e!==null;){var l=e.queue;l!==null&&(l.pending=null),e=e.next}si=!1}Xl=0,qe=Se=ie=null,va=!1,an=ci=0,ya=null}function Ie(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qe===null?ie.memoizedState=qe=e:qe=qe.next=e,qe}function He(){if(Se===null){var e=ie.alternate;e=e!==null?e.memoizedState:null}else e=Se.next;var l=qe===null?ie.memoizedState:qe.next;if(l!==null)qe=l,Se=e;else{if(e===null)throw ie.alternate===null?Error(o(467)):Error(o(310));Se=e,e={memoizedState:Se.memoizedState,baseState:Se.baseState,baseQueue:Se.baseQueue,queue:Se.queue,next:null},qe===null?ie.memoizedState=qe=e:qe=qe.next=e}return qe}function ri(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function nn(e){var l=an;return an+=1,ya===null&&(ya=[]),e=Wr(ya,e,l),l=ie,(qe===null?l.memoizedState:qe.next)===null&&(l=l.alternate,z.H=l===null||l.memoizedState===null?Gd:bs),e}function di(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return nn(e);if(e.$$typeof===P)return Ve(e)}throw Error(o(438,String(e)))}function ds(e){var l=null,t=ie.updateQueue;if(t!==null&&(l=t.memoCache),l==null){var a=ie.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(l={data:a.data.map(function(i){return i.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),t===null&&(t=ri(),ie.updateQueue=t),t.memoCache=l,t=l.data[l.index],t===void 0)for(t=l.data[l.index]=Array(e),a=0;a<e;a++)t[a]=we;return l.index++,t}function Ql(e,l){return typeof l=="function"?l(e):l}function oi(e){var l=He();return os(l,Se,e)}function os(e,l,t){var a=e.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=t;var i=e.baseQueue,u=a.pending;if(u!==null){if(i!==null){var s=i.next;i.next=u.next,u.next=s}l.baseQueue=i=u,a.pending=null}if(u=e.baseState,i===null)e.memoizedState=u;else{l=i.next;var r=s=null,h=null,E=l,M=!1;do{var U=E.lane&-536870913;if(U!==E.lane?(fe&U)===U:(Xl&U)===U){var A=E.revertLane;if(A===0)h!==null&&(h=h.next={lane:0,revertLane:0,gesture:null,action:E.action,hasEagerState:E.hasEagerState,eagerState:E.eagerState,next:null}),U===da&&(M=!0);else if((Xl&A)===A){E=E.next,A===da&&(M=!0);continue}else U={lane:0,revertLane:E.revertLane,gesture:null,action:E.action,hasEagerState:E.hasEagerState,eagerState:E.eagerState,next:null},h===null?(r=h=U,s=u):h=h.next=U,ie.lanes|=A,yt|=A;U=E.action,Lt&&t(u,U),u=E.hasEagerState?E.eagerState:t(u,U)}else A={lane:U,revertLane:E.revertLane,gesture:E.gesture,action:E.action,hasEagerState:E.hasEagerState,eagerState:E.eagerState,next:null},h===null?(r=h=A,s=u):h=h.next=A,ie.lanes|=U,yt|=U;E=E.next}while(E!==null&&E!==l);if(h===null?s=u:h.next=r,!ol(u,e.memoizedState)&&(Be=!0,M&&(t=oa,t!==null)))throw t;e.memoizedState=u,e.baseState=s,e.baseQueue=h,a.lastRenderedState=u}return i===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function fs(e){var l=He(),t=l.queue;if(t===null)throw Error(o(311));t.lastRenderedReducer=e;var a=t.dispatch,i=t.pending,u=l.memoizedState;if(i!==null){t.pending=null;var s=i=i.next;do u=e(u,s.action),s=s.next;while(s!==i);ol(u,l.memoizedState)||(Be=!0),l.memoizedState=u,l.baseQueue===null&&(l.baseState=u),t.lastRenderedState=u}return[u,a]}function sd(e,l,t){var a=ie,i=He(),u=me;if(u){if(t===void 0)throw Error(o(407));t=t()}else t=l();var s=!ol((Se||i).memoizedState,t);if(s&&(i.memoizedState=t,Be=!0),i=i.queue,vs(dd.bind(null,a,i,e),[e]),i.getSnapshot!==l||s||qe!==null&&qe.memoizedState.tag&1){if(a.flags|=2048,ga(9,{destroy:void 0},rd.bind(null,a,i,t,l),null),Ae===null)throw Error(o(349));u||(Xl&127)!==0||cd(a,l,t)}return t}function cd(e,l,t){e.flags|=16384,e={getSnapshot:l,value:t},l=ie.updateQueue,l===null?(l=ri(),ie.updateQueue=l,l.stores=[e]):(t=l.stores,t===null?l.stores=[e]:t.push(e))}function rd(e,l,t,a){l.value=t,l.getSnapshot=a,od(l)&&fd(e)}function dd(e,l,t){return t(function(){od(l)&&fd(e)})}function od(e){var l=e.getSnapshot;e=e.value;try{var t=l();return!ol(e,t)}catch{return!0}}function fd(e){var l=Dt(e,2);l!==null&&sl(l,e,2)}function hs(e){var l=Ie();if(typeof e=="function"){var t=e;if(e=t(),Lt){tt(!0);try{t()}finally{tt(!1)}}}return l.memoizedState=l.baseState=e,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ql,lastRenderedState:e},l}function hd(e,l,t,a){return e.baseState=t,os(e,Se,typeof a=="function"?a:Ql)}function wm(e,l,t,a,i){if(mi(e))throw Error(o(485));if(e=l.action,e!==null){var u={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(s){u.listeners.push(s)}};z.T!==null?t(!0):u.isTransition=!1,a(u),t=l.pending,t===null?(u.next=l.pending=u,md(l,u)):(u.next=t.next,l.pending=t.next=u)}}function md(e,l){var t=l.action,a=l.payload,i=e.state;if(l.isTransition){var u=z.T,s={};z.T=s;try{var r=t(i,a),h=z.S;h!==null&&h(s,r),vd(e,l,r)}catch(E){ms(e,l,E)}finally{u!==null&&s.types!==null&&(u.types=s.types),z.T=u}}else try{u=t(i,a),vd(e,l,u)}catch(E){ms(e,l,E)}}function vd(e,l,t){t!==null&&typeof t=="object"&&typeof t.then=="function"?t.then(function(a){yd(e,l,a)},function(a){return ms(e,l,a)}):yd(e,l,t)}function yd(e,l,t){l.status="fulfilled",l.value=t,gd(l),e.state=t,l=e.pending,l!==null&&(t=l.next,t===l?e.pending=null:(t=t.next,l.next=t,md(e,t)))}function ms(e,l,t){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do l.status="rejected",l.reason=t,gd(l),l=l.next;while(l!==a)}e.action=null}function gd(e){e=e.listeners;for(var l=0;l<e.length;l++)(0,e[l])()}function pd(e,l){return l}function jd(e,l){if(me){var t=Ae.formState;if(t!==null){e:{var a=ie;if(me){if(ze){l:{for(var i=ze,u=El;i.nodeType!==8;){if(!u){i=null;break l}if(i=Al(i.nextSibling),i===null){i=null;break l}}u=i.data,i=u==="F!"||u==="F"?i:null}if(i){ze=Al(i.nextSibling),a=i.data==="F!";break e}}st(a)}a=!1}a&&(l=t[0])}}return t=Ie(),t.memoizedState=t.baseState=l,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:pd,lastRenderedState:l},t.queue=a,t=Bd.bind(null,ie,a),a.dispatch=t,a=hs(!1),u=xs.bind(null,ie,!1,a.queue),a=Ie(),i={state:l,dispatch:null,action:e,pending:null},a.queue=i,t=wm.bind(null,ie,i,u,t),i.dispatch=t,a.memoizedState=e,[l,t,!1]}function xd(e){var l=He();return bd(l,Se,e)}function bd(e,l,t){if(l=os(e,l,pd)[0],e=oi(Ql)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var a=nn(l)}catch(s){throw s===fa?li:s}else a=l;l=He();var i=l.queue,u=i.dispatch;return t!==l.memoizedState&&(ie.flags|=2048,ga(9,{destroy:void 0},Gm.bind(null,i,t),null)),[a,u,e]}function Gm(e,l){e.action=l}function Sd(e){var l=He(),t=Se;if(t!==null)return bd(l,t,e);He(),l=l.memoizedState,t=He();var a=t.queue.dispatch;return t.memoizedState=e,[l,a,!1]}function ga(e,l,t,a){return e={tag:e,create:t,deps:a,inst:l,next:null},l=ie.updateQueue,l===null&&(l=ri(),ie.updateQueue=l),t=l.lastEffect,t===null?l.lastEffect=e.next=e:(a=t.next,t.next=e,e.next=a,l.lastEffect=e),e}function Nd(){return He().memoizedState}function fi(e,l,t,a){var i=Ie();ie.flags|=e,i.memoizedState=ga(1|l,{destroy:void 0},t,a===void 0?null:a)}function hi(e,l,t,a){var i=He();a=a===void 0?null:a;var u=i.memoizedState.inst;Se!==null&&a!==null&&is(a,Se.memoizedState.deps)?i.memoizedState=ga(l,u,t,a):(ie.flags|=e,i.memoizedState=ga(1|l,u,t,a))}function Ed(e,l){fi(8390656,8,e,l)}function vs(e,l){hi(2048,8,e,l)}function Lm(e){ie.flags|=4;var l=ie.updateQueue;if(l===null)l=ri(),ie.updateQueue=l,l.events=[e];else{var t=l.events;t===null?l.events=[e]:t.push(e)}}function Td(e){var l=He().memoizedState;return Lm({ref:l,nextImpl:e}),function(){if((pe&2)!==0)throw Error(o(440));return l.impl.apply(void 0,arguments)}}function Ad(e,l){return hi(4,2,e,l)}function zd(e,l){return hi(4,4,e,l)}function _d(e,l){if(typeof l=="function"){e=e();var t=l(e);return function(){typeof t=="function"?t():l(null)}}if(l!=null)return e=e(),l.current=e,function(){l.current=null}}function Md(e,l,t){t=t!=null?t.concat([e]):null,hi(4,4,_d.bind(null,l,e),t)}function ys(){}function Cd(e,l){var t=He();l=l===void 0?null:l;var a=t.memoizedState;return l!==null&&is(l,a[1])?a[0]:(t.memoizedState=[e,l],e)}function Od(e,l){var t=He();l=l===void 0?null:l;var a=t.memoizedState;if(l!==null&&is(l,a[1]))return a[0];if(a=e(),Lt){tt(!0);try{e()}finally{tt(!1)}}return t.memoizedState=[a,l],a}function gs(e,l,t){return t===void 0||(Xl&1073741824)!==0&&(fe&261930)===0?e.memoizedState=l:(e.memoizedState=t,e=Do(),ie.lanes|=e,yt|=e,t)}function Ud(e,l,t,a){return ol(t,l)?t:ma.current!==null?(e=gs(e,t,a),ol(e,l)||(Be=!0),e):(Xl&42)===0||(Xl&1073741824)!==0&&(fe&261930)===0?(Be=!0,e.memoizedState=t):(e=Do(),ie.lanes|=e,yt|=e,l)}function Dd(e,l,t,a,i){var u=m.p;m.p=u!==0&&8>u?u:8;var s=z.T,r={};z.T=r,xs(e,!1,l,t);try{var h=i(),E=z.S;if(E!==null&&E(r,h),h!==null&&typeof h=="object"&&typeof h.then=="function"){var M=qm(h,a);un(e,l,M,gl(e))}else un(e,l,a,gl(e))}catch(U){un(e,l,{then:function(){},status:"rejected",reason:U},gl())}finally{m.p=u,s!==null&&r.types!==null&&(s.types=r.types),z.T=s}}function Xm(){}function ps(e,l,t,a){if(e.tag!==5)throw Error(o(476));var i=Rd(e).queue;Dd(e,i,l,Y,t===null?Xm:function(){return Hd(e),t(a)})}function Rd(e){var l=e.memoizedState;if(l!==null)return l;l={memoizedState:Y,baseState:Y,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ql,lastRenderedState:Y},next:null};var t={};return l.next={memoizedState:t,baseState:t,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ql,lastRenderedState:t},next:null},e.memoizedState=l,e=e.alternate,e!==null&&(e.memoizedState=l),l}function Hd(e){var l=Rd(e);l.next===null&&(l=e.alternate.memoizedState),un(e,l.next.queue,{},gl())}function js(){return Ve(Nn)}function kd(){return He().memoizedState}function qd(){return He().memoizedState}function Qm(e){for(var l=e.return;l!==null;){switch(l.tag){case 24:case 3:var t=gl();e=dt(t);var a=ot(l,e,t);a!==null&&(sl(a,l,t),en(a,l,t)),l={cache:Ju()},e.payload=l;return}l=l.return}}function Zm(e,l,t){var a=gl();t={lane:a,revertLane:0,gesture:null,action:t,hasEagerState:!1,eagerState:null,next:null},mi(e)?Yd(l,t):(t=qu(e,l,t,a),t!==null&&(sl(t,e,a),wd(t,l,a)))}function Bd(e,l,t){var a=gl();un(e,l,t,a)}function un(e,l,t,a){var i={lane:a,revertLane:0,gesture:null,action:t,hasEagerState:!1,eagerState:null,next:null};if(mi(e))Yd(l,i);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=l.lastRenderedReducer,u!==null))try{var s=l.lastRenderedState,r=u(s,t);if(i.hasEagerState=!0,i.eagerState=r,ol(r,s))return Jn(e,l,i,0),Ae===null&&Vn(),!1}catch{}if(t=qu(e,l,i,a),t!==null)return sl(t,e,a),wd(t,l,a),!0}return!1}function xs(e,l,t,a){if(a={lane:2,revertLane:Is(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},mi(e)){if(l)throw Error(o(479))}else l=qu(e,t,a,2),l!==null&&sl(l,e,2)}function mi(e){var l=e.alternate;return e===ie||l!==null&&l===ie}function Yd(e,l){va=si=!0;var t=e.pending;t===null?l.next=l:(l.next=t.next,t.next=l),e.pending=l}function wd(e,l,t){if((t&4194048)!==0){var a=l.lanes;a&=e.pendingLanes,t|=a,l.lanes=t,Zc(e,t)}}var sn={readContext:Ve,use:di,useCallback:Oe,useContext:Oe,useEffect:Oe,useImperativeHandle:Oe,useLayoutEffect:Oe,useInsertionEffect:Oe,useMemo:Oe,useReducer:Oe,useRef:Oe,useState:Oe,useDebugValue:Oe,useDeferredValue:Oe,useTransition:Oe,useSyncExternalStore:Oe,useId:Oe,useHostTransitionStatus:Oe,useFormState:Oe,useActionState:Oe,useOptimistic:Oe,useMemoCache:Oe,useCacheRefresh:Oe};sn.useEffectEvent=Oe;var Gd={readContext:Ve,use:di,useCallback:function(e,l){return Ie().memoizedState=[e,l===void 0?null:l],e},useContext:Ve,useEffect:Ed,useImperativeHandle:function(e,l,t){t=t!=null?t.concat([e]):null,fi(4194308,4,_d.bind(null,l,e),t)},useLayoutEffect:function(e,l){return fi(4194308,4,e,l)},useInsertionEffect:function(e,l){fi(4,2,e,l)},useMemo:function(e,l){var t=Ie();l=l===void 0?null:l;var a=e();if(Lt){tt(!0);try{e()}finally{tt(!1)}}return t.memoizedState=[a,l],a},useReducer:function(e,l,t){var a=Ie();if(t!==void 0){var i=t(l);if(Lt){tt(!0);try{t(l)}finally{tt(!1)}}}else i=l;return a.memoizedState=a.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},a.queue=e,e=e.dispatch=Zm.bind(null,ie,e),[a.memoizedState,e]},useRef:function(e){var l=Ie();return e={current:e},l.memoizedState=e},useState:function(e){e=hs(e);var l=e.queue,t=Bd.bind(null,ie,l);return l.dispatch=t,[e.memoizedState,t]},useDebugValue:ys,useDeferredValue:function(e,l){var t=Ie();return gs(t,e,l)},useTransition:function(){var e=hs(!1);return e=Dd.bind(null,ie,e.queue,!0,!1),Ie().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,l,t){var a=ie,i=Ie();if(me){if(t===void 0)throw Error(o(407));t=t()}else{if(t=l(),Ae===null)throw Error(o(349));(fe&127)!==0||cd(a,l,t)}i.memoizedState=t;var u={value:t,getSnapshot:l};return i.queue=u,Ed(dd.bind(null,a,u,e),[e]),a.flags|=2048,ga(9,{destroy:void 0},rd.bind(null,a,u,t,l),null),t},useId:function(){var e=Ie(),l=Ae.identifierPrefix;if(me){var t=Dl,a=Ul;t=(a&~(1<<32-dl(a)-1)).toString(32)+t,l="_"+l+"R_"+t,t=ci++,0<t&&(l+="H"+t.toString(32)),l+="_"}else t=Bm++,l="_"+l+"r_"+t.toString(32)+"_";return e.memoizedState=l},useHostTransitionStatus:js,useFormState:jd,useActionState:jd,useOptimistic:function(e){var l=Ie();l.memoizedState=l.baseState=e;var t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=t,l=xs.bind(null,ie,!0,t),t.dispatch=l,[e,l]},useMemoCache:ds,useCacheRefresh:function(){return Ie().memoizedState=Qm.bind(null,ie)},useEffectEvent:function(e){var l=Ie(),t={impl:e};return l.memoizedState=t,function(){if((pe&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}},bs={readContext:Ve,use:di,useCallback:Cd,useContext:Ve,useEffect:vs,useImperativeHandle:Md,useInsertionEffect:Ad,useLayoutEffect:zd,useMemo:Od,useReducer:oi,useRef:Nd,useState:function(){return oi(Ql)},useDebugValue:ys,useDeferredValue:function(e,l){var t=He();return Ud(t,Se.memoizedState,e,l)},useTransition:function(){var e=oi(Ql)[0],l=He().memoizedState;return[typeof e=="boolean"?e:nn(e),l]},useSyncExternalStore:sd,useId:kd,useHostTransitionStatus:js,useFormState:xd,useActionState:xd,useOptimistic:function(e,l){var t=He();return hd(t,Se,e,l)},useMemoCache:ds,useCacheRefresh:qd};bs.useEffectEvent=Td;var Ld={readContext:Ve,use:di,useCallback:Cd,useContext:Ve,useEffect:vs,useImperativeHandle:Md,useInsertionEffect:Ad,useLayoutEffect:zd,useMemo:Od,useReducer:fs,useRef:Nd,useState:function(){return fs(Ql)},useDebugValue:ys,useDeferredValue:function(e,l){var t=He();return Se===null?gs(t,e,l):Ud(t,Se.memoizedState,e,l)},useTransition:function(){var e=fs(Ql)[0],l=He().memoizedState;return[typeof e=="boolean"?e:nn(e),l]},useSyncExternalStore:sd,useId:kd,useHostTransitionStatus:js,useFormState:Sd,useActionState:Sd,useOptimistic:function(e,l){var t=He();return Se!==null?hd(t,Se,e,l):(t.baseState=e,[e,t.queue.dispatch])},useMemoCache:ds,useCacheRefresh:qd};Ld.useEffectEvent=Td;function Ss(e,l,t,a){l=e.memoizedState,t=t(a,l),t=t==null?l:k({},l,t),e.memoizedState=t,e.lanes===0&&(e.updateQueue.baseState=t)}var Ns={enqueueSetState:function(e,l,t){e=e._reactInternals;var a=gl(),i=dt(a);i.payload=l,t!=null&&(i.callback=t),l=ot(e,i,a),l!==null&&(sl(l,e,a),en(l,e,a))},enqueueReplaceState:function(e,l,t){e=e._reactInternals;var a=gl(),i=dt(a);i.tag=1,i.payload=l,t!=null&&(i.callback=t),l=ot(e,i,a),l!==null&&(sl(l,e,a),en(l,e,a))},enqueueForceUpdate:function(e,l){e=e._reactInternals;var t=gl(),a=dt(t);a.tag=2,l!=null&&(a.callback=l),l=ot(e,a,t),l!==null&&(sl(l,e,t),en(l,e,t))}};function Xd(e,l,t,a,i,u,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,u,s):l.prototype&&l.prototype.isPureReactComponent?!Ka(t,a)||!Ka(i,u):!0}function Qd(e,l,t,a){e=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(t,a),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(t,a),l.state!==e&&Ns.enqueueReplaceState(l,l.state,null)}function Xt(e,l){var t=l;if("ref"in l){t={};for(var a in l)a!=="ref"&&(t[a]=l[a])}if(e=e.defaultProps){t===l&&(t=k({},t));for(var i in e)t[i]===void 0&&(t[i]=e[i])}return t}function Zd(e){Kn(e)}function Kd(e){console.error(e)}function Vd(e){Kn(e)}function vi(e,l){try{var t=e.onUncaughtError;t(l.value,{componentStack:l.stack})}catch(a){setTimeout(function(){throw a})}}function Jd(e,l,t){try{var a=e.onCaughtError;a(t.value,{componentStack:t.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function Es(e,l,t){return t=dt(t),t.tag=3,t.payload={element:null},t.callback=function(){vi(e,l)},t}function $d(e){return e=dt(e),e.tag=3,e}function Wd(e,l,t,a){var i=t.type.getDerivedStateFromError;if(typeof i=="function"){var u=a.value;e.payload=function(){return i(u)},e.callback=function(){Jd(l,t,a)}}var s=t.stateNode;s!==null&&typeof s.componentDidCatch=="function"&&(e.callback=function(){Jd(l,t,a),typeof i!="function"&&(gt===null?gt=new Set([this]):gt.add(this));var r=a.stack;this.componentDidCatch(a.value,{componentStack:r!==null?r:""})})}function Km(e,l,t,a,i){if(t.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(l=t.alternate,l!==null&&ra(l,t,i,!0),t=hl.current,t!==null){switch(t.tag){case 31:case 13:return Tl===null?zi():t.alternate===null&&Ue===0&&(Ue=3),t.flags&=-257,t.flags|=65536,t.lanes=i,a===ti?t.flags|=16384:(l=t.updateQueue,l===null?t.updateQueue=new Set([a]):l.add(a),$s(e,a,i)),!1;case 22:return t.flags|=65536,a===ti?t.flags|=16384:(l=t.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([a])},t.updateQueue=l):(t=l.retryQueue,t===null?l.retryQueue=new Set([a]):t.add(a)),$s(e,a,i)),!1}throw Error(o(435,t.tag))}return $s(e,a,i),zi(),!1}if(me)return l=hl.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=i,a!==Xu&&(e=Error(o(422),{cause:a}),$a(bl(e,t)))):(a!==Xu&&(l=Error(o(423),{cause:a}),$a(bl(l,t))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,a=bl(a,t),i=Es(e.stateNode,a,i),es(e,i),Ue!==4&&(Ue=2)),!1;var u=Error(o(520),{cause:a});if(u=bl(u,t),vn===null?vn=[u]:vn.push(u),Ue!==4&&(Ue=2),l===null)return!0;a=bl(a,t),t=l;do{switch(t.tag){case 3:return t.flags|=65536,e=i&-i,t.lanes|=e,e=Es(t.stateNode,a,e),es(t,e),!1;case 1:if(l=t.type,u=t.stateNode,(t.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(gt===null||!gt.has(u))))return t.flags|=65536,i&=-i,t.lanes|=i,i=$d(i),Wd(i,e,t,a),es(t,i),!1}t=t.return}while(t!==null);return!1}var Ts=Error(o(461)),Be=!1;function Je(e,l,t,a){l.child=e===null?ed(l,null,t,a):Gt(l,e.child,t,a)}function Fd(e,l,t,a,i){t=t.render;var u=l.ref;if("ref"in a){var s={};for(var r in a)r!=="ref"&&(s[r]=a[r])}else s=a;return qt(l),a=us(e,l,t,s,u,i),r=ss(),e!==null&&!Be?(cs(e,l,i),Zl(e,l,i)):(me&&r&&Gu(l),l.flags|=1,Je(e,l,a,i),l.child)}function Id(e,l,t,a,i){if(e===null){var u=t.type;return typeof u=="function"&&!Bu(u)&&u.defaultProps===void 0&&t.compare===null?(l.tag=15,l.type=u,Pd(e,l,u,a,i)):(e=Wn(t.type,null,a,l,l.mode,i),e.ref=l.ref,e.return=l,l.child=e)}if(u=e.child,!Ds(e,i)){var s=u.memoizedProps;if(t=t.compare,t=t!==null?t:Ka,t(s,a)&&e.ref===l.ref)return Zl(e,l,i)}return l.flags|=1,e=Yl(u,a),e.ref=l.ref,e.return=l,l.child=e}function Pd(e,l,t,a,i){if(e!==null){var u=e.memoizedProps;if(Ka(u,a)&&e.ref===l.ref)if(Be=!1,l.pendingProps=a=u,Ds(e,i))(e.flags&131072)!==0&&(Be=!0);else return l.lanes=e.lanes,Zl(e,l,i)}return As(e,l,t,a,i)}function eo(e,l,t,a){var i=a.children,u=e!==null?e.memoizedState:null;if(e===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((l.flags&128)!==0){if(u=u!==null?u.baseLanes|t:t,e!==null){for(a=l.child=e.child,i=0;a!==null;)i=i|a.lanes|a.childLanes,a=a.sibling;a=i&~u}else a=0,l.child=null;return lo(e,l,u,t,a)}if((t&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},e!==null&&ei(l,u!==null?u.cachePool:null),u!==null?ad(l,u):ts(),nd(l);else return a=l.lanes=536870912,lo(e,l,u!==null?u.baseLanes|t:t,t,a)}else u!==null?(ei(l,u.cachePool),ad(l,u),ht(),l.memoizedState=null):(e!==null&&ei(l,null),ts(),ht());return Je(e,l,i,t),l.child}function cn(e,l){return e!==null&&e.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function lo(e,l,t,a,i){var u=Wu();return u=u===null?null:{parent:ke._currentValue,pool:u},l.memoizedState={baseLanes:t,cachePool:u},e!==null&&ei(l,null),ts(),nd(l),e!==null&&ra(e,l,a,!0),l.childLanes=i,null}function yi(e,l){return l=pi({mode:l.mode,children:l.children},e.mode),l.ref=e.ref,e.child=l,l.return=e,l}function to(e,l,t){return Gt(l,e.child,null,t),e=yi(l,l.pendingProps),e.flags|=2,ml(l),l.memoizedState=null,e}function Vm(e,l,t){var a=l.pendingProps,i=(l.flags&128)!==0;if(l.flags&=-129,e===null){if(me){if(a.mode==="hidden")return e=yi(l,a),l.lanes=536870912,cn(null,e);if(ns(l),(e=ze)?(e=yf(e,El),e=e!==null&&e.data==="&"?e:null,e!==null&&(l.memoizedState={dehydrated:e,treeContext:it!==null?{id:Ul,overflow:Dl}:null,retryLane:536870912,hydrationErrors:null},t=Yr(e),t.return=l,l.child=t,Ke=l,ze=null)):e=null,e===null)throw st(l);return l.lanes=536870912,null}return yi(l,a)}var u=e.memoizedState;if(u!==null){var s=u.dehydrated;if(ns(l),i)if(l.flags&256)l.flags&=-257,l=to(e,l,t);else if(l.memoizedState!==null)l.child=e.child,l.flags|=128,l=null;else throw Error(o(558));else if(Be||ra(e,l,t,!1),i=(t&e.childLanes)!==0,Be||i){if(a=Ae,a!==null&&(s=Kc(a,t),s!==0&&s!==u.retryLane))throw u.retryLane=s,Dt(e,s),sl(a,e,s),Ts;zi(),l=to(e,l,t)}else e=u.treeContext,ze=Al(s.nextSibling),Ke=l,me=!0,ut=null,El=!1,e!==null&&Lr(l,e),l=yi(l,a),l.flags|=4096;return l}return e=Yl(e.child,{mode:a.mode,children:a.children}),e.ref=l.ref,l.child=e,e.return=l,e}function gi(e,l){var t=l.ref;if(t===null)e!==null&&e.ref!==null&&(l.flags|=4194816);else{if(typeof t!="function"&&typeof t!="object")throw Error(o(284));(e===null||e.ref!==t)&&(l.flags|=4194816)}}function As(e,l,t,a,i){return qt(l),t=us(e,l,t,a,void 0,i),a=ss(),e!==null&&!Be?(cs(e,l,i),Zl(e,l,i)):(me&&a&&Gu(l),l.flags|=1,Je(e,l,t,i),l.child)}function ao(e,l,t,a,i,u){return qt(l),l.updateQueue=null,t=ud(l,a,t,i),id(e),a=ss(),e!==null&&!Be?(cs(e,l,u),Zl(e,l,u)):(me&&a&&Gu(l),l.flags|=1,Je(e,l,t,u),l.child)}function no(e,l,t,a,i){if(qt(l),l.stateNode===null){var u=ia,s=t.contextType;typeof s=="object"&&s!==null&&(u=Ve(s)),u=new t(a,u),l.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Ns,l.stateNode=u,u._reactInternals=l,u=l.stateNode,u.props=a,u.state=l.memoizedState,u.refs={},Iu(l),s=t.contextType,u.context=typeof s=="object"&&s!==null?Ve(s):ia,u.state=l.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Ss(l,t,s,a),u.state=l.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(s=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),s!==u.state&&Ns.enqueueReplaceState(u,u.state,null),tn(l,a,u,i),ln(),u.state=l.memoizedState),typeof u.componentDidMount=="function"&&(l.flags|=4194308),a=!0}else if(e===null){u=l.stateNode;var r=l.memoizedProps,h=Xt(t,r);u.props=h;var E=u.context,M=t.contextType;s=ia,typeof M=="object"&&M!==null&&(s=Ve(M));var U=t.getDerivedStateFromProps;M=typeof U=="function"||typeof u.getSnapshotBeforeUpdate=="function",r=l.pendingProps!==r,M||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(r||E!==s)&&Qd(l,u,a,s),rt=!1;var A=l.memoizedState;u.state=A,tn(l,a,u,i),ln(),E=l.memoizedState,r||A!==E||rt?(typeof U=="function"&&(Ss(l,t,U,a),E=l.memoizedState),(h=rt||Xd(l,t,h,a,A,E,s))?(M||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(l.flags|=4194308)):(typeof u.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=a,l.memoizedState=E),u.props=a,u.state=E,u.context=s,a=h):(typeof u.componentDidMount=="function"&&(l.flags|=4194308),a=!1)}else{u=l.stateNode,Pu(e,l),s=l.memoizedProps,M=Xt(t,s),u.props=M,U=l.pendingProps,A=u.context,E=t.contextType,h=ia,typeof E=="object"&&E!==null&&(h=Ve(E)),r=t.getDerivedStateFromProps,(E=typeof r=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(s!==U||A!==h)&&Qd(l,u,a,h),rt=!1,A=l.memoizedState,u.state=A,tn(l,a,u,i),ln();var _=l.memoizedState;s!==U||A!==_||rt||e!==null&&e.dependencies!==null&&In(e.dependencies)?(typeof r=="function"&&(Ss(l,t,r,a),_=l.memoizedState),(M=rt||Xd(l,t,M,a,A,_,h)||e!==null&&e.dependencies!==null&&In(e.dependencies))?(E||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(a,_,h),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(a,_,h)),typeof u.componentDidUpdate=="function"&&(l.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof u.componentDidUpdate!="function"||s===e.memoizedProps&&A===e.memoizedState||(l.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&A===e.memoizedState||(l.flags|=1024),l.memoizedProps=a,l.memoizedState=_),u.props=a,u.state=_,u.context=h,a=M):(typeof u.componentDidUpdate!="function"||s===e.memoizedProps&&A===e.memoizedState||(l.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&A===e.memoizedState||(l.flags|=1024),a=!1)}return u=a,gi(e,l),a=(l.flags&128)!==0,u||a?(u=l.stateNode,t=a&&typeof t.getDerivedStateFromError!="function"?null:u.render(),l.flags|=1,e!==null&&a?(l.child=Gt(l,e.child,null,i),l.child=Gt(l,null,t,i)):Je(e,l,t,i),l.memoizedState=u.state,e=l.child):e=Zl(e,l,i),e}function io(e,l,t,a){return Ht(),l.flags|=256,Je(e,l,t,a),l.child}var zs={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function _s(e){return{baseLanes:e,cachePool:Jr()}}function Ms(e,l,t){return e=e!==null?e.childLanes&~t:0,l&&(e|=yl),e}function uo(e,l,t){var a=l.pendingProps,i=!1,u=(l.flags&128)!==0,s;if((s=u)||(s=e!==null&&e.memoizedState===null?!1:(Re.current&2)!==0),s&&(i=!0,l.flags&=-129),s=(l.flags&32)!==0,l.flags&=-33,e===null){if(me){if(i?ft(l):ht(),(e=ze)?(e=yf(e,El),e=e!==null&&e.data!=="&"?e:null,e!==null&&(l.memoizedState={dehydrated:e,treeContext:it!==null?{id:Ul,overflow:Dl}:null,retryLane:536870912,hydrationErrors:null},t=Yr(e),t.return=l,l.child=t,Ke=l,ze=null)):e=null,e===null)throw st(l);return oc(e)?l.lanes=32:l.lanes=536870912,null}var r=a.children;return a=a.fallback,i?(ht(),i=l.mode,r=pi({mode:"hidden",children:r},i),a=Rt(a,i,t,null),r.return=l,a.return=l,r.sibling=a,l.child=r,a=l.child,a.memoizedState=_s(t),a.childLanes=Ms(e,s,t),l.memoizedState=zs,cn(null,a)):(ft(l),Cs(l,r))}var h=e.memoizedState;if(h!==null&&(r=h.dehydrated,r!==null)){if(u)l.flags&256?(ft(l),l.flags&=-257,l=Os(e,l,t)):l.memoizedState!==null?(ht(),l.child=e.child,l.flags|=128,l=null):(ht(),r=a.fallback,i=l.mode,a=pi({mode:"visible",children:a.children},i),r=Rt(r,i,t,null),r.flags|=2,a.return=l,r.return=l,a.sibling=r,l.child=a,Gt(l,e.child,null,t),a=l.child,a.memoizedState=_s(t),a.childLanes=Ms(e,s,t),l.memoizedState=zs,l=cn(null,a));else if(ft(l),oc(r)){if(s=r.nextSibling&&r.nextSibling.dataset,s)var E=s.dgst;s=E,a=Error(o(419)),a.stack="",a.digest=s,$a({value:a,source:null,stack:null}),l=Os(e,l,t)}else if(Be||ra(e,l,t,!1),s=(t&e.childLanes)!==0,Be||s){if(s=Ae,s!==null&&(a=Kc(s,t),a!==0&&a!==h.retryLane))throw h.retryLane=a,Dt(e,a),sl(s,e,a),Ts;dc(r)||zi(),l=Os(e,l,t)}else dc(r)?(l.flags|=192,l.child=e.child,l=null):(e=h.treeContext,ze=Al(r.nextSibling),Ke=l,me=!0,ut=null,El=!1,e!==null&&Lr(l,e),l=Cs(l,a.children),l.flags|=4096);return l}return i?(ht(),r=a.fallback,i=l.mode,h=e.child,E=h.sibling,a=Yl(h,{mode:"hidden",children:a.children}),a.subtreeFlags=h.subtreeFlags&65011712,E!==null?r=Yl(E,r):(r=Rt(r,i,t,null),r.flags|=2),r.return=l,a.return=l,a.sibling=r,l.child=a,cn(null,a),a=l.child,r=e.child.memoizedState,r===null?r=_s(t):(i=r.cachePool,i!==null?(h=ke._currentValue,i=i.parent!==h?{parent:h,pool:h}:i):i=Jr(),r={baseLanes:r.baseLanes|t,cachePool:i}),a.memoizedState=r,a.childLanes=Ms(e,s,t),l.memoizedState=zs,cn(e.child,a)):(ft(l),t=e.child,e=t.sibling,t=Yl(t,{mode:"visible",children:a.children}),t.return=l,t.sibling=null,e!==null&&(s=l.deletions,s===null?(l.deletions=[e],l.flags|=16):s.push(e)),l.child=t,l.memoizedState=null,t)}function Cs(e,l){return l=pi({mode:"visible",children:l},e.mode),l.return=e,e.child=l}function pi(e,l){return e=fl(22,e,null,l),e.lanes=0,e}function Os(e,l,t){return Gt(l,e.child,null,t),e=Cs(l,l.pendingProps.children),e.flags|=2,l.memoizedState=null,e}function so(e,l,t){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l),Ku(e.return,l,t)}function Us(e,l,t,a,i,u){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:a,tail:t,tailMode:i,treeForkCount:u}:(s.isBackwards=l,s.rendering=null,s.renderingStartTime=0,s.last=a,s.tail=t,s.tailMode=i,s.treeForkCount=u)}function co(e,l,t){var a=l.pendingProps,i=a.revealOrder,u=a.tail;a=a.children;var s=Re.current,r=(s&2)!==0;if(r?(s=s&1|2,l.flags|=128):s&=1,X(Re,s),Je(e,l,a,t),a=me?Ja:0,!r&&e!==null&&(e.flags&128)!==0)e:for(e=l.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&so(e,t,l);else if(e.tag===19)so(e,t,l);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===l)break e;for(;e.sibling===null;){if(e.return===null||e.return===l)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case"forwards":for(t=l.child,i=null;t!==null;)e=t.alternate,e!==null&&ui(e)===null&&(i=t),t=t.sibling;t=i,t===null?(i=l.child,l.child=null):(i=t.sibling,t.sibling=null),Us(l,!1,i,t,u,a);break;case"backwards":case"unstable_legacy-backwards":for(t=null,i=l.child,l.child=null;i!==null;){if(e=i.alternate,e!==null&&ui(e)===null){l.child=i;break}e=i.sibling,i.sibling=t,t=i,i=e}Us(l,!0,t,null,u,a);break;case"together":Us(l,!1,null,null,void 0,a);break;default:l.memoizedState=null}return l.child}function Zl(e,l,t){if(e!==null&&(l.dependencies=e.dependencies),yt|=l.lanes,(t&l.childLanes)===0)if(e!==null){if(ra(e,l,t,!1),(t&l.childLanes)===0)return null}else return null;if(e!==null&&l.child!==e.child)throw Error(o(153));if(l.child!==null){for(e=l.child,t=Yl(e,e.pendingProps),l.child=t,t.return=l;e.sibling!==null;)e=e.sibling,t=t.sibling=Yl(e,e.pendingProps),t.return=l;t.sibling=null}return l.child}function Ds(e,l){return(e.lanes&l)!==0?!0:(e=e.dependencies,!!(e!==null&&In(e)))}function Jm(e,l,t){switch(l.tag){case 3:Fe(l,l.stateNode.containerInfo),ct(l,ke,e.memoizedState.cache),Ht();break;case 27:case 5:Da(l);break;case 4:Fe(l,l.stateNode.containerInfo);break;case 10:ct(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,ns(l),null;break;case 13:var a=l.memoizedState;if(a!==null)return a.dehydrated!==null?(ft(l),l.flags|=128,null):(t&l.child.childLanes)!==0?uo(e,l,t):(ft(l),e=Zl(e,l,t),e!==null?e.sibling:null);ft(l);break;case 19:var i=(e.flags&128)!==0;if(a=(t&l.childLanes)!==0,a||(ra(e,l,t,!1),a=(t&l.childLanes)!==0),i){if(a)return co(e,l,t);l.flags|=128}if(i=l.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),X(Re,Re.current),a)break;return null;case 22:return l.lanes=0,eo(e,l,t,l.pendingProps);case 24:ct(l,ke,e.memoizedState.cache)}return Zl(e,l,t)}function ro(e,l,t){if(e!==null)if(e.memoizedProps!==l.pendingProps)Be=!0;else{if(!Ds(e,t)&&(l.flags&128)===0)return Be=!1,Jm(e,l,t);Be=(e.flags&131072)!==0}else Be=!1,me&&(l.flags&1048576)!==0&&Gr(l,Ja,l.index);switch(l.lanes=0,l.tag){case 16:e:{var a=l.pendingProps;if(e=Yt(l.elementType),l.type=e,typeof e=="function")Bu(e)?(a=Xt(e,a),l.tag=1,l=no(null,l,e,a,t)):(l.tag=0,l=As(null,l,e,a,t));else{if(e!=null){var i=e.$$typeof;if(i===le){l.tag=11,l=Fd(null,l,e,a,t);break e}else if(i===V){l.tag=14,l=Id(null,l,e,a,t);break e}}throw l=Qe(e)||e,Error(o(306,l,""))}}return l;case 0:return As(e,l,l.type,l.pendingProps,t);case 1:return a=l.type,i=Xt(a,l.pendingProps),no(e,l,a,i,t);case 3:e:{if(Fe(l,l.stateNode.containerInfo),e===null)throw Error(o(387));a=l.pendingProps;var u=l.memoizedState;i=u.element,Pu(e,l),tn(l,a,null,t);var s=l.memoizedState;if(a=s.cache,ct(l,ke,a),a!==u.cache&&Vu(l,[ke],t,!0),ln(),a=s.element,u.isDehydrated)if(u={element:a,isDehydrated:!1,cache:s.cache},l.updateQueue.baseState=u,l.memoizedState=u,l.flags&256){l=io(e,l,a,t);break e}else if(a!==i){i=bl(Error(o(424)),l),$a(i),l=io(e,l,a,t);break e}else for(e=l.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,ze=Al(e.firstChild),Ke=l,me=!0,ut=null,El=!0,t=ed(l,null,a,t),l.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(Ht(),a===i){l=Zl(e,l,t);break e}Je(e,l,a,t)}l=l.child}return l;case 26:return gi(e,l),e===null?(t=Sf(l.type,null,l.pendingProps,null))?l.memoizedState=t:me||(t=l.type,e=l.pendingProps,a=Ri(re.current).createElement(t),a[Ze]=l,a[ll]=e,$e(a,t,e),Le(a),l.stateNode=a):l.memoizedState=Sf(l.type,e.memoizedProps,l.pendingProps,e.memoizedState),null;case 27:return Da(l),e===null&&me&&(a=l.stateNode=jf(l.type,l.pendingProps,re.current),Ke=l,El=!0,i=ze,bt(l.type)?(fc=i,ze=Al(a.firstChild)):ze=i),Je(e,l,l.pendingProps.children,t),gi(e,l),e===null&&(l.flags|=4194304),l.child;case 5:return e===null&&me&&((i=a=ze)&&(a=Ev(a,l.type,l.pendingProps,El),a!==null?(l.stateNode=a,Ke=l,ze=Al(a.firstChild),El=!1,i=!0):i=!1),i||st(l)),Da(l),i=l.type,u=l.pendingProps,s=e!==null?e.memoizedProps:null,a=u.children,sc(i,u)?a=null:s!==null&&sc(i,s)&&(l.flags|=32),l.memoizedState!==null&&(i=us(e,l,Ym,null,null,t),Nn._currentValue=i),gi(e,l),Je(e,l,a,t),l.child;case 6:return e===null&&me&&((e=t=ze)&&(t=Tv(t,l.pendingProps,El),t!==null?(l.stateNode=t,Ke=l,ze=null,e=!0):e=!1),e||st(l)),null;case 13:return uo(e,l,t);case 4:return Fe(l,l.stateNode.containerInfo),a=l.pendingProps,e===null?l.child=Gt(l,null,a,t):Je(e,l,a,t),l.child;case 11:return Fd(e,l,l.type,l.pendingProps,t);case 7:return Je(e,l,l.pendingProps,t),l.child;case 8:return Je(e,l,l.pendingProps.children,t),l.child;case 12:return Je(e,l,l.pendingProps.children,t),l.child;case 10:return a=l.pendingProps,ct(l,l.type,a.value),Je(e,l,a.children,t),l.child;case 9:return i=l.type._context,a=l.pendingProps.children,qt(l),i=Ve(i),a=a(i),l.flags|=1,Je(e,l,a,t),l.child;case 14:return Id(e,l,l.type,l.pendingProps,t);case 15:return Pd(e,l,l.type,l.pendingProps,t);case 19:return co(e,l,t);case 31:return Vm(e,l,t);case 22:return eo(e,l,t,l.pendingProps);case 24:return qt(l),a=Ve(ke),e===null?(i=Wu(),i===null&&(i=Ae,u=Ju(),i.pooledCache=u,u.refCount++,u!==null&&(i.pooledCacheLanes|=t),i=u),l.memoizedState={parent:a,cache:i},Iu(l),ct(l,ke,i)):((e.lanes&t)!==0&&(Pu(e,l),tn(l,null,null,t),ln()),i=e.memoizedState,u=l.memoizedState,i.parent!==a?(i={parent:a,cache:a},l.memoizedState=i,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=i),ct(l,ke,a)):(a=u.cache,ct(l,ke,a),a!==i.cache&&Vu(l,[ke],t,!0))),Je(e,l,l.pendingProps.children,t),l.child;case 29:throw l.pendingProps}throw Error(o(156,l.tag))}function Kl(e){e.flags|=4}function Rs(e,l,t,a,i){if((l=(e.mode&32)!==0)&&(l=!1),l){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(qo())e.flags|=8192;else throw wt=ti,Fu}else e.flags&=-16777217}function oo(e,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!zf(l))if(qo())e.flags|=8192;else throw wt=ti,Fu}function ji(e,l){l!==null&&(e.flags|=4),e.flags&16384&&(l=e.tag!==22?Xc():536870912,e.lanes|=l,ba|=l)}function rn(e,l){if(!me)switch(e.tailMode){case"hidden":l=e.tail;for(var t=null;l!==null;)l.alternate!==null&&(t=l),l=l.sibling;t===null?e.tail=null:t.sibling=null;break;case"collapsed":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?l||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function _e(e){var l=e.alternate!==null&&e.alternate.child===e.child,t=0,a=0;if(l)for(var i=e.child;i!==null;)t|=i.lanes|i.childLanes,a|=i.subtreeFlags&65011712,a|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)t|=i.lanes|i.childLanes,a|=i.subtreeFlags,a|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=a,e.childLanes=t,l}function $m(e,l,t){var a=l.pendingProps;switch(Lu(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return _e(l),null;case 1:return _e(l),null;case 3:return t=l.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),l.memoizedState.cache!==a&&(l.flags|=2048),Ll(ke),De(),t.pendingContext&&(t.context=t.pendingContext,t.pendingContext=null),(e===null||e.child===null)&&(ca(l)?Kl(l):e===null||e.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,Qu())),_e(l),null;case 26:var i=l.type,u=l.memoizedState;return e===null?(Kl(l),u!==null?(_e(l),oo(l,u)):(_e(l),Rs(l,i,null,a,t))):u?u!==e.memoizedState?(Kl(l),_e(l),oo(l,u)):(_e(l),l.flags&=-16777217):(e=e.memoizedProps,e!==a&&Kl(l),_e(l),Rs(l,i,e,a,t)),null;case 27:if(Cn(l),t=re.current,i=l.type,e!==null&&l.stateNode!=null)e.memoizedProps!==a&&Kl(l);else{if(!a){if(l.stateNode===null)throw Error(o(166));return _e(l),null}e=J.current,ca(l)?Xr(l):(e=jf(i,a,t),l.stateNode=e,Kl(l))}return _e(l),null;case 5:if(Cn(l),i=l.type,e!==null&&l.stateNode!=null)e.memoizedProps!==a&&Kl(l);else{if(!a){if(l.stateNode===null)throw Error(o(166));return _e(l),null}if(u=J.current,ca(l))Xr(l);else{var s=Ri(re.current);switch(u){case 1:u=s.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:u=s.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":u=s.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":u=s.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":u=s.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof a.is=="string"?s.createElement("select",{is:a.is}):s.createElement("select"),a.multiple?u.multiple=!0:a.size&&(u.size=a.size);break;default:u=typeof a.is=="string"?s.createElement(i,{is:a.is}):s.createElement(i)}}u[Ze]=l,u[ll]=a;e:for(s=l.child;s!==null;){if(s.tag===5||s.tag===6)u.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===l)break e;for(;s.sibling===null;){if(s.return===null||s.return===l)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}l.stateNode=u;e:switch($e(u,i,a),i){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Kl(l)}}return _e(l),Rs(l,l.type,e===null?null:e.memoizedProps,l.pendingProps,t),null;case 6:if(e&&l.stateNode!=null)e.memoizedProps!==a&&Kl(l);else{if(typeof a!="string"&&l.stateNode===null)throw Error(o(166));if(e=re.current,ca(l)){if(e=l.stateNode,t=l.memoizedProps,a=null,i=Ke,i!==null)switch(i.tag){case 27:case 5:a=i.memoizedProps}e[Ze]=l,e=!!(e.nodeValue===t||a!==null&&a.suppressHydrationWarning===!0||cf(e.nodeValue,t)),e||st(l,!0)}else e=Ri(e).createTextNode(a),e[Ze]=l,l.stateNode=e}return _e(l),null;case 31:if(t=l.memoizedState,e===null||e.memoizedState!==null){if(a=ca(l),t!==null){if(e===null){if(!a)throw Error(o(318));if(e=l.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[Ze]=l}else Ht(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;_e(l),e=!1}else t=Qu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=t),e=!0;if(!e)return l.flags&256?(ml(l),l):(ml(l),null);if((l.flags&128)!==0)throw Error(o(558))}return _e(l),null;case 13:if(a=l.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=ca(l),a!==null&&a.dehydrated!==null){if(e===null){if(!i)throw Error(o(318));if(i=l.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(o(317));i[Ze]=l}else Ht(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;_e(l),i=!1}else i=Qu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return l.flags&256?(ml(l),l):(ml(l),null)}return ml(l),(l.flags&128)!==0?(l.lanes=t,l):(t=a!==null,e=e!==null&&e.memoizedState!==null,t&&(a=l.child,i=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(i=a.alternate.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==i&&(a.flags|=2048)),t!==e&&t&&(l.child.flags|=8192),ji(l,l.updateQueue),_e(l),null);case 4:return De(),e===null&&tc(l.stateNode.containerInfo),_e(l),null;case 10:return Ll(l.type),_e(l),null;case 19:if(D(Re),a=l.memoizedState,a===null)return _e(l),null;if(i=(l.flags&128)!==0,u=a.rendering,u===null)if(i)rn(a,!1);else{if(Ue!==0||e!==null&&(e.flags&128)!==0)for(e=l.child;e!==null;){if(u=ui(e),u!==null){for(l.flags|=128,rn(a,!1),e=u.updateQueue,l.updateQueue=e,ji(l,e),l.subtreeFlags=0,e=t,t=l.child;t!==null;)Br(t,e),t=t.sibling;return X(Re,Re.current&1|2),me&&wl(l,a.treeForkCount),l.child}e=e.sibling}a.tail!==null&&cl()>Ei&&(l.flags|=128,i=!0,rn(a,!1),l.lanes=4194304)}else{if(!i)if(e=ui(u),e!==null){if(l.flags|=128,i=!0,e=e.updateQueue,l.updateQueue=e,ji(l,e),rn(a,!0),a.tail===null&&a.tailMode==="hidden"&&!u.alternate&&!me)return _e(l),null}else 2*cl()-a.renderingStartTime>Ei&&t!==536870912&&(l.flags|=128,i=!0,rn(a,!1),l.lanes=4194304);a.isBackwards?(u.sibling=l.child,l.child=u):(e=a.last,e!==null?e.sibling=u:l.child=u,a.last=u)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=cl(),e.sibling=null,t=Re.current,X(Re,i?t&1|2:t&1),me&&wl(l,a.treeForkCount),e):(_e(l),null);case 22:case 23:return ml(l),as(),a=l.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(l.flags|=8192):a&&(l.flags|=8192),a?(t&536870912)!==0&&(l.flags&128)===0&&(_e(l),l.subtreeFlags&6&&(l.flags|=8192)):_e(l),t=l.updateQueue,t!==null&&ji(l,t.retryQueue),t=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(t=e.memoizedState.cachePool.pool),a=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(a=l.memoizedState.cachePool.pool),a!==t&&(l.flags|=2048),e!==null&&D(Bt),null;case 24:return t=null,e!==null&&(t=e.memoizedState.cache),l.memoizedState.cache!==t&&(l.flags|=2048),Ll(ke),_e(l),null;case 25:return null;case 30:return null}throw Error(o(156,l.tag))}function Wm(e,l){switch(Lu(l),l.tag){case 1:return e=l.flags,e&65536?(l.flags=e&-65537|128,l):null;case 3:return Ll(ke),De(),e=l.flags,(e&65536)!==0&&(e&128)===0?(l.flags=e&-65537|128,l):null;case 26:case 27:case 5:return Cn(l),null;case 31:if(l.memoizedState!==null){if(ml(l),l.alternate===null)throw Error(o(340));Ht()}return e=l.flags,e&65536?(l.flags=e&-65537|128,l):null;case 13:if(ml(l),e=l.memoizedState,e!==null&&e.dehydrated!==null){if(l.alternate===null)throw Error(o(340));Ht()}return e=l.flags,e&65536?(l.flags=e&-65537|128,l):null;case 19:return D(Re),null;case 4:return De(),null;case 10:return Ll(l.type),null;case 22:case 23:return ml(l),as(),e!==null&&D(Bt),e=l.flags,e&65536?(l.flags=e&-65537|128,l):null;case 24:return Ll(ke),null;case 25:return null;default:return null}}function fo(e,l){switch(Lu(l),l.tag){case 3:Ll(ke),De();break;case 26:case 27:case 5:Cn(l);break;case 4:De();break;case 31:l.memoizedState!==null&&ml(l);break;case 13:ml(l);break;case 19:D(Re);break;case 10:Ll(l.type);break;case 22:case 23:ml(l),as(),e!==null&&D(Bt);break;case 24:Ll(ke)}}function dn(e,l){try{var t=l.updateQueue,a=t!==null?t.lastEffect:null;if(a!==null){var i=a.next;t=i;do{if((t.tag&e)===e){a=void 0;var u=t.create,s=t.inst;a=u(),s.destroy=a}t=t.next}while(t!==i)}}catch(r){be(l,l.return,r)}}function mt(e,l,t){try{var a=l.updateQueue,i=a!==null?a.lastEffect:null;if(i!==null){var u=i.next;a=u;do{if((a.tag&e)===e){var s=a.inst,r=s.destroy;if(r!==void 0){s.destroy=void 0,i=l;var h=t,E=r;try{E()}catch(M){be(i,h,M)}}}a=a.next}while(a!==u)}}catch(M){be(l,l.return,M)}}function ho(e){var l=e.updateQueue;if(l!==null){var t=e.stateNode;try{td(l,t)}catch(a){be(e,e.return,a)}}}function mo(e,l,t){t.props=Xt(e.type,e.memoizedProps),t.state=e.memoizedState;try{t.componentWillUnmount()}catch(a){be(e,l,a)}}function on(e,l){try{var t=e.ref;if(t!==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 t=="function"?e.refCleanup=t(a):t.current=a}}catch(i){be(e,l,i)}}function Rl(e,l){var t=e.ref,a=e.refCleanup;if(t!==null)if(typeof a=="function")try{a()}catch(i){be(e,l,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof t=="function")try{t(null)}catch(i){be(e,l,i)}else t.current=null}function vo(e){var l=e.type,t=e.memoizedProps,a=e.stateNode;try{e:switch(l){case"button":case"input":case"select":case"textarea":t.autoFocus&&a.focus();break e;case"img":t.src?a.src=t.src:t.srcSet&&(a.srcset=t.srcSet)}}catch(i){be(e,e.return,i)}}function Hs(e,l,t){try{var a=e.stateNode;pv(a,e.type,t,l),a[ll]=l}catch(i){be(e,e.return,i)}}function yo(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&bt(e.type)||e.tag===4}function ks(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||yo(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&&bt(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 qs(e,l,t){var a=e.tag;if(a===5||a===6)e=e.stateNode,l?(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t).insertBefore(e,l):(l=t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,l.appendChild(e),t=t._reactRootContainer,t!=null||l.onclick!==null||(l.onclick=ql));else if(a!==4&&(a===27&&bt(e.type)&&(t=e.stateNode,l=null),e=e.child,e!==null))for(qs(e,l,t),e=e.sibling;e!==null;)qs(e,l,t),e=e.sibling}function xi(e,l,t){var a=e.tag;if(a===5||a===6)e=e.stateNode,l?t.insertBefore(e,l):t.appendChild(e);else if(a!==4&&(a===27&&bt(e.type)&&(t=e.stateNode),e=e.child,e!==null))for(xi(e,l,t),e=e.sibling;e!==null;)xi(e,l,t),e=e.sibling}function go(e){var l=e.stateNode,t=e.memoizedProps;try{for(var a=e.type,i=l.attributes;i.length;)l.removeAttributeNode(i[0]);$e(l,a,t),l[Ze]=e,l[ll]=t}catch(u){be(e,e.return,u)}}var Vl=!1,Ye=!1,Bs=!1,po=typeof WeakSet=="function"?WeakSet:Set,Xe=null;function Fm(e,l){if(e=e.containerInfo,ic=Gi,e=Mr(e),Ou(e)){if("selectionStart"in e)var t={start:e.selectionStart,end:e.selectionEnd};else e:{t=(t=e.ownerDocument)&&t.defaultView||window;var a=t.getSelection&&t.getSelection();if(a&&a.rangeCount!==0){t=a.anchorNode;var i=a.anchorOffset,u=a.focusNode;a=a.focusOffset;try{t.nodeType,u.nodeType}catch{t=null;break e}var s=0,r=-1,h=-1,E=0,M=0,U=e,A=null;l:for(;;){for(var _;U!==t||i!==0&&U.nodeType!==3||(r=s+i),U!==u||a!==0&&U.nodeType!==3||(h=s+a),U.nodeType===3&&(s+=U.nodeValue.length),(_=U.firstChild)!==null;)A=U,U=_;for(;;){if(U===e)break l;if(A===t&&++E===i&&(r=s),A===u&&++M===a&&(h=s),(_=U.nextSibling)!==null)break;U=A,A=U.parentNode}U=_}t=r===-1||h===-1?null:{start:r,end:h}}else t=null}t=t||{start:0,end:0}}else t=null;for(uc={focusedElem:e,selectionRange:t},Gi=!1,Xe=l;Xe!==null;)if(l=Xe,e=l.child,(l.subtreeFlags&1028)!==0&&e!==null)e.return=l,Xe=e;else for(;Xe!==null;){switch(l=Xe,u=l.alternate,e=l.flags,l.tag){case 0:if((e&4)!==0&&(e=l.updateQueue,e=e!==null?e.events:null,e!==null))for(t=0;t<e.length;t++)i=e[t],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,t=l,i=u.memoizedProps,u=u.memoizedState,a=t.stateNode;try{var K=Xt(t.type,i);e=a.getSnapshotBeforeUpdate(K,u),a.__reactInternalSnapshotBeforeUpdate=e}catch(I){be(t,t.return,I)}}break;case 3:if((e&1024)!==0){if(e=l.stateNode.containerInfo,t=e.nodeType,t===9)rc(e);else if(t===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":rc(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=l.sibling,e!==null){e.return=l.return,Xe=e;break}Xe=l.return}}function jo(e,l,t){var a=t.flags;switch(t.tag){case 0:case 11:case 15:$l(e,t),a&4&&dn(5,t);break;case 1:if($l(e,t),a&4)if(e=t.stateNode,l===null)try{e.componentDidMount()}catch(s){be(t,t.return,s)}else{var i=Xt(t.type,l.memoizedProps);l=l.memoizedState;try{e.componentDidUpdate(i,l,e.__reactInternalSnapshotBeforeUpdate)}catch(s){be(t,t.return,s)}}a&64&&ho(t),a&512&&on(t,t.return);break;case 3:if($l(e,t),a&64&&(e=t.updateQueue,e!==null)){if(l=null,t.child!==null)switch(t.child.tag){case 27:case 5:l=t.child.stateNode;break;case 1:l=t.child.stateNode}try{td(e,l)}catch(s){be(t,t.return,s)}}break;case 27:l===null&&a&4&&go(t);case 26:case 5:$l(e,t),l===null&&a&4&&vo(t),a&512&&on(t,t.return);break;case 12:$l(e,t);break;case 31:$l(e,t),a&4&&So(e,t);break;case 13:$l(e,t),a&4&&No(e,t),a&64&&(e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(t=uv.bind(null,t),Av(e,t))));break;case 22:if(a=t.memoizedState!==null||Vl,!a){l=l!==null&&l.memoizedState!==null||Ye,i=Vl;var u=Ye;Vl=a,(Ye=l)&&!u?Wl(e,t,(t.subtreeFlags&8772)!==0):$l(e,t),Vl=i,Ye=u}break;case 30:break;default:$l(e,t)}}function xo(e){var l=e.alternate;l!==null&&(e.alternate=null,xo(l)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(l=e.stateNode,l!==null&&mu(l)),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 Ce=null,al=!1;function Jl(e,l,t){for(t=t.child;t!==null;)bo(e,l,t),t=t.sibling}function bo(e,l,t){if(rl&&typeof rl.onCommitFiberUnmount=="function")try{rl.onCommitFiberUnmount(Ra,t)}catch{}switch(t.tag){case 26:Ye||Rl(t,l),Jl(e,l,t),t.memoizedState?t.memoizedState.count--:t.stateNode&&(t=t.stateNode,t.parentNode.removeChild(t));break;case 27:Ye||Rl(t,l);var a=Ce,i=al;bt(t.type)&&(Ce=t.stateNode,al=!1),Jl(e,l,t),xn(t.stateNode),Ce=a,al=i;break;case 5:Ye||Rl(t,l);case 6:if(a=Ce,i=al,Ce=null,Jl(e,l,t),Ce=a,al=i,Ce!==null)if(al)try{(Ce.nodeType===9?Ce.body:Ce.nodeName==="HTML"?Ce.ownerDocument.body:Ce).removeChild(t.stateNode)}catch(u){be(t,l,u)}else try{Ce.removeChild(t.stateNode)}catch(u){be(t,l,u)}break;case 18:Ce!==null&&(al?(e=Ce,mf(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,t.stateNode),Ma(e)):mf(Ce,t.stateNode));break;case 4:a=Ce,i=al,Ce=t.stateNode.containerInfo,al=!0,Jl(e,l,t),Ce=a,al=i;break;case 0:case 11:case 14:case 15:mt(2,t,l),Ye||mt(4,t,l),Jl(e,l,t);break;case 1:Ye||(Rl(t,l),a=t.stateNode,typeof a.componentWillUnmount=="function"&&mo(t,l,a)),Jl(e,l,t);break;case 21:Jl(e,l,t);break;case 22:Ye=(a=Ye)||t.memoizedState!==null,Jl(e,l,t),Ye=a;break;default:Jl(e,l,t)}}function So(e,l){if(l.memoizedState===null&&(e=l.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ma(e)}catch(t){be(l,l.return,t)}}}function No(e,l){if(l.memoizedState===null&&(e=l.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ma(e)}catch(t){be(l,l.return,t)}}function Im(e){switch(e.tag){case 31:case 13:case 19:var l=e.stateNode;return l===null&&(l=e.stateNode=new po),l;case 22:return e=e.stateNode,l=e._retryCache,l===null&&(l=e._retryCache=new po),l;default:throw Error(o(435,e.tag))}}function bi(e,l){var t=Im(e);l.forEach(function(a){if(!t.has(a)){t.add(a);var i=sv.bind(null,e,a);a.then(i,i)}})}function nl(e,l){var t=l.deletions;if(t!==null)for(var a=0;a<t.length;a++){var i=t[a],u=e,s=l,r=s;e:for(;r!==null;){switch(r.tag){case 27:if(bt(r.type)){Ce=r.stateNode,al=!1;break e}break;case 5:Ce=r.stateNode,al=!1;break e;case 3:case 4:Ce=r.stateNode.containerInfo,al=!0;break e}r=r.return}if(Ce===null)throw Error(o(160));bo(u,s,i),Ce=null,al=!1,u=i.alternate,u!==null&&(u.return=null),i.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)Eo(l,e),l=l.sibling}var Cl=null;function Eo(e,l){var t=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:nl(l,e),il(e),a&4&&(mt(3,e,e.return),dn(3,e),mt(5,e,e.return));break;case 1:nl(l,e),il(e),a&512&&(Ye||t===null||Rl(t,t.return)),a&64&&Vl&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(t=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=t===null?a:t.concat(a))));break;case 26:var i=Cl;if(nl(l,e),il(e),a&512&&(Ye||t===null||Rl(t,t.return)),a&4){var u=t!==null?t.memoizedState:null;if(a=e.memoizedState,t===null)if(a===null)if(e.stateNode===null){e:{a=e.type,t=e.memoizedProps,i=i.ownerDocument||i;l:switch(a){case"title":u=i.getElementsByTagName("title")[0],(!u||u[qa]||u[Ze]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=i.createElement(a),i.head.insertBefore(u,i.querySelector("head > title"))),$e(u,a,t),u[Ze]=e,Le(u),a=u;break e;case"link":var s=Tf("link","href",i).get(a+(t.href||""));if(s){for(var r=0;r<s.length;r++)if(u=s[r],u.getAttribute("href")===(t.href==null||t.href===""?null:t.href)&&u.getAttribute("rel")===(t.rel==null?null:t.rel)&&u.getAttribute("title")===(t.title==null?null:t.title)&&u.getAttribute("crossorigin")===(t.crossOrigin==null?null:t.crossOrigin)){s.splice(r,1);break l}}u=i.createElement(a),$e(u,a,t),i.head.appendChild(u);break;case"meta":if(s=Tf("meta","content",i).get(a+(t.content||""))){for(r=0;r<s.length;r++)if(u=s[r],u.getAttribute("content")===(t.content==null?null:""+t.content)&&u.getAttribute("name")===(t.name==null?null:t.name)&&u.getAttribute("property")===(t.property==null?null:t.property)&&u.getAttribute("http-equiv")===(t.httpEquiv==null?null:t.httpEquiv)&&u.getAttribute("charset")===(t.charSet==null?null:t.charSet)){s.splice(r,1);break l}}u=i.createElement(a),$e(u,a,t),i.head.appendChild(u);break;default:throw Error(o(468,a))}u[Ze]=e,Le(u),a=u}e.stateNode=a}else Af(i,e.type,e.stateNode);else e.stateNode=Ef(i,a,e.memoizedProps);else u!==a?(u===null?t.stateNode!==null&&(t=t.stateNode,t.parentNode.removeChild(t)):u.count--,a===null?Af(i,e.type,e.stateNode):Ef(i,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Hs(e,e.memoizedProps,t.memoizedProps)}break;case 27:nl(l,e),il(e),a&512&&(Ye||t===null||Rl(t,t.return)),t!==null&&a&4&&Hs(e,e.memoizedProps,t.memoizedProps);break;case 5:if(nl(l,e),il(e),a&512&&(Ye||t===null||Rl(t,t.return)),e.flags&32){i=e.stateNode;try{It(i,"")}catch(K){be(e,e.return,K)}}a&4&&e.stateNode!=null&&(i=e.memoizedProps,Hs(e,i,t!==null?t.memoizedProps:i)),a&1024&&(Bs=!0);break;case 6:if(nl(l,e),il(e),a&4){if(e.stateNode===null)throw Error(o(162));a=e.memoizedProps,t=e.stateNode;try{t.nodeValue=a}catch(K){be(e,e.return,K)}}break;case 3:if(qi=null,i=Cl,Cl=Hi(l.containerInfo),nl(l,e),Cl=i,il(e),a&4&&t!==null&&t.memoizedState.isDehydrated)try{Ma(l.containerInfo)}catch(K){be(e,e.return,K)}Bs&&(Bs=!1,To(e));break;case 4:a=Cl,Cl=Hi(e.stateNode.containerInfo),nl(l,e),il(e),Cl=a;break;case 12:nl(l,e),il(e);break;case 31:nl(l,e),il(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,bi(e,a)));break;case 13:nl(l,e),il(e),e.child.flags&8192&&e.memoizedState!==null!=(t!==null&&t.memoizedState!==null)&&(Ni=cl()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,bi(e,a)));break;case 22:i=e.memoizedState!==null;var h=t!==null&&t.memoizedState!==null,E=Vl,M=Ye;if(Vl=E||i,Ye=M||h,nl(l,e),Ye=M,Vl=E,il(e),a&8192)e:for(l=e.stateNode,l._visibility=i?l._visibility&-2:l._visibility|1,i&&(t===null||h||Vl||Ye||Qt(e)),t=null,l=e;;){if(l.tag===5||l.tag===26){if(t===null){h=t=l;try{if(u=h.stateNode,i)s=u.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none";else{r=h.stateNode;var U=h.memoizedProps.style,A=U!=null&&U.hasOwnProperty("display")?U.display:null;r.style.display=A==null||typeof A=="boolean"?"":(""+A).trim()}}catch(K){be(h,h.return,K)}}}else if(l.tag===6){if(t===null){h=l;try{h.stateNode.nodeValue=i?"":h.memoizedProps}catch(K){be(h,h.return,K)}}}else if(l.tag===18){if(t===null){h=l;try{var _=h.stateNode;i?vf(_,!0):vf(h.stateNode,!1)}catch(K){be(h,h.return,K)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===e)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===e)break e;for(;l.sibling===null;){if(l.return===null||l.return===e)break e;t===l&&(t=null),l=l.return}t===l&&(t=null),l.sibling.return=l.return,l=l.sibling}a&4&&(a=e.updateQueue,a!==null&&(t=a.retryQueue,t!==null&&(a.retryQueue=null,bi(e,t))));break;case 19:nl(l,e),il(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,bi(e,a)));break;case 30:break;case 21:break;default:nl(l,e),il(e)}}function il(e){var l=e.flags;if(l&2){try{for(var t,a=e.return;a!==null;){if(yo(a)){t=a;break}a=a.return}if(t==null)throw Error(o(160));switch(t.tag){case 27:var i=t.stateNode,u=ks(e);xi(e,u,i);break;case 5:var s=t.stateNode;t.flags&32&&(It(s,""),t.flags&=-33);var r=ks(e);xi(e,r,s);break;case 3:case 4:var h=t.stateNode.containerInfo,E=ks(e);qs(e,E,h);break;default:throw Error(o(161))}}catch(M){be(e,e.return,M)}e.flags&=-3}l&4096&&(e.flags&=-4097)}function To(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var l=e;To(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),e=e.sibling}}function $l(e,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)jo(e,l.alternate,l),l=l.sibling}function Qt(e){for(e=e.child;e!==null;){var l=e;switch(l.tag){case 0:case 11:case 14:case 15:mt(4,l,l.return),Qt(l);break;case 1:Rl(l,l.return);var t=l.stateNode;typeof t.componentWillUnmount=="function"&&mo(l,l.return,t),Qt(l);break;case 27:xn(l.stateNode);case 26:case 5:Rl(l,l.return),Qt(l);break;case 22:l.memoizedState===null&&Qt(l);break;case 30:Qt(l);break;default:Qt(l)}e=e.sibling}}function Wl(e,l,t){for(t=t&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var a=l.alternate,i=e,u=l,s=u.flags;switch(u.tag){case 0:case 11:case 15:Wl(i,u,t),dn(4,u);break;case 1:if(Wl(i,u,t),a=u,i=a.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(E){be(a,a.return,E)}if(a=u,i=a.updateQueue,i!==null){var r=a.stateNode;try{var h=i.shared.hiddenCallbacks;if(h!==null)for(i.shared.hiddenCallbacks=null,i=0;i<h.length;i++)ld(h[i],r)}catch(E){be(a,a.return,E)}}t&&s&64&&ho(u),on(u,u.return);break;case 27:go(u);case 26:case 5:Wl(i,u,t),t&&a===null&&s&4&&vo(u),on(u,u.return);break;case 12:Wl(i,u,t);break;case 31:Wl(i,u,t),t&&s&4&&So(i,u);break;case 13:Wl(i,u,t),t&&s&4&&No(i,u);break;case 22:u.memoizedState===null&&Wl(i,u,t),on(u,u.return);break;case 30:break;default:Wl(i,u,t)}l=l.sibling}}function Ys(e,l){var t=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(t=e.memoizedState.cachePool.pool),e=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(e=l.memoizedState.cachePool.pool),e!==t&&(e!=null&&e.refCount++,t!=null&&Wa(t))}function ws(e,l){e=null,l.alternate!==null&&(e=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==e&&(l.refCount++,e!=null&&Wa(e))}function Ol(e,l,t,a){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)Ao(e,l,t,a),l=l.sibling}function Ao(e,l,t,a){var i=l.flags;switch(l.tag){case 0:case 11:case 15:Ol(e,l,t,a),i&2048&&dn(9,l);break;case 1:Ol(e,l,t,a);break;case 3:Ol(e,l,t,a),i&2048&&(e=null,l.alternate!==null&&(e=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==e&&(l.refCount++,e!=null&&Wa(e)));break;case 12:if(i&2048){Ol(e,l,t,a),e=l.stateNode;try{var u=l.memoizedProps,s=u.id,r=u.onPostCommit;typeof r=="function"&&r(s,l.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(h){be(l,l.return,h)}}else Ol(e,l,t,a);break;case 31:Ol(e,l,t,a);break;case 13:Ol(e,l,t,a);break;case 23:break;case 22:u=l.stateNode,s=l.alternate,l.memoizedState!==null?u._visibility&2?Ol(e,l,t,a):fn(e,l):u._visibility&2?Ol(e,l,t,a):(u._visibility|=2,pa(e,l,t,a,(l.subtreeFlags&10256)!==0||!1)),i&2048&&Ys(s,l);break;case 24:Ol(e,l,t,a),i&2048&&ws(l.alternate,l);break;default:Ol(e,l,t,a)}}function pa(e,l,t,a,i){for(i=i&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var u=e,s=l,r=t,h=a,E=s.flags;switch(s.tag){case 0:case 11:case 15:pa(u,s,r,h,i),dn(8,s);break;case 23:break;case 22:var M=s.stateNode;s.memoizedState!==null?M._visibility&2?pa(u,s,r,h,i):fn(u,s):(M._visibility|=2,pa(u,s,r,h,i)),i&&E&2048&&Ys(s.alternate,s);break;case 24:pa(u,s,r,h,i),i&&E&2048&&ws(s.alternate,s);break;default:pa(u,s,r,h,i)}l=l.sibling}}function fn(e,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var t=e,a=l,i=a.flags;switch(a.tag){case 22:fn(t,a),i&2048&&Ys(a.alternate,a);break;case 24:fn(t,a),i&2048&&ws(a.alternate,a);break;default:fn(t,a)}l=l.sibling}}var hn=8192;function ja(e,l,t){if(e.subtreeFlags&hn)for(e=e.child;e!==null;)zo(e,l,t),e=e.sibling}function zo(e,l,t){switch(e.tag){case 26:ja(e,l,t),e.flags&hn&&e.memoizedState!==null&&Bv(t,Cl,e.memoizedState,e.memoizedProps);break;case 5:ja(e,l,t);break;case 3:case 4:var a=Cl;Cl=Hi(e.stateNode.containerInfo),ja(e,l,t),Cl=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=hn,hn=16777216,ja(e,l,t),hn=a):ja(e,l,t));break;default:ja(e,l,t)}}function _o(e){var l=e.alternate;if(l!==null&&(e=l.child,e!==null)){l.child=null;do l=e.sibling,e.sibling=null,e=l;while(e!==null)}}function mn(e){var l=e.deletions;if((e.flags&16)!==0){if(l!==null)for(var t=0;t<l.length;t++){var a=l[t];Xe=a,Co(a,e)}_o(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Mo(e),e=e.sibling}function Mo(e){switch(e.tag){case 0:case 11:case 15:mn(e),e.flags&2048&&mt(9,e,e.return);break;case 3:mn(e);break;case 12:mn(e);break;case 22:var l=e.stateNode;e.memoizedState!==null&&l._visibility&2&&(e.return===null||e.return.tag!==13)?(l._visibility&=-3,Si(e)):mn(e);break;default:mn(e)}}function Si(e){var l=e.deletions;if((e.flags&16)!==0){if(l!==null)for(var t=0;t<l.length;t++){var a=l[t];Xe=a,Co(a,e)}_o(e)}for(e=e.child;e!==null;){switch(l=e,l.tag){case 0:case 11:case 15:mt(8,l,l.return),Si(l);break;case 22:t=l.stateNode,t._visibility&2&&(t._visibility&=-3,Si(l));break;default:Si(l)}e=e.sibling}}function Co(e,l){for(;Xe!==null;){var t=Xe;switch(t.tag){case 0:case 11:case 15:mt(8,t,l);break;case 23:case 22:if(t.memoizedState!==null&&t.memoizedState.cachePool!==null){var a=t.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:Wa(t.memoizedState.cache)}if(a=t.child,a!==null)a.return=t,Xe=a;else e:for(t=e;Xe!==null;){a=Xe;var i=a.sibling,u=a.return;if(xo(a),a===t){Xe=null;break e}if(i!==null){i.return=u,Xe=i;break e}Xe=u}}}var Pm={getCacheForType:function(e){var l=Ve(ke),t=l.data.get(e);return t===void 0&&(t=e(),l.data.set(e,t)),t},cacheSignal:function(){return Ve(ke).controller.signal}},ev=typeof WeakMap=="function"?WeakMap:Map,pe=0,Ae=null,de=null,fe=0,xe=0,vl=null,vt=!1,xa=!1,Gs=!1,Fl=0,Ue=0,yt=0,Zt=0,Ls=0,yl=0,ba=0,vn=null,ul=null,Xs=!1,Ni=0,Oo=0,Ei=1/0,Ti=null,gt=null,Ge=0,pt=null,Sa=null,Il=0,Qs=0,Zs=null,Uo=null,yn=0,Ks=null;function gl(){return(pe&2)!==0&&fe!==0?fe&-fe:z.T!==null?Is():Vc()}function Do(){if(yl===0)if((fe&536870912)===0||me){var e=Dn;Dn<<=1,(Dn&3932160)===0&&(Dn=262144),yl=e}else yl=536870912;return e=hl.current,e!==null&&(e.flags|=32),yl}function sl(e,l,t){(e===Ae&&(xe===2||xe===9)||e.cancelPendingCommit!==null)&&(Na(e,0),jt(e,fe,yl,!1)),ka(e,t),((pe&2)===0||e!==Ae)&&(e===Ae&&((pe&2)===0&&(Zt|=t),Ue===4&&jt(e,fe,yl,!1)),Hl(e))}function Ro(e,l,t){if((pe&6)!==0)throw Error(o(327));var a=!t&&(l&127)===0&&(l&e.expiredLanes)===0||Ha(e,l),i=a?av(e,l):Js(e,l,!0),u=a;do{if(i===0){xa&&!a&&jt(e,l,0,!1);break}else{if(t=e.current.alternate,u&&!lv(t)){i=Js(e,l,!1),u=!1;continue}if(i===2){if(u=l,e.errorRecoveryDisabledLanes&u)var s=0;else s=e.pendingLanes&-536870913,s=s!==0?s:s&536870912?536870912:0;if(s!==0){l=s;e:{var r=e;i=vn;var h=r.current.memoizedState.isDehydrated;if(h&&(Na(r,s).flags|=256),s=Js(r,s,!1),s!==2){if(Gs&&!h){r.errorRecoveryDisabledLanes|=u,Zt|=u,i=4;break e}u=ul,ul=i,u!==null&&(ul===null?ul=u:ul.push.apply(ul,u))}i=s}if(u=!1,i!==2)continue}}if(i===1){Na(e,0),jt(e,l,0,!0);break}e:{switch(a=e,u=i,u){case 0:case 1:throw Error(o(345));case 4:if((l&4194048)!==l)break;case 6:jt(a,l,yl,!vt);break e;case 2:ul=null;break;case 3:case 5:break;default:throw Error(o(329))}if((l&62914560)===l&&(i=Ni+300-cl(),10<i)){if(jt(a,l,yl,!vt),Hn(a,0,!0)!==0)break e;Il=l,a.timeoutHandle=ff(Ho.bind(null,a,t,ul,Ti,Xs,l,yl,Zt,ba,vt,u,"Throttled",-0,0),i);break e}Ho(a,t,ul,Ti,Xs,l,yl,Zt,ba,vt,u,null,-0,0)}}break}while(!0);Hl(e)}function Ho(e,l,t,a,i,u,s,r,h,E,M,U,A,_){if(e.timeoutHandle=-1,U=l.subtreeFlags,U&8192||(U&16785408)===16785408){U={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ql},zo(l,u,U);var K=(u&62914560)===u?Ni-cl():(u&4194048)===u?Oo-cl():0;if(K=Yv(U,K),K!==null){Il=u,e.cancelPendingCommit=K(Xo.bind(null,e,l,u,t,a,i,s,r,h,M,U,null,A,_)),jt(e,u,s,!E);return}}Xo(e,l,u,t,a,i,s,r,h)}function lv(e){for(var l=e;;){var t=l.tag;if((t===0||t===11||t===15)&&l.flags&16384&&(t=l.updateQueue,t!==null&&(t=t.stores,t!==null)))for(var a=0;a<t.length;a++){var i=t[a],u=i.getSnapshot;i=i.value;try{if(!ol(u(),i))return!1}catch{return!1}}if(t=l.child,l.subtreeFlags&16384&&t!==null)t.return=l,l=t;else{if(l===e)break;for(;l.sibling===null;){if(l.return===null||l.return===e)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function jt(e,l,t,a){l&=~Ls,l&=~Zt,e.suspendedLanes|=l,e.pingedLanes&=~l,a&&(e.warmLanes|=l),a=e.expirationTimes;for(var i=l;0<i;){var u=31-dl(i),s=1<<u;a[u]=-1,i&=~s}t!==0&&Qc(e,t,l)}function Ai(){return(pe&6)===0?(gn(0),!1):!0}function Vs(){if(de!==null){if(xe===0)var e=de.return;else e=de,Gl=kt=null,rs(e),ha=null,Ia=0,e=de;for(;e!==null;)fo(e.alternate,e),e=e.return;de=null}}function Na(e,l){var t=e.timeoutHandle;t!==-1&&(e.timeoutHandle=-1,bv(t)),t=e.cancelPendingCommit,t!==null&&(e.cancelPendingCommit=null,t()),Il=0,Vs(),Ae=e,de=t=Yl(e.current,null),fe=l,xe=0,vl=null,vt=!1,xa=Ha(e,l),Gs=!1,ba=yl=Ls=Zt=yt=Ue=0,ul=vn=null,Xs=!1,(l&8)!==0&&(l|=l&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=l;0<a;){var i=31-dl(a),u=1<<i;l|=e[i],a&=~u}return Fl=l,Vn(),t}function ko(e,l){ie=null,z.H=sn,l===fa||l===li?(l=Fr(),xe=3):l===Fu?(l=Fr(),xe=4):xe=l===Ts?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,vl=l,de===null&&(Ue=1,vi(e,bl(l,e.current)))}function qo(){var e=hl.current;return e===null?!0:(fe&4194048)===fe?Tl===null:(fe&62914560)===fe||(fe&536870912)!==0?e===Tl:!1}function Bo(){var e=z.H;return z.H=sn,e===null?sn:e}function Yo(){var e=z.A;return z.A=Pm,e}function zi(){Ue=4,vt||(fe&4194048)!==fe&&hl.current!==null||(xa=!0),(yt&134217727)===0&&(Zt&134217727)===0||Ae===null||jt(Ae,fe,yl,!1)}function Js(e,l,t){var a=pe;pe|=2;var i=Bo(),u=Yo();(Ae!==e||fe!==l)&&(Ti=null,Na(e,l)),l=!1;var s=Ue;e:do try{if(xe!==0&&de!==null){var r=de,h=vl;switch(xe){case 8:Vs(),s=6;break e;case 3:case 2:case 9:case 6:hl.current===null&&(l=!0);var E=xe;if(xe=0,vl=null,Ea(e,r,h,E),t&&xa){s=0;break e}break;default:E=xe,xe=0,vl=null,Ea(e,r,h,E)}}tv(),s=Ue;break}catch(M){ko(e,M)}while(!0);return l&&e.shellSuspendCounter++,Gl=kt=null,pe=a,z.H=i,z.A=u,de===null&&(Ae=null,fe=0,Vn()),s}function tv(){for(;de!==null;)wo(de)}function av(e,l){var t=pe;pe|=2;var a=Bo(),i=Yo();Ae!==e||fe!==l?(Ti=null,Ei=cl()+500,Na(e,l)):xa=Ha(e,l);e:do try{if(xe!==0&&de!==null){l=de;var u=vl;l:switch(xe){case 1:xe=0,vl=null,Ea(e,l,u,1);break;case 2:case 9:if($r(u)){xe=0,vl=null,Go(l);break}l=function(){xe!==2&&xe!==9||Ae!==e||(xe=7),Hl(e)},u.then(l,l);break e;case 3:xe=7;break e;case 4:xe=5;break e;case 7:$r(u)?(xe=0,vl=null,Go(l)):(xe=0,vl=null,Ea(e,l,u,7));break;case 5:var s=null;switch(de.tag){case 26:s=de.memoizedState;case 5:case 27:var r=de;if(s?zf(s):r.stateNode.complete){xe=0,vl=null;var h=r.sibling;if(h!==null)de=h;else{var E=r.return;E!==null?(de=E,_i(E)):de=null}break l}}xe=0,vl=null,Ea(e,l,u,5);break;case 6:xe=0,vl=null,Ea(e,l,u,6);break;case 8:Vs(),Ue=6;break e;default:throw Error(o(462))}}nv();break}catch(M){ko(e,M)}while(!0);return Gl=kt=null,z.H=a,z.A=i,pe=t,de!==null?0:(Ae=null,fe=0,Vn(),Ue)}function nv(){for(;de!==null&&!zh();)wo(de)}function wo(e){var l=ro(e.alternate,e,Fl);e.memoizedProps=e.pendingProps,l===null?_i(e):de=l}function Go(e){var l=e,t=l.alternate;switch(l.tag){case 15:case 0:l=ao(t,l,l.pendingProps,l.type,void 0,fe);break;case 11:l=ao(t,l,l.pendingProps,l.type.render,l.ref,fe);break;case 5:rs(l);default:fo(t,l),l=de=Br(l,Fl),l=ro(t,l,Fl)}e.memoizedProps=e.pendingProps,l===null?_i(e):de=l}function Ea(e,l,t,a){Gl=kt=null,rs(l),ha=null,Ia=0;var i=l.return;try{if(Km(e,i,l,t,fe)){Ue=1,vi(e,bl(t,e.current)),de=null;return}}catch(u){if(i!==null)throw de=i,u;Ue=1,vi(e,bl(t,e.current)),de=null;return}l.flags&32768?(me||a===1?e=!0:xa||(fe&536870912)!==0?e=!1:(vt=e=!0,(a===2||a===9||a===3||a===6)&&(a=hl.current,a!==null&&a.tag===13&&(a.flags|=16384))),Lo(l,e)):_i(l)}function _i(e){var l=e;do{if((l.flags&32768)!==0){Lo(l,vt);return}e=l.return;var t=$m(l.alternate,l,Fl);if(t!==null){de=t;return}if(l=l.sibling,l!==null){de=l;return}de=l=e}while(l!==null);Ue===0&&(Ue=5)}function Lo(e,l){do{var t=Wm(e.alternate,e);if(t!==null){t.flags&=32767,de=t;return}if(t=e.return,t!==null&&(t.flags|=32768,t.subtreeFlags=0,t.deletions=null),!l&&(e=e.sibling,e!==null)){de=e;return}de=e=t}while(e!==null);Ue=6,de=null}function Xo(e,l,t,a,i,u,s,r,h){e.cancelPendingCommit=null;do Mi();while(Ge!==0);if((pe&6)!==0)throw Error(o(327));if(l!==null){if(l===e.current)throw Error(o(177));if(u=l.lanes|l.childLanes,u|=ku,qh(e,t,u,s,r,h),e===Ae&&(de=Ae=null,fe=0),Sa=l,pt=e,Il=t,Qs=u,Zs=i,Uo=a,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,cv(On,function(){return Jo(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||a){a=z.T,z.T=null,i=m.p,m.p=2,s=pe,pe|=4;try{Fm(e,l,t)}finally{pe=s,m.p=i,z.T=a}}Ge=1,Qo(),Zo(),Ko()}}function Qo(){if(Ge===1){Ge=0;var e=pt,l=Sa,t=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||t){t=z.T,z.T=null;var a=m.p;m.p=2;var i=pe;pe|=4;try{Eo(l,e);var u=uc,s=Mr(e.containerInfo),r=u.focusedElem,h=u.selectionRange;if(s!==r&&r&&r.ownerDocument&&_r(r.ownerDocument.documentElement,r)){if(h!==null&&Ou(r)){var E=h.start,M=h.end;if(M===void 0&&(M=E),"selectionStart"in r)r.selectionStart=E,r.selectionEnd=Math.min(M,r.value.length);else{var U=r.ownerDocument||document,A=U&&U.defaultView||window;if(A.getSelection){var _=A.getSelection(),K=r.textContent.length,I=Math.min(h.start,K),Ee=h.end===void 0?I:Math.min(h.end,K);!_.extend&&I>Ee&&(s=Ee,Ee=I,I=s);var x=zr(r,I),g=zr(r,Ee);if(x&&g&&(_.rangeCount!==1||_.anchorNode!==x.node||_.anchorOffset!==x.offset||_.focusNode!==g.node||_.focusOffset!==g.offset)){var S=U.createRange();S.setStart(x.node,x.offset),_.removeAllRanges(),I>Ee?(_.addRange(S),_.extend(g.node,g.offset)):(S.setEnd(g.node,g.offset),_.addRange(S))}}}}for(U=[],_=r;_=_.parentNode;)_.nodeType===1&&U.push({element:_,left:_.scrollLeft,top:_.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<U.length;r++){var O=U[r];O.element.scrollLeft=O.left,O.element.scrollTop=O.top}}Gi=!!ic,uc=ic=null}finally{pe=i,m.p=a,z.T=t}}e.current=l,Ge=2}}function Zo(){if(Ge===2){Ge=0;var e=pt,l=Sa,t=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||t){t=z.T,z.T=null;var a=m.p;m.p=2;var i=pe;pe|=4;try{jo(e,l.alternate,l)}finally{pe=i,m.p=a,z.T=t}}Ge=3}}function Ko(){if(Ge===4||Ge===3){Ge=0,_h();var e=pt,l=Sa,t=Il,a=Uo;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?Ge=5:(Ge=0,Sa=pt=null,Vo(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(gt=null),fu(t),l=l.stateNode,rl&&typeof rl.onCommitFiberRoot=="function")try{rl.onCommitFiberRoot(Ra,l,void 0,(l.current.flags&128)===128)}catch{}if(a!==null){l=z.T,i=m.p,m.p=2,z.T=null;try{for(var u=e.onRecoverableError,s=0;s<a.length;s++){var r=a[s];u(r.value,{componentStack:r.stack})}}finally{z.T=l,m.p=i}}(Il&3)!==0&&Mi(),Hl(e),i=e.pendingLanes,(t&261930)!==0&&(i&42)!==0?e===Ks?yn++:(yn=0,Ks=e):yn=0,gn(0)}}function Vo(e,l){(e.pooledCacheLanes&=l)===0&&(l=e.pooledCache,l!=null&&(e.pooledCache=null,Wa(l)))}function Mi(){return Qo(),Zo(),Ko(),Jo()}function Jo(){if(Ge!==5)return!1;var e=pt,l=Qs;Qs=0;var t=fu(Il),a=z.T,i=m.p;try{m.p=32>t?32:t,z.T=null,t=Zs,Zs=null;var u=pt,s=Il;if(Ge=0,Sa=pt=null,Il=0,(pe&6)!==0)throw Error(o(331));var r=pe;if(pe|=4,Mo(u.current),Ao(u,u.current,s,t),pe=r,gn(0,!1),rl&&typeof rl.onPostCommitFiberRoot=="function")try{rl.onPostCommitFiberRoot(Ra,u)}catch{}return!0}finally{m.p=i,z.T=a,Vo(e,l)}}function $o(e,l,t){l=bl(t,l),l=Es(e.stateNode,l,2),e=ot(e,l,2),e!==null&&(ka(e,2),Hl(e))}function be(e,l,t){if(e.tag===3)$o(e,e,t);else for(;l!==null;){if(l.tag===3){$o(l,e,t);break}else if(l.tag===1){var a=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(gt===null||!gt.has(a))){e=bl(t,e),t=$d(2),a=ot(l,t,2),a!==null&&(Wd(t,a,l,e),ka(a,2),Hl(a));break}}l=l.return}}function $s(e,l,t){var a=e.pingCache;if(a===null){a=e.pingCache=new ev;var i=new Set;a.set(l,i)}else i=a.get(l),i===void 0&&(i=new Set,a.set(l,i));i.has(t)||(Gs=!0,i.add(t),e=iv.bind(null,e,l,t),l.then(e,e))}function iv(e,l,t){var a=e.pingCache;a!==null&&a.delete(l),e.pingedLanes|=e.suspendedLanes&t,e.warmLanes&=~t,Ae===e&&(fe&t)===t&&(Ue===4||Ue===3&&(fe&62914560)===fe&&300>cl()-Ni?(pe&2)===0&&Na(e,0):Ls|=t,ba===fe&&(ba=0)),Hl(e)}function Wo(e,l){l===0&&(l=Xc()),e=Dt(e,l),e!==null&&(ka(e,l),Hl(e))}function uv(e){var l=e.memoizedState,t=0;l!==null&&(t=l.retryLane),Wo(e,t)}function sv(e,l){var t=0;switch(e.tag){case 31:case 13:var a=e.stateNode,i=e.memoizedState;i!==null&&(t=i.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(o(314))}a!==null&&a.delete(l),Wo(e,t)}function cv(e,l){return cu(e,l)}var Ci=null,Ta=null,Ws=!1,Oi=!1,Fs=!1,xt=0;function Hl(e){e!==Ta&&e.next===null&&(Ta===null?Ci=Ta=e:Ta=Ta.next=e),Oi=!0,Ws||(Ws=!0,dv())}function gn(e,l){if(!Fs&&Oi){Fs=!0;do for(var t=!1,a=Ci;a!==null;){if(e!==0){var i=a.pendingLanes;if(i===0)var u=0;else{var s=a.suspendedLanes,r=a.pingedLanes;u=(1<<31-dl(42|e)+1)-1,u&=i&~(s&~r),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(t=!0,ef(a,u))}else u=fe,u=Hn(a,a===Ae?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(u&3)===0||Ha(a,u)||(t=!0,ef(a,u));a=a.next}while(t);Fs=!1}}function rv(){Fo()}function Fo(){Oi=Ws=!1;var e=0;xt!==0&&xv()&&(e=xt);for(var l=cl(),t=null,a=Ci;a!==null;){var i=a.next,u=Io(a,l);u===0?(a.next=null,t===null?Ci=i:t.next=i,i===null&&(Ta=t)):(t=a,(e!==0||(u&3)!==0)&&(Oi=!0)),a=i}Ge!==0&&Ge!==5||gn(e),xt!==0&&(xt=0)}function Io(e,l){for(var t=e.suspendedLanes,a=e.pingedLanes,i=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var s=31-dl(u),r=1<<s,h=i[s];h===-1?((r&t)===0||(r&a)!==0)&&(i[s]=kh(r,l)):h<=l&&(e.expiredLanes|=r),u&=~r}if(l=Ae,t=fe,t=Hn(e,e===l?t:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,t===0||e===l&&(xe===2||xe===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&ru(a),e.callbackNode=null,e.callbackPriority=0;if((t&3)===0||Ha(e,t)){if(l=t&-t,l===e.callbackPriority)return l;switch(a!==null&&ru(a),fu(t)){case 2:case 8:t=Gc;break;case 32:t=On;break;case 268435456:t=Lc;break;default:t=On}return a=Po.bind(null,e),t=cu(t,a),e.callbackPriority=l,e.callbackNode=t,l}return a!==null&&a!==null&&ru(a),e.callbackPriority=2,e.callbackNode=null,2}function Po(e,l){if(Ge!==0&&Ge!==5)return e.callbackNode=null,e.callbackPriority=0,null;var t=e.callbackNode;if(Mi()&&e.callbackNode!==t)return null;var a=fe;return a=Hn(e,e===Ae?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Ro(e,a,l),Io(e,cl()),e.callbackNode!=null&&e.callbackNode===t?Po.bind(null,e):null)}function ef(e,l){if(Mi())return null;Ro(e,l,!0)}function dv(){Sv(function(){(pe&6)!==0?cu(wc,rv):Fo()})}function Is(){if(xt===0){var e=da;e===0&&(e=Un,Un<<=1,(Un&261888)===0&&(Un=256)),xt=e}return xt}function lf(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Yn(""+e)}function tf(e,l){var t=l.ownerDocument.createElement("input");return t.name=l.name,t.value=l.value,e.id&&t.setAttribute("form",e.id),l.parentNode.insertBefore(t,l),e=new FormData(e),t.parentNode.removeChild(t),e}function ov(e,l,t,a,i){if(l==="submit"&&t&&t.stateNode===i){var u=lf((i[ll]||null).action),s=a.submitter;s&&(l=(l=s[ll]||null)?lf(l.formAction):s.getAttribute("formAction"),l!==null&&(u=l,s=null));var r=new Xn("action","action",null,a,i);e.push({event:r,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(xt!==0){var h=s?tf(i,s):new FormData(i);ps(t,{pending:!0,data:h,method:i.method,action:u},null,h)}}else typeof u=="function"&&(r.preventDefault(),h=s?tf(i,s):new FormData(i),ps(t,{pending:!0,data:h,method:i.method,action:u},u,h))},currentTarget:i}]})}}for(var Ps=0;Ps<Hu.length;Ps++){var ec=Hu[Ps],fv=ec.toLowerCase(),hv=ec[0].toUpperCase()+ec.slice(1);Ml(fv,"on"+hv)}Ml(Ur,"onAnimationEnd"),Ml(Dr,"onAnimationIteration"),Ml(Rr,"onAnimationStart"),Ml("dblclick","onDoubleClick"),Ml("focusin","onFocus"),Ml("focusout","onBlur"),Ml(Mm,"onTransitionRun"),Ml(Cm,"onTransitionStart"),Ml(Om,"onTransitionCancel"),Ml(Hr,"onTransitionEnd"),Wt("onMouseEnter",["mouseout","mouseover"]),Wt("onMouseLeave",["mouseout","mouseover"]),Wt("onPointerEnter",["pointerout","pointerover"]),Wt("onPointerLeave",["pointerout","pointerover"]),Mt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Mt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Mt("onBeforeInput",["compositionend","keypress","textInput","paste"]),Mt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Mt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Mt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var pn="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(" "),mv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(pn));function af(e,l){l=(l&4)!==0;for(var t=0;t<e.length;t++){var a=e[t],i=a.event;a=a.listeners;e:{var u=void 0;if(l)for(var s=a.length-1;0<=s;s--){var r=a[s],h=r.instance,E=r.currentTarget;if(r=r.listener,h!==u&&i.isPropagationStopped())break e;u=r,i.currentTarget=E;try{u(i)}catch(M){Kn(M)}i.currentTarget=null,u=h}else for(s=0;s<a.length;s++){if(r=a[s],h=r.instance,E=r.currentTarget,r=r.listener,h!==u&&i.isPropagationStopped())break e;u=r,i.currentTarget=E;try{u(i)}catch(M){Kn(M)}i.currentTarget=null,u=h}}}}function oe(e,l){var t=l[hu];t===void 0&&(t=l[hu]=new Set);var a=e+"__bubble";t.has(a)||(nf(l,e,2,!1),t.add(a))}function lc(e,l,t){var a=0;l&&(a|=4),nf(t,e,a,l)}var Ui="_reactListening"+Math.random().toString(36).slice(2);function tc(e){if(!e[Ui]){e[Ui]=!0,Wc.forEach(function(t){t!=="selectionchange"&&(mv.has(t)||lc(t,!1,e),lc(t,!0,e))});var l=e.nodeType===9?e:e.ownerDocument;l===null||l[Ui]||(l[Ui]=!0,lc("selectionchange",!1,l))}}function nf(e,l,t,a){switch(Rf(l)){case 2:var i=Lv;break;case 8:i=Xv;break;default:i=gc}t=i.bind(null,l,t,e),i=void 0,!Su||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(i=!0),a?i!==void 0?e.addEventListener(l,t,{capture:!0,passive:i}):e.addEventListener(l,t,!0):i!==void 0?e.addEventListener(l,t,{passive:i}):e.addEventListener(l,t,!1)}function ac(e,l,t,a,i){var u=a;if((l&1)===0&&(l&2)===0&&a!==null)e:for(;;){if(a===null)return;var s=a.tag;if(s===3||s===4){var r=a.stateNode.containerInfo;if(r===i)break;if(s===4)for(s=a.return;s!==null;){var h=s.tag;if((h===3||h===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;r!==null;){if(s=Vt(r),s===null)return;if(h=s.tag,h===5||h===6||h===26||h===27){a=u=s;continue e}r=r.parentNode}}a=a.return}cr(function(){var E=u,M=xu(t),U=[];e:{var A=kr.get(e);if(A!==void 0){var _=Xn,K=e;switch(e){case"keypress":if(Gn(t)===0)break e;case"keydown":case"keyup":_=sm;break;case"focusin":K="focus",_=Au;break;case"focusout":K="blur",_=Au;break;case"beforeblur":case"afterblur":_=Au;break;case"click":if(t.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":_=or;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":_=$h;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":_=dm;break;case Ur:case Dr:case Rr:_=Ih;break;case Hr:_=fm;break;case"scroll":case"scrollend":_=Vh;break;case"wheel":_=mm;break;case"copy":case"cut":case"paste":_=em;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":_=hr;break;case"toggle":case"beforetoggle":_=ym}var I=(l&4)!==0,Ee=!I&&(e==="scroll"||e==="scrollend"),x=I?A!==null?A+"Capture":null:A;I=[];for(var g=E,S;g!==null;){var O=g;if(S=O.stateNode,O=O.tag,O!==5&&O!==26&&O!==27||S===null||x===null||(O=Ya(g,x),O!=null&&I.push(jn(g,O,S))),Ee)break;g=g.return}0<I.length&&(A=new _(A,K,null,t,M),U.push({event:A,listeners:I}))}}if((l&7)===0){e:{if(A=e==="mouseover"||e==="pointerover",_=e==="mouseout"||e==="pointerout",A&&t!==ju&&(K=t.relatedTarget||t.fromElement)&&(Vt(K)||K[Kt]))break e;if((_||A)&&(A=M.window===M?M:(A=M.ownerDocument)?A.defaultView||A.parentWindow:window,_?(K=t.relatedTarget||t.toElement,_=E,K=K?Vt(K):null,K!==null&&(Ee=p(K),I=K.tag,K!==Ee||I!==5&&I!==27&&I!==6)&&(K=null)):(_=null,K=E),_!==K)){if(I=or,O="onMouseLeave",x="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(I=hr,O="onPointerLeave",x="onPointerEnter",g="pointer"),Ee=_==null?A:Ba(_),S=K==null?A:Ba(K),A=new I(O,g+"leave",_,t,M),A.target=Ee,A.relatedTarget=S,O=null,Vt(M)===E&&(I=new I(x,g+"enter",K,t,M),I.target=S,I.relatedTarget=Ee,O=I),Ee=O,_&&K)l:{for(I=vv,x=_,g=K,S=0,O=x;O;O=I(O))S++;O=0;for(var W=g;W;W=I(W))O++;for(;0<S-O;)x=I(x),S--;for(;0<O-S;)g=I(g),O--;for(;S--;){if(x===g||g!==null&&x===g.alternate){I=x;break l}x=I(x),g=I(g)}I=null}else I=null;_!==null&&uf(U,A,_,I,!1),K!==null&&Ee!==null&&uf(U,Ee,K,I,!0)}}e:{if(A=E?Ba(E):window,_=A.nodeName&&A.nodeName.toLowerCase(),_==="select"||_==="input"&&A.type==="file")var ye=br;else if(jr(A))if(Sr)ye=Am;else{ye=Em;var $=Nm}else _=A.nodeName,!_||_.toLowerCase()!=="input"||A.type!=="checkbox"&&A.type!=="radio"?E&&pu(E.elementType)&&(ye=br):ye=Tm;if(ye&&(ye=ye(e,E))){xr(U,ye,t,M);break e}$&&$(e,A,E),e==="focusout"&&E&&A.type==="number"&&E.memoizedProps.value!=null&&gu(A,"number",A.value)}switch($=E?Ba(E):window,e){case"focusin":(jr($)||$.contentEditable==="true")&&(ta=$,Uu=E,Va=null);break;case"focusout":Va=Uu=ta=null;break;case"mousedown":Du=!0;break;case"contextmenu":case"mouseup":case"dragend":Du=!1,Cr(U,t,M);break;case"selectionchange":if(_m)break;case"keydown":case"keyup":Cr(U,t,M)}var ue;if(_u)e:{switch(e){case"compositionstart":var he="onCompositionStart";break e;case"compositionend":he="onCompositionEnd";break e;case"compositionupdate":he="onCompositionUpdate";break e}he=void 0}else la?gr(e,t)&&(he="onCompositionEnd"):e==="keydown"&&t.keyCode===229&&(he="onCompositionStart");he&&(mr&&t.locale!=="ko"&&(la||he!=="onCompositionStart"?he==="onCompositionEnd"&&la&&(ue=rr()):(nt=M,Nu="value"in nt?nt.value:nt.textContent,la=!0)),$=Di(E,he),0<$.length&&(he=new fr(he,e,null,t,M),U.push({event:he,listeners:$}),ue?he.data=ue:(ue=pr(t),ue!==null&&(he.data=ue)))),(ue=pm?jm(e,t):xm(e,t))&&(he=Di(E,"onBeforeInput"),0<he.length&&($=new fr("onBeforeInput","beforeinput",null,t,M),U.push({event:$,listeners:he}),$.data=ue)),ov(U,e,E,t,M)}af(U,l)})}function jn(e,l,t){return{instance:e,listener:l,currentTarget:t}}function Di(e,l){for(var t=l+"Capture",a=[];e!==null;){var i=e,u=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||u===null||(i=Ya(e,t),i!=null&&a.unshift(jn(e,i,u)),i=Ya(e,l),i!=null&&a.push(jn(e,i,u))),e.tag===3)return a;e=e.return}return[]}function vv(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function uf(e,l,t,a,i){for(var u=l._reactName,s=[];t!==null&&t!==a;){var r=t,h=r.alternate,E=r.stateNode;if(r=r.tag,h!==null&&h===a)break;r!==5&&r!==26&&r!==27||E===null||(h=E,i?(E=Ya(t,u),E!=null&&s.unshift(jn(t,E,h))):i||(E=Ya(t,u),E!=null&&s.push(jn(t,E,h)))),t=t.return}s.length!==0&&e.push({event:l,listeners:s})}var yv=/\r\n?/g,gv=/\u0000|\uFFFD/g;function sf(e){return(typeof e=="string"?e:""+e).replace(yv,`
9
+ `).replace(gv,"")}function cf(e,l){return l=sf(l),sf(e)===l}function Ne(e,l,t,a,i,u){switch(t){case"children":typeof a=="string"?l==="body"||l==="textarea"&&a===""||It(e,a):(typeof a=="number"||typeof a=="bigint")&&l!=="body"&&It(e,""+a);break;case"className":qn(e,"class",a);break;case"tabIndex":qn(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":qn(e,t,a);break;case"style":ur(e,a,u);break;case"data":if(l!=="object"){qn(e,"data",a);break}case"src":case"href":if(a===""&&(l!=="a"||t!=="href")){e.removeAttribute(t);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(t);break}a=Yn(""+a),e.setAttribute(t,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(t,"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 u=="function"&&(t==="formAction"?(l!=="input"&&Ne(e,l,"name",i.name,i,null),Ne(e,l,"formEncType",i.formEncType,i,null),Ne(e,l,"formMethod",i.formMethod,i,null),Ne(e,l,"formTarget",i.formTarget,i,null)):(Ne(e,l,"encType",i.encType,i,null),Ne(e,l,"method",i.method,i,null),Ne(e,l,"target",i.target,i,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(t);break}a=Yn(""+a),e.setAttribute(t,a);break;case"onClick":a!=null&&(e.onclick=ql);break;case"onScroll":a!=null&&oe("scroll",e);break;case"onScrollEnd":a!=null&&oe("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(o(61));if(t=a.__html,t!=null){if(i.children!=null)throw Error(o(60));e.innerHTML=t}}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}t=Yn(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t);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(t,""+a):e.removeAttribute(t);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(t,""):e.removeAttribute(t);break;case"capture":case"download":a===!0?e.setAttribute(t,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(t,a):e.removeAttribute(t);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(t,a):e.removeAttribute(t);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(t):e.setAttribute(t,a);break;case"popover":oe("beforetoggle",e),oe("toggle",e),kn(e,"popover",a);break;case"xlinkActuate":kl(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":kl(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":kl(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":kl(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":kl(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":kl(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":kl(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":kl(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":kl(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":kn(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(t=Zh.get(t)||t,kn(e,t,a))}}function nc(e,l,t,a,i,u){switch(t){case"style":ur(e,a,u);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(o(61));if(t=a.__html,t!=null){if(i.children!=null)throw Error(o(60));e.innerHTML=t}}break;case"children":typeof a=="string"?It(e,a):(typeof a=="number"||typeof a=="bigint")&&It(e,""+a);break;case"onScroll":a!=null&&oe("scroll",e);break;case"onScrollEnd":a!=null&&oe("scrollend",e);break;case"onClick":a!=null&&(e.onclick=ql);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Fc.hasOwnProperty(t))e:{if(t[0]==="o"&&t[1]==="n"&&(i=t.endsWith("Capture"),l=t.slice(2,i?t.length-7:void 0),u=e[ll]||null,u=u!=null?u[t]:null,typeof u=="function"&&e.removeEventListener(l,u,i),typeof a=="function")){typeof u!="function"&&u!==null&&(t in e?e[t]=null:e.hasAttribute(t)&&e.removeAttribute(t)),e.addEventListener(l,a,i);break e}t in e?e[t]=a:a===!0?e.setAttribute(t,""):kn(e,t,a)}}}function $e(e,l,t){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":oe("error",e),oe("load",e);var a=!1,i=!1,u;for(u in t)if(t.hasOwnProperty(u)){var s=t[u];if(s!=null)switch(u){case"src":a=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,l));default:Ne(e,l,u,s,t,null)}}i&&Ne(e,l,"srcSet",t.srcSet,t,null),a&&Ne(e,l,"src",t.src,t,null);return;case"input":oe("invalid",e);var r=u=s=i=null,h=null,E=null;for(a in t)if(t.hasOwnProperty(a)){var M=t[a];if(M!=null)switch(a){case"name":i=M;break;case"type":s=M;break;case"checked":h=M;break;case"defaultChecked":E=M;break;case"value":u=M;break;case"defaultValue":r=M;break;case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(o(137,l));break;default:Ne(e,l,a,M,t,null)}}tr(e,u,r,h,E,s,i,!1);return;case"select":oe("invalid",e),a=s=u=null;for(i in t)if(t.hasOwnProperty(i)&&(r=t[i],r!=null))switch(i){case"value":u=r;break;case"defaultValue":s=r;break;case"multiple":a=r;default:Ne(e,l,i,r,t,null)}l=u,t=s,e.multiple=!!a,l!=null?Ft(e,!!a,l,!1):t!=null&&Ft(e,!!a,t,!0);return;case"textarea":oe("invalid",e),u=i=a=null;for(s in t)if(t.hasOwnProperty(s)&&(r=t[s],r!=null))switch(s){case"value":a=r;break;case"defaultValue":i=r;break;case"children":u=r;break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(o(91));break;default:Ne(e,l,s,r,t,null)}nr(e,a,i,u);return;case"option":for(h in t)t.hasOwnProperty(h)&&(a=t[h],a!=null)&&(h==="selected"?e.selected=a&&typeof a!="function"&&typeof a!="symbol":Ne(e,l,h,a,t,null));return;case"dialog":oe("beforetoggle",e),oe("toggle",e),oe("cancel",e),oe("close",e);break;case"iframe":case"object":oe("load",e);break;case"video":case"audio":for(a=0;a<pn.length;a++)oe(pn[a],e);break;case"image":oe("error",e),oe("load",e);break;case"details":oe("toggle",e);break;case"embed":case"source":case"link":oe("error",e),oe("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(E in t)if(t.hasOwnProperty(E)&&(a=t[E],a!=null))switch(E){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,l));default:Ne(e,l,E,a,t,null)}return;default:if(pu(l)){for(M in t)t.hasOwnProperty(M)&&(a=t[M],a!==void 0&&nc(e,l,M,a,t,void 0));return}}for(r in t)t.hasOwnProperty(r)&&(a=t[r],a!=null&&Ne(e,l,r,a,t,null))}function pv(e,l,t,a){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,u=null,s=null,r=null,h=null,E=null,M=null;for(_ in t){var U=t[_];if(t.hasOwnProperty(_)&&U!=null)switch(_){case"checked":break;case"value":break;case"defaultValue":h=U;default:a.hasOwnProperty(_)||Ne(e,l,_,null,a,U)}}for(var A in a){var _=a[A];if(U=t[A],a.hasOwnProperty(A)&&(_!=null||U!=null))switch(A){case"type":u=_;break;case"name":i=_;break;case"checked":E=_;break;case"defaultChecked":M=_;break;case"value":s=_;break;case"defaultValue":r=_;break;case"children":case"dangerouslySetInnerHTML":if(_!=null)throw Error(o(137,l));break;default:_!==U&&Ne(e,l,A,_,a,U)}}yu(e,s,r,h,E,M,u,i);return;case"select":_=s=r=A=null;for(u in t)if(h=t[u],t.hasOwnProperty(u)&&h!=null)switch(u){case"value":break;case"multiple":_=h;default:a.hasOwnProperty(u)||Ne(e,l,u,null,a,h)}for(i in a)if(u=a[i],h=t[i],a.hasOwnProperty(i)&&(u!=null||h!=null))switch(i){case"value":A=u;break;case"defaultValue":r=u;break;case"multiple":s=u;default:u!==h&&Ne(e,l,i,u,a,h)}l=r,t=s,a=_,A!=null?Ft(e,!!t,A,!1):!!a!=!!t&&(l!=null?Ft(e,!!t,l,!0):Ft(e,!!t,t?[]:"",!1));return;case"textarea":_=A=null;for(r in t)if(i=t[r],t.hasOwnProperty(r)&&i!=null&&!a.hasOwnProperty(r))switch(r){case"value":break;case"children":break;default:Ne(e,l,r,null,a,i)}for(s in a)if(i=a[s],u=t[s],a.hasOwnProperty(s)&&(i!=null||u!=null))switch(s){case"value":A=i;break;case"defaultValue":_=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(o(91));break;default:i!==u&&Ne(e,l,s,i,a,u)}ar(e,A,_);return;case"option":for(var K in t)A=t[K],t.hasOwnProperty(K)&&A!=null&&!a.hasOwnProperty(K)&&(K==="selected"?e.selected=!1:Ne(e,l,K,null,a,A));for(h in a)A=a[h],_=t[h],a.hasOwnProperty(h)&&A!==_&&(A!=null||_!=null)&&(h==="selected"?e.selected=A&&typeof A!="function"&&typeof A!="symbol":Ne(e,l,h,A,a,_));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 I in t)A=t[I],t.hasOwnProperty(I)&&A!=null&&!a.hasOwnProperty(I)&&Ne(e,l,I,null,a,A);for(E in a)if(A=a[E],_=t[E],a.hasOwnProperty(E)&&A!==_&&(A!=null||_!=null))switch(E){case"children":case"dangerouslySetInnerHTML":if(A!=null)throw Error(o(137,l));break;default:Ne(e,l,E,A,a,_)}return;default:if(pu(l)){for(var Ee in t)A=t[Ee],t.hasOwnProperty(Ee)&&A!==void 0&&!a.hasOwnProperty(Ee)&&nc(e,l,Ee,void 0,a,A);for(M in a)A=a[M],_=t[M],!a.hasOwnProperty(M)||A===_||A===void 0&&_===void 0||nc(e,l,M,A,a,_);return}}for(var x in t)A=t[x],t.hasOwnProperty(x)&&A!=null&&!a.hasOwnProperty(x)&&Ne(e,l,x,null,a,A);for(U in a)A=a[U],_=t[U],!a.hasOwnProperty(U)||A===_||A==null&&_==null||Ne(e,l,U,A,a,_)}function rf(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function jv(){if(typeof performance.getEntriesByType=="function"){for(var e=0,l=0,t=performance.getEntriesByType("resource"),a=0;a<t.length;a++){var i=t[a],u=i.transferSize,s=i.initiatorType,r=i.duration;if(u&&r&&rf(s)){for(s=0,r=i.responseEnd,a+=1;a<t.length;a++){var h=t[a],E=h.startTime;if(E>r)break;var M=h.transferSize,U=h.initiatorType;M&&rf(U)&&(h=h.responseEnd,s+=M*(h<r?1:(r-E)/(h-E)))}if(--a,l+=8*(u+s)/(i.duration/1e3),e++,10<e)break}}if(0<e)return l/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var ic=null,uc=null;function Ri(e){return e.nodeType===9?e:e.ownerDocument}function df(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 of(e,l){if(e===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&l==="foreignObject"?0:e}function sc(e,l){return e==="textarea"||e==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var cc=null;function xv(){var e=window.event;return e&&e.type==="popstate"?e===cc?!1:(cc=e,!0):(cc=null,!1)}var ff=typeof setTimeout=="function"?setTimeout:void 0,bv=typeof clearTimeout=="function"?clearTimeout:void 0,hf=typeof Promise=="function"?Promise:void 0,Sv=typeof queueMicrotask=="function"?queueMicrotask:typeof hf<"u"?function(e){return hf.resolve(null).then(e).catch(Nv)}:ff;function Nv(e){setTimeout(function(){throw e})}function bt(e){return e==="head"}function mf(e,l){var t=l,a=0;do{var i=t.nextSibling;if(e.removeChild(t),i&&i.nodeType===8)if(t=i.data,t==="/$"||t==="/&"){if(a===0){e.removeChild(i),Ma(l);return}a--}else if(t==="$"||t==="$?"||t==="$~"||t==="$!"||t==="&")a++;else if(t==="html")xn(e.ownerDocument.documentElement);else if(t==="head"){t=e.ownerDocument.head,xn(t);for(var u=t.firstChild;u;){var s=u.nextSibling,r=u.nodeName;u[qa]||r==="SCRIPT"||r==="STYLE"||r==="LINK"&&u.rel.toLowerCase()==="stylesheet"||t.removeChild(u),u=s}}else t==="body"&&xn(e.ownerDocument.body);t=i}while(t);Ma(l)}function vf(e,l){var t=e;e=0;do{var a=t.nextSibling;if(t.nodeType===1?l?(t._stashedDisplay=t.style.display,t.style.display="none"):(t.style.display=t._stashedDisplay||"",t.getAttribute("style")===""&&t.removeAttribute("style")):t.nodeType===3&&(l?(t._stashedText=t.nodeValue,t.nodeValue=""):t.nodeValue=t._stashedText||""),a&&a.nodeType===8)if(t=a.data,t==="/$"){if(e===0)break;e--}else t!=="$"&&t!=="$?"&&t!=="$~"&&t!=="$!"||e++;t=a}while(t)}function rc(e){var l=e.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var t=l;switch(l=l.nextSibling,t.nodeName){case"HTML":case"HEAD":case"BODY":rc(t),mu(t);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(t.rel.toLowerCase()==="stylesheet")continue}e.removeChild(t)}}function Ev(e,l,t,a){for(;e.nodeType===1;){var i=t;if(e.nodeName.toLowerCase()!==l.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[qa])switch(l){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(l==="input"&&e.type==="hidden"){var u=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=Al(e.nextSibling),e===null)break}return null}function Tv(e,l,t){if(l==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Al(e.nextSibling),e===null))return null;return e}function yf(e,l){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=Al(e.nextSibling),e===null))return null;return e}function dc(e){return e.data==="$?"||e.data==="$~"}function oc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Av(e,l){var t=e.ownerDocument;if(e.data==="$~")e._reactRetry=l;else if(e.data!=="$?"||t.readyState!=="loading")l();else{var a=function(){l(),t.removeEventListener("DOMContentLoaded",a)};t.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function Al(e){for(;e!=null;e=e.nextSibling){var l=e.nodeType;if(l===1||l===3)break;if(l===8){if(l=e.data,l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"||l==="F!"||l==="F")break;if(l==="/$"||l==="/&")return null}}return e}var fc=null;function gf(e){e=e.nextSibling;for(var l=0;e;){if(e.nodeType===8){var t=e.data;if(t==="/$"||t==="/&"){if(l===0)return Al(e.nextSibling);l--}else t!=="$"&&t!=="$!"&&t!=="$?"&&t!=="$~"&&t!=="&"||l++}e=e.nextSibling}return null}function pf(e){e=e.previousSibling;for(var l=0;e;){if(e.nodeType===8){var t=e.data;if(t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"){if(l===0)return e;l--}else t!=="/$"&&t!=="/&"||l++}e=e.previousSibling}return null}function jf(e,l,t){switch(l=Ri(t),e){case"html":if(e=l.documentElement,!e)throw Error(o(452));return e;case"head":if(e=l.head,!e)throw Error(o(453));return e;case"body":if(e=l.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function xn(e){for(var l=e.attributes;l.length;)e.removeAttributeNode(l[0]);mu(e)}var zl=new Map,xf=new Set;function Hi(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Pl=m.d;m.d={f:zv,r:_v,D:Mv,C:Cv,L:Ov,m:Uv,X:Rv,S:Dv,M:Hv};function zv(){var e=Pl.f(),l=Ai();return e||l}function _v(e){var l=Jt(e);l!==null&&l.tag===5&&l.type==="form"?Hd(l):Pl.r(e)}var Aa=typeof document>"u"?null:document;function bf(e,l,t){var a=Aa;if(a&&typeof l=="string"&&l){var i=jl(l);i='link[rel="'+e+'"][href="'+i+'"]',typeof t=="string"&&(i+='[crossorigin="'+t+'"]'),xf.has(i)||(xf.add(i),e={rel:e,crossOrigin:t,href:l},a.querySelector(i)===null&&(l=a.createElement("link"),$e(l,"link",e),Le(l),a.head.appendChild(l)))}}function Mv(e){Pl.D(e),bf("dns-prefetch",e,null)}function Cv(e,l){Pl.C(e,l),bf("preconnect",e,l)}function Ov(e,l,t){Pl.L(e,l,t);var a=Aa;if(a&&e&&l){var i='link[rel="preload"][as="'+jl(l)+'"]';l==="image"&&t&&t.imageSrcSet?(i+='[imagesrcset="'+jl(t.imageSrcSet)+'"]',typeof t.imageSizes=="string"&&(i+='[imagesizes="'+jl(t.imageSizes)+'"]')):i+='[href="'+jl(e)+'"]';var u=i;switch(l){case"style":u=za(e);break;case"script":u=_a(e)}zl.has(u)||(e=k({rel:"preload",href:l==="image"&&t&&t.imageSrcSet?void 0:e,as:l},t),zl.set(u,e),a.querySelector(i)!==null||l==="style"&&a.querySelector(bn(u))||l==="script"&&a.querySelector(Sn(u))||(l=a.createElement("link"),$e(l,"link",e),Le(l),a.head.appendChild(l)))}}function Uv(e,l){Pl.m(e,l);var t=Aa;if(t&&e){var a=l&&typeof l.as=="string"?l.as:"script",i='link[rel="modulepreload"][as="'+jl(a)+'"][href="'+jl(e)+'"]',u=i;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=_a(e)}if(!zl.has(u)&&(e=k({rel:"modulepreload",href:e},l),zl.set(u,e),t.querySelector(i)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(t.querySelector(Sn(u)))return}a=t.createElement("link"),$e(a,"link",e),Le(a),t.head.appendChild(a)}}}function Dv(e,l,t){Pl.S(e,l,t);var a=Aa;if(a&&e){var i=$t(a).hoistableStyles,u=za(e);l=l||"default";var s=i.get(u);if(!s){var r={loading:0,preload:null};if(s=a.querySelector(bn(u)))r.loading=5;else{e=k({rel:"stylesheet",href:e,"data-precedence":l},t),(t=zl.get(u))&&hc(e,t);var h=s=a.createElement("link");Le(h),$e(h,"link",e),h._p=new Promise(function(E,M){h.onload=E,h.onerror=M}),h.addEventListener("load",function(){r.loading|=1}),h.addEventListener("error",function(){r.loading|=2}),r.loading|=4,ki(s,l,a)}s={type:"stylesheet",instance:s,count:1,state:r},i.set(u,s)}}}function Rv(e,l){Pl.X(e,l);var t=Aa;if(t&&e){var a=$t(t).hoistableScripts,i=_a(e),u=a.get(i);u||(u=t.querySelector(Sn(i)),u||(e=k({src:e,async:!0},l),(l=zl.get(i))&&mc(e,l),u=t.createElement("script"),Le(u),$e(u,"link",e),t.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(i,u))}}function Hv(e,l){Pl.M(e,l);var t=Aa;if(t&&e){var a=$t(t).hoistableScripts,i=_a(e),u=a.get(i);u||(u=t.querySelector(Sn(i)),u||(e=k({src:e,async:!0,type:"module"},l),(l=zl.get(i))&&mc(e,l),u=t.createElement("script"),Le(u),$e(u,"link",e),t.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(i,u))}}function Sf(e,l,t,a){var i=(i=re.current)?Hi(i):null;if(!i)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof t.precedence=="string"&&typeof t.href=="string"?(l=za(t.href),t=$t(i).hoistableStyles,a=t.get(l),a||(a={type:"style",instance:null,count:0,state:null},t.set(l,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(t.rel==="stylesheet"&&typeof t.href=="string"&&typeof t.precedence=="string"){e=za(t.href);var u=$t(i).hoistableStyles,s=u.get(e);if(s||(i=i.ownerDocument||i,s={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,s),(u=i.querySelector(bn(e)))&&!u._p&&(s.instance=u,s.state.loading=5),zl.has(e)||(t={rel:"preload",as:"style",href:t.href,crossOrigin:t.crossOrigin,integrity:t.integrity,media:t.media,hrefLang:t.hrefLang,referrerPolicy:t.referrerPolicy},zl.set(e,t),u||kv(i,e,t,s.state))),l&&a===null)throw Error(o(528,""));return s}if(l&&a!==null)throw Error(o(529,""));return null;case"script":return l=t.async,t=t.src,typeof t=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=_a(t),t=$t(i).hoistableScripts,a=t.get(l),a||(a={type:"script",instance:null,count:0,state:null},t.set(l,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function za(e){return'href="'+jl(e)+'"'}function bn(e){return'link[rel="stylesheet"]['+e+"]"}function Nf(e){return k({},e,{"data-precedence":e.precedence,precedence:null})}function kv(e,l,t,a){e.querySelector('link[rel="preload"][as="style"]['+l+"]")?a.loading=1:(l=e.createElement("link"),a.preload=l,l.addEventListener("load",function(){return a.loading|=1}),l.addEventListener("error",function(){return a.loading|=2}),$e(l,"link",t),Le(l),e.head.appendChild(l))}function _a(e){return'[src="'+jl(e)+'"]'}function Sn(e){return"script[async]"+e}function Ef(e,l,t){if(l.count++,l.instance===null)switch(l.type){case"style":var a=e.querySelector('style[data-href~="'+jl(t.href)+'"]');if(a)return l.instance=a,Le(a),a;var i=k({},t,{"data-href":t.href,"data-precedence":t.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Le(a),$e(a,"style",i),ki(a,t.precedence,e),l.instance=a;case"stylesheet":i=za(t.href);var u=e.querySelector(bn(i));if(u)return l.state.loading|=4,l.instance=u,Le(u),u;a=Nf(t),(i=zl.get(i))&&hc(a,i),u=(e.ownerDocument||e).createElement("link"),Le(u);var s=u;return s._p=new Promise(function(r,h){s.onload=r,s.onerror=h}),$e(u,"link",a),l.state.loading|=4,ki(u,t.precedence,e),l.instance=u;case"script":return u=_a(t.src),(i=e.querySelector(Sn(u)))?(l.instance=i,Le(i),i):(a=t,(i=zl.get(u))&&(a=k({},t),mc(a,i)),e=e.ownerDocument||e,i=e.createElement("script"),Le(i),$e(i,"link",a),e.head.appendChild(i),l.instance=i);case"void":return null;default:throw Error(o(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(a=l.instance,l.state.loading|=4,ki(a,t.precedence,e));return l.instance}function ki(e,l,t){for(var a=t.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=a.length?a[a.length-1]:null,u=i,s=0;s<a.length;s++){var r=a[s];if(r.dataset.precedence===l)u=r;else if(u!==i)break}u?u.parentNode.insertBefore(e,u.nextSibling):(l=t.nodeType===9?t.head:t,l.insertBefore(e,l.firstChild))}function hc(e,l){e.crossOrigin==null&&(e.crossOrigin=l.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=l.referrerPolicy),e.title==null&&(e.title=l.title)}function mc(e,l){e.crossOrigin==null&&(e.crossOrigin=l.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=l.referrerPolicy),e.integrity==null&&(e.integrity=l.integrity)}var qi=null;function Tf(e,l,t){if(qi===null){var a=new Map,i=qi=new Map;i.set(t,a)}else i=qi,a=i.get(t),a||(a=new Map,i.set(t,a));if(a.has(e))return a;for(a.set(e,null),t=t.getElementsByTagName(e),i=0;i<t.length;i++){var u=t[i];if(!(u[qa]||u[Ze]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var s=u.getAttribute(l)||"";s=e+s;var r=a.get(s);r?r.push(u):a.set(s,[u])}}return a}function Af(e,l,t){e=e.ownerDocument||e,e.head.insertBefore(t,l==="title"?e.querySelector("head > title"):null)}function qv(e,l,t){if(t===1||l.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;return l.rel==="stylesheet"?(e=l.disabled,typeof l.precedence=="string"&&e==null):!0;case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function zf(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Bv(e,l,t,a){if(t.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var i=za(a.href),u=l.querySelector(bn(i));if(u){l=u._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(e.count++,e=Bi.bind(e),l.then(e,e)),t.state.loading|=4,t.instance=u,Le(u);return}u=l.ownerDocument||l,a=Nf(a),(i=zl.get(i))&&hc(a,i),u=u.createElement("link"),Le(u);var s=u;s._p=new Promise(function(r,h){s.onload=r,s.onerror=h}),$e(u,"link",a),t.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(t,l),(l=t.state.preload)&&(t.state.loading&3)===0&&(e.count++,t=Bi.bind(e),l.addEventListener("load",t),l.addEventListener("error",t))}}var vc=0;function Yv(e,l){return e.stylesheets&&e.count===0&&wi(e,e.stylesheets),0<e.count||0<e.imgCount?function(t){var a=setTimeout(function(){if(e.stylesheets&&wi(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+l);0<e.imgBytes&&vc===0&&(vc=62500*jv());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&wi(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>vc?50:800)+l);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(i)}}:null}function Bi(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)wi(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yi=null;function wi(e,l){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yi=new Map,l.forEach(wv,e),Yi=null,Bi.call(e))}function wv(e,l){if(!(l.state.loading&4)){var t=Yi.get(e);if(t)var a=t.get(null);else{t=new Map,Yi.set(e,t);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<i.length;u++){var s=i[u];(s.nodeName==="LINK"||s.getAttribute("media")!=="not all")&&(t.set(s.dataset.precedence,s),a=s)}a&&t.set(null,a)}i=l.instance,s=i.getAttribute("data-precedence"),u=t.get(s)||a,u===a&&t.set(null,i),t.set(s,i),this.count++,a=Bi.bind(this),i.addEventListener("load",a),i.addEventListener("error",a),u?u.parentNode.insertBefore(i,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),l.state.loading|=4}}var Nn={$$typeof:P,Provider:null,Consumer:null,_currentValue:Y,_currentValue2:Y,_threadCount:0};function Gv(e,l,t,a,i,u,s,r,h){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=du(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=du(0),this.hiddenUpdates=du(null),this.identifierPrefix=a,this.onUncaughtError=i,this.onCaughtError=u,this.onRecoverableError=s,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=h,this.incompleteTransitions=new Map}function _f(e,l,t,a,i,u,s,r,h,E,M,U){return e=new Gv(e,l,t,s,h,E,M,U,r),l=1,u===!0&&(l|=24),u=fl(3,null,null,l),e.current=u,u.stateNode=e,l=Ju(),l.refCount++,e.pooledCache=l,l.refCount++,u.memoizedState={element:a,isDehydrated:t,cache:l},Iu(u),e}function Mf(e){return e?(e=ia,e):ia}function Cf(e,l,t,a,i,u){i=Mf(i),a.context===null?a.context=i:a.pendingContext=i,a=dt(l),a.payload={element:t},u=u===void 0?null:u,u!==null&&(a.callback=u),t=ot(e,a,l),t!==null&&(sl(t,e,l),en(t,e,l))}function Of(e,l){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var t=e.retryLane;e.retryLane=t!==0&&t<l?t:l}}function yc(e,l){Of(e,l),(e=e.alternate)&&Of(e,l)}function Uf(e){if(e.tag===13||e.tag===31){var l=Dt(e,67108864);l!==null&&sl(l,e,67108864),yc(e,67108864)}}function Df(e){if(e.tag===13||e.tag===31){var l=gl();l=ou(l);var t=Dt(e,l);t!==null&&sl(t,e,l),yc(e,l)}}var Gi=!0;function Lv(e,l,t,a){var i=z.T;z.T=null;var u=m.p;try{m.p=2,gc(e,l,t,a)}finally{m.p=u,z.T=i}}function Xv(e,l,t,a){var i=z.T;z.T=null;var u=m.p;try{m.p=8,gc(e,l,t,a)}finally{m.p=u,z.T=i}}function gc(e,l,t,a){if(Gi){var i=pc(a);if(i===null)ac(e,l,a,Li,t),Hf(e,a);else if(Zv(i,e,l,t,a))a.stopPropagation();else if(Hf(e,a),l&4&&-1<Qv.indexOf(e)){for(;i!==null;){var u=Jt(i);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var s=_t(u.pendingLanes);if(s!==0){var r=u;for(r.pendingLanes|=2,r.entangledLanes|=2;s;){var h=1<<31-dl(s);r.entanglements[1]|=h,s&=~h}Hl(u),(pe&6)===0&&(Ei=cl()+500,gn(0))}}break;case 31:case 13:r=Dt(u,2),r!==null&&sl(r,u,2),Ai(),yc(u,2)}if(u=pc(a),u===null&&ac(e,l,a,Li,t),u===i)break;i=u}i!==null&&a.stopPropagation()}else ac(e,l,a,null,t)}}function pc(e){return e=xu(e),jc(e)}var Li=null;function jc(e){if(Li=null,e=Vt(e),e!==null){var l=p(e);if(l===null)e=null;else{var t=l.tag;if(t===13){if(e=j(l),e!==null)return e;e=null}else if(t===31){if(e=N(l),e!==null)return e;e=null}else if(t===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;e=null}else l!==e&&(e=null)}}return Li=e,null}function Rf(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(Mh()){case wc:return 2;case Gc:return 8;case On:case Ch:return 32;case Lc:return 268435456;default:return 32}default:return 32}}var xc=!1,St=null,Nt=null,Et=null,En=new Map,Tn=new Map,Tt=[],Qv="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 Hf(e,l){switch(e){case"focusin":case"focusout":St=null;break;case"dragenter":case"dragleave":Nt=null;break;case"mouseover":case"mouseout":Et=null;break;case"pointerover":case"pointerout":En.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":Tn.delete(l.pointerId)}}function An(e,l,t,a,i,u){return e===null||e.nativeEvent!==u?(e={blockedOn:l,domEventName:t,eventSystemFlags:a,nativeEvent:u,targetContainers:[i]},l!==null&&(l=Jt(l),l!==null&&Uf(l)),e):(e.eventSystemFlags|=a,l=e.targetContainers,i!==null&&l.indexOf(i)===-1&&l.push(i),e)}function Zv(e,l,t,a,i){switch(l){case"focusin":return St=An(St,e,l,t,a,i),!0;case"dragenter":return Nt=An(Nt,e,l,t,a,i),!0;case"mouseover":return Et=An(Et,e,l,t,a,i),!0;case"pointerover":var u=i.pointerId;return En.set(u,An(En.get(u)||null,e,l,t,a,i)),!0;case"gotpointercapture":return u=i.pointerId,Tn.set(u,An(Tn.get(u)||null,e,l,t,a,i)),!0}return!1}function kf(e){var l=Vt(e.target);if(l!==null){var t=p(l);if(t!==null){if(l=t.tag,l===13){if(l=j(t),l!==null){e.blockedOn=l,Jc(e.priority,function(){Df(t)});return}}else if(l===31){if(l=N(t),l!==null){e.blockedOn=l,Jc(e.priority,function(){Df(t)});return}}else if(l===3&&t.stateNode.current.memoizedState.isDehydrated){e.blockedOn=t.tag===3?t.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Xi(e){if(e.blockedOn!==null)return!1;for(var l=e.targetContainers;0<l.length;){var t=pc(e.nativeEvent);if(t===null){t=e.nativeEvent;var a=new t.constructor(t.type,t);ju=a,t.target.dispatchEvent(a),ju=null}else return l=Jt(t),l!==null&&Uf(l),e.blockedOn=t,!1;l.shift()}return!0}function qf(e,l,t){Xi(e)&&t.delete(l)}function Kv(){xc=!1,St!==null&&Xi(St)&&(St=null),Nt!==null&&Xi(Nt)&&(Nt=null),Et!==null&&Xi(Et)&&(Et=null),En.forEach(qf),Tn.forEach(qf)}function Qi(e,l){e.blockedOn===l&&(e.blockedOn=null,xc||(xc=!0,c.unstable_scheduleCallback(c.unstable_NormalPriority,Kv)))}var Zi=null;function Bf(e){Zi!==e&&(Zi=e,c.unstable_scheduleCallback(c.unstable_NormalPriority,function(){Zi===e&&(Zi=null);for(var l=0;l<e.length;l+=3){var t=e[l],a=e[l+1],i=e[l+2];if(typeof a!="function"){if(jc(a||t)===null)continue;break}var u=Jt(t);u!==null&&(e.splice(l,3),l-=3,ps(u,{pending:!0,data:i,method:t.method,action:a},a,i))}}))}function Ma(e){function l(h){return Qi(h,e)}St!==null&&Qi(St,e),Nt!==null&&Qi(Nt,e),Et!==null&&Qi(Et,e),En.forEach(l),Tn.forEach(l);for(var t=0;t<Tt.length;t++){var a=Tt[t];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Tt.length&&(t=Tt[0],t.blockedOn===null);)kf(t),t.blockedOn===null&&Tt.shift();if(t=(e.ownerDocument||e).$$reactFormReplay,t!=null)for(a=0;a<t.length;a+=3){var i=t[a],u=t[a+1],s=i[ll]||null;if(typeof u=="function")s||Bf(t);else if(s){var r=null;if(u&&u.hasAttribute("formAction")){if(i=u,s=u[ll]||null)r=s.formAction;else if(jc(i)!==null)continue}else r=s.action;typeof r=="function"?t[a+1]=r:(t.splice(a,3),a-=3),Bf(t)}}}function Yf(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(s){return i=s})},focusReset:"manual",scroll:"manual"})}function l(){i!==null&&(i(),i=null),a||setTimeout(t,20)}function t(){if(!a&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(t,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),i!==null&&(i(),i=null)}}}function bc(e){this._internalRoot=e}Ki.prototype.render=bc.prototype.render=function(e){var l=this._internalRoot;if(l===null)throw Error(o(409));var t=l.current,a=gl();Cf(t,a,e,l,null,null)},Ki.prototype.unmount=bc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var l=e.containerInfo;Cf(e.current,2,null,e,null,null),Ai(),l[Kt]=null}};function Ki(e){this._internalRoot=e}Ki.prototype.unstable_scheduleHydration=function(e){if(e){var l=Vc();e={blockedOn:null,target:e,priority:l};for(var t=0;t<Tt.length&&l!==0&&l<Tt[t].priority;t++);Tt.splice(t,0,e),t===0&&kf(e)}};var wf=d.version;if(wf!=="19.2.7")throw Error(o(527,wf,"19.2.7"));m.findDOMNode=function(e){var l=e._reactInternals;if(l===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=b(l),e=e!==null?B(e):null,e=e===null?null:e.stateNode,e};var Vv={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Vi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vi.isDisabled&&Vi.supportsFiber)try{Ra=Vi.inject(Vv),rl=Vi}catch{}}return _n.createRoot=function(e,l){if(!v(e))throw Error(o(299));var t=!1,a="",i=Zd,u=Kd,s=Vd;return l!=null&&(l.unstable_strictMode===!0&&(t=!0),l.identifierPrefix!==void 0&&(a=l.identifierPrefix),l.onUncaughtError!==void 0&&(i=l.onUncaughtError),l.onCaughtError!==void 0&&(u=l.onCaughtError),l.onRecoverableError!==void 0&&(s=l.onRecoverableError)),l=_f(e,1,!1,null,null,t,a,null,i,u,s,Yf),e[Kt]=l.current,tc(e),new bc(l)},_n.hydrateRoot=function(e,l,t){if(!v(e))throw Error(o(299));var a=!1,i="",u=Zd,s=Kd,r=Vd,h=null;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onUncaughtError!==void 0&&(u=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(r=t.onRecoverableError),t.formState!==void 0&&(h=t.formState)),l=_f(e,1,!0,l,t??null,a,i,h,u,s,r,Yf),l.context=Mf(null),t=l.current,a=gl(),a=ou(a),i=dt(a),i.callback=null,ot(t,i,a),t=a,l.current.lanes=t,ka(l,t),Hl(l),e[Kt]=l.current,tc(e),new Ki(l)},_n.version="19.2.7",_n}var Wf;function ay(){if(Wf)return Ec.exports;Wf=1;function c(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(c)}catch(d){console.error(d)}}return c(),Ec.exports=ty(),Ec.exports}var ny=ay();async function Pe(c){const d=await fetch(c);if(!d.ok)throw new Error(`HTTP ${d.status}`);return await d.json()}async function el(c,d,f){const o=await fetch(d,{method:c,...f!==void 0?{headers:{"content-type":"application/json"},body:JSON.stringify(f)}:{}});if(!o.ok){const v=await o.json().catch(()=>({}));throw new Error(v.error??`HTTP ${o.status}`)}}async function iy(c){return Pe(`/api/runs/${encodeURIComponent(c)}`)}async function hh(c={}){const d=new URLSearchParams;return d.set("limit",String(c.limit??50)),d.set("offset",String(c.offset??0)),Pe(`/api/threads?${d.toString()}`)}async function uy(c){return Pe(`/api/threads/${encodeURIComponent(c)}`)}async function sy(){return(await Pe("/api/instances")).instances}async function cy(c){return Pe(`/api/instances/${c}`)}async function ry(){return(await Pe("/api/mcp")).servers}async function dy(){return(await Pe("/api/skills")).skills}async function mh(){return Pe("/api/wire/status")}async function Oa(){return Pe("/api/routing/registry")}async function oy(){return Pe("/api/tiers")}async function Ff(c,d){await el("POST","/api/tiers",{tier:c,target:d})}async function fy(c){await el("DELETE",`/api/tiers?tier=${encodeURIComponent(c)}`)}async function hy(){return Pe("/api/keys")}async function my(c){const d=await fetch("/api/keys",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({label:c})});if(!d.ok){const f=await d.json().catch(()=>({}));throw new Error(f.error??`HTTP ${d.status}`)}return await d.json()}async function vy(c){await el("DELETE",`/api/keys?id=${encodeURIComponent(c)}`)}async function vh(){return Pe("/api/routing/policy")}async function If(c,d){await el("POST","/api/routing/agent",{routeKey:c,target:d})}async function yy(c){await el("DELETE",`/api/routing/agent?routeKey=${encodeURIComponent(c)}`)}async function gy(c){await el("POST","/api/routing/subagent",c)}async function py(c){await el("POST","/api/routing/provider",c)}async function Pf(c){await el("DELETE",`/api/routing/provider?id=${encodeURIComponent(c)}`)}async function eh(c){await el("POST","/api/routing/model",c)}async function jy(c){const d=await fetch("/api/routing/list-models",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(c)}),f=await d.json().catch(()=>({}));if(!d.ok)throw new Error(f.error??`HTTP ${d.status}`);return f.models??[]}async function xy(c){await el("POST","/api/routing/combo",c)}async function by(c){await el("DELETE",`/api/routing/combo?id=${encodeURIComponent(c)}`)}async function Sy(c,d){const f=d?`id=${encodeURIComponent(c)}&providerId=${encodeURIComponent(d)}`:`id=${encodeURIComponent(c)}`;await el("DELETE",`/api/routing/model?${f}`)}async function yh(){return Pe("/api/tool-providers")}async function Ny(c){await el("POST","/api/tool-providers",c)}async function Ey(c){await el("DELETE",`/api/tool-providers?id=${encodeURIComponent(c)}`)}async function Ty(c,d){await el("POST","/api/tool-providers/active",{kind:c,providerId:d})}async function gh(c={}){const d=new URLSearchParams;return d.set("limit",String(c.limit??100)),Pe(`/api/risk?${d.toString()}`)}async function Ay(){return Pe("/api/masking")}async function au(c,d){const f=await fetch(c,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(d)});if(!f.ok){const o=await f.json().catch(()=>({}));throw new Error(o.error??`HTTP ${f.status}`)}return await f.json()}function zy(c,d,f){return au("/api/masking/rule",{provider:c,id:d,enabled:f})}function lh(c,d){return au("/api/masking/provider",{provider:c,enabled:d})}function _y(c,d){return au("/api/masking/fake",{id:c,fake:d})}function My(c){return au("/api/masking/custom",c)}async function Cy(c){const d=await fetch(`/api/masking/custom?id=${encodeURIComponent(c)}`,{method:"DELETE"});if(!d.ok){const f=await d.json().catch(()=>({}));throw new Error(f.error??`HTTP ${d.status}`)}return await d.json()}function Oy(c){return c.wiredAgents.length}const Uy=[{key:"see",href:"#/see",label:"See",verb:"see"},{key:"routing",href:"#/routing",label:"Routing",verb:"route"},{key:"keys",href:"#/keys",label:"Connect",verb:"keys"},{key:"guard",href:"#/guard",label:"Guard",verb:"guard"}];function Dy({active:c}){const[d,f]=H.useState(null),[o,v]=H.useState(null);return H.useEffect(()=>{let p=!1;const j=async()=>{try{const[T,b]=await Promise.all([mh(),fetch("/health")]);p||(f(T),v(b.ok))}catch{p||v(!1)}};j();const N=setInterval(j,15e3);return()=>{p=!0,clearInterval(N)}},[]),n.jsx("header",{className:"nav",children:n.jsxs("div",{className:"nav-row nav-row-main",children:[n.jsxs("a",{className:"nav-brand",href:"#/",title:"Home",children:[n.jsx("span",{className:"nav-dot"}),n.jsx("span",{children:"afw"})]}),n.jsx("nav",{className:"nav-pillars","aria-label":"Sections",children:Uy.map(p=>n.jsxs("a",{href:p.href,className:`nav-pillar ${c===p.key?"active":""}`,children:[n.jsx("span",{className:"nav-pillar-label",children:p.label}),p.verb&&n.jsx("span",{className:"nav-pillar-sub",children:p.verb})]},p.key))}),n.jsxs("div",{className:"nav-meta",children:[d&&n.jsxs("span",{className:"nav-stat",title:d.wiredAgents.length>0?`Agents the wire accepts traffic for:
10
+ ${d.wiredAgents.join(`
11
+ `)}`:"No agents wired yet — launch one with `afw claude`",children:["●●● ",Oy(d)," wired",d.driftedCount>0&&n.jsxs("span",{className:"nav-drift",children:[" · ",d.driftedCount," drifted"]})]}),n.jsx("span",{className:`nav-health ${o?"ok":"fail"}`,children:o==null?"…":o?"daemon ok":"daemon down"})]})]})})}function lt({ms:c}){const d=new Date(c),f=o=>String(o).padStart(2,"0");return n.jsxs("span",{title:d.toISOString(),children:[f(d.getHours()),":",f(d.getMinutes()),":",f(d.getSeconds())]})}function Mn({ms:c}){return c==null?n.jsx(n.Fragment,{children:"—"}):c<1e3?n.jsxs(n.Fragment,{children:[c,"ms"]}):c<6e4?n.jsxs(n.Fragment,{children:[(c/1e3).toFixed(1),"s"]}):n.jsxs(n.Fragment,{children:[(c/6e4).toFixed(1),"m"]})}function ph({tokensIn:c,tokensOut:d}){return c==null&&d==null?n.jsx(n.Fragment,{children:"—"}):n.jsxs(n.Fragment,{children:[c??0,"/",d??0]})}function Dc({read:c,write:d}){const f=c??0,o=d??0;return f===0&&o===0?n.jsx(n.Fragment,{children:"—"}):n.jsxs("span",{title:`${f} read, ${o} write`,children:[Cc(f),"/",Cc(o)]})}function Cc(c){return c<1e3?String(c):c<1e6?`${(c/1e3).toFixed(c<1e4?1:0).replace(/\.0$/,"")}K`:`${(c/1e6).toFixed(1).replace(/\.0$/,"")}M`}function Oc(c){return Cc(c)}function Ua(c){const d=c.indexOf("_");return d<0?c.slice(0,10):`${c.slice(0,d+1)}${c.slice(d+1,d+9)}`}const Ry=c=>c.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"");function Hy(){const[c,d]=H.useState(null),[f,o]=H.useState([]),[v,p]=H.useState(null),[j,N]=H.useState(null),[T,b]=H.useState(null),[B,k]=H.useState({}),[Q,C]=H.useState(!1),[w,ee]=H.useState({label:"",pattern:"",fake:"",group:""}),se=q=>{d(q.rules),o(q.providers),p(ce=>ce??q.providers[0]?.id??null)};H.useEffect(()=>{let q=!1;return Ay().then(ce=>!q&&se(ce)).catch(ce=>!q&&N(ce.message)),()=>{q=!0}},[]);const G=f.find(q=>q.id===v)??null,L=async(q,ce)=>{b(q),N(null);try{se(await ce())}catch(we){N(we.message)}finally{b(null)}},P=(q,ce)=>G&&L(q.id,()=>zy(G.id,q.id,ce)),le=()=>G&&L("__all",()=>lh(G.id,c?.map(q=>q.id)??[])),ve=()=>G&&L("__clear",()=>lh(G.id,[])),F=q=>{const ce=B[q.id];ce==null||ce===q.fake||L(`fake:${q.id}`,()=>_y(q.id,ce)).then(()=>k(we=>{const Me={...we};return delete Me[q.id],Me}))},V=()=>{const q=Ry(w.label);if(!q||!w.pattern||!w.fake){N("Custom credential needs a name, a pattern, and a fake value.");return}const ce={id:q,label:w.label,pattern:w.pattern,fake:w.fake,...w.group.trim()?{group:Number(w.group)}:{}};L("__custom",()=>My(ce)).then(()=>{ee({label:"",pattern:"",fake:"",group:""}),C(!1)})};return n.jsxs("section",{className:"mask-panel",children:[n.jsxs("div",{className:"mask-head",children:[n.jsx("h2",{className:"mask-title",children:"Credential masking"}),n.jsx("span",{className:"mask-sub",children:"Off by default. Pick a provider and turn on the credential types to de-identify — they're swapped for real-looking fakes before the request reaches that provider, then restored in the response, so the provider (or an API relay) never sees the real value."})]}),j&&n.jsxs("div",{className:"error",children:["Error: ",j]}),c==null?n.jsx("div",{className:"loading",children:"Loading…"}):f.length===0?n.jsxs("div",{className:"empty",children:[n.jsx("p",{children:"No providers yet."}),n.jsx("p",{className:"hint",children:"Add a provider (Routing) or launch an agent to register an upstream."})]}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"mask-provider-row",children:[n.jsx("label",{className:"mask-provider-label",htmlFor:"mask-provider",children:"Provider"}),n.jsx("select",{id:"mask-provider",className:"mask-provider-select",value:v??"",onChange:q=>p(q.target.value),children:f.map(q=>n.jsxs("option",{value:q.id,children:[q.label,q.baseUrl?` — ${q.baseUrl}`:""," (",q.enabled.length," on)"]},q.id))}),n.jsxs("div",{className:"mask-bulk",children:[n.jsx("button",{type:"button",className:"btn-small",disabled:T!=null,onClick:le,children:"Select all"}),n.jsx("button",{type:"button",className:"btn-small",disabled:T!=null,onClick:ve,children:"Clear"})]})]}),n.jsxs("table",{className:"runs mask-table",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{children:"On"}),n.jsx("th",{children:"Credential"}),n.jsx("th",{children:"Matches"}),n.jsx("th",{children:"Replaced with (editable)"}),n.jsx("th",{})]})}),n.jsx("tbody",{children:c.map(q=>{const ce=G?.enabled.includes(q.id)??!1,we=B[q.id]??q.fake;return n.jsxs("tr",{className:ce?"":"mask-off",children:[n.jsx("td",{children:n.jsx("label",{className:"toggle",children:n.jsx("input",{type:"checkbox",checked:ce,disabled:T!=null||!G,onChange:Me=>{P(q,Me.target.checked)}})})}),n.jsxs("td",{children:[q.label,q.custom&&n.jsx("span",{className:"mask-badge",children:"custom"})]}),n.jsx("td",{className:"mask-desc",children:q.custom?n.jsxs("code",{className:"mask-pat",children:["/",q.pattern,"/"]}):q.description}),n.jsx("td",{children:n.jsx("input",{className:"mask-fake-input",value:we,spellCheck:!1,onChange:Me=>k(Te=>({...Te,[q.id]:Me.target.value})),onBlur:()=>F(q),onKeyDown:Me=>Me.key==="Enter"&&F(q)})}),n.jsx("td",{children:q.custom&&n.jsx("button",{type:"button",className:"btn-small btn-danger",disabled:T!=null,onClick:()=>{L(`del:${q.id}`,()=>Cy(q.id))},children:"Remove"})})]},q.id)})})]}),Q?n.jsxs("div",{className:"mask-add-form",children:[n.jsx("input",{placeholder:"Name (e.g. Internal token)",value:w.label,onChange:q=>ee({...w,label:q.target.value})}),n.jsx("input",{placeholder:"Regex pattern (e.g. INT-[0-9]{8})",value:w.pattern,spellCheck:!1,onChange:q=>ee({...w,pattern:q.target.value})}),n.jsx("input",{placeholder:"Fake value to substitute",value:w.fake,spellCheck:!1,onChange:q=>ee({...w,fake:q.target.value})}),n.jsx("input",{className:"mask-group-input",placeholder:"group #",value:w.group,onChange:q=>ee({...w,group:q.target.value})}),n.jsx("button",{type:"button",className:"btn-small btn-primary",disabled:T!=null,onClick:V,children:"Add"}),n.jsx("button",{type:"button",className:"btn-small",onClick:()=>C(!1),children:"Cancel"})]}):n.jsx("button",{type:"button",className:"btn-small",onClick:()=>C(!0),children:"+ Add credential type"})]})]})}const th={high:0,warn:1,info:2};function ky(c){if(c==null)return"";if(typeof c=="string")return c;try{return JSON.stringify(c)}catch{return String(c)}}function qy(){const[c,d]=H.useState(null),[f,o]=H.useState(null);H.useEffect(()=>{let j=!1;const N=async()=>{try{const b=await gh({limit:200});j||(d(b),o(null))}catch(b){j||o(b.message)}};N();const T=setInterval(N,6e3);return()=>{j=!0,clearInterval(T)}},[]);const v=c?.findings.reduce((j,N)=>(j[N.severity]=(j[N.severity]??0)+1,j),{})??{},p=[...c?.findings??[]].sort((j,N)=>(th[j.severity]??9)-(th[N.severity]??9)||N.ts-j.ts);return n.jsxs("div",{className:"guard",children:[n.jsx(Hy,{}),n.jsx("h2",{className:"mask-title guard-findings-title",children:"Risk findings"}),f&&!c?n.jsxs("div",{className:"error",children:["Error: ",f]}):c?c.findings.length===0?n.jsxs("div",{className:"empty",children:[n.jsx("p",{children:"No risk findings."}),n.jsx("p",{className:"hint",children:"The detector pipeline (secret-leak, dangerous-shell) runs over every captured packet. Findings show up here as agents pull in untrusted content."})]}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"guard-summary",children:["high","warn","info"].map(j=>n.jsxs("span",{className:`sev-pill sev-${j}`,children:[v[j]??0," ",j]},j))}),n.jsxs("table",{className:"runs",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{children:"Severity"}),n.jsx("th",{children:"Detector"}),n.jsx("th",{children:"Agent"}),n.jsx("th",{children:"Kind"}),n.jsx("th",{children:"When"}),n.jsx("th",{children:"Detail"}),n.jsx("th",{children:"Run"})]})}),n.jsx("tbody",{children:p.map(j=>n.jsxs("tr",{onClick:()=>{window.location.hash=`#/run/${encodeURIComponent(j.runId)}`},children:[n.jsx("td",{children:n.jsx("span",{className:`sev-pill sev-${j.severity}`,children:j.severity})}),n.jsx("td",{children:j.tag}),n.jsx("td",{children:j.agent}),n.jsx("td",{children:j.kind}),n.jsx("td",{children:n.jsx(lt,{ms:j.ts})}),n.jsx("td",{className:"guard-detail",children:ky(j.detail)}),n.jsx("td",{children:n.jsx("code",{children:Ua(j.runId)})})]},`${j.actionId}-${j.tag}`))})]})]}):n.jsx("div",{className:"loading",children:"Loading…"})]})}function By(c){return!c||c.kind==="passthrough"?"passthrough (no model swap)":c.kind==="composite"?`fusion: ${c.comboId}`:c.members.map(d=>d.modelId).join(" → ")}function Ji(c){return(c.tokensIn??0)+(c.tokensOut??0)}function Yy(){const[c,d]=H.useState(null),[f,o]=H.useState(null),[v,p]=H.useState(null),[j,N]=H.useState(null),[T,b]=H.useState(null),[B,k]=H.useState(null);if(H.useEffect(()=>{let w=!1;const ee=async()=>{try{const[G,L,P,le,ve]=await Promise.all([mh(),Oa(),vh(),gh({limit:200}),hh({limit:200})]);w||(d(G),o(L),p(P),N(le),b(ve.rows),k(null))}catch(G){w||k(G.message)}};ee();const se=setInterval(ee,15e3);return()=>{w=!0,clearInterval(se)}},[]),B)return n.jsxs("div",{className:"error",children:["Error: ",B]});if(!c||!f||!v||!j||!T)return n.jsx("div",{className:"loading",children:"Loading…"});const Q=new Map;for(const w of c.entries)w.drifted&&Q.set(w.agent,!0);const C=T.reduce((w,ee)=>w==null||Ji(ee)>Ji(w)?ee:w,null);return n.jsxs("div",{className:"home",children:[n.jsxs("section",{className:"home-hero",children:[n.jsx("h1",{children:"afw"}),n.jsxs("p",{className:"home-sub",children:["An AI agent firewall on the wire. Every call your agents make is captured here —",n.jsx("strong",{children:" see"})," it, ",n.jsx("strong",{children:"route"})," it to the model you pick, and",n.jsx("strong",{children:" guard"})," the untrusted content tool calls pull in."]})]}),n.jsxs("div",{className:"home-grid",children:[n.jsxs("a",{className:"home-card",href:"#/tasks",children:[n.jsx("div",{className:"home-card-num",children:c.wiredAgents.length}),n.jsxs("div",{className:"home-card-label",children:["agent",c.wiredAgents.length===1?"":"s"," wired"]}),n.jsx("div",{className:"home-card-cta",children:"See tasks →"})]}),n.jsxs("a",{className:"home-card",href:"#/routing",children:[n.jsx("div",{className:"home-card-num",children:f.models.length}),n.jsxs("div",{className:"home-card-label",children:["models · ",f.providers.length," provider",f.providers.length===1?"":"s"]}),n.jsx("div",{className:"home-card-cta",children:"Routing →"})]}),n.jsxs("a",{className:"home-card",href:"#/guard",children:[n.jsx("div",{className:"home-card-num",children:j.total}),n.jsxs("div",{className:"home-card-label",children:["risk finding",j.total===1?"":"s"]}),n.jsx("div",{className:"home-card-cta",children:"Guard →"})]}),C&&Ji(C)>0&&n.jsxs("a",{className:"home-card",href:`#/task/${encodeURIComponent(C.id)}`,children:[n.jsx("div",{className:"home-card-num",children:Oc(Ji(C))}),n.jsxs("div",{className:"home-card-label",children:["tokens · heaviest task",n.jsx("br",{}),n.jsxs("span",{className:"muted",children:[C.title??Ua(C.id),C.model?` · ${C.model}`:""]})]}),n.jsx("div",{className:"home-card-cta",children:"Open task →"})]})]}),n.jsxs("section",{className:"home-section",children:[n.jsx("h2",{children:"Wired agents"}),c.wiredAgents.length===0?n.jsxs("div",{className:"empty",children:[n.jsx("p",{children:"No agents wired yet."}),n.jsxs("p",{className:"hint",children:["Launch one through afw — e.g. ",n.jsx("code",{children:"afw claude"}),". afw never edits the agent's own config; it taps the wire per launch."]})]}):n.jsxs("table",{className:"kv-table",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{children:"Agent"}),n.jsx("th",{children:"Routes to"}),n.jsx("th",{children:"Config"})]})}),n.jsx("tbody",{children:c.wiredAgents.map(w=>n.jsxs("tr",{children:[n.jsx("td",{children:w}),n.jsx("td",{children:By(v.policy.agents[`${w}/*`]?.target)}),n.jsx("td",{children:Q.get(w)?n.jsx("span",{className:"run-error-badge",children:"drifted"}):n.jsx("span",{className:"muted",children:"untouched"})})]},w))})]})]})]})}const eu="__unset__";function wy(c,d){return c.find(f=>f.id===d)?.label??d}function Gy(c){if(!c||c.kind==="passthrough")return eu;if(c.kind==="composite")return`c:${c.comboId}`;if(c.kind==="chain"&&c.members[0]){const d=c.members[0];return`m:${d.providerId??""}/${d.modelId}`}return eu}function jh({value:c}){const[d,f]=H.useState(!1);return n.jsx("button",{type:"button",className:"muted",onClick:()=>{navigator.clipboard?.writeText(c).then(()=>{f(!0),setTimeout(()=>f(!1),1200)})},children:d?"copied":"copy"})}function Ly({conn:c,token:d}){const f=[["Base URL (OpenAI)",c.baseUrl],["Base URL (Anthropic)",c.anthropicBaseUrl],["API key",d]];return n.jsx("div",{className:"card",children:n.jsx("table",{className:"kv-table",children:n.jsxs("tbody",{children:[f.map(([o,v])=>n.jsxs("tr",{children:[n.jsx("td",{children:o}),n.jsx("td",{children:n.jsx("code",{children:v})}),n.jsx("td",{className:"row-actions",children:n.jsx(jh,{value:v})})]},o)),n.jsxs("tr",{children:[n.jsx("td",{children:"Model names"}),n.jsx("td",{children:c.modelNames.map((o,v)=>n.jsxs("span",{children:[v>0&&" · ",n.jsx("code",{children:o.name})]},o.tier))}),n.jsx("td",{})]})]})})})}function Xy(){const[c,d]=H.useState(null),[f,o]=H.useState(null),[v,p]=H.useState(null),[j,N]=H.useState([]),[T,b]=H.useState([]),[B,k]=H.useState([]),[Q,C]=H.useState(null),[w,ee]=H.useState(!1),[se,G]=H.useState("default"),L=H.useCallback(async()=>{try{const[F,V,q]=await Promise.all([oy(),hy(),Oa()]);d(F.tiers),o(F.connection),p(V.keys),N(q.models),b(q.providers),k(q.combos),C(null)}catch(F){C(F.message)}},[]);H.useEffect(()=>{L()},[L]);const P=async F=>{ee(!0);try{await F(),await L(),C(null)}catch(V){C(V.message)}finally{ee(!1)}},le=(F,V)=>P(async()=>{if(V===eu){await fy(F);return}if(V.startsWith("c:")){await Ff(F,{kind:"composite",comboId:V.slice(2)});return}const q=V.slice(2),ce=q.indexOf("/"),we=q.slice(0,ce),Te={kind:"chain",members:[{modelId:q.slice(ce+1),...we?{providerId:we}:{}}]};await Ff(F,Te)});if(!c||!f||!v)return n.jsx("div",{className:"hint",children:Q?`Error: ${Q}`:"Loading…"});const ve=j.length===0;return n.jsxs("div",{children:[Q&&n.jsx("div",{className:"error",children:Q}),n.jsxs("section",{className:"home-section",children:[n.jsx("h2",{children:"Models"}),n.jsx("p",{className:"hint",children:"afw exposes three fixed model names, low → high. Map each to one of your configured models (or a Fusion combo); agents request these names and afw routes to your choice."}),ve?n.jsxs("p",{className:"hint",children:["Register a model first on the ",n.jsx("a",{href:"#/routing",children:"Routing"})," tab (or"," ",n.jsx("code",{children:"afw model add"}),")."]}):n.jsxs("table",{className:"kv-table",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{children:"Model name"}),n.jsx("th",{children:"Maps to"})]})}),n.jsx("tbody",{children:c.map(F=>n.jsxs("tr",{children:[n.jsx("td",{children:n.jsx("code",{children:F.display})}),n.jsx("td",{children:n.jsxs("select",{value:Gy(F.target),disabled:w,onChange:V=>{le(F.tier,V.target.value)},children:[n.jsx("option",{value:eu,children:"— not mapped —"}),B.length>0&&n.jsx("optgroup",{label:"Model Fusion",children:B.map(V=>n.jsx("option",{value:`c:${V.id}`,children:V.label},V.id))}),n.jsx("optgroup",{label:"Models",children:j.map(V=>n.jsxs("option",{value:`m:${V.providerId}/${V.id}`,children:[V.id," (",wy(T,V.providerId),")"]},`${V.providerId}/${V.id}`))})]})})]},F.tier))})]})]}),n.jsxs("section",{className:"home-section",children:[n.jsx("h2",{children:"API keys"}),n.jsxs("p",{className:"hint",children:["An API key is an auth token. Point your OpenAI/Anthropic-compatible agent at the base URL below with a key, and request one of the three model names. Claude Code / Codex need no key — run ",n.jsx("code",{children:"afw claude"})," or ",n.jsx("code",{children:"afw codex"}),"."]}),n.jsx(Ly,{conn:f,token:v[0]?.token??"(create a key below)"}),v.length===0?n.jsx("p",{className:"hint",children:"No keys yet — create one below."}):n.jsxs("table",{className:"kv-table",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{children:"Agent"}),n.jsx("th",{children:"Label"}),n.jsx("th",{children:"Token"}),n.jsx("th",{children:"Last used"}),n.jsx("th",{})]})}),n.jsx("tbody",{children:v.map(F=>n.jsxs("tr",{children:[n.jsx("td",{children:F.instance?`${F.agent}@${F.instance}`:F.agent}),n.jsx("td",{children:F.label}),n.jsx("td",{children:n.jsx("code",{children:F.token})}),n.jsx("td",{children:F.lastUsedAt?new Date(F.lastUsedAt).toLocaleString():"never"}),n.jsxs("td",{className:"row-actions",children:[n.jsx(jh,{value:F.token}),n.jsx("button",{type:"button",className:"btn-danger",disabled:w,onClick:()=>{P(()=>vy(F.id))},children:"revoke"})]})]},F.id))})]}),n.jsxs("form",{className:"add-form",onSubmit:F=>{F.preventDefault(),P(async()=>{await my(se.trim()||"default")})},children:[n.jsxs("label",{children:["Label",n.jsx("input",{value:se,onChange:F=>G(F.target.value),disabled:w})]}),n.jsx("button",{type:"submit",className:"primary",disabled:w,children:"Create key"})]})]})]})}const ah=c=>`${c.providerId??""}/${c.modelId}`,Qy=c=>(c.input??["text"]).includes("image"),et=c=>`${encodeURIComponent(c.providerId??"")}/${encodeURIComponent(c.modelId)}`;function Ca(c){const d=c.indexOf("/"),f=decodeURIComponent(c.slice(0,d));return{modelId:decodeURIComponent(c.slice(d+1)),...f?{providerId:f}:{}}}function Zy(c){return c&&typeof c=="object"&&"rollingHours"in c?"5h":c==="month"?"month":"day"}function Ky(c){const d=c.switchOn?.find(v=>v.kind==="tokens"),f=c.switchOn?.find(v=>v.kind==="quota-pct"),o=f?"quota-pct":d?"tokens":"none";return{modelId:c.modelId,...c.providerId?{providerId:c.providerId}:{},...c.fallback?{fallback:c.fallback}:{},limitKind:o,tokenLimit:d&&"tokenLimit"in d?d.tokenLimit:0,period:d&&"period"in d?Zy(d.period):"5h",usedPct:f&&"usedPct"in f?f.usedPct:0,onError:c.switchOn?.some(v=>v.kind==="error")??!0}}function Vy({models:c,providers:d,toolProviders:f,editing:o,busy:v,onSubmit:p,onCancel:j}){const[N,T]=H.useState(o?.label??""),[b,B]=H.useState(o?.panel.map(Ky)??[]),[k,Q]=H.useState(o?.vision?et(o.vision):""),[C,w]=H.useState(o?.webSearch?.providerId??""),[ee,se]=H.useState(o?.judge?et(o.judge):""),[G,L]=H.useState(o?.synthesizer?et(o.synthesizer):""),[P,le]=H.useState(o?.cheapModel?et(o.cheapModel):""),ve=R=>R&&d.find(z=>z.id===R)?.label||R||"—",F=R=>!!R&&d.find(z=>z.id===R)?.auth?.kind==="agent-oauth",V=R=>F(R)?"quota-pct":"tokens",q=new Set(b.map(ah)),ce=c.filter(R=>!q.has(`${R.providerId}/${R.id}`)),we=c.filter(Qy),Me=f.filter(R=>R.kind==="web_search"),Te=(R,z)=>B(b.map((m,Y)=>Y===R?{...m,...z}:m)),_l=()=>{!N.trim()||b.length===0||p({...o?{id:o.id}:{},label:N.trim(),panel:b.map(R=>{const z=[];if(R.fallback){if(R.limitKind==="tokens"&&R.tokenLimit>0){const m=R.period==="5h"?{rollingHours:5}:R.period;z.push({kind:"tokens",tokenLimit:R.tokenLimit,period:m})}else R.limitKind==="quota-pct"&&R.usedPct>0&&z.push({kind:"quota-pct",usedPct:R.usedPct});R.onError&&z.push({kind:"error"})}return{modelId:R.modelId,...R.providerId?{providerId:R.providerId}:{},...z.length>0?{switchOn:z}:{},...R.fallback?{fallback:R.fallback}:{}}}),...k?{vision:Ca(k)}:{},...C?{webSearch:{providerId:C}}:{},...ee?{judge:Ca(ee)}:{},...G?{synthesizer:Ca(G)}:{},...P?{cheapModel:Ca(P)}:{}})},Qe=c.map(R=>n.jsxs("option",{value:et({modelId:R.id,providerId:R.providerId}),children:[R.id," (",ve(R.providerId),")"]},`${R.providerId}/${R.id}`));return n.jsxs("div",{className:"combo-editor",children:[n.jsxs("div",{className:"combo-row",children:[n.jsx("span",{className:"combo-label",children:"Name"}),n.jsx("input",{placeholder:"fusion name (e.g. frontier-panel)",value:N,onChange:R=>T(R.target.value)})]}),n.jsxs("div",{className:"combo-row combo-row-top",children:[n.jsxs("span",{className:"combo-label",children:["Panel",n.jsx("div",{className:"dim",children:"these models all answer in parallel — diversity is the point"})]}),n.jsxs("div",{className:"fallback-edit",children:[b.map((R,z)=>n.jsxs("div",{className:"fusion-member",children:[n.jsxs("div",{className:"fallback-row",children:[n.jsxs("span",{children:[n.jsx("code",{children:R.modelId})," ",n.jsxs("span",{className:"dim",children:["(",ve(R.providerId),")"]})]}),n.jsx("button",{type:"button",className:"btn-small",disabled:v,onClick:()=>B(b.filter((m,Y)=>Y!==z)),children:"×"})]}),n.jsxs("div",{className:"fusion-member-caps",children:[n.jsxs("label",{className:"fusion-cap",children:[n.jsx("span",{className:"dim",children:"fallback"}),n.jsxs("select",{disabled:v,value:R.fallback?et(R.fallback):"",onChange:m=>Te(z,{fallback:m.target.value?Ca(m.target.value):void 0}),children:[n.jsx("option",{value:"",children:"none"}),c.filter(m=>!(m.id===R.modelId&&m.providerId===R.providerId)).map(m=>n.jsxs("option",{value:et({modelId:m.id,providerId:m.providerId}),children:[m.id," (",ve(m.providerId),")"]},`${m.providerId}/${m.id}`))]})]}),R.fallback?n.jsxs(n.Fragment,{children:[n.jsxs("label",{className:"fusion-cap",children:[n.jsx("span",{className:"dim",children:"switch when"}),n.jsxs("select",{disabled:v,value:R.limitKind,onChange:m=>Te(z,{limitKind:m.target.value}),children:[n.jsx("option",{value:"none",children:"never (only on failure)"}),n.jsx("option",{value:"tokens",children:"over token cap"}),n.jsx("option",{value:"quota-pct",children:"over subscription %"})]})]}),R.limitKind==="tokens"?n.jsxs(n.Fragment,{children:[n.jsx("label",{className:"fusion-cap",children:n.jsx("input",{type:"number",min:0,step:1e5,placeholder:"tokens",style:{width:"7rem"},disabled:v,value:R.tokenLimit||"",onChange:m=>Te(z,{tokenLimit:Number.parseInt(m.target.value,10)||0})})}),n.jsx("label",{className:"fusion-cap",children:n.jsxs("select",{disabled:v,value:R.period,onChange:m=>Te(z,{period:m.target.value}),children:[n.jsx("option",{value:"5h",children:"/ 5h"}),n.jsx("option",{value:"day",children:"/ day"}),n.jsx("option",{value:"month",children:"/ month"})]})})]}):null,R.limitKind==="quota-pct"?n.jsxs("label",{className:"fusion-cap",children:[n.jsx("input",{type:"number",min:1,max:100,step:5,placeholder:"80",style:{width:"4.5rem"},disabled:v,value:R.usedPct||"",onChange:m=>Te(z,{usedPct:Number.parseInt(m.target.value,10)||0})}),n.jsx("span",{className:"dim",children:"% of 5h quota used"})]}):null,n.jsxs("label",{className:"fusion-cap",children:[n.jsx("input",{type:"checkbox",disabled:v,checked:R.onError,onChange:m=>Te(z,{onError:m.target.checked})})," ",n.jsx("span",{className:"dim",children:"on failure"})]})]}):null]})]},ah(R))),ce.length>0&&n.jsxs("select",{disabled:v,value:"",onChange:R=>{if(!R.target.value)return;const z=Ca(R.target.value);B([...b,{...z,limitKind:V(z.providerId),tokenLimit:0,period:"5h",usedPct:0,onError:!0}])},children:[n.jsx("option",{value:"",children:"+ add panel model…"}),ce.map(R=>n.jsxs("option",{value:et({modelId:R.id,providerId:R.providerId}),children:[R.id," (",ve(R.providerId),")"]},`${R.providerId}/${R.id}`))]})]})]}),n.jsxs("div",{className:"combo-row",children:[n.jsxs("span",{className:"combo-label",children:["Multimodal",n.jsx("div",{className:"dim",children:"one model that describes images for any text-only panel member — skip it if the panel is already multimodal"})]}),n.jsxs("select",{disabled:v,value:k,onChange:R=>Q(R.target.value),children:[n.jsx("option",{value:"",children:"none"}),we.map(R=>n.jsxs("option",{value:et({modelId:R.id,providerId:R.providerId}),children:[R.id," (",ve(R.providerId),")"]},`${R.providerId}/${R.id}`))]})]}),n.jsxs("div",{className:"combo-row",children:[n.jsxs("span",{className:"combo-label",children:["Web search",n.jsx("div",{className:"dim",children:"fulfills the panel's web_search calls (Anthropic clients)"})]}),n.jsxs("select",{disabled:v,value:C,onChange:R=>w(R.target.value),children:[n.jsx("option",{value:"",children:"none"}),Me.map(R=>n.jsxs("option",{value:R.id,children:[R.label," (",R.backend,")"]},R.id))]})]}),n.jsxs("div",{className:"combo-row",children:[n.jsxs("span",{className:"combo-label",children:["Synthesizer",n.jsxs("div",{className:"dim",children:["Writes the final answer from the judge's notes. Most of fusion's quality gain comes from this step — ",n.jsx("strong",{children:"use your strongest model here"}),"."]})]}),n.jsxs("select",{disabled:v,value:G,onChange:R=>L(R.target.value),children:[n.jsx("option",{value:"",children:"default — the first panel model"}),Qe]})]}),n.jsxs("div",{className:"combo-row",children:[n.jsxs("span",{className:"combo-label",children:["Judge",n.jsx("div",{className:"dim",children:"Organizes the panel's answers into structured notes (consensus, contradictions, blind spots) — it doesn't write the answer, so a solid mid-tier model is plenty."})]}),n.jsxs("select",{disabled:v,value:ee,onChange:R=>se(R.target.value),children:[n.jsx("option",{value:"",children:"default — same model as the synthesizer"}),Qe]})]}),n.jsxs("div",{className:"combo-row",children:[n.jsxs("span",{className:"combo-label",children:["Cheap model",n.jsx("div",{className:"dim",children:"For the simple, high-volume work routed here — Claude Code subagents and hermes/openclaw cron jobs. These skip the panel and go straight to this one model."})]}),n.jsxs("select",{disabled:v,value:P,onChange:R=>le(R.target.value),children:[n.jsx("option",{value:"",children:"none — every request runs the full fusion"}),Qe]})]}),n.jsxs("div",{className:"combo-actions",children:[n.jsx("button",{type:"button",className:"btn-small btn-primary",disabled:v||!N.trim()||b.length===0,onClick:_l,children:o?"save changes":"create fusion"}),n.jsx("button",{type:"button",className:"btn-small",disabled:v,onClick:j,children:"cancel"})]})]})}function Jy(){const[c,d]=H.useState(null),[f,o]=H.useState([]),[v,p]=H.useState(null),[j,N]=H.useState(!1),[T,b]=H.useState(void 0),B=H.useCallback(async()=>{try{const[L,P]=await Promise.all([Oa(),yh()]);d(L),o(P.providers),p(null)}catch(L){p(L.message)}},[]);H.useEffect(()=>{B()},[B]);const k=async L=>{N(!0);try{await L(),await B()}catch(P){p(P.message)}finally{N(!1)}},Q=L=>{k(async()=>{await xy(L),b(void 0)})};if(v&&!c)return n.jsxs("div",{className:"error",children:["Error: ",v]});if(!c)return n.jsx("div",{className:"loading",children:"Loading…"});const{providers:C,models:w,combos:ee}=c,se=L=>L.panel.map(P=>P.fallback?`${P.modelId}→${P.fallback.modelId}`:P.modelId).join(" + "),G=L=>{const P=L.judge?.modelId??"synthesizer",le=L.synthesizer?.modelId??L.panel[0]?.modelId??"—",ve=[];return L.vision&&ve.push(`vision: ${L.vision.modelId}`),L.webSearch&&ve.push("web search"),`judge: ${P} → synth: ${le}${ve.length?` · ${ve.join(" · ")}`:""}`};return n.jsxs("div",{children:[v&&n.jsx("div",{className:"error inline",children:v}),n.jsxs("section",{className:"home-section",children:[n.jsx("h2",{children:"Model Fusion"}),n.jsxs("p",{className:"hint",children:["Diversity beats any one model. A fusion turns one request into a small deliberation across"," ",n.jsx("em",{children:"your"})," providers, on your wire — then hands your agent a single answer. Assign a fusion to an agent on the ",n.jsx("strong",{children:"Routes"})," tab."]}),n.jsxs("div",{className:"fusion-how",children:[n.jsxs("div",{className:"fusion-flow",children:[n.jsxs("div",{className:"fusion-step",children:[n.jsx("div",{className:"fusion-step-n",children:"1"}),n.jsx("strong",{children:"Panel"}),n.jsxs("p",{children:["Your models all answer the same prompt ",n.jsx("em",{children:"in parallel"}),". Each can fail over to a backup on a token cap or error; one multimodal companion lets a text-only model join an image prompt."]})]}),n.jsx("div",{className:"fusion-arrow","aria-hidden":"true",children:"→"}),n.jsxs("div",{className:"fusion-step",children:[n.jsx("div",{className:"fusion-step-n",children:"2"}),n.jsx("strong",{children:"Judge"}),n.jsx("p",{children:"Reads every answer and distils structured notes — consensus, contradictions, unique insights, blind spots. It organizes; it doesn't write the answer, so a mid-tier model is plenty."})]}),n.jsx("div",{className:"fusion-arrow","aria-hidden":"true",children:"→"}),n.jsxs("div",{className:"fusion-step fusion-step-key",children:[n.jsx("div",{className:"fusion-step-n",children:"3"}),n.jsx("strong",{children:"Synthesize"}),n.jsxs("p",{children:["Writes the single best final answer, grounded in those notes. Most of the quality gain is here — ",n.jsx("strong",{children:"give it your strongest model"}),"."]})]})]}),n.jsx("p",{className:"hint",children:"Your agent sees one normal response. Cost = the sum of every call; latency = the slowest panel model + judge + synthesizer."})]}),ee.length===0?n.jsx("p",{className:"hint",children:"No fusion models yet — create one below."}):n.jsxs("table",{className:"kv-table",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{children:"Name"}),n.jsx("th",{children:"Panel"}),n.jsx("th",{children:"Pipeline"}),n.jsx("th",{})]})}),n.jsx("tbody",{children:ee.map(L=>n.jsxs("tr",{children:[n.jsxs("td",{children:[n.jsx("span",{className:"reg-name",children:L.label}),n.jsx("span",{className:"reg-id",children:L.id})]}),n.jsx("td",{children:se(L)}),n.jsx("td",{className:"dim",children:G(L)}),n.jsxs("td",{className:"row-actions",children:[n.jsx("button",{type:"button",className:"btn-plain",disabled:j,onClick:()=>b(L),children:"edit"}),n.jsx("button",{type:"button",className:"btn-danger",disabled:j,onClick:()=>{k(()=>by(L.id))},children:"remove"})]})]},L.id))})]}),T!==void 0?n.jsx(Vy,{models:w,providers:C,toolProviders:f,editing:T,busy:j,onSubmit:Q,onCancel:()=>b(void 0)}):n.jsx("button",{type:"button",className:"btn-small",disabled:w.length===0,onClick:()=>b(null),children:"+ New fusion model"}),w.length===0&&n.jsxs("p",{className:"hint",children:["Add some models on the ",n.jsx("strong",{children:"Models"})," tab first."]})]})]})}const $y=["anthropic-messages","openai-chat","openai-responses"],Wy=["passthrough","bearer","api-key"],Fy=["text","image","pdf","audio","video"],Iy=[{value:"versioned",label:"versioned (/v1/...)"},{value:"direct",label:"direct (/...)"}],nh=["minimal","low","medium","high","xhigh"],ih={name:"",baseUrl:"",api:"openai-chat",authKind:"bearer",authHeader:"x-api-key",apiKey:"",generationPath:"versioned",reasoningEffort:""},$i={id:"",input:["text"],window:0,showWindow:!1,reasoningEffort:""},Wi=c=>c.label||c.id;function Py(){const[c,d]=H.useState(null),[f,o]=H.useState(null),[v,p]=H.useState(!1),[j,N]=H.useState(ih),[T,b]=H.useState(null),[B,k]=H.useState(null),[Q,C]=H.useState($i),[w,ee]=H.useState(null),[se,G]=H.useState(null),L=H.useRef(null),P=H.useCallback(async()=>{try{d(await Oa()),o(null)}catch(m){o(m.message)}},[]);H.useEffect(()=>{P()},[P]),H.useEffect(()=>{B&&L.current?.focus()},[B]);const le=async m=>{p(!0);try{await m(),await P()}catch(Y){o(Y.message)}finally{p(!1)}},ve=()=>{N(ih),b(null)},F=m=>{k(m),C($i),ee(null),G(null)},V=m=>{b(m.id),N({name:Wi(m),id:m.id,baseUrl:m.baseUrl,api:m.api,authKind:m.auth?.kind??"bearer",authHeader:m.auth?.header??"x-api-key",apiKey:"",generationPath:m.generationPath??"versioned",reasoningEffort:m.reasoningEffort??""})},q=m=>{if(m.preventDefault(),!j.name.trim()||!j.baseUrl.trim())return o("provider name and base URL are required");const Y=!T,Z=j.name.trim();p(!0),(async()=>{try{await py({name:Z,...T?{id:T}:{},baseUrl:j.baseUrl.trim(),api:j.api,authKind:j.authKind,...j.authKind==="api-key"?{authHeader:j.authHeader}:{},...j.authKind!=="passthrough"?{apiKey:j.apiKey}:{},...j.generationPath==="direct"?{generationPath:j.generationPath}:{},...j.reasoningEffort?{reasoningEffort:j.reasoningEffort}:{}});const te=await Oa();if(d(te),o(null),ve(),Y){const y=te.providers.find(D=>(D.label||D.id)===Z)??te.providers[te.providers.length-1];y&&F(y.id)}}catch(te){o(te.message)}finally{p(!1)}})()},ce=async m=>{p(!0),o(null);try{const Y=await jy({baseUrl:m.baseUrl,api:m.api,authKind:m.auth?.kind??"passthrough",...m.auth?.header?{authHeader:m.auth.header}:{},providerId:m.id});G({models:Y,picked:new Set})}catch(Y){o(Y.message)}finally{p(!1)}},we=m=>{if(!se)return;const{models:Y,picked:Z}=se;le(async()=>{for(const te of Y)Z.has(te.id)&&await eh({id:te.id,providerId:m,label:te.label??te.id,input:["text"]});G(null)})},Me=m=>C(Y=>{const te=Y.input.includes(m)?Y.input.filter(y=>y!==m):[...Y.input,m];return{...Y,input:te.length?te:["text"]}}),Te=m=>{ee(m.id),C({id:m.id,input:m.input?.length?m.input:["text"],window:m.contextWindow??0,showWindow:!!m.contextWindow,reasoningEffort:m.reasoningEffort??""}),L.current?.focus()},_l=m=>{const Y=Q.id.trim();if(!Y)return o("a model name is required");le(async()=>{await eh({id:Y,...w&&w!==Y?{previousId:w}:{},providerId:m,label:Y,input:Q.input,...Q.window>0?{contextWindow:Q.window}:{},...Q.reasoningEffort?{reasoningEffort:Q.reasoningEffort}:{}}),C($i),ee(null),L.current?.focus()})};if(f&&!c)return n.jsxs("div",{className:"error",children:["Error: ",f]});if(!c)return n.jsx("div",{className:"loading",children:"Loading…"});const{providers:Qe,models:R}=c,z=m=>R.filter(Y=>Y.providerId===m);if(B){const m=Qe.find(Z=>Z.id===B);if(!m)return k(null),n.jsx("div",{className:"loading",children:"…"});const Y=z(m.id);return n.jsxs("div",{children:[f&&n.jsx("div",{className:"error inline",children:f}),n.jsxs("section",{className:"home-section",children:[n.jsx("div",{className:"detail-back",children:n.jsx("button",{type:"button",className:"btn-plain",onClick:()=>k(null),children:"← all providers"})}),n.jsxs("h2",{children:["Models for ",n.jsx("code",{children:Wi(m)})]}),n.jsxs("p",{className:"hint",children:["A provider isn't usable until it has models. Pull its catalog with"," ",n.jsx("strong",{children:"List models"}),", or add them by hand — then finish."]}),Y.length===0?n.jsx("div",{className:"flash",children:"No models yet — list the catalog or add one below."}):n.jsxs("table",{className:"kv-table",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{children:"Model"}),n.jsx("th",{children:"Modalities"}),n.jsx("th",{children:"Window"}),n.jsx("th",{children:"Effort"}),n.jsx("th",{})]})}),n.jsx("tbody",{children:Y.map(Z=>n.jsxs("tr",{children:[n.jsx("td",{children:n.jsx("code",{children:Z.id})}),n.jsx("td",{children:(Z.input??["text"]).join(", ")}),n.jsx("td",{children:Z.contextWindow?`${Math.round(Z.contextWindow/1024)}k`:"—"}),n.jsx("td",{children:Z.reasoningEffort??n.jsx("span",{className:"dim",children:m.reasoningEffort?`provider ${m.reasoningEffort}`:"default"})}),n.jsxs("td",{className:"row-actions",children:[n.jsx("button",{type:"button",className:"btn-plain",disabled:v,onClick:()=>Te(Z),children:"edit"}),n.jsx("button",{type:"button",className:"btn-danger",disabled:v,onClick:()=>{le(()=>Sy(Z.id,m.id))},children:"remove"})]})]},Z.id))})]}),n.jsx("div",{className:"setup-actions",children:n.jsx("button",{type:"button",className:"btn-small",disabled:v,onClick:()=>{ce(m)},children:"List models from provider"})}),se&&n.jsxs("div",{className:"list-models-panel",children:[n.jsxs("div",{className:"list-models-head",children:[n.jsx("strong",{children:se.models.length})," models from"," ",n.jsx("code",{children:Wi(m)}),n.jsx("button",{type:"button",className:"btn-plain",onClick:()=>G(null),children:"close"})]}),se.models.length===0?n.jsx("p",{className:"hint",children:"No models returned."}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"list-models-grid",children:se.models.map(Z=>n.jsxs("label",{className:"toggle",children:[n.jsx("input",{type:"checkbox",checked:se.picked.has(Z.id),onChange:te=>{const y=new Set(se.picked);te.target.checked?y.add(Z.id):y.delete(Z.id),G({...se,picked:y})}})," ",n.jsx("code",{children:Z.id})]},Z.id))}),n.jsxs("button",{type:"button",className:"btn-small btn-primary",disabled:v||se.picked.size===0,onClick:()=>we(m.id),children:["add ",se.picked.size," model",se.picked.size===1?"":"s"]})]})]}),n.jsxs("form",{className:"add-form",onSubmit:Z=>{Z.preventDefault(),_l(m.id)},children:[n.jsx("input",{ref:L,placeholder:"model name (sent to provider, e.g. claude-sonnet-4-6)",value:Q.id,onChange:Z=>C({...Q,id:Z.target.value})}),n.jsx("span",{className:"modality-select",children:Fy.map(Z=>n.jsxs("label",{className:"toggle",children:[n.jsx("input",{type:"checkbox",checked:Q.input.includes(Z),onChange:()=>Me(Z)})," ",Z]},Z))}),Q.showWindow?n.jsx("input",{type:"number",min:1,step:1024,placeholder:"context window (tokens)",value:Q.window||"",onChange:Z=>C({...Q,window:Number.parseInt(Z.target.value,10)||0})}):n.jsx("button",{type:"button",className:"btn-plain",disabled:v,title:"Only needed when the model's real context window is smaller than what the agent requests.",onClick:()=>C({...Q,showWindow:!0}),children:"+ context window"}),n.jsxs("select",{title:"Model reasoning effort",value:Q.reasoningEffort,onChange:Z=>C({...Q,reasoningEffort:Z.target.value}),children:[n.jsx("option",{value:"",children:"provider default effort"}),nh.map(Z=>n.jsx("option",{value:Z,children:Z},Z))]}),n.jsx("button",{type:"submit",disabled:v,children:w?"save model":"add model"}),w?n.jsx("button",{type:"button",className:"btn-plain",disabled:v,onClick:()=>{C($i),ee(null)},children:"cancel"}):null]}),n.jsxs("div",{className:"setup-footer",children:[n.jsx("button",{type:"button",className:"btn-small btn-primary",disabled:v||Y.length===0,title:Y.length===0?"Add at least one model first":"",onClick:()=>k(null),children:"Done"}),Y.length===0&&n.jsx("button",{type:"button",className:"btn-danger",disabled:v,onClick:()=>{le(async()=>{await Pf(m.id),k(null)})},children:"discard provider"})]})]})]})}return n.jsxs("div",{children:[f&&n.jsx("div",{className:"error inline",children:f}),n.jsxs("section",{className:"home-section",children:[n.jsx("h2",{children:"Model providers"}),n.jsx("p",{className:"hint",children:"An upstream afw can route to, and the models it serves. Add a provider, then give it models — list its catalog or add them by hand. Providers and models discovered at wire time appear here automatically."}),Qe.length===0?n.jsx("p",{className:"hint",children:"No providers yet — add one below."}):n.jsxs("table",{className:"kv-table",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{children:"Name"}),n.jsx("th",{children:"API"}),n.jsx("th",{children:"Endpoint"}),n.jsx("th",{children:"Auth"}),n.jsx("th",{children:"Base URL"}),n.jsx("th",{children:"Effort"}),n.jsx("th",{children:"Models"}),n.jsx("th",{})]})}),n.jsx("tbody",{children:Qe.map(m=>{const Y=z(m.id).length;return n.jsxs("tr",{children:[n.jsxs("td",{children:[n.jsx("span",{className:"reg-name",children:Wi(m)}),m.label&&m.label!==m.id?n.jsx("span",{className:"reg-id",title:"internal id (referenced by routing)",children:m.id}):null]}),n.jsx("td",{children:m.api}),n.jsx("td",{children:m.generationPath??"versioned"}),n.jsx("td",{children:m.auth?.kind??"—"}),n.jsx("td",{children:n.jsx("code",{className:"path",children:m.baseUrl})}),n.jsx("td",{children:m.reasoningEffort??n.jsx("span",{className:"dim",children:"default"})}),n.jsx("td",{children:Y===0?n.jsx("span",{className:"dim",title:"this provider has no models yet",children:"none"}):Y}),n.jsxs("td",{className:"row-actions",children:[n.jsx("button",{type:"button",className:"btn-plain",disabled:v,onClick:()=>F(m.id),children:Y===0?"add models":"manage models"}),n.jsx("button",{type:"button",className:"btn-plain",disabled:v,onClick:()=>V(m),children:"edit"}),n.jsx("button",{type:"button",className:"btn-danger",disabled:v,onClick:()=>{le(()=>Pf(m.id))},children:"remove"})]})]},m.id)})})]}),n.jsxs("form",{className:"add-form",onSubmit:q,children:[n.jsx("input",{placeholder:"provider name (e.g. Xiangxin)",value:j.name,onChange:m=>N({...j,name:m.target.value})}),n.jsx("input",{placeholder:"base URL (https://…/v1)",value:j.baseUrl,onChange:m=>N({...j,baseUrl:m.target.value})}),n.jsx("select",{value:j.api,onChange:m=>N({...j,api:m.target.value}),children:$y.map(m=>n.jsx("option",{value:m,children:m},m))}),n.jsx("select",{title:"Generation endpoint path",value:j.generationPath,onChange:m=>N({...j,generationPath:m.target.value}),children:Iy.map(m=>n.jsx("option",{value:m.value,children:m.label},m.value))}),n.jsx("select",{value:j.authKind,onChange:m=>N({...j,authKind:m.target.value}),children:Wy.map(m=>n.jsx("option",{value:m,children:m},m))}),j.authKind==="api-key"&&n.jsx("input",{placeholder:"header (x-api-key)",value:j.authHeader??"",onChange:m=>N({...j,authHeader:m.target.value})}),j.authKind!=="passthrough"&&n.jsx("input",{type:"password",placeholder:T?"API key (blank = keep)":"API key",value:j.apiKey??"",onChange:m=>N({...j,apiKey:m.target.value})}),n.jsxs("select",{title:"Provider default reasoning effort",value:j.reasoningEffort,onChange:m=>N({...j,reasoningEffort:m.target.value}),children:[n.jsx("option",{value:"",children:"default effort"}),nh.map(m=>n.jsx("option",{value:m,children:m},m))]}),n.jsx("button",{type:"submit",disabled:v,children:T?"save changes":"add provider → models"}),T?n.jsx("button",{type:"button",className:"btn-plain",disabled:v,onClick:ve,children:"cancel"}):null]})]})]})}function Fi({children:c}){return n.jsxs("span",{className:"helptip",children:[n.jsx("span",{className:"helptip-icon","aria-hidden":!0,children:"?"}),n.jsx("span",{className:"helptip-content",role:"tooltip",children:c})]})}const lu="__passthrough__",Ii="combo:";function eg(c){return!c||c.kind==="passthrough"?lu:c.kind==="composite"?`${Ii}${c.comboId}`:c.kind==="chain"&&c.members[0]?c.members[0].modelId:lu}function lg(c,d){if(!c||c.kind==="passthrough")return"passthrough (no model swap)";if(c.kind==="composite"){const f=d.find(o=>o.id===c.comboId);return f?`fusion: ${f.label}`:`fusion: ${c.comboId} (missing)`}return c.members.map(f=>f.modelId).join(" → ")}function tg(c){const f=[`panel: ${c.panel.map(p=>p.fallback?`${p.modelId}→${p.fallback.modelId}`:p.modelId).join(" + ")}`],o=c.judge?.modelId??"synthesizer",v=c.synthesizer?.modelId??c.panel[0]?.modelId??"—";return f.push(`judge ${o} → synth ${v}`),c.vision&&f.push(`vision ${c.vision.modelId}`),c.webSearch&&f.push("web search"),f.join(" · ")}function ag(){const[c,d]=H.useState(null),[f,o]=H.useState(null),[v,p]=H.useState(null),[j,N]=H.useState(null),T=H.useCallback(async()=>{try{const[G,L]=await Promise.all([Oa(),vh()]);d(G),o(L),p(null)}catch(G){p(G.message)}},[]);H.useEffect(()=>{T()},[T]);const b=async(G,L,P)=>{N(G);try{if(L===lu)await yy(G);else if(L.startsWith(Ii))await If(G,{kind:"composite",comboId:L.slice(Ii.length)});else{const le=P.find(ve=>ve.id===L);await If(G,{kind:"chain",members:[{modelId:L,...le?{providerId:le.providerId}:{}}]})}await T()}catch(le){p(le.message)}finally{N(null)}},B=async G=>{N("subagent");try{await gy(G),await T()}catch(L){p(L.message)}finally{N(null)}};if(v&&!c)return n.jsxs("div",{className:"error",children:["Error: ",v]});if(!c||!f)return n.jsx("div",{className:"loading",children:"Loading…"});const{models:k,providers:Q,combos:C}=c,w=f.subagentDowngrade,ee=G=>Q.find(L=>L.id===G)?.label??G,se=G=>C.find(L=>L.id===G);return n.jsxs("div",{children:[v&&n.jsx("div",{className:"error inline",children:v}),n.jsxs("section",{className:"home-section",children:[n.jsx("h2",{children:"Per-agent routes"}),n.jsxs("p",{className:"hint",children:["Each wired agent passes through unchanged, swaps to a single model, or uses a"," ",n.jsx("strong",{children:"fusion model"})," (parallel panel → judge → synthesize), built on the"," ",n.jsx("strong",{children:"Models"})," tab. ",n.jsx("code",{children:"<agent>/*"})," is the agent-wide default."]}),f.routes.length===0?n.jsx("div",{className:"empty",children:n.jsxs("p",{children:["No routes yet — launch a wired agent (e.g. ",n.jsx("code",{children:"afw claude"}),")."]})}):n.jsxs("table",{className:"kv-table",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{children:"Route"}),n.jsx("th",{children:"Decoder"}),n.jsx("th",{children:"Currently"}),n.jsx("th",{children:"Route to"}),n.jsxs("th",{children:["Details",n.jsxs(Fi,{children:["For a fusion model, the panel + judge + synthesizer it carries. Edit these on the ",n.jsx("strong",{children:"Models"})," tab — a route just picks one."]})]})]})}),n.jsx("tbody",{children:f.routes.map(G=>{const L=f.policy.agents[G.routeKey]?.target,P=L?.kind==="composite"?se(L.comboId):void 0;return n.jsxs("tr",{children:[n.jsx("td",{children:n.jsx("code",{children:G.routeKey})}),n.jsx("td",{children:G.decoder}),n.jsx("td",{children:lg(L,C)}),n.jsx("td",{children:n.jsxs("select",{disabled:j===G.routeKey,value:eg(L),onChange:le=>{b(G.routeKey,le.target.value,k)},children:[n.jsx("option",{value:lu,children:"passthrough (no swap)"}),C.length>0&&n.jsx("optgroup",{label:"Model Fusion",children:C.map(le=>n.jsx("option",{value:`${Ii}${le.id}`,children:le.label},le.id))}),n.jsx("optgroup",{label:"Models",children:k.map(le=>n.jsxs("option",{value:le.id,children:[le.id," (",ee(le.providerId),")"]},`${le.providerId}/${le.id}`))})]})}),n.jsx("td",{className:"dim",children:P?tg(P):L?.kind==="composite"?n.jsx("span",{title:"this fusion model no longer exists",children:"missing fusion"}):"—"})]},G.routeKey)})})]})]}),w&&n.jsxs("section",{className:"home-section",children:[n.jsx("h2",{children:"Subagent downgrade"}),n.jsx("p",{className:"hint",children:"Route Claude Code dynamic-workflow subagents to a cheaper model; the planner stays on its model. Small utility calls (under the min output budget) are left untouched."}),n.jsx("table",{className:"kv-table",children:n.jsxs("tbody",{children:[n.jsxs("tr",{children:[n.jsx("td",{children:"Enabled"}),n.jsx("td",{children:n.jsxs("label",{className:"toggle",children:[n.jsx("input",{type:"checkbox",disabled:j==="subagent",checked:w.enabled,onChange:G=>{B({enabled:G.target.checked})}})," ",w.enabled?"on":"off"]})})]}),n.jsxs("tr",{children:[n.jsxs("td",{children:["Run subagents on",n.jsx(Fi,{children:"The model Claude Code subagents are routed to while the planner stays on its own model. Pick a model that's actually registered with a provider — an unregistered id can't be resolved, so the call fails instead of downgrading."})]}),n.jsx("td",{children:n.jsxs("select",{disabled:j==="subagent",value:w.modelId,onChange:G=>{B({modelId:G.target.value})},children:[k.every(G=>G.id!==w.modelId)?n.jsxs("option",{value:w.modelId,children:[w.modelId," (unregistered)"]}):null,k.map(G=>n.jsxs("option",{value:G.id,children:[G.id," (",ee(G.providerId),")",G.id===w.modelId?" — current":""]},`${G.providerId}/${G.id}`))]})})]}),n.jsxs("tr",{children:[n.jsxs("td",{children:["Min output budget",n.jsxs(Fi,{children:["afw tells a subagent apart from a tiny utility call by the request's",n.jsx("code",{children:" max_tokens"}),". Calls asking for fewer than"," ",w.minMaxTokens.toLocaleString()," output tokens are treated as utility calls and left on their original model — only larger calls get downgraded."]})]}),n.jsxs("td",{children:["leave calls under ",w.minMaxTokens.toLocaleString()," max_tokens untouched"]})]})]})})]})]})}const ng=["duckduckgo","brave","searxng","tavily","baidu"],uh=new Set(["brave","tavily","baidu"]),sh=new Set(["searxng"]),ch={id:"",backend:"duckduckgo",baseUrl:"",apiKey:""};function ig(c){return c.active.web_search??c.providers.find(d=>d.kind==="web_search")?.id}function ug(){const[c,d]=H.useState(null),[f,o]=H.useState(null),[v,p]=H.useState(!1),[j,N]=H.useState(ch),T=H.useCallback(async()=>{try{d(await yh()),o(null)}catch(C){o(C.message)}},[]);H.useEffect(()=>{T()},[T]);const b=async C=>{p(!0);try{await C(),await T()}catch(w){o(w.message)}finally{p(!1)}},B=C=>{if(C.preventDefault(),!j.id)return o("tool provider id is required");b(async()=>{await Ny({id:j.id,kind:"web_search",backend:j.backend,...sh.has(j.backend)&&j.baseUrl?{baseUrl:j.baseUrl}:{},...uh.has(j.backend)&&j.apiKey?{apiKey:j.apiKey}:{}}),N(ch)})};if(f&&!c)return n.jsxs("div",{className:"error",children:["Error: ",f]});if(!c)return n.jsx("div",{className:"loading",children:"Loading…"});const k=ig(c),Q=c.providers.filter(C=>C.kind==="web_search");return n.jsxs("div",{children:[f&&n.jsx("div",{className:"error inline",children:f}),n.jsxs("section",{className:"home-section",children:[n.jsx("h2",{children:"Web search backends"}),n.jsxs("p",{className:"hint",children:["Backends that fulfill the ",n.jsx("code",{children:"web_search"})," capability for models that lack it. The active one serves every routed search; changes apply on the next call (no restart)."]}),Q.length===0?n.jsx("p",{className:"hint",children:"No tool providers."}):n.jsxs("table",{className:"kv-table",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{children:"Active"}),n.jsx("th",{children:"Provider"}),n.jsx("th",{children:"Backend"}),n.jsx("th",{children:"Endpoint / key"}),n.jsx("th",{children:"$/call"}),n.jsx("th",{})]})}),n.jsx("tbody",{children:Q.map(C=>n.jsxs("tr",{children:[n.jsx("td",{children:n.jsx("input",{type:"radio",name:"active-web_search",checked:k===C.id,disabled:v,onChange:()=>{b(()=>Ty("web_search",C.id))}})}),n.jsxs("td",{children:[C.label,C.origin==="seeded"&&n.jsx("span",{className:"muted",children:" (default)"})]}),n.jsx("td",{children:C.backend}),n.jsxs("td",{children:[C.baseUrl?n.jsx("code",{className:"path",children:C.baseUrl}):null,C.authRef?n.jsx("span",{className:"ok-badge",children:"key set"}):null,!C.baseUrl&&!C.authRef?n.jsx("span",{className:"muted",children:"—"}):null]}),n.jsx("td",{children:C.costPerCall?`$${C.costPerCall}`:"—"}),n.jsx("td",{children:C.origin==="seeded"?n.jsx("span",{className:"muted",children:"built-in"}):n.jsx("button",{type:"button",className:"btn-danger",disabled:v,onClick:()=>{b(()=>Ey(C.id))},children:"remove"})})]},C.id))})]}),n.jsxs("form",{className:"add-form",onSubmit:B,children:[n.jsx("input",{placeholder:"provider id",value:j.id,onChange:C=>N({...j,id:C.target.value})}),n.jsx("select",{value:j.backend,onChange:C=>N({...j,backend:C.target.value}),children:ng.map(C=>n.jsx("option",{value:C,children:C},C))}),sh.has(j.backend)&&n.jsx("input",{placeholder:"instance URL",value:j.baseUrl,onChange:C=>N({...j,baseUrl:C.target.value})}),uh.has(j.backend)&&n.jsx("input",{type:"password",placeholder:"API key",value:j.apiKey,onChange:C=>N({...j,apiKey:C.target.value})}),n.jsx("button",{type:"submit",disabled:v,children:"add backend"})]})]})]})}const sg=[{key:"routes",label:"Routes"},{key:"fusion",label:"Model Fusion"},{key:"models",label:"Model providers"},{key:"tools",label:"Tool providers"}];function cg(){const[c,d]=H.useState("routes");return n.jsxs("div",{className:"routing",children:[n.jsx("div",{className:"subtabs",children:sg.map(f=>n.jsx("button",{type:"button",className:`subtab ${c===f.key?"active":""}`,onClick:()=>d(f.key),children:f.label},f.key))}),c==="routes"?n.jsx(ag,{}):c==="models"?n.jsx(Py,{}):c==="fusion"?n.jsx(Jy,{}):n.jsx(ug,{})]})}function rh(c){if(!c||c.length<200)return!1;if(c.includes("<available_skills>")||c.includes("<system-reminder>")||/^<[A-Za-z][A-Za-z0-9_ -]*>\s*$/m.test(c)||/^You are a personal assistant running inside OpenClaw/m.test(c)||/^# Hermes Agent Persona/m.test(c))return!0;const d=c.match(/^##\s+\S/gm);return!!(d&&d.length>=3)}function Rc(c){if(!c)return[];const d=[];let f=c;const o=/^[ \t]*<([A-Za-z][A-Za-z0-9_ -]*)>[ \t]*\n([\s\S]*?)\n^[ \t]*<\/\1>[ \t]*$/gm;f=f.replace(o,(T,b,B)=>{const k=b.trim();return k==="available_skills"?d.push({kind:"skills",skills:rg(B)}):k==="system-reminder"?d.push({kind:"reminder",body:B.trim()}):d.push({kind:"tagged",tag:k,body:B.trim()}),`
12
+ __EMBED_${d.length-1}__
13
+ `}),f=f.replace(/<!--[\s\S]*?-->/g,"");const v=f.split(`
14
+ `),p=[];let j={title:null,level:2,body:[]};const N=()=>{const T=j.body.join(`
15
+ `).trim();if(j.title||T||j.embedded){const b={title:j.title,level:j.level,body:T};j.embedded&&(b.embedded=j.embedded),p.push(b)}};for(const T of v){const b=/^(#{1,2})\s+(.+)$/.exec(T);if(b){N(),j={title:b[2].trim(),level:b[1].length===1?1:2,body:[]};continue}const B=/^__EMBED_(\d+)__$/.exec(T.trim());if(B){N(),p.push({title:null,level:2,body:"",embedded:d[Number(B[1])]}),j={title:null,level:2,body:[]};continue}j.body.push(T)}return N(),p.length>0?p:[{title:null,level:2,body:c}]}function rg(c){const d=[],f=/<skill>\s*<name>([\s\S]*?)<\/name>\s*<description>([\s\S]*?)<\/description>(?:\s*<location>([\s\S]*?)<\/location>)?\s*<\/skill>/g;let o;for(;(o=f.exec(c))!=null;)d.push({name:o[1].trim(),description:o[2].replace(/\s+/g," ").trim(),...o[3]?{location:o[3].trim()}:{}});if(d.length>0)return d;const v=c.split(`
16
+ `);let p;for(const j of v){const N=/^\s{0,4}([\w-]+)(?::\s*(.*))?$/.exec(j.replace(/\s+$/,"")),T=/^\s+-\s+([\w-]+):\s*(.*)$/.exec(j);T?d.push({name:T[1].trim(),description:T[2].trim(),...p?{category:p}:{}}):N&&!j.trim().startsWith("-")&&j.trim().endsWith(":")&&(p=N[1].trim())}return d}function dg({content:c}){const d=Rc(c);return n.jsx("div",{className:"prompt-structured",children:d.map((f,o)=>n.jsx(Hc,{section:f},o))})}function Hc({section:c}){const d=c.title==null;return c.embedded&&!c.body?n.jsx(fg,{title:c.title,embedded:c.embedded}):n.jsxs("div",{className:`prompt-section${d?" prompt-lede":""}`,children:[c.title?n.jsxs("div",{className:"prompt-section-title",children:[n.jsx("span",{className:"prompt-section-marker",children:c.level===1?"§":"#"}),c.title]}):null,c.body?n.jsx(og,{body:c.body}):null]})}function og({body:c}){const d=c.replace(/\n\[\[(?:skills|reminder):\d+\]\]\n/g,"").trim();return d?n.jsx("div",{className:"prompt-section-body",children:d}):null}function fg({title:c,embedded:d}){return d.kind==="skills"?n.jsx(mg,{title:c,skills:d.skills}):d.kind==="reminder"?n.jsx(vg,{title:c,body:d.body}):n.jsx(hg,{tag:d.tag,body:d.body})}function hg({tag:c,body:d}){const f=Rc(d);return n.jsxs("div",{className:"prompt-section prompt-tagged",children:[n.jsxs("div",{className:"prompt-section-title",children:[n.jsx("span",{className:"prompt-section-marker",children:"‹›"}),c]}),n.jsx("div",{className:"prompt-section-body prompt-tagged-body",children:f.length>1||f[0]?.embedded!=null?n.jsx("div",{className:"prompt-structured",children:f.map((o,v)=>n.jsx(Hc,{section:o},v))}):d.trim()})]})}function mg({title:c,skills:d}){const[f,o]=H.useState(!1);if(d.length===0)return null;const v=d.some(b=>b.category),p=new Map;for(const b of d){const B=b.category??"(uncategorised)",k=p.get(B)??[];k.push(b),p.set(B,k)}const j=12,N=f?d:d.slice(0,j),T=d.length-N.length;return n.jsxs("div",{className:"prompt-section prompt-skills",children:[n.jsxs("div",{className:"prompt-section-title",children:[n.jsx("span",{className:"prompt-section-marker",children:"⚒"}),c||"Available skills",n.jsx("span",{className:"prompt-section-count",children:d.length}),d.length>j?n.jsx("button",{type:"button",className:"msg-expand-btn prompt-section-expand",onClick:()=>o(b=>!b),children:f?"▾ show fewer":`▸ show all ${d.length}`}):null]}),v?n.jsx("div",{className:"prompt-skills-groups",children:[...p.entries()].map(([b,B])=>{const k=f?B:B.slice(0,4),Q=B.length-k.length;return n.jsxs("div",{className:"prompt-skills-group",children:[n.jsx("div",{className:"prompt-skills-group-name",children:b}),n.jsxs("div",{className:"prompt-skills-list",children:[k.map(C=>n.jsx(dh,{skill:C},`${b}-${C.name}`)),Q>0?n.jsxs("span",{className:"prompt-skills-more",children:["+ ",Q," more"]}):null]})]},b)})}):n.jsxs("div",{className:"prompt-skills-list",children:[N.map(b=>n.jsx(dh,{skill:b},b.name)),T>0?n.jsxs("span",{className:"prompt-skills-more",children:["+ ",T," more"]}):null]})]})}function dh({skill:c}){return n.jsxs("div",{className:"skill-chip",title:c.description,children:[n.jsx("span",{className:"skill-chip-name",children:c.name}),c.description?n.jsx("span",{className:"skill-chip-desc",children:c.description}):null]})}function vg({title:c,body:d}){const f=Rc(d),o=f.length>1||f[0]?.embedded!=null||f[0]?.title!=null;return n.jsxs("div",{className:"prompt-section prompt-reminder",children:[n.jsxs("div",{className:"prompt-section-title",children:[n.jsx("span",{className:"prompt-section-marker",children:"⚠"}),c||"system-reminder"]}),n.jsx("div",{className:"prompt-section-body prompt-reminder-body",children:o?n.jsx("div",{className:"prompt-structured",children:f.map((v,p)=>n.jsx(Hc,{section:v},p))}):d.trim()})]})}function yg(c,d){return d&&((c==="system"||c==="developer")&&rh(d)||c==="user"&&d.includes("<system-reminder>")&&rh(d))?d:null}function gg({runId:c}){const[d,f]=H.useState(null),[o,v]=H.useState(null);if(H.useEffect(()=>{let j=!1;return(async()=>{try{const N=await iy(c);j||f(N)}catch(N){j||v(N.message)}})(),()=>{j=!0}},[c]),o)return n.jsxs("div",{className:"error",children:["Error: ",o]});if(!d)return n.jsx("div",{className:"loading",children:"Loading…"});const p=d.run;return n.jsxs("div",{className:"run-detail",children:[n.jsx("button",{type:"button",className:"back",onClick:()=>{window.location.hash=p.threadId?`#/task/${encodeURIComponent(p.threadId)}`:"#/tasks"},children:"← back to task"}),n.jsxs("div",{className:"run-header",children:[n.jsx("h2",{children:n.jsx("code",{children:p.id})}),n.jsxs("div",{className:"run-header-meta",children:[n.jsx("span",{children:p.agent}),n.jsx("span",{children:"·"}),n.jsx("span",{children:p.status}),n.jsx("span",{children:"·"}),n.jsxs("span",{children:["model: ",p.model?n.jsx("code",{children:p.model}):n.jsx("span",{className:"muted",children:"—"})]}),n.jsx("span",{children:"·"}),n.jsx("span",{children:n.jsx(lt,{ms:p.startedAt})}),n.jsx("span",{children:"·"}),n.jsx("span",{children:n.jsx(Mn,{ms:p.durMs})})]})]}),n.jsx(jg,{actions:d.actions}),n.jsx(xg,{actions:d.actions}),n.jsx("div",{className:"meta",children:n.jsxs("dl",{children:[n.jsx("dt",{children:"Tokens"}),n.jsxs("dd",{children:[p.tokensIn??0," / ",p.tokensOut??0]}),n.jsx("dt",{children:"Cache R/W"}),n.jsx("dd",{children:n.jsx(Dc,{read:p.cacheReadTokens,write:p.cacheWriteTokens})})]})}),n.jsx(bg,{actions:d.actions})]})}function pg(c){if(c.kind!=="model_call")return null;const d=c.payload;return!d||typeof d!="object"?null:d}function _c(c){return typeof c.status=="number"&&c.status>=400||!!c.error}function jg({actions:c}){const d=c.filter(N=>N.kind==="model_call").map(N=>({id:N.id,ts:N.ts,p:pg(N)})).filter(N=>N.p!=null).sort((N,T)=>N.ts-T.ts),f=d.filter(N=>_c(N.p));if(f.length===0)return null;const o=d.find(N=>!_c(N.p)&&N.p.orchestration?.role==="failover"),v=!_c(d[d.length-1].p),p=o!=null||v&&f.length<d.length,j=o?.p.model??d[d.length-1]?.p.model;return n.jsxs("section",{className:`run-errors${p?" run-errors-recovered":""}`,children:[p?n.jsxs("div",{className:"run-recovered-note",children:[n.jsx("span",{className:"run-recovered-badge",children:"recovered"}),"Chain failed over and completed",j?n.jsxs(n.Fragment,{children:[" ","on ",n.jsx("code",{children:j})]}):null,". The attempt",f.length>1?"s":""," below errored but did not break the run."]}):null,f.map(({id:N,p:T})=>n.jsxs("div",{className:`run-error-card${p?" run-error-card-recovered":""}`,children:[n.jsxs("div",{className:"run-error-head",children:[n.jsx("span",{className:"run-error-badge",children:p?"failover":"error"}),typeof T.status=="number"?n.jsxs("span",{className:"run-error-status",children:["HTTP ",T.status]}):null,n.jsxs("span",{className:"run-error-model",children:[T.clientModel&&T.clientModel!==T.model?n.jsxs(n.Fragment,{children:["requested ",n.jsx("code",{children:T.clientModel})," →"," "]}):null,T.model?n.jsx("code",{children:T.model}):null,T.providerId?n.jsxs("span",{className:"muted",children:[" @ ",T.providerId]}):null]})]}),T.error?n.jsx("pre",{className:"run-error-body",children:T.error}):null]},N))]})}function xg({actions:c}){const d=new Map;for(const p of c){const j=d.get(p.kind)??{tokens:0,count:0};j.tokens+=(p.tokensIn??0)+(p.tokensOut??0),j.count+=1,d.set(p.kind,j)}const f=Array.from(d.entries()).sort((p,j)=>j[1].tokens-p[1].tokens),o=f.reduce((p,[,j])=>p+j.tokens,0),v=Math.max(...f.map(p=>p[1].tokens),1);return n.jsxs("section",{className:"cost-breakdown",children:[n.jsxs("div",{className:"cost-breakdown-head",children:[n.jsxs("span",{className:"cost-breakdown-title",children:["Token breakdown",n.jsxs(Fi,{children:["This run's input + output tokens, split by action kind.",n.jsx("br",{}),n.jsx("code",{children:"model_call"})," = a call to an LLM endpoint.",n.jsx("br",{}),n.jsx("code",{children:"mcp_call"})," = MCP JSON-RPC frame (usually 0 tokens).",n.jsx("br",{}),n.jsx("code",{children:"network"})," = other HTTP through the proxy."]})]}),n.jsxs("span",{className:"cost-breakdown-total",children:[Oc(o)," tok"]})]}),n.jsx("div",{className:"cost-breakdown-rows",children:f.map(([p,j])=>n.jsxs("div",{className:"cost-breakdown-row",children:[n.jsx("span",{className:`kind kind-${p}`,children:p}),n.jsxs("span",{className:"cost-breakdown-count",children:["(",j.count,")"]}),n.jsx("span",{className:"cost-breakdown-bar-track",children:n.jsx("span",{className:"cost-breakdown-bar-fill",style:{width:`${j.tokens/v*100}%`}})}),n.jsx("span",{className:"cost-breakdown-cost",children:Oc(j.tokens)}),n.jsx("span",{className:"cost-breakdown-pct",children:o>0?`${Math.round(j.tokens/o*100)}%`:"—"})]},p))})]})}const oh=800;function bg({actions:c}){const d=H.useMemo(()=>zg(c),[c]),[f,o]=H.useState(new Set);if(d.length===0)return n.jsx("div",{className:"empty",children:"No model calls captured for this run."});const v=p=>{o(j=>{const N=new Set(j);return N.has(p)?N.delete(p):N.add(p),N})};return n.jsxs("section",{className:"full-messages",children:[n.jsxs("div",{className:"full-messages-head",children:[n.jsx("span",{className:"full-messages-title",children:"Full messages"}),n.jsx("span",{className:"full-messages-count",children:d.length})]}),n.jsx("div",{className:"full-messages-list",children:d.map((p,j)=>n.jsx(Sg,{index:j+1,message:p,isExpanded:f.has(j),onToggle:()=>v(j)},j))})]})}function Sg({index:c,message:d,isExpanded:f,onToggle:o}){const v=d.role||"unknown",p=kc(d.content),j=v==="tool"?xh(p):null,N=j?null:yg(v,p),T=j||N?"":v==="tool"?Cg(p):p,b=T.length>oh,B=b&&!f?`${T.slice(0,oh)}…`:T,k=p.length;return n.jsxs("div",{className:"msg-card",children:[n.jsxs("div",{className:"msg-card-head",children:[n.jsxs("div",{className:"msg-card-head-left",children:[n.jsxs("span",{className:"msg-card-num",children:["#",c]}),n.jsx("span",{className:`msg-role msg-role-${v}`,children:v}),d.name?n.jsxs("span",{className:"msg-meta",children:["name: ",n.jsx("code",{children:d.name})]}):null,d.tool_call_id?n.jsxs("span",{className:"msg-meta",children:["tool_call_id: ",n.jsx("code",{children:d.tool_call_id})]}):null,k?n.jsxs("span",{className:"msg-meta",title:"Approximate token count (ASCII ÷ 4 + CJK × 0.6). Real count comes from the upstream usage field; this is just a budget hint.",children:[k.toLocaleString()," chars · ~",Nh(Sh(p))," tok"]}):null]}),!j&&!N&&b?n.jsx("button",{type:"button",className:"msg-expand-btn",onClick:o,children:f?"▾ collapse":"▸ expand"}):null]}),j?n.jsx("div",{className:"msg-card-result",children:n.jsx(bh,{args:j,variant:"result"})}):N?n.jsx("div",{className:"msg-card-prompt",children:n.jsx(dg,{content:N})}):T?n.jsx("pre",{className:"msg-card-body",children:B}):null,Array.isArray(d.tool_calls)&&d.tool_calls.length>0?n.jsx("div",{className:"msg-card-toolcalls",children:d.tool_calls.map((Q,C)=>n.jsx(Ng,{call:Q},Q.id||C))}):null]})}function Ng({call:c}){const d=c.function?.name||"function",f=xh(c.function?.arguments),o=Eg(c.function?.arguments),v=o.length;return n.jsxs("div",{className:"toolcall-card",children:[n.jsxs("div",{className:"toolcall-card-head",children:[n.jsx("span",{className:"toolcall-badge",children:"tool call"}),n.jsx("code",{className:"toolcall-name",children:d}),c.id?n.jsxs("span",{className:"toolcall-id",children:["id: ",n.jsx("code",{children:c.id})]}):null,v>0?n.jsxs("span",{className:"toolcall-id",title:"Approximate token count for the tool-call arguments",children:[v.toLocaleString()," chars · ~",Nh(Sh(o))," tok"]}):null]}),f?n.jsx(bh,{args:f}):null]})}function Eg(c){if(c==null)return"";if(typeof c=="string")return c;try{return JSON.stringify(c)}catch{return String(c)}}function xh(c){if(c==null)return null;if(typeof c=="string"){const d=c.trim();if(!d||!(d.startsWith("{")||d.startsWith("[")))return null;try{const f=JSON.parse(d);return f&&typeof f=="object"&&!Array.isArray(f)?Object.keys(f).length===0?null:f:null}catch{return null}}if(Array.isArray(c))return null;if(typeof c=="object"){const d=c;return Object.keys(d).length===0?null:d}return null}function bh({args:c,variant:d="args"}){const f=Object.keys(c);return f.length===0?null:n.jsx("dl",{className:`args-list args-list-${d}`,children:f.map(o=>n.jsxs("div",{className:"args-row",children:[n.jsx("dt",{className:"args-key",children:o}),n.jsx("dd",{className:"args-val",children:n.jsx(Tg,{value:c[o]})})]},o))})}function Tg({value:c}){if(c==null)return n.jsx("span",{className:"args-dim",children:"null"});if(typeof c=="string")return c===""?n.jsx("span",{className:"args-dim",children:'""'}):n.jsx("span",{className:"args-string",children:c});if(typeof c=="number")return n.jsx("span",{className:"args-num",children:c});if(typeof c=="boolean")return n.jsx("span",{className:"args-bool",children:String(c)});if(Array.isArray(c))return c.length===0?n.jsx("span",{className:"args-dim",children:"[]"}):c.every(f=>f==null||typeof f=="string"||typeof f=="number"||typeof f=="boolean")&&c.length<=8?n.jsxs("span",{className:"args-array",children:["[",c.map((f,o)=>n.jsx("span",{className:"args-array-item",children:String(f)},o)),"]"]}):n.jsxs("span",{className:"args-dim",children:["[",c.length," items]"]});if(typeof c=="object"){const d=c,f=Object.keys(d);return f.length===0?n.jsx("span",{className:"args-dim",children:"{}"}):n.jsxs("div",{className:"args-nested",children:[f.slice(0,8).map(o=>n.jsxs("div",{className:"args-row",children:[n.jsx("dt",{className:"args-key args-key-nested",children:o}),n.jsx("dd",{className:"args-val",children:n.jsx(Ag,{value:d[o]})})]},o)),f.length>8?n.jsxs("div",{className:"args-dim",children:["+ ",f.length-8," more fields"]}):null]})}return n.jsx("span",{className:"args-string",children:String(c)})}function Sh(c){if(!c)return 0;let d=0,f=0;for(let o=0;o<c.length;o++)c.charCodeAt(o)<128?d++:f++;return Math.round(d/4+f*.6)}function Nh(c){return c<1e3?String(c):c<1e6?`${(c/1e3).toFixed(c<1e4?1:0)}K`:`${(c/1e6).toFixed(2)}M`}function Ag({value:c}){if(c==null)return n.jsx("span",{className:"args-dim",children:"null"});if(typeof c=="string")return c===""?n.jsx("span",{className:"args-dim",children:'""'}):n.jsx("span",{className:"args-string",children:c});if(typeof c=="number")return n.jsx("span",{className:"args-num",children:c});if(typeof c=="boolean")return n.jsx("span",{className:"args-bool",children:String(c)});if(Array.isArray(c))return n.jsxs("span",{className:"args-dim",children:["[",c.length," ",c.length===1?"item":"items","]"]});if(typeof c=="object"){const d=Object.keys(c);return n.jsx("span",{className:"args-dim",children:`{${d.slice(0,3).join(", ")}${d.length>3?", …":""}}`})}return n.jsx("span",{className:"args-string",children:String(c)})}function zg(c){const d=c.filter(N=>N.kind==="model_call").sort((N,T)=>N.ts-T.ts);if(d.length===0)return[];const o=d[d.length-1].payload??{},v=Array.isArray(o.messages)?o.messages:[],p=[];for(const N of v)for(const T of _g(N))p.push(T);const j=Array.isArray(o.response)?o.response:[];if(j.length>0)for(const N of Eh("assistant",j))p.push(N);return p}function _g(c){if(!c||typeof c!="object")return[];const d=c;if(typeof d.role!="string")return[];if(Array.isArray(d.content)&&Mg(d.content))return Eh(d.role,d.content,d);const f={role:d.role,content:d.content};return typeof d.name=="string"&&(f.name=d.name),typeof d.tool_call_id=="string"&&(f.tool_call_id=d.tool_call_id),Array.isArray(d.tool_calls)&&(f.tool_calls=d.tool_calls),[f]}function Eh(c,d,f){const o=[],v=[],p=[];for(const N of d){if(!N||typeof N!="object")continue;const T=N;if(T.type==="text"&&typeof T.text=="string")o.push(T.text);else if(T.type==="thinking"){const b=typeof T.thinking=="string"?T.thinking:typeof T.text=="string"?T.text:"";b.trim()&&o.push(`[thinking]
17
+ ${b}`)}else if(T.type==="tool_use")v.push({id:typeof T.id=="string"?T.id:void 0,type:"function",function:{name:typeof T.name=="string"?T.name:"tool",arguments:T.input}});else if(T.type==="tool_result"){const b=T.content;let B="";typeof b=="string"?B=b:Array.isArray(b)?B=kc(b):b!=null&&(B=Pi(b));const k=typeof T.tool_use_id=="string"?T.tool_use_id:typeof T.tool_call_id=="string"?T.tool_call_id:void 0,Q={role:"tool",content:B};k&&(Q.tool_call_id=k),p.push(Q)}}const j=[];if(o.length>0||v.length>0){const N={role:c,content:o.join(`
18
+
19
+ `)};v.length>0&&(N.tool_calls=v),f&&(typeof f.name=="string"&&(N.name=f.name),typeof f.tool_call_id=="string"&&(N.tool_call_id=f.tool_call_id),Array.isArray(f.tool_calls)&&(N.tool_calls=[...N.tool_calls??[],...f.tool_calls])),j.push(N)}for(const N of p)j.push(N);return j}function Mg(c){for(const d of c){if(!d||typeof d!="object")continue;const f=d.type;if(f==="text"||f==="thinking"||f==="tool_use"||f==="tool_result")return!0}return!1}function kc(c){return c==null?"":typeof c=="string"?c:Array.isArray(c)?c.map(d=>{if(d==null)return"";if(typeof d=="string")return d;if(typeof d!="object")return String(d);const f=d;return f.type==="text"&&typeof f.text=="string"?f.text:f.type==="tool_result"?typeof f.content=="string"?f.content:Array.isArray(f.content)?kc(f.content):Pi(f.content):Pi(d)}).filter(Boolean).join(`
20
+ `):Pi(c)}function Cg(c){if(!c)return c;const d=c.trim();if(!d.startsWith("{")&&!d.startsWith("["))return c;try{return JSON.stringify(JSON.parse(d),null,2)}catch{return c}}function Pi(c){try{return JSON.stringify(c,null,2)}catch{return String(c)}}function tu({outcome:c}){return c==="failed"?n.jsx("span",{className:"run-error-badge",children:"error"}):c==="recovered"?n.jsx("span",{className:"run-recovered-badge",title:"An attempt errored but failover succeeded",children:"recovered"}):null}function qc(c){if(c==="failed")return"run-errored";if(c==="recovered")return"run-recovered"}const fh=50;function Og(){const[c,d]=H.useState(null),[f,o]=H.useState(null),[v,p]=H.useState(0);if(H.useEffect(()=>{let C=!1;const w=async()=>{try{const se=await hh({limit:fh,offset:v*fh});C||(d(se),o(null))}catch(se){C||o(se.message)}};w();const ee=setInterval(()=>{v===0&&w()},4e3);return()=>{C=!0,clearInterval(ee)}},[v]),f&&!c)return n.jsxs("div",{className:"error",children:["Error: ",f]});if(c===null)return n.jsx("div",{className:"loading",children:"Loading…"});const{rows:j,total:N,offset:T,limit:b}=c,B=Math.max(0,Math.ceil(N/b)-1),k=N===0?0:T+1,Q=Math.min(N,T+j.length);return N===0?n.jsxs("div",{className:"empty",children:[n.jsx("p",{children:"No tasks yet."}),n.jsxs("p",{className:"hint",children:["Run a wired agent (e.g. ",n.jsx("code",{children:"afw claude"}),") and refresh. A task is one correlated conversation — its turns show up as runs inside."]})]}):n.jsxs("div",{className:"run-list-wrap",children:[n.jsxs("table",{className:"runs",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{children:"Task"}),n.jsx("th",{children:"Started"}),n.jsx("th",{children:"Agent"}),n.jsx("th",{children:"Model"}),n.jsx("th",{children:"Status"}),n.jsx("th",{children:"Runs"}),n.jsx("th",{children:"Actions"}),n.jsx("th",{children:"Dur"}),n.jsx("th",{children:"In/Out"}),n.jsx("th",{children:"Cache R/W"})]})}),n.jsx("tbody",{children:j.map(C=>n.jsxs("tr",{className:qc(C.outcome),onClick:()=>{window.location.hash=`#/task/${encodeURIComponent(C.id)}`},children:[n.jsx("td",{children:C.title?n.jsx("span",{className:"task-title",children:C.title}):n.jsx("code",{children:Ua(C.id)})}),n.jsx("td",{children:n.jsx(lt,{ms:C.startedAt})}),n.jsx("td",{children:C.agent}),n.jsx("td",{children:C.model?n.jsx("code",{children:C.model}):n.jsx("span",{className:"muted",children:"—"})}),n.jsx("td",{children:C.outcome!=="ok"?n.jsx(tu,{outcome:C.outcome}):C.endedAt==null?n.jsx("span",{className:"muted",children:"running"}):"done"}),n.jsx("td",{children:C.runCount}),n.jsx("td",{children:C.actionCount}),n.jsx("td",{children:n.jsx(Mn,{ms:C.durMs})}),n.jsx("td",{children:n.jsx(ph,{tokensIn:C.tokensIn,tokensOut:C.tokensOut})}),n.jsx("td",{children:n.jsx(Dc,{read:C.cacheReadTokens,write:C.cacheWriteTokens})})]},C.id))})]}),n.jsxs("div",{className:"pager",children:[n.jsxs("div",{className:"pager-count",children:[k.toLocaleString(),"–",Q.toLocaleString()," of ",N.toLocaleString()]}),n.jsxs("div",{className:"pager-controls",children:[n.jsx("button",{type:"button",disabled:v===0,onClick:()=>p(0),className:"pager-btn",children:"« first"}),n.jsx("button",{type:"button",disabled:v===0,onClick:()=>p(C=>Math.max(0,C-1)),className:"pager-btn",children:"← prev"}),n.jsxs("span",{className:"pager-page",children:["page ",v+1," / ",B+1]}),n.jsx("button",{type:"button",disabled:v>=B,onClick:()=>p(C=>Math.min(B,C+1)),className:"pager-btn",children:"next →"}),n.jsx("button",{type:"button",disabled:v>=B,onClick:()=>p(B),className:"pager-btn",children:"last »"})]})]})]})}function Ug(){const[c,d]=H.useState(null),[f,o]=H.useState(null);return H.useEffect(()=>{let v=!1;const p=()=>sy().then(N=>{v||(d(N),o(null))}).catch(N=>!v&&o(N.message));p();const j=setInterval(p,5e3);return()=>{v=!0,clearInterval(j)}},[]),f&&!c?n.jsxs("div",{className:"error",children:["Error: ",f]}):c?c.length===0?n.jsxs("div",{className:"empty",children:[n.jsx("p",{children:"No agent instances yet."}),n.jsxs("p",{className:"hint",children:["Populated from new traffic. Launch a wired agent (e.g. ",n.jsx("code",{children:"afw claude"}),") — each running instance shows up here with the MCP servers, skills, and tools it used."]})]}):n.jsx("div",{className:"run-list-wrap",children:n.jsxs("table",{className:"runs",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{children:"Agent"}),n.jsx("th",{children:"Instance"}),n.jsx("th",{children:"Tasks"}),n.jsx("th",{children:"MCP"}),n.jsx("th",{children:"Skills"}),n.jsx("th",{children:"Tools"}),n.jsx("th",{children:"Actions"}),n.jsx("th",{children:"Last active"})]})}),n.jsx("tbody",{children:c.map(v=>n.jsxs("tr",{onClick:()=>{window.location.hash=`#/instance/${v.key}`},children:[n.jsx("td",{children:v.agent}),n.jsx("td",{children:v.instanceId?n.jsx("code",{children:v.instanceId}):n.jsx("span",{className:"muted",children:"(unknown)"})}),n.jsx("td",{children:v.taskCount}),n.jsx("td",{children:v.mcpCount||n.jsx("span",{className:"muted",children:"—"})}),n.jsx("td",{children:v.skillCount||n.jsx("span",{className:"muted",children:"—"})}),n.jsx("td",{children:v.toolCount||n.jsx("span",{className:"muted",children:"—"})}),n.jsx("td",{children:v.actionCount}),n.jsx("td",{children:n.jsx(lt,{ms:v.lastActive})})]},v.key))})]})}):n.jsx("div",{className:"loading",children:"Loading…"})}function Dg(){const[c,d]=H.useState(null),[f,o]=H.useState(null);return H.useEffect(()=>{let v=!1;return ry().then(p=>!v&&d(p)).catch(p=>!v&&o(p.message)),()=>{v=!0}},[]),f&&!c?n.jsxs("div",{className:"error",children:["Error: ",f]}):c?c.length===0?n.jsxs("div",{className:"empty",children:[n.jsx("p",{children:"No MCP activity yet."}),n.jsxs("p",{className:"hint",children:["Populated from new traffic. When an agent calls an MCP server (or an ",n.jsx("code",{children:"mcp__*"})," ","tool), it shows up here aggregated across instances."]})]}):n.jsx("div",{className:"run-list-wrap",children:n.jsxs("table",{className:"runs",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{children:"MCP server"}),n.jsx("th",{children:"Calls"}),n.jsx("th",{children:"Methods"}),n.jsx("th",{children:"Instances"}),n.jsx("th",{children:"Tasks"}),n.jsx("th",{children:"Errors"}),n.jsx("th",{children:"Last active"})]})}),n.jsx("tbody",{children:c.map(v=>n.jsxs("tr",{children:[n.jsx("td",{children:n.jsx("code",{children:v.server})}),n.jsx("td",{children:v.callCount}),n.jsx("td",{children:v.methodCount}),n.jsx("td",{children:v.instanceCount}),n.jsx("td",{children:v.taskCount}),n.jsx("td",{children:v.errorCount||n.jsx("span",{className:"muted",children:"—"})}),n.jsx("td",{children:n.jsx(lt,{ms:v.lastActive})})]},v.server))})]})}):n.jsx("div",{className:"loading",children:"Loading…"})}function Rg(){const[c,d]=H.useState(null),[f,o]=H.useState(null);return H.useEffect(()=>{let v=!1;return dy().then(p=>!v&&d(p)).catch(p=>!v&&o(p.message)),()=>{v=!0}},[]),f&&!c?n.jsxs("div",{className:"error",children:["Error: ",f]}):c?c.length===0?n.jsxs("div",{className:"empty",children:[n.jsx("p",{children:"No skills used yet."}),n.jsxs("p",{className:"hint",children:["Populated from new traffic. When an agent invokes a skill (the ",n.jsx("code",{children:"Skill"})," tool), it shows up here aggregated across instances."]})]}):n.jsx("div",{className:"run-list-wrap",children:n.jsxs("table",{className:"runs",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{children:"Skill"}),n.jsx("th",{children:"Uses"}),n.jsx("th",{children:"Instances"}),n.jsx("th",{children:"Tasks"}),n.jsx("th",{children:"Last used"})]})}),n.jsx("tbody",{children:c.map(v=>n.jsxs("tr",{children:[n.jsx("td",{children:n.jsx("code",{children:v.skill})}),n.jsx("td",{children:v.useCount}),n.jsx("td",{children:v.instanceCount}),n.jsx("td",{children:v.taskCount}),n.jsx("td",{children:n.jsx(lt,{ms:v.lastActive})})]},v.skill))})]})}):n.jsx("div",{className:"loading",children:"Loading…"})}const Hg=[{key:"agents",label:"Agents"},{key:"mcp",label:"MCP"},{key:"skills",label:"Skills"},{key:"tasks",label:"Tasks"}];function kg(c){return/^#\/see\/(agents|mcp|skills|tasks)/.exec(c)?.[1]??"agents"}function qg({hash:c}){const d=kg(c);return n.jsxs("div",{className:"routing",children:[n.jsx("div",{className:"subtabs",children:Hg.map(f=>n.jsx("button",{type:"button",className:`subtab ${d===f.key?"active":""}`,onClick:()=>{window.location.hash=`#/see/${f.key}`},children:f.label},f.key))}),d==="agents"?n.jsx(Ug,{}):d==="mcp"?n.jsx(Dg,{}):d==="skills"?n.jsx(Rg,{}):n.jsx(Og,{})]})}function Bg({taskId:c}){const[d,f]=H.useState(null),[o,v]=H.useState(null);if(H.useEffect(()=>{let N=!1;return uy(c).then(T=>{N||f(T)}).catch(T=>{N||v(T.message)}),()=>{N=!0}},[c]),o)return n.jsxs("div",{className:"error",children:["Error: ",o]});if(!d)return n.jsx("div",{className:"loading",children:"Loading…"});const{thread:p,runs:j}=d;return n.jsxs("div",{className:"task-detail",children:[n.jsx("div",{className:"detail-back",children:n.jsx("a",{href:"#/tasks",children:"← Tasks"})}),n.jsx("h1",{className:"task-detail-title",children:p.title??n.jsx("code",{children:Ua(p.id)})}),n.jsxs("div",{className:"task-meta",children:[n.jsx("span",{children:p.agent}),n.jsx("span",{children:n.jsx(lt,{ms:p.startedAt})}),n.jsx("span",{children:n.jsx(Mn,{ms:p.durMs})}),n.jsxs("span",{children:[p.runCount," run",p.runCount===1?"":"s"," · ",p.actionCount," actions"]}),n.jsxs("span",{children:["model: ",p.model?n.jsx("code",{children:p.model}):n.jsx("span",{className:"muted",children:"—"})]}),n.jsx(tu,{outcome:p.outcome})]}),n.jsxs("section",{className:"home-section",children:[n.jsx("h2",{children:"Runs in this task"}),j.length===0?n.jsx("div",{className:"empty",children:n.jsx("p",{children:"No runs captured for this task."})}):n.jsxs("table",{className:"runs",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{children:"Run"}),n.jsx("th",{children:"Started"}),n.jsx("th",{children:"Model"}),n.jsx("th",{children:"Status"}),n.jsx("th",{children:"Actions"}),n.jsx("th",{children:"Dur"}),n.jsx("th",{children:"In/Out"}),n.jsx("th",{children:"Cache R/W"})]})}),n.jsx("tbody",{children:j.map(N=>n.jsxs("tr",{className:qc(N.outcome),onClick:()=>{window.location.hash=`#/run/${encodeURIComponent(N.id)}`},children:[n.jsx("td",{children:n.jsx("code",{children:Ua(N.id)})}),n.jsx("td",{children:n.jsx(lt,{ms:N.startedAt})}),n.jsx("td",{children:N.model?n.jsx("code",{children:N.model}):n.jsx("span",{className:"muted",children:"—"})}),n.jsx("td",{children:N.outcome!=="ok"?n.jsx(tu,{outcome:N.outcome}):N.status}),n.jsx("td",{children:N.actionCount}),n.jsx("td",{children:n.jsx(Mn,{ms:N.durMs})}),n.jsx("td",{children:n.jsx(ph,{tokensIn:N.tokensIn,tokensOut:N.tokensOut})}),n.jsx("td",{children:n.jsx(Dc,{read:N.cacheReadTokens,write:N.cacheWriteTokens})})]},N.id))})]})]})]})}function Mc({title:c,rows:d,empty:f}){return n.jsxs("section",{className:"home-section instance-panel",children:[n.jsx("h3",{children:c}),d.length===0?n.jsx("p",{className:"hint",children:f}):n.jsx("ul",{className:"usage-list",children:d.map(o=>n.jsxs("li",{children:[n.jsx("code",{children:o.name}),o.category&&o.category!=="builtin"?n.jsx("span",{className:"usage-cat",children:o.category}):null,n.jsx("span",{className:"usage-count",children:o.count})]},o.name))})]})}function Yg({instanceKey:c}){const[d,f]=H.useState(null),[o,v]=H.useState(null);return H.useEffect(()=>{let p=!1;return cy(c).then(j=>!p&&f(j)).catch(j=>!p&&v(j.message)),()=>{p=!0}},[c]),o?n.jsxs("div",{className:"error",children:["Error: ",o]}):d?n.jsxs("div",{children:[n.jsx("div",{className:"detail-back",children:n.jsx("a",{href:"#/see/agents",children:"← Agents"})}),n.jsxs("h2",{className:"task-detail-title",children:[d.agent,d.instanceId?n.jsxs(n.Fragment,{children:[" ",n.jsx("code",{children:d.instanceId})]}):n.jsx("span",{className:"muted",children:" (unknown instance)"})]}),n.jsxs("div",{className:"instance-panels",children:[n.jsx(Mc,{title:"MCP servers",rows:d.mcpServers,empty:"No MCP calls."}),n.jsx(Mc,{title:"Skills",rows:d.skills,empty:"No skills used."}),n.jsx(Mc,{title:"Tools",rows:d.tools,empty:"No tool calls."})]}),n.jsxs("section",{className:"home-section",children:[n.jsx("h3",{children:"Tasks"}),d.tasks.length===0?n.jsx("p",{className:"hint",children:"No tasks recorded for this instance."}):n.jsx("div",{className:"run-list-wrap",children:n.jsxs("table",{className:"runs",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{children:"Task"}),n.jsx("th",{children:"Started"}),n.jsx("th",{children:"Model"}),n.jsx("th",{children:"Status"}),n.jsx("th",{children:"Runs"}),n.jsx("th",{children:"Dur"})]})}),n.jsx("tbody",{children:d.tasks.map(p=>n.jsxs("tr",{className:qc(p.outcome),onClick:()=>{window.location.hash=`#/task/${encodeURIComponent(p.id)}`},children:[n.jsx("td",{children:p.title?n.jsx("span",{className:"task-title",children:p.title}):n.jsx("code",{children:Ua(p.id)})}),n.jsx("td",{children:n.jsx(lt,{ms:p.startedAt})}),n.jsx("td",{children:p.model?n.jsx("code",{children:p.model}):n.jsx("span",{className:"muted",children:"—"})}),n.jsx("td",{children:p.outcome!=="ok"?n.jsx(tu,{outcome:p.outcome}):p.endedAt==null?n.jsx("span",{className:"muted",children:"running"}):"done"}),n.jsx("td",{children:p.runCount}),n.jsx("td",{children:n.jsx(Mn,{ms:p.durMs})})]},p.id))})]})})]})]}):n.jsx("div",{className:"loading",children:"Loading…"})}function wg(){const[c,d]=H.useState(window.location.hash);H.useEffect(()=>{const j=()=>d(window.location.hash);return window.addEventListener("hashchange",j),()=>window.removeEventListener("hashchange",j)},[]);const f=/^#\/run\/(.+)$/.exec(c)?.[1],o=/^#\/task\/(.+)$/.exec(c)?.[1],v=/^#\/instance\/(.+)$/.exec(c)?.[1],p=f||o||v||/^#\/(see|tasks)/.test(c)?"see":/^#\/routing/.test(c)?"routing":/^#\/keys/.test(c)?"keys":/^#\/guard/.test(c)?"guard":"home";return n.jsxs("div",{className:"app",children:[n.jsx(Dy,{active:p}),n.jsx("main",{children:f?n.jsx(gg,{runId:decodeURIComponent(f)}):o?n.jsx(Bg,{taskId:decodeURIComponent(o)}):v?n.jsx(Yg,{instanceKey:v}):p==="see"?n.jsx(qg,{hash:c}):p==="routing"?n.jsx(cg,{}):p==="keys"?n.jsx(Xy,{}):p==="guard"?n.jsx(qy,{}):n.jsx(Yy,{})})]})}const Th=document.getElementById("root");if(!Th)throw new Error("#root element not found");ny.createRoot(Th).render(n.jsx(H.StrictMode,{children:n.jsx(wg,{})}));