@feltdb/feltkit 0.3.2 → 0.3.3

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.
Files changed (55) hide show
  1. package/README.md +7 -0
  2. package/dist/cli/deploy.d.ts +11 -1
  3. package/dist/cli/deploy.js +279 -63
  4. package/dist/cli/deploy.js.map +1 -1
  5. package/dist/cli/main.js +68 -17
  6. package/dist/cli/main.js.map +1 -1
  7. package/dist/dashboard/apple-touch-icon.png +0 -0
  8. package/dist/dashboard/assets/feltkit-mark-BygpVIiS.png +0 -0
  9. package/dist/dashboard/assets/index-B-ra0AY9.css +1 -0
  10. package/dist/dashboard/assets/index-DnJaSnzt.js +15 -0
  11. package/dist/dashboard/favicon.png +0 -0
  12. package/dist/dashboard/index.html +5 -3
  13. package/dist/dashboard/theme.js +6 -0
  14. package/dist/runtime/connect.d.ts +65 -0
  15. package/dist/runtime/connect.js +246 -0
  16. package/dist/runtime/connect.js.map +1 -0
  17. package/dist/runtime/contract.d.ts +15 -5
  18. package/dist/runtime/contract.js +36 -12
  19. package/dist/runtime/contract.js.map +1 -1
  20. package/dist/runtime/decisions.d.ts +32 -4
  21. package/dist/runtime/decisions.js +69 -0
  22. package/dist/runtime/decisions.js.map +1 -1
  23. package/dist/runtime/environment.js +41 -0
  24. package/dist/runtime/environment.js.map +1 -1
  25. package/dist/runtime/readiness.js +5 -3
  26. package/dist/runtime/readiness.js.map +1 -1
  27. package/dist/runtime/runtime.d.ts +11 -0
  28. package/dist/runtime/runtime.js +32 -14
  29. package/dist/runtime/runtime.js.map +1 -1
  30. package/dist/runtime/services.d.ts +11 -2
  31. package/dist/runtime/services.js +5 -0
  32. package/dist/runtime/services.js.map +1 -1
  33. package/dist/runtime/storage-check.d.ts +12 -0
  34. package/dist/runtime/storage-check.js +99 -0
  35. package/dist/runtime/storage-check.js.map +1 -0
  36. package/dist/runtime/targets.d.ts +57 -0
  37. package/dist/runtime/targets.js +106 -0
  38. package/dist/runtime/targets.js.map +1 -0
  39. package/dist/server/admin.js +153 -0
  40. package/dist/server/admin.js.map +1 -1
  41. package/dist/server/brand.d.ts +5 -0
  42. package/dist/server/brand.js +6 -0
  43. package/dist/server/brand.js.map +1 -0
  44. package/dist/server/index.js +50 -0
  45. package/dist/server/index.js.map +1 -1
  46. package/dist/server/project.d.ts +8 -0
  47. package/dist/server/project.js +27 -3
  48. package/dist/server/project.js.map +1 -1
  49. package/package.json +5 -5
  50. package/skills/.claude-plugin/marketplace.json +1 -1
  51. package/skills/.claude-plugin/plugin.json +1 -1
  52. package/skills/feltkit-operations/SKILL.md +3 -1
  53. package/skills/feltkit-services/SKILL.md +3 -3
  54. package/dist/dashboard/assets/index-Bo2oHR18.css +0 -1
  55. package/dist/dashboard/assets/index-DK_Jda9P.js +0 -15
@@ -1,15 +0,0 @@
1
- (function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const p of document.querySelectorAll('link[rel="modulepreload"]'))r(p);new MutationObserver(p=>{for(const y of p)if(y.type==="childList")for(const m of y.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&r(m)}).observe(document,{childList:!0,subtree:!0});function f(p){const y={};return p.integrity&&(y.integrity=p.integrity),p.referrerPolicy&&(y.referrerPolicy=p.referrerPolicy),p.crossOrigin==="use-credentials"?y.credentials="include":p.crossOrigin==="anonymous"?y.credentials="omit":y.credentials="same-origin",y}function r(p){if(p.ep)return;p.ep=!0;const y=f(p);fetch(p.href,y)}})();var Mu={exports:{}},Bn={};var Pf;function sp(){if(Pf)return Bn;Pf=1;var c=Symbol.for("react.transitional.element"),o=Symbol.for("react.fragment");function f(r,p,y){var m=null;if(y!==void 0&&(m=""+y),p.key!==void 0&&(m=""+p.key),"key"in p){y={};for(var S in p)S!=="key"&&(y[S]=p[S])}else y=p;return p=y.ref,{$$typeof:c,type:r,key:m,ref:p!==void 0?p:null,props:y}}return Bn.Fragment=o,Bn.jsx=f,Bn.jsxs=f,Bn}var eh;function cp(){return eh||(eh=1,Mu.exports=sp()),Mu.exports}var n=cp(),Uu={exports:{}},te={};var th;function up(){if(th)return te;th=1;var c=Symbol.for("react.transitional.element"),o=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),p=Symbol.for("react.profiler"),y=Symbol.for("react.consumer"),m=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),q=Symbol.iterator;function k(g){return g===null||typeof g!="object"?null:(g=q&&g[q]||g["@@iterator"],typeof g=="function"?g:null)}var L={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},z=Object.assign,D={};function R(g,B,V){this.props=g,this.context=B,this.refs=D,this.updater=V||L}R.prototype.isReactComponent={},R.prototype.setState=function(g,B){if(typeof g!="object"&&typeof g!="function"&&g!=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,g,B,"setState")},R.prototype.forceUpdate=function(g){this.updater.enqueueForceUpdate(this,g,"forceUpdate")};function X(){}X.prototype=R.prototype;function G(g,B,V){this.props=g,this.context=B,this.refs=D,this.updater=V||L}var le=G.prototype=new X;le.constructor=G,z(le,R.prototype),le.isPureReactComponent=!0;var xe=Array.isArray;function Ce(){}var Y={H:null,A:null,T:null,S:null},fe=Object.prototype.hasOwnProperty;function De(g,B,V){var K=V.ref;return{$$typeof:c,type:g,key:B,ref:K!==void 0?K:null,props:V}}function Qt(g,B){return De(g.type,B,g.props)}function nt(g){return typeof g=="object"&&g!==null&&g.$$typeof===c}function Xe(g){var B={"=":"=0",":":"=2"};return"$"+g.replace(/[=:]/g,function(V){return B[V]})}var Ht=/\/+/g;function Bt(g,B){return typeof g=="object"&&g!==null&&g.key!=null?Xe(""+g.key):B.toString(36)}function ht(g){switch(g.status){case"fulfilled":return g.value;case"rejected":throw g.reason;default:switch(typeof g.status=="string"?g.then(Ce,Ce):(g.status="pending",g.then(function(B){g.status==="pending"&&(g.status="fulfilled",g.value=B)},function(B){g.status==="pending"&&(g.status="rejected",g.reason=B)})),g.status){case"fulfilled":return g.value;case"rejected":throw g.reason}}throw g}function C(g,B,V,K,ae){var se=typeof g;(se==="undefined"||se==="boolean")&&(g=null);var je=!1;if(g===null)je=!0;else switch(se){case"bigint":case"string":case"number":je=!0;break;case"object":switch(g.$$typeof){case c:case o:je=!0;break;case b:return je=g._init,C(je(g._payload),B,V,K,ae)}}if(je)return ae=ae(g),je=K===""?"."+Bt(g,0):K,xe(ae)?(V="",je!=null&&(V=je.replace(Ht,"$&/")+"/"),C(ae,B,V,"",function(Xa){return Xa})):ae!=null&&(nt(ae)&&(ae=Qt(ae,V+(ae.key==null||g&&g.key===ae.key?"":(""+ae.key).replace(Ht,"$&/")+"/")+je)),B.push(ae)),1;je=0;var et=K===""?".":K+":";if(xe(g))for(var qe=0;qe<g.length;qe++)K=g[qe],se=et+Bt(K,qe),je+=C(K,B,V,se,ae);else if(qe=k(g),typeof qe=="function")for(g=qe.call(g),qe=0;!(K=g.next()).done;)K=K.value,se=et+Bt(K,qe++),je+=C(K,B,V,se,ae);else if(se==="object"){if(typeof g.then=="function")return C(ht(g),B,V,K,ae);throw B=String(g),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(g).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return je}function Q(g,B,V){if(g==null)return g;var K=[],ae=0;return C(g,K,"","",function(se){return B.call(V,se,ae++)}),K}function P(g){if(g._status===-1){var B=g._result;B=B(),B.then(function(V){(g._status===0||g._status===-1)&&(g._status=1,g._result=V)},function(V){(g._status===0||g._status===-1)&&(g._status=2,g._result=V)}),g._status===-1&&(g._status=0,g._result=B)}if(g._status===1)return g._result.default;throw g._result}var ye=typeof reportError=="function"?reportError:function(g){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof g=="object"&&g!==null&&typeof g.message=="string"?String(g.message):String(g),error:g});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",g);return}console.error(g)},Ae={map:Q,forEach:function(g,B,V){Q(g,function(){B.apply(this,arguments)},V)},count:function(g){var B=0;return Q(g,function(){B++}),B},toArray:function(g){return Q(g,function(B){return B})||[]},only:function(g){if(!nt(g))throw Error("React.Children.only expected to receive a single React element child.");return g}};return te.Activity=N,te.Children=Ae,te.Component=R,te.Fragment=f,te.Profiler=p,te.PureComponent=G,te.StrictMode=r,te.Suspense=h,te.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Y,te.__COMPILER_RUNTIME={__proto__:null,c:function(g){return Y.H.useMemoCache(g)}},te.cache=function(g){return function(){return g.apply(null,arguments)}},te.cacheSignal=function(){return null},te.cloneElement=function(g,B,V){if(g==null)throw Error("The argument must be a React element, but you passed "+g+".");var K=z({},g.props),ae=g.key;if(B!=null)for(se in B.key!==void 0&&(ae=""+B.key),B)!fe.call(B,se)||se==="key"||se==="__self"||se==="__source"||se==="ref"&&B.ref===void 0||(K[se]=B[se]);var se=arguments.length-2;if(se===1)K.children=V;else if(1<se){for(var je=Array(se),et=0;et<se;et++)je[et]=arguments[et+2];K.children=je}return De(g.type,ae,K)},te.createContext=function(g){return g={$$typeof:m,_currentValue:g,_currentValue2:g,_threadCount:0,Provider:null,Consumer:null},g.Provider=g,g.Consumer={$$typeof:y,_context:g},g},te.createElement=function(g,B,V){var K,ae={},se=null;if(B!=null)for(K in B.key!==void 0&&(se=""+B.key),B)fe.call(B,K)&&K!=="key"&&K!=="__self"&&K!=="__source"&&(ae[K]=B[K]);var je=arguments.length-2;if(je===1)ae.children=V;else if(1<je){for(var et=Array(je),qe=0;qe<je;qe++)et[qe]=arguments[qe+2];ae.children=et}if(g&&g.defaultProps)for(K in je=g.defaultProps,je)ae[K]===void 0&&(ae[K]=je[K]);return De(g,se,ae)},te.createRef=function(){return{current:null}},te.forwardRef=function(g){return{$$typeof:S,render:g}},te.isValidElement=nt,te.lazy=function(g){return{$$typeof:b,_payload:{_status:-1,_result:g},_init:P}},te.memo=function(g,B){return{$$typeof:v,type:g,compare:B===void 0?null:B}},te.startTransition=function(g){var B=Y.T,V={};Y.T=V;try{var K=g(),ae=Y.S;ae!==null&&ae(V,K),typeof K=="object"&&K!==null&&typeof K.then=="function"&&K.then(Ce,ye)}catch(se){ye(se)}finally{B!==null&&V.types!==null&&(B.types=V.types),Y.T=B}},te.unstable_useCacheRefresh=function(){return Y.H.useCacheRefresh()},te.use=function(g){return Y.H.use(g)},te.useActionState=function(g,B,V){return Y.H.useActionState(g,B,V)},te.useCallback=function(g,B){return Y.H.useCallback(g,B)},te.useContext=function(g){return Y.H.useContext(g)},te.useDebugValue=function(){},te.useDeferredValue=function(g,B){return Y.H.useDeferredValue(g,B)},te.useEffect=function(g,B){return Y.H.useEffect(g,B)},te.useEffectEvent=function(g){return Y.H.useEffectEvent(g)},te.useId=function(){return Y.H.useId()},te.useImperativeHandle=function(g,B,V){return Y.H.useImperativeHandle(g,B,V)},te.useInsertionEffect=function(g,B){return Y.H.useInsertionEffect(g,B)},te.useLayoutEffect=function(g,B){return Y.H.useLayoutEffect(g,B)},te.useMemo=function(g,B){return Y.H.useMemo(g,B)},te.useOptimistic=function(g,B){return Y.H.useOptimistic(g,B)},te.useReducer=function(g,B,V){return Y.H.useReducer(g,B,V)},te.useRef=function(g){return Y.H.useRef(g)},te.useState=function(g){return Y.H.useState(g)},te.useSyncExternalStore=function(g,B,V){return Y.H.useSyncExternalStore(g,B,V)},te.useTransition=function(){return Y.H.useTransition()},te.version="19.2.0",te}var lh;function Ku(){return lh||(lh=1,Uu.exports=up()),Uu.exports}var M=Ku(),wu={exports:{}},kn={},qu={exports:{}},Hu={};var ah;function rp(){return ah||(ah=1,(function(c){function o(C,Q){var P=C.length;C.push(Q);e:for(;0<P;){var ye=P-1>>>1,Ae=C[ye];if(0<p(Ae,Q))C[ye]=Q,C[P]=Ae,P=ye;else break e}}function f(C){return C.length===0?null:C[0]}function r(C){if(C.length===0)return null;var Q=C[0],P=C.pop();if(P!==Q){C[0]=P;e:for(var ye=0,Ae=C.length,g=Ae>>>1;ye<g;){var B=2*(ye+1)-1,V=C[B],K=B+1,ae=C[K];if(0>p(V,P))K<Ae&&0>p(ae,V)?(C[ye]=ae,C[K]=P,ye=K):(C[ye]=V,C[B]=P,ye=B);else if(K<Ae&&0>p(ae,P))C[ye]=ae,C[K]=P,ye=K;else break e}}return Q}function p(C,Q){var P=C.sortIndex-Q.sortIndex;return P!==0?P:C.id-Q.id}if(c.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var y=performance;c.unstable_now=function(){return y.now()}}else{var m=Date,S=m.now();c.unstable_now=function(){return m.now()-S}}var h=[],v=[],b=1,N=null,q=3,k=!1,L=!1,z=!1,D=!1,R=typeof setTimeout=="function"?setTimeout:null,X=typeof clearTimeout=="function"?clearTimeout:null,G=typeof setImmediate<"u"?setImmediate:null;function le(C){for(var Q=f(v);Q!==null;){if(Q.callback===null)r(v);else if(Q.startTime<=C)r(v),Q.sortIndex=Q.expirationTime,o(h,Q);else break;Q=f(v)}}function xe(C){if(z=!1,le(C),!L)if(f(h)!==null)L=!0,Ce||(Ce=!0,Xe());else{var Q=f(v);Q!==null&&ht(xe,Q.startTime-C)}}var Ce=!1,Y=-1,fe=5,De=-1;function Qt(){return D?!0:!(c.unstable_now()-De<fe)}function nt(){if(D=!1,Ce){var C=c.unstable_now();De=C;var Q=!0;try{e:{L=!1,z&&(z=!1,X(Y),Y=-1),k=!0;var P=q;try{t:{for(le(C),N=f(h);N!==null&&!(N.expirationTime>C&&Qt());){var ye=N.callback;if(typeof ye=="function"){N.callback=null,q=N.priorityLevel;var Ae=ye(N.expirationTime<=C);if(C=c.unstable_now(),typeof Ae=="function"){N.callback=Ae,le(C),Q=!0;break t}N===f(h)&&r(h),le(C)}else r(h);N=f(h)}if(N!==null)Q=!0;else{var g=f(v);g!==null&&ht(xe,g.startTime-C),Q=!1}}break e}finally{N=null,q=P,k=!1}Q=void 0}}finally{Q?Xe():Ce=!1}}}var Xe;if(typeof G=="function")Xe=function(){G(nt)};else if(typeof MessageChannel<"u"){var Ht=new MessageChannel,Bt=Ht.port2;Ht.port1.onmessage=nt,Xe=function(){Bt.postMessage(null)}}else Xe=function(){R(nt,0)};function ht(C,Q){Y=R(function(){C(c.unstable_now())},Q)}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(C){C.callback=null},c.unstable_forceFrameRate=function(C){0>C||125<C?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):fe=0<C?Math.floor(1e3/C):5},c.unstable_getCurrentPriorityLevel=function(){return q},c.unstable_next=function(C){switch(q){case 1:case 2:case 3:var Q=3;break;default:Q=q}var P=q;q=Q;try{return C()}finally{q=P}},c.unstable_requestPaint=function(){D=!0},c.unstable_runWithPriority=function(C,Q){switch(C){case 1:case 2:case 3:case 4:case 5:break;default:C=3}var P=q;q=C;try{return Q()}finally{q=P}},c.unstable_scheduleCallback=function(C,Q,P){var ye=c.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?ye+P:ye):P=ye,C){case 1:var Ae=-1;break;case 2:Ae=250;break;case 5:Ae=1073741823;break;case 4:Ae=1e4;break;default:Ae=5e3}return Ae=P+Ae,C={id:b++,callback:Q,priorityLevel:C,startTime:P,expirationTime:Ae,sortIndex:-1},P>ye?(C.sortIndex=P,o(v,C),f(h)===null&&C===f(v)&&(z?(X(Y),Y=-1):z=!0,ht(xe,P-ye))):(C.sortIndex=Ae,o(h,C),L||k||(L=!0,Ce||(Ce=!0,Xe()))),C},c.unstable_shouldYield=Qt,c.unstable_wrapCallback=function(C){var Q=q;return function(){var P=q;q=Q;try{return C.apply(this,arguments)}finally{q=P}}}})(Hu)),Hu}var nh;function op(){return nh||(nh=1,qu.exports=rp()),qu.exports}var Bu={exports:{}},Pe={};var ih;function dp(){if(ih)return Pe;ih=1;var c=Ku();function o(h){var v="https://react.dev/errors/"+h;if(1<arguments.length){v+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)v+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+h+"; visit "+v+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(){}var r={d:{f,r:function(){throw Error(o(522))},D:f,C:f,L:f,m:f,X:f,S:f,M:f},p:0,findDOMNode:null},p=Symbol.for("react.portal");function y(h,v,b){var N=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:p,key:N==null?null:""+N,children:h,containerInfo:v,implementation:b}}var m=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function S(h,v){if(h==="font")return"";if(typeof v=="string")return v==="use-credentials"?v:""}return Pe.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Pe.createPortal=function(h,v){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!v||v.nodeType!==1&&v.nodeType!==9&&v.nodeType!==11)throw Error(o(299));return y(h,v,null,b)},Pe.flushSync=function(h){var v=m.T,b=r.p;try{if(m.T=null,r.p=2,h)return h()}finally{m.T=v,r.p=b,r.d.f()}},Pe.preconnect=function(h,v){typeof h=="string"&&(v?(v=v.crossOrigin,v=typeof v=="string"?v==="use-credentials"?v:"":void 0):v=null,r.d.C(h,v))},Pe.prefetchDNS=function(h){typeof h=="string"&&r.d.D(h)},Pe.preinit=function(h,v){if(typeof h=="string"&&v&&typeof v.as=="string"){var b=v.as,N=S(b,v.crossOrigin),q=typeof v.integrity=="string"?v.integrity:void 0,k=typeof v.fetchPriority=="string"?v.fetchPriority:void 0;b==="style"?r.d.S(h,typeof v.precedence=="string"?v.precedence:void 0,{crossOrigin:N,integrity:q,fetchPriority:k}):b==="script"&&r.d.X(h,{crossOrigin:N,integrity:q,fetchPriority:k,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},Pe.preinitModule=function(h,v){if(typeof h=="string")if(typeof v=="object"&&v!==null){if(v.as==null||v.as==="script"){var b=S(v.as,v.crossOrigin);r.d.M(h,{crossOrigin:b,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0})}}else v==null&&r.d.M(h)},Pe.preload=function(h,v){if(typeof h=="string"&&typeof v=="object"&&v!==null&&typeof v.as=="string"){var b=v.as,N=S(b,v.crossOrigin);r.d.L(h,b,{crossOrigin:N,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,type:typeof v.type=="string"?v.type:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0,referrerPolicy:typeof v.referrerPolicy=="string"?v.referrerPolicy:void 0,imageSrcSet:typeof v.imageSrcSet=="string"?v.imageSrcSet:void 0,imageSizes:typeof v.imageSizes=="string"?v.imageSizes:void 0,media:typeof v.media=="string"?v.media:void 0})}},Pe.preloadModule=function(h,v){if(typeof h=="string")if(v){var b=S(v.as,v.crossOrigin);r.d.m(h,{as:typeof v.as=="string"&&v.as!=="script"?v.as:void 0,crossOrigin:b,integrity:typeof v.integrity=="string"?v.integrity:void 0})}else r.d.m(h)},Pe.requestFormReset=function(h){r.d.r(h)},Pe.unstable_batchedUpdates=function(h,v){return h(v)},Pe.useFormState=function(h,v,b){return m.H.useFormState(h,v,b)},Pe.useFormStatus=function(){return m.H.useHostTransitionStatus()},Pe.version="19.2.0",Pe}var sh;function fp(){if(sh)return Bu.exports;sh=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(o){console.error(o)}}return c(),Bu.exports=dp(),Bu.exports}var ch;function hp(){if(ch)return kn;ch=1;var c=op(),o=Ku(),f=fp();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function p(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function y(e){var t=e,l=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(l=t.return),e=t.return;while(e)}return t.tag===3?l:null}function m(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function S(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function h(e){if(y(e)!==e)throw Error(r(188))}function v(e){var t=e.alternate;if(!t){if(t=y(e),t===null)throw Error(r(188));return t!==e?null:e}for(var l=e,a=t;;){var i=l.return;if(i===null)break;var s=i.alternate;if(s===null){if(a=i.return,a!==null){l=a;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===l)return h(i),e;if(s===a)return h(i),t;s=s.sibling}throw Error(r(188))}if(l.return!==a.return)l=i,a=s;else{for(var u=!1,d=i.child;d;){if(d===l){u=!0,l=i,a=s;break}if(d===a){u=!0,a=i,l=s;break}d=d.sibling}if(!u){for(d=s.child;d;){if(d===l){u=!0,l=s,a=i;break}if(d===a){u=!0,a=s,l=i;break}d=d.sibling}if(!u)throw Error(r(189))}}if(l.alternate!==a)throw Error(r(190))}if(l.tag!==3)throw Error(r(188));return l.stateNode.current===l?e:t}function b(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=b(e),t!==null)return t;e=e.sibling}return null}var N=Object.assign,q=Symbol.for("react.element"),k=Symbol.for("react.transitional.element"),L=Symbol.for("react.portal"),z=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),X=Symbol.for("react.consumer"),G=Symbol.for("react.context"),le=Symbol.for("react.forward_ref"),xe=Symbol.for("react.suspense"),Ce=Symbol.for("react.suspense_list"),Y=Symbol.for("react.memo"),fe=Symbol.for("react.lazy"),De=Symbol.for("react.activity"),Qt=Symbol.for("react.memo_cache_sentinel"),nt=Symbol.iterator;function Xe(e){return e===null||typeof e!="object"?null:(e=nt&&e[nt]||e["@@iterator"],typeof e=="function"?e:null)}var Ht=Symbol.for("react.client.reference");function Bt(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Ht?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case z:return"Fragment";case R:return"Profiler";case D:return"StrictMode";case xe:return"Suspense";case Ce:return"SuspenseList";case De:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case L:return"Portal";case G:return e.displayName||"Context";case X:return(e._context.displayName||"Context")+".Consumer";case le:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Y:return t=e.displayName||null,t!==null?t:Bt(e.type)||"Memo";case fe:t=e._payload,e=e._init;try{return Bt(e(t))}catch{}}return null}var ht=Array.isArray,C=o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=f.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P={pending:!1,data:null,method:null,action:null},ye=[],Ae=-1;function g(e){return{current:e}}function B(e){0>Ae||(e.current=ye[Ae],ye[Ae]=null,Ae--)}function V(e,t){Ae++,ye[Ae]=e.current,e.current=t}var K=g(null),ae=g(null),se=g(null),je=g(null);function et(e,t){switch(V(se,t),V(ae,e),V(K,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Sf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Sf(t),e=Nf(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(K),V(K,e)}function qe(){B(K),B(ae),B(se)}function Xa(e){e.memoizedState!==null&&V(je,e);var t=K.current,l=Nf(t,e.type);t!==l&&(V(ae,e),V(K,l))}function Gn(e){ae.current===e&&(B(K),B(ae)),je.current===e&&(B(je),Un._currentValue=P)}var vs,Fu;function Bl(e){if(vs===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);vs=t&&t[1]||"",Fu=-1<l.stack.indexOf(`
2
- at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
3
- `+vs+e+Fu}var ps=!1;function ys(e,t){if(!e||ps)return"";ps=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var H=function(){throw Error()};if(Object.defineProperty(H.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(H,[])}catch(_){var O=_}Reflect.construct(e,[],H)}else{try{H.call()}catch(_){O=_}e.call(H.prototype)}}else{try{throw Error()}catch(_){O=_}(H=e())&&typeof H.catch=="function"&&H.catch(function(){})}}catch(_){if(_&&O&&typeof _.stack=="string")return[_.stack,O.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 s=a.DetermineComponentFrameRoot(),u=s[0],d=s[1];if(u&&d){var j=u.split(`
4
- `),T=d.split(`
5
- `);for(i=a=0;a<j.length&&!j[a].includes("DetermineComponentFrameRoot");)a++;for(;i<T.length&&!T[i].includes("DetermineComponentFrameRoot");)i++;if(a===j.length||i===T.length)for(a=j.length-1,i=T.length-1;1<=a&&0<=i&&j[a]!==T[i];)i--;for(;1<=a&&0<=i;a--,i--)if(j[a]!==T[i]){if(a!==1||i!==1)do if(a--,i--,0>i||j[a]!==T[i]){var U=`
6
- `+j[a].replace(" at new "," at ");return e.displayName&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",e.displayName)),U}while(1<=a&&0<=i);break}}}finally{ps=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?Bl(l):""}function Hh(e,t){switch(e.tag){case 26:case 27:case 5:return Bl(e.type);case 16:return Bl("Lazy");case 13:return e.child!==t&&t!==null?Bl("Suspense Fallback"):Bl("Suspense");case 19:return Bl("SuspenseList");case 0:case 15:return ys(e.type,!1);case 11:return ys(e.type.render,!1);case 1:return ys(e.type,!0);case 31:return Bl("Activity");default:return""}}function Wu(e){try{var t="",l=null;do t+=Hh(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
7
- Error generating stack: `+a.message+`
8
- `+a.stack}}var js=Object.prototype.hasOwnProperty,xs=c.unstable_scheduleCallback,bs=c.unstable_cancelCallback,Bh=c.unstable_shouldYield,kh=c.unstable_requestPaint,mt=c.unstable_now,Yh=c.unstable_getCurrentPriorityLevel,Iu=c.unstable_ImmediatePriority,Pu=c.unstable_UserBlockingPriority,Qn=c.unstable_NormalPriority,Lh=c.unstable_LowPriority,er=c.unstable_IdlePriority,Gh=c.log,Qh=c.unstable_setDisableYieldValue,Va=null,vt=null;function fl(e){if(typeof Gh=="function"&&Qh(e),vt&&typeof vt.setStrictMode=="function")try{vt.setStrictMode(Va,e)}catch{}}var pt=Math.clz32?Math.clz32:Zh,Xh=Math.log,Vh=Math.LN2;function Zh(e){return e>>>=0,e===0?32:31-(Xh(e)/Vh|0)|0}var Xn=256,Vn=262144,Zn=4194304;function kl(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Kn(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var i=0,s=e.suspendedLanes,u=e.pingedLanes;e=e.warmLanes;var d=a&134217727;return d!==0?(a=d&~s,a!==0?i=kl(a):(u&=d,u!==0?i=kl(u):l||(l=d&~e,l!==0&&(i=kl(l))))):(d=a&~s,d!==0?i=kl(d):u!==0?i=kl(u):l||(l=a&~e,l!==0&&(i=kl(l)))),i===0?0:t!==0&&t!==i&&(t&s)===0&&(s=i&-i,l=t&-t,s>=l||s===32&&(l&4194048)!==0)?t:i}function Za(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Kh(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function tr(){var e=Zn;return Zn<<=1,(Zn&62914560)===0&&(Zn=4194304),e}function gs(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Ka(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Jh(e,t,l,a,i,s){var u=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var d=e.entanglements,j=e.expirationTimes,T=e.hiddenUpdates;for(l=u&~l;0<l;){var U=31-pt(l),H=1<<U;d[U]=0,j[U]=-1;var O=T[U];if(O!==null)for(T[U]=null,U=0;U<O.length;U++){var _=O[U];_!==null&&(_.lane&=-536870913)}l&=~H}a!==0&&lr(e,a,0),s!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=s&~(u&~t))}function lr(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-pt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function ar(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-pt(l),i=1<<a;i&t|e[a]&t&&(e[a]|=t),l&=~i}}function nr(e,t){var l=t&-t;return l=(l&42)!==0?1:Ss(l),(l&(e.suspendedLanes|t))!==0?0:l}function Ss(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 Ns(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ir(){var e=Q.p;return e!==0?e:(e=window.event,e===void 0?32:Zf(e.type))}function sr(e,t){var l=Q.p;try{return Q.p=e,t()}finally{Q.p=l}}var hl=Math.random().toString(36).slice(2),Je="__reactFiber$"+hl,it="__reactProps$"+hl,na="__reactContainer$"+hl,Es="__reactEvents$"+hl,$h="__reactListeners$"+hl,Fh="__reactHandles$"+hl,cr="__reactResources$"+hl,Ja="__reactMarker$"+hl;function As(e){delete e[Je],delete e[it],delete e[Es],delete e[$h],delete e[Fh]}function ia(e){var t=e[Je];if(t)return t;for(var l=e.parentNode;l;){if(t=l[na]||l[Je]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=_f(e);e!==null;){if(l=e[Je])return l;e=_f(e)}return t}e=l,l=e.parentNode}return null}function sa(e){if(e=e[Je]||e[na]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function $a(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function ca(e){var t=e[cr];return t||(t=e[cr]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ve(e){e[Ja]=!0}var ur=new Set,rr={};function Yl(e,t){ua(e,t),ua(e+"Capture",t)}function ua(e,t){for(rr[e]=t,e=0;e<t.length;e++)ur.add(t[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]*$"),or={},dr={};function Ih(e){return js.call(dr,e)?!0:js.call(or,e)?!1:Wh.test(e)?dr[e]=!0:(or[e]=!0,!1)}function Jn(e,t,l){if(Ih(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function $n(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+l)}}function Jt(e,t,l,a){if(a===null)e.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+a)}}function Tt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function fr(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ph(e,t,l){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var i=a.get,s=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(u){l=""+u,s.call(this,u)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(u){l=""+u},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ts(e){if(!e._valueTracker){var t=fr(e)?"checked":"value";e._valueTracker=Ph(e,t,""+e[t])}}function hr(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=fr(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}function Fn(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 em=/[\n"\\]/g;function zt(e){return e.replace(em,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function zs(e,t,l,a,i,s,u,d){e.name="",u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"?e.type=u:e.removeAttribute("type"),t!=null?u==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Tt(t)):e.value!==""+Tt(t)&&(e.value=""+Tt(t)):u!=="submit"&&u!=="reset"||e.removeAttribute("value"),t!=null?Cs(e,u,Tt(t)):l!=null?Cs(e,u,Tt(l)):a!=null&&e.removeAttribute("value"),i==null&&s!=null&&(e.defaultChecked=!!s),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?e.name=""+Tt(d):e.removeAttribute("name")}function mr(e,t,l,a,i,s,u,d){if(s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.type=s),t!=null||l!=null){if(!(s!=="submit"&&s!=="reset"||t!=null)){Ts(e);return}l=l!=null?""+Tt(l):"",t=t!=null?""+Tt(t):l,d||t===e.value||(e.value=t),e.defaultValue=t}a=a??i,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=d?e.checked:!!a,e.defaultChecked=!!a,u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.name=u),Ts(e)}function Cs(e,t,l){t==="number"&&Fn(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function ra(e,t,l,a){if(e=e.options,t){t={};for(var i=0;i<l.length;i++)t["$"+l[i]]=!0;for(l=0;l<e.length;l++)i=t.hasOwnProperty("$"+e[l].value),e[l].selected!==i&&(e[l].selected=i),i&&a&&(e[l].defaultSelected=!0)}else{for(l=""+Tt(l),t=null,i=0;i<e.length;i++){if(e[i].value===l){e[i].selected=!0,a&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function vr(e,t,l){if(t!=null&&(t=""+Tt(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+Tt(l):""}function pr(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(r(92));if(ht(a)){if(1<a.length)throw Error(r(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=Tt(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),Ts(e)}function oa(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var tm=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 yr(e,t,l){var a=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,l):typeof l!="number"||l===0||tm.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function jr(e,t,l){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,l!=null){for(var a in l)!l.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var i in t)a=t[i],t.hasOwnProperty(i)&&l[i]!==a&&yr(e,i,a)}else for(var s in t)t.hasOwnProperty(s)&&yr(e,s,t[s])}function Os(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 lm=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"]]),am=/^[\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 Wn(e){return am.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function $t(){}var _s=null;function Ds(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var da=null,fa=null;function xr(e){var t=sa(e);if(t&&(e=t.stateNode)){var l=e[it]||null;e:switch(e=t.stateNode,t.type){case"input":if(zs(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+zt(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var i=a[it]||null;if(!i)throw Error(r(90));zs(a,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<l.length;t++)a=l[t],a.form===e.form&&hr(a)}break e;case"textarea":vr(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&ra(e,!!l.multiple,t,!1)}}}var Rs=!1;function br(e,t,l){if(Rs)return e(t,l);Rs=!0;try{var a=e(t);return a}finally{if(Rs=!1,(da!==null||fa!==null)&&(Bi(),da&&(t=da,e=fa,fa=da=null,xr(t),e)))for(t=0;t<e.length;t++)xr(e[t])}}function Fa(e,t){var l=e.stateNode;if(l===null)return null;var a=l[it]||null;if(a===null)return null;l=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(r(231,t,typeof l));return l}var Ft=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ms=!1;if(Ft)try{var Wa={};Object.defineProperty(Wa,"passive",{get:function(){Ms=!0}}),window.addEventListener("test",Wa,Wa),window.removeEventListener("test",Wa,Wa)}catch{Ms=!1}var ml=null,Us=null,In=null;function gr(){if(In)return In;var e,t=Us,l=t.length,a,i="value"in ml?ml.value:ml.textContent,s=i.length;for(e=0;e<l&&t[e]===i[e];e++);var u=l-e;for(a=1;a<=u&&t[l-a]===i[s-a];a++);return In=i.slice(e,1<a?1-a:void 0)}function Pn(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ei(){return!0}function Sr(){return!1}function st(e){function t(l,a,i,s,u){this._reactName=l,this._targetInst=i,this.type=a,this.nativeEvent=s,this.target=u,this.currentTarget=null;for(var d in e)e.hasOwnProperty(d)&&(l=e[d],this[d]=l?l(s):s[d]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?ei:Sr,this.isPropagationStopped=Sr,this}return N(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=ei)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=ei)},persist:function(){},isPersistent:ei}),t}var Ll={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ti=st(Ll),Ia=N({},Ll,{view:0,detail:0}),nm=st(Ia),ws,qs,Pa,li=N({},Ia,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bs,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!==Pa&&(Pa&&e.type==="mousemove"?(ws=e.screenX-Pa.screenX,qs=e.screenY-Pa.screenY):qs=ws=0,Pa=e),ws)},movementY:function(e){return"movementY"in e?e.movementY:qs}}),Nr=st(li),im=N({},li,{dataTransfer:0}),sm=st(im),cm=N({},Ia,{relatedTarget:0}),Hs=st(cm),um=N({},Ll,{animationName:0,elapsedTime:0,pseudoElement:0}),rm=st(um),om=N({},Ll,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),dm=st(om),fm=N({},Ll,{data:0}),Er=st(fm),hm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},mm={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"},vm={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function pm(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=vm[e])?!!t[e]:!1}function Bs(){return pm}var ym=N({},Ia,{key:function(e){if(e.key){var t=hm[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Pn(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?mm[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bs,charCode:function(e){return e.type==="keypress"?Pn(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Pn(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),jm=st(ym),xm=N({},li,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ar=st(xm),bm=N({},Ia,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bs}),gm=st(bm),Sm=N({},Ll,{propertyName:0,elapsedTime:0,pseudoElement:0}),Nm=st(Sm),Em=N({},li,{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}),Am=st(Em),Tm=N({},Ll,{newState:0,oldState:0}),zm=st(Tm),Cm=[9,13,27,32],ks=Ft&&"CompositionEvent"in window,en=null;Ft&&"documentMode"in document&&(en=document.documentMode);var Om=Ft&&"TextEvent"in window&&!en,Tr=Ft&&(!ks||en&&8<en&&11>=en),zr=" ",Cr=!1;function Or(e,t){switch(e){case"keyup":return Cm.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _r(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ha=!1;function _m(e,t){switch(e){case"compositionend":return _r(t);case"keypress":return t.which!==32?null:(Cr=!0,zr);case"textInput":return e=t.data,e===zr&&Cr?null:e;default:return null}}function Dm(e,t){if(ha)return e==="compositionend"||!ks&&Or(e,t)?(e=gr(),In=Us=ml=null,ha=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Tr&&t.locale!=="ko"?null:t.data;default:return null}}var Rm={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 Dr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Rm[e.type]:t==="textarea"}function Rr(e,t,l,a){da?fa?fa.push(a):fa=[a]:da=a,t=Vi(t,"onChange"),0<t.length&&(l=new ti("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var tn=null,ln=null;function Mm(e){pf(e,0)}function ai(e){var t=$a(e);if(hr(t))return e}function Mr(e,t){if(e==="change")return t}var Ur=!1;if(Ft){var Ys;if(Ft){var Ls="oninput"in document;if(!Ls){var wr=document.createElement("div");wr.setAttribute("oninput","return;"),Ls=typeof wr.oninput=="function"}Ys=Ls}else Ys=!1;Ur=Ys&&(!document.documentMode||9<document.documentMode)}function qr(){tn&&(tn.detachEvent("onpropertychange",Hr),ln=tn=null)}function Hr(e){if(e.propertyName==="value"&&ai(ln)){var t=[];Rr(t,ln,e,Ds(e)),br(Mm,t)}}function Um(e,t,l){e==="focusin"?(qr(),tn=t,ln=l,tn.attachEvent("onpropertychange",Hr)):e==="focusout"&&qr()}function wm(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ai(ln)}function qm(e,t){if(e==="click")return ai(t)}function Hm(e,t){if(e==="input"||e==="change")return ai(t)}function Bm(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var yt=typeof Object.is=="function"?Object.is:Bm;function an(e,t){if(yt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),a=Object.keys(t);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var i=l[a];if(!js.call(t,i)||!yt(e[i],t[i]))return!1}return!0}function Br(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function kr(e,t){var l=Br(e);e=0;for(var a;l;){if(l.nodeType===3){if(a=e+l.textContent.length,e<=t&&a>=t)return{node:l,offset:t-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Br(l)}}function Yr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Yr(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Lr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Fn(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=Fn(e.document)}return t}function Gs(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var km=Ft&&"documentMode"in document&&11>=document.documentMode,ma=null,Qs=null,nn=null,Xs=!1;function Gr(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Xs||ma==null||ma!==Fn(a)||(a=ma,"selectionStart"in a&&Gs(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}),nn&&an(nn,a)||(nn=a,a=Vi(Qs,"onSelect"),0<a.length&&(t=new ti("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=ma)))}function Gl(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var va={animationend:Gl("Animation","AnimationEnd"),animationiteration:Gl("Animation","AnimationIteration"),animationstart:Gl("Animation","AnimationStart"),transitionrun:Gl("Transition","TransitionRun"),transitionstart:Gl("Transition","TransitionStart"),transitioncancel:Gl("Transition","TransitionCancel"),transitionend:Gl("Transition","TransitionEnd")},Vs={},Qr={};Ft&&(Qr=document.createElement("div").style,"AnimationEvent"in window||(delete va.animationend.animation,delete va.animationiteration.animation,delete va.animationstart.animation),"TransitionEvent"in window||delete va.transitionend.transition);function Ql(e){if(Vs[e])return Vs[e];if(!va[e])return e;var t=va[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in Qr)return Vs[e]=t[l];return e}var Xr=Ql("animationend"),Vr=Ql("animationiteration"),Zr=Ql("animationstart"),Ym=Ql("transitionrun"),Lm=Ql("transitionstart"),Gm=Ql("transitioncancel"),Kr=Ql("transitionend"),Jr=new Map,Zs="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(" ");Zs.push("scrollEnd");function kt(e,t){Jr.set(e,t),Yl(t,[e])}var ni=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Ct=[],pa=0,Ks=0;function ii(){for(var e=pa,t=Ks=pa=0;t<e;){var l=Ct[t];Ct[t++]=null;var a=Ct[t];Ct[t++]=null;var i=Ct[t];Ct[t++]=null;var s=Ct[t];if(Ct[t++]=null,a!==null&&i!==null){var u=a.pending;u===null?i.next=i:(i.next=u.next,u.next=i),a.pending=i}s!==0&&$r(l,i,s)}}function si(e,t,l,a){Ct[pa++]=e,Ct[pa++]=t,Ct[pa++]=l,Ct[pa++]=a,Ks|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Js(e,t,l,a){return si(e,t,l,a),ci(e)}function Xl(e,t){return si(e,null,null,t),ci(e)}function $r(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var i=!1,s=e.return;s!==null;)s.childLanes|=l,a=s.alternate,a!==null&&(a.childLanes|=l),s.tag===22&&(e=s.stateNode,e===null||e._visibility&1||(i=!0)),e=s,s=s.return;return e.tag===3?(s=e.stateNode,i&&t!==null&&(i=31-pt(l),e=s.hiddenUpdates,a=e[i],a===null?e[i]=[t]:a.push(t),t.lane=l|536870912),s):null}function ci(e){if(50<zn)throw zn=0,au=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ya={};function Qm(e,t,l,a){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function jt(e,t,l,a){return new Qm(e,t,l,a)}function $s(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Wt(e,t){var l=e.alternate;return l===null?(l=jt(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function Fr(e,t){e.flags&=65011714;var l=e.alternate;return l===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ui(e,t,l,a,i,s){var u=0;if(a=e,typeof e=="function")$s(e)&&(u=1);else if(typeof e=="string")u=Jv(e,l,K.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case De:return e=jt(31,l,t,i),e.elementType=De,e.lanes=s,e;case z:return Vl(l.children,i,s,t);case D:u=8,i|=24;break;case R:return e=jt(12,l,t,i|2),e.elementType=R,e.lanes=s,e;case xe:return e=jt(13,l,t,i),e.elementType=xe,e.lanes=s,e;case Ce:return e=jt(19,l,t,i),e.elementType=Ce,e.lanes=s,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case G:u=10;break e;case X:u=9;break e;case le:u=11;break e;case Y:u=14;break e;case fe:u=16,a=null;break e}u=29,l=Error(r(130,e===null?"null":typeof e,"")),a=null}return t=jt(u,l,t,i),t.elementType=e,t.type=a,t.lanes=s,t}function Vl(e,t,l,a){return e=jt(7,e,a,t),e.lanes=l,e}function Fs(e,t,l){return e=jt(6,e,null,t),e.lanes=l,e}function Wr(e){var t=jt(18,null,null,0);return t.stateNode=e,t}function Ws(e,t,l){return t=jt(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ir=new WeakMap;function Ot(e,t){if(typeof e=="object"&&e!==null){var l=Ir.get(e);return l!==void 0?l:(t={value:e,source:t,stack:Wu(t)},Ir.set(e,t),t)}return{value:e,source:t,stack:Wu(t)}}var ja=[],xa=0,ri=null,sn=0,_t=[],Dt=0,vl=null,Xt=1,Vt="";function It(e,t){ja[xa++]=sn,ja[xa++]=ri,ri=e,sn=t}function Pr(e,t,l){_t[Dt++]=Xt,_t[Dt++]=Vt,_t[Dt++]=vl,vl=e;var a=Xt;e=Vt;var i=32-pt(a)-1;a&=~(1<<i),l+=1;var s=32-pt(t)+i;if(30<s){var u=i-i%5;s=(a&(1<<u)-1).toString(32),a>>=u,i-=u,Xt=1<<32-pt(t)+i|l<<i|a,Vt=s+e}else Xt=1<<s|l<<i|a,Vt=e}function Is(e){e.return!==null&&(It(e,1),Pr(e,1,0))}function Ps(e){for(;e===ri;)ri=ja[--xa],ja[xa]=null,sn=ja[--xa],ja[xa]=null;for(;e===vl;)vl=_t[--Dt],_t[Dt]=null,Vt=_t[--Dt],_t[Dt]=null,Xt=_t[--Dt],_t[Dt]=null}function eo(e,t){_t[Dt++]=Xt,_t[Dt++]=Vt,_t[Dt++]=vl,Xt=t.id,Vt=t.overflow,vl=e}var $e=null,Oe=null,de=!1,pl=null,Rt=!1,ec=Error(r(519));function yl(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw cn(Ot(t,e)),ec}function to(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[Je]=e,t[it]=a,l){case"dialog":ue("cancel",t),ue("close",t);break;case"iframe":case"object":case"embed":ue("load",t);break;case"video":case"audio":for(l=0;l<On.length;l++)ue(On[l],t);break;case"source":ue("error",t);break;case"img":case"image":case"link":ue("error",t),ue("load",t);break;case"details":ue("toggle",t);break;case"input":ue("invalid",t),mr(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":ue("invalid",t);break;case"textarea":ue("invalid",t),pr(t,a.value,a.defaultValue,a.children)}l=a.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||a.suppressHydrationWarning===!0||bf(t.textContent,l)?(a.popover!=null&&(ue("beforetoggle",t),ue("toggle",t)),a.onScroll!=null&&ue("scroll",t),a.onScrollEnd!=null&&ue("scrollend",t),a.onClick!=null&&(t.onclick=$t),t=!0):t=!1,t||yl(e,!0)}function lo(e){for($e=e.return;$e;)switch($e.tag){case 5:case 31:case 13:Rt=!1;return;case 27:case 3:Rt=!0;return;default:$e=$e.return}}function ba(e){if(e!==$e)return!1;if(!de)return lo(e),de=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||ju(e.type,e.memoizedProps)),l=!l),l&&Oe&&yl(e),lo(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Oe=Of(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Oe=Of(e)}else t===27?(t=Oe,Dl(e.type)?(e=Nu,Nu=null,Oe=e):Oe=t):Oe=$e?Ut(e.stateNode.nextSibling):null;return!0}function Zl(){Oe=$e=null,de=!1}function tc(){var e=pl;return e!==null&&(ot===null?ot=e:ot.push.apply(ot,e),pl=null),e}function cn(e){pl===null?pl=[e]:pl.push(e)}var lc=g(null),Kl=null,Pt=null;function jl(e,t,l){V(lc,t._currentValue),t._currentValue=l}function el(e){e._currentValue=lc.current,B(lc)}function ac(e,t,l){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===l)break;e=e.return}}function nc(e,t,l,a){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var s=i.dependencies;if(s!==null){var u=i.child;s=s.firstContext;e:for(;s!==null;){var d=s;s=i;for(var j=0;j<t.length;j++)if(d.context===t[j]){s.lanes|=l,d=s.alternate,d!==null&&(d.lanes|=l),ac(s.return,l,e),a||(u=null);break e}s=d.next}}else if(i.tag===18){if(u=i.return,u===null)throw Error(r(341));u.lanes|=l,s=u.alternate,s!==null&&(s.lanes|=l),ac(u,l,e),u=null}else u=i.child;if(u!==null)u.return=i;else for(u=i;u!==null;){if(u===e){u=null;break}if(i=u.sibling,i!==null){i.return=u.return,u=i;break}u=u.return}i=u}}function ga(e,t,l,a){e=null;for(var i=t,s=!1;i!==null;){if(!s){if((i.flags&524288)!==0)s=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var u=i.alternate;if(u===null)throw Error(r(387));if(u=u.memoizedProps,u!==null){var d=i.type;yt(i.pendingProps.value,u.value)||(e!==null?e.push(d):e=[d])}}else if(i===je.current){if(u=i.alternate,u===null)throw Error(r(387));u.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(Un):e=[Un])}i=i.return}e!==null&&nc(t,e,l,a),t.flags|=262144}function oi(e){for(e=e.firstContext;e!==null;){if(!yt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Jl(e){Kl=e,Pt=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Fe(e){return ao(Kl,e)}function di(e,t){return Kl===null&&Jl(e),ao(e,t)}function ao(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},Pt===null){if(e===null)throw Error(r(308));Pt=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Pt=Pt.next=t;return l}var Xm=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},Vm=c.unstable_scheduleCallback,Zm=c.unstable_NormalPriority,ke={$$typeof:G,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ic(){return{controller:new Xm,data:new Map,refCount:0}}function un(e){e.refCount--,e.refCount===0&&Vm(Zm,function(){e.controller.abort()})}var rn=null,sc=0,Sa=0,Na=null;function Km(e,t){if(rn===null){var l=rn=[];sc=0,Sa=ru(),Na={status:"pending",value:void 0,then:function(a){l.push(a)}}}return sc++,t.then(no,no),t}function no(){if(--sc===0&&rn!==null){Na!==null&&(Na.status="fulfilled");var e=rn;rn=null,Sa=0,Na=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Jm(e,t){var l=[],a={status:"pending",value:null,reason:null,then:function(i){l.push(i)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var i=0;i<l.length;i++)(0,l[i])(t)},function(i){for(a.status="rejected",a.reason=i,i=0;i<l.length;i++)(0,l[i])(void 0)}),a}var io=C.S;C.S=function(e,t){Qd=mt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Km(e,t),io!==null&&io(e,t)};var $l=g(null);function cc(){var e=$l.current;return e!==null?e:Te.pooledCache}function fi(e,t){t===null?V($l,$l.current):V($l,t.pool)}function so(){var e=cc();return e===null?null:{parent:ke._currentValue,pool:e}}var Ea=Error(r(460)),uc=Error(r(474)),hi=Error(r(542)),mi={then:function(){}};function co(e){return e=e.status,e==="fulfilled"||e==="rejected"}function uo(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then($t,$t),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,oo(e),e;default:if(typeof t.status=="string")t.then($t,$t);else{if(e=Te,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=a}},function(a){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,oo(e),e}throw Wl=t,Ea}}function Fl(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Wl=l,Ea):l}}var Wl=null;function ro(){if(Wl===null)throw Error(r(459));var e=Wl;return Wl=null,e}function oo(e){if(e===Ea||e===hi)throw Error(r(483))}var Aa=null,on=0;function vi(e){var t=on;return on+=1,Aa===null&&(Aa=[]),uo(Aa,e,t)}function dn(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function pi(e,t){throw t.$$typeof===q?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function fo(e){function t(E,x){if(e){var A=E.deletions;A===null?(E.deletions=[x],E.flags|=16):A.push(x)}}function l(E,x){if(!e)return null;for(;x!==null;)t(E,x),x=x.sibling;return null}function a(E){for(var x=new Map;E!==null;)E.key!==null?x.set(E.key,E):x.set(E.index,E),E=E.sibling;return x}function i(E,x){return E=Wt(E,x),E.index=0,E.sibling=null,E}function s(E,x,A){return E.index=A,e?(A=E.alternate,A!==null?(A=A.index,A<x?(E.flags|=67108866,x):A):(E.flags|=67108866,x)):(E.flags|=1048576,x)}function u(E){return e&&E.alternate===null&&(E.flags|=67108866),E}function d(E,x,A,w){return x===null||x.tag!==6?(x=Fs(A,E.mode,w),x.return=E,x):(x=i(x,A),x.return=E,x)}function j(E,x,A,w){var F=A.type;return F===z?U(E,x,A.props.children,w,A.key):x!==null&&(x.elementType===F||typeof F=="object"&&F!==null&&F.$$typeof===fe&&Fl(F)===x.type)?(x=i(x,A.props),dn(x,A),x.return=E,x):(x=ui(A.type,A.key,A.props,null,E.mode,w),dn(x,A),x.return=E,x)}function T(E,x,A,w){return x===null||x.tag!==4||x.stateNode.containerInfo!==A.containerInfo||x.stateNode.implementation!==A.implementation?(x=Ws(A,E.mode,w),x.return=E,x):(x=i(x,A.children||[]),x.return=E,x)}function U(E,x,A,w,F){return x===null||x.tag!==7?(x=Vl(A,E.mode,w,F),x.return=E,x):(x=i(x,A),x.return=E,x)}function H(E,x,A){if(typeof x=="string"&&x!==""||typeof x=="number"||typeof x=="bigint")return x=Fs(""+x,E.mode,A),x.return=E,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case k:return A=ui(x.type,x.key,x.props,null,E.mode,A),dn(A,x),A.return=E,A;case L:return x=Ws(x,E.mode,A),x.return=E,x;case fe:return x=Fl(x),H(E,x,A)}if(ht(x)||Xe(x))return x=Vl(x,E.mode,A,null),x.return=E,x;if(typeof x.then=="function")return H(E,vi(x),A);if(x.$$typeof===G)return H(E,di(E,x),A);pi(E,x)}return null}function O(E,x,A,w){var F=x!==null?x.key:null;if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return F!==null?null:d(E,x,""+A,w);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case k:return A.key===F?j(E,x,A,w):null;case L:return A.key===F?T(E,x,A,w):null;case fe:return A=Fl(A),O(E,x,A,w)}if(ht(A)||Xe(A))return F!==null?null:U(E,x,A,w,null);if(typeof A.then=="function")return O(E,x,vi(A),w);if(A.$$typeof===G)return O(E,x,di(E,A),w);pi(E,A)}return null}function _(E,x,A,w,F){if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return E=E.get(A)||null,d(x,E,""+w,F);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case k:return E=E.get(w.key===null?A:w.key)||null,j(x,E,w,F);case L:return E=E.get(w.key===null?A:w.key)||null,T(x,E,w,F);case fe:return w=Fl(w),_(E,x,A,w,F)}if(ht(w)||Xe(w))return E=E.get(A)||null,U(x,E,w,F,null);if(typeof w.then=="function")return _(E,x,A,vi(w),F);if(w.$$typeof===G)return _(E,x,A,di(x,w),F);pi(x,w)}return null}function Z(E,x,A,w){for(var F=null,me=null,J=x,ie=x=0,oe=null;J!==null&&ie<A.length;ie++){J.index>ie?(oe=J,J=null):oe=J.sibling;var ve=O(E,J,A[ie],w);if(ve===null){J===null&&(J=oe);break}e&&J&&ve.alternate===null&&t(E,J),x=s(ve,x,ie),me===null?F=ve:me.sibling=ve,me=ve,J=oe}if(ie===A.length)return l(E,J),de&&It(E,ie),F;if(J===null){for(;ie<A.length;ie++)J=H(E,A[ie],w),J!==null&&(x=s(J,x,ie),me===null?F=J:me.sibling=J,me=J);return de&&It(E,ie),F}for(J=a(J);ie<A.length;ie++)oe=_(J,E,ie,A[ie],w),oe!==null&&(e&&oe.alternate!==null&&J.delete(oe.key===null?ie:oe.key),x=s(oe,x,ie),me===null?F=oe:me.sibling=oe,me=oe);return e&&J.forEach(function(ql){return t(E,ql)}),de&&It(E,ie),F}function W(E,x,A,w){if(A==null)throw Error(r(151));for(var F=null,me=null,J=x,ie=x=0,oe=null,ve=A.next();J!==null&&!ve.done;ie++,ve=A.next()){J.index>ie?(oe=J,J=null):oe=J.sibling;var ql=O(E,J,ve.value,w);if(ql===null){J===null&&(J=oe);break}e&&J&&ql.alternate===null&&t(E,J),x=s(ql,x,ie),me===null?F=ql:me.sibling=ql,me=ql,J=oe}if(ve.done)return l(E,J),de&&It(E,ie),F;if(J===null){for(;!ve.done;ie++,ve=A.next())ve=H(E,ve.value,w),ve!==null&&(x=s(ve,x,ie),me===null?F=ve:me.sibling=ve,me=ve);return de&&It(E,ie),F}for(J=a(J);!ve.done;ie++,ve=A.next())ve=_(J,E,ie,ve.value,w),ve!==null&&(e&&ve.alternate!==null&&J.delete(ve.key===null?ie:ve.key),x=s(ve,x,ie),me===null?F=ve:me.sibling=ve,me=ve);return e&&J.forEach(function(ip){return t(E,ip)}),de&&It(E,ie),F}function Ee(E,x,A,w){if(typeof A=="object"&&A!==null&&A.type===z&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case k:e:{for(var F=A.key;x!==null;){if(x.key===F){if(F=A.type,F===z){if(x.tag===7){l(E,x.sibling),w=i(x,A.props.children),w.return=E,E=w;break e}}else if(x.elementType===F||typeof F=="object"&&F!==null&&F.$$typeof===fe&&Fl(F)===x.type){l(E,x.sibling),w=i(x,A.props),dn(w,A),w.return=E,E=w;break e}l(E,x);break}else t(E,x);x=x.sibling}A.type===z?(w=Vl(A.props.children,E.mode,w,A.key),w.return=E,E=w):(w=ui(A.type,A.key,A.props,null,E.mode,w),dn(w,A),w.return=E,E=w)}return u(E);case L:e:{for(F=A.key;x!==null;){if(x.key===F)if(x.tag===4&&x.stateNode.containerInfo===A.containerInfo&&x.stateNode.implementation===A.implementation){l(E,x.sibling),w=i(x,A.children||[]),w.return=E,E=w;break e}else{l(E,x);break}else t(E,x);x=x.sibling}w=Ws(A,E.mode,w),w.return=E,E=w}return u(E);case fe:return A=Fl(A),Ee(E,x,A,w)}if(ht(A))return Z(E,x,A,w);if(Xe(A)){if(F=Xe(A),typeof F!="function")throw Error(r(150));return A=F.call(A),W(E,x,A,w)}if(typeof A.then=="function")return Ee(E,x,vi(A),w);if(A.$$typeof===G)return Ee(E,x,di(E,A),w);pi(E,A)}return typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint"?(A=""+A,x!==null&&x.tag===6?(l(E,x.sibling),w=i(x,A),w.return=E,E=w):(l(E,x),w=Fs(A,E.mode,w),w.return=E,E=w),u(E)):l(E,x)}return function(E,x,A,w){try{on=0;var F=Ee(E,x,A,w);return Aa=null,F}catch(J){if(J===Ea||J===hi)throw J;var me=jt(29,J,null,E.mode);return me.lanes=w,me.return=E,me}}}var Il=fo(!0),ho=fo(!1),xl=!1;function rc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function oc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function bl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function gl(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(pe&2)!==0){var i=a.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),a.pending=t,t=ci(e),$r(e,null,l),t}return si(e,a,t,l),ci(e)}function fn(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,ar(e,l)}}function dc(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var i=null,s=null;if(l=l.firstBaseUpdate,l!==null){do{var u={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};s===null?i=s=u:s=s.next=u,l=l.next}while(l!==null);s===null?i=s=t:s=s.next=t}else i=s=t;l={baseState:a.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var fc=!1;function hn(){if(fc){var e=Na;if(e!==null)throw e}}function mn(e,t,l,a){fc=!1;var i=e.updateQueue;xl=!1;var s=i.firstBaseUpdate,u=i.lastBaseUpdate,d=i.shared.pending;if(d!==null){i.shared.pending=null;var j=d,T=j.next;j.next=null,u===null?s=T:u.next=T,u=j;var U=e.alternate;U!==null&&(U=U.updateQueue,d=U.lastBaseUpdate,d!==u&&(d===null?U.firstBaseUpdate=T:d.next=T,U.lastBaseUpdate=j))}if(s!==null){var H=i.baseState;u=0,U=T=j=null,d=s;do{var O=d.lane&-536870913,_=O!==d.lane;if(_?(re&O)===O:(a&O)===O){O!==0&&O===Sa&&(fc=!0),U!==null&&(U=U.next={lane:0,tag:d.tag,payload:d.payload,callback:null,next:null});e:{var Z=e,W=d;O=t;var Ee=l;switch(W.tag){case 1:if(Z=W.payload,typeof Z=="function"){H=Z.call(Ee,H,O);break e}H=Z;break e;case 3:Z.flags=Z.flags&-65537|128;case 0:if(Z=W.payload,O=typeof Z=="function"?Z.call(Ee,H,O):Z,O==null)break e;H=N({},H,O);break e;case 2:xl=!0}}O=d.callback,O!==null&&(e.flags|=64,_&&(e.flags|=8192),_=i.callbacks,_===null?i.callbacks=[O]:_.push(O))}else _={lane:O,tag:d.tag,payload:d.payload,callback:d.callback,next:null},U===null?(T=U=_,j=H):U=U.next=_,u|=O;if(d=d.next,d===null){if(d=i.shared.pending,d===null)break;_=d,d=_.next,_.next=null,i.lastBaseUpdate=_,i.shared.pending=null}}while(!0);U===null&&(j=H),i.baseState=j,i.firstBaseUpdate=T,i.lastBaseUpdate=U,s===null&&(i.shared.lanes=0),Tl|=u,e.lanes=u,e.memoizedState=H}}function mo(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function vo(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)mo(l[e],t)}var Ta=g(null),yi=g(0);function po(e,t){e=rl,V(yi,e),V(Ta,t),rl=e|t.baseLanes}function hc(){V(yi,rl),V(Ta,Ta.current)}function mc(){rl=yi.current,B(Ta),B(yi)}var xt=g(null),Mt=null;function Sl(e){var t=e.alternate;V(He,He.current&1),V(xt,e),Mt===null&&(t===null||Ta.current!==null||t.memoizedState!==null)&&(Mt=e)}function vc(e){V(He,He.current),V(xt,e),Mt===null&&(Mt=e)}function yo(e){e.tag===22?(V(He,He.current),V(xt,e),Mt===null&&(Mt=e)):Nl()}function Nl(){V(He,He.current),V(xt,xt.current)}function bt(e){B(xt),Mt===e&&(Mt=null),B(He)}var He=g(0);function ji(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||gu(l)||Su(l)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var tl=0,ne=null,Se=null,Ye=null,xi=!1,za=!1,Pl=!1,bi=0,vn=0,Ca=null,$m=0;function Me(){throw Error(r(321))}function pc(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!yt(e[l],t[l]))return!1;return!0}function yc(e,t,l,a,i,s){return tl=s,ne=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,C.H=e===null||e.memoizedState===null?ed:Rc,Pl=!1,s=l(a,i),Pl=!1,za&&(s=xo(t,l,a,i)),jo(e),s}function jo(e){C.H=jn;var t=Se!==null&&Se.next!==null;if(tl=0,Ye=Se=ne=null,xi=!1,vn=0,Ca=null,t)throw Error(r(300));e===null||Le||(e=e.dependencies,e!==null&&oi(e)&&(Le=!0))}function xo(e,t,l,a){ne=e;var i=0;do{if(za&&(Ca=null),vn=0,za=!1,25<=i)throw Error(r(301));if(i+=1,Ye=Se=null,e.updateQueue!=null){var s=e.updateQueue;s.lastEffect=null,s.events=null,s.stores=null,s.memoCache!=null&&(s.memoCache.index=0)}C.H=td,s=t(l,a)}while(za);return s}function Fm(){var e=C.H,t=e.useState()[0];return t=typeof t.then=="function"?pn(t):t,e=e.useState()[0],(Se!==null?Se.memoizedState:null)!==e&&(ne.flags|=1024),t}function jc(){var e=bi!==0;return bi=0,e}function xc(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function bc(e){if(xi){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}xi=!1}tl=0,Ye=Se=ne=null,za=!1,vn=bi=0,Ca=null}function tt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ye===null?ne.memoizedState=Ye=e:Ye=Ye.next=e,Ye}function Be(){if(Se===null){var e=ne.alternate;e=e!==null?e.memoizedState:null}else e=Se.next;var t=Ye===null?ne.memoizedState:Ye.next;if(t!==null)Ye=t,Se=e;else{if(e===null)throw ne.alternate===null?Error(r(467)):Error(r(310));Se=e,e={memoizedState:Se.memoizedState,baseState:Se.baseState,baseQueue:Se.baseQueue,queue:Se.queue,next:null},Ye===null?ne.memoizedState=Ye=e:Ye=Ye.next=e}return Ye}function gi(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function pn(e){var t=vn;return vn+=1,Ca===null&&(Ca=[]),e=uo(Ca,e,t),t=ne,(Ye===null?t.memoizedState:Ye.next)===null&&(t=t.alternate,C.H=t===null||t.memoizedState===null?ed:Rc),e}function Si(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return pn(e);if(e.$$typeof===G)return Fe(e)}throw Error(r(438,String(e)))}function gc(e){var t=null,l=ne.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=ne.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=gi(),ne.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),a=0;a<e;a++)l[a]=Qt;return t.index++,l}function ll(e,t){return typeof t=="function"?t(e):t}function Ni(e){var t=Be();return Sc(t,Se,e)}function Sc(e,t,l){var a=e.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=l;var i=e.baseQueue,s=a.pending;if(s!==null){if(i!==null){var u=i.next;i.next=s.next,s.next=u}t.baseQueue=i=s,a.pending=null}if(s=e.baseState,i===null)e.memoizedState=s;else{t=i.next;var d=u=null,j=null,T=t,U=!1;do{var H=T.lane&-536870913;if(H!==T.lane?(re&H)===H:(tl&H)===H){var O=T.revertLane;if(O===0)j!==null&&(j=j.next={lane:0,revertLane:0,gesture:null,action:T.action,hasEagerState:T.hasEagerState,eagerState:T.eagerState,next:null}),H===Sa&&(U=!0);else if((tl&O)===O){T=T.next,O===Sa&&(U=!0);continue}else H={lane:0,revertLane:T.revertLane,gesture:null,action:T.action,hasEagerState:T.hasEagerState,eagerState:T.eagerState,next:null},j===null?(d=j=H,u=s):j=j.next=H,ne.lanes|=O,Tl|=O;H=T.action,Pl&&l(s,H),s=T.hasEagerState?T.eagerState:l(s,H)}else O={lane:H,revertLane:T.revertLane,gesture:T.gesture,action:T.action,hasEagerState:T.hasEagerState,eagerState:T.eagerState,next:null},j===null?(d=j=O,u=s):j=j.next=O,ne.lanes|=H,Tl|=H;T=T.next}while(T!==null&&T!==t);if(j===null?u=s:j.next=d,!yt(s,e.memoizedState)&&(Le=!0,U&&(l=Na,l!==null)))throw l;e.memoizedState=s,e.baseState=u,e.baseQueue=j,a.lastRenderedState=s}return i===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Nc(e){var t=Be(),l=t.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=e;var a=l.dispatch,i=l.pending,s=t.memoizedState;if(i!==null){l.pending=null;var u=i=i.next;do s=e(s,u.action),u=u.next;while(u!==i);yt(s,t.memoizedState)||(Le=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),l.lastRenderedState=s}return[s,a]}function bo(e,t,l){var a=ne,i=Be(),s=de;if(s){if(l===void 0)throw Error(r(407));l=l()}else l=t();var u=!yt((Se||i).memoizedState,l);if(u&&(i.memoizedState=l,Le=!0),i=i.queue,Tc(No.bind(null,a,i,e),[e]),i.getSnapshot!==t||u||Ye!==null&&Ye.memoizedState.tag&1){if(a.flags|=2048,Oa(9,{destroy:void 0},So.bind(null,a,i,l,t),null),Te===null)throw Error(r(349));s||(tl&127)!==0||go(a,t,l)}return l}function go(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=ne.updateQueue,t===null?(t=gi(),ne.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function So(e,t,l,a){t.value=l,t.getSnapshot=a,Eo(t)&&Ao(e)}function No(e,t,l){return l(function(){Eo(t)&&Ao(e)})}function Eo(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!yt(e,l)}catch{return!0}}function Ao(e){var t=Xl(e,2);t!==null&&dt(t,e,2)}function Ec(e){var t=tt();if(typeof e=="function"){var l=e;if(e=l(),Pl){fl(!0);try{l()}finally{fl(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ll,lastRenderedState:e},t}function To(e,t,l,a){return e.baseState=l,Sc(e,Se,typeof a=="function"?a:ll)}function Wm(e,t,l,a,i){if(Ti(e))throw Error(r(485));if(e=t.action,e!==null){var s={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(u){s.listeners.push(u)}};C.T!==null?l(!0):s.isTransition=!1,a(s),l=t.pending,l===null?(s.next=t.pending=s,zo(t,s)):(s.next=l.next,t.pending=l.next=s)}}function zo(e,t){var l=t.action,a=t.payload,i=e.state;if(t.isTransition){var s=C.T,u={};C.T=u;try{var d=l(i,a),j=C.S;j!==null&&j(u,d),Co(e,t,d)}catch(T){Ac(e,t,T)}finally{s!==null&&u.types!==null&&(s.types=u.types),C.T=s}}else try{s=l(i,a),Co(e,t,s)}catch(T){Ac(e,t,T)}}function Co(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){Oo(e,t,a)},function(a){return Ac(e,t,a)}):Oo(e,t,l)}function Oo(e,t,l){t.status="fulfilled",t.value=l,_o(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,zo(e,l)))}function Ac(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,_o(t),t=t.next;while(t!==a)}e.action=null}function _o(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Do(e,t){return t}function Ro(e,t){if(de){var l=Te.formState;if(l!==null){e:{var a=ne;if(de){if(Oe){t:{for(var i=Oe,s=Rt;i.nodeType!==8;){if(!s){i=null;break t}if(i=Ut(i.nextSibling),i===null){i=null;break t}}s=i.data,i=s==="F!"||s==="F"?i:null}if(i){Oe=Ut(i.nextSibling),a=i.data==="F!";break e}}yl(a)}a=!1}a&&(t=l[0])}}return l=tt(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Do,lastRenderedState:t},l.queue=a,l=Wo.bind(null,ne,a),a.dispatch=l,a=Ec(!1),s=Dc.bind(null,ne,!1,a.queue),a=tt(),i={state:t,dispatch:null,action:e,pending:null},a.queue=i,l=Wm.bind(null,ne,i,s,l),i.dispatch=l,a.memoizedState=e,[t,l,!1]}function Mo(e){var t=Be();return Uo(t,Se,e)}function Uo(e,t,l){if(t=Sc(e,t,Do)[0],e=Ni(ll)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=pn(t)}catch(u){throw u===Ea?hi:u}else a=t;t=Be();var i=t.queue,s=i.dispatch;return l!==t.memoizedState&&(ne.flags|=2048,Oa(9,{destroy:void 0},Im.bind(null,i,l),null)),[a,s,e]}function Im(e,t){e.action=t}function wo(e){var t=Be(),l=Se;if(l!==null)return Uo(t,l,e);Be(),t=t.memoizedState,l=Be();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function Oa(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=ne.updateQueue,t===null&&(t=gi(),ne.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(a=l.next,l.next=e,e.next=a,t.lastEffect=e),e}function qo(){return Be().memoizedState}function Ei(e,t,l,a){var i=tt();ne.flags|=e,i.memoizedState=Oa(1|t,{destroy:void 0},l,a===void 0?null:a)}function Ai(e,t,l,a){var i=Be();a=a===void 0?null:a;var s=i.memoizedState.inst;Se!==null&&a!==null&&pc(a,Se.memoizedState.deps)?i.memoizedState=Oa(t,s,l,a):(ne.flags|=e,i.memoizedState=Oa(1|t,s,l,a))}function Ho(e,t){Ei(8390656,8,e,t)}function Tc(e,t){Ai(2048,8,e,t)}function Pm(e){ne.flags|=4;var t=ne.updateQueue;if(t===null)t=gi(),ne.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function Bo(e){var t=Be().memoizedState;return Pm({ref:t,nextImpl:e}),function(){if((pe&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function ko(e,t){return Ai(4,2,e,t)}function Yo(e,t){return Ai(4,4,e,t)}function Lo(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Go(e,t,l){l=l!=null?l.concat([e]):null,Ai(4,4,Lo.bind(null,t,e),l)}function zc(){}function Qo(e,t){var l=Be();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&pc(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function Xo(e,t){var l=Be();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&pc(t,a[1]))return a[0];if(a=e(),Pl){fl(!0);try{e()}finally{fl(!1)}}return l.memoizedState=[a,t],a}function Cc(e,t,l){return l===void 0||(tl&1073741824)!==0&&(re&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=Vd(),ne.lanes|=e,Tl|=e,l)}function Vo(e,t,l,a){return yt(l,t)?l:Ta.current!==null?(e=Cc(e,l,a),yt(e,t)||(Le=!0),e):(tl&42)===0||(tl&1073741824)!==0&&(re&261930)===0?(Le=!0,e.memoizedState=l):(e=Vd(),ne.lanes|=e,Tl|=e,t)}function Zo(e,t,l,a,i){var s=Q.p;Q.p=s!==0&&8>s?s:8;var u=C.T,d={};C.T=d,Dc(e,!1,t,l);try{var j=i(),T=C.S;if(T!==null&&T(d,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){var U=Jm(j,a);yn(e,t,U,Nt(e))}else yn(e,t,a,Nt(e))}catch(H){yn(e,t,{then:function(){},status:"rejected",reason:H},Nt())}finally{Q.p=s,u!==null&&d.types!==null&&(u.types=d.types),C.T=u}}function ev(){}function Oc(e,t,l,a){if(e.tag!==5)throw Error(r(476));var i=Ko(e).queue;Zo(e,i,t,P,l===null?ev:function(){return Jo(e),l(a)})}function Ko(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:P,baseState:P,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ll,lastRenderedState:P},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ll,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Jo(e){var t=Ko(e);t.next===null&&(t=e.alternate.memoizedState),yn(e,t.next.queue,{},Nt())}function _c(){return Fe(Un)}function $o(){return Be().memoizedState}function Fo(){return Be().memoizedState}function tv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Nt();e=bl(l);var a=gl(t,e,l);a!==null&&(dt(a,t,l),fn(a,t,l)),t={cache:ic()},e.payload=t;return}t=t.return}}function lv(e,t,l){var a=Nt();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Ti(e)?Io(t,l):(l=Js(e,t,l,a),l!==null&&(dt(l,e,a),Po(l,t,a)))}function Wo(e,t,l){var a=Nt();yn(e,t,l,a)}function yn(e,t,l,a){var i={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Ti(e))Io(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var u=t.lastRenderedState,d=s(u,l);if(i.hasEagerState=!0,i.eagerState=d,yt(d,u))return si(e,t,i,0),Te===null&&ii(),!1}catch{}if(l=Js(e,t,i,a),l!==null)return dt(l,e,a),Po(l,t,a),!0}return!1}function Dc(e,t,l,a){if(a={lane:2,revertLane:ru(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Ti(e)){if(t)throw Error(r(479))}else t=Js(e,l,a,2),t!==null&&dt(t,e,2)}function Ti(e){var t=e.alternate;return e===ne||t!==null&&t===ne}function Io(e,t){za=xi=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function Po(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,ar(e,l)}}var jn={readContext:Fe,use:Si,useCallback:Me,useContext:Me,useEffect:Me,useImperativeHandle:Me,useLayoutEffect:Me,useInsertionEffect:Me,useMemo:Me,useReducer:Me,useRef:Me,useState:Me,useDebugValue:Me,useDeferredValue:Me,useTransition:Me,useSyncExternalStore:Me,useId:Me,useHostTransitionStatus:Me,useFormState:Me,useActionState:Me,useOptimistic:Me,useMemoCache:Me,useCacheRefresh:Me};jn.useEffectEvent=Me;var ed={readContext:Fe,use:Si,useCallback:function(e,t){return tt().memoizedState=[e,t===void 0?null:t],e},useContext:Fe,useEffect:Ho,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Ei(4194308,4,Lo.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Ei(4194308,4,e,t)},useInsertionEffect:function(e,t){Ei(4,2,e,t)},useMemo:function(e,t){var l=tt();t=t===void 0?null:t;var a=e();if(Pl){fl(!0);try{e()}finally{fl(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=tt();if(l!==void 0){var i=l(t);if(Pl){fl(!0);try{l(t)}finally{fl(!1)}}}else i=t;return a.memoizedState=a.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},a.queue=e,e=e.dispatch=lv.bind(null,ne,e),[a.memoizedState,e]},useRef:function(e){var t=tt();return e={current:e},t.memoizedState=e},useState:function(e){e=Ec(e);var t=e.queue,l=Wo.bind(null,ne,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:zc,useDeferredValue:function(e,t){var l=tt();return Cc(l,e,t)},useTransition:function(){var e=Ec(!1);return e=Zo.bind(null,ne,e.queue,!0,!1),tt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=ne,i=tt();if(de){if(l===void 0)throw Error(r(407));l=l()}else{if(l=t(),Te===null)throw Error(r(349));(re&127)!==0||go(a,t,l)}i.memoizedState=l;var s={value:l,getSnapshot:t};return i.queue=s,Ho(No.bind(null,a,s,e),[e]),a.flags|=2048,Oa(9,{destroy:void 0},So.bind(null,a,s,l,t),null),l},useId:function(){var e=tt(),t=Te.identifierPrefix;if(de){var l=Vt,a=Xt;l=(a&~(1<<32-pt(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=bi++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=$m++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:_c,useFormState:Ro,useActionState:Ro,useOptimistic:function(e){var t=tt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=Dc.bind(null,ne,!0,l),l.dispatch=t,[e,t]},useMemoCache:gc,useCacheRefresh:function(){return tt().memoizedState=tv.bind(null,ne)},useEffectEvent:function(e){var t=tt(),l={impl:e};return t.memoizedState=l,function(){if((pe&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},Rc={readContext:Fe,use:Si,useCallback:Qo,useContext:Fe,useEffect:Tc,useImperativeHandle:Go,useInsertionEffect:ko,useLayoutEffect:Yo,useMemo:Xo,useReducer:Ni,useRef:qo,useState:function(){return Ni(ll)},useDebugValue:zc,useDeferredValue:function(e,t){var l=Be();return Vo(l,Se.memoizedState,e,t)},useTransition:function(){var e=Ni(ll)[0],t=Be().memoizedState;return[typeof e=="boolean"?e:pn(e),t]},useSyncExternalStore:bo,useId:$o,useHostTransitionStatus:_c,useFormState:Mo,useActionState:Mo,useOptimistic:function(e,t){var l=Be();return To(l,Se,e,t)},useMemoCache:gc,useCacheRefresh:Fo};Rc.useEffectEvent=Bo;var td={readContext:Fe,use:Si,useCallback:Qo,useContext:Fe,useEffect:Tc,useImperativeHandle:Go,useInsertionEffect:ko,useLayoutEffect:Yo,useMemo:Xo,useReducer:Nc,useRef:qo,useState:function(){return Nc(ll)},useDebugValue:zc,useDeferredValue:function(e,t){var l=Be();return Se===null?Cc(l,e,t):Vo(l,Se.memoizedState,e,t)},useTransition:function(){var e=Nc(ll)[0],t=Be().memoizedState;return[typeof e=="boolean"?e:pn(e),t]},useSyncExternalStore:bo,useId:$o,useHostTransitionStatus:_c,useFormState:wo,useActionState:wo,useOptimistic:function(e,t){var l=Be();return Se!==null?To(l,Se,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:gc,useCacheRefresh:Fo};td.useEffectEvent=Bo;function Mc(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:N({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var Uc={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=Nt(),i=bl(a);i.payload=t,l!=null&&(i.callback=l),t=gl(e,i,a),t!==null&&(dt(t,e,a),fn(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=Nt(),i=bl(a);i.tag=1,i.payload=t,l!=null&&(i.callback=l),t=gl(e,i,a),t!==null&&(dt(t,e,a),fn(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=Nt(),a=bl(l);a.tag=2,t!=null&&(a.callback=t),t=gl(e,a,l),t!==null&&(dt(t,e,l),fn(t,e,l))}};function ld(e,t,l,a,i,s,u){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,s,u):t.prototype&&t.prototype.isPureReactComponent?!an(l,a)||!an(i,s):!0}function ad(e,t,l,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,a),t.state!==e&&Uc.enqueueReplaceState(t,t.state,null)}function ea(e,t){var l=t;if("ref"in t){l={};for(var a in t)a!=="ref"&&(l[a]=t[a])}if(e=e.defaultProps){l===t&&(l=N({},l));for(var i in e)l[i]===void 0&&(l[i]=e[i])}return l}function nd(e){ni(e)}function id(e){console.error(e)}function sd(e){ni(e)}function zi(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function cd(e,t,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function wc(e,t,l){return l=bl(l),l.tag=3,l.payload={element:null},l.callback=function(){zi(e,t)},l}function ud(e){return e=bl(e),e.tag=3,e}function rd(e,t,l,a){var i=l.type.getDerivedStateFromError;if(typeof i=="function"){var s=a.value;e.payload=function(){return i(s)},e.callback=function(){cd(t,l,a)}}var u=l.stateNode;u!==null&&typeof u.componentDidCatch=="function"&&(e.callback=function(){cd(t,l,a),typeof i!="function"&&(zl===null?zl=new Set([this]):zl.add(this));var d=a.stack;this.componentDidCatch(a.value,{componentStack:d!==null?d:""})})}function av(e,t,l,a,i){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&ga(t,l,i,!0),l=xt.current,l!==null){switch(l.tag){case 31:case 13:return Mt===null?ki():l.alternate===null&&Ue===0&&(Ue=3),l.flags&=-257,l.flags|=65536,l.lanes=i,a===mi?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),su(e,a,i)),!1;case 22:return l.flags|=65536,a===mi?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([a]):l.add(a)),su(e,a,i)),!1}throw Error(r(435,l.tag))}return su(e,a,i),ki(),!1}if(de)return t=xt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,a!==ec&&(e=Error(r(422),{cause:a}),cn(Ot(e,l)))):(a!==ec&&(t=Error(r(423),{cause:a}),cn(Ot(t,l))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,a=Ot(a,l),i=wc(e.stateNode,a,i),dc(e,i),Ue!==4&&(Ue=2)),!1;var s=Error(r(520),{cause:a});if(s=Ot(s,l),Tn===null?Tn=[s]:Tn.push(s),Ue!==4&&(Ue=2),t===null)return!0;a=Ot(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=i&-i,l.lanes|=e,e=wc(l.stateNode,a,e),dc(l,e),!1;case 1:if(t=l.type,s=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||s!==null&&typeof s.componentDidCatch=="function"&&(zl===null||!zl.has(s))))return l.flags|=65536,i&=-i,l.lanes|=i,i=ud(i),rd(i,e,l,a),dc(l,i),!1}l=l.return}while(l!==null);return!1}var qc=Error(r(461)),Le=!1;function We(e,t,l,a){t.child=e===null?ho(t,null,l,a):Il(t,e.child,l,a)}function od(e,t,l,a,i){l=l.render;var s=t.ref;if("ref"in a){var u={};for(var d in a)d!=="ref"&&(u[d]=a[d])}else u=a;return Jl(t),a=yc(e,t,l,u,s,i),d=jc(),e!==null&&!Le?(xc(e,t,i),al(e,t,i)):(de&&d&&Is(t),t.flags|=1,We(e,t,a,i),t.child)}function dd(e,t,l,a,i){if(e===null){var s=l.type;return typeof s=="function"&&!$s(s)&&s.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=s,fd(e,t,s,a,i)):(e=ui(l.type,null,a,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!Xc(e,i)){var u=s.memoizedProps;if(l=l.compare,l=l!==null?l:an,l(u,a)&&e.ref===t.ref)return al(e,t,i)}return t.flags|=1,e=Wt(s,a),e.ref=t.ref,e.return=t,t.child=e}function fd(e,t,l,a,i){if(e!==null){var s=e.memoizedProps;if(an(s,a)&&e.ref===t.ref)if(Le=!1,t.pendingProps=a=s,Xc(e,i))(e.flags&131072)!==0&&(Le=!0);else return t.lanes=e.lanes,al(e,t,i)}return Hc(e,t,l,a,i)}function hd(e,t,l,a){var i=a.children,s=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(s=s!==null?s.baseLanes|l:l,e!==null){for(a=t.child=e.child,i=0;a!==null;)i=i|a.lanes|a.childLanes,a=a.sibling;a=i&~s}else a=0,t.child=null;return md(e,t,s,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&fi(t,s!==null?s.cachePool:null),s!==null?po(t,s):hc(),yo(t);else return a=t.lanes=536870912,md(e,t,s!==null?s.baseLanes|l:l,l,a)}else s!==null?(fi(t,s.cachePool),po(t,s),Nl(),t.memoizedState=null):(e!==null&&fi(t,null),hc(),Nl());return We(e,t,i,l),t.child}function xn(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function md(e,t,l,a,i){var s=cc();return s=s===null?null:{parent:ke._currentValue,pool:s},t.memoizedState={baseLanes:l,cachePool:s},e!==null&&fi(t,null),hc(),yo(t),e!==null&&ga(e,t,a,!0),t.childLanes=i,null}function Ci(e,t){return t=_i({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function vd(e,t,l){return Il(t,e.child,null,l),e=Ci(t,t.pendingProps),e.flags|=2,bt(t),t.memoizedState=null,e}function nv(e,t,l){var a=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(de){if(a.mode==="hidden")return e=Ci(t,a),t.lanes=536870912,xn(null,e);if(vc(t),(e=Oe)?(e=Cf(e,Rt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:vl!==null?{id:Xt,overflow:Vt}:null,retryLane:536870912,hydrationErrors:null},l=Wr(e),l.return=t,t.child=l,$e=t,Oe=null)):e=null,e===null)throw yl(t);return t.lanes=536870912,null}return Ci(t,a)}var s=e.memoizedState;if(s!==null){var u=s.dehydrated;if(vc(t),i)if(t.flags&256)t.flags&=-257,t=vd(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(Le||ga(e,t,l,!1),i=(l&e.childLanes)!==0,Le||i){if(a=Te,a!==null&&(u=nr(a,l),u!==0&&u!==s.retryLane))throw s.retryLane=u,Xl(e,u),dt(a,e,u),qc;ki(),t=vd(e,t,l)}else e=s.treeContext,Oe=Ut(u.nextSibling),$e=t,de=!0,pl=null,Rt=!1,e!==null&&eo(t,e),t=Ci(t,a),t.flags|=4096;return t}return e=Wt(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Oi(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(r(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function Hc(e,t,l,a,i){return Jl(t),l=yc(e,t,l,a,void 0,i),a=jc(),e!==null&&!Le?(xc(e,t,i),al(e,t,i)):(de&&a&&Is(t),t.flags|=1,We(e,t,l,i),t.child)}function pd(e,t,l,a,i,s){return Jl(t),t.updateQueue=null,l=xo(t,a,l,i),jo(e),a=jc(),e!==null&&!Le?(xc(e,t,s),al(e,t,s)):(de&&a&&Is(t),t.flags|=1,We(e,t,l,s),t.child)}function yd(e,t,l,a,i){if(Jl(t),t.stateNode===null){var s=ya,u=l.contextType;typeof u=="object"&&u!==null&&(s=Fe(u)),s=new l(a,s),t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Uc,t.stateNode=s,s._reactInternals=t,s=t.stateNode,s.props=a,s.state=t.memoizedState,s.refs={},rc(t),u=l.contextType,s.context=typeof u=="object"&&u!==null?Fe(u):ya,s.state=t.memoizedState,u=l.getDerivedStateFromProps,typeof u=="function"&&(Mc(t,l,u,a),s.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(u=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),u!==s.state&&Uc.enqueueReplaceState(s,s.state,null),mn(t,a,s,i),hn(),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){s=t.stateNode;var d=t.memoizedProps,j=ea(l,d);s.props=j;var T=s.context,U=l.contextType;u=ya,typeof U=="object"&&U!==null&&(u=Fe(U));var H=l.getDerivedStateFromProps;U=typeof H=="function"||typeof s.getSnapshotBeforeUpdate=="function",d=t.pendingProps!==d,U||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(d||T!==u)&&ad(t,s,a,u),xl=!1;var O=t.memoizedState;s.state=O,mn(t,a,s,i),hn(),T=t.memoizedState,d||O!==T||xl?(typeof H=="function"&&(Mc(t,l,H,a),T=t.memoizedState),(j=xl||ld(t,l,j,a,O,T,u))?(U||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=T),s.props=a,s.state=T,s.context=u,a=j):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{s=t.stateNode,oc(e,t),u=t.memoizedProps,U=ea(l,u),s.props=U,H=t.pendingProps,O=s.context,T=l.contextType,j=ya,typeof T=="object"&&T!==null&&(j=Fe(T)),d=l.getDerivedStateFromProps,(T=typeof d=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(u!==H||O!==j)&&ad(t,s,a,j),xl=!1,O=t.memoizedState,s.state=O,mn(t,a,s,i),hn();var _=t.memoizedState;u!==H||O!==_||xl||e!==null&&e.dependencies!==null&&oi(e.dependencies)?(typeof d=="function"&&(Mc(t,l,d,a),_=t.memoizedState),(U=xl||ld(t,l,U,a,O,_,j)||e!==null&&e.dependencies!==null&&oi(e.dependencies))?(T||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(a,_,j),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(a,_,j)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||u===e.memoizedProps&&O===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&O===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=_),s.props=a,s.state=_,s.context=j,a=U):(typeof s.componentDidUpdate!="function"||u===e.memoizedProps&&O===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&O===e.memoizedState||(t.flags|=1024),a=!1)}return s=a,Oi(e,t),a=(t.flags&128)!==0,s||a?(s=t.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:s.render(),t.flags|=1,e!==null&&a?(t.child=Il(t,e.child,null,i),t.child=Il(t,null,l,i)):We(e,t,l,i),t.memoizedState=s.state,e=t.child):e=al(e,t,i),e}function jd(e,t,l,a){return Zl(),t.flags|=256,We(e,t,l,a),t.child}var Bc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function kc(e){return{baseLanes:e,cachePool:so()}}function Yc(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=St),e}function xd(e,t,l){var a=t.pendingProps,i=!1,s=(t.flags&128)!==0,u;if((u=s)||(u=e!==null&&e.memoizedState===null?!1:(He.current&2)!==0),u&&(i=!0,t.flags&=-129),u=(t.flags&32)!==0,t.flags&=-33,e===null){if(de){if(i?Sl(t):Nl(),(e=Oe)?(e=Cf(e,Rt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:vl!==null?{id:Xt,overflow:Vt}:null,retryLane:536870912,hydrationErrors:null},l=Wr(e),l.return=t,t.child=l,$e=t,Oe=null)):e=null,e===null)throw yl(t);return Su(e)?t.lanes=32:t.lanes=536870912,null}var d=a.children;return a=a.fallback,i?(Nl(),i=t.mode,d=_i({mode:"hidden",children:d},i),a=Vl(a,i,l,null),d.return=t,a.return=t,d.sibling=a,t.child=d,a=t.child,a.memoizedState=kc(l),a.childLanes=Yc(e,u,l),t.memoizedState=Bc,xn(null,a)):(Sl(t),Lc(t,d))}var j=e.memoizedState;if(j!==null&&(d=j.dehydrated,d!==null)){if(s)t.flags&256?(Sl(t),t.flags&=-257,t=Gc(e,t,l)):t.memoizedState!==null?(Nl(),t.child=e.child,t.flags|=128,t=null):(Nl(),d=a.fallback,i=t.mode,a=_i({mode:"visible",children:a.children},i),d=Vl(d,i,l,null),d.flags|=2,a.return=t,d.return=t,a.sibling=d,t.child=a,Il(t,e.child,null,l),a=t.child,a.memoizedState=kc(l),a.childLanes=Yc(e,u,l),t.memoizedState=Bc,t=xn(null,a));else if(Sl(t),Su(d)){if(u=d.nextSibling&&d.nextSibling.dataset,u)var T=u.dgst;u=T,a=Error(r(419)),a.stack="",a.digest=u,cn({value:a,source:null,stack:null}),t=Gc(e,t,l)}else if(Le||ga(e,t,l,!1),u=(l&e.childLanes)!==0,Le||u){if(u=Te,u!==null&&(a=nr(u,l),a!==0&&a!==j.retryLane))throw j.retryLane=a,Xl(e,a),dt(u,e,a),qc;gu(d)||ki(),t=Gc(e,t,l)}else gu(d)?(t.flags|=192,t.child=e.child,t=null):(e=j.treeContext,Oe=Ut(d.nextSibling),$e=t,de=!0,pl=null,Rt=!1,e!==null&&eo(t,e),t=Lc(t,a.children),t.flags|=4096);return t}return i?(Nl(),d=a.fallback,i=t.mode,j=e.child,T=j.sibling,a=Wt(j,{mode:"hidden",children:a.children}),a.subtreeFlags=j.subtreeFlags&65011712,T!==null?d=Wt(T,d):(d=Vl(d,i,l,null),d.flags|=2),d.return=t,a.return=t,a.sibling=d,t.child=a,xn(null,a),a=t.child,d=e.child.memoizedState,d===null?d=kc(l):(i=d.cachePool,i!==null?(j=ke._currentValue,i=i.parent!==j?{parent:j,pool:j}:i):i=so(),d={baseLanes:d.baseLanes|l,cachePool:i}),a.memoizedState=d,a.childLanes=Yc(e,u,l),t.memoizedState=Bc,xn(e.child,a)):(Sl(t),l=e.child,e=l.sibling,l=Wt(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(u=t.deletions,u===null?(t.deletions=[e],t.flags|=16):u.push(e)),t.child=l,t.memoizedState=null,l)}function Lc(e,t){return t=_i({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function _i(e,t){return e=jt(22,e,null,t),e.lanes=0,e}function Gc(e,t,l){return Il(t,e.child,null,l),e=Lc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function bd(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),ac(e.return,t,l)}function Qc(e,t,l,a,i,s){var u=e.memoizedState;u===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:i,treeForkCount:s}:(u.isBackwards=t,u.rendering=null,u.renderingStartTime=0,u.last=a,u.tail=l,u.tailMode=i,u.treeForkCount=s)}function gd(e,t,l){var a=t.pendingProps,i=a.revealOrder,s=a.tail;a=a.children;var u=He.current,d=(u&2)!==0;if(d?(u=u&1|2,t.flags|=128):u&=1,V(He,u),We(e,t,a,l),a=de?sn:0,!d&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&bd(e,l,t);else if(e.tag===19)bd(e,l,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case"forwards":for(l=t.child,i=null;l!==null;)e=l.alternate,e!==null&&ji(e)===null&&(i=l),l=l.sibling;l=i,l===null?(i=t.child,t.child=null):(i=l.sibling,l.sibling=null),Qc(t,!1,i,l,s,a);break;case"backwards":case"unstable_legacy-backwards":for(l=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ji(e)===null){t.child=i;break}e=i.sibling,i.sibling=l,l=i,i=e}Qc(t,!0,l,null,s,a);break;case"together":Qc(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function al(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),Tl|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(ga(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,l=Wt(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=Wt(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function Xc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&oi(e)))}function iv(e,t,l){switch(t.tag){case 3:et(t,t.stateNode.containerInfo),jl(t,ke,e.memoizedState.cache),Zl();break;case 27:case 5:Xa(t);break;case 4:et(t,t.stateNode.containerInfo);break;case 10:jl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,vc(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(Sl(t),t.flags|=128,null):(l&t.child.childLanes)!==0?xd(e,t,l):(Sl(t),e=al(e,t,l),e!==null?e.sibling:null);Sl(t);break;case 19:var i=(e.flags&128)!==0;if(a=(l&t.childLanes)!==0,a||(ga(e,t,l,!1),a=(l&t.childLanes)!==0),i){if(a)return gd(e,t,l);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),V(He,He.current),a)break;return null;case 22:return t.lanes=0,hd(e,t,l,t.pendingProps);case 24:jl(t,ke,e.memoizedState.cache)}return al(e,t,l)}function Sd(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)Le=!0;else{if(!Xc(e,l)&&(t.flags&128)===0)return Le=!1,iv(e,t,l);Le=(e.flags&131072)!==0}else Le=!1,de&&(t.flags&1048576)!==0&&Pr(t,sn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=Fl(t.elementType),t.type=e,typeof e=="function")$s(e)?(a=ea(e,a),t.tag=1,t=yd(null,t,e,a,l)):(t.tag=0,t=Hc(null,t,e,a,l));else{if(e!=null){var i=e.$$typeof;if(i===le){t.tag=11,t=od(null,t,e,a,l);break e}else if(i===Y){t.tag=14,t=dd(null,t,e,a,l);break e}}throw t=Bt(e)||e,Error(r(306,t,""))}}return t;case 0:return Hc(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,i=ea(a,t.pendingProps),yd(e,t,a,i,l);case 3:e:{if(et(t,t.stateNode.containerInfo),e===null)throw Error(r(387));a=t.pendingProps;var s=t.memoizedState;i=s.element,oc(e,t),mn(t,a,null,l);var u=t.memoizedState;if(a=u.cache,jl(t,ke,a),a!==s.cache&&nc(t,[ke],l,!0),hn(),a=u.element,s.isDehydrated)if(s={element:a,isDehydrated:!1,cache:u.cache},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){t=jd(e,t,a,l);break e}else if(a!==i){i=Ot(Error(r(424)),t),cn(i),t=jd(e,t,a,l);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Oe=Ut(e.firstChild),$e=t,de=!0,pl=null,Rt=!0,l=ho(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(Zl(),a===i){t=al(e,t,l);break e}We(e,t,a,l)}t=t.child}return t;case 26:return Oi(e,t),e===null?(l=Uf(t.type,null,t.pendingProps,null))?t.memoizedState=l:de||(l=t.type,e=t.pendingProps,a=Zi(se.current).createElement(l),a[Je]=t,a[it]=e,Ie(a,l,e),Ve(a),t.stateNode=a):t.memoizedState=Uf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Xa(t),e===null&&de&&(a=t.stateNode=Df(t.type,t.pendingProps,se.current),$e=t,Rt=!0,i=Oe,Dl(t.type)?(Nu=i,Oe=Ut(a.firstChild)):Oe=i),We(e,t,t.pendingProps.children,l),Oi(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&de&&((i=a=Oe)&&(a=wv(a,t.type,t.pendingProps,Rt),a!==null?(t.stateNode=a,$e=t,Oe=Ut(a.firstChild),Rt=!1,i=!0):i=!1),i||yl(t)),Xa(t),i=t.type,s=t.pendingProps,u=e!==null?e.memoizedProps:null,a=s.children,ju(i,s)?a=null:u!==null&&ju(i,u)&&(t.flags|=32),t.memoizedState!==null&&(i=yc(e,t,Fm,null,null,l),Un._currentValue=i),Oi(e,t),We(e,t,a,l),t.child;case 6:return e===null&&de&&((e=l=Oe)&&(l=qv(l,t.pendingProps,Rt),l!==null?(t.stateNode=l,$e=t,Oe=null,e=!0):e=!1),e||yl(t)),null;case 13:return xd(e,t,l);case 4:return et(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Il(t,null,a,l):We(e,t,a,l),t.child;case 11:return od(e,t,t.type,t.pendingProps,l);case 7:return We(e,t,t.pendingProps,l),t.child;case 8:return We(e,t,t.pendingProps.children,l),t.child;case 12:return We(e,t,t.pendingProps.children,l),t.child;case 10:return a=t.pendingProps,jl(t,t.type,a.value),We(e,t,a.children,l),t.child;case 9:return i=t.type._context,a=t.pendingProps.children,Jl(t),i=Fe(i),a=a(i),t.flags|=1,We(e,t,a,l),t.child;case 14:return dd(e,t,t.type,t.pendingProps,l);case 15:return fd(e,t,t.type,t.pendingProps,l);case 19:return gd(e,t,l);case 31:return nv(e,t,l);case 22:return hd(e,t,l,t.pendingProps);case 24:return Jl(t),a=Fe(ke),e===null?(i=cc(),i===null&&(i=Te,s=ic(),i.pooledCache=s,s.refCount++,s!==null&&(i.pooledCacheLanes|=l),i=s),t.memoizedState={parent:a,cache:i},rc(t),jl(t,ke,i)):((e.lanes&l)!==0&&(oc(e,t),mn(t,null,null,l),hn()),i=e.memoizedState,s=t.memoizedState,i.parent!==a?(i={parent:a,cache:a},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),jl(t,ke,a)):(a=s.cache,jl(t,ke,a),a!==i.cache&&nc(t,[ke],l,!0))),We(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function nl(e){e.flags|=4}function Vc(e,t,l,a,i){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if($d())e.flags|=8192;else throw Wl=mi,uc}else e.flags&=-16777217}function Nd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!kf(t))if($d())e.flags|=8192;else throw Wl=mi,uc}function Di(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?tr():536870912,e.lanes|=t,Ma|=t)}function bn(e,t){if(!de)switch(e.tailMode){case"hidden":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function _e(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var i=e.child;i!==null;)l|=i.lanes|i.childLanes,a|=i.subtreeFlags&65011712,a|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)l|=i.lanes|i.childLanes,a|=i.subtreeFlags,a|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=a,e.childLanes=l,t}function sv(e,t,l){var a=t.pendingProps;switch(Ps(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return _e(t),null;case 1:return _e(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),el(ke),qe(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(ba(t)?nl(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,tc())),_e(t),null;case 26:var i=t.type,s=t.memoizedState;return e===null?(nl(t),s!==null?(_e(t),Nd(t,s)):(_e(t),Vc(t,i,null,a,l))):s?s!==e.memoizedState?(nl(t),_e(t),Nd(t,s)):(_e(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&nl(t),_e(t),Vc(t,i,e,a,l)),null;case 27:if(Gn(t),l=se.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&nl(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return _e(t),null}e=K.current,ba(t)?to(t):(e=Df(i,a,l),t.stateNode=e,nl(t))}return _e(t),null;case 5:if(Gn(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&nl(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return _e(t),null}if(s=K.current,ba(t))to(t);else{var u=Zi(se.current);switch(s){case 1:s=u.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:s=u.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":s=u.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":s=u.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":s=u.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild);break;case"select":s=typeof a.is=="string"?u.createElement("select",{is:a.is}):u.createElement("select"),a.multiple?s.multiple=!0:a.size&&(s.size=a.size);break;default:s=typeof a.is=="string"?u.createElement(i,{is:a.is}):u.createElement(i)}}s[Je]=t,s[it]=a;e:for(u=t.child;u!==null;){if(u.tag===5||u.tag===6)s.appendChild(u.stateNode);else if(u.tag!==4&&u.tag!==27&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===t)break e;for(;u.sibling===null;){if(u.return===null||u.return===t)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}t.stateNode=s;e:switch(Ie(s,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&&nl(t)}}return _e(t),Vc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&nl(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(r(166));if(e=se.current,ba(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,i=$e,i!==null)switch(i.tag){case 27:case 5:a=i.memoizedProps}e[Je]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||bf(e.nodeValue,l)),e||yl(t,!0)}else e=Zi(e).createTextNode(a),e[Je]=t,t.stateNode=e}return _e(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=ba(t),l!==null){if(e===null){if(!a)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Je]=t}else Zl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;_e(t),e=!1}else l=tc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(bt(t),t):(bt(t),null);if((t.flags&128)!==0)throw Error(r(558))}return _e(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=ba(t),a!==null&&a.dehydrated!==null){if(e===null){if(!i)throw Error(r(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));i[Je]=t}else Zl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;_e(t),i=!1}else i=tc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(bt(t),t):(bt(t),null)}return bt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,i=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(i=a.alternate.memoizedState.cachePool.pool),s=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(s=a.memoizedState.cachePool.pool),s!==i&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),Di(t,t.updateQueue),_e(t),null);case 4:return qe(),e===null&&hu(t.stateNode.containerInfo),_e(t),null;case 10:return el(t.type),_e(t),null;case 19:if(B(He),a=t.memoizedState,a===null)return _e(t),null;if(i=(t.flags&128)!==0,s=a.rendering,s===null)if(i)bn(a,!1);else{if(Ue!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=ji(e),s!==null){for(t.flags|=128,bn(a,!1),e=s.updateQueue,t.updateQueue=e,Di(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Fr(l,e),l=l.sibling;return V(He,He.current&1|2),de&&It(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&mt()>qi&&(t.flags|=128,i=!0,bn(a,!1),t.lanes=4194304)}else{if(!i)if(e=ji(s),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Di(t,e),bn(a,!0),a.tail===null&&a.tailMode==="hidden"&&!s.alternate&&!de)return _e(t),null}else 2*mt()-a.renderingStartTime>qi&&l!==536870912&&(t.flags|=128,i=!0,bn(a,!1),t.lanes=4194304);a.isBackwards?(s.sibling=t.child,t.child=s):(e=a.last,e!==null?e.sibling=s:t.child=s,a.last=s)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=mt(),e.sibling=null,l=He.current,V(He,i?l&1|2:l&1),de&&It(t,a.treeForkCount),e):(_e(t),null);case 22:case 23:return bt(t),mc(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(l&536870912)!==0&&(t.flags&128)===0&&(_e(t),t.subtreeFlags&6&&(t.flags|=8192)):_e(t),l=t.updateQueue,l!==null&&Di(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==l&&(t.flags|=2048),e!==null&&B($l),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),el(ke),_e(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function cv(e,t){switch(Ps(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return el(ke),qe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Gn(t),null;case 31:if(t.memoizedState!==null){if(bt(t),t.alternate===null)throw Error(r(340));Zl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(bt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Zl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(He),null;case 4:return qe(),null;case 10:return el(t.type),null;case 22:case 23:return bt(t),mc(),e!==null&&B($l),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return el(ke),null;case 25:return null;default:return null}}function Ed(e,t){switch(Ps(t),t.tag){case 3:el(ke),qe();break;case 26:case 27:case 5:Gn(t);break;case 4:qe();break;case 31:t.memoizedState!==null&&bt(t);break;case 13:bt(t);break;case 19:B(He);break;case 10:el(t.type);break;case 22:case 23:bt(t),mc(),e!==null&&B($l);break;case 24:el(ke)}}function gn(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var i=a.next;l=i;do{if((l.tag&e)===e){a=void 0;var s=l.create,u=l.inst;a=s(),u.destroy=a}l=l.next}while(l!==i)}}catch(d){ge(t,t.return,d)}}function El(e,t,l){try{var a=t.updateQueue,i=a!==null?a.lastEffect:null;if(i!==null){var s=i.next;a=s;do{if((a.tag&e)===e){var u=a.inst,d=u.destroy;if(d!==void 0){u.destroy=void 0,i=t;var j=l,T=d;try{T()}catch(U){ge(i,j,U)}}}a=a.next}while(a!==s)}}catch(U){ge(t,t.return,U)}}function Ad(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{vo(t,l)}catch(a){ge(e,e.return,a)}}}function Td(e,t,l){l.props=ea(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){ge(e,t,a)}}function Sn(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof l=="function"?e.refCleanup=l(a):l.current=a}}catch(i){ge(e,t,i)}}function Zt(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(i){ge(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(i){ge(e,t,i)}else l.current=null}function zd(e){var t=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break e;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(i){ge(e,e.return,i)}}function Zc(e,t,l){try{var a=e.stateNode;Ov(a,e.type,l,t),a[it]=t}catch(i){ge(e,e.return,i)}}function Cd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Dl(e.type)||e.tag===4}function Kc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Cd(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&&Dl(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 Jc(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=$t));else if(a!==4&&(a===27&&Dl(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(Jc(e,t,l),e=e.sibling;e!==null;)Jc(e,t,l),e=e.sibling}function Ri(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(a!==4&&(a===27&&Dl(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Ri(e,t,l),e=e.sibling;e!==null;)Ri(e,t,l),e=e.sibling}function Od(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Ie(t,a,l),t[Je]=e,t[it]=l}catch(s){ge(e,e.return,s)}}var il=!1,Ge=!1,$c=!1,_d=typeof WeakSet=="function"?WeakSet:Set,Ze=null;function uv(e,t){if(e=e.containerInfo,pu=Pi,e=Lr(e),Gs(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var i=a.anchorOffset,s=a.focusNode;a=a.focusOffset;try{l.nodeType,s.nodeType}catch{l=null;break e}var u=0,d=-1,j=-1,T=0,U=0,H=e,O=null;t:for(;;){for(var _;H!==l||i!==0&&H.nodeType!==3||(d=u+i),H!==s||a!==0&&H.nodeType!==3||(j=u+a),H.nodeType===3&&(u+=H.nodeValue.length),(_=H.firstChild)!==null;)O=H,H=_;for(;;){if(H===e)break t;if(O===l&&++T===i&&(d=u),O===s&&++U===a&&(j=u),(_=H.nextSibling)!==null)break;H=O,O=H.parentNode}H=_}l=d===-1||j===-1?null:{start:d,end:j}}else l=null}l=l||{start:0,end:0}}else l=null;for(yu={focusedElem:e,selectionRange:l},Pi=!1,Ze=t;Ze!==null;)if(t=Ze,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ze=e;else for(;Ze!==null;){switch(t=Ze,s=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l<e.length;l++)i=e[l],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&s!==null){e=void 0,l=t,i=s.memoizedProps,s=s.memoizedState,a=l.stateNode;try{var Z=ea(l.type,i);e=a.getSnapshotBeforeUpdate(Z,s),a.__reactInternalSnapshotBeforeUpdate=e}catch(W){ge(l,l.return,W)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)bu(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":bu(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(r(163))}if(e=t.sibling,e!==null){e.return=t.return,Ze=e;break}Ze=t.return}}function Dd(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:cl(e,l),a&4&&gn(5,l);break;case 1:if(cl(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(u){ge(l,l.return,u)}else{var i=ea(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(u){ge(l,l.return,u)}}a&64&&Ad(l),a&512&&Sn(l,l.return);break;case 3:if(cl(e,l),a&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{vo(e,t)}catch(u){ge(l,l.return,u)}}break;case 27:t===null&&a&4&&Od(l);case 26:case 5:cl(e,l),t===null&&a&4&&zd(l),a&512&&Sn(l,l.return);break;case 12:cl(e,l);break;case 31:cl(e,l),a&4&&Ud(e,l);break;case 13:cl(e,l),a&4&&wd(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=yv.bind(null,l),Hv(e,l))));break;case 22:if(a=l.memoizedState!==null||il,!a){t=t!==null&&t.memoizedState!==null||Ge,i=il;var s=Ge;il=a,(Ge=t)&&!s?ul(e,l,(l.subtreeFlags&8772)!==0):cl(e,l),il=i,Ge=s}break;case 30:break;default:cl(e,l)}}function Rd(e){var t=e.alternate;t!==null&&(e.alternate=null,Rd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&As(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Re=null,ct=!1;function sl(e,t,l){for(l=l.child;l!==null;)Md(e,t,l),l=l.sibling}function Md(e,t,l){if(vt&&typeof vt.onCommitFiberUnmount=="function")try{vt.onCommitFiberUnmount(Va,l)}catch{}switch(l.tag){case 26:Ge||Zt(l,t),sl(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Ge||Zt(l,t);var a=Re,i=ct;Dl(l.type)&&(Re=l.stateNode,ct=!1),sl(e,t,l),Dn(l.stateNode),Re=a,ct=i;break;case 5:Ge||Zt(l,t);case 6:if(a=Re,i=ct,Re=null,sl(e,t,l),Re=a,ct=i,Re!==null)if(ct)try{(Re.nodeType===9?Re.body:Re.nodeName==="HTML"?Re.ownerDocument.body:Re).removeChild(l.stateNode)}catch(s){ge(l,t,s)}else try{Re.removeChild(l.stateNode)}catch(s){ge(l,t,s)}break;case 18:Re!==null&&(ct?(e=Re,Tf(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),La(e)):Tf(Re,l.stateNode));break;case 4:a=Re,i=ct,Re=l.stateNode.containerInfo,ct=!0,sl(e,t,l),Re=a,ct=i;break;case 0:case 11:case 14:case 15:El(2,l,t),Ge||El(4,l,t),sl(e,t,l);break;case 1:Ge||(Zt(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&Td(l,t,a)),sl(e,t,l);break;case 21:sl(e,t,l);break;case 22:Ge=(a=Ge)||l.memoizedState!==null,sl(e,t,l),Ge=a;break;default:sl(e,t,l)}}function Ud(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{La(e)}catch(l){ge(t,t.return,l)}}}function wd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{La(e)}catch(l){ge(t,t.return,l)}}function rv(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new _d),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new _d),t;default:throw Error(r(435,e.tag))}}function Mi(e,t){var l=rv(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var i=jv.bind(null,e,a);a.then(i,i)}})}function ut(e,t){var l=t.deletions;if(l!==null)for(var a=0;a<l.length;a++){var i=l[a],s=e,u=t,d=u;e:for(;d!==null;){switch(d.tag){case 27:if(Dl(d.type)){Re=d.stateNode,ct=!1;break e}break;case 5:Re=d.stateNode,ct=!1;break e;case 3:case 4:Re=d.stateNode.containerInfo,ct=!0;break e}d=d.return}if(Re===null)throw Error(r(160));Md(s,u,i),Re=null,ct=!1,s=i.alternate,s!==null&&(s.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)qd(t,e),t=t.sibling}var Yt=null;function qd(e,t){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ut(t,e),rt(e),a&4&&(El(3,e,e.return),gn(3,e),El(5,e,e.return));break;case 1:ut(t,e),rt(e),a&512&&(Ge||l===null||Zt(l,l.return)),a&64&&il&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?a:l.concat(a))));break;case 26:var i=Yt;if(ut(t,e),rt(e),a&512&&(Ge||l===null||Zt(l,l.return)),a&4){var s=l!==null?l.memoizedState:null;if(a=e.memoizedState,l===null)if(a===null)if(e.stateNode===null){e:{a=e.type,l=e.memoizedProps,i=i.ownerDocument||i;t:switch(a){case"title":s=i.getElementsByTagName("title")[0],(!s||s[Ja]||s[Je]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=i.createElement(a),i.head.insertBefore(s,i.querySelector("head > title"))),Ie(s,a,l),s[Je]=e,Ve(s),a=s;break e;case"link":var u=Hf("link","href",i).get(a+(l.href||""));if(u){for(var d=0;d<u.length;d++)if(s=u[d],s.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&s.getAttribute("rel")===(l.rel==null?null:l.rel)&&s.getAttribute("title")===(l.title==null?null:l.title)&&s.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){u.splice(d,1);break t}}s=i.createElement(a),Ie(s,a,l),i.head.appendChild(s);break;case"meta":if(u=Hf("meta","content",i).get(a+(l.content||""))){for(d=0;d<u.length;d++)if(s=u[d],s.getAttribute("content")===(l.content==null?null:""+l.content)&&s.getAttribute("name")===(l.name==null?null:l.name)&&s.getAttribute("property")===(l.property==null?null:l.property)&&s.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&s.getAttribute("charset")===(l.charSet==null?null:l.charSet)){u.splice(d,1);break t}}s=i.createElement(a),Ie(s,a,l),i.head.appendChild(s);break;default:throw Error(r(468,a))}s[Je]=e,Ve(s),a=s}e.stateNode=a}else Bf(i,e.type,e.stateNode);else e.stateNode=qf(i,a,e.memoizedProps);else s!==a?(s===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):s.count--,a===null?Bf(i,e.type,e.stateNode):qf(i,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Zc(e,e.memoizedProps,l.memoizedProps)}break;case 27:ut(t,e),rt(e),a&512&&(Ge||l===null||Zt(l,l.return)),l!==null&&a&4&&Zc(e,e.memoizedProps,l.memoizedProps);break;case 5:if(ut(t,e),rt(e),a&512&&(Ge||l===null||Zt(l,l.return)),e.flags&32){i=e.stateNode;try{oa(i,"")}catch(Z){ge(e,e.return,Z)}}a&4&&e.stateNode!=null&&(i=e.memoizedProps,Zc(e,i,l!==null?l.memoizedProps:i)),a&1024&&($c=!0);break;case 6:if(ut(t,e),rt(e),a&4){if(e.stateNode===null)throw Error(r(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(Z){ge(e,e.return,Z)}}break;case 3:if($i=null,i=Yt,Yt=Ki(t.containerInfo),ut(t,e),Yt=i,rt(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{La(t.containerInfo)}catch(Z){ge(e,e.return,Z)}$c&&($c=!1,Hd(e));break;case 4:a=Yt,Yt=Ki(e.stateNode.containerInfo),ut(t,e),rt(e),Yt=a;break;case 12:ut(t,e),rt(e);break;case 31:ut(t,e),rt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Mi(e,a)));break;case 13:ut(t,e),rt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(wi=mt()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Mi(e,a)));break;case 22:i=e.memoizedState!==null;var j=l!==null&&l.memoizedState!==null,T=il,U=Ge;if(il=T||i,Ge=U||j,ut(t,e),Ge=U,il=T,rt(e),a&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(l===null||j||il||Ge||ta(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){j=l=t;try{if(s=j.stateNode,i)u=s.style,typeof u.setProperty=="function"?u.setProperty("display","none","important"):u.display="none";else{d=j.stateNode;var H=j.memoizedProps.style,O=H!=null&&H.hasOwnProperty("display")?H.display:null;d.style.display=O==null||typeof O=="boolean"?"":(""+O).trim()}}catch(Z){ge(j,j.return,Z)}}}else if(t.tag===6){if(l===null){j=t;try{j.stateNode.nodeValue=i?"":j.memoizedProps}catch(Z){ge(j,j.return,Z)}}}else if(t.tag===18){if(l===null){j=t;try{var _=j.stateNode;i?zf(_,!0):zf(j.stateNode,!1)}catch(Z){ge(j,j.return,Z)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(l=a.retryQueue,l!==null&&(a.retryQueue=null,Mi(e,l))));break;case 19:ut(t,e),rt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Mi(e,a)));break;case 30:break;case 21:break;default:ut(t,e),rt(e)}}function rt(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(Cd(a)){l=a;break}a=a.return}if(l==null)throw Error(r(160));switch(l.tag){case 27:var i=l.stateNode,s=Kc(e);Ri(e,s,i);break;case 5:var u=l.stateNode;l.flags&32&&(oa(u,""),l.flags&=-33);var d=Kc(e);Ri(e,d,u);break;case 3:case 4:var j=l.stateNode.containerInfo,T=Kc(e);Jc(e,T,j);break;default:throw Error(r(161))}}catch(U){ge(e,e.return,U)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Hd(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Hd(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function cl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Dd(e,t.alternate,t),t=t.sibling}function ta(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:El(4,t,t.return),ta(t);break;case 1:Zt(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&Td(t,t.return,l),ta(t);break;case 27:Dn(t.stateNode);case 26:case 5:Zt(t,t.return),ta(t);break;case 22:t.memoizedState===null&&ta(t);break;case 30:ta(t);break;default:ta(t)}e=e.sibling}}function ul(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,i=e,s=t,u=s.flags;switch(s.tag){case 0:case 11:case 15:ul(i,s,l),gn(4,s);break;case 1:if(ul(i,s,l),a=s,i=a.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(T){ge(a,a.return,T)}if(a=s,i=a.updateQueue,i!==null){var d=a.stateNode;try{var j=i.shared.hiddenCallbacks;if(j!==null)for(i.shared.hiddenCallbacks=null,i=0;i<j.length;i++)mo(j[i],d)}catch(T){ge(a,a.return,T)}}l&&u&64&&Ad(s),Sn(s,s.return);break;case 27:Od(s);case 26:case 5:ul(i,s,l),l&&a===null&&u&4&&zd(s),Sn(s,s.return);break;case 12:ul(i,s,l);break;case 31:ul(i,s,l),l&&u&4&&Ud(i,s);break;case 13:ul(i,s,l),l&&u&4&&wd(i,s);break;case 22:s.memoizedState===null&&ul(i,s,l),Sn(s,s.return);break;case 30:break;default:ul(i,s,l)}t=t.sibling}}function Fc(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&un(l))}function Wc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&un(e))}function Lt(e,t,l,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Bd(e,t,l,a),t=t.sibling}function Bd(e,t,l,a){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Lt(e,t,l,a),i&2048&&gn(9,t);break;case 1:Lt(e,t,l,a);break;case 3:Lt(e,t,l,a),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&un(e)));break;case 12:if(i&2048){Lt(e,t,l,a),e=t.stateNode;try{var s=t.memoizedProps,u=s.id,d=s.onPostCommit;typeof d=="function"&&d(u,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(j){ge(t,t.return,j)}}else Lt(e,t,l,a);break;case 31:Lt(e,t,l,a);break;case 13:Lt(e,t,l,a);break;case 23:break;case 22:s=t.stateNode,u=t.alternate,t.memoizedState!==null?s._visibility&2?Lt(e,t,l,a):Nn(e,t):s._visibility&2?Lt(e,t,l,a):(s._visibility|=2,_a(e,t,l,a,(t.subtreeFlags&10256)!==0||!1)),i&2048&&Fc(u,t);break;case 24:Lt(e,t,l,a),i&2048&&Wc(t.alternate,t);break;default:Lt(e,t,l,a)}}function _a(e,t,l,a,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var s=e,u=t,d=l,j=a,T=u.flags;switch(u.tag){case 0:case 11:case 15:_a(s,u,d,j,i),gn(8,u);break;case 23:break;case 22:var U=u.stateNode;u.memoizedState!==null?U._visibility&2?_a(s,u,d,j,i):Nn(s,u):(U._visibility|=2,_a(s,u,d,j,i)),i&&T&2048&&Fc(u.alternate,u);break;case 24:_a(s,u,d,j,i),i&&T&2048&&Wc(u.alternate,u);break;default:_a(s,u,d,j,i)}t=t.sibling}}function Nn(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,a=t,i=a.flags;switch(a.tag){case 22:Nn(l,a),i&2048&&Fc(a.alternate,a);break;case 24:Nn(l,a),i&2048&&Wc(a.alternate,a);break;default:Nn(l,a)}t=t.sibling}}var En=8192;function Da(e,t,l){if(e.subtreeFlags&En)for(e=e.child;e!==null;)kd(e,t,l),e=e.sibling}function kd(e,t,l){switch(e.tag){case 26:Da(e,t,l),e.flags&En&&e.memoizedState!==null&&$v(l,Yt,e.memoizedState,e.memoizedProps);break;case 5:Da(e,t,l);break;case 3:case 4:var a=Yt;Yt=Ki(e.stateNode.containerInfo),Da(e,t,l),Yt=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=En,En=16777216,Da(e,t,l),En=a):Da(e,t,l));break;default:Da(e,t,l)}}function Yd(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function An(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];Ze=a,Gd(a,e)}Yd(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ld(e),e=e.sibling}function Ld(e){switch(e.tag){case 0:case 11:case 15:An(e),e.flags&2048&&El(9,e,e.return);break;case 3:An(e);break;case 12:An(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ui(e)):An(e);break;default:An(e)}}function Ui(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];Ze=a,Gd(a,e)}Yd(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:El(8,t,t.return),Ui(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,Ui(t));break;default:Ui(t)}e=e.sibling}}function Gd(e,t){for(;Ze!==null;){var l=Ze;switch(l.tag){case 0:case 11:case 15:El(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var a=l.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:un(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,Ze=a;else e:for(l=e;Ze!==null;){a=Ze;var i=a.sibling,s=a.return;if(Rd(a),a===l){Ze=null;break e}if(i!==null){i.return=s,Ze=i;break e}Ze=s}}}var ov={getCacheForType:function(e){var t=Fe(ke),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return Fe(ke).controller.signal}},dv=typeof WeakMap=="function"?WeakMap:Map,pe=0,Te=null,ce=null,re=0,be=0,gt=null,Al=!1,Ra=!1,Ic=!1,rl=0,Ue=0,Tl=0,la=0,Pc=0,St=0,Ma=0,Tn=null,ot=null,eu=!1,wi=0,Qd=0,qi=1/0,Hi=null,zl=null,Qe=0,Cl=null,Ua=null,ol=0,tu=0,lu=null,Xd=null,zn=0,au=null;function Nt(){return(pe&2)!==0&&re!==0?re&-re:C.T!==null?ru():ir()}function Vd(){if(St===0)if((re&536870912)===0||de){var e=Vn;Vn<<=1,(Vn&3932160)===0&&(Vn=262144),St=e}else St=536870912;return e=xt.current,e!==null&&(e.flags|=32),St}function dt(e,t,l){(e===Te&&(be===2||be===9)||e.cancelPendingCommit!==null)&&(wa(e,0),Ol(e,re,St,!1)),Ka(e,l),((pe&2)===0||e!==Te)&&(e===Te&&((pe&2)===0&&(la|=l),Ue===4&&Ol(e,re,St,!1)),Kt(e))}function Zd(e,t,l){if((pe&6)!==0)throw Error(r(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||Za(e,t),i=a?mv(e,t):iu(e,t,!0),s=a;do{if(i===0){Ra&&!a&&Ol(e,t,0,!1);break}else{if(l=e.current.alternate,s&&!fv(l)){i=iu(e,t,!1),s=!1;continue}if(i===2){if(s=t,e.errorRecoveryDisabledLanes&s)var u=0;else u=e.pendingLanes&-536870913,u=u!==0?u:u&536870912?536870912:0;if(u!==0){t=u;e:{var d=e;i=Tn;var j=d.current.memoizedState.isDehydrated;if(j&&(wa(d,u).flags|=256),u=iu(d,u,!1),u!==2){if(Ic&&!j){d.errorRecoveryDisabledLanes|=s,la|=s,i=4;break e}s=ot,ot=i,s!==null&&(ot===null?ot=s:ot.push.apply(ot,s))}i=u}if(s=!1,i!==2)continue}}if(i===1){wa(e,0),Ol(e,t,0,!0);break}e:{switch(a=e,s=i,s){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:Ol(a,t,St,!Al);break e;case 2:ot=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(i=wi+300-mt(),10<i)){if(Ol(a,t,St,!Al),Kn(a,0,!0)!==0)break e;ol=t,a.timeoutHandle=Ef(Kd.bind(null,a,l,ot,Hi,eu,t,St,la,Ma,Al,s,"Throttled",-0,0),i);break e}Kd(a,l,ot,Hi,eu,t,St,la,Ma,Al,s,null,-0,0)}}break}while(!0);Kt(e)}function Kd(e,t,l,a,i,s,u,d,j,T,U,H,O,_){if(e.timeoutHandle=-1,H=t.subtreeFlags,H&8192||(H&16785408)===16785408){H={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:$t},kd(t,s,H);var Z=(s&62914560)===s?wi-mt():(s&4194048)===s?Qd-mt():0;if(Z=Fv(H,Z),Z!==null){ol=s,e.cancelPendingCommit=Z(tf.bind(null,e,t,s,l,a,i,u,d,j,U,H,null,O,_)),Ol(e,s,u,!T);return}}tf(e,t,s,l,a,i,u,d,j)}function fv(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var i=l[a],s=i.getSnapshot;i=i.value;try{if(!yt(s(),i))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ol(e,t,l,a){t&=~Pc,t&=~la,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var i=t;0<i;){var s=31-pt(i),u=1<<s;a[s]=-1,i&=~u}l!==0&&lr(e,l,t)}function Bi(){return(pe&6)===0?(Cn(0),!1):!0}function nu(){if(ce!==null){if(be===0)var e=ce.return;else e=ce,Pt=Kl=null,bc(e),Aa=null,on=0,e=ce;for(;e!==null;)Ed(e.alternate,e),e=e.return;ce=null}}function wa(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,Rv(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),ol=0,nu(),Te=e,ce=l=Wt(e.current,null),re=t,be=0,gt=null,Al=!1,Ra=Za(e,t),Ic=!1,Ma=St=Pc=la=Tl=Ue=0,ot=Tn=null,eu=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var i=31-pt(a),s=1<<i;t|=e[i],a&=~s}return rl=t,ii(),l}function Jd(e,t){ne=null,C.H=jn,t===Ea||t===hi?(t=ro(),be=3):t===uc?(t=ro(),be=4):be=t===qc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,gt=t,ce===null&&(Ue=1,zi(e,Ot(t,e.current)))}function $d(){var e=xt.current;return e===null?!0:(re&4194048)===re?Mt===null:(re&62914560)===re||(re&536870912)!==0?e===Mt:!1}function Fd(){var e=C.H;return C.H=jn,e===null?jn:e}function Wd(){var e=C.A;return C.A=ov,e}function ki(){Ue=4,Al||(re&4194048)!==re&&xt.current!==null||(Ra=!0),(Tl&134217727)===0&&(la&134217727)===0||Te===null||Ol(Te,re,St,!1)}function iu(e,t,l){var a=pe;pe|=2;var i=Fd(),s=Wd();(Te!==e||re!==t)&&(Hi=null,wa(e,t)),t=!1;var u=Ue;e:do try{if(be!==0&&ce!==null){var d=ce,j=gt;switch(be){case 8:nu(),u=6;break e;case 3:case 2:case 9:case 6:xt.current===null&&(t=!0);var T=be;if(be=0,gt=null,qa(e,d,j,T),l&&Ra){u=0;break e}break;default:T=be,be=0,gt=null,qa(e,d,j,T)}}hv(),u=Ue;break}catch(U){Jd(e,U)}while(!0);return t&&e.shellSuspendCounter++,Pt=Kl=null,pe=a,C.H=i,C.A=s,ce===null&&(Te=null,re=0,ii()),u}function hv(){for(;ce!==null;)Id(ce)}function mv(e,t){var l=pe;pe|=2;var a=Fd(),i=Wd();Te!==e||re!==t?(Hi=null,qi=mt()+500,wa(e,t)):Ra=Za(e,t);e:do try{if(be!==0&&ce!==null){t=ce;var s=gt;t:switch(be){case 1:be=0,gt=null,qa(e,t,s,1);break;case 2:case 9:if(co(s)){be=0,gt=null,Pd(t);break}t=function(){be!==2&&be!==9||Te!==e||(be=7),Kt(e)},s.then(t,t);break e;case 3:be=7;break e;case 4:be=5;break e;case 7:co(s)?(be=0,gt=null,Pd(t)):(be=0,gt=null,qa(e,t,s,7));break;case 5:var u=null;switch(ce.tag){case 26:u=ce.memoizedState;case 5:case 27:var d=ce;if(u?kf(u):d.stateNode.complete){be=0,gt=null;var j=d.sibling;if(j!==null)ce=j;else{var T=d.return;T!==null?(ce=T,Yi(T)):ce=null}break t}}be=0,gt=null,qa(e,t,s,5);break;case 6:be=0,gt=null,qa(e,t,s,6);break;case 8:nu(),Ue=6;break e;default:throw Error(r(462))}}vv();break}catch(U){Jd(e,U)}while(!0);return Pt=Kl=null,C.H=a,C.A=i,pe=l,ce!==null?0:(Te=null,re=0,ii(),Ue)}function vv(){for(;ce!==null&&!Bh();)Id(ce)}function Id(e){var t=Sd(e.alternate,e,rl);e.memoizedProps=e.pendingProps,t===null?Yi(e):ce=t}function Pd(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=pd(l,t,t.pendingProps,t.type,void 0,re);break;case 11:t=pd(l,t,t.pendingProps,t.type.render,t.ref,re);break;case 5:bc(t);default:Ed(l,t),t=ce=Fr(t,rl),t=Sd(l,t,rl)}e.memoizedProps=e.pendingProps,t===null?Yi(e):ce=t}function qa(e,t,l,a){Pt=Kl=null,bc(t),Aa=null,on=0;var i=t.return;try{if(av(e,i,t,l,re)){Ue=1,zi(e,Ot(l,e.current)),ce=null;return}}catch(s){if(i!==null)throw ce=i,s;Ue=1,zi(e,Ot(l,e.current)),ce=null;return}t.flags&32768?(de||a===1?e=!0:Ra||(re&536870912)!==0?e=!1:(Al=e=!0,(a===2||a===9||a===3||a===6)&&(a=xt.current,a!==null&&a.tag===13&&(a.flags|=16384))),ef(t,e)):Yi(t)}function Yi(e){var t=e;do{if((t.flags&32768)!==0){ef(t,Al);return}e=t.return;var l=sv(t.alternate,t,rl);if(l!==null){ce=l;return}if(t=t.sibling,t!==null){ce=t;return}ce=t=e}while(t!==null);Ue===0&&(Ue=5)}function ef(e,t){do{var l=cv(e.alternate,e);if(l!==null){l.flags&=32767,ce=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){ce=e;return}ce=e=l}while(e!==null);Ue=6,ce=null}function tf(e,t,l,a,i,s,u,d,j){e.cancelPendingCommit=null;do Li();while(Qe!==0);if((pe&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(s=t.lanes|t.childLanes,s|=Ks,Jh(e,l,s,u,d,j),e===Te&&(ce=Te=null,re=0),Ua=t,Cl=e,ol=l,tu=s,lu=i,Xd=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,xv(Qn,function(){return cf(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=C.T,C.T=null,i=Q.p,Q.p=2,u=pe,pe|=4;try{uv(e,t,l)}finally{pe=u,Q.p=i,C.T=a}}Qe=1,lf(),af(),nf()}}function lf(){if(Qe===1){Qe=0;var e=Cl,t=Ua,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=C.T,C.T=null;var a=Q.p;Q.p=2;var i=pe;pe|=4;try{qd(t,e);var s=yu,u=Lr(e.containerInfo),d=s.focusedElem,j=s.selectionRange;if(u!==d&&d&&d.ownerDocument&&Yr(d.ownerDocument.documentElement,d)){if(j!==null&&Gs(d)){var T=j.start,U=j.end;if(U===void 0&&(U=T),"selectionStart"in d)d.selectionStart=T,d.selectionEnd=Math.min(U,d.value.length);else{var H=d.ownerDocument||document,O=H&&H.defaultView||window;if(O.getSelection){var _=O.getSelection(),Z=d.textContent.length,W=Math.min(j.start,Z),Ee=j.end===void 0?W:Math.min(j.end,Z);!_.extend&&W>Ee&&(u=Ee,Ee=W,W=u);var E=kr(d,W),x=kr(d,Ee);if(E&&x&&(_.rangeCount!==1||_.anchorNode!==E.node||_.anchorOffset!==E.offset||_.focusNode!==x.node||_.focusOffset!==x.offset)){var A=H.createRange();A.setStart(E.node,E.offset),_.removeAllRanges(),W>Ee?(_.addRange(A),_.extend(x.node,x.offset)):(A.setEnd(x.node,x.offset),_.addRange(A))}}}}for(H=[],_=d;_=_.parentNode;)_.nodeType===1&&H.push({element:_,left:_.scrollLeft,top:_.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d<H.length;d++){var w=H[d];w.element.scrollLeft=w.left,w.element.scrollTop=w.top}}Pi=!!pu,yu=pu=null}finally{pe=i,Q.p=a,C.T=l}}e.current=t,Qe=2}}function af(){if(Qe===2){Qe=0;var e=Cl,t=Ua,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=C.T,C.T=null;var a=Q.p;Q.p=2;var i=pe;pe|=4;try{Dd(e,t.alternate,t)}finally{pe=i,Q.p=a,C.T=l}}Qe=3}}function nf(){if(Qe===4||Qe===3){Qe=0,kh();var e=Cl,t=Ua,l=ol,a=Xd;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Qe=5:(Qe=0,Ua=Cl=null,sf(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(zl=null),Ns(l),t=t.stateNode,vt&&typeof vt.onCommitFiberRoot=="function")try{vt.onCommitFiberRoot(Va,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=C.T,i=Q.p,Q.p=2,C.T=null;try{for(var s=e.onRecoverableError,u=0;u<a.length;u++){var d=a[u];s(d.value,{componentStack:d.stack})}}finally{C.T=t,Q.p=i}}(ol&3)!==0&&Li(),Kt(e),i=e.pendingLanes,(l&261930)!==0&&(i&42)!==0?e===au?zn++:(zn=0,au=e):zn=0,Cn(0)}}function sf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,un(t)))}function Li(){return lf(),af(),nf(),cf()}function cf(){if(Qe!==5)return!1;var e=Cl,t=tu;tu=0;var l=Ns(ol),a=C.T,i=Q.p;try{Q.p=32>l?32:l,C.T=null,l=lu,lu=null;var s=Cl,u=ol;if(Qe=0,Ua=Cl=null,ol=0,(pe&6)!==0)throw Error(r(331));var d=pe;if(pe|=4,Ld(s.current),Bd(s,s.current,u,l),pe=d,Cn(0,!1),vt&&typeof vt.onPostCommitFiberRoot=="function")try{vt.onPostCommitFiberRoot(Va,s)}catch{}return!0}finally{Q.p=i,C.T=a,sf(e,t)}}function uf(e,t,l){t=Ot(l,t),t=wc(e.stateNode,t,2),e=gl(e,t,2),e!==null&&(Ka(e,2),Kt(e))}function ge(e,t,l){if(e.tag===3)uf(e,e,l);else for(;t!==null;){if(t.tag===3){uf(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(zl===null||!zl.has(a))){e=Ot(l,e),l=ud(2),a=gl(t,l,2),a!==null&&(rd(l,a,t,e),Ka(a,2),Kt(a));break}}t=t.return}}function su(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new dv;var i=new Set;a.set(t,i)}else i=a.get(t),i===void 0&&(i=new Set,a.set(t,i));i.has(l)||(Ic=!0,i.add(l),e=pv.bind(null,e,t,l),t.then(e,e))}function pv(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Te===e&&(re&l)===l&&(Ue===4||Ue===3&&(re&62914560)===re&&300>mt()-wi?(pe&2)===0&&wa(e,0):Pc|=l,Ma===re&&(Ma=0)),Kt(e)}function rf(e,t){t===0&&(t=tr()),e=Xl(e,t),e!==null&&(Ka(e,t),Kt(e))}function yv(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),rf(e,l)}function jv(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,i=e.memoizedState;i!==null&&(l=i.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(r(314))}a!==null&&a.delete(t),rf(e,l)}function xv(e,t){return xs(e,t)}var Gi=null,Ha=null,cu=!1,Qi=!1,uu=!1,_l=0;function Kt(e){e!==Ha&&e.next===null&&(Ha===null?Gi=Ha=e:Ha=Ha.next=e),Qi=!0,cu||(cu=!0,gv())}function Cn(e,t){if(!uu&&Qi){uu=!0;do for(var l=!1,a=Gi;a!==null;){if(e!==0){var i=a.pendingLanes;if(i===0)var s=0;else{var u=a.suspendedLanes,d=a.pingedLanes;s=(1<<31-pt(42|e)+1)-1,s&=i&~(u&~d),s=s&201326741?s&201326741|1:s?s|2:0}s!==0&&(l=!0,hf(a,s))}else s=re,s=Kn(a,a===Te?s:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(s&3)===0||Za(a,s)||(l=!0,hf(a,s));a=a.next}while(l);uu=!1}}function bv(){of()}function of(){Qi=cu=!1;var e=0;_l!==0&&Dv()&&(e=_l);for(var t=mt(),l=null,a=Gi;a!==null;){var i=a.next,s=df(a,t);s===0?(a.next=null,l===null?Gi=i:l.next=i,i===null&&(Ha=l)):(l=a,(e!==0||(s&3)!==0)&&(Qi=!0)),a=i}Qe!==0&&Qe!==5||Cn(e),_l!==0&&(_l=0)}function df(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes&-62914561;0<s;){var u=31-pt(s),d=1<<u,j=i[u];j===-1?((d&l)===0||(d&a)!==0)&&(i[u]=Kh(d,t)):j<=t&&(e.expiredLanes|=d),s&=~d}if(t=Te,l=re,l=Kn(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(be===2||be===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&bs(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||Za(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&bs(a),Ns(l)){case 2:case 8:l=Pu;break;case 32:l=Qn;break;case 268435456:l=er;break;default:l=Qn}return a=ff.bind(null,e),l=xs(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&bs(a),e.callbackPriority=2,e.callbackNode=null,2}function ff(e,t){if(Qe!==0&&Qe!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(Li()&&e.callbackNode!==l)return null;var a=re;return a=Kn(e,e===Te?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Zd(e,a,t),df(e,mt()),e.callbackNode!=null&&e.callbackNode===l?ff.bind(null,e):null)}function hf(e,t){if(Li())return null;Zd(e,t,!0)}function gv(){Mv(function(){(pe&6)!==0?xs(Iu,bv):of()})}function ru(){if(_l===0){var e=Sa;e===0&&(e=Xn,Xn<<=1,(Xn&261888)===0&&(Xn=256)),_l=e}return _l}function mf(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Wn(""+e)}function vf(e,t){var l=t.ownerDocument.createElement("input");return l.name=t.name,l.value=t.value,e.id&&l.setAttribute("form",e.id),t.parentNode.insertBefore(l,t),e=new FormData(e),l.parentNode.removeChild(l),e}function Sv(e,t,l,a,i){if(t==="submit"&&l&&l.stateNode===i){var s=mf((i[it]||null).action),u=a.submitter;u&&(t=(t=u[it]||null)?mf(t.formAction):u.getAttribute("formAction"),t!==null&&(s=t,u=null));var d=new ti("action","action",null,a,i);e.push({event:d,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(_l!==0){var j=u?vf(i,u):new FormData(i);Oc(l,{pending:!0,data:j,method:i.method,action:s},null,j)}}else typeof s=="function"&&(d.preventDefault(),j=u?vf(i,u):new FormData(i),Oc(l,{pending:!0,data:j,method:i.method,action:s},s,j))},currentTarget:i}]})}}for(var ou=0;ou<Zs.length;ou++){var du=Zs[ou],Nv=du.toLowerCase(),Ev=du[0].toUpperCase()+du.slice(1);kt(Nv,"on"+Ev)}kt(Xr,"onAnimationEnd"),kt(Vr,"onAnimationIteration"),kt(Zr,"onAnimationStart"),kt("dblclick","onDoubleClick"),kt("focusin","onFocus"),kt("focusout","onBlur"),kt(Ym,"onTransitionRun"),kt(Lm,"onTransitionStart"),kt(Gm,"onTransitionCancel"),kt(Kr,"onTransitionEnd"),ua("onMouseEnter",["mouseout","mouseover"]),ua("onMouseLeave",["mouseout","mouseover"]),ua("onPointerEnter",["pointerout","pointerover"]),ua("onPointerLeave",["pointerout","pointerover"]),Yl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Yl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Yl("onBeforeInput",["compositionend","keypress","textInput","paste"]),Yl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Yl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Yl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var On="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(" "),Av=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(On));function pf(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],i=a.event;a=a.listeners;e:{var s=void 0;if(t)for(var u=a.length-1;0<=u;u--){var d=a[u],j=d.instance,T=d.currentTarget;if(d=d.listener,j!==s&&i.isPropagationStopped())break e;s=d,i.currentTarget=T;try{s(i)}catch(U){ni(U)}i.currentTarget=null,s=j}else for(u=0;u<a.length;u++){if(d=a[u],j=d.instance,T=d.currentTarget,d=d.listener,j!==s&&i.isPropagationStopped())break e;s=d,i.currentTarget=T;try{s(i)}catch(U){ni(U)}i.currentTarget=null,s=j}}}}function ue(e,t){var l=t[Es];l===void 0&&(l=t[Es]=new Set);var a=e+"__bubble";l.has(a)||(yf(t,e,2,!1),l.add(a))}function fu(e,t,l){var a=0;t&&(a|=4),yf(l,e,a,t)}var Xi="_reactListening"+Math.random().toString(36).slice(2);function hu(e){if(!e[Xi]){e[Xi]=!0,ur.forEach(function(l){l!=="selectionchange"&&(Av.has(l)||fu(l,!1,e),fu(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Xi]||(t[Xi]=!0,fu("selectionchange",!1,t))}}function yf(e,t,l,a){switch(Zf(t)){case 2:var i=Pv;break;case 8:i=ep;break;default:i=Cu}l=i.bind(null,t,l,e),i=void 0,!Ms||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),a?i!==void 0?e.addEventListener(t,l,{capture:!0,passive:i}):e.addEventListener(t,l,!0):i!==void 0?e.addEventListener(t,l,{passive:i}):e.addEventListener(t,l,!1)}function mu(e,t,l,a,i){var s=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var u=a.tag;if(u===3||u===4){var d=a.stateNode.containerInfo;if(d===i)break;if(u===4)for(u=a.return;u!==null;){var j=u.tag;if((j===3||j===4)&&u.stateNode.containerInfo===i)return;u=u.return}for(;d!==null;){if(u=ia(d),u===null)return;if(j=u.tag,j===5||j===6||j===26||j===27){a=s=u;continue e}d=d.parentNode}}a=a.return}br(function(){var T=s,U=Ds(l),H=[];e:{var O=Jr.get(e);if(O!==void 0){var _=ti,Z=e;switch(e){case"keypress":if(Pn(l)===0)break e;case"keydown":case"keyup":_=jm;break;case"focusin":Z="focus",_=Hs;break;case"focusout":Z="blur",_=Hs;break;case"beforeblur":case"afterblur":_=Hs;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":_=Nr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":_=sm;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":_=gm;break;case Xr:case Vr:case Zr:_=rm;break;case Kr:_=Nm;break;case"scroll":case"scrollend":_=nm;break;case"wheel":_=Am;break;case"copy":case"cut":case"paste":_=dm;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":_=Ar;break;case"toggle":case"beforetoggle":_=zm}var W=(t&4)!==0,Ee=!W&&(e==="scroll"||e==="scrollend"),E=W?O!==null?O+"Capture":null:O;W=[];for(var x=T,A;x!==null;){var w=x;if(A=w.stateNode,w=w.tag,w!==5&&w!==26&&w!==27||A===null||E===null||(w=Fa(x,E),w!=null&&W.push(_n(x,w,A))),Ee)break;x=x.return}0<W.length&&(O=new _(O,Z,null,l,U),H.push({event:O,listeners:W}))}}if((t&7)===0){e:{if(O=e==="mouseover"||e==="pointerover",_=e==="mouseout"||e==="pointerout",O&&l!==_s&&(Z=l.relatedTarget||l.fromElement)&&(ia(Z)||Z[na]))break e;if((_||O)&&(O=U.window===U?U:(O=U.ownerDocument)?O.defaultView||O.parentWindow:window,_?(Z=l.relatedTarget||l.toElement,_=T,Z=Z?ia(Z):null,Z!==null&&(Ee=y(Z),W=Z.tag,Z!==Ee||W!==5&&W!==27&&W!==6)&&(Z=null)):(_=null,Z=T),_!==Z)){if(W=Nr,w="onMouseLeave",E="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(W=Ar,w="onPointerLeave",E="onPointerEnter",x="pointer"),Ee=_==null?O:$a(_),A=Z==null?O:$a(Z),O=new W(w,x+"leave",_,l,U),O.target=Ee,O.relatedTarget=A,w=null,ia(U)===T&&(W=new W(E,x+"enter",Z,l,U),W.target=A,W.relatedTarget=Ee,w=W),Ee=w,_&&Z)t:{for(W=Tv,E=_,x=Z,A=0,w=E;w;w=W(w))A++;w=0;for(var F=x;F;F=W(F))w++;for(;0<A-w;)E=W(E),A--;for(;0<w-A;)x=W(x),w--;for(;A--;){if(E===x||x!==null&&E===x.alternate){W=E;break t}E=W(E),x=W(x)}W=null}else W=null;_!==null&&jf(H,O,_,W,!1),Z!==null&&Ee!==null&&jf(H,Ee,Z,W,!0)}}e:{if(O=T?$a(T):window,_=O.nodeName&&O.nodeName.toLowerCase(),_==="select"||_==="input"&&O.type==="file")var me=Mr;else if(Dr(O))if(Ur)me=Hm;else{me=wm;var J=Um}else _=O.nodeName,!_||_.toLowerCase()!=="input"||O.type!=="checkbox"&&O.type!=="radio"?T&&Os(T.elementType)&&(me=Mr):me=qm;if(me&&(me=me(e,T))){Rr(H,me,l,U);break e}J&&J(e,O,T),e==="focusout"&&T&&O.type==="number"&&T.memoizedProps.value!=null&&Cs(O,"number",O.value)}switch(J=T?$a(T):window,e){case"focusin":(Dr(J)||J.contentEditable==="true")&&(ma=J,Qs=T,nn=null);break;case"focusout":nn=Qs=ma=null;break;case"mousedown":Xs=!0;break;case"contextmenu":case"mouseup":case"dragend":Xs=!1,Gr(H,l,U);break;case"selectionchange":if(km)break;case"keydown":case"keyup":Gr(H,l,U)}var ie;if(ks)e:{switch(e){case"compositionstart":var oe="onCompositionStart";break e;case"compositionend":oe="onCompositionEnd";break e;case"compositionupdate":oe="onCompositionUpdate";break e}oe=void 0}else ha?Or(e,l)&&(oe="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(oe="onCompositionStart");oe&&(Tr&&l.locale!=="ko"&&(ha||oe!=="onCompositionStart"?oe==="onCompositionEnd"&&ha&&(ie=gr()):(ml=U,Us="value"in ml?ml.value:ml.textContent,ha=!0)),J=Vi(T,oe),0<J.length&&(oe=new Er(oe,e,null,l,U),H.push({event:oe,listeners:J}),ie?oe.data=ie:(ie=_r(l),ie!==null&&(oe.data=ie)))),(ie=Om?_m(e,l):Dm(e,l))&&(oe=Vi(T,"onBeforeInput"),0<oe.length&&(J=new Er("onBeforeInput","beforeinput",null,l,U),H.push({event:J,listeners:oe}),J.data=ie)),Sv(H,e,T,l,U)}pf(H,t)})}function _n(e,t,l){return{instance:e,listener:t,currentTarget:l}}function Vi(e,t){for(var l=t+"Capture",a=[];e!==null;){var i=e,s=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||s===null||(i=Fa(e,l),i!=null&&a.unshift(_n(e,i,s)),i=Fa(e,t),i!=null&&a.push(_n(e,i,s))),e.tag===3)return a;e=e.return}return[]}function Tv(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function jf(e,t,l,a,i){for(var s=t._reactName,u=[];l!==null&&l!==a;){var d=l,j=d.alternate,T=d.stateNode;if(d=d.tag,j!==null&&j===a)break;d!==5&&d!==26&&d!==27||T===null||(j=T,i?(T=Fa(l,s),T!=null&&u.unshift(_n(l,T,j))):i||(T=Fa(l,s),T!=null&&u.push(_n(l,T,j)))),l=l.return}u.length!==0&&e.push({event:t,listeners:u})}var zv=/\r\n?/g,Cv=/\u0000|\uFFFD/g;function xf(e){return(typeof e=="string"?e:""+e).replace(zv,`
9
- `).replace(Cv,"")}function bf(e,t){return t=xf(t),xf(e)===t}function Ne(e,t,l,a,i,s){switch(l){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||oa(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&oa(e,""+a);break;case"className":$n(e,"class",a);break;case"tabIndex":$n(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":$n(e,l,a);break;case"style":jr(e,a,s);break;case"data":if(t!=="object"){$n(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=Wn(""+a),e.setAttribute(l,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof s=="function"&&(l==="formAction"?(t!=="input"&&Ne(e,t,"name",i.name,i,null),Ne(e,t,"formEncType",i.formEncType,i,null),Ne(e,t,"formMethod",i.formMethod,i,null),Ne(e,t,"formTarget",i.formTarget,i,null)):(Ne(e,t,"encType",i.encType,i,null),Ne(e,t,"method",i.method,i,null),Ne(e,t,"target",i.target,i,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=Wn(""+a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=$t);break;case"onScroll":a!=null&&ue("scroll",e);break;case"onScrollEnd":a!=null&&ue("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(l=a.__html,l!=null){if(i.children!=null)throw Error(r(60));e.innerHTML=l}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}l=Wn(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""+a):e.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":a===!0?e.setAttribute(l,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,a):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(l,a):e.removeAttribute(l);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(l):e.setAttribute(l,a);break;case"popover":ue("beforetoggle",e),ue("toggle",e),Jn(e,"popover",a);break;case"xlinkActuate":Jt(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Jt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Jt(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Jt(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Jt(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Jt(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Jt(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Jt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Jt(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Jn(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=lm.get(l)||l,Jn(e,l,a))}}function vu(e,t,l,a,i,s){switch(l){case"style":jr(e,a,s);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(l=a.__html,l!=null){if(i.children!=null)throw Error(r(60));e.innerHTML=l}}break;case"children":typeof a=="string"?oa(e,a):(typeof a=="number"||typeof a=="bigint")&&oa(e,""+a);break;case"onScroll":a!=null&&ue("scroll",e);break;case"onScrollEnd":a!=null&&ue("scrollend",e);break;case"onClick":a!=null&&(e.onclick=$t);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!rr.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(i=l.endsWith("Capture"),t=l.slice(2,i?l.length-7:void 0),s=e[it]||null,s=s!=null?s[l]:null,typeof s=="function"&&e.removeEventListener(t,s,i),typeof a=="function")){typeof s!="function"&&s!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,a,i);break e}l in e?e[l]=a:a===!0?e.setAttribute(l,""):Jn(e,l,a)}}}function Ie(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ue("error",e),ue("load",e);var a=!1,i=!1,s;for(s in l)if(l.hasOwnProperty(s)){var u=l[s];if(u!=null)switch(s){case"src":a=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ne(e,t,s,u,l,null)}}i&&Ne(e,t,"srcSet",l.srcSet,l,null),a&&Ne(e,t,"src",l.src,l,null);return;case"input":ue("invalid",e);var d=s=u=i=null,j=null,T=null;for(a in l)if(l.hasOwnProperty(a)){var U=l[a];if(U!=null)switch(a){case"name":i=U;break;case"type":u=U;break;case"checked":j=U;break;case"defaultChecked":T=U;break;case"value":s=U;break;case"defaultValue":d=U;break;case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(r(137,t));break;default:Ne(e,t,a,U,l,null)}}mr(e,s,d,j,T,u,i,!1);return;case"select":ue("invalid",e),a=u=s=null;for(i in l)if(l.hasOwnProperty(i)&&(d=l[i],d!=null))switch(i){case"value":s=d;break;case"defaultValue":u=d;break;case"multiple":a=d;default:Ne(e,t,i,d,l,null)}t=s,l=u,e.multiple=!!a,t!=null?ra(e,!!a,t,!1):l!=null&&ra(e,!!a,l,!0);return;case"textarea":ue("invalid",e),s=i=a=null;for(u in l)if(l.hasOwnProperty(u)&&(d=l[u],d!=null))switch(u){case"value":a=d;break;case"defaultValue":i=d;break;case"children":s=d;break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(r(91));break;default:Ne(e,t,u,d,l,null)}pr(e,a,i,s);return;case"option":for(j in l)l.hasOwnProperty(j)&&(a=l[j],a!=null)&&(j==="selected"?e.selected=a&&typeof a!="function"&&typeof a!="symbol":Ne(e,t,j,a,l,null));return;case"dialog":ue("beforetoggle",e),ue("toggle",e),ue("cancel",e),ue("close",e);break;case"iframe":case"object":ue("load",e);break;case"video":case"audio":for(a=0;a<On.length;a++)ue(On[a],e);break;case"image":ue("error",e),ue("load",e);break;case"details":ue("toggle",e);break;case"embed":case"source":case"link":ue("error",e),ue("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(T in l)if(l.hasOwnProperty(T)&&(a=l[T],a!=null))switch(T){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ne(e,t,T,a,l,null)}return;default:if(Os(t)){for(U in l)l.hasOwnProperty(U)&&(a=l[U],a!==void 0&&vu(e,t,U,a,l,void 0));return}}for(d in l)l.hasOwnProperty(d)&&(a=l[d],a!=null&&Ne(e,t,d,a,l,null))}function Ov(e,t,l,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,s=null,u=null,d=null,j=null,T=null,U=null;for(_ in l){var H=l[_];if(l.hasOwnProperty(_)&&H!=null)switch(_){case"checked":break;case"value":break;case"defaultValue":j=H;default:a.hasOwnProperty(_)||Ne(e,t,_,null,a,H)}}for(var O in a){var _=a[O];if(H=l[O],a.hasOwnProperty(O)&&(_!=null||H!=null))switch(O){case"type":s=_;break;case"name":i=_;break;case"checked":T=_;break;case"defaultChecked":U=_;break;case"value":u=_;break;case"defaultValue":d=_;break;case"children":case"dangerouslySetInnerHTML":if(_!=null)throw Error(r(137,t));break;default:_!==H&&Ne(e,t,O,_,a,H)}}zs(e,u,d,j,T,U,s,i);return;case"select":_=u=d=O=null;for(s in l)if(j=l[s],l.hasOwnProperty(s)&&j!=null)switch(s){case"value":break;case"multiple":_=j;default:a.hasOwnProperty(s)||Ne(e,t,s,null,a,j)}for(i in a)if(s=a[i],j=l[i],a.hasOwnProperty(i)&&(s!=null||j!=null))switch(i){case"value":O=s;break;case"defaultValue":d=s;break;case"multiple":u=s;default:s!==j&&Ne(e,t,i,s,a,j)}t=d,l=u,a=_,O!=null?ra(e,!!l,O,!1):!!a!=!!l&&(t!=null?ra(e,!!l,t,!0):ra(e,!!l,l?[]:"",!1));return;case"textarea":_=O=null;for(d in l)if(i=l[d],l.hasOwnProperty(d)&&i!=null&&!a.hasOwnProperty(d))switch(d){case"value":break;case"children":break;default:Ne(e,t,d,null,a,i)}for(u in a)if(i=a[u],s=l[u],a.hasOwnProperty(u)&&(i!=null||s!=null))switch(u){case"value":O=i;break;case"defaultValue":_=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(r(91));break;default:i!==s&&Ne(e,t,u,i,a,s)}vr(e,O,_);return;case"option":for(var Z in l)O=l[Z],l.hasOwnProperty(Z)&&O!=null&&!a.hasOwnProperty(Z)&&(Z==="selected"?e.selected=!1:Ne(e,t,Z,null,a,O));for(j in a)O=a[j],_=l[j],a.hasOwnProperty(j)&&O!==_&&(O!=null||_!=null)&&(j==="selected"?e.selected=O&&typeof O!="function"&&typeof O!="symbol":Ne(e,t,j,O,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 W in l)O=l[W],l.hasOwnProperty(W)&&O!=null&&!a.hasOwnProperty(W)&&Ne(e,t,W,null,a,O);for(T in a)if(O=a[T],_=l[T],a.hasOwnProperty(T)&&O!==_&&(O!=null||_!=null))switch(T){case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(r(137,t));break;default:Ne(e,t,T,O,a,_)}return;default:if(Os(t)){for(var Ee in l)O=l[Ee],l.hasOwnProperty(Ee)&&O!==void 0&&!a.hasOwnProperty(Ee)&&vu(e,t,Ee,void 0,a,O);for(U in a)O=a[U],_=l[U],!a.hasOwnProperty(U)||O===_||O===void 0&&_===void 0||vu(e,t,U,O,a,_);return}}for(var E in l)O=l[E],l.hasOwnProperty(E)&&O!=null&&!a.hasOwnProperty(E)&&Ne(e,t,E,null,a,O);for(H in a)O=a[H],_=l[H],!a.hasOwnProperty(H)||O===_||O==null&&_==null||Ne(e,t,H,O,a,_)}function gf(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function _v(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var i=l[a],s=i.transferSize,u=i.initiatorType,d=i.duration;if(s&&d&&gf(u)){for(u=0,d=i.responseEnd,a+=1;a<l.length;a++){var j=l[a],T=j.startTime;if(T>d)break;var U=j.transferSize,H=j.initiatorType;U&&gf(H)&&(j=j.responseEnd,u+=U*(j<d?1:(d-T)/(j-T)))}if(--a,t+=8*(s+u)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var pu=null,yu=null;function Zi(e){return e.nodeType===9?e:e.ownerDocument}function Sf(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Nf(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function ju(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var xu=null;function Dv(){var e=window.event;return e&&e.type==="popstate"?e===xu?!1:(xu=e,!0):(xu=null,!1)}var Ef=typeof setTimeout=="function"?setTimeout:void 0,Rv=typeof clearTimeout=="function"?clearTimeout:void 0,Af=typeof Promise=="function"?Promise:void 0,Mv=typeof queueMicrotask=="function"?queueMicrotask:typeof Af<"u"?function(e){return Af.resolve(null).then(e).catch(Uv)}:Ef;function Uv(e){setTimeout(function(){throw e})}function Dl(e){return e==="head"}function Tf(e,t){var l=t,a=0;do{var i=l.nextSibling;if(e.removeChild(l),i&&i.nodeType===8)if(l=i.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(i),La(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")Dn(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Dn(l);for(var s=l.firstChild;s;){var u=s.nextSibling,d=s.nodeName;s[Ja]||d==="SCRIPT"||d==="STYLE"||d==="LINK"&&s.rel.toLowerCase()==="stylesheet"||l.removeChild(s),s=u}}else l==="body"&&Dn(e.ownerDocument.body);l=i}while(l);La(t)}function zf(e,t){var l=e;e=0;do{var a=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),a&&a.nodeType===8)if(l=a.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=a}while(l)}function bu(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":bu(l),As(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function wv(e,t,l,a){for(;e.nodeType===1;){var i=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Ja])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(s=e.getAttribute("rel"),s==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(s!==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(s=e.getAttribute("src"),(s!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&s&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var s=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===s)return e}else return e;if(e=Ut(e.nextSibling),e===null)break}return null}function qv(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=Ut(e.nextSibling),e===null))return null;return e}function Cf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ut(e.nextSibling),e===null))return null;return e}function gu(e){return e.data==="$?"||e.data==="$~"}function Su(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Hv(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var a=function(){t(),l.removeEventListener("DOMContentLoaded",a)};l.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function Ut(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Nu=null;function Of(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return Ut(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function _f(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function Df(e,t,l){switch(t=Zi(l),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function Dn(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);As(e)}var wt=new Map,Rf=new Set;function Ki(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var dl=Q.d;Q.d={f:Bv,r:kv,D:Yv,C:Lv,L:Gv,m:Qv,X:Vv,S:Xv,M:Zv};function Bv(){var e=dl.f(),t=Bi();return e||t}function kv(e){var t=sa(e);t!==null&&t.tag===5&&t.type==="form"?Jo(t):dl.r(e)}var Ba=typeof document>"u"?null:document;function Mf(e,t,l){var a=Ba;if(a&&typeof t=="string"&&t){var i=zt(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof l=="string"&&(i+='[crossorigin="'+l+'"]'),Rf.has(i)||(Rf.add(i),e={rel:e,crossOrigin:l,href:t},a.querySelector(i)===null&&(t=a.createElement("link"),Ie(t,"link",e),Ve(t),a.head.appendChild(t)))}}function Yv(e){dl.D(e),Mf("dns-prefetch",e,null)}function Lv(e,t){dl.C(e,t),Mf("preconnect",e,t)}function Gv(e,t,l){dl.L(e,t,l);var a=Ba;if(a&&e&&t){var i='link[rel="preload"][as="'+zt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(i+='[imagesrcset="'+zt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(i+='[imagesizes="'+zt(l.imageSizes)+'"]')):i+='[href="'+zt(e)+'"]';var s=i;switch(t){case"style":s=ka(e);break;case"script":s=Ya(e)}wt.has(s)||(e=N({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),wt.set(s,e),a.querySelector(i)!==null||t==="style"&&a.querySelector(Rn(s))||t==="script"&&a.querySelector(Mn(s))||(t=a.createElement("link"),Ie(t,"link",e),Ve(t),a.head.appendChild(t)))}}function Qv(e,t){dl.m(e,t);var l=Ba;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+zt(a)+'"][href="'+zt(e)+'"]',s=i;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=Ya(e)}if(!wt.has(s)&&(e=N({rel:"modulepreload",href:e},t),wt.set(s,e),l.querySelector(i)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Mn(s)))return}a=l.createElement("link"),Ie(a,"link",e),Ve(a),l.head.appendChild(a)}}}function Xv(e,t,l){dl.S(e,t,l);var a=Ba;if(a&&e){var i=ca(a).hoistableStyles,s=ka(e);t=t||"default";var u=i.get(s);if(!u){var d={loading:0,preload:null};if(u=a.querySelector(Rn(s)))d.loading=5;else{e=N({rel:"stylesheet",href:e,"data-precedence":t},l),(l=wt.get(s))&&Eu(e,l);var j=u=a.createElement("link");Ve(j),Ie(j,"link",e),j._p=new Promise(function(T,U){j.onload=T,j.onerror=U}),j.addEventListener("load",function(){d.loading|=1}),j.addEventListener("error",function(){d.loading|=2}),d.loading|=4,Ji(u,t,a)}u={type:"stylesheet",instance:u,count:1,state:d},i.set(s,u)}}}function Vv(e,t){dl.X(e,t);var l=Ba;if(l&&e){var a=ca(l).hoistableScripts,i=Ya(e),s=a.get(i);s||(s=l.querySelector(Mn(i)),s||(e=N({src:e,async:!0},t),(t=wt.get(i))&&Au(e,t),s=l.createElement("script"),Ve(s),Ie(s,"link",e),l.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},a.set(i,s))}}function Zv(e,t){dl.M(e,t);var l=Ba;if(l&&e){var a=ca(l).hoistableScripts,i=Ya(e),s=a.get(i);s||(s=l.querySelector(Mn(i)),s||(e=N({src:e,async:!0,type:"module"},t),(t=wt.get(i))&&Au(e,t),s=l.createElement("script"),Ve(s),Ie(s,"link",e),l.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},a.set(i,s))}}function Uf(e,t,l,a){var i=(i=se.current)?Ki(i):null;if(!i)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=ka(l.href),l=ca(i).hoistableStyles,a=l.get(t),a||(a={type:"style",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=ka(l.href);var s=ca(i).hoistableStyles,u=s.get(e);if(u||(i=i.ownerDocument||i,u={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},s.set(e,u),(s=i.querySelector(Rn(e)))&&!s._p&&(u.instance=s,u.state.loading=5),wt.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},wt.set(e,l),s||Kv(i,e,l,u.state))),t&&a===null)throw Error(r(528,""));return u}if(t&&a!==null)throw Error(r(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ya(l),l=ca(i).hoistableScripts,a=l.get(t),a||(a={type:"script",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function ka(e){return'href="'+zt(e)+'"'}function Rn(e){return'link[rel="stylesheet"]['+e+"]"}function wf(e){return N({},e,{"data-precedence":e.precedence,precedence:null})}function Kv(e,t,l,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),Ie(t,"link",l),Ve(t),e.head.appendChild(t))}function Ya(e){return'[src="'+zt(e)+'"]'}function Mn(e){return"script[async]"+e}function qf(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+zt(l.href)+'"]');if(a)return t.instance=a,Ve(a),a;var i=N({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Ve(a),Ie(a,"style",i),Ji(a,l.precedence,e),t.instance=a;case"stylesheet":i=ka(l.href);var s=e.querySelector(Rn(i));if(s)return t.state.loading|=4,t.instance=s,Ve(s),s;a=wf(l),(i=wt.get(i))&&Eu(a,i),s=(e.ownerDocument||e).createElement("link"),Ve(s);var u=s;return u._p=new Promise(function(d,j){u.onload=d,u.onerror=j}),Ie(s,"link",a),t.state.loading|=4,Ji(s,l.precedence,e),t.instance=s;case"script":return s=Ya(l.src),(i=e.querySelector(Mn(s)))?(t.instance=i,Ve(i),i):(a=l,(i=wt.get(s))&&(a=N({},l),Au(a,i)),e=e.ownerDocument||e,i=e.createElement("script"),Ve(i),Ie(i,"link",a),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Ji(a,l.precedence,e));return t.instance}function Ji(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=a.length?a[a.length-1]:null,s=i,u=0;u<a.length;u++){var d=a[u];if(d.dataset.precedence===t)s=d;else if(s!==i)break}s?s.parentNode.insertBefore(e,s.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function Eu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Au(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var $i=null;function Hf(e,t,l){if($i===null){var a=new Map,i=$i=new Map;i.set(l,a)}else i=$i,a=i.get(l),a||(a=new Map,i.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),i=0;i<l.length;i++){var s=l[i];if(!(s[Ja]||s[Je]||e==="link"&&s.getAttribute("rel")==="stylesheet")&&s.namespaceURI!=="http://www.w3.org/2000/svg"){var u=s.getAttribute(t)||"";u=e+u;var d=a.get(u);d?d.push(s):a.set(u,[s])}}return a}function Bf(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function Jv(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function kf(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function $v(e,t,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var i=ka(a.href),s=t.querySelector(Rn(i));if(s){t=s._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Fi.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=s,Ve(s);return}s=t.ownerDocument||t,a=wf(a),(i=wt.get(i))&&Eu(a,i),s=s.createElement("link"),Ve(s);var u=s;u._p=new Promise(function(d,j){u.onload=d,u.onerror=j}),Ie(s,"link",a),l.instance=s}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=Fi.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Tu=0;function Fv(e,t){return e.stylesheets&&e.count===0&&Ii(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&Ii(e,e.stylesheets),e.unsuspend){var s=e.unsuspend;e.unsuspend=null,s()}},6e4+t);0<e.imgBytes&&Tu===0&&(Tu=62500*_v());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ii(e,e.stylesheets),e.unsuspend)){var s=e.unsuspend;e.unsuspend=null,s()}},(e.imgBytes>Tu?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(i)}}:null}function Fi(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ii(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Wi=null;function Ii(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Wi=new Map,t.forEach(Wv,e),Wi=null,Fi.call(e))}function Wv(e,t){if(!(t.state.loading&4)){var l=Wi.get(e);if(l)var a=l.get(null);else{l=new Map,Wi.set(e,l);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),s=0;s<i.length;s++){var u=i[s];(u.nodeName==="LINK"||u.getAttribute("media")!=="not all")&&(l.set(u.dataset.precedence,u),a=u)}a&&l.set(null,a)}i=t.instance,u=i.getAttribute("data-precedence"),s=l.get(u)||a,s===a&&l.set(null,i),l.set(u,i),this.count++,a=Fi.bind(this),i.addEventListener("load",a),i.addEventListener("error",a),s?s.parentNode.insertBefore(i,s.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Un={$$typeof:G,Provider:null,Consumer:null,_currentValue:P,_currentValue2:P,_threadCount:0};function Iv(e,t,l,a,i,s,u,d,j){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=gs(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gs(0),this.hiddenUpdates=gs(null),this.identifierPrefix=a,this.onUncaughtError=i,this.onCaughtError=s,this.onRecoverableError=u,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=j,this.incompleteTransitions=new Map}function Yf(e,t,l,a,i,s,u,d,j,T,U,H){return e=new Iv(e,t,l,u,j,T,U,H,d),t=1,s===!0&&(t|=24),s=jt(3,null,null,t),e.current=s,s.stateNode=e,t=ic(),t.refCount++,e.pooledCache=t,t.refCount++,s.memoizedState={element:a,isDehydrated:l,cache:t},rc(s),e}function Lf(e){return e?(e=ya,e):ya}function Gf(e,t,l,a,i,s){i=Lf(i),a.context===null?a.context=i:a.pendingContext=i,a=bl(t),a.payload={element:l},s=s===void 0?null:s,s!==null&&(a.callback=s),l=gl(e,a,t),l!==null&&(dt(l,e,t),fn(l,e,t))}function Qf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function zu(e,t){Qf(e,t),(e=e.alternate)&&Qf(e,t)}function Xf(e){if(e.tag===13||e.tag===31){var t=Xl(e,67108864);t!==null&&dt(t,e,67108864),zu(e,67108864)}}function Vf(e){if(e.tag===13||e.tag===31){var t=Nt();t=Ss(t);var l=Xl(e,t);l!==null&&dt(l,e,t),zu(e,t)}}var Pi=!0;function Pv(e,t,l,a){var i=C.T;C.T=null;var s=Q.p;try{Q.p=2,Cu(e,t,l,a)}finally{Q.p=s,C.T=i}}function ep(e,t,l,a){var i=C.T;C.T=null;var s=Q.p;try{Q.p=8,Cu(e,t,l,a)}finally{Q.p=s,C.T=i}}function Cu(e,t,l,a){if(Pi){var i=Ou(a);if(i===null)mu(e,t,a,es,l),Kf(e,a);else if(lp(i,e,t,l,a))a.stopPropagation();else if(Kf(e,a),t&4&&-1<tp.indexOf(e)){for(;i!==null;){var s=sa(i);if(s!==null)switch(s.tag){case 3:if(s=s.stateNode,s.current.memoizedState.isDehydrated){var u=kl(s.pendingLanes);if(u!==0){var d=s;for(d.pendingLanes|=2,d.entangledLanes|=2;u;){var j=1<<31-pt(u);d.entanglements[1]|=j,u&=~j}Kt(s),(pe&6)===0&&(qi=mt()+500,Cn(0))}}break;case 31:case 13:d=Xl(s,2),d!==null&&dt(d,s,2),Bi(),zu(s,2)}if(s=Ou(a),s===null&&mu(e,t,a,es,l),s===i)break;i=s}i!==null&&a.stopPropagation()}else mu(e,t,a,null,l)}}function Ou(e){return e=Ds(e),_u(e)}var es=null;function _u(e){if(es=null,e=ia(e),e!==null){var t=y(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=m(t),e!==null)return e;e=null}else if(l===31){if(e=S(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return es=e,null}function Zf(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(Yh()){case Iu:return 2;case Pu:return 8;case Qn:case Lh:return 32;case er:return 268435456;default:return 32}default:return 32}}var Du=!1,Rl=null,Ml=null,Ul=null,wn=new Map,qn=new Map,wl=[],tp="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 Kf(e,t){switch(e){case"focusin":case"focusout":Rl=null;break;case"dragenter":case"dragleave":Ml=null;break;case"mouseover":case"mouseout":Ul=null;break;case"pointerover":case"pointerout":wn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":qn.delete(t.pointerId)}}function Hn(e,t,l,a,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:s,targetContainers:[i]},t!==null&&(t=sa(t),t!==null&&Xf(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function lp(e,t,l,a,i){switch(t){case"focusin":return Rl=Hn(Rl,e,t,l,a,i),!0;case"dragenter":return Ml=Hn(Ml,e,t,l,a,i),!0;case"mouseover":return Ul=Hn(Ul,e,t,l,a,i),!0;case"pointerover":var s=i.pointerId;return wn.set(s,Hn(wn.get(s)||null,e,t,l,a,i)),!0;case"gotpointercapture":return s=i.pointerId,qn.set(s,Hn(qn.get(s)||null,e,t,l,a,i)),!0}return!1}function Jf(e){var t=ia(e.target);if(t!==null){var l=y(t);if(l!==null){if(t=l.tag,t===13){if(t=m(l),t!==null){e.blockedOn=t,sr(e.priority,function(){Vf(l)});return}}else if(t===31){if(t=S(l),t!==null){e.blockedOn=t,sr(e.priority,function(){Vf(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ts(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Ou(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);_s=a,l.target.dispatchEvent(a),_s=null}else return t=sa(l),t!==null&&Xf(t),e.blockedOn=l,!1;t.shift()}return!0}function $f(e,t,l){ts(e)&&l.delete(t)}function ap(){Du=!1,Rl!==null&&ts(Rl)&&(Rl=null),Ml!==null&&ts(Ml)&&(Ml=null),Ul!==null&&ts(Ul)&&(Ul=null),wn.forEach($f),qn.forEach($f)}function ls(e,t){e.blockedOn===t&&(e.blockedOn=null,Du||(Du=!0,c.unstable_scheduleCallback(c.unstable_NormalPriority,ap)))}var as=null;function Ff(e){as!==e&&(as=e,c.unstable_scheduleCallback(c.unstable_NormalPriority,function(){as===e&&(as=null);for(var t=0;t<e.length;t+=3){var l=e[t],a=e[t+1],i=e[t+2];if(typeof a!="function"){if(_u(a||l)===null)continue;break}var s=sa(l);s!==null&&(e.splice(t,3),t-=3,Oc(s,{pending:!0,data:i,method:l.method,action:a},a,i))}}))}function La(e){function t(j){return ls(j,e)}Rl!==null&&ls(Rl,e),Ml!==null&&ls(Ml,e),Ul!==null&&ls(Ul,e),wn.forEach(t),qn.forEach(t);for(var l=0;l<wl.length;l++){var a=wl[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<wl.length&&(l=wl[0],l.blockedOn===null);)Jf(l),l.blockedOn===null&&wl.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var i=l[a],s=l[a+1],u=i[it]||null;if(typeof s=="function")u||Ff(l);else if(u){var d=null;if(s&&s.hasAttribute("formAction")){if(i=s,u=s[it]||null)d=u.formAction;else if(_u(i)!==null)continue}else d=u.action;typeof d=="function"?l[a+1]=d:(l.splice(a,3),a-=3),Ff(l)}}}function Wf(){function e(s){s.canIntercept&&s.info==="react-transition"&&s.intercept({handler:function(){return new Promise(function(u){return i=u})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var s=navigation.currentEntry;s&&s.url!=null&&navigation.navigate(s.url,{state:s.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),i!==null&&(i(),i=null)}}}function Ru(e){this._internalRoot=e}ns.prototype.render=Ru.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var l=t.current,a=Nt();Gf(l,a,e,t,null,null)},ns.prototype.unmount=Ru.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Gf(e.current,2,null,e,null,null),Bi(),t[na]=null}};function ns(e){this._internalRoot=e}ns.prototype.unstable_scheduleHydration=function(e){if(e){var t=ir();e={blockedOn:null,target:e,priority:t};for(var l=0;l<wl.length&&t!==0&&t<wl[l].priority;l++);wl.splice(l,0,e),l===0&&Jf(e)}};var If=o.version;if(If!=="19.2.0")throw Error(r(527,If,"19.2.0"));Q.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=v(t),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var np={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:C,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var is=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!is.isDisabled&&is.supportsFiber)try{Va=is.inject(np),vt=is}catch{}}return kn.createRoot=function(e,t){if(!p(e))throw Error(r(299));var l=!1,a="",i=nd,s=id,u=sd;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(u=t.onRecoverableError)),t=Yf(e,1,!1,null,null,l,a,null,i,s,u,Wf),e[na]=t.current,hu(e),new Ru(t)},kn.hydrateRoot=function(e,t,l){if(!p(e))throw Error(r(299));var a=!1,i="",s=nd,u=id,d=sd,j=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(i=l.identifierPrefix),l.onUncaughtError!==void 0&&(s=l.onUncaughtError),l.onCaughtError!==void 0&&(u=l.onCaughtError),l.onRecoverableError!==void 0&&(d=l.onRecoverableError),l.formState!==void 0&&(j=l.formState)),t=Yf(e,1,!0,t,l??null,a,i,j,s,u,d,Wf),t.context=Lf(null),l=t.current,a=Nt(),a=Ss(a),i=bl(a),i.callback=null,gl(l,i,a),l=a,t.current.lanes=l,Ka(t,l),Kt(t),e[na]=t.current,hu(e),new ns(t)},kn.version="19.2.0",kn}var uh;function mp(){if(uh)return wu.exports;uh=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(o){console.error(o)}}return c(),wu.exports=hp(),wu.exports}var vp=mp();const us="feltkit.admin-token";function pp(){const c=/(?:^|[#&])token=([^&]+)/.exec(location.hash);if(c){try{sessionStorage.setItem(us,decodeURIComponent(c[1]))}catch{}return history.replaceState(null,"",`${location.pathname}#/overview`),decodeURIComponent(c[1])}try{return sessionStorage.getItem(us)}catch{return null}}function rh(c){try{c?sessionStorage.setItem(us,c):sessionStorage.removeItem(us)}catch{}}class oh extends Error{constructor(o,f,r){super(f),this.code=o,this.status=r}code;status}let bh=null;const ku=c=>bh=c;let cs=null;const Yu=c=>cs=c;function gh(c){return cs?c?{"x-feltkit-csrf":cs.csrf,"x-feltkit-environment":cs.environment}:{}:{"x-feltkit-admin":bh??""}}async function ee(c,o={}){const f=await fetch(`/_feltkit/api${c}`,{...o,credentials:"same-origin",headers:{...gh(!!(o.method&&o.method!=="GET")),...o.body?{"Content-Type":"application/json"}:{},...o.headers??{}}});let r;try{r=await f.json()}catch{throw new oh("UNAVAILABLE",`The server answered ${f.status}.`,f.status)}if(!f.ok)throw new oh(r?.error?.code??"INTERNAL",r?.error?.message??`Request failed (${f.status})`,f.status);return r}function yp(c,o){const f=new AbortController;return(async()=>{let r=500;for(;!f.signal.aborted;){try{const p=await fetch("/_feltkit/api/events",{credentials:"same-origin",headers:gh(!1),signal:f.signal});if(!p.ok||!p.body)throw new Error(String(p.status));o(!0),r=500;const y=p.body.getReader(),m=new TextDecoder;let S="";for(;;){const{value:h,done:v}=await y.read();if(v)break;S+=m.decode(h,{stream:!0});let b;for(;(b=S.indexOf(`
10
-
11
- `))>=0;){const N=S.slice(0,b);S=S.slice(b+2);const q=/^event: (.+)$/m.exec(N)?.[1],k=/^data: (.+)$/m.exec(N)?.[1];q&&k&&c(q,JSON.parse(k))}}}catch{}if(o(!1),f.signal.aborted)break;await new Promise(p=>setTimeout(p,r)),r=Math.min(r*2,8e3)}})(),()=>f.abort()}function fs(c){const o=!!c?.environment?.development,r=(c?.operator?.permissions??[]).some(p=>p==="*"||p==="feltkit.*"||p==="feltkit.operations.*"||p==="feltkit.operations.write");return{development:o,canAct:o||r,actor:c?.operator?.principal?.id??null}}function Ke(c){if(!c)return"—";const o=Math.max(0,Math.round((Date.now()-Date.parse(c))/1e3));return o<5?"just now":o<60?`${o}s ago`:o<3600?`${Math.floor(o/60)}m ago`:o<86400?`${Math.floor(o/3600)}h ago`:new Date(c).toLocaleDateString()}function Sh(c=15e3){const[,o]=M.useState(0);M.useEffect(()=>{const f=setInterval(()=>o(r=>r+1),c);return()=>clearInterval(f)},[c])}function $({tone:c="neutral",children:o,title:f}){return n.jsx("span",{className:`badge badge-${c}`,title:f,children:o})}function Ga({outcome:c}){return c==="success"?n.jsx($,{tone:"ok",children:"success"}):c==="denied"?n.jsx($,{tone:"warn",children:"denied"}):n.jsx($,{tone:"bad",children:c})}function I({title:c,action:o,children:f,className:r=""}){return n.jsxs("section",{className:`card ${r}`,children:[(c||o)&&n.jsxs("header",{className:"card-header",children:[c&&n.jsx("h2",{children:c}),o]}),f]})}function Et({title:c,children:o}){return n.jsxs("div",{className:"empty",children:[n.jsx("div",{className:"empty-title",children:c}),o&&n.jsx("div",{className:"empty-body",children:o})]})}function we({label:c="Loading"}){return n.jsxs("div",{className:"loading",role:"status",children:[n.jsx("span",{className:"spinner","aria-hidden":!0})," ",c,"…"]})}function he({error:c,retry:o}){const f=c;return n.jsxs("div",{className:"error-box",role:"alert",children:[n.jsx("strong",{children:f?.code??"Error"})," ",f?.message??String(c),o&&n.jsx("button",{className:"btn btn-small",onClick:o,children:"Retry"})]})}function Ln({value:c,max:o=4e3}){let f=JSON.stringify(c,null,2)??"undefined";return f.length>o&&(f=`${f.slice(0,o)}
12
- … (${f.length-o} more characters)`),n.jsx("pre",{className:"json",children:f})}function Ju({text:c,label:o="Copy"}){const[f,r]=M.useState(!1);return n.jsx("button",{className:"btn btn-small btn-ghost",onClick:()=>{navigator.clipboard?.writeText(c).then(()=>{r(!0),setTimeout(()=>r(!1),1200)})},children:f?"Copied":o})}function Xu({rows:c}){return n.jsx("dl",{className:"kv",children:c.map(([o,f],r)=>n.jsxs("div",{className:"kv-row",children:[n.jsx("dt",{children:o}),n.jsx("dd",{children:f})]},r))})}function Yn({schema:c}){if(!c)return n.jsx("span",{className:"muted",children:"—"});if(c.type!=="object"||!c.properties)return n.jsx("code",{className:"type",children:rs(c)});const o=new Set(c.required??[]),f=Object.entries(c.properties);return f.length?n.jsx("table",{className:"fields",children:n.jsx("tbody",{children:f.map(([r,p])=>n.jsxs("tr",{children:[n.jsxs("td",{className:"mono",children:[r,!o.has(r)&&n.jsx("span",{className:"muted",children:"?"})]}),n.jsxs("td",{children:[n.jsx("code",{className:"type",children:rs(p)}),dh(p)&&n.jsxs("span",{className:"muted small",children:[" ",dh(p)]})]})]},r))})}):n.jsx("span",{className:"muted",children:"no fields"})}function rs(c){return c?c.enum?c.enum.map(o=>JSON.stringify(o)).join(" | "):c.anyOf?c.anyOf.map(rs).join(" | "):c.type==="array"?`${rs(c.items)}[]`:c.type==="object"?c.properties?`{ ${Object.keys(c.properties).join(", ")} }`:"object":Array.isArray(c.type)?c.type.join(" | "):c.type??"unknown":"unknown"}function dh(c){const o=[];return c.minLength!==void 0&&o.push(`min ${c.minLength}`),c.maxLength!==void 0&&o.push(`max ${c.maxLength}`),c.minimum!==void 0&&o.push(`≥ ${c.minimum}`),c.maximum!==void 0&&o.push(`≤ ${c.maximum}`),o.join(", ")}function Nh({title:c,onClose:o,children:f}){return M.useEffect(()=>{const r=p=>p.key==="Escape"&&o();return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[o]),n.jsx("div",{className:"drawer-backdrop",onClick:o,children:n.jsxs("aside",{className:"drawer",role:"dialog","aria-modal":"true","aria-label":typeof c=="string"?c:"Details",onClick:r=>r.stopPropagation(),children:[n.jsxs("header",{className:"drawer-header",children:[n.jsx("h2",{children:c}),n.jsx("button",{className:"btn btn-ghost",onClick:o,"aria-label":"Close",children:"Esc"})]}),n.jsx("div",{className:"drawer-body",children:f})]})})}function ze(c,o){const[f,r]=M.useState({loading:!0}),[p,y]=M.useState(0);return M.useEffect(()=>{let m=!0;return r(S=>({...S,loading:!0})),c().then(S=>m&&r({data:S,loading:!1}),S=>m&&r(h=>({data:h.data,error:S,loading:!1}))),()=>{m=!1}},[...o,p]),{...f,reload:()=>y(m=>m+1)}}function hs(c){const o=c.trim();if(!o||o.startsWith("credential-ref:"))return!1;if(/^(sk-|sk-ant-|sk_live_|sk_test_|rk_live_|xai-|AIza|ghp_|gho_|github_pat_|gsk_|glpat-|xox[abpr]-|hf_|pk_live_)/.test(o))return!0;if(o.length<32||/\s/.test(o)||!/[0-9]/.test(o)||!/[A-Za-z]/.test(o))return!1;const f=new Map;for(const p of o)f.set(p,(f.get(p)??0)+1);let r=0;for(const p of f.values())r-=p/o.length*Math.log2(p/o.length);return r>=4}function ms({credential:c}){return c?c.present?n.jsxs($,{tone:"ok",title:c.updatedAt?`updated ${c.updatedAt}`:void 0,children:["set · ",c.location??c.variable,c.version&&c.source==="vault"?`, version ${c.version}`:""]}):n.jsx($,{tone:"bad",children:c.state==="revoked"?"removed":"not set"}):null}function jp(c){const o=c?.devUsers??[],[f,r]=M.useState("");return M.useEffect(()=>{!f&&o[0]&&r(o[0].id)},[o,f]),[f,r,o]}function xp({as:c,setAs:o,devUsers:f,label:r="Save as"}){return f.length?n.jsxs("label",{children:[r,n.jsx("select",{className:"input",value:c,onChange:p=>o(p.target.value),"aria-label":"Identity",children:f.map(p=>n.jsxs("option",{value:p.id,children:[p.name??p.id," (",p.roles.join(", "),")"]},p.id))})]}):null}function os({credentialRef:c,provider:o,as:f,label:r="Set key",onSaved:p}){const[y,m]=M.useState(!1),[S,h]=M.useState(""),[v,b]=M.useState(!1),[N,q]=M.useState(null),[k,L]=M.useState(null),z=async()=>{b(!0),q(null);const D=S;h("");try{const R=await ee("/credentials",{method:"POST",body:JSON.stringify({ref:c,value:D,...o?{provider:o}:{},...f?{as:f}:{}})});L(R.stored),m(!1),p?.(R.stored)}catch(R){q(R)}finally{b(!1)}};return y?n.jsxs("span",{className:"row small",style:{flexWrap:"wrap"},children:[N?n.jsx(he,{error:N}):null,n.jsx("input",{className:"input",type:"password",autoComplete:"off",spellCheck:!1,value:S,onChange:D=>h(D.target.value),placeholder:`Value for ${c}`,"aria-label":`Value for ${c}`}),n.jsx("button",{className:"btn btn-small btn-primary",onClick:z,disabled:v||!S.trim(),children:v?"Saving…":"Save"}),n.jsx("button",{className:"btn btn-small",onClick:()=>(h(""),m(!1)),children:"Cancel"}),n.jsx("span",{className:"muted",children:"Stored securely on the server; it is never shown again."})]}):n.jsxs("span",{className:"row small",children:[n.jsx("button",{className:"btn btn-small",onClick:()=>m(!0),children:r}),k&&n.jsxs("span",{className:"muted",children:["Stored (",k.location??"custody",", version ",k.version,")."]})]})}function bp(c){return(o,f="GET",r)=>ee(`/services/manage${o}`,{method:f,headers:{"x-feltkit-as":c},...r!==void 0?{body:JSON.stringify(r)}:f!=="GET"&&f!=="DELETE"?{body:"{}"}:{}})}function Qa(c,o){if(c==null)throw new Error(`${o} was not found or changed meanwhile. Nothing was done.`);return c}const Eh="A credential reference, like credential-ref:stripe. Set its value under Services → Credentials; the value is never stored here.",gp={files:{title:"Files",description:"File records with ownership and audit. Bytes are stored in this environment's FeltDB instance.",render:c=>n.jsx(Tp,{...c})},notifications:{title:"Notifications",description:"Durable in-app notifications. A principal reads only the notifications addressed to it.",render:c=>n.jsx(Cp,{...c})},configuration:{title:"Configuration",description:"Variables and secret references for this environment. Secret values stay in FeltKit's custody.",render:c=>n.jsx(Op,{...c})},apiKeys:{title:"API keys",description:"Durable machine identities. A secret is shown once, when a key is created or rotated. FeltKit accepts a key as an identity holding services.apiKeys.roles.",render:c=>n.jsx(_p,{...c})},webhooks:{title:"Webhooks",description:"Endpoints for signed outbound delivery, with retries and history.",render:c=>n.jsx(Dp,{...c})},jobs:{title:"Jobs",description:"Durable background work. Each job type runs the FeltKit function declared in services.jobs.handlers, as the principal that queued it.",render:c=>n.jsx(Rp,{...c})},schedules:{title:"Schedules",description:"Recurring jobs. Each run queues a job of the schedule's type.",render:c=>n.jsx(wp,{...c})},intelligence:{title:"Intelligence",description:"The provider, model, endpoint and credential reference for this environment. Configuration only: AppPort Services never runs a model.",render:c=>n.jsx(qp,{...c})}};function Sp({id:c,service:o,as:f,picker:r,development:p,summary:y,operations:m}){const{version:S}=qt(),h=gp[c],v=n.jsx(At,{title:h?.title??c,subtitle:n.jsxs(n.Fragment,{children:[n.jsx("a",{href:"#/services",className:"link",children:"Services"})," ","· ",h?.description]}),actions:r});return h?o?o.state==="available"||o.state==="unavailable"?n.jsxs(n.Fragment,{children:[v,n.jsx(Np,{service:o})]}):n.jsxs(n.Fragment,{children:[v,y,p?f?n.jsxs(n.Fragment,{children:[n.jsxs("p",{className:"muted small",children:["Acting as ",n.jsx("strong",{children:f}),". Every operation is authorized by AppPort Services' gateway with this identity's roles, and recorded in Activity."]}),h.render({as:f,manage:bp(f),version:S})]}):n.jsx(I,{children:n.jsxs("p",{className:"muted small",children:["Declare a development identity in ",n.jsxs("code",{children:["feltkit(","{"," dev: ","{"," users ","}"," ","}",")"]}),": service operations are authorized as that identity."]})}):n.jsxs(n.Fragment,{children:[m,n.jsx(I,{children:n.jsxs("p",{className:"muted small",children:["Configuring ",h.title," is a development tool: change it in development, or with the service's own API from your application."]})})]})]}):n.jsxs(n.Fragment,{children:[v,n.jsx(we,{})]}):n.jsxs(n.Fragment,{children:[v,n.jsx(Et,{title:"No such service"})]})}function Np({service:c}){const o=Ep[c.id]??`${c.id}: true`;return n.jsx(I,{title:`Enable ${c.name}`,children:c.state==="unavailable"?n.jsx("p",{className:"error-text",children:c.detail}):n.jsxs(n.Fragment,{children:[n.jsxs("p",{className:"small",children:["Add it to ",n.jsx("code",{children:"services"})," in ",n.jsx("code",{children:"feltkit/app.ts"}),". The backend reloads in place and keeps its state; this screen then manages it."]}),n.jsx("pre",{className:"json",children:`services: { …, ${o} },`}),n.jsxs("span",{className:"row",children:[n.jsx(Ju,{text:o,label:"Copy"}),n.jsxs("span",{className:"muted small",children:["Its permissions (",c.capabilities.join(", "),") are granted through your roles."]})]})]})})}const Ep={apiKeys:'apiKeys: { roles: ["member"] }',jobs:'jobs: { handlers: { "report.build": "reports:build" } }'};function aa({title:c,fields:o,submitLabel:f,send:r,done:p}){const y=()=>Object.fromEntries(o.map(z=>[z.name,z.value??(z.options?Lu(z.options[0]):"")])),[m,S]=M.useState(y),[h,v]=M.useState(!1),[b,N]=M.useState(null),[q,k]=M.useState(null),L=async z=>{z.preventDefault(),v(!0),N(null),k(null);try{const D=await r(m);k(p?p(D):"Done."),S(y())}catch(D){N(D)}finally{v(!1)}};return n.jsxs(I,{title:c,children:[n.jsxs("form",{onSubmit:L,children:[n.jsx("div",{className:"form-grid",children:o.map(z=>n.jsxs("label",{children:[n.jsxs("span",{children:[z.label,z.required?" *":""]}),z.options?n.jsx("select",{className:"input",value:m[z.name],onChange:D=>S({...m,[z.name]:D.target.value}),children:z.options.map(D=>n.jsx("option",{value:Lu(D),children:typeof D=="string"?D:D.label},Lu(D)))}):z.multiline?n.jsx("textarea",{className:"input code-input",rows:3,value:m[z.name],placeholder:z.placeholder,required:z.required,onChange:D=>S({...m,[z.name]:D.target.value})}):n.jsx("input",{className:"input",type:z.type??"text",value:m[z.name],placeholder:z.placeholder,required:z.required,pattern:z.pattern,autoComplete:"off",spellCheck:!1,onChange:D=>S({...m,[z.name]:D.target.value})}),z.hint&&n.jsx("span",{className:"muted small",children:z.hint})]},z.name))}),n.jsx("button",{className:"btn btn-primary",type:"submit",disabled:h,children:h?"Working…":f})]}),b?n.jsx(he,{error:b}):null,q?n.jsx("div",{className:"ok-box small",children:q}):null]})}const Lu=c=>typeof c=="string"?c:c.value;function Hl({title:c,read:o,deps:f,empty:r,columns:p,actions:y,after:m,tools:S}){const h=ze(o,f),v=h.data??[];return n.jsxs(I,{title:c,action:n.jsxs("span",{className:"row",children:[S?.(h.reload),n.jsx("button",{className:"btn btn-small btn-ghost",onClick:h.reload,children:"Refresh"})]}),children:[h.error?n.jsx(he,{error:h.error,retry:h.reload}):h.data?v.length===0?n.jsx("p",{className:"muted small",children:r}):n.jsx("div",{className:"table-wrap",children:n.jsxs("table",{className:"table",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[p.map(([b])=>n.jsx("th",{children:b},b)),y&&n.jsx("th",{})]})}),n.jsx("tbody",{children:v.map((b,N)=>n.jsxs("tr",{children:[p.map(([q,k])=>n.jsx("td",{children:k(b)},q)),y&&n.jsx("td",{className:"row",children:y(b,h.reload)})]},b.id??N))})]})}):n.jsx(we,{}),m]})}function at({label:c,confirm:o,danger:f,action:r,done:p}){const[y,m]=M.useState(!1),[S,h]=M.useState(!1),[v,b]=M.useState(null),N=async()=>{h(!0),b(null);try{await r(),m(!1),p?.()}catch(q){b(q)}finally{h(!1)}};return n.jsxs("span",{className:"row small",children:[y?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"muted",children:o}),n.jsx("button",{className:`btn btn-small ${f?"btn-danger":"btn-primary"}`,onClick:N,disabled:S,children:S?"Working…":`Yes, ${c.toLowerCase()}`}),n.jsx("button",{className:"btn btn-small",onClick:()=>m(!1),children:"Cancel"})]}):n.jsx("button",{className:`btn btn-small ${f?"btn-danger":""}`,onClick:()=>o?m(!0):void N(),disabled:S,children:c}),v?n.jsx(he,{error:v}):null]})}const Gt=c=>c?n.jsx("span",{className:"muted small",title:c,children:Ke(c)}):n.jsx("span",{className:"muted",children:"—"}),ft=c=>c?n.jsx("code",{children:c}):n.jsx("span",{className:"muted",children:"—"});function Ap(c,o){let f;try{f=JSON.parse(c||"{}")}catch{throw new Error(`The ${o} is not valid JSON.`)}if(!f||typeof f!="object"||Array.isArray(f))throw new Error(`The ${o} must be a JSON object, like {"invoice": 7}.`);return f}const Ah=c=>c.split(",").map(o=>o.trim()).filter(Boolean),Th=({done:c})=>n.jsx(at,{label:"Run due work now",action:()=>ee("/services/run",{method:"POST",body:"{}"}),done:c});function Tp({as:c,manage:o,version:f}){const[r,p]=M.useState(0),[y,m]=M.useState(null),[S,h]=M.useState(!1),[v,b]=M.useState(null),[N,q]=M.useState(null),k=async z=>{if(z.preventDefault(),!!y){h(!0),b(null),q(null);try{const D=await zp(y),{file:R}=await ee("/services/files",{method:"POST",body:JSON.stringify({as:c,name:y.name,contentType:y.type||void 0,contentBase64:D})});q(`Uploaded ${R.name} (${R.size.toLocaleString()} bytes).`),m(null),z.target.reset(),p(X=>X+1)}catch(D){b(D)}finally{h(!1)}}},L=async z=>{const{file:D,contentBase64:R}=await ee(`/services/files/${encodeURIComponent(z.id)}/content?as=${encodeURIComponent(c)}`),X=Uint8Array.from(atob(R),xe=>xe.charCodeAt(0)),G=URL.createObjectURL(new Blob([X],{type:D.contentType??"application/octet-stream"}));Object.assign(document.createElement("a"),{href:G,download:D.name}).click(),setTimeout(()=>URL.revokeObjectURL(G),1e3)};return n.jsxs(n.Fragment,{children:[n.jsxs(I,{title:"Upload a file",children:[n.jsxs("form",{onSubmit:k,className:"row",children:[n.jsx("input",{className:"input",type:"file",onChange:z=>m(z.target.files?.[0]??null),"aria-label":"File"}),n.jsx("button",{className:"btn btn-primary",type:"submit",disabled:!y||S,children:S?"Uploading…":"Upload"})]}),n.jsxs("p",{className:"muted small",children:["Stored in this environment's FeltDB instance as ",c,", through the same Files service your functions use (ctx.services.files)."]}),v?n.jsx(he,{error:v}):null,N?n.jsx("div",{className:"ok-box small",children:N}):null]}),n.jsx(Hl,{title:"Files",read:()=>o("/_appport/files"),deps:[c,f,r],empty:"No files yet.",columns:[["Name",z=>n.jsx("strong",{children:z.name})],["Owner",z=>ft(z.owner)],["Type",z=>n.jsx("span",{className:"small",children:z.contentType??"—"})],["Size",z=>n.jsx("span",{className:"num",children:typeof z.size=="number"?z.size.toLocaleString():"—"})],["Updated",z=>Gt(z.updatedAt??z.createdAt)]],actions:(z,D)=>n.jsxs(n.Fragment,{children:[n.jsx(at,{label:"Download",action:()=>L(z)}),n.jsx(zh,{current:z.name,onSave:R=>o(`/_appport/files/${encodeURIComponent(z.id)}`,"PATCH",{name:R}),done:D}),n.jsx(at,{label:"Delete",danger:!0,confirm:`Delete ${z.name} and its bytes?`,action:()=>ee(`/services/files/${encodeURIComponent(z.id)}?as=${encodeURIComponent(c)}`,{method:"DELETE"}),done:D})]})})]})}function zp(c){return new Promise((o,f)=>{const r=new FileReader;r.onload=()=>o(String(r.result).replace(/^data:[^,]*,/,"")),r.onerror=()=>f(r.error),r.readAsDataURL(c)})}function zh({current:c,onSave:o,done:f}){const[r,p]=M.useState(!1),[y,m]=M.useState(c),[S,h]=M.useState(null);if(!r)return n.jsx("button",{className:"btn btn-small",onClick:()=>(m(c),p(!0)),children:"Rename"});const v=async()=>{h(null);try{Qa(await o(y.trim()),"The record"),p(!1),f()}catch(b){h(b)}};return n.jsxs("span",{className:"row small",children:[n.jsx("input",{className:"input",value:y,onChange:b=>m(b.target.value),"aria-label":"New name"}),n.jsx("button",{className:"btn btn-small btn-primary",onClick:v,disabled:!y.trim(),children:"Save"}),n.jsx("button",{className:"btn btn-small",onClick:()=>p(!1),children:"Cancel"}),S?n.jsx(he,{error:S}):null]})}function Cp({as:c,manage:o,version:f}){const[r,p]=M.useState(0),y=()=>p(m=>m+1);return n.jsxs(n.Fragment,{children:[n.jsx(aa,{title:"Send a notification",submitLabel:"Send",fields:[{name:"recipient",label:"Recipient",required:!0,value:c,hint:"A principal id. Only the recipient can read it."},{name:"type",label:"Type",required:!0,placeholder:"task.assigned"},{name:"title",label:"Title",required:!0},{name:"priority",label:"Priority",options:["normal","low","high","urgent"]}],send:async m=>{await o("/_appport/notifications","POST",m),y()},done:()=>"Notification sent."}),n.jsx(Hl,{title:`Notifications for ${c}`,read:()=>o(`/_appport/notifications?limit=50&recipient=${encodeURIComponent(c)}`).then(m=>m.items),deps:[c,f,r],empty:"No notifications for this identity.",columns:[["Title",m=>n.jsx("strong",{children:m.title??m.type})],["Type",m=>ft(m.type)],["Priority",m=>m.priority],["State",m=>n.jsx($,{tone:m.dismissedAt?"neutral":m.readAt?"ok":"info",children:m.dismissedAt?"dismissed":m.status})],["Created",m=>Gt(m.createdAt)]],actions:(m,S)=>{const h=`/_appport/notifications/${encodeURIComponent(m.id)}`;return n.jsxs(n.Fragment,{children:[!m.readAt&&n.jsx(at,{label:"Mark read",action:async()=>Qa(await o(`${h}/read`,"POST"),"The notification"),done:S}),!m.dismissedAt&&n.jsx(at,{label:"Dismiss",action:async()=>Qa(await o(`${h}/dismiss`,"POST"),"The notification"),done:S}),n.jsx(at,{label:"Delete",danger:!0,confirm:"Delete this notification and its deliveries?",action:()=>o(h,"DELETE"),done:S})]})}})]})}const fh={pattern:"[A-Z][A-Z0-9_]*",placeholder:"STRIPE_ACCOUNT",hint:"Uppercase letters, digits and underscores, starting with a letter."};function Op({as:c,manage:o,version:f}){const[r,p]=M.useState(0),y=()=>p(L=>L+1),m=ze(()=>o("/v1/configuration"),[c,f,r]),S=[...new Set((m.data?.secrets??[]).map(L=>L.credentialRef))],h=ze(()=>S.length?o(`/v1/configuration/credentials/status?${S.map(L=>`ref=${encodeURIComponent(L)}`).join("&")}`):Promise.resolve([]),[S.join(","),r]),v=new Map((h.data??[]).map(L=>[L.ref,L]));if(m.error)return n.jsx(he,{error:m.error,retry:m.reload});if(!m.data)return n.jsx(we,{});const{variables:b,secrets:N,declarations:q}=m.data,k=q.filter(L=>L.required&&!b.some(z=>z.name===L.name)&&!N.some(z=>z.name===L.name)).length;return n.jsxs(n.Fragment,{children:[n.jsx("p",{className:"small",children:k===0?"Every required value is set.":`${k} required value(s) missing.`}),n.jsx(I,{title:"Variables",children:b.length===0?n.jsx("p",{className:"muted small",children:"No variables yet."}):n.jsx("div",{className:"table-wrap",children:n.jsxs("table",{className:"table",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{children:"Name"}),n.jsx("th",{children:"Value"}),n.jsx("th",{children:"Updated"}),n.jsx("th",{})]})}),n.jsx("tbody",{children:b.map(L=>n.jsxs("tr",{children:[n.jsx("td",{children:ft(L.name)}),n.jsx("td",{className:"mono small",children:L.value}),n.jsx("td",{children:Gt(L.updatedAt)}),n.jsxs("td",{className:"row",children:[n.jsx(zh,{current:L.value,onSave:z=>o(`/v1/configuration/variables/${encodeURIComponent(L.name)}`,"PATCH",{value:z,required:!1}),done:y}),n.jsx(at,{label:"Delete",danger:!0,confirm:`Delete ${L.name}?`,action:()=>o(`/v1/configuration/variables/${encodeURIComponent(L.name)}`,"DELETE"),done:y})]})]},L.name))})]})})}),n.jsx(aa,{title:"Add a variable",submitLabel:"Add variable",fields:[{name:"name",label:"Name",required:!0,...fh},{name:"value",label:"Value",required:!0,hint:"Not for secrets: add a secret reference below instead."}],send:async L=>{if(hs(L.value))throw new Error("This looks like a secret. Add it as a secret reference instead, and set its value; a variable is stored in FeltDB.");await o("/v1/configuration/variables","POST",{...L,required:!1}),y()},done:()=>"Variable added."}),n.jsx(I,{title:"Secrets",children:N.length===0?n.jsx("p",{className:"muted small",children:"No secrets yet."}):n.jsx("div",{className:"table-wrap",children:n.jsxs("table",{className:"table",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{children:"Name"}),n.jsx("th",{children:"Reference"}),n.jsx("th",{children:"Value"}),n.jsx("th",{children:"Updated"}),n.jsx("th",{})]})}),n.jsx("tbody",{children:N.map(L=>{const z=v.get(L.credentialRef);return n.jsxs("tr",{children:[n.jsx("td",{children:ft(L.name)}),n.jsx("td",{children:ft(L.credentialRef)}),n.jsx("td",{children:z?z.state==="set"?n.jsxs($,{tone:"ok",children:["set",z.version?` · v${z.version}`:""]}):n.jsx($,{tone:"warn",children:z.state}):n.jsx($,{children:"unknown"})}),n.jsx("td",{children:Gt(L.updatedAt)}),n.jsxs("td",{className:"row",children:[n.jsx(os,{credentialRef:L.credentialRef,label:z?.state==="set"?"Replace value":"Set value",as:c,onSaved:y}),n.jsx(at,{label:"Delete",danger:!0,confirm:`Delete the binding ${L.name}? The stored value is kept.`,action:()=>o(`/v1/configuration/secrets/${encodeURIComponent(L.name)}`,"DELETE"),done:y})]})]},L.name)})})]})})}),n.jsx(aa,{title:"Add a secret reference",submitLabel:"Add secret",fields:[{name:"name",label:"Name",required:!0,...fh},{name:"credentialRef",label:"Credential reference",required:!0,pattern:"credential-ref:.+",placeholder:"credential-ref:stripe",hint:Eh}],send:async L=>{await o("/v1/configuration/secrets","POST",{...L,required:!1}),y()},done:()=>"Secret reference added. Set its value in the table above."})]})}function _p({manage:c,version:o}){const[f,r]=M.useState(0),[p,y]=M.useState(null),[m,S]=M.useState(null),h=()=>r(b=>b+1),v="/_appport/api/keys";return n.jsxs(n.Fragment,{children:[p&&n.jsxs("div",{className:"ok-box small",children:[p.lead," Copy this secret now; it is not shown again: ",n.jsx("code",{className:"token",children:p.value})," ",n.jsx(Ju,{text:p.value})," ",n.jsx("button",{className:"btn btn-small btn-ghost",onClick:()=>y(null),children:"Done"})]}),n.jsx(aa,{title:"Create an API key",submitLabel:"Create API key",fields:[{name:"name",label:"Key name",required:!0},{name:"capabilities",label:"Only these capabilities (optional)",placeholder:"files.read, jobs.create",hint:"Comma separated. A ceiling: the key's roles still decide. Empty: no ceiling."},{name:"expiresAt",label:"Expires at (optional)",type:"datetime-local"}],send:async b=>{const N=Ah(b.capabilities??""),q=await c(v,"POST",{name:b.name,...N.length?{restrictions:{capabilities:N}}:{},...b.expiresAt?{expiresAt:new Date(b.expiresAt).toISOString()}:{}});return q?.secret&&y({lead:`Created ${b.name}.`,value:q.secret}),h(),q},done:()=>"API key created."}),n.jsx(Hl,{title:"API keys",read:()=>c(v),deps:[o,f],empty:"No API keys yet.",columns:[["Name",b=>n.jsx("strong",{children:b.name})],["Prefix",b=>ft(b.keyPrefix)],["Ceiling",b=>n.jsx("span",{className:"small",children:b.restrictions?b.restrictions.capabilities.length?b.restrictions.capabilities.join(", "):"denies everything":"none"})],["Expires",b=>Gt(b.expiresAt)],["Last used",b=>Gt(b.lastUsedAt)],["State",b=>n.jsx($,{tone:b.status==="active"?"ok":"neutral",children:b.rotatedTo?"replaced":b.status})]],actions:(b,N)=>n.jsxs(n.Fragment,{children:[b.status==="active"&&!b.rotatedTo&&n.jsx(at,{label:"Rotate",confirm:"Issue a new secret and revoke this one now?",action:async()=>{const q=Qa(await c(`${v}/${encodeURIComponent(b.id)}/rotate`,"POST",{overlapSeconds:0}),`The API key ${b.name}`);y({lead:`Rotated ${b.name}.`,value:q.secret})},done:N}),n.jsx("button",{className:"btn btn-small",onClick:()=>S(b),children:"Audit"}),n.jsx(at,{label:"Revoke",danger:!0,confirm:`Revoke ${b.name}? Requests with it are refused from then on.`,action:()=>c(`${v}/${encodeURIComponent(b.id)}`,"DELETE"),done:N})]})}),m&&n.jsx(Hl,{title:`Audit for ${m.name}`,read:()=>c(`${v}/${encodeURIComponent(m.id)}/audit`).then(b=>Array.isArray(b)?b:b.items??[]),deps:[m.id,f],empty:"No events.",columns:[["Time",b=>Gt(b.timestamp)],["Event",b=>ft(b.type)],["Result",b=>b.result],["Principal",b=>ft(b.principalId)]]})]})}function Dp({as:c,manage:o,version:f}){const[r,p]=M.useState(0),y=()=>p(m=>m+1);return n.jsxs(n.Fragment,{children:[n.jsx(aa,{title:"Register an endpoint",submitLabel:"Register endpoint",fields:[{name:"url",label:"Endpoint URL",type:"url",required:!0,placeholder:"https://example.com/webhook"},{name:"events",label:"Events",required:!0,placeholder:"invoice.created, invoice.paid",hint:"Comma separated. Your functions emit them with ctx.services.webhooks.emit()."},{name:"signingCredentialRef",label:"Signing secret reference",required:!0,pattern:"credential-ref:.+",placeholder:"credential-ref:webhook-signing",hint:Eh}],send:async m=>{await o("/_appport/webhooks","POST",{url:m.url,events:Ah(m.events??""),signingCredentialRef:m.signingCredentialRef}),y()},done:()=>"Endpoint registered. Set its signing secret's value under Services → Credentials if it is not set."}),n.jsx(Hl,{title:"Endpoints",read:()=>o("/_appport/webhooks"),deps:[c,f,r],empty:"No endpoints yet.",columns:[["URL",m=>ft(m.url)],["Events",m=>n.jsx("span",{className:"small",children:(m.events??[]).join(", ")})],["Signing secret",m=>ft(m.signingCredentialRef)],["Created",m=>Gt(m.createdAt)],["Status",m=>n.jsx($,{tone:m.disabledAt?"neutral":"ok",children:m.disabledAt?"disabled":"active"})]],actions:(m,S)=>m.disabledAt?null:n.jsx(at,{label:"Disable",danger:!0,confirm:"Stop delivering to this endpoint? It cannot be enabled again.",action:()=>o(`/_appport/webhooks/${encodeURIComponent(m.id)}`,"DELETE"),done:S})}),n.jsx(Hl,{title:"Recent deliveries",read:()=>o("/_appport/webhooks/deliveries?limit=50").then(m=>Array.isArray(m)?m:m.items??[]),deps:[c,f,r],empty:"No deliveries yet.",columns:[["Event",m=>ft(m.eventType)],["Status",m=>n.jsx($,{tone:m.status==="delivered"?"ok":m.status==="failed"?"bad":"warn",children:m.status})],["Attempts",m=>m.attemptCount],["HTTP",m=>m.lastStatusCode??""],["Last error",m=>n.jsx("span",{className:"error-text small",children:m.lastError??""})],["Created",m=>Gt(m.createdAt)]],tools:m=>n.jsx(Th,{done:m}),actions:(m,S)=>m.status==="failed"?n.jsxs(n.Fragment,{children:[n.jsx(at,{label:"Replay",action:()=>ee(`/services/deliveries/${encodeURIComponent(m.id)}/replay`,{method:"POST",body:JSON.stringify({as:c})}),done:S}),n.jsx("button",{className:"btn btn-small",onClick:()=>lt(`agent/new/diagnose-delivery/${encodeURIComponent(m.id)}`),children:"Diagnose"})]}):null})]})}function Rp({as:c,manage:o,version:f}){const[r,p]=M.useState(0),y=()=>p(h=>h+1),m=ze(()=>ee("/services/jobs"),[f]),S=Object.keys(m.data?.handlers??{});return n.jsxs(n.Fragment,{children:[m.data&&S.length===0&&n.jsxs("div",{className:"callout",children:["No job handlers are declared. A job type runs the function named in ",n.jsxs("code",{children:["services: ","{"," jobs: ","{"," handlers: ","{",' "report.build": "reports:build" ',"}"," ","}"," ","}"]}),"."]}),n.jsx(aa,{title:"Queue a job",submitLabel:"Queue job",fields:[S.length?{name:"type",label:"Job type",required:!0,options:S}:{name:"type",label:"Job type",required:!0,placeholder:"report.build"},{name:"payload",label:"Payload (JSON object)",multiline:!0,value:"{}"}],send:async h=>{if(!S.includes(h.type))throw new Error(`No handler is declared for "${h.type}", so the job would fail. Declare it in services.jobs.handlers first.`);await o("/_appport/jobs","POST",{type:h.type,payload:Ap(h.payload??"{}","payload")}),y()},done:()=>n.jsxs(n.Fragment,{children:["Job queued as ",c,"."," ",n.jsx("button",{className:"btn btn-small",onClick:()=>{ee("/services/run",{method:"POST",body:"{}"}).then(y)},children:"Run due work now"})]})}),n.jsx(Hl,{title:"Jobs",read:()=>o("/_appport/jobs").then(h=>[...h].sort((v,b)=>String(b.createdAt).localeCompare(String(v.createdAt)))),deps:[c,f,r],empty:"No jobs yet.",tools:h=>n.jsx(Th,{done:h}),columns:[["Type",h=>ft(h.type)],["Status",h=>n.jsx($,{tone:h.status==="completed"?"ok":h.status==="failed"?"bad":"warn",children:h.status})],["Attempts",h=>`${h.attemptCount}/${h.maxAttempts}`],["Run at",h=>Gt(h.runAt)],["Last error",h=>n.jsx("span",{className:"error-text small",children:h.lastError??""})]],actions:(h,v)=>n.jsxs(n.Fragment,{children:[(h.status==="failed"||h.status==="completed")&&n.jsx(at,{label:"Retry",action:async()=>Qa(await o(`/_appport/jobs/${encodeURIComponent(h.id)}/retry`,"POST"),`The ${h.type} job`),done:v}),h.status==="failed"&&n.jsx("button",{className:"btn btn-small",onClick:()=>lt(`agent/new/diagnose-job/${encodeURIComponent(h.id)}`),children:"Diagnose"})]})})]})}const Mp={s:"second",m:"minute",h:"hour",d:"day"},Up=c=>{const o=/^(\d+)([smhd])$/.exec(String(c));return o?`Every ${o[1]} ${Mp[o[2]]}${o[1]==="1"?"":"s"}`:String(c)};function wp({manage:c,version:o}){const[f,r]=M.useState(0),p=()=>r(S=>S+1),y=ze(()=>ee("/services/jobs"),[o]),m=Object.keys(y.data?.handlers??{});return n.jsxs(n.Fragment,{children:[n.jsx(aa,{title:"Create a schedule",submitLabel:"Create schedule",fields:[m.length?{name:"type",label:"Job type",required:!0,options:m}:{name:"type",label:"Job type",required:!0,placeholder:"report.build"},{name:"interval",label:"Frequency",options:[{value:"15m",label:"Every 15 minutes"},{value:"30m",label:"Every 30 minutes"},{value:"1h",label:"Every hour"},{value:"6h",label:"Every 6 hours"},{value:"1d",label:"Every day"},{value:"7d",label:"Every week"}]}],send:async S=>{if(!m.includes(S.type))throw new Error(`No handler is declared for "${S.type}", so every scheduled job would fail. Declare it in services.jobs.handlers first.`);await c("/_appport/schedules","POST",{type:S.type,interval:S.interval}),p()},done:()=>"Schedule created."}),n.jsx(Hl,{title:"Schedules",read:()=>c("/_appport/schedules"),deps:[o,f],empty:"No schedules yet.",columns:[["Type",S=>ft(S.type)],["Frequency",S=>Up(S.interval)],["Next run",S=>Gt(S.nextRunAt)],["Created by",S=>ft(S.createdBy)],["Status",S=>n.jsx($,{tone:S.enabled?"ok":"neutral",children:S.enabled?"enabled":"disabled"})]],actions:(S,h)=>S.enabled?n.jsx(at,{label:"Disable",danger:!0,confirm:"Stop queueing jobs from this schedule? It cannot be enabled again.",action:async()=>Qa(await c(`/_appport/schedules/${encodeURIComponent(S.id)}`,"DELETE"),"The schedule"),done:h}):null})]})}function qp({manage:c,version:o}){const[f,r]=M.useState(0),p=ze(()=>Promise.all([c("/v1/intelligence/catalog"),c("/v1/intelligence")]),[o,f]),[y,m]=M.useState(null),[S,h]=M.useState(null),[v,b]=M.useState(!1);if(p.error)return n.jsx(he,{error:p.error,retry:p.reload});if(!p.data)return n.jsx(we,{});const[N,q]=p.data,k=y??{provider:q.configured?q.provider:N[0]?.id??"",model:q.configured?q.model:"",endpoint:q.configured&&q.endpoint?.kind==="custom"?q.endpoint.url:"",credentialRef:""},L=N.find(R=>R.id===k.provider),z=R=>(b(!1),m({...k,...R})),D=async R=>{R.preventDefault(),h(null);try{if(hs(k.credentialRef))throw new Error("That looks like an API key. Enter the key in Studio → Models; here, give a credential reference.");await c("/v1/intelligence","PUT",{provider:k.provider,model:k.model,endpoint:k.endpoint&&L?.customEndpoint?k.endpoint:"default",...k.credentialRef?{credentialRef:k.credentialRef}:{}}),m(null),b(!0),r(X=>X+1)}catch(X){h(X)}};return n.jsxs(n.Fragment,{children:[n.jsxs(I,{title:"Current",children:[n.jsx("p",{className:"small",children:q.configured?n.jsxs(n.Fragment,{children:[n.jsx("strong",{children:q.provider})," / ",n.jsx("code",{children:q.model})," · credential ",q.credentialConfigured?"attached":"not attached"]}):"Not configured. The platform works without it; the agent then has no model to decide with."}),n.jsxs("p",{className:"muted small",children:["To enter an API key and test the model, use"," ",n.jsx("a",{href:"#/models",className:"link",children:"Models"}),"."]})]}),n.jsxs(I,{title:"Configure",children:[n.jsxs("form",{onSubmit:D,children:[n.jsxs("div",{className:"form-grid",children:[n.jsxs("label",{children:[n.jsx("span",{children:"Provider *"}),n.jsx("select",{className:"input",value:k.provider,onChange:R=>z({provider:R.target.value,model:""}),children:N.map(R=>n.jsx("option",{value:R.id,children:R.displayName},R.id))})]}),n.jsxs("label",{children:[n.jsx("span",{children:"Model *"}),n.jsx("input",{className:"input",list:"intelligence-models",value:k.model,required:!0,onChange:R=>z({model:R.target.value})}),n.jsx("datalist",{id:"intelligence-models",children:(L?.models??[]).map(R=>n.jsx("option",{value:R.id,children:R.displayName},R.id))})]}),L?.customEndpoint&&n.jsxs("label",{children:[n.jsx("span",{children:"Custom endpoint (optional)"}),n.jsx("input",{className:"input",type:"url",value:k.endpoint,placeholder:L.endpoints?.[0]?.url??"http://localhost:11434/v1",onChange:R=>z({endpoint:R.target.value})})]}),n.jsxs("label",{children:[n.jsxs("span",{children:["Credential reference",L?.credential==="required"&&!q.credentialConfigured?" *":""]}),n.jsx("input",{className:"input",value:k.credentialRef,pattern:"credential-ref:.+",placeholder:`credential-ref:${k.provider}`,required:L?.credential==="required"&&!q.credentialConfigured,onChange:R=>z({credentialRef:R.target.value})}),n.jsx("span",{className:"muted small",children:"Leave empty to keep the current one."})]})]}),n.jsx("button",{className:"btn btn-primary",type:"submit",children:"Save"}),q.credentialConfigured&&L?.credential!=="required"&&n.jsx(at,{label:"Remove credential",danger:!0,confirm:"Detach the credential reference?",action:()=>c("/v1/intelligence/credential","DELETE"),done:()=>r(R=>R+1)})]}),S?n.jsx(he,{error:S}):null,v?n.jsx("div",{className:"ok-box small",children:"Saved."}):null]})]})}const hh={configured:{tone:"ok",help:"Enabled, set up, and its records read cleanly."},unconfigured:{tone:"warn",help:"Enabled, but nothing is set up yet."},unhealthy:{tone:"bad",help:"Enabled, but its store failed a check or recent work failed."},available:{tone:"neutral",help:"Can run here; not enabled in feltkit({ services })."},unavailable:{tone:"bad",help:"Cannot run in this installation."}};function ds({service:c}){const o=hh[c.state]??hh.unavailable;return n.jsx($,{tone:o.tone,title:o.help,children:c.state})}const Ch="feltkit.services.as",Hp=()=>{try{return sessionStorage.getItem(Ch)}catch{return null}};function Bp(c){const[o,f]=M.useState(()=>Hp()??c[0]?.id??""),r=y=>{f(y);try{sessionStorage.setItem(Ch,y)}catch{}};M.useEffect(()=>{c.length&&!c.some(y=>y.id===o)&&f(c[0].id)},[c,o]);const p=n.jsxs("label",{className:"row small",children:[n.jsx("span",{className:"muted",children:"Act as"}),n.jsx("select",{value:o,onChange:y=>r(y.target.value),"aria-label":"Identity for service operations",children:c.map(y=>n.jsxs("option",{value:y.id,children:[y.name??y.id," (",y.roles.join(", "),")"]},y.id))})]});return{as:o,picker:p}}const Gu=c=>c.state!=="available"&&c.state!=="unavailable";function kp({page:c}){const{version:o}=qt(),f=ze(()=>ee("/services"),[o]),r=ze(()=>ee("/overview"),[o]),p=r.data?.devUsers??[],y=!!r.data?.environment?.development,{canAct:m}=fs(r.data),{as:S,picker:h}=Bp(p),v=f.data?.services??[],b=y&&p.length?h:null;if(c==="credentials")return n.jsxs(n.Fragment,{children:[n.jsx(At,{title:"Credentials",subtitle:n.jsx(Yp,{children:"Credential references the services and configuration use, and where each value is kept."}),actions:b}),n.jsx(Gp,{as:S,canAct:m,development:y,version:o})]});if(c){const k=v.find(L=>L.id===c);return n.jsx(Sp,{id:c,service:k,as:S,picker:b,development:y,summary:k&&Gu(k)?n.jsx(Lp,{service:k}):null,operations:!y&&c==="jobs"?n.jsx(Qp,{as:S,development:!1,canAct:m,version:o}):!y&&c==="webhooks"?n.jsx(Xp,{as:S,development:!1,canAct:!1,version:o}):null})}const N=v.filter(Gu),q=v.filter(k=>!Gu(k));return n.jsxs(n.Fragment,{children:[n.jsx(At,{title:"Services",subtitle:y?"AppPort Services on this environment’s FeltDB instance. Each service has its own screen; every operation there is authorized by your roles, as the identity you choose.":"AppPort Services on this environment’s FeltDB instance. Configuration is a development tool; job retries here are authorized as you and recorded as yours.",actions:b}),f.error&&!f.data?n.jsx(he,{error:f.error,retry:f.reload}):f.data?n.jsxs(n.Fragment,{children:[y&&p.length===0&&n.jsx(I,{children:n.jsxs("p",{className:"muted small",children:["Declare a development identity in ",n.jsxs("code",{children:["feltkit(","{"," dev: ","{"," users ","}"," ","}",")"]})," to manage services: their operations are authorized as that identity."]})}),N.length===0&&n.jsxs(Et,{title:"No services enabled",children:["Enable services with feltkit(","{"," services: ","{"," … ","}"," ","}","). Each one gets its own screen here."]}),n.jsxs("div",{className:"grid grid-3",children:[N.map(k=>n.jsxs("a",{href:`#/services/${k.id}`,className:"card service-tile",children:[n.jsxs("span",{className:"row",children:[n.jsx("strong",{children:k.name})," ",n.jsx(ds,{service:k})]}),n.jsx("span",{className:"small",children:k.detail}),k.summary&&n.jsx("span",{className:"muted small",children:Object.entries(k.summary).slice(0,3).map(([L,z])=>`${L} ${z}`).join(" · ")})]},k.id)),n.jsxs("a",{href:"#/services/credentials",className:"card service-tile",children:[n.jsx("strong",{children:"Credentials"}),n.jsx("span",{className:"small",children:"References the services use, and whether each value is set. Values are never shown."})]})]}),q.length>0&&n.jsx(I,{title:"Not enabled",children:n.jsx("ul",{className:"list",children:q.map(k=>n.jsxs("li",{className:"list-row",children:[n.jsxs("span",{children:[n.jsx("strong",{children:k.name})," ",n.jsx("span",{className:"muted small",children:k.state==="unavailable"?k.detail:k.description})]}),n.jsxs("span",{className:"row",children:[n.jsx(ds,{service:k}),k.state==="available"&&n.jsx("button",{className:"btn btn-small",onClick:()=>lt(`services/${k.id}`),children:"Enable"})]})]},k.id))})})]}):n.jsx(we,{})]})}const Yp=({children:c})=>n.jsxs(n.Fragment,{children:[n.jsx("a",{href:"#/services",className:"link",children:"Services"})," ","· ",c]});function Lp({service:c}){return n.jsxs(I,{title:n.jsxs("span",{className:"row",children:["Status ",n.jsx(ds,{service:c})]}),action:n.jsxs("span",{className:"muted small",children:[c.package,"@",c.version]}),children:[n.jsxs("dl",{className:"kv",children:[n.jsxs("div",{className:"kv-row",children:[n.jsx("dt",{children:"Status"}),n.jsxs("dd",{children:[c.detail," ",c.lastCheckedAt&&n.jsxs("span",{className:"muted",children:["· checked ",Ke(c.lastCheckedAt)]})]})]}),c.summary&&n.jsxs("div",{className:"kv-row",children:[n.jsx("dt",{children:"Records"}),n.jsx("dd",{children:Object.entries(c.summary).map(([o,f])=>n.jsxs("span",{className:"chip",children:[o," ",n.jsx("strong",{children:String(f)})]},o))})]}),c.lastError&&n.jsxs("div",{className:"kv-row",children:[n.jsx("dt",{children:"Last error"}),n.jsxs("dd",{className:"error-text",children:[c.lastError.message," ",n.jsxs("span",{className:"muted",children:["· ",Ke(c.lastError.at)]})]})]})]}),n.jsxs("details",{className:"small",children:[n.jsx("summary",{className:"muted",children:"Permissions and stored state"}),n.jsxs("dl",{className:"kv",children:[n.jsxs("div",{className:"kv-row",children:[n.jsx("dt",{children:"Permissions"}),n.jsx("dd",{children:c.capabilities.map(o=>n.jsx("code",{className:"chip",children:o},o))})]}),n.jsxs("div",{className:"kv-row",children:[n.jsx("dt",{children:"State"}),n.jsx("dd",{children:c.collections.map(o=>n.jsx("a",{href:`#/data/${o}`,className:"chip mono",children:o},o))})]})]})]})]})}function Gp({as:c,canAct:o,development:f,version:r}){const[p,y]=M.useState(0),m=ze(()=>ee("/credentials"),[r,p]),[S,h]=M.useState(null),[v,b]=M.useState("");if(m.error)return n.jsx(he,{error:m.error,retry:m.reload});if(!m.data)return null;const{custody:N,credentials:q}=m.data,k=async z=>{h(null);try{await ee(`/credentials/${encodeURIComponent(z)}${f&&c?`?as=${encodeURIComponent(c)}`:""}`,{method:"DELETE"}),y(D=>D+1)}catch(D){h(D)}},L=v.trim()?v.trim().startsWith("credential-ref:")?v.trim():`credential-ref:${v.trim()}`:"";return n.jsxs(I,{title:"Credentials",children:[n.jsxs("p",{className:"muted small",children:["Services and configuration hold credential references only. Values are kept by FeltKit’s custody (",N.location,") and used inside the effect that needs them; they are never stored in FeltDB, logged, or shown. ",N.note]}),S?n.jsx(he,{error:S}):null,n.jsx("div",{className:"table-wrap",children:n.jsxs("table",{className:"table",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{children:"Reference"}),n.jsx("th",{children:"Used by"}),n.jsx("th",{children:"Value"}),n.jsx("th",{children:"Override variable"}),n.jsx("th",{})]})}),n.jsx("tbody",{children:q.map(z=>n.jsxs("tr",{children:[n.jsx("td",{className:"mono",children:z.ref}),n.jsx("td",{className:"small",children:z.usedBy.length?z.usedBy.join(", "):n.jsx("span",{className:"muted",children:"stored, not used yet"})}),n.jsx("td",{children:n.jsx(ms,{credential:z})}),n.jsx("td",{className:"mono small",children:z.variable??"invalid reference"}),n.jsx("td",{children:o&&z.writable&&n.jsxs("span",{className:"row",children:[n.jsx(os,{credentialRef:z.ref,label:z.present?"Replace":"Set",...f&&c?{as:c}:{},onSaved:()=>y(D=>D+1)}),z.source==="vault"&&z.present&&n.jsx("button",{className:"btn btn-small",onClick:()=>k(z.ref),children:"Remove"})]})})]},z.ref))})]})}),o&&N.writable&&n.jsxs("div",{className:"row small",children:[n.jsx("input",{className:"input",value:v,onChange:z=>b(hs(z.target.value)?"":z.target.value),placeholder:"credential-ref:stripe","aria-label":"New credential reference"}),L&&n.jsx(os,{credentialRef:L,label:"Set value",...f&&c?{as:c}:{},onSaved:()=>(b(""),y(z=>z+1))})]})]})}function Oh({title:c,path:o,as:f,development:r,canAct:p,version:y,retry:m,columns:S}){const[h,v]=M.useState(0),b=ze(()=>ee(`/services/${o}`),[y,h]),[N,q]=M.useState(null),k=async D=>{q(null);try{await ee(`/services/${o}/${encodeURIComponent(D)}/${m.action}`,{method:"POST",body:JSON.stringify(r?{as:f}:{})}),v(R=>R+1)}catch(R){q(R)}},L=async()=>{q(null);try{await ee("/services/run",{method:"POST",body:"{}"}),v(D=>D+1)}catch(D){q(D)}},z=b.data?.items??[];return n.jsxs(I,{title:c,action:r?n.jsx("button",{className:"btn",onClick:L,children:"Run due work now"}):null,children:[N?n.jsx(he,{error:N}):null,b.data?.replay&&!b.data.replay.enabled?n.jsx("p",{className:"muted small",children:b.data.replay.reason}):null,b.error?n.jsx(he,{error:b.error,retry:b.reload}):b.data?z.length===0?n.jsx("p",{className:"muted small",children:"Nothing yet."}):n.jsx("div",{className:"table-wrap",children:n.jsxs("table",{className:"table",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[S.map(([D])=>n.jsx("th",{children:D},D)),n.jsx("th",{})]})}),n.jsx("tbody",{children:z.slice(0,50).map(D=>n.jsxs("tr",{children:[S.map(([R,X])=>n.jsx("td",{children:X(D)},R)),n.jsxs("td",{className:"row",children:[r&&D.status==="failed"&&n.jsx("button",{className:"btn btn-small",onClick:()=>lt(`agent/new/${o==="jobs"?"diagnose-job":"diagnose-delivery"}/${encodeURIComponent(D.id)}`),children:"Diagnose"}),p&&m.when(D)&&(D.retryable??!0)&&n.jsx("button",{className:"btn btn-small",onClick:()=>k(D.id),disabled:r&&!f,children:m.label})]})]},D.id))})]})}):n.jsx(we,{})]})}const _h=c=>c==="completed"||c==="delivered"?"ok":c==="failed"?"bad":"warn";function Qp(c){return n.jsx(Oh,{...c,title:"Job runs",path:"jobs",retry:{label:"Retry",action:"retry",when:o=>o.status==="failed"},columns:[["Type",o=>n.jsx("code",{children:o.type})],["Status",o=>n.jsx($,{tone:_h(o.status),children:o.status})],["Attempts",o=>`${o.attemptCount}/${o.maxAttempts}`],["As",o=>n.jsx("span",{className:"mono small",children:o.principal??"—"})],["Last error",o=>n.jsx("span",{className:"error-text small",children:o.lastError??""})],["Created",o=>n.jsx("span",{className:"muted small",children:Ke(o.createdAt)})]]})}function Xp(c){return n.jsx(Oh,{...c,title:"Webhook deliveries",path:"deliveries",retry:{label:"Replay",action:"replay",when:o=>o.status==="failed"},columns:[["Event",o=>n.jsx("code",{children:o.eventType})],["To",o=>n.jsx("span",{className:"mono small",children:o.destination??o.endpointId})],["Status",o=>n.jsx($,{tone:_h(o.status),children:o.status})],["Attempts",o=>o.attemptCount],["HTTP",o=>o.lastStatusCode??""],["Last error",o=>n.jsx("span",{className:"error-text small",children:o.lastError??""})],["Created",o=>n.jsx("span",{className:"muted small",children:Ke(o.createdAt)})]]})}function Vp(){Sh();const{overview:c,activity:o}=qt();if(!c)return null;const f=c.capabilities??[],r=Dh(o,c.recentActivity??[]).slice(0,8),p=[...c.recentErrors??[],...c.recentDenials??[]].sort((h,v)=>v.at.localeCompare(h.at)).slice(0,6),y=Object.values(c.counts??{}).reduce((h,v)=>h+Number(v),0),m=(c.services??[]).filter(h=>h.state!=="available"&&h.state!=="unavailable"),S=c.agent??{tasks:[],waiting:0,handoffs:0};return n.jsxs(n.Fragment,{children:[n.jsx(At,{title:c.application.name,subtitle:c.application.description??"Your application at a glance: where its state lives, what it can do, and what it has done.",actions:n.jsxs(n.Fragment,{children:[n.jsx($,{tone:c.state==="ready"?"ok":"warn",children:c.state}),c.url&&n.jsx("a",{className:"btn",href:c.url,target:"_blank",rel:"noreferrer",children:"Open app ↗"})]})}),n.jsxs("div",{className:"grid grid-4 stats",children:[n.jsx(ss,{label:"Records",value:y,detail:`${c.collections.length} collection${c.collections.length===1?"":"s"}`,onClick:()=>lt("data")}),n.jsx(ss,{label:"Functions",value:c.functions.length,detail:`${c.functions.filter(h=>h.kind==="query").length} queries · ${c.functions.filter(h=>h.kind==="mutation").length} mutations`,onClick:()=>lt("capabilities")}),n.jsx(ss,{label:"Capabilities",value:f.length,detail:"published through AppPort",onClick:()=>lt("capabilities")}),n.jsx(ss,{label:"Errors",value:(c.recentErrors??[]).length,detail:`${(c.recentDenials??[]).length} recent denials`,tone:(c.recentErrors??[]).length?"bad":void 0,onClick:()=>lt("activity")})]}),n.jsxs("div",{className:"grid grid-2",children:[n.jsxs(I,{title:"Where state lives",children:[n.jsx("p",{className:"lede",children:"One FeltDB instance serves this environment. Application functions, AppPort capabilities, AppPort Services, sessions, and this activity log all read and write it."}),n.jsxs("dl",{className:"kv",children:[n.jsxs("div",{className:"kv-row",children:[n.jsx("dt",{children:"Environment"}),n.jsxs("dd",{children:[c.environment.name," ",c.environment.production&&n.jsx($,{tone:"warn",children:"production"})]})]}),n.jsxs("div",{className:"kv-row",children:[n.jsx("dt",{children:"Storage"}),n.jsxs("dd",{children:["FeltDB ",c.instance.feltdbVersion," · ",c.instance.mode," · ",c.instance.durable?"durable":"ephemeral"]})]}),n.jsxs("div",{className:"kv-row",children:[n.jsx("dt",{children:"Location"}),n.jsx("dd",{children:n.jsx("code",{className:"path",children:c.instance.location})})]}),n.jsxs("div",{className:"kv-row",children:[n.jsx("dt",{children:"Journal"}),n.jsxs("dd",{children:["position ",c.instance.sequence]})]}),n.jsxs("div",{className:"kv-row",children:[n.jsx("dt",{children:"Opened"}),n.jsxs("dd",{children:[Ke(c.instance.openedAt)," by pid ",c.instance.pid]})]})]}),n.jsxs("div",{className:"components",children:[n.jsx("div",{className:"components-title",children:"Components using this instance"}),Object.entries(c.components??{}).map(([h,v])=>n.jsxs("div",{className:"component",children:[n.jsx("span",{className:"mono",children:h}),n.jsx("span",{className:"muted small",children:v.join(", ")})]},h))]})]}),n.jsx(I,{title:"Recent activity",action:n.jsx("a",{href:"#/activity",className:"link",children:"All activity →"}),children:r.length===0?n.jsx(Et,{title:"Nothing has happened yet",children:"Open the app and make a change. Every query, mutation, capability call, and sign-in appears here."}):n.jsx("ul",{className:"feed",children:r.map(h=>n.jsx("li",{children:n.jsxs("a",{href:`#/activity/${h.id}`,className:"feed-row",children:[n.jsx(Ga,{outcome:h.outcome}),n.jsx("span",{className:"mono feed-name",children:h.name}),n.jsx("span",{className:"muted small",children:h.principal?.id??(h.kind==="system"?"system":"anonymous")}),n.jsxs("span",{className:"muted small",children:["via ",h.via]}),h.writes?.length?n.jsxs($,{tone:"accent",children:[h.writes.length," write",h.writes.length===1?"":"s"]}):null,n.jsx("span",{className:"muted small right",children:Ke(h.at)})]})},h.id))})})]}),c.path&&n.jsx(I,{title:"Path to production",children:n.jsx("ol",{className:"journey",children:c.path.map(h=>n.jsxs("li",{children:[n.jsx($,{tone:h.state==="done"?"ok":h.state==="todo"?"warn":"neutral",children:h.state==="done"?"done":h.state==="todo"?"to do":h.state==="not-tracked"?"not tracked":"review"}),n.jsx("strong",{children:h.step}),n.jsx("span",{className:"small",children:h.detail}),h.link&&n.jsx("a",{className:"link small",href:`#/${h.link}`,"aria-label":`Open ${h.step}`,children:"Open →"})]},h.step))})}),n.jsxs("div",{className:"grid grid-3",children:[n.jsx(I,{title:"Data",action:c.environment.production?null:n.jsx("a",{href:"#/data",className:"link",children:"Explore →"}),children:c.collections.length===0?n.jsxs(Et,{title:"No collections",children:['Declare one with app.collection("name", ',"{ … }",")."]}):n.jsx("ul",{className:"list",children:c.collections.map(h=>n.jsx("li",{children:n.jsxs("a",{href:`#/data/${h.name}`,className:"list-row",children:[n.jsx("span",{className:"mono",children:h.name}),n.jsx("span",{className:"muted",children:c.counts?.[h.name]??0})]})},h.name))})}),n.jsx(I,{title:"Capabilities",action:n.jsx("a",{href:"#/capabilities",className:"link",children:"Inspect →"}),children:f.length===0?n.jsx(Et,{title:"No capabilities published",children:'Add capability: "name.verb" to a query or mutation to publish it through AppPort.'}):n.jsx("ul",{className:"list",children:f.map(h=>n.jsx("li",{children:n.jsxs("a",{href:`#/capabilities/${h.name}`,className:"list-row",children:[n.jsx("span",{className:"mono",children:h.name}),n.jsx($,{tone:h.effect==="consequential"?"accent":"neutral",children:h.effect})]})},h.name))})}),n.jsx(I,{title:"Services",action:n.jsx("a",{href:"#/services",className:"link",children:"Manage →"}),children:m.length===0?n.jsxs(Et,{title:"No services enabled",children:["Enable AppPort Services with feltkit(","{"," services: ","{"," files: true, jobs: … ","}"," ","}",")."]}):n.jsx("ul",{className:"list",children:m.map(h=>n.jsxs("li",{className:"list-row",children:[n.jsx("span",{children:h.name}),n.jsx(ds,{service:h,compact:!0})]},h.id))})})]}),n.jsxs(I,{title:"Agent",action:n.jsx("a",{href:"#/agent",className:"link",children:"Open →"}),children:[S.waiting>0&&n.jsxs("p",{children:[n.jsxs($,{tone:"warn",children:[S.waiting," waiting for approval"]})," ",n.jsx("a",{href:"#/agent",children:"Review"})]}),S.handoffs>0&&n.jsxs("p",{className:"muted small",children:[S.handoffs," task(s) waiting for a coding agent to claim over MCP."]}),S.tasks.length===0?n.jsx("p",{className:"muted small",children:"No agent tasks yet. Diagnose a failed job from Services, or start one on the Agent screen."}):n.jsx("ul",{className:"list",children:S.tasks.map(h=>n.jsx("li",{children:n.jsxs("a",{href:`#/agent/${h.id}`,className:"list-row",children:[n.jsx("span",{children:h.objective}),n.jsx($,{tone:h.status==="completed"?"ok":h.status==="blocked"?"warn":"neutral",children:h.status})]})},h.id))})]}),p.length>0&&n.jsx(I,{title:"Recent errors and denials",action:n.jsx("a",{href:"#/activity",className:"link",children:"Investigate →"}),children:n.jsx("ul",{className:"feed",children:p.map(h=>n.jsx("li",{children:n.jsxs("a",{href:`#/activity/${h.id}`,className:"feed-row",children:[n.jsx(Ga,{outcome:h.outcome}),n.jsx("span",{className:"mono feed-name",children:h.name}),n.jsx("span",{className:"error-text small",children:h.error?.code}),n.jsx("span",{className:"small ellipsis",children:h.error?.message}),n.jsx("span",{className:"muted small right",children:Ke(h.at)})]})},h.id))})}),!c.environment.production&&n.jsx(I,{title:"Development",children:n.jsxs("dl",{className:"kv",children:[n.jsxs("div",{className:"kv-row",children:[n.jsx("dt",{children:"Runtime"}),n.jsxs("dd",{children:["started ",Ke(c.startedAt)," · functions loaded ",Ke(c.loadedAt)," · generation ",c.generation]})]}),n.jsxs("div",{className:"kv-row",children:[n.jsx("dt",{children:"Project"}),n.jsx("dd",{children:n.jsx("code",{className:"path",children:c.projectDir})})]}),n.jsxs("div",{className:"kv-row",children:[n.jsx("dt",{children:"Endpoints"}),n.jsxs("dd",{className:"mono small",children:[c.url,"/api · ",c.url,"/appport · ",c.url,"/mcp"]})]}),n.jsxs("div",{className:"kv-row",children:[n.jsx("dt",{children:"Deploy"}),n.jsxs("dd",{children:[n.jsx("code",{children:"npx feltkit deploy"})," ",n.jsx("span",{className:"muted",children:"builds, verifies the production build boots, and writes a Node/Docker artifact."})]})]})]})})]})}function ss({label:c,value:o,detail:f,tone:r,onClick:p}){return n.jsxs("button",{className:`stat ${r==="bad"&&o>0?"stat-bad":""}`,onClick:p,children:[n.jsx("span",{className:"stat-label",children:c}),n.jsx("span",{className:"stat-value",children:o}),n.jsx("span",{className:"stat-detail",children:f})]})}function Dh(c,o){const f=new Set;return[...c,...o].filter(r=>f.has(r.id)?!1:(f.add(r.id),!0)).sort((r,p)=>p.id.localeCompare(r.id))}function Zp({collection:c}){const{version:o,overview:f}=qt(),r=ze(()=>ee("/collections"),[o]),p=r.data?.collections??[],y=p.find(S=>S.name===c)??p.find(S=>S.owner==="application")??p[0],m=!!y?.editable&&!f?.environment?.production;return n.jsxs(n.Fragment,{children:[n.jsx(At,{title:"Data",subtitle:n.jsx(n.Fragment,{children:"Records in this environment’s FeltDB instance. Application collections are validated by their schemas; platform collections belong to FeltKit and AppPort Services and are read-only here."})}),r.error&&!r.data?n.jsx(he,{error:r.error,retry:r.reload}):r.data?n.jsxs("div",{className:"split",children:[n.jsx("aside",{className:"split-nav","aria-label":"Collections",children:["application","platform"].map(S=>{const h=p.filter(v=>S==="application"?v.owner==="application":v.owner!=="application");return h.length?n.jsxs("div",{className:"split-group",children:[n.jsx("div",{className:"split-title",children:S==="application"?"Application":"Platform"}),h.map(v=>n.jsxs("a",{href:`#/data/${v.name}`,className:`split-item ${y?.name===v.name?"active":""}`,children:[n.jsx("span",{className:"mono ellipsis",children:v.name}),n.jsx("span",{className:"muted small",children:v.count})]},v.name))]},S):null})}),n.jsx("section",{className:"split-main",children:y?n.jsx(Kp,{collection:y,editable:m},y.name):n.jsx(Et,{title:"No collections"})})]}):n.jsx(we,{})]})}function Kp({collection:c,editable:o}){const{version:f}=qt(),[r,p]=M.useState(""),[y,m]=M.useState(""),[S,h]=M.useState(null),[v,b]=M.useState([]),[N,q]=M.useState(null),[k,L]=M.useState(null),z=S?`&field=${encodeURIComponent(S.field)}&eq=${encodeURIComponent(S.value)}`:"",D=ze(()=>ee(`/collections/${encodeURIComponent(c.name)}?limit=50${z}`),[c.name,z,f]);M.useEffect(()=>{D.data&&(b(D.data.records),q(D.data.nextCursor))},[D.data]);const R=M.useMemo(()=>{const G=c.schema?.properties?Object.keys(c.schema.properties):[],le=[...new Set(v.flatMap(xe=>Object.keys(xe)))].filter(xe=>xe!=="id"&&xe!=="__version");return["id",...(G.length?G:le).slice(0,6),"__version"]},[c.schema,v]),X=async()=>{if(!N)return;const G=await ee(`/collections/${encodeURIComponent(c.name)}?limit=50&cursor=${encodeURIComponent(N)}${z}`);b(le=>[...le,...G.records]),q(G.nextCursor)};return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"collection-head",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"mono",children:c.name}),n.jsxs("div",{className:"muted small",children:[c.owner==="application"?"Application collection":`Owned by ${c.owner}`," · ",c.count," record",c.count===1?"":"s",c.description?` · ${c.description}`:""]})]}),n.jsxs("div",{className:"row",children:[!c.editable&&n.jsx($,{children:"read-only"}),o&&n.jsx("button",{className:"btn btn-primary",onClick:()=>L("new"),children:"New record"})]})]}),c.schema&&n.jsxs("details",{className:"schema",children:[n.jsx("summary",{children:"Schema"}),n.jsx(Yn,{schema:c.schema}),n.jsx("p",{className:"muted small",children:"Enforced by FeltKit on every write through ctx.db. FeltDB stores JSON documents and adds id and __version."})]}),n.jsxs("form",{className:"filter",onSubmit:G=>{G.preventDefault(),h(r&&y!==""?{field:r,value:y}:null)},children:[n.jsxs("select",{className:"input",value:r,onChange:G=>p(G.target.value),"aria-label":"Filter field",children:[n.jsx("option",{value:"",children:"Filter by field…"}),R.map(G=>n.jsx("option",{value:G,children:G},G))]}),n.jsx("input",{className:"input",value:y,onChange:G=>m(G.target.value),placeholder:"equals…","aria-label":"Filter value"}),n.jsx("button",{className:"btn",type:"submit",children:"Apply"}),S&&n.jsx("button",{className:"btn btn-ghost",type:"button",onClick:()=>{h(null),p(""),m("")},children:"Clear"})]}),D.error?n.jsx(he,{error:D.error,retry:D.reload}):D.loading&&!D.data?n.jsx(we,{}):v.length===0?n.jsx(Et,{title:S?"No records match":"No records yet",children:S?"Try another value.":c.owner==="application"?"Records appear here as soon as a mutation writes them.":""}):n.jsxs("div",{className:"table-wrap",children:[n.jsxs("table",{className:"table",children:[n.jsx("thead",{children:n.jsx("tr",{children:R.map(G=>n.jsx("th",{children:G},G))})}),n.jsx("tbody",{children:v.map(G=>n.jsx("tr",{onClick:()=>L(G),tabIndex:0,onKeyDown:le=>le.key==="Enter"&&L(G),children:R.map(le=>n.jsx("td",{className:le==="id"||le==="__version"?"mono muted":"",children:n.jsx(Jp,{value:G[le]})},le))},G.id))})]}),N&&n.jsx("button",{className:"btn more",onClick:X,children:"Load more"})]}),k&&n.jsx(Fp,{collection:c,record:k==="new"?null:k,editable:o,onClose:()=>L(null),onSaved:()=>(L(null),D.reload())})]})}function Jp({value:c}){if(c===void 0)return n.jsx("span",{className:"muted",children:"—"});if(typeof c=="boolean")return n.jsx($,{tone:c?"ok":"neutral",children:String(c)});if(typeof c=="number"&&c>1e12&&c<1e13)return n.jsx("span",{title:String(c),children:new Date(c).toLocaleString()});if(typeof c=="object")return n.jsx("span",{className:"mono small",children:JSON.stringify(c).slice(0,80)});const o=String(c);return n.jsx("span",{title:o.length>60?o:void 0,children:o.length>60?`${o.slice(0,60)}…`:o})}function $p(c){const o={};for(const[f,r]of Object.entries(c?.properties??{}))(c.required??[]).includes(f)&&(o[f]=r.type==="number"||r.type==="integer"?/At$/.test(f)?Date.now():0:r.type==="boolean"?!1:"");return o}function Fp({collection:c,record:o,editable:f,onClose:r,onSaved:p}){const y=o?Object.fromEntries(Object.entries(o).filter(([D])=>D!=="id"&&D!=="__version")):$p(c.schema),[m,S]=M.useState(JSON.stringify(y,null,2)),[h,v]=M.useState(null),[b,N]=M.useState(!1),[q,k]=M.useState(!1),L=async()=>{v(null);let D;try{D=JSON.parse(m)}catch{v({code:"INVALID_JSON",message:"That is not valid JSON."});return}N(!0);try{await ee(o?`/collections/${c.name}/${encodeURIComponent(o.id)}`:`/collections/${c.name}`,{method:o?"PATCH":"POST",body:JSON.stringify({record:D})}),p()}catch(R){v(R)}finally{N(!1)}},z=async()=>{N(!0);try{await ee(`/collections/${c.name}/${encodeURIComponent(o.id)}`,{method:"DELETE"}),p()}catch(D){v(D),N(!1)}};return n.jsxs(Nh,{title:o?`${c.name} / ${o.id}`:`New ${c.name} record`,onClose:r,children:[o&&n.jsxs("p",{className:"muted small",children:["Version ",o.__version,". Find what wrote it in ",n.jsx("a",{href:"#/activity",children:"Activity"}),"."]}),f?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"callout",children:["Development edit: validated against the schema and committed atomically, recorded in Activity as ",n.jsx("code",{children:"admin"})," by ",n.jsx("code",{children:"dashboard"}),". Function access rules do not apply to these edits; this tool is not available in production."]}),n.jsx("textarea",{className:"code-input",value:m,onChange:D=>S(D.target.value),rows:14,spellCheck:!1,"aria-label":"Record JSON"}),h?n.jsx(he,{error:h}):null,n.jsxs("div",{className:"row between",children:[o?q?n.jsxs("span",{className:"row",children:[n.jsx("button",{className:"btn btn-danger",onClick:z,disabled:b,children:"Delete permanently"}),n.jsx("button",{className:"btn btn-ghost",onClick:()=>k(!1),children:"Cancel"})]}):n.jsx("button",{className:"btn btn-ghost danger",onClick:()=>k(!0),children:"Delete…"}):n.jsx("span",{}),n.jsx("button",{className:"btn btn-primary",onClick:L,disabled:b,children:o?"Save changes":"Create record"})]})]}):n.jsx(Ln,{value:o,max:2e4}),o&&c.owner!=="application"&&n.jsxs("p",{className:"muted small",children:[c.owner," owns this collection. Change it through its service or capability, so its authorization and audit trail apply."," ",n.jsx("a",{href:"#/services",onClick:()=>lt("services"),children:"Services →"})]})]})}const Wp=(c,o)=>c==="*"||c===o||c.endsWith(".*")&&o.startsWith(c.slice(0,-1));function Ip(c,o){return Object.entries(c??{}).filter(([,f])=>f.some(r=>Wp(r,o))).map(([f])=>f)}function Rh(c){if(!c||c.type!=="object")return{};const o={};for(const f of c.required??[]){const r=c.properties?.[f]??{};o[f]=r.type==="boolean"?!0:r.type==="number"||r.type==="integer"?0:""}return o}function Pp({selected:c}){const{version:o,overview:f}=qt(),r=ze(()=>ee("/capabilities"),[o]),[p,y]=M.useState(c?.includes(":")?"functions":"capabilities"),m=r.data?.capabilities??[],S=f?.functions??[],h=p==="capabilities"?m.find(v=>v.name===c)??m[0]:S.find(v=>v.name===c)??S[0];return n.jsxs(n.Fragment,{children:[n.jsx(At,{title:"Capabilities",subtitle:"What this application can do. Capabilities are published through AppPort — discoverable by other applications and agents (MCP) — and every invocation passes the same authorization as any other caller."}),n.jsxs("div",{className:"tabs",role:"tablist",children:[n.jsxs("button",{role:"tab","aria-selected":p==="capabilities",className:p==="capabilities"?"active":"",onClick:()=>y("capabilities"),children:["AppPort capabilities ",n.jsx("span",{className:"muted",children:m.length})]}),n.jsxs("button",{role:"tab","aria-selected":p==="functions",className:p==="functions"?"active":"",onClick:()=>y("functions"),children:["All functions ",n.jsx("span",{className:"muted",children:S.length})]})]}),r.error&&!r.data?n.jsx(he,{error:r.error,retry:r.reload}):r.data?n.jsxs("div",{className:"split",children:[n.jsxs("aside",{className:"split-nav",children:[(p==="capabilities"?m:S).map(v=>n.jsxs("a",{href:`#/capabilities/${v.name}`,className:`split-item ${h?.name===v.name?"active":""}`,children:[n.jsx("span",{className:"mono ellipsis",children:v.name}),p==="functions"?n.jsx($,{tone:v.kind==="query"?"info":"accent",children:v.kind}):n.jsxs("span",{className:"muted small",children:["v",v.version]})]},v.name)),p==="capabilities"&&m.length===0&&n.jsx("p",{className:"muted small pad",children:"None published yet."})]}),n.jsx("section",{className:"split-main",children:h?p==="capabilities"?n.jsx(ey,{capability:h,roles:f?.roles??{},mcpTools:r.data.mcp?.tools??[],devUsers:f?.devUsers??[],development:f?.environment?.development},h.name):n.jsx(ty,{fn:h,roles:f?.roles??{},devUsers:f?.devUsers??[],development:f?.environment?.development},h.name):n.jsx(Et,{title:p==="capabilities"?"No capabilities":"No functions",children:p==="capabilities"?'Publish a query or mutation with capability: { name: "tasks.complete", description: "…" } and a returns schema.':"Export app.query() or app.mutation() from a module in feltkit/."})})]}):n.jsx(we,{})]})}function Mh({required:c,roles:o}){return c.length?n.jsx("span",{children:c.map(f=>n.jsxs("span",{children:[n.jsx("code",{children:f})," ",n.jsxs("span",{className:"muted",children:["— granted to ",Ip(o,f).join(", ")||"no role"]})]},f))}):n.jsx("span",{children:"any signed-in principal"})}function ey({capability:c,roles:o,mcpTools:f,devUsers:r,development:p}){const y=f.find(m=>m.replace(/_/g,".").includes(c.name))??null;return n.jsxs("div",{className:"stack-lg",children:[n.jsxs("div",{children:[n.jsxs("div",{className:"row",children:[n.jsx("h2",{className:"mono",children:c.name}),n.jsxs($,{children:["v",c.version]}),n.jsx($,{tone:c.effect==="consequential"?"accent":"info",children:c.effect})]}),n.jsx("p",{children:c.description??n.jsx("span",{className:"muted",children:"No description. Add one so agents and other applications know what this does."})})]}),n.jsxs(I,{title:"Contract",children:[n.jsxs("dl",{className:"kv",children:[n.jsxs("div",{className:"kv-row",children:[n.jsx("dt",{children:"Requires"}),n.jsx("dd",{children:n.jsx(Mh,{required:c.authorization,roles:o})})]}),n.jsxs("div",{className:"kv-row",children:[n.jsx("dt",{children:"Implemented by"}),n.jsx("dd",{children:c.function?n.jsx("a",{href:`#/capabilities/${c.function.name}`,className:"mono",children:c.function.name}):"—"})]}),n.jsxs("div",{className:"kv-row",children:[n.jsx("dt",{children:"Services used"}),n.jsx("dd",{children:c.services?.length?c.services.map(m=>n.jsx($,{children:m},m)):n.jsx("span",{className:"muted",children:"none observed"})})]}),n.jsxs("div",{className:"kv-row",children:[n.jsx("dt",{children:"Idempotency"}),n.jsx("dd",{children:c.idempotency??"—"})]}),n.jsxs("div",{className:"kv-row",children:[n.jsx("dt",{children:"Reachable at"}),n.jsxs("dd",{className:"small",children:[n.jsx("code",{children:"POST /appport"}),y&&n.jsxs(n.Fragment,{children:[" ","· MCP tool ",n.jsx("code",{children:y})]})]})]})]}),n.jsxs("div",{className:"grid grid-2",children:[n.jsxs("div",{children:[n.jsx("div",{className:"label",children:"Input"}),n.jsx(Yn,{schema:c.input})]}),n.jsxs("div",{children:[n.jsx("div",{className:"label",children:"Output"}),n.jsx(Yn,{schema:c.output})]})]})]}),n.jsx(I,{title:"Recent invocations",children:c.recent?.length?n.jsx("ul",{className:"feed",children:c.recent.map(m=>n.jsx("li",{children:n.jsxs("a",{href:`#/activity/${m.id}`,className:"feed-row",children:[n.jsx(Ga,{outcome:m.outcome}),n.jsx("span",{className:"small",children:m.principal??"anonymous"}),n.jsxs("span",{className:"muted small",children:["via ",m.via]}),m.error&&n.jsx("span",{className:"error-text small",children:m.error.code}),n.jsxs("span",{className:"muted small right",children:[m.durationMs,"ms · ",Ke(m.at)]})]})},m.id))}):n.jsx("p",{className:"muted",children:"Not invoked through AppPort yet."})}),p&&n.jsx(Uh,{title:"Invoke through AppPort",note:"Runs through AppPort’s dispatch pipeline with a short-lived session for the identity you choose. The same authorization applies as for any agent or application.",example:Rh(c.input),devUsers:r,run:(m,S)=>ee("/capabilities/invoke",{method:"POST",body:JSON.stringify({capability:c.name,version:c.version,input:m,as:S})})})]})}function ty({fn:c,roles:o,devUsers:f,development:r}){const p=c.access==="public"||c.access==="authenticated"?[]:[c.access];return n.jsxs("div",{className:"stack-lg",children:[n.jsxs("div",{children:[n.jsxs("div",{className:"row",children:[n.jsx("h2",{className:"mono",children:c.name}),n.jsx($,{tone:c.kind==="query"?"info":"accent",children:c.kind}),c.capability&&n.jsxs($,{tone:"ok",children:["→ ",c.capability.name]})]}),n.jsx("p",{className:"muted",children:c.description??(c.kind==="query"?"Read-only: its database handle cannot write.":"All writes commit in one FeltDB transaction, or none do.")})]}),n.jsxs(I,{title:"Contract",children:[n.jsxs("dl",{className:"kv",children:[n.jsxs("div",{className:"kv-row",children:[n.jsx("dt",{children:"Access"}),n.jsx("dd",{children:c.access==="public"?"anyone, including anonymous callers":n.jsx(Mh,{required:p,roles:o})})]}),n.jsxs("div",{className:"kv-row",children:[n.jsx("dt",{children:"Endpoint"}),n.jsx("dd",{children:n.jsxs("code",{children:["POST /api/",c.kind,"/",c.name]})})]})]}),n.jsxs("div",{className:"grid grid-2",children:[n.jsxs("div",{children:[n.jsx("div",{className:"label",children:"Arguments"}),n.jsx(Yn,{schema:c.args})]}),n.jsxs("div",{children:[n.jsx("div",{className:"label",children:"Returns"}),c.returns?n.jsx(Yn,{schema:c.returns}):n.jsx("span",{className:"muted",children:"not declared"})]})]})]}),r&&n.jsx(Uh,{title:`Run ${c.kind}`,note:"Runs as the identity you choose, through the same validation and authorization as a request from the app.",example:Rh(c.args),devUsers:f,run:(y,m)=>ee("/functions/run",{method:"POST",body:JSON.stringify({name:c.name,args:y,as:m})})})]})}function Uh({title:c,note:o,example:f,devUsers:r,run:p}){const[y,m]=M.useState(JSON.stringify(f,null,2)),[S,h]=M.useState(r[0]?.id??"anonymous"),[v,b]=M.useState(null),[N,q]=M.useState(null),[k,L]=M.useState(!1),z=M.useMemo(()=>v&&v.ok===!0,[v]);return n.jsxs(I,{title:c,children:[n.jsx("p",{className:"muted small",children:o}),n.jsx("div",{className:"row",children:n.jsxs("label",{className:"field-inline",children:[n.jsx("span",{children:"Act as"}),n.jsxs("select",{className:"input",value:S,onChange:D=>h(D.target.value),children:[r.map(D=>n.jsxs("option",{value:D.id,children:[D.name??D.id," · ",D.roles.join(", ")]},D.id)),n.jsx("option",{value:"anonymous",children:"anonymous"})]})]})}),n.jsx("textarea",{className:"code-input",rows:6,value:y,onChange:D=>m(D.target.value),spellCheck:!1,"aria-label":"Input JSON"}),n.jsxs("div",{className:"row between",children:[n.jsx("span",{className:"muted small",children:"Input is validated against the contract before authorization runs."}),n.jsx("button",{className:"btn btn-primary",disabled:k,onClick:async()=>{q(null),b(null);let D;try{D=JSON.parse(y||"{}")}catch{q({code:"INVALID_JSON",message:"That is not valid JSON."});return}L(!0);try{b(await p(D,S))}catch(R){q(R)}finally{L(!1)}},children:k?"Running…":"Run"})]}),N?n.jsx(he,{error:N}):null,v&&n.jsxs("div",{className:`result ${z?"result-ok":"result-bad"}`,children:[n.jsxs("div",{className:"row",children:[n.jsx(Ga,{outcome:z?"success":v.error?.code==="FORBIDDEN"||v.error?.code==="UNAUTHORIZED"?"denied":"error"}),v.requestId&&n.jsx("span",{className:"muted small mono",children:v.requestId})]}),n.jsx(Ln,{value:z?v.output??v.value:v.error})]})]})}const ly=["","query","mutation","capability","integration","agent","service","auth","admin","system"],ay=["","success","error","denied"];function ny({selected:c}){Sh(1e4);const{activity:o}=qt(),[f,r]=M.useState(""),[p,y]=M.useState(""),[m,S]=M.useState(!1),h=ze(()=>ee(`/activity?limit=200${f?`&kind=${f}`:""}${p?`&outcome=${p}`:""}`),[f,p]),v=M.useMemo(()=>{const b=Dh(o.filter(N=>(!f||N.kind===f)&&(!p||N.outcome===p)),h.data?.entries??[]);return m?b.filter(N=>N.kind!=="query"):b},[o,h.data,f,p,m]);return n.jsxs(n.Fragment,{children:[n.jsx(At,{title:"Activity",subtitle:"What actually happened, from the runtime’s own records: who called what, through which interface, the authority decision, and the writes FeltDB committed."}),n.jsxs("div",{className:"filter",children:[n.jsx("select",{className:"input",value:f,onChange:b=>r(b.target.value),"aria-label":"Kind",children:ly.map(b=>n.jsx("option",{value:b,children:b||"All kinds"},b))}),n.jsx("select",{className:"input",value:p,onChange:b=>y(b.target.value),"aria-label":"Outcome",children:ay.map(b=>n.jsx("option",{value:b,children:b||"All outcomes"},b))}),n.jsxs("label",{className:"check",children:[n.jsx("input",{type:"checkbox",checked:m,onChange:b=>S(b.target.checked)})," Hide queries"]}),n.jsx("span",{className:"muted small right",children:"Live · newest first"})]}),h.error&&!h.data?n.jsx(he,{error:h.error,retry:h.reload}):h.data?v.length===0?n.jsx(Et,{title:"No activity matches",children:"Use the app, invoke a capability, or run a function from Capabilities."}):n.jsx("div",{className:"table-wrap",children:n.jsxs("table",{className:"table activity",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{children:"When"}),n.jsx("th",{children:"Outcome"}),n.jsx("th",{children:"Kind"}),n.jsx("th",{children:"Name"}),n.jsx("th",{children:"Principal"}),n.jsx("th",{children:"Via"}),n.jsx("th",{children:"Writes"}),n.jsx("th",{className:"num",children:"ms"})]})}),n.jsx("tbody",{children:v.map(b=>n.jsxs("tr",{onClick:()=>lt(`activity/${b.id}`),tabIndex:0,onKeyDown:N=>N.key==="Enter"&&lt(`activity/${b.id}`),className:c===b.id?"selected":"",children:[n.jsx("td",{className:"muted small nowrap",title:b.at,children:Ke(b.at)}),n.jsx("td",{children:n.jsx(Ga,{outcome:b.outcome})}),n.jsx("td",{className:"small",children:b.kind}),n.jsxs("td",{className:"mono",children:[b.name,b.error&&n.jsxs("span",{className:"error-text small",children:[" ",b.error.code]})]}),n.jsx("td",{className:"small",children:b.principal?`${b.principal.id}`:n.jsx("span",{className:"muted",children:b.kind==="system"?"—":"anonymous"})}),n.jsx("td",{className:"small",children:b.via}),n.jsx("td",{className:"small",children:b.writes?.length?b.writes.length:n.jsx("span",{className:"muted",children:"—"})}),n.jsx("td",{className:"num small muted",children:b.durationMs})]},b.id))})]})}):n.jsx(we,{}),c&&n.jsx(iy,{id:c,onClose:()=>lt("activity")})]})}function iy({id:c,onClose:o}){const f=ze(()=>ee(`/activity/${encodeURIComponent(c)}`),[c]),r=f.data?.entry,p=f.data?.serviceEvidence??[];return n.jsx(Nh,{title:r?r.name:"Activity",onClose:o,children:f.error?n.jsx(he,{error:f.error}):r?n.jsxs("div",{className:"stack-lg",children:[n.jsx(Xu,{rows:[["Outcome",n.jsx(Ga,{outcome:r.outcome},"o")],["When",`${new Date(r.at).toLocaleString()} (${Ke(r.at)})`],["Kind",r.kind],["Via",r.via],["Principal",r.principal?`${r.principal.id} (${r.principal.type}; roles: ${r.principal.roles.join(", ")||"none"})`:"anonymous"],...r.capability?[["AppPort capability",`${r.capability.name}@${r.capability.version}`]]:[],["Request",n.jsx("code",{children:r.requestId},"r")],["Duration",`${r.durationMs} ms`],...r.argKeys?[["Arguments",r.argKeys.length?r.argKeys.join(", "):"none"]]:[]]}),r.error&&n.jsxs("section",{children:[n.jsx("h3",{children:"Error"}),n.jsxs("div",{className:"error-box",children:[n.jsx("strong",{children:r.error.code})," ",r.error.message]})]}),r.authority&&n.jsxs("section",{children:[n.jsx("h3",{children:"Authority"}),n.jsx(Xu,{rows:[["Decision",r.authority.allowed?n.jsx($,{tone:"ok",children:"allowed"},"a"):n.jsx($,{tone:"warn",children:"denied"},"d")],["Required",r.authority.required?n.jsx("code",{children:r.authority.required},"q"):"an authenticated principal"],...r.authority.reason?[["Reason",r.authority.reason]]:[],["Decision id",n.jsx("code",{children:r.authority.decisionId},"i")],...r.authority.appportDecisionId?[["AppPort decision",n.jsx("code",{children:r.authority.appportDecisionId},"ap")]]:[],["Policy version",n.jsx("code",{children:r.authority.policyVersion},"p")]]})]}),n.jsxs("section",{children:[n.jsx("h3",{children:"State changes"}),r.writes?.length?n.jsxs(n.Fragment,{children:[n.jsxs("p",{className:"muted small",children:["Committed by FeltDB in one transaction ",n.jsx("code",{children:r.transactionId}),r.commitRevision!==void 0?` at revision ${r.commitRevision}`:"","."]}),n.jsxs("table",{className:"table compact",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{children:"Op"}),n.jsx("th",{children:"Collection"}),n.jsx("th",{children:"Record"}),n.jsx("th",{children:"Expected version"})]})}),n.jsx("tbody",{children:r.writes.map((y,m)=>n.jsxs("tr",{children:[n.jsx("td",{children:n.jsx($,{tone:y.op==="delete"?"bad":y.op==="insert"?"ok":"accent",children:y.op})}),n.jsx("td",{className:"mono",children:y.collection}),n.jsx("td",{className:"mono small",children:y.op==="delete"?y.id:n.jsx("a",{href:`#/data/${y.collection}`,children:y.id})}),n.jsx("td",{className:"small",children:y.expectedVersion??"— (create)"})]},m))})]})]}):n.jsx("p",{className:"muted",children:r.kind==="query"?"Queries cannot write.":r.outcome!=="success"?"Nothing was written through ctx.db: a failed mutation commits nothing.":r.services?.length?"No application records changed through ctx.db. Service effects commit separately; see the evidence below.":"No application records changed."}),r.reads?.length?n.jsxs("p",{className:"muted small",children:["Read: ",r.reads.join(", ")]}):null]}),(p.length>0||r.services?.length)&&n.jsxs("section",{children:[n.jsx("h3",{children:"Service evidence"}),n.jsxs("p",{className:"muted small",children:["Recorded by AppPort Services’ gateway in the same FeltDB instance.",f.data?.serviceEvidenceState==="started"?" An effect has no recorded completion: its outcome is unknown, not failed.":"",f.data?.serviceEvidenceTruncated?" More records exist than are shown.":""]}),p.map(y=>n.jsxs("div",{className:"evidence",children:[n.jsxs("div",{className:"row",children:[n.jsx($,{tone:y.outcome==="succeeded"?"ok":y.outcome==="denied"?"warn":y.outcome==="started"?"neutral":"bad",children:y.outcome}),n.jsx("span",{className:"mono",children:y.capability}),n.jsx("span",{className:"muted small",children:y.service})]}),n.jsxs("div",{className:"muted small",children:["decision ",y.decision,y.decisionId?` · ${y.decisionId}`:""," · ",y.resource]})]},y.id))]}),r.detail&&n.jsxs("section",{children:[n.jsx("h3",{children:"Detail"}),n.jsx(Ln,{value:r.detail})]})]}):n.jsx(we,{})})}function sy(){const{version:c,overview:o}=qt(),f=ze(()=>ee("/environments"),[]),r=ze(()=>ee("/sessions"),[c]),p=o?.environment?.development;return n.jsxs(n.Fragment,{children:[n.jsx(At,{title:"Settings",subtitle:"Environments, access policy, and sessions. Configuration lives in feltkit/app.ts; this page shows what the runtime is actually using."}),n.jsxs(I,{title:"Environments",children:[n.jsx("p",{className:"muted small",children:"Each environment has its own FeltDB instance. They never share state; FeltKit refuses to open two environments on the same location."}),f.error?n.jsx(he,{error:f.error}):f.data?n.jsxs("table",{className:"table",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{children:"Environment"}),n.jsx("th",{children:"Storage"}),n.jsx("th",{children:"Location"}),n.jsx("th",{children:"Instance"})]})}),n.jsx("tbody",{children:f.data.environments.map(y=>n.jsxs("tr",{className:y.active?"selected":"",children:[n.jsxs("td",{children:[n.jsx("strong",{children:y.name})," ",y.active&&n.jsx($,{tone:"ok",children:"active"})]}),n.jsx("td",{children:y.storage}),n.jsx("td",{className:"mono small",children:y.location}),n.jsx("td",{className:"mono small muted",children:y.instanceId??"not open here"})]},y.name))})]}):n.jsx(we,{}),n.jsxs("p",{className:"muted small",children:["Production uses ",n.jsx("code",{children:"FELTDB_URL"})," + ",n.jsx("code",{children:"FELTDB_TOKEN"})," when set (a FeltDB server), otherwise ",n.jsx("code",{children:"FELTKIT_STATE_DIR"})," or ",n.jsx("code",{children:".feltkit/production/state"}),"."]})]}),n.jsxs("div",{className:"grid grid-2",children:[n.jsxs(I,{title:"Access policy",action:n.jsxs("code",{className:"muted small",children:["policy ",o?.policyVersion]}),children:[n.jsxs("table",{className:"table compact",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{children:"Role"}),n.jsx("th",{children:"Permissions"})]})}),n.jsx("tbody",{children:Object.entries(o?.roles??{}).map(([y,m])=>n.jsxs("tr",{children:[n.jsx("td",{children:n.jsx("strong",{children:y})}),n.jsx("td",{children:m.map(S=>n.jsx("code",{className:"chip",children:S},S))})]},y))})]}),n.jsx("p",{className:"muted small",children:"Enforced through AppPort’s authorizer on functions, capabilities, and services alike. Edit roles in feltkit/app.ts."})]}),n.jsx(I,{title:"Development identities",children:p?(o?.devUsers??[]).length?n.jsx("ul",{className:"list",children:o.devUsers.map(y=>n.jsxs("li",{className:"list-row",children:[n.jsxs("span",{children:[n.jsx("strong",{children:y.name??y.id})," ",n.jsx("span",{className:"muted mono small",children:y.id})]}),n.jsx("span",{children:y.roles.map(m=>n.jsx($,{children:m},m))})]},y.id))}):n.jsxs("p",{className:"muted",children:["None declared. Add dev: ","{ users: [...] }"," to feltkit(","{ … }",")."]}):n.jsx("p",{className:"muted",children:"Development sign-in is disabled in this environment."})})]}),n.jsxs(I,{title:"Sessions",action:n.jsx("span",{className:"muted small",children:"tokens are stored only as SHA-256 digests"}),children:[p&&n.jsx(cy,{roles:Object.keys(o?.roles??{}),onIssued:r.reload}),r.error?n.jsx(he,{error:r.error}):r.data?r.data.sessions.length===0?n.jsx("p",{className:"muted",children:"No active sessions."}):n.jsxs("table",{className:"table",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{children:"Ref"}),n.jsx("th",{children:"Principal"}),n.jsx("th",{children:"Roles"}),n.jsx("th",{children:"Kind"}),n.jsx("th",{children:"Created"}),n.jsx("th",{children:"Expires"}),n.jsx("th",{})]})}),n.jsx("tbody",{children:r.data.sessions.map(y=>n.jsxs("tr",{children:[n.jsx("td",{className:"mono small muted",children:y.ref}),n.jsxs("td",{children:[y.principal?.id," ",n.jsx("span",{className:"muted small",children:y.principal?.type})]}),n.jsx("td",{className:"small",children:y.principal?.roles?.join(", ")}),n.jsx("td",{className:"small",children:y.kind}),n.jsx("td",{className:"small muted",children:Ke(y.createdAt)}),n.jsx("td",{className:"small muted",children:y.expiresAt?new Date(y.expiresAt).toLocaleString():"never"}),n.jsx("td",{children:n.jsx("button",{className:"btn btn-small btn-ghost danger",onClick:()=>ee(`/sessions/${y.ref}`,{method:"DELETE"}).then(r.reload,r.reload),children:"Revoke"})})]},y.ref))})]}):n.jsx(we,{})]})]})}function cy({roles:c,onIssued:o}){const[f,r]=M.useState("triage-agent"),[p,y]=M.useState(c.includes("agent")?"agent":c[0]??""),[m,S]=M.useState("agent"),[h,v]=M.useState(null),[b,N]=M.useState(null);return n.jsxs("div",{className:"issue",children:[n.jsxs("form",{className:"row wrap",onSubmit:async q=>{q.preventDefault(),N(null);try{const k=await ee("/sessions",{method:"POST",body:JSON.stringify({principal:{id:f,type:m,roles:[p]},label:"issued from the dashboard",ttlMs:864e5})});v(k.token),o()}catch(k){N(k)}},children:[n.jsx("input",{className:"input",value:f,onChange:q=>r(q.target.value),"aria-label":"Principal id",placeholder:"principal id"}),n.jsxs("select",{className:"input",value:m,onChange:q=>S(q.target.value),"aria-label":"Principal type",children:[n.jsx("option",{value:"agent",children:"agent"}),n.jsx("option",{value:"service",children:"service"}),n.jsx("option",{value:"user",children:"user"})]}),n.jsx("select",{className:"input",value:p,onChange:q=>y(q.target.value),"aria-label":"Role",children:c.map(q=>n.jsx("option",{value:q,children:q},q))}),n.jsx("button",{className:"btn btn-primary",type:"submit",disabled:!f||!p,children:"Issue 24-hour session"})]}),b?n.jsx(he,{error:b}):null,h&&n.jsxs("div",{className:"callout",children:[n.jsxs("div",{className:"row between",children:[n.jsx("strong",{children:"Shown once."})," ",n.jsx(Ju,{text:h})]}),n.jsx("code",{className:"token",children:h}),n.jsxs("div",{className:"muted small",children:["Agents: connect an MCP client to ",n.jsxs("code",{children:[location.origin,"/mcp"]})," with ",n.jsx("code",{children:"Authorization: Bearer <token>"}),". It sees only what this role allows."]})]})]})}function uy(){const c=ze(()=>ee("/projects"),[]),o=c.data?.projects??[];return n.jsxs(n.Fragment,{children:[n.jsx(At,{title:"Projects",subtitle:"FeltKit applications this machine has run. Each has its own environments and FeltDB instances."}),c.error?n.jsx(he,{error:c.error,retry:c.reload}):c.data?o.length===0?n.jsx(I,{children:n.jsxs(Et,{title:"Only this project so far",children:["Create another with ",n.jsx("code",{children:"npm create feltkit@latest my-app"}),"."]})}):n.jsx("div",{className:"grid grid-2",children:o.map(f=>n.jsxs(I,{className:f.path===c.data.current?"card-current":"",children:[n.jsxs("div",{className:"row between",children:[n.jsx("h2",{children:f.name}),f.path===c.data.current?n.jsx($,{tone:"ok",children:"this dashboard"}):f.running?n.jsx($,{tone:"ok",children:"running"}):f.exists?n.jsx($,{children:"stopped"}):n.jsx($,{tone:"bad",children:"missing"})]}),n.jsx("code",{className:"path",children:f.path}),n.jsxs("div",{className:"muted small",children:["last run ",Ke(f.lastRunAt)," · ",f.lastEnvironment]}),n.jsxs("div",{className:"row",children:[f.running&&f.url&&f.path!==c.data.current&&n.jsx("a",{className:"btn btn-small",href:f.url,target:"_blank",rel:"noreferrer",children:"Open app ↗"}),!f.running&&f.exists&&n.jsxs("span",{className:"muted small",children:["Start it with ",n.jsx("code",{children:"npm run dev"})," in its directory."]})]})]},f.path))}):n.jsx(we,{}),n.jsx(I,{title:"Start a new application",children:n.jsx("pre",{className:"json",children:`npm create feltkit@latest my-app
13
- cd my-app
14
- npm install
15
- npm run dev`})})]})}const Qu=[{id:"inspect-app",label:"Inspect the application",help:"Capabilities you may use, unhealthy services, recent errors and denials."},{id:"diagnose-job",label:"Diagnose a job",help:"Read the job, its runs and error; propose a retry when it can help.",target:"Job id"},{id:"diagnose-delivery",label:"Diagnose a webhook delivery",help:"Read the delivery, endpoint, and signing credential; propose a replay when it can help.",target:"Delivery id"},{id:"invoke",label:"Run a capability",help:"One capability: observations run now, consequential ones wait for approval."},{id:"handoff",label:"Hand off to a coding agent",help:"Open-ended work. A coding agent claims it over MCP (feltkit_agent_claim) and proposes actions; you approve them here."}],Vu=c=>c==="completed"?"ok":c==="cancelled"?"neutral":c==="blocked"?"warn":"info";function ry({rest:c}){const{version:o}=qt(),f=ze(()=>ee("/overview"),[o]),r=f.data?.devUsers??[],p=!!f.data?.environment?.development,{canAct:y,actor:m}=fs(f.data),[S,h]=M.useState("");M.useEffect(()=>{!S&&r[0]&&h(r[0].id)},[r,S]);const v=ze(()=>ee(`/agent${S?`?as=${encodeURIComponent(S)}`:""}`),[o,S]),b=c[0]&&c[0]!=="new"?c[0]:null;return n.jsxs(n.Fragment,{children:[n.jsx(At,{title:"Agent",subtitle:"FeltDB’s agent runtime operating this application through its AppPort capabilities and AppPort Services. Every action runs as the task owner; consequential ones wait for a person who may perform them.",actions:r.length?n.jsxs("label",{className:"row small",children:[n.jsx("span",{className:"muted",children:"Act as"}),n.jsx("select",{value:S,onChange:N=>h(N.target.value),"aria-label":"Identity for agent actions",children:r.map(N=>n.jsxs("option",{value:N.id,children:[N.name??N.id," (",N.roles.join(", "),")"]},N.id))})]}):null}),v.error&&!v.data?n.jsx(he,{error:v.error,retry:v.reload}):v.data?b?n.jsx(fy,{taskId:b,as:S,development:p,canAct:y,actor:p?S:m??"",version:o}):n.jsxs(n.Fragment,{children:[p&&r.length>0&&n.jsx(oy,{as:S,tools:v.data.tools,initial:c[0]==="new"?{playbook:c[1],target:c[2]}:void 0}),!p&&n.jsx(I,{children:n.jsxs("p",{className:"muted small",children:["Production: tasks come from agents (over MCP) and playbooks. ",y?"You can approve, reject, retry, and settle their actions; each runs as the task owner and is recorded as yours.":"You can inspect them; acting needs feltkit.operations.write."]})}),v.data.handoffs.length>0&&n.jsxs(I,{title:"Waiting for a coding agent",children:[n.jsx("ul",{className:"list",children:v.data.handoffs.map(N=>n.jsxs("li",{className:"list-row",children:[n.jsx("a",{href:`#/agent/${N.taskId}`,children:N.objective}),n.jsxs("span",{className:"muted small mono",children:[N.handoffId," · from ",N.from]})]},N.handoffId))}),n.jsxs("p",{className:"muted small",children:["A coding agent with an agent session claims these with the MCP tool ",n.jsx("code",{children:"feltkit_agent_claim"}),"."]})]}),n.jsx(I,{title:"Tasks",children:v.data.tasks.length===0?n.jsx(Et,{title:"No tasks yet",children:"Start one above, or from a failed job or delivery on the Services screen."}):n.jsx("div",{className:"table-wrap",children:n.jsxs("table",{className:"table",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{children:"Objective"}),n.jsx("th",{children:"Status"}),n.jsx("th",{children:"FeltDB execution"}),n.jsx("th",{children:"Owner"}),n.jsx("th",{children:"Waiting"}),n.jsx("th",{children:"Updated"})]})}),n.jsx("tbody",{children:v.data.tasks.map(N=>n.jsxs("tr",{onClick:()=>lt(`agent/${N.task.task_id}`),children:[n.jsx("td",{children:N.task.objective}),n.jsx("td",{children:n.jsx($,{tone:Vu(N.task.status),children:N.task.status})}),n.jsx("td",{className:"mono small",children:N.execution?.status??"—"}),n.jsx("td",{className:"mono small",children:N.task.owner}),n.jsx("td",{children:N.pending?n.jsxs($,{tone:"warn",children:[N.pending," approval",N.pending>1?"s":""]}):""}),n.jsx("td",{className:"muted small",children:Ke(N.task.updated_at)})]},N.task.task_id))})]})})})]}):n.jsx(we,{})]})}function oy({as:c,tools:o,initial:f}){const[r,p]=M.useState(f?.playbook&&Qu.some(G=>G.id===f.playbook)?f.playbook:"inspect-app"),[y,m]=M.useState(f?.target??""),[S,h]=M.useState(""),[v,b]=M.useState(""),[N,q]=M.useState("{}"),[k,L]=M.useState(!1),[z,D]=M.useState(null),R=Qu.find(G=>G.id===r),X=async()=>{D(null),L(!0);try{let G={};if(r==="invoke")try{G=JSON.parse(N||"{}")}catch{throw new Error("Input is not valid JSON.")}const le=await ee("/agent/tasks",{method:"POST",body:JSON.stringify({as:c,playbook:r,objective:S||(R.target?`${R.label}: ${y}`:r==="invoke"?`Run ${v}`:R.label),...R.target?{target:y}:{},...r==="invoke"?{capability:v,args:G}:{}})});lt(`agent/${le.task.task_id}`)}catch(G){D(G)}finally{L(!1)}};return n.jsxs(I,{title:"New task",children:[z?n.jsx(he,{error:z}):null,n.jsxs("div",{className:"form",children:[n.jsxs("label",{children:[n.jsx("span",{children:"What"}),n.jsx("select",{value:r,onChange:G=>p(G.target.value),children:Qu.map(G=>n.jsx("option",{value:G.id,children:G.label},G.id))})]}),n.jsx("p",{className:"muted small",children:R.help}),R.target&&n.jsxs("label",{children:[n.jsx("span",{children:R.target}),n.jsx("input",{className:"input mono",value:y,onChange:G=>m(G.target.value)})]}),r==="invoke"&&n.jsxs(n.Fragment,{children:[n.jsxs("label",{children:[n.jsx("span",{children:"Capability"}),n.jsxs("select",{value:v,onChange:G=>b(G.target.value),children:[n.jsx("option",{value:"",children:"Choose…"}),o.map(G=>n.jsxs("option",{value:G.name,disabled:!G.allowed,children:[G.name," — ",G.effect==="consequential"?"needs approval":"observation",G.allowed?"":" (not permitted for this identity)"]},G.name))]})]}),n.jsxs("label",{children:[n.jsx("span",{children:"Input (JSON)"}),n.jsx("textarea",{className:"input mono",rows:3,value:N,onChange:G=>q(G.target.value)})]})]}),n.jsxs("label",{children:[n.jsx("span",{children:"Objective"}),n.jsx("input",{className:"input",value:S,placeholder:r==="handoff"?"Describe the work for the coding agent":"Optional",onChange:G=>h(G.target.value)})]}),n.jsx("div",{children:n.jsx("button",{className:"btn btn-primary",onClick:X,disabled:k||!c||!!R.target&&!y||r==="invoke"&&!v||r==="handoff"&&!S,children:k?"Working…":"Start"})})]})]})}const dy=c=>({failed:"Failed",interrupted:"Outcome unknown",executing:"Running",approved:"Approved, starting"})[c]??c;function fy({taskId:c,as:o,development:f,canAct:r,actor:p,version:y}){const[m,S]=M.useState({}),[h,v]=M.useState(0),b=ze(()=>ee(`/agent/tasks/${encodeURIComponent(c)}`),[c,y,h]),[N,q]=M.useState(null),[k,L]=M.useState(""),z=async(Y,fe={})=>{q(null);try{await ee(`/agent/tasks/${encodeURIComponent(c)}/${Y}`,{method:"POST",body:JSON.stringify(f?{as:o,...fe}:fe)}),v(De=>De+1)}catch(De){q(De)}};if(b.error)return n.jsx(he,{error:b.error,retry:b.reload});if(!b.data)return n.jsx(we,{});const{task:D,checkpoints:R,execution:X,pending:G,actions:le=[]}=b.data,xe=le.filter(Y=>Y.state==="failed"||Y.state==="interrupted"||Y.state==="executing"||Y.state==="approved"),Ce=D.status!=="completed"&&D.status!=="cancelled";return n.jsxs(n.Fragment,{children:[n.jsx("p",{children:n.jsx("a",{href:"#/agent",children:"← Tasks"})}),N?n.jsx(he,{error:N}):null,n.jsxs(I,{title:n.jsxs("span",{className:"row",children:[D.objective," ",n.jsx($,{tone:Vu(D.status),children:D.status})]}),action:n.jsx("span",{className:"muted small mono",children:D.owner}),children:[n.jsxs("dl",{className:"kv",children:[n.jsxs("div",{className:"kv-row",children:[n.jsx("dt",{children:"FeltDB execution"}),n.jsx("dd",{className:"mono small",children:X?`${X.agentRef} · ${X.status}${X.error?` · ${X.error}`:""}`:"—"})]}),n.jsxs("div",{className:"kv-row",children:[n.jsx("dt",{children:"Task"}),n.jsxs("dd",{className:"mono small",children:[D.task_id," · checkpoint v",D.checkpoint_version]})]})]}),r&&Ce&&b.data.playbook==="decide"&&le.every(Y=>!["proposed","approved","executing","interrupted"].includes(Y.state))&&n.jsxs("div",{className:"row",children:[n.jsx("button",{className:"btn",onClick:()=>z("decide"),children:"Ask the model again"}),n.jsx("span",{className:"muted small",children:"Uses this environment’s model (Models). The answer is a new proposal."})]}),f&&Ce&&n.jsxs("div",{className:"row",children:[n.jsx("input",{className:"input grow",placeholder:"Summary of what was done",value:k,onChange:Y=>L(Y.target.value)}),n.jsx("button",{className:"btn",onClick:()=>z("complete",{summary:k}),disabled:G.length>0,children:"Complete"}),n.jsx("button",{className:"btn btn-ghost",onClick:()=>z("cancel",{reason:"cancelled from Studio"}),children:"Cancel"})]})]}),G.map(Y=>n.jsxs(I,{title:n.jsxs("span",{className:"row",children:["Waiting for approval ",n.jsx($,{tone:"warn",children:Y.capability})]}),action:n.jsxs("span",{className:"muted small",children:["proposed by ",Y.proposedBy]}),children:[n.jsx("p",{children:Y.reason}),Y.decision&&n.jsxs("p",{className:"small",children:["Chosen by the model ",n.jsxs("span",{className:"mono",children:[Y.decision.provider,Y.decision.model?` / ${Y.decision.model}`:""]})," (",Y.decision.runtime,") among the options the owner may take. A choice is a proposal, not evidence."]}),n.jsx(Ln,{value:Y.input}),n.jsxs("p",{className:"muted small",children:["Runs as ",n.jsx("span",{className:"mono",children:D.owner}),", through ",Y.source==="application"?"the application’s AppPort dispatch":"AppPort Services",". You must be permitted to perform it yourself to approve it."]}),r&&n.jsxs("div",{className:"row",children:[n.jsxs("button",{className:"btn btn-primary",onClick:()=>z("approve",{actionId:Y.actionId}),children:["Approve as ",p]}),n.jsx("button",{className:"btn",onClick:()=>z("reject",{actionId:Y.actionId,reason:"rejected in Studio"}),children:"Reject"})]})]},Y.actionId)),xe.map(Y=>n.jsxs(I,{title:n.jsxs("span",{className:"row",children:[dy(Y.state)," ",n.jsx($,{tone:Y.state==="failed"?"bad":"warn",children:Y.capability})]}),action:n.jsxs("span",{className:"muted small",children:["attempt ",Y.attempt," · approved by ",Y.decidedBy??"—"]}),children:[n.jsx("p",{children:Y.reason}),Y.outcome?.error?n.jsxs("p",{className:"small mono",children:[Y.outcome.error.code,": ",Y.outcome.error.message]}):null,Y.interruption?n.jsxs("p",{className:"small",children:[String(Y.interruption).replace(/\.?$/,".")," Check the effect before settling it; it is never replayed automatically."]}):null,r&&Y.state==="failed"&&Ce&&n.jsx("div",{className:"row",children:n.jsx("button",{className:"btn",onClick:()=>z("retry",{actionId:Y.actionId}),children:"Retry (needs approval again)"})}),r&&Y.state==="interrupted"&&n.jsxs("div",{className:"row",children:[n.jsx("input",{className:"input grow",placeholder:"What you checked (recorded with your name)","aria-label":`What you checked for ${Y.actionId}`,value:m[Y.actionId]??"",onChange:fe=>S(De=>({...De,[Y.actionId]:fe.target.value}))}),n.jsx("button",{className:"btn",disabled:(m[Y.actionId]??"").trim().length<3,onClick:()=>z("resolve",{actionId:Y.actionId,outcome:"succeeded",note:m[Y.actionId]}),children:"It succeeded"}),n.jsx("button",{className:"btn",disabled:(m[Y.actionId]??"").trim().length<3,onClick:()=>z("resolve",{actionId:Y.actionId,outcome:"failed",note:m[Y.actionId]}),children:"It did not take effect"})]})]},Y.actionId)),n.jsx(I,{title:"Checkpoints",children:n.jsx("ol",{className:"timeline",children:R.slice().reverse().map(Y=>n.jsxs("li",{className:"timeline-item",children:[n.jsxs("div",{className:"row",children:[n.jsxs("strong",{children:["v",Y.version]})," ",n.jsx($,{tone:Vu(Y.status),children:Y.status})," ",n.jsxs("span",{className:"muted small",children:[Y.actor," · ",Ke(Y.created_at)]})]}),n.jsx("p",{children:Y.summary}),Y.completed.length>0&&n.jsx("ul",{className:"small",children:Y.completed.map((fe,De)=>n.jsx("li",{className:"mono",children:fe},De))}),Y.decisions.length>0&&Y.version===R.length&&n.jsxs("details",{children:[n.jsxs("summary",{className:"small",children:["Decisions (",Y.decisions.length,")"]}),n.jsx("ul",{className:"small",children:Y.decisions.map((fe,De)=>n.jsx("li",{children:fe},De))})]}),Y.evidence.filter(fe=>fe.checkpoint_version===Y.version).map((fe,De)=>n.jsxs("div",{className:"small",children:["Evidence: ",fe.kind==="record"?n.jsxs("a",{href:`#/activity/${fe.id}`,className:"mono",children:[fe.collection,"/",fe.id]}):n.jsx("span",{className:"mono",children:fe.uri})," ",fe.verified?n.jsx($,{tone:"ok",children:"verified at commit"}):n.jsx($,{tone:"neutral",children:"unverified"})]},De))]},Y.version))})})]})}function hy(){const{version:c}=qt(),[o,f]=M.useState(0),r=ze(()=>ee("/models"),[c,o]),p=ze(()=>ee("/overview"),[c]),{development:y,canAct:m}=fs(p.data),[S,h]=M.useState(null),[v,b]=M.useState(!1);if(r.error)return n.jsx(he,{error:r.error,retry:r.reload});if(!r.data)return n.jsx(we,{});const{status:N,catalog:q,intelligence:k}=r.data,L=async()=>{b(!0),h(null);try{h(await ee("/models/test",{method:"POST",body:"{}"}))}catch(z){h({ok:!1,error:{message:z.message}})}finally{b(!1)}};return n.jsxs(n.Fragment,{children:[n.jsx(At,{title:"Models",subtitle:"The model that makes agent decisions in this environment. It chooses among the options your application offers and the task owner may take; its choice becomes a proposal, never an execution."}),n.jsxs(I,{title:n.jsxs("span",{className:"row",children:["Decision model ",N.ready?n.jsx($,{tone:"ok",children:"ready"}):n.jsx($,{tone:"bad",children:"not ready"})]}),action:m?n.jsx("button",{className:"btn",onClick:L,disabled:v||!N.ready,children:v?"Calling…":"Test"}):null,children:[n.jsx(Xu,{rows:[["Source",N.source==="application"?"Application code (agent.decisions)":N.source==="intelligence"?"AppPort Services Intelligence (this environment)":"None"],["Provider",N.provider?n.jsxs("span",{className:"mono",children:[N.provider,N.protocol?` · ${N.protocol}`:""]}):"—"],["Model",N.model?n.jsx("span",{className:"mono",children:N.model}):"—"],["Endpoint",N.endpoint?n.jsx("span",{className:"mono",children:N.endpoint}):"—"],["API key",N.credential.ref?n.jsxs("span",{children:[n.jsx("span",{className:"mono",children:N.credential.ref})," ",n.jsx(ms,{credential:N.credential})]}):N.credential.required?n.jsx($,{tone:"bad",children:"required, none entered"}):"none needed"],["Runtime",N.runtime?n.jsxs("span",{className:"mono",children:[N.runtime.metadata.runtime," (",N.runtime.metadata.execution_method,")"]}):"—"],["Can decide",N.runtime?["binary","choice","score","batch","probability_distribution"].map(z=>n.jsxs($,{tone:N.runtime.capabilities[z]?"ok":"neutral",children:[z.replace("_"," "),N.runtime.capabilities[z]?"":": no"]},z)):"—"]]}),N.problems.map(z=>n.jsxs("div",{className:"error-box",children:[n.jsx("strong",{children:z.message}),n.jsx("div",{className:"small",children:z.fix})]},z.problem)),S&&n.jsx("div",{className:S.ok?"ok-box":"error-box",children:S.ok?n.jsxs(n.Fragment,{children:[n.jsx("strong",{children:"The model answered"})," in ",S.durationMs," ms (",S.provider,", ",S.runtime.runtime,"): ",n.jsx(Ln,{value:S.result})]}):n.jsxs(n.Fragment,{children:[n.jsx("strong",{children:S.error.message}),S.error.hint&&n.jsx("div",{className:"small",children:S.error.hint})]})})]}),y&&k&&n.jsx(my,{catalog:q,current:N,overview:p.data,onSaved:()=>f(z=>z+1)}),!y&&n.jsx(I,{children:n.jsxs("p",{className:"muted small",children:["Production: the model is selected on the host with ",n.jsx("code",{children:"feltkit model set --env production"}),"; keys live in the host’s environment as ",n.jsx("code",{children:"FELTKIT_CREDENTIAL_<ID>"})," (or in a vault the operator opted in to with ",n.jsx("code",{children:"FELTKIT_CREDENTIAL_VAULT=1"}),")."]})}),!k&&n.jsx(I,{children:n.jsxs("p",{className:"muted small",children:["The Intelligence service is not enabled for this application. Add ",n.jsx("code",{children:"intelligence: true"})," to ",n.jsx("code",{children:"services"})," in ",n.jsx("code",{children:"feltkit/app.ts"})," (new apps have it on); Studio reloads and you can choose a provider and enter its API key here. Alternatively pass ",n.jsx("code",{children:"agent.decisions"}),"."]})})]})}function my({catalog:c,current:o,overview:f,onSaved:r}){const[p,y]=M.useState(o.provider??c[0]?.id??""),m=c.find(C=>C.id===p),[S,h]=M.useState(o.model??""),[v,b]=M.useState(o.endpoint??""),[N,q]=M.useState(o.credential?.ref??""),[k,L]=M.useState(""),[z,D]=M.useState(!1),[R,X]=M.useState(null),[G,le]=M.useState(null),[xe,Ce]=M.useState(!1),[Y,fe,De]=jp(f),Qt=m?m.credential!=="none":!1,nt=`credential-ref:${p}`,Xe=N.trim()||nt,Ht=o.credential?.ref===Xe?o.credential:null;M.useEffect(()=>{m&&m.modelSelection==="catalog"&&!m.models.includes(S)&&h(m.models[0]??"")},[p]);const Bt=C=>{if(hs(C)){L(C.trim()),q(""),D(!0);return}q(C)},ht=async()=>{X(null),le(null),Ce(!0);const C=k;L(""),D(!1);try{const Q=Qt?Xe:N.trim(),P={provider:p,model:S,...m?.customEndpoint&&v?{endpoint:v}:{},...Q&&(C||m?.credential==="required"||N.trim())?{credentialRef:Q}:{},...C?{apiKey:C}:{},...Y?{as:Y}:{}},ye=await ee("/models",{method:"POST",body:JSON.stringify(P)});le(ye.stored??{saved:!0}),r()}catch(Q){X(Q)}finally{Ce(!1)}};return n.jsxs(I,{title:"Choose a model (development)",children:[R?n.jsx(he,{error:R}):null,n.jsxs("div",{className:"form-grid",children:[n.jsxs("label",{children:["Provider",n.jsx("select",{className:"input",value:p,onChange:C=>y(C.target.value),"aria-label":"Provider",children:c.map(C=>n.jsxs("option",{value:C.id,children:[C.displayName," (",C.protocol,C.credential==="required"?", needs an API key":C.credential==="optional"?", API key optional":"",")"]},C.id))})]}),n.jsxs("label",{children:["Model",m?.modelSelection==="catalog"?n.jsx("select",{className:"input",value:S,onChange:C=>h(C.target.value),"aria-label":"Model",children:m.models.map(C=>n.jsx("option",{children:C},C))}):n.jsx("input",{className:"input",value:S,onChange:C=>h(C.target.value),placeholder:m?.models[0]??"model id","aria-label":"Model"})]}),m?.customEndpoint&&n.jsxs("label",{children:["Endpoint",n.jsx("input",{className:"input",value:v,onChange:C=>b(C.target.value),placeholder:m.endpoints[0]??"http://localhost:11434/v1","aria-label":"Endpoint"})]}),Qt&&n.jsxs("label",{children:["API key",m?.credential==="optional"?" (optional)":"",n.jsx("input",{className:"input",type:"password",autoComplete:"off",spellCheck:!1,value:k,onChange:C=>L(C.target.value),placeholder:Ht?.present?"Set — leave empty to keep it, or type a new key to replace it":"Paste your API key","aria-label":"API key"})]}),n.jsx(xp,{as:Y,setAs:fe,devUsers:De})]}),z&&n.jsx("div",{className:"ok-box small",children:"This looks like an API key — it will be stored securely, not in configuration."}),Qt&&n.jsxs("p",{className:"muted small",children:["The key is stored on the server in this environment’s custody (",o.credential?.location&&o.credential.source!=="environment"?o.credential.location:"the local encrypted vault","), outside FeltDB, and never shown again. An environment variable ",n.jsx("code",{children:vy(Xe)})," overrides it.",Ht?.present?n.jsxs(n.Fragment,{children:[" ","Currently: ",n.jsx(ms,{credential:Ht})]}):null]}),n.jsxs("details",{className:"schema",children:[n.jsx("summary",{children:"Advanced: credential reference"}),n.jsxs("label",{className:"small",children:["Reference (default ",n.jsx("code",{children:nt}),")",n.jsx("input",{className:"input",value:N,onChange:C=>Bt(C.target.value),placeholder:nt,"aria-label":"Credential reference"})]}),n.jsxs("p",{className:"muted small",children:["A name for where the key is kept, such as ",n.jsx("code",{children:"credential-ref:openai"})," — not the key itself. Configuration stores only this name."]})]}),n.jsxs("div",{className:"row",children:[n.jsx("button",{className:"btn btn-primary",onClick:ht,disabled:xe||!p||!S,children:xe?"Saving…":"Save for this environment"}),G&&n.jsxs("span",{className:"muted small",children:["Saved.",G.version?` API key: set (${G.location??"custody"}, version ${G.version}).`:""," Use “Test” above to call the model."]})]})]})}function vy(c){return`FELTKIT_CREDENTIAL_${c.replace(/^credential-ref:/,"").replace(/[^A-Za-z0-9]/g,"_").toUpperCase()}`}const py=c=>c==="succeeded"?"ok":c==="failed"?"bad":"warn";function yy(){const{version:c}=qt(),[o,f]=M.useState(0),r=ze(()=>ee("/integrations"),[c,o]),p=ze(()=>ee("/overview"),[c]),{development:y,canAct:m}=fs(p.data),h=(p.data?.devUsers??[])[0]?.id??"",[v,b]=M.useState({}),[N,q]=M.useState(null);if(r.error)return n.jsx(he,{error:r.error,retry:r.reload});if(!r.data)return n.jsx(we,{});const{integrations:k,calls:L}=r.data,z=async R=>{q(null);try{const X=await ee(`/integrations/${encodeURIComponent(R)}/check`,{method:"POST",body:"{}"});b(G=>({...G,[R]:X}))}catch(X){q(X)}},D=async R=>{q(null);try{await ee(`/integrations/calls/${encodeURIComponent(R)}/verify`,{method:"POST",body:JSON.stringify(y?{as:h}:{})}),f(X=>X+1)}catch(X){q(X)}};return n.jsxs(n.Fragment,{children:[n.jsx(At,{title:"Integrations",subtitle:"Existing APIs, published as AppPort capabilities: what each operation does, who may invoke it, whether repeating it is safe, and how its outcome is verified. Seeing an operation grants nothing."}),N?n.jsx(he,{error:N}):null,k.length===0?n.jsxs(Et,{title:"No integrations yet",children:["Connect an API with ",n.jsxs("code",{children:['app.integration("payments", ',"{"," baseUrl, credential, operations ","}",")"]})," in ",n.jsx("code",{children:"feltkit/"}),"."]}):k.map(R=>n.jsxs(I,{title:n.jsxs("span",{className:"row",children:[R.name," ",R.problems.length?n.jsx($,{tone:"bad",children:"not configured"}):n.jsx($,{tone:"ok",children:"configured"})]}),action:m&&R.health?n.jsx("button",{className:"btn",onClick:()=>z(R.name),children:"Check"}):null,children:[R.description&&n.jsx("p",{children:R.description}),n.jsxs("p",{className:"small",children:[n.jsx("span",{className:"mono",children:R.baseUrl.value??"—"})," ",n.jsxs("span",{className:"muted",children:["(",R.baseUrl.source,R.baseUrl.variable?` ${R.baseUrl.variable}`:"",")"]}),R.credential&&n.jsxs(n.Fragment,{children:[" · ",n.jsx("span",{className:"mono",children:R.credential.ref})," ",n.jsx(ms,{credential:R.credential})," ",m&&R.credential.writable&&n.jsx(os,{credentialRef:R.credential.ref,label:R.credential.present?"Replace key":"Set key",...y&&h?{as:h}:{},onSaved:()=>f(X=>X+1)}),!R.credential.writable&&!R.credential.present&&n.jsxs("span",{className:"muted small",children:[" set ",R.credential.variable," on the host"]})]})]}),R.problems.map((X,G)=>n.jsxs("div",{className:"error-box",children:[n.jsx("strong",{children:X.message}),n.jsx("div",{className:"small",children:X.fix})]},G)),v[R.name]&&n.jsx("div",{className:v[R.name].ok?"ok-box":"error-box",children:v[R.name].message}),n.jsx("div",{className:"table-wrap",children:n.jsxs("table",{className:"table",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{children:"Capability"}),n.jsx("th",{children:"Request"}),n.jsx("th",{children:"Effect"}),n.jsx("th",{children:"Who may invoke"}),n.jsx("th",{children:"Repeat"}),n.jsx("th",{children:"Outcome unknown →"})]})}),n.jsx("tbody",{children:R.operations.map(X=>n.jsxs("tr",{children:[n.jsx("td",{className:"mono",children:X.capability}),n.jsxs("td",{className:"mono small",children:[X.method," ",X.path]}),n.jsx("td",{children:X.effect==="consequential"?n.jsx($,{tone:"warn",children:"consequential"}):n.jsx($,{children:"observation"})}),n.jsx("td",{className:"mono small",children:X.access}),n.jsx("td",{className:"small",children:X.effect==="observation"?"safe":X.idempotent?"deduplicated by the API":"may duplicate"}),n.jsx("td",{className:"small",children:X.effect==="observation"?"—":X.verifiable?"verify, never re-send":"a person settles it"})]},X.capability))})]})})]},R.name)),n.jsxs(I,{title:"Calls",children:[L.length===0?n.jsx("p",{className:"muted small",children:"No calls yet."}):n.jsx("div",{className:"table-wrap",children:n.jsxs("table",{className:"table",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{children:"Capability"}),n.jsx("th",{children:"State"}),n.jsx("th",{children:"How known"}),n.jsx("th",{children:"As"}),n.jsx("th",{children:"HTTP"}),n.jsx("th",{children:"Detail"}),n.jsx("th",{children:"When"}),n.jsx("th",{})]})}),n.jsx("tbody",{children:L.map(R=>n.jsxs("tr",{children:[n.jsx("td",{className:"mono small",children:R.capability}),n.jsx("td",{children:n.jsx($,{tone:py(R.state),children:R.state==="started"?"unknown (no outcome recorded)":R.state})}),n.jsxs("td",{className:"small",children:[R.determinedBy??"—",R.verification?` (${R.verification.outcome})`:""]}),n.jsx("td",{className:"mono small",children:R.principal.id}),n.jsx("td",{children:R.status??""}),n.jsx("td",{className:"small error-text",children:R.error?.message??""}),n.jsx("td",{className:"muted small",children:Ke(R.startedAt)}),n.jsx("td",{children:m&&(R.state==="unknown"||R.state==="started")&&n.jsx("button",{className:"btn btn-small",onClick:()=>D(R.id),disabled:y&&!h,children:"Verify"})})]},R.id))})]})}),n.jsx("p",{className:"muted small",children:"A call is recorded before it is sent. “Verify” reads the API’s own state through the declared probe; it never sends the request again."})]})]})}const mh={pass:"ok",fail:"bad",warn:"warn",external:"neutral"},vh={pass:"verified",fail:"fails",warn:"review",external:"outside FeltKit"};function jy(){const{version:c}=qt(),o=ze(()=>ee("/readiness"),[c]);if(o.error)return n.jsx(he,{error:o.error,retry:o.reload});if(!o.data)return n.jsx(we,{label:"Checking this environment"});const f=o.data,r=[...new Set(f.checks.map(p=>p.area))];return n.jsxs(n.Fragment,{children:[n.jsx(At,{title:"Readiness",subtitle:"Real checks of this environment, not a status anyone sets. Passing checks mean the checked things are in place; the operational requirements at the end are yours to meet.",actions:n.jsx("button",{className:"btn",onClick:o.reload,children:"Check again"})}),n.jsxs(I,{children:[n.jsx("p",{children:n.jsx("strong",{children:f.summary})}),n.jsx("div",{className:"row",children:["fail","warn","pass","external"].map(p=>n.jsxs($,{tone:mh[p],children:[f.counts[p]," ",vh[p]]},p))}),n.jsxs("p",{className:"muted small",children:["The same report: ",n.jsxs("code",{children:["npx feltkit readiness --env ",f.environment.name]}),"."]})]}),r.map(p=>n.jsx(I,{title:p,children:n.jsx("ul",{className:"checks",children:f.checks.filter(y=>y.area===p).map(y=>n.jsxs("li",{className:"check",children:[n.jsx($,{tone:mh[y.status],children:vh[y.status]})," ",n.jsx("strong",{children:y.title}),n.jsx("div",{className:"small",children:y.detail}),y.fix&&y.status!=="pass"&&n.jsxs("div",{className:"small muted",children:["→ ",y.fix]})]},y.id))})},p))]})}const xy=new Set(["service_effect_evidence"]),wh=M.createContext({live:!1,version:0,changed:{},activity:[],overview:void 0,reloadOverview(){}}),qt=()=>M.useContext(wh),Zu=[{id:"overview",label:"Overview",key:"1"},{id:"data",label:"Data",key:"2"},{id:"capabilities",label:"Capabilities",key:"3"},{id:"services",label:"Services",key:"4"},{id:"agent",label:"Agent",key:"5"},{id:"models",label:"Models",key:"m"},{id:"integrations",label:"Integrations",key:"i"},{id:"readiness",label:"Readiness",key:"r"},{id:"activity",label:"Activity",key:"6"},{id:"settings",label:"Settings",key:"7"},{id:"projects",label:"Projects",key:"8"}],ph=["data","settings","projects"];function yh(){const c=location.hash.replace(/^#\/?/,"").split("/").filter(Boolean).map(decodeURIComponent);return{route:Zu.find(f=>f.id===c[0])?.id??"overview",rest:c.slice(1)}}function lt(c){location.hash=`#/${c}`}const by={overview:n.jsx("path",{d:"M3 10.5 10 4l7 6.5V17a1 1 0 0 1-1 1h-4v-5H8v5H4a1 1 0 0 1-1-1z"}),data:n.jsxs(n.Fragment,{children:[n.jsx("ellipse",{cx:"10",cy:"5",rx:"6.5",ry:"2.5"}),n.jsx("path",{d:"M3.5 5v10c0 1.4 2.9 2.5 6.5 2.5s6.5-1.1 6.5-2.5V5M3.5 10c0 1.4 2.9 2.5 6.5 2.5s6.5-1.1 6.5-2.5"})]}),capabilities:n.jsx("path",{d:"M7 3h6v4l3 3-3 3v4H7v-4l-3-3 3-3z"}),models:n.jsx("path",{d:"M10 3a4 4 0 0 1 4 4v1a3 3 0 0 1 0 6v1a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2v-1a3 3 0 0 1 0-6V7a4 4 0 0 1 4-4zM8 10h.01M12 10h.01"}),integrations:n.jsx("path",{d:"M7 7h-2a3 3 0 0 0 0 6h2M13 7h2a3 3 0 0 1 0 6h-2M7 10h6"}),readiness:n.jsx("path",{d:"M4 10.5 8 14.5 16 5.5"}),services:n.jsxs(n.Fragment,{children:[n.jsx("rect",{x:"3",y:"3",width:"6",height:"6",rx:"1.5"}),n.jsx("rect",{x:"11",y:"3",width:"6",height:"6",rx:"1.5"}),n.jsx("rect",{x:"3",y:"11",width:"6",height:"6",rx:"1.5"}),n.jsx("rect",{x:"11",y:"11",width:"6",height:"6",rx:"1.5"})]}),agent:n.jsx("path",{d:"M10 3a3 3 0 0 1 3 3v1h1.5A1.5 1.5 0 0 1 16 8.5v6a1.5 1.5 0 0 1-1.5 1.5h-9A1.5 1.5 0 0 1 4 14.5v-6A1.5 1.5 0 0 1 5.5 7H7V6a3 3 0 0 1 3-3zM8 11h.01M12 11h.01M8 14h4"}),activity:n.jsx("path",{d:"M2 10h4l2-5 4 10 2-5h4"}),settings:n.jsxs(n.Fragment,{children:[n.jsx("circle",{cx:"10",cy:"10",r:"2.5"}),n.jsx("path",{d:"M10 2.5v2M10 15.5v2M2.5 10h2M15.5 10h2M4.7 4.7l1.4 1.4M13.9 13.9l1.4 1.4M4.7 15.3l1.4-1.4M13.9 6.1l1.4-1.4"})]}),projects:n.jsx(n.Fragment,{children:n.jsx("path",{d:"M3 6.5A1.5 1.5 0 0 1 4.5 5H8l1.5 2h6A1.5 1.5 0 0 1 17 8.5v6A1.5 1.5 0 0 1 15.5 16h-11A1.5 1.5 0 0 1 3 14.5z"})})};function gy({route:c}){return n.jsx("svg",{viewBox:"0 0 20 20",width:"18",height:"18",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:by[c]})}function Sy(){const[c,o]=M.useState("loading"),[f,r]=M.useState("");return M.useEffect(()=>{fetch("/api/session",{credentials:"same-origin"}).then(p=>p.json()).then(p=>{r(p?.environment?.name??""),o(p?.environment?.production?"production":"development")}).catch(()=>o("development"))},[]),c==="loading"?n.jsx(we,{label:"Connecting"}):c==="production"?n.jsx(Ny,{environment:f}):n.jsx(Ay,{})}function Ny({environment:c}){const[o,f]=M.useState("checking"),[r,p]=M.useState(null),y=m=>{m?.operator&&m?.csrf?(Yu({csrf:m.csrf,environment:c}),f("signed-in")):(Yu(null),f("signed-out"))};return M.useEffect(()=>{ee("/operator/session").then(y,()=>f("signed-out"))},[]),o==="checking"?n.jsx(we,{label:"Checking your operator session"}):o==="signed-in"?n.jsx(qh,{onSignOut:()=>{ee("/operator/signout",{method:"POST",body:"{}"}).catch(()=>{}).finally(()=>(Yu(null),f("signed-out")))}}):n.jsx(Ey,{environment:c,...r?{error:r}:{},onGrant:async m=>{p(null);try{const S=await fetch("/_feltkit/api/operator/signin",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json","x-feltkit-environment":c},body:JSON.stringify({grant:m})}),h=await S.json();if(!S.ok)throw new Error(h?.error?.message??`Sign-in failed (${S.status})`);y(h)}catch(S){p(S.message)}}})}function Ey({environment:c,onGrant:o,error:f}){const[r,p]=M.useState("");return n.jsx("div",{className:"gate",children:n.jsxs("div",{className:"gate-card",children:[n.jsx($u,{}),n.jsxs("h1",{children:["Sign in to ",c," Studio"]}),n.jsxs("p",{className:"muted",children:["Production Studio is for operators. On the host, run ",n.jsx("code",{children:"feltkit operator grant --id <you> --role <role>"})," and paste the one-time grant here. Everything you do is authorized and recorded as you."]}),f&&n.jsx("p",{className:"error-text",children:f}),n.jsxs("form",{onSubmit:y=>{y.preventDefault(),r.trim()&&o(r.trim())},className:"row",children:[n.jsx("input",{className:"input grow",value:r,onChange:y=>p(y.target.value),placeholder:"fkg1.…","aria-label":"Operator grant",autoFocus:!0}),n.jsx("button",{className:"btn btn-primary",type:"submit",children:"Sign in"})]})]})})}function Ay(){const[c,o]=M.useState(()=>{const p=pp();return ku(p),p}),[f,r]=M.useState(!1);return c?n.jsx(qh,{onSignOut:p=>(ku(null),rh(null),r(!!p),o(null))}):n.jsx(Ty,{...f?{error:"That admin token was not accepted. A new one is generated if .feltkit/<env>/admin-token is deleted."}:{},onToken:p=>(ku(p),rh(p),r(!1),o(p))})}function Ty({onToken:c,error:o}){const[f,r]=M.useState("");return n.jsx("div",{className:"gate",children:n.jsxs("div",{className:"gate-card",children:[n.jsx($u,{}),n.jsx("h1",{children:"Open the FeltKit dashboard"}),n.jsxs("p",{className:"muted",children:["The dashboard needs this environment’s admin token. Use the ",n.jsx("strong",{children:"Dashboard"})," link that ",n.jsx("code",{children:"feltkit dev"})," prints — it contains the token — or paste the token from ",n.jsx("code",{children:".feltkit/development/admin-token"}),"."]}),o&&n.jsx("p",{className:"error-text",children:o}),n.jsxs("form",{onSubmit:p=>{p.preventDefault(),f.trim()&&c(f.trim())},className:"row",children:[n.jsx("input",{className:"input grow",value:f,onChange:p=>r(p.target.value),placeholder:"fka_…","aria-label":"Admin token",autoFocus:!0}),n.jsx("button",{className:"btn btn-primary",type:"submit",children:"Continue"})]})]})})}function $u(){return n.jsx("span",{className:"logo","aria-label":"FeltKit",children:n.jsxs("svg",{viewBox:"0 0 32 32",width:"26",height:"26","aria-hidden":!0,children:[n.jsx("rect",{width:"32",height:"32",rx:"8",fill:"var(--logo-bg)"}),n.jsx("path",{d:"M11 7c-4 5-4 13 0 18M21 7c4 5 4 13 0 18",stroke:"var(--logo-fg)",strokeWidth:"3",fill:"none",strokeLinecap:"round"})]})})}function qh({onSignOut:c}){const[{route:o,rest:f},r]=M.useState(yh),[p,y]=M.useState(!1),[m,S]=M.useState(0),[h,v]=M.useState({}),[b,N]=M.useState([]),q=ze(()=>ee("/overview"),[m]),k=M.useRef(null);M.useEffect(()=>{const X=()=>r(yh());return window.addEventListener("hashchange",X),()=>window.removeEventListener("hashchange",X)},[]),M.useEffect(()=>yp((X,G)=>{X==="activity"&&N(le=>[G,...le].slice(0,200)),!(X==="change"&&(v(le=>{const xe={...le};for(const Ce of G.collections)xe[Ce]=(xe[Ce]??0)+1;return xe}),G.collections.every(le=>xy.has(le))))&&k.current===null&&(k.current=window.setTimeout(()=>{k.current=null,S(le=>le+1)},250))},y),[]),M.useEffect(()=>{const X=G=>{const le=G.target;if(G.metaKey||G.ctrlKey||G.altKey||["INPUT","TEXTAREA","SELECT"].includes(le.tagName)||le.isContentEditable)return;const xe=Zu.find(Ce=>Ce.key===G.key);xe&&lt(xe.id)};return window.addEventListener("keydown",X),()=>window.removeEventListener("keydown",X)},[]);const L=M.useMemo(()=>({live:p,version:m,changed:h,activity:b,overview:q.data,reloadOverview:q.reload}),[p,m,h,b,q.data,q.reload]),z=q.error?.status===401;M.useEffect(()=>{z&&c(!0)},[z,c]);const D=q.data,R=D?.environment?.production;return n.jsx(wh.Provider,{value:L,children:n.jsxs("div",{className:"app",children:[n.jsxs("nav",{className:"nav","aria-label":"Dashboard",children:[n.jsxs("div",{className:"nav-brand",children:[n.jsx($u,{}),n.jsxs("div",{children:[n.jsx("div",{className:"nav-app",children:D?.application?.name??"…"}),n.jsx("div",{className:"nav-sub",children:"FeltKit"})]})]}),n.jsx("ul",{children:Zu.filter(X=>!R||!ph.includes(X.id)).map(X=>{const G=o===X.id&&!(X.id==="services"&&f[0]);return n.jsxs("li",{children:[n.jsxs("a",{href:`#/${X.id}`,className:G?"active":o===X.id?"within":"","aria-current":G?"page":void 0,children:[n.jsx(gy,{route:X.id}),n.jsx("span",{children:X.label}),n.jsx("kbd",{children:X.key})]}),X.id==="services"&&n.jsx(zy,{services:D?.services??[],current:o==="services"?f[0]:void 0})]},X.id)})}),n.jsxs("div",{className:"nav-foot",children:[n.jsxs("div",{className:`live ${p?"on":""}`,children:[n.jsx("span",{className:"dot"})," ",p?"Live":"Reconnecting"]}),n.jsx("button",{className:"btn btn-ghost btn-small",onClick:()=>c(),title:D?.operator?"Sign out of production Studio":"Forget the admin token in this tab",children:D?.operator?"Sign out":"Lock"})]})]}),n.jsxs("div",{className:"content",children:[D&&n.jsxs("div",{className:`envbar ${R?"envbar-prod":""}`,children:[n.jsx("span",{className:"envname",children:D.environment.name}),n.jsxs("span",{className:"muted",children:["FeltDB ",D.instance.feltdbVersion," · ",D.instance.mode," · "]}),n.jsx("code",{className:"path",title:D.instance.location,children:D.instance.location}),R?n.jsxs("span",{className:"envwarn",children:["Production · signed in as ",n.jsx("strong",{children:D.operator?.principal?.id})," (",(D.operator?.principal?.roles??[]).join(", "),") · actions run on this environment only"]}):n.jsx("span",{className:"muted",children:"Development tools enabled"})]}),n.jsx("main",{className:"page",children:q.loading&&!D?n.jsx(we,{label:"Connecting to the runtime"}):D?n.jsx(Cy,{route:R&&ph.includes(o)?"overview":o,rest:f}):n.jsxs("div",{className:"error-box",children:["The runtime did not answer: ",q.error?.message]})})]})]})})}const jh={configured:"ok",unconfigured:"warn",unhealthy:"bad",unavailable:"bad",available:"off"},xh="feltkit.nav.services";function zy({services:c,current:o}){const[f,r]=M.useState(()=>{try{return localStorage.getItem(xh)!=="closed"}catch{return!0}}),p=()=>{r(!f);try{localStorage.setItem(xh,f?"closed":"open")}catch{}};if(!c.length)return null;const y=c.filter(h=>h.state!=="available"&&h.state!=="unavailable"),m=c.filter(h=>h.state==="available"||h.state==="unavailable"),S=(h,v,b)=>n.jsx("li",{children:n.jsxs("a",{href:`#/services/${h}`,className:o===h?"active":"","aria-current":o===h?"page":void 0,children:[n.jsx("span",{className:`nav-dot nav-dot-${b??"none"}`,"aria-hidden":!0}),n.jsx("span",{children:v})]})},h);return n.jsxs(n.Fragment,{children:[n.jsx("button",{className:"nav-toggle",onClick:p,"aria-expanded":f||!!o,"aria-label":f?"Hide services":"Show services",children:f||o?"▾":"▸"}),(f||o)&&n.jsxs("ul",{className:"nav-children","aria-label":"Services",children:[y.map(h=>S(h.id,h.name,jh[h.state])),S("credentials","Credentials"),m.length>0&&n.jsx("li",{className:"nav-group",children:"Not enabled"}),m.map(h=>S(h.id,h.name,jh[h.state]))]})]})}function Cy({route:c,rest:o}){switch(c){case"data":return n.jsx(Zp,{collection:o[0]});case"capabilities":return n.jsx(Pp,{selected:o[0]});case"services":return n.jsx(kp,{page:o[0]});case"agent":return n.jsx(ry,{rest:o});case"models":return n.jsx(hy,{});case"integrations":return n.jsx(yy,{});case"readiness":return n.jsx(jy,{});case"activity":return n.jsx(ny,{selected:o[0]});case"settings":return n.jsx(sy,{});case"projects":return n.jsx(uy,{});default:return n.jsx(Vp,{})}}function At({title:c,subtitle:o,actions:f}){return n.jsxs("header",{className:"page-header",children:[n.jsxs("div",{children:[n.jsx("h1",{children:c}),o&&n.jsx("p",{className:"muted",children:o})]}),f&&n.jsx("div",{className:"actions",children:f})]})}vp.createRoot(document.getElementById("root")).render(n.jsx(M.StrictMode,{children:n.jsx(Sy,{})}));