@feltdb/feltkit 0.3.29 → 0.3.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.d.ts +74 -2
- package/dist/app.js +95 -1
- package/dist/app.js.map +1 -1
- package/dist/appboundry/build.js.map +1 -1
- package/dist/appboundry/guest-tenancy.d.ts +2 -2
- package/dist/appboundry/guest-tenancy.js.map +1 -1
- package/dist/appboundry/guest.js +4 -1
- package/dist/appboundry/guest.js.map +1 -1
- package/dist/appboundry/host.js +3 -0
- package/dist/appboundry/host.js.map +1 -1
- package/dist/authorize.d.ts +23 -1
- package/dist/authorize.js +37 -0
- package/dist/authorize.js.map +1 -1
- package/dist/cli/deploy-appboundry.d.ts +1 -1
- package/dist/cli/deploy-appboundry.js.map +1 -1
- package/dist/cli/deploy.js.map +1 -1
- package/dist/cli/main.js +27 -1
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/skills.js.map +1 -1
- package/dist/client/index.js.map +1 -1
- package/dist/dashboard/assets/index-9rMS3yBm.js +15 -0
- package/dist/dashboard/assets/index-DkiYTUMR.css +1 -0
- package/dist/dashboard/index.html +2 -2
- package/dist/docs.d.ts +1 -1
- package/dist/docs.js +3 -0
- package/dist/docs.js.map +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/event-stage.js.map +1 -1
- package/dist/execution.d.ts +186 -0
- package/dist/execution.js +105 -0
- package/dist/execution.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/measure/index.js.map +1 -1
- package/dist/platform/approvals.js.map +1 -1
- package/dist/platform/artifacts.js.map +1 -1
- package/dist/platform/changes.d.ts +54 -54
- package/dist/platform/changes.js.map +1 -1
- package/dist/platform/deployments.d.ts +32 -32
- package/dist/platform/exec.js.map +1 -1
- package/dist/platform/platform.js.map +1 -1
- package/dist/platform/releases.js.map +1 -1
- package/dist/platform/server.js.map +1 -1
- package/dist/platform/workspaces.js.map +1 -1
- package/dist/react/auth.d.ts +10 -10
- package/dist/react/auth.js +1 -1
- package/dist/react/auth.js.map +1 -1
- package/dist/react/context.d.ts +1 -1
- package/dist/react/index.js.map +1 -1
- package/dist/runtime/accounts.js.map +1 -1
- package/dist/runtime/activity.d.ts +1 -1
- package/dist/runtime/activity.js.map +1 -1
- package/dist/runtime/agent.d.ts +3 -3
- package/dist/runtime/agent.js +9 -3
- package/dist/runtime/agent.js.map +1 -1
- package/dist/runtime/application-authority.d.ts +13 -2
- package/dist/runtime/application-authority.js +18 -6
- package/dist/runtime/application-authority.js.map +1 -1
- package/dist/runtime/audit.js.map +1 -1
- package/dist/runtime/authboundry.d.ts +17 -0
- package/dist/runtime/authboundry.js +8 -1
- package/dist/runtime/authboundry.js.map +1 -1
- package/dist/runtime/authority.d.ts +10 -0
- package/dist/runtime/authority.js +17 -0
- package/dist/runtime/authority.js.map +1 -1
- package/dist/runtime/backup-environment.js.map +1 -1
- package/dist/runtime/backup.js.map +1 -1
- package/dist/runtime/changes.js.map +1 -1
- package/dist/runtime/claims.js.map +1 -1
- package/dist/runtime/collections.js.map +1 -1
- package/dist/runtime/content.d.ts +27 -2
- package/dist/runtime/content.js +55 -5
- package/dist/runtime/content.js.map +1 -1
- package/dist/runtime/context.d.ts +153 -0
- package/dist/runtime/contract.js +5 -1
- package/dist/runtime/contract.js.map +1 -1
- package/dist/runtime/credentials.d.ts +31 -2
- package/dist/runtime/credentials.js +55 -3
- package/dist/runtime/credentials.js.map +1 -1
- package/dist/runtime/crypto-token.js.map +1 -1
- package/dist/runtime/data.js.map +1 -1
- package/dist/runtime/decisions.js.map +1 -1
- package/dist/runtime/deployment.js.map +1 -1
- package/dist/runtime/execution-host.d.ts +54 -0
- package/dist/runtime/execution-host.js +54 -0
- package/dist/runtime/execution-host.js.map +1 -0
- package/dist/runtime/generation.js.map +1 -1
- package/dist/runtime/instance.js.map +1 -1
- package/dist/runtime/integrations.d.ts +8 -6
- package/dist/runtime/integrations.js +48 -5
- package/dist/runtime/integrations.js.map +1 -1
- package/dist/runtime/invocations.d.ts +313 -0
- package/dist/runtime/invocations.js +493 -0
- package/dist/runtime/invocations.js.map +1 -0
- package/dist/runtime/loader.js.map +1 -1
- package/dist/runtime/local-authority.d.ts +50 -0
- package/dist/runtime/local-authority.js +214 -0
- package/dist/runtime/local-authority.js.map +1 -0
- package/dist/runtime/oauth-credentials.d.ts +40 -3
- package/dist/runtime/oauth-credentials.js +133 -25
- package/dist/runtime/oauth-credentials.js.map +1 -1
- package/dist/runtime/outbox.js +3 -0
- package/dist/runtime/outbox.js.map +1 -1
- package/dist/runtime/projects.d.ts +1 -1
- package/dist/runtime/readiness.js +11 -0
- package/dist/runtime/readiness.js.map +1 -1
- package/dist/runtime/runtime.d.ts +48 -5
- package/dist/runtime/runtime.js +139 -17
- package/dist/runtime/runtime.js.map +1 -1
- package/dist/runtime/services.d.ts +37 -0
- package/dist/runtime/services.js +191 -3
- package/dist/runtime/services.js.map +1 -1
- package/dist/runtime/sessions.js.map +1 -1
- package/dist/runtime/state-contract.js.map +1 -1
- package/dist/runtime/storage-check.js.map +1 -1
- package/dist/runtime/targets.d.ts +1 -1
- package/dist/runtime/tenancy.js.map +1 -1
- package/dist/runtime/transactions.d.ts +15 -0
- package/dist/runtime/transactions.js +5 -0
- package/dist/runtime/transactions.js.map +1 -1
- package/dist/schema.js.map +1 -1
- package/dist/server/admin.d.ts +51 -51
- package/dist/server/admin.js +11 -0
- package/dist/server/admin.js.map +1 -1
- package/dist/server/components.js.map +1 -1
- package/dist/server/index.js +39 -0
- package/dist/server/index.js.map +1 -1
- package/dist/server/management.js.map +1 -1
- package/dist/server/mcp.d.ts +59 -37
- package/dist/server/mcp.js +24 -1
- package/dist/server/mcp.js.map +1 -1
- package/dist/server/operators.js.map +1 -1
- package/dist/server/ports.d.ts +7 -0
- package/dist/server/ports.js +17 -0
- package/dist/server/ports.js.map +1 -1
- package/dist/server/production.js.map +1 -1
- package/dist/server/project.js.map +1 -1
- package/dist/server/session-http.js.map +1 -1
- package/dist/server/tenancy.js.map +1 -1
- package/dist/surfaces.d.ts +153 -0
- package/dist/surfaces.js +228 -0
- package/dist/surfaces.js.map +1 -0
- package/dist/testing/index.js.map +1 -1
- package/docs/CONNECTIONS.md +151 -0
- package/docs/EXECUTION.md +271 -0
- package/docs/GUARANTEES.md +54 -2
- package/docs/INVOCATIONS.md +170 -0
- package/docs/README.md +5 -2
- package/package.json +19 -15
- package/skills/.claude-plugin/marketplace.json +1 -1
- package/skills/.claude-plugin/plugin.json +1 -1
- package/skills/feltkit-services/SKILL.md +1 -1
- package/dist/dashboard/assets/index-BehzsQOa.css +0 -1
- package/dist/dashboard/assets/index-UuZ63NA6.js +0 -15
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
(function(){const u=document.createElement("link").relList;if(u&&u.supports&&u.supports("modulepreload"))return;for(const h of document.querySelectorAll('link[rel="modulepreload"]'))r(h);new MutationObserver(h=>{for(const f of h)if(f.type==="childList")for(const b of f.addedNodes)b.tagName==="LINK"&&b.rel==="modulepreload"&&r(b)}).observe(document,{childList:!0,subtree:!0});function o(h){const f={};return h.integrity&&(f.integrity=h.integrity),h.referrerPolicy&&(f.referrerPolicy=h.referrerPolicy),h.crossOrigin==="use-credentials"?f.credentials="include":h.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function r(h){if(h.ep)return;h.ep=!0;const f=o(h);fetch(h.href,f)}})();var Fo={exports:{}},ds={};var ay;function h0(){if(ay)return ds;ay=1;var n=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function o(r,h,f){var b=null;if(f!==void 0&&(b=""+f),h.key!==void 0&&(b=""+h.key),"key"in h){f={};for(var v in h)v!=="key"&&(f[v]=h[v])}else f=h;return h=f.ref,{$$typeof:n,type:r,key:b,ref:h!==void 0?h:null,props:f}}return ds.Fragment=u,ds.jsx=o,ds.jsxs=o,ds}var ny;function m0(){return ny||(ny=1,Fo.exports=h0()),Fo.exports}var s=m0(),Io={exports:{}},ye={};var iy;function v0(){if(iy)return ye;iy=1;var n=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),b=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),x=Symbol.for("react.view_transition"),A=Symbol.iterator;function q(T){return T===null||typeof T!="object"?null:(T=A&&T[A]||T["@@iterator"],typeof T=="function"?T:null)}var z={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,E={};function $(T,G,V){this.props=T,this.context=G,this.refs=E,this.updater=V||z}$.prototype.isReactComponent={},$.prototype.setState=function(T,G){if(typeof T!="object"&&typeof T!="function"&&T!=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,T,G,"setState")},$.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function W(){}W.prototype=$.prototype;function Z(T,G,V){this.props=T,this.context=G,this.refs=E,this.updater=V||z}var F=Z.prototype=new W;F.constructor=Z,k(F,$.prototype),F.isPureReactComponent=!0;var re=Array.isArray;function ee(){}var B={H:null,A:null,T:null,S:null},ue=Object.prototype.hasOwnProperty;function J(T,G,V){var K=V.ref;return{$$typeof:n,type:T,key:G,ref:K!==void 0?K:null,props:V}}function _e(T,G){return J(T.type,G,T.props)}function Be(T){return typeof T=="object"&&T!==null&&T.$$typeof===n}function mt(T){var G={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(V){return G[V]})}var gt=/\/+/g;function Xe(T,G){return typeof T=="object"&&T!==null&&T.key!=null?mt(""+T.key):G.toString(36)}function Y(T){switch(T.status){case"fulfilled":return T.value;case"rejected":throw T.reason;default:switch(typeof T.status=="string"?T.then(ee,ee):(T.status="pending",T.then(function(G){T.status==="pending"&&(T.status="fulfilled",T.value=G)},function(G){T.status==="pending"&&(T.status="rejected",T.reason=G)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function P(T,G,V,K,ce){var be=typeof T;(be==="undefined"||be==="boolean")&&(T=null);var Ae=!1;if(T===null)Ae=!0;else switch(be){case"bigint":case"string":case"number":Ae=!0;break;case"object":switch(T.$$typeof){case n:case u:Ae=!0;break;case j:return Ae=T._init,P(Ae(T._payload),G,V,K,ce)}}if(Ae)return ce=ce(T),Ae=K===""?"."+Xe(T,0):K,re(ce)?(V="",Ae!=null&&(V=Ae.replace(gt,"$&/")+"/"),P(ce,G,V,"",function(ve){return ve})):ce!=null&&(Be(ce)&&(ce=_e(ce,V+(ce.key==null||T&&T.key===ce.key?"":(""+ce.key).replace(gt,"$&/")+"/")+Ae)),G.push(ce)),1;Ae=0;var ae=K===""?".":K+":";if(re(T))for(var Q=0;Q<T.length;Q++)K=T[Q],be=ae+Xe(K,Q),Ae+=P(K,G,V,be,ce);else if(Q=q(T),typeof Q=="function")for(T=Q.call(T),Q=0;!(K=T.next()).done;)K=K.value,be=ae+Xe(K,Q++),Ae+=P(K,G,V,be,ce);else if(be==="object"){if(typeof T.then=="function")return P(Y(T),G,V,K,ce);throw G=String(T),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return Ae}function ne(T,G,V){if(T==null)return T;var K=[],ce=0;return P(T,K,"","",function(be){return G.call(V,be,ce++)}),K}function je(T){if(T._status===-1){var G=T._result,V=G();V.then(function(K){(T._status===0||T._status===-1)&&(T._status=1,T._result=K,V.status===void 0&&(V.status="fulfilled",V.value=K))},function(K){(T._status===0||T._status===-1)&&(T._status=2,T._result=K,V.status===void 0&&(V.status="rejected",V.reason=K))}),T._status===-1&&(T._status=0,T._result=V)}if(T._status===1)return T._result.default;throw T._result}var ke=typeof reportError=="function"?reportError:function(T){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof T=="object"&&T!==null&&typeof T.message=="string"?String(T.message):String(T),error:T});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",T);return}console.error(T)};function ct(T){var G=B.T,V={};V.types=G!==null?G.types:null,B.T=V;try{var K=T(),ce=B.S;ce!==null&&ce(V,K),typeof K=="object"&&K!==null&&typeof K.then=="function"&&K.then(ee,ke)}catch(be){ke(be)}finally{G!==null&&V.types!==null&&(G.types=V.types),B.T=G}}function ut(T){var G=B.T;if(G!==null){var V=G.types;V===null?G.types=[T]:V.indexOf(T)===-1&&V.push(T)}else ct(ut.bind(null,T))}var Al={map:ne,forEach:function(T,G,V){ne(T,function(){G.apply(this,arguments)},V)},count:function(T){var G=0;return ne(T,function(){G++}),G},toArray:function(T){return ne(T,function(G){return G})||[]},only:function(T){if(!Be(T))throw Error("React.Children.only expected to receive a single React element child.");return T}};return ye.Activity=g,ye.Children=Al,ye.Component=$,ye.Fragment=o,ye.Profiler=h,ye.PureComponent=Z,ye.StrictMode=r,ye.Suspense=m,ye.ViewTransition=x,ye.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=B,ye.__COMPILER_RUNTIME={__proto__:null,c:function(T){return B.H.useMemoCache(T)}},ye.addTransitionType=ut,ye.cache=function(T){return function(){return T.apply(null,arguments)}},ye.cacheSignal=function(){return null},ye.cloneElement=function(T,G,V){if(T==null)throw Error("The argument must be a React element, but you passed "+T+".");var K=k({},T.props),ce=T.key;if(G!=null)for(be in G.key!==void 0&&(ce=""+G.key),G)!ue.call(G,be)||be==="key"||be==="__self"||be==="__source"||be==="ref"&&G.ref===void 0||(K[be]=G[be]);var be=arguments.length-2;if(be===1)K.children=V;else if(1<be){for(var Ae=Array(be),ae=0;ae<be;ae++)Ae[ae]=arguments[ae+2];K.children=Ae}return J(T.type,ce,K)},ye.createContext=function(T){return T={$$typeof:b,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null},T.Provider=T,T.Consumer={$$typeof:f,_context:T},T},ye.createElement=function(T,G,V){var K,ce={},be=null;if(G!=null)for(K in G.key!==void 0&&(be=""+G.key),G)ue.call(G,K)&&K!=="key"&&K!=="__self"&&K!=="__source"&&(ce[K]=G[K]);var Ae=arguments.length-2;if(Ae===1)ce.children=V;else if(1<Ae){for(var ae=Array(Ae),Q=0;Q<Ae;Q++)ae[Q]=arguments[Q+2];ce.children=ae}if(T&&T.defaultProps)for(K in Ae=T.defaultProps,Ae)ce[K]===void 0&&(ce[K]=Ae[K]);return J(T,be,ce)},ye.createRef=function(){return{current:null}},ye.forwardRef=function(T){return{$$typeof:v,render:T}},ye.isValidElement=Be,ye.lazy=function(T){return{$$typeof:j,_payload:{_status:-1,_result:T},_init:je}},ye.memo=function(T,G){return{$$typeof:p,type:T,compare:G===void 0?null:G}},ye.startTransition=ct,ye.unstable_useCacheRefresh=function(){return B.H.useCacheRefresh()},ye.use=function(T){return B.H.use(T)},ye.useActionState=function(T,G,V){return B.H.useActionState(T,G,V)},ye.useCallback=function(T,G){return B.H.useCallback(T,G)},ye.useContext=function(T){return B.H.useContext(T)},ye.useDebugValue=function(){},ye.useDeferredValue=function(T,G){return B.H.useDeferredValue(T,G)},ye.useEffect=function(T,G){return B.H.useEffect(T,G)},ye.useEffectEvent=function(T){return B.H.useEffectEvent(T)},ye.useId=function(){return B.H.useId()},ye.useImperativeHandle=function(T,G,V){return B.H.useImperativeHandle(T,G,V)},ye.useInsertionEffect=function(T,G){return B.H.useInsertionEffect(T,G)},ye.useLayoutEffect=function(T,G){return B.H.useLayoutEffect(T,G)},ye.useMemo=function(T,G){return B.H.useMemo(T,G)},ye.useOptimistic=function(T,G){return B.H.useOptimistic(T,G)},ye.useReducer=function(T,G,V){return B.H.useReducer(T,G,V)},ye.useRef=function(T){return B.H.useRef(T)},ye.useState=function(T){return B.H.useState(T)},ye.useSyncExternalStore=function(T,G,V){return B.H.useSyncExternalStore(T,G,V)},ye.useTransition=function(){return B.H.useTransition()},ye.version="19.3.1",ye}var sy;function bd(){return sy||(sy=1,Io.exports=v0()),Io.exports}var C=bd(),Wo={exports:{}},fs={},Po={exports:{}},ed={};var cy;function y0(){return cy||(cy=1,(function(n){function u(Y,P){var ne=Y.length;Y.push(P);e:for(;0<ne;){var je=ne-1>>>1,ke=Y[je];if(0<h(ke,P))Y[je]=P,Y[ne]=ke,ne=je;else break e}}function o(Y){return Y.length===0?null:Y[0]}function r(Y){if(Y.length===0)return null;var P=Y[0],ne=Y.pop();if(ne!==P){Y[0]=ne;e:for(var je=0,ke=Y.length,ct=ke>>>1;je<ct;){var ut=2*(je+1)-1,Al=Y[ut],T=ut+1,G=Y[T];if(0>h(Al,ne))T<ke&&0>h(G,Al)?(Y[je]=G,Y[T]=ne,je=T):(Y[je]=Al,Y[ut]=ne,je=ut);else if(T<ke&&0>h(G,ne))Y[je]=G,Y[T]=ne,je=T;else break e}}return P}function h(Y,P){var ne=Y.sortIndex-P.sortIndex;return ne!==0?ne:Y.id-P.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;n.unstable_now=function(){return f.now()}}else{var b=Date,v=b.now();n.unstable_now=function(){return b.now()-v}}var m=[],p=[],j=1,g=null,x=3,A=!1,q=!1,z=!1,k=!1,E=typeof setTimeout=="function"?setTimeout:null,$=typeof clearTimeout=="function"?clearTimeout:null,W=typeof setImmediate<"u"?setImmediate:null;function Z(Y){for(var P=o(p);P!==null;){if(P.callback===null)r(p);else if(P.startTime<=Y)r(p),P.sortIndex=P.expirationTime,u(m,P);else break;P=o(p)}}function F(Y){if(z=!1,Z(Y),!q)if(o(m)!==null)q=!0,re||(re=!0,Be());else{var P=o(p);P!==null&&Xe(F,P.startTime-Y)}}var re=!1,ee=-1,B=5,ue=-1;function J(){return k?!0:!(n.unstable_now()-ue<B)}function _e(){if(k=!1,re){var Y=n.unstable_now();ue=Y;var P=!0;try{e:{q=!1,z&&(z=!1,$(ee),ee=-1),A=!0;var ne=x;try{t:{for(Z(Y),g=o(m);g!==null&&!(g.expirationTime>Y&&J());){var je=g.callback;if(typeof je=="function"){g.callback=null,x=g.priorityLevel;var ke=je(g.expirationTime<=Y);if(Y=n.unstable_now(),typeof ke=="function"){g.callback=ke,Z(Y),P=!0;break t}g===o(m)&&r(m),Z(Y)}else r(m);g=o(m)}if(g!==null)P=!0;else{var ct=o(p);ct!==null&&Xe(F,ct.startTime-Y),P=!1}}break e}finally{g=null,x=ne,A=!1}P=void 0}}finally{P?Be():re=!1}}}var Be;if(typeof W=="function")Be=function(){W(_e)};else if(typeof MessageChannel<"u"){var mt=new MessageChannel,gt=mt.port2;mt.port1.onmessage=_e,Be=function(){gt.postMessage(null)}}else Be=function(){E(_e,0)};function Xe(Y,P){ee=E(function(){Y(n.unstable_now())},P)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(Y){Y.callback=null},n.unstable_forceFrameRate=function(Y){0>Y||125<Y?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<Y?Math.floor(1e3/Y):5},n.unstable_getCurrentPriorityLevel=function(){return x},n.unstable_next=function(Y){switch(x){case 1:case 2:case 3:var P=3;break;default:P=x}var ne=x;x=P;try{return Y()}finally{x=ne}},n.unstable_requestPaint=function(){k=!0},n.unstable_runWithPriority=function(Y,P){switch(Y){case 1:case 2:case 3:case 4:case 5:break;default:Y=3}var ne=x;x=Y;try{return P()}finally{x=ne}},n.unstable_scheduleCallback=function(Y,P,ne){var je=n.unstable_now();switch(typeof ne=="object"&&ne!==null?(ne=ne.delay,ne=typeof ne=="number"&&0<ne?je+ne:je):ne=je,Y){case 1:var ke=-1;break;case 2:ke=250;break;case 5:ke=1073741823;break;case 4:ke=1e4;break;default:ke=5e3}return ke=ne+ke,Y={id:j++,callback:P,priorityLevel:Y,startTime:ne,expirationTime:ke,sortIndex:-1},ne>je?(Y.sortIndex=ne,u(p,Y),o(m)===null&&Y===o(p)&&(z?($(ee),ee=-1):z=!0,Xe(F,ne-je))):(Y.sortIndex=ke,u(m,Y),q||A||(q=!0,re||(re=!0,Be()))),Y},n.unstable_shouldYield=J,n.unstable_wrapCallback=function(Y){var P=x;return function(){var ne=x;x=P;try{return Y.apply(this,arguments)}finally{x=ne}}}})(ed)),ed}var uy;function g0(){return uy||(uy=1,Po.exports=y0()),Po.exports}var td={exports:{}},Bt={};var ry;function b0(){if(ry)return Bt;ry=1;var n=bd();function u(j){var g="https://react.dev/errors/"+j;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)g+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+j+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var r={d:{f:o,r:function(){throw Error(u(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},h=Symbol.for("react.portal"),f=Symbol.for("react.recoverable"),b=Symbol.for("react.optimistic_key");function v(j,g,x){var A=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:h,key:A==null?null:A===b?b:""+A,children:j,containerInfo:g,implementation:x}}var m=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(j,g){if(j==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return Bt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Bt.browser=function(j){return{$$typeof:f,_reason:j}},Bt.createPortal=function(j,g){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(u(299));return v(j,g,null,x)},Bt.flushSync=function(j){var g=m.T,x=r.p;try{if(m.T=null,r.p=2,j)return j()}finally{m.T=g,r.p=x,r.d.f()}},Bt.preconnect=function(j,g){typeof j=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,r.d.C(j,g))},Bt.prefetchDNS=function(j){typeof j=="string"&&r.d.D(j)},Bt.preinit=function(j,g){if(typeof j=="string"&&g&&typeof g.as=="string"){var x=g.as,A=p(x,g.crossOrigin),q=typeof g.integrity=="string"?g.integrity:void 0,z=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;x==="style"?r.d.S(j,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:A,integrity:q,fetchPriority:z}):x==="script"&&r.d.X(j,{crossOrigin:A,integrity:q,fetchPriority:z,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},Bt.preinitModule=function(j,g){if(typeof j=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var x=p(g.as,g.crossOrigin);r.d.M(j,{crossOrigin:x,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0})}}else g==null&&r.d.M(j)},Bt.preload=function(j,g){if(typeof j=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var x=g.as,A=p(x,g.crossOrigin);r.d.L(j,x,{crossOrigin:A,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},Bt.preloadModule=function(j,g){if(typeof j=="string")if(g){var x=p(g.as,g.crossOrigin);r.d.m(j,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:x,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0})}else r.d.m(j)},Bt.requestFormReset=function(j){r.d.r(j)},Bt.unstable_batchedUpdates=function(j,g){return j(g)},Bt.useFormState=function(j,g,x){return m.H.useFormState(j,g,x)},Bt.useFormStatus=function(){return m.H.useHostTransitionStatus()},Bt.version="19.3.1",Bt}var oy;function p0(){if(oy)return td.exports;oy=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(u){console.error(u)}}return n(),td.exports=b0(),td.exports}var dy;function x0(){if(dy)return fs;dy=1;var n=g0(),u=bd(),o=p0();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 h(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){for(var t=e,l=t;l&&!l.alternate;)t=l,(t.flags&4098)!==0&&(e=t.return),l=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function b(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 v(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 m(e){if(f(e)!==e)throw Error(r(188))}function p(e){var t=e.alternate;if(!t){if(t=f(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 c=i.alternate;if(c===null){if(a=i.return,a!==null){l=a;continue}break}if(i.child===c.child){for(c=i.child;c;){if(c===l)return m(i),e;if(c===a)return m(i),t;c=c.sibling}throw Error(r(188))}if(l.return!==a.return)l=i,a=c;else{for(var d=!1,y=i.child;y;){if(y===l){d=!0,l=i,a=c;break}if(y===a){d=!0,a=i,l=c;break}y=y.sibling}if(!d){for(y=c.child;y;){if(y===l){d=!0,l=c,a=i;break}if(y===a){d=!0,a=c,l=i;break}y=y.sibling}if(!d)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 j(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=j(e),t!==null)return t;e=e.sibling}return null}function g(e,t,l,a,i,c){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&l(e,a,i,c)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&g(e.child,t,l,a,i,c))return!0;e=e.sibling}return!1}function x(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function A(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),!(e.tag===3||e.tag===5||e.tag===27));)e=e.return;return t}function q(e){var t=[null,null],l=x(e);return l===null||z(t,e,l.child,{foundSelf:!1}),t}function z(e,t,l,a){for(;l!==null;){if(l===t)a.foundSelf=!0;else if(l.tag===5||l.tag===27||l.tag===6){if(a.foundSelf)return e[1]=l,!0;e[0]=l}else if((l.tag!==22||l.memoizedState===null)&&z(e,t,l.child,a))return!0;l=l.sibling}return!1}function k(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(r(559))}}var E=null,$=null;function W(e,t,l){return e===l?!0:e===t?(E=e,!0):!1}function Z(e,t,l){return e===l?($=e,!1):e===t?($!==null&&(E=e),!0):!1}function F(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function re(e,t,l){for(var a=0,i=e;i;i=l(i))a++;i=0;for(var c=t;c;c=l(c))i++;for(;0<a-i;)e=l(e),a--;for(;0<i-a;)t=l(t),i--;for(;a--;){if(e===t||t!==null&&e===t.alternate)return e;e=l(e),t=l(t)}return null}var ee=Object.assign,B=Symbol.for("react.element"),ue=Symbol.for("react.transitional.element"),J=Symbol.for("react.portal"),_e=Symbol.for("react.fragment"),Be=Symbol.for("react.strict_mode"),mt=Symbol.for("react.profiler"),gt=Symbol.for("react.consumer"),Xe=Symbol.for("react.context"),Y=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),ne=Symbol.for("react.suspense_list"),je=Symbol.for("react.memo"),ke=Symbol.for("react.lazy"),ct=Symbol.for("react.activity"),ut=Symbol.for("react.legacy_hidden"),Al=Symbol.for("react.memo_cache_sentinel"),T=Symbol.for("react.view_transition"),G=Symbol.for("react.recoverable"),V=Symbol.iterator;function K(e){return e===null||typeof e!="object"?null:(e=V&&e[V]||e["@@iterator"],typeof e=="function"?e:null)}var ce=Symbol.for("react.client.reference");function be(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ce?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case _e:return"Fragment";case mt:return"Profiler";case Be:return"StrictMode";case P:return"Suspense";case ne:return"SuspenseList";case ct:return"Activity";case T:return"ViewTransition"}if(typeof e=="object")switch(e.$$typeof){case J:return"Portal";case Xe:return e.displayName||"Context";case gt:return(e._context.displayName||"Context")+".Consumer";case Y:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case je:return t=e.displayName||null,t!==null?t:be(e.type)||"Memo";case ke:t=e._payload,e=e._init;try{return be(e(t))}catch{}}return null}var Ae=Array.isArray,ae=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ve={pending:!1,data:null,method:null,action:null},we=[],We=-1;function et(e){return{current:e}}function Me(e){0>We||(e.current=we[We],we[We]=null,We--)}function fe(e,t){We++,we[We]=e.current,e.current=t}var at=et(null),bt=et(null),Nt=et(null),vt=et(null);function Lt(e,t){switch(fe(Nt,t),fe(bt,e),fe(at,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?fv(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=fv(t),e=hv(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Me(at),fe(at,e)}function Bl(){Me(at),Me(bt),Me(Nt)}function vu(e){var t=e.memoizedState;t!==null&&(ci._currentValue=t.memoizedState,fe(vt,e)),t=at.current;var l=hv(t,e.type);t!==l&&(fe(bt,e),fe(at,l))}function Ss(e){bt.current===e&&(Me(at),Me(bt)),vt.current===e&&(Me(vt),ci._currentValue=ve)}var yu,Dd;function ga(e){if(yu===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);yu=t&&t[1]||"",Dd=-1<l.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+yu+e+Dd}var gu=!1;function bu(e,t){if(!e||gu)return"";gu=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var L=function(){throw Error()};if(Object.defineProperty(L.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(L,[])}catch(I){var O=I}Reflect.construct(e,[],L)}else{try{L.call()}catch(I){O=I}L=!1;try{var M=Object.getOwnPropertyDescriptor(e.prototype,"props");Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),L=!0,new e}finally{L&&(M!==void 0?Object.defineProperty(e.prototype,"props",M):delete e.prototype.props)}}}else{try{throw Error()}catch(I){O=I}(L=e())&&typeof L.catch=="function"&&L.catch(function(){})}}catch(I){if(I&&O&&typeof I.stack=="string")return[I.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 c=a.DetermineComponentFrameRoot(),d=c[0],y=c[1];if(d&&y){var S=d.split(`
|
|
4
|
+
`),D=y.split(`
|
|
5
|
+
`);for(i=a=0;a<S.length&&!S[a].includes("DetermineComponentFrameRoot");)a++;for(;i<D.length&&!D[i].includes("DetermineComponentFrameRoot");)i++;if(a===S.length||i===D.length)for(a=S.length-1,i=D.length-1;1<=a&&0<=i&&S[a]!==D[i];)i--;for(;1<=a&&0<=i;a--,i--)if(S[a]!==D[i]){if(a!==1||i!==1)do if(a--,i--,0>i||S[a]!==D[i]){var U=`
|
|
6
|
+
`+S[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{gu=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?ga(l):""}function gg(e,t){switch(e.tag){case 26:case 27:case 5:return ga(e.type);case 16:return ga("Lazy");case 13:return e.child!==t&&t!==null?ga("Suspense Fallback"):ga("Suspense");case 19:return ga("SuspenseList");case 0:case 15:return bu(e.type,!1);case 11:return bu(e.type.render,!1);case 1:return bu(e.type,!0);case 31:return ga("Activity");case 30:return ga("ViewTransition");default:return""}}function Rd(e){try{var t="",l=null;do t+=gg(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
|
|
7
|
+
Error generating stack: `+a.message+`
|
|
8
|
+
`+a.stack}}var pu=Object.prototype.hasOwnProperty,xu=n.unstable_scheduleCallback,ju=n.unstable_cancelCallback,bg=n.unstable_shouldYield,pg=n.unstable_requestPaint,il=n.unstable_now,xg=n.unstable_getCurrentPriorityLevel,zd=n.unstable_ImmediatePriority,Md=n.unstable_UserBlockingPriority,_s=n.unstable_NormalPriority,jg=n.unstable_LowPriority,Ud=n.unstable_IdlePriority,Sg=n.log,_g=n.unstable_setDisableYieldValue,bi=null,sl=null;function ba(e){if(typeof Sg=="function"&&_g(e),sl&&typeof sl.setStrictMode=="function")try{sl.setStrictMode(bi,e)}catch{}}var cl=Math.clz32?Math.clz32:Tg,kg=Math.log,Ng=Math.LN2;function Tg(e){return e>>>=0,e===0?32:31-(kg(e)/Ng|0)|0}var ks=256,Ns=262144,Ts=4194304;function Ja(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&-e;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 Es(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var i=0,c=e.suspendedLanes,d=e.pingedLanes;e=e.warmLanes;var y=a&134217727;return y!==0?(a=y&~c,a!==0?i=Ja(a):(d&=y,d!==0?i=Ja(d):l||(l=y&~e,l!==0&&(i=Ja(l))))):(y=a&~c,y!==0?i=Ja(y):d!==0?i=Ja(d):l||(l=a&~e,l!==0&&(i=Ja(l)))),i===0?0:t!==0&&t!==i&&(t&c)===0&&(c=i&-i,l=t&-t,c>=l||c===32&&(l&4194048)!==0)?t:i}function pi(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function $d(e,t){(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var a=31-cl(l),i=1<<a;t|=e[a],l&=~i}return t}function Eg(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 Bd(){var e=Ts;return Ts<<=1,(Ts&62914560)===0&&(Ts=4194304),e}function Su(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function xi(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ag(e,t,l,a,i,c){var d=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 y=e.entanglements,S=e.expirationTimes,D=e.hiddenUpdates;for(l=d&~l;0<l;){var U=31-cl(l),L=1<<U;y[U]=0,S[U]=-1;var O=D[U];if(O!==null)for(D[U]=null,U=0;U<O.length;U++){var M=O[U];M!==null&&(M.lane&=-536870913)}l&=~L}a!==0&&qd(e,a,0),c!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=c&~(d&~t))}function qd(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-cl(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function Hd(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-cl(l),i=1<<a;i&t|e[a]&t&&(e[a]|=t),l&=~i}}function Ld(e,t){var l=t&-t;return l=(l&42)!==0?1:_u(l),(l&(e.suspendedLanes|t))!==0?0:l}function _u(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 ku(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Yd(){var e=Q.p;return e!==0?e:(e=window.event,e===void 0?32:Fv(e.type))}function Gd(e,t){var l=Q.p;try{return Q.p=e,t()}finally{Q.p=l}}var Pl=Math.random().toString(36).slice(2),Dt="__reactFiber$"+Pl,Ft="__reactProps$"+Pl,jn="__reactContainer$"+Pl,Vd="__reactEvents$"+Pl,Cg="__reactListeners$"+Pl,Og="__reactHandles$"+Pl,Xd="__reactResources$"+Pl,ji="__reactMarker$"+Pl,As="__reactLoad$"+Pl;function Cs(e){delete e[Dt],delete e[Ft],delete e[Cg],delete e[Og]}function Fa(e){var t;if(t=e[Dt])return t;for(var l=e.parentNode;l;){if(t=l[jn]||l[Dt]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=Ov(e);e!==null;){if(l=e[Dt])return l;e=Ov(e)}return t}e=l,l=e.parentNode}return null}function Sn(e){if(e=e[Dt]||e[jn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Si(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function _n(e){var t=e[Xd];return t||(t=e[Xd]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Tt(e){e[ji]=!0}function Qd(e){e[As]=void 0}var Zd=new Set,Kd={};function Ia(e,t){kn(e,t),kn(e+"Capture",t)}function kn(e,t){for(Kd[e]=t,e=0;e<t.length;e++)Zd.add(t[e])}var wg=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]*$"),Jd={},Fd={};function Dg(e){return pu.call(Fd,e)?!0:pu.call(Jd,e)?!1:wg.test(e)?Fd[e]=!0:(Jd[e]=!0,!1)}var He=!1;function Id(){var e=He;return He=!1,e}function Os(e,t,l){if(Dg(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 ws(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 ea(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 ul(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Wd(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Rg(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,c=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(d){l=""+d,c.call(this,d)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(d){l=""+d},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Nu(e){if(!e._valueTracker){var t=Wd(e)?"checked":"value";e._valueTracker=Rg(e,t,""+e[t])}}function Pd(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=Wd(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}var zg=/[\n"\\]/g;function bl(e){return e.replace(zg,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Tu(e,t,l,a,i,c,d,y){e.name="",d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?e.type=d:e.removeAttribute("type"),t!=null?d==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+ul(t)):e.value!==""+ul(t)&&(e.value=""+ul(t)):d!=="submit"&&d!=="reset"||e.removeAttribute("value"),t!=null?d==="number"&&e.value==t?Eu(e,ul(e.value)):Eu(e,ul(t)):l!=null?Eu(e,ul(l)):a!=null&&e.removeAttribute("value"),i==null&&c!=null&&(e.defaultChecked=!!c),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.name=""+ul(y):e.removeAttribute("name")}function ef(e,t,l,a,i,c,d,y){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||l!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){Nu(e);return}l=l!=null?""+ul(l):"",t=t!=null?""+ul(t):l,y||t===e.value||(e.value=t),e.defaultValue=t}a=a??i,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=y?e.checked:!!a,e.defaultChecked=!!a,d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.name=d),Nu(e)}function Eu(e,t){e.defaultValue!==""+t&&(e.defaultValue=""+t)}function Nn(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=""+ul(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 tf(e,t,l){if(t!=null&&(t=""+ul(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+ul(l):""}function lf(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(r(92));if(Ae(a)){if(1<a.length)throw Error(r(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=ul(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),Nu(e)}function Tn(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var Mg=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 af(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||Mg.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function nf(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]="",He=!0);for(var i in t)a=t[i],t.hasOwnProperty(i)&&l[i]!==a&&(af(e,i,a),He=!0)}else for(var c in t)t.hasOwnProperty(c)&&af(e,c,t[c])}function Au(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 Ug=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"],["maskType","mask-type"],["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"]]),$g=/^[\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 Ds(e){return $g.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ql(){}var Cu=null;function Ou(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var En=null,An=null;function sf(e){var t=Sn(e);if(t&&(e=t.stateNode)){var l=e[Ft]||null;e:switch(e=t.stateNode,t.type){case"input":if(Tu(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="'+bl(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var i=a[Ft]||null;if(!i)throw Error(r(90));Tu(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&&Pd(a)}break e;case"textarea":tf(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&Nn(e,!!l.multiple,t,!1)}}}var wu=!1;function cf(e,t,l){if(wu)return e(t,l);wu=!0;try{var a=e(t);return a}finally{if(wu=!1,(En!==null||An!==null)&&(Dc(),En&&(t=En,e=An,An=En=null,sf(t),e)))for(t=0;t<e.length;t++)sf(e[t])}}function _i(e,t){var l=e.stateNode;if(l===null)return null;var a=l[Ft]||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 ta=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Du=!1;if(ta)try{var ki={};Object.defineProperty(ki,"passive",{get:function(){Du=!0}}),window.addEventListener("test",ki,ki),window.removeEventListener("test",ki,ki)}catch{Du=!1}var pa=null,Ru=null,Rs=null;function uf(){if(Rs)return Rs;var e,t=Ru,l=t.length,a,i="value"in pa?pa.value:pa.textContent,c=i.length;for(e=0;e<l&&t[e]===i[e];e++);var d=l-e;for(a=1;a<=d&&t[l-a]===i[c-a];a++);return Rs=i.slice(e,1<a?1-a:void 0)}function zs(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 Ms(){return!0}function rf(){return!1}function Gt(e){function t(l,a,i,c,d){this._reactName=l,this._targetInst=i,this.type=a,this.nativeEvent=c,this.target=d,this.currentTarget=null;for(var y in e)e.hasOwnProperty(y)&&(l=e[y],this[y]=l?l(c):c[y]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?Ms:rf,this.isPropagationStopped=rf,this}return ee(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=Ms)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Ms)},persist:function(){},isPersistent:Ms}),t}var xa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Us=Gt(xa),Ni=ee({},xa,{view:0,detail:0}),Bg=Gt(Ni),zu,Mu,Ti,$s=ee({},Ni,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:$u,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!==Ti&&(Ti&&e.type==="mousemove"?(zu=e.screenX-Ti.screenX,Mu=e.screenY-Ti.screenY):Mu=zu=0,Ti=e),zu)},movementY:function(e){return"movementY"in e?e.movementY:Mu}}),of=Gt($s),qg=ee({},$s,{dataTransfer:0}),Hg=Gt(qg),Lg=ee({},Ni,{relatedTarget:0}),Uu=Gt(Lg),Yg=ee({},xa,{animationName:0,elapsedTime:0,pseudoElement:0}),Gg=Gt(Yg),Vg=ee({},xa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Xg=Gt(Vg),Qg=ee({},xa,{data:0}),df=Gt(Qg),Zg={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Kg={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"},Jg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Fg(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Jg[e])?!!t[e]:!1}function $u(){return Fg}var Ig=ee({},Ni,{key:function(e){if(e.key){var t=Zg[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=zs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Kg[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:$u,charCode:function(e){return e.type==="keypress"?zs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?zs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Wg=Gt(Ig),Pg=ee({},$s,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ff=Gt(Pg),eb=ee({},xa,{submitter:0}),tb=Gt(eb),lb=ee({},Ni,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:$u}),ab=Gt(lb),nb=ee({},xa,{propertyName:0,elapsedTime:0,pseudoElement:0}),ib=Gt(nb),sb=ee({},$s,{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}),cb=Gt(sb),ub=ee({},xa,{newState:0,oldState:0,source:0}),rb=Gt(ub),ob=[9,13,27,32],Bu=ta&&"CompositionEvent"in window,Ei=null;ta&&"documentMode"in document&&(Ei=document.documentMode);var db=ta&&"TextEvent"in window&&!Ei,hf=ta&&(!Bu||Ei&&8<Ei&&11>=Ei),mf=" ",vf=!1;function yf(e,t){switch(e){case"keyup":return ob.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function gf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Cn=!1;function fb(e,t){switch(e){case"compositionend":return gf(t);case"keypress":return t.which!==32?null:(vf=!0,mf);case"textInput":return e=t.data,e===mf&&vf?null:e;default:return null}}function hb(e,t){if(Cn)return e==="compositionend"||!Bu&&yf(e,t)?(e=uf(),Rs=Ru=pa=null,Cn=!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 hf&&t.locale!=="ko"?null:t.data;default:return null}}var mb={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 bf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!mb[e.type]:t==="textarea"}function pf(e,t,l,a){En?An?An.push(a):An=[a]:En=a,t=Bc(t,"onChange"),0<t.length&&(l=new Us("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var Ai=null,Ci=null;function vb(e){sv(e,0)}function Bs(e){var t=Si(e);if(Pd(t))return e}function xf(e,t){if(e==="change")return t}var jf=!1;if(ta){var qu;if(ta){var Hu="oninput"in document;if(!Hu){var Sf=document.createElement("div");Sf.setAttribute("oninput","return;"),Hu=typeof Sf.oninput=="function"}qu=Hu}else qu=!1;jf=qu&&(!document.documentMode||9<document.documentMode)}function _f(){Ai&&(Ai.detachEvent("onpropertychange",kf),Ci=Ai=null)}function kf(e){if(e.propertyName==="value"&&Bs(Ci)){var t=[];pf(t,Ci,e,Ou(e)),cf(vb,t)}}function yb(e,t,l){e==="focusin"?(_f(),Ai=t,Ci=l,Ai.attachEvent("onpropertychange",kf)):e==="focusout"&&_f()}function gb(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Bs(Ci)}function bb(e,t){if(e==="click")return Bs(t)}function pb(e,t){if(e==="input"||e==="change")return Bs(t)}function xb(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var rl=typeof Object.is=="function"?Object.is:xb;function Oi(e,t){if(rl(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(!pu.call(t,i)||!rl(e[i],t[i]))return!1}return!0}function Lu(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}}function Nf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Tf(e,t){var l=Nf(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=Nf(l)}}function Ef(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ef(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Af(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Lu(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=Lu(e.document)}return t}function Yu(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 jb=ta&&"documentMode"in document&&11>=document.documentMode,On=null,Gu=null,wi=null,Vu=!1;function Cf(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Vu||On==null||On!==Lu(a)||(a=On,"selectionStart"in a&&Yu(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}),wi&&Oi(wi,a)||(wi=a,a=Bc(Gu,"onSelect"),0<a.length&&(t=new Us("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=On)))}function Wa(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var wn={animationend:Wa("Animation","AnimationEnd"),animationiteration:Wa("Animation","AnimationIteration"),animationstart:Wa("Animation","AnimationStart"),transitionrun:Wa("Transition","TransitionRun"),transitionstart:Wa("Transition","TransitionStart"),transitioncancel:Wa("Transition","TransitionCancel"),transitionend:Wa("Transition","TransitionEnd")},Xu={},Of={};ta&&(Of=document.createElement("div").style,"AnimationEvent"in window||(delete wn.animationend.animation,delete wn.animationiteration.animation,delete wn.animationstart.animation),"TransitionEvent"in window||delete wn.transitionend.transition);function Pa(e){if(Xu[e])return Xu[e];if(!wn[e])return e;var t=wn[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in Of)return Xu[e]=t[l];return e}var wf=Pa("animationend"),Df=Pa("animationiteration"),Rf=Pa("animationstart"),Sb=Pa("transitionrun"),_b=Pa("transitionstart"),kb=Pa("transitioncancel"),zf=Pa("transitionend"),Mf=new Map,Qu="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(" ");Qu.push("scrollEnd");function Cl(e,t){Mf.set(e,t),Ia(t,[e])}var Nb=0;function la(e,t){if(e.name!=null&&e.name!=="auto")return e.name;if(t.autoName!==null)return t.autoName;e=Rl.identifierPrefix;var l=Nb++;return e="_"+e+"t_"+l.toString(32)+"_",t.autoName=e}function Uf(e){if(e==null||typeof e=="string")return e;var t=null,l=In;if(l!==null)for(var a=0;a<l.length;a++){var i=e[l[a]];if(i!=null){if(i==="none")return"none";t=t==null?i:t+(" "+i)}}return t??e.default}function aa(e,t){return e=Uf(e),t=Uf(t),t==null?e==="auto"?null:e:t==="auto"?null:t}var qs=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)},pl=[],Dn=0,Zu=0;function Hs(){for(var e=Dn,t=Zu=Dn=0;t<e;){var l=pl[t];pl[t++]=null;var a=pl[t];pl[t++]=null;var i=pl[t];pl[t++]=null;var c=pl[t];if(pl[t++]=null,a!==null&&i!==null){var d=a.pending;d===null?i.next=i:(i.next=d.next,d.next=i),a.pending=i}c!==0&&$f(l,i,c)}}function Ls(e,t,l,a){pl[Dn++]=e,pl[Dn++]=t,pl[Dn++]=l,pl[Dn++]=a,Zu|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Ku(e,t,l,a){return Ls(e,t,l,a),Ys(e)}function en(e,t){return Ls(e,null,null,t),Ys(e)}function $f(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var i=!1,c=e.return;c!==null;)c.childLanes|=l,a=c.alternate,a!==null&&(a.childLanes|=l),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(i=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,i&&t!==null&&(i=31-cl(l),e=c.hiddenUpdates,a=e[i],a===null?e[i]=[t]:a.push(t),t.lane=l|536870912),c):null}function Ys(e){if(50<Pi)throw Pi=0,wc=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Rn={};function Tb(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 It(e,t,l,a){return new Tb(e,t,l,a)}function Ju(e){return e=e.prototype,!(!e||!e.isReactComponent)}function na(e,t){var l=e.alternate;return l===null?(l=It(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&1206910976,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 Bf(e,t){e.flags&=1206910978;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 Gs(e,t,l,a,i,c){var d=0;if(a=e,typeof a=="function")Ju(a)&&(d=1);else if(typeof a=="string")d=e0(e,l,at.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(a){case ct:return e=It(31,l,t,i),e.elementType=ct,e.lanes=c,e;case _e:return tn(l.children,i,c,t);case Be:d=8,i|=24;break;case mt:return e=It(12,l,t,i|2),e.elementType=mt,e.lanes=c,e;case P:return e=It(13,l,t,i),e.elementType=P,e.lanes=c,e;case ne:return e=It(19,l,t,i),e.elementType=ne,e.lanes=c,e;case ut:case T:return e=i|32,e=It(30,l,t,e),e.elementType=T,e.lanes=c,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case Xe:d=10;break e;case gt:d=9;break e;case Y:d=11;break e;case je:d=14;break e;case ke:d=16,a=null;break e}d=29,l=Error(r(130,e===null?"null":typeof e,"")),a=null}return t=It(d,l,t,i),t.elementType=e,t.type=a,t.lanes=c,t}function tn(e,t,l,a){return e=It(7,e,a,t),e.lanes=l,e}function Fu(e,t,l){return e=It(6,e,null,t),e.lanes=l,e}function qf(e){var t=It(18,null,null,0);return t.stateNode=e,t}function Iu(e,t,l){return t=It(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Hf=new WeakMap;function xl(e,t){if(typeof e=="object"&&e!==null){var l=Hf.get(e);return l!==void 0?l:(t={value:e,source:t,stack:Rd(t)},Hf.set(e,t),t)}return{value:e,source:t,stack:Rd(t)}}var zn=[],Mn=0,Vs=null,Di=0,jl=[],Sl=0,ja=null,Hl=1,Ll="";function ia(e,t){zn[Mn++]=Di,zn[Mn++]=Vs,Vs=e,Di=t}function Lf(e,t,l){jl[Sl++]=Hl,jl[Sl++]=Ll,jl[Sl++]=ja,ja=e;var a=Hl;e=Ll;var i=32-cl(a)-1;a&=~(1<<i),l+=1;var c=32-cl(t)+i;if(30<c){var d=i-i%5;c=(a&(1<<d)-1).toString(32),a>>=d,i-=d,Hl=1<<32-cl(t)+i|l<<i|a,Ll=c+e}else Hl=1<<c|l<<i|a,Ll=e}function Xs(e){e.return!==null&&(ia(e,1),Lf(e,1,0))}function Wu(e){for(;e===Vs;)Vs=zn[--Mn],zn[Mn]=null,Di=zn[--Mn],zn[Mn]=null;for(;e===ja;)ja=jl[--Sl],jl[Sl]=null,Ll=jl[--Sl],jl[Sl]=null,Hl=jl[--Sl],jl[Sl]=null}function Yf(e,t){jl[Sl++]=Hl,jl[Sl++]=Ll,jl[Sl++]=ja,Hl=t.id,Ll=t.overflow,ja=e}var Et=null,nt=null,Ne=!1,Sa=null,_l=!1,Pu=Error(r(519));function _a(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ri(xl(t,e)),Pu}function Gf(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[Dt]=e,t[Ft]=a,l){case"dialog":Oe("cancel",t),Oe("close",t);break;case"iframe":case"object":case"embed":Oe("load",t);break;case"video":case"audio":for(l=0;l<ts.length;l++)Oe(ts[l],t);break;case"source":Oe("error",t);break;case"img":case"image":case"link":Oe("error",t),Oe("load",t);break;case"details":Oe("toggle",t);break;case"input":Oe("invalid",t),ef(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":Oe("invalid",t);break;case"textarea":Oe("invalid",t),lf(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||ov(t.textContent,l)?(a.popover!=null&&(Oe("beforetoggle",t),Oe("toggle",t)),a.onScroll!=null&&Oe("scroll",t),a.onScrollEnd!=null&&Oe("scrollend",t),a.onClick!=null&&(t.onclick=ql),t=!0):t=!1,t||_a(e,!0)}function Qs(e){for(Et=e.return;Et;)switch(Et.tag){case 5:case 31:case 13:_l=!1;return;case 27:case 3:_l=!0;return;default:Et=Et.return}}function Un(e){if(e!==Et)return!1;if(!Ne)return Qs(e),Ne=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Oo(e.type,e.memoizedProps)),l=!l),l&&nt&&_a(e),Qs(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));nt=Cv(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));nt=Cv(e)}else t===27?(t=nt,qa(e.type)?(e=qo,qo=null,nt=e):nt=t):nt=Et?Nl(e.stateNode.nextSibling):null;return!0}function ln(){nt=Et=null,Ne=!1}function er(){var e=Sa;return e!==null&&(el===null?el=e:el.push.apply(el,e),Sa=null),e}function Ri(e){Sa===null?Sa=[e]:Sa.push(e)}var tr=et(null),an=null,sa=null;function ka(e,t,l){fe(tr,t._currentValue),t._currentValue=l}function ca(e){e._currentValue=tr.current,Me(tr)}function Zs(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 lr(e,t,l,a){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var c=i.dependencies;if(c!==null){var d=i.child;c=c.firstContext;e:for(;c!==null;){var y=c;c=i;for(var S=0;S<t.length;S++)if(y.context===t[S]){c.lanes|=l,y=c.alternate,y!==null&&(y.lanes|=l),Zs(c.return,l,e),a||(d=null);break e}c=y.next}}else if(i.tag===18){if(d=i.return,d===null)throw Error(r(341));d.lanes|=l,c=d.alternate,c!==null&&(c.lanes|=l),Zs(d,l,e),d=null}else i.tag===13&&i.memoizedState!==null&&i.memoizedState.dehydrated===null?(i.lanes|=l,d=i.alternate,d!==null&&(d.lanes|=l),Zs(i.return,l,e),d=i.child,d=d!==null?d.sibling:null):d=i.child;if(d!==null)d.return=i;else for(d=i;d!==null;){if(d===e){d=null;break}if(i=d.sibling,i!==null){i.return=d.return,d=i;break}d=d.return}i=d}}function nn(e,t,l,a){e=null;for(var i=t,c=!1;i!==null;){if(!c){if((i.flags&524288)!==0)c=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var d=i.alternate;if(d===null)throw Error(r(387));if(d=d.memoizedProps,d!==null){var y=i.type;rl(i.pendingProps.value,d.value)||(e!==null?e.push(y):e=[y])}}else if(i===vt.current){if(d=i.alternate,d===null)throw Error(r(387));d.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(ci):e=[ci])}i=i.return}return e!==null&&lr(t,e,l,a),t.flags|=262144,e!==null}function Ks(e){for(e=e.firstContext;e!==null;){if(!rl(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function sn(e){an=e,sa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Rt(e){return Vf(an,e)}function Js(e,t){return an===null&&sn(e),Vf(e,t)}function Vf(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},sa===null){if(e===null)throw Error(r(308));sa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else sa=sa.next=t;return l}var Eb=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()})}},Ab=n.unstable_scheduleCallback,Cb=n.unstable_NormalPriority,pt={$$typeof:Xe,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ar(){return{controller:new Eb,data:new Map,refCount:0}}function zi(e){e.refCount--,e.refCount===0&&Ab(Cb,function(){e.controller.abort()})}function Xf(e,t){if((e.pendingLanes&4194048)!==0){var l=e.transitionTypes;for(l===null&&(l=e.transitionTypes=[]),e=0;e<t.length;e++){var a=t[e];l.indexOf(a)===-1&&l.push(a)}}}var Mi=null;function Ob(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Ui=null,nr=0,cn=0,$n=null;function wb(e,t){if(Ui===null){var l=Ui=[];nr=0,cn=jo(),$n={status:"pending",value:void 0,then:function(a){l.push(a)}}}return nr++,t.then(Qf,Qf),t}function Qf(){if(--nr===0&&(Mi=null,Ui!==null)){$n!==null&&($n.status="fulfilled");var e=Ui;Ui=null,cn=0,$n=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Db(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 Zf=ae.S;ae.S=function(e,t){if(qm=il(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&wb(e,t),Mi!==null)for(var l=ti;l!==null;)Xf(l,Mi),l=l.next;if(l=e.types,l!==null){for(var a=ti;a!==null;)Xf(a,l),a=a.next;if(cn!==0){a=Mi,a===null&&(a=Mi=[]);for(var i=0;i<l.length;i++){var c=l[i];a.indexOf(c)===-1&&a.push(c)}}}Zf!==null&&Zf(e,t)};var un=et(null);function ir(){var e=un.current;return e!==null?e:tt.pooledCache}function Fs(e,t){t===null?fe(un,un.current):fe(un,t.pool)}function Kf(){var e=ir();return e===null?null:{parent:pt._currentValue,pool:e}}var Bn=Error(r(460)),sr=Error(r(474)),Is=Error(r(542)),Ws={then:function(){}};function Jf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Ff(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(ql,ql),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Wf(e),e===void 0&&!("reason"in t)?Error(r(600)):e;default:if(typeof t.status=="string")t.then(ql,ql);else{if(e=tt,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,Wf(e),e}throw on=t,Bn}}function rn(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(on=l,Bn):l}}var on=null;function If(){if(on===null)throw Error(r(459));var e=on;return on=null,e}function Wf(e){if(e===Bn||e===Is)throw Error(r(483))}var qn=null,$i=0;function Ps(e){var t=$i;return $i+=1,qn===null&&(qn=[]),Ff(qn,e,t)}function Na(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ec(e,t){throw t.$$typeof===B?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Pf(e){function t(w,N){if(e){var R=w.deletions;R===null?(w.deletions=[N],w.flags|=16):R.push(N)}}function l(w,N){if(!e)return null;for(;N!==null;)t(w,N),N=N.sibling;return null}function a(w){for(var N=new Map;w!==null;)w.key===null?N.set(w.index,w):N.set(w.key,w),w=w.sibling;return N}function i(w,N){return w=na(w,N),w.index=0,w.sibling=null,w}function c(w,N,R){return w.index=R,e?(R=w.alternate,R!==null?(R=R.index,R<N?(w.flags|=2,N):R):(w.flags|=134217730,N)):(w.flags|=1048576,N)}function d(w){return e&&w.alternate===null&&(w.flags|=134217730),w}function y(w,N,R,H){return N===null||N.tag!==6?(N=Fu(R,w.mode,H),N.return=w,N):(N=i(N,R),N.return=w,N)}function S(w,N,R,H){var le=R.type;return le===_e?(w=U(w,N,R.props.children,H,R.key),Na(w,R),w):N!==null&&(N.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===ke&&rn(le)===N.type)?(N=i(N,R.props),Na(N,R),N.return=w,N):(N=Gs(R.type,R.key,R.props,null,w.mode,H),Na(N,R),N.return=w,N)}function D(w,N,R,H){return N===null||N.tag!==4||N.stateNode.containerInfo!==R.containerInfo||N.stateNode.implementation!==R.implementation?(N=Iu(R,w.mode,H),N.return=w,N):(N=i(N,R.children||[]),N.return=w,N)}function U(w,N,R,H,le){return N===null||N.tag!==7?(N=tn(R,w.mode,H,le),N.return=w,N):(N=i(N,R),N.return=w,N)}function L(w,N,R){if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return N=Fu(""+N,w.mode,R),N.return=w,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case ue:return R=Gs(N.type,N.key,N.props,null,w.mode,R),Na(R,N),R.return=w,R;case J:return N=Iu(N,w.mode,R),N.return=w,N;case ke:return N=rn(N),L(w,N,R)}if(Ae(N)||K(N))return N=tn(N,w.mode,R,null),N.return=w,N;if(typeof N.then=="function")return L(w,Ps(N),R);if(N.$$typeof===Xe)return L(w,Js(w,N),R);ec(w,N)}return null}function O(w,N,R,H){var le=N!==null?N.key:null;if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return le!==null?null:y(w,N,""+R,H);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case ue:return R.key===le?S(w,N,R,H):null;case J:return R.key===le?D(w,N,R,H):null;case ke:return R=rn(R),O(w,N,R,H)}if(Ae(R)||K(R))return le!==null?null:U(w,N,R,H,null);if(typeof R.then=="function")return O(w,N,Ps(R),H);if(R.$$typeof===Xe)return O(w,N,Js(w,R),H);ec(w,R)}return null}function M(w,N,R,H,le){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return w=w.get(R)||null,y(N,w,""+H,le);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case ue:return w=w.get(H.key===null?R:H.key)||null,S(N,w,H,le);case J:return w=w.get(H.key===null?R:H.key)||null,D(N,w,H,le);case ke:return H=rn(H),M(w,N,R,H,le)}if(Ae(H)||K(H))return w=w.get(R)||null,U(N,w,H,le,null);if(typeof H.then=="function")return M(w,N,R,Ps(H),le);if(H.$$typeof===Xe)return M(w,N,R,Js(N,H),le);ec(N,H)}return null}function I(w,N,R,H){for(var le=null,Re=null,oe=N,me=N=0,St=null;oe!==null&&me<R.length;me++){oe.index>me?(St=oe,oe=null):St=oe.sibling;var Ue=O(w,oe,R[me],H);if(Ue===null){oe===null&&(oe=St);break}e&&oe&&Ue.alternate===null&&t(w,oe),N=c(Ue,N,me),Re===null?le=Ue:Re.sibling=Ue,Re=Ue,oe=St}if(me===R.length)return l(w,oe),Ne&&ia(w,me),le;if(oe===null){for(;me<R.length;me++)oe=L(w,R[me],H),oe!==null&&(N=c(oe,N,me),Re===null?le=oe:Re.sibling=oe,Re=oe);return Ne&&ia(w,me),le}for(oe=a(oe);me<R.length;me++)St=M(oe,w,me,R[me],H),St!==null&&(e&&(Ue=St.alternate,Ue!==null&&oe.delete(Ue.key===null?me:Ue.key)),N=c(St,N,me),Re===null?le=St:Re.sibling=St,Re=St);return e&&oe.forEach(function(Va){return t(w,Va)}),Ne&&ia(w,me),le}function se(w,N,R,H){if(R==null)throw Error(r(151));for(var le=null,Re=null,oe=N,me=N=0,St=null,Ue=R.next();oe!==null&&!Ue.done;me++,Ue=R.next()){oe.index>me?(St=oe,oe=null):St=oe.sibling;var Va=O(w,oe,Ue.value,H);if(Va===null){oe===null&&(oe=St);break}e&&oe&&Va.alternate===null&&t(w,oe),N=c(Va,N,me),Re===null?le=Va:Re.sibling=Va,Re=Va,oe=St}if(Ue.done)return l(w,oe),Ne&&ia(w,me),le;if(oe===null){for(;!Ue.done;me++,Ue=R.next())Ue=L(w,Ue.value,H),Ue!==null&&(N=c(Ue,N,me),Re===null?le=Ue:Re.sibling=Ue,Re=Ue);return Ne&&ia(w,me),le}for(oe=a(oe);!Ue.done;me++,Ue=R.next())Ue=M(oe,w,me,Ue.value,H),Ue!==null&&(e&&(St=Ue.alternate,St!==null&&oe.delete(St.key===null?me:St.key)),N=c(Ue,N,me),Re===null?le=Ue:Re.sibling=Ue,Re=Ue);return e&&oe.forEach(function(f0){return t(w,f0)}),Ne&&ia(w,me),le}function xe(w,N,R,H){if(typeof R=="object"&&R!==null&&R.type===_e&&R.key===null&&R.props.ref===void 0&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case ue:e:{for(var le=R.key;N!==null;){if(N.key===le){if(le=R.type,le===_e){if(N.tag===7){l(w,N.sibling),H=i(N,R.props.children),Na(H,R),H.return=w,w=H;break e}}else if(N.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===ke&&rn(le)===N.type){l(w,N.sibling),H=i(N,R.props),Na(H,R),H.return=w,w=H;break e}l(w,N);break}else t(w,N);N=N.sibling}R.type===_e?(H=tn(R.props.children,w.mode,H,R.key),Na(H,R),H.return=w,w=H):(H=Gs(R.type,R.key,R.props,null,w.mode,H),Na(H,R),H.return=w,w=H)}return d(w);case J:e:{for(le=R.key;N!==null;){if(N.key===le)if(N.tag===4&&N.stateNode.containerInfo===R.containerInfo&&N.stateNode.implementation===R.implementation){l(w,N.sibling),H=i(N,R.children||[]),H.return=w,w=H;break e}else{l(w,N);break}else t(w,N);N=N.sibling}H=Iu(R,w.mode,H),H.return=w,w=H}return d(w);case ke:return R=rn(R),xe(w,N,R,H)}if(Ae(R))return I(w,N,R,H);if(K(R)){if(le=K(R),typeof le!="function")throw Error(r(150));return R=le.call(R),se(w,N,R,H)}if(typeof R.then=="function")return xe(w,N,Ps(R),H);if(R.$$typeof===Xe)return xe(w,N,Js(w,R),H);ec(w,R)}return typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint"?(R=""+R,N!==null&&N.tag===6?(l(w,N.sibling),H=i(N,R),H.return=w,w=H):(l(w,N),H=Fu(R,w.mode,H),H.return=w,w=H),d(w)):l(w,N)}return function(w,N,R,H){try{$i=0;var le=xe(w,N,R,H);return qn=null,le}catch(oe){if(oe===Bn||oe===Is)throw oe;var Re=It(29,oe,null,w.mode);return Re.lanes=H,Re.return=w,Re}}}var dn=Pf(!0),eh=Pf(!1),Ta=!1;function cr(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ur(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 Ea(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Aa(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Ye&2)!==0){var i=a.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),a.pending=t,t=Ys(e),$f(e,null,l),t}return Ls(e,a,t,l),Ys(e)}function Bi(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,Hd(e,l)}}function rr(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var i=null,c=null;if(l=l.firstBaseUpdate,l!==null){do{var d={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};c===null?i=c=d:c=c.next=d,l=l.next}while(l!==null);c===null?i=c=t:c=c.next=t}else i=c=t;l={baseState:a.baseState,firstBaseUpdate:i,lastBaseUpdate:c,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 or=!1;function qi(){if(or){var e=$n;if(e!==null)throw e}}function Hi(e,t,l,a){or=!1;var i=e.updateQueue;Ta=!1;var c=i.firstBaseUpdate,d=i.lastBaseUpdate,y=i.shared.pending;if(y!==null){i.shared.pending=null;var S=y,D=S.next;S.next=null,d===null?c=D:d.next=D,d=S;var U=e.alternate;U!==null&&(U=U.updateQueue,y=U.lastBaseUpdate,y!==d&&(y===null?U.firstBaseUpdate=D:y.next=D,U.lastBaseUpdate=S))}if(c!==null){var L=i.baseState;d=0,U=D=S=null,y=c;do{var O=y.lane&-536870913,M=O!==y.lane;if(M?(De&O)===O:(a&O)===O){O!==0&&O===cn&&(or=!0),U!==null&&(U=U.next={lane:0,tag:y.tag,payload:y.payload,callback:null,next:null});e:{var I=e,se=y;O=t;var xe=l;switch(se.tag){case 1:if(I=se.payload,typeof I=="function"){L=I.call(xe,L,O);break e}L=I;break e;case 3:I.flags=I.flags&-65537|128;case 0:if(I=se.payload,O=typeof I=="function"?I.call(xe,L,O):I,O==null)break e;L=ee({},L,O);break e;case 2:Ta=!0}}O=y.callback,O!==null&&(e.flags|=64,M&&(e.flags|=8192),M=i.callbacks,M===null?i.callbacks=[O]:M.push(O))}else M={lane:O,tag:y.tag,payload:y.payload,callback:y.callback,next:null},U===null?(D=U=M,S=L):U=U.next=M,d|=O;if(y=y.next,y===null){if(y=i.shared.pending,y===null)break;M=y,y=M.next,M.next=null,i.lastBaseUpdate=M,i.shared.pending=null}}while(!0);U===null&&(S=L),i.baseState=S,i.firstBaseUpdate=D,i.lastBaseUpdate=U,c===null&&(i.shared.lanes=0),Ma|=d,e.lanes=d,e.memoizedState=L}}function th(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function lh(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)th(l[e],t)}var Ca=et(null),tc=et(0);function ah(e,t){e=fa,fe(tc,e),fe(Ca,t),fa=e|t.baseLanes}function dr(){fe(tc,fa),fe(Ca,Ca.current)}function fr(){fa=tc.current,Me(Ca),Me(tc)}var zt=et(null),Yt=null;function Oa(e){var t=e.alternate;fe(Mt,Mt.current&1),fe(zt,e),Yt===null&&(t===null||Ca.current!==null||t.memoizedState!==null)&&(Yt=e)}function hr(e){fe(Mt,Mt.current),fe(zt,e),Yt===null&&(Yt=e)}function nh(e){e.tag===22?(fe(Mt,Mt.current),fe(zt,e),Yt===null&&(Yt=e)):wa()}function wa(){fe(Mt,Mt.current),fe(zt,zt.current)}function ol(e){Me(zt),Yt===e&&(Yt=null),Me(Mt)}var Mt=et(0);function Li(e,t){fe(zt,zt.current),fe(Mt,t)}function mr(e){Me(Mt),Me(zt),Yt===e&&(Yt=null)}function lc(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||$o(l)||Bo(l)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!=="independent"){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 ua=0,pe=null,Pe=null,xt=null,ac=!1,Hn=!1,fn=!1,nc=0,Yi=0,Ln=null,Rb=0;function dt(){throw Error(r(321))}function vr(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!rl(e[l],t[l]))return!1;return!0}function yr(e,t,l,a,i,c){return ua=c,pe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ae.H=e===null||e.memoizedState===null?Lh:Yh,fn=!1,c=l(a,i),fn=!1,Hn&&(c=sh(t,l,a,i)),ih(e),c}function ih(e){ae.H=dc;var t=Pe!==null&&Pe.next!==null;if(ua=0,xt=Pe=pe=null,ac=!1,Yi=0,Ln=null,t)throw Error(r(300));e===null||jt||(e=e.dependencies,e!==null&&Ks(e)&&(jt=!0))}function sh(e,t,l,a){pe=e;var i=0;do{if(Hn&&(Ln=null),Yi=0,Hn=!1,25<=i)throw Error(r(301));if(i+=1,xt=Pe=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}ae.H=Lb,c=t(l,a)}while(Hn);return c}function zb(){var e=ae.H,t=e.useState()[0];return t=typeof t.then=="function"?Gi(t):t,e=e.useState()[0],(Pe!==null?Pe.memoizedState:null)!==e&&(pe.flags|=1024),t}function gr(){var e=nc!==0;return nc=0,e}function br(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function pr(e){if(ac){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ac=!1}ua=0,xt=Pe=pe=null,Hn=!1,Yi=nc=0,Ln=null}function Vt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xt===null?pe.memoizedState=xt=e:xt=xt.next=e,xt}function yt(){if(Pe===null){var e=pe.alternate;e=e!==null?e.memoizedState:null}else e=Pe.next;var t=xt===null?pe.memoizedState:xt.next;if(t!==null)xt=t,Pe=e;else{if(e===null)throw pe.alternate===null?Error(r(467)):Error(r(310));Pe=e,e={memoizedState:Pe.memoizedState,baseState:Pe.baseState,baseQueue:Pe.baseQueue,queue:Pe.queue,next:null},xt===null?pe.memoizedState=xt=e:xt=xt.next=e}return xt}function ic(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Gi(e){var t=Yi;return Yi+=1,Ln===null&&(Ln=[]),e=Ff(Ln,e,t),t=pe,(xt===null?t.memoizedState:xt.next)===null&&(t=t.alternate,ae.H=t===null||t.memoizedState===null?Lh:Yh),e}function sc(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Gi(e);if(e.$$typeof===G)return;if(e.$$typeof===Xe)return Rt(e)}throw Error(r(438,String(e)))}function xr(e){var t=null,l=pe.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=pe.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=ic(),pe.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]=Al;return t.index++,l}function ra(e,t){return typeof t=="function"?t(e):t}function cc(e){var t=yt();return jr(t,Pe,e)}function jr(e,t,l){var a=e.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=l;var i=e.baseQueue,c=a.pending;if(c!==null){if(i!==null){var d=i.next;i.next=c.next,c.next=d}t.baseQueue=i=c,a.pending=null}if(c=e.baseState,i===null)e.memoizedState=c;else{t=i.next;var y=d=null,S=null,D=t,U=!1;do{var L=D.lane&-536870913;if(L!==D.lane?(De&L)===L:(ua&L)===L){var O=D.revertLane;if(O===0)S!==null&&(S=S.next={lane:0,revertLane:0,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),L===cn&&(U=!0);else if((ua&O)===O){D=D.next,O===cn&&(U=!0);continue}else L={lane:0,revertLane:D.revertLane,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},S===null?(y=S=L,d=c):S=S.next=L,pe.lanes|=O,Ma|=O;L=D.action,fn&&l(c,L),c=D.hasEagerState?D.eagerState:l(c,L)}else O={lane:L,revertLane:D.revertLane,gesture:D.gesture,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},S===null?(y=S=O,d=c):S=S.next=O,pe.lanes|=L,Ma|=L;D=D.next}while(D!==null&&D!==t);if(S===null?d=c:S.next=y,!rl(c,e.memoizedState)&&(jt=!0,U&&(l=$n,l!==null)))throw l;e.memoizedState=c,e.baseState=d,e.baseQueue=S,a.lastRenderedState=c}return i===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Sr(e){var t=yt(),l=t.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=e;var a=l.dispatch,i=l.pending,c=t.memoizedState;if(i!==null){l.pending=null;var d=i=i.next;do c=e(c,d.action),d=d.next;while(d!==i);rl(c,t.memoizedState)||(jt=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),l.lastRenderedState=c}return[c,a]}function ch(e,t,l){var a=pe,i=yt(),c=Ne;if(c){if(l===void 0)throw Error(r(407));l=l()}else l=t();var d=!rl((Pe||i).memoizedState,l);if(d&&(i.memoizedState=l,jt=!0),i=i.queue,Nr(oh.bind(null,a,i,e),[e]),e=i.getSnapshot!==t||d||xt!==null&&(xt.memoizedState.tag&1)!==0,Yn(e?9:8,{destroy:void 0},rh.bind(null,a,i,l,t),null),e){if(a.flags|=2048,tt===null)throw Error(r(349));c||(ua&127)!==0||uh(a,t,l)}return l}function uh(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=pe.updateQueue,t===null?(t=ic(),pe.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function rh(e,t,l,a){t.value=l,t.getSnapshot=a,dh(t)&&fh(e)}function oh(e,t,l){return l(function(){dh(t)&&fh(e)})}function dh(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!rl(e,l)}catch{return!0}}function fh(e){var t=en(e,2);t!==null&&tl(t,e,2)}function _r(e){var t=Vt();if(typeof e=="function"){var l=e;if(e=l(),fn){ba(!0);try{l()}finally{ba(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:e},t}function hh(e,t,l,a){return e.baseState=l,jr(e,Pe,typeof a=="function"?a:ra)}function Mb(e,t,l,a,i){if(oc(e))throw Error(r(485));if(e=t.action,e!==null){var c={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(d){c.listeners.push(d)}};ae.T!==null?l(!0):c.isTransition=!1,a(c),l=t.pending,l===null?(c.next=t.pending=c,mh(t,c)):(c.next=l.next,t.pending=l.next=c)}}function mh(e,t){var l=t.action,a=t.payload,i=e.state;if(t.isTransition){var c=ae.T,d={};d.types=c!==null?c.types:null,ae.T=d;try{var y=l(i,a),S=ae.S;S!==null&&S(d,y),vh(e,t,y)}catch(D){kr(e,t,D)}finally{c!==null&&d.types!==null&&(c.types=d.types),ae.T=c}}else try{c=l(i,a),vh(e,t,c)}catch(D){kr(e,t,D)}}function vh(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){yh(e,t,a)},function(a){return kr(e,t,a)}):yh(e,t,l)}function yh(e,t,l){t.status="fulfilled",t.value=l,gh(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,mh(e,l)))}function kr(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,gh(t),t=t.next;while(t!==a)}e.action=null}function gh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function bh(e,t){return t}function ph(e,t){if(Ne){var l=tt.formState;if(l!==null){e:{var a=pe;if(Ne){if(nt){t:{for(var i=nt,c=_l;i.nodeType!==8;){if(!c){i=null;break t}if(i=Nl(i.nextSibling),i===null){i=null;break t}}c=i.data,i=c==="F!"||c==="F"?i:null}if(i){nt=Nl(i.nextSibling),a=i.data==="F!";break e}}_a(a)}a=!1}a&&(t=l[0])}}return l=Vt(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:bh,lastRenderedState:t},l.queue=a,l=Bh.bind(null,pe,a),a.dispatch=l,a=_r(!1),c=Or.bind(null,pe,!1,a.queue),a=Vt(),i={state:t,dispatch:null,action:e,pending:null},a.queue=i,l=Mb.bind(null,pe,i,c,l),i.dispatch=l,a.memoizedState=e,[t,l,!1]}function xh(e){var t=yt();return jh(t,Pe,e)}function jh(e,t,l){if(t=jr(e,t,bh)[0],e=cc(ra)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Gi(t)}catch(d){throw d===Bn?Is:d}else a=t;t=yt();var i=t.queue,c=i.dispatch;return l!==t.memoizedState&&(pe.flags|=2048,Yn(9,{destroy:void 0},Ub.bind(null,i,l),null)),[a,c,e]}function Ub(e,t){e.action=t}function Sh(e){var t=yt(),l=Pe;if(l!==null)return jh(t,l,e);yt(),t=t.memoizedState,l=yt();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function Yn(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=pe.updateQueue,t===null&&(t=ic(),pe.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 _h(){return yt().memoizedState}function uc(e,t,l,a){var i=Vt();pe.flags|=e,i.memoizedState=Yn(1|t,{destroy:void 0},l,a===void 0?null:a)}function rc(e,t,l,a){var i=yt();a=a===void 0?null:a;var c=i.memoizedState.inst;Pe!==null&&a!==null&&vr(a,Pe.memoizedState.deps)?i.memoizedState=Yn(t,c,l,a):(pe.flags|=e,i.memoizedState=Yn(1|t,c,l,a))}function kh(e,t){uc(8390656,8,e,t)}function Nr(e,t){rc(2048,8,e,t)}function $b(e){pe.flags|=4;var t=pe.updateQueue;if(t===null)t=ic(),pe.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function Nh(e){var t=yt().memoizedState;return $b({ref:t,nextImpl:e}),function(){if((Ye&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Th(e,t){return rc(4,2,e,t)}function Eh(e,t){return rc(4,4,e,t)}function Ah(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 Ch(e,t,l){l=l!=null?l.concat([e]):null,rc(4,4,Ah.bind(null,t,e),l)}function Tr(){}function Oh(e,t){var l=yt();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&vr(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function wh(e,t){var l=yt();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&vr(t,a[1]))return a[0];if(a=e(),fn){ba(!0);try{e()}finally{ba(!1)}}return l.memoizedState=[a,t],a}function Er(e,t,l){return l===void 0||(ua&1073741824)!==0&&(De&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=Lm(),pe.lanes|=e,Ma|=e,l)}function Dh(e,t,l,a){return rl(l,t)?l:Ca.current!==null?(e=Er(e,l,a),rl(e,t)||(jt=!0),e):(ua&106)===0||(ua&1073741824)!==0&&(De&261930)===0?(jt=!0,e.memoizedState=l):(e=Lm(),pe.lanes|=e,Ma|=e,t)}function Rh(e,t,l,a,i){var c=Q.p;Q.p=c!==0&&8>c?c:8;var d=ae.T,y={};y.types=d!==null?d.types:null,ae.T=y,Or(e,!1,t,l);try{var S=i(),D=ae.S;if(D!==null&&D(y,S),S!==null&&typeof S=="object"&&typeof S.then=="function"){var U=Db(S,a);Vi(e,t,U,ml(e))}else Vi(e,t,a,ml(e))}catch(L){Vi(e,t,{then:function(){},status:"rejected",reason:L},ml())}finally{Q.p=c,d!==null&&y.types!==null&&(d.types=y.types),ae.T=d}}function Bb(){}function Ar(e,t,l,a){if(e.tag!==5)throw Error(r(476));var i=zh(e).queue;Rh(e,i,t,ve,l===null?Bb:function(){return Mh(e),l(a)})}function zh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ve,baseState:ve,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:ve},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Mh(e){var t=zh(e);t.next===null&&(t=e.alternate.memoizedState),Vi(e,t.next.queue,{},ml())}function Cr(){return Rt(ci)}function Uh(){return yt().memoizedState}function $h(){return yt().memoizedState}function qb(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=ml();e=Ea(l);var a=Aa(t,e,l);a!==null&&(tl(a,t,l),Bi(a,t,l)),t={cache:ar()},e.payload=t;return}t=t.return}}function Hb(e,t,l){var a=ml();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},oc(e)?qh(t,l):(l=Ku(e,t,l,a),l!==null&&(tl(l,e,a),Hh(l,t,a)))}function Bh(e,t,l){var a=ml();Vi(e,t,l,a)}function Vi(e,t,l,a){var i={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(oc(e))qh(t,i);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var d=t.lastRenderedState,y=c(d,l);if(i.hasEagerState=!0,i.eagerState=y,rl(y,d))return Ls(e,t,i,0),tt===null&&Hs(),!1}catch{}if(l=Ku(e,t,i,a),l!==null)return tl(l,e,a),Hh(l,t,a),!0}return!1}function Or(e,t,l,a){if(a={lane:2,revertLane:jo(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},oc(e)){if(t)throw Error(r(479))}else t=Ku(e,l,a,2),t!==null&&tl(t,e,2)}function oc(e){var t=e.alternate;return e===pe||t!==null&&t===pe}function qh(e,t){Hn=ac=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function Hh(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,Hd(e,l)}}var dc={readContext:Rt,use:sc,useCallback:dt,useContext:dt,useEffect:dt,useImperativeHandle:dt,useLayoutEffect:dt,useInsertionEffect:dt,useMemo:dt,useReducer:dt,useRef:dt,useState:dt,useDebugValue:dt,useDeferredValue:dt,useTransition:dt,useSyncExternalStore:dt,useId:dt,useHostTransitionStatus:dt,useFormState:dt,useActionState:dt,useOptimistic:dt,useMemoCache:dt,useCacheRefresh:dt,useEffectEvent:dt},Lh={readContext:Rt,use:sc,useCallback:function(e,t){return Vt().memoizedState=[e,t===void 0?null:t],e},useContext:Rt,useEffect:kh,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,uc(4194308,4,Ah.bind(null,t,e),l)},useLayoutEffect:function(e,t){return uc(4194308,4,e,t)},useInsertionEffect:function(e,t){uc(4,2,e,t)},useMemo:function(e,t){var l=Vt();t=t===void 0?null:t;var a=e();if(fn){ba(!0);try{e()}finally{ba(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=Vt();if(l!==void 0){var i=l(t);if(fn){ba(!0);try{l(t)}finally{ba(!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=Hb.bind(null,pe,e),[a.memoizedState,e]},useRef:function(e){var t=Vt();return e={current:e},t.memoizedState=e},useState:function(e){e=_r(e);var t=e.queue,l=Bh.bind(null,pe,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:Tr,useDeferredValue:function(e,t){var l=Vt();return Er(l,e,t)},useTransition:function(){var e=_r(!1);return e=Rh.bind(null,pe,e.queue,!0,!1),Vt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=pe,i=Vt();if(Ne){if(l===void 0)throw Error(r(407));l=l()}else{if(l=t(),tt===null)throw Error(r(349));(De&127)!==0||uh(a,t,l)}i.memoizedState=l;var c={value:l,getSnapshot:t};return i.queue=c,kh(oh.bind(null,a,c,e),[e]),a.flags|=2048,Yn(9,{destroy:void 0},rh.bind(null,a,c,l,t),null),l},useId:function(){var e=Vt(),t=tt.identifierPrefix;if(Ne){var l=Ll,a=Hl;l=(a&~(1<<32-cl(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=nc++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=Rb++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Cr,useFormState:ph,useActionState:ph,useOptimistic:function(e){var t=Vt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=Or.bind(null,pe,!0,l),l.dispatch=t,[e,t]},useMemoCache:xr,useCacheRefresh:function(){return Vt().memoizedState=qb.bind(null,pe)},useEffectEvent:function(e){var t=Vt(),l={impl:e};return t.memoizedState=l,function(){if((Ye&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},Yh={readContext:Rt,use:sc,useCallback:Oh,useContext:Rt,useEffect:Nr,useImperativeHandle:Ch,useInsertionEffect:Th,useLayoutEffect:Eh,useMemo:wh,useReducer:cc,useRef:_h,useState:function(){return cc(ra)},useDebugValue:Tr,useDeferredValue:function(e,t){var l=yt();return Dh(l,Pe.memoizedState,e,t)},useTransition:function(){var e=cc(ra)[0],t=yt().memoizedState;return[typeof e=="boolean"?e:Gi(e),t]},useSyncExternalStore:ch,useId:Uh,useHostTransitionStatus:Cr,useFormState:xh,useActionState:xh,useOptimistic:function(e,t){var l=yt();return hh(l,Pe,e,t)},useMemoCache:xr,useCacheRefresh:$h,useEffectEvent:Nh},Lb={readContext:Rt,use:sc,useCallback:Oh,useContext:Rt,useEffect:Nr,useImperativeHandle:Ch,useInsertionEffect:Th,useLayoutEffect:Eh,useMemo:wh,useReducer:Sr,useRef:_h,useState:function(){return Sr(ra)},useDebugValue:Tr,useDeferredValue:function(e,t){var l=yt();return Pe===null?Er(l,e,t):Dh(l,Pe.memoizedState,e,t)},useTransition:function(){var e=Sr(ra)[0],t=yt().memoizedState;return[typeof e=="boolean"?e:Gi(e),t]},useSyncExternalStore:ch,useId:Uh,useHostTransitionStatus:Cr,useFormState:Sh,useActionState:Sh,useOptimistic:function(e,t){var l=yt();return Pe!==null?hh(l,Pe,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:xr,useCacheRefresh:$h,useEffectEvent:Nh};function wr(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:ee({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var Dr={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=ml(),i=Ea(a);i.payload=t,l!=null&&(i.callback=l),t=Aa(e,i,a),t!==null&&(tl(t,e,a),Bi(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=ml(),i=Ea(a);i.tag=1,i.payload=t,l!=null&&(i.callback=l),t=Aa(e,i,a),t!==null&&(tl(t,e,a),Bi(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=ml(),a=Ea(l);a.tag=2,t!=null&&(a.callback=t),t=Aa(e,a,l),t!==null&&(tl(t,e,l),Bi(t,e,l))}};function Gh(e,t,l,a,i,c,d){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,c,d):t.prototype&&t.prototype.isPureReactComponent?!Oi(l,a)||!Oi(i,c):!0}function Vh(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&&Dr.enqueueReplaceState(t,t.state,null)}function hn(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=ee({},l));for(var i in e)l[i]===void 0&&(l[i]=e[i])}return l}function Xh(e){qs(e)}function Qh(e){console.error(e)}function Zh(e){qs(e)}function fc(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Kh(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 Rr(e,t,l){return l=Ea(l),l.tag=3,l.payload={element:null},l.callback=function(){fc(e,t)},l}function Jh(e){return e=Ea(e),e.tag=3,e}function Fh(e,t,l,a){var i=l.type.getDerivedStateFromError;if(typeof i=="function"){var c=a.value;e.payload=function(){return i(c)},e.callback=function(){Kh(t,l,a)}}var d=l.stateNode;d!==null&&typeof d.componentDidCatch=="function"&&(e.callback=function(){Kh(t,l,a),typeof i!="function"&&(Ua===null?Ua=new Set([this]):Ua.add(this));var y=a.stack;this.componentDidCatch(a.value,{componentStack:y!==null?y:""})})}function Yb(e,t,l,a,i){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&nn(t,l,i,!0),l=zt.current,l!==null){switch(l.tag){case 31:case 13:case 19:return Yt===null?Rc():l.alternate===null&&ft===0&&(ft=3),l.flags&=-257,l.flags|=65536,l.lanes=i,a===Ws?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),bo(e,a,i)),!1;case 22:return l.flags|=65536,a===Ws?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)),bo(e,a,i)),!1}throw Error(r(435,l.tag))}return bo(e,a,i),Rc(),!1}if(Ne)return t=zt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,a!==Pu&&(e=Error(r(422),{cause:a}),Ri(xl(e,l)))):(a!==Pu&&(t=Error(r(423),{cause:a}),Ri(xl(t,l))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,a=xl(a,l),i=Rr(e.stateNode,a,i),rr(e,i),ft!==4&&(ft=2)),!1;var c=Error(r(520),{cause:a});if(c=xl(c,l),Wi===null?Wi=[c]:Wi.push(c),ft!==4&&(ft=2),t===null)return!0;a=xl(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=i&-i,l.lanes|=e,e=Rr(l.stateNode,a,e),rr(l,e),!1;case 1:if(t=l.type,c=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(Ua===null||!Ua.has(c))))return l.flags|=65536,i&=-i,l.lanes|=i,i=Jh(i),Fh(i,e,l,a),rr(l,i),!1;break;case 22:if(l.memoizedState!==null)return l.flags|=65536,!1}l=l.return}while(l!==null);return!1}var zr=Error(r(461)),jt=!1;function _t(e,t,l,a){t.child=e===null?eh(t,null,l,a):dn(t,e.child,l,a)}function Ih(e,t,l,a,i){l=l.render;var c=t.ref;if("ref"in a){var d={};for(var y in a)y!=="ref"&&(d[y]=a[y])}else d=a;return sn(t),a=yr(e,t,l,d,c,i),y=gr(),e!==null&&!jt?(br(e,t,i),oa(e,t,i)):(Ne&&y&&Xs(t),t.flags|=1,_t(e,t,a,i),t.child)}function Wh(e,t,l,a,i){if(e===null){var c=l.type;return typeof c=="function"&&!Ju(c)&&c.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=c,Ph(e,t,c,a,i)):(e=Gs(l.type,null,a,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!Yr(e,i)){var d=c.memoizedProps;if(l=l.compare,l=l!==null?l:Oi,l(d,a)&&e.ref===t.ref)return oa(e,t,i)}return t.flags|=1,e=na(c,a),e.ref=t.ref,e.return=t,t.child=e}function Ph(e,t,l,a,i){if(e!==null){var c=e.memoizedProps;if(Oi(c,a)&&e.ref===t.ref)if(jt=!1,t.pendingProps=a=c,Yr(e,i))(e.flags&131072)!==0&&(jt=!0);else return t.lanes=e.lanes,oa(e,t,i)}return Mr(e,t,l,a,i)}function em(e,t,l,a){var i=a.children,c=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(c=c!==null?c.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&~c}else a=0,t.child=null;return tm(e,t,c,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Fs(t,c!==null?c.cachePool:null),c!==null?ah(t,c):dr(),nh(t);else return a=t.lanes=536870912,tm(e,t,c!==null?c.baseLanes|l:l,l,a)}else c!==null?(Fs(t,c.cachePool),ah(t,c),wa(),t.memoizedState=null):(e!==null&&Fs(t,null),dr(),wa());return _t(e,t,i,l),t.child}function Xi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function tm(e,t,l,a,i){var c=ir();return c=c===null?null:{parent:pt._currentValue,pool:c},t.memoizedState={baseLanes:l,cachePool:c},e!==null&&Fs(t,null),dr(),nh(t),e!==null&&nn(e,t,a,!0),t.childLanes=i,null}function hc(e,t){return t=mc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function lm(e,t,l){return dn(t,e.child,null,l),e=hc(t,t.pendingProps),e.flags|=2,ol(t),t.memoizedState=null,e}function Gb(e,t,l){var a=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ne){if(a.mode==="hidden")return e=hc(t,a),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Xi(null,e);if(hr(t),(e=nt)?(e=Av(e,_l),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ja!==null?{id:Hl,overflow:Ll}:null,retryLane:536870912,hydrationErrors:null},l=qf(e),l.return=t,t.child=l,Et=t,nt=null)):e=null,e===null)throw _a(t);return t.lanes=536870912,null}return hc(t,a)}var c=e.memoizedState;if(c!==null){var d=c.dehydrated;if(hr(t),i)if(t.flags&256)t.flags&=-257,t=lm(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(jt||nn(e,t,l,!1),i=(l&e.childLanes)!==0,jt||i){if(Ca.current===null){if(a=tt,a!==null&&(d=Ld(a,l),d!==0&&d!==c.retryLane))throw c.retryLane=d,en(e,d),tl(a,e,d),zr;Rc()}t=lm(e,t,l)}else e=c.treeContext,nt=Nl(d.nextSibling),Et=t,Ne=!0,Sa=null,_l=!1,e!==null&&Yf(t,e),t=hc(t,a),t.flags|=134221824;return t}return e=na(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Gn(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 Mr(e,t,l,a,i){return sn(t),l=yr(e,t,l,a,void 0,i),a=gr(),e!==null&&!jt?(br(e,t,i),oa(e,t,i)):(Ne&&a&&Xs(t),t.flags|=1,_t(e,t,l,i),t.child)}function am(e,t,l,a,i,c){return sn(t),t.updateQueue=null,l=sh(t,a,l,i),ih(e),a=gr(),e!==null&&!jt?(br(e,t,c),oa(e,t,c)):(Ne&&a&&Xs(t),t.flags|=1,_t(e,t,l,c),t.child)}function nm(e,t,l,a,i){if(sn(t),t.stateNode===null){var c=Rn,d=l.contextType;typeof d=="object"&&d!==null&&(c=Rt(d)),c=new l(a,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=Dr,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=a,c.state=t.memoizedState,c.refs={},cr(t),d=l.contextType,c.context=typeof d=="object"&&d!==null?Rt(d):Rn,c.state=t.memoizedState,d=l.getDerivedStateFromProps,typeof d=="function"&&(wr(t,l,d,a),c.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(d=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),d!==c.state&&Dr.enqueueReplaceState(c,c.state,null),Hi(t,a,c,i),qi(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){c=t.stateNode;var y=t.memoizedProps,S=hn(l,y);c.props=S;var D=c.context,U=l.contextType;d=Rn,typeof U=="object"&&U!==null&&(d=Rt(U));var L=l.getDerivedStateFromProps;U=typeof L=="function"||typeof c.getSnapshotBeforeUpdate=="function",y=t.pendingProps!==y,U||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(y||D!==d)&&Vh(t,c,a,d),Ta=!1;var O=t.memoizedState;c.state=O,Hi(t,a,c,i),qi(),D=t.memoizedState,y||O!==D||Ta?(typeof L=="function"&&(wr(t,l,L,a),D=t.memoizedState),(S=Ta||Gh(t,l,S,a,O,D,d))?(U||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=D),c.props=a,c.state=D,c.context=d,a=S):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{c=t.stateNode,ur(e,t),d=t.memoizedProps,U=hn(l,d),c.props=U,L=t.pendingProps,O=c.context,D=l.contextType,S=Rn,typeof D=="object"&&D!==null&&(S=Rt(D)),y=l.getDerivedStateFromProps,(D=typeof y=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(d!==L||O!==S)&&Vh(t,c,a,S),Ta=!1,O=t.memoizedState,c.state=O,Hi(t,a,c,i),qi();var M=t.memoizedState;d!==L||O!==M||Ta||e!==null&&e.dependencies!==null&&Ks(e.dependencies)?(typeof y=="function"&&(wr(t,l,y,a),M=t.memoizedState),(U=Ta||Gh(t,l,U,a,O,M,S)||e!==null&&e.dependencies!==null&&Ks(e.dependencies))?(D||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(a,M,S),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(a,M,S)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||d===e.memoizedProps&&O===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&O===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=M),c.props=a,c.state=M,c.context=S,a=U):(typeof c.componentDidUpdate!="function"||d===e.memoizedProps&&O===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&O===e.memoizedState||(t.flags|=1024),a=!1)}return c=a,Gn(e,t),a=(t.flags&128)!==0,c||a?(c=t.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&a?(t.child=dn(t,e.child,null,i),t.child=dn(t,null,l,i)):_t(e,t,l,i),t.memoizedState=c.state,e=t.child):e=oa(e,t,i),e}function im(e,t,l,a){return ln(),t.flags|=256,_t(e,t,l,a),t.child}var Ur={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function $r(e){return{baseLanes:e,cachePool:Kf()}}function Br(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=hl),e}function sm(e,t,l){var a=t.pendingProps,i=!1,c=(t.flags&128)!==0,d;if((d=c)||(d=e!==null&&e.memoizedState===null?!1:(Mt.current&2)!==0),d&&(i=!0,t.flags&=-129),d=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ne){if(i?Oa(t):wa(),(e=nt)?(e=Av(e,_l),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ja!==null?{id:Hl,overflow:Ll}:null,retryLane:536870912,hydrationErrors:null},l=qf(e),l.return=t,t.child=l,Et=t,nt=null)):e=null,e===null)throw _a(t);return Bo(e)?t.lanes=32:t.lanes=536870912,null}return c=a.children,a=a.fallback,i?(wa(),i=t.mode,c=mc({mode:"hidden",children:c},i),a=tn(a,i,l,null),c.return=t,a.return=t,c.sibling=a,t.child=c,a=t.child,a.memoizedState=$r(l),a.childLanes=Br(e,d,l),t.memoizedState=Ur,Xi(null,a)):(Oa(t),qr(t,c))}var y=e.memoizedState;if(y!==null){var S=y.dehydrated;if(S!==null)return Vb(e,t,c,d,a,S,y,l)}return i?(wa(),i=a.fallback,c=t.mode,y=e.child,S=y.sibling,a=na(y,{mode:"hidden",children:a.children}),a.subtreeFlags=y.subtreeFlags&1206910976,S!==null?i=na(S,i):(i=tn(i,c,l,null),i.flags|=2),i.return=t,a.return=t,a.sibling=i,t.child=a,Xi(null,a),a=t.child,i=e.child.memoizedState,i===null?i=$r(l):(c=i.cachePool,c!==null?(y=pt._currentValue,c=c.parent!==y?{parent:y,pool:y}:c):c=Kf(),i={baseLanes:i.baseLanes|l,cachePool:c}),a.memoizedState=i,a.childLanes=Br(e,d,l),t.memoizedState=Ur,Xi(e.child,a)):(Oa(t),l=e.child,e=l.sibling,l=na(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(d=t.deletions,d===null?(t.deletions=[e],t.flags|=16):d.push(e)),t.child=l,t.memoizedState=null,l)}function qr(e,t){return t=mc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function mc(e,t){return e=It(22,e,null,t),e.lanes=0,e}function vc(e,t,l){return dn(t,e.child,null,l),e=qr(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Vb(e,t,l,a,i,c,d,y){if(l)return t.flags&256?(Oa(t),t.flags&=-257,vc(e,t,y)):t.memoizedState!==null?(wa(),t.child=e.child,t.flags|=128,null):(wa(),c=i.fallback,d=t.mode,i=mc({mode:"visible",children:i.children},d),c=tn(c,d,y,null),c.flags|=2,i.return=t,c.return=t,i.sibling=c,t.child=i,dn(t,e.child,null,y),i=t.child,i.memoizedState=$r(y),i.childLanes=Br(e,a,y),t.memoizedState=Ur,Xi(null,i));if(Oa(t),Bo(c)){if(a=c.nextSibling&&c.nextSibling.dataset,a)var S=a.dgst;return a=S,a!==""&&(i=Error(r(419)),i.stack="",i.digest=a,Ri({value:i,source:null,stack:null})),vc(e,t,y)}if(jt||nn(e,t,y,!1),a=(y&e.childLanes)!==0,jt||a){if(Ca.current!==null)return vc(e,t,y);if(a=tt,a!==null&&(i=Ld(a,y),i!==0&&i!==d.retryLane))throw d.retryLane=i,en(e,i),tl(a,e,i),zr;return $o(c)||Rc(),vc(e,t,y)}return $o(c)?(t.flags|=192,t.child=e.child,null):(e=d.treeContext,nt=Nl(c.nextSibling),Et=t,Ne=!0,Sa=null,_l=!1,e!==null&&Yf(t,e),t=qr(t,i.children),t.flags|=134221824,t)}function cm(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Zs(e.return,t,l)}function um(e){for(var t=null;e!==null;){var l=e.alternate;l!==null&&lc(l)===null&&(t=e),e=e.sibling}return t}function yc(e,t,l,a,i,c){var d=e.memoizedState;d===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:i,treeForkCount:c}:(d.isBackwards=t,d.rendering=null,d.renderingStartTime=0,d.last=a,d.tail=l,d.tailMode=i,d.treeForkCount=c)}function Hr(e){var t=e.child;for(e.child=null;t!==null;){var l=t.sibling;t.sibling=e.child,e.child=t,t=l}}function Lr(e,t,l){var a=t.pendingProps,i=a.revealOrder,c=a.tail;a=a.children;var d=Mt.current;if(t.flags&128)return Li(t,d),null;var y=(d&2)!==0;if(y?(d=d&1|2,t.flags|=128):d&=1,Li(t,d),i==="backwards"&&e!==null?(Hr(e),_t(e,t,a,l),Hr(e)):_t(e,t,a,l),a=Ne?Di:0,!y&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&cm(e,l,t);else if(e.tag===19)cm(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"backwards":l=um(t.child),l===null?(i=t.child,t.child=null):(i=l.sibling,l.sibling=null,Hr(t)),yc(t,!0,i,null,c,a);break;case"unstable_legacy-backwards":for(l=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&lc(e)===null){t.child=i;break}e=i.sibling,i.sibling=l,l=i,i=e}yc(t,!0,l,null,c,a);break;case"together":yc(t,!1,null,null,void 0,a);break;case"independent":t.memoizedState=null;break;default:l=um(t.child),l===null?(i=t.child,t.child=null):(i=l.sibling,l.sibling=null),yc(t,!1,i,l,c,a)}return t.child}function rm(e,t,l){var a=t.pendingProps;return ka(t,t.type,a.value),_t(e,t,a.children,l),t.child}function oa(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),Ma|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(nn(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=na(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=na(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function Yr(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ks(e)))}function Xb(e,t,l){switch(t.tag){case 3:Lt(t,t.stateNode.containerInfo),ka(t,pt,e.memoizedState.cache),ln();break;case 27:case 5:vu(t);break;case 4:Lt(t,t.stateNode.containerInfo);break;case 10:ka(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,hr(t),null;break;case 13:var a=t.memoizedState;if(a!==null){if(a.dehydrated!==null)return Oa(t),t.flags|=128,null;a=nn(e,t,l,!1);var i=t.child.childLanes;return a||(l&i)!==0?sm(e,t,l):(Oa(t),e=oa(e,t,l),e!==null?e.sibling:null)}Oa(t);break;case 19:if(t.flags&128)return Lr(e,t,l);if(i=(e.flags&128)!==0,a=(l&t.childLanes)!==0,a||(nn(e,t,l,!1),a=(l&t.childLanes)!==0),i){if(a)return Lr(e,t,l);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Li(t,Mt.current),a)break;return null;case 22:return t.lanes=0,em(e,t,l,t.pendingProps);case 24:ka(t,pt,e.memoizedState.cache)}return oa(e,t,l)}function om(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)jt=!0;else{if(!Yr(e,l)&&(t.flags&128)===0)return jt=!1,Xb(e,t,l);jt=(e.flags&131072)!==0}else jt=!1,Ne&&(t.flags&1048576)!==0&&Lf(t,Di,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=rn(t.elementType),t.type=e,typeof e=="function")Ju(e)?(a=hn(e,a),t.tag=1,t=nm(null,t,e,a,l)):(t.tag=0,t=Mr(null,t,e,a,l));else{if(e!=null){var i=e.$$typeof;if(i===Y){t.tag=11,t=Ih(null,t,e,a,l);break e}else if(i===je){t.tag=14,t=Wh(null,t,e,a,l);break e}else if(i===Xe){t.tag=10,t.type=e,t=rm(null,t,l);break e}}throw t=be(e)||e,Error(r(306,t,""))}}return t;case 0:return Mr(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,i=hn(a,t.pendingProps),nm(e,t,a,i,l);case 3:e:{if(Lt(t,t.stateNode.containerInfo),e===null)throw Error(r(387));a=t.pendingProps;var c=t.memoizedState;i=c.element,ur(e,t),Hi(t,a,null,l);var d=t.memoizedState;if(a=d.cache,ka(t,pt,a),a!==c.cache&&lr(t,[pt],l,!0),qi(),a=d.element,c.isDehydrated)if(c={element:a,isDehydrated:!1,cache:d.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=im(e,t,a,l);break e}else if(a!==i){i=xl(Error(r(424)),t),Ri(i),t=im(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,nt=Nl(e.firstChild),Et=t,Ne=!0,Sa=null,_l=!0,l=eh(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|134221824,l=l.sibling;else{if(ln(),a===i){t=oa(e,t,l);break e}_t(e,t,a,l)}t=t.child}return t;case 26:return Gn(e,t),e===null?(l=Mv(t.type,null,t.pendingProps,null))?t.memoizedState=l:Ne||(t.stateNode=mv(t.type,t.pendingProps,Nt.current,t)):t.memoizedState=Mv(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return vu(t),e===null&&Ne&&(a=t.stateNode=wv(t.type,t.pendingProps,Nt.current),Et=t,_l=!0,i=nt,qa(t.type)?(qo=i,nt=Nl(a.firstChild)):nt=i),_t(e,t,t.pendingProps.children,l),Gn(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ne&&((i=a=nt)&&(a=qp(a,t.type,t.pendingProps,_l),a!==null?(t.stateNode=a,Et=t,nt=Nl(a.firstChild),_l=!1,i=!0):i=!1),i||_a(t)),vu(t),i=t.type,c=t.pendingProps,d=e!==null?e.memoizedProps:null,a=c.children,Oo(i,c)?a=null:d!==null&&Oo(i,d)&&(t.flags|=32),t.memoizedState!==null&&(i=yr(e,t,zb,null,null,l),ci._currentValue=i),Gn(e,t),_t(e,t,a,l),t.child;case 6:return e===null&&Ne&&((e=l=nt)&&(l=Hp(l,t.pendingProps,_l),l!==null?(t.stateNode=l,Et=t,nt=null,e=!0):e=!1),e||_a(t)),null;case 13:return sm(e,t,l);case 4:return Lt(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=dn(t,null,a,l):_t(e,t,a,l),t.child;case 11:return Ih(e,t,t.type,t.pendingProps,l);case 7:return a=t.pendingProps,Gn(e,t),_t(e,t,a,l),t.child;case 8:return _t(e,t,t.pendingProps.children,l),t.child;case 12:return _t(e,t,t.pendingProps.children,l),t.child;case 10:return rm(e,t,l);case 9:return i=t.type._context,a=t.pendingProps.children,sn(t),i=Rt(i),a=a(i),t.flags|=1,_t(e,t,a,l),t.child;case 14:return Wh(e,t,t.type,t.pendingProps,l);case 15:return Ph(e,t,t.type,t.pendingProps,l);case 19:return Lr(e,t,l);case 31:return Gb(e,t,l);case 22:return em(e,t,l,t.pendingProps);case 24:return sn(t),a=Rt(pt),e===null?(i=ir(),i===null&&(i=tt,c=ar(),i.pooledCache=c,c.refCount++,c!==null&&(i.pooledCacheLanes|=l),i=c),t.memoizedState={parent:a,cache:i},cr(t),ka(t,pt,i)):((e.lanes&l)!==0&&(ur(e,t),Hi(t,null,null,l),qi()),i=e.memoizedState,c=t.memoizedState,i.parent!==a?(i={parent:a,cache:a},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),ka(t,pt,a)):(a=c.cache,ka(t,pt,a),a!==i.cache&&lr(t,[pt],l,!0))),_t(e,t,t.pendingProps.children,l),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),a=t.pendingProps,a.name!=null&&a.name!=="auto"?t.flags|=e===null?18882560:18874368:Ne&&Xs(t),e!==null&&e.memoizedProps.name!==a.name?t.flags|=4194816:Gn(e,t),_t(e,t,a.children,l),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function da(e){e.flags|=4}function Gr(e,t,l,a,i){var c;if((c=(e.mode&32)!==0)&&(c=l===null?qv(t,a):qv(t,a)&&(a.src!==l.src||a.srcSet!==l.srcSet)),c){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Xm())e.flags|=8192;else throw on=Ws,sr}else e.flags&=-16777217}function dm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Hv(t))if(Xm())e.flags|=8192;else throw on=Ws,sr}function gc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Bd():536870912,e.lanes|=t,Kn|=t)}function Qi(e,t){if(!Ne)switch(e.tailMode){case"visible":break;case"collapsed":for(var l=e.tail,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;break;default:for(t=e.tail,l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null}}function it(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&1206910976,a|=i.flags&1206910976,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 Qb(e,t,l){var a=t.pendingProps;switch(Wu(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return it(t),null;case 1:return it(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),ca(pt),Bl(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Un(t)?da(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,er())),it(t),null;case 26:var i=t.type,c=t.memoizedState;return e===null?(da(t),c!==null?(it(t),dm(t,c)):(it(t),Gr(t,i,null,a,l))):c?c!==e.memoizedState?(da(t),it(t),dm(t,c)):(it(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&da(t),it(t),Gr(t,i,e,a,l)),null;case 27:if(Ss(t),l=Nt.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&da(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return it(t),t.subtreeFlags&=-33554433,null}e=at.current,Un(t)?Gf(t):(e=wv(i,a,l),t.stateNode=e,da(t))}return it(t),t.subtreeFlags&=-33554433,null;case 5:if(Ss(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&da(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return it(t),t.subtreeFlags&=-33554433,null}if(c=at.current,Un(t))Gf(t);else{var d=as(Nt.current);switch(c){case 1:c=d.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:c=d.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":c=d.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":c=d.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":c=d.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof a.is=="string"?d.createElement("select",{is:a.is}):d.createElement("select"),a.multiple?c.multiple=!0:a.size&&(c.size=a.size);break;default:c=typeof a.is=="string"?d.createElement(i,{is:a.is}):d.createElement(i)}}c[Dt]=t,c[Ft]=a;e:for(d=t.child;d!==null;){if(d.tag===5||d.tag===6)c.appendChild(d.stateNode);else if(d.tag!==4&&d.tag!==27&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===t)break e;for(;d.sibling===null;){if(d.return===null||d.return===t)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}t.stateNode=c;e:switch($t(c,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&&da(t)}}return it(t),t.subtreeFlags&=-33554433,Gr(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&da(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(r(166));if(e=Nt.current,Un(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,i=Et,i!==null)switch(i.tag){case 27:case 5:a=i.memoizedProps}e[Dt]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||ov(e.nodeValue,l)),e||_a(t,!0)}else e=as(e).createTextNode(a),e[Dt]=t,t.stateNode=e}return it(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=Un(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[Dt]=t}else ln(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;it(t),e=!1}else l=er(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(ol(t),t):(ol(t),null);if((t.flags&128)!==0)throw Error(r(558))}return it(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Un(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[Dt]=t}else ln(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;it(t),i=!1}else i=er(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(ol(t),t):(ol(t),null)}return ol(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),c=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),c!==i&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),gc(t,t.updateQueue),it(t),null);case 4:return Bl(),e===null&&No(t.stateNode.containerInfo),t.flags|=67108864,it(t),null;case 10:return ca(t.type),it(t),null;case 19:if(mr(t),a=t.memoizedState,a===null)return it(t),null;if(i=(t.flags&128)!==0,c=a.rendering,c===null)if(i)Qi(a,!1);else{if(ft!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=lc(e),c!==null){for(t.flags|=128,Qi(a,!1),e=c.updateQueue,t.updateQueue=e,gc(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Bf(l,e),l=l.sibling;return Li(t,Mt.current&1|2),Ne&&ia(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&il()>Cc&&(t.flags|=128,i=!0,Qi(a,!1),t.lanes=4194304)}else{if(!i)if(e=lc(c),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,gc(t,e),Qi(a,!0),a.tail===null&&a.tailMode!=="collapsed"&&a.tailMode!=="visible"&&!c.alternate&&!Ne)return it(t),null}else 2*il()-a.renderingStartTime>Cc&&l!==536870912&&(t.flags|=128,i=!0,Qi(a,!1),t.lanes=4194304);a.isBackwards?(c.sibling=t.child,t.child=c):(e=a.last,e!==null?e.sibling=c:t.child=c,a.last=c)}if(a.tail!==null){e=a.tail;e:{for(l=e;l!==null;){if(l.alternate!==null){l=!1;break e}l=l.sibling}l=!0}return a.rendering=e,a.tail=e.sibling,a.renderingStartTime=il(),e.sibling=null,c=Mt.current,c=i?c&1|2:c&1,a.tailMode==="visible"||a.tailMode==="collapsed"||!l||Ne?Li(t,c):(l=c,fe(zt,t),fe(Mt,l),Yt===null&&(Yt=t)),Ne&&ia(t,a.treeForkCount),e}return it(t),null;case 22:case 23:return ol(t),fr(),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&&(it(t),t.subtreeFlags&6&&(t.flags|=8192)):it(t),l=t.updateQueue,l!==null&&gc(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&&Me(un),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),ca(pt),it(t),null;case 25:return null;case 30:return t.flags|=33554432,it(t),null}throw Error(r(156,t.tag))}function Zb(e,t){switch(Wu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ca(pt),Bl(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ss(t),null;case 31:if(t.memoizedState!==null){if(ol(t),t.alternate===null)throw Error(r(340));ln()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ol(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));ln()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return mr(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return Bl(),null;case 10:return ca(t.type),null;case 22:case 23:return ol(t),fr(),e!==null&&Me(un),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ca(pt),null;case 25:return null;default:return null}}function fm(e,t){switch(Wu(t),t.tag){case 3:ca(pt),Bl();break;case 26:case 27:case 5:Ss(t);break;case 4:Bl();break;case 31:t.memoizedState!==null&&ol(t);break;case 13:ol(t);break;case 19:mr(t);break;case 10:ca(t.type);break;case 22:case 23:ol(t),fr(),e!==null&&Me(un);break;case 24:ca(pt)}}function Zi(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 c=l.create,d=l.inst;a=c(),d.destroy=a}l=l.next}while(l!==i)}}catch(y){Fe(t,t.return,y)}}function Da(e,t,l){try{var a=t.updateQueue,i=a!==null?a.lastEffect:null;if(i!==null){var c=i.next;a=c;do{if((a.tag&e)===e){var d=a.inst,y=d.destroy;if(y!==void 0){d.destroy=void 0,i=t;var S=l,D=y;try{D()}catch(U){Fe(i,S,U)}}}a=a.next}while(a!==c)}}catch(U){Fe(t,t.return,U)}}function hm(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{lh(t,l)}catch(a){Fe(e,e.return,a)}}}function mm(e,t,l){l.props=hn(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){Fe(e,t,a)}}function Yl(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:var i=e.stateNode,c=la(e.memoizedProps,i);(i.ref===null||i.ref.name!==c)&&(i.ref=jv(c)),a=i.ref;break;case 7:if(e.stateNode===null){var d=new vl(e);g(e.child,!1,$p,d,void 0,void 0),e.stateNode=d}a=e.stateNode;break;default:a=e.stateNode}typeof l=="function"?e.refCleanup=l(a):l.current=a}}catch(y){Fe(e,t,y)}}function Ut(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(i){Fe(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){Fe(e,t,i)}else l.current=null}function bc(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var l=0;l<t.length;l++)Ev(e.stateNode,t[l])}function vm(e){for(var t=e.return;t!==null&&(Xr(t)&&Ev(e.stateNode,t.stateNode),!Vr(t));)t=t.return}function Ki(e){for(var t=e.return;t!==null&&(Xr(t)&&Bp(e.stateNode,t.stateNode),!Vr(t));)t=t.return}function Vr(e){return e.tag===5||e.tag===3||e.tag===27}function Xr(e){return e&&e.tag===7&&e.stateNode!==null}function Qr(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){Fe(e,e.return,i)}}function Zr(e,t,l){try{var a=e.stateNode;pp(a,e.type,l,t),a[Ft]=t}catch(i){Fe(e,e.return,i)}}function ym(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&qa(e.type)||e.tag===4}function Kr(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ym(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&&qa(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 Jr(e,t,l,a){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(i,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(i),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=ql)),bc(e,a),He=!0;else if(i!==4&&(i===27&&(bc(e,a),a=null,qa(e.type)&&(l=e.stateNode,t=null)),e=e.child,e!==null))for(Jr(e,t,l,a),e=e.sibling;e!==null;)Jr(e,t,l,a),e=e.sibling}function pc(e,t,l,a){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?l.insertBefore(i,t):l.appendChild(i),bc(e,a),He=!0;else if(i!==4&&(i===27&&(bc(e,a),a=null,qa(e.type)&&(l=e.stateNode)),e=e.child,e!==null))for(pc(e,t,l,a),e=e.sibling;e!==null;)pc(e,t,l,a),e=e.sibling}function gm(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);$t(t,a,l),t[Dt]=e,t[Ft]=l}catch(c){Fe(e,e.return,c)}}var xc=!1,dl=null;function bm(e){(e.tag===30||(e.subtreeFlags&33554432)!==0)&&(xc=!0)}var Gl=null;function pm(){var e=Gl;return Gl=null,e}var Wt=0;function Vn(e,t,l,a,i){return Wt=0,xm(e.child,t,l,a,i)}function xm(e,t,l,a,i){for(var c=!1;e!==null;){if(e.tag===5){var d=e.stateNode;if(a!==null){var y=Ro(d);a.push(y),y.view&&(c=!0)}else c||Ro(d).view&&(c=!0);xc=!0,pv(d,Wt===0?t:t+"_"+Wt,l),Wt++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&i||xm(e.child,t,l,a,i)&&(c=!0));e=e.sibling}return c}function Vl(e,t){for(;e!==null;)e.tag===5?xv(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||Vl(e.child,t)),e=e.sibling}function jc(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(jc(e),e.tag===30&&(e.flags&18874368)!==0&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name==="auto")throw Error(r(544));var l=t.name;t=aa(t.default,t.share),t!=="none"&&(Vn(e,l,t,null,!1)||Vl(e.child,!1))}e=e.sibling}}function Fr(e,t){if(e.tag===30){var l=e.stateNode,a=e.memoizedProps,i=la(a,l),c=aa(a.default,l.paired?a.share:a.enter);c!=="none"?Vn(e,i,c,null,!1)?(jc(e),l.paired||t||Wn(e,a.onEnter)):Vl(e.child,!1):jc(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Fr(e,t),e=e.sibling;else jc(e)}function Ir(e){if(dl!==null&&dl.size!==0){var t=dl;if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var l=e.memoizedProps,a=l.name;if(a!=null&&a!=="auto"){var i=t.get(a);if(i!==void 0){var c=aa(l.default,l.share);if(c!=="none"&&(Vn(e,a,c,null,!1)?(c=e.stateNode,i.paired=c,c.paired=i,Wn(e,l.onShare)):Vl(e.child,!1)),t.delete(a),t.size===0)break}}}Ir(e)}e=e.sibling}}}function Wr(e){if(e.tag===30){var t=e.memoizedProps,l=la(t,e.stateNode),a=dl!==null?dl.get(l):void 0,i=aa(t.default,a!==void 0?t.share:t.exit);i!=="none"&&(Vn(e,l,i,null,!1)?a!==void 0?(i=e.stateNode,a.paired=i,i.paired=a,dl.delete(l),Wn(e,t.onShare)):Wn(e,t.onExit):Vl(e.child,!1)),dl!==null&&Ir(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Wr(e),e=e.sibling;else dl!==null&&Ir(e)}function jm(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,l=la(t,e.stateNode);t=aa(t.default,t.update),e.flags&=-5,t!=="none"&&Vn(e,l,t,e.memoizedState=[],!1)}else(e.subtreeFlags&33554432)!==0&&jm(e);e=e.sibling}}function Pr(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var t=e.stateNode;t.paired!==null&&(t.paired=null,Vl(e.child,!1))}Pr(e)}e=e.sibling}}function Sc(e){if(e.tag===30)e.stateNode.paired=null,Vl(e.child,!1),Pr(e);else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Sc(e),e=e.sibling;else Pr(e)}function Sm(e){for(e=e.child;e!==null;)e.tag===30?Vl(e.child,!1):(e.subtreeFlags&33554432)!==0&&Sm(e),e=e.sibling}function eo(e,t,l,a,i,c,d){for(var y=!1;t!==null;){if(t.tag===5){var S=t.stateNode;if(c!==null&&Wt<c.length){var D=c[Wt],U=Ro(S);(D.view||U.view)&&(y=!0);var L;if(L=(e.flags&4)===0)if(U.clip)L=!0;else{L=D.rect;var O=U.rect;L=L.y!==O.y||L.x!==O.x||L.height!==O.height||L.width!==O.width}L&&(e.flags|=4),U.abs?U=!D.abs:(D=D.rect,U=U.rect,U=D.height!==U.height||D.width!==U.width),U&&(e.flags|=32)}else e.flags|=32;(e.flags&4)!==0&&pv(S,Wt===0?l:l+"_"+Wt,i),y&&(e.flags&4)!==0||(Gl===null&&(Gl=[]),Gl.push(S,Wt===0?a:a+"_"+Wt,t.memoizedProps)),Wt++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&d?e.flags|=t.flags&32:eo(e,t.child,l,a,i,c,d)&&(y=!0));t=t.sibling}return y}function _m(e,t){for(e=e.child;e!==null;){if(e.tag===30){var l=e.memoizedProps,a=e.stateNode,i=la(l,a),c=aa(l.default,l.update),d;d=e.memoizedState,e.memoizedState=null,a=e;var y=e.child;Wt=0,i=eo(a,y,i,i,c,d,!1),(e.flags&4)!==0&&i&&Wn(e,l.onUpdate)}else(e.subtreeFlags&33554432)!==0&&_m(e);e=e.sibling}}var At=!1,Qe=!1,Xl=!1,to=!1,km=typeof WeakSet=="function"?WeakSet:Set,Ct=null,Ql=!1,Ji=!1,_c=!1,lo=!1;function Kb(e,t,l){if(e=e.containerInfo,Ao=ui,e=Af(e),Yu(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var i=a.getSelection&&a.getSelection();if(i&&i.rangeCount!==0){a=i.anchorNode;var c=i.anchorOffset,d=i.focusNode;i=i.focusOffset;try{a.nodeType,d.nodeType}catch{a=null;break e}var y=0,S=-1,D=-1,U=0,L=0,O=e,M=null;t:for(;;){for(var I;O!==a||c!==0&&O.nodeType!==3||(S=y+c),O!==d||i!==0&&O.nodeType!==3||(D=y+i),O.nodeType===3&&(y+=O.nodeValue.length),(I=O.firstChild)!==null;)M=O,O=I;for(;;){if(O===e)break t;if(M===a&&++U===c&&(S=y),M===d&&++L===i&&(D=y),(I=O.nextSibling)!==null)break;O=M,M=O.parentNode}O=I}a=S===-1||D===-1?null:{start:S,end:D}}else a=null}a=a||{start:0,end:0}}else a=null;for(Co={focusedElem:e,selectionRange:a},ui=!1,l=(l&335544064)===l,Ct=t,t=l?9270:1024;Ct!==null;){if(e=Ct,l&&(a=e.deletions,a!==null))for(c=0;c<a.length;c++)l&&Wr(a[c]);if(e.alternate===null&&(e.flags&2)!==0)l&&bm(e),kc(l);else{if(e.tag===22){if(a=e.alternate,e.memoizedState!==null){a!==null&&a.memoizedState===null&&l&&Wr(a),kc(l);continue}else if(a!==null&&a.memoizedState!==null){l&&bm(e),kc(l);continue}}a=e.child,(e.subtreeFlags&t)!==0&&a!==null?(a.return=e,Ct=a):(l&&jm(e),kc(l))}}dl=null}function kc(e){for(;Ct!==null;){var t=Ct,l=e,a=t.alternate,i=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if((i&1024)!==0&&a!==null){l=void 0,i=a.memoizedProps,a=a.memoizedState;var c=t.stateNode;try{var d=hn(t.type,i);l=c.getSnapshotBeforeUpdate(d,a),c.__reactInternalSnapshotBeforeUpdate=l}catch(y){Fe(t,t.return,y)}}break;case 3:if((i&1024)!==0){if(a=t.stateNode.containerInfo,l=a.nodeType,l===9)Uo(a);else if(l===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":Uo(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:l&&a!==null&&(l=la(a.memoizedProps,a.stateNode),i=t.memoizedProps,i=aa(i.default,i.update),i!=="none"&&Vn(a,l,i,a.memoizedState=[],!0));break;default:if((i&1024)!==0)throw Error(r(163))}if(a=t.sibling,a!==null){a.return=t.return,Ct=a;break}Ct=t.return}}function Nm(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:Zl(e,l),a&4&&Zi(5,l);break;case 1:if(Zl(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(d){Fe(l,l.return,d)}else{var i=hn(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(d){Fe(l,l.return,d)}}a&64&&hm(l),a&512&&Yl(l,l.return);break;case 3:if(Zl(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{lh(e,t)}catch(d){Fe(l,l.return,d)}}break;case 27:t===null&&a&4&&gm(l);case 26:case 5:Zl(e,l),t===null&&a&4&&Qr(l),a&512&&Yl(l,l.return);break;case 12:Zl(e,l);break;case 31:Zl(e,l),a&4&&Cm(e,l);break;case 13:Zl(e,l),a&4&&Om(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=sp.bind(null,l),Lp(e,l))));break;case 22:if(a=l.memoizedState!==null||At,!a){var c=t!==null&&t.memoizedState!==null||Qe;t=At,i=Qe,At=a,(Qe=c)&&!i?(a=2,(l.subtreeFlags&8772)!==0&&(a|=1),Dl(e,l,a)):Zl(e,l),At=t,Qe=i}break;case 30:Zl(e,l),a&512&&Yl(l,l.return);break;case 7:a&512&&Yl(l,l.return);default:Zl(e,l)}}function ao(e,t){for(e=e.child;e!==null;)Tm(e,t),e=e.sibling}function Tm(e,t){switch(e.tag){case 5:case 26:try{var l=e.stateNode;if(t){var a=l.style;typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"}else{var i=e.stateNode,c=e.memoizedProps.style,d=c!=null&&c.hasOwnProperty("display")?c.display:null;i.style.display=d==null||typeof d=="boolean"?"":(""+d).trim()}}catch(S){Fe(e,e.return,S)}no(e,t);break;case 6:try{e.stateNode.nodeValue=t?"":e.memoizedProps,He=!0}catch(S){Fe(e,e.return,S)}break;case 18:try{var y=e.stateNode;t?bv(y,!0):bv(e.stateNode,!1)}catch(S){Fe(e,e.return,S)}break;case 22:case 23:e.memoizedState===null&&ao(e,t);break;default:ao(e,t)}}function no(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){e:{var l=e,a=t;switch(l.tag){case 4:Tm(l,a);break e;case 22:l.memoizedState===null&&no(l,a);break e;default:no(l,a)}}e=e.sibling}}function Em(e){var t=e.alternate;t!==null&&(e.alternate=null,Em(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Cs(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 rt=null,Pt=!1;function Ol(e,t,l){for(l=l.child;l!==null;)Am(e,t,l),l=l.sibling}function Am(e,t,l){if(sl&&typeof sl.onCommitFiberUnmount=="function")try{sl.onCommitFiberUnmount(bi,l)}catch{}switch(l.tag){case 26:Qe||Ut(l,t),Ol(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&!Qe&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Qe||Ut(l,t),Ki(l);var a=rt,i=Pt;qa(l.type)&&(rt=l.stateNode,Pt=!1),Ol(e,t,l),Dv(l.stateNode,l.type,l.memoizedProps),rt=a,Pt=i;break;case 5:Qe||Ut(l,t),Ki(l);case 6:if(l.tag===6&&Ki(l),a=rt,i=Pt,rt=null,Ol(e,t,l),rt=a,Pt=i,rt!==null)if(Pt)try{(rt.nodeType===9?rt.body:rt.nodeName==="HTML"?rt.ownerDocument.body:rt).removeChild(l.stateNode),He=!0}catch(c){Fe(l,t,c)}else try{rt.removeChild(l.stateNode),He=!0}catch(c){Fe(l,t,c)}break;case 18:rt!==null&&(Pt?(e=rt,gv(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),ri(e)):gv(rt,l.stateNode));break;case 4:a=rt,i=Pt,rt=l.stateNode.containerInfo,Pt=!0,Ol(e,t,l),rt=a,Pt=i;break;case 0:case 11:case 14:case 15:Da(2,l,t),Qe||Da(4,l,t),Ol(e,t,l);break;case 1:Qe||(Ut(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&mm(l,t,a)),Ol(e,t,l);break;case 21:Ol(e,t,l);break;case 22:Qe=(a=Qe)||l.memoizedState!==null,Ol(e,t,l),Qe=a;break;case 30:Ut(l,t),Ol(e,t,l);break;case 7:Qe||Ut(l,t),Ol(e,t,l);break;default:Ol(e,t,l)}}function Cm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ri(e)}catch(l){Fe(t,t.return,l)}}}function Om(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ri(e)}catch(l){Fe(t,t.return,l)}}function Jb(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new km),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new km),t;default:throw Error(r(435,e.tag))}}function Nc(e,t){var l=Jb(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var i=cp.bind(null,e,a);a.then(i,i)}})}function Xt(e,t,l){var a=t.deletions;if(a!==null)for(var i=0;i<a.length;i++){var c=a[i],d=e,y=t,S=y;e:for(;S!==null;){switch(S.tag){case 27:if(qa(S.type)){rt=S.stateNode,Pt=!1;break e}break;case 5:rt=S.stateNode,Pt=!1;break e;case 3:case 4:rt=S.stateNode.containerInfo,Pt=!0;break e}S=S.return}if(rt===null)throw Error(r(160));Am(d,y,c),rt=null,Pt=!1,d=c.alternate,d!==null&&(d.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)wm(t,e,l),t=t.sibling}var wl=null;function wm(e,t,l){var a=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(i&4&&(a=e.updateQueue,a=a!==null?a.events:null,a!==null))for(var c=0;c<a.length;c++){var d=a[c];d.ref.impl=d.nextImpl}Xt(t,e,l),Qt(e),i&4&&(Da(3,e,e.return),Zi(3,e),Da(5,e,e.return));break;case 1:Xt(t,e,l),Qt(e),i&512&&(Qe||a===null||Ut(a,a.return)),i&64&&At&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?t:l.concat(t))));break;case 26:if(c=wl,Xt(t,e,l),Qt(e),i&512&&(Qe||a===null||Ut(a,a.return)),i&4)if(i=a!==null?a.memoizedState:null,l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null)if(At)e.stateNode=mv(e.type,e.memoizedProps,t.containerInfo,e);else{e:{t=e.type,l=e.memoizedProps,i=c.ownerDocument||c;t:switch(t){case"title":a=i.getElementsByTagName("title")[0],(!a||a[ji]||a[Dt]||a.namespaceURI==="http://www.w3.org/2000/svg"||a.hasAttribute("itemprop"))&&(a=i.createElement(t),i.head.insertBefore(a,i.querySelector("head > title"))),$t(a,t,l),a[Dt]=e,Tt(a),t=a;break e;case"link":if(c=Bv("link","href",i).get(t+(l.href||""))){for(d=0;d<c.length;d++)if(a=c[d],a.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&a.getAttribute("rel")===(l.rel==null?null:l.rel)&&a.getAttribute("title")===(l.title==null?null:l.title)&&a.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){c.splice(d,1);break t}}a=i.createElement(t),$t(a,t,l),i.head.appendChild(a);break;case"meta":if(c=Bv("meta","content",i).get(t+(l.content||""))){for(d=0;d<c.length;d++)if(a=c[d],a.getAttribute("content")===(l.content==null?null:""+l.content)&&a.getAttribute("name")===(l.name==null?null:l.name)&&a.getAttribute("property")===(l.property==null?null:l.property)&&a.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&a.getAttribute("charset")===(l.charSet==null?null:l.charSet)){c.splice(d,1);break t}}a=i.createElement(t),$t(a,t,l),i.head.appendChild(a);break;default:throw Error(r(468,t))}a[Dt]=e,Tt(a),t=a}e.stateNode=t}else At||Go(c,e.type,e.stateNode);else e.stateNode=$v(c,l,e.memoizedProps);else i!==l?(i===null?(t=a.stateNode,t===null||Qe||t.parentNode.removeChild(t)):i.count--,l===null?At||Go(c,e.type,e.stateNode):$v(c,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Zr(e,e.memoizedProps,a.memoizedProps);break;case 27:Xt(t,e,l),Qt(e),i&512&&(Qe||a===null||Ut(a,a.return)),a!==null&&i&4&&Zr(e,e.memoizedProps,a.memoizedProps);break;case 5:if(c=Xl,Xl=!1,Xt(t,e,l),Xl=c,Qt(e),i&512&&(Qe||a===null||Ut(a,a.return)),e.flags&32){t=e.stateNode;try{Tn(t,""),He=!0}catch(U){Fe(e,e.return,U)}}i&4&&e.stateNode!=null&&(t=e.memoizedProps,Zr(e,t,a!==null?a.memoizedProps:t)),i&1024&&(to=!0);break;case 6:if(Xt(t,e,l),Qt(e),i&4){if(e.stateNode===null)throw Error(r(162));t=e.memoizedProps,l=e.stateNode;try{l.nodeValue=t,He=!0}catch(U){Fe(e,e.return,U)}}break;case 3:if(He=!1,Hc=null,c=wl,wl=ns(t.containerInfo),Xt(t,e,l),wl=c,Qt(e),i&4&&a!==null&&a.memoizedState.isDehydrated)try{ri(t.containerInfo)}catch(U){Fe(e,e.return,U)}to&&(to=!1,Dm(e)),He=!1;break;case 4:i=Xl,Xl=At,a=Id(),c=wl,wl=ns(e.stateNode.containerInfo),Xt(t,e,l),Qt(e),wl=c,He&&Ji&&(_c=!0),He=a,Xl=i;break;case 12:Xt(t,e,l),Qt(e);break;case 31:Xt(t,e,l),Qt(e),i&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Nc(e,t)));break;case 13:Xt(t,e,l),Qt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Ac=il()),i&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Nc(e,t)));break;case 22:c=e.memoizedState!==null,d=a!==null&&a.memoizedState!==null;var y=At,S=Qe,D=Xl;At=y||c,Xl=D||c,Qe=S||d,Xt(t,e,l),Qe=S,Xl=D,At=y,Qt(e),i&8192&&(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,!c||a===null||d||At||Qe||(t=d||Qe,l=At,a=Qe,At=c||At,Qe=t,Ra(e,2),At=l,Qe=a),!c&&Xl||ao(e,c)),i&4&&(t=e.updateQueue,t!==null&&(l=t.retryQueue,l!==null&&(t.retryQueue=null,Nc(e,l))));break;case 19:Xt(t,e,l),Qt(e),i&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Nc(e,t)));break;case 30:i&512&&(Qe||a===null||Ut(a,a.return)),i=Id(),c=Ji,d=(l&335544064)===l,y=e.memoizedProps,Ji=d&&aa(y.default,y.update)!=="none",Xt(t,e,l),Qt(e),d&&a!==null&&He&&(e.flags|=4),Ji=c,He=i;break;case 21:break;case 7:i&512&&(Qe||a===null||Ut(a,a.return)),a&&a.stateNode!==null&&(a.stateNode._fragmentFiber=e);default:Xt(t,e,l),Qt(e)}}function Qt(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(ym(a)){l=a;break}a=a.return}a=null;for(var i=e.return;i!==null;){if(Xr(i)){var c=i.stateNode;a===null?a=[c]:a.push(c)}if(Vr(i))break;i=i.return}var d=a;if(l==null)throw Error(r(160));switch(l.tag){case 27:var y=l.stateNode,S=Kr(e);pc(e,S,y,d);break;case 5:var D=l.stateNode;l.flags&32&&(Tn(D,""),l.flags&=-33);var U=Kr(e);pc(e,U,D,d);break;case 3:case 4:var L=l.stateNode.containerInfo,O=Kr(e);Jr(e,O,L,d);break;default:throw Error(r(161))}}catch(M){Fe(e,e.return,M)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Dm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Dm(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,ui=!0,t.reset(),ui=!1),e=e.sibling}}function Xn(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Rm(t,e),t=t.sibling;else _m(t)}function Rm(e,t){var l=e.alternate;if(l===null)Fr(e,!1);else switch(e.tag){case 3:if(lo=Ql=!1,pm(),Xn(t,e),!Ql&&!_c){if(e=Gl,e!==null)for(var a=0;a<e.length;a+=3){l=e[a];var i=e[a+1];xv(l,e[a+2]),l=l.ownerDocument.documentElement,l!==null&&l.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+i+")"})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===""&&(e.style.viewTransitionName="none",e.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),lo=!0}Gl=null;break;case 5:Xn(t,e);break;case 4:a=Ql,Ql=!1,Xn(t,e),Ql&&(_c=!0),Ql=a;break;case 22:e.memoizedState===null&&(l.memoizedState!==null?Fr(e,!1):Xn(t,e));break;case 30:a=Ql,i=pm(),Ql=!1,Xn(t,e),Ql&&(e.flags|=4);var c=e.memoizedProps,d=e.stateNode;t=la(c,d),d=la(l.memoizedProps,d);var y=aa(c.default,c.update);y==="none"?t=!1:(c=l.memoizedState,l.memoizedState=null,l=e.child,Wt=0,t=eo(e,l,t,d,y,c,!0),Wt!==(c===null?0:c.length)&&(e.flags|=32)),(e.flags&4)!==0&&t?(Wn(e,e.memoizedProps.onUpdate),Gl=i):i!==null&&(i.push.apply(i,Gl),Gl=i),Ql=(e.flags&32)!==0?!0:a;break;default:Xn(t,e)}}function Zl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Nm(e,t.alternate,t),t=t.sibling}function Ra(e,t){for(e=e.child;e!==null;){var l=e,a=t;switch(l.tag){case 0:case 11:case 14:case 15:Da(4,l,l.return),Ra(l,a);break;case 1:Ut(l,l.return);var i=l.stateNode;typeof i.componentWillUnmount=="function"&&mm(l,l.return,i),Ra(l,a);break;case 27:(a&2)!==0&&Dv(l.stateNode,l.type,l.memoizedProps);case 5:Ut(l,l.return),l.tag!==5&&l.tag!==27||Ki(l),Ra(l,a);break;case 6:Ki(l);break;case 26:Ut(l,l.return),i=l.stateNode,l.memoizedState!==null||i===null||Qe||i.parentNode.removeChild(i),Ra(l,a);break;case 22:l.memoizedState===null&&Ra(l,a);break;case 30:Ut(l,l.return),Ra(l,a);break;case 7:Ut(l,l.return);default:Ra(l,a)}e=e.sibling}}function Dl(e,t,l){for(l=(t.subtreeFlags&8772)!==0?l:l&-2,t=t.child;t!==null;){var a=t.alternate,i=e,c=t,d=c.flags,y=(l&1)!==0;switch(c.tag){case 0:case 11:case 15:Dl(i,c,l),Zi(4,c);break;case 1:if(Dl(i,c,l),a=c,i=a.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(U){Fe(a,a.return,U)}if(a=c,i=a.updateQueue,i!==null){var S=a.stateNode;try{var D=i.shared.hiddenCallbacks;if(D!==null)for(i.shared.hiddenCallbacks=null,i=0;i<D.length;i++)th(D[i],S)}catch(U){Fe(a,a.return,U)}}y&&d&64&&hm(c),Yl(c,c.return);break;case 27:(l&2)!==0&&gm(c);case 5:c.tag!==5&&c.tag!==27||vm(c),Dl(i,c,l),y&&a===null&&d&4&&Qr(c),Yl(c,c.return);break;case 6:vm(c);break;case 26:S=c.stateNode,c.memoizedState!==null||S===null||At||Go(ns(S.ownerDocument),c.type,S),Dl(i,c,l),y&&a===null&&d&4&&Qr(c),Yl(c,c.return);break;case 12:Dl(i,c,l);break;case 31:Dl(i,c,l),y&&d&4&&Cm(i,c);break;case 13:Dl(i,c,l),y&&d&4&&Om(i,c);break;case 22:c.memoizedState===null&&Dl(i,c,l),Yl(c,c.return);break;case 30:Dl(i,c,l),Yl(c,c.return);break;case 7:Yl(c,c.return);default:Dl(i,c,l)}t=t.sibling}}function io(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&&zi(l))}function so(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&zi(e))}function kl(e,t,l,a){var i=(l&335544064)===l;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)zm(e,t,l,a),t=t.sibling;else i&&Sm(t)}function zm(e,t,l,a){var i=(l&335544064)===l;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&Sc(t);var c=t.flags;switch(t.tag){case 0:case 11:case 15:kl(e,t,l,a),c&2048&&Zi(9,t);break;case 1:kl(e,t,l,a);break;case 3:kl(e,t,l,a),i&&lo&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,e.style.viewTransitionName==="root"&&(e.style.viewTransitionName=""),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName==="none"&&(e.style.viewTransitionName="")),c&2048&&(c=null,t.alternate!==null&&(c=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==c&&(t.refCount++,c!=null&&zi(c)));break;case 12:if(c&2048){kl(e,t,l,a),c=t.stateNode;try{var d=t.memoizedProps,y=d.id,S=d.onPostCommit;typeof S=="function"&&S(y,t.alternate===null?"mount":"update",c.passiveEffectDuration,-0)}catch(D){Fe(t,t.return,D)}}else kl(e,t,l,a);break;case 31:kl(e,t,l,a);break;case 13:kl(e,t,l,a);break;case 23:break;case 22:d=t.stateNode,y=t.alternate,t.memoizedState!==null?(i&&y!==null&&y.memoizedState===null&&Sc(y),d._visibility&2?kl(e,t,l,a):Fi(e,t)):(i&&y!==null&&y.memoizedState!==null&&Sc(t),d._visibility&2?kl(e,t,l,a):(d._visibility|=2,Qn(e,t,l,a,(t.subtreeFlags&10256)!==0||!1))),c&2048&&io(y,t);break;case 24:kl(e,t,l,a),c&2048&&so(t.alternate,t);break;case 30:i&&(c=t.alternate,c!==null&&(Vl(c.child,!0),Vl(t.child,!0))),kl(e,t,l,a);break;default:kl(e,t,l,a)}}function Qn(e,t,l,a,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,d=t,y=l,S=a,D=d.flags;switch(d.tag){case 0:case 11:case 15:Qn(c,d,y,S,i),Zi(8,d);break;case 23:break;case 22:var U=d.stateNode;d.memoizedState!==null?U._visibility&2?Qn(c,d,y,S,i):Fi(c,d):(U._visibility|=2,Qn(c,d,y,S,i)),i&&D&2048&&io(d.alternate,d);break;case 24:Qn(c,d,y,S,i),i&&D&2048&&so(d.alternate,d);break;default:Qn(c,d,y,S,i)}t=t.sibling}}function Fi(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:Fi(l,a),i&2048&&io(a.alternate,a);break;case 24:Fi(l,a),i&2048&&so(a.alternate,a);break;default:Fi(l,a)}t=t.sibling}}var mn=8192;function vn(e,t,l){if(e.subtreeFlags&mn)for(e=e.child;e!==null;)Mm(e,t,l),e=e.sibling}function Mm(e,t,l){switch(e.tag){case 26:vn(e,t,l),e.flags&mn&&(e.memoizedState!==null?t0(l,wl,e.memoizedState,e.memoizedProps):(e=e.stateNode,(t&335544128)===t&&Yv(l,e)));break;case 5:vn(e,t,l),e.flags&mn&&(e=e.stateNode,(t&335544128)===t&&Yv(l,e));break;case 3:case 4:var a=wl;wl=ns(e.stateNode.containerInfo),vn(e,t,l),wl=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=mn,mn=16777216,vn(e,t,l),mn=a):vn(e,t,l));break;case 30:if((e.flags&mn)!==0&&(a=e.memoizedProps.name,a!=null&&a!=="auto")){var i=e.stateNode;i.paired=null,dl===null&&(dl=new Map),dl.set(a,i)}vn(e,t,l);break;default:vn(e,t,l)}}function Um(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 Ii(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];Ct=a,Bm(a,e)}Um(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)$m(e),e=e.sibling}function $m(e){switch(e.tag){case 0:case 11:case 15:Ii(e),e.flags&2048&&Da(9,e,e.return);break;case 3:Ii(e);break;case 12:Ii(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Tc(e)):Ii(e);break;default:Ii(e)}}function Tc(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];Ct=a,Bm(a,e)}Um(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Da(8,t,t.return),Tc(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,Tc(t));break;default:Tc(t)}e=e.sibling}}function Bm(e,t){for(;Ct!==null;){var l=Ct;switch(l.tag){case 0:case 11:case 15:Da(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:zi(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,Ct=a;else e:for(l=e;Ct!==null;){a=Ct;var i=a.sibling,c=a.return;if(Em(a),a===l){Ct=null;break e}if(i!==null){i.return=c,Ct=i;break e}Ct=c}}}var Fb={getCacheForType:function(e){var t=Rt(pt),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return Rt(pt).controller.signal}},Ib=typeof WeakMap=="function"?WeakMap:Map,Ye=0,tt=null,Ce=null,De=0,Je=0,fl=null,za=!1,Zn=!1,co=!1,fa=0,ft=0,Ma=0,yn=0,Ec=0,hl=0,Kn=0,Wi=null,el=null,uo=!1,Ac=0,qm=0,Cc=1/0,Oc=null,Ua=null,ot=0,Rl=null,gn=null,Kl=0,ro=0,oo=null,Hm=null,Jn=null,Fn=null,In=null,Pi=0,wc=null;function ml(){return(Ye&2)!==0&&De!==0?De&-De:ae.T!==null?jo():Yd()}function Lm(){if(hl===0)if((De&536870912)===0||Ne){var e=Ns;Ns<<=1,(Ns&3932160)===0&&(Ns=262144),hl=e}else hl=536870912;return e=zt.current,e!==null&&(e.flags|=32),hl}function Wn(e,t){if(t!=null){var l=e.stateNode,a=l.ref;a===null&&(a=l.ref=jv(la(e.memoizedProps,l))),Fn===null&&(Fn=[]),Fn.push(t.bind(null,a))}}function tl(e,t,l){(e===tt&&(Je===2||Je===9)||e.cancelPendingCommit!==null)&&(Pn(e,0),$a(e,De,hl,!1)),xi(e,l),((Ye&2)===0||e!==tt)&&(e===tt&&((Ye&2)===0&&(yn|=l),ft===4&&$a(e,De,hl,!1)),Jl(e))}function Ym(e,t,l){if((Ye&6)!==0)throw Error(r(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||pi(e,t),i=a?ep(e,t):ho(e,t,!0),c=a;do{if(i===0){Zn&&!a&&$a(e,t,0,!1);break}else{if(l=e.current.alternate,c&&!Wb(l)){i=ho(e,t,!1),c=!1;continue}if(i===2){if(c=t,e.errorRecoveryDisabledLanes&c)var d=0;else d=e.pendingLanes&-536870913,d=d!==0?d:d&536870912?536870912:0;if(d!==0){t=d;e:{var y=e;i=Wi;var S=y.current.memoizedState.isDehydrated;if(S&&(Pn(y,d).flags|=256),d=ho(y,d,!1),d!==2&&d!==6){if(co&&!S){y.errorRecoveryDisabledLanes|=c,yn|=c,i=4;break e}c=el,el=i,c!==null&&(el===null?el=c:el.push.apply(el,c))}i=d}if(c=!1,i!==2)continue}}if(i===1){Pn(e,0),$a(e,t,0,!0);break}e:{switch(a=e,c=i,c){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:$a(a,t,hl,!za);break e;case 2:el=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(i=Ac+300-il(),10<i)){if($a(a,t,hl,!za),Es(a,0,!0)!==0)break e;Kl=t,a.timeoutHandle=Do(Gm.bind(null,a,l,el,Oc,uo,t,hl,yn,Kn,za,c,"Throttled",-0,0),i);break e}Gm(a,l,el,Oc,uo,t,hl,yn,Kn,za,c,null,-0,0)}}break}while(!0);Jl(e)}function Gm(e,t,l,a,i,c,d,y,S,D,U,L,O,M){e.timeoutHandle=-1;var I=t.subtreeFlags,se=(c&335544064)===c;if(L=null,(se||I&8192||(I&16785408)===16785408)&&(L={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ql},dl=null,Mm(t,c,L),se&&(I=L,se=e.containerInfo,se=(se.nodeType===9?se:se.ownerDocument).__reactViewTransition,se!=null&&(I.count++,I.waitingForViewTransition=!0,I=cs.bind(I),se.finished.then(I,I))),I=(c&62914560)===c?Ac-il():(c&4194048)===c?qm-il():0,I=l0(L,I),I!==null)){Kl=c,e.cancelPendingCommit=I(Im.bind(null,e,t,c,l,a,i,d,y,S,D,U,L,null,O,M)),$a(e,c,d,!D);return}Im(e,t,c,l,a,i,d,y,S,D,U,L)}function Wb(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],c=i.getSnapshot;i=i.value;try{if(!rl(c(),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 $a(e,t,l,a){t=$d(e,t),t&=~Ec,t&=~yn,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var i=t;0<i;){var c=31-cl(i),d=1<<c;a[c]=-1,i&=~d}l!==0&&qd(e,l,t)}function Dc(){return(Ye&6)===0?(es(0),!1):!0}function fo(){if(Ce!==null){if(Je===0)var e=Ce.return;else e=Ce,sa=an=null,pr(e),qn=null,$i=0,e=Ce;for(;e!==null;)fm(e.alternate,e),e=e.return;Ce=null}}function Pn(e,t){var l=e.timeoutHandle;return l!==-1&&(e.timeoutHandle=-1,Sp(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),Kl=0,fo(),tt=e,Ce=l=na(e.current,null),De=t,Je=0,fl=null,za=!1,Zn=pi(e,t),co=!1,Kn=hl=Ec=yn=Ma=ft=0,el=Wi=null,uo=!1,fa=$d(e,t),Hs(),l}function Vm(e,t){pe=null,ae.H=dc,t===Bn||t===Is?(t=If(),Je=3):t===sr?(t=If(),Je=4):Je=t===zr?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,fl=t,Ce===null&&(ft=1,fc(e,xl(t,e.current)))}function Xm(){var e=zt.current;return e===null?!0:(De&4194048)===De?Yt===null:(De&62914560)===De||(De&536870912)!==0?e===Yt:!1}function Qm(){var e=ae.H;return ae.H=dc,e===null?dc:e}function Zm(){var e=ae.A;return ae.A=Fb,e}function Rc(){ft=4,za||(De&4194048)!==De&&zt.current!==null||(Zn=!0),(Ma&134217727)===0&&(yn&134217727)===0||tt===null||$a(tt,De,hl,!1)}function ho(e,t,l){var a=Ye;Ye|=2;var i=Qm(),c=Zm();(tt!==e||De!==t)&&(Oc=null,Pn(e,t)),t=!1;var d=ft;e:do try{if(Je!==0&&Ce!==null){var y=Ce,S=fl;switch(Je){case 8:fo(),d=6;break e;case 3:case 2:case 9:case 6:zt.current===null&&(t=!0);var D=Je;if(Je=0,fl=null,ei(e,y,S,D),l&&Zn){d=0;break e}break;default:D=Je,Je=0,fl=null,ei(e,y,S,D)}}Pb(),d=ft;break}catch(U){Vm(e,U)}while(!0);return t&&e.shellSuspendCounter++,sa=an=null,Ye=a,ae.H=i,ae.A=c,Ce===null&&(tt=null,De=0,Hs()),d}function Pb(){for(;Ce!==null;)Km(Ce)}function ep(e,t){var l=Ye;Ye|=2;var a=Qm(),i=Zm();tt!==e||De!==t?(Oc=null,Cc=il()+500,Pn(e,t)):Zn=pi(e,t);e:do try{if(Je!==0&&Ce!==null){t=Ce;var c=fl;t:switch(Je){case 1:Je=0,fl=null,ei(e,t,c,1);break;case 2:case 9:if(Jf(c)){Je=0,fl=null,Jm(t);break}t=function(){Je!==2&&Je!==9||tt!==e||(Je=7),Jl(e)},c.then(t,t);break e;case 3:Je=7;break e;case 4:Je=5;break e;case 7:Jf(c)?(Je=0,fl=null,Jm(t)):(Je=0,fl=null,ei(e,t,c,7));break;case 5:var d=null;switch(Ce.tag){case 26:d=Ce.memoizedState;case 5:case 27:var y=Ce;if(d?Hv(d):y.stateNode.complete){Je=0,fl=null;var S=y.sibling;if(S!==null)Ce=S;else{var D=y.return;D!==null?(Ce=D,zc(D)):Ce=null}break t}}Je=0,fl=null,ei(e,t,c,5);break;case 6:Je=0,fl=null,ei(e,t,c,6);break;case 8:fo(),ft=6;break e;default:throw Error(r(462))}}tp();break}catch(U){Vm(e,U)}while(!0);return sa=an=null,ae.H=a,ae.A=i,Ye=l,Ce!==null?0:(tt=null,De=0,Hs(),ft)}function tp(){for(;Ce!==null&&!bg();)Km(Ce)}function Km(e){var t=om(e.alternate,e,fa);e.memoizedProps=e.pendingProps,t===null?zc(e):Ce=t}function Jm(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=am(l,t,t.pendingProps,t.type,void 0,De);break;case 11:t=am(l,t,t.pendingProps,t.type.render,t.ref,De);break;case 5:pr(t);var a=t;a===Et&&(Ne?(Qs(a),a.tag===5&&a.stateNode!=null&&(nt=a.stateNode)):(Qs(a),Ne=!0));default:fm(l,t),t=Ce=Bf(t,fa),t=om(l,t,fa)}e.memoizedProps=e.pendingProps,t===null?zc(e):Ce=t}function ei(e,t,l,a){sa=an=null,pr(t),qn=null,$i=0;var i=t.return;try{if(Yb(e,i,t,l,De)){ft=1,fc(e,xl(l,e.current)),Ce=null;return}}catch(c){if(i!==null)throw Ce=i,c;ft=1,fc(e,xl(l,e.current)),Ce=null;return}t.flags&32768?(Ne||a===1?e=!0:Zn||(De&536870912)!==0?e=!1:(za=e=!0,(a===2||a===9||a===3||a===6)&&(a=zt.current,a!==null&&a.tag===13&&(a.flags|=16384))),Fm(t,e)):zc(t)}function zc(e){var t=e;do{if((t.flags&32768)!==0){Fm(t,za);return}e=t.return;var l=Qb(t.alternate,t,fa);if(l!==null){Ce=l;return}if(t=t.sibling,t!==null){Ce=t;return}Ce=t=e}while(t!==null);ft===0&&(ft=5)}function Fm(e,t){do{var l=Zb(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);ft=6,Ce=null}function Im(e,t,l,a,i,c,d,y,S,D,U,L){e.cancelPendingCommit=null;do Mc();while(ot!==0);if((Ye&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));e===tt&&(Ce=tt=null,De=0),gn=t,Rl=e,Kl=l,oo=i,Hm=a,lp(e,t,l,d,y,S,L)}}function lp(e,t,l,a,i,c,d){var y=t.lanes|t.childLanes;if(ro=y,y|=Zu,Ag(e,l,y,a,i,c),Fn=null,(l&335544064)===l?(In=Ob(e),a=10262):(In=null,a=10256),(t.subtreeFlags&a)!==0||(t.flags&a)!==0?(e.callbackNode=null,e.callbackPriority=0,up(_s,function(){return go(),null})):(e.callbackNode=null,e.callbackPriority=0),xc=!1,a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=ae.T,ae.T=null,i=Q.p,Q.p=2,c=Ye,Ye|=4;try{Kb(e,t,l)}finally{Ye=c,Q.p=i,ae.T=a}}ot=1,xc?Jn=Ap(d,e.containerInfo,In,mo,vo,np,yo,go,ap):(mo(),vo(),yo())}function ap(e){if(ot!==0){var t=Rl.onRecoverableError;t(e,{componentStack:null})}}function np(){ot===3&&(ot=0,Rm(gn,Rl),ot=4)}function mo(){if(ot===1){ot=0;var e=Rl,t=gn,l=Kl,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=ae.T,ae.T=null;var i=Q.p;Q.p=2;var c=Ye;Ye|=4;try{Ji=_c=!1,wm(t,e,l),l=Co;var d=Af(e.containerInfo),y=l.focusedElem,S=l.selectionRange;if(d!==y&&y&&y.ownerDocument&&Ef(y.ownerDocument.documentElement,y)){if(S!==null&&Yu(y)){var D=S.start,U=S.end;if(U===void 0&&(U=D),"selectionStart"in y)y.selectionStart=D,y.selectionEnd=Math.min(U,y.value.length);else{var L=y.ownerDocument||document,O=L&&L.defaultView||window;if(O.getSelection){var M=O.getSelection(),I=y.textContent.length,se=Math.min(S.start,I),xe=S.end===void 0?se:Math.min(S.end,I);!M.extend&&se>xe&&(d=xe,xe=se,se=d);var w=Tf(y,se),N=Tf(y,xe);if(w&&N&&(M.rangeCount!==1||M.anchorNode!==w.node||M.anchorOffset!==w.offset||M.focusNode!==N.node||M.focusOffset!==N.offset)){var R=L.createRange();R.setStart(w.node,w.offset),M.removeAllRanges(),se>xe?(M.addRange(R),M.extend(N.node,N.offset)):(R.setEnd(N.node,N.offset),M.addRange(R))}}}}for(L=[],M=y;M=M.parentNode;)M.nodeType===1&&L.push({element:M,left:M.scrollLeft,top:M.scrollTop});for(typeof y.focus=="function"&&y.focus(),y=0;y<L.length;y++){var H=L[y];H.element.scrollLeft=H.left,H.element.scrollTop=H.top}}ui=!!Ao,Co=Ao=null}finally{Ye=c,Q.p=i,ae.T=a}}e.current=t,ot=2}}function vo(){if(ot===2){ot=0;var e=Rl,t=gn,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=ae.T,ae.T=null;var a=Q.p;Q.p=2;var i=Ye;Ye|=4;try{Nm(e,t.alternate,t)}finally{Ye=i,Q.p=a,ae.T=l}}ot=3}}function yo(){if(ot===4||ot===3){ot=0;var e=Jn;Jn=null,pg();var t=Rl,l=gn,a=Kl,i=Hm,c=(a&335544064)===a?10262:10256;if((l.subtreeFlags&c)!==0||(l.flags&c)!==0?ot=5:(ot=0,gn=Rl=null,Wm(t,t.pendingLanes)),c=t.pendingLanes,c===0&&(Ua=null),ku(a),l=l.stateNode,sl&&typeof sl.onCommitFiberRoot=="function")try{sl.onCommitFiberRoot(bi,l,void 0,(l.current.flags&128)===128)}catch{}if(i!==null){l=ae.T,c=Q.p,Q.p=2,ae.T=null;try{for(var d=t.onRecoverableError,y=0;y<i.length;y++){var S=i[y];d(S.value,{componentStack:S.stack})}}finally{ae.T=l,Q.p=c}}if(i=Fn,d=In,In=null,i!==null&&(Fn=null,d===null&&(d=[]),e!==null))for(S=0;S<i.length;S++)l=(0,i[S])(d),l!==void 0&&e.finished.finally(l);(Kl&3)!==0&&Mc(),Jl(t),c=t.pendingLanes,(a&261930)!==0&&(c&42)!==0?t===wc?Pi++:(Pi=0,wc=t):(Pi=0,wc=null),es(0)}}function Wm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,zi(t)))}function Mc(){return Jn!==null&&(Jn.skipTransition(),Jn=null),mo(),vo(),yo(),go()}function go(){if(ot!==5)return!1;var e=Rl,t=ro;ro=0;var l=ku(Kl),a=ae.T,i=Q.p;try{Q.p=32>l?32:l,ae.T=null,l=oo,oo=null;var c=Rl,d=Kl;if(ot=0,gn=Rl=null,Kl=0,(Ye&6)!==0)throw Error(r(331));var y=Ye;if(Ye|=4,$m(c.current),zm(c,c.current,d,l),Ye=y,es(0,!1),sl&&typeof sl.onPostCommitFiberRoot=="function")try{sl.onPostCommitFiberRoot(bi,c)}catch{}return!0}finally{Q.p=i,ae.T=a,Wm(e,t)}}function Pm(e,t,l){t=xl(l,t),t=Rr(e.stateNode,t,2),e=Aa(e,t,2),e!==null&&(xi(e,2),Jl(e))}function Fe(e,t,l){if(e.tag===3)Pm(e,e,l);else for(;t!==null;){if(t.tag===3){Pm(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Ua===null||!Ua.has(a))){e=xl(l,e),l=Jh(2),a=Aa(t,l,2),a!==null&&(Fh(l,a,t,e),xi(a,2),Jl(a));break}}t=t.return}}function bo(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new Ib;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)||(co=!0,i.add(l),e=ip.bind(null,e,t,l),t.then(e,e))}function ip(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,tt===e&&(De&l)===l&&((ft===4||ft===3&&(De&62914560)===De&&300>il()-Ac)&&(Ye&2)===0?Pn(e,0):Ec|=l,Kn===De&&(Kn=0)),Jl(e)}function ev(e,t){t===0&&(t=Bd()),e=en(e,t),e!==null&&(xi(e,t),Jl(e))}function sp(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),ev(e,l)}function cp(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),ev(e,l)}function up(e,t){return xu(e,t)}var ti=null,li=null,po=!1,Uc=!1,xo=!1,Ba=0;function Jl(e){e!==li&&e.next===null&&(li===null?ti=li=e:li=li.next=e),Uc=!0,po||(po=!0,op())}function es(e,t){if(!xo&&Uc){xo=!0;do for(var l=!1,a=ti;a!==null;){if(e!==0){var i=a.pendingLanes;if(i===0)var c=0;else{var d=a.suspendedLanes,y=a.pingedLanes;c=(1<<31-cl(42|e)+1)-1,c&=i&~(d&~y),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(l=!0,nv(a,c))}else c=De,c=Es(a,a===tt?c:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(c&3)===0||pi(a,c)||(l=!0,nv(a,c));a=a.next}while(l);xo=!1}}function rp(){tv()}function tv(){Uc=po=!1;var e=0;Ba!==0&&jp()&&(e=Ba);for(var t=il(),l=null,a=ti;a!==null;){var i=a.next,c=lv(a,t);c===0?(a.next=null,l===null?ti=i:l.next=i,i===null&&(li=l)):(l=a,(e!==0||(c&3)!==0)&&(Uc=!0)),a=i}ot!==0&&ot!==5||es(e),Ba!==0&&(Ba=0)}function lv(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,i=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var d=31-cl(c),y=1<<d,S=i[d];S===-1?((y&l)===0||(y&a)!==0)&&(i[d]=Eg(y,t)):S<=t&&(e.expiredLanes|=y),c&=~y}if(t=tt,l=De,l=Es(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(Je===2||Je===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&ju(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||pi(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&ju(a),ku(l)){case 2:case 8:l=Md;break;case 32:l=_s;break;case 268435456:l=Ud;break;default:l=_s}return a=av.bind(null,e),l=xu(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&ju(a),e.callbackPriority=2,e.callbackNode=null,2}function av(e,t){if(ot!==0&&ot!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(Mc()&&e.callbackNode!==l)return null;var a=De;return a=Es(e,e===tt?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Ym(e,a,t),lv(e,il()),e.callbackNode!=null&&e.callbackNode===l?av.bind(null,e):null)}function nv(e,t){if(Mc())return null;Ym(e,t,!0)}function op(){_p(function(){(Ye&6)!==0?xu(zd,rp):tv()})}function jo(){if(Ba===0){var e=cn;e===0&&(e=ks,ks<<=1,(ks&261888)===0&&(ks=256)),Ba=e}return Ba}function iv(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Ds(e)}function dp(e,t,l,a,i){if(t==="submit"&&l&&l.stateNode===i){var c=iv((i[Ft]||null).action),d=a.submitter;d&&(t=(t=d[Ft]||null)?iv(t.formAction):d.getAttribute("formAction"),t!==null&&(c=t,d=null));var y=new Us("action","action",null,a,i);e.push({event:y,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Ba!==0){var S=new FormData(i,d);Ar(l,{pending:!0,data:S,method:i.method,action:c},null,S)}}else typeof c=="function"&&(y.preventDefault(),S=new FormData(i,d),Ar(l,{pending:!0,data:S,method:i.method,action:c},c,S))},currentTarget:i}]})}}for(var So=0;So<Qu.length;So++){var _o=Qu[So],fp=_o.toLowerCase(),hp=_o[0].toUpperCase()+_o.slice(1);Cl(fp,"on"+hp)}Cl(wf,"onAnimationEnd"),Cl(Df,"onAnimationIteration"),Cl(Rf,"onAnimationStart"),Cl("dblclick","onDoubleClick"),Cl("focusin","onFocus"),Cl("focusout","onBlur"),Cl(Sb,"onTransitionRun"),Cl(_b,"onTransitionStart"),Cl(kb,"onTransitionCancel"),Cl(zf,"onTransitionEnd"),kn("onMouseEnter",["mouseout","mouseover"]),kn("onMouseLeave",["mouseout","mouseover"]),kn("onPointerEnter",["pointerout","pointerover"]),kn("onPointerLeave",["pointerout","pointerover"]),Ia("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ia("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ia("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ia("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ia("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ia("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ts="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(" "),mp=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ts));function sv(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 c=void 0;if(t)for(var d=a.length-1;0<=d;d--){var y=a[d],S=y.instance,D=y.currentTarget;if(y=y.listener,S!==c&&i.isPropagationStopped())break e;c=y,i.currentTarget=D;try{c(i)}catch(U){qs(U)}i.currentTarget=null,c=S}else for(d=0;d<a.length;d++){if(y=a[d],S=y.instance,D=y.currentTarget,y=y.listener,S!==c&&i.isPropagationStopped())break e;c=y,i.currentTarget=D;try{c(i)}catch(U){qs(U)}i.currentTarget=null,c=S}}}}function Oe(e,t){var l=t[Vd];l===void 0&&(l=t[Vd]=new Set);var a=e+"__bubble";l.has(a)||(cv(t,e,2,!1),l.add(a))}function ko(e,t,l){var a=0;t&&(a|=4),cv(l,e,a,t)}var $c="_reactListening"+Math.random().toString(36).slice(2);function No(e){if(!e[$c]){e[$c]=!0,Zd.forEach(function(l){l!=="selectionchange"&&(mp.has(l)||ko(l,!1,e),ko(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[$c]||(t[$c]=!0,ko("selectionchange",!1,t))}}function cv(e,t,l,a){switch(Fv(t)){case 2:var i=s0;break;case 8:i=c0;break;default:i=Xo}l=i.bind(null,t,l,e),i=void 0,!Du||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 To(e,t,l,a,i){var c=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var d=a.tag;if(d===3||d===4){var y=a.stateNode.containerInfo;if(y===i)break;if(d===4)for(d=a.return;d!==null;){var S=d.tag;if((S===3||S===4)&&d.stateNode.containerInfo===i)return;d=d.return}for(;y!==null;){if(d=Fa(y),d===null)return;if(S=d.tag,S===5||S===6||S===26||S===27){a=c=d;continue e}y=y.parentNode}}a=a.return}cf(function(){var D=c,U=Ou(l),L=[];e:{var O=Mf.get(e);if(O!==void 0){var M=Us,I=e;switch(e){case"keypress":if(zs(l)===0)break e;case"keydown":case"keyup":M=Wg;break;case"focusin":I="focus",M=Uu;break;case"focusout":I="blur",M=Uu;break;case"beforeblur":case"afterblur":M=Uu;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":M=of;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":M=Hg;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":M=ab;break;case wf:case Df:case Rf:M=Gg;break;case zf:M=ib;break;case"scroll":case"scrollend":M=Bg;break;case"wheel":M=cb;break;case"copy":case"cut":case"paste":M=Xg;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":M=ff;break;case"submit":M=tb;break;case"toggle":case"beforetoggle":M=rb}var se=(t&4)!==0,xe=!se&&(e==="scroll"||e==="scrollend"),w=se?O!==null?O+"Capture":null:O;se=[];for(var N=D,R;N!==null;){var H=N;if(R=H.stateNode,H=H.tag,H!==5&&H!==26&&H!==27||R===null||w===null||(H=_i(N,w),H!=null&&se.push(ls(N,H,R))),xe)break;N=N.return}0<se.length&&(O=new M(O,I,null,l,U),L.push({event:O,listeners:se}))}}if((t&7)===0){e:{if(M=e==="mouseover"||e==="pointerover",O=e==="mouseout"||e==="pointerout",M&&l!==Cu&&(I=l.relatedTarget||l.fromElement)&&(Fa(I)||I[jn]))break e;(O||M)&&(I=U.window===U?U:(M=U.ownerDocument)?M.defaultView||M.parentWindow:window,O?(M=l.relatedTarget||l.toElement,O=D,M=M?Fa(M):null,M!==null&&(xe=f(M),se=M.tag,M!==xe||se!==5&&se!==27&&se!==6)&&(M=null)):(O=null,M=D),O!==M&&(se=of,H="onMouseLeave",w="onMouseEnter",N="mouse",(e==="pointerout"||e==="pointerover")&&(se=ff,H="onPointerLeave",w="onPointerEnter",N="pointer"),xe=O==null?I:Si(O),R=M==null?I:Si(M),I=new se(H,N+"leave",O,l,U),I.target=xe,I.relatedTarget=R,H=null,Fa(U)===D&&(se=new se(w,N+"enter",M,l,U),se.target=R,se.relatedTarget=xe,H=se),xe=H,se=O&&M?re(O,M,vp):null,O!==null&&uv(L,I,O,se,!1),M!==null&&xe!==null&&uv(L,xe,M,se,!0)))}e:{if(O=D?Si(D):window,M=O.nodeName&&O.nodeName.toLowerCase(),M==="select"||M==="input"&&O.type==="file")var le=xf;else if(bf(O))if(jf)le=pb;else{le=gb;var Re=yb}else M=O.nodeName,!M||M.toLowerCase()!=="input"||O.type!=="checkbox"&&O.type!=="radio"?D&&Au(D.elementType)&&(le=xf):le=bb;if(le&&(le=le(e,D))){pf(L,le,l,U);break e}Re&&Re(e,O,D)}switch(Re=D?Si(D):window,e){case"focusin":(bf(Re)||Re.contentEditable==="true")&&(On=Re,Gu=D,wi=null);break;case"focusout":wi=Gu=On=null;break;case"mousedown":Vu=!0;break;case"contextmenu":case"mouseup":case"dragend":Vu=!1,Cf(L,l,U);break;case"selectionchange":if(jb)break;case"keydown":case"keyup":Cf(L,l,U)}var oe;if(Bu)e:{switch(e){case"compositionstart":var me="onCompositionStart";break e;case"compositionend":me="onCompositionEnd";break e;case"compositionupdate":me="onCompositionUpdate";break e}me=void 0}else Cn?yf(e,l)&&(me="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(me="onCompositionStart");me&&(hf&&l.locale!=="ko"&&(Cn||me!=="onCompositionStart"?me==="onCompositionEnd"&&Cn&&(oe=uf()):(pa=U,Ru="value"in pa?pa.value:pa.textContent,Cn=!0)),Re=Bc(D,me),0<Re.length&&(me=new df(me,e,null,l,U),L.push({event:me,listeners:Re}),oe?me.data=oe:(oe=gf(l),oe!==null&&(me.data=oe)))),(oe=db?fb(e,l):hb(e,l))&&(me=Bc(D,"onBeforeInput"),0<me.length&&(Re=new df("onBeforeInput","beforeinput",null,l,U),L.push({event:Re,listeners:me}),Re.data=oe)),dp(L,e,D,l,U)}sv(L,t)})}function ls(e,t,l){return{instance:e,listener:t,currentTarget:l}}function Bc(e,t){for(var l=t+"Capture",a=[];e!==null;){var i=e,c=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||c===null||(i=_i(e,l),i!=null&&a.unshift(ls(e,i,c)),i=_i(e,t),i!=null&&a.push(ls(e,i,c))),e.tag===3)return a;e=e.return}return[]}function vp(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function uv(e,t,l,a,i){for(var c=t._reactName,d=[];l!==null&&l!==a;){var y=l,S=y.alternate,D=y.stateNode;if(y=y.tag,S!==null&&S===a)break;y!==5&&y!==26&&y!==27||D===null||(S=D,i?(D=_i(l,c),D!=null&&d.unshift(ls(l,D,S))):i||(D=_i(l,c),D!=null&&d.push(ls(l,D,S)))),l=l.return}d.length!==0&&e.push({event:t,listeners:d})}var yp=/\r\n?/g,gp=/\u0000|\uFFFD/g;function rv(e){return(typeof e=="string"?e:""+e).replace(yp,`
|
|
9
|
+
`).replace(gp,"")}function ov(e,t){return t=rv(t),rv(e)===t}function Ie(e,t,l,a,i,c){switch(l){case"children":if(typeof a=="string")t==="body"||t==="textarea"&&a===""||Tn(e,a);else if(typeof a=="number"||typeof a=="bigint")t!=="body"&&Tn(e,""+a);else return;break;case"className":ws(e,"class",a);break;case"tabIndex":ws(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":ws(e,l,a);break;case"style":nf(e,a,c);return;case"data":if(t!=="object"){ws(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=Ds(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 c=="function"&&(l==="formAction"?(t!=="input"&&Ie(e,t,"name",i.name,i,null),Ie(e,t,"formEncType",i.formEncType,i,null),Ie(e,t,"formMethod",i.formMethod,i,null),Ie(e,t,"formTarget",i.formTarget,i,null)):(Ie(e,t,"encType",i.encType,i,null),Ie(e,t,"method",i.method,i,null),Ie(e,t,"target",i.target,i,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=Ds(a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=ql);return;case"onScroll":a!=null&&Oe("scroll",e);return;case"onScrollEnd":a!=null&&Oe("scrollend",e);return;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));c?.__html!==l&&(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=Ds(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"credentialless":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":Oe("beforetoggle",e),Oe("toggle",e),Os(e,"popover",a);break;case"xlinkActuate":ea(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":ea(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":ea(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":ea(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":ea(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":ea(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":ea(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":ea(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":ea(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Os(e,"is",a);break;case"innerText":case"textContent":return;default:if(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")l=Ug.get(l)||l,Os(e,l,a);else return}He=!0}function Eo(e,t,l,a,i,c){switch(l){case"style":nf(e,a,c);return;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));c?.__html!==l&&(e.innerHTML=l)}}break;case"children":if(typeof a=="string")Tn(e,a);else if(typeof a=="number"||typeof a=="bigint")Tn(e,""+a);else return;break;case"onScroll":a!=null&&Oe("scroll",e);return;case"onScrollEnd":a!=null&&Oe("scrollend",e);return;case"onClick":a!=null&&(e.onclick=ql);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!Kd.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(i=l.endsWith("Capture"),c=l.slice(2,i?l.length-7:void 0),t=e[Ft]||null,t=t!=null?t[l]:null,typeof t=="function"&&e.removeEventListener(c,t,i),typeof a=="function")){typeof t!="function"&&t!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(c,a,i);break e}He=!0,l in e?e[l]=a:a===!0?e.setAttribute(l,""):Os(e,l,a)}return}He=!0}function $t(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Oe("error",e),Oe("load",e);var a=!1,i=!1,c;for(c in l)if(l.hasOwnProperty(c)){var d=l[c];if(d!=null)switch(c){case"src":a=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ie(e,t,c,d,l,null)}}i&&Ie(e,t,"srcSet",l.srcSet,l,null),a&&Ie(e,t,"src",l.src,l,null);return;case"input":Oe("invalid",e);var y=c=d=i=null,S=null,D=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":d=U;break;case"checked":S=U;break;case"defaultChecked":D=U;break;case"value":c=U;break;case"defaultValue":y=U;break;case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(r(137,t));break;default:Ie(e,t,a,U,l,null)}}ef(e,c,y,S,D,d,i,!1);return;case"select":Oe("invalid",e),a=d=c=null;for(i in l)if(l.hasOwnProperty(i)&&(y=l[i],y!=null))switch(i){case"value":c=y;break;case"defaultValue":d=y;break;case"multiple":a=y;default:Ie(e,t,i,y,l,null)}t=c,l=d,e.multiple=!!a,t!=null?Nn(e,!!a,t,!1):l!=null&&Nn(e,!!a,l,!0);return;case"textarea":Oe("invalid",e),c=i=a=null;for(d in l)if(l.hasOwnProperty(d)&&(y=l[d],y!=null))switch(d){case"value":a=y;break;case"defaultValue":i=y;break;case"children":c=y;break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(r(91));break;default:Ie(e,t,d,y,l,null)}lf(e,a,i,c);return;case"option":for(S in l)l.hasOwnProperty(S)&&(a=l[S],a!=null)&&(S==="selected"?e.selected=a&&typeof a!="function"&&typeof a!="symbol":Ie(e,t,S,a,l,null));return;case"dialog":Oe("beforetoggle",e),Oe("toggle",e),Oe("cancel",e),Oe("close",e);break;case"iframe":case"object":Oe("load",e);break;case"video":case"audio":for(a=0;a<ts.length;a++)Oe(ts[a],e);break;case"image":Oe("error",e),Oe("load",e);break;case"details":Oe("toggle",e);break;case"embed":case"source":case"link":Oe("error",e),Oe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(D in l)if(l.hasOwnProperty(D)&&(a=l[D],a!=null))switch(D){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ie(e,t,D,a,l,null)}return;default:if(Au(t)){for(U in l)l.hasOwnProperty(U)&&(a=l[U],a!==void 0&&Eo(e,t,U,a,l,void 0));return}}for(y in l)l.hasOwnProperty(y)&&(a=l[y],a!=null&&Ie(e,t,y,a,l,null))}var bp={};function pp(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,c=null,d=null,y=null,S=null,D=null,U=null;for(M in l){var L=l[M];if(l.hasOwnProperty(M)&&L!=null)switch(M){case"checked":break;case"value":break;case"defaultValue":S=L;default:a.hasOwnProperty(M)||Ie(e,t,M,null,a,L)}}for(var O in a){var M=a[O];if(L=l[O],a.hasOwnProperty(O)&&(M!=null||L!=null))switch(O){case"type":M!==L&&(He=!0),c=M;break;case"name":M!==L&&(He=!0),i=M;break;case"checked":M!==L&&(He=!0),D=M;break;case"defaultChecked":M!==L&&(He=!0),U=M;break;case"value":M!==L&&(He=!0),d=M;break;case"defaultValue":M!==L&&(He=!0),y=M;break;case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(r(137,t));break;default:M!==L&&Ie(e,t,O,M,a,L)}}Tu(e,d,y,S,D,U,c,i);return;case"select":M=d=y=O=null;for(c in l)if(S=l[c],l.hasOwnProperty(c)&&S!=null)switch(c){case"value":break;case"multiple":M=S;default:a.hasOwnProperty(c)||Ie(e,t,c,null,a,S)}for(i in a)if(c=a[i],S=l[i],a.hasOwnProperty(i)&&(c!=null||S!=null))switch(i){case"value":c!==S&&(He=!0),O=c;break;case"defaultValue":c!==S&&(He=!0),y=c;break;case"multiple":c!==S&&(He=!0),d=c;default:c!==S&&Ie(e,t,i,c,a,S)}t=y,l=d,a=M,O!=null?Nn(e,!!l,O,!1):!!a!=!!l&&(t!=null?Nn(e,!!l,t,!0):Nn(e,!!l,l?[]:"",!1));return;case"textarea":M=O=null;for(y in l)if(i=l[y],l.hasOwnProperty(y)&&i!=null&&!a.hasOwnProperty(y))switch(y){case"value":break;case"children":break;default:Ie(e,t,y,null,a,i)}for(d in a)if(i=a[d],c=l[d],a.hasOwnProperty(d)&&(i!=null||c!=null))switch(d){case"value":i!==c&&(He=!0),O=i;break;case"defaultValue":i!==c&&(He=!0),M=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(r(91));break;default:i!==c&&Ie(e,t,d,i,a,c)}tf(e,O,M);return;case"option":for(var I in l)O=l[I],l.hasOwnProperty(I)&&O!=null&&!a.hasOwnProperty(I)&&(I==="selected"?e.selected=!1:Ie(e,t,I,null,a,O));for(S in a)O=a[S],M=l[S],a.hasOwnProperty(S)&&O!==M&&(O!=null||M!=null)&&(S==="selected"?(O!==M&&(He=!0),e.selected=O&&typeof O!="function"&&typeof O!="symbol"):Ie(e,t,S,O,a,M));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 se in l)O=l[se],l.hasOwnProperty(se)&&O!=null&&!a.hasOwnProperty(se)&&Ie(e,t,se,null,a,O);for(D in a)if(O=a[D],M=l[D],a.hasOwnProperty(D)&&O!==M&&(O!=null||M!=null))switch(D){case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(r(137,t));break;default:Ie(e,t,D,O,a,M)}return;default:if(Au(t)){for(var xe in l)O=l[xe],l.hasOwnProperty(xe)&&O!==void 0&&!a.hasOwnProperty(xe)&&Eo(e,t,xe,void 0,a,O);for(U in a)O=a[U],M=l[U],!a.hasOwnProperty(U)||O===M||O===void 0&&M===void 0||Eo(e,t,U,O,a,M);return}}for(var w in l)O=l[w],l.hasOwnProperty(w)&&O!=null&&!a.hasOwnProperty(w)&&Ie(e,t,w,null,a,O);for(L in a)O=a[L],M=l[L],!a.hasOwnProperty(L)||O===M||O==null&&M==null||Ie(e,t,L,O,a,M)}function dv(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function xp(){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],c=i.transferSize,d=i.initiatorType,y=i.duration;if(c&&y&&dv(d)){for(d=0,y=i.responseEnd,a+=1;a<l.length;a++){var S=l[a],D=S.startTime;if(D>y)break;var U=S.transferSize,L=S.initiatorType;U&&dv(L)&&(S=S.responseEnd,d+=U*(S<y?1:(y-D)/(S-D)))}if(--a,t+=8*(c+d)/(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 Ao=null,Co=null;function as(e){return e.nodeType===9?e:e.ownerDocument}function fv(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 hv(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 mv(e,t,l,a){return l=as(l).createElement(e),l[Dt]=a,l[Ft]=t,$t(l,e,t),Tt(l),l}function Oo(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 wo=null;function jp(){var e=window.event;return e&&e.type==="popstate"?e===wo?!1:(wo=e,!0):(wo=null,!1)}var Do=typeof setTimeout=="function"?setTimeout:void 0,Sp=typeof clearTimeout=="function"?clearTimeout:void 0,vv=typeof Promise=="function"?Promise:void 0,yv=typeof requestAnimationFrame=="function"?requestAnimationFrame:Do,_p=typeof queueMicrotask=="function"?queueMicrotask:typeof vv<"u"?function(e){return vv.resolve(null).then(e).catch(kp)}:Do;function kp(e){setTimeout(function(){throw e})}function qa(e){return e==="head"}function gv(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),ri(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")Ho(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Ho(l);for(var c=l.firstChild;c;){var d=c.nextSibling,y=c.nodeName;c[ji]||y==="SCRIPT"||y==="STYLE"||y==="LINK"&&c.rel.toLowerCase()==="stylesheet"||l.removeChild(c),c=d}}else l==="body"&&Ho(e.ownerDocument.body);l=i}while(l);ri(t)}function bv(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 pv(e,t,l){if(t=CSS.escape(t)!==t?"r-"+btoa(t).replace(/=/g,""):t,e.style.viewTransitionName=t,l!=null&&(e.style.viewTransitionClass=l),l=getComputedStyle(e),l.display==="inline"){if(t=e.getClientRects(),t.length===1)var a=1;else for(var i=a=0;i<t.length;i++){var c=t[i];0<c.width&&0<c.height&&a++}a===1&&(e=e.style,e.display=t.length===1?"inline-block":"block",e.marginTop="-"+l.paddingTop,e.marginBottom="-"+l.paddingBottom)}}function xv(e,t){e=e.style,t=t.style;var l=t!=null?t.hasOwnProperty("viewTransitionName")?t.viewTransitionName:t.hasOwnProperty("view-transition-name")?t["view-transition-name"]:null:null;e.viewTransitionName=l==null||typeof l=="boolean"?"":(""+l).trim(),l=t!=null?t.hasOwnProperty("viewTransitionClass")?t.viewTransitionClass:t.hasOwnProperty("view-transition-class")?t["view-transition-class"]:null:null,e.viewTransitionClass=l==null||typeof l=="boolean"?"":(""+l).trim(),e.display==="inline-block"&&(t==null?e.display=e.margin="":(l=t.display,e.display=l==null||typeof l=="boolean"?"":l,l=t.margin,l!=null?e.margin=l:(l=t.hasOwnProperty("marginTop")?t.marginTop:t["margin-top"],e.marginTop=l==null||typeof l=="boolean"?"":l,t=t.hasOwnProperty("marginBottom")?t.marginBottom:t["margin-bottom"],e.marginBottom=t==null||typeof t=="boolean"?"":t)))}function Np(e,t,l){return l=l.ownerDocument.defaultView,{rect:e,abs:t.position==="absolute"||t.position==="fixed",clip:t.clipPath!=="none"||t.overflow!=="visible"||t.filter!=="none"||t.mask!=="none"||t.mask!=="none"||t.borderRadius!=="0px",view:0<=e.bottom&&0<=e.right&&e.top<=l.innerHeight&&e.left<=l.innerWidth}}function Ro(e){var t=e.getBoundingClientRect(),l=getComputedStyle(e);return Np(t,l,e)}function Tp(e){return e.documentElement.clientHeight}function Ep(e){this.addEventListener("load",e),this.addEventListener("error",e)}function Ap(e,t,l,a,i,c,d,y,S){var D=t.nodeType===9?t:t.ownerDocument;try{var U=D.startViewTransition({update:function(){var O=D.defaultView,M=O.navigation&&O.navigation.transition,I=D.fonts.status;a();var se=[];if(I==="loaded"&&(Tp(D),D.fonts.status==="loading"&&se.push(D.fonts.ready)),I=se.length,e!==null)for(var xe=e.suspenseyImages,w=0,N=0;N<xe.length;N++){var R=xe[N];if(!R.complete){var H=R.getBoundingClientRect();if(0<H.bottom&&0<H.right&&H.top<O.innerHeight&&H.left<O.innerWidth){if(w+=Lv(R),w>Lc){se.length=I;break}R=new Promise(Ep.bind(R)),se.push(R)}}}if(0<se.length)return O=Promise.race([Promise.all(se),new Promise(function(le){return setTimeout(le,500)})]).then(i,i),(M?Promise.allSettled([M.finished,O]):O).then(c,c);if(i(),M)return M.finished.then(c,c);c()},types:l});D.__reactViewTransition=U;var L=[];return U.ready.then(function(){for(var O=D.documentElement.getAnimations({subtree:!0}),M=0;M<O.length;M++){var I=O[M],se=I.effect,xe=se.pseudoElement;if(xe!=null&&xe.startsWith("::view-transition")){L.push(I),I=se.getKeyframes();for(var w=xe=void 0,N=!0,R=0;R<I.length;R++){var H=I[R],le=H.width;if(xe===void 0)xe=le;else if(xe!==le){N=!1;break}if(le=H.height,w===void 0)w=le;else if(w!==le){N=!1;break}delete H.width,delete H.height,H.transform==="none"&&delete H.transform}N&&xe!==void 0&&w!==void 0&&(se.setKeyframes(I),N=getComputedStyle(se.target,se.pseudoElement),N.width!==xe||N.height!==w)&&(N=I[0],N.width=xe,N.height=w,N=I[I.length-1],N.width=xe,N.height=w,se.setKeyframes(I))}}d()},function(O){D.__reactViewTransition===U&&(D.__reactViewTransition=null);try{typeof O=="object"&&O!==null&&O.name==="InvalidStateError"&&(O.message==="View transition was skipped because document visibility state is hidden."||O.message==="Skipping view transition because document visibility state has become hidden."||O.message==="Skipping view transition because viewport size changed."||O.message==="Transition was aborted because of invalid state")&&(O=null),O!==null&&S(O)}finally{a(),i(),d()}}),U.finished.finally(function(){for(var O=0;O<L.length;O++)L[O].cancel();D.__reactViewTransition===U&&(D.__reactViewTransition=null),y()}),U}catch{return a(),i(),d(),null}}function bn(e,t){this._scope=document.documentElement,this._selector="::view-transition-"+e+"("+t+")"}bn.prototype.animate=function(e,t){return t=typeof t=="number"?{duration:t}:ee({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},bn.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,l=e.getAnimations({subtree:!0}),a=[],i=0;i<l.length;i++){var c=l[i].effect;c!==null&&c.target===e&&c.pseudoElement===t&&a.push(l[i])}return a},bn.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function jv(e){return{name:e,group:new bn("group",e),imagePair:new bn("image-pair",e),old:new bn("old",e),new:new bn("new",e)}}function vl(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}vl.prototype.addEventListener=function(e,t,l){var a=null,i=null;if(!(l!=null&&typeof l!="boolean"&&(a=l.signal||null,a!==null&&a.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var c=this._eventListeners;if(_v(c,e,t,l)===-1){var d=this,y=t;l!=null&&typeof l!="boolean"&&l.once===!0&&(y=function(S){d.removeEventListener(e,t,l),typeof t=="function"?t.call(this,S):t.handleEvent(S)}),a!==null&&(i=d.removeEventListener.bind(d,e,t,l),a.addEventListener("abort",i,{once:!0}),i=a.removeEventListener.bind(a,"abort",i)),a=ai(l),c.push({type:e,listener:t,optionsOrUseCapture:l,attachedListener:y,cleanup:i}),g(this._fragmentFiber.child,!1,Cp,e,y,a)}this._eventListeners=c}};function Cp(e,t,l,a){return k(e).addEventListener(t,l,a),!1}vl.prototype.removeEventListener=function(e,t,l){var a=this._eventListeners;if(a!==null&&(t=_v(a,e,t,l),t!==-1)){var i=a[t];l=i.attachedListener;var c=i.cleanup;i=ai(i.optionsOrUseCapture),g(this._fragmentFiber.child,!1,Op,e,l,i),a.splice(t,1),c!==null&&c()}};function Op(e,t,l,a){return k(e).removeEventListener(t,l,a),!1}function ai(e){return e!=null&&typeof e!="boolean"&&(e.once===!0||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Sv(e){return e==null?"c=0":typeof e=="boolean"?"c="+(e?"1":"0"):"c="+(e.capture?"1":"0")}function _v(e,t,l,a){if(e.length===0)return-1;a=Sv(a);for(var i=0;i<e.length;i++){var c=e[i];if(c.type===t&&c.listener===l&&Sv(c.optionsOrUseCapture)===a)return i}return-1}vl.prototype.dispatchEvent=function(e){var t=x(this._fragmentFiber);if(t===null)return!0;t=k(t);var l=this._eventListeners;if(l!==null&&0<l.length||!e.bubbles){var a=t.nodeType===9?t.createComment(""):document.createTextNode("");if(l)for(var i=0;i<l.length;i++){var c=l[i];a.addEventListener(c.type,c.attachedListener,ai(c.optionsOrUseCapture))}if(t.appendChild(a),e=a.dispatchEvent(e),l)for(i=0;i<l.length;i++)c=l[i],a.removeEventListener(c.type,c.attachedListener,ai(c.optionsOrUseCapture));return t.removeChild(a),e}return t.dispatchEvent(e)},vl.prototype.focus=function(e){g(this._fragmentFiber.child,!0,kv,e,void 0,void 0)};function kv(e,t){return e.tag===6?!1:(e=k(e),Yp(e,t))}vl.prototype.focusLast=function(e){var t=[];g(this._fragmentFiber.child,!0,zo,t,void 0,void 0);for(var l=t.length-1;0<=l&&!kv(t[l],e);l--);};function zo(e,t){return t.push(e),!1}vl.prototype.blur=function(){var e=x(this._fragmentFiber);e!==null&&(e=k(e),e=as(e).activeElement,e!==null&&g(this._fragmentFiber.child,!1,wp,e,void 0,void 0))};function wp(e,t){return e.tag===6?!1:(e=k(e),e===t||e.contains(t)?(t.blur(),!0):!1)}vl.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),g(this._fragmentFiber.child,!1,Dp,e,void 0,void 0)};function Dp(e,t){return e.tag===6||(e=k(e),t.observe(e)),!1}vl.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),g(this._fragmentFiber.child,!1,Rp,e,void 0,void 0);for(var l=t=0;l<zl.length;l++){var a=zl[l];a.fragmentInstance===this&&a.observer===e?e.unobserve(a.instance):zl[t++]=a}zl.length=t}};function Rp(e,t){return e.tag===6||(e=k(e),t.unobserve(e)),!1}var zl=[],Mo=!1;function zp(e,t,l){zl.push({fragmentInstance:e,observer:t,instance:l}),Mo||(Mo=!0,Gp(function(){Mo=!1;var a=zl;zl=[];for(var i=0;i<a.length;i++){var c=a[i];c.observer.unobserve(c.instance)}}))}vl.prototype.getClientRects=function(){var e=[];return g(this._fragmentFiber.child,!1,Mp,e,void 0,void 0),e};function Mp(e,t){if(e.tag===6){e=e.stateNode;var l=e.ownerDocument.createRange();l.selectNodeContents(e),t.push.apply(t,l.getClientRects())}else e=k(e),t.push.apply(t,e.getClientRects());return!1}vl.prototype.getRootNode=function(e){var t=x(this._fragmentFiber);return t===null?this:k(t).getRootNode(e)},vl.prototype.compareDocumentPosition=function(e){var t=x(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var l=[];g(this._fragmentFiber.child,!1,zo,l,void 0,void 0);var a=k(t);if(l.length===0){if(l=a,A(this._fragmentFiber)){e:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break e}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(l=t)}t=this._fragmentFiber;var i=a=l.compareDocumentPosition(e);return l===e?i=Node.DOCUMENT_POSITION_CONTAINS:a&Node.DOCUMENT_POSITION_CONTAINED_BY&&(l=q(t)[1],l===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=k(l).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=k(l[0]),i=k(l[l.length-1]);var c=A(this._fragmentFiber)?t.parentElement:a;if(c==null)return Node.DOCUMENT_POSITION_DISCONNECTED;a=c.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,c=c.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var d=t.compareDocumentPosition(e),y=i.compareDocumentPosition(e),S=d&Node.DOCUMENT_POSITION_CONTAINED_BY||y&Node.DOCUMENT_POSITION_CONTAINED_BY;return y=a&&c&&d&Node.DOCUMENT_POSITION_FOLLOWING&&y&Node.DOCUMENT_POSITION_PRECEDING,t=a&&t===e||c&&i===e||S||y?Node.DOCUMENT_POSITION_CONTAINED_BY:!a&&t===e||!c&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:d,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||Up(t,this._fragmentFiber,l[0],l[l.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Up(e,t,l,a,i){var c=Fa(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(l=!!c)e:{for(;c!==null;){if(c.tag===7&&(c===t||c.alternate===t)){l=!0;break e}c=c.return}l=!1}return l}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(c===null)return c=i.ownerDocument,i===c||i===c.documentElement||i===c.body;e:{for(c=t,t=x(t);c!==null;){if(!(c.tag!==5&&c.tag!==3&&c.tag!==27||c!==t&&c.alternate!==t)){c=!0;break e}c=c.return}c=!1}return c}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!c)&&!(t=c===l)&&(t=re(l,c,F),t===null?t=!1:(g(t,!0,W,c,l),c=E,E=null,t=c!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!c)&&!(t=c===a)&&(t=re(a,c,F),t===null?t=!1:(g(t,!0,Z,c,a),c=E,$=E=null,t=c!==null)),t):!1}function Nv(e,t){var l=e.ownerDocument.createRange();l.selectNodeContents(e),e=l.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}vl.prototype.scrollIntoView=function(e){if(typeof e=="object")throw Error(r(566));var t=[];g(this._fragmentFiber.child,!1,zo,t,void 0,void 0);var l=e!==!1;if(t.length===0){var a=q(this._fragmentFiber);if(a=l?a[1]||a[0]||x(this._fragmentFiber):a[0]||a[1],a===null)return;if(a.tag===6){e=k(a),Nv(e,l);return}if(a=k(a),a.nodeType!==9){if(a.nodeType===11){l="host"in a?a.host:null,l!==null&&l.scrollIntoView(e);return}a.scrollIntoView(e)}}for(a=l?t.length-1:0;a!==(l?-1:t.length);){var i=t[a];i.tag===6?(i=k(i),Nv(i,l)):k(i).scrollIntoView(e),a+=l?-1:1}};function $p(e,t){return e=k(e),Tv(e,t),!1}function Tv(e,t){e.reactFragments==null&&(e.reactFragments=new Set),e.reactFragments.add(t)}function Ev(e,t){var l=t._eventListeners;if(l!==null)for(var a=0;a<l.length;a++){var i=l[a];e.addEventListener(i.type,i.attachedListener,ai(i.optionsOrUseCapture))}e.nodeType!==3&&(l=t._observers,l!==null&&l.forEach(function(c){for(var d=0,y=0;y<zl.length;y++){var S=zl[y];(S.fragmentInstance!==t||S.observer!==c||S.instance!==e)&&(zl[d++]=S)}zl.length=d,c.observe(e)}),Tv(e,t))}function Bp(e,t){var l=t._eventListeners;if(l!==null)for(var a=0;a<l.length;a++){var i=l[a];e.removeEventListener(i.type,i.attachedListener,ai(i.optionsOrUseCapture))}e.nodeType!==3&&(l=t._observers,l!==null&&l.forEach(function(c){typeof c.rootMargin=="string"?zp(t,c,e):c.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function Uo(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":Uo(l),Cs(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function qp(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[ji])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==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(c=e.getAttribute("src"),(c!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=Nl(e.nextSibling),e===null)break}return null}function Hp(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=Nl(e.nextSibling),e===null))return null;return e}function Av(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Nl(e.nextSibling),e===null))return null;return e}function $o(e){return e.data==="$?"||e.data==="$~"}function Bo(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Lp(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 Nl(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 qo=null;function Cv(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return Nl(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function Ov(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 Yp(e,t){function l(){a=!0}if(e.ownerDocument.activeElement===e)return!0;var a=!1;try{e.ownerDocument.addEventListener("focus",l,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener("focus",l,!0)}return a}function Gp(e){yv(function(){yv(function(t){return e(t)})})}function wv(e,t,l){switch(t=as(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 Dv(e,t,l){for(var a in l){var i=l[a];l.hasOwnProperty(a)&&i!=null&&Ie(e,t,a,null,bp,i)}l.dangerouslySetInnerHTML!=null&&(e.textContent=""),e.onclick===ql&&(e.onclick=null),Cs(e)}function Ho(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Cs(e)}var Tl=new Map,Rv=new Set;function ns(e){if(typeof e.getRootNode=="function"){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var ha=Q.d;Q.d={f:Vp,r:Xp,D:Qp,C:Zp,L:Kp,m:Jp,X:Ip,S:Fp,M:Wp};function Vp(){var e=ha.f(),t=Dc();return e||t}function Xp(e){var t=Sn(e);t!==null&&t.tag===5&&t.type==="form"?Mh(t):ha.r(e)}var ni=typeof document>"u"?null:document;function zv(e,t,l){var a=ni;if(a&&typeof t=="string"&&t){var i=bl(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof l=="string"&&(i+='[crossorigin="'+l+'"]'),Rv.has(i)||(Rv.add(i),e={rel:e,crossOrigin:l,href:t},a.querySelector(i)===null&&(t=a.createElement("link"),$t(t,"link",e),Tt(t),a.head.appendChild(t)))}}function Qp(e){ha.D(e),zv("dns-prefetch",e,null)}function Zp(e,t){ha.C(e,t),zv("preconnect",e,t)}function Kp(e,t,l){ha.L(e,t,l);var a=ni;if(a&&e&&t){var i='link[rel="preload"][as="'+bl(t)+'"]';t==="image"&&l&&l.imageSrcSet?(i+='[imagesrcset="'+bl(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(i+='[imagesizes="'+bl(l.imageSizes)+'"]')):i+='[href="'+bl(e)+'"]';var c=i;switch(t){case"style":c=ii(e);break;case"script":c=si(e)}if(!(Tl.has(c)||(e=ee({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Tl.set(c,e),a.querySelector(i)!==null||t==="style"&&a.querySelector(is(c))||t==="script"&&a.querySelector(ss(c))))){var d=a.createElement("link");$t(d,"link",e),t==="style"&&(d[As]=!0,d.onload=d.onerror=function(){Qd(d)}),Tt(d),a.head.appendChild(d)}}}function Jp(e,t){ha.m(e,t);var l=ni;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+bl(a)+'"][href="'+bl(e)+'"]',c=i;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=si(e)}if(!Tl.has(c)&&(e=ee({rel:"modulepreload",href:e},t),Tl.set(c,e),l.querySelector(i)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(ss(c)))return}a=l.createElement("link"),$t(a,"link",e),Tt(a),l.head.appendChild(a)}}}function Fp(e,t,l){ha.S(e,t,l);var a=ni;if(a&&e){var i=_n(a).hoistableStyles,c=ii(e);t=t||"default";var d=i.get(c);if(!d){var y={loading:0,preload:null};if(d=a.querySelector(is(c)))y.loading=5;else{e=ee({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Tl.get(c))&&Lo(e,l);var S=d=a.createElement("link");Tt(S),$t(S,"link",e),S._p=new Promise(function(D,U){S.onload=D,S.onerror=U}),S.addEventListener("load",function(){y.loading|=1}),S.addEventListener("error",function(){y.loading|=2}),y.loading|=4,qc(d,t,a)}d={type:"stylesheet",instance:d,count:1,state:y},i.set(c,d)}}}function Ip(e,t){ha.X(e,t);var l=ni;if(l&&e){var a=_n(l).hoistableScripts,i=si(e),c=a.get(i);c||(c=l.querySelector(ss(i)),c||(e=ee({src:e,async:!0},t),(t=Tl.get(i))&&Yo(e,t),c=l.createElement("script"),Tt(c),$t(c,"link",e),l.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},a.set(i,c))}}function Wp(e,t){ha.M(e,t);var l=ni;if(l&&e){var a=_n(l).hoistableScripts,i=si(e),c=a.get(i);c||(c=l.querySelector(ss(i)),c||(e=ee({src:e,async:!0,type:"module"},t),(t=Tl.get(i))&&Yo(e,t),c=l.createElement("script"),Tt(c),$t(c,"link",e),l.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},a.set(i,c))}}function Mv(e,t,l,a){var i=(i=Nt.current)?ns(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"?(l=ii(l.href),t=_n(i).hoistableStyles,a=t.get(l),a||(a={type:"style",instance:null,count:0,state:null},t.set(l,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=ii(l.href);var c=_n(i).hoistableStyles,d=c.get(e);if(d||(i=i.ownerDocument||i,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,d),(c=i.querySelector(is(e)))?c._p||(d.instance=c,d.state.loading=5):(c=Tl.get(e),c||(c={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Tl.set(e,c)),Pp(i,e,c,d.state))),t&&a===null)throw Error(r(528,""));return d}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"?(l=si(l),t=_n(i).hoistableScripts,a=t.get(l),a||(a={type:"script",instance:null,count:0,state:null},t.set(l,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function ii(e){return'href="'+bl(e)+'"'}function is(e){return'link[rel="stylesheet"]['+e+"]"}function Uv(e){return ee({},e,{"data-precedence":e.precedence,precedence:null})}function Pp(e,t,l,a){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[As]!==!0){a.loading=1;return}}else t=e.createElement("link"),t[As]=!0,t.onload=t.onerror=Qd.bind(null,t),$t(t,"link",l),Tt(t),e.head.appendChild(t);a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2})}function si(e){return'[src="'+bl(e)+'"]'}function ss(e){return"script[async]"+e}function $v(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+bl(l.href)+'"]');if(a)return t.instance=a,Tt(a),a;var i=ee({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Tt(a),$t(a,"style",i),qc(a,l.precedence,e),t.instance=a;case"stylesheet":i=ii(l.href);var c=e.querySelector(is(i));if(c)return t.state.loading|=4,t.instance=c,Tt(c),c;a=Uv(l),(i=Tl.get(i))&&Lo(a,i),c=(e.ownerDocument||e).createElement("link"),Tt(c);var d=c;return d._p=new Promise(function(y,S){d.onload=y,d.onerror=S}),$t(c,"link",a),t.state.loading|=4,qc(c,l.precedence,e),t.instance=c;case"script":return c=si(l.src),(i=e.querySelector(ss(c)))?(t.instance=i,Tt(i),i):(a=l,(i=Tl.get(c))&&(a=ee({},l),Yo(a,i)),e=e.ownerDocument||e,i=e.createElement("script"),Tt(i),$t(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,qc(a,l.precedence,e));return t.instance}function qc(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=a.length?a[a.length-1]:null,c=i,d=0;d<a.length;d++){var y=a[d];if(y.dataset.precedence===t)c=y;else if(c!==i)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function Lo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Yo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Hc=null;function Bv(e,t,l){if(Hc===null){var a=new Map,i=Hc=new Map;i.set(l,a)}else i=Hc,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 c=l[i];if(!(c[ji]||c[Dt]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var d=c.getAttribute(t)||"";d=e+d;var y=a.get(d);y?y.push(c):a.set(d,[c])}}return a}function Go(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function e0(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 qv(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function Hv(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Lv(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function Yv(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=Lv(t),e.suspenseyImages.push(t)),e=a0.bind(e),t.decode().then(e,e))}function t0(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=ii(a.href),c=t.querySelector(is(i));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=cs.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=c,Tt(c);return}c=t.ownerDocument||t,a=Uv(a),(i=Tl.get(i))&&Lo(a,i),c=c.createElement("link"),Tt(c);var d=c;d._p=new Promise(function(y,S){d.onload=y,d.onerror=S}),$t(c,"link",a),l.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=cs.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Lc=0;function l0(e,t){return e.stylesheets&&e.count===0&&Gc(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&Gc(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&Lc===0&&(Lc=62500*xp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Gc(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>Lc?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(i)}}:null}function Gv(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)Gc(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function cs(){this.count--,Gv(this)}function a0(){this.imgCount--,Gv(this)}var Yc=null;function Gc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yc=new Map,t.forEach(n0,e),Yc=null,cs.call(e))}function n0(e,t){if(!(t.state.loading&4)){var l=Yc.get(e);if(l)var a=l.get(null);else{l=new Map,Yc.set(e,l);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<i.length;c++){var d=i[c];(d.nodeName==="LINK"||d.getAttribute("media")!=="not all")&&(l.set(d.dataset.precedence,d),a=d)}a&&l.set(null,a)}i=t.instance,d=i.getAttribute("data-precedence"),c=l.get(d)||a,c===a&&l.set(null,i),l.set(d,i),this.count++,a=cs.bind(this),i.addEventListener("load",a),i.addEventListener("error",a),c?c.parentNode.insertBefore(i,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var ci={$$typeof:Xe,Provider:null,Consumer:null,_currentValue:ve,_currentValue2:ve,_threadCount:0};function i0(e,t,l,a,i,c,d,y,S){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=Su(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Su(0),this.hiddenUpdates=Su(null),this.identifierPrefix=a,this.onUncaughtError=i,this.onCaughtError=c,this.onRecoverableError=d,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=S,this.transitionTypes=null,this.incompleteTransitions=new Map}function Vv(e,t,l,a,i,c,d,y,S,D,U,L){return e=new i0(e,t,l,d,S,D,U,L,y),t=1,c===!0&&(t|=24),c=It(3,null,null,t),e.current=c,c.stateNode=e,t=ar(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:a,isDehydrated:l,cache:t},cr(c),e}function Xv(e){return e?(e=Rn,e):Rn}function Qv(e,t,l,a,i,c){i=Xv(i),a.context===null?a.context=i:a.pendingContext=i,a=Ea(t),a.payload={element:l},c=c===void 0?null:c,c!==null&&(a.callback=c),l=Aa(e,a,t),l!==null&&(tl(l,e,t),Bi(l,e,t))}function Zv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function Vo(e,t){Zv(e,t),(e=e.alternate)&&Zv(e,t)}function Kv(e){if(e.tag===13||e.tag===31){var t=en(e,67108864);t!==null&&tl(t,e,67108864),Vo(e,67108864)}}function Jv(e){if(e.tag===13||e.tag===31){var t=ml();t=_u(t);var l=en(e,t);l!==null&&tl(l,e,t),Vo(e,t)}}var ui=!0;function s0(e,t,l,a){var i=ae.T;ae.T=null;var c=Q.p;try{Q.p=2,Xo(e,t,l,a)}finally{Q.p=c,ae.T=i}}function c0(e,t,l,a){var i=ae.T;ae.T=null;var c=Q.p;try{Q.p=8,Xo(e,t,l,a)}finally{Q.p=c,ae.T=i}}function Xo(e,t,l,a){if(ui){var i=Qo(a);if(i===null)To(e,t,a,Vc,l),Iv(e,a);else if(r0(i,e,t,l,a))a.stopPropagation();else if(Iv(e,a),t&4&&-1<u0.indexOf(e)){for(;i!==null;){var c=Sn(i);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var d=Ja(c.pendingLanes);if(d!==0){var y=c;for(y.pendingLanes|=2,y.entangledLanes|=2;d;){var S=1<<31-cl(d);y.entanglements[1]|=S,d&=~S}Jl(c),(Ye&6)===0&&(Cc=il()+500,es(0))}}break;case 31:case 13:y=en(c,2),y!==null&&tl(y,c,2),Dc(),Vo(c,2)}if(c=Qo(a),c===null&&To(e,t,a,Vc,l),c===i)break;i=c}i!==null&&a.stopPropagation()}else To(e,t,a,null,l)}}function Qo(e){return e=Ou(e),Zo(e)}var Vc=null;function Zo(e){if(Vc=null,e=Fa(e),e!==null){var t=f(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=b(t),e!==null)return e;e=null}else if(l===31){if(e=v(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 Vc=e,null}function Fv(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"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"fullscreenerror":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"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(xg()){case zd:return 2;case Md:return 8;case _s:case jg:return 32;case Ud:return 268435456;default:return 32}default:return 32}}var Ko=!1,Ha=null,La=null,Ya=null,us=new Map,rs=new Map,Ga=[],u0="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 Iv(e,t){switch(e){case"focusin":case"focusout":Ha=null;break;case"dragenter":case"dragleave":La=null;break;case"mouseover":case"mouseout":Ya=null;break;case"pointerover":case"pointerout":us.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":rs.delete(t.pointerId)}}function os(e,t,l,a,i,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:c,targetContainers:[i]},t!==null&&(t=Sn(t),t!==null&&Kv(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function r0(e,t,l,a,i){switch(t){case"focusin":return Ha=os(Ha,e,t,l,a,i),!0;case"dragenter":return La=os(La,e,t,l,a,i),!0;case"mouseover":return Ya=os(Ya,e,t,l,a,i),!0;case"pointerover":var c=i.pointerId;return us.set(c,os(us.get(c)||null,e,t,l,a,i)),!0;case"gotpointercapture":return c=i.pointerId,rs.set(c,os(rs.get(c)||null,e,t,l,a,i)),!0}return!1}function Wv(e){var t=Fa(e.target);if(t!==null){var l=f(t);if(l!==null){if(t=l.tag,t===13){if(t=b(l),t!==null){e.blockedOn=t,Gd(e.priority,function(){Jv(l)});return}}else if(t===31){if(t=v(l),t!==null){e.blockedOn=t,Gd(e.priority,function(){Jv(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 Xc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Qo(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);Cu=a,l.target.dispatchEvent(a),Cu=null}else return t=Sn(l),t!==null&&Kv(t),e.blockedOn=l,!1;t.shift()}return!0}function Pv(e,t,l){Xc(e)&&l.delete(t)}function o0(){Ko=!1,Ha!==null&&Xc(Ha)&&(Ha=null),La!==null&&Xc(La)&&(La=null),Ya!==null&&Xc(Ya)&&(Ya=null),us.forEach(Pv),rs.forEach(Pv)}function Qc(e,t){e.blockedOn===t&&(e.blockedOn=null,Ko||(Ko=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,o0)))}var Zc=null;function ey(e){Zc!==e&&(Zc=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Zc===e&&(Zc=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(Zo(a||l)===null)continue;break}var c=Sn(l);c!==null&&(e.splice(t,3),t-=3,Ar(c,{pending:!0,data:i,method:l.method,action:a},a,i))}}))}function ri(e){function t(S){return Qc(S,e)}Ha!==null&&Qc(Ha,e),La!==null&&Qc(La,e),Ya!==null&&Qc(Ya,e),us.forEach(t),rs.forEach(t);for(var l=0;l<Ga.length;l++){var a=Ga[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Ga.length&&(l=Ga[0],l.blockedOn===null);)Wv(l),l.blockedOn===null&&Ga.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var i=l[a],c=l[a+1],d=i[Ft]||null;if(typeof c=="function")d||ey(l);else if(d){var y=null;if(c&&c.hasAttribute("formAction")){if(i=c,d=c[Ft]||null)y=d.formAction;else if(Zo(i)!==null)continue}else y=d.action;typeof y=="function"?l[a+1]=y:(l.splice(a,3),a-=3),ey(l)}}}function ty(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(d){return i=d})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.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 Jo(e){this._internalRoot=e}Kc.prototype.render=Jo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var l=t.current,a=ml();Qv(l,a,e,t,null,null)},Kc.prototype.unmount=Jo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Qv(e.current,2,null,e,null,null),Dc(),t[jn]=null}};function Kc(e){this._internalRoot=e}Kc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Yd();e={blockedOn:null,target:e,priority:t};for(var l=0;l<Ga.length&&t!==0&&t<Ga[l].priority;l++);Ga.splice(l,0,e),l===0&&Wv(e)}};var ly=u.version;if(ly!=="19.3.1")throw Error(r(527,ly,"19.3.1"));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=p(t),e=e!==null?j(e):null,e=e===null?null:e.stateNode,e};var d0={bundleType:0,version:"19.3.1",rendererPackageName:"react-dom",currentDispatcherRef:ae,reconcilerVersion:"19.3.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Jc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jc.isDisabled&&Jc.supportsFiber)try{bi=Jc.inject(d0),sl=Jc}catch{}}return fs.createRoot=function(e,t){if(!h(e))throw Error(r(299));var l=!1,a="",i=Xh,c=Qh,d=Zh;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&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(d=t.onRecoverableError)),t=Vv(e,1,!1,null,null,l,a,null,i,c,d,ty),e[jn]=t.current,No(e),new Jo(t)},fs.hydrateRoot=function(e,t,l){if(!h(e))throw Error(r(299));var a=!1,i="",c=Xh,d=Qh,y=Zh,S=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(i=l.identifierPrefix),l.onUncaughtError!==void 0&&(c=l.onUncaughtError),l.onCaughtError!==void 0&&(d=l.onCaughtError),l.onRecoverableError!==void 0&&(y=l.onRecoverableError),l.formState!==void 0&&(S=l.formState)),t=Vv(e,1,!0,t,l??null,a,i,S,c,d,y,ty),t.context=Xv(null),l=t.current,a=ml(),a=_u(a),i=Ea(a),i.callback=null,Aa(l,i,a),l=a,t.current.lanes=l,xi(t,l),Jl(t),e[jn]=t.current,No(e),new Kc(t)},fs.version="19.3.1",fs}var fy;function j0(){if(fy)return Wo.exports;fy=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(u){console.error(u)}}return n(),Wo.exports=x0(),Wo.exports}var S0=j0();const eu="feltkit.admin-token";function _0(){const n=/(?:^|[#&])token=([^&]+)/.exec(location.hash);if(n){try{sessionStorage.setItem(eu,decodeURIComponent(n[1]))}catch{}return history.replaceState(null,"",`${location.pathname}#/overview`),decodeURIComponent(n[1])}try{return sessionStorage.getItem(eu)}catch{return null}}function hy(n){try{n?sessionStorage.setItem(eu,n):sessionStorage.removeItem(eu)}catch{}}class my extends Error{constructor(u,o,r){super(o),this.code=u,this.status=r}code;status}let Oy=null;const ld=n=>Oy=n;let Ic=null;const ad=n=>Ic=n;function wy(n){return Ic?n?{"x-feltkit-csrf":Ic.csrf,"x-feltkit-environment":Ic.environment}:{}:{"x-feltkit-admin":Oy??""}}async function de(n,u={}){const o=await fetch(`/_feltkit/api${n}`,{...u,credentials:"same-origin",headers:{...wy(!!(u.method&&u.method!=="GET")),...u.body?{"Content-Type":"application/json"}:{},...u.headers??{}}});let r;try{r=await o.json()}catch{throw new my("UNAVAILABLE",`The server answered ${o.status}.`,o.status)}if(!o.ok)throw new my(r?.error?.code??"INTERNAL",r?.error?.message??`Request failed (${o.status})`,o.status);return r}function k0(n,u){const o=new AbortController;return(async()=>{let r=500;for(;!o.signal.aborted;){try{const h=await fetch("/_feltkit/api/events",{credentials:"same-origin",headers:wy(!1),signal:o.signal});if(!h.ok||!h.body)throw new Error(String(h.status));u(!0),r=500;const f=h.body.getReader(),b=new TextDecoder;let v="";for(;;){const{value:m,done:p}=await f.read();if(p)break;v+=b.decode(m,{stream:!0});let j;for(;(j=v.indexOf(`
|
|
10
|
+
|
|
11
|
+
`))>=0;){const g=v.slice(0,j);v=v.slice(j+2);const x=/^event: (.+)$/m.exec(g)?.[1],A=/^data: (.+)$/m.exec(g)?.[1];x&&A&&n(x,JSON.parse(A))}}}catch{}if(u(!1),o.signal.aborted)break;await new Promise(h=>setTimeout(h,r)),r=Math.min(r*2,8e3)}})(),()=>o.abort()}function su(n){const u=!!n?.environment?.development,r=(n?.operator?.permissions??[]).some(h=>h==="*"||h==="feltkit.*"||h==="feltkit.operations.*"||h==="feltkit.operations.write");return{development:u,canAct:u||r,actor:n?.operator?.principal?.id??null}}const ud=Object.freeze({positive:"●",progress:"◐",attention:"▲",critical:"✕",neutral:"○",unknown:"?"}),N0=Object.freeze(["verified","verification_failed","not_verified","not_evaluated"]);function Dy(n){const u=String(n).replace(/_/g," ");return u&&u[0].toUpperCase()+u.slice(1)}const Te="positive",ge="progress",ll="attention",Ze="critical",Ge="neutral",Xa="unknown",T0={"compute.environment.actual_state":{running:Te,completed:Te,pending:ge,starting:ge,stopping:ge,degraded:ll,failed:Ze,denied:Ze,stopped:Ge},"compute.health":{healthy:Te,unhealthy:Ze,unknown:Xa},"compute.environment.readiness":{ready:Te,created:ge,starting:ge,degraded:ll,failed:Ze,unavailable:Ze},"compute.process.readiness":{ready:Te,starting:ge,unready:ll},"compute.process.state":{ready:Te,running:Te,pending:ge,starting:ge,stopping:ge,unready:ll,failed:Ze,lost:Ze,stopped:Ge,exited:Ge,destroyed:Ge,expired:Ge,unverified:Xa,unreachable:Xa},"compute.deployment.status":{active:Te,complete:Te,pending:ge,starting:ge,ready:ge,network_ready:ge,switching:ge,draining:ge,failed:Ze,rolled_back:Ze},"compute.version.status":{published:Te,publishing:ge,failed:Ze},"compute.rollout.status":{active:Te,applying:ge,failed:Ze,superseded:Ge},"compute.job.status":{succeeded:Te,created:ge,accepted:ge,queued:ge,waiting_for_capacity:ge,reserved:ge,admitted:ge,preparing:ge,running:ge,failed:Ze,rejected:Ze,timed_out:Ze,cancelled:Ge},"compute.computer.observed":{running:Te,starting:ge,reconciling:ge,stopping:ge,failed:Ze,lost:Ze,stopped:Ge,destroyed:Ge,expired:Ge,unverified:Xa,unreachable:Xa},"compute.computer.status":{running:Te,pending:ge,provisioning:ge,resuming:ge,stopping:ge,destroying:ge,failed:Ze,lost:Ze,stopped:Ge,destroyed:Ge,expired:Ge,unreachable:Xa},"feltdb.health.ready_state":{healthy:Te,recovering:ge,degraded:ll,unavailable:Ze},"feltdb.authority.availability":{available:Te,recovering:ge,degraded:ll,closed:Ge,unknown:Xa},"feltdb.authority.lease_clock_healthy":{true:[Te,"Healthy"],false:[ll,"Degraded"]},"authboundry.decision.live":{allow:[Te,"Allow"],deny:[Ze,"Deny"]},"authboundry.decision.recorded":{allow:[Te,"Allow"],deny:[Ge,"Deny"]},"authboundry.delegation.status":{active:Te,pending:ge,revoked:Ze,expired:Ge},"authboundry.application.status":{active:Te,awaiting_contract:ge,disabled:Ge},"authboundry.studio.attached":{true:[Te,"Attached"],false:[ll,"Not attached"]},"authboundry.studio.protection":{active:[Te,"Active"],inactive:[Ge,"Inactive"],unreachable:[ll,"Upstream unreachable"]},"appport.job.status":{completed:Te,scheduled:ge,pending:ge,running:ge,retrying:ge,failed:Ze},"appport.notification.status":{delivered:Te,pending:ge,failed:Ze,read:Ge,acknowledged:Ge,expired:Ge},"appport.api_key.revoked":{false:[Te,"Active"],true:[Ge,"Revoked"]},"appport.webhook.disabled":{false:[Te,"Enabled"],true:[Ge,"Disabled"]},"appport.schedule.enabled":{true:[Te,"Enabled"],false:[Ge,"Disabled"]},"appport.configuration.secret.configured":{true:[Te,"Configured"]},"appboundry.lifecycle.phase":{ACTIVE:[Te,"Active"],DRAFT:[ge,"Draft"],VALIDATED:[ge,"Validated"],REGISTERED:[ge,"Registered"],CHANGE_PROPOSED:[ll,"Change proposed"],RETIRED:[Ge,"Retired"]},"appboundry.provider.compatible":{true:[Te,"Compatible"],false:[ll,"Incompatible"]},"appboundry.execution.status":{succeeded:Te,running:ge,failed:Ze,timed_out:[Ze,"Timed out"],cancelled:Ge},"appboundry.source.status":{connected:Te,stale:ll,failed:Ze,disconnected:Ge},"appboundry.implementation.status":{verified:[Te,"Current"],stale:ll,revoked:Ze},"appboundry.provider.eligibility":{ELIGIBLE:[Te,"Eligible"],INELIGIBLE:[Ge,"Ineligible"]},"appboundry.deployment.status":{running:Te,available:Ge,stopped:Ge},"appboundry.deployment.step":{complete:Te,failed:Ze,pending:[Ge,"Not run"]},"appboundry.health.ready":{true:[Te,"Ready"],false:[Ze,"Not ready"]},"appboundry.health.check":{available:Te,degraded:ll,unavailable:Ze}},E0={"feltdb.revision.integrity_verified":{true:"verified",false:"verification_failed"},"appboundry.implementation.verification":{verified:"verified",stale:"not_verified"},"appboundry.attestation.status":{verified:"verified",CONTRACT_MISMATCH:"verification_failed",IDENTITY_MISMATCH:"verification_failed"},"appboundry.conformance.status":{CONFORMING:"verified",NON_CONFORMING:"verification_failed"}},A0={"compute.response.state":{live:"live",cached:"cached",stale:"stale"},"feltdb.snapshot.staleness":{current:"live",stale:"stale",unknown:"unknown"}},pd=n=>Object.freeze(Object.fromEntries(Object.entries(n).map(([u,o])=>[u,Object.freeze({...o})]))),C0=pd(T0);pd(E0);pd(A0);const O0=(n,u)=>Object.prototype.hasOwnProperty.call(n,u);function w0(n,u,o){const r=C0[n];if(!r)throw new Error(`unknown field: ${n}`);const h=String(u),f=O0(r,h)?r[h]:null,[b,v]=f===null?[Xa,null]:Array.isArray(f)?f:[f,null],m=o&&o.label||v||(f===null?h:Dy(h));return{field:n,value:h,tone:b,label:m,glyph:ud[b],mapped:f!==null}}function rd(n,u){const o=D0(u);let r=N0.includes(n)?n:"not_evaluated";return r==="verified"&&o.length===0&&(r="not_evaluated"),r==="verified"&&o.some(h=>h.status==="failed")&&(r="verification_failed"),{state:r,checks:o}}function D0(n){return n?n.map(u=>typeof u=="string"?{label:u}:{label:String(u.label),...u.status?{status:u.status}:{}}):[]}const ma=Object.freeze({company:Object.freeze({name:"Boundry",href:"https://boundry.company",tagline:"Infrastructure for applications and agents.",family:"Part of the Boundry family of products"}),products:Object.freeze([{id:"feltdb",name:"FeltDB",mark:"FD",category:"Durable state",href:"https://feltdb.com"},{id:"feltkit",name:"FeltKit",mark:"FK",category:"Developer platform",href:"https://getfeltkit.com"},{id:"appboundry",name:"AppBoundry",mark:"AB",category:"Application boundaries",href:"https://appboundry.com"},{id:"authboundry",name:"AuthBoundry",mark:"AU",category:"Authority and delegation",href:"https://authboundry.com"},{id:"appport",name:"AppPort",mark:"AP",category:"Application capabilities",href:"https://boundry.company/ecosystem/#appport"}].map(n=>Object.freeze(n)))});function od(n){return ma.products.find(u=>u.id===n)||null}const _=(n,u,o,r,h)=>({t:n,a:u||{},c:o===void 0?[]:[].concat(o),...r?{on:r}:{},...h==null?{}:{k:String(h)}}),Wc=n=>!!(n&&typeof n=="object"&&typeof n.t=="string"&&n.a&&Array.isArray(n.c)),Se=(...n)=>n.filter(Boolean).join(" "),X=n=>n!=null&&n!=="",Ee=n=>{const u={};for(const[o,r]of Object.entries(n||{}))(/^(data-|aria-)/.test(o)||o==="id"||o==="title")&&(u[o]=r);return u};function R0(n){const u=new Date(n);return Number.isNaN(u.getTime())?String(n):`${u.toISOString().slice(0,19).replace("T"," ")} UTC`}const cu=(n,u)=>{const o=new Date(n);return Number.isNaN(o.getTime())?_("span",{class:u},String(n)):_("time",{class:u,datetime:o.toISOString()},R0(n))};function z0(n){const{field:u,value:o,detail:r,className:h,attrs:f}=n,b=u?w0(u,o,{label:n.label}):null,v=b?b.tone:n.tone||"unknown",m=b?b.label:X(n.label)?n.label:Dy(v),p=n.glyph||ud[v]||ud.unknown;return _("span",{class:Se("stack-status",`stack-status--${v}`,h),"data-tone":v,...b?{"data-field":b.field,"data-value":b.value}:{},...Ee(f)},[_("span",{class:"stack-status__glyph","aria-hidden":"true"},p),_("span",{class:"stack-status__label"},m),X(r)?_("span",{class:"stack-status__detail"},r):null])}const M0={verified:"✓",verification_failed:"✕",not_verified:"!",not_evaluated:"–"};function Ry(n){const{state:u,checks:o}=rd(n.state,n.checks),r=o.filter(f=>f.status==="failed");let h;if(u==="verified")h=o.length===1?`Verified · ${o[0].label}`:`Verified · ${o.length} checks`;else if(u==="verification_failed"){const f=r.length?r:o;h=f.length===1?`Verification failed · ${f[0].label}`:f.length?`Verification failed · ${f.length} checks`:"Verification failed"}else h=u==="not_verified"?"Not verified":"Not evaluated";return _("div",{class:Se("stack-verification",`stack-verification--${u}`,n.className),"data-verification":u,...Ee(n.attrs)},[_("span",{class:"stack-verification__glyph","aria-hidden":"true"},M0[u]),_("span",{class:"stack-verification__label"},h),X(n.at)?[" · ",cu(n.at,"stack-verification__at")]:null,X(n.evidenceHref)?_("a",{class:"stack-verification__evidence",href:n.evidenceHref},"Evidence"):null,o.length>1?_("ul",{class:"stack-verification__checks"},o.map(f=>_("li",{class:"stack-verification__check",...f.status?{"data-check-status":f.status}:{}},f.status?`${f.label} — ${f.status}`:f.label))):null])}const vy={live:"Live",cached:"Cached",stale:"Stale",unknown:"Freshness unknown"},U0={live:"●",cached:"◷",stale:"▲",unknown:"?"};function $0(n){const u=vy[n.freshness]?n.freshness:"unknown",o=X(n.asOf)&&u!=="live";return _("span",{class:Se("stack-freshness",`stack-freshness--${u}`,n.className),"data-freshness":u,...Ee(n.attrs)},[_("span",{class:"stack-freshness__glyph","aria-hidden":"true"},U0[u]),_("span",{class:"stack-freshness__label"},[vy[u],o?[" · as of ",cu(n.asOf,"stack-freshness__as-of")]:null,X(n.source)?` · ${n.source}`:null])])}function B0(n){const u=n.status==="partial"?"partial":"unsupported",o=X(n.title)?n.title:u==="partial"?"Partly available":"Not available";return _("div",{class:Se("stack-unavailable",`stack-unavailable--${u}`,n.className),role:"note","data-capability-status":u,...X(n.capability)?{"data-capability":n.capability}:{},...Ee(n.attrs)},[_(n.headingLevel?ru(n.headingLevel):"p",{class:"stack-unavailable__title"},o),X(n.reason)?_("p",{class:"stack-unavailable__reason"},n.reason):null,n.children||null])}function uu(n){const u=X(n.what)?n.what:"",o=n.long?`Still loading${u?` ${u}`:""}…`:`Loading${u?` ${u}`:""}…`;return _("div",{class:Se("stack-loading",n.long?"stack-loading--long":null,n.className),role:"status","aria-live":"polite",...Ee(n.attrs)},[_("span",{class:"stack-loading__indicator","aria-hidden":"true"}),_("span",{class:"stack-loading__label"},o)])}const ru=n=>`h${Math.min(6,Math.max(1,Number(n)||2))}`;function ou(n){const u=n.variant==="no-match"?"no-match":"empty",o=X(n.title)?n.title:u==="no-match"?"Nothing matches":"Nothing here yet";return _("div",{class:Se("stack-empty",`stack-empty--${u}`,n.className),...Ee(n.attrs)},[_(ru(n.headingLevel),{class:"stack-empty__title"},o),X(n.body)?_("p",{class:"stack-empty__body"},n.body):null,n.action?_("div",{class:"stack-empty__action"},n.action):null])}function bs(n){const u=[X(n.code)?["Code ",_("code",{},n.code)]:null,X(n.requestId)?[X(n.code)?" · ":"","Request ",_("code",{},n.requestId)]:null].filter(Boolean);return _("div",{class:Se("stack-error",n.className),role:"alert",...Ee(n.attrs)},[_("p",{class:"stack-error__title"},X(n.title)?n.title:"Something went wrong"),X(n.message)?_("p",{class:"stack-error__message"},n.message):null,u.length?_("p",{class:"stack-error__meta"},u):null,n.onRetry||n.actions?_("div",{class:"stack-error__actions"},[n.onRetry?Il({label:n.retryLabel||"Retry",onClick:n.onRetry}):null,n.actions||null]):null])}function q0(n){return _("dl",{class:Se("stack-meta",n.className),...Ee(n.attrs)},(n.items||[]).map(u=>{const o=!X(u.value)&&u.value!==0&&u.value!==!1;return _("div",{class:"stack-meta__item",...Ee(u.attrs)},[_("dt",{class:"stack-meta__label"},u.label),_("dd",{class:Se("stack-meta__value",u.mono?"stack-meta__value--mono":null),...o?{"data-missing":"true"}:{}},o?"—":typeof u.value=="boolean"?String(u.value):u.value),X(u.hint)?_("dd",{class:"stack-meta__hint"},u.hint):null])}))}function H0(n){const u=Number(n.length)||12,o=X(n.id)?String(n.id):null,r=o&&o.length>u?`${o.slice(0,u)}…`:o,h=X(n.name)?_(n.href?"a":"span",{class:"stack-identity__name",...n.href?{href:n.href}:{}},n.name):null;return _("span",{class:Se("stack-identity",n.className),...Ee(n.attrs)},[X(n.kind)?_("span",{class:"stack-identity__kind"},n.kind):null,h,o?_("code",{class:"stack-identity__id",title:o},r===o?o:[_("span",{"aria-hidden":"true"},r),_("span",{class:"stack-visually-hidden"},o)]):null])}function L0(n){return _("header",{class:Se("stack-page-header",n.className),...Ee(n.attrs)},[X(n.eyebrow)?_("p",{class:"stack-page-header__eyebrow"},n.eyebrow):null,_("div",{class:"stack-page-header__title-row"},[_(ru(n.headingLevel||1),{class:"stack-page-header__title"},n.title),n.status?_("span",{class:"stack-page-header__status"},n.status):null,n.actions?_("div",{class:"stack-page-header__actions"},n.actions):null]),X(n.description)?_("p",{class:"stack-page-header__description"},n.description):null,n.meta?_("div",{class:"stack-page-header__meta"},n.meta):null])}const Y0=["primary","secondary","danger","ghost"],G0=["sm","md","lg"];function Il(n){const u=Y0.includes(n.variant)?n.variant:"secondary",o=G0.includes(n.size)?n.size:"md",r=!!(n.disabled||n.busy);return _("button",{class:Se("stack-button",`stack-button--${u}`,`stack-button--${o}`,n.className),type:n.type==="submit"?"submit":"button",...r?{disabled:!0}:{},...n.busy?{"aria-busy":"true"}:{},...Ee(n.attrs)},[n.busy?_("span",{class:"stack-button__busy","aria-hidden":"true"}):null,_("span",{class:"stack-button__label"},n.label)],n.onClick&&!r?{click:n.onClick}:void 0)}function V0(n){const u=(n.items||[]).filter(o=>o&&X(o.label));return _("nav",{class:Se("stack-breadcrumbs",n.className),"aria-label":n.label||"Breadcrumb",...Ee(n.attrs)},_("ol",{class:"stack-breadcrumbs__list"},u.map((o,r)=>{const h=r===u.length-1;return _("li",{class:"stack-breadcrumbs__item"},[r>0?_("span",{class:"stack-breadcrumbs__separator","aria-hidden":"true"},"/"):null,h||!X(o.href)?_("span",{class:"stack-breadcrumbs__current",...h?{"aria-current":"page"}:{}},o.label):_("a",{class:"stack-breadcrumbs__link",href:o.href},o.label)])})))}function X0(n){if(!["ArrowRight","ArrowLeft","ArrowDown","ArrowUp","Home","End"].includes(n.key))return;const o=n.currentTarget,r=Array.from(o.querySelectorAll('[role="tab"]:not([disabled])'));if(!r.length)return;const h=r.indexOf(o.ownerDocument.activeElement),f=o.getAttribute("aria-orientation")==="vertical",b=f?"ArrowDown":"ArrowRight",v=f?"ArrowUp":"ArrowLeft";let m;if(n.key==="Home")m=0;else if(n.key==="End")m=r.length-1;else if(n.key===b)m=h<0?0:(h+1)%r.length;else if(n.key===v)m=h<0?r.length-1:(h-1+r.length)%r.length;else return;n.preventDefault(),r[m].focus()}const kt=n=>String(n).replace(/[^A-Za-z0-9_-]/g,"-"),Q0=n=>u=>{const o=u.currentTarget.ownerDocument.getElementById(n);o&&(u.preventDefault(),o.focus(),typeof o.scrollIntoView=="function"&&o.scrollIntoView())};function Z0(n){const u=kt(n.idPrefix||"stack-tabs"),o=n.tabs||[],r=o.some(h=>h.id===n.active&&!h.disabled)?n.active:null;return _("div",{class:Se("stack-tabs",n.className),role:"tablist",...X(n.label)?{"aria-label":n.label}:{},...Ee(n.attrs)},o.map((h,f)=>{const b=h.id===r,v=b||r===null&&f===0;return _("button",{class:Se("stack-tabs__tab",b?"stack-tabs__tab--selected":null,h.className),type:"button",role:"tab",id:`${u}-tab-${kt(h.id)}`,"aria-selected":b?"true":"false",...X(n.panelId)?{"aria-controls":n.panelId}:{},tabindex:v?"0":"-1",...h.disabled?{disabled:!0,...X(h.reason)?{title:h.reason}:{}}:{},...Ee(h.attrs)},[h.label,X(h.badge)?_("span",{class:"stack-tabs__badge"},h.badge):null],n.onSelect&&!h.disabled?{click:()=>n.onSelect(h.id)}:void 0)}),{keydown:X0})}function K0(n){const u=kt(n.idPrefix||"stack-tabs");return _("div",{class:Se("stack-tabpanel",n.className),role:"tabpanel",id:n.id,...X(n.active)?{"aria-labelledby":`${u}-tab-${kt(n.active)}`}:{},tabindex:"0",...Ee(n.attrs)},n.children||null)}const yy={ascending:"▲",descending:"▼"},J0=n=>u=>{u.target===u.currentTarget&&(u.key!=="Enter"&&u.key!==" "||(u.preventDefault(),n()))};function F0(n){const u=n.columns||[],o=n.rows||[],r=X(n.label)?n.label:"Table";if(n.error)return bs({title:n.error.title||`${r} could not be read`,message:n.error.message,code:n.error.code,requestId:n.error.requestId,onRetry:n.error.onRetry,className:Se("stack-table-state",n.className),attrs:n.attrs});if(n.loading&&!o.length)return uu({what:n.loadingWhat||r.toLowerCase(),className:Se("stack-table-state",n.className),attrs:n.attrs});if(!o.length){const v=!!n.noMatch;return ou({variant:v?"no-match":"empty",title:v?n.noMatchTitle||"Nothing matches":n.emptyTitle||"Nothing here yet",body:v?n.noMatchBody:n.emptyBody,action:v?null:n.emptyAction,headingLevel:n.emptyHeadingLevel||3,className:Se("stack-table-state",n.className),attrs:n.attrs})}const h=n.sort||{},f=_("thead",{},_("tr",{},u.map(v=>{const m=h.column===v.id&&yy[h.direction]?h.direction:null,p=v.sortable&&n.onSort?_("button",{class:"stack-table__sort",type:"button"},[v.header,_("span",{class:"stack-table__sort-indicator","aria-hidden":"true"},m?yy[m]:"↕")],{click:()=>n.onSort(v.id)}):v.header;return _("th",{class:Se("stack-table__header",v.align==="end"?"stack-table__cell--end":null),scope:"col",...v.sortable&&n.onSort?{"aria-sort":m||"none"}:{}},p)}))),b=_("tbody",{},o.map(v=>{const m=typeof v.onSelect=="function";return _("tr",{class:Se("stack-table__row",m?"stack-table__row--selectable":null,v.selected?"stack-table__row--selected":null,v.className),...m?{tabindex:"0"}:{},...v.selected?{"aria-current":"true"}:{},...Ee(v.attrs)},u.map(p=>{const j=v.cells?v.cells[p.id]:void 0,g=j==null;return _("td",{class:Se("stack-table__cell",p.align==="end"?"stack-table__cell--end":null),...g?{"data-missing":"true"}:{}},g?"—":j)}),m?{click:v.onSelect,keydown:J0(v.onSelect)}:void 0,v.key)}));return _("div",{class:Se("stack-table",n.className),role:"region","aria-label":r,tabindex:"0",...n.loading?{"aria-busy":"true"}:{},...Ee(n.attrs)},_("table",{class:"stack-table__table"},[_("caption",{class:n.captionVisible?"stack-table__caption":"stack-visually-hidden"},r),f,b]))}function I0(n,u,o){const r=`${u}-${kt(n.id)}`,h=X(n.value)?String(n.value):"",f=o?v=>o(n.id,v.target.value):null,b=n.type==="select"?_("select",{class:"stack-filter__control",id:r,name:n.id},(n.options||[]).map(v=>{const m=String(typeof v=="object"?v.value:v);return _("option",{value:m,...m===h?{selected:!0}:{}},typeof v=="object"?v.label:v)}),f?{change:f}:void 0):_("input",{class:"stack-filter__control",id:r,name:n.id,type:"search",value:h,...X(n.placeholder)?{placeholder:n.placeholder}:{}},[],f?{input:f}:void 0);return _("div",{class:"stack-filter__field"},[_("label",{class:"stack-filter__label",for:r},n.label),b])}function W0(n){const u=kt(n.idPrefix||"stack-filter"),o=Number(n.applied)||0;return _("form",{class:Se("stack-filter",n.className),role:"search","aria-label":n.label||"Filters",...Ee(n.attrs)},[_("div",{class:"stack-filter__controls"},[(n.filters||[]).map(r=>I0(r,u,n.onChange)),_("div",{class:"stack-filter__actions"},[n.live?null:Il({label:n.applyLabel||"Apply",type:"submit",variant:"secondary"}),o&&n.onClear?Il({label:n.clearLabel||"Clear",variant:"ghost",onClick:n.onClear}):null])]),_("p",{class:"stack-filter__result",role:"status","aria-live":"polite"},X(n.result)?n.result:"")],n.onSubmit||n.live?{submit:r=>{r.preventDefault(),n.onSubmit&&n.onSubmit()}}:void 0)}function P0(n){return _("nav",{class:Se("stack-pagination",n.className),"aria-label":n.label||"Pagination",...Ee(n.attrs)},[X(n.summary)?_("p",{class:"stack-pagination__summary"},n.summary):null,_("div",{class:"stack-pagination__actions"},[Il({label:n.previousLabel||"← Previous",variant:"ghost",disabled:!n.hasPrevious,onClick:n.onPrevious,attrs:{"data-page":"previous"}}),Il({label:n.nextLabel||"Next →",variant:"ghost",disabled:!n.hasNext,onClick:n.onNext,attrs:{"data-page":"next"}})])])}const zy=Object.freeze([{value:"system",label:"System theme"},{value:"light",label:"Light theme"},{value:"dark",label:"Dark theme"}]);function ex(n){const u=n.product||{},o=k=>n.onNavigate?{click:E=>{E.defaultPrevented||E.button!==0||E.metaKey||E.ctrlKey||E.shiftKey||E.altKey||(E.preventDefault(),n.onNavigate(k))}}:void 0,r=kt(n.mainId||"stack-main"),h=n.narrowNavigation==="menu"&&typeof n.onNavigationToggle=="function",f=h&&!!n.navigationOpen,b=`${r}-nav`,v=`${r}-menu-button`,m=k=>{n.onNavigationToggle(!1);const E=k.currentTarget.ownerDocument.getElementById(v);E&&E.focus()},p=[];for(const k of n.navigation||[]){const E=k.group||"";let $=p.find(W=>W.name===E);$||p.push($={name:E,items:[]}),$.items.push(k)}for(const k of p)k.items.sort((E,$)=>(E.order??0)-($.order??0));const j=k=>{const E=o(k);return f?{click:$=>{!$.metaKey&&!$.ctrlKey&&!$.shiftKey&&!$.altKey&&n.onNavigationToggle(!1),E&&E.click($)}}:E},g=k=>_("li",{class:"stack-shell__nav-entry"},_("a",{class:Se("stack-shell__nav-item",k.className),href:k.href,...k.current?{"aria-current":"page"}:{},...Ee(k.attrs)},k.label,j(k.href))),x=n.theme,A=`${r}-theme`,q=n.otherProducts||(X(u.id)&&od(u.id)?ma.products.filter(k=>k.id!==u.id).map(k=>({name:k.name,href:k.href})):[]),z=X(u.id)&&od(u.id)&&n.family!==!1;return _("div",{class:Se("stack-shell",h?"stack-shell--menu":null,f?"stack-shell--menu-open":null,n.className),...X(u.id)?{"data-stack-product":u.id}:{},...Ee(n.attrs)},[_("a",{class:"stack-shell__skip",href:`#${r}`},n.skipLabel||"Skip to content",{click:Q0(r)}),_("header",{class:"stack-shell__bar"},[h?_("button",{class:"stack-shell__menu-button",type:"button",id:v,"aria-expanded":f?"true":"false","aria-controls":b},[_("span",{"aria-hidden":"true"},f?"✕":"☰"),_("span",{class:"stack-visually-hidden"},n.menuLabel||"Menu")],{click:()=>n.onNavigationToggle(!f),...f?{keydown:k=>{k.key==="Escape"&&(k.preventDefault(),n.onNavigationToggle(!1))}}:{}}):null,_("a",{class:"stack-shell__product",href:u.homeHref||"#"},[X(u.mark)?_("span",{class:"stack-shell__mark","aria-hidden":"true"},u.mark):null,_("span",{class:"stack-shell__product-name"},u.name||"")],o(u.homeHref||"#")),n.context?_("div",{class:"stack-shell__context"},n.context):null,n.search?_("div",{class:"stack-shell__search"},n.search):null,_("div",{class:"stack-shell__end"},[x?_("div",{class:"stack-shell__prefs"},[_("label",{class:"stack-visually-hidden",for:A},"Theme"),_("select",{class:"stack-shell__theme",id:A,"data-stack-theme-control":""},zy.map(k=>_("option",{value:k.value,...k.value===(x.preference||"system")?{selected:!0}:{}},k.label)),x.onChange?{change:k=>x.onChange(k.target.value)}:void 0)]):null,n.account?_("div",{class:"stack-shell__account"},n.account):null,z?_("a",{class:"stack-shell__family",href:ma.company.href},[du({idPrefix:`${r}-family-mark`}),_("span",{},["A ",ma.company.name," product"])]):null])]),_("div",{class:"stack-shell__body"},[_("nav",{class:"stack-shell__nav","aria-label":`${u.name||"Product"} navigation`,...h?{id:b}:{}},[p.map(k=>_("div",{class:"stack-shell__nav-group"},[X(k.name)?_("p",{class:"stack-shell__nav-heading"},k.name):null,_("ul",{class:"stack-shell__nav-list"},k.items.map(g))])),X(n.activityHref)?_("div",{class:"stack-shell__nav-group stack-shell__activity"},_("ul",{class:"stack-shell__nav-list"},g({label:n.activityLabel||"Activity",href:n.activityHref,current:n.activityCurrent}))):null,q.length||z?_("div",{class:"stack-shell__nav-group stack-shell__switcher"},[_("p",{class:"stack-shell__nav-heading"},n.otherProductsLabel||"Other Boundry products"),_("ul",{class:"stack-shell__nav-list"},[q.map(k=>_("li",{class:"stack-shell__nav-entry"},_("a",{class:"stack-shell__nav-item",href:k.href},k.name))),z?_("li",{class:"stack-shell__nav-entry"},_("a",{class:"stack-shell__nav-item stack-shell__nav-item--company",href:ma.company.href},["About ",ma.company.name])):null])]):null],f?{keydown:k=>{k.key==="Escape"&&(k.preventDefault(),m(k))}}:void 0),_("main",{class:"stack-shell__main",id:r,tabindex:"-1",...Ee(n.mainAttrs)},n.children||null)])])}const tx=["pattern","min","max","step","minlength","maxlength","autocomplete","inputmode","list","spellcheck"],xd=n=>kt(X(n.id)?n.id:`stack-field-${n.name||"field"}`);function My(n,u,o,r){return _("div",{class:Se("stack-field",`stack-field--${r}`,n.error?"stack-field--invalid":null,n.className),...Ee(n.attrs)},[_("label",{class:"stack-field__label",for:u},[n.label,n.required?_("span",{class:"stack-field__required","aria-hidden":"true"}," *"):null]),o,X(n.hint)?_("p",{class:"stack-field__hint",id:`${u}-hint`},n.hint):null,X(n.error)?_("p",{class:"stack-field__error",id:`${u}-error`},n.error):null])}const lx=(n,u)=>{const o=[X(n.hint)?`${u}-hint`:null,X(n.error)?`${u}-error`:null].filter(Boolean);return o.length?{"aria-describedby":o.join(" ")}:{}},jd=(n,u)=>({...n.required?{required:!0}:{},...n.readOnly?{readonly:!0}:{},...n.disabled?{disabled:!0}:{},...X(n.error)?{"aria-invalid":"true"}:{},...lx(n,u)});function Uy(n){const u=xd(n),o=n.value!==void 0&&n.value!==null,r=o?String(n.value):null,h=n.onChange?{input:m=>n.onChange(m.target.value)}:void 0,f={};for(const m of tx)X(n[m])&&(f[m]=String(n[m]));const b={class:"stack-field__control",id:u,...X(n.name)?{name:n.name}:{},...X(n.placeholder)?{placeholder:n.placeholder}:{},...f,...jd(n,u)},v=n.multiline?_("textarea",{...b,rows:String(Number(n.rows)||4)},o?r:[],h):_("input",{...b,type:n.type||"text",...o?{value:r}:{}},[],h);return My(n,u,v,n.multiline?"multiline":"text")}function ax(n){const u=xd(n),o=X(n.value)?String(n.value):null,r=n.onChange?{change:f=>n.onChange(f.target.value)}:void 0,h=_("select",{class:"stack-field__control",id:u,...X(n.name)?{name:n.name}:{},...jd(n,u)},(n.options||[]).map(f=>{const b=String(typeof f=="object"?f.value:f);return _("option",{value:b,...b===o?{selected:!0}:{},...typeof f=="object"&&f.disabled?{disabled:!0}:{}},typeof f=="object"?f.label:f)}),r);return My(n,u,h,"select")}function nx(n){return _("form",{class:Se("stack-form",n.layout==="inline"?"stack-form--inline":null,n.className),...X(n.label)?{"aria-label":n.label}:{},...X(n.id)?{id:kt(n.id)}:{},...n.busy?{"aria-busy":"true"}:{},...Ee(n.attrs)},[_("div",{class:"stack-form__fields"},n.children||null),_("div",{class:"stack-form__actions"},[Il({label:n.submitLabel||"Save",type:"submit",variant:n.submitVariant||"primary",busy:n.busy}),n.actions||null])],{submit:u=>{u.preventDefault(),n.onSubmit&&n.onSubmit(u)}})}function $y(n){const u=kt(n.id||"stack-dialog"),o=[X(n.description)?`${u}-description`:null,...n.describedBy||[]].filter(Boolean);return _("dialog",{class:Se("stack-dialog",n.className),id:u,...n.role==="alertdialog"?{role:"alertdialog"}:{},"aria-labelledby":`${u}-title`,...o.length?{"aria-describedby":o.join(" ")}:{},...Ee(n.attrs)},_("div",{class:"stack-dialog__surface"},[_("h2",{class:"stack-dialog__title",id:`${u}-title`},n.title),X(n.description)?_("p",{class:"stack-dialog__description",id:`${u}-description`},n.description):null,n.children?_("div",{class:"stack-dialog__body"},n.children):null,n.actions?_("div",{class:"stack-dialog__actions"},n.actions):null]),{cancel:r=>{r.preventDefault(),n.onClose&&n.onClose()}})}function ix(n){const u=kt(n.id||"stack-confirm"),o=(n.consequences||[]).filter(X),r=!X(n.requireText)||n.typed===n.requireText;return $y({id:u,role:"alertdialog",title:n.title,description:n.description,describedBy:o.length?[`${u}-consequences`]:[],className:Se("stack-confirm",n.className),attrs:n.attrs,onClose:n.busy?null:n.onCancel,children:[o.length?_("ul",{class:"stack-confirm__consequences",id:`${u}-consequences`},o.map(h=>_("li",{},h))):null,X(n.requireText)?Uy({id:`${u}-typed`,name:"confirm",label:n.requireTextLabel||`Type ${n.requireText} to confirm`,value:n.typed===void 0||n.typed===null?"":n.typed,autocomplete:"off",spellcheck:"false",disabled:n.busy,onChange:n.onTypedChange}):null,n.error?bs({title:n.error.title||"Not done",message:n.error.message,code:n.error.code,requestId:n.error.requestId}):null],actions:[Il({label:n.cancelLabel||"Cancel",variant:"ghost",disabled:n.busy,onClick:n.onCancel,attrs:{"data-dialog-cancel":"true"}}),Il({label:n.confirmLabel,variant:"danger",busy:n.busy,disabled:!r,onClick:n.onConfirm,attrs:{"data-dialog-confirm":"true"}})]})}function sx(n){const u=kt(n.id||"stack-evidence"),o=(n.claims||[]).filter(g=>g&&X(g.label)),r=o.map(g=>X(g.verification)?rd(g.verification,g.checks).state:"not_evaluated"),h=r.filter(g=>g!=="not_evaluated"),f=h.filter(g=>g==="verified").length,b=h.filter(g=>g==="verification_failed").length,v=r.length-h.length,m=h.length===0?"recorded":f===h.length&&v===0?"verified":"partial",p=v?` · ${v} recorded, not checked`:"",j=m==="recorded"?"Recorded facts · not independently verified":m==="verified"?h.length===1?"Verified":`All ${h.length} claims verified`:`${f} of ${h.length} checked claims verified${b?` · ${b} failed`:""}${p}`;return _("section",{class:Se("stack-evidence",`stack-evidence--${m}`,n.className),"aria-labelledby":`${u}-title`,"data-evidence":m,...Ee(n.attrs)},[_("div",{class:"stack-evidence__header"},[_(ru(n.headingLevel||2),{class:"stack-evidence__title",id:`${u}-title`},X(n.title)?n.title:"Evidence"),n.outcome?_("div",{class:"stack-evidence__outcome"},n.outcome):null]),_("p",{class:"stack-evidence__summary"},j),o.length?_("dl",{class:"stack-evidence__claims"},o.map(g=>{const x=!X(g.value)&&g.value!==0&&g.value!==!1;return _("div",{class:"stack-evidence__claim",...X(g.verification)?{"data-verification":rd(g.verification,g.checks).state}:{},...Ee(g.attrs)},[_("dt",{class:"stack-evidence__label"},g.label),_("dd",{class:Se("stack-evidence__value",g.mono?"stack-evidence__value--mono":null),...x?{"data-missing":"true"}:{}},x?"—":typeof g.value=="boolean"?String(g.value):g.value),X(g.verification)?_("dd",{class:"stack-evidence__check"},Ry({state:g.verification,checks:g.checks,evidenceHref:g.evidenceHref})):null])})):null,X(n.source)||X(n.recordedAt)?_("p",{class:"stack-evidence__source"},[X(n.source)?n.source:"Recorded",X(n.recordedAt)?[" · ",cu(n.recordedAt,"stack-evidence__at")]:null]):null])}const cx=["info","attention","critical"],ux={info:"i",attention:"▲",critical:"✕"};function rx(n){const u=cx.includes(n.tone)?n.tone:"info";return _("div",{class:Se("stack-alert",`stack-alert--${u}`,n.className),role:u==="critical"?"alert":"status","data-tone":u,...Ee(n.attrs)},[_("span",{class:"stack-alert__glyph","aria-hidden":"true"},ux[u]),_("div",{class:"stack-alert__content"},[X(n.title)?_("p",{class:"stack-alert__title"},n.title):null,n.children?_("div",{class:"stack-alert__body"},n.children):null,n.actions?_("div",{class:"stack-alert__actions"},n.actions):null])])}function ox(n){const u=xd(n),o=n.checked!==void 0&&n.checked!==null,r=_("input",{class:"stack-checkbox__control",type:"checkbox",id:u,...X(n.name)?{name:n.name}:{},...X(n.value)?{value:String(n.value)}:{},...o&&n.checked?{checked:!0}:{},...jd(n,u)},[],n.onChange?{change:h=>n.onChange(!!h.target.checked)}:void 0);return _("div",{class:Se("stack-checkbox",n.error?"stack-checkbox--invalid":null,n.className),...Ee(n.attrs)},[_("div",{class:"stack-checkbox__row"},[r,_("label",{class:"stack-checkbox__label",for:u},[n.label,n.required?_("span",{class:"stack-field__required","aria-hidden":"true"}," *"):null])]),X(n.hint)?_("p",{class:"stack-field__hint",id:`${u}-hint`},n.hint):null,X(n.error)?_("p",{class:"stack-field__error",id:`${u}-error`},n.error):null])}function dx(n){const u=kt(n.id||"stack-group"),o=[X(n.hint)?`${u}-hint`:null,X(n.error)?`${u}-error`:null].filter(Boolean);return _("fieldset",{class:Se("stack-fieldgroup",n.error?"stack-fieldgroup--invalid":null,n.className),id:u,...o.length?{"aria-describedby":o.join(" ")}:{},...n.disabled?{disabled:!0}:{},...Ee(n.attrs)},[_("legend",{class:"stack-fieldgroup__legend"},[n.legend,n.required?_("span",{class:"stack-field__required","aria-hidden":"true"}," *"):null]),X(n.hint)?_("p",{class:"stack-field__hint",id:`${u}-hint`},n.hint):null,_("div",{class:"stack-fieldgroup__controls"},n.children||null),X(n.error)?_("p",{class:"stack-field__error",id:`${u}-error`},n.error):null])}function fx(n){const u=(n.items||[]).filter(h=>h&&X(h.summary)),o=X(n.label)?n.label:"Activity";let r;return n.error?r=bs(typeof n.error=="string"?{message:n.error}:n.error):n.loading&&!u.length?r=uu({what:X(n.what)?n.what:"activity"}):u.length?r=_("ol",{class:"stack-timeline__list","aria-label":o},u.map((h,f)=>_("li",{class:"stack-timeline__item",...Ee(h.attrs)},[_("span",{class:"stack-timeline__marker","aria-hidden":"true"}),_("div",{class:"stack-timeline__content"},[_("p",{class:"stack-timeline__summary"},X(h.href)?_("a",{class:"stack-timeline__link",href:h.href},h.summary):h.summary),_("p",{class:"stack-timeline__meta"},[X(h.at)?cu(h.at,"stack-timeline__at"):_("span",{class:"stack-timeline__at","data-missing":"true"},"Time not recorded"),X(h.actor)?[" · ",_("span",{class:"stack-timeline__actor"},h.actor)]:null,h.status?[" ",_("span",{class:"stack-timeline__status"},h.status)]:null]),h.detail?_("div",{class:"stack-timeline__detail"},h.detail):null])],void 0,X(h.id)?h.id:f))):r=ou({title:X(n.emptyTitle)?n.emptyTitle:"No activity recorded",headingLevel:n.headingLevel||3}),_("section",{class:Se("stack-timeline",n.className),...n.loading?{"aria-busy":"true"}:{},...Ee(n.attrs)},[r,n.hasMore&&u.length?_("p",{class:"stack-timeline__more"},[X(n.moreHref)?_("a",{href:n.moreHref,class:"stack-timeline__link"},n.moreLabel||"Older activity exists"):n.onMore?Il({label:n.moreLabel||"Load older activity",onClick:n.onMore,busy:!!n.loading}):n.moreLabel||"Older activity exists"]):null])}function du(n){const u=kt(n.idPrefix||"stack-brand-mark"),o=X(n.title);return _("svg",{class:Se("stack-brand-mark",n.className),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 340 315",focusable:"false",...o?{role:"img","aria-labelledby":`${u}-title`}:{"aria-hidden":"true"},...Ee(n.attrs)},[o?_("title",{id:`${u}-title`},n.title):null,_("defs",{},_("linearGradient",{id:`${u}-fill`,x1:"0",y1:"0",x2:"340",y2:"0",gradientUnits:"userSpaceOnUse"},[_("stop",{class:"stack-brand-mark__start",offset:"0.2"}),_("stop",{class:"stack-brand-mark__end",offset:"0.85"})])),_("path",{fill:`url(#${u}-fill)`,d:"M0 0H250C298 0 330 38 329 84C328 114 309 135 281 143L0 269V182L225 80H0Z"}),_("path",{fill:`url(#${u}-fill)`,d:"M0 315L290 182C318 172 341 202 340 246C339 288 306 315 268 315Z"})])}function By(n){const u=kt(n.id||"stack-theme");return _("div",{class:Se("stack-theme-switch",n.className),...Ee(n.attrs)},[_("label",{class:"stack-visually-hidden",for:u},n.label||"Theme"),_("select",{class:"stack-theme-switch__control",id:u,"data-stack-theme-control":""},zy.map(o=>_("option",{value:o.value,...o.value===(n.preference||"system")?{selected:!0}:{}},o.label)),n.onChange?{change:o=>n.onChange(o.target.value)}:void 0)])}const qy=n=>n.product?{...od(n.product.id)||{},...n.product}:null;function hx(n){const u=ma.company,o=qy(n),r=o?o.name:u.name,h=X(n.homeHref)?n.homeHref:"/";return _("header",{class:Se("stack-site-header",n.className),...o&&X(o.id)?{"data-stack-product":o.id}:{},...Ee(n.attrs)},[_("a",{class:"stack-site-header__skip",href:`#${kt(n.mainId||"main")}`},n.skipLabel||"Skip to content"),_("div",{class:"stack-site-header__inner"},[_("div",{class:"stack-site-header__identity"},[_("a",{class:"stack-site-header__home",href:h,"aria-label":`${r} home`},[n.logo?_("span",{class:"stack-site-header__logo"},n.logo):o?_("span",{class:"stack-site-header__product-mark","aria-hidden":"true"},o.mark||r.slice(0,2)):du({className:"stack-site-header__logo",idPrefix:`${kt(n.mainId||"main")}-mark`}),_("span",{class:"stack-site-header__name"},r)]),o?_("a",{class:"stack-site-header__family",href:u.href},["A ",u.name," product"]):null]),(n.navigation||[]).length?_("nav",{class:"stack-site-header__nav","aria-label":n.navigationLabel||"Main"},_("ul",{class:"stack-site-header__nav-list"},n.navigation.map(f=>_("li",{},_("a",{class:"stack-site-header__nav-item",href:f.href,...f.current?{"aria-current":"page"}:{},...Ee(f.attrs)},f.label))))):null,_("div",{class:"stack-site-header__end"},[n.theme?By({id:`${kt(n.mainId||"main")}-theme`,preference:n.theme.preference,onChange:n.theme.onChange}):null,n.actions||null])])])}function mx(n){const u=ma.company,o=qy(n),r=n.columns||[],h=X(n.year)?n.year:null,f=X(n.owner)?n.owner:u.name;return _("footer",{class:Se("stack-site-footer",n.className),...o&&X(o.id)?{"data-stack-product":o.id}:{},...Ee(n.attrs)},_("div",{class:"stack-site-footer__inner"},[_("div",{class:"stack-site-footer__top"},[_("div",{class:"stack-site-footer__about"},[_("p",{class:"stack-site-footer__name"},o?o.name:u.name),X(n.tagline)?_("p",{class:"stack-site-footer__tagline"},n.tagline):null]),r.map(b=>_("nav",{class:"stack-site-footer__column","aria-label":b.title},[_("p",{class:"stack-site-footer__heading"},b.title),_("ul",{class:"stack-site-footer__list"},(b.links||[]).map(v=>_("li",{},_("a",{class:"stack-site-footer__link",href:v.href,...Ee(v.attrs)},v.label))))]))]),_("nav",{class:"stack-site-footer__family","aria-label":`${u.name} products`},[_("a",{class:"stack-site-footer__company",href:u.href},[du({className:"stack-site-footer__mark",idPrefix:`${kt(n.id||"stack-footer")}-mark`}),_("span",{},o?u.family:`${u.name} — ${u.tagline}`)]),_("ul",{class:"stack-site-footer__products"},ma.products.map(b=>_("li",{"data-stack-product":b.id},_("a",{class:"stack-site-footer__product",href:b.href,...o&&o.id===b.id?{"aria-current":"true"}:{}},[_("span",{class:"stack-site-footer__product-name"},b.name),_("span",{class:"stack-site-footer__product-category"},b.category)]))))]),_("p",{class:"stack-site-footer__legal"},[`© ${h?`${h} `:""}${f}`,o?[" · ",o.name," is a ",_("a",{href:u.href},`${u.name} product`)]:null,n.legal?[" · ",n.legal]:null])]))}const fu=Object.freeze({Breadcrumbs:V0,Tabs:Z0,TabPanel:K0,DataTable:F0,FilterBar:W0,Pagination:P0,Shell:ex,StatusIndicator:z0,VerificationBadge:Ry,FreshnessLabel:$0,Unavailable:B0,Loading:uu,EmptyState:ou,ErrorPanel:bs,MetadataList:q0,ResourceIdentity:H0,PageHeader:L0,Button:Il,TextField:Uy,Select:ax,Form:nx,Dialog:$y,ConfirmAction:ix,EvidenceSummary:sx,Alert:rx,Checkbox:ox,FieldGroup:dx,ActivityTimeline:fx,BrandMark:du,ThemeSwitch:By,SiteHeader:hx,SiteFooter:mx}),te=(n,u,o,r)=>({t:n,a:u||{},c:o===void 0?[]:[].concat(o),...r==null?{}:{k:String(r)}}),Ml=(...n)=>n.filter(Boolean).join(" "),Sd=n=>n!=null&&n!=="",dd=n=>{const u={};for(const[o,r]of Object.entries(n||{}))(/^(data-|aria-)/.test(o)||o==="id"||o==="title")&&(u[o]=r);return u},ie=n=>Math.round(n*100)/100,fd=8,_d=12,Hy=.6,vx=640,yx=60,gx=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Qa=(n,u=_d)=>String(n).length*u*Hy,ms=(n,u,o=_d)=>{const r=String(n);if(Qa(r,o)<=u)return r;const h=Math.max(1,Math.floor(u/(o*Hy))-1);return`${r.slice(0,h)}…`},bx={USD:"$",EUR:"€",GBP:"£",JPY:"¥",CAD:"CA$",AUD:"A$",NZD:"NZ$",CHF:"CHF ",INR:"₹",CNY:"CN¥",MXN:"MX$",BRL:"R$"},px=new Set(["JPY"]),xx=[[1e12,"T"],[1e9,"B"],[1e6,"M"],[1e3,"K"]];function gy(n,u,o){const r=10**o,h=Math.round(n*r+n*r*Number.EPSILON),f=Math.floor(h/r);let b=o?String(h-f*r).padStart(o,"0"):"";for(;b.length>u&&b.endsWith("0");)b=b.slice(0,-1);const v=String(f).replace(/\B(?=(\d{3})+(?!\d))/g,",");return b?`${v}.${b}`:v}function Kt(n,u){if(n==null)return"—";if(typeof u=="function")return String(u(n));const o=u||{},r=o.style==="currency"||o.style==="percent"?o.style:"number";let h=o.divisor?n/o.divisor:n;r==="percent"&&(h*=100);const f=h<0;let b=Math.abs(h);const v=o.currency||"USD",m=r==="currency"?px.has(v)?0:2:r==="percent"?1:2;let p=o.maximumFractionDigits!==void 0?o.maximumFractionDigits:m,j=o.minimumFractionDigits!==void 0?o.minimumFractionDigits:r==="currency"?Math.min(m,p):0,g="";if(o.compact){p=o.maximumFractionDigits!==void 0?o.maximumFractionDigits:1,j=0;const k=10**p,E=xx.find(([$])=>Math.round(b/$*k)>=k);E&&(b/=E[0],g=E[1])}p<j&&(p=j);let x=gy(b,j,p);x.replace(/[0.,]/g,"")===""&&(x=gy(0,j,p));const A=x.replace(/[0.,]/g,"")==="",q=f&&!A?"-":"",z=r==="currency"?bx[v]||`${v} `:"";return`${q}${z}${x}${g}${r==="percent"?"%":""}${o.suffix||""}`}const jx=n=>new Date(n).toISOString().slice(0,10),Sx=n=>n.every(o=>{const r=new Date(o);return r.getUTCDate()===1&&r.getUTCHours()===0})?o=>{const r=new Date(o);return`${gx[r.getUTCMonth()]} ${r.getUTCFullYear()}`}:jx,Zt=(n,u)=>{throw new TypeError(`${n}: ${u}`)};function _x(n,u){const o=typeof u=="number"?u:Date.parse(u);return Number.isFinite(o)||Zt(n,`x value ${JSON.stringify(u)} is not a time (use epoch milliseconds or an ISO date)`),o}function kd(n,u,o="category"){Array.isArray(u)||Zt(n,"series must be an array"),["category","time","number"].includes(o)||Zt(n,`xType must be "category", "time" or "number", not ${JSON.stringify(o)}`);const r=new Set,h=[],f=new Map,b=u.map((v,m)=>{(!v||typeof v!="object")&&Zt(n,`series[${m}] must be an object`),(typeof v.id!="string"||!v.id)&&Zt(n,`series[${m}] needs a non-empty string id`),r.has(v.id)&&Zt(n,`series id "${v.id}" is used twice`),r.add(v.id),(typeof v.label!="string"||!v.label)&&Zt(n,`series "${v.id}" needs a label`),Array.isArray(v.data)||Zt(n,`series "${v.id}" data must be an array`);const p=new Set,j=new Map;v.data.forEach((x,A)=>{(!x||typeof x!="object")&&Zt(n,`series "${v.id}" point ${A} must be an object`),typeof x.x=="string"||typeof x.x=="number"&&Number.isFinite(x.x)||Zt(n,`series "${v.id}" point ${A} has an invalid x`),x.y===null||typeof x.y=="number"&&Number.isFinite(x.y)||Zt(n,`series "${v.id}" point ${A} y must be a finite number or null, not ${JSON.stringify(x.y)}`);let z;o==="time"?z=_x(n,x.x):o==="number"?(typeof x.x!="number"&&Zt(n,`series "${v.id}" point ${A} x must be a number for xType "number"`),z=x.x):z=String(x.x),p.has(z)&&Zt(n,`series "${v.id}" has two points at x ${JSON.stringify(x.x)}`),p.add(z),j.set(z,x.y),f.has(z)||(f.set(z,h.length),h.push(z))});const g=Number.isInteger(v.palette)&&v.palette>=1&&v.palette<=fd?v.palette:m%fd+1;return{id:v.id,label:v.label,hidden:!!v.hidden,palette:g,dash:m%4,values:j}});return o!=="category"&&h.sort((v,m)=>v-m),{keys:h,series:b.map(v=>({...v,y:h.map(m=>v.values.has(m)?v.values.get(m):null)}))}}function Ly(n,u,o=5){if(!(Number.isFinite(n)&&Number.isFinite(u)))return{min:0,max:1,ticks:[0,1]};if(n===u){if(n===0)return{min:0,max:1,ticks:[0,.5,1]};const j=Math.abs(n)*.5;return Ly(Math.min(0,n-j),Math.max(0,u+j),o)}const r=u-n,h=r/Math.max(1,o),f=10**Math.floor(Math.log10(h)),b=[1,2,2.5,5,10].map(j=>j*f).find(j=>r/j<=o)||10*f,v=Math.floor(n/b)*b,m=Math.ceil(u/b)*b,p=[];for(let j=v;j<=m+b/2;j+=b)p.push(Math.abs(j)<b/1e6?0:Number(j.toPrecision(12)));return{min:v,max:m,ticks:p}}const Pc=(n,u,o,r)=>h=>u===n?(o+r)/2:o+(h-n)/(u-n)*(r-o),Yy=(n,u)=>{const o=Math.max(120,Math.round(Number(n.width)||vx)),r=Number(n.aspectRatio)>0?Number(n.aspectRatio):u.aspectRatio,h=Math.round(Number(n.height)>0?Number(n.height):Math.min(u.maxHeight,Math.max(u.minHeight,o/r)));return{width:o,height:h}};function hs(n,u,o){const r=!!u.loading;return te("figure",{class:Ml("stack-chart",`stack-chart--${n}`,u.className),"data-chart":n,"data-chart-state":o.state,...r?{"aria-busy":"true"}:{},...dd(u.attrs)},[te("figcaption",{class:"stack-chart__header"},[u.headingLevel?te(`h${Math.min(6,Math.max(1,Number(u.headingLevel)||3))}`,{class:"stack-chart__title"},u.title):te("span",{class:"stack-chart__title"},u.title),Sd(u.description)?te("span",{class:"stack-chart__description"},u.description):null]),o.content])}function Gy(n,u,o){if(u.error){const r=typeof u.error=="string"?{message:u.error}:u.error;return{state:"error",content:te("div",{class:"stack-chart__state"},bs({title:u.errorTitle||"Could not show this chart",message:r.message,code:r.code,requestId:r.requestId,onRetry:u.onRetry}))}}return u.loading?{state:"loading",content:te("div",{class:"stack-chart__state"},uu({what:u.loadingWhat||"chart data",long:u.loadingLong}))}:o?null:{state:"empty",content:te("div",{class:"stack-chart__state"},ou({title:u.emptyTitle||"No data to show",body:u.emptyBody,headingLevel:(Number(u.headingLevel)||2)+1}))}}function hd(n,u,o){const r=typeof o.onToggleSeries=="function"?o.onToggleSeries:null;return te("ul",{class:"stack-chart__legend","aria-label":o.legendLabel||"Series"},u.map(h=>{const b=[te("span",{class:Ml("stack-chart__swatch",n==="line"||n==="sparkline"?"stack-chart__swatch--line":null,`stack-chart__s${h.palette}`,`stack-chart__d${h.dash}`),"aria-hidden":"true"}),te("span",{class:"stack-chart__legend-label"},h.label),h.note?te("span",{class:"stack-chart__legend-note"},h.note):null],v=r?{...te("button",{type:"button",class:"stack-chart__legend-toggle","aria-pressed":h.hidden?"false":"true"},b),on:{click:()=>r(h.id)}}:b;return te("li",{class:Ml("stack-chart__legend-item",h.hidden?"stack-chart__legend-item--hidden":null),"data-series":h.id},v,h.id)}))}function Vy(n,u,o){const r=n.table==="visible",h=te("thead",{},te("tr",{},u.map((v,m)=>te("th",{scope:"col",class:m?"stack-chart__num":null},v,m)))),f=te("tbody",{},o.map((v,m)=>te("tr",{},v.map((p,j)=>j===0?te("th",{scope:"row"},p,j):te("td",{class:"stack-chart__num",...p==="—"?{"data-missing":"true"}:{}},p,j)),m))),b=te("div",{class:"stack-chart__table-wrap"},te("table",{class:"stack-chart__table"},[te("caption",{class:"stack-visually-hidden"},n.title),h,f]));return n.table==="none"?null:te("details",{class:"stack-chart__data",...r?{open:!0}:{}},[te("summary",{class:"stack-chart__data-summary"},n.tableLabel||"Data table"),b])}function Xy(n,u,o,r,h){const v=Math.max(Qa(r),...h.map(x=>Qa(x.text)+(x.palette?14:0))),m=Math.min(o-4,v+16),p=16+16*(h.length+1)-4;let j=n+10;j+m>o-2&&(j=n-10-m),j<2&&(j=2);const g=m-16;return te("g",{class:"stack-chart__tip","aria-hidden":"true"},[te("rect",{class:"stack-chart__tip-box",x:ie(j),y:ie(u),width:ie(m),height:ie(p),rx:4}),te("text",{class:"stack-chart__tip-title",x:ie(j+8),y:ie(u+8+10)},ms(r,g)),h.map((x,A)=>[x.palette?te("rect",{class:Ml("stack-chart__tip-swatch",`stack-chart__s${x.palette}`),x:ie(j+8),y:ie(u+8+16*(A+1)+1),width:9,height:9,rx:2},[],`s${A}`):null,te("text",{class:"stack-chart__tip-row",x:ie(j+8+(x.palette?14:0)),y:ie(u+8+16*(A+1)+10)},ms(x.text,g-(x.palette?14:0)),`t${A}`)])])}function kx(n,u,o){if(typeof o.xFormat=="function")return n.keys.map(r=>String(o.xFormat(r)));if(u==="time"){const r=Sx(n.keys);return n.keys.map(r)}return u==="number"?n.keys.map(r=>Kt(r,o.xFormat)):n.keys.map(String)}const Nx=(n,u)=>n.axisFormat||(n.format&&typeof n.format=="object"&&Math.max(Math.abs(u.min),Math.abs(u.max))>=1e4?{...n.format,compact:!0,minimumFractionDigits:void 0,maximumFractionDigits:void 0}:n.format);function Tx(n,u,o,r){let h=1/0,f=-1/0;for(let b=0;b<u;b++)if(o){let v=0,m=0;for(const p of n){const j=p.y[b];j!==null&&(j>=0?v+=j:m+=j)}f=Math.max(f,v),h=Math.min(h,m)}else for(const v of n){const m=v.y[b];m!==null&&(f=Math.max(f,m),h=Math.min(h,m))}return r&&(h=Math.min(h,0),f=Math.max(f,0)),{min:h,max:f}}function Ex(n,u){const o=new Array(u).fill(0),r=new Array(u).fill(0);return n.map(h=>h.y.map((f,b)=>{if(f===null)return null;if(f>=0){const m=o[b];return o[b]+=f,[m,o[b]]}const v=r[b];return r[b]+=f,[r[b],v]}))}function hu(n,u){const o=u.xType||"category",r=kd(Ax(n),u.series,o),h=r.series,f=h.filter(Q=>!Q.hidden),b=r.keys.length,v=f.some(Q=>Q.y.some(ve=>ve!==null)),m=Gy(n,u,v),p=h.map(Q=>({id:Q.id,label:Q.label,palette:Q.palette,dash:Q.dash,hidden:Q.hidden})),j=u.legend===!1?!1:u.legend===!0||h.length>1;if(m)return hs(n,u,{state:m.state,content:[j&&m.state==="empty"?hd(n,p,u):null,m.content]});const g=n==="bar"&&u.orientation==="horizontal",x=!!u.stacked,A=n==="bar",q=x?30:Math.max(24,12*f.length+12),z=Math.max(120,b*q+48),{width:k,height:E}=Yy(u,g?{aspectRatio:.01,minHeight:z,maxHeight:z}:{aspectRatio:2,minHeight:180,maxHeight:420}),$=kx(r,o,u),W=n!=="line"||u.zeroBaseline!==!1,Z=Tx(f,b,x,W),F=g?k:E,re=Ly(Z.min,Z.max,Math.max(2,Math.min(8,Math.floor(F/(g?90:48))))),ee=Nx(u,Z),B=re.ticks.map(Q=>Kt(Q,ee)),ue=_d,J=u.yLabel?ue+8:0,_e=u.xLabel?ue+10:0;let Be,mt;const gt=10;let Xe=12;if(g){const Q=Math.max(...$.map(ve=>Qa(ve)));Be=Math.round(Math.min(k*.4,Q+12)+J),mt=ue+12+_e,Xe=Math.round(Math.max(12,Qa(B[B.length-1])/2+4))}else Be=Math.round(Math.max(...B.map(Q=>Qa(Q)))+12+J),mt=ue+14+_e,!A&&o!=="category"&&b&&(Xe=Math.round(Math.max(12,Qa($[b-1])/2+4)));const Y={x0:Be,x1:Math.max(Be+20,k-Xe),y0:gt,y1:Math.max(gt+20,E-mt)},P=Y.x1-Y.x0,ne=Y.y1-Y.y0,je=g?Pc(re.min,re.max,Y.x0,Y.x1):Pc(re.min,re.max,Y.y1,Y.y0),ke=(g?ne:P)/Math.max(1,b);let ct;if(A||o==="category")ct=Q=>(g?Y.y0:Y.x0)+ke*(Q+.5);else{const Q=Pc(r.keys[0],r.keys[b-1],Y.x0,Y.x1);ct=ve=>Q(r.keys[ve])}const ut=[],Al=u.grid!==!1;ut.push(te("g",{class:"stack-chart__axis stack-chart__axis--value","aria-hidden":"true"},re.ticks.map((Q,ve)=>{const we=ie(je(Q));return[Al?te("line",g?{class:Ml("stack-chart__grid",Q===0?"stack-chart__zero":null),x1:we,x2:we,y1:Y.y0,y2:Y.y1}:{class:Ml("stack-chart__grid",Q===0?"stack-chart__zero":null),x1:Y.x0,x2:Y.x1,y1:we,y2:we},[],`g${ve}`):null,te("text",g?{class:"stack-chart__tick stack-chart__tick--middle",x:we,y:ie(Y.y1+ue+4)}:{class:"stack-chart__tick stack-chart__tick--end",x:ie(Y.x0-6),y:ie(we+4)},B[ve],`t${ve}`)]})));const T=g?Be-J-8:Math.min(140,Math.max(24,P/2));let G=-1/0;if(ut.push(te("g",{class:"stack-chart__axis stack-chart__axis--category","aria-hidden":"true"},$.map((Q,ve)=>{const we=ie(ct(ve)),We=ms(Q,T);if(g)return we-ue/2<G+4?null:(G=we+ue/2,te("text",{class:"stack-chart__tick stack-chart__tick--end",x:ie(Y.x0-8),y:ie(we+4)},We,ve));const et=Qa(We);let Me=we-et/2,fe="middle",at=we;return Me<0?(Me=0,fe="start",at=0):Me+et>k&&(Me=k-et,fe="end",at=k),Me<G+8||Me<0?null:(G=Me+et,te("text",{class:`stack-chart__tick stack-chart__tick--${fe}`,x:ie(at),y:ie(Y.y1+ue+6)},We,ve))}))),u.yLabel){const Q=ie((Y.y0+Y.y1)/2);ut.push(te("text",{class:"stack-chart__axis-label stack-chart__tick--middle",x:ie(ue),y:Q,transform:`rotate(-90 ${ie(ue)} ${Q})`},u.yLabel))}u.xLabel&&ut.push(te("text",{class:"stack-chart__axis-label stack-chart__tick--middle",x:ie((Y.x0+Y.x1)/2),y:ie(E-4)},u.xLabel));const V=x?Ex(f,b):null,K=[];if(A){const Q=ke*.72,ve=x?Q:Q/Math.max(1,f.length);f.forEach((we,We)=>{const et=we.y.map((Me,fe)=>{if(Me===null)return null;const[at,bt]=x?V[We][fe]:Me>=0?[0,Me]:[Me,0],Nt=je(at),vt=je(bt),Lt=ct(fe)-Q/2+(x?0:We*ve),Bl=Math.abs(vt-Nt);return Bl===0?null:g?te("rect",{class:"stack-chart__bar",x:ie(Math.min(Nt,vt)),y:ie(Lt+.5),width:ie(Bl),height:ie(Math.max(1,ve-1))},[],fe):te("rect",{class:"stack-chart__bar",x:ie(Lt+.5),y:ie(Math.min(Nt,vt)),width:ie(Math.max(1,ve-1)),height:ie(Bl)},[],fe)});K.push(te("g",{class:Ml("stack-chart__series",`stack-chart__s${we.palette}`,`stack-chart__d${we.dash}`),"data-series":we.id},et,we.id))})}else f.forEach((Q,ve)=>{const we=[];let We=[];Q.y.forEach((fe,at)=>{if(fe===null){We.length&&we.push(We),We=[];return}const[bt,Nt]=x?V[ve][at]:[0,fe];We.push({i:at,x:ct(at),y:je(x?fe>=0?Nt:bt:fe),base:je(x?fe>=0?bt:Nt:Math.max(re.min,Math.min(0,re.max)))})}),We.length&&we.push(We);const et=[],Me=u.curve==="step";we.forEach((fe,at)=>{const bt=Me?fe.flatMap((vt,Lt)=>Lt?[{...vt,y:fe[Lt-1].y,base:fe[Lt-1].base},vt]:[vt]):fe,Nt=bt.map((vt,Lt)=>`${Lt?"L":"M"}${ie(vt.x)} ${ie(vt.y)}`).join(" ");if(n==="area"&&fe.length>1){const vt=[...bt].reverse().map(Lt=>`L${ie(Lt.x)} ${ie(Lt.base)}`).join(" ");et.push(te("path",{class:"stack-chart__area",d:`${Nt} ${vt} Z`},[],`a${at}`))}fe.length>1&&et.push(te("path",{class:"stack-chart__line",d:Nt},[],`l${at}`)),(fe.length===1||u.points)&&fe.forEach(vt=>et.push(te("circle",{class:"stack-chart__point",cx:ie(vt.x),cy:ie(vt.y),r:3.5},[],`p${at}-${vt.i}`)))}),K.push(te("g",{class:Ml("stack-chart__series",`stack-chart__s${Q.palette}`,`stack-chart__d${Q.dash}`),"data-series":Q.id},et,Q.id))});ut.push(te("g",{class:"stack-chart__marks"},K));const ce=u.format,be=b<=yx;ut.push(te("g",{class:"stack-chart__targets"},r.keys.map((Q,ve)=>{const we=ct(ve);let We,et;A||o==="category"?(We=we-ke/2,et=we+ke/2):(We=ve===0?Y.x0:(ct(ve-1)+we)/2,et=ve===b-1?Y.x1:(we+ct(ve+1))/2);const Me=f.map(bt=>({palette:bt.palette,text:`${bt.label}: ${Kt(bt.y[ve],ce)}`})),fe=`${$[ve]}: ${f.map(bt=>`${bt.label} ${Kt(bt.y[ve],ce)}`).join(", ")}`,at=g?{x:Y.x0,y:ie(We),width:ie(P),height:ie(Math.max(1,et-We))}:{x:ie(We),y:Y.y0,width:ie(Math.max(1,et-We)),height:ie(ne)};return te("g",{class:"stack-chart__target",...be?{tabindex:"0"}:{},role:"img","aria-label":fe},[te("rect",{class:"stack-chart__target-area",...at}),A?null:te("line",{class:"stack-chart__cursor",x1:ie(we),x2:ie(we),y1:Y.y0,y2:Y.y1}),Xy(g?Math.min(k-20,Y.x0+P/2):we,g?ie(Math.min(We+ke,E-16*(f.length+2))):Y.y0,k,$[ve],Me)],ve)})));const Ae=te("svg",{class:"stack-chart__svg",viewBox:`0 0 ${k} ${E}`,width:k,height:E,role:"group","aria-label":`${u.title}. ${be?"Use Tab to read each value, or open the data table.":"Open the data table to read the values."}`},ut),ae=Vy(u,[u.xLabel||(o==="time"?"Date":"Category"),...f.map(Q=>Q.label)],r.keys.map((Q,ve)=>[$[ve],...f.map(we=>Kt(we.y[ve],ce))]));return hs(n,u,{state:"ready",content:[j?hd(n,p,u):null,te("div",{class:"stack-chart__plot"},Ae),ae]})}const Ax=n=>({line:"LineChart",area:"AreaChart",bar:"BarChart"})[n]||n;function Cx(n){return hu("line",n||{})}function Ox(n){return hu("area",n||{})}function wx(n){return hu("bar",n||{})}function Dx(n){return hu("bar",{...n||{},stacked:!0})}const nd=(n,u,o,r,h,f)=>{const b=(m,p)=>`${ie(n+m*Math.sin(p))} ${ie(u-m*Math.cos(p))}`,v=f-h>Math.PI?1:0;return`M${b(r,h)} A${ie(r)} ${ie(r)} 0 ${v} 1 ${b(r,f)} L${b(o,f)} A${ie(o)} ${ie(o)} 0 ${v} 0 ${b(o,h)} Z`};function Rx(n){const u=n||{},o=kd("DonutChart",u.series,"category"),r=o.series.filter(J=>!J.hidden);r.length>1&&Zt("DonutChart","shows exactly one series; hide the others or use another chart");const h=r[0],f=u.format,b=h?o.keys.map((J,_e)=>({id:J,label:J,value:h.y[_e],palette:_e%fd+1,dash:_e%4})):[],v=b.filter(J=>J.value!==null&&J.value<0),m=b.reduce((J,_e)=>J+(_e.value&&_e.value>0?_e.value:0),0),p=Gy("donut",u,m>0&&!v.length);if(p&&!(v.length&&!u.error&&!u.loading))return hs("donut",u,p);if(v.length)return hs("donut",u,{state:"unsupported",content:te("div",{class:"stack-chart__state"},te("div",{class:"stack-unavailable stack-unavailable--unsupported",role:"note","data-capability-status":"unsupported"},[te("p",{class:"stack-unavailable__title"},"This data cannot be shown as parts of a whole"),te("p",{class:"stack-unavailable__reason"},`Negative values: ${v.map(J=>`${J.label} (${Kt(J.value,f)})`).join(", ")}. Use a bar chart.`)]))});const{width:j,height:g}=Yy({...u,width:Math.min(Number(u.width)||320,360)},{aspectRatio:1,minHeight:160,maxHeight:360}),x=Math.min(j,g),A=j/2,q=g/2,z=x/2-4,k=z*(Number(u.innerRatio)>0&&Number(u.innerRatio)<.95?Number(u.innerRatio):.62),E=J=>J&&J>0?J/m:0,$=J=>`${(E(J)*100).toFixed(1)}%`;let W=0;const Z=[];b.forEach((J,_e)=>{if(!(J.value>0))return;const Be=E(J.value)*Math.PI*2,mt=Be>=Math.PI*2-1e-9?`${nd(A,q,k,z,0,Math.PI)} ${nd(A,q,k,z,Math.PI,Math.PI*2)}`:nd(A,q,k,z,W,W+Be),gt=W+Be/2;Z.push(te("g",{class:Ml("stack-chart__slice",`stack-chart__s${J.palette}`),tabindex:"0",role:"img","aria-label":`${J.label}: ${Kt(J.value,f)}, ${$(J.value)}`,"data-slice":J.id},[te("path",{class:"stack-chart__arc",d:mt}),Xy(ie(A+z*.6*Math.sin(gt)),ie(Math.max(2,Math.min(g-54,q-z*.6*Math.cos(gt)-20))),j,J.label,[{text:`${Kt(J.value,f)} · ${$(J.value)}`}])],_e)),W+=Be});const F=Sd(u.centerValue)?String(u.centerValue):Kt(m,f),re=u.center===!1?null:te("g",{class:"stack-chart__center","aria-hidden":"true"},[te("text",{class:"stack-chart__center-value stack-chart__tick--middle",x:ie(A),y:ie(q+2)},ms(F,k*1.8,16)),te("text",{class:"stack-chart__center-label stack-chart__tick--middle",x:ie(A),y:ie(q+18)},ms(u.centerLabel||"Total",k*1.8))]),ee=te("svg",{class:"stack-chart__svg stack-chart__svg--donut",viewBox:`0 0 ${j} ${g}`,width:j,height:g,role:"group","aria-label":`${u.title}. Use Tab to read each part, or open the data table.`},[te("g",{class:"stack-chart__marks"},Z),re]),B=b.map(J=>({id:J.id,label:J.label,palette:J.palette,dash:J.dash,note:J.value===null?"—":`${Kt(J.value,f)} · ${$(J.value)}`})),ue=Vy(u,[u.xLabel||"Category",h.label,u.shareLabel||"Share"],b.map(J=>[J.label,Kt(J.value,f),J.value===null?"—":$(J.value)]));return hs("donut",u,{state:"ready",content:[te("div",{class:"stack-chart__donut"},[te("div",{class:"stack-chart__plot stack-chart__plot--donut"},ee),u.legend===!1?null:hd("donut",B,{...u,onToggleSeries:void 0})]),ue]})}function zx(n){const u=n||{};Sd(u.label)||Zt("Sparkline","needs a label (its accessible name)");const r=kd("Sparkline",[{id:"spark",label:u.label,data:u.data||[]}],u.xType||"category").series[0].y,h=r.length,f=Math.max(24,Math.round(Number(u.width)||120)),b=Math.max(12,Math.round(Number(u.height)||32)),v=u.format,m=r.map((F,re)=>({v:F,i:re})).filter(F=>F.v!==null),p=Ml("stack-sparkline",u.className);if(!m.length)return te("span",{class:Ml(p,"stack-sparkline--empty"),role:"img","aria-label":`${u.label}: no data`,...dd(u.attrs)},te("span",{class:"stack-sparkline__empty","aria-hidden":"true"},"—"));let j=Math.min(...m.map(F=>F.v)),g=Math.max(...m.map(F=>F.v));j===g&&(j-=1,g+=1);const x=3,A=F=>h===1?f/2:x+F/(h-1)*(f-x*2),q=Pc(j,g,b-x,x),z=[];let k=[];r.forEach((F,re)=>{F===null?(k.length&&z.push(k),k=[]):k.push(re)}),k.length&&z.push(k);const E=m[0],$=m[m.length-1],W=`${u.label}: ${Kt(E.v,v)} to ${Kt($.v,v)}, low ${Kt(Math.min(...m.map(F=>F.v)),v)}, high ${Kt(Math.max(...m.map(F=>F.v)),v)}${m.length<h?`, ${h-m.length} missing`:""}`,Z=$.v>E.v?"up":$.v<E.v?"down":"flat";return te("span",{class:p,"data-trend":Z,...dd(u.attrs)},te("svg",{class:"stack-sparkline__svg",viewBox:`0 0 ${f} ${b}`,width:f,height:b,role:"img","aria-label":W},[z.map((F,re)=>F.length>1?te("path",{class:"stack-sparkline__line",d:F.map((ee,B)=>`${B?"L":"M"}${ie(A(ee))} ${ie(q(r[ee]))}`).join(" ")},[],re):te("circle",{class:"stack-sparkline__point",cx:ie(A(F[0])),cy:ie(q(r[F[0]])),r:1.75},[],re)),u.endpoints?[E,$].map((F,re)=>te("circle",{class:"stack-sparkline__endpoint",cx:ie(A(F.i)),cy:ie(q(F.v)),r:2.5},[],`e${re}`)):null]))}const Qy=Object.freeze({LineChart:Cx,AreaChart:Ox,BarChart:wx,StackedBarChart:Dx,DonutChart:Rx,Sparkline:zx}),vs="stack-ui.theme",Nd=Object.freeze(["system","light","dark"]),Zy=n=>{try{return n&&n.localStorage?n.localStorage:null}catch{return null}};function by(n){const u=Zy(globalThis);if(!u)return"system";try{const o=u.getItem(vs);return Nd.includes(o)?o:"system"}catch{return"system"}}function Mx(n,u){const o=Zy(globalThis);if(!o||!Nd.includes(n))return!1;try{return n==="system"?o.removeItem(vs):o.setItem(vs,n),!0}catch{return!1}}function Ux(n,u){const o=typeof document<"u"?document.documentElement:null;o&&(n==="light"||n==="dark"?o.setAttribute("data-stack-theme",n):o.removeAttribute("data-stack-theme"))}function $x(n,u,o){const r=Nd.includes(n)?n:"system";return Mx(r),Ux(r),r}`${JSON.stringify(vs)}`;const Bx="http://www.w3.org/2000/svg";function md(n,u,o){const r=u||document;if(n==null||n===!1||n===!0)return r.createDocumentFragment();if(typeof n=="string"||typeof n=="number")return r.createTextNode(String(n));if(Array.isArray(n)){const h=r.createDocumentFragment();for(const f of n)h.appendChild(md(f,r,o));return h}if(Wc(n)){const h=n.t==="svg"?Bx:o,f=h?r.createElementNS(h,n.t):r.createElement(n.t);for(const[b,v]of Object.entries(n.a))v==null||v===!1||f.setAttribute(b,v===!0?"":String(v));for(const[b,v]of Object.entries(n.on||{}))f.addEventListener(b,v);for(const b of n.c)f.appendChild(md(b,r,h));return f}if(n&&typeof n.nodeType=="number")return n;throw new TypeError("toDom: unsupported child")}function qx(n,u){const r=document.getElementById(String(n).replace(/[^A-Za-z0-9_-]/g,"-"));r&&typeof r.focus=="function"&&r.focus({preventScroll:!0})}Object.freeze(Object.fromEntries(Object.entries({...fu,...Qy}).map(([n,u])=>[n,(o,r)=>md(u(o||{}),r)])));const Hx={class:"className",for:"htmlFor",datetime:"dateTime",tabindex:"tabIndex",readonly:"readOnly",autocomplete:"autoComplete",inputmode:"inputMode",maxlength:"maxLength",minlength:"minLength",spellcheck:"spellCheck"},py={click:"onClick",change:"onChange",input:"onInput",submit:"onSubmit",keydown:"onKeyDown",cancel:"onCancel",close:"onClose"};function fi(n,u){if(n==null||n===!1||n===!0)return null;if(typeof n=="string"||typeof n=="number")return n;if(Array.isArray(n))return C.createElement(C.Fragment,u===void 0?null:{key:u},...n.map((o,r)=>fi(o,r)));if(C.isValidElement(n))return u===void 0?n:C.createElement(C.Fragment,{key:u},n);if(Wc(n)){const o=n.k===void 0?u:n.k,r=o===void 0?{}:{key:o};for(const[v,m]of Object.entries(n.a))m==null||m===!1||(r[Hx[v]||v]=m);const h=n.t==="input"||n.t==="select"||n.t==="textarea";for(const[v,m]of Object.entries(n.on||{})){if(!py[v])throw new Error(`toReact: unsupported event ${v}`);r[h&&(v==="input"||v==="change")?"onChange":py[v]]=m}let f=n.c;if(n.t==="textarea"&&(r.value=f.filter(v=>typeof v=="string"||typeof v=="number").join(""),f=[]),n.t==="select"){const v=f.find(m=>Wc(m)&&m.t==="option"&&m.a.selected);f=f.map(m=>Wc(m)&&m.t==="option"&&m.a.selected?{...m,a:{...m.a,selected:!1}}:m),v&&(r.value=v.a.value)}h&&"checked"in r&&!r.onChange&&(r.defaultChecked=r.checked,delete r.checked),h&&"value"in r&&!r.onChange&&(r.defaultValue=r.value,delete r.value);const b=f.map((v,m)=>fi(v,m));return C.createElement(n.t,r,...b)}throw new TypeError("toReact: unsupported child")}const Ke=n=>{const u=fu[n],o=r=>fi(u(r||{}));return o.displayName=`Stack${n}`,o},Ve=Ke("StatusIndicator"),xy=Ke("VerificationBadge"),Ky=Ke("FreshnessLabel");Ke("Unavailable");const Lx=Ke("Loading"),Yx=Ke("EmptyState"),Gx=Ke("ErrorPanel"),$l=Ke("MetadataList");Ke("ResourceIdentity");const Vx=Ke("PageHeader"),ze=Ke("Button"),Xx=Ke("Breadcrumbs"),Jy=Ke("Tabs"),Fy=Ke("TabPanel"),Ot=Ke("DataTable"),Iy=Ke("FilterBar"),Qx=Ke("Pagination"),Zx=Ke("Shell"),qe=Ke("TextField"),Jt=Ke("Select"),ya=Ke("Form");Ke("EvidenceSummary");const lt=Ke("Alert"),tu=Ke("Checkbox"),vd=Ke("FieldGroup"),lu=Ke("ActivityTimeline"),Kx=Ke("BrandMark"),Jx=Ke("ThemeSwitch");Ke("SiteHeader");Ke("SiteFooter");function Fx(n){const u=C.useRef(null),[o,r]=C.useState(void 0);return C.useEffect(()=>{const h=u.current;if(n||!h||typeof ResizeObserver>"u")return;const f=()=>{const v=h.querySelector(".stack-chart__plot"),m=Math.round(v&&v.clientWidth||h.clientWidth||0);m>0&&r(p=>p===m?p:m)};f();const b=new ResizeObserver(f);return b.observe(h),()=>b.disconnect()},[n]),[u,n||o]}const yi=n=>{const u=Qy[n],o=r=>{const[h,f]=Fx(r.width),b=fi(u(f?{...r,width:f}:r));return n==="Sparkline"?b:C.cloneElement(b,{ref:h})};return o.displayName=`Stack${n}`,o};yi("LineChart");yi("AreaChart");yi("BarChart");yi("StackedBarChart");yi("DonutChart");yi("Sparkline");function Wy(n,u,o){const r=C.useRef(null),h=C.useRef({open:n,onDismiss:u,busy:o});return h.current={open:n,onDismiss:u,busy:o},C.useEffect(()=>{const f=r.current;if(!f)return;const b=()=>{const v=h.current;v.open&&(v.busy?f.showModal():v.onDismiss&&v.onDismiss())};return f.addEventListener("close",b),()=>f.removeEventListener("close",b)},[]),C.useEffect(()=>{const f=r.current;f&&(n&&!f.open?f.showModal():!n&&f.open&&f.close())},[n]),r}function Td(n){const u=Wy(!!n.open,n.onClose,!n.onClose);return C.cloneElement(fi(fu.Dialog(n)),{ref:u})}Td.displayName="StackDialog";function Ed(n){const u=Wy(!!n.open,n.onCancel,!!n.busy),[o,r]=C.useState("");C.useEffect(()=>{n.open||r("")},[n.open]);const h=n.typed!==void 0;return C.cloneElement(fi(fu.ConfirmAction({...n,typed:h?n.typed:o,onTypedChange:h?n.onTypedChange:r})),{ref:u})}Ed.displayName="StackConfirmAction";const qt="positive",Fl="progress",oi="attention",yl="critical",El="neutral",di="unknown",Ix={"feltkit.runtime.state":{starting:Fl,ready:qt,closing:Fl,closed:El,failed:yl},"feltkit.activity.outcome":{success:[qt,"Success"],error:[yl,"Error"],denied:[El,"Denied"]},"feltkit.authority.allowed":{true:[qt,"Allowed"],false:[El,"Denied"]},"feltkit.service.state":{configured:[qt,"Configured"],unconfigured:[oi,"Not set up"],unhealthy:[yl,"Unhealthy"],available:[El,"Not enabled"],unavailable:[yl,"Unavailable"]},"feltkit.service.evidence":{succeeded:[qt,"Succeeded"],denied:[El,"Denied"],failed:[yl,"Failed"],started:[di,"Outcome unknown"]},"feltkit.webhook.delivery":{delivered:qt,pending:Fl,delivering:Fl,retrying:Fl,failed:yl},"feltkit.secret.state":{set:[qt,"Set"],missing:[oi,"Missing"],revoked:[El,"Removed"]},"feltkit.agent.task":{ready:Fl,running:Fl,waiting:Fl,blocked:oi,completed:qt,failed:yl,cancelled:El},"feltkit.agent.action":{proposed:[oi,"Waiting for approval"],approved:[Fl,"Approved, starting"],executing:[Fl,"Running"],succeeded:[qt,"Succeeded"],failed:[yl,"Failed"],rejected:[El,"Rejected"],interrupted:[di,"Outcome unknown"]},"feltkit.integration.call":{succeeded:[qt,"Succeeded"],failed:[yl,"Failed"],unknown:[di,"Outcome unknown"],started:[di,"Outcome unknown"]},"feltkit.readiness.check":{pass:[qt,"Passes"],fail:[yl,"Fails"],warn:[oi,"Review"],external:[di,"Outside FeltKit"]},"feltkit.path.step":{done:[qt,"Done"],todo:[oi,"To do"],info:[El,"Review"],"not-tracked":[di,"Not tracked"]},"feltkit.project.state":{current:[qt,"This dashboard"],running:[qt,"Running"],stopped:[El,"Stopped"],missing:[yl,"Missing"]},"feltkit.model.ready":{true:[qt,"Ready"],false:[yl,"Not ready"]},"feltkit.integration.configured":{true:[qt,"Configured"],false:[yl,"Not configured"]},"feltkit.deployment.state":{live:[qt,"Live"],built:[El,"Not deployed"],none:[El,"Not set up"]}},jy=n=>n?n.charAt(0).toUpperCase()+n.slice(1).replace(/[_-]+/g," "):"Unknown";function Ad(n,u){const o=String(u),r=Ix[n]?.[o];return r?Array.isArray(r)?{tone:r[0],label:r[1],mapped:!0}:{tone:r,label:jy(o),mapped:!0}:{tone:"unknown",label:u==null||u===""?"Unknown":jy(o),mapped:!1}}function wt(n){if(n==null||n==="")return"—";const u=typeof n=="number"?n:Date.parse(n);if(Number.isNaN(u))return String(n);const o=Math.max(0,Math.round((Date.now()-u)/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(u).toLocaleDateString()}function Py(n=15e3){const[,u]=C.useState(0);C.useEffect(()=>{const o=setInterval(()=>u(r=>r+1),n);return()=>clearInterval(o)},[n])}function ht({field:n,value:u,label:o,detail:r}){const h=Ad(n,u);return s.jsx(Ve,{tone:h.tone,label:o??h.label,detail:r,attrs:{"data-state":String(u)}})}function hi({outcome:n}){const u=Ad("feltkit.activity.outcome",n);return s.jsx(Ve,{tone:u.mapped?u.tone:"critical",label:u.label,attrs:{"data-outcome":n}})}function he({title:n,action:u,children:o,className:r="",label:h}){const f=C.useId();return s.jsxs("section",{className:`feltkit-panel ${r}`,...n?{"aria-labelledby":f}:h?{"aria-label":h}:{},children:[(n||u)&&s.jsxs("header",{className:"feltkit-panel__header",children:[n&&s.jsx("h2",{className:"feltkit-panel__title",id:f,children:n}),u&&s.jsx("div",{className:"feltkit-panel__actions",children:u})]}),o]})}function va({title:n,children:u,noMatch:o,action:r}){return s.jsx(Yx,{title:n,body:u,variant:o?"no-match":"empty",action:r,headingLevel:3})}function Ht({what:n}){return s.jsx(Lx,{what:n})}function $e({error:n,retry:u,title:o}){const r=n;return s.jsx(Gx,{title:o??"Not done",message:r?.message??String(n),code:r?.code,requestId:r?.requestId,onRetry:u})}function Za(n,u){const o=n;return{message:o?.message??String(n),...o?.code?{code:o.code}:{},...o?.requestId?{requestId:o.requestId}:{},...u?{onRetry:u}:{}}}function pn({value:n,max:u=4e3,label:o}){let r=JSON.stringify(n,null,2)??"undefined";return r.length>u&&(r=`${r.slice(0,u)}
|
|
12
|
+
… (${r.length-u} more characters)`),s.jsx("pre",{className:"feltkit-code",tabIndex:0,...o?{"aria-label":o}:{},children:r})}function ys({text:n,label:u}){return s.jsxs("div",{className:"feltkit-command",children:[s.jsx("pre",{className:"feltkit-code",tabIndex:0,...u?{"aria-label":u}:{},children:n}),s.jsx(ps,{text:n})]})}function ps({text:n,label:u="Copy"}){const[o,r]=C.useState(!1);return s.jsx(ze,{size:"sm",variant:"ghost",label:o?"Copied":u,onClick:()=>{navigator.clipboard?.writeText(n).then(()=>{r(!0),setTimeout(()=>r(!1),1200)})}})}function gs({schema:n,label:u}){if(!n)return s.jsx("span",{className:"feltkit-muted",children:"—"});if(n.type!=="object"||!n.properties)return s.jsx("code",{className:"feltkit-type",children:au(n)});const o=new Set(n.required??[]),r=Object.entries(n.properties);return r.length?s.jsx("ul",{className:"feltkit-schema",...u?{"aria-label":u}:{},children:r.map(([h,f])=>s.jsxs("li",{children:[s.jsxs("code",{children:[h,o.has(h)?"":"?"]}),s.jsx("code",{className:"feltkit-type",children:au(f)}),Sy(f)&&s.jsx("span",{className:"feltkit-muted feltkit-small",children:Sy(f)})]},h))}):s.jsx("span",{className:"feltkit-muted",children:"no fields"})}function au(n){return n?n.enum?n.enum.map(u=>JSON.stringify(u)).join(" | "):n.anyOf?n.anyOf.map(au).join(" | "):n.type==="array"?`${au(n.items)}[]`:n.type==="object"?n.properties?`{ ${Object.keys(n.properties).join(", ")} }`:"object":Array.isArray(n.type)?n.type.join(" | "):n.type??"unknown":"unknown"}function Sy(n){const u=[];return n.minLength!==void 0&&u.push(`min ${n.minLength}`),n.maxLength!==void 0&&u.push(`max ${n.maxLength}`),n.minimum!==void 0&&u.push(`≥ ${n.minimum}`),n.maximum!==void 0&&u.push(`≤ ${n.maximum}`),u.join(", ")}function st(n,u){const[o,r]=C.useState({loading:!0}),[h,f]=C.useState(0);return C.useEffect(()=>{let b=!0;return r(v=>({...v,loading:!0})),n().then(v=>b&&r({data:v,loading:!1}),v=>b&&r(m=>({data:m.data,error:v,loading:!1}))),()=>{b=!1}},[...u,h]),{...o,reload:()=>f(b=>b+1)}}function Le({label:n,action:u,done:o,variant:r="secondary",size:h="sm",disabled:f,confirm:b}){const[v,m]=C.useState(!1),[p,j]=C.useState(!1),[g,x]=C.useState(null),A=C.useId().replace(/:/g,""),q=async()=>{j(!0),x(null);try{const z=await u();m(!1),o?.(z)}catch(z){x(z)}finally{j(!1)}};return s.jsxs(s.Fragment,{children:[s.jsx(ze,{label:n,size:h,variant:b&&r==="secondary"?"secondary":r,busy:p&&!b,disabled:f,onClick:()=>b?(x(null),m(!0)):void q()}),b&&s.jsx(Ed,{id:`confirm-${A}`,open:v,title:b.title,consequences:b.consequences,confirmLabel:b.confirmLabel??n,requireText:b.requireText,busy:p,error:g?Za(g):null,onConfirm:()=>{q()},onCancel:()=>m(!1)}),!b&&g?s.jsx($e,{error:g}):null]})}function xs({as:n,setAs:u,devUsers:o,label:r="Act as",id:h}){return o.length?s.jsx(Jt,{id:h,label:r,value:n,onChange:u,options:o.map(f=>({value:f.id,label:`${f.name??f.id} (${f.roles.join(", ")})`})),className:"feltkit-identity"}):null}function eg(){const[n,u]=C.useState(()=>by());return C.useEffect(()=>{$x(n)},[n]),C.useEffect(()=>{const o=r=>{r.key===vs&&u(by())};return window.addEventListener("storage",o),()=>window.removeEventListener("storage",o)},[]),[n,u]}const Wx="/_feltkit/assets/feltkit-mark-BygpVIiS.png";function Px(){Py();const{overview:n,activity:u}=gl();if(!n)return null;const o=n.capabilities??[],r=tg(u,n.recentActivity??[]).slice(0,8),h=[...n.recentErrors??[],...n.recentDenials??[]].sort((p,j)=>j.at.localeCompare(p.at)).slice(0,6),f=Object.values(n.counts??{}).reduce((p,j)=>p+Number(j),0),b=(n.services??[]).filter(p=>p.state!=="available"&&p.state!=="unavailable"),v=n.agent??{tasks:[],waiting:0,handoffs:0},m=!!n.environment.production;return s.jsxs("div",{className:"feltkit-page",children:[s.jsx(nl,{title:n.application.name,subtitle:n.application.description??"Where this application's state lives, what it can do, and what it has done.",status:s.jsx(ht,{field:"feltkit.runtime.state",value:n.state}),actions:n.url?s.jsx("a",{href:n.url,target:"_blank",rel:"noreferrer",children:"Open app ↗"}):null}),s.jsxs("div",{className:"feltkit-grid feltkit-grid--stats",children:[s.jsx(Fc,{label:"Records",value:f,detail:`${n.collections.length} collection${n.collections.length===1?"":"s"}`,href:"#/data"}),s.jsx(Fc,{label:"Functions",value:n.functions.length,detail:`${n.functions.filter(p=>p.kind==="query").length} queries · ${n.functions.filter(p=>p.kind==="mutation").length} mutations`,href:"#/capabilities/functions"}),s.jsx(Fc,{label:"Capabilities",value:o.length,detail:"published through AppPort",href:"#/capabilities"}),s.jsx(Fc,{label:"Errors",value:(n.recentErrors??[]).length,detail:`${(n.recentDenials??[]).length} recent denials`,href:"#/activity"})]}),s.jsxs("div",{className:"feltkit-grid feltkit-grid--wide",children:[s.jsxs(he,{title:"Where state lives",children:[s.jsx("p",{className:"feltkit-muted",children:"One FeltDB instance serves this environment. Functions, AppPort capabilities, AppPort Services, sessions and this activity log all read and write it."}),s.jsx($l,{items:[{label:"Environment",value:n.environment.name},{label:"Storage",value:`FeltDB ${n.instance.feltdbVersion} · ${n.instance.mode} · ${n.instance.durable?"durable":"ephemeral"}`},{label:"Location",value:n.instance.location,mono:!0},{label:"Journal position",value:String(n.instance.sequence??""),mono:!0},{label:"Opened",value:`${wt(n.instance.openedAt)} by pid ${n.instance.pid}`}]}),s.jsxs("div",{children:[s.jsx("p",{className:"feltkit-label",children:"Components on this instance"}),s.jsx("ul",{className:"feltkit-list",children:Object.entries(n.components??{}).map(([p,j])=>s.jsxs("li",{className:"feltkit-list__row",children:[s.jsx("span",{className:"feltkit-list__name",children:p}),s.jsx("span",{className:"feltkit-muted feltkit-small",children:j.join(", ")})]},p))})]})]}),s.jsxs(he,{title:"Recent activity",action:s.jsx("a",{href:"#/activity",children:"All activity →"}),children:[s.jsx(lu,{label:"Recent activity",emptyTitle:"Nothing has happened yet",items:r.map(p=>({id:p.id,at:p.at,actor:p.principal?.id??(p.kind==="system"?"system":"anonymous"),summary:s.jsxs(s.Fragment,{children:[s.jsx("code",{children:p.name})," ",s.jsxs("span",{className:"feltkit-muted",children:["via ",p.via]}),p.writes?.length?s.jsxs("span",{className:"feltkit-muted",children:[" · ",p.writes.length," write",p.writes.length===1?"":"s"]}):null]}),status:s.jsx(hi,{outcome:p.outcome}),href:`#/activity/${p.id}`}))}),r.length===0&&s.jsx("p",{className:"feltkit-muted feltkit-small",children:"Open the app and make a change. Every query, mutation, capability call and sign-in appears here."})]})]}),n.path&&s.jsx(he,{title:"Path to production",children:s.jsx("ol",{className:"feltkit-steps",children:n.path.map(p=>s.jsxs("li",{children:[s.jsx(ht,{field:"feltkit.path.step",value:p.state}),s.jsxs("span",{children:[p.link?s.jsx("a",{href:`#/${p.link}`,children:p.step}):s.jsx("strong",{children:p.step})," ",s.jsx("span",{className:"feltkit-steps__detail",children:p.detail})]})]},p.step))})}),s.jsxs("div",{className:"feltkit-grid",children:[s.jsx(he,{title:"Data",action:s.jsx("a",{href:"#/data",children:"Explore →"}),children:n.collections.length===0?s.jsxs(va,{title:"No collections",children:["Declare one with ",s.jsxs("code",{children:['app.collection("name", ',"{ … }",")"]}),"."]}):s.jsx("ul",{className:"feltkit-list",children:n.collections.map(p=>s.jsx("li",{children:m?s.jsxs("span",{className:"feltkit-list__row",children:[s.jsx("span",{className:"feltkit-list__name",children:p.name}),s.jsx("span",{className:"feltkit-muted",children:n.counts?.[p.name]??"—"})]}):s.jsxs("a",{href:`#/data/${p.name}`,className:"feltkit-list__row",children:[s.jsx("span",{className:"feltkit-list__name",children:p.name}),s.jsx("span",{className:"feltkit-muted",children:n.counts?.[p.name]??"—"})]})},p.name))})}),s.jsx(he,{title:"Capabilities",action:s.jsx("a",{href:"#/capabilities",children:"Inspect →"}),children:o.length===0?s.jsxs(va,{title:"No capabilities published",children:["Add ",s.jsx("code",{children:'capability: "name.verb"'})," to a query or mutation to publish it through AppPort."]}):s.jsx("ul",{className:"feltkit-list",children:o.map(p=>s.jsx("li",{children:s.jsxs("a",{href:`#/capabilities/${p.name}`,className:"feltkit-list__row",children:[s.jsx("span",{className:"feltkit-list__name",children:p.name}),s.jsx("span",{className:"feltkit-muted feltkit-small",children:p.effect})]})},p.name))})}),s.jsx(he,{title:"Services",action:s.jsx("a",{href:"#/services",children:"Manage →"}),children:b.length===0?s.jsxs(va,{title:"No services enabled",children:["Enable AppPort Services with ",s.jsxs("code",{children:["feltkit(","{"," services: ","{"," files: true ","}"," ","}",")"]}),"."]}):s.jsx("ul",{className:"feltkit-list",children:b.map(p=>s.jsx("li",{children:s.jsxs("a",{href:`#/services/${p.id}`,className:"feltkit-list__row",children:[s.jsx("span",{children:p.name}),s.jsx(ht,{field:"feltkit.service.state",value:p.state})]})},p.id))})})]}),s.jsxs(he,{title:"Agent",action:s.jsx("a",{href:"#/agent",children:"Open agent →"}),children:[v.waiting>0&&s.jsx("p",{children:s.jsxs("a",{href:"#/agent",children:[v.waiting," action",v.waiting===1?"":"s"," waiting for approval: review"]})}),v.handoffs>0&&s.jsxs("p",{className:"feltkit-muted feltkit-small",children:[v.handoffs," task(s) wait for a coding agent. Nothing works on them until one claims it: connect one from the Agent screen."]}),v.tasks.length===0?s.jsx("p",{className:"feltkit-muted feltkit-small",children:"No agent tasks yet. Diagnose a failed job from Services, or start one on the Agent screen."}):s.jsx("ul",{className:"feltkit-list",children:v.tasks.map(p=>s.jsx("li",{children:s.jsxs("a",{href:`#/agent/${p.id}`,className:"feltkit-list__row",children:[s.jsx("span",{children:p.objective}),s.jsx(ht,{field:"feltkit.agent.task",value:p.status})]})},p.id))})]}),h.length>0&&s.jsx(he,{title:"Recent errors and denials",action:s.jsx("a",{href:"#/activity",children:"Investigate →"}),children:s.jsx(lu,{label:"Recent errors and denials",items:h.map(p=>({id:p.id,at:p.at,summary:s.jsxs(s.Fragment,{children:[s.jsx("code",{children:p.name})," ",p.error?.code?s.jsx("code",{children:p.error.code}):null," ",s.jsx("span",{className:"feltkit-muted",children:p.error?.message})]}),status:s.jsx(hi,{outcome:p.outcome}),href:`#/activity/${p.id}`}))})}),!m&&s.jsx(he,{title:"Development",children:s.jsx($l,{items:[{label:"Runtime",value:`started ${wt(n.startedAt)} · functions loaded ${wt(n.loadedAt)} · generation ${n.generation}`},{label:"Project",value:n.projectDir,mono:!0},{label:"Endpoints",value:`${n.url}/api · ${n.url}/appport · ${n.url}/mcp`,mono:!0},{label:"Deploy",value:"npx feltkit deploy",mono:!0,hint:"Builds, verifies the production build boots, and writes a Node/Docker artifact."}]})})]})}function Fc({label:n,value:u,detail:o,href:r}){return s.jsxs("a",{className:"feltkit-stat",href:r,children:[s.jsx("span",{className:"feltkit-stat__label",children:n}),s.jsx("span",{className:"feltkit-stat__value",children:u}),s.jsx("span",{className:"feltkit-stat__detail",children:o})]})}function tg(n,u){const o=new Set;return[...n,...u].filter(r=>o.has(r.id)?!1:(o.add(r.id),!0)).sort((r,h)=>h.id.localeCompare(r.id))}function ej({collection:n}){const{version:u,overview:o}=gl(),r=st(()=>de("/collections"),[u]),h=r.data?.collections??[],f=h.find(v=>v.name===n)??h.find(v=>v.owner==="application")??h[0],b=!!f?.editable&&!o?.environment?.production;return s.jsxs("div",{className:"feltkit-page",children:[s.jsx(nl,{title:"Data",subtitle:"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?s.jsx($e,{title:"Collections could not be read",error:r.error,retry:r.reload}):r.data?s.jsxs("div",{className:"feltkit-split",children:[s.jsx("nav",{className:"feltkit-index","aria-label":"Collections",children:["application","platform"].map(v=>{const m=h.filter(p=>v==="application"?p.owner==="application":p.owner!=="application");return m.length?s.jsxs("div",{children:[s.jsx("p",{className:"feltkit-index__heading",children:v==="application"?"Application":"Platform"}),s.jsx("ul",{children:m.map(p=>s.jsx("li",{children:s.jsxs("a",{href:`#/data/${p.name}`,"aria-current":f?.name===p.name?"page":void 0,children:[s.jsx("span",{className:"feltkit-index__name",children:p.name}),s.jsx("span",{className:"feltkit-index__meta",children:p.count})]})},p.name))})]},v):null})}),s.jsx("section",{className:"feltkit-detail","aria-label":f?`Collection ${f.name}`:"Collection",children:f?s.jsx(tj,{collection:f,editable:b},f.name):s.jsx(va,{title:"No collections"})})]}):s.jsx(Ht,{what:"collections"})]})}function tj({collection:n,editable:u}){const{version:o}=gl(),[r,h]=C.useState(""),[f,b]=C.useState(""),[v,m]=C.useState(null),[p,j]=C.useState([]),[g,x]=C.useState(null),[A,q]=C.useState({busy:!1,error:null}),[z,k]=C.useState(null),E=v?`&field=${encodeURIComponent(v.field)}&eq=${encodeURIComponent(v.value)}`:"",$=st(()=>de(`/collections/${encodeURIComponent(n.name)}?limit=50${E}`),[n.name,E,o]);C.useEffect(()=>{$.data&&(j($.data.records),x($.data.nextCursor))},[$.data]);const W=C.useMemo(()=>{const F=n.schema?.properties?Object.keys(n.schema.properties):[],re=[...new Set(p.flatMap(ee=>Object.keys(ee)))].filter(ee=>ee!=="id"&&ee!=="__version");return["id",...(F.length?F:re).slice(0,6),"__version"]},[n.schema,p]),Z=async()=>{if(g){q({busy:!0,error:null});try{const F=await de(`/collections/${encodeURIComponent(n.name)}?limit=50&cursor=${encodeURIComponent(g)}${E}`);j(re=>[...re,...F.records]),x(F.nextCursor),q({busy:!1,error:null})}catch(F){q({busy:!1,error:F})}}};return s.jsxs(s.Fragment,{children:[s.jsx(nl,{title:s.jsx("code",{children:n.name}),subtitle:`${n.owner==="application"?"Application collection":`Owned by ${n.owner}`} · ${n.count} record${n.count===1?"":"s"}${n.description?` · ${n.description}`:""}`,status:n.editable?null:s.jsx(Ve,{tone:"neutral",label:"Read-only"}),actions:u?s.jsx(ze,{variant:"primary",label:"New record",onClick:()=>k("new")}):null}),n.schema&&s.jsxs("details",{className:"feltkit-details",children:[s.jsx("summary",{children:"Schema"}),s.jsx(gs,{schema:n.schema,label:`${n.name} schema`}),s.jsx("p",{className:"feltkit-muted feltkit-small",children:"Enforced by FeltKit on every write through ctx.db. FeltDB stores JSON documents and adds id and __version."})]}),s.jsx(Iy,{label:`Filter ${n.name}`,idPrefix:`filter-${n.name}`,filters:[{id:"field",label:"Field",type:"select",value:r,options:[{value:"",label:"Choose a field"},...W.map(F=>({value:F,label:F}))]},{id:"value",label:"Equals",type:"text",value:f,placeholder:"value"}],onChange:(F,re)=>F==="field"?h(re):b(re),onSubmit:()=>m(r&&f!==""?{field:r,value:f}:null),onClear:()=>(m(null),h(""),b("")),applied:v?1:0,result:$.data?v?`${p.length}${g?"+":""} records match ${v.field} = ${v.value}`:`${p.length}${g?"+":""} records shown`:"",applyLabel:"Apply"}),s.jsx(Ot,{label:`${n.name} records`,columns:W.map(F=>({id:F,header:F})),rows:p.map(F=>({key:F.id,cells:Object.fromEntries(W.map(re=>[re,s.jsx(lj,{value:F[re],mono:re==="id"||re==="__version"},re)])),onSelect:()=>k(F),selected:z!=="new"&&z?.id===F.id})),loading:$.loading,loadingWhat:"records",error:$.error&&!$.data?{title:"Records could not be read",...Za($.error,$.reload)}:null,noMatch:!!v,noMatchTitle:"No records match",noMatchBody:"Try another value, or clear the filter.",emptyTitle:"No records yet",emptyBody:n.owner==="application"?"Records appear here as soon as a mutation writes them.":void 0}),p.length>0&&s.jsx(Qx,{label:`${n.name} pages`,hasNext:!!g,onNext:()=>{Z()},nextLabel:A.busy?"Loading…":"Load more",summary:`${p.length} shown${g?"; more exist":""}`}),A.error?s.jsx($e,{title:"The next page could not be read",error:A.error,retry:()=>{Z()}}):null,z&&s.jsx(nj,{collection:n,record:z==="new"?null:z,editable:u,onClose:()=>k(null),onSaved:()=>(k(null),$.reload())})]})}function lj({value:n,mono:u}){if(n==null)return s.jsx("span",{className:"feltkit-muted",children:"—"});if(typeof n=="boolean")return s.jsx("code",{children:String(n)});if(typeof n=="number"&&n>1e12&&n<1e13)return s.jsx("span",{title:String(n),children:new Date(n).toLocaleString()});if(typeof n=="object")return s.jsx("span",{className:"feltkit-mono",children:JSON.stringify(n).slice(0,80)});const o=String(n),r=o.length>60?`${o.slice(0,60)}…`:o;return u?s.jsx("span",{className:"feltkit-mono",children:r}):s.jsx("span",{title:o.length>60?o:void 0,children:r})}function aj(n){const u={};for(const[o,r]of Object.entries(n?.properties??{}))(n.required??[]).includes(o)&&(u[o]=r.type==="number"||r.type==="integer"?/At$/.test(o)?Date.now():0:r.type==="boolean"?!1:"");return u}function nj({collection:n,record:u,editable:o,onClose:r,onSaved:h}){const f=u?Object.fromEntries(Object.entries(u).filter(([$])=>$!=="id"&&$!=="__version")):aj(n.schema),[b,v]=C.useState(JSON.stringify(f,null,2)),[m,p]=C.useState(null),[j,g]=C.useState(!1),[x,A]=C.useState(!1),[q,z]=C.useState(null),k=async()=>{p(null);let $;try{$=JSON.parse(b)}catch{p({code:"INVALID_JSON",message:"That is not valid JSON."});return}g(!0);try{await de(u?`/collections/${n.name}/${encodeURIComponent(u.id)}`:`/collections/${n.name}`,{method:u?"PATCH":"POST",body:JSON.stringify({record:$})}),h()}catch(W){p(W)}finally{g(!1)}},E=async()=>{g(!0),z(null);try{await de(`/collections/${n.name}/${encodeURIComponent(u.id)}`,{method:"DELETE"}),A(!1),h()}catch($){z($)}finally{g(!1)}};return s.jsxs(s.Fragment,{children:[s.jsxs(Td,{id:"record",open:!0,className:"feltkit-dialog-wide",title:u?s.jsx("code",{children:`${n.name} / ${u.id}`}):`New ${n.name} record`,description:u?`Version ${u.__version}. Activity shows what wrote it.`:"Validated against the collection's schema when you create it.",onClose:j?void 0:r,actions:o?s.jsxs(s.Fragment,{children:[u&&s.jsx(ze,{variant:"danger",label:"Delete record",disabled:j,onClick:()=>(z(null),A(!0))}),s.jsx(ze,{variant:"ghost",label:"Close",disabled:j,onClick:r}),s.jsx(ze,{variant:"primary",label:u?"Save changes":"Create record",busy:j,onClick:()=>{k()}})]}):s.jsx(ze,{label:"Close",onClick:r}),children:[o?s.jsxs(s.Fragment,{children:[s.jsxs(lt,{tone:"attention",title:"Development edit",children:["Validated against the schema and committed atomically, recorded in Activity as ",s.jsx("code",{children:"admin"})," via ",s.jsx("code",{children:"dashboard"}),". Function access rules do not apply to these edits; this tool is not offered in production."]}),s.jsx(qe,{id:"record-json",label:"Record (JSON)",multiline:!0,rows:14,value:b,onChange:v,spellcheck:"false"}),m?s.jsx($e,{title:u?"Not saved":"Not created",error:m}):null]}):s.jsx(pn,{value:u,max:2e4,label:"Record"}),u&&n.owner!=="application"&&s.jsxs("p",{className:"feltkit-muted feltkit-small",children:[n.owner," owns this collection. Change it through its service or capability so its authorization and audit trail apply: ",s.jsx("a",{href:"#/services",children:"Services"}),"."]}),u&&s.jsx("p",{className:"feltkit-small",children:s.jsx("a",{href:"#/activity",children:"Find what wrote it in Activity →"})})]}),u&&s.jsx(Ed,{id:"record-delete",open:x,title:`Delete ${n.name} / ${u.id}?`,consequences:["The record is removed from FeltDB in one transaction.","Activity records the delete as admin via dashboard.","It cannot be undone from here."],confirmLabel:"Delete record",busy:j,error:q?Za(q):null,onConfirm:()=>{E()},onCancel:()=>A(!1)})]})}const ij=(n,u)=>n==="*"||n===u||n.endsWith(".*")&&u.startsWith(n.slice(0,-1));function sj(n,u){return Object.entries(n??{}).filter(([,o])=>o.some(r=>ij(r,u))).map(([o])=>o)}function lg(n){if(!n||n.type!=="object")return{};const u={};for(const o of n.required??[]){const r=n.properties?.[o]??{};u[o]=r.type==="boolean"?!0:r.type==="number"||r.type==="integer"?0:""}return u}function cj({selected:n}){const{version:u,overview:o}=gl(),r=st(()=>de("/capabilities"),[u]),h=r.data?.capabilities??[],f=o?.functions??[],[b,v]=C.useState(n==="functions"||n?.includes(":")?"functions":"capabilities"),m=b==="capabilities"?h:f,p=m.find(j=>j.name===n)??m[0];return s.jsxs("div",{className:"feltkit-page",children:[s.jsx(nl,{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."}),s.jsx(Jy,{label:"Capabilities and functions",idPrefix:"capabilities",panelId:"capabilities-panel",active:b,onSelect:j=>{v(j),Wl(j==="functions"?"capabilities/functions":"capabilities")},tabs:[{id:"capabilities",label:"AppPort capabilities",badge:String(h.length)},{id:"functions",label:"All functions",badge:String(f.length)}]}),s.jsx(Fy,{id:"capabilities-panel",idPrefix:"capabilities",active:b,children:r.error&&!r.data?s.jsx($e,{title:"Capabilities could not be read",error:r.error,retry:r.reload}):r.data?s.jsxs("div",{className:"feltkit-split",children:[s.jsx("nav",{className:"feltkit-index","aria-label":b==="capabilities"?"Capabilities":"Functions",children:m.length===0?s.jsx("p",{className:"feltkit-muted feltkit-small",children:"None published yet."}):s.jsx("ul",{children:m.map(j=>s.jsx("li",{children:s.jsxs("a",{href:`#/capabilities/${j.name}`,"aria-current":p?.name===j.name?"page":void 0,children:[s.jsx("span",{className:"feltkit-index__name",children:j.name}),s.jsx("span",{className:"feltkit-index__meta",children:b==="functions"?j.kind:`v${j.version}`})]})},j.name))})}),s.jsx("section",{className:"feltkit-detail","aria-label":p?p.name:"Detail",children:p?b==="capabilities"?s.jsx(uj,{capability:p,roles:o?.roles??{},mcpTools:r.data.mcp?.tools??[],devUsers:o?.devUsers??[],development:o?.environment?.development},p.name):s.jsx(rj,{fn:p,roles:o?.roles??{},devUsers:o?.devUsers??[],development:o?.environment?.development},p.name):s.jsx(va,{title:b==="capabilities"?"No capabilities":"No functions",children:b==="capabilities"?s.jsxs(s.Fragment,{children:["Publish a query or mutation with ",s.jsxs("code",{children:["capability: ","{",' name: "tasks.complete", description: "…" ',"}"]})," and a returns schema."]}):s.jsxs(s.Fragment,{children:["Export ",s.jsx("code",{children:"app.query()"})," or ",s.jsx("code",{children:"app.mutation()"})," from a module in ",s.jsx("code",{children:"feltkit/"}),"."]})})})]}):s.jsx(Ht,{what:"capabilities"})})]})}function ag({required:n,roles:u}){return n.length?s.jsx(s.Fragment,{children:n.map(o=>s.jsxs("span",{children:[s.jsx("code",{children:o})," ",s.jsxs("span",{className:"feltkit-muted",children:["granted to ",sj(u,o).join(", ")||"no role"]})]},o))}):s.jsx(s.Fragment,{children:"any signed-in principal"})}function uj({capability:n,roles:u,mcpTools:o,devUsers:r,development:h}){const f=o.find(b=>b.replace(/_/g,".").includes(n.name))??null;return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"feltkit-stack",children:[s.jsxs("h2",{className:"feltkit-panel__title",children:[s.jsx("code",{children:n.name})," ",s.jsxs("span",{className:"feltkit-muted feltkit-small",children:["v",n.version," · ",n.effect]})]}),s.jsx("p",{children:n.description??s.jsx("span",{className:"feltkit-muted",children:"No description. Add one so agents and other applications know what this does."})})]}),s.jsxs(he,{title:"Contract",children:[s.jsx($l,{items:[{label:"Requires",value:s.jsx(ag,{required:n.authorization,roles:u})},{label:"Implemented by",value:n.function?s.jsx("a",{href:`#/capabilities/${n.function.name}`,children:s.jsx("code",{children:n.function.name})}):null},{label:"Services used",value:n.services?.length?n.services.join(", "):"none observed"},{label:"Idempotency",value:n.idempotency??null},{label:"Reachable at",value:`POST /appport${f?` · MCP tool ${f}`:""}`,mono:!0}]}),s.jsxs("div",{className:"feltkit-grid",children:[s.jsxs("div",{children:[s.jsx("p",{className:"feltkit-label",children:"Input"}),s.jsx(gs,{schema:n.input,label:"Input fields"})]}),s.jsxs("div",{children:[s.jsx("p",{className:"feltkit-label",children:"Output"}),s.jsx(gs,{schema:n.output,label:"Output fields"})]})]})]}),s.jsx(he,{title:"Recent invocations",children:s.jsx(lu,{label:`Recent invocations of ${n.name}`,emptyTitle:"Not invoked through AppPort yet",items:(n.recent??[]).map(b=>({id:b.id,at:b.at,actor:b.principal??"anonymous",summary:s.jsxs(s.Fragment,{children:["via ",b.via," · ",b.durationMs," ms ",b.error?s.jsx("code",{children:b.error.code}):null]}),status:s.jsx(hi,{outcome:b.outcome}),href:`#/activity/${b.id}`}))})}),h&&s.jsx(ng,{id:`invoke-${n.name}`,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. Input is validated against the contract before authorization runs.",example:lg(n.input),devUsers:r,submitLabel:"Invoke",run:(b,v)=>de("/capabilities/invoke",{method:"POST",body:JSON.stringify({capability:n.name,version:n.version,input:b,as:v})})})]})}function rj({fn:n,roles:u,devUsers:o,development:r}){const h=n.access==="public"||n.access==="authenticated"?[]:[n.access];return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"feltkit-stack",children:[s.jsxs("h2",{className:"feltkit-panel__title",children:[s.jsx("code",{children:n.name})," ",s.jsxs("span",{className:"feltkit-muted feltkit-small",children:[n.kind,n.capability?` · published as ${n.capability.name}`:""]})]}),s.jsx("p",{className:"feltkit-muted",children:n.description??(n.kind==="query"?"Read-only: its database handle cannot write.":"All writes commit in one FeltDB transaction, or none do.")})]}),s.jsxs(he,{title:"Contract",children:[s.jsx($l,{items:[{label:"Access",value:n.access==="public"?"anyone, including anonymous callers":s.jsx(ag,{required:h,roles:u})},{label:"Endpoint",value:`POST /api/${n.kind}/${n.name}`,mono:!0}]}),s.jsxs("div",{className:"feltkit-grid",children:[s.jsxs("div",{children:[s.jsx("p",{className:"feltkit-label",children:"Arguments"}),s.jsx(gs,{schema:n.args,label:"Arguments"})]}),s.jsxs("div",{children:[s.jsx("p",{className:"feltkit-label",children:"Returns"}),n.returns?s.jsx(gs,{schema:n.returns,label:"Returns"}):s.jsx("span",{className:"feltkit-muted",children:"not declared"})]})]})]}),r&&s.jsx(ng,{id:`run-${n.name}`,title:`Run ${n.kind}`,note:"Runs as the identity you choose, through the same validation and authorization as a request from the app.",example:lg(n.args),devUsers:o,submitLabel:`Run ${n.kind}`,run:(f,b)=>de("/functions/run",{method:"POST",body:JSON.stringify({name:n.name,args:f,as:b})})})]})}function ng({id:n,title:u,note:o,example:r,devUsers:h,submitLabel:f,run:b}){const[v,m]=C.useState(JSON.stringify(r,null,2)),[p,j]=C.useState(h[0]?.id??"anonymous"),[g,x]=C.useState(null),[A,q]=C.useState(null),[z,k]=C.useState(!1),E=g?.ok===!0,$=n.replace(/[^a-z0-9-]/gi,"-");return s.jsxs(he,{title:u,children:[s.jsx("p",{className:"feltkit-muted feltkit-small",children:o}),s.jsxs(ya,{label:u,submitLabel:f,busy:z,onSubmit:async()=>{q(null),x(null);let W;try{W=JSON.parse(v||"{}")}catch{q({code:"INVALID_JSON",message:"That is not valid JSON."});return}k(!0);try{x(await b(W,p))}catch(Z){q(Z)}finally{k(!1)}},children:[s.jsx(Jt,{id:`${$}-as`,label:"Act as",value:p,onChange:j,options:[...h.map(W=>({value:W.id,label:`${W.name??W.id} · ${W.roles.join(", ")}`})),{value:"anonymous",label:"anonymous"}]}),s.jsx(qe,{id:`${$}-input`,label:"Input (JSON)",multiline:!0,rows:6,value:v,onChange:m,spellcheck:"false"})]}),A?s.jsx($e,{title:"Not run",error:A}):null,g&&s.jsxs("div",{className:"feltkit-stack",role:"status",children:[s.jsxs("span",{className:"feltkit-row",children:[s.jsx(hi,{outcome:E?"success":g.error?.code==="FORBIDDEN"||g.error?.code==="UNAUTHORIZED"?"denied":"error"}),g.requestId?s.jsx("code",{children:g.requestId}):null,!E&&g.error?.code?s.jsx("code",{children:g.error.code}):null]}),s.jsx(pn,{value:E?g.output??g.value:g.error,label:"Result"})]})]})}function js(n){const u=n.trim();if(!u||u.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(u))return!0;if(u.length<32||/\s/.test(u)||!/[0-9]/.test(u)||!/[A-Za-z]/.test(u))return!1;const o=new Map;for(const h of u)o.set(h,(o.get(h)??0)+1);let r=0;for(const h of o.values())r-=h/u.length*Math.log2(h/u.length);return r>=4}function mu({credential:n}){return n?n.present?s.jsx(Ve,{tone:"positive",label:"Set",detail:`${n.location??n.variable??"custody"}${n.version&&n.source==="vault"?`, version ${n.version}`:""}`,attrs:{"data-credential":"set",...n.updatedAt?{title:`updated ${n.updatedAt}`}:{}}}):n.state==="revoked"?s.jsx(Ve,{tone:"neutral",label:"Removed",attrs:{"data-credential":"removed"}}):s.jsx(Ve,{tone:"attention",label:"Not set",attrs:{"data-credential":"missing"}}):null}function Cd(n){const u=n?.devUsers??[],[o,r]=C.useState("");return C.useEffect(()=>{!o&&u[0]&&r(u[0].id)},[u,o]),[o,r,u]}function nu({credentialRef:n,provider:u,as:o,label:r="Set key",onSaved:h}){const[f,b]=C.useState(!1),[v,m]=C.useState(""),[p,j]=C.useState(!1),[g,x]=C.useState(null),[A,q]=C.useState(null),z=`key-${C.useId().replace(/:/g,"")}`,k=async()=>{if(!v.trim())return;j(!0),x(null);const E=v;m("");try{const $=await de("/credentials",{method:"POST",body:JSON.stringify({ref:n,value:E,...u?{provider:u}:{},...o?{as:o}:{}})});q($.stored),b(!1),h?.($.stored)}catch($){x($)}finally{j(!1)}};return f?s.jsxs("div",{className:"feltkit-stack",children:[s.jsx(ya,{layout:"inline",label:`Value for ${n}`,submitLabel:"Save",busy:p,onSubmit:()=>{k()},actions:s.jsx(ze,{variant:"ghost",label:"Cancel",onClick:()=>(m(""),b(!1))}),children:s.jsx(qe,{id:z,type:"password",label:`Value for ${n}`,hint:"Stored on the server, outside FeltDB. It is never shown again.",autocomplete:"off",spellcheck:"false",value:v,onChange:m,required:!0})}),g?s.jsx($e,{title:"Not stored",error:g}):null]}):s.jsxs("span",{className:"feltkit-actions",children:[s.jsx(ze,{size:"sm",label:r,onClick:()=>b(!0)}),A&&s.jsxs("span",{className:"feltkit-muted feltkit-small",role:"status",children:["Stored (",A.location??"custody",", version ",A.version,")."]})]})}function oj(n){return n.filter(u=>{const o=u.usedBy??[];return o.every(r=>r.startsWith("webhook "))&&(o.length>0||/webhook|signing/i.test(u.ref))})}function dj(n){return n.status==="delivered"?null:n.lastError??null}function fj(n){return(u,o="GET",r)=>de(`/services/manage${u}`,{method:o,headers:{"x-feltkit-as":n},...r!==void 0?{body:JSON.stringify(r)}:o!=="GET"&&o!=="DELETE"?{body:"{}"}:{}})}function mi(n,u){if(n==null)throw new Error(`${u} was not found or changed meanwhile. Nothing was done.`);return n}const hj="A credential reference, like credential-ref:stripe. Set its value under Services → Credentials; the value is never stored here.",mj={files:{title:"Files",description:"File records with ownership and audit. Bytes are stored in this environment's FeltDB instance.",render:n=>s.jsx(_j,{...n})},notifications:{title:"Notifications",description:"Durable in-app notifications. A principal reads only the notifications addressed to it.",render:n=>s.jsx(Nj,{...n})},configuration:{title:"Configuration",description:"Variables and secret references for this environment. Secret values stay in FeltKit's custody.",render:n=>s.jsx(Tj,{...n})},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:n=>s.jsx(Aj,{...n})},webhooks:{title:"Webhooks",description:"Endpoints for signed outbound delivery, with retries and history.",render:n=>s.jsx(Oj,{...n})},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:n=>s.jsx(wj,{...n})},schedules:{title:"Schedules",description:"Recurring jobs. Each run queues a job of the schedule's type.",render:n=>s.jsx(zj,{...n})},intelligence:{title:"Intelligence",description:"The provider, model, endpoint and credential reference for this environment. Configuration only: AppPort Services never runs a model.",render:n=>s.jsx(Mj,{...n})}};function vj({id:n,service:u,as:o,picker:r,development:h,summary:f,operations:b}){const{version:v}=gl(),m=mj[n],p=s.jsx(nl,{title:m?.title??n,crumbs:[{label:"Services",href:"#/services"},{label:m?.title??n}],subtitle:m?.description,actions:r}),j=m?u?u.state==="available"||u.state==="unavailable"?s.jsx(yj,{service:u}):s.jsxs(s.Fragment,{children:[f,h?o?s.jsxs(s.Fragment,{children:[s.jsxs("p",{className:"feltkit-muted feltkit-small",children:["Acting as ",s.jsx("strong",{children:o}),". AppPort Services' gateway authorizes every operation with this identity's roles, and Activity records it."]}),m.render({as:o,manage:fj(o),version:v})]}):s.jsxs(lt,{tone:"attention",title:"No development identity",children:["Declare one in ",s.jsxs("code",{children:["feltkit(","{"," dev: ","{"," users ","}"," ","}",")"]}),": service operations are authorized as that identity."]}):s.jsxs(s.Fragment,{children:[b,s.jsx(lt,{tone:"info",title:`Configuring ${m.title} is a development tool`,children:"Change it in development, or with the service's own API from your application."})]})]}):s.jsx(Ht,{what:m.title}):s.jsx(va,{title:"No such service",children:s.jsx("a",{href:"#/services",children:"Back to Services"})});return s.jsxs("div",{className:"feltkit-page",children:[p,j]})}function yj({service:n}){const u=gj[n.id]??`${n.id}: true`;return s.jsx(he,{title:`Enable ${n.name}`,action:s.jsx(ht,{field:"feltkit.service.state",value:n.state}),children:n.state==="unavailable"?s.jsx(lt,{tone:"critical",title:`${n.name} cannot run here`,children:n.detail}):s.jsxs(s.Fragment,{children:[s.jsxs("p",{className:"feltkit-small",children:["Add it to ",s.jsx("code",{children:"services"})," in ",s.jsx("code",{children:"feltkit/app.ts"}),". The backend reloads in place and keeps its state; this screen then manages it."]}),s.jsx(ys,{text:`services: { …, ${u} },`,label:`How to enable ${n.name}`}),s.jsxs("p",{className:"feltkit-muted feltkit-small",children:["Its permissions (",n.capabilities.join(", "),") are granted through your roles."]})]})})}const gj={apiKeys:'apiKeys: { roles: ["member"] }',jobs:'jobs: { handlers: { "report.build": "reports:build" } }'},bj=new Set(["text","email","url","number","password","search","tel"]);function xn({title:n,fields:u,submitLabel:o,send:r,done:h}){const f=()=>Object.fromEntries(u.map(E=>[E.name,E.value??(E.options?vi(E.options[0]):E.choices?.length&&!E.multi?vi(E.choices[0]):"")])),[b,v]=C.useState(f),[m,p]=C.useState(!1),[j,g]=C.useState(null),[x,A]=C.useState(null),q=`form-${C.useId().replace(/:/g,"")}`,z=E=>$=>v(W=>({...W,[E]:$})),k=async()=>{p(!0),g(null),A(null);try{const E=await r(b);A(h?h(E):"Done."),v(f())}catch(E){g(E)}finally{p(!1)}};return s.jsxs(he,{title:n,children:[s.jsx(ya,{label:n,submitLabel:o,busy:m,onSubmit:()=>{k()},children:u.map(E=>{const $=`${q}-${E.name}`,W=b[E.name]??"";return E.choices&&E.multi?s.jsx(jj,{id:$,field:E,value:W,onChange:z(E.name)},E.name):E.choices?s.jsx(xj,{id:$,field:E,value:W,onChange:z(E.name)},E.name):E.options?s.jsx(Jt,{id:$,name:E.name,label:E.label,hint:E.hint,value:W,onChange:z(E.name),options:E.options,required:E.required},E.name):E.type==="datetime-local"?s.jsx(pj,{id:$,field:E,value:W,onChange:z(E.name)},E.name):s.jsx(qe,{id:$,name:E.name,label:E.label,hint:E.hint,value:W,onChange:z(E.name),type:bj.has(E.type??"text")?E.type??"text":"text",placeholder:E.placeholder,required:E.required,pattern:E.pattern,multiline:E.multiline,rows:E.multiline?3:void 0,autocomplete:"off",spellcheck:"false"},E.name)})}),j?s.jsx($e,{title:"Not done",error:j}):null,x?s.jsx(lt,{tone:"info",title:"Done",children:x}):null]})}function pj({id:n,field:u,value:o,onChange:r}){return s.jsxs("div",{className:"stack-field stack-field--text",children:[s.jsxs("label",{className:"stack-field__label",htmlFor:n,children:[u.label,u.required?s.jsx("span",{className:"stack-field__required","aria-hidden":"true",children:" *"}):null]}),s.jsx("input",{className:"stack-field__control",id:n,name:u.name,type:u.type,value:o,required:u.required,onChange:h=>r(h.target.value),...u.hint?{"aria-describedby":`${n}-hint`}:{}}),u.hint&&s.jsx("p",{className:"stack-field__hint",id:`${n}-hint`,children:u.hint})]})}const vi=n=>typeof n=="string"?n:n.value,ig=n=>typeof n=="string"?n:n.label,id="__other__";function xj({id:n,field:u,value:o,onChange:r}){const h=(u.choices??[]).some(p=>vi(p)===o),[f,b]=C.useState(!h&&o!==""),v=f||!u.choices?.length&&!u.strict,m=s.jsx(qe,{id:`${n}-other`,name:u.name,label:u.choices?.length?`${u.label}: other value`:u.label,hint:u.choices?.length?void 0:u.hint,value:o,onChange:r,placeholder:u.placeholder,required:u.required,pattern:u.pattern,autocomplete:"off",spellcheck:"false"});return u.choices?.length?s.jsxs("div",{className:"feltkit-stack",children:[s.jsx(Jt,{id:n,label:u.label,hint:u.hint,required:u.required,value:v?id:o,onChange:p=>{const j=p===id;b(j),r(j?"":p)},options:[...u.choices.map(p=>({value:vi(p),label:ig(p)})),...u.strict?[]:[{value:id,label:"Other…"}]]}),v&&m]}):u.strict?s.jsx(Jt,{id:n,label:u.label,hint:u.placeholder??u.hint,value:"",options:[{value:"",label:u.placeholder??"Nothing to choose",disabled:!0}],required:u.required}):m}function jj({id:n,field:u,value:o,onChange:r}){const h=(u.choices??[]).map(vi),f=iu(o),b=f.filter(g=>h.includes(g)),v=f.filter(g=>!h.includes(g)),[m,p]=C.useState(v.join(", ")),j=(g,x)=>r([...g,...iu(x)].join(", "));return s.jsxs(vd,{id:n,legend:u.label,hint:u.hint,required:u.required,children:[(u.choices??[]).length>0&&s.jsx("div",{className:"feltkit-choices",children:(u.choices??[]).map((g,x)=>{const A=vi(g);return s.jsx(tu,{id:`${n}-${x}`,label:s.jsx("code",{children:ig(g)}),checked:b.includes(A),onChange:q=>j(q?[...b,A]:b.filter(z=>z!==A),m)},A)})}),!u.strict&&s.jsx(qe,{id:`${n}-others`,label:h.length?"Others, comma separated":"Values, comma separated",value:m,placeholder:u.placeholder,autocomplete:"off",spellcheck:"false",required:u.required&&b.length===0,onChange:g=>(p(g),j(b,g))})]})}function gi(n,u=0){return st(()=>de("/services/catalog"),[n,u]).data}function Ka({title:n,read:u,deps:o,empty:r,columns:h,actions:f,after:b,tools:v}){const m=st(u,o),p=m.data??[];return s.jsxs(he,{title:n,action:s.jsxs(s.Fragment,{children:[v?.(m.reload),s.jsx(ze,{size:"sm",variant:"ghost",label:"Refresh",busy:m.loading&&!!m.data,onClick:m.reload})]}),children:[s.jsx(Ot,{label:n,columns:[...h.map(([j])=>({id:j,header:j})),...f?[{id:"__actions",header:"Actions"}]:[]],rows:p.map((j,g)=>({key:j.id??String(g),cells:{...Object.fromEntries(h.map(([x,A])=>[x,A(j)])),...f?{__actions:s.jsx("span",{className:"feltkit-actions",children:f(j,m.reload)})}:{}}})),loading:m.loading,error:m.error&&!m.data?{title:`${n} could not be read`,...Za(m.error,m.reload)}:null,emptyTitle:r}),b]})}const Ul=n=>n?s.jsx("span",{title:n,children:wt(n)}):null,al=n=>n?s.jsx("code",{children:n}):null;function Sj(n,u){let o;try{o=JSON.parse(n||"{}")}catch{throw new Error(`The ${u} is not valid JSON.`)}if(!o||typeof o!="object"||Array.isArray(o))throw new Error(`The ${u} must be a JSON object, like {"invoice": 7}.`);return o}const iu=n=>n.split(",").map(u=>u.trim()).filter(Boolean),yd=({done:n})=>s.jsx(Le,{label:"Run due work now",action:()=>de("/services/run",{method:"POST",body:"{}"}),done:n});function _j({as:n,manage:u,version:o}){const[r,h]=C.useState(0),[f,b]=C.useState(null),[v,m]=C.useState(!1),[p,j]=C.useState(null),[g,x]=C.useState(null),[A,q]=C.useState(0),z=async()=>{if(f){m(!0),j(null),x(null);try{const E=await kj(f),{file:$}=await de("/services/files",{method:"POST",body:JSON.stringify({as:n,name:f.name,contentType:f.type||void 0,contentBase64:E})});x(`Uploaded ${$.name} (${$.size.toLocaleString()} bytes).`),b(null),q(W=>W+1),h(W=>W+1)}catch(E){j(E)}finally{m(!1)}}},k=async E=>{const{file:$,contentBase64:W}=await de(`/services/files/${encodeURIComponent(E.id)}/content?as=${encodeURIComponent(n)}`),Z=Uint8Array.from(atob(W),ee=>ee.charCodeAt(0)),F=URL.createObjectURL(new Blob([Z],{type:$.contentType??"application/octet-stream"}));Object.assign(document.createElement("a"),{href:F,download:$.name}).click(),setTimeout(()=>URL.revokeObjectURL(F),1e3)};return s.jsxs(s.Fragment,{children:[s.jsxs(he,{title:"Upload a file",children:[s.jsx(ya,{label:"Upload a file",layout:"inline",submitLabel:"Upload",busy:v,onSubmit:()=>{z()},children:s.jsxs("div",{className:"stack-field stack-field--text",children:[s.jsx("label",{className:"stack-field__label",htmlFor:"files-upload",children:"File"}),s.jsx("input",{className:"stack-field__control",id:"files-upload",type:"file",required:!0,onChange:E=>b(E.target.files?.[0]??null),"aria-describedby":"files-upload-hint"},A),s.jsxs("p",{className:"stack-field__hint",id:"files-upload-hint",children:["Stored in this environment's FeltDB instance as ",n,", through the Files service your functions use (ctx.services.files)."]})]})}),p?s.jsx($e,{title:"Not uploaded",error:p}):null,g?s.jsx(lt,{tone:"info",title:"Uploaded",children:g}):null]}),s.jsx(Ka,{title:"Files",read:()=>u("/_appport/files"),deps:[n,o,r],empty:"No files yet",columns:[["Name",E=>s.jsx("strong",{children:E.name})],["Owner",E=>al(E.owner)],["Type",E=>E.contentType??null],["Size",E=>typeof E.size=="number"?E.size.toLocaleString():null],["Updated",E=>Ul(E.updatedAt??E.createdAt)]],actions:(E,$)=>s.jsxs(s.Fragment,{children:[s.jsx(Le,{label:"Download",action:()=>k(E)}),s.jsx(sg,{current:E.name,label:`New name for ${E.name}`,onSave:W=>u(`/_appport/files/${encodeURIComponent(E.id)}`,"PATCH",{name:W}),done:$}),s.jsx(Le,{label:"Delete",variant:"danger",confirm:{title:`Delete ${E.name}?`,consequences:["The file record and its bytes are deleted from this environment's FeltDB instance.","Anything that links to it stops working."],confirmLabel:"Delete file",requireText:E.name},action:()=>de(`/services/files/${encodeURIComponent(E.id)}?as=${encodeURIComponent(n)}`,{method:"DELETE"}),done:$})]})})]})}function kj(n){return new Promise((u,o)=>{const r=new FileReader;r.onload=()=>u(String(r.result).replace(/^data:[^,]*,/,"")),r.onerror=()=>o(r.error),r.readAsDataURL(n)})}function sg({current:n,label:u,onSave:o,done:r,edit:h="Rename"}){const[f,b]=C.useState(!1),[v,m]=C.useState(n),[p,j]=C.useState(!1),[g,x]=C.useState(null),A=`rename-${C.useId().replace(/:/g,"")}`;if(!f)return s.jsx(ze,{size:"sm",label:h,onClick:()=>(m(n),x(null),b(!0))});const q=async()=>{if(v.trim()){x(null),j(!0);try{mi(await o(v.trim()),"The record"),b(!1),r()}catch(z){x(z)}finally{j(!1)}}};return s.jsxs("div",{className:"feltkit-stack",children:[s.jsx(ya,{label:u,layout:"inline",submitLabel:"Save",busy:p,onSubmit:()=>{q()},actions:s.jsx(ze,{variant:"ghost",label:"Cancel",onClick:()=>b(!1)}),children:s.jsx(qe,{id:A,label:u,value:v,onChange:m,required:!0,spellcheck:"false"})}),g?s.jsx($e,{title:"Not saved",error:g}):null]})}function Nj({as:n,manage:u,version:o}){const[r,h]=C.useState(0),f=()=>h(m=>m+1),b=gi(o,r),v=gl().overview?.devUsers??[];return s.jsxs(s.Fragment,{children:[s.jsx(xn,{title:"Send a notification",submitLabel:"Send",fields:[{name:"recipient",label:"Recipient",required:!0,value:n,choices:v.map(m=>({value:m.id,label:`${m.name??m.id} (${m.id})`})),hint:"A principal id. Only the recipient can read it."},{name:"type",label:"Type",required:!0,placeholder:"task.assigned",choices:b?.notificationTypes.all??[],hint:b?.notificationTypes.declared.length?"Declared in services.notifications.types, plus types already sent.":"Declare your types in services: { notifications: { types: [...] } } to list them here."},{name:"title",label:"Title",required:!0},{name:"priority",label:"Priority",options:["normal","low","high","urgent"]}],send:async m=>{await u("/_appport/notifications","POST",m),f()},done:()=>"Notification sent."},b?"ready":"loading"),s.jsx(Ka,{title:`Notifications for ${n}`,read:()=>u(`/_appport/notifications?limit=50&recipient=${encodeURIComponent(n)}`).then(m=>m.items),deps:[n,o,r],empty:"No notifications for this identity",columns:[["Title",m=>s.jsx("strong",{children:m.title??m.type})],["Type",m=>al(m.type)],["Priority",m=>m.priority],["State",m=>m.dismissedAt?s.jsx(Ve,{tone:"neutral",label:"Dismissed"}):s.jsx(Ve,{field:"appport.notification.status",value:m.readAt&&m.status==="delivered"?"read":m.status,attrs:{"data-state":m.status}})],["Created",m=>Ul(m.createdAt)]],actions:(m,p)=>{const j=`/_appport/notifications/${encodeURIComponent(m.id)}`;return s.jsxs(s.Fragment,{children:[!m.readAt&&s.jsx(Le,{label:"Mark read",action:async()=>mi(await u(`${j}/read`,"POST"),"The notification"),done:p}),!m.dismissedAt&&s.jsx(Le,{label:"Dismiss",action:async()=>mi(await u(`${j}/dismiss`,"POST"),"The notification"),done:p}),s.jsx(Le,{label:"Delete",variant:"danger",confirm:{title:`Delete the notification ${m.title??m.type}?`,consequences:["The notification and its deliveries are deleted.",`${m.recipient??"Its recipient"} no longer sees it.`],confirmLabel:"Delete notification"},action:()=>u(j,"DELETE"),done:p})]})}})]})}const _y={pattern:"[A-Z][A-Z0-9_]*",placeholder:"STRIPE_ACCOUNT",hint:"Uppercase letters, digits and underscores, starting with a letter."};function Tj({as:n,manage:u,version:o}){const[r,h]=C.useState(0),f=()=>h(z=>z+1),b=gi(o,r),v=st(()=>u("/v1/configuration"),[n,o,r]),m=[...new Set((v.data?.secrets??[]).map(z=>z.credentialRef))],p=st(()=>m.length?u(`/v1/configuration/credentials/status?${m.map(z=>`ref=${encodeURIComponent(z)}`).join("&")}`):Promise.resolve([]),[m.join(","),r]),j=new Map((p.data??[]).map(z=>[z.ref,z]));if(v.error&&!v.data)return s.jsx($e,{title:"Configuration could not be read",error:v.error,retry:v.reload});if(!v.data)return s.jsx(Ht,{what:"configuration"});const{variables:g,secrets:x,declarations:A}=v.data,q=A.filter(z=>z.required&&!g.some(k=>k.name===z.name)&&!x.some(k=>k.name===z.name)).length;return s.jsxs(s.Fragment,{children:[q===0?s.jsx("p",{className:"feltkit-small",children:s.jsx(Ve,{tone:"positive",label:"Every required value is set"})}):s.jsx(lt,{tone:"attention",title:`${q} required value${q===1?"":"s"} missing`,children:"Add them below: the application declares them as required."}),s.jsx(he,{title:"Variables",children:s.jsx(Ot,{label:"Variables",columns:[{id:"name",header:"Name"},{id:"value",header:"Value"},{id:"updated",header:"Updated"},{id:"actions",header:"Actions"}],rows:g.map(z=>({key:z.name,cells:{name:al(z.name),value:s.jsx("code",{children:z.value}),updated:Ul(z.updatedAt),actions:s.jsxs("span",{className:"feltkit-actions",children:[s.jsx(sg,{current:z.value,edit:"Edit",label:`New value for ${z.name}`,onSave:k=>u(`/v1/configuration/variables/${encodeURIComponent(z.name)}`,"PATCH",{value:k,required:!1}),done:f}),s.jsx(Le,{label:"Delete",variant:"danger",confirm:{title:`Delete ${z.name}?`,consequences:["Code reading this variable no longer gets a value."],confirmLabel:"Delete variable",requireText:z.name},action:()=>u(`/v1/configuration/variables/${encodeURIComponent(z.name)}`,"DELETE"),done:f})]})}})),emptyTitle:"No variables yet"})}),s.jsx(xn,{title:"Add a variable",submitLabel:"Add variable",fields:[{name:"name",label:"Name",required:!0,..._y},{name:"value",label:"Value",required:!0,hint:"Not for secrets: add a secret reference below instead."}],send:async z=>{if(js(z.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 u("/v1/configuration/variables","POST",{...z,required:!1}),f()},done:()=>"Variable added."}),s.jsx(he,{title:"Secrets",children:s.jsx(Ot,{label:"Secrets",columns:[{id:"name",header:"Name"},{id:"ref",header:"Reference"},{id:"value",header:"Value"},{id:"updated",header:"Updated"},{id:"actions",header:"Actions"}],rows:x.map(z=>{const k=j.get(z.credentialRef);return{key:z.name,cells:{name:al(z.name),ref:al(z.credentialRef),value:k?s.jsx(ht,{field:"feltkit.secret.state",value:k.state,detail:k.state==="set"&&k.version?`v${k.version}`:void 0}):s.jsx(Ve,{tone:"unknown",label:"Unknown"}),updated:Ul(z.updatedAt),actions:s.jsxs("span",{className:"feltkit-actions",children:[s.jsx(nu,{credentialRef:z.credentialRef,label:k?.state==="set"?"Replace value":"Set value",as:n,onSaved:f}),s.jsx(Le,{label:"Delete",variant:"danger",confirm:{title:`Delete the binding ${z.name}?`,consequences:["Code reading this secret no longer gets a value.",`The stored value of ${z.credentialRef} is kept.`],confirmLabel:"Delete binding"},action:()=>u(`/v1/configuration/secrets/${encodeURIComponent(z.name)}`,"DELETE"),done:f})]})}}}),emptyTitle:"No secrets yet"})}),s.jsx(xn,{title:"Add a secret reference",submitLabel:"Add secret",fields:[{name:"name",label:"Name",required:!0,..._y},{name:"credentialRef",label:"Credential reference",required:!0,pattern:"credential-ref:.+",placeholder:"credential-ref:stripe",choices:(b?.credentials??[]).map(z=>({value:z.ref,label:`${z.ref}${z.present?"":" (not set)"}`})),hint:hj}],send:async z=>{await u("/v1/configuration/secrets","POST",{...z,required:!1}),f()},done:()=>"Secret reference added. Set its value in the table above."},b?"ready":"loading")]})}function Ej({lead:n,value:u,onDone:o}){return s.jsx(lt,{tone:"attention",title:`${n} Copy this secret now: it is not shown again.`,actions:s.jsxs(s.Fragment,{children:[s.jsx(ps,{text:u,label:"Copy secret"}),s.jsx(ze,{size:"sm",variant:"ghost",label:"Done",onClick:o})]}),children:s.jsx("code",{className:"feltkit-secret",children:u})})}function Aj({manage:n,version:u}){const[o,r]=C.useState(0),h=gi(u),[f,b]=C.useState(null),[v,m]=C.useState(null),p=()=>r(g=>g+1),j="/_appport/api/keys";return s.jsxs(s.Fragment,{children:[f&&s.jsx(Ej,{lead:f.lead,value:f.value,onDone:()=>b(null)}),s.jsx(xn,{title:"Create an API key",submitLabel:"Create API key",fields:[{name:"name",label:"Key name",required:!0},{name:"capabilities",label:"Only these capabilities (optional)",multi:!0,choices:h?.capabilities??[],placeholder:"files.read, jobs.create",hint:"A ceiling: the key's roles still decide. None chosen: no ceiling."},{name:"expiresAt",label:"Expires at (optional)",type:"datetime-local"}],send:async g=>{const x=iu(g.capabilities??""),A=await n(j,"POST",{name:g.name,...x.length?{restrictions:{capabilities:x}}:{},...g.expiresAt?{expiresAt:new Date(g.expiresAt).toISOString()}:{}});return A?.secret&&b({lead:`Created ${g.name}.`,value:A.secret}),p(),A},done:()=>"API key created."},h?"ready":"loading"),s.jsx(Ka,{title:"API keys",read:()=>n(j),deps:[u,o],empty:"No API keys yet",columns:[["Name",g=>s.jsx("strong",{children:g.name})],["Prefix",g=>al(g.keyPrefix)],["Ceiling",g=>g.restrictions?g.restrictions.capabilities.length?g.restrictions.capabilities.join(", "):"denies everything":"none"],["Expires",g=>Ul(g.expiresAt)],["Last used",g=>Ul(g.lastUsedAt)],["State",g=>g.rotatedTo?s.jsx(Ve,{tone:"neutral",label:"Replaced"}):s.jsx(Ve,{field:"appport.api_key.revoked",value:g.status!=="active",attrs:{"data-state":g.status}})]],actions:(g,x)=>s.jsxs(s.Fragment,{children:[g.status==="active"&&!g.rotatedTo&&s.jsx(Le,{label:"Rotate",confirm:{title:`Rotate ${g.name}?`,consequences:["A new secret is issued and shown once.","The current secret is revoked now: requests with it are refused."],confirmLabel:"Rotate key"},action:async()=>{const A=mi(await n(`${j}/${encodeURIComponent(g.id)}/rotate`,"POST",{overlapSeconds:0}),`The API key ${g.name}`);b({lead:`Rotated ${g.name}.`,value:A.secret})},done:x}),s.jsx(ze,{size:"sm",label:"Audit",onClick:()=>m(g)}),g.status==="active"&&s.jsx(Le,{label:"Revoke",variant:"danger",confirm:{title:`Revoke ${g.name}?`,consequences:["Requests with this key are refused from now on.","A revoked key cannot be restored; create a new one."],confirmLabel:"Revoke key",requireText:g.name},action:()=>n(`${j}/${encodeURIComponent(g.id)}`,"DELETE"),done:x})]})}),v&&s.jsx(Ka,{title:`Audit for ${v.name}`,read:()=>n(`${j}/${encodeURIComponent(v.id)}/audit`).then(g=>Array.isArray(g)?g:g.items??[]),deps:[v.id,o],empty:"No events",columns:[["Time",g=>Ul(g.timestamp)],["Event",g=>al(g.type)],["Result",g=>g.result],["Principal",g=>al(g.principalId)]]})]})}const ky="generate";function Cj(){const n=crypto.getRandomValues(new Uint8Array(32));return btoa(String.fromCharCode(...n)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function Oj({as:n,manage:u,version:o}){const[r,h]=C.useState(0),f=()=>h(m=>m+1),b=gi(o,r),v=b?.credentials??[];return s.jsxs(s.Fragment,{children:[s.jsx(xn,{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,multi:!0,placeholder:"invoice.created, invoice.paid",choices:b?.webhookEvents.all??[],hint:b?.webhookEvents.declared.length?"Declared in services.webhooks.events; your mutations emit them with ctx.afterCommit.webhooks.emit().":"Declare your events in services: { webhooks: { events: [...] } } to list them here."},{name:"signingCredentialRef",label:"Signing secret",required:!0,pattern:"credential-ref:.+",placeholder:"credential-ref:webhook-signing",choices:[{value:ky,label:"Generate a new signing secret"},...oj(v).map(m=>({value:m.ref,label:`${m.ref}${m.present?"":" (not set)"}`}))],hint:"A new secret is stored in FeltKit's custody and shown to you once, to configure the receiver."}],send:async m=>{const p=iu(m.events??"");if(!p.length)throw new Error("Choose at least one event.");let j=m.signingCredentialRef,g=null;return j===ky&&(j=`credential-ref:webhook-${new URL(m.url).hostname.replace(/[^A-Za-z0-9]+/g,"-").replace(/^-|-$/g,"")}-${Date.now().toString(36)}`,g=Cj(),await de("/credentials",{method:"POST",body:JSON.stringify({ref:j,value:g,as:n})})),await u("/_appport/webhooks","POST",{url:m.url,events:p,signingCredentialRef:j}),f(),{ref:j,secret:g}},done:m=>m.secret?s.jsxs(s.Fragment,{children:["Endpoint registered, signing with ",s.jsx("code",{children:m.ref}),". Give the receiver this secret now; it is not shown again: ",s.jsx("code",{className:"feltkit-secret",children:m.secret})," ",s.jsx(ps,{text:m.secret,label:"Copy secret"})]}):s.jsxs(s.Fragment,{children:["Endpoint registered, signing with ",s.jsx("code",{children:m.ref}),"."]})},b?"ready":"loading"),s.jsx(Ka,{title:"Endpoints",read:()=>u("/_appport/webhooks"),deps:[n,o,r],empty:"No endpoints yet",columns:[["URL",m=>al(m.url)],["Events",m=>(m.events??[]).join(", ")||null],["Signing secret",m=>al(m.signingCredentialRef)],["Created",m=>Ul(m.createdAt)],["Status",m=>s.jsx(Ve,{field:"appport.webhook.disabled",value:!!m.disabledAt})]],actions:(m,p)=>m.disabledAt?null:s.jsx(Le,{label:"Disable",variant:"danger",confirm:{title:`Disable ${m.url}?`,consequences:["Nothing more is delivered to this endpoint.","A disabled endpoint cannot be enabled again; register it anew."],confirmLabel:"Disable endpoint"},action:()=>u(`/_appport/webhooks/${encodeURIComponent(m.id)}`,"DELETE"),done:p})}),s.jsx(Ka,{title:"Recent deliveries",read:()=>u("/_appport/webhooks/deliveries?limit=50").then(m=>Array.isArray(m)?m:m.items??[]),deps:[n,o,r],empty:"No deliveries yet",columns:[["Event",m=>al(m.eventType)],["Status",m=>s.jsx(ht,{field:"feltkit.webhook.delivery",value:m.status})],["Attempts",m=>m.attemptCount],["HTTP",m=>m.lastStatusCode??null],["Last error",m=>dj(m)],["Created",m=>Ul(m.createdAt)]],tools:m=>s.jsx(yd,{done:m}),actions:(m,p)=>m.status==="failed"?s.jsxs(s.Fragment,{children:[s.jsx(Le,{label:"Replay",action:()=>de(`/services/deliveries/${encodeURIComponent(m.id)}/replay`,{method:"POST",body:JSON.stringify({as:n})}),done:p}),s.jsx(ze,{size:"sm",label:"Diagnose",onClick:()=>Wl(`agent/new/diagnose-delivery/${encodeURIComponent(m.id)}`)})]}):null})]})}function cg({handlers:n,mutations:u}){const[o,r]=C.useState(u[0]??"");if(Object.keys(n).length)return null;const f=`jobs: { handlers: { "${o.replace(":",".")}": "${o}" } },`;return s.jsxs(he,{title:"Declare a job type",children:[s.jsxs("p",{className:"feltkit-small",children:["A job type runs one of your mutations, as the person who queued it, with retries. None is declared yet. Choose the mutation it runs, then add the line to ",s.jsx("code",{children:"services"})," in ",s.jsx("code",{children:"feltkit/app.ts"}),"; the backend reloads and the type appears below."]}),u.length?s.jsxs(s.Fragment,{children:[s.jsx(Jt,{id:"declare-handler-mutation",label:"Mutation",value:o,onChange:r,options:u}),s.jsx(ys,{text:f,label:"Line to add to services"})]}):s.jsx("p",{className:"feltkit-muted feltkit-small",children:"Write a mutation in feltkit/ first."})]})}function wj({as:n,manage:u,version:o}){const[r,h]=C.useState(0),f=()=>h(p=>p+1),b=gi(o),v=b?.jobHandlers??{},m=Object.keys(v);return s.jsxs(s.Fragment,{children:[b&&s.jsx(cg,{handlers:v,mutations:b.mutations}),s.jsx(xn,{title:"Queue a job",submitLabel:"Queue job",fields:[{name:"type",label:"Job type",required:!0,strict:!0,choices:m.map(p=>({value:p,label:`${p} → ${v[p]}`})),placeholder:"Declare a handler first"},{name:"payload",label:"Payload (JSON object)",multiline:!0,value:"{}"}],send:async p=>{if(!m.includes(p.type))throw new Error(`No handler is declared for "${p.type}", so the job would fail. Declare it in services.jobs.handlers first.`);await u("/_appport/jobs","POST",{type:p.type,payload:Sj(p.payload??"{}","payload")}),f()},done:()=>s.jsxs("span",{className:"feltkit-row",children:["Job queued as ",n,". ",s.jsx(yd,{done:f})]})},m.join(",")),s.jsx(Ka,{title:"Jobs",read:()=>u("/_appport/jobs").then(p=>[...p].sort((j,g)=>String(g.createdAt).localeCompare(String(j.createdAt)))),deps:[n,o,r],empty:"No jobs yet",tools:p=>s.jsx(yd,{done:p}),columns:[["Type",p=>al(p.type)],["Status",p=>s.jsx(Ve,{field:"appport.job.status",value:p.status,attrs:{"data-state":p.status}})],["Attempts",p=>`${p.attemptCount}/${p.maxAttempts}`],["Run at",p=>Ul(p.runAt)],["Last error",p=>p.lastError??null]],actions:(p,j)=>s.jsxs(s.Fragment,{children:[(p.status==="failed"||p.status==="completed")&&s.jsx(Le,{label:"Retry",action:async()=>mi(await u(`/_appport/jobs/${encodeURIComponent(p.id)}/retry`,"POST"),`The ${p.type} job`),done:j}),p.status==="failed"&&s.jsx(ze,{size:"sm",label:"Diagnose",onClick:()=>Wl(`agent/new/diagnose-job/${encodeURIComponent(p.id)}`)})]})})]})}const Dj={s:"second",m:"minute",h:"hour",d:"day"},Rj=n=>{const u=/^(\d+)([smhd])$/.exec(String(n));return u?`Every ${u[1]} ${Dj[u[2]]}${u[1]==="1"?"":"s"}`:String(n)};function zj({manage:n,version:u}){const[o,r]=C.useState(0),h=()=>r(m=>m+1),f=gi(u),b=f?.jobHandlers??{},v=Object.keys(b);return s.jsxs(s.Fragment,{children:[f&&v.length===0&&s.jsx(cg,{handlers:b,mutations:f.mutations}),s.jsx(xn,{title:"Create a schedule",submitLabel:"Create schedule",fields:[{name:"type",label:"Job type",required:!0,strict:!0,choices:v.map(m=>({value:m,label:`${m} → ${b[m]}`})),placeholder:"Declare a handler first"},{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 m=>{if(!v.includes(m.type))throw new Error(`No handler is declared for "${m.type}", so every scheduled job would fail. Declare it in services.jobs.handlers first.`);await n("/_appport/schedules","POST",{type:m.type,interval:m.interval}),h()},done:()=>"Schedule created."},v.join(",")),s.jsx(Ka,{title:"Schedules",read:()=>n("/_appport/schedules"),deps:[u,o],empty:"No schedules yet",columns:[["Type",m=>al(m.type)],["Frequency",m=>Rj(m.interval)],["Next run",m=>Ul(m.nextRunAt)],["Created by",m=>al(m.createdBy)],["Status",m=>s.jsx(Ve,{field:"appport.schedule.enabled",value:!!m.enabled})]],actions:(m,p)=>m.enabled?s.jsx(Le,{label:"Disable",variant:"danger",confirm:{title:`Disable the ${m.type} schedule?`,consequences:["It stops queueing jobs.","A disabled schedule cannot be enabled again; create a new one."],confirmLabel:"Disable schedule"},action:async()=>mi(await n(`/_appport/schedules/${encodeURIComponent(m.id)}`,"DELETE"),"The schedule"),done:p}):null})]})}function Mj({manage:n,version:u}){const[o,r]=C.useState(0),h=st(()=>Promise.all([n("/v1/intelligence/catalog"),n("/v1/intelligence")]),[u,o]),[f,b]=C.useState(null),[v,m]=C.useState(null),[p,j]=C.useState(!1),[g,x]=C.useState(!1);if(h.error&&!h.data)return s.jsx($e,{title:"Intelligence could not be read",error:h.error,retry:h.reload});if(!h.data)return s.jsx(Ht,{what:"Intelligence"});const[A,q]=h.data,z=f??{provider:q.configured?q.provider:A[0]?.id??"",model:q.configured?q.model:"",endpoint:q.configured&&q.endpoint?.kind==="custom"?q.endpoint.url:"",credentialRef:""},k=A.find(Z=>Z.id===z.provider),E=Z=>(j(!1),b({...z,...Z})),$=k?.credential==="required"&&!q.credentialConfigured,W=async()=>{m(null),x(!0);try{if(js(z.credentialRef))throw new Error("That looks like an API key. Enter the key in Studio → Models; here, give a credential reference.");await n("/v1/intelligence","PUT",{provider:z.provider,model:z.model,endpoint:z.endpoint&&k?.customEndpoint?z.endpoint:"default",...z.credentialRef?{credentialRef:z.credentialRef}:{}}),b(null),j(!0),r(Z=>Z+1)}catch(Z){m(Z)}finally{x(!1)}};return s.jsxs(s.Fragment,{children:[s.jsxs(he,{title:"Current",children:[s.jsx("p",{className:"feltkit-small",children:q.configured?s.jsxs(s.Fragment,{children:[s.jsx("strong",{children:q.provider})," / ",s.jsx("code",{children:q.model})," ·"," ",q.credentialConfigured?s.jsx(Ve,{tone:"positive",label:"Credential attached"}):s.jsx(Ve,{tone:"attention",label:"No credential attached"})]}):"Not configured. The platform works without it; the agent then has no model to decide with."}),s.jsxs("p",{className:"feltkit-muted feltkit-small",children:["To enter an API key and test the model, open ",s.jsx("a",{href:"#/models",children:"Models"}),"."]})]}),s.jsxs(he,{title:"Configure",children:[s.jsxs(ya,{label:"Configure Intelligence",submitLabel:"Save",busy:g,onSubmit:()=>{W()},actions:q.credentialConfigured&&k?.credential!=="required"?s.jsx(Le,{label:"Remove credential",variant:"danger",size:"md",confirm:{title:"Detach the credential reference?",consequences:["Intelligence calls this provider without a key.","The stored value stays in custody."],confirmLabel:"Remove credential"},action:()=>n("/v1/intelligence/credential","DELETE"),done:()=>r(Z=>Z+1)}):null,children:[s.jsx(Jt,{id:"intelligence-provider",label:"Provider",required:!0,value:z.provider,onChange:Z=>E({provider:Z,model:""}),options:A.map(Z=>({value:Z.id,label:Z.displayName}))}),s.jsx(qe,{id:"intelligence-model",label:"Model",required:!0,list:"intelligence-models",value:z.model,onChange:Z=>E({model:Z}),spellcheck:"false"}),k?.customEndpoint&&s.jsx(qe,{id:"intelligence-endpoint",label:"Custom endpoint (optional)",type:"url",value:z.endpoint,placeholder:k.endpoints?.[0]?.url??"http://localhost:11434/v1",onChange:Z=>E({endpoint:Z})}),s.jsx(qe,{id:"intelligence-credential",label:"Credential reference",hint:"Leave empty to keep the current one.",value:z.credentialRef,pattern:"credential-ref:.+",placeholder:`credential-ref:${z.provider}`,required:$,onChange:Z=>E({credentialRef:Z}),spellcheck:"false"})]}),s.jsx("datalist",{id:"intelligence-models",children:(k?.models??[]).map(Z=>s.jsx("option",{value:Z.id,children:Z.displayName},Z.id))}),v?s.jsx($e,{title:"Not saved",error:v}):null,p?s.jsxs(lt,{tone:"info",title:"Saved",children:["Intelligence now uses ",q.provider??z.provider,"."]}):null]})]})}const ug={configured:"Enabled, set up, and its records read cleanly.",unconfigured:"Enabled, but nothing is set up yet.",unhealthy:"Enabled, but its store failed a check or recent work failed.",available:"Can run here; not enabled in feltkit({ services }).",unavailable:"Cannot run in this installation."};function gd({service:n}){return s.jsx(ht,{field:"feltkit.service.state",value:n.state})}const rg="feltkit.services.as",Uj=()=>{try{return sessionStorage.getItem(rg)}catch{return null}};function $j(n){const[u,o]=C.useState(()=>Uj()??n[0]?.id??""),r=f=>{o(f);try{sessionStorage.setItem(rg,f)}catch{}};return C.useEffect(()=>{n.length&&!n.some(f=>f.id===u)&&o(n[0].id)},[n,u]),{as:u,picker:s.jsx(xs,{id:"services-as",as:u,setAs:r,devUsers:n})}}const sd=n=>n.state!=="available"&&n.state!=="unavailable";function Bj({page:n}){const{version:u}=gl(),o=st(()=>de("/services"),[u]),r=st(()=>de("/overview"),[u]),h=r.data?.devUsers??[],f=!!r.data?.environment?.development,{canAct:b}=su(r.data),{as:v,picker:m}=$j(h),p=o.data?.services??[],j=f&&h.length?m:null;if(n==="credentials")return s.jsxs("div",{className:"feltkit-page",children:[s.jsx(nl,{title:"Credentials",crumbs:[{label:"Services",href:"#/services"},{label:"Credentials"}],subtitle:"Credential references the services and configuration use, and where each value is kept.",actions:j}),s.jsx(Hj,{as:v,canAct:b,development:f,version:u})]});if(n){const A=p.find(q=>q.id===n);return s.jsx(vj,{id:n,service:A,as:v,picker:j,development:f,summary:A&&sd(A)?s.jsx(qj,{service:A}):null,operations:!f&&n==="jobs"?s.jsx(Lj,{as:v,development:!1,canAct:b,version:u}):!f&&n==="webhooks"?s.jsx(Yj,{as:v,development:!1,canAct:!1,version:u}):null})}const g=p.filter(sd),x=p.filter(A=>!sd(A));return s.jsxs("div",{className:"feltkit-page",children:[s.jsx(nl,{title:"Services",subtitle:f?"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:j}),o.error&&!o.data?s.jsx($e,{title:"Services could not be read",error:o.error,retry:o.reload}):o.data?s.jsxs(s.Fragment,{children:[f&&h.length===0&&s.jsxs("p",{className:"feltkit-muted feltkit-small",children:["Declare a development identity in ",s.jsxs("code",{children:["feltkit(","{"," dev: ","{"," users ","}"," ","}",")"]})," to manage services: their operations are authorized as that identity."]}),g.length===0&&s.jsxs(va,{title:"No services enabled",children:["Enable services with ",s.jsxs("code",{children:["feltkit(","{"," services: ","{"," … ","}"," ","}",")"]}),". Each one gets its own screen here."]}),s.jsxs("div",{className:"feltkit-grid",children:[g.map(A=>s.jsxs(he,{title:s.jsx("a",{href:`#/services/${A.id}`,children:A.name}),action:s.jsx(gd,{service:A}),className:"feltkit-service",children:[s.jsx("p",{className:"feltkit-small",children:A.detail}),A.summary&&s.jsx("p",{className:"feltkit-muted feltkit-small",children:Object.entries(A.summary).slice(0,3).map(([q,z])=>`${q} ${z}`).join(" · ")})]},A.id)),s.jsx(he,{title:s.jsx("a",{href:"#/services/credentials",children:"Credentials"}),className:"feltkit-service",children:s.jsx("p",{className:"feltkit-small",children:"References the services use, and whether each value is set. Values are never shown."})})]}),x.length>0&&s.jsx(he,{title:"Not enabled",children:s.jsx(Ot,{label:"Services not enabled",columns:[{id:"name",header:"Service"},{id:"state",header:"State"},{id:"about",header:"About"},{id:"actions",header:"Actions"}],rows:x.map(A=>({key:A.id,attrs:{"data-service":A.id},cells:{name:s.jsx("strong",{children:A.name}),state:s.jsx(gd,{service:A}),about:A.state==="unavailable"?A.detail:A.description??ug[A.state],actions:A.state==="available"?s.jsx(ze,{size:"sm",label:`Enable ${A.name}`,onClick:()=>Wl(`services/${A.id}`)}):null}}))})})]}):s.jsx(Ht,{what:"services"})]})}function qj({service:n}){return s.jsxs(he,{title:s.jsxs(s.Fragment,{children:["Status ",s.jsx(gd,{service:n})]}),action:s.jsx("code",{children:`${n.package}@${n.version}`}),children:[s.jsx($l,{items:[{label:"Status",value:n.detail,hint:n.lastCheckedAt?`checked ${wt(n.lastCheckedAt)}`:ug[n.state]},...n.summary?[{label:"Records",value:Object.entries(n.summary).map(([u,o])=>`${u} ${String(o)}`).join(" · ")}]:[],...n.lastError?[{label:"Last error",value:s.jsx(Ve,{tone:"critical",label:"Failed",detail:n.lastError.message}),hint:wt(n.lastError.at)}]:[]]}),s.jsxs("details",{className:"feltkit-details",children:[s.jsx("summary",{children:"Permissions and stored state"}),s.jsx($l,{items:[{label:"Permissions",value:n.capabilities.join(" "),mono:!0},{label:"State",value:s.jsx("span",{className:"feltkit-choices",children:n.collections.map(u=>s.jsx("a",{href:`#/data/${u}`,children:s.jsx("code",{children:u})},u))})}]})]})]})}function Hj({as:n,canAct:u,development:o,version:r}){const[h,f]=C.useState(0),b=st(()=>de("/credentials"),[r,h]),[v,m]=C.useState("");if(b.error&&!b.data)return s.jsx($e,{title:"Credentials could not be read",error:b.error,retry:b.reload});if(!b.data)return s.jsx(Ht,{what:"credentials"});const{custody:p,credentials:j}=b.data,g=()=>f(A=>A+1),x=v.trim()?v.trim().startsWith("credential-ref:")?v.trim():`credential-ref:${v.trim()}`:"";return s.jsxs(he,{title:"Credentials",children:[s.jsxs("p",{className:"feltkit-muted feltkit-small",children:["Services and configuration hold credential references only. Values are kept by FeltKit's custody (",p.location,") and used inside the effect that needs them; they are never stored in FeltDB, logged, or shown. ",p.note]}),s.jsx(Ot,{label:"Credential references",columns:[{id:"ref",header:"Reference"},{id:"usedBy",header:"Used by"},{id:"value",header:"Value"},{id:"variable",header:"Override variable"},{id:"actions",header:"Actions"}],rows:j.map(A=>({key:A.ref,cells:{ref:s.jsx("code",{children:A.ref}),usedBy:A.usedBy.length?A.usedBy.join(", "):"stored, not used yet",value:s.jsx(mu,{credential:A}),variable:A.variable?s.jsx("code",{children:A.variable}):"invalid reference",actions:u&&A.writable?s.jsxs("span",{className:"feltkit-actions",children:[s.jsx(nu,{credentialRef:A.ref,label:A.present?"Replace":"Set",...o&&n?{as:n}:{},onSaved:g}),A.source==="vault"&&A.present&&s.jsx(Le,{label:"Remove",variant:"danger",action:()=>de(`/credentials/${encodeURIComponent(A.ref)}${o&&n?`?as=${encodeURIComponent(n)}`:""}`,{method:"DELETE"}),done:g,confirm:{title:`Remove the value of ${A.ref}?`,consequences:[A.usedBy.length?`${A.usedBy.join(", ")} can no longer use it.`:"Nothing uses it yet.","The value is deleted from custody; set it again to restore it."],confirmLabel:"Remove value",requireText:A.ref}})]}):null}})),emptyTitle:"No credential references yet"}),u&&p.writable&&s.jsxs("div",{className:"feltkit-inline",children:[s.jsx(qe,{id:"credential-new",label:"New credential reference",value:v,onChange:A=>m(js(A)?"":A),placeholder:"credential-ref:stripe",hint:"A name, never the value: a pasted secret is cleared.",spellcheck:"false"}),x&&s.jsx(nu,{credentialRef:x,label:"Set value",...o&&n?{as:n}:{},onSaved:()=>(m(""),g())})]})]})}function og({title:n,path:u,as:o,development:r,canAct:h,version:f,retry:b,columns:v}){const[m,p]=C.useState(0),j=st(()=>de(`/services/${u}`),[f,m]),g=()=>p(A=>A+1),x=j.data?.items??[];return s.jsxs(he,{title:n,action:r?s.jsx(Le,{label:"Run due work now",action:()=>de("/services/run",{method:"POST",body:"{}"}),done:g}):null,children:[j.data?.replay&&!j.data.replay.enabled?s.jsx("p",{className:"feltkit-muted feltkit-small",children:j.data.replay.reason}):null,s.jsx(Ot,{label:n,columns:[...v.map(([A])=>({id:A,header:A})),{id:"actions",header:"Actions"}],rows:x.slice(0,50).map(A=>({key:A.id,cells:{...Object.fromEntries(v.map(([q,z])=>[q,z(A)])),actions:s.jsxs("span",{className:"feltkit-actions",children:[r&&A.status==="failed"&&s.jsx(ze,{size:"sm",label:"Diagnose",onClick:()=>Wl(`agent/new/${u==="jobs"?"diagnose-job":"diagnose-delivery"}/${encodeURIComponent(A.id)}`)}),h&&b.when(A)&&(A.retryable??!0)&&s.jsx(Le,{label:b.label,disabled:r&&!o,action:()=>de(`/services/${u}/${encodeURIComponent(A.id)}/${b.action}`,{method:"POST",body:JSON.stringify(r?{as:o}:{})}),done:g})]})}})),loading:j.loading,error:j.error&&!j.data?{title:`${n} could not be read`,...Za(j.error,j.reload)}:null,emptyTitle:"Nothing yet"}),x.length>50&&s.jsxs("p",{className:"feltkit-muted feltkit-small",children:["The 50 newest of ",x.length," are shown."]})]})}function Lj(n){return s.jsx(og,{...n,title:"Job runs",path:"jobs",retry:{label:"Retry",action:"retry",when:u=>u.status==="failed"},columns:[["Type",u=>s.jsx("code",{children:u.type})],["Status",u=>s.jsx(Ve,{field:"appport.job.status",value:u.status,attrs:{"data-state":u.status}})],["Attempts",u=>`${u.attemptCount}/${u.maxAttempts}`],["As",u=>u.principal?s.jsx("code",{children:u.principal}):null],["Last error",u=>u.lastError??null],["Created",u=>wt(u.createdAt)]]})}function Yj(n){return s.jsx(og,{...n,title:"Webhook deliveries",path:"deliveries",retry:{label:"Replay",action:"replay",when:u=>u.status==="failed"},columns:[["Event",u=>s.jsx("code",{children:u.eventType})],["To",u=>s.jsx("code",{children:u.destination??u.endpointId})],["Status",u=>s.jsx(ht,{field:"feltkit.webhook.delivery",value:u.status})],["Attempts",u=>u.attemptCount],["HTTP",u=>u.lastStatusCode??null],["Last error",u=>u.lastError??null],["Created",u=>wt(u.createdAt)]]})}const Gj=["","query","mutation","capability","integration","agent","service","auth","admin","system"],Vj=["","success","error","denied"];function Xj({selected:n}){Py(1e4);const{activity:u,live:o}=gl(),[r,h]=C.useState(""),[f,b]=C.useState(""),[v,m]=C.useState(!1),p=st(()=>de(`/activity?limit=200${r?`&kind=${r}`:""}${f?`&outcome=${f}`:""}`),[r,f]),j=C.useMemo(()=>{const x=tg(u.filter(A=>(!r||A.kind===r)&&(!f||A.outcome===f)),p.data?.entries??[]);return v?x.filter(A=>A.kind!=="query"):x},[u,p.data,r,f,v]),g=!!(r||f||v);return s.jsxs("div",{className:"feltkit-page",children:[s.jsx(nl,{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.",status:s.jsx(Ky,{freshness:o?"live":"stale",source:"the runtime's event stream"})}),s.jsx(Iy,{live:!0,label:"Filter activity",idPrefix:"activity-filter",filters:[{id:"kind",label:"Kind",type:"select",value:r,options:Gj.map(x=>({value:x,label:x||"All kinds"}))},{id:"outcome",label:"Outcome",type:"select",value:f,options:Vj.map(x=>({value:x,label:x||"All outcomes"}))}],onChange:(x,A)=>x==="kind"?h(A):b(A),onClear:()=>(h(""),b(""),m(!1)),applied:(r?1:0)+(f?1:0)+(v?1:0),result:p.data?`${j.length} entr${j.length===1?"y":"ies"}, newest first`:""}),s.jsx(tu,{id:"activity-hide-queries",label:"Hide queries",checked:v,onChange:m}),s.jsx(Ot,{label:"Activity",columns:[{id:"when",header:"When"},{id:"outcome",header:"Outcome"},{id:"kind",header:"Kind"},{id:"name",header:"Name"},{id:"principal",header:"Principal"},{id:"via",header:"Via"},{id:"writes",header:"Writes",align:"end"},{id:"ms",header:"ms",align:"end"}],rows:j.map(x=>({key:x.id,selected:n===x.id,onSelect:()=>Wl(`activity/${x.id}`),attrs:{"data-activity":x.id},cells:{when:s.jsx("span",{title:x.at,children:wt(x.at)}),outcome:s.jsx(hi,{outcome:x.outcome}),kind:x.kind,name:s.jsxs(s.Fragment,{children:[s.jsx("code",{children:x.name})," ",x.error?s.jsx("code",{children:x.error.code}):null]}),principal:x.principal?x.principal.id:x.kind==="system"?null:"anonymous",via:x.via,writes:x.writes?.length?x.writes.length:null,ms:x.durationMs??null}})),loading:p.loading,loadingWhat:"activity",error:p.error&&!p.data?{title:"Activity could not be read",...Za(p.error,p.reload)}:null,noMatch:g,noMatchTitle:"No activity matches",noMatchBody:"Change or clear the filters.",emptyTitle:"Nothing has happened yet",emptyBody:"Use the app, invoke a capability, or run a function from Capabilities."}),n&&s.jsx(Qj,{id:n,onClose:()=>Wl("activity")})]})}function Qj({id:n,onClose:u}){const o=st(()=>de(`/activity/${encodeURIComponent(n)}`),[n]),r=o.data?.entry,h=o.data?.serviceEvidence??[];return s.jsx(Td,{id:"activity-detail",open:!0,className:"feltkit-dialog-wide",title:r?s.jsx("code",{children:r.name}):"Activity entry",description:r?`${r.kind} via ${r.via} · request ${r.requestId}`:void 0,onClose:u,actions:s.jsx(ze,{label:"Close",onClick:u}),children:o.error?s.jsx($e,{title:"This entry could not be read",error:o.error,retry:o.reload}):r?s.jsxs(s.Fragment,{children:[s.jsx($l,{items:[{label:"Outcome",value:s.jsx(hi,{outcome:r.outcome})},{label:"When",value:`${new Date(r.at).toLocaleString()} (${wt(r.at)})`},{label:"Principal",value:r.principal?`${r.principal.id} (${r.principal.type}; roles: ${r.principal.roles.join(", ")||"none"})`:"anonymous"},...r.capability?[{label:"AppPort capability",value:`${r.capability.name}@${r.capability.version}`,mono:!0}]:[],{label:"Request",value:r.requestId,mono:!0},{label:"Duration",value:`${r.durationMs} ms`},...r.argKeys?[{label:"Arguments",value:r.argKeys.length?r.argKeys.join(", "):"none",mono:!0}]:[]]}),r.error&&s.jsx($e,{title:r.error.code,error:{message:r.error.message}}),r.authority&&s.jsxs("section",{className:"feltkit-stack","aria-label":"Authority",children:[s.jsx("h3",{className:"feltkit-label",children:"Authority"}),s.jsx($l,{items:[{label:"Decision",value:s.jsx(ht,{field:"feltkit.authority.allowed",value:!!r.authority.allowed})},{label:"Required",value:r.authority.required??"an authenticated principal",mono:!!r.authority.required},...r.authority.reason?[{label:"Reason",value:r.authority.reason}]:[],{label:"Decision id",value:r.authority.decisionId,mono:!0},...r.authority.appportDecisionId?[{label:"AppPort decision",value:r.authority.appportDecisionId,mono:!0}]:[],{label:"Policy version",value:r.authority.policyVersion,mono:!0}]})]}),s.jsxs("section",{className:"feltkit-stack","aria-label":"State changes",children:[s.jsx("h3",{className:"feltkit-label",children:"State changes"}),r.writes?.length?s.jsxs(s.Fragment,{children:[s.jsxs("p",{className:"feltkit-muted feltkit-small",children:["Committed by FeltDB in one transaction ",s.jsx("code",{children:r.transactionId}),r.commitRevision!==void 0?` at revision ${r.commitRevision}`:"","."]}),s.jsx(Ot,{label:"Writes",columns:[{id:"op",header:"Op"},{id:"collection",header:"Collection"},{id:"record",header:"Record"},{id:"expected",header:"Expected version"}],rows:r.writes.map((f,b)=>({key:`${b}`,cells:{op:s.jsx("code",{children:f.op}),collection:s.jsx("code",{children:f.collection}),record:f.op==="delete"?s.jsx("code",{children:f.id}):s.jsx("a",{href:`#/data/${f.collection}`,children:s.jsx("code",{children:f.id})}),expected:f.expectedVersion??"— (create)"}}))})]}):s.jsx("p",{className:"feltkit-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?s.jsxs("p",{className:"feltkit-muted feltkit-small",children:["Read: ",r.reads.join(", ")]}):null]}),(h.length>0||r.services?.length)&&s.jsxs("section",{className:"feltkit-stack","aria-label":"Service evidence",children:[s.jsx("h3",{className:"feltkit-label",children:"Service evidence"}),s.jsxs("p",{className:"feltkit-muted feltkit-small",children:["Recorded by AppPort Services' gateway in the same FeltDB instance.",o.data?.serviceEvidenceState==="started"?" An effect has no recorded completion: its outcome is unknown, not failed.":"",o.data?.serviceEvidenceTruncated?" More records exist than are shown.":""]}),s.jsx(Ot,{label:"Service evidence",columns:[{id:"outcome",header:"Outcome"},{id:"capability",header:"Capability"},{id:"service",header:"Service"},{id:"decision",header:"Decision"},{id:"resource",header:"Resource"}],emptyTitle:"No evidence recorded",rows:h.map(f=>({key:f.id,cells:{outcome:s.jsx(ht,{field:"feltkit.service.evidence",value:f.outcome}),capability:s.jsx("code",{children:f.capability}),service:f.service,decision:s.jsxs(s.Fragment,{children:[f.decision==="allow"?s.jsx(Ve,{tone:"positive",label:"Allow"}):f.decision?s.jsx(Ve,{tone:"neutral",label:f.decision}):null,f.decisionId?s.jsxs("code",{children:[" ",f.decisionId]}):null]}),resource:f.resource?s.jsx("code",{children:f.resource}):null}}))})]}),r.detail&&s.jsxs("section",{className:"feltkit-stack","aria-label":"Detail",children:[s.jsx("h3",{className:"feltkit-label",children:"Detail"}),s.jsx(pn,{value:r.detail,label:"Entry detail"})]})]}):s.jsx(Ht,{what:"the entry"})})}function dg(){const[n,u]=C.useState(null),[o,r]=C.useState(!1);return{open:async()=>{u(null),r(!0);const f=window.open("about:blank","_blank");try{const b=await de("/production/studio-link",{method:"POST",body:"{}"});if(!b.url)throw new Error("No deployment is recorded for this project. Run `npx feltkit vercel deploy` or `npx feltkit cloudflare deploy` first.");f?(f.opener=null,f.location.href=b.url):window.location.assign(b.url)}catch(b){f?.close(),u(b)}finally{r(!1)}},error:n,busy:o}}const Zj=n=>n==="vercel"||n==="cloudflare"?`npx feltkit ${n} deploy`:"npx feltkit deploy";function Kj({production:n}){const u=dg(),o=Zj(n?.targetId??n?.deployment?.target),r=n?.deployment??null;return n?s.jsxs(he,{title:"Production",action:s.jsx(ht,{field:"feltkit.deployment.state",value:r?"live":n.target?"built":"none"}),children:[r?s.jsxs(s.Fragment,{children:[s.jsxs("p",{children:[s.jsx("a",{href:r.url,target:"_blank",rel:"noreferrer",children:r.url})," ",s.jsxs("span",{className:"feltkit-muted feltkit-small",children:["· ",n.target??r.target," · deployed ",wt(r.deployedAt)]})]}),s.jsxs("p",{className:"feltkit-muted feltkit-small",children:["Data: ",n.storage==="remote"?s.jsx("code",{children:n.location}):n.location]}),s.jsxs("div",{className:"feltkit-actions",children:[s.jsx("a",{href:r.url,target:"_blank",rel:"noreferrer",children:"Open app ↗"}),r.studio?s.jsx(ze,{size:"sm",variant:"primary",label:"Manage in production Studio ↗",busy:u.busy,onClick:()=>{u.open()}}):s.jsxs("span",{className:"feltkit-muted feltkit-small",children:["Production Studio is off. Turn it on with ",s.jsxs("code",{children:[o," --studio"]}),"."]})]}),u.error!=null&&s.jsx($e,{title:"Production Studio did not open",error:u.error}),s.jsxs("p",{className:"feltkit-muted feltkit-small",children:["Sign someone in to the app: ",s.jsx("code",{children:"npx feltkit session create --env production --type user --id <id> --role <role>"})," in this project's folder. It uses the deployment's FeltDB settings from ",s.jsx("code",{children:".env.local"}),"."]})]}):n.target?s.jsxs("p",{className:"feltkit-muted",children:["Built for ",n.target,", not deployed from here yet. Run ",s.jsx("code",{children:o}),": it uploads the settings, deploys, and signs you in."]}):s.jsxs("p",{className:"feltkit-muted",children:["Not deployed. ",s.jsx("code",{children:"npx feltkit deploy"})," builds it for where it will run (one container, Vercel, or a FeltDB server) and says what to do next."]}),n.storage==="unconfigured"&&s.jsx(lt,{tone:"attention",title:"Production storage is not configured",children:n.location})]}):null}function Jj(){const{version:n,overview:u}=gl(),o=st(()=>de("/environments"),[]),r=st(()=>de("/sessions"),[n]),h=u?.environment?.development;return s.jsxs("div",{className:"feltkit-page",children:[s.jsx(nl,{title:"Settings",subtitle:"Environments, access policy and sessions. Configuration lives in feltkit/app.ts; this page shows what the runtime actually uses."}),h&&o.data&&s.jsx(Kj,{production:o.data.environments.find(f=>f.name==="production"&&!f.active)}),s.jsxs(he,{title:"Environments",children:[s.jsx("p",{className:"feltkit-muted feltkit-small",children:"Each environment has its own FeltDB instance. They never share state; FeltKit refuses to open two environments on the same location."}),s.jsx(Ot,{label:"Environments",columns:[{id:"name",header:"Environment"},{id:"storage",header:"Storage"},{id:"location",header:"Location"},{id:"instance",header:"Instance"}],rows:(o.data?.environments??[]).map(f=>({key:f.name,selected:!!f.active,cells:{name:s.jsxs("span",{className:"feltkit-row",children:[s.jsx("strong",{children:f.name})," ",f.active&&s.jsx(Ve,{tone:"positive",label:"Active"})]}),storage:f.storage,location:s.jsxs("span",{className:"feltkit-mono",children:[f.target&&s.jsxs("span",{className:"feltkit-muted",children:[f.target," · "]}),f.location,f.deployment&&s.jsxs(s.Fragment,{children:[" · ",s.jsx("a",{href:f.deployment.url,target:"_blank",rel:"noreferrer",children:f.deployment.url})]})]}),instance:f.instanceId?s.jsx("code",{children:f.instanceId}):"not open here"}})),loading:o.loading,error:o.error&&!o.data?{title:"Environments could not be read",...Za(o.error,o.reload)}:null,emptyTitle:"No environments"}),s.jsxs("p",{className:"feltkit-muted feltkit-small",children:["Production is what your deployment uses. Built with ",s.jsx("code",{children:"npx feltkit deploy"})," for Vercel or a FeltDB server, that is its FeltDB, reached with the settings in ",s.jsx("code",{children:".env.local"}),"; otherwise ",s.jsx("code",{children:"FELTDB_URL"})," + ",s.jsx("code",{children:"FELTDB_TOKEN"})," when set, else ",s.jsx("code",{children:"FELTKIT_STATE_DIR"})," or ",s.jsx("code",{children:".feltkit/production/state"}),"."]})]}),s.jsxs("div",{className:"feltkit-grid feltkit-grid--wide",children:[s.jsxs(he,{title:"Access policy",action:s.jsxs("code",{children:["policy ",u?.policyVersion]}),children:[s.jsx(Ot,{label:"Roles and permissions",columns:[{id:"role",header:"Role"},{id:"permissions",header:"Permissions"}],rows:Object.entries(u?.roles??{}).map(([f,b])=>({key:f,cells:{role:s.jsx("strong",{children:f}),permissions:s.jsx("span",{className:"feltkit-mono",children:b.join(" ")})}})),emptyTitle:"No roles declared"}),s.jsx("p",{className:"feltkit-muted feltkit-small",children:"Enforced through AppPort's authorizer on functions, capabilities and services alike. Edit roles in feltkit/app.ts."})]}),s.jsx(he,{title:"Development identities",children:h?s.jsx(Ot,{label:"Development identities",columns:[{id:"name",header:"Name"},{id:"id",header:"Id"},{id:"roles",header:"Roles"}],rows:(u?.devUsers??[]).map(f=>({key:f.id,cells:{name:f.name??null,id:s.jsx("code",{children:f.id}),roles:f.roles.join(", ")}})),emptyTitle:"None declared",emptyBody:s.jsxs(s.Fragment,{children:["Add ",s.jsxs("code",{children:["dev: ","{ users: [...] }"]})," to ",s.jsxs("code",{children:["feltkit(","{ … }",")"]}),"."]})}):s.jsx("p",{className:"feltkit-muted",children:"Development sign-in is disabled in this environment."})})]}),s.jsxs(he,{title:"Sessions",action:s.jsx("span",{className:"feltkit-muted feltkit-small",children:"Tokens are stored only as SHA-256 digests."}),children:[h&&s.jsx(Fj,{roles:Object.keys(u?.roles??{}),onIssued:r.reload}),s.jsx(Ot,{label:"Active sessions",columns:[{id:"ref",header:"Ref"},{id:"principal",header:"Principal"},{id:"roles",header:"Roles"},{id:"kind",header:"Kind"},{id:"created",header:"Created"},{id:"expires",header:"Expires"},{id:"actions",header:"Actions"}],rows:(r.data?.sessions??[]).map(f=>({key:f.ref,cells:{ref:s.jsx("code",{children:f.ref}),principal:s.jsxs(s.Fragment,{children:[f.principal?.id," ",s.jsx("span",{className:"feltkit-muted feltkit-small",children:f.principal?.type})]}),roles:f.principal?.roles?.join(", ")||null,kind:f.kind,created:wt(f.createdAt),expires:f.expiresAt?new Date(f.expiresAt).toLocaleString():"never",actions:s.jsx(Le,{label:"Revoke",variant:"danger",action:()=>de(`/sessions/${f.ref}`,{method:"DELETE"}),done:r.reload,confirm:{title:`Revoke session ${f.ref}?`,consequences:[`${f.principal?.id??"Its principal"} is signed out wherever this token is used.`,"The token stops working at once; issue a new session to restore access."],confirmLabel:"Revoke session"}})}})),loading:r.loading,error:r.error&&!r.data?{title:"Sessions could not be read",...Za(r.error,r.reload)}:null,emptyTitle:"No active sessions"})]})]})}function Fj({roles:n,onIssued:u}){const[o,r]=C.useState("triage-agent"),[h,f]=C.useState(n.includes("agent")?"agent":n[0]??""),[b,v]=C.useState("agent"),[m,p]=C.useState(null),[j,g]=C.useState(null),[x,A]=C.useState(!1);return s.jsxs("div",{className:"feltkit-stack",children:[s.jsxs(ya,{label:"Issue a session",layout:"inline",submitLabel:"Issue 24-hour session",busy:x,onSubmit:async()=>{if(!(!o||!h)){g(null),A(!0);try{const q=await de("/sessions",{method:"POST",body:JSON.stringify({principal:{id:o,type:b,roles:[h]},label:"issued from the dashboard",ttlMs:864e5})});p(q.token),u()}catch(q){g(q)}finally{A(!1)}}},children:[s.jsx(qe,{id:"session-principal",label:"Principal id",value:o,onChange:r,required:!0,spellcheck:"false"}),s.jsx(Jt,{id:"session-type",label:"Principal type",value:b,onChange:v,options:["agent","service","user"]}),s.jsx(Jt,{id:"session-role",label:"Role",value:h,onChange:f,options:n,required:!0})]}),j?s.jsx($e,{title:"No session issued",error:j}):null,m&&s.jsxs(lt,{tone:"attention",title:"Copy this token now: it is shown once",actions:s.jsx(ps,{text:m,label:"Copy token"}),children:[s.jsx("code",{className:"feltkit-secret",children:m}),s.jsxs("p",{className:"feltkit-small",children:["Agents: connect an MCP client to ",s.jsxs("code",{children:[location.origin,"/mcp"]})," with ",s.jsx("code",{children:"Authorization: Bearer <token>"}),". It sees only what this role allows."]})]})]})}function Ij(){const n=st(()=>de("/projects"),[]),u=n.data?.projects??[],o=dg();return s.jsxs("div",{className:"feltkit-page",children:[s.jsx(nl,{title:"Projects",subtitle:"FeltKit applications this machine has run. Each has its own environments and FeltDB instances."}),n.error?s.jsx($e,{title:"Projects could not be read",error:n.error,retry:n.reload}):n.data?u.length===0?s.jsxs(va,{title:"Only this project so far",children:["Create another with ",s.jsx("code",{children:"npm create feltkit@latest my-app"}),"."]}):s.jsx("div",{className:"feltkit-grid feltkit-grid--wide",children:u.map(r=>{const h=r.path===n.data.current;return s.jsxs(he,{title:r.name,className:h?"feltkit-panel--current":"",action:s.jsx(ht,{field:"feltkit.project.state",value:h?"current":r.running?"running":r.exists?"stopped":"missing"}),children:[s.jsx("code",{className:"feltkit-path",children:r.path}),s.jsxs("p",{className:"feltkit-muted feltkit-small",children:["last run ",wt(r.lastRunAt)," · ",r.lastEnvironment]}),r.deployment&&s.jsxs("p",{className:"feltkit-small",children:["Live:"," ",s.jsx("a",{href:r.deployment.url,target:"_blank",rel:"noreferrer",children:r.deployment.url})," ",s.jsxs("span",{className:"feltkit-muted",children:["(",r.deployment.target,", deployed ",wt(r.deployment.deployedAt),")"]})]}),s.jsxs("div",{className:"feltkit-actions",children:[r.running&&r.url&&!h&&s.jsx("a",{href:r.url,target:"_blank",rel:"noreferrer",children:"Open app ↗"}),r.deployment&&s.jsx("a",{href:r.deployment.url,target:"_blank",rel:"noreferrer",children:"Open live app ↗"}),r.deployment?.studio&&h&&s.jsx(ze,{size:"sm",variant:"primary",label:"Manage production ↗",busy:o.busy,onClick:()=>{o.open()}}),r.deployment?.studio&&!h&&s.jsxs("span",{className:"feltkit-muted feltkit-small",children:["Manage it: ",s.jsx("code",{children:"npx feltkit manage"})," in its directory."]}),!r.running&&r.exists&&!r.deployment&&s.jsxs("span",{className:"feltkit-muted feltkit-small",children:["Start it: ",s.jsx("code",{children:"npm run dev"})," in its directory."]})]})]},r.path)})}):s.jsx(Ht,{what:"projects"}),o.error!=null&&s.jsx($e,{title:"Production Studio did not open",error:o.error}),s.jsx(he,{title:"Start a new application",children:s.jsx(ys,{text:`npm create feltkit@latest my-app
|
|
13
|
+
cd my-app
|
|
14
|
+
npm install
|
|
15
|
+
npm run dev`,label:"Commands to start a new application"})})]})}const cd=[{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, such as a change to the app. Nothing happens until a coding agent (Claude Code, Cursor, or another MCP client working in this project) claims it; connect one once it is created."}];function Wj({rest:n}){const{version:u}=gl(),o=st(()=>de("/overview"),[u]),r=o.data?.devUsers??[],h=!!o.data?.environment?.development,{canAct:f,actor:b}=su(o.data),[v,m]=C.useState("");C.useEffect(()=>{!v&&r[0]&&m(r[0].id)},[r,v]);const p=st(()=>de(`/agent${v?`?as=${encodeURIComponent(v)}`:""}`),[u,v]),j=n[0]&&n[0]!=="new"?n[0]:null,g=s.jsx(xs,{id:"agent-as",as:v,setAs:m,devUsers:r});return s.jsxs("div",{className:"feltkit-page",children:[s.jsx(nl,{title:"Agent",crumbs:j?[{label:"Agent",href:"#/agent"},{label:"Task"}]:void 0,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?g:null}),p.error&&!p.data?s.jsx($e,{title:"Agent tasks could not be read",error:p.error,retry:p.reload}):p.data?j?s.jsx(tS,{taskId:j,as:v,development:h,canAct:f,actor:h?v:b??"",version:u,handoff:p.data.handoffs.find(x=>x.taskId===j)}):s.jsxs(s.Fragment,{children:[h&&r.length>0&&s.jsx(Pj,{as:v,tools:p.data.tools,initial:n[0]==="new"?{playbook:n[1],target:n[2]}:void 0}),!h&&s.jsx(lt,{tone:"info",title:"Production tasks come from agents (over MCP) and playbooks",children:f?"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."}),p.data.handoffs.length>0&&s.jsxs(he,{title:"Waiting for a coding agent",children:[s.jsx("ul",{className:"feltkit-list",children:p.data.handoffs.map(x=>s.jsx("li",{children:s.jsxs("a",{href:`#/agent/${x.taskId}`,className:"feltkit-list__row",children:[s.jsx("span",{children:x.objective}),s.jsxs("span",{className:"feltkit-mono feltkit-muted",children:[x.handoffId," · from ",x.from]})]})},x.handoffId))}),s.jsx("p",{className:"feltkit-muted feltkit-small",children:"Nothing works on these until a coding agent claims them. FeltKit has no built-in coding agent: connect yours (Claude Code, Cursor, any MCP client) to this app, in this project."}),s.jsx(fg,{as:v,development:h,handoffId:p.data.handoffs.length===1?p.data.handoffs[0].handoffId:void 0})]}),s.jsx(he,{title:"Tasks",children:s.jsx(Ot,{label:"Agent tasks",columns:[{id:"objective",header:"Objective"},{id:"status",header:"Status"},{id:"execution",header:"FeltDB execution"},{id:"owner",header:"Owner"},{id:"waiting",header:"Waiting"},{id:"updated",header:"Updated"}],rows:p.data.tasks.map(x=>({key:x.task.task_id,onSelect:()=>Wl(`agent/${x.task.task_id}`),attrs:{"data-task":x.task.task_id},cells:{objective:s.jsx("a",{href:`#/agent/${x.task.task_id}`,children:x.task.objective}),status:s.jsx(ht,{field:"feltkit.agent.task",value:x.task.status}),execution:x.execution?.status?s.jsx("code",{children:x.execution.status}):null,owner:s.jsx("code",{children:x.task.owner}),waiting:x.pending?s.jsx(Ve,{tone:"attention",label:`${x.pending} approval${x.pending>1?"s":""}`}):null,updated:wt(x.task.updated_at)}})),emptyTitle:"No tasks yet",emptyBody:"Start one above, or from a failed job or delivery on the Services screen."})})]}):s.jsx(Ht,{what:"agent tasks"})]})}function Pj({as:n,tools:u,initial:o}){const[r,h]=C.useState(o?.playbook&&cd.some(Z=>Z.id===o.playbook)?o.playbook:"inspect-app"),[f,b]=C.useState(o?.target??""),[v,m]=C.useState(""),[p,j]=C.useState(""),[g,x]=C.useState("{}"),[A,q]=C.useState(!1),[z,k]=C.useState(null),E=cd.find(Z=>Z.id===r),$=!!n&&!(E.target&&!f)&&!(r==="invoke"&&!p)&&!(r==="handoff"&&!v),W=async()=>{if($){k(null),q(!0);try{let Z={};if(r==="invoke")try{Z=JSON.parse(g||"{}")}catch{throw new Error("Input is not valid JSON.")}const F=await de("/agent/tasks",{method:"POST",body:JSON.stringify({as:n,playbook:r,objective:v||(E.target?`${E.label}: ${f}`:r==="invoke"?`Run ${p}`:E.label),...E.target?{target:f}:{},...r==="invoke"?{capability:p,args:Z}:{}})});Wl(`agent/${F.task.task_id}`)}catch(Z){k(Z)}finally{q(!1)}}};return s.jsxs(he,{title:"New task",children:[s.jsxs(ya,{label:"New task",submitLabel:"Start task",busy:A,onSubmit:()=>{W()},children:[s.jsx(Jt,{id:"task-playbook",label:"What",hint:E.help,value:r,onChange:h,options:cd.map(Z=>({value:Z.id,label:Z.label}))}),E.target&&s.jsx(qe,{id:"task-target",label:E.target,value:f,onChange:b,required:!0,spellcheck:"false"}),r==="invoke"&&s.jsxs(s.Fragment,{children:[s.jsx(Jt,{id:"task-capability",label:"Capability",value:p,onChange:j,required:!0,options:[{value:"",label:"Choose a capability"},...u.map(Z=>({value:Z.name,label:`${Z.name}: ${Z.effect==="consequential"?"needs approval":"observation"}${Z.allowed?"":" (not permitted for this identity)"}`,disabled:!Z.allowed}))]}),s.jsx(qe,{id:"task-args",label:"Input (JSON)",multiline:!0,rows:3,value:g,onChange:x,spellcheck:"false"})]}),s.jsx(qe,{id:"task-objective",label:"Objective",value:v,onChange:m,required:r==="handoff",placeholder:r==="handoff"?"Describe the work for the coding agent":"Optional"})]}),z?s.jsx($e,{title:"Not started",error:z}):null]})}const eS=n=>({failed:"Failed",interrupted:"Outcome unknown",executing:"Running",approved:"Approved, starting"})[n]??n;function fg({as:n,development:u,handoffId:o}){const[r,h]=C.useState(null);return u?r?s.jsxs("ol",{className:"feltkit-stack",children:[s.jsxs("li",{className:"feltkit-stack",children:[s.jsxs("p",{className:"feltkit-small",children:["In a terminal in this project, add this app to Claude Code. The token is shown once, lasts 7 days, and acts with ",n,"'s roles:"]}),s.jsx(ys,{text:r.claudeCode,label:"Add this app to Claude Code"})]}),s.jsxs("li",{className:"feltkit-stack",children:[s.jsxs("p",{className:"feltkit-small",children:["Start ",s.jsx("code",{children:"claude"})," in the project and ask:"]}),s.jsx(ys,{text:r.prompt,label:"What to ask the coding agent"})]}),s.jsx("li",{children:s.jsxs("p",{className:"feltkit-muted feltkit-small",children:["Another MCP client: endpoint ",s.jsx("code",{children:r.mcpUrl})," with the header ",s.jsx("code",{children:"Authorization: Bearer …"})," from the command above. Its progress, proposals waiting for approval, and summary appear on the task here."]})})]}):s.jsx("div",{children:s.jsx(Le,{label:"Connect a coding agent",variant:"primary",size:"md",disabled:!n,action:()=>de("/agent/connect",{method:"POST",body:JSON.stringify({as:n,...o?{handoffId:o}:{}})}),done:h})}):s.jsxs("p",{className:"feltkit-small",children:["Give the agent a session with ",s.jsx("code",{children:"npx feltkit session create --env production --type agent --id coding-agent --role <role>"}),", add this app's ",s.jsx("code",{children:"/mcp"})," endpoint to it with that token, and ask it to claim the handoff."]})}function tS({taskId:n,as:u,development:o,canAct:r,actor:h,version:f,handoff:b}){const[v,m]=C.useState({}),[p,j]=C.useState(0),g=st(()=>de(`/agent/tasks/${encodeURIComponent(n)}${o&&u?`?as=${encodeURIComponent(u)}`:""}`),[n,f,p,u]),[x,A]=C.useState(""),q=()=>j(B=>B+1),z=(B,ue={})=>()=>de(`/agent/tasks/${encodeURIComponent(n)}/${B}`,{method:"POST",body:JSON.stringify(o?{as:u,...ue}:ue)});if(g.error&&!g.data)return s.jsx($e,{title:"This task could not be read",error:g.error,retry:g.reload});if(!g.data)return s.jsx(Ht,{what:"the task"});const{task:k,checkpoints:E,execution:$,pending:W,actions:Z=[],approval:F={}}=g.data,re=Z.filter(B=>B.state==="failed"||B.state==="interrupted"||B.state==="executing"||B.state==="approved"),ee=k.status!=="completed"&&k.status!=="cancelled";return s.jsxs(s.Fragment,{children:[s.jsxs(he,{title:s.jsxs(s.Fragment,{children:[k.objective," ",s.jsx(ht,{field:"feltkit.agent.task",value:k.status})]}),action:s.jsx("code",{children:k.owner}),children:[s.jsx($l,{items:[{label:"FeltDB execution",value:$?`${$.agentRef} · ${$.status}${$.error?` · ${$.error}`:""}`:null,mono:!0},{label:"Task",value:k.task_id,mono:!0,hint:`checkpoint v${k.checkpoint_version}`}]}),r&&ee&&g.data.playbook==="decide"&&Z.every(B=>!["proposed","approved","executing","interrupted"].includes(B.state))&&s.jsxs("div",{className:"feltkit-actions",children:[s.jsx(Le,{label:"Ask the model again",size:"md",action:z("decide"),done:q}),s.jsx("span",{className:"feltkit-muted feltkit-small",children:"Uses this environment's model (Models). The answer is a new proposal."})]}),b&&s.jsxs("div",{className:"feltkit-stack",children:[s.jsx(lt,{tone:"attention",title:"Waiting for a coding agent",children:"Nothing works on this task until one claims it."}),s.jsx(fg,{as:u,development:o,handoffId:b.handoffId})]}),o&&ee&&s.jsxs("div",{className:"feltkit-inline",children:[s.jsx(qe,{id:"task-summary",label:"Summary of what was done",value:x,onChange:A}),s.jsx(Le,{label:"Complete task",variant:"primary",size:"md",disabled:W.length>0,action:z("complete",{summary:x}),done:q}),s.jsx(Le,{label:"Cancel task",size:"md",variant:"ghost",action:z("cancel",{reason:"cancelled from Studio"}),done:q,confirm:{title:"Cancel this task?",consequences:["Nothing more runs for it.",W.length?`${W.length} proposal(s) waiting for approval are not performed.`:"Its checkpoints stay as the record of what was done."],confirmLabel:"Cancel task"}})]})]}),W.map(B=>s.jsxs(he,{title:s.jsxs(s.Fragment,{children:["Waiting for approval ",s.jsx("code",{children:B.capability})]}),action:s.jsxs("span",{className:"feltkit-muted feltkit-small",children:["proposed by ",B.proposedBy]}),children:[s.jsx("p",{children:B.reason}),B.decision&&s.jsxs("p",{className:"feltkit-small",children:["Chosen by the model ",s.jsx("code",{children:`${B.decision.provider}${B.decision.model?` / ${B.decision.model}`:""}`})," (",B.decision.runtime,") among the options the owner may take. A choice is a proposal, not evidence."]}),s.jsx(pn,{value:B.input,label:"Proposed input"}),s.jsxs("p",{className:"feltkit-muted feltkit-small",children:["Runs as ",s.jsx("code",{children:k.owner}),", through ",B.source==="application"?"the application's AppPort dispatch":"AppPort Services",". You must be permitted to perform it yourself to approve it."]}),r&&s.jsxs("div",{className:"feltkit-actions",children:[F[B.actionId]?.allowed?s.jsx(Le,{label:`Approve as ${h}`,variant:"primary",size:"md",action:z("approve",{actionId:B.actionId,...B.inputDigest?{inputDigest:B.inputDigest}:{}}),done:q}):s.jsxs("span",{className:"feltkit-muted feltkit-small","data-approval-refused":!0,children:[h," cannot approve this: ",F[B.actionId]?.reason??"no approval decision was returned","."]}),(F[B.actionId]?.allowed||!/lacks feltkit\.agent\.write|only a person/.test(F[B.actionId]?.reason??""))&&s.jsx(Le,{label:"Reject",size:"md",action:z("reject",{actionId:B.actionId,reason:"rejected in Studio"}),done:q})]})]},B.actionId)),re.map(B=>s.jsxs(he,{title:s.jsxs(s.Fragment,{children:[eS(B.state)," ",s.jsx("code",{children:B.capability})," ",s.jsx(ht,{field:"feltkit.agent.action",value:B.state})]}),action:s.jsxs("span",{className:"feltkit-muted feltkit-small",children:["attempt ",B.attempt," · approved by ",B.decidedBy??"—"]}),children:[s.jsx("p",{children:B.reason}),B.outcome?.error?s.jsx($e,{title:B.outcome.error.code,error:{message:B.outcome.error.message}}):null,B.interruption?s.jsxs(lt,{tone:"attention",title:"The outcome is unknown",children:[String(B.interruption).replace(/\.?$/,".")," Check the effect before settling it; it is never replayed automatically."]}):null,r&&B.state==="failed"&&ee&&s.jsx(Le,{label:"Retry (needs approval again)",size:"md",action:z("retry",{actionId:B.actionId}),done:q}),r&&B.state==="interrupted"&&s.jsxs("div",{className:"feltkit-inline",children:[s.jsx(qe,{id:`settle-${B.actionId}`,label:"What you checked (recorded with your name)",value:v[B.actionId]??"",onChange:ue=>m(J=>({...J,[B.actionId]:ue}))}),s.jsx(Le,{label:"It succeeded",size:"md",disabled:(v[B.actionId]??"").trim().length<3,action:z("resolve",{actionId:B.actionId,outcome:"succeeded",note:v[B.actionId]}),done:q}),s.jsx(Le,{label:"It did not take effect",size:"md",disabled:(v[B.actionId]??"").trim().length<3,action:z("resolve",{actionId:B.actionId,outcome:"failed",note:v[B.actionId]}),done:q})]})]},B.actionId)),s.jsx(he,{title:"Checkpoints",children:s.jsx(lu,{label:"Checkpoints",emptyTitle:"No checkpoints yet",items:E.slice().reverse().map(B=>({id:String(B.version),at:B.created_at,actor:B.actor,summary:s.jsxs(s.Fragment,{children:[s.jsxs("strong",{children:["v",B.version]})," ",B.summary]}),status:s.jsx(ht,{field:"feltkit.agent.task",value:B.status}),detail:s.jsxs("div",{className:"feltkit-stack",children:[B.completed.length>0&&s.jsx("ul",{className:"feltkit-schema","aria-label":`Done in v${B.version}`,children:B.completed.map((ue,J)=>s.jsx("li",{children:s.jsx("code",{children:ue})},J))}),B.decisions.length>0&&B.version===E.length&&s.jsxs("details",{className:"feltkit-details",children:[s.jsxs("summary",{children:["Decisions (",B.decisions.length,")"]}),s.jsx("ul",{children:B.decisions.map((ue,J)=>s.jsx("li",{children:ue},J))})]}),B.evidence.filter(ue=>ue.checkpoint_version===B.version).map((ue,J)=>s.jsxs("div",{className:"feltkit-row",children:[s.jsx("span",{children:"Evidence:"}),ue.kind==="record"?s.jsx("a",{href:`#/activity/${ue.id}`,children:s.jsxs("code",{children:[ue.collection,"/",ue.id]})}):s.jsx("code",{children:ue.uri}),ue.verified?s.jsx(xy,{state:"verified",checks:["record verified at commit"]}):s.jsx(xy,{state:"not_verified"})]},J))]})}))})})]})}const Ny="SmolLM2-360M-Instruct-q4f32_1-MLC";async function lS(){const n=navigator.gpu;if(!n)return{ok:!1,detail:"This browser does not expose WebGPU (navigator.gpu)."};try{const u=await n.requestAdapter();if(!u)return{ok:!1,detail:"This browser exposes WebGPU but offers no adapter."};const o=u.info;return{ok:!0,detail:[o?.vendor,o?.description].filter(Boolean).join(" · ")||"an adapter is available"}}catch(u){return{ok:!1,detail:String(u)}}}function aS({development:n}){const[u,o]=C.useState(null),[r,h]=C.useState(null),[f,b]=C.useState("disabled"),[v,m]=C.useState(""),[p,j]=C.useState(null),[g,x]=C.useState(null);C.useEffect(()=>{let E=!0;return(async()=>{const[$,W]=await Promise.all([de("/models/browser-inference"),lS()]);E&&(o($),h(W),b(W.ok?$.enabled?"enabled":"disabled":"unsupported"))})().catch($=>E&&(x($),b("failed"))),()=>{E=!1}},[]);const A=async E=>{x(null),b(E?"enabling":"disabled");try{const $=await de("/models/browser-inference",{method:"POST",body:JSON.stringify({enabled:E})});o($),b($.enabled?"enabled":"disabled"),$.enabled||(j(null),m(""))}catch($){x($),b("failed")}},q=async()=>{if(u){x(null),j(null),b("loading");try{const W=await(await(await import(u.module)).CreateMLCEngine(Ny,{initProgressCallback:Z=>m(Z.text??(Z.progress!==void 0?`${Math.round(Z.progress*100)}%`:""))})).chat.completions.create({messages:[{role:"user",content:"Reply with the single word: ready"}],max_tokens:8});j(W.choices?.[0]?.message?.content??""),b("ready")}catch(E){x(E),b("failed")}}},z=f==="ready"?"positive":f==="failed"?"critical":f==="unsupported"?"neutral":f==="enabling"||f==="loading"?"progress":"attention",k={unsupported:"WebGPU is not available in this browser",disabled:"Not enabled for this environment",enabling:"Enabling…",enabled:"Enabled; the model is not loaded",loading:"Loading the model in this browser…",ready:"A model is running in this browser",failed:"Something refused"};return s.jsxs(he,{title:"Run a model in this browser",children:[s.jsxs("p",{className:"feltkit-muted feltkit-small",children:["A small model runs on this device through WebGPU: no API key, no account, and no prompt leaves the browser. It is"," ",s.jsx("strong",{children:"not"})," the agent's model — the agent decides on the server, and this is not available to it."]}),s.jsx(Ve,{tone:z,label:k[f]}),r&&s.jsx($l,{items:[{label:"WebGPU",value:r.ok?`available · ${r.detail}`:`unavailable · ${r.detail}`},{label:"Model",value:Ny},...u?.at?[{label:u.enabled?"Enabled":"Changed",value:`${new Date(u.at).toLocaleString()}${u.by?` by ${u.by}`:""}`}]:[]]}),f==="unsupported"&&s.jsxs(lt,{tone:"info",title:"This browser cannot run a model",children:[r?.detail," Chrome and Edge on a machine with a GPU expose WebGPU; a headless browser and most continuous-integration runners do not. Nothing has been changed, and the Content-Security-Policy is untouched."]}),f==="disabled"&&r?.ok&&s.jsxs(lt,{tone:"info",title:"What enabling this changes",children:[s.jsxs("p",{children:["Studio's Content-Security-Policy gains WebAssembly compilation (",s.jsx("code",{children:"'wasm-unsafe-eval'"}),"), a blob worker, and network access to the hosts the weights come from. Nothing else changes, it applies to this environment only, and turning it off restores the original policy exactly."]}),u&&s.jsx(pn,{value:u.hosts,label:"Hosts this allows"})]}),s.jsxs("div",{className:"feltkit-row",children:[r?.ok&&!u?.enabled&&s.jsx(ze,{label:"Enable browser inference",onClick:()=>{A(!0)},disabled:!n||f==="enabling",variant:"primary"}),u?.enabled&&s.jsxs(s.Fragment,{children:[s.jsx(ze,{label:f==="ready"?"Run again":"Load and test the model",onClick:()=>{q()},disabled:f==="loading",variant:"primary"}),s.jsx(ze,{label:"Disable",onClick:()=>{A(!1)},disabled:f==="loading"})]})]}),f==="loading"&&s.jsx("p",{className:"feltkit-muted feltkit-small",children:v||"Starting…"}),f==="ready"&&s.jsx(pn,{value:p,label:"The model answered, in this browser"}),g!=null&&s.jsx($e,{title:"Browser inference",error:g}),!n&&s.jsx("p",{className:"feltkit-muted feltkit-small",children:"Turning this on or off is a development-environment action."})]})}function nS(){const{version:n}=gl(),[u,o]=C.useState(0),r=st(()=>de("/models"),[n,u]),h=st(()=>de("/overview"),[n]),{development:f,canAct:b}=su(h.data),[v,m]=C.useState(null),[p,j]=C.useState(!1),g=s.jsx(nl,{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."});if(r.error&&!r.data)return s.jsxs("div",{className:"feltkit-page",children:[g,s.jsx($e,{title:"Models could not be read",error:r.error,retry:r.reload})]});if(!r.data)return s.jsxs("div",{className:"feltkit-page",children:[g,s.jsx(Ht,{what:"models"})]});const{status:x,catalog:A,intelligence:q,saved:z}=r.data,k=async()=>{j(!0),m(null);try{m(await de("/models/test",{method:"POST",body:"{}"}))}catch($){m({ok:!1,error:{message:$.message,code:$.code}})}finally{j(!1)}},E=["binary","choice","score","batch","probability_distribution"];return s.jsxs("div",{className:"feltkit-page",children:[g,s.jsxs(he,{title:s.jsxs(s.Fragment,{children:["Decision model ",s.jsx(ht,{field:"feltkit.model.ready",value:!!x.ready})]}),action:b?s.jsx(ze,{label:"Test the model",busy:p,disabled:!x.ready,onClick:()=>{k()}}):null,children:[s.jsx($l,{items:[{label:"Source",value:x.source==="application"?"Application code (agent.decisions)":x.source==="resolver"?`Resolver ${x.reference?.ref??""}${x.reference?.revision!=null?` at revision ${x.reference.revision}`:""}: change it in Resolver, not here`:x.source==="intelligence"?"AppPort Services Intelligence (this environment)":"None"},{label:"Provider",value:x.provider?`${x.provider}${x.protocol?` · ${x.protocol}`:""}`:null,mono:!0},{label:"Model",value:x.model??null,mono:!0},{label:"Endpoint",value:x.endpoint??null,mono:!0},{label:"API key",value:x.credential.ref?s.jsxs(s.Fragment,{children:[s.jsx("code",{children:x.credential.ref})," ",s.jsx(mu,{credential:x.credential})]}):x.credential.required?s.jsx(Ve,{tone:"critical",label:"Required, none entered"}):"none needed"},{label:"Runtime",value:x.runtime?`${x.runtime.metadata.runtime} (${x.runtime.metadata.execution_method})`:null,mono:!0},{label:"Can decide",value:x.runtime?s.jsx("span",{className:"feltkit-choices",children:E.map($=>s.jsx(Ve,{tone:x.runtime.capabilities[$]?"positive":"neutral",label:$.replace("_"," "),detail:x.runtime.capabilities[$]?void 0:"no"},$))}):null}]}),x.problems.map($=>s.jsx(lt,{tone:"critical",title:$.message,children:$.fix},$.problem)),v&&(v.ok?s.jsx(lt,{tone:"info",title:`The model answered in ${v.durationMs} ms (${v.provider}, ${v.runtime.runtime})`,children:s.jsx(pn,{value:v.result,label:"Model answer"})}):s.jsx($e,{title:"The model did not answer",error:{message:`${v.error.message}${v.error.hint?` ${v.error.hint}`:""}`,code:v.error.code}}))]}),q&&z.length>0&&s.jsx(iS,{saved:z,development:f,overview:h.data,onChanged:()=>(m(null),o($=>$+1))}),s.jsx(aS,{development:f}),f&&q&&s.jsx(sS,{catalog:A,current:x,overview:h.data,onSaved:()=>o($=>$+1)}),!f&&s.jsxs(lt,{tone:"info",title:"Production models are set on the host",children:["Select one with ",s.jsx("code",{children:"feltkit model set --env production"}),". Keys live in the host's environment as ",s.jsx("code",{children:"FELTKIT_CREDENTIAL_<ID>"})," (or in a vault the operator opted in to with"," ",s.jsx("code",{children:"FELTKIT_CREDENTIAL_VAULT=1"}),")."]}),!q&&s.jsxs(lt,{tone:"info",title:"The Intelligence service is not enabled",children:["Add ",s.jsx("code",{children:"intelligence: true"})," to ",s.jsx("code",{children:"services"})," in ",s.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. Or pass"," ",s.jsx("code",{children:"agent.decisions"}),"."]})]})}function iS({saved:n,development:u,overview:o,onChanged:r}){const[h,f,b]=Cd(o);return s.jsxs(he,{title:"Saved models",action:u?s.jsx(xs,{id:"saved-models-as",as:h,setAs:f,devUsers:b,label:"Switch as"}):null,children:[s.jsx("p",{className:"feltkit-muted feltkit-small",children:"The agent decides with the model in use. Keep others here to switch between providers and models; each keeps its own API key reference."}),s.jsx(Ot,{label:"Saved models",columns:[{id:"provider",header:"Provider"},{id:"model",header:"Model"},{id:"endpoint",header:"Endpoint"},{id:"key",header:"API key"},{id:"actions",header:"Actions"}],rows:n.map(v=>({key:v.id,selected:!!v.active,cells:{provider:s.jsx("code",{children:v.provider}),model:s.jsxs("span",{className:"feltkit-row",children:[s.jsx("code",{children:v.model})," ",v.active&&s.jsx(Ve,{tone:"positive",label:"In use"})]}),endpoint:v.endpoint?s.jsx("code",{children:v.endpoint}):"default",key:v.credentialRef?s.jsx("code",{children:v.credentialRef}):"none",actions:u&&!v.active?s.jsxs("span",{className:"feltkit-actions",children:[s.jsx(Le,{label:"Use",variant:"primary",action:()=>de(`/models/saved/${v.id}/use`,{method:"POST",body:JSON.stringify({as:h})}),done:r}),s.jsx(Le,{label:"Forget",action:()=>de(`/models/saved/${v.id}`,{method:"DELETE"}),done:r,confirm:{title:`Forget ${v.provider} / ${v.model}?`,consequences:["The saved selection is removed from this environment's configuration.","Its API key stays in custody under its reference."],confirmLabel:"Forget model"}})]}):null}}))})]})}function sS({catalog:n,current:u,overview:o,onSaved:r}){const[h,f]=C.useState(u.provider??n[0]?.id??""),b=n.find(P=>P.id===h),[v,m]=C.useState(u.model??""),[p,j]=C.useState(u.endpoint??""),[g,x]=C.useState(u.credential?.ref??""),[A,q]=C.useState(""),[z,k]=C.useState(!1),[E,$]=C.useState(null),[W,Z]=C.useState(null),[F,re]=C.useState(null),[ee,B,ue]=Cd(o),J=b?b.credential!=="none":!1,_e=`credential-ref:${h}`,Be=g.trim()||_e,mt=u.credential?.ref===Be?u.credential:null;C.useEffect(()=>{b&&b.modelSelection==="catalog"&&!b.models.includes(v)&&m(b.models[0]??"")},[h]);const gt=P=>{if(js(P)){q(P.trim()),x(""),k(!0);return}x(P)},Xe=async P=>{$(null),Z(null),re(P?"use":"later");const ne=A;q(""),k(!1);try{const je=J?Be:g.trim(),ke={provider:h,model:v,...b?.customEndpoint&&p?{endpoint:p}:{},...je&&(ne||b?.credential==="required"||g.trim())?{credentialRef:je}:{},...ne?{apiKey:ne}:{},...ee?{as:ee}:{},...P?{}:{activate:!1}},ct=await de("/models",{method:"POST",body:JSON.stringify(ke)});Z({...ct.stored??{},activate:P}),r()}catch(je){$(je)}finally{re(null)}},Y=!!(h&&v)&&F===null;return s.jsxs(he,{title:"Add a model (development)",children:[s.jsxs("div",{className:"feltkit-grid",children:[s.jsx(Jt,{id:"model-provider",label:"Provider",value:h,onChange:f,options:n.map(P=>({value:P.id,label:`${P.displayName} (${P.protocol}${P.credential==="required"?", needs an API key":P.credential==="optional"?", API key optional":""})`}))}),b?.modelSelection==="catalog"?s.jsx(Jt,{id:"model-model",label:"Model",value:v,onChange:m,options:b.models}):s.jsx(qe,{id:"model-model",label:"Model",value:v,onChange:m,placeholder:b?.models[0]??"model id",spellcheck:"false",hint:"Required."}),b?.customEndpoint&&s.jsx(qe,{id:"model-endpoint",label:"Endpoint",type:"url",value:p,onChange:j,placeholder:b.endpoints[0]??"http://localhost:11434/v1"}),J&&s.jsx(qe,{id:"model-key",label:`API key${b?.credential==="optional"?" (optional)":""}`,type:"password",autocomplete:"off",spellcheck:"false",value:A,onChange:q,placeholder:mt?.present?"Set: leave empty to keep it":"Paste your API key",hint:mt?.present?"A key is set. Type a new one to replace it.":void 0}),s.jsx(xs,{id:"model-as",as:ee,setAs:B,devUsers:ue,label:"Save as"})]}),z&&s.jsx(lt,{tone:"info",title:"This looks like an API key",children:"It moved to the key field: it will be stored securely, not in configuration."}),J&&s.jsxs("p",{className:"feltkit-muted feltkit-small",children:["The key is stored on the server in this environment's custody (",u.credential?.location&&u.credential.source!=="environment"?u.credential.location:"the local encrypted vault","), outside FeltDB, and never shown again. An environment variable ",s.jsx("code",{children:cS(Be)})," overrides it.",mt?.present?s.jsxs(s.Fragment,{children:[" ","Currently: ",s.jsx(mu,{credential:mt})]}):null]}),s.jsxs("details",{className:"feltkit-details",children:[s.jsx("summary",{children:"Advanced: credential reference"}),s.jsx(qe,{id:"model-reference",label:"Credential reference",hint:`A name for where the key is kept, such as credential-ref:openai, never the key itself. Configuration stores only this name. Default ${_e}.`,value:g,onChange:gt,placeholder:_e,spellcheck:"false"})]}),s.jsxs("div",{className:"feltkit-actions",children:[s.jsx(ze,{variant:"primary",label:"Save and use",busy:F==="use",disabled:!Y,onClick:()=>{Xe(!0)}}),s.jsx(ze,{label:"Save for later",busy:F==="later",disabled:!Y,onClick:()=>{Xe(!1)}})]}),E?s.jsx($e,{title:"Not saved",error:E}):null,W&&s.jsxs(lt,{tone:"info",title:W.activate?"Saved and in use":"Saved for later",children:[W.activate?"Use Test the model above to call it.":"Switch to it under Saved models.",W.version?` API key: set (${W.location??"custody"}, version ${W.version}).`:""]})]})}function cS(n){return`FELTKIT_CREDENTIAL_${n.replace(/^credential-ref:/,"").replace(/[^A-Za-z0-9]/g,"_").toUpperCase()}`}const uS=["GET","POST","PUT","PATCH","DELETE"],rS=["string","number","integer","boolean","unknown"],Ty=n=>n.map(u=>`${u.name}${u.required?"":"?"}${u.type==="string"?"":`:${u.type}`}`).join(", ");function oS(n){return n.split(",").map(u=>u.trim()).filter(Boolean).map(u=>{const[o="",r="string"]=u.split(":").map(f=>f.trim()),h=rS.includes(r)?r:"string";return{name:o.replace(/\?$/,""),type:h,required:!o.endsWith("?")}})}const dS=n=>{const o=[...n.path.matchAll(/\{([^}]+)\}/g)].map(r=>r[1]).filter(r=>!n.input.some(h=>h.name===r));return o.length?{...n,input:[...o.map(r=>({name:r,type:"string",required:!0})),...n.input]}:n},Ey=n=>n.toLowerCase().replace(/[^a-z0-9]+/g,"").replace(/^[0-9]+/,"")||"op";function fS({overview:n,existing:u,onConnected:o,onClose:r}){const h=Object.keys(n?.roles??{}),[f,b,v]=Cd(n),[m,p]=C.useState("openapi"),[j,g]=C.useState(""),[x,A]=C.useState(""),[q,z]=C.useState(""),[k,E]=C.useState(""),[$,W]=C.useState(""),[Z,F]=C.useState("bearer"),[re,ee]=C.useState("X-API-Key"),[B,ue]=C.useState(""),[J,_e]=C.useState([]),[Be,mt]=C.useState(h.filter(V=>V==="member"||V==="admin")),[gt,Xe]=C.useState(null),[Y,P]=C.useState(null),[ne,je]=C.useState(null),ke=async()=>{P(null),Xe("read");try{const V=await de("/integrations/openapi",{method:"POST",body:JSON.stringify(j.trim()?{url:j.trim()}:{document:x})});z(V.name),E(V.description??V.title??""),W(V.baseUrl??""),_e(V.operations.map(K=>({...K,include:!0})))}catch(V){P(V)}finally{Xe(null)}},ct=()=>_e([...J,{include:!0,name:"",method:"GET",path:"/",access:`${q||"api"}.read`,input:[]}]),ut=(V,K)=>_e(J.map((ce,be)=>{if(be!==V)return ce;const Ae={...ce,...K},ae=q||"api";return K.method&&ce.access===`${ae}.${ce.method==="GET"?"read":"write"}`&&(Ae.access=`${ae}.${K.method==="GET"?"read":"write"}`),Ae})),Al=V=>{const K=V.toLowerCase().replace(/[^a-z0-9]/g,""),ce=`${q||"api"}.`;_e(J.map(be=>be.access.startsWith(ce)?{...be,access:`${K||"api"}.${be.access.slice(ce.length)}`}:be)),z(K)},T=J.filter(V=>V.include),G=async()=>{P(null),Xe("connect");const V=B;ue("");try{const K={name:q,...k.trim()?{description:k.trim()}:{},baseUrl:$.trim(),auth:Z==="header"?{kind:"header",header:re}:{kind:Z},operations:T.map(({include:be,...Ae})=>{const ae=dS({...Ae,include:!0}),{include:Q,...ve}=ae;return{...ve,name:Ey(ve.name),effect:ve.method==="GET"?"observation":"consequential"}})},ce=await de("/integrations/connect",{method:"POST",body:JSON.stringify({integration:K,roles:Be,...V?{apiKey:V,as:f}:{}})});je(ce),o()}catch(K){P(K)}finally{Xe(null)}};return ne?s.jsxs(he,{title:`Connected ${q}`,children:[s.jsxs(lt,{tone:"info",title:`Wrote ${ne.file}`,children:[ne.granted.length?s.jsxs(s.Fragment,{children:["Granted ",s.jsxs("code",{children:[q,".*"]})," to ",ne.granted.join(", ")," in ",s.jsx("code",{children:"feltkit/app.ts"}),"."," "]}):null,"The server reloads and publishes its operations below as capabilities.",ne.stored?` The API key is stored (version ${ne.stored.version}) and is never shown again.`:""]}),ne.skipped.length>0&&s.jsxs("p",{className:"feltkit-small",children:["Not granted to ",ne.skipped.join(", "),": add ",s.jsxs("code",{children:['"',q,'.*"']})," to their permissions in ",s.jsx("code",{children:"feltkit/app.ts"}),"."]}),s.jsxs("ul",{className:"feltkit-small",children:[s.jsxs("li",{children:["Narrow each operation's ",s.jsx("code",{children:"output"})," in ",s.jsx("code",{children:ne.file})," to what the API returns: AppPort checks every response against it."]}),s.jsxs("li",{children:["For consequential operations, add ",s.jsx("code",{children:"idempotencyHeader"})," if the API deduplicates, and ",s.jsx("code",{children:"verify"})," so an unknown outcome can be settled without resending."]}),s.jsxs("li",{children:["In production set ",s.jsxs("code",{children:[q.toUpperCase(),"_URL"]}),ne.credential?s.jsxs(s.Fragment,{children:[" ","and ",s.jsxs("code",{children:["FELTKIT_CREDENTIAL_",q.toUpperCase()]})]}):null," ","on the host."]})]}),s.jsxs("div",{className:"feltkit-actions",children:[s.jsx(ze,{variant:"primary",label:"Done",onClick:r}),s.jsx(ze,{label:"Connect another",onClick:()=>(je(null),_e([]),z(""),g(""),A(""))})]})]}):s.jsxs(he,{title:"Connect an API",children:[s.jsxs("p",{className:"feltkit-small",children:["Connect a service your app calls: each operation becomes an AppPort capability your functions, agents and other apps can use, with its permission, effect, and every call recorded. This writes ",s.jsx("code",{children:"feltkit/<name>.ts"}),", which you own and can edit."]}),s.jsx(Jy,{label:"How to describe the API",idPrefix:"connect",panelId:"connect-panel",active:m,onSelect:V=>{p(V),V==="manual"&&J.length===0&&ct()},tabs:[{id:"openapi",label:"From an OpenAPI document"},{id:"manual",label:"Describe it yourself"}]}),s.jsx(Fy,{id:"connect-panel",idPrefix:"connect",active:m,children:s.jsxs("div",{className:"feltkit-stack",children:[m==="openapi"&&s.jsxs(s.Fragment,{children:[s.jsx(qe,{id:"connect-url",label:"Document URL",type:"url",value:j,onChange:g,placeholder:"https://api.example.com/openapi.json"}),s.jsx(qe,{id:"connect-pasted",label:"Or paste it (JSON)",multiline:!0,rows:4,value:x,onChange:A,placeholder:'{"openapi": "3.0.0", "paths": { … }}',spellcheck:"false"}),s.jsx("div",{children:s.jsx(ze,{variant:"primary",label:"Read operations",busy:gt==="read",disabled:gt!==null||!j.trim()&&!x.trim(),onClick:()=>{ke()}})})]}),Y?s.jsx($e,{title:"Not connected",error:Y}):null,(J.length>0||m==="manual")&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"feltkit-grid",children:[s.jsx(qe,{id:"connect-name",label:"Name",required:!0,value:q,onChange:Al,placeholder:"crm",spellcheck:"false",hint:u.includes(q)?void 0:`Capabilities are ${q||"<name>"}.<operation>.`,error:u.includes(q)?"Already connected: choose another name.":void 0}),s.jsx(qe,{id:"connect-base",label:"Base URL",required:!0,type:"url",value:$,onChange:W,placeholder:"https://api.example.com",hint:`Used in development; production reads ${q?`${q.toUpperCase()}_URL`:"<NAME>_URL"}.`}),s.jsx(qe,{id:"connect-description",label:"Description",value:k,onChange:E}),s.jsx(Jt,{id:"connect-auth",label:"API key",value:Z,onChange:V=>F(V),options:[{value:"bearer",label:"Sent as Authorization: Bearer"},{value:"header",label:"Sent in a header"},{value:"none",label:"No key"}]}),Z==="header"&&s.jsx(qe,{id:"connect-header",label:"Header",value:re,onChange:ee,spellcheck:"false"}),Z!=="none"&&s.jsx(qe,{id:"connect-key",label:"Key value (optional now)",type:"password",autocomplete:"off",spellcheck:"false",value:B,onChange:ue,placeholder:"Stored securely; never shown again",hint:B&&!js(B)&&B.length<8?"That looks short for a key.":void 0}),Z!=="none"&&B&&s.jsx(xs,{id:"connect-as",as:f,setAs:b,devUsers:v,label:"Store as"})]}),s.jsx("div",{className:"feltkit-stack",children:J.map((V,K)=>s.jsxs(vd,{legend:`Operation ${K+1}${V.name?`: ${V.name}`:""} · ${V.method==="GET"?"observation":"consequential"}`,hint:V.description,children:[s.jsx(tu,{id:`connect-op-${K}-include`,label:"Include this operation",checked:V.include,onChange:ce=>ut(K,{include:ce})}),s.jsxs("div",{className:"feltkit-grid",children:[s.jsx(qe,{id:`connect-op-${K}-name`,label:"Operation",value:V.name,onChange:ce=>ut(K,{name:Ey(ce)}),placeholder:"listcontacts",spellcheck:"false"}),s.jsx(Jt,{id:`connect-op-${K}-method`,label:"Method",value:V.method,onChange:ce=>ut(K,{method:ce}),options:[...uS]}),s.jsx(qe,{id:`connect-op-${K}-path`,label:"Path",value:V.path,onChange:ce=>ut(K,{path:ce}),spellcheck:"false"}),s.jsx(hS,{id:`connect-op-${K}-input`,initial:Ty(V.input),onDone:ce=>ut(K,{input:oS(ce)})},Ty(V.input)),s.jsx(qe,{id:`connect-op-${K}-access`,label:"Permission",value:V.access,onChange:ce=>ut(K,{access:ce}),spellcheck:"false"})]})]},K))}),s.jsxs("div",{className:"feltkit-actions",children:[s.jsx(ze,{size:"sm",label:"Add operation",onClick:ct}),s.jsx("span",{className:"feltkit-muted feltkit-small",children:"GET reads (observation); other methods may change the API (consequential). An unknown outcome is never re-sent."})]}),h.length>0&&s.jsx(vd,{legend:`Grant ${q||"<name>"}.* to`,children:s.jsx("div",{className:"feltkit-choices",children:h.map(V=>s.jsx(tu,{id:`connect-grant-${V}`,label:V,checked:Be.includes(V),onChange:K=>mt(K?[...Be,V]:Be.filter(ce=>ce!==V))},V))})}),s.jsxs("div",{className:"feltkit-actions",children:[s.jsx(ze,{variant:"primary",label:`Connect ${T.length} operation${T.length===1?"":"s"}`,busy:gt==="connect",disabled:gt!==null||!q||!$.trim()||T.length===0||u.includes(q),onClick:()=>{G()}}),q&&s.jsx(ps,{text:`feltkit/${q}.ts`,label:"Copy file path"})]})]})]})})]})}function hS({id:n,initial:u,onDone:o}){const[r,h]=C.useState(u);return s.jsx("div",{onBlur:()=>r!==u&&o(r),children:s.jsx(qe,{id:n,label:"Input (name?:type)",value:r,onChange:h,placeholder:"id, amount:number, note?",spellcheck:"false"})})}function mS(){const{version:n}=gl(),[u,o]=C.useState(0),r=st(()=>de("/integrations"),[n,u]),h=st(()=>de("/overview"),[n]),{development:f,canAct:b}=su(h.data),m=(h.data?.devUsers??[])[0]?.id??"",[p,j]=C.useState({}),[g,x]=C.useState(!1),A=r.data?.integrations??[],q=r.data?.calls??[],z=s.jsx(nl,{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.",actions:f&&A.length>0&&!g?s.jsx(ze,{variant:"primary",label:"Connect an API",onClick:()=>x(!0)}):null});return r.error&&!r.data?s.jsxs("div",{className:"feltkit-page",children:[z,s.jsx($e,{title:"Integrations could not be read",error:r.error,retry:r.reload})]}):r.data?s.jsxs("div",{className:"feltkit-page",children:[z,f&&(g||A.length===0)&&s.jsx(fS,{overview:h.data,existing:A.map(k=>k.name),onConnected:()=>(x(!0),o(k=>k+1)),onClose:()=>x(!1)}),A.length===0?!f&&s.jsxs(va,{title:"No integrations yet",children:["Connect an API in development (Studio → Integrations), or with ",s.jsxs("code",{children:['app.integration("payments", ',"{"," baseUrl, credential, operations ","}",")"]})," in ",s.jsx("code",{children:"feltkit/"}),"."]}):A.map(k=>s.jsxs(he,{title:s.jsxs(s.Fragment,{children:[s.jsx("code",{children:k.name})," ",s.jsx(ht,{field:"feltkit.integration.configured",value:k.problems.length===0})]}),action:b&&k.health?s.jsx(Le,{label:"Check",action:()=>de(`/integrations/${encodeURIComponent(k.name)}/check`,{method:"POST",body:"{}"}),done:E=>j($=>({...$,[k.name]:E}))}):null,children:[k.description&&s.jsx("p",{children:k.description}),s.jsxs("div",{className:"feltkit-row feltkit-small",children:[s.jsx("code",{children:k.baseUrl.value??"—"}),s.jsxs("span",{className:"feltkit-muted",children:["(",k.baseUrl.source,k.baseUrl.variable?` ${k.baseUrl.variable}`:"",")"]}),k.credential&&s.jsxs(s.Fragment,{children:[s.jsx("code",{children:k.credential.ref})," ",k.credential.kind==="oauth2"?s.jsx(vS,{credential:k.credential}):s.jsx(mu,{credential:k.credential}),b&&k.credential.kind==="oauth2"&&k.credential.writable&&s.jsx(yS,{integration:k.name,connected:k.credential.oauth?.state==="active",as:f?m:void 0}),b&&k.credential.kind!=="oauth2"&&k.credential.writable&&s.jsx(nu,{credentialRef:k.credential.ref,label:k.credential.present?"Replace key":"Set key",...f&&m?{as:m}:{},onSaved:()=>o(E=>E+1)}),!k.credential.writable&&!k.credential.present&&s.jsxs("span",{className:"feltkit-muted",children:["Set ",k.credential.variable," on the host."]})]})]}),k.problems.map((E,$)=>s.jsx(lt,{tone:"critical",title:E.message,children:E.fix},$)),p[k.name]&&s.jsx(lt,{tone:p[k.name].ok?"info":"critical",title:p[k.name].ok?"The API answered":"The check failed",children:p[k.name].message}),s.jsx(Ot,{label:`${k.name} operations`,columns:[{id:"capability",header:"Capability"},{id:"request",header:"Request"},{id:"effect",header:"Effect"},{id:"access",header:"Who may invoke"},{id:"repeat",header:"Repeat"},{id:"unknown",header:"Outcome unknown"}],rows:k.operations.map(E=>({key:E.capability,cells:{capability:s.jsx("code",{children:E.capability}),request:s.jsx("code",{children:`${E.method} ${E.path}`}),effect:E.effect,access:s.jsx("code",{children:E.access}),repeat:E.effect==="observation"?"safe":E.idempotent?"deduplicated by the API":"may duplicate",unknown:E.effect==="observation"?null:E.verifiable?"verify, never re-send":"a person settles it"}})),emptyTitle:"No operations declared"})]},k.name)),s.jsxs(he,{title:"Calls",children:[s.jsx(Ot,{label:"Integration calls",columns:[{id:"capability",header:"Capability"},{id:"state",header:"State"},{id:"known",header:"How known"},{id:"as",header:"As"},{id:"http",header:"HTTP",align:"end"},{id:"detail",header:"Detail"},{id:"when",header:"When"},{id:"actions",header:"Actions"}],rows:q.map(k=>({key:k.id,cells:{capability:s.jsx("code",{children:k.capability}),state:s.jsx(ht,{field:"feltkit.integration.call",value:k.state}),known:k.determinedBy?`${k.determinedBy}${k.verification?` (${k.verification.outcome})`:""}`:null,as:s.jsx("code",{children:k.principal.id}),http:k.status??null,detail:k.error?.message?s.jsx(Ve,{tone:"critical",label:k.error.code??"Error",detail:k.error.message}):null,when:wt(k.startedAt),actions:b&&(k.state==="unknown"||k.state==="started")?s.jsx(Le,{label:"Verify",disabled:f&&!m,action:()=>de(`/integrations/calls/${encodeURIComponent(k.id)}/verify`,{method:"POST",body:JSON.stringify(f?{as:m}:{})}),done:()=>o(E=>E+1)}):null}})),emptyTitle:"No calls yet"}),s.jsx("p",{className:"feltkit-muted feltkit-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."})]})]}):s.jsxs("div",{className:"feltkit-page",children:[z,s.jsx(Ht,{what:"integrations"})]})}function vS({credential:n}){const u=n.oauth;if(!u)return s.jsx(Ve,{tone:"attention",label:n.state==="revoked"?"Disconnected":"Not connected",attrs:{"data-grant":"missing"}});const o=[u.expiry==="known"?gS(u.expiresAt):"expiry not stated by the provider",u.renewable?"renewable":"not renewable",`${u.refreshes} renewal${u.refreshes===1?"":"s"}${u.refreshedAt?`, last ${wt(u.refreshedAt)}`:""}`,u.scope?`scope ${u.scope}`:null,u.failure?`last failure: ${u.failure.kind} (${u.failure.message})`:null].filter(Boolean).join(" · ");return u.state==="active"?s.jsx(Ve,{tone:u.failure?"attention":"positive",label:"Connected",detail:o,attrs:{"data-grant":"active"}}):s.jsx(Ve,{tone:"critical",label:"Reconnect needed",detail:o,attrs:{"data-grant":"reconnect_required"}})}function yS({integration:n,connected:u,as:o}){const[r,h]=C.useState(null),[f,b]=C.useState(null),v=async()=>{h(null);try{const m=await de(`/integrations/${encodeURIComponent(n)}/connect`,{method:"POST",body:JSON.stringify(o?{as:o}:{})});b(m.redirectUri),window.open(m.url,"_blank","noopener")}catch(m){h(m)}};return s.jsxs("span",{className:"feltkit-actions",children:[s.jsx(ze,{size:"sm",label:u?"Reconnect":"Connect",onClick:()=>{v()}}),f&&s.jsxs("span",{className:"feltkit-muted feltkit-small",role:"status",children:["Approve access in the window that opened; the provider returns to ",f,". Then refresh."]}),r?s.jsx($e,{title:"Not connected",error:r}):null]})}function gS(n){const u=Math.round((Date.parse(n)-Date.now())/1e3);return u<=0?`expired ${wt(n)} (renewed on the next call)`:u<3600?`expires in ${Math.ceil(u/60)}m`:`expires in ${Math.round(u/3600)}h`}const bS=["fail","warn","pass","external"];function pS(){const{version:n}=gl(),u=st(()=>de("/readiness"),[n]),o=s.jsx(nl,{title:"Readiness",subtitle:"Real checks of this environment, not a status anyone sets. A passing check means the checked thing is in place; the operational requirements at the end are yours to meet.",actions:s.jsx(ze,{label:"Check again",busy:u.loading&&!!u.data,onClick:u.reload})});if(u.error&&!u.data)return s.jsxs("div",{className:"feltkit-page",children:[o,s.jsx($e,{title:"Readiness could not be checked",error:u.error,retry:u.reload})]});if(!u.data)return s.jsxs("div",{className:"feltkit-page",children:[o,s.jsx(Ht,{what:"this environment's checks"})]});const r=u.data,h=[...new Set(r.checks.map(f=>f.area))];return s.jsxs("div",{className:"feltkit-page",children:[o,s.jsxs(he,{label:"Summary",children:[s.jsx("p",{children:s.jsx("strong",{children:r.summary})}),s.jsx("ul",{className:"feltkit-choices","aria-label":"Checks by result",children:bS.map(f=>s.jsx("li",{className:"feltkit-row",children:s.jsx(ht,{field:"feltkit.readiness.check",value:f,detail:String(r.counts[f]??0)})},f))}),s.jsxs("p",{className:"feltkit-muted feltkit-small",children:["The same report: ",s.jsxs("code",{children:["npx feltkit readiness --env ",r.environment.name]})]})]}),h.map(f=>s.jsx(he,{title:f,children:s.jsx("ul",{className:"feltkit-list",children:r.checks.filter(b=>b.area===f).map(b=>s.jsxs("li",{className:"feltkit-stack feltkit-check","data-check":b.id,children:[s.jsxs("span",{className:"feltkit-row",children:[s.jsx(ht,{field:"feltkit.readiness.check",value:b.status})," ",s.jsx("strong",{children:b.title})]}),s.jsx("span",{className:"feltkit-small",children:b.detail}),b.fix&&b.status!=="pass"&&s.jsxs("span",{className:"feltkit-small feltkit-muted",children:["Fix: ",b.fix]})]},b.id))})},f))]})}const xS=new Set(["service_effect_evidence","_feltkit_activity"]),hg=C.createContext({live:!1,version:0,changed:{},activity:[],overview:void 0,reloadOverview(){}}),gl=()=>C.useContext(hg),Od=[{id:"overview",label:"Overview",key:"1",group:"Application"},{id:"data",label:"Data",key:"2",group:"Application"},{id:"capabilities",label:"Capabilities",key:"3",group:"Application"},{id:"integrations",label:"Integrations",key:"i",group:"Application"},{id:"services",label:"Services",key:"4",group:"Services"},{id:"agent",label:"Agent",key:"5",group:"Operate"},{id:"models",label:"Models",key:"m",group:"Operate"},{id:"activity",label:"Activity",key:"6",group:"Operate"},{id:"readiness",label:"Readiness",key:"r",group:"Operate"},{id:"settings",label:"Settings",key:"7",group:"Development"},{id:"projects",label:"Projects",key:"8",group:"Development"}],mg=["settings","projects"];function Ay(){const n=location.hash.replace(/^#\/?/,"").split("/").filter(Boolean).map(decodeURIComponent);return{route:Od.find(o=>o.id===n[0])?.id??"overview",rest:n.slice(1)}}function Wl(n){location.hash=`#/${n}`}const wd="feltkit-main";function jS(){const[n,u]=C.useState("loading"),[o,r]=C.useState("");return C.useEffect(()=>{fetch("/api/session",{credentials:"same-origin"}).then(h=>h.json()).then(h=>{r(h?.environment?.name??""),u(h?.environment?.production?"production":"development")}).catch(()=>u("development"))},[]),n==="loading"?s.jsx("main",{className:"feltkit-gate",children:s.jsx(Ht,{what:"the runtime"})}):n==="production"?s.jsx(_S,{environment:o}):s.jsx(kS,{})}function SS(){const n=/(?:^|[#&])grant=([^&]+)/.exec(location.hash);if(!n)return null;history.replaceState(null,"",`${location.pathname}#/overview`);try{return decodeURIComponent(n[1])}catch{return null}}function _S({environment:n}){const[u,o]=C.useState("checking"),[r,h]=C.useState(null),[f,b]=C.useState(!1),[v]=C.useState(SS),m=j=>{j?.operator&&j?.csrf?(ad({csrf:j.csrf,environment:n}),o("signed-in")):(ad(null),o("signed-out"))},p=async j=>{h(null),b(!0);try{const g=await fetch("/_feltkit/api/operator/signin",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json","x-feltkit-environment":n},body:JSON.stringify({grant:j})}),x=await g.json();if(!g.ok)throw new Error(x?.error?.message??`Sign-in failed (${g.status})`);m(x)}catch(g){h(`${g.message}${v===j?" The link works once and expires after 10 minutes: run `npx feltkit manage` for a new one.":""}`),o("signed-out")}finally{b(!1)}};return C.useEffect(()=>{v?p(v):de("/operator/session").then(m,()=>o("signed-out"))},[]),u==="checking"?s.jsx("main",{className:"feltkit-gate",children:s.jsx(Ht,{what:v?"your sign-in":"your operator session"})}):u==="signed-in"?s.jsx(yg,{onSignOut:()=>{de("/operator/signout",{method:"POST",body:"{}"}).catch(()=>{}).finally(()=>(ad(null),o("signed-out")))}}):s.jsxs(vg,{title:`Sign in to ${n} Studio`,field:{id:"operator-grant",label:"Operator grant",placeholder:"fkg1.…"},submitLabel:"Sign in",busy:f,error:r,onSubmit:j=>{p(j)},children:["Production Studio is for operators. In your project folder, run ",s.jsx("code",{children:"npx feltkit manage"})," and open the one-time link it prints, or paste the grant from"," ",s.jsx("code",{children:"npx feltkit operator grant --id <you> --role <role>"}),". Everything you do is authorized and recorded as you."]})}function kS(){const[n,u]=C.useState(()=>{const h=_0();return ld(h),h}),[o,r]=C.useState(!1);return n?s.jsx(yg,{onSignOut:h=>(ld(null),hy(null),r(!!h),u(null))}):s.jsxs(vg,{title:"Open the FeltKit dashboard",field:{id:"admin-token",label:"Admin token",placeholder:"fka_…"},submitLabel:"Continue",error:o?"That admin token was not accepted. Delete .feltkit/<env>/admin-token to generate a new one.":null,onSubmit:h=>(ld(h),hy(h),r(!1),u(h)),children:["Open the ",s.jsx("strong",{children:"Dashboard"})," link ",s.jsx("code",{children:"feltkit dev"})," prints (it carries the token), or paste the token from ",s.jsx("code",{children:".feltkit/development/admin-token"}),"."]})}function vg({title:n,field:u,submitLabel:o,busy:r,error:h,onSubmit:f,children:b}){const[v,m]=C.useState(""),[p,j]=eg();return s.jsxs("div",{className:"feltkit-gate","data-stack-shell":"",children:[s.jsxs("header",{className:"feltkit-gate__bar",children:[s.jsx(Jx,{id:"gate-theme",preference:p,onChange:j}),s.jsx(NS,{id:"gate-family-mark"})]}),s.jsxs("main",{className:"feltkit-gate__card",id:wd,children:[s.jsx("img",{src:Wx,width:"32",height:"32",alt:"FeltKit"}),s.jsx("h1",{className:"feltkit-gate__title",children:n}),s.jsx("p",{className:"feltkit-muted",children:b}),h&&s.jsx(lt,{tone:"critical",title:"Not signed in",children:h}),s.jsx(ya,{label:n,submitLabel:o,busy:r,onSubmit:()=>{v.trim()&&f(v.trim())},children:s.jsx(qe,{id:u.id,label:u.label,value:v,onChange:m,placeholder:u.placeholder,autocomplete:"off",spellcheck:"false",required:!0})})]})]})}function NS({id:n}){return s.jsxs("a",{className:"feltkit-family",href:"https://boundry.company",children:[s.jsx(Kx,{idPrefix:n})," A Boundry product"]})}function yg({onSignOut:n}){const[{route:u,rest:o},r]=C.useState(Ay),[h,f]=C.useState(!1),[b,v]=C.useState(null),[m,p]=C.useState(0),[j,g]=C.useState({}),[x,A]=C.useState([]),[q,z]=eg(),k=st(()=>de("/overview"),[m]),E=C.useRef(null),$=C.useRef(!0);C.useEffect(()=>{const ee=()=>r(Ay());return window.addEventListener("hashchange",ee),()=>window.removeEventListener("hashchange",ee)},[]),C.useEffect(()=>{$.current?$.current=!1:qx(wd)},[u,o[0]]),C.useEffect(()=>k0((ee,B)=>{v(new Date().toISOString()),!(ee==="activity"&&(A(ue=>[B,...ue].slice(0,200)),B?.outcome!=="success"&&!B?.writes?.length))&&(ee==="change"&&(g(ue=>{const J={...ue};for(const _e of B.collections)J[_e]=(J[_e]??0)+1;return J}),B.collections.every(ue=>xS.has(ue)))||E.current===null&&(E.current=window.setTimeout(()=>{E.current=null,p(ue=>ue+1)},250)))},ee=>{f(ee),ee||v(B=>B??new Date().toISOString())}),[]),C.useEffect(()=>{const ee=B=>{const ue=B.target;if(B.metaKey||B.ctrlKey||B.altKey||["INPUT","TEXTAREA","SELECT"].includes(ue.tagName)||ue.isContentEditable||ue.closest("dialog"))return;const J=Od.find(_e=>_e.key===B.key);J&&Wl(J.id)};return window.addEventListener("keydown",ee),()=>window.removeEventListener("keydown",ee)},[]);const W=C.useMemo(()=>({live:h,version:m,changed:j,activity:x,overview:k.data,reloadOverview:k.reload}),[h,m,j,x,k.data,k.reload]),Z=k.error?.status===401;C.useEffect(()=>{Z&&n(!0)},[Z,n]);const F=k.data,re=!!F?.environment?.production;return s.jsx(hg.Provider,{value:W,children:s.jsx(ES,{overview:F,route:u,rest:o,live:h,lastEventAt:b,theme:q,setTheme:z,onSignOut:()=>n(),children:k.loading&&!F?s.jsx(Ht,{what:"the runtime"}):F?s.jsx(AS,{route:re&&mg.includes(u)?"overview":u,rest:o}):s.jsx($e,{title:"The runtime did not answer",error:k.error,retry:k.reload})})})}const Cy=n=>n.state!=="available"&&n.state!=="unavailable";function TS(n,u,o){const r=!!n?.environment?.production,h=Od.filter(b=>!r||!mg.includes(b.id)).map((b,v)=>({id:b.id,label:b.label,href:`#/${b.id}`,group:b.group,order:v,current:u===b.id&&!(b.id==="services"&&o[0]),attrs:{"aria-keyshortcuts":b.key,"data-route":b.id}})),f=n?.services??[];if(f.length){const b=u==="services"?o[0]:void 0,v=(m,p,j,g)=>({id:`service-${m}`,label:p,href:`#/services/${m}`,group:j,order:g,current:b===m,attrs:{"data-service":m}});f.filter(Cy).forEach((m,p)=>h.push(v(m.id,m.name,"Services",100+p))),h.push(v("credentials","Credentials","Services",200)),f.filter(m=>!Cy(m)).forEach((m,p)=>h.push(v(m.id,m.name,"Services not enabled",300+p)))}return h}function ES({overview:n,route:u,rest:o,live:r,lastEventAt:h,theme:f,setTheme:b,onSignOut:v,children:m}){const p=!!n?.environment?.production,j=Ad("feltkit.runtime.state",n?.state);return s.jsxs(Zx,{product:{id:"feltkit",name:"FeltKit",homeHref:"#/overview",mark:"FK"},navigation:TS(n,u,o),onNavigate:g=>location.hash=g,mainId:wd,context:s.jsxs("span",{className:"feltkit-context",children:[s.jsx("strong",{className:"feltkit-context__app",children:n?.application?.name??"…"}),n&&s.jsx("code",{className:"feltkit-context__env",children:n.environment.name}),s.jsx(Ky,{freshness:r?"live":h?"stale":"unknown",...!r&&h?{asOf:h}:{},source:"events"})]}),theme:{preference:f,onChange:b},account:s.jsx(s.Fragment,{children:s.jsx(ze,{size:"sm",variant:"ghost",label:n?.operator?"Sign out":"Lock",onClick:v,attrs:{title:n?.operator?"Sign out of production Studio":"Forget the admin token in this tab"}})}),children:[n&&s.jsx("div",{className:"feltkit-environment","data-environment":n.environment.name,children:p?s.jsxs(lt,{tone:"attention",title:`Production · signed in as ${n.operator?.principal?.id??"unknown"}`,children:["Roles ",(n.operator?.principal?.roles??[]).join(", ")||"none",". Actions run on this environment only and are recorded as you."]}):s.jsxs("p",{className:"feltkit-environment__line",children:[s.jsxs("span",{children:["FeltDB ",n.instance.feltdbVersion]}),s.jsx("span",{children:n.instance.mode}),s.jsx("code",{className:"feltkit-path",title:n.instance.location,children:n.instance.location}),s.jsxs("span",{className:"feltkit-muted",children:["runtime ",j.label.toLowerCase()," · development tools on"]})]})}),m]})}function AS({route:n,rest:u}){switch(n){case"data":return s.jsx(ej,{collection:u[0]});case"capabilities":return s.jsx(cj,{selected:u[0]});case"services":return s.jsx(Bj,{page:u[0]});case"agent":return s.jsx(Wj,{rest:u});case"models":return s.jsx(nS,{});case"integrations":return s.jsx(mS,{});case"readiness":return s.jsx(pS,{});case"activity":return s.jsx(Xj,{selected:u[0]});case"settings":return s.jsx(Jj,{});case"projects":return s.jsx(Ij,{});default:return s.jsx(Px,{})}}function nl({title:n,subtitle:u,actions:o,crumbs:r,status:h}){return s.jsxs(s.Fragment,{children:[r&&s.jsx(Xx,{items:r}),s.jsx(Vx,{title:n,description:u,actions:o,status:h})]})}S0.createRoot(document.getElementById("root")).render(s.jsx(C.StrictMode,{children:s.jsx(jS,{})}));
|