@way_marks/server 4.3.0 → 4.3.2

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.
@@ -1,4 +1,4 @@
1
- var Tu=e=>{throw TypeError(e)};var Rl=(e,t,n)=>t.has(e)||Tu("Cannot "+n);var x=(e,t,n)=>(Rl(e,t,"read from private field"),n?n.call(e):t.get(e)),O=(e,t,n)=>t.has(e)?Tu("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),R=(e,t,n,r)=>(Rl(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),F=(e,t,n)=>(Rl(e,t,"access private method"),n);var qs=(e,t,n,r)=>({set _(s){R(e,t,s,n)},get _(){return x(e,t,r)}});function Rp(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const l=Object.getOwnPropertyDescriptor(r,s);l&&Object.defineProperty(e,s,l.get?l:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const a of l.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(s){if(s.ep)return;s.ep=!0;const l=n(s);fetch(s.href,l)}})();function Cd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ed={exports:{}},rl={},Pd={exports:{}},D={};/**
1
+ var Ou=e=>{throw TypeError(e)};var Rl=(e,t,n)=>t.has(e)||Ou("Cannot "+n);var x=(e,t,n)=>(Rl(e,t,"read from private field"),n?n.call(e):t.get(e)),I=(e,t,n)=>t.has(e)?Ou("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),R=(e,t,n,r)=>(Rl(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),A=(e,t,n)=>(Rl(e,t,"access private method"),n);var Vs=(e,t,n,r)=>({set _(s){R(e,t,s,n)},get _(){return x(e,t,r)}});function Rp(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const l=Object.getOwnPropertyDescriptor(r,s);l&&Object.defineProperty(e,s,l.get?l:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const a of l.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(s){if(s.ep)return;s.ep=!0;const l=n(s);fetch(s.href,l)}})();function _d(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pd={exports:{}},rl={},Rd={exports:{}},D={};/**
2
2
  * @license React
3
3
  * react.production.min.js
4
4
  *
@@ -6,7 +6,7 @@ var Tu=e=>{throw TypeError(e)};var Rl=(e,t,n)=>t.has(e)||Tu("Cannot "+n);var x=(
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Ds=Symbol.for("react.element"),bp=Symbol.for("react.portal"),Tp=Symbol.for("react.fragment"),Op=Symbol.for("react.strict_mode"),Ip=Symbol.for("react.profiler"),Mp=Symbol.for("react.provider"),Lp=Symbol.for("react.context"),Fp=Symbol.for("react.forward_ref"),Ap=Symbol.for("react.suspense"),zp=Symbol.for("react.memo"),Dp=Symbol.for("react.lazy"),Ou=Symbol.iterator;function Up(e){return e===null||typeof e!="object"?null:(e=Ou&&e[Ou]||e["@@iterator"],typeof e=="function"?e:null)}var _d={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Rd=Object.assign,bd={};function Ar(e,t,n){this.props=e,this.context=t,this.refs=bd,this.updater=n||_d}Ar.prototype.isReactComponent={};Ar.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ar.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Td(){}Td.prototype=Ar.prototype;function No(e,t,n){this.props=e,this.context=t,this.refs=bd,this.updater=n||_d}var ko=No.prototype=new Td;ko.constructor=No;Rd(ko,Ar.prototype);ko.isPureReactComponent=!0;var Iu=Array.isArray,Od=Object.prototype.hasOwnProperty,Co={current:null},Id={key:!0,ref:!0,__self:!0,__source:!0};function Md(e,t,n){var r,s={},l=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(l=""+t.key),t)Od.call(t,r)&&!Id.hasOwnProperty(r)&&(s[r]=t[r]);var o=arguments.length-2;if(o===1)s.children=n;else if(1<o){for(var u=Array(o),d=0;d<o;d++)u[d]=arguments[d+2];s.children=u}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)s[r]===void 0&&(s[r]=o[r]);return{$$typeof:Ds,type:e,key:l,ref:a,props:s,_owner:Co.current}}function $p(e,t){return{$$typeof:Ds,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Eo(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ds}function Bp(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Mu=/\/+/g;function bl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Bp(""+e.key):t.toString(36)}function vi(e,t,n,r,s){var l=typeof e;(l==="undefined"||l==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(l){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Ds:case bp:a=!0}}if(a)return a=e,s=s(a),e=r===""?"."+bl(a,0):r,Iu(s)?(n="",e!=null&&(n=e.replace(Mu,"$&/")+"/"),vi(s,t,n,"",function(d){return d})):s!=null&&(Eo(s)&&(s=$p(s,n+(!s.key||a&&a.key===s.key?"":(""+s.key).replace(Mu,"$&/")+"/")+e)),t.push(s)),1;if(a=0,r=r===""?".":r+":",Iu(e))for(var o=0;o<e.length;o++){l=e[o];var u=r+bl(l,o);a+=vi(l,t,n,u,s)}else if(u=Up(e),typeof u=="function")for(e=u.call(e),o=0;!(l=e.next()).done;)l=l.value,u=r+bl(l,o++),a+=vi(l,t,n,u,s);else if(l==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function Vs(e,t,n){if(e==null)return e;var r=[],s=0;return vi(e,r,"","",function(l){return t.call(n,l,s++)}),r}function Qp(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var be={current:null},gi={transition:null},Wp={ReactCurrentDispatcher:be,ReactCurrentBatchConfig:gi,ReactCurrentOwner:Co};function Ld(){throw Error("act(...) is not supported in production builds of React.")}D.Children={map:Vs,forEach:function(e,t,n){Vs(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Vs(e,function(){t++}),t},toArray:function(e){return Vs(e,function(t){return t})||[]},only:function(e){if(!Eo(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};D.Component=Ar;D.Fragment=Tp;D.Profiler=Ip;D.PureComponent=No;D.StrictMode=Op;D.Suspense=Ap;D.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Wp;D.act=Ld;D.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Rd({},e.props),s=e.key,l=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(l=t.ref,a=Co.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var o=e.type.defaultProps;for(u in t)Od.call(t,u)&&!Id.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&o!==void 0?o[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){o=Array(u);for(var d=0;d<u;d++)o[d]=arguments[d+2];r.children=o}return{$$typeof:Ds,type:e.type,key:s,ref:l,props:r,_owner:a}};D.createContext=function(e){return e={$$typeof:Lp,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Mp,_context:e},e.Consumer=e};D.createElement=Md;D.createFactory=function(e){var t=Md.bind(null,e);return t.type=e,t};D.createRef=function(){return{current:null}};D.forwardRef=function(e){return{$$typeof:Fp,render:e}};D.isValidElement=Eo;D.lazy=function(e){return{$$typeof:Dp,_payload:{_status:-1,_result:e},_init:Qp}};D.memo=function(e,t){return{$$typeof:zp,type:e,compare:t===void 0?null:t}};D.startTransition=function(e){var t=gi.transition;gi.transition={};try{e()}finally{gi.transition=t}};D.unstable_act=Ld;D.useCallback=function(e,t){return be.current.useCallback(e,t)};D.useContext=function(e){return be.current.useContext(e)};D.useDebugValue=function(){};D.useDeferredValue=function(e){return be.current.useDeferredValue(e)};D.useEffect=function(e,t){return be.current.useEffect(e,t)};D.useId=function(){return be.current.useId()};D.useImperativeHandle=function(e,t,n){return be.current.useImperativeHandle(e,t,n)};D.useInsertionEffect=function(e,t){return be.current.useInsertionEffect(e,t)};D.useLayoutEffect=function(e,t){return be.current.useLayoutEffect(e,t)};D.useMemo=function(e,t){return be.current.useMemo(e,t)};D.useReducer=function(e,t,n){return be.current.useReducer(e,t,n)};D.useRef=function(e){return be.current.useRef(e)};D.useState=function(e){return be.current.useState(e)};D.useSyncExternalStore=function(e,t,n){return be.current.useSyncExternalStore(e,t,n)};D.useTransition=function(){return be.current.useTransition()};D.version="18.3.1";Pd.exports=D;var N=Pd.exports;const Fd=Cd(N),Hp=Rp({__proto__:null,default:Fd},[N]);/**
9
+ */var $s=Symbol.for("react.element"),bp=Symbol.for("react.portal"),Tp=Symbol.for("react.fragment"),Ip=Symbol.for("react.strict_mode"),Op=Symbol.for("react.profiler"),Mp=Symbol.for("react.provider"),Lp=Symbol.for("react.context"),Fp=Symbol.for("react.forward_ref"),Ap=Symbol.for("react.suspense"),zp=Symbol.for("react.memo"),Dp=Symbol.for("react.lazy"),Mu=Symbol.iterator;function Up(e){return e===null||typeof e!="object"?null:(e=Mu&&e[Mu]||e["@@iterator"],typeof e=="function"?e:null)}var bd={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Td=Object.assign,Id={};function Ar(e,t,n){this.props=e,this.context=t,this.refs=Id,this.updater=n||bd}Ar.prototype.isReactComponent={};Ar.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ar.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Od(){}Od.prototype=Ar.prototype;function No(e,t,n){this.props=e,this.context=t,this.refs=Id,this.updater=n||bd}var ko=No.prototype=new Od;ko.constructor=No;Td(ko,Ar.prototype);ko.isPureReactComponent=!0;var Lu=Array.isArray,Md=Object.prototype.hasOwnProperty,Co={current:null},Ld={key:!0,ref:!0,__self:!0,__source:!0};function Fd(e,t,n){var r,s={},l=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(l=""+t.key),t)Md.call(t,r)&&!Ld.hasOwnProperty(r)&&(s[r]=t[r]);var o=arguments.length-2;if(o===1)s.children=n;else if(1<o){for(var u=Array(o),d=0;d<o;d++)u[d]=arguments[d+2];s.children=u}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)s[r]===void 0&&(s[r]=o[r]);return{$$typeof:$s,type:e,key:l,ref:a,props:s,_owner:Co.current}}function $p(e,t){return{$$typeof:$s,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Eo(e){return typeof e=="object"&&e!==null&&e.$$typeof===$s}function Bp(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Fu=/\/+/g;function bl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Bp(""+e.key):t.toString(36)}function vi(e,t,n,r,s){var l=typeof e;(l==="undefined"||l==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(l){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case $s:case bp:a=!0}}if(a)return a=e,s=s(a),e=r===""?"."+bl(a,0):r,Lu(s)?(n="",e!=null&&(n=e.replace(Fu,"$&/")+"/"),vi(s,t,n,"",function(d){return d})):s!=null&&(Eo(s)&&(s=$p(s,n+(!s.key||a&&a.key===s.key?"":(""+s.key).replace(Fu,"$&/")+"/")+e)),t.push(s)),1;if(a=0,r=r===""?".":r+":",Lu(e))for(var o=0;o<e.length;o++){l=e[o];var u=r+bl(l,o);a+=vi(l,t,n,u,s)}else if(u=Up(e),typeof u=="function")for(e=u.call(e),o=0;!(l=e.next()).done;)l=l.value,u=r+bl(l,o++),a+=vi(l,t,n,u,s);else if(l==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function Gs(e,t,n){if(e==null)return e;var r=[],s=0;return vi(e,r,"","",function(l){return t.call(n,l,s++)}),r}function Qp(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Te={current:null},gi={transition:null},Wp={ReactCurrentDispatcher:Te,ReactCurrentBatchConfig:gi,ReactCurrentOwner:Co};function Ad(){throw Error("act(...) is not supported in production builds of React.")}D.Children={map:Gs,forEach:function(e,t,n){Gs(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Gs(e,function(){t++}),t},toArray:function(e){return Gs(e,function(t){return t})||[]},only:function(e){if(!Eo(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};D.Component=Ar;D.Fragment=Tp;D.Profiler=Op;D.PureComponent=No;D.StrictMode=Ip;D.Suspense=Ap;D.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Wp;D.act=Ad;D.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Td({},e.props),s=e.key,l=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(l=t.ref,a=Co.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var o=e.type.defaultProps;for(u in t)Md.call(t,u)&&!Ld.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&o!==void 0?o[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){o=Array(u);for(var d=0;d<u;d++)o[d]=arguments[d+2];r.children=o}return{$$typeof:$s,type:e.type,key:s,ref:l,props:r,_owner:a}};D.createContext=function(e){return e={$$typeof:Lp,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Mp,_context:e},e.Consumer=e};D.createElement=Fd;D.createFactory=function(e){var t=Fd.bind(null,e);return t.type=e,t};D.createRef=function(){return{current:null}};D.forwardRef=function(e){return{$$typeof:Fp,render:e}};D.isValidElement=Eo;D.lazy=function(e){return{$$typeof:Dp,_payload:{_status:-1,_result:e},_init:Qp}};D.memo=function(e,t){return{$$typeof:zp,type:e,compare:t===void 0?null:t}};D.startTransition=function(e){var t=gi.transition;gi.transition={};try{e()}finally{gi.transition=t}};D.unstable_act=Ad;D.useCallback=function(e,t){return Te.current.useCallback(e,t)};D.useContext=function(e){return Te.current.useContext(e)};D.useDebugValue=function(){};D.useDeferredValue=function(e){return Te.current.useDeferredValue(e)};D.useEffect=function(e,t){return Te.current.useEffect(e,t)};D.useId=function(){return Te.current.useId()};D.useImperativeHandle=function(e,t,n){return Te.current.useImperativeHandle(e,t,n)};D.useInsertionEffect=function(e,t){return Te.current.useInsertionEffect(e,t)};D.useLayoutEffect=function(e,t){return Te.current.useLayoutEffect(e,t)};D.useMemo=function(e,t){return Te.current.useMemo(e,t)};D.useReducer=function(e,t,n){return Te.current.useReducer(e,t,n)};D.useRef=function(e){return Te.current.useRef(e)};D.useState=function(e){return Te.current.useState(e)};D.useSyncExternalStore=function(e,t,n){return Te.current.useSyncExternalStore(e,t,n)};D.useTransition=function(){return Te.current.useTransition()};D.version="18.3.1";Rd.exports=D;var N=Rd.exports;const zd=_d(N),Hp=Rp({__proto__:null,default:zd},[N]);/**
10
10
  * @license React
11
11
  * react-jsx-runtime.production.min.js
12
12
  *
@@ -14,7 +14,7 @@ var Tu=e=>{throw TypeError(e)};var Rl=(e,t,n)=>t.has(e)||Tu("Cannot "+n);var x=(
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Kp=N,qp=Symbol.for("react.element"),Vp=Symbol.for("react.fragment"),Gp=Object.prototype.hasOwnProperty,Jp=Kp.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Yp={key:!0,ref:!0,__self:!0,__source:!0};function Ad(e,t,n){var r,s={},l=null,a=null;n!==void 0&&(l=""+n),t.key!==void 0&&(l=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)Gp.call(t,r)&&!Yp.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:qp,type:e,key:l,ref:a,props:s,_owner:Jp.current}}rl.Fragment=Vp;rl.jsx=Ad;rl.jsxs=Ad;Ed.exports=rl;var i=Ed.exports,zd={exports:{}},Ke={},Dd={exports:{}},Ud={};/**
17
+ */var Kp=N,qp=Symbol.for("react.element"),Vp=Symbol.for("react.fragment"),Gp=Object.prototype.hasOwnProperty,Jp=Kp.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Yp={key:!0,ref:!0,__self:!0,__source:!0};function Dd(e,t,n){var r,s={},l=null,a=null;n!==void 0&&(l=""+n),t.key!==void 0&&(l=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)Gp.call(t,r)&&!Yp.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:qp,type:e,key:l,ref:a,props:s,_owner:Jp.current}}rl.Fragment=Vp;rl.jsx=Dd;rl.jsxs=Dd;Pd.exports=rl;var i=Pd.exports,Ud={exports:{}},Ke={},$d={exports:{}},Bd={};/**
18
18
  * @license React
19
19
  * scheduler.production.min.js
20
20
  *
@@ -22,7 +22,7 @@ var Tu=e=>{throw TypeError(e)};var Rl=(e,t,n)=>t.has(e)||Tu("Cannot "+n);var x=(
22
22
  *
23
23
  * This source code is licensed under the MIT license found in the
24
24
  * LICENSE file in the root directory of this source tree.
25
- */(function(e){function t(T,L){var z=T.length;T.push(L);e:for(;0<z;){var se=z-1>>>1,de=T[se];if(0<s(de,L))T[se]=L,T[z]=de,z=se;else break e}}function n(T){return T.length===0?null:T[0]}function r(T){if(T.length===0)return null;var L=T[0],z=T.pop();if(z!==L){T[0]=z;e:for(var se=0,de=T.length,Hs=de>>>1;se<Hs;){var Sn=2*(se+1)-1,_l=T[Sn],Nn=Sn+1,Ks=T[Nn];if(0>s(_l,z))Nn<de&&0>s(Ks,_l)?(T[se]=Ks,T[Nn]=z,se=Nn):(T[se]=_l,T[Sn]=z,se=Sn);else if(Nn<de&&0>s(Ks,z))T[se]=Ks,T[Nn]=z,se=Nn;else break e}}return L}function s(T,L){var z=T.sortIndex-L.sortIndex;return z!==0?z:T.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var a=Date,o=a.now();e.unstable_now=function(){return a.now()-o}}var u=[],d=[],h=1,p=null,g=3,m=!1,w=!1,j=!1,S=typeof setTimeout=="function"?setTimeout:null,c=typeof clearTimeout=="function"?clearTimeout:null,f=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(T){for(var L=n(d);L!==null;){if(L.callback===null)r(d);else if(L.startTime<=T)r(d),L.sortIndex=L.expirationTime,t(u,L);else break;L=n(d)}}function y(T){if(j=!1,v(T),!w)if(n(u)!==null)w=!0,El(k);else{var L=n(d);L!==null&&Pl(y,L.startTime-T)}}function k(T,L){w=!1,j&&(j=!1,c(P),P=-1),m=!0;var z=g;try{for(v(L),p=n(u);p!==null&&(!(p.expirationTime>L)||T&&!te());){var se=p.callback;if(typeof se=="function"){p.callback=null,g=p.priorityLevel;var de=se(p.expirationTime<=L);L=e.unstable_now(),typeof de=="function"?p.callback=de:p===n(u)&&r(u),v(L)}else r(u);p=n(u)}if(p!==null)var Hs=!0;else{var Sn=n(d);Sn!==null&&Pl(y,Sn.startTime-L),Hs=!1}return Hs}finally{p=null,g=z,m=!1}}var E=!1,C=null,P=-1,M=5,I=-1;function te(){return!(e.unstable_now()-I<M)}function dt(){if(C!==null){var T=e.unstable_now();I=T;var L=!0;try{L=C(!0,T)}finally{L?Dt():(E=!1,C=null)}}else E=!1}var Dt;if(typeof f=="function")Dt=function(){f(dt)};else if(typeof MessageChannel<"u"){var wn=new MessageChannel,Jn=wn.port2;wn.port1.onmessage=dt,Dt=function(){Jn.postMessage(null)}}else Dt=function(){S(dt,0)};function El(T){C=T,E||(E=!0,Dt())}function Pl(T,L){P=S(function(){T(e.unstable_now())},L)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(T){T.callback=null},e.unstable_continueExecution=function(){w||m||(w=!0,El(k))},e.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<T?Math.floor(1e3/T):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(T){switch(g){case 1:case 2:case 3:var L=3;break;default:L=g}var z=g;g=L;try{return T()}finally{g=z}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(T,L){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var z=g;g=T;try{return L()}finally{g=z}},e.unstable_scheduleCallback=function(T,L,z){var se=e.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?se+z:se):z=se,T){case 1:var de=-1;break;case 2:de=250;break;case 5:de=1073741823;break;case 4:de=1e4;break;default:de=5e3}return de=z+de,T={id:h++,callback:L,priorityLevel:T,startTime:z,expirationTime:de,sortIndex:-1},z>se?(T.sortIndex=z,t(d,T),n(u)===null&&T===n(d)&&(j?(c(P),P=-1):j=!0,Pl(y,z-se))):(T.sortIndex=de,t(u,T),w||m||(w=!0,El(k))),T},e.unstable_shouldYield=te,e.unstable_wrapCallback=function(T){var L=g;return function(){var z=g;g=L;try{return T.apply(this,arguments)}finally{g=z}}}})(Ud);Dd.exports=Ud;var Xp=Dd.exports;/**
25
+ */(function(e){function t(T,F){var z=T.length;T.push(F);e:for(;0<z;){var se=z-1>>>1,de=T[se];if(0<s(de,F))T[se]=F,T[z]=de,z=se;else break e}}function n(T){return T.length===0?null:T[0]}function r(T){if(T.length===0)return null;var F=T[0],z=T.pop();if(z!==F){T[0]=z;e:for(var se=0,de=T.length,Ks=de>>>1;se<Ks;){var Sn=2*(se+1)-1,Pl=T[Sn],Nn=Sn+1,qs=T[Nn];if(0>s(Pl,z))Nn<de&&0>s(qs,Pl)?(T[se]=qs,T[Nn]=z,se=Nn):(T[se]=Pl,T[Sn]=z,se=Sn);else if(Nn<de&&0>s(qs,z))T[se]=qs,T[Nn]=z,se=Nn;else break e}}return F}function s(T,F){var z=T.sortIndex-F.sortIndex;return z!==0?z:T.id-F.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var a=Date,o=a.now();e.unstable_now=function(){return a.now()-o}}var u=[],d=[],h=1,p=null,g=3,m=!1,w=!1,j=!1,S=typeof setTimeout=="function"?setTimeout:null,c=typeof clearTimeout=="function"?clearTimeout:null,f=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(T){for(var F=n(d);F!==null;){if(F.callback===null)r(d);else if(F.startTime<=T)r(d),F.sortIndex=F.expirationTime,t(u,F);else break;F=n(d)}}function y(T){if(j=!1,v(T),!w)if(n(u)!==null)w=!0,El(k);else{var F=n(d);F!==null&&_l(y,F.startTime-T)}}function k(T,F){w=!1,j&&(j=!1,c(_),_=-1),m=!0;var z=g;try{for(v(F),p=n(u);p!==null&&(!(p.expirationTime>F)||T&&!te());){var se=p.callback;if(typeof se=="function"){p.callback=null,g=p.priorityLevel;var de=se(p.expirationTime<=F);F=e.unstable_now(),typeof de=="function"?p.callback=de:p===n(u)&&r(u),v(F)}else r(u);p=n(u)}if(p!==null)var Ks=!0;else{var Sn=n(d);Sn!==null&&_l(y,Sn.startTime-F),Ks=!1}return Ks}finally{p=null,g=z,m=!1}}var E=!1,C=null,_=-1,M=5,O=-1;function te(){return!(e.unstable_now()-O<M)}function dt(){if(C!==null){var T=e.unstable_now();O=T;var F=!0;try{F=C(!0,T)}finally{F?Dt():(E=!1,C=null)}}else E=!1}var Dt;if(typeof f=="function")Dt=function(){f(dt)};else if(typeof MessageChannel<"u"){var wn=new MessageChannel,Jn=wn.port2;wn.port1.onmessage=dt,Dt=function(){Jn.postMessage(null)}}else Dt=function(){S(dt,0)};function El(T){C=T,E||(E=!0,Dt())}function _l(T,F){_=S(function(){T(e.unstable_now())},F)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(T){T.callback=null},e.unstable_continueExecution=function(){w||m||(w=!0,El(k))},e.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<T?Math.floor(1e3/T):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(T){switch(g){case 1:case 2:case 3:var F=3;break;default:F=g}var z=g;g=F;try{return T()}finally{g=z}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(T,F){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var z=g;g=T;try{return F()}finally{g=z}},e.unstable_scheduleCallback=function(T,F,z){var se=e.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?se+z:se):z=se,T){case 1:var de=-1;break;case 2:de=250;break;case 5:de=1073741823;break;case 4:de=1e4;break;default:de=5e3}return de=z+de,T={id:h++,callback:F,priorityLevel:T,startTime:z,expirationTime:de,sortIndex:-1},z>se?(T.sortIndex=z,t(d,T),n(u)===null&&T===n(d)&&(j?(c(_),_=-1):j=!0,_l(y,z-se))):(T.sortIndex=de,t(u,T),w||m||(w=!0,El(k))),T},e.unstable_shouldYield=te,e.unstable_wrapCallback=function(T){var F=g;return function(){var z=g;g=F;try{return T.apply(this,arguments)}finally{g=z}}}})(Bd);$d.exports=Bd;var Xp=$d.exports;/**
26
26
  * @license React
27
27
  * react-dom.production.min.js
28
28
  *
@@ -30,14 +30,14 @@ var Tu=e=>{throw TypeError(e)};var Rl=(e,t,n)=>t.has(e)||Tu("Cannot "+n);var x=(
30
30
  *
31
31
  * This source code is licensed under the MIT license found in the
32
32
  * LICENSE file in the root directory of this source tree.
33
- */var Zp=N,He=Xp;function _(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);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."}var $d=new Set,ds={};function qn(e,t){_r(e,t),_r(e+"Capture",t)}function _r(e,t){for(ds[e]=t,e=0;e<t.length;e++)$d.add(t[e])}var Tt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ca=Object.prototype.hasOwnProperty,em=/^[: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]*$/,Lu={},Fu={};function tm(e){return ca.call(Fu,e)?!0:ca.call(Lu,e)?!1:em.test(e)?Fu[e]=!0:(Lu[e]=!0,!1)}function nm(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function rm(e,t,n,r){if(t===null||typeof t>"u"||nm(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Te(e,t,n,r,s,l,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=l,this.removeEmptyString=a}var ge={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ge[e]=new Te(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ge[t]=new Te(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ge[e]=new Te(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ge[e]=new Te(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ge[e]=new Te(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ge[e]=new Te(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ge[e]=new Te(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ge[e]=new Te(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ge[e]=new Te(e,5,!1,e.toLowerCase(),null,!1,!1)});var Po=/[\-:]([a-z])/g;function _o(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Po,_o);ge[t]=new Te(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Po,_o);ge[t]=new Te(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Po,_o);ge[t]=new Te(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ge[e]=new Te(e,1,!1,e.toLowerCase(),null,!1,!1)});ge.xlinkHref=new Te("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ge[e]=new Te(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ro(e,t,n,r){var s=ge.hasOwnProperty(t)?ge[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(rm(t,n,s,r)&&(n=null),r||s===null?tm(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Ft=Zp.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Gs=Symbol.for("react.element"),Xn=Symbol.for("react.portal"),Zn=Symbol.for("react.fragment"),bo=Symbol.for("react.strict_mode"),da=Symbol.for("react.profiler"),Bd=Symbol.for("react.provider"),Qd=Symbol.for("react.context"),To=Symbol.for("react.forward_ref"),fa=Symbol.for("react.suspense"),ha=Symbol.for("react.suspense_list"),Oo=Symbol.for("react.memo"),Bt=Symbol.for("react.lazy"),Wd=Symbol.for("react.offscreen"),Au=Symbol.iterator;function Qr(e){return e===null||typeof e!="object"?null:(e=Au&&e[Au]||e["@@iterator"],typeof e=="function"?e:null)}var ee=Object.assign,Tl;function Yr(e){if(Tl===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Tl=t&&t[1]||""}return`
34
- `+Tl+e}var Ol=!1;function Il(e,t){if(!e||Ol)return"";Ol=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(d){var r=d}Reflect.construct(e,[],t)}else{try{t.call()}catch(d){r=d}e.call(t.prototype)}else{try{throw Error()}catch(d){r=d}e()}}catch(d){if(d&&r&&typeof d.stack=="string"){for(var s=d.stack.split(`
33
+ */var Zp=N,He=Xp;function P(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);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."}var Qd=new Set,hs={};function qn(e,t){Pr(e,t),Pr(e+"Capture",t)}function Pr(e,t){for(hs[e]=t,e=0;e<t.length;e++)Qd.add(t[e])}var Tt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ca=Object.prototype.hasOwnProperty,em=/^[: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]*$/,Au={},zu={};function tm(e){return ca.call(zu,e)?!0:ca.call(Au,e)?!1:em.test(e)?zu[e]=!0:(Au[e]=!0,!1)}function nm(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function rm(e,t,n,r){if(t===null||typeof t>"u"||nm(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ie(e,t,n,r,s,l,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=l,this.removeEmptyString=a}var ge={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ge[e]=new Ie(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ge[t]=new Ie(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ge[e]=new Ie(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ge[e]=new Ie(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ge[e]=new Ie(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ge[e]=new Ie(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ge[e]=new Ie(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ge[e]=new Ie(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ge[e]=new Ie(e,5,!1,e.toLowerCase(),null,!1,!1)});var _o=/[\-:]([a-z])/g;function Po(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(_o,Po);ge[t]=new Ie(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(_o,Po);ge[t]=new Ie(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(_o,Po);ge[t]=new Ie(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ge[e]=new Ie(e,1,!1,e.toLowerCase(),null,!1,!1)});ge.xlinkHref=new Ie("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ge[e]=new Ie(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ro(e,t,n,r){var s=ge.hasOwnProperty(t)?ge[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(rm(t,n,s,r)&&(n=null),r||s===null?tm(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Ft=Zp.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Js=Symbol.for("react.element"),Xn=Symbol.for("react.portal"),Zn=Symbol.for("react.fragment"),bo=Symbol.for("react.strict_mode"),da=Symbol.for("react.profiler"),Wd=Symbol.for("react.provider"),Hd=Symbol.for("react.context"),To=Symbol.for("react.forward_ref"),fa=Symbol.for("react.suspense"),ha=Symbol.for("react.suspense_list"),Io=Symbol.for("react.memo"),Bt=Symbol.for("react.lazy"),Kd=Symbol.for("react.offscreen"),Du=Symbol.iterator;function Wr(e){return e===null||typeof e!="object"?null:(e=Du&&e[Du]||e["@@iterator"],typeof e=="function"?e:null)}var ee=Object.assign,Tl;function Zr(e){if(Tl===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Tl=t&&t[1]||""}return`
34
+ `+Tl+e}var Il=!1;function Ol(e,t){if(!e||Il)return"";Il=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(d){var r=d}Reflect.construct(e,[],t)}else{try{t.call()}catch(d){r=d}e.call(t.prototype)}else{try{throw Error()}catch(d){r=d}e()}}catch(d){if(d&&r&&typeof d.stack=="string"){for(var s=d.stack.split(`
35
35
  `),l=r.stack.split(`
36
36
  `),a=s.length-1,o=l.length-1;1<=a&&0<=o&&s[a]!==l[o];)o--;for(;1<=a&&0<=o;a--,o--)if(s[a]!==l[o]){if(a!==1||o!==1)do if(a--,o--,0>o||s[a]!==l[o]){var u=`
37
- `+s[a].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=a&&0<=o);break}}}finally{Ol=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Yr(e):""}function sm(e){switch(e.tag){case 5:return Yr(e.type);case 16:return Yr("Lazy");case 13:return Yr("Suspense");case 19:return Yr("SuspenseList");case 0:case 2:case 15:return e=Il(e.type,!1),e;case 11:return e=Il(e.type.render,!1),e;case 1:return e=Il(e.type,!0),e;default:return""}}function pa(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Zn:return"Fragment";case Xn:return"Portal";case da:return"Profiler";case bo:return"StrictMode";case fa:return"Suspense";case ha:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Qd:return(e.displayName||"Context")+".Consumer";case Bd:return(e._context.displayName||"Context")+".Provider";case To:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Oo:return t=e.displayName||null,t!==null?t:pa(e.type)||"Memo";case Bt:t=e._payload,e=e._init;try{return pa(e(t))}catch{}}return null}function im(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return pa(t);case 8:return t===bo?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function mn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Hd(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function lm(e){var t=Hd(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,l=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(a){r=""+a,l.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Js(e){e._valueTracker||(e._valueTracker=lm(e))}function Kd(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Hd(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ri(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 ma(e,t){var n=t.checked;return ee({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function zu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=mn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function qd(e,t){t=t.checked,t!=null&&Ro(e,"checked",t,!1)}function va(e,t){qd(e,t);var n=mn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ga(e,t.type,n):t.hasOwnProperty("defaultValue")&&ga(e,t.type,mn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Du(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ga(e,t,n){(t!=="number"||Ri(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Xr=Array.isArray;function cr(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+mn(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function ya(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(_(91));return ee({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Uu(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(_(92));if(Xr(n)){if(1<n.length)throw Error(_(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:mn(n)}}function Vd(e,t){var n=mn(t.value),r=mn(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function $u(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Gd(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function xa(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Gd(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ys,Jd=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ys=Ys||document.createElement("div"),Ys.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ys.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function fs(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ns={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},am=["Webkit","ms","Moz","O"];Object.keys(ns).forEach(function(e){am.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ns[t]=ns[e]})});function Yd(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ns.hasOwnProperty(e)&&ns[e]?(""+t).trim():t+"px"}function Xd(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=Yd(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var om=ee({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ja(e,t){if(t){if(om[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(_(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(_(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(_(61))}if(t.style!=null&&typeof t.style!="object")throw Error(_(62))}}function wa(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 Sa=null;function Io(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Na=null,dr=null,fr=null;function Bu(e){if(e=Bs(e)){if(typeof Na!="function")throw Error(_(280));var t=e.stateNode;t&&(t=ol(t),Na(e.stateNode,e.type,t))}}function Zd(e){dr?fr?fr.push(e):fr=[e]:dr=e}function ef(){if(dr){var e=dr,t=fr;if(fr=dr=null,Bu(e),t)for(e=0;e<t.length;e++)Bu(t[e])}}function tf(e,t){return e(t)}function nf(){}var Ml=!1;function rf(e,t,n){if(Ml)return e(t,n);Ml=!0;try{return tf(e,t,n)}finally{Ml=!1,(dr!==null||fr!==null)&&(nf(),ef())}}function hs(e,t){var n=e.stateNode;if(n===null)return null;var r=ol(n);if(r===null)return null;n=r[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":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(_(231,t,typeof n));return n}var ka=!1;if(Tt)try{var Wr={};Object.defineProperty(Wr,"passive",{get:function(){ka=!0}}),window.addEventListener("test",Wr,Wr),window.removeEventListener("test",Wr,Wr)}catch{ka=!1}function um(e,t,n,r,s,l,a,o,u){var d=Array.prototype.slice.call(arguments,3);try{t.apply(n,d)}catch(h){this.onError(h)}}var rs=!1,bi=null,Ti=!1,Ca=null,cm={onError:function(e){rs=!0,bi=e}};function dm(e,t,n,r,s,l,a,o,u){rs=!1,bi=null,um.apply(cm,arguments)}function fm(e,t,n,r,s,l,a,o,u){if(dm.apply(this,arguments),rs){if(rs){var d=bi;rs=!1,bi=null}else throw Error(_(198));Ti||(Ti=!0,Ca=d)}}function Vn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function sf(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 Qu(e){if(Vn(e)!==e)throw Error(_(188))}function hm(e){var t=e.alternate;if(!t){if(t=Vn(e),t===null)throw Error(_(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var l=s.alternate;if(l===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===l.child){for(l=s.child;l;){if(l===n)return Qu(s),e;if(l===r)return Qu(s),t;l=l.sibling}throw Error(_(188))}if(n.return!==r.return)n=s,r=l;else{for(var a=!1,o=s.child;o;){if(o===n){a=!0,n=s,r=l;break}if(o===r){a=!0,r=s,n=l;break}o=o.sibling}if(!a){for(o=l.child;o;){if(o===n){a=!0,n=l,r=s;break}if(o===r){a=!0,r=l,n=s;break}o=o.sibling}if(!a)throw Error(_(189))}}if(n.alternate!==r)throw Error(_(190))}if(n.tag!==3)throw Error(_(188));return n.stateNode.current===n?e:t}function lf(e){return e=hm(e),e!==null?af(e):null}function af(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=af(e);if(t!==null)return t;e=e.sibling}return null}var of=He.unstable_scheduleCallback,Wu=He.unstable_cancelCallback,pm=He.unstable_shouldYield,mm=He.unstable_requestPaint,ie=He.unstable_now,vm=He.unstable_getCurrentPriorityLevel,Mo=He.unstable_ImmediatePriority,uf=He.unstable_UserBlockingPriority,Oi=He.unstable_NormalPriority,gm=He.unstable_LowPriority,cf=He.unstable_IdlePriority,sl=null,yt=null;function ym(e){if(yt&&typeof yt.onCommitFiberRoot=="function")try{yt.onCommitFiberRoot(sl,e,void 0,(e.current.flags&128)===128)}catch{}}var at=Math.clz32?Math.clz32:wm,xm=Math.log,jm=Math.LN2;function wm(e){return e>>>=0,e===0?32:31-(xm(e)/jm|0)|0}var Xs=64,Zs=4194304;function Zr(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ii(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,l=e.pingedLanes,a=n&268435455;if(a!==0){var o=a&~s;o!==0?r=Zr(o):(l&=a,l!==0&&(r=Zr(l)))}else a=n&~s,a!==0?r=Zr(a):l!==0&&(r=Zr(l));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,l=t&-t,s>=l||s===16&&(l&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-at(t),s=1<<n,r|=e[n],t&=~s;return r}function Sm(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Nm(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,l=e.pendingLanes;0<l;){var a=31-at(l),o=1<<a,u=s[a];u===-1?(!(o&n)||o&r)&&(s[a]=Sm(o,t)):u<=t&&(e.expiredLanes|=o),l&=~o}}function Ea(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function df(){var e=Xs;return Xs<<=1,!(Xs&4194240)&&(Xs=64),e}function Ll(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Us(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-at(t),e[t]=n}function km(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-at(n),l=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~l}}function Lo(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-at(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var H=0;function ff(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var hf,Fo,pf,mf,vf,Pa=!1,ei=[],sn=null,ln=null,an=null,ps=new Map,ms=new Map,Wt=[],Cm="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 submit".split(" ");function Hu(e,t){switch(e){case"focusin":case"focusout":sn=null;break;case"dragenter":case"dragleave":ln=null;break;case"mouseover":case"mouseout":an=null;break;case"pointerover":case"pointerout":ps.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ms.delete(t.pointerId)}}function Hr(e,t,n,r,s,l){return e===null||e.nativeEvent!==l?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:l,targetContainers:[s]},t!==null&&(t=Bs(t),t!==null&&Fo(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function Em(e,t,n,r,s){switch(t){case"focusin":return sn=Hr(sn,e,t,n,r,s),!0;case"dragenter":return ln=Hr(ln,e,t,n,r,s),!0;case"mouseover":return an=Hr(an,e,t,n,r,s),!0;case"pointerover":var l=s.pointerId;return ps.set(l,Hr(ps.get(l)||null,e,t,n,r,s)),!0;case"gotpointercapture":return l=s.pointerId,ms.set(l,Hr(ms.get(l)||null,e,t,n,r,s)),!0}return!1}function gf(e){var t=En(e.target);if(t!==null){var n=Vn(t);if(n!==null){if(t=n.tag,t===13){if(t=sf(n),t!==null){e.blockedOn=t,vf(e.priority,function(){pf(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function yi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=_a(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Sa=r,n.target.dispatchEvent(r),Sa=null}else return t=Bs(n),t!==null&&Fo(t),e.blockedOn=n,!1;t.shift()}return!0}function Ku(e,t,n){yi(e)&&n.delete(t)}function Pm(){Pa=!1,sn!==null&&yi(sn)&&(sn=null),ln!==null&&yi(ln)&&(ln=null),an!==null&&yi(an)&&(an=null),ps.forEach(Ku),ms.forEach(Ku)}function Kr(e,t){e.blockedOn===t&&(e.blockedOn=null,Pa||(Pa=!0,He.unstable_scheduleCallback(He.unstable_NormalPriority,Pm)))}function vs(e){function t(s){return Kr(s,e)}if(0<ei.length){Kr(ei[0],e);for(var n=1;n<ei.length;n++){var r=ei[n];r.blockedOn===e&&(r.blockedOn=null)}}for(sn!==null&&Kr(sn,e),ln!==null&&Kr(ln,e),an!==null&&Kr(an,e),ps.forEach(t),ms.forEach(t),n=0;n<Wt.length;n++)r=Wt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Wt.length&&(n=Wt[0],n.blockedOn===null);)gf(n),n.blockedOn===null&&Wt.shift()}var hr=Ft.ReactCurrentBatchConfig,Mi=!0;function _m(e,t,n,r){var s=H,l=hr.transition;hr.transition=null;try{H=1,Ao(e,t,n,r)}finally{H=s,hr.transition=l}}function Rm(e,t,n,r){var s=H,l=hr.transition;hr.transition=null;try{H=4,Ao(e,t,n,r)}finally{H=s,hr.transition=l}}function Ao(e,t,n,r){if(Mi){var s=_a(e,t,n,r);if(s===null)Hl(e,t,r,Li,n),Hu(e,r);else if(Em(s,e,t,n,r))r.stopPropagation();else if(Hu(e,r),t&4&&-1<Cm.indexOf(e)){for(;s!==null;){var l=Bs(s);if(l!==null&&hf(l),l=_a(e,t,n,r),l===null&&Hl(e,t,r,Li,n),l===s)break;s=l}s!==null&&r.stopPropagation()}else Hl(e,t,r,null,n)}}var Li=null;function _a(e,t,n,r){if(Li=null,e=Io(r),e=En(e),e!==null)if(t=Vn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=sf(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Li=e,null}function yf(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(vm()){case Mo:return 1;case uf:return 4;case Oi:case gm:return 16;case cf:return 536870912;default:return 16}default:return 16}}var tn=null,zo=null,xi=null;function xf(){if(xi)return xi;var e,t=zo,n=t.length,r,s="value"in tn?tn.value:tn.textContent,l=s.length;for(e=0;e<n&&t[e]===s[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===s[l-r];r++);return xi=s.slice(e,1<r?1-r:void 0)}function ji(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 ti(){return!0}function qu(){return!1}function qe(e){function t(n,r,s,l,a){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=l,this.target=a,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(n=e[o],this[o]=n?n(l):l[o]);return this.isDefaultPrevented=(l.defaultPrevented!=null?l.defaultPrevented:l.returnValue===!1)?ti:qu,this.isPropagationStopped=qu,this}return ee(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=ti)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ti)},persist:function(){},isPersistent:ti}),t}var zr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Do=qe(zr),$s=ee({},zr,{view:0,detail:0}),bm=qe($s),Fl,Al,qr,il=ee({},$s,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Uo,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!==qr&&(qr&&e.type==="mousemove"?(Fl=e.screenX-qr.screenX,Al=e.screenY-qr.screenY):Al=Fl=0,qr=e),Fl)},movementY:function(e){return"movementY"in e?e.movementY:Al}}),Vu=qe(il),Tm=ee({},il,{dataTransfer:0}),Om=qe(Tm),Im=ee({},$s,{relatedTarget:0}),zl=qe(Im),Mm=ee({},zr,{animationName:0,elapsedTime:0,pseudoElement:0}),Lm=qe(Mm),Fm=ee({},zr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Am=qe(Fm),zm=ee({},zr,{data:0}),Gu=qe(zm),Dm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Um={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"},$m={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Bm(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=$m[e])?!!t[e]:!1}function Uo(){return Bm}var Qm=ee({},$s,{key:function(e){if(e.key){var t=Dm[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ji(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Um[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Uo,charCode:function(e){return e.type==="keypress"?ji(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ji(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Wm=qe(Qm),Hm=ee({},il,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ju=qe(Hm),Km=ee({},$s,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Uo}),qm=qe(Km),Vm=ee({},zr,{propertyName:0,elapsedTime:0,pseudoElement:0}),Gm=qe(Vm),Jm=ee({},il,{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}),Ym=qe(Jm),Xm=[9,13,27,32],$o=Tt&&"CompositionEvent"in window,ss=null;Tt&&"documentMode"in document&&(ss=document.documentMode);var Zm=Tt&&"TextEvent"in window&&!ss,jf=Tt&&(!$o||ss&&8<ss&&11>=ss),Yu=" ",Xu=!1;function wf(e,t){switch(e){case"keyup":return Xm.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Sf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var er=!1;function ev(e,t){switch(e){case"compositionend":return Sf(t);case"keypress":return t.which!==32?null:(Xu=!0,Yu);case"textInput":return e=t.data,e===Yu&&Xu?null:e;default:return null}}function tv(e,t){if(er)return e==="compositionend"||!$o&&wf(e,t)?(e=xf(),xi=zo=tn=null,er=!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 jf&&t.locale!=="ko"?null:t.data;default:return null}}var nv={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 Zu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!nv[e.type]:t==="textarea"}function Nf(e,t,n,r){Zd(r),t=Fi(t,"onChange"),0<t.length&&(n=new Do("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var is=null,gs=null;function rv(e){Mf(e,0)}function ll(e){var t=rr(e);if(Kd(t))return e}function sv(e,t){if(e==="change")return t}var kf=!1;if(Tt){var Dl;if(Tt){var Ul="oninput"in document;if(!Ul){var ec=document.createElement("div");ec.setAttribute("oninput","return;"),Ul=typeof ec.oninput=="function"}Dl=Ul}else Dl=!1;kf=Dl&&(!document.documentMode||9<document.documentMode)}function tc(){is&&(is.detachEvent("onpropertychange",Cf),gs=is=null)}function Cf(e){if(e.propertyName==="value"&&ll(gs)){var t=[];Nf(t,gs,e,Io(e)),rf(rv,t)}}function iv(e,t,n){e==="focusin"?(tc(),is=t,gs=n,is.attachEvent("onpropertychange",Cf)):e==="focusout"&&tc()}function lv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ll(gs)}function av(e,t){if(e==="click")return ll(t)}function ov(e,t){if(e==="input"||e==="change")return ll(t)}function uv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ut=typeof Object.is=="function"?Object.is:uv;function ys(e,t){if(ut(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!ca.call(t,s)||!ut(e[s],t[s]))return!1}return!0}function nc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function rc(e,t){var n=nc(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=nc(n)}}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 Pf(){for(var e=window,t=Ri();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ri(e.document)}return t}function Bo(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")}function cv(e){var t=Pf(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ef(n.ownerDocument.documentElement,n)){if(r!==null&&Bo(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,l=Math.min(r.start,s);r=r.end===void 0?l:Math.min(r.end,s),!e.extend&&l>r&&(s=r,r=l,l=s),s=rc(n,l);var a=rc(n,r);s&&a&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),l>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var dv=Tt&&"documentMode"in document&&11>=document.documentMode,tr=null,Ra=null,ls=null,ba=!1;function sc(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ba||tr==null||tr!==Ri(r)||(r=tr,"selectionStart"in r&&Bo(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ls&&ys(ls,r)||(ls=r,r=Fi(Ra,"onSelect"),0<r.length&&(t=new Do("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=tr)))}function ni(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var nr={animationend:ni("Animation","AnimationEnd"),animationiteration:ni("Animation","AnimationIteration"),animationstart:ni("Animation","AnimationStart"),transitionend:ni("Transition","TransitionEnd")},$l={},_f={};Tt&&(_f=document.createElement("div").style,"AnimationEvent"in window||(delete nr.animationend.animation,delete nr.animationiteration.animation,delete nr.animationstart.animation),"TransitionEvent"in window||delete nr.transitionend.transition);function al(e){if($l[e])return $l[e];if(!nr[e])return e;var t=nr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in _f)return $l[e]=t[n];return e}var Rf=al("animationend"),bf=al("animationiteration"),Tf=al("animationstart"),Of=al("transitionend"),If=new Map,ic="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function gn(e,t){If.set(e,t),qn(t,[e])}for(var Bl=0;Bl<ic.length;Bl++){var Ql=ic[Bl],fv=Ql.toLowerCase(),hv=Ql[0].toUpperCase()+Ql.slice(1);gn(fv,"on"+hv)}gn(Rf,"onAnimationEnd");gn(bf,"onAnimationIteration");gn(Tf,"onAnimationStart");gn("dblclick","onDoubleClick");gn("focusin","onFocus");gn("focusout","onBlur");gn(Of,"onTransitionEnd");_r("onMouseEnter",["mouseout","mouseover"]);_r("onMouseLeave",["mouseout","mouseover"]);_r("onPointerEnter",["pointerout","pointerover"]);_r("onPointerLeave",["pointerout","pointerover"]);qn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));qn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));qn("onBeforeInput",["compositionend","keypress","textInput","paste"]);qn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));qn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));qn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var es="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(" "),pv=new Set("cancel close invalid load scroll toggle".split(" ").concat(es));function lc(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,fm(r,t,void 0,e),e.currentTarget=null}function Mf(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var l=void 0;if(t)for(var a=r.length-1;0<=a;a--){var o=r[a],u=o.instance,d=o.currentTarget;if(o=o.listener,u!==l&&s.isPropagationStopped())break e;lc(s,o,d),l=u}else for(a=0;a<r.length;a++){if(o=r[a],u=o.instance,d=o.currentTarget,o=o.listener,u!==l&&s.isPropagationStopped())break e;lc(s,o,d),l=u}}}if(Ti)throw e=Ca,Ti=!1,Ca=null,e}function q(e,t){var n=t[La];n===void 0&&(n=t[La]=new Set);var r=e+"__bubble";n.has(r)||(Lf(t,e,2,!1),n.add(r))}function Wl(e,t,n){var r=0;t&&(r|=4),Lf(n,e,r,t)}var ri="_reactListening"+Math.random().toString(36).slice(2);function xs(e){if(!e[ri]){e[ri]=!0,$d.forEach(function(n){n!=="selectionchange"&&(pv.has(n)||Wl(n,!1,e),Wl(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ri]||(t[ri]=!0,Wl("selectionchange",!1,t))}}function Lf(e,t,n,r){switch(yf(t)){case 1:var s=_m;break;case 4:s=Rm;break;default:s=Ao}n=s.bind(null,t,n,e),s=void 0,!ka||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function Hl(e,t,n,r,s){var l=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var o=r.stateNode.containerInfo;if(o===s||o.nodeType===8&&o.parentNode===s)break;if(a===4)for(a=r.return;a!==null;){var u=a.tag;if((u===3||u===4)&&(u=a.stateNode.containerInfo,u===s||u.nodeType===8&&u.parentNode===s))return;a=a.return}for(;o!==null;){if(a=En(o),a===null)return;if(u=a.tag,u===5||u===6){r=l=a;continue e}o=o.parentNode}}r=r.return}rf(function(){var d=l,h=Io(n),p=[];e:{var g=If.get(e);if(g!==void 0){var m=Do,w=e;switch(e){case"keypress":if(ji(n)===0)break e;case"keydown":case"keyup":m=Wm;break;case"focusin":w="focus",m=zl;break;case"focusout":w="blur",m=zl;break;case"beforeblur":case"afterblur":m=zl;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=Vu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=Om;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=qm;break;case Rf:case bf:case Tf:m=Lm;break;case Of:m=Gm;break;case"scroll":m=bm;break;case"wheel":m=Ym;break;case"copy":case"cut":case"paste":m=Am;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=Ju}var j=(t&4)!==0,S=!j&&e==="scroll",c=j?g!==null?g+"Capture":null:g;j=[];for(var f=d,v;f!==null;){v=f;var y=v.stateNode;if(v.tag===5&&y!==null&&(v=y,c!==null&&(y=hs(f,c),y!=null&&j.push(js(f,y,v)))),S)break;f=f.return}0<j.length&&(g=new m(g,w,null,n,h),p.push({event:g,listeners:j}))}}if(!(t&7)){e:{if(g=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",g&&n!==Sa&&(w=n.relatedTarget||n.fromElement)&&(En(w)||w[Ot]))break e;if((m||g)&&(g=h.window===h?h:(g=h.ownerDocument)?g.defaultView||g.parentWindow:window,m?(w=n.relatedTarget||n.toElement,m=d,w=w?En(w):null,w!==null&&(S=Vn(w),w!==S||w.tag!==5&&w.tag!==6)&&(w=null)):(m=null,w=d),m!==w)){if(j=Vu,y="onMouseLeave",c="onMouseEnter",f="mouse",(e==="pointerout"||e==="pointerover")&&(j=Ju,y="onPointerLeave",c="onPointerEnter",f="pointer"),S=m==null?g:rr(m),v=w==null?g:rr(w),g=new j(y,f+"leave",m,n,h),g.target=S,g.relatedTarget=v,y=null,En(h)===d&&(j=new j(c,f+"enter",w,n,h),j.target=v,j.relatedTarget=S,y=j),S=y,m&&w)t:{for(j=m,c=w,f=0,v=j;v;v=Yn(v))f++;for(v=0,y=c;y;y=Yn(y))v++;for(;0<f-v;)j=Yn(j),f--;for(;0<v-f;)c=Yn(c),v--;for(;f--;){if(j===c||c!==null&&j===c.alternate)break t;j=Yn(j),c=Yn(c)}j=null}else j=null;m!==null&&ac(p,g,m,j,!1),w!==null&&S!==null&&ac(p,S,w,j,!0)}}e:{if(g=d?rr(d):window,m=g.nodeName&&g.nodeName.toLowerCase(),m==="select"||m==="input"&&g.type==="file")var k=sv;else if(Zu(g))if(kf)k=ov;else{k=lv;var E=iv}else(m=g.nodeName)&&m.toLowerCase()==="input"&&(g.type==="checkbox"||g.type==="radio")&&(k=av);if(k&&(k=k(e,d))){Nf(p,k,n,h);break e}E&&E(e,g,d),e==="focusout"&&(E=g._wrapperState)&&E.controlled&&g.type==="number"&&ga(g,"number",g.value)}switch(E=d?rr(d):window,e){case"focusin":(Zu(E)||E.contentEditable==="true")&&(tr=E,Ra=d,ls=null);break;case"focusout":ls=Ra=tr=null;break;case"mousedown":ba=!0;break;case"contextmenu":case"mouseup":case"dragend":ba=!1,sc(p,n,h);break;case"selectionchange":if(dv)break;case"keydown":case"keyup":sc(p,n,h)}var C;if($o)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else er?wf(e,n)&&(P="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(P="onCompositionStart");P&&(jf&&n.locale!=="ko"&&(er||P!=="onCompositionStart"?P==="onCompositionEnd"&&er&&(C=xf()):(tn=h,zo="value"in tn?tn.value:tn.textContent,er=!0)),E=Fi(d,P),0<E.length&&(P=new Gu(P,e,null,n,h),p.push({event:P,listeners:E}),C?P.data=C:(C=Sf(n),C!==null&&(P.data=C)))),(C=Zm?ev(e,n):tv(e,n))&&(d=Fi(d,"onBeforeInput"),0<d.length&&(h=new Gu("onBeforeInput","beforeinput",null,n,h),p.push({event:h,listeners:d}),h.data=C))}Mf(p,t)})}function js(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Fi(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,l=s.stateNode;s.tag===5&&l!==null&&(s=l,l=hs(e,n),l!=null&&r.unshift(js(e,l,s)),l=hs(e,t),l!=null&&r.push(js(e,l,s))),e=e.return}return r}function Yn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function ac(e,t,n,r,s){for(var l=t._reactName,a=[];n!==null&&n!==r;){var o=n,u=o.alternate,d=o.stateNode;if(u!==null&&u===r)break;o.tag===5&&d!==null&&(o=d,s?(u=hs(n,l),u!=null&&a.unshift(js(n,u,o))):s||(u=hs(n,l),u!=null&&a.push(js(n,u,o)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var mv=/\r\n?/g,vv=/\u0000|\uFFFD/g;function oc(e){return(typeof e=="string"?e:""+e).replace(mv,`
38
- `).replace(vv,"")}function si(e,t,n){if(t=oc(t),oc(e)!==t&&n)throw Error(_(425))}function Ai(){}var Ta=null,Oa=null;function Ia(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ma=typeof setTimeout=="function"?setTimeout:void 0,gv=typeof clearTimeout=="function"?clearTimeout:void 0,uc=typeof Promise=="function"?Promise:void 0,yv=typeof queueMicrotask=="function"?queueMicrotask:typeof uc<"u"?function(e){return uc.resolve(null).then(e).catch(xv)}:Ma;function xv(e){setTimeout(function(){throw e})}function Kl(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),vs(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);vs(t)}function on(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==="$?")break;if(t==="/$")return null}}return e}function cc(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Dr=Math.random().toString(36).slice(2),gt="__reactFiber$"+Dr,ws="__reactProps$"+Dr,Ot="__reactContainer$"+Dr,La="__reactEvents$"+Dr,jv="__reactListeners$"+Dr,wv="__reactHandles$"+Dr;function En(e){var t=e[gt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ot]||n[gt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=cc(e);e!==null;){if(n=e[gt])return n;e=cc(e)}return t}e=n,n=e.parentNode}return null}function Bs(e){return e=e[gt]||e[Ot],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function rr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(_(33))}function ol(e){return e[ws]||null}var Fa=[],sr=-1;function yn(e){return{current:e}}function V(e){0>sr||(e.current=Fa[sr],Fa[sr]=null,sr--)}function K(e,t){sr++,Fa[sr]=e.current,e.current=t}var vn={},Ce=yn(vn),Ae=yn(!1),$n=vn;function Rr(e,t){var n=e.type.contextTypes;if(!n)return vn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},l;for(l in n)s[l]=t[l];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function ze(e){return e=e.childContextTypes,e!=null}function zi(){V(Ae),V(Ce)}function dc(e,t,n){if(Ce.current!==vn)throw Error(_(168));K(Ce,t),K(Ae,n)}function Ff(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(_(108,im(e)||"Unknown",s));return ee({},n,r)}function Di(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||vn,$n=Ce.current,K(Ce,e),K(Ae,Ae.current),!0}function fc(e,t,n){var r=e.stateNode;if(!r)throw Error(_(169));n?(e=Ff(e,t,$n),r.__reactInternalMemoizedMergedChildContext=e,V(Ae),V(Ce),K(Ce,e)):V(Ae),K(Ae,n)}var St=null,ul=!1,ql=!1;function Af(e){St===null?St=[e]:St.push(e)}function Sv(e){ul=!0,Af(e)}function xn(){if(!ql&&St!==null){ql=!0;var e=0,t=H;try{var n=St;for(H=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}St=null,ul=!1}catch(s){throw St!==null&&(St=St.slice(e+1)),of(Mo,xn),s}finally{H=t,ql=!1}}return null}var ir=[],lr=0,Ui=null,$i=0,Je=[],Ye=0,Bn=null,Pt=1,_t="";function kn(e,t){ir[lr++]=$i,ir[lr++]=Ui,Ui=e,$i=t}function zf(e,t,n){Je[Ye++]=Pt,Je[Ye++]=_t,Je[Ye++]=Bn,Bn=e;var r=Pt;e=_t;var s=32-at(r)-1;r&=~(1<<s),n+=1;var l=32-at(t)+s;if(30<l){var a=s-s%5;l=(r&(1<<a)-1).toString(32),r>>=a,s-=a,Pt=1<<32-at(t)+s|n<<s|r,_t=l+e}else Pt=1<<l|n<<s|r,_t=e}function Qo(e){e.return!==null&&(kn(e,1),zf(e,1,0))}function Wo(e){for(;e===Ui;)Ui=ir[--lr],ir[lr]=null,$i=ir[--lr],ir[lr]=null;for(;e===Bn;)Bn=Je[--Ye],Je[Ye]=null,_t=Je[--Ye],Je[Ye]=null,Pt=Je[--Ye],Je[Ye]=null}var We=null,Qe=null,G=!1,lt=null;function Df(e,t){var n=Xe(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function hc(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,We=e,Qe=on(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,We=e,Qe=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Bn!==null?{id:Pt,overflow:_t}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Xe(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,We=e,Qe=null,!0):!1;default:return!1}}function Aa(e){return(e.mode&1)!==0&&(e.flags&128)===0}function za(e){if(G){var t=Qe;if(t){var n=t;if(!hc(e,t)){if(Aa(e))throw Error(_(418));t=on(n.nextSibling);var r=We;t&&hc(e,t)?Df(r,n):(e.flags=e.flags&-4097|2,G=!1,We=e)}}else{if(Aa(e))throw Error(_(418));e.flags=e.flags&-4097|2,G=!1,We=e}}}function pc(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;We=e}function ii(e){if(e!==We)return!1;if(!G)return pc(e),G=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ia(e.type,e.memoizedProps)),t&&(t=Qe)){if(Aa(e))throw Uf(),Error(_(418));for(;t;)Df(e,t),t=on(t.nextSibling)}if(pc(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(_(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Qe=on(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Qe=null}}else Qe=We?on(e.stateNode.nextSibling):null;return!0}function Uf(){for(var e=Qe;e;)e=on(e.nextSibling)}function br(){Qe=We=null,G=!1}function Ho(e){lt===null?lt=[e]:lt.push(e)}var Nv=Ft.ReactCurrentBatchConfig;function Vr(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(_(309));var r=n.stateNode}if(!r)throw Error(_(147,e));var s=r,l=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===l?t.ref:(t=function(a){var o=s.refs;a===null?delete o[l]:o[l]=a},t._stringRef=l,t)}if(typeof e!="string")throw Error(_(284));if(!n._owner)throw Error(_(290,e))}return e}function li(e,t){throw e=Object.prototype.toString.call(t),Error(_(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function mc(e){var t=e._init;return t(e._payload)}function $f(e){function t(c,f){if(e){var v=c.deletions;v===null?(c.deletions=[f],c.flags|=16):v.push(f)}}function n(c,f){if(!e)return null;for(;f!==null;)t(c,f),f=f.sibling;return null}function r(c,f){for(c=new Map;f!==null;)f.key!==null?c.set(f.key,f):c.set(f.index,f),f=f.sibling;return c}function s(c,f){return c=fn(c,f),c.index=0,c.sibling=null,c}function l(c,f,v){return c.index=v,e?(v=c.alternate,v!==null?(v=v.index,v<f?(c.flags|=2,f):v):(c.flags|=2,f)):(c.flags|=1048576,f)}function a(c){return e&&c.alternate===null&&(c.flags|=2),c}function o(c,f,v,y){return f===null||f.tag!==6?(f=ea(v,c.mode,y),f.return=c,f):(f=s(f,v),f.return=c,f)}function u(c,f,v,y){var k=v.type;return k===Zn?h(c,f,v.props.children,y,v.key):f!==null&&(f.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Bt&&mc(k)===f.type)?(y=s(f,v.props),y.ref=Vr(c,f,v),y.return=c,y):(y=Pi(v.type,v.key,v.props,null,c.mode,y),y.ref=Vr(c,f,v),y.return=c,y)}function d(c,f,v,y){return f===null||f.tag!==4||f.stateNode.containerInfo!==v.containerInfo||f.stateNode.implementation!==v.implementation?(f=ta(v,c.mode,y),f.return=c,f):(f=s(f,v.children||[]),f.return=c,f)}function h(c,f,v,y,k){return f===null||f.tag!==7?(f=Un(v,c.mode,y,k),f.return=c,f):(f=s(f,v),f.return=c,f)}function p(c,f,v){if(typeof f=="string"&&f!==""||typeof f=="number")return f=ea(""+f,c.mode,v),f.return=c,f;if(typeof f=="object"&&f!==null){switch(f.$$typeof){case Gs:return v=Pi(f.type,f.key,f.props,null,c.mode,v),v.ref=Vr(c,null,f),v.return=c,v;case Xn:return f=ta(f,c.mode,v),f.return=c,f;case Bt:var y=f._init;return p(c,y(f._payload),v)}if(Xr(f)||Qr(f))return f=Un(f,c.mode,v,null),f.return=c,f;li(c,f)}return null}function g(c,f,v,y){var k=f!==null?f.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return k!==null?null:o(c,f,""+v,y);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Gs:return v.key===k?u(c,f,v,y):null;case Xn:return v.key===k?d(c,f,v,y):null;case Bt:return k=v._init,g(c,f,k(v._payload),y)}if(Xr(v)||Qr(v))return k!==null?null:h(c,f,v,y,null);li(c,v)}return null}function m(c,f,v,y,k){if(typeof y=="string"&&y!==""||typeof y=="number")return c=c.get(v)||null,o(f,c,""+y,k);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Gs:return c=c.get(y.key===null?v:y.key)||null,u(f,c,y,k);case Xn:return c=c.get(y.key===null?v:y.key)||null,d(f,c,y,k);case Bt:var E=y._init;return m(c,f,v,E(y._payload),k)}if(Xr(y)||Qr(y))return c=c.get(v)||null,h(f,c,y,k,null);li(f,y)}return null}function w(c,f,v,y){for(var k=null,E=null,C=f,P=f=0,M=null;C!==null&&P<v.length;P++){C.index>P?(M=C,C=null):M=C.sibling;var I=g(c,C,v[P],y);if(I===null){C===null&&(C=M);break}e&&C&&I.alternate===null&&t(c,C),f=l(I,f,P),E===null?k=I:E.sibling=I,E=I,C=M}if(P===v.length)return n(c,C),G&&kn(c,P),k;if(C===null){for(;P<v.length;P++)C=p(c,v[P],y),C!==null&&(f=l(C,f,P),E===null?k=C:E.sibling=C,E=C);return G&&kn(c,P),k}for(C=r(c,C);P<v.length;P++)M=m(C,c,P,v[P],y),M!==null&&(e&&M.alternate!==null&&C.delete(M.key===null?P:M.key),f=l(M,f,P),E===null?k=M:E.sibling=M,E=M);return e&&C.forEach(function(te){return t(c,te)}),G&&kn(c,P),k}function j(c,f,v,y){var k=Qr(v);if(typeof k!="function")throw Error(_(150));if(v=k.call(v),v==null)throw Error(_(151));for(var E=k=null,C=f,P=f=0,M=null,I=v.next();C!==null&&!I.done;P++,I=v.next()){C.index>P?(M=C,C=null):M=C.sibling;var te=g(c,C,I.value,y);if(te===null){C===null&&(C=M);break}e&&C&&te.alternate===null&&t(c,C),f=l(te,f,P),E===null?k=te:E.sibling=te,E=te,C=M}if(I.done)return n(c,C),G&&kn(c,P),k;if(C===null){for(;!I.done;P++,I=v.next())I=p(c,I.value,y),I!==null&&(f=l(I,f,P),E===null?k=I:E.sibling=I,E=I);return G&&kn(c,P),k}for(C=r(c,C);!I.done;P++,I=v.next())I=m(C,c,P,I.value,y),I!==null&&(e&&I.alternate!==null&&C.delete(I.key===null?P:I.key),f=l(I,f,P),E===null?k=I:E.sibling=I,E=I);return e&&C.forEach(function(dt){return t(c,dt)}),G&&kn(c,P),k}function S(c,f,v,y){if(typeof v=="object"&&v!==null&&v.type===Zn&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Gs:e:{for(var k=v.key,E=f;E!==null;){if(E.key===k){if(k=v.type,k===Zn){if(E.tag===7){n(c,E.sibling),f=s(E,v.props.children),f.return=c,c=f;break e}}else if(E.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Bt&&mc(k)===E.type){n(c,E.sibling),f=s(E,v.props),f.ref=Vr(c,E,v),f.return=c,c=f;break e}n(c,E);break}else t(c,E);E=E.sibling}v.type===Zn?(f=Un(v.props.children,c.mode,y,v.key),f.return=c,c=f):(y=Pi(v.type,v.key,v.props,null,c.mode,y),y.ref=Vr(c,f,v),y.return=c,c=y)}return a(c);case Xn:e:{for(E=v.key;f!==null;){if(f.key===E)if(f.tag===4&&f.stateNode.containerInfo===v.containerInfo&&f.stateNode.implementation===v.implementation){n(c,f.sibling),f=s(f,v.children||[]),f.return=c,c=f;break e}else{n(c,f);break}else t(c,f);f=f.sibling}f=ta(v,c.mode,y),f.return=c,c=f}return a(c);case Bt:return E=v._init,S(c,f,E(v._payload),y)}if(Xr(v))return w(c,f,v,y);if(Qr(v))return j(c,f,v,y);li(c,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,f!==null&&f.tag===6?(n(c,f.sibling),f=s(f,v),f.return=c,c=f):(n(c,f),f=ea(v,c.mode,y),f.return=c,c=f),a(c)):n(c,f)}return S}var Tr=$f(!0),Bf=$f(!1),Bi=yn(null),Qi=null,ar=null,Ko=null;function qo(){Ko=ar=Qi=null}function Vo(e){var t=Bi.current;V(Bi),e._currentValue=t}function Da(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function pr(e,t){Qi=e,Ko=ar=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Fe=!0),e.firstContext=null)}function et(e){var t=e._currentValue;if(Ko!==e)if(e={context:e,memoizedValue:t,next:null},ar===null){if(Qi===null)throw Error(_(308));ar=e,Qi.dependencies={lanes:0,firstContext:e}}else ar=ar.next=e;return t}var Pn=null;function Go(e){Pn===null?Pn=[e]:Pn.push(e)}function Qf(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Go(t)):(n.next=s.next,s.next=n),t.interleaved=n,It(e,r)}function It(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Qt=!1;function Jo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Wf(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Rt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function un(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,B&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,It(e,n)}return s=r.interleaved,s===null?(t.next=t,Go(r)):(t.next=s.next,s.next=t),r.interleaved=t,It(e,n)}function wi(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Lo(e,n)}}function vc(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,l=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};l===null?s=l=a:l=l.next=a,n=n.next}while(n!==null);l===null?s=l=t:l=l.next=t}else s=l=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:l,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Wi(e,t,n,r){var s=e.updateQueue;Qt=!1;var l=s.firstBaseUpdate,a=s.lastBaseUpdate,o=s.shared.pending;if(o!==null){s.shared.pending=null;var u=o,d=u.next;u.next=null,a===null?l=d:a.next=d,a=u;var h=e.alternate;h!==null&&(h=h.updateQueue,o=h.lastBaseUpdate,o!==a&&(o===null?h.firstBaseUpdate=d:o.next=d,h.lastBaseUpdate=u))}if(l!==null){var p=s.baseState;a=0,h=d=u=null,o=l;do{var g=o.lane,m=o.eventTime;if((r&g)===g){h!==null&&(h=h.next={eventTime:m,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var w=e,j=o;switch(g=t,m=n,j.tag){case 1:if(w=j.payload,typeof w=="function"){p=w.call(m,p,g);break e}p=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=j.payload,g=typeof w=="function"?w.call(m,p,g):w,g==null)break e;p=ee({},p,g);break e;case 2:Qt=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,g=s.effects,g===null?s.effects=[o]:g.push(o))}else m={eventTime:m,lane:g,tag:o.tag,payload:o.payload,callback:o.callback,next:null},h===null?(d=h=m,u=p):h=h.next=m,a|=g;if(o=o.next,o===null){if(o=s.shared.pending,o===null)break;g=o,o=g.next,g.next=null,s.lastBaseUpdate=g,s.shared.pending=null}}while(!0);if(h===null&&(u=p),s.baseState=u,s.firstBaseUpdate=d,s.lastBaseUpdate=h,t=s.shared.interleaved,t!==null){s=t;do a|=s.lane,s=s.next;while(s!==t)}else l===null&&(s.shared.lanes=0);Wn|=a,e.lanes=a,e.memoizedState=p}}function gc(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(_(191,s));s.call(r)}}}var Qs={},xt=yn(Qs),Ss=yn(Qs),Ns=yn(Qs);function _n(e){if(e===Qs)throw Error(_(174));return e}function Yo(e,t){switch(K(Ns,t),K(Ss,e),K(xt,Qs),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:xa(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=xa(t,e)}V(xt),K(xt,t)}function Or(){V(xt),V(Ss),V(Ns)}function Hf(e){_n(Ns.current);var t=_n(xt.current),n=xa(t,e.type);t!==n&&(K(Ss,e),K(xt,n))}function Xo(e){Ss.current===e&&(V(xt),V(Ss))}var Y=yn(0);function Hi(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)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 Vl=[];function Zo(){for(var e=0;e<Vl.length;e++)Vl[e]._workInProgressVersionPrimary=null;Vl.length=0}var Si=Ft.ReactCurrentDispatcher,Gl=Ft.ReactCurrentBatchConfig,Qn=0,X=null,oe=null,he=null,Ki=!1,as=!1,ks=0,kv=0;function je(){throw Error(_(321))}function eu(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ut(e[n],t[n]))return!1;return!0}function tu(e,t,n,r,s,l){if(Qn=l,X=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Si.current=e===null||e.memoizedState===null?_v:Rv,e=n(r,s),as){l=0;do{if(as=!1,ks=0,25<=l)throw Error(_(301));l+=1,he=oe=null,t.updateQueue=null,Si.current=bv,e=n(r,s)}while(as)}if(Si.current=qi,t=oe!==null&&oe.next!==null,Qn=0,he=oe=X=null,Ki=!1,t)throw Error(_(300));return e}function nu(){var e=ks!==0;return ks=0,e}function ht(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return he===null?X.memoizedState=he=e:he=he.next=e,he}function tt(){if(oe===null){var e=X.alternate;e=e!==null?e.memoizedState:null}else e=oe.next;var t=he===null?X.memoizedState:he.next;if(t!==null)he=t,oe=e;else{if(e===null)throw Error(_(310));oe=e,e={memoizedState:oe.memoizedState,baseState:oe.baseState,baseQueue:oe.baseQueue,queue:oe.queue,next:null},he===null?X.memoizedState=he=e:he=he.next=e}return he}function Cs(e,t){return typeof t=="function"?t(e):t}function Jl(e){var t=tt(),n=t.queue;if(n===null)throw Error(_(311));n.lastRenderedReducer=e;var r=oe,s=r.baseQueue,l=n.pending;if(l!==null){if(s!==null){var a=s.next;s.next=l.next,l.next=a}r.baseQueue=s=l,n.pending=null}if(s!==null){l=s.next,r=r.baseState;var o=a=null,u=null,d=l;do{var h=d.lane;if((Qn&h)===h)u!==null&&(u=u.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),r=d.hasEagerState?d.eagerState:e(r,d.action);else{var p={lane:h,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};u===null?(o=u=p,a=r):u=u.next=p,X.lanes|=h,Wn|=h}d=d.next}while(d!==null&&d!==l);u===null?a=r:u.next=o,ut(r,t.memoizedState)||(Fe=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do l=s.lane,X.lanes|=l,Wn|=l,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Yl(e){var t=tt(),n=t.queue;if(n===null)throw Error(_(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,l=t.memoizedState;if(s!==null){n.pending=null;var a=s=s.next;do l=e(l,a.action),a=a.next;while(a!==s);ut(l,t.memoizedState)||(Fe=!0),t.memoizedState=l,t.baseQueue===null&&(t.baseState=l),n.lastRenderedState=l}return[l,r]}function Kf(){}function qf(e,t){var n=X,r=tt(),s=t(),l=!ut(r.memoizedState,s);if(l&&(r.memoizedState=s,Fe=!0),r=r.queue,ru(Jf.bind(null,n,r,e),[e]),r.getSnapshot!==t||l||he!==null&&he.memoizedState.tag&1){if(n.flags|=2048,Es(9,Gf.bind(null,n,r,s,t),void 0,null),pe===null)throw Error(_(349));Qn&30||Vf(n,t,s)}return s}function Vf(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=X.updateQueue,t===null?(t={lastEffect:null,stores:null},X.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Gf(e,t,n,r){t.value=n,t.getSnapshot=r,Yf(t)&&Xf(e)}function Jf(e,t,n){return n(function(){Yf(t)&&Xf(e)})}function Yf(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ut(e,n)}catch{return!0}}function Xf(e){var t=It(e,1);t!==null&&ot(t,e,1,-1)}function yc(e){var t=ht();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Cs,lastRenderedState:e},t.queue=e,e=e.dispatch=Pv.bind(null,X,e),[t.memoizedState,e]}function Es(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=X.updateQueue,t===null?(t={lastEffect:null,stores:null},X.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Zf(){return tt().memoizedState}function Ni(e,t,n,r){var s=ht();X.flags|=e,s.memoizedState=Es(1|t,n,void 0,r===void 0?null:r)}function cl(e,t,n,r){var s=tt();r=r===void 0?null:r;var l=void 0;if(oe!==null){var a=oe.memoizedState;if(l=a.destroy,r!==null&&eu(r,a.deps)){s.memoizedState=Es(t,n,l,r);return}}X.flags|=e,s.memoizedState=Es(1|t,n,l,r)}function xc(e,t){return Ni(8390656,8,e,t)}function ru(e,t){return cl(2048,8,e,t)}function eh(e,t){return cl(4,2,e,t)}function th(e,t){return cl(4,4,e,t)}function nh(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function rh(e,t,n){return n=n!=null?n.concat([e]):null,cl(4,4,nh.bind(null,t,e),n)}function su(){}function sh(e,t){var n=tt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&eu(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ih(e,t){var n=tt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&eu(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function lh(e,t,n){return Qn&21?(ut(n,t)||(n=df(),X.lanes|=n,Wn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Fe=!0),e.memoizedState=n)}function Cv(e,t){var n=H;H=n!==0&&4>n?n:4,e(!0);var r=Gl.transition;Gl.transition={};try{e(!1),t()}finally{H=n,Gl.transition=r}}function ah(){return tt().memoizedState}function Ev(e,t,n){var r=dn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},oh(e))uh(t,n);else if(n=Qf(e,t,n,r),n!==null){var s=Re();ot(n,e,r,s),ch(n,t,r)}}function Pv(e,t,n){var r=dn(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(oh(e))uh(t,s);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var a=t.lastRenderedState,o=l(a,n);if(s.hasEagerState=!0,s.eagerState=o,ut(o,a)){var u=t.interleaved;u===null?(s.next=s,Go(t)):(s.next=u.next,u.next=s),t.interleaved=s;return}}catch{}finally{}n=Qf(e,t,s,r),n!==null&&(s=Re(),ot(n,e,r,s),ch(n,t,r))}}function oh(e){var t=e.alternate;return e===X||t!==null&&t===X}function uh(e,t){as=Ki=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ch(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Lo(e,n)}}var qi={readContext:et,useCallback:je,useContext:je,useEffect:je,useImperativeHandle:je,useInsertionEffect:je,useLayoutEffect:je,useMemo:je,useReducer:je,useRef:je,useState:je,useDebugValue:je,useDeferredValue:je,useTransition:je,useMutableSource:je,useSyncExternalStore:je,useId:je,unstable_isNewReconciler:!1},_v={readContext:et,useCallback:function(e,t){return ht().memoizedState=[e,t===void 0?null:t],e},useContext:et,useEffect:xc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ni(4194308,4,nh.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ni(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ni(4,2,e,t)},useMemo:function(e,t){var n=ht();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ht();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Ev.bind(null,X,e),[r.memoizedState,e]},useRef:function(e){var t=ht();return e={current:e},t.memoizedState=e},useState:yc,useDebugValue:su,useDeferredValue:function(e){return ht().memoizedState=e},useTransition:function(){var e=yc(!1),t=e[0];return e=Cv.bind(null,e[1]),ht().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=X,s=ht();if(G){if(n===void 0)throw Error(_(407));n=n()}else{if(n=t(),pe===null)throw Error(_(349));Qn&30||Vf(r,t,n)}s.memoizedState=n;var l={value:n,getSnapshot:t};return s.queue=l,xc(Jf.bind(null,r,l,e),[e]),r.flags|=2048,Es(9,Gf.bind(null,r,l,n,t),void 0,null),n},useId:function(){var e=ht(),t=pe.identifierPrefix;if(G){var n=_t,r=Pt;n=(r&~(1<<32-at(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ks++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=kv++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Rv={readContext:et,useCallback:sh,useContext:et,useEffect:ru,useImperativeHandle:rh,useInsertionEffect:eh,useLayoutEffect:th,useMemo:ih,useReducer:Jl,useRef:Zf,useState:function(){return Jl(Cs)},useDebugValue:su,useDeferredValue:function(e){var t=tt();return lh(t,oe.memoizedState,e)},useTransition:function(){var e=Jl(Cs)[0],t=tt().memoizedState;return[e,t]},useMutableSource:Kf,useSyncExternalStore:qf,useId:ah,unstable_isNewReconciler:!1},bv={readContext:et,useCallback:sh,useContext:et,useEffect:ru,useImperativeHandle:rh,useInsertionEffect:eh,useLayoutEffect:th,useMemo:ih,useReducer:Yl,useRef:Zf,useState:function(){return Yl(Cs)},useDebugValue:su,useDeferredValue:function(e){var t=tt();return oe===null?t.memoizedState=e:lh(t,oe.memoizedState,e)},useTransition:function(){var e=Yl(Cs)[0],t=tt().memoizedState;return[e,t]},useMutableSource:Kf,useSyncExternalStore:qf,useId:ah,unstable_isNewReconciler:!1};function rt(e,t){if(e&&e.defaultProps){t=ee({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Ua(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ee({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var dl={isMounted:function(e){return(e=e._reactInternals)?Vn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Re(),s=dn(e),l=Rt(r,s);l.payload=t,n!=null&&(l.callback=n),t=un(e,l,s),t!==null&&(ot(t,e,s,r),wi(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Re(),s=dn(e),l=Rt(r,s);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=un(e,l,s),t!==null&&(ot(t,e,s,r),wi(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Re(),r=dn(e),s=Rt(n,r);s.tag=2,t!=null&&(s.callback=t),t=un(e,s,r),t!==null&&(ot(t,e,r,n),wi(t,e,r))}};function jc(e,t,n,r,s,l,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,l,a):t.prototype&&t.prototype.isPureReactComponent?!ys(n,r)||!ys(s,l):!0}function dh(e,t,n){var r=!1,s=vn,l=t.contextType;return typeof l=="object"&&l!==null?l=et(l):(s=ze(t)?$n:Ce.current,r=t.contextTypes,l=(r=r!=null)?Rr(e,s):vn),t=new t(n,l),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=dl,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=l),t}function wc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&dl.enqueueReplaceState(t,t.state,null)}function $a(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},Jo(e);var l=t.contextType;typeof l=="object"&&l!==null?s.context=et(l):(l=ze(t)?$n:Ce.current,s.context=Rr(e,l)),s.state=e.memoizedState,l=t.getDerivedStateFromProps,typeof l=="function"&&(Ua(e,t,l,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&dl.enqueueReplaceState(s,s.state,null),Wi(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Ir(e,t){try{var n="",r=t;do n+=sm(r),r=r.return;while(r);var s=n}catch(l){s=`
37
+ `+s[a].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=a&&0<=o);break}}}finally{Il=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Zr(e):""}function sm(e){switch(e.tag){case 5:return Zr(e.type);case 16:return Zr("Lazy");case 13:return Zr("Suspense");case 19:return Zr("SuspenseList");case 0:case 2:case 15:return e=Ol(e.type,!1),e;case 11:return e=Ol(e.type.render,!1),e;case 1:return e=Ol(e.type,!0),e;default:return""}}function pa(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Zn:return"Fragment";case Xn:return"Portal";case da:return"Profiler";case bo:return"StrictMode";case fa:return"Suspense";case ha:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Hd:return(e.displayName||"Context")+".Consumer";case Wd:return(e._context.displayName||"Context")+".Provider";case To:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Io:return t=e.displayName||null,t!==null?t:pa(e.type)||"Memo";case Bt:t=e._payload,e=e._init;try{return pa(e(t))}catch{}}return null}function im(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return pa(t);case 8:return t===bo?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function mn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function qd(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function lm(e){var t=qd(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,l=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(a){r=""+a,l.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ys(e){e._valueTracker||(e._valueTracker=lm(e))}function Vd(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=qd(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ri(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 ma(e,t){var n=t.checked;return ee({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Uu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=mn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Gd(e,t){t=t.checked,t!=null&&Ro(e,"checked",t,!1)}function va(e,t){Gd(e,t);var n=mn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ga(e,t.type,n):t.hasOwnProperty("defaultValue")&&ga(e,t.type,mn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function $u(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ga(e,t,n){(t!=="number"||Ri(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var es=Array.isArray;function cr(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+mn(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function ya(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(P(91));return ee({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Bu(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(P(92));if(es(n)){if(1<n.length)throw Error(P(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:mn(n)}}function Jd(e,t){var n=mn(t.value),r=mn(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Qu(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Yd(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function xa(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Yd(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Xs,Xd=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Xs=Xs||document.createElement("div"),Xs.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Xs.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ps(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ss={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},am=["Webkit","ms","Moz","O"];Object.keys(ss).forEach(function(e){am.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ss[t]=ss[e]})});function Zd(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ss.hasOwnProperty(e)&&ss[e]?(""+t).trim():t+"px"}function ef(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=Zd(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var om=ee({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ja(e,t){if(t){if(om[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(P(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(P(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(P(61))}if(t.style!=null&&typeof t.style!="object")throw Error(P(62))}}function wa(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 Sa=null;function Oo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Na=null,dr=null,fr=null;function Wu(e){if(e=Ws(e)){if(typeof Na!="function")throw Error(P(280));var t=e.stateNode;t&&(t=ol(t),Na(e.stateNode,e.type,t))}}function tf(e){dr?fr?fr.push(e):fr=[e]:dr=e}function nf(){if(dr){var e=dr,t=fr;if(fr=dr=null,Wu(e),t)for(e=0;e<t.length;e++)Wu(t[e])}}function rf(e,t){return e(t)}function sf(){}var Ml=!1;function lf(e,t,n){if(Ml)return e(t,n);Ml=!0;try{return rf(e,t,n)}finally{Ml=!1,(dr!==null||fr!==null)&&(sf(),nf())}}function ms(e,t){var n=e.stateNode;if(n===null)return null;var r=ol(n);if(r===null)return null;n=r[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":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(P(231,t,typeof n));return n}var ka=!1;if(Tt)try{var Hr={};Object.defineProperty(Hr,"passive",{get:function(){ka=!0}}),window.addEventListener("test",Hr,Hr),window.removeEventListener("test",Hr,Hr)}catch{ka=!1}function um(e,t,n,r,s,l,a,o,u){var d=Array.prototype.slice.call(arguments,3);try{t.apply(n,d)}catch(h){this.onError(h)}}var is=!1,bi=null,Ti=!1,Ca=null,cm={onError:function(e){is=!0,bi=e}};function dm(e,t,n,r,s,l,a,o,u){is=!1,bi=null,um.apply(cm,arguments)}function fm(e,t,n,r,s,l,a,o,u){if(dm.apply(this,arguments),is){if(is){var d=bi;is=!1,bi=null}else throw Error(P(198));Ti||(Ti=!0,Ca=d)}}function Vn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function af(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 Hu(e){if(Vn(e)!==e)throw Error(P(188))}function hm(e){var t=e.alternate;if(!t){if(t=Vn(e),t===null)throw Error(P(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var l=s.alternate;if(l===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===l.child){for(l=s.child;l;){if(l===n)return Hu(s),e;if(l===r)return Hu(s),t;l=l.sibling}throw Error(P(188))}if(n.return!==r.return)n=s,r=l;else{for(var a=!1,o=s.child;o;){if(o===n){a=!0,n=s,r=l;break}if(o===r){a=!0,r=s,n=l;break}o=o.sibling}if(!a){for(o=l.child;o;){if(o===n){a=!0,n=l,r=s;break}if(o===r){a=!0,r=l,n=s;break}o=o.sibling}if(!a)throw Error(P(189))}}if(n.alternate!==r)throw Error(P(190))}if(n.tag!==3)throw Error(P(188));return n.stateNode.current===n?e:t}function of(e){return e=hm(e),e!==null?uf(e):null}function uf(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=uf(e);if(t!==null)return t;e=e.sibling}return null}var cf=He.unstable_scheduleCallback,Ku=He.unstable_cancelCallback,pm=He.unstable_shouldYield,mm=He.unstable_requestPaint,ie=He.unstable_now,vm=He.unstable_getCurrentPriorityLevel,Mo=He.unstable_ImmediatePriority,df=He.unstable_UserBlockingPriority,Ii=He.unstable_NormalPriority,gm=He.unstable_LowPriority,ff=He.unstable_IdlePriority,sl=null,yt=null;function ym(e){if(yt&&typeof yt.onCommitFiberRoot=="function")try{yt.onCommitFiberRoot(sl,e,void 0,(e.current.flags&128)===128)}catch{}}var ot=Math.clz32?Math.clz32:wm,xm=Math.log,jm=Math.LN2;function wm(e){return e>>>=0,e===0?32:31-(xm(e)/jm|0)|0}var Zs=64,ei=4194304;function ts(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Oi(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,l=e.pingedLanes,a=n&268435455;if(a!==0){var o=a&~s;o!==0?r=ts(o):(l&=a,l!==0&&(r=ts(l)))}else a=n&~s,a!==0?r=ts(a):l!==0&&(r=ts(l));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,l=t&-t,s>=l||s===16&&(l&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-ot(t),s=1<<n,r|=e[n],t&=~s;return r}function Sm(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Nm(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,l=e.pendingLanes;0<l;){var a=31-ot(l),o=1<<a,u=s[a];u===-1?(!(o&n)||o&r)&&(s[a]=Sm(o,t)):u<=t&&(e.expiredLanes|=o),l&=~o}}function Ea(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function hf(){var e=Zs;return Zs<<=1,!(Zs&4194240)&&(Zs=64),e}function Ll(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Bs(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ot(t),e[t]=n}function km(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-ot(n),l=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~l}}function Lo(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ot(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var H=0;function pf(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var mf,Fo,vf,gf,yf,_a=!1,ti=[],sn=null,ln=null,an=null,vs=new Map,gs=new Map,Wt=[],Cm="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 submit".split(" ");function qu(e,t){switch(e){case"focusin":case"focusout":sn=null;break;case"dragenter":case"dragleave":ln=null;break;case"mouseover":case"mouseout":an=null;break;case"pointerover":case"pointerout":vs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":gs.delete(t.pointerId)}}function Kr(e,t,n,r,s,l){return e===null||e.nativeEvent!==l?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:l,targetContainers:[s]},t!==null&&(t=Ws(t),t!==null&&Fo(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function Em(e,t,n,r,s){switch(t){case"focusin":return sn=Kr(sn,e,t,n,r,s),!0;case"dragenter":return ln=Kr(ln,e,t,n,r,s),!0;case"mouseover":return an=Kr(an,e,t,n,r,s),!0;case"pointerover":var l=s.pointerId;return vs.set(l,Kr(vs.get(l)||null,e,t,n,r,s)),!0;case"gotpointercapture":return l=s.pointerId,gs.set(l,Kr(gs.get(l)||null,e,t,n,r,s)),!0}return!1}function xf(e){var t=En(e.target);if(t!==null){var n=Vn(t);if(n!==null){if(t=n.tag,t===13){if(t=af(n),t!==null){e.blockedOn=t,yf(e.priority,function(){vf(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function yi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Pa(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Sa=r,n.target.dispatchEvent(r),Sa=null}else return t=Ws(n),t!==null&&Fo(t),e.blockedOn=n,!1;t.shift()}return!0}function Vu(e,t,n){yi(e)&&n.delete(t)}function _m(){_a=!1,sn!==null&&yi(sn)&&(sn=null),ln!==null&&yi(ln)&&(ln=null),an!==null&&yi(an)&&(an=null),vs.forEach(Vu),gs.forEach(Vu)}function qr(e,t){e.blockedOn===t&&(e.blockedOn=null,_a||(_a=!0,He.unstable_scheduleCallback(He.unstable_NormalPriority,_m)))}function ys(e){function t(s){return qr(s,e)}if(0<ti.length){qr(ti[0],e);for(var n=1;n<ti.length;n++){var r=ti[n];r.blockedOn===e&&(r.blockedOn=null)}}for(sn!==null&&qr(sn,e),ln!==null&&qr(ln,e),an!==null&&qr(an,e),vs.forEach(t),gs.forEach(t),n=0;n<Wt.length;n++)r=Wt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Wt.length&&(n=Wt[0],n.blockedOn===null);)xf(n),n.blockedOn===null&&Wt.shift()}var hr=Ft.ReactCurrentBatchConfig,Mi=!0;function Pm(e,t,n,r){var s=H,l=hr.transition;hr.transition=null;try{H=1,Ao(e,t,n,r)}finally{H=s,hr.transition=l}}function Rm(e,t,n,r){var s=H,l=hr.transition;hr.transition=null;try{H=4,Ao(e,t,n,r)}finally{H=s,hr.transition=l}}function Ao(e,t,n,r){if(Mi){var s=Pa(e,t,n,r);if(s===null)Hl(e,t,r,Li,n),qu(e,r);else if(Em(s,e,t,n,r))r.stopPropagation();else if(qu(e,r),t&4&&-1<Cm.indexOf(e)){for(;s!==null;){var l=Ws(s);if(l!==null&&mf(l),l=Pa(e,t,n,r),l===null&&Hl(e,t,r,Li,n),l===s)break;s=l}s!==null&&r.stopPropagation()}else Hl(e,t,r,null,n)}}var Li=null;function Pa(e,t,n,r){if(Li=null,e=Oo(r),e=En(e),e!==null)if(t=Vn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=af(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Li=e,null}function jf(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(vm()){case Mo:return 1;case df:return 4;case Ii:case gm:return 16;case ff:return 536870912;default:return 16}default:return 16}}var tn=null,zo=null,xi=null;function wf(){if(xi)return xi;var e,t=zo,n=t.length,r,s="value"in tn?tn.value:tn.textContent,l=s.length;for(e=0;e<n&&t[e]===s[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===s[l-r];r++);return xi=s.slice(e,1<r?1-r:void 0)}function ji(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 ni(){return!0}function Gu(){return!1}function qe(e){function t(n,r,s,l,a){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=l,this.target=a,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(n=e[o],this[o]=n?n(l):l[o]);return this.isDefaultPrevented=(l.defaultPrevented!=null?l.defaultPrevented:l.returnValue===!1)?ni:Gu,this.isPropagationStopped=Gu,this}return ee(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=ni)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ni)},persist:function(){},isPersistent:ni}),t}var zr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Do=qe(zr),Qs=ee({},zr,{view:0,detail:0}),bm=qe(Qs),Fl,Al,Vr,il=ee({},Qs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Uo,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!==Vr&&(Vr&&e.type==="mousemove"?(Fl=e.screenX-Vr.screenX,Al=e.screenY-Vr.screenY):Al=Fl=0,Vr=e),Fl)},movementY:function(e){return"movementY"in e?e.movementY:Al}}),Ju=qe(il),Tm=ee({},il,{dataTransfer:0}),Im=qe(Tm),Om=ee({},Qs,{relatedTarget:0}),zl=qe(Om),Mm=ee({},zr,{animationName:0,elapsedTime:0,pseudoElement:0}),Lm=qe(Mm),Fm=ee({},zr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Am=qe(Fm),zm=ee({},zr,{data:0}),Yu=qe(zm),Dm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Um={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"},$m={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Bm(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=$m[e])?!!t[e]:!1}function Uo(){return Bm}var Qm=ee({},Qs,{key:function(e){if(e.key){var t=Dm[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ji(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Um[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Uo,charCode:function(e){return e.type==="keypress"?ji(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ji(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Wm=qe(Qm),Hm=ee({},il,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Xu=qe(Hm),Km=ee({},Qs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Uo}),qm=qe(Km),Vm=ee({},zr,{propertyName:0,elapsedTime:0,pseudoElement:0}),Gm=qe(Vm),Jm=ee({},il,{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}),Ym=qe(Jm),Xm=[9,13,27,32],$o=Tt&&"CompositionEvent"in window,ls=null;Tt&&"documentMode"in document&&(ls=document.documentMode);var Zm=Tt&&"TextEvent"in window&&!ls,Sf=Tt&&(!$o||ls&&8<ls&&11>=ls),Zu=" ",ec=!1;function Nf(e,t){switch(e){case"keyup":return Xm.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function kf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var er=!1;function ev(e,t){switch(e){case"compositionend":return kf(t);case"keypress":return t.which!==32?null:(ec=!0,Zu);case"textInput":return e=t.data,e===Zu&&ec?null:e;default:return null}}function tv(e,t){if(er)return e==="compositionend"||!$o&&Nf(e,t)?(e=wf(),xi=zo=tn=null,er=!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 Sf&&t.locale!=="ko"?null:t.data;default:return null}}var nv={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 tc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!nv[e.type]:t==="textarea"}function Cf(e,t,n,r){tf(r),t=Fi(t,"onChange"),0<t.length&&(n=new Do("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var as=null,xs=null;function rv(e){Ff(e,0)}function ll(e){var t=rr(e);if(Vd(t))return e}function sv(e,t){if(e==="change")return t}var Ef=!1;if(Tt){var Dl;if(Tt){var Ul="oninput"in document;if(!Ul){var nc=document.createElement("div");nc.setAttribute("oninput","return;"),Ul=typeof nc.oninput=="function"}Dl=Ul}else Dl=!1;Ef=Dl&&(!document.documentMode||9<document.documentMode)}function rc(){as&&(as.detachEvent("onpropertychange",_f),xs=as=null)}function _f(e){if(e.propertyName==="value"&&ll(xs)){var t=[];Cf(t,xs,e,Oo(e)),lf(rv,t)}}function iv(e,t,n){e==="focusin"?(rc(),as=t,xs=n,as.attachEvent("onpropertychange",_f)):e==="focusout"&&rc()}function lv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ll(xs)}function av(e,t){if(e==="click")return ll(t)}function ov(e,t){if(e==="input"||e==="change")return ll(t)}function uv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ct=typeof Object.is=="function"?Object.is:uv;function js(e,t){if(ct(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!ca.call(t,s)||!ct(e[s],t[s]))return!1}return!0}function sc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ic(e,t){var n=sc(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=sc(n)}}function Pf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Pf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Rf(){for(var e=window,t=Ri();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ri(e.document)}return t}function Bo(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")}function cv(e){var t=Rf(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Pf(n.ownerDocument.documentElement,n)){if(r!==null&&Bo(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,l=Math.min(r.start,s);r=r.end===void 0?l:Math.min(r.end,s),!e.extend&&l>r&&(s=r,r=l,l=s),s=ic(n,l);var a=ic(n,r);s&&a&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),l>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var dv=Tt&&"documentMode"in document&&11>=document.documentMode,tr=null,Ra=null,os=null,ba=!1;function lc(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ba||tr==null||tr!==Ri(r)||(r=tr,"selectionStart"in r&&Bo(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),os&&js(os,r)||(os=r,r=Fi(Ra,"onSelect"),0<r.length&&(t=new Do("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=tr)))}function ri(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var nr={animationend:ri("Animation","AnimationEnd"),animationiteration:ri("Animation","AnimationIteration"),animationstart:ri("Animation","AnimationStart"),transitionend:ri("Transition","TransitionEnd")},$l={},bf={};Tt&&(bf=document.createElement("div").style,"AnimationEvent"in window||(delete nr.animationend.animation,delete nr.animationiteration.animation,delete nr.animationstart.animation),"TransitionEvent"in window||delete nr.transitionend.transition);function al(e){if($l[e])return $l[e];if(!nr[e])return e;var t=nr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in bf)return $l[e]=t[n];return e}var Tf=al("animationend"),If=al("animationiteration"),Of=al("animationstart"),Mf=al("transitionend"),Lf=new Map,ac="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function gn(e,t){Lf.set(e,t),qn(t,[e])}for(var Bl=0;Bl<ac.length;Bl++){var Ql=ac[Bl],fv=Ql.toLowerCase(),hv=Ql[0].toUpperCase()+Ql.slice(1);gn(fv,"on"+hv)}gn(Tf,"onAnimationEnd");gn(If,"onAnimationIteration");gn(Of,"onAnimationStart");gn("dblclick","onDoubleClick");gn("focusin","onFocus");gn("focusout","onBlur");gn(Mf,"onTransitionEnd");Pr("onMouseEnter",["mouseout","mouseover"]);Pr("onMouseLeave",["mouseout","mouseover"]);Pr("onPointerEnter",["pointerout","pointerover"]);Pr("onPointerLeave",["pointerout","pointerover"]);qn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));qn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));qn("onBeforeInput",["compositionend","keypress","textInput","paste"]);qn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));qn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));qn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ns="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(" "),pv=new Set("cancel close invalid load scroll toggle".split(" ").concat(ns));function oc(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,fm(r,t,void 0,e),e.currentTarget=null}function Ff(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var l=void 0;if(t)for(var a=r.length-1;0<=a;a--){var o=r[a],u=o.instance,d=o.currentTarget;if(o=o.listener,u!==l&&s.isPropagationStopped())break e;oc(s,o,d),l=u}else for(a=0;a<r.length;a++){if(o=r[a],u=o.instance,d=o.currentTarget,o=o.listener,u!==l&&s.isPropagationStopped())break e;oc(s,o,d),l=u}}}if(Ti)throw e=Ca,Ti=!1,Ca=null,e}function q(e,t){var n=t[La];n===void 0&&(n=t[La]=new Set);var r=e+"__bubble";n.has(r)||(Af(t,e,2,!1),n.add(r))}function Wl(e,t,n){var r=0;t&&(r|=4),Af(n,e,r,t)}var si="_reactListening"+Math.random().toString(36).slice(2);function ws(e){if(!e[si]){e[si]=!0,Qd.forEach(function(n){n!=="selectionchange"&&(pv.has(n)||Wl(n,!1,e),Wl(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[si]||(t[si]=!0,Wl("selectionchange",!1,t))}}function Af(e,t,n,r){switch(jf(t)){case 1:var s=Pm;break;case 4:s=Rm;break;default:s=Ao}n=s.bind(null,t,n,e),s=void 0,!ka||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function Hl(e,t,n,r,s){var l=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var o=r.stateNode.containerInfo;if(o===s||o.nodeType===8&&o.parentNode===s)break;if(a===4)for(a=r.return;a!==null;){var u=a.tag;if((u===3||u===4)&&(u=a.stateNode.containerInfo,u===s||u.nodeType===8&&u.parentNode===s))return;a=a.return}for(;o!==null;){if(a=En(o),a===null)return;if(u=a.tag,u===5||u===6){r=l=a;continue e}o=o.parentNode}}r=r.return}lf(function(){var d=l,h=Oo(n),p=[];e:{var g=Lf.get(e);if(g!==void 0){var m=Do,w=e;switch(e){case"keypress":if(ji(n)===0)break e;case"keydown":case"keyup":m=Wm;break;case"focusin":w="focus",m=zl;break;case"focusout":w="blur",m=zl;break;case"beforeblur":case"afterblur":m=zl;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=Ju;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=Im;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=qm;break;case Tf:case If:case Of:m=Lm;break;case Mf:m=Gm;break;case"scroll":m=bm;break;case"wheel":m=Ym;break;case"copy":case"cut":case"paste":m=Am;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=Xu}var j=(t&4)!==0,S=!j&&e==="scroll",c=j?g!==null?g+"Capture":null:g;j=[];for(var f=d,v;f!==null;){v=f;var y=v.stateNode;if(v.tag===5&&y!==null&&(v=y,c!==null&&(y=ms(f,c),y!=null&&j.push(Ss(f,y,v)))),S)break;f=f.return}0<j.length&&(g=new m(g,w,null,n,h),p.push({event:g,listeners:j}))}}if(!(t&7)){e:{if(g=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",g&&n!==Sa&&(w=n.relatedTarget||n.fromElement)&&(En(w)||w[It]))break e;if((m||g)&&(g=h.window===h?h:(g=h.ownerDocument)?g.defaultView||g.parentWindow:window,m?(w=n.relatedTarget||n.toElement,m=d,w=w?En(w):null,w!==null&&(S=Vn(w),w!==S||w.tag!==5&&w.tag!==6)&&(w=null)):(m=null,w=d),m!==w)){if(j=Ju,y="onMouseLeave",c="onMouseEnter",f="mouse",(e==="pointerout"||e==="pointerover")&&(j=Xu,y="onPointerLeave",c="onPointerEnter",f="pointer"),S=m==null?g:rr(m),v=w==null?g:rr(w),g=new j(y,f+"leave",m,n,h),g.target=S,g.relatedTarget=v,y=null,En(h)===d&&(j=new j(c,f+"enter",w,n,h),j.target=v,j.relatedTarget=S,y=j),S=y,m&&w)t:{for(j=m,c=w,f=0,v=j;v;v=Yn(v))f++;for(v=0,y=c;y;y=Yn(y))v++;for(;0<f-v;)j=Yn(j),f--;for(;0<v-f;)c=Yn(c),v--;for(;f--;){if(j===c||c!==null&&j===c.alternate)break t;j=Yn(j),c=Yn(c)}j=null}else j=null;m!==null&&uc(p,g,m,j,!1),w!==null&&S!==null&&uc(p,S,w,j,!0)}}e:{if(g=d?rr(d):window,m=g.nodeName&&g.nodeName.toLowerCase(),m==="select"||m==="input"&&g.type==="file")var k=sv;else if(tc(g))if(Ef)k=ov;else{k=lv;var E=iv}else(m=g.nodeName)&&m.toLowerCase()==="input"&&(g.type==="checkbox"||g.type==="radio")&&(k=av);if(k&&(k=k(e,d))){Cf(p,k,n,h);break e}E&&E(e,g,d),e==="focusout"&&(E=g._wrapperState)&&E.controlled&&g.type==="number"&&ga(g,"number",g.value)}switch(E=d?rr(d):window,e){case"focusin":(tc(E)||E.contentEditable==="true")&&(tr=E,Ra=d,os=null);break;case"focusout":os=Ra=tr=null;break;case"mousedown":ba=!0;break;case"contextmenu":case"mouseup":case"dragend":ba=!1,lc(p,n,h);break;case"selectionchange":if(dv)break;case"keydown":case"keyup":lc(p,n,h)}var C;if($o)e:{switch(e){case"compositionstart":var _="onCompositionStart";break e;case"compositionend":_="onCompositionEnd";break e;case"compositionupdate":_="onCompositionUpdate";break e}_=void 0}else er?Nf(e,n)&&(_="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(_="onCompositionStart");_&&(Sf&&n.locale!=="ko"&&(er||_!=="onCompositionStart"?_==="onCompositionEnd"&&er&&(C=wf()):(tn=h,zo="value"in tn?tn.value:tn.textContent,er=!0)),E=Fi(d,_),0<E.length&&(_=new Yu(_,e,null,n,h),p.push({event:_,listeners:E}),C?_.data=C:(C=kf(n),C!==null&&(_.data=C)))),(C=Zm?ev(e,n):tv(e,n))&&(d=Fi(d,"onBeforeInput"),0<d.length&&(h=new Yu("onBeforeInput","beforeinput",null,n,h),p.push({event:h,listeners:d}),h.data=C))}Ff(p,t)})}function Ss(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Fi(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,l=s.stateNode;s.tag===5&&l!==null&&(s=l,l=ms(e,n),l!=null&&r.unshift(Ss(e,l,s)),l=ms(e,t),l!=null&&r.push(Ss(e,l,s))),e=e.return}return r}function Yn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function uc(e,t,n,r,s){for(var l=t._reactName,a=[];n!==null&&n!==r;){var o=n,u=o.alternate,d=o.stateNode;if(u!==null&&u===r)break;o.tag===5&&d!==null&&(o=d,s?(u=ms(n,l),u!=null&&a.unshift(Ss(n,u,o))):s||(u=ms(n,l),u!=null&&a.push(Ss(n,u,o)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var mv=/\r\n?/g,vv=/\u0000|\uFFFD/g;function cc(e){return(typeof e=="string"?e:""+e).replace(mv,`
38
+ `).replace(vv,"")}function ii(e,t,n){if(t=cc(t),cc(e)!==t&&n)throw Error(P(425))}function Ai(){}var Ta=null,Ia=null;function Oa(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ma=typeof setTimeout=="function"?setTimeout:void 0,gv=typeof clearTimeout=="function"?clearTimeout:void 0,dc=typeof Promise=="function"?Promise:void 0,yv=typeof queueMicrotask=="function"?queueMicrotask:typeof dc<"u"?function(e){return dc.resolve(null).then(e).catch(xv)}:Ma;function xv(e){setTimeout(function(){throw e})}function Kl(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),ys(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);ys(t)}function on(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==="$?")break;if(t==="/$")return null}}return e}function fc(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Dr=Math.random().toString(36).slice(2),gt="__reactFiber$"+Dr,Ns="__reactProps$"+Dr,It="__reactContainer$"+Dr,La="__reactEvents$"+Dr,jv="__reactListeners$"+Dr,wv="__reactHandles$"+Dr;function En(e){var t=e[gt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[It]||n[gt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=fc(e);e!==null;){if(n=e[gt])return n;e=fc(e)}return t}e=n,n=e.parentNode}return null}function Ws(e){return e=e[gt]||e[It],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function rr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(P(33))}function ol(e){return e[Ns]||null}var Fa=[],sr=-1;function yn(e){return{current:e}}function V(e){0>sr||(e.current=Fa[sr],Fa[sr]=null,sr--)}function K(e,t){sr++,Fa[sr]=e.current,e.current=t}var vn={},Ce=yn(vn),ze=yn(!1),$n=vn;function Rr(e,t){var n=e.type.contextTypes;if(!n)return vn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},l;for(l in n)s[l]=t[l];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function De(e){return e=e.childContextTypes,e!=null}function zi(){V(ze),V(Ce)}function hc(e,t,n){if(Ce.current!==vn)throw Error(P(168));K(Ce,t),K(ze,n)}function zf(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(P(108,im(e)||"Unknown",s));return ee({},n,r)}function Di(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||vn,$n=Ce.current,K(Ce,e),K(ze,ze.current),!0}function pc(e,t,n){var r=e.stateNode;if(!r)throw Error(P(169));n?(e=zf(e,t,$n),r.__reactInternalMemoizedMergedChildContext=e,V(ze),V(Ce),K(Ce,e)):V(ze),K(ze,n)}var St=null,ul=!1,ql=!1;function Df(e){St===null?St=[e]:St.push(e)}function Sv(e){ul=!0,Df(e)}function xn(){if(!ql&&St!==null){ql=!0;var e=0,t=H;try{var n=St;for(H=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}St=null,ul=!1}catch(s){throw St!==null&&(St=St.slice(e+1)),cf(Mo,xn),s}finally{H=t,ql=!1}}return null}var ir=[],lr=0,Ui=null,$i=0,Je=[],Ye=0,Bn=null,_t=1,Pt="";function kn(e,t){ir[lr++]=$i,ir[lr++]=Ui,Ui=e,$i=t}function Uf(e,t,n){Je[Ye++]=_t,Je[Ye++]=Pt,Je[Ye++]=Bn,Bn=e;var r=_t;e=Pt;var s=32-ot(r)-1;r&=~(1<<s),n+=1;var l=32-ot(t)+s;if(30<l){var a=s-s%5;l=(r&(1<<a)-1).toString(32),r>>=a,s-=a,_t=1<<32-ot(t)+s|n<<s|r,Pt=l+e}else _t=1<<l|n<<s|r,Pt=e}function Qo(e){e.return!==null&&(kn(e,1),Uf(e,1,0))}function Wo(e){for(;e===Ui;)Ui=ir[--lr],ir[lr]=null,$i=ir[--lr],ir[lr]=null;for(;e===Bn;)Bn=Je[--Ye],Je[Ye]=null,Pt=Je[--Ye],Je[Ye]=null,_t=Je[--Ye],Je[Ye]=null}var We=null,Qe=null,G=!1,at=null;function $f(e,t){var n=Xe(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function mc(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,We=e,Qe=on(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,We=e,Qe=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Bn!==null?{id:_t,overflow:Pt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Xe(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,We=e,Qe=null,!0):!1;default:return!1}}function Aa(e){return(e.mode&1)!==0&&(e.flags&128)===0}function za(e){if(G){var t=Qe;if(t){var n=t;if(!mc(e,t)){if(Aa(e))throw Error(P(418));t=on(n.nextSibling);var r=We;t&&mc(e,t)?$f(r,n):(e.flags=e.flags&-4097|2,G=!1,We=e)}}else{if(Aa(e))throw Error(P(418));e.flags=e.flags&-4097|2,G=!1,We=e}}}function vc(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;We=e}function li(e){if(e!==We)return!1;if(!G)return vc(e),G=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Oa(e.type,e.memoizedProps)),t&&(t=Qe)){if(Aa(e))throw Bf(),Error(P(418));for(;t;)$f(e,t),t=on(t.nextSibling)}if(vc(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(P(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Qe=on(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Qe=null}}else Qe=We?on(e.stateNode.nextSibling):null;return!0}function Bf(){for(var e=Qe;e;)e=on(e.nextSibling)}function br(){Qe=We=null,G=!1}function Ho(e){at===null?at=[e]:at.push(e)}var Nv=Ft.ReactCurrentBatchConfig;function Gr(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(P(309));var r=n.stateNode}if(!r)throw Error(P(147,e));var s=r,l=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===l?t.ref:(t=function(a){var o=s.refs;a===null?delete o[l]:o[l]=a},t._stringRef=l,t)}if(typeof e!="string")throw Error(P(284));if(!n._owner)throw Error(P(290,e))}return e}function ai(e,t){throw e=Object.prototype.toString.call(t),Error(P(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function gc(e){var t=e._init;return t(e._payload)}function Qf(e){function t(c,f){if(e){var v=c.deletions;v===null?(c.deletions=[f],c.flags|=16):v.push(f)}}function n(c,f){if(!e)return null;for(;f!==null;)t(c,f),f=f.sibling;return null}function r(c,f){for(c=new Map;f!==null;)f.key!==null?c.set(f.key,f):c.set(f.index,f),f=f.sibling;return c}function s(c,f){return c=fn(c,f),c.index=0,c.sibling=null,c}function l(c,f,v){return c.index=v,e?(v=c.alternate,v!==null?(v=v.index,v<f?(c.flags|=2,f):v):(c.flags|=2,f)):(c.flags|=1048576,f)}function a(c){return e&&c.alternate===null&&(c.flags|=2),c}function o(c,f,v,y){return f===null||f.tag!==6?(f=ea(v,c.mode,y),f.return=c,f):(f=s(f,v),f.return=c,f)}function u(c,f,v,y){var k=v.type;return k===Zn?h(c,f,v.props.children,y,v.key):f!==null&&(f.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Bt&&gc(k)===f.type)?(y=s(f,v.props),y.ref=Gr(c,f,v),y.return=c,y):(y=_i(v.type,v.key,v.props,null,c.mode,y),y.ref=Gr(c,f,v),y.return=c,y)}function d(c,f,v,y){return f===null||f.tag!==4||f.stateNode.containerInfo!==v.containerInfo||f.stateNode.implementation!==v.implementation?(f=ta(v,c.mode,y),f.return=c,f):(f=s(f,v.children||[]),f.return=c,f)}function h(c,f,v,y,k){return f===null||f.tag!==7?(f=Un(v,c.mode,y,k),f.return=c,f):(f=s(f,v),f.return=c,f)}function p(c,f,v){if(typeof f=="string"&&f!==""||typeof f=="number")return f=ea(""+f,c.mode,v),f.return=c,f;if(typeof f=="object"&&f!==null){switch(f.$$typeof){case Js:return v=_i(f.type,f.key,f.props,null,c.mode,v),v.ref=Gr(c,null,f),v.return=c,v;case Xn:return f=ta(f,c.mode,v),f.return=c,f;case Bt:var y=f._init;return p(c,y(f._payload),v)}if(es(f)||Wr(f))return f=Un(f,c.mode,v,null),f.return=c,f;ai(c,f)}return null}function g(c,f,v,y){var k=f!==null?f.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return k!==null?null:o(c,f,""+v,y);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Js:return v.key===k?u(c,f,v,y):null;case Xn:return v.key===k?d(c,f,v,y):null;case Bt:return k=v._init,g(c,f,k(v._payload),y)}if(es(v)||Wr(v))return k!==null?null:h(c,f,v,y,null);ai(c,v)}return null}function m(c,f,v,y,k){if(typeof y=="string"&&y!==""||typeof y=="number")return c=c.get(v)||null,o(f,c,""+y,k);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Js:return c=c.get(y.key===null?v:y.key)||null,u(f,c,y,k);case Xn:return c=c.get(y.key===null?v:y.key)||null,d(f,c,y,k);case Bt:var E=y._init;return m(c,f,v,E(y._payload),k)}if(es(y)||Wr(y))return c=c.get(v)||null,h(f,c,y,k,null);ai(f,y)}return null}function w(c,f,v,y){for(var k=null,E=null,C=f,_=f=0,M=null;C!==null&&_<v.length;_++){C.index>_?(M=C,C=null):M=C.sibling;var O=g(c,C,v[_],y);if(O===null){C===null&&(C=M);break}e&&C&&O.alternate===null&&t(c,C),f=l(O,f,_),E===null?k=O:E.sibling=O,E=O,C=M}if(_===v.length)return n(c,C),G&&kn(c,_),k;if(C===null){for(;_<v.length;_++)C=p(c,v[_],y),C!==null&&(f=l(C,f,_),E===null?k=C:E.sibling=C,E=C);return G&&kn(c,_),k}for(C=r(c,C);_<v.length;_++)M=m(C,c,_,v[_],y),M!==null&&(e&&M.alternate!==null&&C.delete(M.key===null?_:M.key),f=l(M,f,_),E===null?k=M:E.sibling=M,E=M);return e&&C.forEach(function(te){return t(c,te)}),G&&kn(c,_),k}function j(c,f,v,y){var k=Wr(v);if(typeof k!="function")throw Error(P(150));if(v=k.call(v),v==null)throw Error(P(151));for(var E=k=null,C=f,_=f=0,M=null,O=v.next();C!==null&&!O.done;_++,O=v.next()){C.index>_?(M=C,C=null):M=C.sibling;var te=g(c,C,O.value,y);if(te===null){C===null&&(C=M);break}e&&C&&te.alternate===null&&t(c,C),f=l(te,f,_),E===null?k=te:E.sibling=te,E=te,C=M}if(O.done)return n(c,C),G&&kn(c,_),k;if(C===null){for(;!O.done;_++,O=v.next())O=p(c,O.value,y),O!==null&&(f=l(O,f,_),E===null?k=O:E.sibling=O,E=O);return G&&kn(c,_),k}for(C=r(c,C);!O.done;_++,O=v.next())O=m(C,c,_,O.value,y),O!==null&&(e&&O.alternate!==null&&C.delete(O.key===null?_:O.key),f=l(O,f,_),E===null?k=O:E.sibling=O,E=O);return e&&C.forEach(function(dt){return t(c,dt)}),G&&kn(c,_),k}function S(c,f,v,y){if(typeof v=="object"&&v!==null&&v.type===Zn&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Js:e:{for(var k=v.key,E=f;E!==null;){if(E.key===k){if(k=v.type,k===Zn){if(E.tag===7){n(c,E.sibling),f=s(E,v.props.children),f.return=c,c=f;break e}}else if(E.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Bt&&gc(k)===E.type){n(c,E.sibling),f=s(E,v.props),f.ref=Gr(c,E,v),f.return=c,c=f;break e}n(c,E);break}else t(c,E);E=E.sibling}v.type===Zn?(f=Un(v.props.children,c.mode,y,v.key),f.return=c,c=f):(y=_i(v.type,v.key,v.props,null,c.mode,y),y.ref=Gr(c,f,v),y.return=c,c=y)}return a(c);case Xn:e:{for(E=v.key;f!==null;){if(f.key===E)if(f.tag===4&&f.stateNode.containerInfo===v.containerInfo&&f.stateNode.implementation===v.implementation){n(c,f.sibling),f=s(f,v.children||[]),f.return=c,c=f;break e}else{n(c,f);break}else t(c,f);f=f.sibling}f=ta(v,c.mode,y),f.return=c,c=f}return a(c);case Bt:return E=v._init,S(c,f,E(v._payload),y)}if(es(v))return w(c,f,v,y);if(Wr(v))return j(c,f,v,y);ai(c,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,f!==null&&f.tag===6?(n(c,f.sibling),f=s(f,v),f.return=c,c=f):(n(c,f),f=ea(v,c.mode,y),f.return=c,c=f),a(c)):n(c,f)}return S}var Tr=Qf(!0),Wf=Qf(!1),Bi=yn(null),Qi=null,ar=null,Ko=null;function qo(){Ko=ar=Qi=null}function Vo(e){var t=Bi.current;V(Bi),e._currentValue=t}function Da(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function pr(e,t){Qi=e,Ko=ar=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ae=!0),e.firstContext=null)}function et(e){var t=e._currentValue;if(Ko!==e)if(e={context:e,memoizedValue:t,next:null},ar===null){if(Qi===null)throw Error(P(308));ar=e,Qi.dependencies={lanes:0,firstContext:e}}else ar=ar.next=e;return t}var _n=null;function Go(e){_n===null?_n=[e]:_n.push(e)}function Hf(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Go(t)):(n.next=s.next,s.next=n),t.interleaved=n,Ot(e,r)}function Ot(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Qt=!1;function Jo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Kf(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Rt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function un(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,B&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Ot(e,n)}return s=r.interleaved,s===null?(t.next=t,Go(r)):(t.next=s.next,s.next=t),r.interleaved=t,Ot(e,n)}function wi(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Lo(e,n)}}function yc(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,l=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};l===null?s=l=a:l=l.next=a,n=n.next}while(n!==null);l===null?s=l=t:l=l.next=t}else s=l=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:l,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Wi(e,t,n,r){var s=e.updateQueue;Qt=!1;var l=s.firstBaseUpdate,a=s.lastBaseUpdate,o=s.shared.pending;if(o!==null){s.shared.pending=null;var u=o,d=u.next;u.next=null,a===null?l=d:a.next=d,a=u;var h=e.alternate;h!==null&&(h=h.updateQueue,o=h.lastBaseUpdate,o!==a&&(o===null?h.firstBaseUpdate=d:o.next=d,h.lastBaseUpdate=u))}if(l!==null){var p=s.baseState;a=0,h=d=u=null,o=l;do{var g=o.lane,m=o.eventTime;if((r&g)===g){h!==null&&(h=h.next={eventTime:m,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var w=e,j=o;switch(g=t,m=n,j.tag){case 1:if(w=j.payload,typeof w=="function"){p=w.call(m,p,g);break e}p=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=j.payload,g=typeof w=="function"?w.call(m,p,g):w,g==null)break e;p=ee({},p,g);break e;case 2:Qt=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,g=s.effects,g===null?s.effects=[o]:g.push(o))}else m={eventTime:m,lane:g,tag:o.tag,payload:o.payload,callback:o.callback,next:null},h===null?(d=h=m,u=p):h=h.next=m,a|=g;if(o=o.next,o===null){if(o=s.shared.pending,o===null)break;g=o,o=g.next,g.next=null,s.lastBaseUpdate=g,s.shared.pending=null}}while(!0);if(h===null&&(u=p),s.baseState=u,s.firstBaseUpdate=d,s.lastBaseUpdate=h,t=s.shared.interleaved,t!==null){s=t;do a|=s.lane,s=s.next;while(s!==t)}else l===null&&(s.shared.lanes=0);Wn|=a,e.lanes=a,e.memoizedState=p}}function xc(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(P(191,s));s.call(r)}}}var Hs={},xt=yn(Hs),ks=yn(Hs),Cs=yn(Hs);function Pn(e){if(e===Hs)throw Error(P(174));return e}function Yo(e,t){switch(K(Cs,t),K(ks,e),K(xt,Hs),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:xa(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=xa(t,e)}V(xt),K(xt,t)}function Ir(){V(xt),V(ks),V(Cs)}function qf(e){Pn(Cs.current);var t=Pn(xt.current),n=xa(t,e.type);t!==n&&(K(ks,e),K(xt,n))}function Xo(e){ks.current===e&&(V(xt),V(ks))}var Y=yn(0);function Hi(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)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 Vl=[];function Zo(){for(var e=0;e<Vl.length;e++)Vl[e]._workInProgressVersionPrimary=null;Vl.length=0}var Si=Ft.ReactCurrentDispatcher,Gl=Ft.ReactCurrentBatchConfig,Qn=0,X=null,oe=null,he=null,Ki=!1,us=!1,Es=0,kv=0;function je(){throw Error(P(321))}function eu(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ct(e[n],t[n]))return!1;return!0}function tu(e,t,n,r,s,l){if(Qn=l,X=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Si.current=e===null||e.memoizedState===null?Pv:Rv,e=n(r,s),us){l=0;do{if(us=!1,Es=0,25<=l)throw Error(P(301));l+=1,he=oe=null,t.updateQueue=null,Si.current=bv,e=n(r,s)}while(us)}if(Si.current=qi,t=oe!==null&&oe.next!==null,Qn=0,he=oe=X=null,Ki=!1,t)throw Error(P(300));return e}function nu(){var e=Es!==0;return Es=0,e}function ht(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return he===null?X.memoizedState=he=e:he=he.next=e,he}function tt(){if(oe===null){var e=X.alternate;e=e!==null?e.memoizedState:null}else e=oe.next;var t=he===null?X.memoizedState:he.next;if(t!==null)he=t,oe=e;else{if(e===null)throw Error(P(310));oe=e,e={memoizedState:oe.memoizedState,baseState:oe.baseState,baseQueue:oe.baseQueue,queue:oe.queue,next:null},he===null?X.memoizedState=he=e:he=he.next=e}return he}function _s(e,t){return typeof t=="function"?t(e):t}function Jl(e){var t=tt(),n=t.queue;if(n===null)throw Error(P(311));n.lastRenderedReducer=e;var r=oe,s=r.baseQueue,l=n.pending;if(l!==null){if(s!==null){var a=s.next;s.next=l.next,l.next=a}r.baseQueue=s=l,n.pending=null}if(s!==null){l=s.next,r=r.baseState;var o=a=null,u=null,d=l;do{var h=d.lane;if((Qn&h)===h)u!==null&&(u=u.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),r=d.hasEagerState?d.eagerState:e(r,d.action);else{var p={lane:h,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};u===null?(o=u=p,a=r):u=u.next=p,X.lanes|=h,Wn|=h}d=d.next}while(d!==null&&d!==l);u===null?a=r:u.next=o,ct(r,t.memoizedState)||(Ae=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do l=s.lane,X.lanes|=l,Wn|=l,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Yl(e){var t=tt(),n=t.queue;if(n===null)throw Error(P(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,l=t.memoizedState;if(s!==null){n.pending=null;var a=s=s.next;do l=e(l,a.action),a=a.next;while(a!==s);ct(l,t.memoizedState)||(Ae=!0),t.memoizedState=l,t.baseQueue===null&&(t.baseState=l),n.lastRenderedState=l}return[l,r]}function Vf(){}function Gf(e,t){var n=X,r=tt(),s=t(),l=!ct(r.memoizedState,s);if(l&&(r.memoizedState=s,Ae=!0),r=r.queue,ru(Xf.bind(null,n,r,e),[e]),r.getSnapshot!==t||l||he!==null&&he.memoizedState.tag&1){if(n.flags|=2048,Ps(9,Yf.bind(null,n,r,s,t),void 0,null),pe===null)throw Error(P(349));Qn&30||Jf(n,t,s)}return s}function Jf(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=X.updateQueue,t===null?(t={lastEffect:null,stores:null},X.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Yf(e,t,n,r){t.value=n,t.getSnapshot=r,Zf(t)&&eh(e)}function Xf(e,t,n){return n(function(){Zf(t)&&eh(e)})}function Zf(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ct(e,n)}catch{return!0}}function eh(e){var t=Ot(e,1);t!==null&&ut(t,e,1,-1)}function jc(e){var t=ht();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:_s,lastRenderedState:e},t.queue=e,e=e.dispatch=_v.bind(null,X,e),[t.memoizedState,e]}function Ps(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=X.updateQueue,t===null?(t={lastEffect:null,stores:null},X.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function th(){return tt().memoizedState}function Ni(e,t,n,r){var s=ht();X.flags|=e,s.memoizedState=Ps(1|t,n,void 0,r===void 0?null:r)}function cl(e,t,n,r){var s=tt();r=r===void 0?null:r;var l=void 0;if(oe!==null){var a=oe.memoizedState;if(l=a.destroy,r!==null&&eu(r,a.deps)){s.memoizedState=Ps(t,n,l,r);return}}X.flags|=e,s.memoizedState=Ps(1|t,n,l,r)}function wc(e,t){return Ni(8390656,8,e,t)}function ru(e,t){return cl(2048,8,e,t)}function nh(e,t){return cl(4,2,e,t)}function rh(e,t){return cl(4,4,e,t)}function sh(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ih(e,t,n){return n=n!=null?n.concat([e]):null,cl(4,4,sh.bind(null,t,e),n)}function su(){}function lh(e,t){var n=tt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&eu(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ah(e,t){var n=tt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&eu(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function oh(e,t,n){return Qn&21?(ct(n,t)||(n=hf(),X.lanes|=n,Wn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ae=!0),e.memoizedState=n)}function Cv(e,t){var n=H;H=n!==0&&4>n?n:4,e(!0);var r=Gl.transition;Gl.transition={};try{e(!1),t()}finally{H=n,Gl.transition=r}}function uh(){return tt().memoizedState}function Ev(e,t,n){var r=dn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ch(e))dh(t,n);else if(n=Hf(e,t,n,r),n!==null){var s=be();ut(n,e,r,s),fh(n,t,r)}}function _v(e,t,n){var r=dn(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ch(e))dh(t,s);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var a=t.lastRenderedState,o=l(a,n);if(s.hasEagerState=!0,s.eagerState=o,ct(o,a)){var u=t.interleaved;u===null?(s.next=s,Go(t)):(s.next=u.next,u.next=s),t.interleaved=s;return}}catch{}finally{}n=Hf(e,t,s,r),n!==null&&(s=be(),ut(n,e,r,s),fh(n,t,r))}}function ch(e){var t=e.alternate;return e===X||t!==null&&t===X}function dh(e,t){us=Ki=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function fh(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Lo(e,n)}}var qi={readContext:et,useCallback:je,useContext:je,useEffect:je,useImperativeHandle:je,useInsertionEffect:je,useLayoutEffect:je,useMemo:je,useReducer:je,useRef:je,useState:je,useDebugValue:je,useDeferredValue:je,useTransition:je,useMutableSource:je,useSyncExternalStore:je,useId:je,unstable_isNewReconciler:!1},Pv={readContext:et,useCallback:function(e,t){return ht().memoizedState=[e,t===void 0?null:t],e},useContext:et,useEffect:wc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ni(4194308,4,sh.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ni(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ni(4,2,e,t)},useMemo:function(e,t){var n=ht();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ht();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Ev.bind(null,X,e),[r.memoizedState,e]},useRef:function(e){var t=ht();return e={current:e},t.memoizedState=e},useState:jc,useDebugValue:su,useDeferredValue:function(e){return ht().memoizedState=e},useTransition:function(){var e=jc(!1),t=e[0];return e=Cv.bind(null,e[1]),ht().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=X,s=ht();if(G){if(n===void 0)throw Error(P(407));n=n()}else{if(n=t(),pe===null)throw Error(P(349));Qn&30||Jf(r,t,n)}s.memoizedState=n;var l={value:n,getSnapshot:t};return s.queue=l,wc(Xf.bind(null,r,l,e),[e]),r.flags|=2048,Ps(9,Yf.bind(null,r,l,n,t),void 0,null),n},useId:function(){var e=ht(),t=pe.identifierPrefix;if(G){var n=Pt,r=_t;n=(r&~(1<<32-ot(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Es++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=kv++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Rv={readContext:et,useCallback:lh,useContext:et,useEffect:ru,useImperativeHandle:ih,useInsertionEffect:nh,useLayoutEffect:rh,useMemo:ah,useReducer:Jl,useRef:th,useState:function(){return Jl(_s)},useDebugValue:su,useDeferredValue:function(e){var t=tt();return oh(t,oe.memoizedState,e)},useTransition:function(){var e=Jl(_s)[0],t=tt().memoizedState;return[e,t]},useMutableSource:Vf,useSyncExternalStore:Gf,useId:uh,unstable_isNewReconciler:!1},bv={readContext:et,useCallback:lh,useContext:et,useEffect:ru,useImperativeHandle:ih,useInsertionEffect:nh,useLayoutEffect:rh,useMemo:ah,useReducer:Yl,useRef:th,useState:function(){return Yl(_s)},useDebugValue:su,useDeferredValue:function(e){var t=tt();return oe===null?t.memoizedState=e:oh(t,oe.memoizedState,e)},useTransition:function(){var e=Yl(_s)[0],t=tt().memoizedState;return[e,t]},useMutableSource:Vf,useSyncExternalStore:Gf,useId:uh,unstable_isNewReconciler:!1};function st(e,t){if(e&&e.defaultProps){t=ee({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Ua(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ee({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var dl={isMounted:function(e){return(e=e._reactInternals)?Vn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=be(),s=dn(e),l=Rt(r,s);l.payload=t,n!=null&&(l.callback=n),t=un(e,l,s),t!==null&&(ut(t,e,s,r),wi(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=be(),s=dn(e),l=Rt(r,s);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=un(e,l,s),t!==null&&(ut(t,e,s,r),wi(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=be(),r=dn(e),s=Rt(n,r);s.tag=2,t!=null&&(s.callback=t),t=un(e,s,r),t!==null&&(ut(t,e,r,n),wi(t,e,r))}};function Sc(e,t,n,r,s,l,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,l,a):t.prototype&&t.prototype.isPureReactComponent?!js(n,r)||!js(s,l):!0}function hh(e,t,n){var r=!1,s=vn,l=t.contextType;return typeof l=="object"&&l!==null?l=et(l):(s=De(t)?$n:Ce.current,r=t.contextTypes,l=(r=r!=null)?Rr(e,s):vn),t=new t(n,l),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=dl,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=l),t}function Nc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&dl.enqueueReplaceState(t,t.state,null)}function $a(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},Jo(e);var l=t.contextType;typeof l=="object"&&l!==null?s.context=et(l):(l=De(t)?$n:Ce.current,s.context=Rr(e,l)),s.state=e.memoizedState,l=t.getDerivedStateFromProps,typeof l=="function"&&(Ua(e,t,l,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&dl.enqueueReplaceState(s,s.state,null),Wi(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Or(e,t){try{var n="",r=t;do n+=sm(r),r=r.return;while(r);var s=n}catch(l){s=`
39
39
  Error generating stack: `+l.message+`
40
- `+l.stack}return{value:e,source:t,stack:s,digest:null}}function Xl(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Ba(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Tv=typeof WeakMap=="function"?WeakMap:Map;function fh(e,t,n){n=Rt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Gi||(Gi=!0,Xa=r),Ba(e,t)},n}function hh(e,t,n){n=Rt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){Ba(e,t)}}var l=e.stateNode;return l!==null&&typeof l.componentDidCatch=="function"&&(n.callback=function(){Ba(e,t),typeof r!="function"&&(cn===null?cn=new Set([this]):cn.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function Sc(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Tv;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=Hv.bind(null,e,t,n),t.then(e,e))}function Nc(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function kc(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Rt(-1,1),t.tag=2,un(n,t,1))),n.lanes|=1),e)}var Ov=Ft.ReactCurrentOwner,Fe=!1;function Pe(e,t,n,r){t.child=e===null?Bf(t,null,n,r):Tr(t,e.child,n,r)}function Cc(e,t,n,r,s){n=n.render;var l=t.ref;return pr(t,s),r=tu(e,t,n,r,l,s),n=nu(),e!==null&&!Fe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Mt(e,t,s)):(G&&n&&Qo(t),t.flags|=1,Pe(e,t,r,s),t.child)}function Ec(e,t,n,r,s){if(e===null){var l=n.type;return typeof l=="function"&&!fu(l)&&l.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=l,ph(e,t,l,r,s)):(e=Pi(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(l=e.child,!(e.lanes&s)){var a=l.memoizedProps;if(n=n.compare,n=n!==null?n:ys,n(a,r)&&e.ref===t.ref)return Mt(e,t,s)}return t.flags|=1,e=fn(l,r),e.ref=t.ref,e.return=t,t.child=e}function ph(e,t,n,r,s){if(e!==null){var l=e.memoizedProps;if(ys(l,r)&&e.ref===t.ref)if(Fe=!1,t.pendingProps=r=l,(e.lanes&s)!==0)e.flags&131072&&(Fe=!0);else return t.lanes=e.lanes,Mt(e,t,s)}return Qa(e,t,n,r,s)}function mh(e,t,n){var r=t.pendingProps,s=r.children,l=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},K(ur,$e),$e|=n;else{if(!(n&1073741824))return e=l!==null?l.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,K(ur,$e),$e|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=l!==null?l.baseLanes:n,K(ur,$e),$e|=r}else l!==null?(r=l.baseLanes|n,t.memoizedState=null):r=n,K(ur,$e),$e|=r;return Pe(e,t,s,n),t.child}function vh(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Qa(e,t,n,r,s){var l=ze(n)?$n:Ce.current;return l=Rr(t,l),pr(t,s),n=tu(e,t,n,r,l,s),r=nu(),e!==null&&!Fe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Mt(e,t,s)):(G&&r&&Qo(t),t.flags|=1,Pe(e,t,n,s),t.child)}function Pc(e,t,n,r,s){if(ze(n)){var l=!0;Di(t)}else l=!1;if(pr(t,s),t.stateNode===null)ki(e,t),dh(t,n,r),$a(t,n,r,s),r=!0;else if(e===null){var a=t.stateNode,o=t.memoizedProps;a.props=o;var u=a.context,d=n.contextType;typeof d=="object"&&d!==null?d=et(d):(d=ze(n)?$n:Ce.current,d=Rr(t,d));var h=n.getDerivedStateFromProps,p=typeof h=="function"||typeof a.getSnapshotBeforeUpdate=="function";p||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==r||u!==d)&&wc(t,a,r,d),Qt=!1;var g=t.memoizedState;a.state=g,Wi(t,r,a,s),u=t.memoizedState,o!==r||g!==u||Ae.current||Qt?(typeof h=="function"&&(Ua(t,n,h,r),u=t.memoizedState),(o=Qt||jc(t,n,o,r,g,u,d))?(p||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=d,r=o):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Wf(e,t),o=t.memoizedProps,d=t.type===t.elementType?o:rt(t.type,o),a.props=d,p=t.pendingProps,g=a.context,u=n.contextType,typeof u=="object"&&u!==null?u=et(u):(u=ze(n)?$n:Ce.current,u=Rr(t,u));var m=n.getDerivedStateFromProps;(h=typeof m=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==p||g!==u)&&wc(t,a,r,u),Qt=!1,g=t.memoizedState,a.state=g,Wi(t,r,a,s);var w=t.memoizedState;o!==p||g!==w||Ae.current||Qt?(typeof m=="function"&&(Ua(t,n,m,r),w=t.memoizedState),(d=Qt||jc(t,n,d,r,g,w,u)||!1)?(h||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,w,u),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,w,u)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||o===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=w),a.props=r,a.state=w,a.context=u,r=d):(typeof a.componentDidUpdate!="function"||o===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),r=!1)}return Wa(e,t,n,r,l,s)}function Wa(e,t,n,r,s,l){vh(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return s&&fc(t,n,!1),Mt(e,t,l);r=t.stateNode,Ov.current=t;var o=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Tr(t,e.child,null,l),t.child=Tr(t,null,o,l)):Pe(e,t,o,l),t.memoizedState=r.state,s&&fc(t,n,!0),t.child}function gh(e){var t=e.stateNode;t.pendingContext?dc(e,t.pendingContext,t.pendingContext!==t.context):t.context&&dc(e,t.context,!1),Yo(e,t.containerInfo)}function _c(e,t,n,r,s){return br(),Ho(s),t.flags|=256,Pe(e,t,n,r),t.child}var Ha={dehydrated:null,treeContext:null,retryLane:0};function Ka(e){return{baseLanes:e,cachePool:null,transitions:null}}function yh(e,t,n){var r=t.pendingProps,s=Y.current,l=!1,a=(t.flags&128)!==0,o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:(s&2)!==0),o?(l=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),K(Y,s&1),e===null)return za(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,l?(r=t.mode,l=t.child,a={mode:"hidden",children:a},!(r&1)&&l!==null?(l.childLanes=0,l.pendingProps=a):l=pl(a,r,0,null),e=Un(e,r,n,null),l.return=t,e.return=t,l.sibling=e,t.child=l,t.child.memoizedState=Ka(n),t.memoizedState=Ha,e):iu(t,a));if(s=e.memoizedState,s!==null&&(o=s.dehydrated,o!==null))return Iv(e,t,a,r,o,s,n);if(l){l=r.fallback,a=t.mode,s=e.child,o=s.sibling;var u={mode:"hidden",children:r.children};return!(a&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=fn(s,u),r.subtreeFlags=s.subtreeFlags&14680064),o!==null?l=fn(o,l):(l=Un(l,a,n,null),l.flags|=2),l.return=t,r.return=t,r.sibling=l,t.child=r,r=l,l=t.child,a=e.child.memoizedState,a=a===null?Ka(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},l.memoizedState=a,l.childLanes=e.childLanes&~n,t.memoizedState=Ha,r}return l=e.child,e=l.sibling,r=fn(l,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function iu(e,t){return t=pl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ai(e,t,n,r){return r!==null&&Ho(r),Tr(t,e.child,null,n),e=iu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Iv(e,t,n,r,s,l,a){if(n)return t.flags&256?(t.flags&=-257,r=Xl(Error(_(422))),ai(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(l=r.fallback,s=t.mode,r=pl({mode:"visible",children:r.children},s,0,null),l=Un(l,s,a,null),l.flags|=2,r.return=t,l.return=t,r.sibling=l,t.child=r,t.mode&1&&Tr(t,e.child,null,a),t.child.memoizedState=Ka(a),t.memoizedState=Ha,l);if(!(t.mode&1))return ai(e,t,a,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var o=r.dgst;return r=o,l=Error(_(419)),r=Xl(l,r,void 0),ai(e,t,a,r)}if(o=(a&e.childLanes)!==0,Fe||o){if(r=pe,r!==null){switch(a&-a){case 4:s=2;break;case 16:s=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|a)?0:s,s!==0&&s!==l.retryLane&&(l.retryLane=s,It(e,s),ot(r,e,s,-1))}return du(),r=Xl(Error(_(421))),ai(e,t,a,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=Kv.bind(null,e),s._reactRetry=t,null):(e=l.treeContext,Qe=on(s.nextSibling),We=t,G=!0,lt=null,e!==null&&(Je[Ye++]=Pt,Je[Ye++]=_t,Je[Ye++]=Bn,Pt=e.id,_t=e.overflow,Bn=t),t=iu(t,r.children),t.flags|=4096,t)}function Rc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Da(e.return,t,n)}function Zl(e,t,n,r,s){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=r,l.tail=n,l.tailMode=s)}function xh(e,t,n){var r=t.pendingProps,s=r.revealOrder,l=r.tail;if(Pe(e,t,r.children,n),r=Y.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Rc(e,n,t);else if(e.tag===19)Rc(e,n,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}r&=1}if(K(Y,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&Hi(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Zl(t,!1,s,n,l);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Hi(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Zl(t,!0,n,null,l);break;case"together":Zl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ki(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Mt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Wn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(_(153));if(t.child!==null){for(e=t.child,n=fn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=fn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Mv(e,t,n){switch(t.tag){case 3:gh(t),br();break;case 5:Hf(t);break;case 1:ze(t.type)&&Di(t);break;case 4:Yo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;K(Bi,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(K(Y,Y.current&1),t.flags|=128,null):n&t.child.childLanes?yh(e,t,n):(K(Y,Y.current&1),e=Mt(e,t,n),e!==null?e.sibling:null);K(Y,Y.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return xh(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),K(Y,Y.current),r)break;return null;case 22:case 23:return t.lanes=0,mh(e,t,n)}return Mt(e,t,n)}var jh,qa,wh,Sh;jh=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};qa=function(){};wh=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,_n(xt.current);var l=null;switch(n){case"input":s=ma(e,s),r=ma(e,r),l=[];break;case"select":s=ee({},s,{value:void 0}),r=ee({},r,{value:void 0}),l=[];break;case"textarea":s=ya(e,s),r=ya(e,r),l=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ai)}ja(n,r);var a;n=null;for(d in s)if(!r.hasOwnProperty(d)&&s.hasOwnProperty(d)&&s[d]!=null)if(d==="style"){var o=s[d];for(a in o)o.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(ds.hasOwnProperty(d)?l||(l=[]):(l=l||[]).push(d,null));for(d in r){var u=r[d];if(o=s!=null?s[d]:void 0,r.hasOwnProperty(d)&&u!==o&&(u!=null||o!=null))if(d==="style")if(o){for(a in o)!o.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in u)u.hasOwnProperty(a)&&o[a]!==u[a]&&(n||(n={}),n[a]=u[a])}else n||(l||(l=[]),l.push(d,n)),n=u;else d==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,o=o?o.__html:void 0,u!=null&&o!==u&&(l=l||[]).push(d,u)):d==="children"?typeof u!="string"&&typeof u!="number"||(l=l||[]).push(d,""+u):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(ds.hasOwnProperty(d)?(u!=null&&d==="onScroll"&&q("scroll",e),l||o===u||(l=[])):(l=l||[]).push(d,u))}n&&(l=l||[]).push("style",n);var d=l;(t.updateQueue=d)&&(t.flags|=4)}};Sh=function(e,t,n,r){n!==r&&(t.flags|=4)};function Gr(e,t){if(!G)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function we(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Lv(e,t,n){var r=t.pendingProps;switch(Wo(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return we(t),null;case 1:return ze(t.type)&&zi(),we(t),null;case 3:return r=t.stateNode,Or(),V(Ae),V(Ce),Zo(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ii(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,lt!==null&&(to(lt),lt=null))),qa(e,t),we(t),null;case 5:Xo(t);var s=_n(Ns.current);if(n=t.type,e!==null&&t.stateNode!=null)wh(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(_(166));return we(t),null}if(e=_n(xt.current),ii(t)){r=t.stateNode,n=t.type;var l=t.memoizedProps;switch(r[gt]=t,r[ws]=l,e=(t.mode&1)!==0,n){case"dialog":q("cancel",r),q("close",r);break;case"iframe":case"object":case"embed":q("load",r);break;case"video":case"audio":for(s=0;s<es.length;s++)q(es[s],r);break;case"source":q("error",r);break;case"img":case"image":case"link":q("error",r),q("load",r);break;case"details":q("toggle",r);break;case"input":zu(r,l),q("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!l.multiple},q("invalid",r);break;case"textarea":Uu(r,l),q("invalid",r)}ja(n,l),s=null;for(var a in l)if(l.hasOwnProperty(a)){var o=l[a];a==="children"?typeof o=="string"?r.textContent!==o&&(l.suppressHydrationWarning!==!0&&si(r.textContent,o,e),s=["children",o]):typeof o=="number"&&r.textContent!==""+o&&(l.suppressHydrationWarning!==!0&&si(r.textContent,o,e),s=["children",""+o]):ds.hasOwnProperty(a)&&o!=null&&a==="onScroll"&&q("scroll",r)}switch(n){case"input":Js(r),Du(r,l,!0);break;case"textarea":Js(r),$u(r);break;case"select":case"option":break;default:typeof l.onClick=="function"&&(r.onclick=Ai)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Gd(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[gt]=t,e[ws]=r,jh(e,t,!1,!1),t.stateNode=e;e:{switch(a=wa(n,r),n){case"dialog":q("cancel",e),q("close",e),s=r;break;case"iframe":case"object":case"embed":q("load",e),s=r;break;case"video":case"audio":for(s=0;s<es.length;s++)q(es[s],e);s=r;break;case"source":q("error",e),s=r;break;case"img":case"image":case"link":q("error",e),q("load",e),s=r;break;case"details":q("toggle",e),s=r;break;case"input":zu(e,r),s=ma(e,r),q("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=ee({},r,{value:void 0}),q("invalid",e);break;case"textarea":Uu(e,r),s=ya(e,r),q("invalid",e);break;default:s=r}ja(n,s),o=s;for(l in o)if(o.hasOwnProperty(l)){var u=o[l];l==="style"?Xd(e,u):l==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&Jd(e,u)):l==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&fs(e,u):typeof u=="number"&&fs(e,""+u):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(ds.hasOwnProperty(l)?u!=null&&l==="onScroll"&&q("scroll",e):u!=null&&Ro(e,l,u,a))}switch(n){case"input":Js(e),Du(e,r,!1);break;case"textarea":Js(e),$u(e);break;case"option":r.value!=null&&e.setAttribute("value",""+mn(r.value));break;case"select":e.multiple=!!r.multiple,l=r.value,l!=null?cr(e,!!r.multiple,l,!1):r.defaultValue!=null&&cr(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Ai)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return we(t),null;case 6:if(e&&t.stateNode!=null)Sh(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(_(166));if(n=_n(Ns.current),_n(xt.current),ii(t)){if(r=t.stateNode,n=t.memoizedProps,r[gt]=t,(l=r.nodeValue!==n)&&(e=We,e!==null))switch(e.tag){case 3:si(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&si(r.nodeValue,n,(e.mode&1)!==0)}l&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[gt]=t,t.stateNode=r}return we(t),null;case 13:if(V(Y),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(G&&Qe!==null&&t.mode&1&&!(t.flags&128))Uf(),br(),t.flags|=98560,l=!1;else if(l=ii(t),r!==null&&r.dehydrated!==null){if(e===null){if(!l)throw Error(_(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(_(317));l[gt]=t}else br(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;we(t),l=!1}else lt!==null&&(to(lt),lt=null),l=!0;if(!l)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Y.current&1?ce===0&&(ce=3):du())),t.updateQueue!==null&&(t.flags|=4),we(t),null);case 4:return Or(),qa(e,t),e===null&&xs(t.stateNode.containerInfo),we(t),null;case 10:return Vo(t.type._context),we(t),null;case 17:return ze(t.type)&&zi(),we(t),null;case 19:if(V(Y),l=t.memoizedState,l===null)return we(t),null;if(r=(t.flags&128)!==0,a=l.rendering,a===null)if(r)Gr(l,!1);else{if(ce!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=Hi(e),a!==null){for(t.flags|=128,Gr(l,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)l=n,e=r,l.flags&=14680066,a=l.alternate,a===null?(l.childLanes=0,l.lanes=e,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=a.childLanes,l.lanes=a.lanes,l.child=a.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=a.memoizedProps,l.memoizedState=a.memoizedState,l.updateQueue=a.updateQueue,l.type=a.type,e=a.dependencies,l.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return K(Y,Y.current&1|2),t.child}e=e.sibling}l.tail!==null&&ie()>Mr&&(t.flags|=128,r=!0,Gr(l,!1),t.lanes=4194304)}else{if(!r)if(e=Hi(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Gr(l,!0),l.tail===null&&l.tailMode==="hidden"&&!a.alternate&&!G)return we(t),null}else 2*ie()-l.renderingStartTime>Mr&&n!==1073741824&&(t.flags|=128,r=!0,Gr(l,!1),t.lanes=4194304);l.isBackwards?(a.sibling=t.child,t.child=a):(n=l.last,n!==null?n.sibling=a:t.child=a,l.last=a)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=ie(),t.sibling=null,n=Y.current,K(Y,r?n&1|2:n&1),t):(we(t),null);case 22:case 23:return cu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?$e&1073741824&&(we(t),t.subtreeFlags&6&&(t.flags|=8192)):we(t),null;case 24:return null;case 25:return null}throw Error(_(156,t.tag))}function Fv(e,t){switch(Wo(t),t.tag){case 1:return ze(t.type)&&zi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Or(),V(Ae),V(Ce),Zo(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Xo(t),null;case 13:if(V(Y),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(_(340));br()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return V(Y),null;case 4:return Or(),null;case 10:return Vo(t.type._context),null;case 22:case 23:return cu(),null;case 24:return null;default:return null}}var oi=!1,ke=!1,Av=typeof WeakSet=="function"?WeakSet:Set,b=null;function or(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){re(e,t,r)}else n.current=null}function Va(e,t,n){try{n()}catch(r){re(e,t,r)}}var bc=!1;function zv(e,t){if(Ta=Mi,e=Pf(),Bo(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,l=r.focusNode;r=r.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var a=0,o=-1,u=-1,d=0,h=0,p=e,g=null;t:for(;;){for(var m;p!==n||s!==0&&p.nodeType!==3||(o=a+s),p!==l||r!==0&&p.nodeType!==3||(u=a+r),p.nodeType===3&&(a+=p.nodeValue.length),(m=p.firstChild)!==null;)g=p,p=m;for(;;){if(p===e)break t;if(g===n&&++d===s&&(o=a),g===l&&++h===r&&(u=a),(m=p.nextSibling)!==null)break;p=g,g=p.parentNode}p=m}n=o===-1||u===-1?null:{start:o,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Oa={focusedElem:e,selectionRange:n},Mi=!1,b=t;b!==null;)if(t=b,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,b=e;else for(;b!==null;){t=b;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var j=w.memoizedProps,S=w.memoizedState,c=t.stateNode,f=c.getSnapshotBeforeUpdate(t.elementType===t.type?j:rt(t.type,j),S);c.__reactInternalSnapshotBeforeUpdate=f}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(_(163))}}catch(y){re(t,t.return,y)}if(e=t.sibling,e!==null){e.return=t.return,b=e;break}b=t.return}return w=bc,bc=!1,w}function os(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var l=s.destroy;s.destroy=void 0,l!==void 0&&Va(t,n,l)}s=s.next}while(s!==r)}}function fl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ga(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Nh(e){var t=e.alternate;t!==null&&(e.alternate=null,Nh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[gt],delete t[ws],delete t[La],delete t[jv],delete t[wv])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function kh(e){return e.tag===5||e.tag===3||e.tag===4}function Tc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||kh(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.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 Ja(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ai));else if(r!==4&&(e=e.child,e!==null))for(Ja(e,t,n),e=e.sibling;e!==null;)Ja(e,t,n),e=e.sibling}function Ya(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Ya(e,t,n),e=e.sibling;e!==null;)Ya(e,t,n),e=e.sibling}var me=null,it=!1;function Ut(e,t,n){for(n=n.child;n!==null;)Ch(e,t,n),n=n.sibling}function Ch(e,t,n){if(yt&&typeof yt.onCommitFiberUnmount=="function")try{yt.onCommitFiberUnmount(sl,n)}catch{}switch(n.tag){case 5:ke||or(n,t);case 6:var r=me,s=it;me=null,Ut(e,t,n),me=r,it=s,me!==null&&(it?(e=me,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):me.removeChild(n.stateNode));break;case 18:me!==null&&(it?(e=me,n=n.stateNode,e.nodeType===8?Kl(e.parentNode,n):e.nodeType===1&&Kl(e,n),vs(e)):Kl(me,n.stateNode));break;case 4:r=me,s=it,me=n.stateNode.containerInfo,it=!0,Ut(e,t,n),me=r,it=s;break;case 0:case 11:case 14:case 15:if(!ke&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var l=s,a=l.destroy;l=l.tag,a!==void 0&&(l&2||l&4)&&Va(n,t,a),s=s.next}while(s!==r)}Ut(e,t,n);break;case 1:if(!ke&&(or(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){re(n,t,o)}Ut(e,t,n);break;case 21:Ut(e,t,n);break;case 22:n.mode&1?(ke=(r=ke)||n.memoizedState!==null,Ut(e,t,n),ke=r):Ut(e,t,n);break;default:Ut(e,t,n)}}function Oc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Av),t.forEach(function(r){var s=qv.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function nt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var l=e,a=t,o=a;e:for(;o!==null;){switch(o.tag){case 5:me=o.stateNode,it=!1;break e;case 3:me=o.stateNode.containerInfo,it=!0;break e;case 4:me=o.stateNode.containerInfo,it=!0;break e}o=o.return}if(me===null)throw Error(_(160));Ch(l,a,s),me=null,it=!1;var u=s.alternate;u!==null&&(u.return=null),s.return=null}catch(d){re(s,t,d)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Eh(t,e),t=t.sibling}function Eh(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(nt(t,e),ft(e),r&4){try{os(3,e,e.return),fl(3,e)}catch(j){re(e,e.return,j)}try{os(5,e,e.return)}catch(j){re(e,e.return,j)}}break;case 1:nt(t,e),ft(e),r&512&&n!==null&&or(n,n.return);break;case 5:if(nt(t,e),ft(e),r&512&&n!==null&&or(n,n.return),e.flags&32){var s=e.stateNode;try{fs(s,"")}catch(j){re(e,e.return,j)}}if(r&4&&(s=e.stateNode,s!=null)){var l=e.memoizedProps,a=n!==null?n.memoizedProps:l,o=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{o==="input"&&l.type==="radio"&&l.name!=null&&qd(s,l),wa(o,a);var d=wa(o,l);for(a=0;a<u.length;a+=2){var h=u[a],p=u[a+1];h==="style"?Xd(s,p):h==="dangerouslySetInnerHTML"?Jd(s,p):h==="children"?fs(s,p):Ro(s,h,p,d)}switch(o){case"input":va(s,l);break;case"textarea":Vd(s,l);break;case"select":var g=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!l.multiple;var m=l.value;m!=null?cr(s,!!l.multiple,m,!1):g!==!!l.multiple&&(l.defaultValue!=null?cr(s,!!l.multiple,l.defaultValue,!0):cr(s,!!l.multiple,l.multiple?[]:"",!1))}s[ws]=l}catch(j){re(e,e.return,j)}}break;case 6:if(nt(t,e),ft(e),r&4){if(e.stateNode===null)throw Error(_(162));s=e.stateNode,l=e.memoizedProps;try{s.nodeValue=l}catch(j){re(e,e.return,j)}}break;case 3:if(nt(t,e),ft(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{vs(t.containerInfo)}catch(j){re(e,e.return,j)}break;case 4:nt(t,e),ft(e);break;case 13:nt(t,e),ft(e),s=e.child,s.flags&8192&&(l=s.memoizedState!==null,s.stateNode.isHidden=l,!l||s.alternate!==null&&s.alternate.memoizedState!==null||(ou=ie())),r&4&&Oc(e);break;case 22:if(h=n!==null&&n.memoizedState!==null,e.mode&1?(ke=(d=ke)||h,nt(t,e),ke=d):nt(t,e),ft(e),r&8192){if(d=e.memoizedState!==null,(e.stateNode.isHidden=d)&&!h&&e.mode&1)for(b=e,h=e.child;h!==null;){for(p=b=h;b!==null;){switch(g=b,m=g.child,g.tag){case 0:case 11:case 14:case 15:os(4,g,g.return);break;case 1:or(g,g.return);var w=g.stateNode;if(typeof w.componentWillUnmount=="function"){r=g,n=g.return;try{t=r,w.props=t.memoizedProps,w.state=t.memoizedState,w.componentWillUnmount()}catch(j){re(r,n,j)}}break;case 5:or(g,g.return);break;case 22:if(g.memoizedState!==null){Mc(p);continue}}m!==null?(m.return=g,b=m):Mc(p)}h=h.sibling}e:for(h=null,p=e;;){if(p.tag===5){if(h===null){h=p;try{s=p.stateNode,d?(l=s.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none"):(o=p.stateNode,u=p.memoizedProps.style,a=u!=null&&u.hasOwnProperty("display")?u.display:null,o.style.display=Yd("display",a))}catch(j){re(e,e.return,j)}}}else if(p.tag===6){if(h===null)try{p.stateNode.nodeValue=d?"":p.memoizedProps}catch(j){re(e,e.return,j)}}else if((p.tag!==22&&p.tag!==23||p.memoizedState===null||p===e)&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===e)break e;for(;p.sibling===null;){if(p.return===null||p.return===e)break e;h===p&&(h=null),p=p.return}h===p&&(h=null),p.sibling.return=p.return,p=p.sibling}}break;case 19:nt(t,e),ft(e),r&4&&Oc(e);break;case 21:break;default:nt(t,e),ft(e)}}function ft(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(kh(n)){var r=n;break e}n=n.return}throw Error(_(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(fs(s,""),r.flags&=-33);var l=Tc(e);Ya(e,l,s);break;case 3:case 4:var a=r.stateNode.containerInfo,o=Tc(e);Ja(e,o,a);break;default:throw Error(_(161))}}catch(u){re(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Dv(e,t,n){b=e,Ph(e)}function Ph(e,t,n){for(var r=(e.mode&1)!==0;b!==null;){var s=b,l=s.child;if(s.tag===22&&r){var a=s.memoizedState!==null||oi;if(!a){var o=s.alternate,u=o!==null&&o.memoizedState!==null||ke;o=oi;var d=ke;if(oi=a,(ke=u)&&!d)for(b=s;b!==null;)a=b,u=a.child,a.tag===22&&a.memoizedState!==null?Lc(s):u!==null?(u.return=a,b=u):Lc(s);for(;l!==null;)b=l,Ph(l),l=l.sibling;b=s,oi=o,ke=d}Ic(e)}else s.subtreeFlags&8772&&l!==null?(l.return=s,b=l):Ic(e)}}function Ic(e){for(;b!==null;){var t=b;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:ke||fl(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!ke)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:rt(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var l=t.updateQueue;l!==null&&gc(t,l,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}gc(t,a,n)}break;case 5:var o=t.stateNode;if(n===null&&t.flags&4){n=o;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var d=t.alternate;if(d!==null){var h=d.memoizedState;if(h!==null){var p=h.dehydrated;p!==null&&vs(p)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(_(163))}ke||t.flags&512&&Ga(t)}catch(g){re(t,t.return,g)}}if(t===e){b=null;break}if(n=t.sibling,n!==null){n.return=t.return,b=n;break}b=t.return}}function Mc(e){for(;b!==null;){var t=b;if(t===e){b=null;break}var n=t.sibling;if(n!==null){n.return=t.return,b=n;break}b=t.return}}function Lc(e){for(;b!==null;){var t=b;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{fl(4,t)}catch(u){re(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(u){re(t,s,u)}}var l=t.return;try{Ga(t)}catch(u){re(t,l,u)}break;case 5:var a=t.return;try{Ga(t)}catch(u){re(t,a,u)}}}catch(u){re(t,t.return,u)}if(t===e){b=null;break}var o=t.sibling;if(o!==null){o.return=t.return,b=o;break}b=t.return}}var Uv=Math.ceil,Vi=Ft.ReactCurrentDispatcher,lu=Ft.ReactCurrentOwner,Ze=Ft.ReactCurrentBatchConfig,B=0,pe=null,ae=null,ve=0,$e=0,ur=yn(0),ce=0,Ps=null,Wn=0,hl=0,au=0,us=null,Le=null,ou=0,Mr=1/0,wt=null,Gi=!1,Xa=null,cn=null,ui=!1,nn=null,Ji=0,cs=0,Za=null,Ci=-1,Ei=0;function Re(){return B&6?ie():Ci!==-1?Ci:Ci=ie()}function dn(e){return e.mode&1?B&2&&ve!==0?ve&-ve:Nv.transition!==null?(Ei===0&&(Ei=df()),Ei):(e=H,e!==0||(e=window.event,e=e===void 0?16:yf(e.type)),e):1}function ot(e,t,n,r){if(50<cs)throw cs=0,Za=null,Error(_(185));Us(e,n,r),(!(B&2)||e!==pe)&&(e===pe&&(!(B&2)&&(hl|=n),ce===4&&Ht(e,ve)),De(e,r),n===1&&B===0&&!(t.mode&1)&&(Mr=ie()+500,ul&&xn()))}function De(e,t){var n=e.callbackNode;Nm(e,t);var r=Ii(e,e===pe?ve:0);if(r===0)n!==null&&Wu(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Wu(n),t===1)e.tag===0?Sv(Fc.bind(null,e)):Af(Fc.bind(null,e)),yv(function(){!(B&6)&&xn()}),n=null;else{switch(ff(r)){case 1:n=Mo;break;case 4:n=uf;break;case 16:n=Oi;break;case 536870912:n=cf;break;default:n=Oi}n=Lh(n,_h.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function _h(e,t){if(Ci=-1,Ei=0,B&6)throw Error(_(327));var n=e.callbackNode;if(mr()&&e.callbackNode!==n)return null;var r=Ii(e,e===pe?ve:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Yi(e,r);else{t=r;var s=B;B|=2;var l=bh();(pe!==e||ve!==t)&&(wt=null,Mr=ie()+500,Dn(e,t));do try{Qv();break}catch(o){Rh(e,o)}while(!0);qo(),Vi.current=l,B=s,ae!==null?t=0:(pe=null,ve=0,t=ce)}if(t!==0){if(t===2&&(s=Ea(e),s!==0&&(r=s,t=eo(e,s))),t===1)throw n=Ps,Dn(e,0),Ht(e,r),De(e,ie()),n;if(t===6)Ht(e,r);else{if(s=e.current.alternate,!(r&30)&&!$v(s)&&(t=Yi(e,r),t===2&&(l=Ea(e),l!==0&&(r=l,t=eo(e,l))),t===1))throw n=Ps,Dn(e,0),Ht(e,r),De(e,ie()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(_(345));case 2:Cn(e,Le,wt);break;case 3:if(Ht(e,r),(r&130023424)===r&&(t=ou+500-ie(),10<t)){if(Ii(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){Re(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Ma(Cn.bind(null,e,Le,wt),t);break}Cn(e,Le,wt);break;case 4:if(Ht(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var a=31-at(r);l=1<<a,a=t[a],a>s&&(s=a),r&=~l}if(r=s,r=ie()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Uv(r/1960))-r,10<r){e.timeoutHandle=Ma(Cn.bind(null,e,Le,wt),r);break}Cn(e,Le,wt);break;case 5:Cn(e,Le,wt);break;default:throw Error(_(329))}}}return De(e,ie()),e.callbackNode===n?_h.bind(null,e):null}function eo(e,t){var n=us;return e.current.memoizedState.isDehydrated&&(Dn(e,t).flags|=256),e=Yi(e,t),e!==2&&(t=Le,Le=n,t!==null&&to(t)),e}function to(e){Le===null?Le=e:Le.push.apply(Le,e)}function $v(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],l=s.getSnapshot;s=s.value;try{if(!ut(l(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;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 Ht(e,t){for(t&=~au,t&=~hl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-at(t),r=1<<n;e[n]=-1,t&=~r}}function Fc(e){if(B&6)throw Error(_(327));mr();var t=Ii(e,0);if(!(t&1))return De(e,ie()),null;var n=Yi(e,t);if(e.tag!==0&&n===2){var r=Ea(e);r!==0&&(t=r,n=eo(e,r))}if(n===1)throw n=Ps,Dn(e,0),Ht(e,t),De(e,ie()),n;if(n===6)throw Error(_(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Cn(e,Le,wt),De(e,ie()),null}function uu(e,t){var n=B;B|=1;try{return e(t)}finally{B=n,B===0&&(Mr=ie()+500,ul&&xn())}}function Hn(e){nn!==null&&nn.tag===0&&!(B&6)&&mr();var t=B;B|=1;var n=Ze.transition,r=H;try{if(Ze.transition=null,H=1,e)return e()}finally{H=r,Ze.transition=n,B=t,!(B&6)&&xn()}}function cu(){$e=ur.current,V(ur)}function Dn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,gv(n)),ae!==null)for(n=ae.return;n!==null;){var r=n;switch(Wo(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&zi();break;case 3:Or(),V(Ae),V(Ce),Zo();break;case 5:Xo(r);break;case 4:Or();break;case 13:V(Y);break;case 19:V(Y);break;case 10:Vo(r.type._context);break;case 22:case 23:cu()}n=n.return}if(pe=e,ae=e=fn(e.current,null),ve=$e=t,ce=0,Ps=null,au=hl=Wn=0,Le=us=null,Pn!==null){for(t=0;t<Pn.length;t++)if(n=Pn[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,l=n.pending;if(l!==null){var a=l.next;l.next=s,r.next=a}n.pending=r}Pn=null}return e}function Rh(e,t){do{var n=ae;try{if(qo(),Si.current=qi,Ki){for(var r=X.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Ki=!1}if(Qn=0,he=oe=X=null,as=!1,ks=0,lu.current=null,n===null||n.return===null){ce=1,Ps=t,ae=null;break}e:{var l=e,a=n.return,o=n,u=t;if(t=ve,o.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var d=u,h=o,p=h.tag;if(!(h.mode&1)&&(p===0||p===11||p===15)){var g=h.alternate;g?(h.updateQueue=g.updateQueue,h.memoizedState=g.memoizedState,h.lanes=g.lanes):(h.updateQueue=null,h.memoizedState=null)}var m=Nc(a);if(m!==null){m.flags&=-257,kc(m,a,o,l,t),m.mode&1&&Sc(l,d,t),t=m,u=d;var w=t.updateQueue;if(w===null){var j=new Set;j.add(u),t.updateQueue=j}else w.add(u);break e}else{if(!(t&1)){Sc(l,d,t),du();break e}u=Error(_(426))}}else if(G&&o.mode&1){var S=Nc(a);if(S!==null){!(S.flags&65536)&&(S.flags|=256),kc(S,a,o,l,t),Ho(Ir(u,o));break e}}l=u=Ir(u,o),ce!==4&&(ce=2),us===null?us=[l]:us.push(l),l=a;do{switch(l.tag){case 3:l.flags|=65536,t&=-t,l.lanes|=t;var c=fh(l,u,t);vc(l,c);break e;case 1:o=u;var f=l.type,v=l.stateNode;if(!(l.flags&128)&&(typeof f.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(cn===null||!cn.has(v)))){l.flags|=65536,t&=-t,l.lanes|=t;var y=hh(l,o,t);vc(l,y);break e}}l=l.return}while(l!==null)}Oh(n)}catch(k){t=k,ae===n&&n!==null&&(ae=n=n.return);continue}break}while(!0)}function bh(){var e=Vi.current;return Vi.current=qi,e===null?qi:e}function du(){(ce===0||ce===3||ce===2)&&(ce=4),pe===null||!(Wn&268435455)&&!(hl&268435455)||Ht(pe,ve)}function Yi(e,t){var n=B;B|=2;var r=bh();(pe!==e||ve!==t)&&(wt=null,Dn(e,t));do try{Bv();break}catch(s){Rh(e,s)}while(!0);if(qo(),B=n,Vi.current=r,ae!==null)throw Error(_(261));return pe=null,ve=0,ce}function Bv(){for(;ae!==null;)Th(ae)}function Qv(){for(;ae!==null&&!pm();)Th(ae)}function Th(e){var t=Mh(e.alternate,e,$e);e.memoizedProps=e.pendingProps,t===null?Oh(e):ae=t,lu.current=null}function Oh(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Fv(n,t),n!==null){n.flags&=32767,ae=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ce=6,ae=null;return}}else if(n=Lv(n,t,$e),n!==null){ae=n;return}if(t=t.sibling,t!==null){ae=t;return}ae=t=e}while(t!==null);ce===0&&(ce=5)}function Cn(e,t,n){var r=H,s=Ze.transition;try{Ze.transition=null,H=1,Wv(e,t,n,r)}finally{Ze.transition=s,H=r}return null}function Wv(e,t,n,r){do mr();while(nn!==null);if(B&6)throw Error(_(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(_(177));e.callbackNode=null,e.callbackPriority=0;var l=n.lanes|n.childLanes;if(km(e,l),e===pe&&(ae=pe=null,ve=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||ui||(ui=!0,Lh(Oi,function(){return mr(),null})),l=(n.flags&15990)!==0,n.subtreeFlags&15990||l){l=Ze.transition,Ze.transition=null;var a=H;H=1;var o=B;B|=4,lu.current=null,zv(e,n),Eh(n,e),cv(Oa),Mi=!!Ta,Oa=Ta=null,e.current=n,Dv(n),mm(),B=o,H=a,Ze.transition=l}else e.current=n;if(ui&&(ui=!1,nn=e,Ji=s),l=e.pendingLanes,l===0&&(cn=null),ym(n.stateNode),De(e,ie()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Gi)throw Gi=!1,e=Xa,Xa=null,e;return Ji&1&&e.tag!==0&&mr(),l=e.pendingLanes,l&1?e===Za?cs++:(cs=0,Za=e):cs=0,xn(),null}function mr(){if(nn!==null){var e=ff(Ji),t=Ze.transition,n=H;try{if(Ze.transition=null,H=16>e?16:e,nn===null)var r=!1;else{if(e=nn,nn=null,Ji=0,B&6)throw Error(_(331));var s=B;for(B|=4,b=e.current;b!==null;){var l=b,a=l.child;if(b.flags&16){var o=l.deletions;if(o!==null){for(var u=0;u<o.length;u++){var d=o[u];for(b=d;b!==null;){var h=b;switch(h.tag){case 0:case 11:case 15:os(8,h,l)}var p=h.child;if(p!==null)p.return=h,b=p;else for(;b!==null;){h=b;var g=h.sibling,m=h.return;if(Nh(h),h===d){b=null;break}if(g!==null){g.return=m,b=g;break}b=m}}}var w=l.alternate;if(w!==null){var j=w.child;if(j!==null){w.child=null;do{var S=j.sibling;j.sibling=null,j=S}while(j!==null)}}b=l}}if(l.subtreeFlags&2064&&a!==null)a.return=l,b=a;else e:for(;b!==null;){if(l=b,l.flags&2048)switch(l.tag){case 0:case 11:case 15:os(9,l,l.return)}var c=l.sibling;if(c!==null){c.return=l.return,b=c;break e}b=l.return}}var f=e.current;for(b=f;b!==null;){a=b;var v=a.child;if(a.subtreeFlags&2064&&v!==null)v.return=a,b=v;else e:for(a=f;b!==null;){if(o=b,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:fl(9,o)}}catch(k){re(o,o.return,k)}if(o===a){b=null;break e}var y=o.sibling;if(y!==null){y.return=o.return,b=y;break e}b=o.return}}if(B=s,xn(),yt&&typeof yt.onPostCommitFiberRoot=="function")try{yt.onPostCommitFiberRoot(sl,e)}catch{}r=!0}return r}finally{H=n,Ze.transition=t}}return!1}function Ac(e,t,n){t=Ir(n,t),t=fh(e,t,1),e=un(e,t,1),t=Re(),e!==null&&(Us(e,1,t),De(e,t))}function re(e,t,n){if(e.tag===3)Ac(e,e,n);else for(;t!==null;){if(t.tag===3){Ac(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(cn===null||!cn.has(r))){e=Ir(n,e),e=hh(t,e,1),t=un(t,e,1),e=Re(),t!==null&&(Us(t,1,e),De(t,e));break}}t=t.return}}function Hv(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Re(),e.pingedLanes|=e.suspendedLanes&n,pe===e&&(ve&n)===n&&(ce===4||ce===3&&(ve&130023424)===ve&&500>ie()-ou?Dn(e,0):au|=n),De(e,t)}function Ih(e,t){t===0&&(e.mode&1?(t=Zs,Zs<<=1,!(Zs&130023424)&&(Zs=4194304)):t=1);var n=Re();e=It(e,t),e!==null&&(Us(e,t,n),De(e,n))}function Kv(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ih(e,n)}function qv(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(_(314))}r!==null&&r.delete(t),Ih(e,n)}var Mh;Mh=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ae.current)Fe=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Fe=!1,Mv(e,t,n);Fe=!!(e.flags&131072)}else Fe=!1,G&&t.flags&1048576&&zf(t,$i,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ki(e,t),e=t.pendingProps;var s=Rr(t,Ce.current);pr(t,n),s=tu(null,t,r,e,s,n);var l=nu();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ze(r)?(l=!0,Di(t)):l=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Jo(t),s.updater=dl,t.stateNode=s,s._reactInternals=t,$a(t,r,e,n),t=Wa(null,t,r,!0,l,n)):(t.tag=0,G&&l&&Qo(t),Pe(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ki(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=Gv(r),e=rt(r,e),s){case 0:t=Qa(null,t,r,e,n);break e;case 1:t=Pc(null,t,r,e,n);break e;case 11:t=Cc(null,t,r,e,n);break e;case 14:t=Ec(null,t,r,rt(r.type,e),n);break e}throw Error(_(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:rt(r,s),Qa(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:rt(r,s),Pc(e,t,r,s,n);case 3:e:{if(gh(t),e===null)throw Error(_(387));r=t.pendingProps,l=t.memoizedState,s=l.element,Wf(e,t),Wi(t,r,null,n);var a=t.memoizedState;if(r=a.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){s=Ir(Error(_(423)),t),t=_c(e,t,r,n,s);break e}else if(r!==s){s=Ir(Error(_(424)),t),t=_c(e,t,r,n,s);break e}else for(Qe=on(t.stateNode.containerInfo.firstChild),We=t,G=!0,lt=null,n=Bf(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(br(),r===s){t=Mt(e,t,n);break e}Pe(e,t,r,n)}t=t.child}return t;case 5:return Hf(t),e===null&&za(t),r=t.type,s=t.pendingProps,l=e!==null?e.memoizedProps:null,a=s.children,Ia(r,s)?a=null:l!==null&&Ia(r,l)&&(t.flags|=32),vh(e,t),Pe(e,t,a,n),t.child;case 6:return e===null&&za(t),null;case 13:return yh(e,t,n);case 4:return Yo(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Tr(t,null,r,n):Pe(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:rt(r,s),Cc(e,t,r,s,n);case 7:return Pe(e,t,t.pendingProps,n),t.child;case 8:return Pe(e,t,t.pendingProps.children,n),t.child;case 12:return Pe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,l=t.memoizedProps,a=s.value,K(Bi,r._currentValue),r._currentValue=a,l!==null)if(ut(l.value,a)){if(l.children===s.children&&!Ae.current){t=Mt(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var o=l.dependencies;if(o!==null){a=l.child;for(var u=o.firstContext;u!==null;){if(u.context===r){if(l.tag===1){u=Rt(-1,n&-n),u.tag=2;var d=l.updateQueue;if(d!==null){d=d.shared;var h=d.pending;h===null?u.next=u:(u.next=h.next,h.next=u),d.pending=u}}l.lanes|=n,u=l.alternate,u!==null&&(u.lanes|=n),Da(l.return,n,t),o.lanes|=n;break}u=u.next}}else if(l.tag===10)a=l.type===t.type?null:l.child;else if(l.tag===18){if(a=l.return,a===null)throw Error(_(341));a.lanes|=n,o=a.alternate,o!==null&&(o.lanes|=n),Da(a,n,t),a=l.sibling}else a=l.child;if(a!==null)a.return=l;else for(a=l;a!==null;){if(a===t){a=null;break}if(l=a.sibling,l!==null){l.return=a.return,a=l;break}a=a.return}l=a}Pe(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,pr(t,n),s=et(s),r=r(s),t.flags|=1,Pe(e,t,r,n),t.child;case 14:return r=t.type,s=rt(r,t.pendingProps),s=rt(r.type,s),Ec(e,t,r,s,n);case 15:return ph(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:rt(r,s),ki(e,t),t.tag=1,ze(r)?(e=!0,Di(t)):e=!1,pr(t,n),dh(t,r,s),$a(t,r,s,n),Wa(null,t,r,!0,e,n);case 19:return xh(e,t,n);case 22:return mh(e,t,n)}throw Error(_(156,t.tag))};function Lh(e,t){return of(e,t)}function Vv(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xe(e,t,n,r){return new Vv(e,t,n,r)}function fu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Gv(e){if(typeof e=="function")return fu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===To)return 11;if(e===Oo)return 14}return 2}function fn(e,t){var n=e.alternate;return n===null?(n=Xe(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Pi(e,t,n,r,s,l){var a=2;if(r=e,typeof e=="function")fu(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Zn:return Un(n.children,s,l,t);case bo:a=8,s|=8;break;case da:return e=Xe(12,n,t,s|2),e.elementType=da,e.lanes=l,e;case fa:return e=Xe(13,n,t,s),e.elementType=fa,e.lanes=l,e;case ha:return e=Xe(19,n,t,s),e.elementType=ha,e.lanes=l,e;case Wd:return pl(n,s,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Bd:a=10;break e;case Qd:a=9;break e;case To:a=11;break e;case Oo:a=14;break e;case Bt:a=16,r=null;break e}throw Error(_(130,e==null?e:typeof e,""))}return t=Xe(a,n,t,s),t.elementType=e,t.type=r,t.lanes=l,t}function Un(e,t,n,r){return e=Xe(7,e,r,t),e.lanes=n,e}function pl(e,t,n,r){return e=Xe(22,e,r,t),e.elementType=Wd,e.lanes=n,e.stateNode={isHidden:!1},e}function ea(e,t,n){return e=Xe(6,e,null,t),e.lanes=n,e}function ta(e,t,n){return t=Xe(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Jv(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ll(0),this.expirationTimes=Ll(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ll(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function hu(e,t,n,r,s,l,a,o,u){return e=new Jv(e,t,n,o,u),t===1?(t=1,l===!0&&(t|=8)):t=0,l=Xe(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Jo(l),e}function Yv(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Xn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Fh(e){if(!e)return vn;e=e._reactInternals;e:{if(Vn(e)!==e||e.tag!==1)throw Error(_(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(ze(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(_(171))}if(e.tag===1){var n=e.type;if(ze(n))return Ff(e,n,t)}return t}function Ah(e,t,n,r,s,l,a,o,u){return e=hu(n,r,!0,e,s,l,a,o,u),e.context=Fh(null),n=e.current,r=Re(),s=dn(n),l=Rt(r,s),l.callback=t??null,un(n,l,s),e.current.lanes=s,Us(e,s,r),De(e,r),e}function ml(e,t,n,r){var s=t.current,l=Re(),a=dn(s);return n=Fh(n),t.context===null?t.context=n:t.pendingContext=n,t=Rt(l,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=un(s,t,a),e!==null&&(ot(e,s,a,l),wi(e,s,a)),a}function Xi(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function zc(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function pu(e,t){zc(e,t),(e=e.alternate)&&zc(e,t)}function Xv(){return null}var zh=typeof reportError=="function"?reportError:function(e){console.error(e)};function mu(e){this._internalRoot=e}vl.prototype.render=mu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(_(409));ml(e,t,null,null)};vl.prototype.unmount=mu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Hn(function(){ml(null,e,null,null)}),t[Ot]=null}};function vl(e){this._internalRoot=e}vl.prototype.unstable_scheduleHydration=function(e){if(e){var t=mf();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Wt.length&&t!==0&&t<Wt[n].priority;n++);Wt.splice(n,0,e),n===0&&gf(e)}};function vu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function gl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Dc(){}function Zv(e,t,n,r,s){if(s){if(typeof r=="function"){var l=r;r=function(){var d=Xi(a);l.call(d)}}var a=Ah(t,r,e,0,null,!1,!1,"",Dc);return e._reactRootContainer=a,e[Ot]=a.current,xs(e.nodeType===8?e.parentNode:e),Hn(),a}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var o=r;r=function(){var d=Xi(u);o.call(d)}}var u=hu(e,0,!1,null,null,!1,!1,"",Dc);return e._reactRootContainer=u,e[Ot]=u.current,xs(e.nodeType===8?e.parentNode:e),Hn(function(){ml(t,u,n,r)}),u}function yl(e,t,n,r,s){var l=n._reactRootContainer;if(l){var a=l;if(typeof s=="function"){var o=s;s=function(){var u=Xi(a);o.call(u)}}ml(t,a,e,s)}else a=Zv(n,t,e,s,r);return Xi(a)}hf=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Zr(t.pendingLanes);n!==0&&(Lo(t,n|1),De(t,ie()),!(B&6)&&(Mr=ie()+500,xn()))}break;case 13:Hn(function(){var r=It(e,1);if(r!==null){var s=Re();ot(r,e,1,s)}}),pu(e,1)}};Fo=function(e){if(e.tag===13){var t=It(e,134217728);if(t!==null){var n=Re();ot(t,e,134217728,n)}pu(e,134217728)}};pf=function(e){if(e.tag===13){var t=dn(e),n=It(e,t);if(n!==null){var r=Re();ot(n,e,t,r)}pu(e,t)}};mf=function(){return H};vf=function(e,t){var n=H;try{return H=e,t()}finally{H=n}};Na=function(e,t,n){switch(t){case"input":if(va(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=ol(r);if(!s)throw Error(_(90));Kd(r),va(r,s)}}}break;case"textarea":Vd(e,n);break;case"select":t=n.value,t!=null&&cr(e,!!n.multiple,t,!1)}};tf=uu;nf=Hn;var eg={usingClientEntryPoint:!1,Events:[Bs,rr,ol,Zd,ef,uu]},Jr={findFiberByHostInstance:En,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},tg={bundleType:Jr.bundleType,version:Jr.version,rendererPackageName:Jr.rendererPackageName,rendererConfig:Jr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ft.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=lf(e),e===null?null:e.stateNode},findFiberByHostInstance:Jr.findFiberByHostInstance||Xv,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ci=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ci.isDisabled&&ci.supportsFiber)try{sl=ci.inject(tg),yt=ci}catch{}}Ke.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=eg;Ke.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!vu(t))throw Error(_(200));return Yv(e,t,null,n)};Ke.createRoot=function(e,t){if(!vu(e))throw Error(_(299));var n=!1,r="",s=zh;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=hu(e,1,!1,null,null,n,!1,r,s),e[Ot]=t.current,xs(e.nodeType===8?e.parentNode:e),new mu(t)};Ke.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(_(188)):(e=Object.keys(e).join(","),Error(_(268,e)));return e=lf(t),e=e===null?null:e.stateNode,e};Ke.flushSync=function(e){return Hn(e)};Ke.hydrate=function(e,t,n){if(!gl(t))throw Error(_(200));return yl(null,e,t,!0,n)};Ke.hydrateRoot=function(e,t,n){if(!vu(e))throw Error(_(405));var r=n!=null&&n.hydratedSources||null,s=!1,l="",a=zh;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=Ah(t,null,e,1,n??null,s,!1,l,a),e[Ot]=t.current,xs(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new vl(t)};Ke.render=function(e,t,n){if(!gl(t))throw Error(_(200));return yl(null,e,t,!1,n)};Ke.unmountComponentAtNode=function(e){if(!gl(e))throw Error(_(40));return e._reactRootContainer?(Hn(function(){yl(null,null,e,!1,function(){e._reactRootContainer=null,e[Ot]=null})}),!0):!1};Ke.unstable_batchedUpdates=uu;Ke.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!gl(n))throw Error(_(200));if(e==null||e._reactInternals===void 0)throw Error(_(38));return yl(e,t,n,!1,r)};Ke.version="18.3.1-next-f1338f8080-20240426";function Dh(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Dh)}catch(e){console.error(e)}}Dh(),zd.exports=Ke;var ng=zd.exports,Uh,Uc=ng;Uh=Uc.createRoot,Uc.hydrateRoot;/**
40
+ `+l.stack}return{value:e,source:t,stack:s,digest:null}}function Xl(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Ba(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Tv=typeof WeakMap=="function"?WeakMap:Map;function ph(e,t,n){n=Rt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Gi||(Gi=!0,Xa=r),Ba(e,t)},n}function mh(e,t,n){n=Rt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){Ba(e,t)}}var l=e.stateNode;return l!==null&&typeof l.componentDidCatch=="function"&&(n.callback=function(){Ba(e,t),typeof r!="function"&&(cn===null?cn=new Set([this]):cn.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function kc(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Tv;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=Hv.bind(null,e,t,n),t.then(e,e))}function Cc(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Ec(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Rt(-1,1),t.tag=2,un(n,t,1))),n.lanes|=1),e)}var Iv=Ft.ReactCurrentOwner,Ae=!1;function Pe(e,t,n,r){t.child=e===null?Wf(t,null,n,r):Tr(t,e.child,n,r)}function _c(e,t,n,r,s){n=n.render;var l=t.ref;return pr(t,s),r=tu(e,t,n,r,l,s),n=nu(),e!==null&&!Ae?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Mt(e,t,s)):(G&&n&&Qo(t),t.flags|=1,Pe(e,t,r,s),t.child)}function Pc(e,t,n,r,s){if(e===null){var l=n.type;return typeof l=="function"&&!fu(l)&&l.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=l,vh(e,t,l,r,s)):(e=_i(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(l=e.child,!(e.lanes&s)){var a=l.memoizedProps;if(n=n.compare,n=n!==null?n:js,n(a,r)&&e.ref===t.ref)return Mt(e,t,s)}return t.flags|=1,e=fn(l,r),e.ref=t.ref,e.return=t,t.child=e}function vh(e,t,n,r,s){if(e!==null){var l=e.memoizedProps;if(js(l,r)&&e.ref===t.ref)if(Ae=!1,t.pendingProps=r=l,(e.lanes&s)!==0)e.flags&131072&&(Ae=!0);else return t.lanes=e.lanes,Mt(e,t,s)}return Qa(e,t,n,r,s)}function gh(e,t,n){var r=t.pendingProps,s=r.children,l=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},K(ur,$e),$e|=n;else{if(!(n&1073741824))return e=l!==null?l.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,K(ur,$e),$e|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=l!==null?l.baseLanes:n,K(ur,$e),$e|=r}else l!==null?(r=l.baseLanes|n,t.memoizedState=null):r=n,K(ur,$e),$e|=r;return Pe(e,t,s,n),t.child}function yh(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Qa(e,t,n,r,s){var l=De(n)?$n:Ce.current;return l=Rr(t,l),pr(t,s),n=tu(e,t,n,r,l,s),r=nu(),e!==null&&!Ae?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Mt(e,t,s)):(G&&r&&Qo(t),t.flags|=1,Pe(e,t,n,s),t.child)}function Rc(e,t,n,r,s){if(De(n)){var l=!0;Di(t)}else l=!1;if(pr(t,s),t.stateNode===null)ki(e,t),hh(t,n,r),$a(t,n,r,s),r=!0;else if(e===null){var a=t.stateNode,o=t.memoizedProps;a.props=o;var u=a.context,d=n.contextType;typeof d=="object"&&d!==null?d=et(d):(d=De(n)?$n:Ce.current,d=Rr(t,d));var h=n.getDerivedStateFromProps,p=typeof h=="function"||typeof a.getSnapshotBeforeUpdate=="function";p||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==r||u!==d)&&Nc(t,a,r,d),Qt=!1;var g=t.memoizedState;a.state=g,Wi(t,r,a,s),u=t.memoizedState,o!==r||g!==u||ze.current||Qt?(typeof h=="function"&&(Ua(t,n,h,r),u=t.memoizedState),(o=Qt||Sc(t,n,o,r,g,u,d))?(p||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=d,r=o):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Kf(e,t),o=t.memoizedProps,d=t.type===t.elementType?o:st(t.type,o),a.props=d,p=t.pendingProps,g=a.context,u=n.contextType,typeof u=="object"&&u!==null?u=et(u):(u=De(n)?$n:Ce.current,u=Rr(t,u));var m=n.getDerivedStateFromProps;(h=typeof m=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==p||g!==u)&&Nc(t,a,r,u),Qt=!1,g=t.memoizedState,a.state=g,Wi(t,r,a,s);var w=t.memoizedState;o!==p||g!==w||ze.current||Qt?(typeof m=="function"&&(Ua(t,n,m,r),w=t.memoizedState),(d=Qt||Sc(t,n,d,r,g,w,u)||!1)?(h||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,w,u),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,w,u)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||o===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=w),a.props=r,a.state=w,a.context=u,r=d):(typeof a.componentDidUpdate!="function"||o===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),r=!1)}return Wa(e,t,n,r,l,s)}function Wa(e,t,n,r,s,l){yh(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return s&&pc(t,n,!1),Mt(e,t,l);r=t.stateNode,Iv.current=t;var o=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Tr(t,e.child,null,l),t.child=Tr(t,null,o,l)):Pe(e,t,o,l),t.memoizedState=r.state,s&&pc(t,n,!0),t.child}function xh(e){var t=e.stateNode;t.pendingContext?hc(e,t.pendingContext,t.pendingContext!==t.context):t.context&&hc(e,t.context,!1),Yo(e,t.containerInfo)}function bc(e,t,n,r,s){return br(),Ho(s),t.flags|=256,Pe(e,t,n,r),t.child}var Ha={dehydrated:null,treeContext:null,retryLane:0};function Ka(e){return{baseLanes:e,cachePool:null,transitions:null}}function jh(e,t,n){var r=t.pendingProps,s=Y.current,l=!1,a=(t.flags&128)!==0,o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:(s&2)!==0),o?(l=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),K(Y,s&1),e===null)return za(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,l?(r=t.mode,l=t.child,a={mode:"hidden",children:a},!(r&1)&&l!==null?(l.childLanes=0,l.pendingProps=a):l=pl(a,r,0,null),e=Un(e,r,n,null),l.return=t,e.return=t,l.sibling=e,t.child=l,t.child.memoizedState=Ka(n),t.memoizedState=Ha,e):iu(t,a));if(s=e.memoizedState,s!==null&&(o=s.dehydrated,o!==null))return Ov(e,t,a,r,o,s,n);if(l){l=r.fallback,a=t.mode,s=e.child,o=s.sibling;var u={mode:"hidden",children:r.children};return!(a&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=fn(s,u),r.subtreeFlags=s.subtreeFlags&14680064),o!==null?l=fn(o,l):(l=Un(l,a,n,null),l.flags|=2),l.return=t,r.return=t,r.sibling=l,t.child=r,r=l,l=t.child,a=e.child.memoizedState,a=a===null?Ka(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},l.memoizedState=a,l.childLanes=e.childLanes&~n,t.memoizedState=Ha,r}return l=e.child,e=l.sibling,r=fn(l,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function iu(e,t){return t=pl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function oi(e,t,n,r){return r!==null&&Ho(r),Tr(t,e.child,null,n),e=iu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ov(e,t,n,r,s,l,a){if(n)return t.flags&256?(t.flags&=-257,r=Xl(Error(P(422))),oi(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(l=r.fallback,s=t.mode,r=pl({mode:"visible",children:r.children},s,0,null),l=Un(l,s,a,null),l.flags|=2,r.return=t,l.return=t,r.sibling=l,t.child=r,t.mode&1&&Tr(t,e.child,null,a),t.child.memoizedState=Ka(a),t.memoizedState=Ha,l);if(!(t.mode&1))return oi(e,t,a,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var o=r.dgst;return r=o,l=Error(P(419)),r=Xl(l,r,void 0),oi(e,t,a,r)}if(o=(a&e.childLanes)!==0,Ae||o){if(r=pe,r!==null){switch(a&-a){case 4:s=2;break;case 16:s=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|a)?0:s,s!==0&&s!==l.retryLane&&(l.retryLane=s,Ot(e,s),ut(r,e,s,-1))}return du(),r=Xl(Error(P(421))),oi(e,t,a,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=Kv.bind(null,e),s._reactRetry=t,null):(e=l.treeContext,Qe=on(s.nextSibling),We=t,G=!0,at=null,e!==null&&(Je[Ye++]=_t,Je[Ye++]=Pt,Je[Ye++]=Bn,_t=e.id,Pt=e.overflow,Bn=t),t=iu(t,r.children),t.flags|=4096,t)}function Tc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Da(e.return,t,n)}function Zl(e,t,n,r,s){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=r,l.tail=n,l.tailMode=s)}function wh(e,t,n){var r=t.pendingProps,s=r.revealOrder,l=r.tail;if(Pe(e,t,r.children,n),r=Y.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Tc(e,n,t);else if(e.tag===19)Tc(e,n,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}r&=1}if(K(Y,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&Hi(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Zl(t,!1,s,n,l);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Hi(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Zl(t,!0,n,null,l);break;case"together":Zl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ki(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Mt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Wn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(P(153));if(t.child!==null){for(e=t.child,n=fn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=fn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Mv(e,t,n){switch(t.tag){case 3:xh(t),br();break;case 5:qf(t);break;case 1:De(t.type)&&Di(t);break;case 4:Yo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;K(Bi,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(K(Y,Y.current&1),t.flags|=128,null):n&t.child.childLanes?jh(e,t,n):(K(Y,Y.current&1),e=Mt(e,t,n),e!==null?e.sibling:null);K(Y,Y.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return wh(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),K(Y,Y.current),r)break;return null;case 22:case 23:return t.lanes=0,gh(e,t,n)}return Mt(e,t,n)}var Sh,qa,Nh,kh;Sh=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};qa=function(){};Nh=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,Pn(xt.current);var l=null;switch(n){case"input":s=ma(e,s),r=ma(e,r),l=[];break;case"select":s=ee({},s,{value:void 0}),r=ee({},r,{value:void 0}),l=[];break;case"textarea":s=ya(e,s),r=ya(e,r),l=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ai)}ja(n,r);var a;n=null;for(d in s)if(!r.hasOwnProperty(d)&&s.hasOwnProperty(d)&&s[d]!=null)if(d==="style"){var o=s[d];for(a in o)o.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(hs.hasOwnProperty(d)?l||(l=[]):(l=l||[]).push(d,null));for(d in r){var u=r[d];if(o=s!=null?s[d]:void 0,r.hasOwnProperty(d)&&u!==o&&(u!=null||o!=null))if(d==="style")if(o){for(a in o)!o.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in u)u.hasOwnProperty(a)&&o[a]!==u[a]&&(n||(n={}),n[a]=u[a])}else n||(l||(l=[]),l.push(d,n)),n=u;else d==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,o=o?o.__html:void 0,u!=null&&o!==u&&(l=l||[]).push(d,u)):d==="children"?typeof u!="string"&&typeof u!="number"||(l=l||[]).push(d,""+u):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(hs.hasOwnProperty(d)?(u!=null&&d==="onScroll"&&q("scroll",e),l||o===u||(l=[])):(l=l||[]).push(d,u))}n&&(l=l||[]).push("style",n);var d=l;(t.updateQueue=d)&&(t.flags|=4)}};kh=function(e,t,n,r){n!==r&&(t.flags|=4)};function Jr(e,t){if(!G)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function we(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Lv(e,t,n){var r=t.pendingProps;switch(Wo(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return we(t),null;case 1:return De(t.type)&&zi(),we(t),null;case 3:return r=t.stateNode,Ir(),V(ze),V(Ce),Zo(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(li(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,at!==null&&(to(at),at=null))),qa(e,t),we(t),null;case 5:Xo(t);var s=Pn(Cs.current);if(n=t.type,e!==null&&t.stateNode!=null)Nh(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(P(166));return we(t),null}if(e=Pn(xt.current),li(t)){r=t.stateNode,n=t.type;var l=t.memoizedProps;switch(r[gt]=t,r[Ns]=l,e=(t.mode&1)!==0,n){case"dialog":q("cancel",r),q("close",r);break;case"iframe":case"object":case"embed":q("load",r);break;case"video":case"audio":for(s=0;s<ns.length;s++)q(ns[s],r);break;case"source":q("error",r);break;case"img":case"image":case"link":q("error",r),q("load",r);break;case"details":q("toggle",r);break;case"input":Uu(r,l),q("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!l.multiple},q("invalid",r);break;case"textarea":Bu(r,l),q("invalid",r)}ja(n,l),s=null;for(var a in l)if(l.hasOwnProperty(a)){var o=l[a];a==="children"?typeof o=="string"?r.textContent!==o&&(l.suppressHydrationWarning!==!0&&ii(r.textContent,o,e),s=["children",o]):typeof o=="number"&&r.textContent!==""+o&&(l.suppressHydrationWarning!==!0&&ii(r.textContent,o,e),s=["children",""+o]):hs.hasOwnProperty(a)&&o!=null&&a==="onScroll"&&q("scroll",r)}switch(n){case"input":Ys(r),$u(r,l,!0);break;case"textarea":Ys(r),Qu(r);break;case"select":case"option":break;default:typeof l.onClick=="function"&&(r.onclick=Ai)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Yd(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[gt]=t,e[Ns]=r,Sh(e,t,!1,!1),t.stateNode=e;e:{switch(a=wa(n,r),n){case"dialog":q("cancel",e),q("close",e),s=r;break;case"iframe":case"object":case"embed":q("load",e),s=r;break;case"video":case"audio":for(s=0;s<ns.length;s++)q(ns[s],e);s=r;break;case"source":q("error",e),s=r;break;case"img":case"image":case"link":q("error",e),q("load",e),s=r;break;case"details":q("toggle",e),s=r;break;case"input":Uu(e,r),s=ma(e,r),q("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=ee({},r,{value:void 0}),q("invalid",e);break;case"textarea":Bu(e,r),s=ya(e,r),q("invalid",e);break;default:s=r}ja(n,s),o=s;for(l in o)if(o.hasOwnProperty(l)){var u=o[l];l==="style"?ef(e,u):l==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&Xd(e,u)):l==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&ps(e,u):typeof u=="number"&&ps(e,""+u):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(hs.hasOwnProperty(l)?u!=null&&l==="onScroll"&&q("scroll",e):u!=null&&Ro(e,l,u,a))}switch(n){case"input":Ys(e),$u(e,r,!1);break;case"textarea":Ys(e),Qu(e);break;case"option":r.value!=null&&e.setAttribute("value",""+mn(r.value));break;case"select":e.multiple=!!r.multiple,l=r.value,l!=null?cr(e,!!r.multiple,l,!1):r.defaultValue!=null&&cr(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Ai)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return we(t),null;case 6:if(e&&t.stateNode!=null)kh(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(P(166));if(n=Pn(Cs.current),Pn(xt.current),li(t)){if(r=t.stateNode,n=t.memoizedProps,r[gt]=t,(l=r.nodeValue!==n)&&(e=We,e!==null))switch(e.tag){case 3:ii(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ii(r.nodeValue,n,(e.mode&1)!==0)}l&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[gt]=t,t.stateNode=r}return we(t),null;case 13:if(V(Y),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(G&&Qe!==null&&t.mode&1&&!(t.flags&128))Bf(),br(),t.flags|=98560,l=!1;else if(l=li(t),r!==null&&r.dehydrated!==null){if(e===null){if(!l)throw Error(P(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(P(317));l[gt]=t}else br(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;we(t),l=!1}else at!==null&&(to(at),at=null),l=!0;if(!l)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Y.current&1?ce===0&&(ce=3):du())),t.updateQueue!==null&&(t.flags|=4),we(t),null);case 4:return Ir(),qa(e,t),e===null&&ws(t.stateNode.containerInfo),we(t),null;case 10:return Vo(t.type._context),we(t),null;case 17:return De(t.type)&&zi(),we(t),null;case 19:if(V(Y),l=t.memoizedState,l===null)return we(t),null;if(r=(t.flags&128)!==0,a=l.rendering,a===null)if(r)Jr(l,!1);else{if(ce!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=Hi(e),a!==null){for(t.flags|=128,Jr(l,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)l=n,e=r,l.flags&=14680066,a=l.alternate,a===null?(l.childLanes=0,l.lanes=e,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=a.childLanes,l.lanes=a.lanes,l.child=a.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=a.memoizedProps,l.memoizedState=a.memoizedState,l.updateQueue=a.updateQueue,l.type=a.type,e=a.dependencies,l.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return K(Y,Y.current&1|2),t.child}e=e.sibling}l.tail!==null&&ie()>Mr&&(t.flags|=128,r=!0,Jr(l,!1),t.lanes=4194304)}else{if(!r)if(e=Hi(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Jr(l,!0),l.tail===null&&l.tailMode==="hidden"&&!a.alternate&&!G)return we(t),null}else 2*ie()-l.renderingStartTime>Mr&&n!==1073741824&&(t.flags|=128,r=!0,Jr(l,!1),t.lanes=4194304);l.isBackwards?(a.sibling=t.child,t.child=a):(n=l.last,n!==null?n.sibling=a:t.child=a,l.last=a)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=ie(),t.sibling=null,n=Y.current,K(Y,r?n&1|2:n&1),t):(we(t),null);case 22:case 23:return cu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?$e&1073741824&&(we(t),t.subtreeFlags&6&&(t.flags|=8192)):we(t),null;case 24:return null;case 25:return null}throw Error(P(156,t.tag))}function Fv(e,t){switch(Wo(t),t.tag){case 1:return De(t.type)&&zi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ir(),V(ze),V(Ce),Zo(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Xo(t),null;case 13:if(V(Y),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(P(340));br()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return V(Y),null;case 4:return Ir(),null;case 10:return Vo(t.type._context),null;case 22:case 23:return cu(),null;case 24:return null;default:return null}}var ui=!1,ke=!1,Av=typeof WeakSet=="function"?WeakSet:Set,b=null;function or(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){re(e,t,r)}else n.current=null}function Va(e,t,n){try{n()}catch(r){re(e,t,r)}}var Ic=!1;function zv(e,t){if(Ta=Mi,e=Rf(),Bo(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,l=r.focusNode;r=r.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var a=0,o=-1,u=-1,d=0,h=0,p=e,g=null;t:for(;;){for(var m;p!==n||s!==0&&p.nodeType!==3||(o=a+s),p!==l||r!==0&&p.nodeType!==3||(u=a+r),p.nodeType===3&&(a+=p.nodeValue.length),(m=p.firstChild)!==null;)g=p,p=m;for(;;){if(p===e)break t;if(g===n&&++d===s&&(o=a),g===l&&++h===r&&(u=a),(m=p.nextSibling)!==null)break;p=g,g=p.parentNode}p=m}n=o===-1||u===-1?null:{start:o,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ia={focusedElem:e,selectionRange:n},Mi=!1,b=t;b!==null;)if(t=b,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,b=e;else for(;b!==null;){t=b;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var j=w.memoizedProps,S=w.memoizedState,c=t.stateNode,f=c.getSnapshotBeforeUpdate(t.elementType===t.type?j:st(t.type,j),S);c.__reactInternalSnapshotBeforeUpdate=f}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(P(163))}}catch(y){re(t,t.return,y)}if(e=t.sibling,e!==null){e.return=t.return,b=e;break}b=t.return}return w=Ic,Ic=!1,w}function cs(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var l=s.destroy;s.destroy=void 0,l!==void 0&&Va(t,n,l)}s=s.next}while(s!==r)}}function fl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ga(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Ch(e){var t=e.alternate;t!==null&&(e.alternate=null,Ch(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[gt],delete t[Ns],delete t[La],delete t[jv],delete t[wv])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Eh(e){return e.tag===5||e.tag===3||e.tag===4}function Oc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Eh(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.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 Ja(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ai));else if(r!==4&&(e=e.child,e!==null))for(Ja(e,t,n),e=e.sibling;e!==null;)Ja(e,t,n),e=e.sibling}function Ya(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Ya(e,t,n),e=e.sibling;e!==null;)Ya(e,t,n),e=e.sibling}var me=null,lt=!1;function Ut(e,t,n){for(n=n.child;n!==null;)_h(e,t,n),n=n.sibling}function _h(e,t,n){if(yt&&typeof yt.onCommitFiberUnmount=="function")try{yt.onCommitFiberUnmount(sl,n)}catch{}switch(n.tag){case 5:ke||or(n,t);case 6:var r=me,s=lt;me=null,Ut(e,t,n),me=r,lt=s,me!==null&&(lt?(e=me,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):me.removeChild(n.stateNode));break;case 18:me!==null&&(lt?(e=me,n=n.stateNode,e.nodeType===8?Kl(e.parentNode,n):e.nodeType===1&&Kl(e,n),ys(e)):Kl(me,n.stateNode));break;case 4:r=me,s=lt,me=n.stateNode.containerInfo,lt=!0,Ut(e,t,n),me=r,lt=s;break;case 0:case 11:case 14:case 15:if(!ke&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var l=s,a=l.destroy;l=l.tag,a!==void 0&&(l&2||l&4)&&Va(n,t,a),s=s.next}while(s!==r)}Ut(e,t,n);break;case 1:if(!ke&&(or(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){re(n,t,o)}Ut(e,t,n);break;case 21:Ut(e,t,n);break;case 22:n.mode&1?(ke=(r=ke)||n.memoizedState!==null,Ut(e,t,n),ke=r):Ut(e,t,n);break;default:Ut(e,t,n)}}function Mc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Av),t.forEach(function(r){var s=qv.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function rt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var l=e,a=t,o=a;e:for(;o!==null;){switch(o.tag){case 5:me=o.stateNode,lt=!1;break e;case 3:me=o.stateNode.containerInfo,lt=!0;break e;case 4:me=o.stateNode.containerInfo,lt=!0;break e}o=o.return}if(me===null)throw Error(P(160));_h(l,a,s),me=null,lt=!1;var u=s.alternate;u!==null&&(u.return=null),s.return=null}catch(d){re(s,t,d)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Ph(t,e),t=t.sibling}function Ph(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(rt(t,e),ft(e),r&4){try{cs(3,e,e.return),fl(3,e)}catch(j){re(e,e.return,j)}try{cs(5,e,e.return)}catch(j){re(e,e.return,j)}}break;case 1:rt(t,e),ft(e),r&512&&n!==null&&or(n,n.return);break;case 5:if(rt(t,e),ft(e),r&512&&n!==null&&or(n,n.return),e.flags&32){var s=e.stateNode;try{ps(s,"")}catch(j){re(e,e.return,j)}}if(r&4&&(s=e.stateNode,s!=null)){var l=e.memoizedProps,a=n!==null?n.memoizedProps:l,o=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{o==="input"&&l.type==="radio"&&l.name!=null&&Gd(s,l),wa(o,a);var d=wa(o,l);for(a=0;a<u.length;a+=2){var h=u[a],p=u[a+1];h==="style"?ef(s,p):h==="dangerouslySetInnerHTML"?Xd(s,p):h==="children"?ps(s,p):Ro(s,h,p,d)}switch(o){case"input":va(s,l);break;case"textarea":Jd(s,l);break;case"select":var g=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!l.multiple;var m=l.value;m!=null?cr(s,!!l.multiple,m,!1):g!==!!l.multiple&&(l.defaultValue!=null?cr(s,!!l.multiple,l.defaultValue,!0):cr(s,!!l.multiple,l.multiple?[]:"",!1))}s[Ns]=l}catch(j){re(e,e.return,j)}}break;case 6:if(rt(t,e),ft(e),r&4){if(e.stateNode===null)throw Error(P(162));s=e.stateNode,l=e.memoizedProps;try{s.nodeValue=l}catch(j){re(e,e.return,j)}}break;case 3:if(rt(t,e),ft(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ys(t.containerInfo)}catch(j){re(e,e.return,j)}break;case 4:rt(t,e),ft(e);break;case 13:rt(t,e),ft(e),s=e.child,s.flags&8192&&(l=s.memoizedState!==null,s.stateNode.isHidden=l,!l||s.alternate!==null&&s.alternate.memoizedState!==null||(ou=ie())),r&4&&Mc(e);break;case 22:if(h=n!==null&&n.memoizedState!==null,e.mode&1?(ke=(d=ke)||h,rt(t,e),ke=d):rt(t,e),ft(e),r&8192){if(d=e.memoizedState!==null,(e.stateNode.isHidden=d)&&!h&&e.mode&1)for(b=e,h=e.child;h!==null;){for(p=b=h;b!==null;){switch(g=b,m=g.child,g.tag){case 0:case 11:case 14:case 15:cs(4,g,g.return);break;case 1:or(g,g.return);var w=g.stateNode;if(typeof w.componentWillUnmount=="function"){r=g,n=g.return;try{t=r,w.props=t.memoizedProps,w.state=t.memoizedState,w.componentWillUnmount()}catch(j){re(r,n,j)}}break;case 5:or(g,g.return);break;case 22:if(g.memoizedState!==null){Fc(p);continue}}m!==null?(m.return=g,b=m):Fc(p)}h=h.sibling}e:for(h=null,p=e;;){if(p.tag===5){if(h===null){h=p;try{s=p.stateNode,d?(l=s.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none"):(o=p.stateNode,u=p.memoizedProps.style,a=u!=null&&u.hasOwnProperty("display")?u.display:null,o.style.display=Zd("display",a))}catch(j){re(e,e.return,j)}}}else if(p.tag===6){if(h===null)try{p.stateNode.nodeValue=d?"":p.memoizedProps}catch(j){re(e,e.return,j)}}else if((p.tag!==22&&p.tag!==23||p.memoizedState===null||p===e)&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===e)break e;for(;p.sibling===null;){if(p.return===null||p.return===e)break e;h===p&&(h=null),p=p.return}h===p&&(h=null),p.sibling.return=p.return,p=p.sibling}}break;case 19:rt(t,e),ft(e),r&4&&Mc(e);break;case 21:break;default:rt(t,e),ft(e)}}function ft(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Eh(n)){var r=n;break e}n=n.return}throw Error(P(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(ps(s,""),r.flags&=-33);var l=Oc(e);Ya(e,l,s);break;case 3:case 4:var a=r.stateNode.containerInfo,o=Oc(e);Ja(e,o,a);break;default:throw Error(P(161))}}catch(u){re(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Dv(e,t,n){b=e,Rh(e)}function Rh(e,t,n){for(var r=(e.mode&1)!==0;b!==null;){var s=b,l=s.child;if(s.tag===22&&r){var a=s.memoizedState!==null||ui;if(!a){var o=s.alternate,u=o!==null&&o.memoizedState!==null||ke;o=ui;var d=ke;if(ui=a,(ke=u)&&!d)for(b=s;b!==null;)a=b,u=a.child,a.tag===22&&a.memoizedState!==null?Ac(s):u!==null?(u.return=a,b=u):Ac(s);for(;l!==null;)b=l,Rh(l),l=l.sibling;b=s,ui=o,ke=d}Lc(e)}else s.subtreeFlags&8772&&l!==null?(l.return=s,b=l):Lc(e)}}function Lc(e){for(;b!==null;){var t=b;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:ke||fl(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!ke)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:st(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var l=t.updateQueue;l!==null&&xc(t,l,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}xc(t,a,n)}break;case 5:var o=t.stateNode;if(n===null&&t.flags&4){n=o;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var d=t.alternate;if(d!==null){var h=d.memoizedState;if(h!==null){var p=h.dehydrated;p!==null&&ys(p)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(P(163))}ke||t.flags&512&&Ga(t)}catch(g){re(t,t.return,g)}}if(t===e){b=null;break}if(n=t.sibling,n!==null){n.return=t.return,b=n;break}b=t.return}}function Fc(e){for(;b!==null;){var t=b;if(t===e){b=null;break}var n=t.sibling;if(n!==null){n.return=t.return,b=n;break}b=t.return}}function Ac(e){for(;b!==null;){var t=b;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{fl(4,t)}catch(u){re(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(u){re(t,s,u)}}var l=t.return;try{Ga(t)}catch(u){re(t,l,u)}break;case 5:var a=t.return;try{Ga(t)}catch(u){re(t,a,u)}}}catch(u){re(t,t.return,u)}if(t===e){b=null;break}var o=t.sibling;if(o!==null){o.return=t.return,b=o;break}b=t.return}}var Uv=Math.ceil,Vi=Ft.ReactCurrentDispatcher,lu=Ft.ReactCurrentOwner,Ze=Ft.ReactCurrentBatchConfig,B=0,pe=null,ae=null,ve=0,$e=0,ur=yn(0),ce=0,Rs=null,Wn=0,hl=0,au=0,ds=null,Fe=null,ou=0,Mr=1/0,wt=null,Gi=!1,Xa=null,cn=null,ci=!1,nn=null,Ji=0,fs=0,Za=null,Ci=-1,Ei=0;function be(){return B&6?ie():Ci!==-1?Ci:Ci=ie()}function dn(e){return e.mode&1?B&2&&ve!==0?ve&-ve:Nv.transition!==null?(Ei===0&&(Ei=hf()),Ei):(e=H,e!==0||(e=window.event,e=e===void 0?16:jf(e.type)),e):1}function ut(e,t,n,r){if(50<fs)throw fs=0,Za=null,Error(P(185));Bs(e,n,r),(!(B&2)||e!==pe)&&(e===pe&&(!(B&2)&&(hl|=n),ce===4&&Ht(e,ve)),Ue(e,r),n===1&&B===0&&!(t.mode&1)&&(Mr=ie()+500,ul&&xn()))}function Ue(e,t){var n=e.callbackNode;Nm(e,t);var r=Oi(e,e===pe?ve:0);if(r===0)n!==null&&Ku(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Ku(n),t===1)e.tag===0?Sv(zc.bind(null,e)):Df(zc.bind(null,e)),yv(function(){!(B&6)&&xn()}),n=null;else{switch(pf(r)){case 1:n=Mo;break;case 4:n=df;break;case 16:n=Ii;break;case 536870912:n=ff;break;default:n=Ii}n=Ah(n,bh.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function bh(e,t){if(Ci=-1,Ei=0,B&6)throw Error(P(327));var n=e.callbackNode;if(mr()&&e.callbackNode!==n)return null;var r=Oi(e,e===pe?ve:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Yi(e,r);else{t=r;var s=B;B|=2;var l=Ih();(pe!==e||ve!==t)&&(wt=null,Mr=ie()+500,Dn(e,t));do try{Qv();break}catch(o){Th(e,o)}while(!0);qo(),Vi.current=l,B=s,ae!==null?t=0:(pe=null,ve=0,t=ce)}if(t!==0){if(t===2&&(s=Ea(e),s!==0&&(r=s,t=eo(e,s))),t===1)throw n=Rs,Dn(e,0),Ht(e,r),Ue(e,ie()),n;if(t===6)Ht(e,r);else{if(s=e.current.alternate,!(r&30)&&!$v(s)&&(t=Yi(e,r),t===2&&(l=Ea(e),l!==0&&(r=l,t=eo(e,l))),t===1))throw n=Rs,Dn(e,0),Ht(e,r),Ue(e,ie()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(P(345));case 2:Cn(e,Fe,wt);break;case 3:if(Ht(e,r),(r&130023424)===r&&(t=ou+500-ie(),10<t)){if(Oi(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){be(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Ma(Cn.bind(null,e,Fe,wt),t);break}Cn(e,Fe,wt);break;case 4:if(Ht(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var a=31-ot(r);l=1<<a,a=t[a],a>s&&(s=a),r&=~l}if(r=s,r=ie()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Uv(r/1960))-r,10<r){e.timeoutHandle=Ma(Cn.bind(null,e,Fe,wt),r);break}Cn(e,Fe,wt);break;case 5:Cn(e,Fe,wt);break;default:throw Error(P(329))}}}return Ue(e,ie()),e.callbackNode===n?bh.bind(null,e):null}function eo(e,t){var n=ds;return e.current.memoizedState.isDehydrated&&(Dn(e,t).flags|=256),e=Yi(e,t),e!==2&&(t=Fe,Fe=n,t!==null&&to(t)),e}function to(e){Fe===null?Fe=e:Fe.push.apply(Fe,e)}function $v(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],l=s.getSnapshot;s=s.value;try{if(!ct(l(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;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 Ht(e,t){for(t&=~au,t&=~hl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-ot(t),r=1<<n;e[n]=-1,t&=~r}}function zc(e){if(B&6)throw Error(P(327));mr();var t=Oi(e,0);if(!(t&1))return Ue(e,ie()),null;var n=Yi(e,t);if(e.tag!==0&&n===2){var r=Ea(e);r!==0&&(t=r,n=eo(e,r))}if(n===1)throw n=Rs,Dn(e,0),Ht(e,t),Ue(e,ie()),n;if(n===6)throw Error(P(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Cn(e,Fe,wt),Ue(e,ie()),null}function uu(e,t){var n=B;B|=1;try{return e(t)}finally{B=n,B===0&&(Mr=ie()+500,ul&&xn())}}function Hn(e){nn!==null&&nn.tag===0&&!(B&6)&&mr();var t=B;B|=1;var n=Ze.transition,r=H;try{if(Ze.transition=null,H=1,e)return e()}finally{H=r,Ze.transition=n,B=t,!(B&6)&&xn()}}function cu(){$e=ur.current,V(ur)}function Dn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,gv(n)),ae!==null)for(n=ae.return;n!==null;){var r=n;switch(Wo(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&zi();break;case 3:Ir(),V(ze),V(Ce),Zo();break;case 5:Xo(r);break;case 4:Ir();break;case 13:V(Y);break;case 19:V(Y);break;case 10:Vo(r.type._context);break;case 22:case 23:cu()}n=n.return}if(pe=e,ae=e=fn(e.current,null),ve=$e=t,ce=0,Rs=null,au=hl=Wn=0,Fe=ds=null,_n!==null){for(t=0;t<_n.length;t++)if(n=_n[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,l=n.pending;if(l!==null){var a=l.next;l.next=s,r.next=a}n.pending=r}_n=null}return e}function Th(e,t){do{var n=ae;try{if(qo(),Si.current=qi,Ki){for(var r=X.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Ki=!1}if(Qn=0,he=oe=X=null,us=!1,Es=0,lu.current=null,n===null||n.return===null){ce=1,Rs=t,ae=null;break}e:{var l=e,a=n.return,o=n,u=t;if(t=ve,o.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var d=u,h=o,p=h.tag;if(!(h.mode&1)&&(p===0||p===11||p===15)){var g=h.alternate;g?(h.updateQueue=g.updateQueue,h.memoizedState=g.memoizedState,h.lanes=g.lanes):(h.updateQueue=null,h.memoizedState=null)}var m=Cc(a);if(m!==null){m.flags&=-257,Ec(m,a,o,l,t),m.mode&1&&kc(l,d,t),t=m,u=d;var w=t.updateQueue;if(w===null){var j=new Set;j.add(u),t.updateQueue=j}else w.add(u);break e}else{if(!(t&1)){kc(l,d,t),du();break e}u=Error(P(426))}}else if(G&&o.mode&1){var S=Cc(a);if(S!==null){!(S.flags&65536)&&(S.flags|=256),Ec(S,a,o,l,t),Ho(Or(u,o));break e}}l=u=Or(u,o),ce!==4&&(ce=2),ds===null?ds=[l]:ds.push(l),l=a;do{switch(l.tag){case 3:l.flags|=65536,t&=-t,l.lanes|=t;var c=ph(l,u,t);yc(l,c);break e;case 1:o=u;var f=l.type,v=l.stateNode;if(!(l.flags&128)&&(typeof f.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(cn===null||!cn.has(v)))){l.flags|=65536,t&=-t,l.lanes|=t;var y=mh(l,o,t);yc(l,y);break e}}l=l.return}while(l!==null)}Mh(n)}catch(k){t=k,ae===n&&n!==null&&(ae=n=n.return);continue}break}while(!0)}function Ih(){var e=Vi.current;return Vi.current=qi,e===null?qi:e}function du(){(ce===0||ce===3||ce===2)&&(ce=4),pe===null||!(Wn&268435455)&&!(hl&268435455)||Ht(pe,ve)}function Yi(e,t){var n=B;B|=2;var r=Ih();(pe!==e||ve!==t)&&(wt=null,Dn(e,t));do try{Bv();break}catch(s){Th(e,s)}while(!0);if(qo(),B=n,Vi.current=r,ae!==null)throw Error(P(261));return pe=null,ve=0,ce}function Bv(){for(;ae!==null;)Oh(ae)}function Qv(){for(;ae!==null&&!pm();)Oh(ae)}function Oh(e){var t=Fh(e.alternate,e,$e);e.memoizedProps=e.pendingProps,t===null?Mh(e):ae=t,lu.current=null}function Mh(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Fv(n,t),n!==null){n.flags&=32767,ae=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ce=6,ae=null;return}}else if(n=Lv(n,t,$e),n!==null){ae=n;return}if(t=t.sibling,t!==null){ae=t;return}ae=t=e}while(t!==null);ce===0&&(ce=5)}function Cn(e,t,n){var r=H,s=Ze.transition;try{Ze.transition=null,H=1,Wv(e,t,n,r)}finally{Ze.transition=s,H=r}return null}function Wv(e,t,n,r){do mr();while(nn!==null);if(B&6)throw Error(P(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(P(177));e.callbackNode=null,e.callbackPriority=0;var l=n.lanes|n.childLanes;if(km(e,l),e===pe&&(ae=pe=null,ve=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||ci||(ci=!0,Ah(Ii,function(){return mr(),null})),l=(n.flags&15990)!==0,n.subtreeFlags&15990||l){l=Ze.transition,Ze.transition=null;var a=H;H=1;var o=B;B|=4,lu.current=null,zv(e,n),Ph(n,e),cv(Ia),Mi=!!Ta,Ia=Ta=null,e.current=n,Dv(n),mm(),B=o,H=a,Ze.transition=l}else e.current=n;if(ci&&(ci=!1,nn=e,Ji=s),l=e.pendingLanes,l===0&&(cn=null),ym(n.stateNode),Ue(e,ie()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Gi)throw Gi=!1,e=Xa,Xa=null,e;return Ji&1&&e.tag!==0&&mr(),l=e.pendingLanes,l&1?e===Za?fs++:(fs=0,Za=e):fs=0,xn(),null}function mr(){if(nn!==null){var e=pf(Ji),t=Ze.transition,n=H;try{if(Ze.transition=null,H=16>e?16:e,nn===null)var r=!1;else{if(e=nn,nn=null,Ji=0,B&6)throw Error(P(331));var s=B;for(B|=4,b=e.current;b!==null;){var l=b,a=l.child;if(b.flags&16){var o=l.deletions;if(o!==null){for(var u=0;u<o.length;u++){var d=o[u];for(b=d;b!==null;){var h=b;switch(h.tag){case 0:case 11:case 15:cs(8,h,l)}var p=h.child;if(p!==null)p.return=h,b=p;else for(;b!==null;){h=b;var g=h.sibling,m=h.return;if(Ch(h),h===d){b=null;break}if(g!==null){g.return=m,b=g;break}b=m}}}var w=l.alternate;if(w!==null){var j=w.child;if(j!==null){w.child=null;do{var S=j.sibling;j.sibling=null,j=S}while(j!==null)}}b=l}}if(l.subtreeFlags&2064&&a!==null)a.return=l,b=a;else e:for(;b!==null;){if(l=b,l.flags&2048)switch(l.tag){case 0:case 11:case 15:cs(9,l,l.return)}var c=l.sibling;if(c!==null){c.return=l.return,b=c;break e}b=l.return}}var f=e.current;for(b=f;b!==null;){a=b;var v=a.child;if(a.subtreeFlags&2064&&v!==null)v.return=a,b=v;else e:for(a=f;b!==null;){if(o=b,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:fl(9,o)}}catch(k){re(o,o.return,k)}if(o===a){b=null;break e}var y=o.sibling;if(y!==null){y.return=o.return,b=y;break e}b=o.return}}if(B=s,xn(),yt&&typeof yt.onPostCommitFiberRoot=="function")try{yt.onPostCommitFiberRoot(sl,e)}catch{}r=!0}return r}finally{H=n,Ze.transition=t}}return!1}function Dc(e,t,n){t=Or(n,t),t=ph(e,t,1),e=un(e,t,1),t=be(),e!==null&&(Bs(e,1,t),Ue(e,t))}function re(e,t,n){if(e.tag===3)Dc(e,e,n);else for(;t!==null;){if(t.tag===3){Dc(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(cn===null||!cn.has(r))){e=Or(n,e),e=mh(t,e,1),t=un(t,e,1),e=be(),t!==null&&(Bs(t,1,e),Ue(t,e));break}}t=t.return}}function Hv(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=be(),e.pingedLanes|=e.suspendedLanes&n,pe===e&&(ve&n)===n&&(ce===4||ce===3&&(ve&130023424)===ve&&500>ie()-ou?Dn(e,0):au|=n),Ue(e,t)}function Lh(e,t){t===0&&(e.mode&1?(t=ei,ei<<=1,!(ei&130023424)&&(ei=4194304)):t=1);var n=be();e=Ot(e,t),e!==null&&(Bs(e,t,n),Ue(e,n))}function Kv(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Lh(e,n)}function qv(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(P(314))}r!==null&&r.delete(t),Lh(e,n)}var Fh;Fh=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ze.current)Ae=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ae=!1,Mv(e,t,n);Ae=!!(e.flags&131072)}else Ae=!1,G&&t.flags&1048576&&Uf(t,$i,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ki(e,t),e=t.pendingProps;var s=Rr(t,Ce.current);pr(t,n),s=tu(null,t,r,e,s,n);var l=nu();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,De(r)?(l=!0,Di(t)):l=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Jo(t),s.updater=dl,t.stateNode=s,s._reactInternals=t,$a(t,r,e,n),t=Wa(null,t,r,!0,l,n)):(t.tag=0,G&&l&&Qo(t),Pe(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ki(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=Gv(r),e=st(r,e),s){case 0:t=Qa(null,t,r,e,n);break e;case 1:t=Rc(null,t,r,e,n);break e;case 11:t=_c(null,t,r,e,n);break e;case 14:t=Pc(null,t,r,st(r.type,e),n);break e}throw Error(P(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:st(r,s),Qa(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:st(r,s),Rc(e,t,r,s,n);case 3:e:{if(xh(t),e===null)throw Error(P(387));r=t.pendingProps,l=t.memoizedState,s=l.element,Kf(e,t),Wi(t,r,null,n);var a=t.memoizedState;if(r=a.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){s=Or(Error(P(423)),t),t=bc(e,t,r,n,s);break e}else if(r!==s){s=Or(Error(P(424)),t),t=bc(e,t,r,n,s);break e}else for(Qe=on(t.stateNode.containerInfo.firstChild),We=t,G=!0,at=null,n=Wf(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(br(),r===s){t=Mt(e,t,n);break e}Pe(e,t,r,n)}t=t.child}return t;case 5:return qf(t),e===null&&za(t),r=t.type,s=t.pendingProps,l=e!==null?e.memoizedProps:null,a=s.children,Oa(r,s)?a=null:l!==null&&Oa(r,l)&&(t.flags|=32),yh(e,t),Pe(e,t,a,n),t.child;case 6:return e===null&&za(t),null;case 13:return jh(e,t,n);case 4:return Yo(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Tr(t,null,r,n):Pe(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:st(r,s),_c(e,t,r,s,n);case 7:return Pe(e,t,t.pendingProps,n),t.child;case 8:return Pe(e,t,t.pendingProps.children,n),t.child;case 12:return Pe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,l=t.memoizedProps,a=s.value,K(Bi,r._currentValue),r._currentValue=a,l!==null)if(ct(l.value,a)){if(l.children===s.children&&!ze.current){t=Mt(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var o=l.dependencies;if(o!==null){a=l.child;for(var u=o.firstContext;u!==null;){if(u.context===r){if(l.tag===1){u=Rt(-1,n&-n),u.tag=2;var d=l.updateQueue;if(d!==null){d=d.shared;var h=d.pending;h===null?u.next=u:(u.next=h.next,h.next=u),d.pending=u}}l.lanes|=n,u=l.alternate,u!==null&&(u.lanes|=n),Da(l.return,n,t),o.lanes|=n;break}u=u.next}}else if(l.tag===10)a=l.type===t.type?null:l.child;else if(l.tag===18){if(a=l.return,a===null)throw Error(P(341));a.lanes|=n,o=a.alternate,o!==null&&(o.lanes|=n),Da(a,n,t),a=l.sibling}else a=l.child;if(a!==null)a.return=l;else for(a=l;a!==null;){if(a===t){a=null;break}if(l=a.sibling,l!==null){l.return=a.return,a=l;break}a=a.return}l=a}Pe(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,pr(t,n),s=et(s),r=r(s),t.flags|=1,Pe(e,t,r,n),t.child;case 14:return r=t.type,s=st(r,t.pendingProps),s=st(r.type,s),Pc(e,t,r,s,n);case 15:return vh(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:st(r,s),ki(e,t),t.tag=1,De(r)?(e=!0,Di(t)):e=!1,pr(t,n),hh(t,r,s),$a(t,r,s,n),Wa(null,t,r,!0,e,n);case 19:return wh(e,t,n);case 22:return gh(e,t,n)}throw Error(P(156,t.tag))};function Ah(e,t){return cf(e,t)}function Vv(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xe(e,t,n,r){return new Vv(e,t,n,r)}function fu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Gv(e){if(typeof e=="function")return fu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===To)return 11;if(e===Io)return 14}return 2}function fn(e,t){var n=e.alternate;return n===null?(n=Xe(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function _i(e,t,n,r,s,l){var a=2;if(r=e,typeof e=="function")fu(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Zn:return Un(n.children,s,l,t);case bo:a=8,s|=8;break;case da:return e=Xe(12,n,t,s|2),e.elementType=da,e.lanes=l,e;case fa:return e=Xe(13,n,t,s),e.elementType=fa,e.lanes=l,e;case ha:return e=Xe(19,n,t,s),e.elementType=ha,e.lanes=l,e;case Kd:return pl(n,s,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Wd:a=10;break e;case Hd:a=9;break e;case To:a=11;break e;case Io:a=14;break e;case Bt:a=16,r=null;break e}throw Error(P(130,e==null?e:typeof e,""))}return t=Xe(a,n,t,s),t.elementType=e,t.type=r,t.lanes=l,t}function Un(e,t,n,r){return e=Xe(7,e,r,t),e.lanes=n,e}function pl(e,t,n,r){return e=Xe(22,e,r,t),e.elementType=Kd,e.lanes=n,e.stateNode={isHidden:!1},e}function ea(e,t,n){return e=Xe(6,e,null,t),e.lanes=n,e}function ta(e,t,n){return t=Xe(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Jv(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ll(0),this.expirationTimes=Ll(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ll(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function hu(e,t,n,r,s,l,a,o,u){return e=new Jv(e,t,n,o,u),t===1?(t=1,l===!0&&(t|=8)):t=0,l=Xe(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Jo(l),e}function Yv(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Xn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function zh(e){if(!e)return vn;e=e._reactInternals;e:{if(Vn(e)!==e||e.tag!==1)throw Error(P(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(De(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(P(171))}if(e.tag===1){var n=e.type;if(De(n))return zf(e,n,t)}return t}function Dh(e,t,n,r,s,l,a,o,u){return e=hu(n,r,!0,e,s,l,a,o,u),e.context=zh(null),n=e.current,r=be(),s=dn(n),l=Rt(r,s),l.callback=t??null,un(n,l,s),e.current.lanes=s,Bs(e,s,r),Ue(e,r),e}function ml(e,t,n,r){var s=t.current,l=be(),a=dn(s);return n=zh(n),t.context===null?t.context=n:t.pendingContext=n,t=Rt(l,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=un(s,t,a),e!==null&&(ut(e,s,a,l),wi(e,s,a)),a}function Xi(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Uc(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function pu(e,t){Uc(e,t),(e=e.alternate)&&Uc(e,t)}function Xv(){return null}var Uh=typeof reportError=="function"?reportError:function(e){console.error(e)};function mu(e){this._internalRoot=e}vl.prototype.render=mu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(P(409));ml(e,t,null,null)};vl.prototype.unmount=mu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Hn(function(){ml(null,e,null,null)}),t[It]=null}};function vl(e){this._internalRoot=e}vl.prototype.unstable_scheduleHydration=function(e){if(e){var t=gf();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Wt.length&&t!==0&&t<Wt[n].priority;n++);Wt.splice(n,0,e),n===0&&xf(e)}};function vu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function gl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function $c(){}function Zv(e,t,n,r,s){if(s){if(typeof r=="function"){var l=r;r=function(){var d=Xi(a);l.call(d)}}var a=Dh(t,r,e,0,null,!1,!1,"",$c);return e._reactRootContainer=a,e[It]=a.current,ws(e.nodeType===8?e.parentNode:e),Hn(),a}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var o=r;r=function(){var d=Xi(u);o.call(d)}}var u=hu(e,0,!1,null,null,!1,!1,"",$c);return e._reactRootContainer=u,e[It]=u.current,ws(e.nodeType===8?e.parentNode:e),Hn(function(){ml(t,u,n,r)}),u}function yl(e,t,n,r,s){var l=n._reactRootContainer;if(l){var a=l;if(typeof s=="function"){var o=s;s=function(){var u=Xi(a);o.call(u)}}ml(t,a,e,s)}else a=Zv(n,t,e,s,r);return Xi(a)}mf=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ts(t.pendingLanes);n!==0&&(Lo(t,n|1),Ue(t,ie()),!(B&6)&&(Mr=ie()+500,xn()))}break;case 13:Hn(function(){var r=Ot(e,1);if(r!==null){var s=be();ut(r,e,1,s)}}),pu(e,1)}};Fo=function(e){if(e.tag===13){var t=Ot(e,134217728);if(t!==null){var n=be();ut(t,e,134217728,n)}pu(e,134217728)}};vf=function(e){if(e.tag===13){var t=dn(e),n=Ot(e,t);if(n!==null){var r=be();ut(n,e,t,r)}pu(e,t)}};gf=function(){return H};yf=function(e,t){var n=H;try{return H=e,t()}finally{H=n}};Na=function(e,t,n){switch(t){case"input":if(va(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=ol(r);if(!s)throw Error(P(90));Vd(r),va(r,s)}}}break;case"textarea":Jd(e,n);break;case"select":t=n.value,t!=null&&cr(e,!!n.multiple,t,!1)}};rf=uu;sf=Hn;var eg={usingClientEntryPoint:!1,Events:[Ws,rr,ol,tf,nf,uu]},Yr={findFiberByHostInstance:En,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},tg={bundleType:Yr.bundleType,version:Yr.version,rendererPackageName:Yr.rendererPackageName,rendererConfig:Yr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ft.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=of(e),e===null?null:e.stateNode},findFiberByHostInstance:Yr.findFiberByHostInstance||Xv,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var di=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!di.isDisabled&&di.supportsFiber)try{sl=di.inject(tg),yt=di}catch{}}Ke.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=eg;Ke.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!vu(t))throw Error(P(200));return Yv(e,t,null,n)};Ke.createRoot=function(e,t){if(!vu(e))throw Error(P(299));var n=!1,r="",s=Uh;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=hu(e,1,!1,null,null,n,!1,r,s),e[It]=t.current,ws(e.nodeType===8?e.parentNode:e),new mu(t)};Ke.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(P(188)):(e=Object.keys(e).join(","),Error(P(268,e)));return e=of(t),e=e===null?null:e.stateNode,e};Ke.flushSync=function(e){return Hn(e)};Ke.hydrate=function(e,t,n){if(!gl(t))throw Error(P(200));return yl(null,e,t,!0,n)};Ke.hydrateRoot=function(e,t,n){if(!vu(e))throw Error(P(405));var r=n!=null&&n.hydratedSources||null,s=!1,l="",a=Uh;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=Dh(t,null,e,1,n??null,s,!1,l,a),e[It]=t.current,ws(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new vl(t)};Ke.render=function(e,t,n){if(!gl(t))throw Error(P(200));return yl(null,e,t,!1,n)};Ke.unmountComponentAtNode=function(e){if(!gl(e))throw Error(P(40));return e._reactRootContainer?(Hn(function(){yl(null,null,e,!1,function(){e._reactRootContainer=null,e[It]=null})}),!0):!1};Ke.unstable_batchedUpdates=uu;Ke.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!gl(n))throw Error(P(200));if(e==null||e._reactInternals===void 0)throw Error(P(38));return yl(e,t,n,!1,r)};Ke.version="18.3.1-next-f1338f8080-20240426";function $h(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE($h)}catch(e){console.error(e)}}$h(),Ud.exports=Ke;var ng=Ud.exports,Bh,Bc=ng;Bh=Bc.createRoot,Bc.hydrateRoot;/**
41
41
  * @remix-run/router v1.23.2
42
42
  *
43
43
  * Copyright (c) Remix Software Inc.
@@ -46,7 +46,7 @@ Error generating stack: `+l.message+`
46
46
  * LICENSE.md file in the root directory of this source tree.
47
47
  *
48
48
  * @license MIT
49
- */function _s(){return _s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_s.apply(this,arguments)}var rn;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(rn||(rn={}));const $c="popstate";function rg(e){e===void 0&&(e={});function t(r,s){let{pathname:l,search:a,hash:o}=r.location;return no("",{pathname:l,search:a,hash:o},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:Zi(s)}return ig(t,n,null,e)}function Z(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function gu(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function sg(){return Math.random().toString(36).substr(2,8)}function Bc(e,t){return{usr:e.state,key:e.key,idx:t}}function no(e,t,n,r){return n===void 0&&(n=null),_s({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ur(t):t,{state:n,key:t&&t.key||r||sg()})}function Zi(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Ur(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function ig(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:l=!1}=r,a=s.history,o=rn.Pop,u=null,d=h();d==null&&(d=0,a.replaceState(_s({},a.state,{idx:d}),""));function h(){return(a.state||{idx:null}).idx}function p(){o=rn.Pop;let S=h(),c=S==null?null:S-d;d=S,u&&u({action:o,location:j.location,delta:c})}function g(S,c){o=rn.Push;let f=no(j.location,S,c);d=h()+1;let v=Bc(f,d),y=j.createHref(f);try{a.pushState(v,"",y)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;s.location.assign(y)}l&&u&&u({action:o,location:j.location,delta:1})}function m(S,c){o=rn.Replace;let f=no(j.location,S,c);d=h();let v=Bc(f,d),y=j.createHref(f);a.replaceState(v,"",y),l&&u&&u({action:o,location:j.location,delta:0})}function w(S){let c=s.location.origin!=="null"?s.location.origin:s.location.href,f=typeof S=="string"?S:Zi(S);return f=f.replace(/ $/,"%20"),Z(c,"No window.location.(origin|href) available to create URL for href: "+f),new URL(f,c)}let j={get action(){return o},get location(){return e(s,a)},listen(S){if(u)throw new Error("A history only accepts one active listener");return s.addEventListener($c,p),u=S,()=>{s.removeEventListener($c,p),u=null}},createHref(S){return t(s,S)},createURL:w,encodeLocation(S){let c=w(S);return{pathname:c.pathname,search:c.search,hash:c.hash}},push:g,replace:m,go(S){return a.go(S)}};return j}var Qc;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Qc||(Qc={}));function lg(e,t,n){return n===void 0&&(n="/"),ag(e,t,n)}function ag(e,t,n,r){let s=typeof t=="string"?Ur(t):t,l=Lr(s.pathname||"/",n);if(l==null)return null;let a=$h(e);og(a);let o=null;for(let u=0;o==null&&u<a.length;++u){let d=xg(l);o=gg(a[u],d)}return o}function $h(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(l,a,o)=>{let u={relativePath:o===void 0?l.path||"":o,caseSensitive:l.caseSensitive===!0,childrenIndex:a,route:l};u.relativePath.startsWith("/")&&(Z(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let d=hn([r,u.relativePath]),h=n.concat(u);l.children&&l.children.length>0&&(Z(l.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+d+'".')),$h(l.children,t,h,d)),!(l.path==null&&!l.index)&&t.push({path:d,score:mg(d,l.index),routesMeta:h})};return e.forEach((l,a)=>{var o;if(l.path===""||!((o=l.path)!=null&&o.includes("?")))s(l,a);else for(let u of Bh(l.path))s(l,a,u)}),t}function Bh(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),l=n.replace(/\?$/,"");if(r.length===0)return s?[l,""]:[l];let a=Bh(r.join("/")),o=[];return o.push(...a.map(u=>u===""?l:[l,u].join("/"))),s&&o.push(...a),o.map(u=>e.startsWith("/")&&u===""?"/":u)}function og(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:vg(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const ug=/^:[\w-]+$/,cg=3,dg=2,fg=1,hg=10,pg=-2,Wc=e=>e==="*";function mg(e,t){let n=e.split("/"),r=n.length;return n.some(Wc)&&(r+=pg),t&&(r+=dg),n.filter(s=>!Wc(s)).reduce((s,l)=>s+(ug.test(l)?cg:l===""?fg:hg),r)}function vg(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function gg(e,t,n){let{routesMeta:r}=e,s={},l="/",a=[];for(let o=0;o<r.length;++o){let u=r[o],d=o===r.length-1,h=l==="/"?t:t.slice(l.length)||"/",p=ro({path:u.relativePath,caseSensitive:u.caseSensitive,end:d},h),g=u.route;if(!p)return null;Object.assign(s,p.params),a.push({params:s,pathname:hn([l,p.pathname]),pathnameBase:kg(hn([l,p.pathnameBase])),route:g}),p.pathnameBase!=="/"&&(l=hn([l,p.pathnameBase]))}return a}function ro(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=yg(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let l=s[0],a=l.replace(/(.)\/+$/,"$1"),o=s.slice(1);return{params:r.reduce((d,h,p)=>{let{paramName:g,isOptional:m}=h;if(g==="*"){let j=o[p]||"";a=l.slice(0,l.length-j.length).replace(/(.)\/+$/,"$1")}const w=o[p];return m&&!w?d[g]=void 0:d[g]=(w||"").replace(/%2F/g,"/"),d},{}),pathname:l,pathnameBase:a,pattern:e}}function yg(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),gu(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,o,u)=>(r.push({paramName:o,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function xg(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return gu(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Lr(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const jg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,wg=e=>jg.test(e);function Sg(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?Ur(e):e,l;if(n)if(wg(n))l=n;else{if(n.includes("//")){let a=n;n=n.replace(/\/\/+/g,"/"),gu(!1,"Pathnames cannot have embedded double slashes - normalizing "+(a+" -> "+n))}n.startsWith("/")?l=Hc(n.substring(1),"/"):l=Hc(n,t)}else l=t;return{pathname:l,search:Cg(r),hash:Eg(s)}}function Hc(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function na(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Ng(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function yu(e,t){let n=Ng(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function xu(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=Ur(e):(s=_s({},e),Z(!s.pathname||!s.pathname.includes("?"),na("?","pathname","search",s)),Z(!s.pathname||!s.pathname.includes("#"),na("#","pathname","hash",s)),Z(!s.search||!s.search.includes("#"),na("#","search","hash",s)));let l=e===""||s.pathname==="",a=l?"/":s.pathname,o;if(a==null)o=n;else{let p=t.length-1;if(!r&&a.startsWith("..")){let g=a.split("/");for(;g[0]==="..";)g.shift(),p-=1;s.pathname=g.join("/")}o=p>=0?t[p]:"/"}let u=Sg(s,o),d=a&&a!=="/"&&a.endsWith("/"),h=(l||a===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(d||h)&&(u.pathname+="/"),u}const hn=e=>e.join("/").replace(/\/\/+/g,"/"),kg=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Cg=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Eg=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Pg(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Qh=["post","put","patch","delete"];new Set(Qh);const _g=["get",...Qh];new Set(_g);/**
49
+ */function bs(){return bs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bs.apply(this,arguments)}var rn;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(rn||(rn={}));const Qc="popstate";function rg(e){e===void 0&&(e={});function t(r,s){let{pathname:l,search:a,hash:o}=r.location;return no("",{pathname:l,search:a,hash:o},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:Zi(s)}return ig(t,n,null,e)}function Z(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function gu(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function sg(){return Math.random().toString(36).substr(2,8)}function Wc(e,t){return{usr:e.state,key:e.key,idx:t}}function no(e,t,n,r){return n===void 0&&(n=null),bs({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ur(t):t,{state:n,key:t&&t.key||r||sg()})}function Zi(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Ur(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function ig(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:l=!1}=r,a=s.history,o=rn.Pop,u=null,d=h();d==null&&(d=0,a.replaceState(bs({},a.state,{idx:d}),""));function h(){return(a.state||{idx:null}).idx}function p(){o=rn.Pop;let S=h(),c=S==null?null:S-d;d=S,u&&u({action:o,location:j.location,delta:c})}function g(S,c){o=rn.Push;let f=no(j.location,S,c);d=h()+1;let v=Wc(f,d),y=j.createHref(f);try{a.pushState(v,"",y)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;s.location.assign(y)}l&&u&&u({action:o,location:j.location,delta:1})}function m(S,c){o=rn.Replace;let f=no(j.location,S,c);d=h();let v=Wc(f,d),y=j.createHref(f);a.replaceState(v,"",y),l&&u&&u({action:o,location:j.location,delta:0})}function w(S){let c=s.location.origin!=="null"?s.location.origin:s.location.href,f=typeof S=="string"?S:Zi(S);return f=f.replace(/ $/,"%20"),Z(c,"No window.location.(origin|href) available to create URL for href: "+f),new URL(f,c)}let j={get action(){return o},get location(){return e(s,a)},listen(S){if(u)throw new Error("A history only accepts one active listener");return s.addEventListener(Qc,p),u=S,()=>{s.removeEventListener(Qc,p),u=null}},createHref(S){return t(s,S)},createURL:w,encodeLocation(S){let c=w(S);return{pathname:c.pathname,search:c.search,hash:c.hash}},push:g,replace:m,go(S){return a.go(S)}};return j}var Hc;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Hc||(Hc={}));function lg(e,t,n){return n===void 0&&(n="/"),ag(e,t,n)}function ag(e,t,n,r){let s=typeof t=="string"?Ur(t):t,l=Lr(s.pathname||"/",n);if(l==null)return null;let a=Qh(e);og(a);let o=null;for(let u=0;o==null&&u<a.length;++u){let d=xg(l);o=gg(a[u],d)}return o}function Qh(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(l,a,o)=>{let u={relativePath:o===void 0?l.path||"":o,caseSensitive:l.caseSensitive===!0,childrenIndex:a,route:l};u.relativePath.startsWith("/")&&(Z(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let d=hn([r,u.relativePath]),h=n.concat(u);l.children&&l.children.length>0&&(Z(l.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+d+'".')),Qh(l.children,t,h,d)),!(l.path==null&&!l.index)&&t.push({path:d,score:mg(d,l.index),routesMeta:h})};return e.forEach((l,a)=>{var o;if(l.path===""||!((o=l.path)!=null&&o.includes("?")))s(l,a);else for(let u of Wh(l.path))s(l,a,u)}),t}function Wh(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),l=n.replace(/\?$/,"");if(r.length===0)return s?[l,""]:[l];let a=Wh(r.join("/")),o=[];return o.push(...a.map(u=>u===""?l:[l,u].join("/"))),s&&o.push(...a),o.map(u=>e.startsWith("/")&&u===""?"/":u)}function og(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:vg(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const ug=/^:[\w-]+$/,cg=3,dg=2,fg=1,hg=10,pg=-2,Kc=e=>e==="*";function mg(e,t){let n=e.split("/"),r=n.length;return n.some(Kc)&&(r+=pg),t&&(r+=dg),n.filter(s=>!Kc(s)).reduce((s,l)=>s+(ug.test(l)?cg:l===""?fg:hg),r)}function vg(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function gg(e,t,n){let{routesMeta:r}=e,s={},l="/",a=[];for(let o=0;o<r.length;++o){let u=r[o],d=o===r.length-1,h=l==="/"?t:t.slice(l.length)||"/",p=ro({path:u.relativePath,caseSensitive:u.caseSensitive,end:d},h),g=u.route;if(!p)return null;Object.assign(s,p.params),a.push({params:s,pathname:hn([l,p.pathname]),pathnameBase:kg(hn([l,p.pathnameBase])),route:g}),p.pathnameBase!=="/"&&(l=hn([l,p.pathnameBase]))}return a}function ro(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=yg(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let l=s[0],a=l.replace(/(.)\/+$/,"$1"),o=s.slice(1);return{params:r.reduce((d,h,p)=>{let{paramName:g,isOptional:m}=h;if(g==="*"){let j=o[p]||"";a=l.slice(0,l.length-j.length).replace(/(.)\/+$/,"$1")}const w=o[p];return m&&!w?d[g]=void 0:d[g]=(w||"").replace(/%2F/g,"/"),d},{}),pathname:l,pathnameBase:a,pattern:e}}function yg(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),gu(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,o,u)=>(r.push({paramName:o,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function xg(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return gu(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Lr(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const jg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,wg=e=>jg.test(e);function Sg(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?Ur(e):e,l;if(n)if(wg(n))l=n;else{if(n.includes("//")){let a=n;n=n.replace(/\/\/+/g,"/"),gu(!1,"Pathnames cannot have embedded double slashes - normalizing "+(a+" -> "+n))}n.startsWith("/")?l=qc(n.substring(1),"/"):l=qc(n,t)}else l=t;return{pathname:l,search:Cg(r),hash:Eg(s)}}function qc(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function na(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Ng(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function yu(e,t){let n=Ng(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function xu(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=Ur(e):(s=bs({},e),Z(!s.pathname||!s.pathname.includes("?"),na("?","pathname","search",s)),Z(!s.pathname||!s.pathname.includes("#"),na("#","pathname","hash",s)),Z(!s.search||!s.search.includes("#"),na("#","search","hash",s)));let l=e===""||s.pathname==="",a=l?"/":s.pathname,o;if(a==null)o=n;else{let p=t.length-1;if(!r&&a.startsWith("..")){let g=a.split("/");for(;g[0]==="..";)g.shift(),p-=1;s.pathname=g.join("/")}o=p>=0?t[p]:"/"}let u=Sg(s,o),d=a&&a!=="/"&&a.endsWith("/"),h=(l||a===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(d||h)&&(u.pathname+="/"),u}const hn=e=>e.join("/").replace(/\/\/+/g,"/"),kg=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Cg=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Eg=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function _g(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Hh=["post","put","patch","delete"];new Set(Hh);const Pg=["get",...Hh];new Set(Pg);/**
50
50
  * React Router v6.30.3
51
51
  *
52
52
  * Copyright (c) Remix Software Inc.
@@ -55,7 +55,7 @@ Error generating stack: `+l.message+`
55
55
  * LICENSE.md file in the root directory of this source tree.
56
56
  *
57
57
  * @license MIT
58
- */function Rs(){return Rs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rs.apply(this,arguments)}const xl=N.createContext(null),Wh=N.createContext(null),At=N.createContext(null),jl=N.createContext(null),jn=N.createContext({outlet:null,matches:[],isDataRoute:!1}),Hh=N.createContext(null);function Rg(e,t){let{relative:n}=t===void 0?{}:t;$r()||Z(!1);let{basename:r,navigator:s}=N.useContext(At),{hash:l,pathname:a,search:o}=wl(e,{relative:n}),u=a;return r!=="/"&&(u=a==="/"?r:hn([r,a])),s.createHref({pathname:u,search:o,hash:l})}function $r(){return N.useContext(jl)!=null}function Gn(){return $r()||Z(!1),N.useContext(jl).location}function Kh(e){N.useContext(At).static||N.useLayoutEffect(e)}function ju(){let{isDataRoute:e}=N.useContext(jn);return e?Bg():bg()}function bg(){$r()||Z(!1);let e=N.useContext(xl),{basename:t,future:n,navigator:r}=N.useContext(At),{matches:s}=N.useContext(jn),{pathname:l}=Gn(),a=JSON.stringify(yu(s,n.v7_relativeSplatPath)),o=N.useRef(!1);return Kh(()=>{o.current=!0}),N.useCallback(function(d,h){if(h===void 0&&(h={}),!o.current)return;if(typeof d=="number"){r.go(d);return}let p=xu(d,JSON.parse(a),l,h.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:hn([t,p.pathname])),(h.replace?r.replace:r.push)(p,h.state,h)},[t,r,a,l,e])}function wl(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=N.useContext(At),{matches:s}=N.useContext(jn),{pathname:l}=Gn(),a=JSON.stringify(yu(s,r.v7_relativeSplatPath));return N.useMemo(()=>xu(e,JSON.parse(a),l,n==="path"),[e,a,l,n])}function Tg(e,t){return Og(e,t)}function Og(e,t,n,r){$r()||Z(!1);let{navigator:s}=N.useContext(At),{matches:l}=N.useContext(jn),a=l[l.length-1],o=a?a.params:{};a&&a.pathname;let u=a?a.pathnameBase:"/";a&&a.route;let d=Gn(),h;if(t){var p;let S=typeof t=="string"?Ur(t):t;u==="/"||(p=S.pathname)!=null&&p.startsWith(u)||Z(!1),h=S}else h=d;let g=h.pathname||"/",m=g;if(u!=="/"){let S=u.replace(/^\//,"").split("/");m="/"+g.replace(/^\//,"").split("/").slice(S.length).join("/")}let w=lg(e,{pathname:m}),j=Ag(w&&w.map(S=>Object.assign({},S,{params:Object.assign({},o,S.params),pathname:hn([u,s.encodeLocation?s.encodeLocation(S.pathname).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?u:hn([u,s.encodeLocation?s.encodeLocation(S.pathnameBase).pathname:S.pathnameBase])})),l,n,r);return t&&j?N.createElement(jl.Provider,{value:{location:Rs({pathname:"/",search:"",hash:"",state:null,key:"default"},h),navigationType:rn.Pop}},j):j}function Ig(){let e=$g(),t=Pg(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return N.createElement(N.Fragment,null,N.createElement("h2",null,"Unexpected Application Error!"),N.createElement("h3",{style:{fontStyle:"italic"}},t),n?N.createElement("pre",{style:s},n):null,null)}const Mg=N.createElement(Ig,null);class Lg extends N.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?N.createElement(jn.Provider,{value:this.props.routeContext},N.createElement(Hh.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Fg(e){let{routeContext:t,match:n,children:r}=e,s=N.useContext(xl);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),N.createElement(jn.Provider,{value:t},r)}function Ag(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var l;if(!n)return null;if(n.errors)e=n.matches;else if((l=r)!=null&&l.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,o=(s=n)==null?void 0:s.errors;if(o!=null){let h=a.findIndex(p=>p.route.id&&(o==null?void 0:o[p.route.id])!==void 0);h>=0||Z(!1),a=a.slice(0,Math.min(a.length,h+1))}let u=!1,d=-1;if(n&&r&&r.v7_partialHydration)for(let h=0;h<a.length;h++){let p=a[h];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(d=h),p.route.id){let{loaderData:g,errors:m}=n,w=p.route.loader&&g[p.route.id]===void 0&&(!m||m[p.route.id]===void 0);if(p.route.lazy||w){u=!0,d>=0?a=a.slice(0,d+1):a=[a[0]];break}}}return a.reduceRight((h,p,g)=>{let m,w=!1,j=null,S=null;n&&(m=o&&p.route.id?o[p.route.id]:void 0,j=p.route.errorElement||Mg,u&&(d<0&&g===0?(Qg("route-fallback"),w=!0,S=null):d===g&&(w=!0,S=p.route.hydrateFallbackElement||null)));let c=t.concat(a.slice(0,g+1)),f=()=>{let v;return m?v=j:w?v=S:p.route.Component?v=N.createElement(p.route.Component,null):p.route.element?v=p.route.element:v=h,N.createElement(Fg,{match:p,routeContext:{outlet:h,matches:c,isDataRoute:n!=null},children:v})};return n&&(p.route.ErrorBoundary||p.route.errorElement||g===0)?N.createElement(Lg,{location:n.location,revalidation:n.revalidation,component:j,error:m,children:f(),routeContext:{outlet:null,matches:c,isDataRoute:!0}}):f()},null)}var qh=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(qh||{}),Vh=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Vh||{});function zg(e){let t=N.useContext(xl);return t||Z(!1),t}function Dg(e){let t=N.useContext(Wh);return t||Z(!1),t}function Ug(e){let t=N.useContext(jn);return t||Z(!1),t}function Gh(e){let t=Ug(),n=t.matches[t.matches.length-1];return n.route.id||Z(!1),n.route.id}function $g(){var e;let t=N.useContext(Hh),n=Dg(),r=Gh();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Bg(){let{router:e}=zg(qh.UseNavigateStable),t=Gh(Vh.UseNavigateStable),n=N.useRef(!1);return Kh(()=>{n.current=!0}),N.useCallback(function(s,l){l===void 0&&(l={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Rs({fromRouteId:t},l)))},[e,t])}const Kc={};function Qg(e,t,n){Kc[e]||(Kc[e]=!0)}function Wg(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Hg(e){let{to:t,replace:n,state:r,relative:s}=e;$r()||Z(!1);let{future:l,static:a}=N.useContext(At),{matches:o}=N.useContext(jn),{pathname:u}=Gn(),d=ju(),h=xu(t,yu(o,l.v7_relativeSplatPath),u,s==="path"),p=JSON.stringify(h);return N.useEffect(()=>d(JSON.parse(p),{replace:n,state:r,relative:s}),[d,p,s,n,r]),null}function Ne(e){Z(!1)}function Kg(e){let{basename:t="/",children:n=null,location:r,navigationType:s=rn.Pop,navigator:l,static:a=!1,future:o}=e;$r()&&Z(!1);let u=t.replace(/^\/*/,"/"),d=N.useMemo(()=>({basename:u,navigator:l,static:a,future:Rs({v7_relativeSplatPath:!1},o)}),[u,o,l,a]);typeof r=="string"&&(r=Ur(r));let{pathname:h="/",search:p="",hash:g="",state:m=null,key:w="default"}=r,j=N.useMemo(()=>{let S=Lr(h,u);return S==null?null:{location:{pathname:S,search:p,hash:g,state:m,key:w},navigationType:s}},[u,h,p,g,m,w,s]);return j==null?null:N.createElement(At.Provider,{value:d},N.createElement(jl.Provider,{children:n,value:j}))}function Jh(e){let{children:t,location:n}=e;return Tg(so(t),n)}new Promise(()=>{});function so(e,t){t===void 0&&(t=[]);let n=[];return N.Children.forEach(e,(r,s)=>{if(!N.isValidElement(r))return;let l=[...t,s];if(r.type===N.Fragment){n.push.apply(n,so(r.props.children,l));return}r.type!==Ne&&Z(!1),!r.props.index||!r.props.children||Z(!1);let a={id:r.props.id||l.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=so(r.props.children,l)),n.push(a)}),n}/**
58
+ */function Ts(){return Ts=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ts.apply(this,arguments)}const xl=N.createContext(null),Kh=N.createContext(null),At=N.createContext(null),jl=N.createContext(null),jn=N.createContext({outlet:null,matches:[],isDataRoute:!1}),qh=N.createContext(null);function Rg(e,t){let{relative:n}=t===void 0?{}:t;$r()||Z(!1);let{basename:r,navigator:s}=N.useContext(At),{hash:l,pathname:a,search:o}=wl(e,{relative:n}),u=a;return r!=="/"&&(u=a==="/"?r:hn([r,a])),s.createHref({pathname:u,search:o,hash:l})}function $r(){return N.useContext(jl)!=null}function Gn(){return $r()||Z(!1),N.useContext(jl).location}function Vh(e){N.useContext(At).static||N.useLayoutEffect(e)}function ju(){let{isDataRoute:e}=N.useContext(jn);return e?Bg():bg()}function bg(){$r()||Z(!1);let e=N.useContext(xl),{basename:t,future:n,navigator:r}=N.useContext(At),{matches:s}=N.useContext(jn),{pathname:l}=Gn(),a=JSON.stringify(yu(s,n.v7_relativeSplatPath)),o=N.useRef(!1);return Vh(()=>{o.current=!0}),N.useCallback(function(d,h){if(h===void 0&&(h={}),!o.current)return;if(typeof d=="number"){r.go(d);return}let p=xu(d,JSON.parse(a),l,h.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:hn([t,p.pathname])),(h.replace?r.replace:r.push)(p,h.state,h)},[t,r,a,l,e])}function wl(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=N.useContext(At),{matches:s}=N.useContext(jn),{pathname:l}=Gn(),a=JSON.stringify(yu(s,r.v7_relativeSplatPath));return N.useMemo(()=>xu(e,JSON.parse(a),l,n==="path"),[e,a,l,n])}function Tg(e,t){return Ig(e,t)}function Ig(e,t,n,r){$r()||Z(!1);let{navigator:s}=N.useContext(At),{matches:l}=N.useContext(jn),a=l[l.length-1],o=a?a.params:{};a&&a.pathname;let u=a?a.pathnameBase:"/";a&&a.route;let d=Gn(),h;if(t){var p;let S=typeof t=="string"?Ur(t):t;u==="/"||(p=S.pathname)!=null&&p.startsWith(u)||Z(!1),h=S}else h=d;let g=h.pathname||"/",m=g;if(u!=="/"){let S=u.replace(/^\//,"").split("/");m="/"+g.replace(/^\//,"").split("/").slice(S.length).join("/")}let w=lg(e,{pathname:m}),j=Ag(w&&w.map(S=>Object.assign({},S,{params:Object.assign({},o,S.params),pathname:hn([u,s.encodeLocation?s.encodeLocation(S.pathname).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?u:hn([u,s.encodeLocation?s.encodeLocation(S.pathnameBase).pathname:S.pathnameBase])})),l,n,r);return t&&j?N.createElement(jl.Provider,{value:{location:Ts({pathname:"/",search:"",hash:"",state:null,key:"default"},h),navigationType:rn.Pop}},j):j}function Og(){let e=$g(),t=_g(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return N.createElement(N.Fragment,null,N.createElement("h2",null,"Unexpected Application Error!"),N.createElement("h3",{style:{fontStyle:"italic"}},t),n?N.createElement("pre",{style:s},n):null,null)}const Mg=N.createElement(Og,null);class Lg extends N.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?N.createElement(jn.Provider,{value:this.props.routeContext},N.createElement(qh.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Fg(e){let{routeContext:t,match:n,children:r}=e,s=N.useContext(xl);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),N.createElement(jn.Provider,{value:t},r)}function Ag(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var l;if(!n)return null;if(n.errors)e=n.matches;else if((l=r)!=null&&l.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,o=(s=n)==null?void 0:s.errors;if(o!=null){let h=a.findIndex(p=>p.route.id&&(o==null?void 0:o[p.route.id])!==void 0);h>=0||Z(!1),a=a.slice(0,Math.min(a.length,h+1))}let u=!1,d=-1;if(n&&r&&r.v7_partialHydration)for(let h=0;h<a.length;h++){let p=a[h];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(d=h),p.route.id){let{loaderData:g,errors:m}=n,w=p.route.loader&&g[p.route.id]===void 0&&(!m||m[p.route.id]===void 0);if(p.route.lazy||w){u=!0,d>=0?a=a.slice(0,d+1):a=[a[0]];break}}}return a.reduceRight((h,p,g)=>{let m,w=!1,j=null,S=null;n&&(m=o&&p.route.id?o[p.route.id]:void 0,j=p.route.errorElement||Mg,u&&(d<0&&g===0?(Qg("route-fallback"),w=!0,S=null):d===g&&(w=!0,S=p.route.hydrateFallbackElement||null)));let c=t.concat(a.slice(0,g+1)),f=()=>{let v;return m?v=j:w?v=S:p.route.Component?v=N.createElement(p.route.Component,null):p.route.element?v=p.route.element:v=h,N.createElement(Fg,{match:p,routeContext:{outlet:h,matches:c,isDataRoute:n!=null},children:v})};return n&&(p.route.ErrorBoundary||p.route.errorElement||g===0)?N.createElement(Lg,{location:n.location,revalidation:n.revalidation,component:j,error:m,children:f(),routeContext:{outlet:null,matches:c,isDataRoute:!0}}):f()},null)}var Gh=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Gh||{}),Jh=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Jh||{});function zg(e){let t=N.useContext(xl);return t||Z(!1),t}function Dg(e){let t=N.useContext(Kh);return t||Z(!1),t}function Ug(e){let t=N.useContext(jn);return t||Z(!1),t}function Yh(e){let t=Ug(),n=t.matches[t.matches.length-1];return n.route.id||Z(!1),n.route.id}function $g(){var e;let t=N.useContext(qh),n=Dg(),r=Yh();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Bg(){let{router:e}=zg(Gh.UseNavigateStable),t=Yh(Jh.UseNavigateStable),n=N.useRef(!1);return Vh(()=>{n.current=!0}),N.useCallback(function(s,l){l===void 0&&(l={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Ts({fromRouteId:t},l)))},[e,t])}const Vc={};function Qg(e,t,n){Vc[e]||(Vc[e]=!0)}function Wg(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Hg(e){let{to:t,replace:n,state:r,relative:s}=e;$r()||Z(!1);let{future:l,static:a}=N.useContext(At),{matches:o}=N.useContext(jn),{pathname:u}=Gn(),d=ju(),h=xu(t,yu(o,l.v7_relativeSplatPath),u,s==="path"),p=JSON.stringify(h);return N.useEffect(()=>d(JSON.parse(p),{replace:n,state:r,relative:s}),[d,p,s,n,r]),null}function Ne(e){Z(!1)}function Kg(e){let{basename:t="/",children:n=null,location:r,navigationType:s=rn.Pop,navigator:l,static:a=!1,future:o}=e;$r()&&Z(!1);let u=t.replace(/^\/*/,"/"),d=N.useMemo(()=>({basename:u,navigator:l,static:a,future:Ts({v7_relativeSplatPath:!1},o)}),[u,o,l,a]);typeof r=="string"&&(r=Ur(r));let{pathname:h="/",search:p="",hash:g="",state:m=null,key:w="default"}=r,j=N.useMemo(()=>{let S=Lr(h,u);return S==null?null:{location:{pathname:S,search:p,hash:g,state:m,key:w},navigationType:s}},[u,h,p,g,m,w,s]);return j==null?null:N.createElement(At.Provider,{value:d},N.createElement(jl.Provider,{children:n,value:j}))}function Xh(e){let{children:t,location:n}=e;return Tg(so(t),n)}new Promise(()=>{});function so(e,t){t===void 0&&(t=[]);let n=[];return N.Children.forEach(e,(r,s)=>{if(!N.isValidElement(r))return;let l=[...t,s];if(r.type===N.Fragment){n.push.apply(n,so(r.props.children,l));return}r.type!==Ne&&Z(!1),!r.props.index||!r.props.children||Z(!1);let a={id:r.props.id||l.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=so(r.props.children,l)),n.push(a)}),n}/**
59
59
  * React Router DOM v6.30.3
60
60
  *
61
61
  * Copyright (c) Remix Software Inc.
@@ -64,9 +64,9 @@ Error generating stack: `+l.message+`
64
64
  * LICENSE.md file in the root directory of this source tree.
65
65
  *
66
66
  * @license MIT
67
- */function el(){return el=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},el.apply(this,arguments)}function Yh(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,l;for(l=0;l<r.length;l++)s=r[l],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function qg(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Vg(e,t){return e.button===0&&(!t||t==="_self")&&!qg(e)}const Gg=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Jg=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],Yg="6";try{window.__reactRouterVersion=Yg}catch{}const Xg=N.createContext({isTransitioning:!1}),Zg="startTransition",qc=Hp[Zg];function ey(e){let{basename:t,children:n,future:r,window:s}=e,l=N.useRef();l.current==null&&(l.current=rg({window:s,v5Compat:!0}));let a=l.current,[o,u]=N.useState({action:a.action,location:a.location}),{v7_startTransition:d}=r||{},h=N.useCallback(p=>{d&&qc?qc(()=>u(p)):u(p)},[u,d]);return N.useLayoutEffect(()=>a.listen(h),[a,h]),N.useEffect(()=>Wg(r),[r]),N.createElement(Kg,{basename:t,children:n,location:o.location,navigationType:o.action,navigator:a,future:r})}const ty=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ny=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ry=N.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:l,replace:a,state:o,target:u,to:d,preventScrollReset:h,viewTransition:p}=t,g=Yh(t,Gg),{basename:m}=N.useContext(At),w,j=!1;if(typeof d=="string"&&ny.test(d)&&(w=d,ty))try{let v=new URL(window.location.href),y=d.startsWith("//")?new URL(v.protocol+d):new URL(d),k=Lr(y.pathname,m);y.origin===v.origin&&k!=null?d=k+y.search+y.hash:j=!0}catch{}let S=Rg(d,{relative:s}),c=iy(d,{replace:a,state:o,target:u,preventScrollReset:h,relative:s,viewTransition:p});function f(v){r&&r(v),v.defaultPrevented||c(v)}return N.createElement("a",el({},g,{href:w||S,onClick:j||l?r:f,ref:n,target:u}))}),io=N.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:s=!1,className:l="",end:a=!1,style:o,to:u,viewTransition:d,children:h}=t,p=Yh(t,Jg),g=wl(u,{relative:p.relative}),m=Gn(),w=N.useContext(Wh),{navigator:j,basename:S}=N.useContext(At),c=w!=null&&ly(g)&&d===!0,f=j.encodeLocation?j.encodeLocation(g).pathname:g.pathname,v=m.pathname,y=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;s||(v=v.toLowerCase(),y=y?y.toLowerCase():null,f=f.toLowerCase()),y&&S&&(y=Lr(y,S)||y);const k=f!=="/"&&f.endsWith("/")?f.length-1:f.length;let E=v===f||!a&&v.startsWith(f)&&v.charAt(k)==="/",C=y!=null&&(y===f||!a&&y.startsWith(f)&&y.charAt(f.length)==="/"),P={isActive:E,isPending:C,isTransitioning:c},M=E?r:void 0,I;typeof l=="function"?I=l(P):I=[l,E?"active":null,C?"pending":null,c?"transitioning":null].filter(Boolean).join(" ");let te=typeof o=="function"?o(P):o;return N.createElement(ry,el({},p,{"aria-current":M,className:I,ref:n,style:te,to:u,viewTransition:d}),typeof h=="function"?h(P):h)});var lo;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(lo||(lo={}));var Vc;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Vc||(Vc={}));function sy(e){let t=N.useContext(xl);return t||Z(!1),t}function iy(e,t){let{target:n,replace:r,state:s,preventScrollReset:l,relative:a,viewTransition:o}=t===void 0?{}:t,u=ju(),d=Gn(),h=wl(e,{relative:a});return N.useCallback(p=>{if(Vg(p,n)){p.preventDefault();let g=r!==void 0?r:Zi(d)===Zi(h);u(e,{replace:g,state:s,preventScrollReset:l,relative:a,viewTransition:o})}},[d,u,h,r,s,n,e,l,a,o])}function ly(e,t){t===void 0&&(t={});let n=N.useContext(Xg);n==null&&Z(!1);let{basename:r}=sy(lo.useViewTransitionState),s=wl(e,{relative:t.relative});if(!n.isTransitioning)return!1;let l=Lr(n.currentLocation.pathname,r)||n.currentLocation.pathname,a=Lr(n.nextLocation.pathname,r)||n.nextLocation.pathname;return ro(s.pathname,a)!=null||ro(s.pathname,l)!=null}var Br=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},bn,Kt,vr,pd,ay=(pd=class extends Br{constructor(){super();O(this,bn);O(this,Kt);O(this,vr);R(this,vr,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){x(this,Kt)||this.setEventListener(x(this,vr))}onUnsubscribe(){var t;this.hasListeners()||((t=x(this,Kt))==null||t.call(this),R(this,Kt,void 0))}setEventListener(t){var n;R(this,vr,t),(n=x(this,Kt))==null||n.call(this),R(this,Kt,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){x(this,bn)!==t&&(R(this,bn,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof x(this,bn)=="boolean"?x(this,bn):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},bn=new WeakMap,Kt=new WeakMap,vr=new WeakMap,pd),wu=new ay,oy={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},qt,So,md,uy=(md=class{constructor(){O(this,qt,oy);O(this,So,!1)}setTimeoutProvider(e){R(this,qt,e)}setTimeout(e,t){return x(this,qt).setTimeout(e,t)}clearTimeout(e){x(this,qt).clearTimeout(e)}setInterval(e,t){return x(this,qt).setInterval(e,t)}clearInterval(e){x(this,qt).clearInterval(e)}},qt=new WeakMap,So=new WeakMap,md),Rn=new uy;function cy(e){setTimeout(e,0)}var dy=typeof window>"u"||"Deno"in globalThis;function _e(){}function fy(e,t){return typeof e=="function"?e(t):e}function ao(e){return typeof e=="number"&&e>=0&&e!==1/0}function Xh(e,t){return Math.max(e+(t||0)-Date.now(),0)}function pn(e,t){return typeof e=="function"?e(t):e}function Ge(e,t){return typeof e=="function"?e(t):e}function Gc(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:l,queryKey:a,stale:o}=e;if(a){if(r){if(t.queryHash!==Su(a,t.options))return!1}else if(!bs(t.queryKey,a))return!1}if(n!=="all"){const u=t.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||s&&s!==t.state.fetchStatus||l&&!l(t))}function Jc(e,t){const{exact:n,status:r,predicate:s,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(n){if(Kn(t.options.mutationKey)!==Kn(l))return!1}else if(!bs(t.options.mutationKey,l))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function Su(e,t){return((t==null?void 0:t.queryKeyHashFn)||Kn)(e)}function Kn(e){return JSON.stringify(e,(t,n)=>oo(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function bs(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>bs(e[n],t[n])):!1}var hy=Object.prototype.hasOwnProperty;function Zh(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=Yc(e)&&Yc(t);if(!r&&!(oo(e)&&oo(t)))return t;const l=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,u=r?new Array(o):{};let d=0;for(let h=0;h<o;h++){const p=r?h:a[h],g=e[p],m=t[p];if(g===m){u[p]=g,(r?h<l:hy.call(e,p))&&d++;continue}if(g===null||m===null||typeof g!="object"||typeof m!="object"){u[p]=m;continue}const w=Zh(g,m,n+1);u[p]=w,w===g&&d++}return l===o&&d===l?e:u}function tl(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Yc(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function oo(e){if(!Xc(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Xc(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Xc(e){return Object.prototype.toString.call(e)==="[object Object]"}function py(e){return new Promise(t=>{Rn.setTimeout(t,e)})}function uo(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Zh(e,t):t}function my(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function vy(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Nu=Symbol();function ep(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Nu?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function ku(e,t){return typeof e=="function"?e(...t):!!e}function gy(e,t,n){let r=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??(s=t()),r||(r=!0,s.aborted?n():s.addEventListener("abort",n,{once:!0})),s)}),e}var Ts=(()=>{let e=()=>dy;return{isServer(){return e()},setIsServer(t){e=t}}})();function co(){let e,t;const n=new Promise((s,l)=>{e=s,t=l});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}var yy=cy;function xy(){let e=[],t=0,n=o=>{o()},r=o=>{o()},s=yy;const l=o=>{t?e.push(o):s(()=>{n(o)})},a=()=>{const o=e;e=[],o.length&&s(()=>{r(()=>{o.forEach(u=>{n(u)})})})};return{batch:o=>{let u;t++;try{u=o()}finally{t--,t||a()}return u},batchCalls:o=>(...u)=>{l(()=>{o(...u)})},schedule:l,setNotifyFunction:o=>{n=o},setBatchNotifyFunction:o=>{r=o},setScheduler:o=>{s=o}}}var ue=xy(),gr,Vt,yr,vd,jy=(vd=class extends Br{constructor(){super();O(this,gr,!0);O(this,Vt);O(this,yr);R(this,yr,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){x(this,Vt)||this.setEventListener(x(this,yr))}onUnsubscribe(){var t;this.hasListeners()||((t=x(this,Vt))==null||t.call(this),R(this,Vt,void 0))}setEventListener(t){var n;R(this,yr,t),(n=x(this,Vt))==null||n.call(this),R(this,Vt,t(this.setOnline.bind(this)))}setOnline(t){x(this,gr)!==t&&(R(this,gr,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return x(this,gr)}},gr=new WeakMap,Vt=new WeakMap,yr=new WeakMap,vd),nl=new jy;function wy(e){return Math.min(1e3*2**e,3e4)}function tp(e){return(e??"online")==="online"?nl.isOnline():!0}var fo=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function np(e){let t=!1,n=0,r;const s=co(),l=()=>s.status!=="pending",a=j=>{var S;if(!l()){const c=new fo(j);g(c),(S=e.onCancel)==null||S.call(e,c)}},o=()=>{t=!0},u=()=>{t=!1},d=()=>wu.isFocused()&&(e.networkMode==="always"||nl.isOnline())&&e.canRun(),h=()=>tp(e.networkMode)&&e.canRun(),p=j=>{l()||(r==null||r(),s.resolve(j))},g=j=>{l()||(r==null||r(),s.reject(j))},m=()=>new Promise(j=>{var S;r=c=>{(l()||d())&&j(c)},(S=e.onPause)==null||S.call(e)}).then(()=>{var j;r=void 0,l()||(j=e.onContinue)==null||j.call(e)}),w=()=>{if(l())return;let j;const S=n===0?e.initialPromise:void 0;try{j=S??e.fn()}catch(c){j=Promise.reject(c)}Promise.resolve(j).then(p).catch(c=>{var E;if(l())return;const f=e.retry??(Ts.isServer()?0:3),v=e.retryDelay??wy,y=typeof v=="function"?v(n,c):v,k=f===!0||typeof f=="number"&&n<f||typeof f=="function"&&f(n,c);if(t||!k){g(c);return}n++,(E=e.onFail)==null||E.call(e,n,c),py(y).then(()=>d()?void 0:m()).then(()=>{t?g(c):w()})})};return{promise:s,status:()=>s.status,cancel:a,continue:()=>(r==null||r(),s),cancelRetry:o,continueRetry:u,canStart:h,start:()=>(h()?w():m().then(w),s)}}var Tn,gd,rp=(gd=class{constructor(){O(this,Tn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ao(this.gcTime)&&R(this,Tn,Rn.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ts.isServer()?1/0:5*60*1e3))}clearGcTimeout(){x(this,Tn)!==void 0&&(Rn.clearTimeout(x(this,Tn)),R(this,Tn,void 0))}},Tn=new WeakMap,gd),On,xr,Ve,In,fe,Ms,Mn,Be,sp,jt,yd,Sy=(yd=class extends rp{constructor(t){super();O(this,Be);O(this,On);O(this,xr);O(this,Ve);O(this,In);O(this,fe);O(this,Ms);O(this,Mn);R(this,Mn,!1),R(this,Ms,t.defaultOptions),this.setOptions(t.options),this.observers=[],R(this,In,t.client),R(this,Ve,x(this,In).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,R(this,On,ed(this.options)),this.state=t.state??x(this,On),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=x(this,fe))==null?void 0:t.promise}setOptions(t){if(this.options={...x(this,Ms),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=ed(this.options);n.data!==void 0&&(this.setState(Zc(n.data,n.dataUpdatedAt)),R(this,On,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&x(this,Ve).remove(this)}setData(t,n){const r=uo(this.state.data,t,this.options);return F(this,Be,jt).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){F(this,Be,jt).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=x(this,fe))==null?void 0:r.promise;return(s=x(this,fe))==null||s.cancel(t),n?n.then(_e).catch(_e):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return x(this,On)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Ge(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Nu||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>pn(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Xh(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=x(this,fe))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=x(this,fe))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),x(this,Ve).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(x(this,fe)&&(x(this,Mn)||F(this,Be,sp).call(this)?x(this,fe).cancel({revert:!0}):x(this,fe).cancelRetry()),this.scheduleGc()),x(this,Ve).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||F(this,Be,jt).call(this,{type:"invalidate"})}async fetch(t,n){var u,d,h,p,g,m,w,j,S,c,f,v;if(this.state.fetchStatus!=="idle"&&((u=x(this,fe))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(x(this,fe))return x(this,fe).continueRetry(),x(this,fe).promise}if(t&&this.setOptions(t),!this.options.queryFn){const y=this.observers.find(k=>k.options.queryFn);y&&this.setOptions(y.options)}const r=new AbortController,s=y=>{Object.defineProperty(y,"signal",{enumerable:!0,get:()=>(R(this,Mn,!0),r.signal)})},l=()=>{const y=ep(this.options,n),E=(()=>{const C={client:x(this,In),queryKey:this.queryKey,meta:this.meta};return s(C),C})();return R(this,Mn,!1),this.options.persister?this.options.persister(y,E,this):y(E)},o=(()=>{const y={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:x(this,In),state:this.state,fetchFn:l};return s(y),y})();(d=this.options.behavior)==null||d.onFetch(o,this),R(this,xr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=o.fetchOptions)==null?void 0:h.meta))&&F(this,Be,jt).call(this,{type:"fetch",meta:(p=o.fetchOptions)==null?void 0:p.meta}),R(this,fe,np({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,onCancel:y=>{y instanceof fo&&y.revert&&this.setState({...x(this,xr),fetchStatus:"idle"}),r.abort()},onFail:(y,k)=>{F(this,Be,jt).call(this,{type:"failed",failureCount:y,error:k})},onPause:()=>{F(this,Be,jt).call(this,{type:"pause"})},onContinue:()=>{F(this,Be,jt).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const y=await x(this,fe).start();if(y===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(y),(m=(g=x(this,Ve).config).onSuccess)==null||m.call(g,y,this),(j=(w=x(this,Ve).config).onSettled)==null||j.call(w,y,this.state.error,this),y}catch(y){if(y instanceof fo){if(y.silent)return x(this,fe).promise;if(y.revert){if(this.state.data===void 0)throw y;return this.state.data}}throw F(this,Be,jt).call(this,{type:"error",error:y}),(c=(S=x(this,Ve).config).onError)==null||c.call(S,y,this),(v=(f=x(this,Ve).config).onSettled)==null||v.call(f,this.state.data,y,this),y}finally{this.scheduleGc()}}},On=new WeakMap,xr=new WeakMap,Ve=new WeakMap,In=new WeakMap,fe=new WeakMap,Ms=new WeakMap,Mn=new WeakMap,Be=new WeakSet,sp=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},jt=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...ip(r.data,this.options),fetchMeta:t.meta??null};case"success":const s={...r,...Zc(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return R(this,xr,t.manual?s:void 0),s;case"error":const l=t.error;return{...r,error:l,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),ue.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),x(this,Ve).notify({query:this,type:"updated",action:t})})},yd);function ip(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:tp(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Zc(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function ed(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Ie,$,Ls,Ee,Ln,jr,Nt,Gt,Fs,wr,Sr,Fn,An,Jt,Nr,W,ts,ho,po,mo,vo,go,yo,xo,lp,xd,Ny=(xd=class extends Br{constructor(t,n){super();O(this,W);O(this,Ie);O(this,$);O(this,Ls);O(this,Ee);O(this,Ln);O(this,jr);O(this,Nt);O(this,Gt);O(this,Fs);O(this,wr);O(this,Sr);O(this,Fn);O(this,An);O(this,Jt);O(this,Nr,new Set);this.options=n,R(this,Ie,t),R(this,Gt,null),R(this,Nt,co()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(x(this,$).addObserver(this),td(x(this,$),this.options)?F(this,W,ts).call(this):this.updateResult(),F(this,W,vo).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return jo(x(this,$),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return jo(x(this,$),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,F(this,W,go).call(this),F(this,W,yo).call(this),x(this,$).removeObserver(this)}setOptions(t){const n=this.options,r=x(this,$);if(this.options=x(this,Ie).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ge(this.options.enabled,x(this,$))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");F(this,W,xo).call(this),x(this,$).setOptions(this.options),n._defaulted&&!tl(this.options,n)&&x(this,Ie).getQueryCache().notify({type:"observerOptionsUpdated",query:x(this,$),observer:this});const s=this.hasListeners();s&&nd(x(this,$),r,this.options,n)&&F(this,W,ts).call(this),this.updateResult(),s&&(x(this,$)!==r||Ge(this.options.enabled,x(this,$))!==Ge(n.enabled,x(this,$))||pn(this.options.staleTime,x(this,$))!==pn(n.staleTime,x(this,$)))&&F(this,W,ho).call(this);const l=F(this,W,po).call(this);s&&(x(this,$)!==r||Ge(this.options.enabled,x(this,$))!==Ge(n.enabled,x(this,$))||l!==x(this,Jt))&&F(this,W,mo).call(this,l)}getOptimisticResult(t){const n=x(this,Ie).getQueryCache().build(x(this,Ie),t),r=this.createResult(n,t);return Cy(this,r)&&(R(this,Ee,r),R(this,jr,this.options),R(this,Ln,x(this,$).state)),r}getCurrentResult(){return x(this,Ee)}trackResult(t,n){return new Proxy(t,{get:(r,s)=>(this.trackProp(s),n==null||n(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&x(this,Nt).status==="pending"&&x(this,Nt).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,s))})}trackProp(t){x(this,Nr).add(t)}getCurrentQuery(){return x(this,$)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=x(this,Ie).defaultQueryOptions(t),r=x(this,Ie).getQueryCache().build(x(this,Ie),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return F(this,W,ts).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),x(this,Ee)))}createResult(t,n){var M;const r=x(this,$),s=this.options,l=x(this,Ee),a=x(this,Ln),o=x(this,jr),d=t!==r?t.state:x(this,Ls),{state:h}=t;let p={...h},g=!1,m;if(n._optimisticResults){const I=this.hasListeners(),te=!I&&td(t,n),dt=I&&nd(t,r,n,s);(te||dt)&&(p={...p,...ip(h.data,t.options)}),n._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:w,errorUpdatedAt:j,status:S}=p;m=p.data;let c=!1;if(n.placeholderData!==void 0&&m===void 0&&S==="pending"){let I;l!=null&&l.isPlaceholderData&&n.placeholderData===(o==null?void 0:o.placeholderData)?(I=l.data,c=!0):I=typeof n.placeholderData=="function"?n.placeholderData((M=x(this,Sr))==null?void 0:M.state.data,x(this,Sr)):n.placeholderData,I!==void 0&&(S="success",m=uo(l==null?void 0:l.data,I,n),g=!0)}if(n.select&&m!==void 0&&!c)if(l&&m===(a==null?void 0:a.data)&&n.select===x(this,Fs))m=x(this,wr);else try{R(this,Fs,n.select),m=n.select(m),m=uo(l==null?void 0:l.data,m,n),R(this,wr,m),R(this,Gt,null)}catch(I){R(this,Gt,I)}x(this,Gt)&&(w=x(this,Gt),m=x(this,wr),j=Date.now(),S="error");const f=p.fetchStatus==="fetching",v=S==="pending",y=S==="error",k=v&&f,E=m!==void 0,P={status:S,fetchStatus:p.fetchStatus,isPending:v,isSuccess:S==="success",isError:y,isInitialLoading:k,isLoading:k,data:m,dataUpdatedAt:p.dataUpdatedAt,error:w,errorUpdatedAt:j,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:p.dataUpdateCount>d.dataUpdateCount||p.errorUpdateCount>d.errorUpdateCount,isFetching:f,isRefetching:f&&!v,isLoadingError:y&&!E,isPaused:p.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:y&&E,isStale:Cu(t,n),refetch:this.refetch,promise:x(this,Nt),isEnabled:Ge(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const I=P.data!==void 0,te=P.status==="error"&&!I,dt=Jn=>{te?Jn.reject(P.error):I&&Jn.resolve(P.data)},Dt=()=>{const Jn=R(this,Nt,P.promise=co());dt(Jn)},wn=x(this,Nt);switch(wn.status){case"pending":t.queryHash===r.queryHash&&dt(wn);break;case"fulfilled":(te||P.data!==wn.value)&&Dt();break;case"rejected":(!te||P.error!==wn.reason)&&Dt();break}}return P}updateResult(){const t=x(this,Ee),n=this.createResult(x(this,$),this.options);if(R(this,Ln,x(this,$).state),R(this,jr,this.options),x(this,Ln).data!==void 0&&R(this,Sr,x(this,$)),tl(n,t))return;R(this,Ee,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,l=typeof s=="function"?s():s;if(l==="all"||!l&&!x(this,Nr).size)return!0;const a=new Set(l??x(this,Nr));return this.options.throwOnError&&a.add("error"),Object.keys(x(this,Ee)).some(o=>{const u=o;return x(this,Ee)[u]!==t[u]&&a.has(u)})};F(this,W,lp).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&F(this,W,vo).call(this)}},Ie=new WeakMap,$=new WeakMap,Ls=new WeakMap,Ee=new WeakMap,Ln=new WeakMap,jr=new WeakMap,Nt=new WeakMap,Gt=new WeakMap,Fs=new WeakMap,wr=new WeakMap,Sr=new WeakMap,Fn=new WeakMap,An=new WeakMap,Jt=new WeakMap,Nr=new WeakMap,W=new WeakSet,ts=function(t){F(this,W,xo).call(this);let n=x(this,$).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(_e)),n},ho=function(){F(this,W,go).call(this);const t=pn(this.options.staleTime,x(this,$));if(Ts.isServer()||x(this,Ee).isStale||!ao(t))return;const r=Xh(x(this,Ee).dataUpdatedAt,t)+1;R(this,Fn,Rn.setTimeout(()=>{x(this,Ee).isStale||this.updateResult()},r))},po=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(x(this,$)):this.options.refetchInterval)??!1},mo=function(t){F(this,W,yo).call(this),R(this,Jt,t),!(Ts.isServer()||Ge(this.options.enabled,x(this,$))===!1||!ao(x(this,Jt))||x(this,Jt)===0)&&R(this,An,Rn.setInterval(()=>{(this.options.refetchIntervalInBackground||wu.isFocused())&&F(this,W,ts).call(this)},x(this,Jt)))},vo=function(){F(this,W,ho).call(this),F(this,W,mo).call(this,F(this,W,po).call(this))},go=function(){x(this,Fn)!==void 0&&(Rn.clearTimeout(x(this,Fn)),R(this,Fn,void 0))},yo=function(){x(this,An)!==void 0&&(Rn.clearInterval(x(this,An)),R(this,An,void 0))},xo=function(){const t=x(this,Ie).getQueryCache().build(x(this,Ie),this.options);if(t===x(this,$))return;const n=x(this,$);R(this,$,t),R(this,Ls,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},lp=function(t){ue.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(x(this,Ee))}),x(this,Ie).getQueryCache().notify({query:x(this,$),type:"observerResultsUpdated"})})},xd);function ky(e,t){return Ge(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function td(e,t){return ky(e,t)||e.state.data!==void 0&&jo(e,t,t.refetchOnMount)}function jo(e,t,n){if(Ge(t.enabled,e)!==!1&&pn(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Cu(e,t)}return!1}function nd(e,t,n,r){return(e!==t||Ge(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Cu(e,n)}function Cu(e,t){return Ge(t.enabled,e)!==!1&&e.isStaleByTime(pn(t.staleTime,e))}function Cy(e,t){return!tl(e.getCurrentResult(),t)}function rd(e){return{onFetch:(t,n)=>{var h,p,g,m,w;const r=t.options,s=(g=(p=(h=t.fetchOptions)==null?void 0:h.meta)==null?void 0:p.fetchMore)==null?void 0:g.direction,l=((m=t.state.data)==null?void 0:m.pages)||[],a=((w=t.state.data)==null?void 0:w.pageParams)||[];let o={pages:[],pageParams:[]},u=0;const d=async()=>{let j=!1;const S=v=>{gy(v,()=>t.signal,()=>j=!0)},c=ep(t.options,t.fetchOptions),f=async(v,y,k)=>{if(j)return Promise.reject();if(y==null&&v.pages.length)return Promise.resolve(v);const C=(()=>{const te={client:t.client,queryKey:t.queryKey,pageParam:y,direction:k?"backward":"forward",meta:t.options.meta};return S(te),te})(),P=await c(C),{maxPages:M}=t.options,I=k?vy:my;return{pages:I(v.pages,P,M),pageParams:I(v.pageParams,y,M)}};if(s&&l.length){const v=s==="backward",y=v?Ey:sd,k={pages:l,pageParams:a},E=y(r,k);o=await f(k,E,v)}else{const v=e??l.length;do{const y=u===0?a[0]??r.initialPageParam:sd(r,o);if(u>0&&y==null)break;o=await f(o,y),u++}while(u<v)}return o};t.options.persister?t.fetchFn=()=>{var j,S;return(S=(j=t.options).persister)==null?void 0:S.call(j,d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=d}}}function sd(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Ey(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var As,pt,Se,zn,mt,$t,jd,Py=(jd=class extends rp{constructor(t){super();O(this,mt);O(this,As);O(this,pt);O(this,Se);O(this,zn);R(this,As,t.client),this.mutationId=t.mutationId,R(this,Se,t.mutationCache),R(this,pt,[]),this.state=t.state||ap(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){x(this,pt).includes(t)||(x(this,pt).push(t),this.clearGcTimeout(),x(this,Se).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){R(this,pt,x(this,pt).filter(n=>n!==t)),this.scheduleGc(),x(this,Se).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){x(this,pt).length||(this.state.status==="pending"?this.scheduleGc():x(this,Se).remove(this))}continue(){var t;return((t=x(this,zn))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,o,u,d,h,p,g,m,w,j,S,c,f,v,y,k,E,C;const n=()=>{F(this,mt,$t).call(this,{type:"continue"})},r={client:x(this,As),meta:this.options.meta,mutationKey:this.options.mutationKey};R(this,zn,np({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(P,M)=>{F(this,mt,$t).call(this,{type:"failed",failureCount:P,error:M})},onPause:()=>{F(this,mt,$t).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>x(this,Se).canRun(this)}));const s=this.state.status==="pending",l=!x(this,zn).canStart();try{if(s)n();else{F(this,mt,$t).call(this,{type:"pending",variables:t,isPaused:l}),x(this,Se).config.onMutate&&await x(this,Se).config.onMutate(t,this,r);const M=await((o=(a=this.options).onMutate)==null?void 0:o.call(a,t,r));M!==this.state.context&&F(this,mt,$t).call(this,{type:"pending",context:M,variables:t,isPaused:l})}const P=await x(this,zn).start();return await((d=(u=x(this,Se).config).onSuccess)==null?void 0:d.call(u,P,t,this.state.context,this,r)),await((p=(h=this.options).onSuccess)==null?void 0:p.call(h,P,t,this.state.context,r)),await((m=(g=x(this,Se).config).onSettled)==null?void 0:m.call(g,P,null,this.state.variables,this.state.context,this,r)),await((j=(w=this.options).onSettled)==null?void 0:j.call(w,P,null,t,this.state.context,r)),F(this,mt,$t).call(this,{type:"success",data:P}),P}catch(P){try{await((c=(S=x(this,Se).config).onError)==null?void 0:c.call(S,P,t,this.state.context,this,r))}catch(M){Promise.reject(M)}try{await((v=(f=this.options).onError)==null?void 0:v.call(f,P,t,this.state.context,r))}catch(M){Promise.reject(M)}try{await((k=(y=x(this,Se).config).onSettled)==null?void 0:k.call(y,void 0,P,this.state.variables,this.state.context,this,r))}catch(M){Promise.reject(M)}try{await((C=(E=this.options).onSettled)==null?void 0:C.call(E,void 0,P,t,this.state.context,r))}catch(M){Promise.reject(M)}throw F(this,mt,$t).call(this,{type:"error",error:P}),P}finally{x(this,Se).runNext(this)}}},As=new WeakMap,pt=new WeakMap,Se=new WeakMap,zn=new WeakMap,mt=new WeakSet,$t=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),ue.batch(()=>{x(this,pt).forEach(r=>{r.onMutationUpdate(t)}),x(this,Se).notify({mutation:this,type:"updated",action:t})})},jd);function ap(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var kt,st,zs,wd,_y=(wd=class extends Br{constructor(t={}){super();O(this,kt);O(this,st);O(this,zs);this.config=t,R(this,kt,new Set),R(this,st,new Map),R(this,zs,0)}build(t,n,r){const s=new Py({client:t,mutationCache:this,mutationId:++qs(this,zs)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){x(this,kt).add(t);const n=di(t);if(typeof n=="string"){const r=x(this,st).get(n);r?r.push(t):x(this,st).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(x(this,kt).delete(t)){const n=di(t);if(typeof n=="string"){const r=x(this,st).get(n);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&x(this,st).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=di(t);if(typeof n=="string"){const r=x(this,st).get(n),s=r==null?void 0:r.find(l=>l.state.status==="pending");return!s||s===t}else return!0}runNext(t){var r;const n=di(t);if(typeof n=="string"){const s=(r=x(this,st).get(n))==null?void 0:r.find(l=>l!==t&&l.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ue.batch(()=>{x(this,kt).forEach(t=>{this.notify({type:"removed",mutation:t})}),x(this,kt).clear(),x(this,st).clear()})}getAll(){return Array.from(x(this,kt))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Jc(n,r))}findAll(t={}){return this.getAll().filter(n=>Jc(t,n))}notify(t){ue.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return ue.batch(()=>Promise.all(t.map(n=>n.continue().catch(_e))))}},kt=new WeakMap,st=new WeakMap,zs=new WeakMap,wd);function di(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Ct,Yt,Me,Et,bt,_i,wo,Sd,Ry=(Sd=class extends Br{constructor(n,r){super();O(this,bt);O(this,Ct);O(this,Yt);O(this,Me);O(this,Et);R(this,Ct,n),this.setOptions(r),this.bindMethods(),F(this,bt,_i).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var s;const r=this.options;this.options=x(this,Ct).defaultMutationOptions(n),tl(this.options,r)||x(this,Ct).getMutationCache().notify({type:"observerOptionsUpdated",mutation:x(this,Me),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Kn(r.mutationKey)!==Kn(this.options.mutationKey)?this.reset():((s=x(this,Me))==null?void 0:s.state.status)==="pending"&&x(this,Me).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=x(this,Me))==null||n.removeObserver(this)}onMutationUpdate(n){F(this,bt,_i).call(this),F(this,bt,wo).call(this,n)}getCurrentResult(){return x(this,Yt)}reset(){var n;(n=x(this,Me))==null||n.removeObserver(this),R(this,Me,void 0),F(this,bt,_i).call(this),F(this,bt,wo).call(this)}mutate(n,r){var s;return R(this,Et,r),(s=x(this,Me))==null||s.removeObserver(this),R(this,Me,x(this,Ct).getMutationCache().build(x(this,Ct),this.options)),x(this,Me).addObserver(this),x(this,Me).execute(n)}},Ct=new WeakMap,Yt=new WeakMap,Me=new WeakMap,Et=new WeakMap,bt=new WeakSet,_i=function(){var r;const n=((r=x(this,Me))==null?void 0:r.state)??ap();R(this,Yt,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},wo=function(n){ue.batch(()=>{var r,s,l,a,o,u,d,h;if(x(this,Et)&&this.hasListeners()){const p=x(this,Yt).variables,g=x(this,Yt).context,m={client:x(this,Ct),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(s=(r=x(this,Et)).onSuccess)==null||s.call(r,n.data,p,g,m)}catch(w){Promise.reject(w)}try{(a=(l=x(this,Et)).onSettled)==null||a.call(l,n.data,null,p,g,m)}catch(w){Promise.reject(w)}}else if((n==null?void 0:n.type)==="error"){try{(u=(o=x(this,Et)).onError)==null||u.call(o,n.error,p,g,m)}catch(w){Promise.reject(w)}try{(h=(d=x(this,Et)).onSettled)==null||h.call(d,void 0,n.error,p,g,m)}catch(w){Promise.reject(w)}}}this.listeners.forEach(p=>{p(x(this,Yt))})})},Sd),vt,Nd,by=(Nd=class extends Br{constructor(t={}){super();O(this,vt);this.config=t,R(this,vt,new Map)}build(t,n,r){const s=n.queryKey,l=n.queryHash??Su(s,n);let a=this.get(l);return a||(a=new Sy({client:t,queryKey:s,queryHash:l,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(a)),a}add(t){x(this,vt).has(t.queryHash)||(x(this,vt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=x(this,vt).get(t.queryHash);n&&(t.destroy(),n===t&&x(this,vt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ue.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return x(this,vt).get(t)}getAll(){return[...x(this,vt).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Gc(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Gc(t,r)):n}notify(t){ue.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){ue.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ue.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},vt=new WeakMap,Nd),ne,Xt,Zt,kr,Cr,en,Er,Pr,kd,Ty=(kd=class{constructor(e={}){O(this,ne);O(this,Xt);O(this,Zt);O(this,kr);O(this,Cr);O(this,en);O(this,Er);O(this,Pr);R(this,ne,e.queryCache||new by),R(this,Xt,e.mutationCache||new _y),R(this,Zt,e.defaultOptions||{}),R(this,kr,new Map),R(this,Cr,new Map),R(this,en,0)}mount(){qs(this,en)._++,x(this,en)===1&&(R(this,Er,wu.subscribe(async e=>{e&&(await this.resumePausedMutations(),x(this,ne).onFocus())})),R(this,Pr,nl.subscribe(async e=>{e&&(await this.resumePausedMutations(),x(this,ne).onOnline())})))}unmount(){var e,t;qs(this,en)._--,x(this,en)===0&&((e=x(this,Er))==null||e.call(this),R(this,Er,void 0),(t=x(this,Pr))==null||t.call(this),R(this,Pr,void 0))}isFetching(e){return x(this,ne).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return x(this,Xt).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=x(this,ne).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=x(this,ne).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(pn(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return x(this,ne).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=x(this,ne).get(r.queryHash),l=s==null?void 0:s.state.data,a=fy(t,l);if(a!==void 0)return x(this,ne).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return ue.batch(()=>x(this,ne).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=x(this,ne).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=x(this,ne);ue.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=x(this,ne);return ue.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=ue.batch(()=>x(this,ne).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(_e).catch(_e)}invalidateQueries(e,t={}){return ue.batch(()=>(x(this,ne).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=ue.batch(()=>x(this,ne).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let l=s.fetch(void 0,n);return n.throwOnError||(l=l.catch(_e)),s.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(r).then(_e)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=x(this,ne).build(this,t);return n.isStaleByTime(pn(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(_e).catch(_e)}fetchInfiniteQuery(e){return e.behavior=rd(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(_e).catch(_e)}ensureInfiniteQueryData(e){return e.behavior=rd(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return nl.isOnline()?x(this,Xt).resumePausedMutations():Promise.resolve()}getQueryCache(){return x(this,ne)}getMutationCache(){return x(this,Xt)}getDefaultOptions(){return x(this,Zt)}setDefaultOptions(e){R(this,Zt,e)}setQueryDefaults(e,t){x(this,kr).set(Kn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...x(this,kr).values()],n={};return t.forEach(r=>{bs(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){x(this,Cr).set(Kn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...x(this,Cr).values()],n={};return t.forEach(r=>{bs(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...x(this,Zt).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Su(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Nu&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...x(this,Zt).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){x(this,ne).clear(),x(this,Xt).clear()}},ne=new WeakMap,Xt=new WeakMap,Zt=new WeakMap,kr=new WeakMap,Cr=new WeakMap,en=new WeakMap,Er=new WeakMap,Pr=new WeakMap,kd),op=N.createContext(void 0),le=e=>{const t=N.useContext(op);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Oy=({client:e,children:t})=>(N.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),i.jsx(op.Provider,{value:e,children:t})),up=N.createContext(!1),Iy=()=>N.useContext(up);up.Provider;function My(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Ly=N.createContext(My()),Fy=()=>N.useContext(Ly),Ay=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?ku(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},zy=e=>{N.useEffect(()=>{e.clearReset()},[e])},Dy=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||ku(n,[e.error,r])),Uy=e=>{if(e.suspense){const n=s=>s==="static"?s:Math.max(s??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...s)=>n(r(...s)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},$y=(e,t)=>e.isLoading&&e.isFetching&&!t,By=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,id=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Qy(e,t,n){var g,m,w,j;const r=Iy(),s=Fy(),l=le(),a=l.defaultQueryOptions(e);(m=(g=l.getDefaultOptions().queries)==null?void 0:g._experimental_beforeQuery)==null||m.call(g,a);const o=l.getQueryCache().get(a.queryHash);a._optimisticResults=r?"isRestoring":"optimistic",Uy(a),Ay(a,s,o),zy(s);const u=!l.getQueryCache().get(a.queryHash),[d]=N.useState(()=>new t(l,a)),h=d.getOptimisticResult(a),p=!r&&e.subscribed!==!1;if(N.useSyncExternalStore(N.useCallback(S=>{const c=p?d.subscribe(ue.batchCalls(S)):_e;return d.updateResult(),c},[d,p]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),N.useEffect(()=>{d.setOptions(a)},[a,d]),By(a,h))throw id(a,d,s);if(Dy({result:h,errorResetBoundary:s,throwOnError:a.throwOnError,query:o,suspense:a.suspense}))throw h.error;if((j=(w=l.getDefaultOptions().queries)==null?void 0:w._experimental_afterQuery)==null||j.call(w,a,h),a.experimental_prefetchInRender&&!Ts.isServer()&&$y(h,r)){const S=u?id(a,d,s):o==null?void 0:o.promise;S==null||S.catch(_e).finally(()=>{d.updateResult()})}return a.notifyOnChangeProps?h:d.trackResult(h)}function Oe(e,t){return Qy(e,Ny)}function ye(e,t){const n=le(),[r]=N.useState(()=>new Ry(n,e));N.useEffect(()=>{r.setOptions(e)},[r,e]);const s=N.useSyncExternalStore(N.useCallback(a=>r.subscribe(ue.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),l=N.useCallback((a,o)=>{r.mutate(a,o).catch(_e)},[r]);if(s.error&&ku(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:l,mutateAsync:s.mutate}}const Wy={actions:i.jsx("path",{d:"M13 2L4 14h7l-1 8 9-12h-7l1-8z"}),sessions:i.jsxs(i.Fragment,{children:[i.jsx("circle",{cx:"12",cy:"12",r:"9"}),i.jsx("path",{d:"M12 7v5l3 2"})]}),approvals:i.jsxs(i.Fragment,{children:[i.jsx("path",{d:"M9 12l2 2 4-4"}),i.jsx("path",{d:"M21 12c0 5-4 9-9 9s-9-4-9-9 4-9 9-9c2 0 4 .5 5.5 1.5"})]}),policy:i.jsx("path",{d:"M12 2L3 6v6c0 5 4 9 9 10 5-1 9-5 9-10V6l-9-4z"}),stats:i.jsxs(i.Fragment,{children:[i.jsx("path",{d:"M3 20V10"}),i.jsx("path",{d:"M9 20V4"}),i.jsx("path",{d:"M15 20v-8"}),i.jsx("path",{d:"M21 20v-12"})]}),team:i.jsxs(i.Fragment,{children:[i.jsx("circle",{cx:"9",cy:"8",r:"4"}),i.jsx("path",{d:"M2 22c0-4 3-7 7-7s7 3 7 7"}),i.jsx("circle",{cx:"17",cy:"7",r:"3"}),i.jsx("path",{d:"M15 15c3 0 7 2 7 7"})]}),settings:i.jsxs(i.Fragment,{children:[i.jsx("circle",{cx:"12",cy:"12",r:"3"}),i.jsx("path",{d:"M19.4 15a1.7 1.7 0 00.3 1.8l.1.1a2 2 0 11-2.8 2.8l-.1-.1a1.7 1.7 0 00-1.8-.3 1.7 1.7 0 00-1 1.5V21a2 2 0 11-4 0v-.1a1.7 1.7 0 00-1.1-1.5 1.7 1.7 0 00-1.8.3l-.1.1a2 2 0 11-2.8-2.8l.1-.1a1.7 1.7 0 00.3-1.8 1.7 1.7 0 00-1.5-1H3a2 2 0 110-4h.1a1.7 1.7 0 001.5-1.1 1.7 1.7 0 00-.3-1.8l-.1-.1a2 2 0 112.8-2.8l.1.1a1.7 1.7 0 001.8.3H9a1.7 1.7 0 001-1.5V3a2 2 0 114 0v.1a1.7 1.7 0 001 1.5 1.7 1.7 0 001.8-.3l.1-.1a2 2 0 112.8 2.8l-.1.1a1.7 1.7 0 00-.3 1.8V9a1.7 1.7 0 001.5 1H21a2 2 0 110 4h-.1a1.7 1.7 0 00-1.5 1z"})]}),search:i.jsxs(i.Fragment,{children:[i.jsx("circle",{cx:"11",cy:"11",r:"7"}),i.jsx("path",{d:"M21 21l-4.3-4.3"})]}),chevron:i.jsx("path",{d:"M6 9l6 6 6-6"}),x:i.jsx("path",{d:"M6 6l12 12M6 18L18 6"}),gear:i.jsxs(i.Fragment,{children:[i.jsx("circle",{cx:"12",cy:"12",r:"3"}),i.jsx("path",{d:"M19.4 15a1.7 1.7 0 00.3 1.8l.1.1a2 2 0 11-2.8 2.8l-.1-.1a1.7 1.7 0 00-1.8-.3 1.7 1.7 0 00-1 1.5V21a2 2 0 11-4 0v-.1a1.7 1.7 0 00-1.1-1.5 1.7 1.7 0 00-1.8.3l-.1.1a2 2 0 11-2.8-2.8l.1-.1a1.7 1.7 0 00.3-1.8 1.7 1.7 0 00-1.5-1H3a2 2 0 110-4h.1a1.7 1.7 0 001.5-1.1 1.7 1.7 0 00-.3-1.8l-.1-.1a2 2 0 112.8-2.8l.1.1a1.7 1.7 0 001.8.3H9a1.7 1.7 0 001-1.5V3a2 2 0 114 0v.1a1.7 1.7 0 001 1.5 1.7 1.7 0 001.8-.3l.1-.1a2 2 0 112.8 2.8l-.1.1a1.7 1.7 0 00-.3 1.8V9a1.7 1.7 0 001.5 1H21a2 2 0 110 4h-.1a1.7 1.7 0 00-1.5 1z"})]}),bell:i.jsxs(i.Fragment,{children:[i.jsx("path",{d:"M6 8a6 6 0 1112 0c0 7 3 9 3 9H3s3-2 3-9"}),i.jsx("path",{d:"M10 21a2 2 0 004 0"})]}),external:i.jsxs(i.Fragment,{children:[i.jsx("path",{d:"M14 3h7v7"}),i.jsx("path",{d:"M10 14L21 3"}),i.jsx("path",{d:"M21 14v5a2 2 0 01-2 2H5a2 2 0 01-2-2V5a2 2 0 012-2h5"})]}),plus:i.jsx("path",{d:"M12 5v14M5 12h14"}),trash:i.jsxs(i.Fragment,{children:[i.jsx("path",{d:"M3 6h18"}),i.jsx("path",{d:"M8 6V4a2 2 0 012-2h4a2 2 0 012 2v2"}),i.jsx("path",{d:"M6 6l1 14a2 2 0 002 2h6a2 2 0 002-2l1-14"})]}),rollback:i.jsxs(i.Fragment,{children:[i.jsx("path",{d:"M3 7v6h6"}),i.jsx("path",{d:"M3 13a9 9 0 109-9"})]}),check:i.jsx("path",{d:"M5 12l5 5L20 6"}),command:i.jsx("path",{d:"M18 3a3 3 0 00-3 3v12a3 3 0 003 3 3 3 0 003-3 3 3 0 00-3-3H6a3 3 0 00-3 3 3 3 0 003 3 3 3 0 003-3V6a3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3h12a3 3 0 003-3 3 3 0 00-3-3z"}),filter:i.jsxs(i.Fragment,{children:[i.jsx("path",{d:"M4 6h16"}),i.jsx("path",{d:"M7 12h10"}),i.jsx("path",{d:"M10 18h4"})]}),menu:i.jsx("path",{d:"M3 6h18M3 12h18M3 18h18"}),shield:i.jsx("path",{d:"M12 2L3 6v6c0 5 4 9 9 10 5-1 9-5 9-10V6l-9-4z"}),doc:i.jsxs(i.Fragment,{children:[i.jsx("path",{d:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z"}),i.jsx("path",{d:"M14 2v6h6"})]}),folder:i.jsx("path",{d:"M3 7a2 2 0 012-2h4l2 2h8a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2z"}),sliders:i.jsxs(i.Fragment,{children:[i.jsx("path",{d:"M4 6h10"}),i.jsx("path",{d:"M18 6h2"}),i.jsx("circle",{cx:"16",cy:"6",r:"2"}),i.jsx("path",{d:"M4 12h2"}),i.jsx("path",{d:"M10 12h10"}),i.jsx("circle",{cx:"8",cy:"12",r:"2"}),i.jsx("path",{d:"M4 18h12"}),i.jsx("path",{d:"M20 18h0"}),i.jsx("circle",{cx:"18",cy:"18",r:"2"})]}),sun:i.jsxs(i.Fragment,{children:[i.jsx("circle",{cx:"12",cy:"12",r:"4"}),i.jsx("path",{d:"M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"})]}),moon:i.jsx("path",{d:"M21 12.8A9 9 0 0111.2 3a7 7 0 109.8 9.8z"}),eye:i.jsxs(i.Fragment,{children:[i.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8S1 12 1 12z"}),i.jsx("circle",{cx:"12",cy:"12",r:"3"})]}),agent:i.jsxs(i.Fragment,{children:[i.jsx("rect",{x:"3",y:"8",width:"18",height:"13",rx:"2"}),i.jsx("path",{d:"M8 8V6a4 4 0 018 0v2"}),i.jsx("circle",{cx:"12",cy:"15",r:"2"})]})};function A({name:e,size:t=16,...n}){return i.jsx("svg",{viewBox:"0 0 24 24",width:t,height:t,fill:"none",stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,focusable:"false",...n,children:Wy[e]})}class Hy extends Error{constructor(t,n){super(n),this.status=t,this.name="ApiError"}}async function U(e,t){const n=await fetch(e,{...t,headers:{"Content-Type":"application/json",...(t==null?void 0:t.headers)??{}}});if(!n.ok){let r=`${n.status} ${n.statusText}`;try{const s=await n.json();s!=null&&s.error&&(r=s.error)}catch{}throw new Hy(n.status,r)}if(n.status!==204)return await n.json()}const Q={getActions:()=>U("/api/actions"),getConfig:()=>U("/api/config"),getSessions:()=>U("/api/sessions"),getSessionActions:e=>U(`/api/sessions/${encodeURIComponent(e)}/actions`),getStats:()=>U("/api/stats"),getProject:()=>U("/api/project"),getHubProjects:()=>U("/api/hub/projects"),getTeam:()=>U("/api/team/members"),addTeamMember:e=>U("/api/team/members",{method:"POST",body:JSON.stringify(e)}),removeTeamMember:e=>U(`/api/team/members/${encodeURIComponent(e)}`,{method:"DELETE"}),getApprovalRoutes:()=>U("/api/approval-routes"),addApprovalRoute:e=>U("/api/approval-routes",{method:"POST",body:JSON.stringify(e)}),deleteApprovalRoute:e=>U(`/api/approval-routes/${encodeURIComponent(e)}`,{method:"DELETE"}),getEscalationRules:()=>U("/api/escalations/rules"),addEscalationRule:e=>U("/api/escalations/rules",{method:"POST",body:JSON.stringify(e)}),deleteEscalationRule:e=>U(`/api/escalations/rules/${encodeURIComponent(e)}`,{method:"DELETE"}),getRemediationBlocks:()=>U("/api/remediation/blocks"),hubPause:e=>U(`/api/hub/projects/${encodeURIComponent(e)}/pause`,{method:"POST"}),hubResume:e=>U(`/api/hub/projects/${encodeURIComponent(e)}/resume`,{method:"POST"}),hubStop:e=>U(`/api/hub/projects/${encodeURIComponent(e)}/stop`,{method:"POST"}),hubGc:()=>U("/api/hub/gc",{method:"POST"}),getPeerStats:async(e,t)=>{try{const n=await fetch(`http://localhost:${e}/api/stats`,{signal:t});return n.ok?await n.json():null}catch{return null}},getAgentSessions:e=>{const t=e?new URLSearchParams(Object.entries(e).filter(([,n])=>n)).toString():"";return U(`/api/agent-monitor/sessions${t?"?"+t:""}`)},getAgentSession:e=>U(`/api/agent-monitor/sessions/${encodeURIComponent(e)}`),getAgentRateLimits:()=>U("/api/agent-monitor/rate-limits"),getAgentPorts:()=>U("/api/agent-monitor/ports"),getAgentSnapshot:()=>U("/api/agent-monitor/snapshot"),approveAction:e=>U(`/api/actions/${encodeURIComponent(e)}/approve`,{method:"POST"}),rejectAction:(e,t)=>U(`/api/actions/${encodeURIComponent(e)}/reject`,{method:"POST",body:JSON.stringify({reason:t})}),rollbackAction:e=>U(`/api/actions/${encodeURIComponent(e)}/rollback`,{method:"POST"}),rollbackSession:e=>U(`/api/sessions/${encodeURIComponent(e)}/rollback`,{method:"POST"}),getPendingApprovals:()=>U("/api/approvals/pending"),approveRequest:(e,t,n)=>U(`/api/approvals/${encodeURIComponent(e)}/approve`,{method:"POST",body:JSON.stringify({approver_id:t,reason:n})}),rejectRequest:(e,t,n)=>U(`/api/approvals/${encodeURIComponent(e)}/reject`,{method:"POST",body:JSON.stringify({approver_id:t,reason:n})}),getPendingEscalations:()=>U("/api/escalations/pending"),decideEscalation:(e,t,n,r)=>U(`/api/escalations/${encodeURIComponent(e)}/decide`,{method:"POST",body:JSON.stringify({target_id:t,decision:n,reason:r})})};function J(...e){return e.filter(Boolean).join(" ")}function Lt(e){if(!e)return null;const t=String(e),r=t.includes("Z")||/[+-]\d{2}:?\d{2}$/.test(t)?t:t.replace(" ","T")+"Z",s=new Date(r);return Number.isNaN(s.getTime())?null:s}function ct(e){const t=Lt(e);if(!t)return"—";const n=Math.max(0,Math.floor((Date.now()-t.getTime())/1e3));return n<5?"just now":n<60?`${n}s ago`:n<3600?`${Math.floor(n/60)}m ago`:n<86400?`${Math.floor(n/3600)}h ago`:`${Math.floor(n/86400)}d ago`}function Eu(e){try{return JSON.parse(e.input_payload||"{}")}catch{return{}}}function cp(e){const t=Eu(e);return String(t.command??"").trim()}function ra(e){if(!e)return"";const t=String(e).replace(/\\/g,"/");return t.split("/").pop()||t}function Sl(e,t=3){if(!e)return"—";const n=String(e).replace(/\\/g,"/").split("/").filter(Boolean);return n.length<=t?String(e):"…/"+n.slice(-t).join("/")}function Nl(e){const t=Eu(e);if(e.tool_name==="bash"){const r=String(t.command??"").trim().split(/\s+/).slice(0,2).join(" ");return r?`Run ${r}`:"Run command"}return e.tool_name==="write_file"?"Edit file":e.tool_name==="read_file"?"Read file":e.tool_name==="delete_file"?"Delete file":e.tool_name}function dp(e){return e.rolled_back?"rolledback":e.status==="blocked"||e.decision==="block"?"blocked":e.status==="rejected"||e.decision==="rejected"?"rejected":e.status==="error"?"error":e.status==="pending"||e.decision==="pending"?"pending":e.approved_by?"approved":"ok"}function Ky(e){const t=new Map;for(const s of e){const l=s.session_id||"unknown";t.has(l)||t.set(l,[]),t.get(l).push(s)}const n=Date.now(),r=[];for(const[s,l]of t.entries()){const a=m=>{var w;return((w=Lt(m.created_at))==null?void 0:w.getTime())??0};l.sort((m,w)=>a(w)-a(m));const o=a(l[0]),u=n-o<5*60*1e3,d=l.filter(m=>m.status==="pending").length,h=l.filter(m=>m.status==="error"||m.status==="blocked"||m.status==="rejected").length,p=l.filter(m=>m.tool_name==="write_file"&&!m.rolled_back).length,g=l.find(m=>m.event_type!=="observation")??l[0];r.push({session_id:s,rows:l,latest:o,live:u,pending:d,errors:h,writes:p,total:l.length,summary:Nl(g),agent:"agent",model:"",cwd:"",branch:""})}return r.sort((s,l)=>l.latest-s.latest),r}function qy(e,t){const n=(e||"").split(`
67
+ */function el(){return el=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},el.apply(this,arguments)}function Zh(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,l;for(l=0;l<r.length;l++)s=r[l],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function qg(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Vg(e,t){return e.button===0&&(!t||t==="_self")&&!qg(e)}const Gg=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Jg=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],Yg="6";try{window.__reactRouterVersion=Yg}catch{}const Xg=N.createContext({isTransitioning:!1}),Zg="startTransition",Gc=Hp[Zg];function ey(e){let{basename:t,children:n,future:r,window:s}=e,l=N.useRef();l.current==null&&(l.current=rg({window:s,v5Compat:!0}));let a=l.current,[o,u]=N.useState({action:a.action,location:a.location}),{v7_startTransition:d}=r||{},h=N.useCallback(p=>{d&&Gc?Gc(()=>u(p)):u(p)},[u,d]);return N.useLayoutEffect(()=>a.listen(h),[a,h]),N.useEffect(()=>Wg(r),[r]),N.createElement(Kg,{basename:t,children:n,location:o.location,navigationType:o.action,navigator:a,future:r})}const ty=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ny=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ry=N.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:l,replace:a,state:o,target:u,to:d,preventScrollReset:h,viewTransition:p}=t,g=Zh(t,Gg),{basename:m}=N.useContext(At),w,j=!1;if(typeof d=="string"&&ny.test(d)&&(w=d,ty))try{let v=new URL(window.location.href),y=d.startsWith("//")?new URL(v.protocol+d):new URL(d),k=Lr(y.pathname,m);y.origin===v.origin&&k!=null?d=k+y.search+y.hash:j=!0}catch{}let S=Rg(d,{relative:s}),c=iy(d,{replace:a,state:o,target:u,preventScrollReset:h,relative:s,viewTransition:p});function f(v){r&&r(v),v.defaultPrevented||c(v)}return N.createElement("a",el({},g,{href:w||S,onClick:j||l?r:f,ref:n,target:u}))}),io=N.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:s=!1,className:l="",end:a=!1,style:o,to:u,viewTransition:d,children:h}=t,p=Zh(t,Jg),g=wl(u,{relative:p.relative}),m=Gn(),w=N.useContext(Kh),{navigator:j,basename:S}=N.useContext(At),c=w!=null&&ly(g)&&d===!0,f=j.encodeLocation?j.encodeLocation(g).pathname:g.pathname,v=m.pathname,y=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;s||(v=v.toLowerCase(),y=y?y.toLowerCase():null,f=f.toLowerCase()),y&&S&&(y=Lr(y,S)||y);const k=f!=="/"&&f.endsWith("/")?f.length-1:f.length;let E=v===f||!a&&v.startsWith(f)&&v.charAt(k)==="/",C=y!=null&&(y===f||!a&&y.startsWith(f)&&y.charAt(f.length)==="/"),_={isActive:E,isPending:C,isTransitioning:c},M=E?r:void 0,O;typeof l=="function"?O=l(_):O=[l,E?"active":null,C?"pending":null,c?"transitioning":null].filter(Boolean).join(" ");let te=typeof o=="function"?o(_):o;return N.createElement(ry,el({},p,{"aria-current":M,className:O,ref:n,style:te,to:u,viewTransition:d}),typeof h=="function"?h(_):h)});var lo;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(lo||(lo={}));var Jc;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Jc||(Jc={}));function sy(e){let t=N.useContext(xl);return t||Z(!1),t}function iy(e,t){let{target:n,replace:r,state:s,preventScrollReset:l,relative:a,viewTransition:o}=t===void 0?{}:t,u=ju(),d=Gn(),h=wl(e,{relative:a});return N.useCallback(p=>{if(Vg(p,n)){p.preventDefault();let g=r!==void 0?r:Zi(d)===Zi(h);u(e,{replace:g,state:s,preventScrollReset:l,relative:a,viewTransition:o})}},[d,u,h,r,s,n,e,l,a,o])}function ly(e,t){t===void 0&&(t={});let n=N.useContext(Xg);n==null&&Z(!1);let{basename:r}=sy(lo.useViewTransitionState),s=wl(e,{relative:t.relative});if(!n.isTransitioning)return!1;let l=Lr(n.currentLocation.pathname,r)||n.currentLocation.pathname,a=Lr(n.nextLocation.pathname,r)||n.nextLocation.pathname;return ro(s.pathname,a)!=null||ro(s.pathname,l)!=null}var Br=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},bn,Kt,vr,vd,ay=(vd=class extends Br{constructor(){super();I(this,bn);I(this,Kt);I(this,vr);R(this,vr,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){x(this,Kt)||this.setEventListener(x(this,vr))}onUnsubscribe(){var t;this.hasListeners()||((t=x(this,Kt))==null||t.call(this),R(this,Kt,void 0))}setEventListener(t){var n;R(this,vr,t),(n=x(this,Kt))==null||n.call(this),R(this,Kt,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){x(this,bn)!==t&&(R(this,bn,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof x(this,bn)=="boolean"?x(this,bn):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},bn=new WeakMap,Kt=new WeakMap,vr=new WeakMap,vd),wu=new ay,oy={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},qt,So,gd,uy=(gd=class{constructor(){I(this,qt,oy);I(this,So,!1)}setTimeoutProvider(e){R(this,qt,e)}setTimeout(e,t){return x(this,qt).setTimeout(e,t)}clearTimeout(e){x(this,qt).clearTimeout(e)}setInterval(e,t){return x(this,qt).setInterval(e,t)}clearInterval(e){x(this,qt).clearInterval(e)}},qt=new WeakMap,So=new WeakMap,gd),Rn=new uy;function cy(e){setTimeout(e,0)}var dy=typeof window>"u"||"Deno"in globalThis;function Re(){}function fy(e,t){return typeof e=="function"?e(t):e}function ao(e){return typeof e=="number"&&e>=0&&e!==1/0}function ep(e,t){return Math.max(e+(t||0)-Date.now(),0)}function pn(e,t){return typeof e=="function"?e(t):e}function Ge(e,t){return typeof e=="function"?e(t):e}function Yc(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:l,queryKey:a,stale:o}=e;if(a){if(r){if(t.queryHash!==Su(a,t.options))return!1}else if(!Is(t.queryKey,a))return!1}if(n!=="all"){const u=t.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||s&&s!==t.state.fetchStatus||l&&!l(t))}function Xc(e,t){const{exact:n,status:r,predicate:s,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(n){if(Kn(t.options.mutationKey)!==Kn(l))return!1}else if(!Is(t.options.mutationKey,l))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function Su(e,t){return((t==null?void 0:t.queryKeyHashFn)||Kn)(e)}function Kn(e){return JSON.stringify(e,(t,n)=>oo(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function Is(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Is(e[n],t[n])):!1}var hy=Object.prototype.hasOwnProperty;function tp(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=Zc(e)&&Zc(t);if(!r&&!(oo(e)&&oo(t)))return t;const l=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,u=r?new Array(o):{};let d=0;for(let h=0;h<o;h++){const p=r?h:a[h],g=e[p],m=t[p];if(g===m){u[p]=g,(r?h<l:hy.call(e,p))&&d++;continue}if(g===null||m===null||typeof g!="object"||typeof m!="object"){u[p]=m;continue}const w=tp(g,m,n+1);u[p]=w,w===g&&d++}return l===o&&d===l?e:u}function tl(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Zc(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function oo(e){if(!ed(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!ed(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function ed(e){return Object.prototype.toString.call(e)==="[object Object]"}function py(e){return new Promise(t=>{Rn.setTimeout(t,e)})}function uo(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?tp(e,t):t}function my(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function vy(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Nu=Symbol();function np(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Nu?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function ku(e,t){return typeof e=="function"?e(...t):!!e}function gy(e,t,n){let r=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??(s=t()),r||(r=!0,s.aborted?n():s.addEventListener("abort",n,{once:!0})),s)}),e}var Os=(()=>{let e=()=>dy;return{isServer(){return e()},setIsServer(t){e=t}}})();function co(){let e,t;const n=new Promise((s,l)=>{e=s,t=l});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}var yy=cy;function xy(){let e=[],t=0,n=o=>{o()},r=o=>{o()},s=yy;const l=o=>{t?e.push(o):s(()=>{n(o)})},a=()=>{const o=e;e=[],o.length&&s(()=>{r(()=>{o.forEach(u=>{n(u)})})})};return{batch:o=>{let u;t++;try{u=o()}finally{t--,t||a()}return u},batchCalls:o=>(...u)=>{l(()=>{o(...u)})},schedule:l,setNotifyFunction:o=>{n=o},setBatchNotifyFunction:o=>{r=o},setScheduler:o=>{s=o}}}var ue=xy(),gr,Vt,yr,yd,jy=(yd=class extends Br{constructor(){super();I(this,gr,!0);I(this,Vt);I(this,yr);R(this,yr,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){x(this,Vt)||this.setEventListener(x(this,yr))}onUnsubscribe(){var t;this.hasListeners()||((t=x(this,Vt))==null||t.call(this),R(this,Vt,void 0))}setEventListener(t){var n;R(this,yr,t),(n=x(this,Vt))==null||n.call(this),R(this,Vt,t(this.setOnline.bind(this)))}setOnline(t){x(this,gr)!==t&&(R(this,gr,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return x(this,gr)}},gr=new WeakMap,Vt=new WeakMap,yr=new WeakMap,yd),nl=new jy;function wy(e){return Math.min(1e3*2**e,3e4)}function rp(e){return(e??"online")==="online"?nl.isOnline():!0}var fo=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function sp(e){let t=!1,n=0,r;const s=co(),l=()=>s.status!=="pending",a=j=>{var S;if(!l()){const c=new fo(j);g(c),(S=e.onCancel)==null||S.call(e,c)}},o=()=>{t=!0},u=()=>{t=!1},d=()=>wu.isFocused()&&(e.networkMode==="always"||nl.isOnline())&&e.canRun(),h=()=>rp(e.networkMode)&&e.canRun(),p=j=>{l()||(r==null||r(),s.resolve(j))},g=j=>{l()||(r==null||r(),s.reject(j))},m=()=>new Promise(j=>{var S;r=c=>{(l()||d())&&j(c)},(S=e.onPause)==null||S.call(e)}).then(()=>{var j;r=void 0,l()||(j=e.onContinue)==null||j.call(e)}),w=()=>{if(l())return;let j;const S=n===0?e.initialPromise:void 0;try{j=S??e.fn()}catch(c){j=Promise.reject(c)}Promise.resolve(j).then(p).catch(c=>{var E;if(l())return;const f=e.retry??(Os.isServer()?0:3),v=e.retryDelay??wy,y=typeof v=="function"?v(n,c):v,k=f===!0||typeof f=="number"&&n<f||typeof f=="function"&&f(n,c);if(t||!k){g(c);return}n++,(E=e.onFail)==null||E.call(e,n,c),py(y).then(()=>d()?void 0:m()).then(()=>{t?g(c):w()})})};return{promise:s,status:()=>s.status,cancel:a,continue:()=>(r==null||r(),s),cancelRetry:o,continueRetry:u,canStart:h,start:()=>(h()?w():m().then(w),s)}}var Tn,xd,ip=(xd=class{constructor(){I(this,Tn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ao(this.gcTime)&&R(this,Tn,Rn.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Os.isServer()?1/0:5*60*1e3))}clearGcTimeout(){x(this,Tn)!==void 0&&(Rn.clearTimeout(x(this,Tn)),R(this,Tn,void 0))}},Tn=new WeakMap,xd),In,xr,Ve,On,fe,Fs,Mn,Be,lp,jt,jd,Sy=(jd=class extends ip{constructor(t){super();I(this,Be);I(this,In);I(this,xr);I(this,Ve);I(this,On);I(this,fe);I(this,Fs);I(this,Mn);R(this,Mn,!1),R(this,Fs,t.defaultOptions),this.setOptions(t.options),this.observers=[],R(this,On,t.client),R(this,Ve,x(this,On).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,R(this,In,nd(this.options)),this.state=t.state??x(this,In),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=x(this,fe))==null?void 0:t.promise}setOptions(t){if(this.options={...x(this,Fs),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=nd(this.options);n.data!==void 0&&(this.setState(td(n.data,n.dataUpdatedAt)),R(this,In,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&x(this,Ve).remove(this)}setData(t,n){const r=uo(this.state.data,t,this.options);return A(this,Be,jt).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){A(this,Be,jt).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=x(this,fe))==null?void 0:r.promise;return(s=x(this,fe))==null||s.cancel(t),n?n.then(Re).catch(Re):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return x(this,In)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Ge(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Nu||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>pn(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!ep(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=x(this,fe))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=x(this,fe))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),x(this,Ve).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(x(this,fe)&&(x(this,Mn)||A(this,Be,lp).call(this)?x(this,fe).cancel({revert:!0}):x(this,fe).cancelRetry()),this.scheduleGc()),x(this,Ve).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||A(this,Be,jt).call(this,{type:"invalidate"})}async fetch(t,n){var u,d,h,p,g,m,w,j,S,c,f,v;if(this.state.fetchStatus!=="idle"&&((u=x(this,fe))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(x(this,fe))return x(this,fe).continueRetry(),x(this,fe).promise}if(t&&this.setOptions(t),!this.options.queryFn){const y=this.observers.find(k=>k.options.queryFn);y&&this.setOptions(y.options)}const r=new AbortController,s=y=>{Object.defineProperty(y,"signal",{enumerable:!0,get:()=>(R(this,Mn,!0),r.signal)})},l=()=>{const y=np(this.options,n),E=(()=>{const C={client:x(this,On),queryKey:this.queryKey,meta:this.meta};return s(C),C})();return R(this,Mn,!1),this.options.persister?this.options.persister(y,E,this):y(E)},o=(()=>{const y={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:x(this,On),state:this.state,fetchFn:l};return s(y),y})();(d=this.options.behavior)==null||d.onFetch(o,this),R(this,xr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=o.fetchOptions)==null?void 0:h.meta))&&A(this,Be,jt).call(this,{type:"fetch",meta:(p=o.fetchOptions)==null?void 0:p.meta}),R(this,fe,sp({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,onCancel:y=>{y instanceof fo&&y.revert&&this.setState({...x(this,xr),fetchStatus:"idle"}),r.abort()},onFail:(y,k)=>{A(this,Be,jt).call(this,{type:"failed",failureCount:y,error:k})},onPause:()=>{A(this,Be,jt).call(this,{type:"pause"})},onContinue:()=>{A(this,Be,jt).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const y=await x(this,fe).start();if(y===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(y),(m=(g=x(this,Ve).config).onSuccess)==null||m.call(g,y,this),(j=(w=x(this,Ve).config).onSettled)==null||j.call(w,y,this.state.error,this),y}catch(y){if(y instanceof fo){if(y.silent)return x(this,fe).promise;if(y.revert){if(this.state.data===void 0)throw y;return this.state.data}}throw A(this,Be,jt).call(this,{type:"error",error:y}),(c=(S=x(this,Ve).config).onError)==null||c.call(S,y,this),(v=(f=x(this,Ve).config).onSettled)==null||v.call(f,this.state.data,y,this),y}finally{this.scheduleGc()}}},In=new WeakMap,xr=new WeakMap,Ve=new WeakMap,On=new WeakMap,fe=new WeakMap,Fs=new WeakMap,Mn=new WeakMap,Be=new WeakSet,lp=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},jt=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...ap(r.data,this.options),fetchMeta:t.meta??null};case"success":const s={...r,...td(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return R(this,xr,t.manual?s:void 0),s;case"error":const l=t.error;return{...r,error:l,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),ue.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),x(this,Ve).notify({query:this,type:"updated",action:t})})},jd);function ap(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:rp(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function td(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function nd(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Me,$,As,_e,Ln,jr,Nt,Gt,zs,wr,Sr,Fn,An,Jt,Nr,W,rs,ho,po,mo,vo,go,yo,xo,op,wd,Ny=(wd=class extends Br{constructor(t,n){super();I(this,W);I(this,Me);I(this,$);I(this,As);I(this,_e);I(this,Ln);I(this,jr);I(this,Nt);I(this,Gt);I(this,zs);I(this,wr);I(this,Sr);I(this,Fn);I(this,An);I(this,Jt);I(this,Nr,new Set);this.options=n,R(this,Me,t),R(this,Gt,null),R(this,Nt,co()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(x(this,$).addObserver(this),rd(x(this,$),this.options)?A(this,W,rs).call(this):this.updateResult(),A(this,W,vo).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return jo(x(this,$),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return jo(x(this,$),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,A(this,W,go).call(this),A(this,W,yo).call(this),x(this,$).removeObserver(this)}setOptions(t){const n=this.options,r=x(this,$);if(this.options=x(this,Me).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ge(this.options.enabled,x(this,$))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");A(this,W,xo).call(this),x(this,$).setOptions(this.options),n._defaulted&&!tl(this.options,n)&&x(this,Me).getQueryCache().notify({type:"observerOptionsUpdated",query:x(this,$),observer:this});const s=this.hasListeners();s&&sd(x(this,$),r,this.options,n)&&A(this,W,rs).call(this),this.updateResult(),s&&(x(this,$)!==r||Ge(this.options.enabled,x(this,$))!==Ge(n.enabled,x(this,$))||pn(this.options.staleTime,x(this,$))!==pn(n.staleTime,x(this,$)))&&A(this,W,ho).call(this);const l=A(this,W,po).call(this);s&&(x(this,$)!==r||Ge(this.options.enabled,x(this,$))!==Ge(n.enabled,x(this,$))||l!==x(this,Jt))&&A(this,W,mo).call(this,l)}getOptimisticResult(t){const n=x(this,Me).getQueryCache().build(x(this,Me),t),r=this.createResult(n,t);return Cy(this,r)&&(R(this,_e,r),R(this,jr,this.options),R(this,Ln,x(this,$).state)),r}getCurrentResult(){return x(this,_e)}trackResult(t,n){return new Proxy(t,{get:(r,s)=>(this.trackProp(s),n==null||n(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&x(this,Nt).status==="pending"&&x(this,Nt).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,s))})}trackProp(t){x(this,Nr).add(t)}getCurrentQuery(){return x(this,$)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=x(this,Me).defaultQueryOptions(t),r=x(this,Me).getQueryCache().build(x(this,Me),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return A(this,W,rs).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),x(this,_e)))}createResult(t,n){var M;const r=x(this,$),s=this.options,l=x(this,_e),a=x(this,Ln),o=x(this,jr),d=t!==r?t.state:x(this,As),{state:h}=t;let p={...h},g=!1,m;if(n._optimisticResults){const O=this.hasListeners(),te=!O&&rd(t,n),dt=O&&sd(t,r,n,s);(te||dt)&&(p={...p,...ap(h.data,t.options)}),n._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:w,errorUpdatedAt:j,status:S}=p;m=p.data;let c=!1;if(n.placeholderData!==void 0&&m===void 0&&S==="pending"){let O;l!=null&&l.isPlaceholderData&&n.placeholderData===(o==null?void 0:o.placeholderData)?(O=l.data,c=!0):O=typeof n.placeholderData=="function"?n.placeholderData((M=x(this,Sr))==null?void 0:M.state.data,x(this,Sr)):n.placeholderData,O!==void 0&&(S="success",m=uo(l==null?void 0:l.data,O,n),g=!0)}if(n.select&&m!==void 0&&!c)if(l&&m===(a==null?void 0:a.data)&&n.select===x(this,zs))m=x(this,wr);else try{R(this,zs,n.select),m=n.select(m),m=uo(l==null?void 0:l.data,m,n),R(this,wr,m),R(this,Gt,null)}catch(O){R(this,Gt,O)}x(this,Gt)&&(w=x(this,Gt),m=x(this,wr),j=Date.now(),S="error");const f=p.fetchStatus==="fetching",v=S==="pending",y=S==="error",k=v&&f,E=m!==void 0,_={status:S,fetchStatus:p.fetchStatus,isPending:v,isSuccess:S==="success",isError:y,isInitialLoading:k,isLoading:k,data:m,dataUpdatedAt:p.dataUpdatedAt,error:w,errorUpdatedAt:j,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:p.dataUpdateCount>d.dataUpdateCount||p.errorUpdateCount>d.errorUpdateCount,isFetching:f,isRefetching:f&&!v,isLoadingError:y&&!E,isPaused:p.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:y&&E,isStale:Cu(t,n),refetch:this.refetch,promise:x(this,Nt),isEnabled:Ge(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const O=_.data!==void 0,te=_.status==="error"&&!O,dt=Jn=>{te?Jn.reject(_.error):O&&Jn.resolve(_.data)},Dt=()=>{const Jn=R(this,Nt,_.promise=co());dt(Jn)},wn=x(this,Nt);switch(wn.status){case"pending":t.queryHash===r.queryHash&&dt(wn);break;case"fulfilled":(te||_.data!==wn.value)&&Dt();break;case"rejected":(!te||_.error!==wn.reason)&&Dt();break}}return _}updateResult(){const t=x(this,_e),n=this.createResult(x(this,$),this.options);if(R(this,Ln,x(this,$).state),R(this,jr,this.options),x(this,Ln).data!==void 0&&R(this,Sr,x(this,$)),tl(n,t))return;R(this,_e,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,l=typeof s=="function"?s():s;if(l==="all"||!l&&!x(this,Nr).size)return!0;const a=new Set(l??x(this,Nr));return this.options.throwOnError&&a.add("error"),Object.keys(x(this,_e)).some(o=>{const u=o;return x(this,_e)[u]!==t[u]&&a.has(u)})};A(this,W,op).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&A(this,W,vo).call(this)}},Me=new WeakMap,$=new WeakMap,As=new WeakMap,_e=new WeakMap,Ln=new WeakMap,jr=new WeakMap,Nt=new WeakMap,Gt=new WeakMap,zs=new WeakMap,wr=new WeakMap,Sr=new WeakMap,Fn=new WeakMap,An=new WeakMap,Jt=new WeakMap,Nr=new WeakMap,W=new WeakSet,rs=function(t){A(this,W,xo).call(this);let n=x(this,$).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Re)),n},ho=function(){A(this,W,go).call(this);const t=pn(this.options.staleTime,x(this,$));if(Os.isServer()||x(this,_e).isStale||!ao(t))return;const r=ep(x(this,_e).dataUpdatedAt,t)+1;R(this,Fn,Rn.setTimeout(()=>{x(this,_e).isStale||this.updateResult()},r))},po=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(x(this,$)):this.options.refetchInterval)??!1},mo=function(t){A(this,W,yo).call(this),R(this,Jt,t),!(Os.isServer()||Ge(this.options.enabled,x(this,$))===!1||!ao(x(this,Jt))||x(this,Jt)===0)&&R(this,An,Rn.setInterval(()=>{(this.options.refetchIntervalInBackground||wu.isFocused())&&A(this,W,rs).call(this)},x(this,Jt)))},vo=function(){A(this,W,ho).call(this),A(this,W,mo).call(this,A(this,W,po).call(this))},go=function(){x(this,Fn)!==void 0&&(Rn.clearTimeout(x(this,Fn)),R(this,Fn,void 0))},yo=function(){x(this,An)!==void 0&&(Rn.clearInterval(x(this,An)),R(this,An,void 0))},xo=function(){const t=x(this,Me).getQueryCache().build(x(this,Me),this.options);if(t===x(this,$))return;const n=x(this,$);R(this,$,t),R(this,As,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},op=function(t){ue.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(x(this,_e))}),x(this,Me).getQueryCache().notify({query:x(this,$),type:"observerResultsUpdated"})})},wd);function ky(e,t){return Ge(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function rd(e,t){return ky(e,t)||e.state.data!==void 0&&jo(e,t,t.refetchOnMount)}function jo(e,t,n){if(Ge(t.enabled,e)!==!1&&pn(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Cu(e,t)}return!1}function sd(e,t,n,r){return(e!==t||Ge(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Cu(e,n)}function Cu(e,t){return Ge(t.enabled,e)!==!1&&e.isStaleByTime(pn(t.staleTime,e))}function Cy(e,t){return!tl(e.getCurrentResult(),t)}function id(e){return{onFetch:(t,n)=>{var h,p,g,m,w;const r=t.options,s=(g=(p=(h=t.fetchOptions)==null?void 0:h.meta)==null?void 0:p.fetchMore)==null?void 0:g.direction,l=((m=t.state.data)==null?void 0:m.pages)||[],a=((w=t.state.data)==null?void 0:w.pageParams)||[];let o={pages:[],pageParams:[]},u=0;const d=async()=>{let j=!1;const S=v=>{gy(v,()=>t.signal,()=>j=!0)},c=np(t.options,t.fetchOptions),f=async(v,y,k)=>{if(j)return Promise.reject();if(y==null&&v.pages.length)return Promise.resolve(v);const C=(()=>{const te={client:t.client,queryKey:t.queryKey,pageParam:y,direction:k?"backward":"forward",meta:t.options.meta};return S(te),te})(),_=await c(C),{maxPages:M}=t.options,O=k?vy:my;return{pages:O(v.pages,_,M),pageParams:O(v.pageParams,y,M)}};if(s&&l.length){const v=s==="backward",y=v?Ey:ld,k={pages:l,pageParams:a},E=y(r,k);o=await f(k,E,v)}else{const v=e??l.length;do{const y=u===0?a[0]??r.initialPageParam:ld(r,o);if(u>0&&y==null)break;o=await f(o,y),u++}while(u<v)}return o};t.options.persister?t.fetchFn=()=>{var j,S;return(S=(j=t.options).persister)==null?void 0:S.call(j,d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=d}}}function ld(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Ey(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Ds,pt,Se,zn,mt,$t,Sd,_y=(Sd=class extends ip{constructor(t){super();I(this,mt);I(this,Ds);I(this,pt);I(this,Se);I(this,zn);R(this,Ds,t.client),this.mutationId=t.mutationId,R(this,Se,t.mutationCache),R(this,pt,[]),this.state=t.state||up(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){x(this,pt).includes(t)||(x(this,pt).push(t),this.clearGcTimeout(),x(this,Se).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){R(this,pt,x(this,pt).filter(n=>n!==t)),this.scheduleGc(),x(this,Se).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){x(this,pt).length||(this.state.status==="pending"?this.scheduleGc():x(this,Se).remove(this))}continue(){var t;return((t=x(this,zn))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,o,u,d,h,p,g,m,w,j,S,c,f,v,y,k,E,C;const n=()=>{A(this,mt,$t).call(this,{type:"continue"})},r={client:x(this,Ds),meta:this.options.meta,mutationKey:this.options.mutationKey};R(this,zn,sp({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(_,M)=>{A(this,mt,$t).call(this,{type:"failed",failureCount:_,error:M})},onPause:()=>{A(this,mt,$t).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>x(this,Se).canRun(this)}));const s=this.state.status==="pending",l=!x(this,zn).canStart();try{if(s)n();else{A(this,mt,$t).call(this,{type:"pending",variables:t,isPaused:l}),x(this,Se).config.onMutate&&await x(this,Se).config.onMutate(t,this,r);const M=await((o=(a=this.options).onMutate)==null?void 0:o.call(a,t,r));M!==this.state.context&&A(this,mt,$t).call(this,{type:"pending",context:M,variables:t,isPaused:l})}const _=await x(this,zn).start();return await((d=(u=x(this,Se).config).onSuccess)==null?void 0:d.call(u,_,t,this.state.context,this,r)),await((p=(h=this.options).onSuccess)==null?void 0:p.call(h,_,t,this.state.context,r)),await((m=(g=x(this,Se).config).onSettled)==null?void 0:m.call(g,_,null,this.state.variables,this.state.context,this,r)),await((j=(w=this.options).onSettled)==null?void 0:j.call(w,_,null,t,this.state.context,r)),A(this,mt,$t).call(this,{type:"success",data:_}),_}catch(_){try{await((c=(S=x(this,Se).config).onError)==null?void 0:c.call(S,_,t,this.state.context,this,r))}catch(M){Promise.reject(M)}try{await((v=(f=this.options).onError)==null?void 0:v.call(f,_,t,this.state.context,r))}catch(M){Promise.reject(M)}try{await((k=(y=x(this,Se).config).onSettled)==null?void 0:k.call(y,void 0,_,this.state.variables,this.state.context,this,r))}catch(M){Promise.reject(M)}try{await((C=(E=this.options).onSettled)==null?void 0:C.call(E,void 0,_,t,this.state.context,r))}catch(M){Promise.reject(M)}throw A(this,mt,$t).call(this,{type:"error",error:_}),_}finally{x(this,Se).runNext(this)}}},Ds=new WeakMap,pt=new WeakMap,Se=new WeakMap,zn=new WeakMap,mt=new WeakSet,$t=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),ue.batch(()=>{x(this,pt).forEach(r=>{r.onMutationUpdate(t)}),x(this,Se).notify({mutation:this,type:"updated",action:t})})},Sd);function up(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var kt,it,Us,Nd,Py=(Nd=class extends Br{constructor(t={}){super();I(this,kt);I(this,it);I(this,Us);this.config=t,R(this,kt,new Set),R(this,it,new Map),R(this,Us,0)}build(t,n,r){const s=new _y({client:t,mutationCache:this,mutationId:++Vs(this,Us)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){x(this,kt).add(t);const n=fi(t);if(typeof n=="string"){const r=x(this,it).get(n);r?r.push(t):x(this,it).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(x(this,kt).delete(t)){const n=fi(t);if(typeof n=="string"){const r=x(this,it).get(n);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&x(this,it).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=fi(t);if(typeof n=="string"){const r=x(this,it).get(n),s=r==null?void 0:r.find(l=>l.state.status==="pending");return!s||s===t}else return!0}runNext(t){var r;const n=fi(t);if(typeof n=="string"){const s=(r=x(this,it).get(n))==null?void 0:r.find(l=>l!==t&&l.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ue.batch(()=>{x(this,kt).forEach(t=>{this.notify({type:"removed",mutation:t})}),x(this,kt).clear(),x(this,it).clear()})}getAll(){return Array.from(x(this,kt))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Xc(n,r))}findAll(t={}){return this.getAll().filter(n=>Xc(t,n))}notify(t){ue.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return ue.batch(()=>Promise.all(t.map(n=>n.continue().catch(Re))))}},kt=new WeakMap,it=new WeakMap,Us=new WeakMap,Nd);function fi(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Ct,Yt,Le,Et,bt,Pi,wo,kd,Ry=(kd=class extends Br{constructor(n,r){super();I(this,bt);I(this,Ct);I(this,Yt);I(this,Le);I(this,Et);R(this,Ct,n),this.setOptions(r),this.bindMethods(),A(this,bt,Pi).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var s;const r=this.options;this.options=x(this,Ct).defaultMutationOptions(n),tl(this.options,r)||x(this,Ct).getMutationCache().notify({type:"observerOptionsUpdated",mutation:x(this,Le),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Kn(r.mutationKey)!==Kn(this.options.mutationKey)?this.reset():((s=x(this,Le))==null?void 0:s.state.status)==="pending"&&x(this,Le).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=x(this,Le))==null||n.removeObserver(this)}onMutationUpdate(n){A(this,bt,Pi).call(this),A(this,bt,wo).call(this,n)}getCurrentResult(){return x(this,Yt)}reset(){var n;(n=x(this,Le))==null||n.removeObserver(this),R(this,Le,void 0),A(this,bt,Pi).call(this),A(this,bt,wo).call(this)}mutate(n,r){var s;return R(this,Et,r),(s=x(this,Le))==null||s.removeObserver(this),R(this,Le,x(this,Ct).getMutationCache().build(x(this,Ct),this.options)),x(this,Le).addObserver(this),x(this,Le).execute(n)}},Ct=new WeakMap,Yt=new WeakMap,Le=new WeakMap,Et=new WeakMap,bt=new WeakSet,Pi=function(){var r;const n=((r=x(this,Le))==null?void 0:r.state)??up();R(this,Yt,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},wo=function(n){ue.batch(()=>{var r,s,l,a,o,u,d,h;if(x(this,Et)&&this.hasListeners()){const p=x(this,Yt).variables,g=x(this,Yt).context,m={client:x(this,Ct),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(s=(r=x(this,Et)).onSuccess)==null||s.call(r,n.data,p,g,m)}catch(w){Promise.reject(w)}try{(a=(l=x(this,Et)).onSettled)==null||a.call(l,n.data,null,p,g,m)}catch(w){Promise.reject(w)}}else if((n==null?void 0:n.type)==="error"){try{(u=(o=x(this,Et)).onError)==null||u.call(o,n.error,p,g,m)}catch(w){Promise.reject(w)}try{(h=(d=x(this,Et)).onSettled)==null||h.call(d,void 0,n.error,p,g,m)}catch(w){Promise.reject(w)}}}this.listeners.forEach(p=>{p(x(this,Yt))})})},kd),vt,Cd,by=(Cd=class extends Br{constructor(t={}){super();I(this,vt);this.config=t,R(this,vt,new Map)}build(t,n,r){const s=n.queryKey,l=n.queryHash??Su(s,n);let a=this.get(l);return a||(a=new Sy({client:t,queryKey:s,queryHash:l,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(a)),a}add(t){x(this,vt).has(t.queryHash)||(x(this,vt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=x(this,vt).get(t.queryHash);n&&(t.destroy(),n===t&&x(this,vt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ue.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return x(this,vt).get(t)}getAll(){return[...x(this,vt).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Yc(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Yc(t,r)):n}notify(t){ue.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){ue.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ue.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},vt=new WeakMap,Cd),ne,Xt,Zt,kr,Cr,en,Er,_r,Ed,Ty=(Ed=class{constructor(e={}){I(this,ne);I(this,Xt);I(this,Zt);I(this,kr);I(this,Cr);I(this,en);I(this,Er);I(this,_r);R(this,ne,e.queryCache||new by),R(this,Xt,e.mutationCache||new Py),R(this,Zt,e.defaultOptions||{}),R(this,kr,new Map),R(this,Cr,new Map),R(this,en,0)}mount(){Vs(this,en)._++,x(this,en)===1&&(R(this,Er,wu.subscribe(async e=>{e&&(await this.resumePausedMutations(),x(this,ne).onFocus())})),R(this,_r,nl.subscribe(async e=>{e&&(await this.resumePausedMutations(),x(this,ne).onOnline())})))}unmount(){var e,t;Vs(this,en)._--,x(this,en)===0&&((e=x(this,Er))==null||e.call(this),R(this,Er,void 0),(t=x(this,_r))==null||t.call(this),R(this,_r,void 0))}isFetching(e){return x(this,ne).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return x(this,Xt).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=x(this,ne).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=x(this,ne).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(pn(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return x(this,ne).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=x(this,ne).get(r.queryHash),l=s==null?void 0:s.state.data,a=fy(t,l);if(a!==void 0)return x(this,ne).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return ue.batch(()=>x(this,ne).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=x(this,ne).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=x(this,ne);ue.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=x(this,ne);return ue.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=ue.batch(()=>x(this,ne).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(Re).catch(Re)}invalidateQueries(e,t={}){return ue.batch(()=>(x(this,ne).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=ue.batch(()=>x(this,ne).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let l=s.fetch(void 0,n);return n.throwOnError||(l=l.catch(Re)),s.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(r).then(Re)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=x(this,ne).build(this,t);return n.isStaleByTime(pn(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Re).catch(Re)}fetchInfiniteQuery(e){return e.behavior=id(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Re).catch(Re)}ensureInfiniteQueryData(e){return e.behavior=id(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return nl.isOnline()?x(this,Xt).resumePausedMutations():Promise.resolve()}getQueryCache(){return x(this,ne)}getMutationCache(){return x(this,Xt)}getDefaultOptions(){return x(this,Zt)}setDefaultOptions(e){R(this,Zt,e)}setQueryDefaults(e,t){x(this,kr).set(Kn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...x(this,kr).values()],n={};return t.forEach(r=>{Is(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){x(this,Cr).set(Kn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...x(this,Cr).values()],n={};return t.forEach(r=>{Is(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...x(this,Zt).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Su(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Nu&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...x(this,Zt).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){x(this,ne).clear(),x(this,Xt).clear()}},ne=new WeakMap,Xt=new WeakMap,Zt=new WeakMap,kr=new WeakMap,Cr=new WeakMap,en=new WeakMap,Er=new WeakMap,_r=new WeakMap,Ed),cp=N.createContext(void 0),le=e=>{const t=N.useContext(cp);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Iy=({client:e,children:t})=>(N.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),i.jsx(cp.Provider,{value:e,children:t})),dp=N.createContext(!1),Oy=()=>N.useContext(dp);dp.Provider;function My(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Ly=N.createContext(My()),Fy=()=>N.useContext(Ly),Ay=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?ku(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},zy=e=>{N.useEffect(()=>{e.clearReset()},[e])},Dy=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||ku(n,[e.error,r])),Uy=e=>{if(e.suspense){const n=s=>s==="static"?s:Math.max(s??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...s)=>n(r(...s)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},$y=(e,t)=>e.isLoading&&e.isFetching&&!t,By=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,ad=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Qy(e,t,n){var g,m,w,j;const r=Oy(),s=Fy(),l=le(),a=l.defaultQueryOptions(e);(m=(g=l.getDefaultOptions().queries)==null?void 0:g._experimental_beforeQuery)==null||m.call(g,a);const o=l.getQueryCache().get(a.queryHash);a._optimisticResults=r?"isRestoring":"optimistic",Uy(a),Ay(a,s,o),zy(s);const u=!l.getQueryCache().get(a.queryHash),[d]=N.useState(()=>new t(l,a)),h=d.getOptimisticResult(a),p=!r&&e.subscribed!==!1;if(N.useSyncExternalStore(N.useCallback(S=>{const c=p?d.subscribe(ue.batchCalls(S)):Re;return d.updateResult(),c},[d,p]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),N.useEffect(()=>{d.setOptions(a)},[a,d]),By(a,h))throw ad(a,d,s);if(Dy({result:h,errorResetBoundary:s,throwOnError:a.throwOnError,query:o,suspense:a.suspense}))throw h.error;if((j=(w=l.getDefaultOptions().queries)==null?void 0:w._experimental_afterQuery)==null||j.call(w,a,h),a.experimental_prefetchInRender&&!Os.isServer()&&$y(h,r)){const S=u?ad(a,d,s):o==null?void 0:o.promise;S==null||S.catch(Re).finally(()=>{d.updateResult()})}return a.notifyOnChangeProps?h:d.trackResult(h)}function Oe(e,t){return Qy(e,Ny)}function ye(e,t){const n=le(),[r]=N.useState(()=>new Ry(n,e));N.useEffect(()=>{r.setOptions(e)},[r,e]);const s=N.useSyncExternalStore(N.useCallback(a=>r.subscribe(ue.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),l=N.useCallback((a,o)=>{r.mutate(a,o).catch(Re)},[r]);if(s.error&&ku(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:l,mutateAsync:s.mutate}}const Wy={actions:i.jsx("path",{d:"M13 2L4 14h7l-1 8 9-12h-7l1-8z"}),sessions:i.jsxs(i.Fragment,{children:[i.jsx("circle",{cx:"12",cy:"12",r:"9"}),i.jsx("path",{d:"M12 7v5l3 2"})]}),approvals:i.jsxs(i.Fragment,{children:[i.jsx("path",{d:"M9 12l2 2 4-4"}),i.jsx("path",{d:"M21 12c0 5-4 9-9 9s-9-4-9-9 4-9 9-9c2 0 4 .5 5.5 1.5"})]}),policy:i.jsx("path",{d:"M12 2L3 6v6c0 5 4 9 9 10 5-1 9-5 9-10V6l-9-4z"}),stats:i.jsxs(i.Fragment,{children:[i.jsx("path",{d:"M3 20V10"}),i.jsx("path",{d:"M9 20V4"}),i.jsx("path",{d:"M15 20v-8"}),i.jsx("path",{d:"M21 20v-12"})]}),team:i.jsxs(i.Fragment,{children:[i.jsx("circle",{cx:"9",cy:"8",r:"4"}),i.jsx("path",{d:"M2 22c0-4 3-7 7-7s7 3 7 7"}),i.jsx("circle",{cx:"17",cy:"7",r:"3"}),i.jsx("path",{d:"M15 15c3 0 7 2 7 7"})]}),settings:i.jsxs(i.Fragment,{children:[i.jsx("circle",{cx:"12",cy:"12",r:"3"}),i.jsx("path",{d:"M19.4 15a1.7 1.7 0 00.3 1.8l.1.1a2 2 0 11-2.8 2.8l-.1-.1a1.7 1.7 0 00-1.8-.3 1.7 1.7 0 00-1 1.5V21a2 2 0 11-4 0v-.1a1.7 1.7 0 00-1.1-1.5 1.7 1.7 0 00-1.8.3l-.1.1a2 2 0 11-2.8-2.8l.1-.1a1.7 1.7 0 00.3-1.8 1.7 1.7 0 00-1.5-1H3a2 2 0 110-4h.1a1.7 1.7 0 001.5-1.1 1.7 1.7 0 00-.3-1.8l-.1-.1a2 2 0 112.8-2.8l.1.1a1.7 1.7 0 001.8.3H9a1.7 1.7 0 001-1.5V3a2 2 0 114 0v.1a1.7 1.7 0 001 1.5 1.7 1.7 0 001.8-.3l.1-.1a2 2 0 112.8 2.8l-.1.1a1.7 1.7 0 00-.3 1.8V9a1.7 1.7 0 001.5 1H21a2 2 0 110 4h-.1a1.7 1.7 0 00-1.5 1z"})]}),search:i.jsxs(i.Fragment,{children:[i.jsx("circle",{cx:"11",cy:"11",r:"7"}),i.jsx("path",{d:"M21 21l-4.3-4.3"})]}),chevron:i.jsx("path",{d:"M6 9l6 6 6-6"}),x:i.jsx("path",{d:"M6 6l12 12M6 18L18 6"}),gear:i.jsxs(i.Fragment,{children:[i.jsx("circle",{cx:"12",cy:"12",r:"3"}),i.jsx("path",{d:"M19.4 15a1.7 1.7 0 00.3 1.8l.1.1a2 2 0 11-2.8 2.8l-.1-.1a1.7 1.7 0 00-1.8-.3 1.7 1.7 0 00-1 1.5V21a2 2 0 11-4 0v-.1a1.7 1.7 0 00-1.1-1.5 1.7 1.7 0 00-1.8.3l-.1.1a2 2 0 11-2.8-2.8l.1-.1a1.7 1.7 0 00.3-1.8 1.7 1.7 0 00-1.5-1H3a2 2 0 110-4h.1a1.7 1.7 0 001.5-1.1 1.7 1.7 0 00-.3-1.8l-.1-.1a2 2 0 112.8-2.8l.1.1a1.7 1.7 0 001.8.3H9a1.7 1.7 0 001-1.5V3a2 2 0 114 0v.1a1.7 1.7 0 001 1.5 1.7 1.7 0 001.8-.3l.1-.1a2 2 0 112.8 2.8l-.1.1a1.7 1.7 0 00-.3 1.8V9a1.7 1.7 0 001.5 1H21a2 2 0 110 4h-.1a1.7 1.7 0 00-1.5 1z"})]}),bell:i.jsxs(i.Fragment,{children:[i.jsx("path",{d:"M6 8a6 6 0 1112 0c0 7 3 9 3 9H3s3-2 3-9"}),i.jsx("path",{d:"M10 21a2 2 0 004 0"})]}),external:i.jsxs(i.Fragment,{children:[i.jsx("path",{d:"M14 3h7v7"}),i.jsx("path",{d:"M10 14L21 3"}),i.jsx("path",{d:"M21 14v5a2 2 0 01-2 2H5a2 2 0 01-2-2V5a2 2 0 012-2h5"})]}),plus:i.jsx("path",{d:"M12 5v14M5 12h14"}),trash:i.jsxs(i.Fragment,{children:[i.jsx("path",{d:"M3 6h18"}),i.jsx("path",{d:"M8 6V4a2 2 0 012-2h4a2 2 0 012 2v2"}),i.jsx("path",{d:"M6 6l1 14a2 2 0 002 2h6a2 2 0 002-2l1-14"})]}),rollback:i.jsxs(i.Fragment,{children:[i.jsx("path",{d:"M3 7v6h6"}),i.jsx("path",{d:"M3 13a9 9 0 109-9"})]}),check:i.jsx("path",{d:"M5 12l5 5L20 6"}),command:i.jsx("path",{d:"M18 3a3 3 0 00-3 3v12a3 3 0 003 3 3 3 0 003-3 3 3 0 00-3-3H6a3 3 0 00-3 3 3 3 0 003 3 3 3 0 003-3V6a3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3h12a3 3 0 003-3 3 3 0 00-3-3z"}),filter:i.jsxs(i.Fragment,{children:[i.jsx("path",{d:"M4 6h16"}),i.jsx("path",{d:"M7 12h10"}),i.jsx("path",{d:"M10 18h4"})]}),menu:i.jsx("path",{d:"M3 6h18M3 12h18M3 18h18"}),shield:i.jsx("path",{d:"M12 2L3 6v6c0 5 4 9 9 10 5-1 9-5 9-10V6l-9-4z"}),doc:i.jsxs(i.Fragment,{children:[i.jsx("path",{d:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z"}),i.jsx("path",{d:"M14 2v6h6"})]}),folder:i.jsx("path",{d:"M3 7a2 2 0 012-2h4l2 2h8a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2z"}),sliders:i.jsxs(i.Fragment,{children:[i.jsx("path",{d:"M4 6h10"}),i.jsx("path",{d:"M18 6h2"}),i.jsx("circle",{cx:"16",cy:"6",r:"2"}),i.jsx("path",{d:"M4 12h2"}),i.jsx("path",{d:"M10 12h10"}),i.jsx("circle",{cx:"8",cy:"12",r:"2"}),i.jsx("path",{d:"M4 18h12"}),i.jsx("path",{d:"M20 18h0"}),i.jsx("circle",{cx:"18",cy:"18",r:"2"})]}),sun:i.jsxs(i.Fragment,{children:[i.jsx("circle",{cx:"12",cy:"12",r:"4"}),i.jsx("path",{d:"M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"})]}),moon:i.jsx("path",{d:"M21 12.8A9 9 0 0111.2 3a7 7 0 109.8 9.8z"}),eye:i.jsxs(i.Fragment,{children:[i.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8S1 12 1 12z"}),i.jsx("circle",{cx:"12",cy:"12",r:"3"})]}),agent:i.jsxs(i.Fragment,{children:[i.jsx("rect",{x:"3",y:"8",width:"18",height:"13",rx:"2"}),i.jsx("path",{d:"M8 8V6a4 4 0 018 0v2"}),i.jsx("circle",{cx:"12",cy:"15",r:"2"})]})};function L({name:e,size:t=16,...n}){return i.jsx("svg",{viewBox:"0 0 24 24",width:t,height:t,fill:"none",stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,focusable:"false",...n,children:Wy[e]})}class Hy extends Error{constructor(t,n){super(n),this.status=t,this.name="ApiError"}}async function U(e,t){const n=await fetch(e,{...t,headers:{"Content-Type":"application/json",...(t==null?void 0:t.headers)??{}}});if(!n.ok){let r=`${n.status} ${n.statusText}`;try{const s=await n.json();s!=null&&s.error&&(r=s.error)}catch{}throw new Hy(n.status,r)}if(n.status!==204)return await n.json()}const Q={getActions:()=>U("/api/actions"),getConfig:()=>U("/api/config"),getSessions:()=>U("/api/sessions"),getSessionActions:e=>U(`/api/sessions/${encodeURIComponent(e)}/actions`),getStats:()=>U("/api/stats"),getProject:()=>U("/api/project"),getHubProjects:()=>U("/api/hub/projects"),getTeam:()=>U("/api/team/members"),addTeamMember:e=>U("/api/team/members",{method:"POST",body:JSON.stringify(e)}),removeTeamMember:e=>U(`/api/team/members/${encodeURIComponent(e)}`,{method:"DELETE"}),getApprovalRoutes:()=>U("/api/approval-routes"),addApprovalRoute:e=>U("/api/approval-routes",{method:"POST",body:JSON.stringify(e)}),deleteApprovalRoute:e=>U(`/api/approval-routes/${encodeURIComponent(e)}`,{method:"DELETE"}),getEscalationRules:()=>U("/api/escalations/rules"),addEscalationRule:e=>U("/api/escalations/rules",{method:"POST",body:JSON.stringify(e)}),deleteEscalationRule:e=>U(`/api/escalations/rules/${encodeURIComponent(e)}`,{method:"DELETE"}),getRemediationBlocks:()=>U("/api/remediation/blocks"),hubPause:e=>U(`/api/hub/projects/${encodeURIComponent(e)}/pause`,{method:"POST"}),hubResume:e=>U(`/api/hub/projects/${encodeURIComponent(e)}/resume`,{method:"POST"}),hubStop:e=>U(`/api/hub/projects/${encodeURIComponent(e)}/stop`,{method:"POST"}),hubGc:()=>U("/api/hub/gc",{method:"POST"}),getPeerStats:async(e,t)=>{try{const n=await fetch(`http://localhost:${e}/api/stats`,{signal:t});return n.ok?await n.json():null}catch{return null}},getAgentSessions:e=>{const t=e?new URLSearchParams(Object.entries(e).filter(([,n])=>n)).toString():"";return U(`/api/agent-monitor/sessions${t?"?"+t:""}`)},getAgentSession:e=>U(`/api/agent-monitor/sessions/${encodeURIComponent(e)}`),getAgentRateLimits:()=>U("/api/agent-monitor/rate-limits"),getAgentPorts:()=>U("/api/agent-monitor/ports"),getAgentSnapshot:()=>U("/api/agent-monitor/snapshot"),approveAction:e=>U(`/api/actions/${encodeURIComponent(e)}/approve`,{method:"POST"}),rejectAction:(e,t)=>U(`/api/actions/${encodeURIComponent(e)}/reject`,{method:"POST",body:JSON.stringify({reason:t})}),rollbackAction:e=>U(`/api/actions/${encodeURIComponent(e)}/rollback`,{method:"POST"}),rollbackSession:e=>U(`/api/sessions/${encodeURIComponent(e)}/rollback`,{method:"POST"}),getPendingApprovals:()=>U("/api/approvals/pending"),approveRequest:(e,t,n)=>U(`/api/approvals/${encodeURIComponent(e)}/approve`,{method:"POST",body:JSON.stringify({approver_id:t,reason:n})}),rejectRequest:(e,t,n)=>U(`/api/approvals/${encodeURIComponent(e)}/reject`,{method:"POST",body:JSON.stringify({approver_id:t,reason:n})}),getPendingEscalations:()=>U("/api/escalations/pending"),decideEscalation:(e,t,n,r)=>U(`/api/escalations/${encodeURIComponent(e)}/decide`,{method:"POST",body:JSON.stringify({target_id:t,decision:n,reason:r})})};function J(...e){return e.filter(Boolean).join(" ")}function Lt(e){if(!e)return null;const t=String(e),r=t.includes("Z")||/[+-]\d{2}:?\d{2}$/.test(t)?t:t.replace(" ","T")+"Z",s=new Date(r);return Number.isNaN(s.getTime())?null:s}function nt(e){const t=Lt(e);if(!t)return"—";const n=Math.max(0,Math.floor((Date.now()-t.getTime())/1e3));return n<5?"just now":n<60?`${n}s ago`:n<3600?`${Math.floor(n/60)}m ago`:n<86400?`${Math.floor(n/3600)}h ago`:`${Math.floor(n/86400)}d ago`}function Eu(e){try{return JSON.parse(e.input_payload||"{}")}catch{return{}}}function fp(e){const t=Eu(e);return String(t.command??"").trim()}function ra(e){if(!e)return"";const t=String(e).replace(/\\/g,"/");return t.split("/").pop()||t}function Sl(e,t=3){if(!e)return"—";const n=String(e).replace(/\\/g,"/").split("/").filter(Boolean);return n.length<=t?String(e):"…/"+n.slice(-t).join("/")}function Nl(e){const t=Eu(e);if(e.tool_name==="bash"){const r=String(t.command??"").trim().split(/\s+/).slice(0,2).join(" ");return r?`Run ${r}`:"Run command"}return e.tool_name==="write_file"?"Edit file":e.tool_name==="read_file"?"Read file":e.tool_name==="delete_file"?"Delete file":e.tool_name}function hp(e){return e.rolled_back?"rolledback":e.status==="blocked"||e.decision==="block"?"blocked":e.status==="rejected"||e.decision==="rejected"?"rejected":e.status==="error"?"error":e.status==="pending"||e.decision==="pending"?"pending":e.approved_by?"approved":"ok"}function Ky(e){const t=new Map;for(const s of e){const l=s.session_id||"unknown";t.has(l)||t.set(l,[]),t.get(l).push(s)}const n=Date.now(),r=[];for(const[s,l]of t.entries()){const a=m=>{var w;return((w=Lt(m.created_at))==null?void 0:w.getTime())??0};l.sort((m,w)=>a(w)-a(m));const o=a(l[0]),u=n-o<5*60*1e3,d=l.filter(m=>m.status==="pending").length,h=l.filter(m=>m.status==="error"||m.status==="blocked"||m.status==="rejected").length,p=l.filter(m=>m.tool_name==="write_file"&&!m.rolled_back).length,g=l.find(m=>m.event_type!=="observation")??l[0];r.push({session_id:s,rows:l,latest:o,live:u,pending:d,errors:h,writes:p,total:l.length,summary:Nl(g),agent:"agent",model:"",cwd:"",branch:""})}return r.sort((s,l)=>l.latest-s.latest),r}function qy(e,t){const n=(e||"").split(`
68
68
  `),r=(t||"").split(`
69
- `),s=[],l=Math.max(n.length,r.length);for(let a=0;a<l;a++){const o=n[a],u=r[a];o===u?s.push({l:o||"",r:u||"",t:"eq"}):o!==void 0&&u!==void 0?s.push({l:o,r:u,t:"ch"}):o!==void 0?s.push({l:o,r:"",t:"del"}):s.push({l:"",r:u??"",t:"add"})}return s}const fp=N.createContext(null);function Vy({children:e}){const[t,n]=N.useState([]),r=N.useRef(0),s=N.useCallback(({tone:a,message:o})=>{const u=++r.current;n(d=>[...d,{id:u,tone:a,message:o}]),window.setTimeout(()=>{n(d=>d.filter(h=>h.id!==u))},3200)},[]),l=N.useMemo(()=>({push:s}),[s]);return i.jsxs(fp.Provider,{value:l,children:[e,i.jsx("div",{className:"toast-stack",role:"status","aria-live":"polite",children:t.map(a=>i.jsx("div",{className:J("toast",a.tone),children:a.message},a.id))})]})}function xe(){const e=N.useContext(fp);if(!e)throw new Error("useToast must be used within ToastProvider");return e}const kl=3e4;function Ws(){return Oe({queryKey:["actions"],queryFn:Q.getActions,refetchInterval:kl,refetchIntervalInBackground:!1})}function Gy(){return Oe({queryKey:["config"],queryFn:Q.getConfig,refetchInterval:3e4})}function Jy(){return Oe({queryKey:["sessions"],queryFn:Q.getSessions,refetchInterval:kl})}function Yy(){const e=le(),t=xe();return ye({mutationFn:n=>Q.rollbackSession(n),onSuccess:n=>{e.invalidateQueries({queryKey:["actions"]}),e.invalidateQueries({queryKey:["sessions"]}),e.invalidateQueries({queryKey:["session-actions"]}),t.push({tone:"ok",message:`Rolled back ${n.actions_rolled_back} action${n.actions_rolled_back===1?"":"s"}.`})},onError:n=>t.push({tone:"err",message:n.message})})}function hp(){return Oe({queryKey:["approvals","pending"],queryFn:Q.getPendingApprovals,refetchInterval:kl})}function pp(){return Oe({queryKey:["escalations","pending"],queryFn:Q.getPendingEscalations,refetchInterval:kl})}function Xy(e){const t=le(),n=xe();return ye({mutationFn:({requestId:r,reason:s})=>Q.approveRequest(r,e,s),onSuccess:()=>{t.invalidateQueries({queryKey:["approvals"]}),t.invalidateQueries({queryKey:["actions"]}),n.push({tone:"ok",message:"Approval recorded."})},onError:r=>n.push({tone:"err",message:r.message})})}function Zy(e){const t=le(),n=xe();return ye({mutationFn:({requestId:r,reason:s})=>Q.rejectRequest(r,e,s),onSuccess:()=>{t.invalidateQueries({queryKey:["approvals"]}),t.invalidateQueries({queryKey:["actions"]}),n.push({tone:"ok",message:"Rejection recorded."})},onError:r=>n.push({tone:"err",message:r.message})})}function Pu(){return Oe({queryKey:["project"],queryFn:Q.getProject,refetchInterval:6e4})}function _u(){return Oe({queryKey:["hub"],queryFn:Q.getHubProjects,refetchInterval:1e4})}function Ru(){return Oe({queryKey:["team"],queryFn:Q.getTeam,refetchInterval:3e4})}function ex(){const e=le(),t=xe();return ye({mutationFn:Q.addTeamMember,onSuccess:()=>{e.invalidateQueries({queryKey:["team"]}),t.push({tone:"ok",message:"Team member added."})},onError:n=>t.push({tone:"err",message:n.message})})}function tx(){const e=le(),t=xe();return ye({mutationFn:n=>Q.removeTeamMember(n),onSuccess:()=>{e.invalidateQueries({queryKey:["team"]}),t.push({tone:"ok",message:"Team member removed."})},onError:n=>t.push({tone:"err",message:n.message})})}function nx(){return Oe({queryKey:["approval-routes"],queryFn:Q.getApprovalRoutes,refetchInterval:3e4})}function rx(){const e=le(),t=xe();return ye({mutationFn:Q.addApprovalRoute,onSuccess:()=>{e.invalidateQueries({queryKey:["approval-routes"]}),t.push({tone:"ok",message:"Approval route added."})},onError:n=>t.push({tone:"err",message:n.message})})}function sx(){const e=le(),t=xe();return ye({mutationFn:n=>Q.deleteApprovalRoute(n),onSuccess:()=>{e.invalidateQueries({queryKey:["approval-routes"]}),t.push({tone:"ok",message:"Approval route deleted."})},onError:n=>t.push({tone:"err",message:n.message})})}function ix(){return Oe({queryKey:["escalation-rules"],queryFn:Q.getEscalationRules,refetchInterval:3e4})}function lx(){const e=le(),t=xe();return ye({mutationFn:Q.addEscalationRule,onSuccess:()=>{e.invalidateQueries({queryKey:["escalation-rules"]}),t.push({tone:"ok",message:"Escalation rule added."})},onError:n=>t.push({tone:"err",message:n.message})})}function ax(){const e=le(),t=xe();return ye({mutationFn:n=>Q.deleteEscalationRule(n),onSuccess:()=>{e.invalidateQueries({queryKey:["escalation-rules"]}),t.push({tone:"ok",message:"Escalation rule deleted."})},onError:n=>t.push({tone:"err",message:n.message})})}function ox(){return Oe({queryKey:["remediation","blocks"],queryFn:Q.getRemediationBlocks,refetchInterval:3e4})}function ux(e,t=!0){return Oe({queryKey:["hub","peer-stats",e],queryFn:({signal:n})=>Q.getPeerStats(e,n),enabled:t,refetchInterval:5e3,staleTime:4e3,retry:!1})}function cx(){const e=le(),t=xe();return ye({mutationFn:n=>Q.hubPause(n),onSuccess:()=>{e.invalidateQueries({queryKey:["hub"]}),t.push({tone:"ok",message:"Project paused."})},onError:n=>t.push({tone:"err",message:n.message})})}function dx(){const e=le(),t=xe();return ye({mutationFn:n=>Q.hubResume(n),onSuccess:()=>{e.invalidateQueries({queryKey:["hub"]}),t.push({tone:"ok",message:"Project resumed."})},onError:n=>t.push({tone:"err",message:n.message})})}function fx(){const e=le(),t=xe();return ye({mutationFn:n=>Q.hubStop(n),onSuccess:n=>{e.invalidateQueries({queryKey:["hub"]}),t.push({tone:"ok",message:n.message??"Project stopped."})},onError:n=>t.push({tone:"err",message:n.message})})}function hx(){const e=le(),t=xe();return ye({mutationFn:()=>Q.hubGc(),onSuccess:n=>{e.invalidateQueries({queryKey:["hub"]}),t.push({tone:"ok",message:`Garbage collected ${n.removed} stale entr${n.removed===1?"y":"ies"}.`})},onError:n=>t.push({tone:"err",message:n.message})})}function px(e){const t=le(),n=xe();return ye({mutationFn:({requestId:r,decision:s,reason:l})=>Q.decideEscalation(r,e,s,l),onSuccess:(r,s)=>{t.invalidateQueries({queryKey:["escalations"]}),t.invalidateQueries({queryKey:["approvals"]}),n.push({tone:"ok",message:s.decision==="proceed"?"Allowed to proceed.":"Blocked."})},onError:r=>n.push({tone:"err",message:r.message})})}function mx(){return Oe({queryKey:["stats"],queryFn:Q.getStats,refetchInterval:1e4})}function mp(){const e=le(),t=xe();return ye({mutationFn:n=>Q.approveAction(n),onSuccess:()=>{e.invalidateQueries({queryKey:["actions"]}),t.push({tone:"ok",message:"Action approved."})},onError:n=>t.push({tone:"err",message:n.message})})}function vp(){const e=le(),t=xe();return ye({mutationFn:({id:n,reason:r})=>Q.rejectAction(n,r),onSuccess:()=>{e.invalidateQueries({queryKey:["actions"]}),t.push({tone:"ok",message:"Action rejected."})},onError:n=>t.push({tone:"err",message:n.message})})}function gp(){const e=le(),t=xe();return ye({mutationFn:n=>Q.rollbackAction(n),onSuccess:()=>{e.invalidateQueries({queryKey:["actions"]}),t.push({tone:"ok",message:"Action rolled back."})},onError:n=>t.push({tone:"err",message:n.message})})}const yp=3e3;function vx(e){return Oe({queryKey:["agent-sessions",e],queryFn:()=>Q.getAgentSessions(e),refetchInterval:yp,refetchIntervalInBackground:!1})}function gx(){return Oe({queryKey:["agent-snapshot"],queryFn:Q.getAgentSnapshot,refetchInterval:yp,refetchIntervalInBackground:!1})}const yx={},ld=e=>{let t;const n=new Set,r=(h,p)=>{const g=typeof h=="function"?h(t):h;if(!Object.is(g,t)){const m=t;t=p??(typeof g!="object"||g===null)?g:Object.assign({},t,g),n.forEach(w=>w(t,m))}},s=()=>t,u={setState:r,getState:s,getInitialState:()=>d,subscribe:h=>(n.add(h),()=>n.delete(h)),destroy:()=>{(yx?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},d=t=e(r,s,u);return u},xx=e=>e?ld(e):ld;var xp={exports:{}},jp={},wp={exports:{}},Sp={};/**
69
+ `),s=[],l=Math.max(n.length,r.length);for(let a=0;a<l;a++){const o=n[a],u=r[a];o===u?s.push({l:o||"",r:u||"",t:"eq"}):o!==void 0&&u!==void 0?s.push({l:o,r:u,t:"ch"}):o!==void 0?s.push({l:o,r:"",t:"del"}):s.push({l:"",r:u??"",t:"add"})}return s}const pp=N.createContext(null);function Vy({children:e}){const[t,n]=N.useState([]),r=N.useRef(0),s=N.useCallback(({tone:a,message:o})=>{const u=++r.current;n(d=>[...d,{id:u,tone:a,message:o}]),window.setTimeout(()=>{n(d=>d.filter(h=>h.id!==u))},3200)},[]),l=N.useMemo(()=>({push:s}),[s]);return i.jsxs(pp.Provider,{value:l,children:[e,i.jsx("div",{className:"toast-stack",role:"status","aria-live":"polite",children:t.map(a=>i.jsx("div",{className:J("toast",a.tone),children:a.message},a.id))})]})}function xe(){const e=N.useContext(pp);if(!e)throw new Error("useToast must be used within ToastProvider");return e}const kl=3e4;function Qr(){return Oe({queryKey:["actions"],queryFn:Q.getActions,refetchInterval:kl,refetchIntervalInBackground:!1})}function Gy(){return Oe({queryKey:["config"],queryFn:Q.getConfig,refetchInterval:3e4})}function Jy(){return Oe({queryKey:["sessions"],queryFn:Q.getSessions,refetchInterval:kl})}function Yy(){const e=le(),t=xe();return ye({mutationFn:n=>Q.rollbackSession(n),onSuccess:n=>{e.invalidateQueries({queryKey:["actions"]}),e.invalidateQueries({queryKey:["sessions"]}),e.invalidateQueries({queryKey:["session-actions"]}),t.push({tone:"ok",message:`Rolled back ${n.actions_rolled_back} action${n.actions_rolled_back===1?"":"s"}.`})},onError:n=>t.push({tone:"err",message:n.message})})}function mp(){return Oe({queryKey:["approvals","pending"],queryFn:Q.getPendingApprovals,refetchInterval:kl})}function vp(){return Oe({queryKey:["escalations","pending"],queryFn:Q.getPendingEscalations,refetchInterval:kl})}function Xy(e){const t=le(),n=xe();return ye({mutationFn:({requestId:r,reason:s})=>Q.approveRequest(r,e,s),onSuccess:()=>{t.invalidateQueries({queryKey:["approvals"]}),t.invalidateQueries({queryKey:["actions"]}),n.push({tone:"ok",message:"Approval recorded."})},onError:r=>n.push({tone:"err",message:r.message})})}function Zy(e){const t=le(),n=xe();return ye({mutationFn:({requestId:r,reason:s})=>Q.rejectRequest(r,e,s),onSuccess:()=>{t.invalidateQueries({queryKey:["approvals"]}),t.invalidateQueries({queryKey:["actions"]}),n.push({tone:"ok",message:"Rejection recorded."})},onError:r=>n.push({tone:"err",message:r.message})})}function _u(){return Oe({queryKey:["project"],queryFn:Q.getProject,refetchInterval:6e4})}function Pu(){return Oe({queryKey:["hub"],queryFn:Q.getHubProjects,refetchInterval:1e4})}function Ru(){return Oe({queryKey:["team"],queryFn:Q.getTeam,refetchInterval:3e4})}function ex(){const e=le(),t=xe();return ye({mutationFn:Q.addTeamMember,onSuccess:()=>{e.invalidateQueries({queryKey:["team"]}),t.push({tone:"ok",message:"Team member added."})},onError:n=>t.push({tone:"err",message:n.message})})}function tx(){const e=le(),t=xe();return ye({mutationFn:n=>Q.removeTeamMember(n),onSuccess:()=>{e.invalidateQueries({queryKey:["team"]}),t.push({tone:"ok",message:"Team member removed."})},onError:n=>t.push({tone:"err",message:n.message})})}function nx(){return Oe({queryKey:["approval-routes"],queryFn:Q.getApprovalRoutes,refetchInterval:3e4})}function rx(){const e=le(),t=xe();return ye({mutationFn:Q.addApprovalRoute,onSuccess:()=>{e.invalidateQueries({queryKey:["approval-routes"]}),t.push({tone:"ok",message:"Approval route added."})},onError:n=>t.push({tone:"err",message:n.message})})}function sx(){const e=le(),t=xe();return ye({mutationFn:n=>Q.deleteApprovalRoute(n),onSuccess:()=>{e.invalidateQueries({queryKey:["approval-routes"]}),t.push({tone:"ok",message:"Approval route deleted."})},onError:n=>t.push({tone:"err",message:n.message})})}function ix(){return Oe({queryKey:["escalation-rules"],queryFn:Q.getEscalationRules,refetchInterval:3e4})}function lx(){const e=le(),t=xe();return ye({mutationFn:Q.addEscalationRule,onSuccess:()=>{e.invalidateQueries({queryKey:["escalation-rules"]}),t.push({tone:"ok",message:"Escalation rule added."})},onError:n=>t.push({tone:"err",message:n.message})})}function ax(){const e=le(),t=xe();return ye({mutationFn:n=>Q.deleteEscalationRule(n),onSuccess:()=>{e.invalidateQueries({queryKey:["escalation-rules"]}),t.push({tone:"ok",message:"Escalation rule deleted."})},onError:n=>t.push({tone:"err",message:n.message})})}function ox(){return Oe({queryKey:["remediation","blocks"],queryFn:Q.getRemediationBlocks,refetchInterval:3e4})}function ux(e,t=!0){return Oe({queryKey:["hub","peer-stats",e],queryFn:({signal:n})=>Q.getPeerStats(e,n),enabled:t,refetchInterval:5e3,staleTime:4e3,retry:!1})}function cx(){const e=le(),t=xe();return ye({mutationFn:n=>Q.hubPause(n),onSuccess:()=>{e.invalidateQueries({queryKey:["hub"]}),t.push({tone:"ok",message:"Project paused."})},onError:n=>t.push({tone:"err",message:n.message})})}function dx(){const e=le(),t=xe();return ye({mutationFn:n=>Q.hubResume(n),onSuccess:()=>{e.invalidateQueries({queryKey:["hub"]}),t.push({tone:"ok",message:"Project resumed."})},onError:n=>t.push({tone:"err",message:n.message})})}function fx(){const e=le(),t=xe();return ye({mutationFn:n=>Q.hubStop(n),onSuccess:n=>{e.invalidateQueries({queryKey:["hub"]}),t.push({tone:"ok",message:n.message??"Project stopped."})},onError:n=>t.push({tone:"err",message:n.message})})}function hx(){const e=le(),t=xe();return ye({mutationFn:()=>Q.hubGc(),onSuccess:n=>{e.invalidateQueries({queryKey:["hub"]}),t.push({tone:"ok",message:`Garbage collected ${n.removed} stale entr${n.removed===1?"y":"ies"}.`})},onError:n=>t.push({tone:"err",message:n.message})})}function px(e){const t=le(),n=xe();return ye({mutationFn:({requestId:r,decision:s,reason:l})=>Q.decideEscalation(r,e,s,l),onSuccess:(r,s)=>{t.invalidateQueries({queryKey:["escalations"]}),t.invalidateQueries({queryKey:["approvals"]}),t.invalidateQueries({queryKey:["actions"]}),n.push({tone:"ok",message:s.decision==="proceed"?"Allowed to proceed.":"Blocked."})},onError:r=>n.push({tone:"err",message:r.message})})}function mx(){return Oe({queryKey:["stats"],queryFn:Q.getStats,refetchInterval:1e4})}function bu(){const e=le(),t=xe();return ye({mutationFn:n=>Q.approveAction(n),onSuccess:()=>{e.invalidateQueries({queryKey:["actions"]}),t.push({tone:"ok",message:"Action approved."})},onError:n=>t.push({tone:"err",message:n.message})})}function Tu(){const e=le(),t=xe();return ye({mutationFn:({id:n,reason:r})=>Q.rejectAction(n,r),onSuccess:()=>{e.invalidateQueries({queryKey:["actions"]}),t.push({tone:"ok",message:"Action rejected."})},onError:n=>t.push({tone:"err",message:n.message})})}function gp(){const e=le(),t=xe();return ye({mutationFn:n=>Q.rollbackAction(n),onSuccess:()=>{e.invalidateQueries({queryKey:["actions"]}),t.push({tone:"ok",message:"Action rolled back."})},onError:n=>t.push({tone:"err",message:n.message})})}const yp=3e3;function vx(e){return Oe({queryKey:["agent-sessions",e],queryFn:()=>Q.getAgentSessions(e),refetchInterval:yp,refetchIntervalInBackground:!1})}function gx(){return Oe({queryKey:["agent-snapshot"],queryFn:Q.getAgentSnapshot,refetchInterval:yp,refetchIntervalInBackground:!1})}const yx={},od=e=>{let t;const n=new Set,r=(h,p)=>{const g=typeof h=="function"?h(t):h;if(!Object.is(g,t)){const m=t;t=p??(typeof g!="object"||g===null)?g:Object.assign({},t,g),n.forEach(w=>w(t,m))}},s=()=>t,u={setState:r,getState:s,getInitialState:()=>d,subscribe:h=>(n.add(h),()=>n.delete(h)),destroy:()=>{(yx?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},d=t=e(r,s,u);return u},xx=e=>e?od(e):od;var xp={exports:{}},jp={},wp={exports:{}},Sp={};/**
70
70
  * @license React
71
71
  * use-sync-external-store-shim.production.js
72
72
  *
@@ -74,7 +74,7 @@ Error generating stack: `+l.message+`
74
74
  *
75
75
  * This source code is licensed under the MIT license found in the
76
76
  * LICENSE file in the root directory of this source tree.
77
- */var Fr=N;function jx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var wx=typeof Object.is=="function"?Object.is:jx,Sx=Fr.useState,Nx=Fr.useEffect,kx=Fr.useLayoutEffect,Cx=Fr.useDebugValue;function Ex(e,t){var n=t(),r=Sx({inst:{value:n,getSnapshot:t}}),s=r[0].inst,l=r[1];return kx(function(){s.value=n,s.getSnapshot=t,sa(s)&&l({inst:s})},[e,n,t]),Nx(function(){return sa(s)&&l({inst:s}),e(function(){sa(s)&&l({inst:s})})},[e]),Cx(n),n}function sa(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!wx(e,n)}catch{return!0}}function Px(e,t){return t()}var _x=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Px:Ex;Sp.useSyncExternalStore=Fr.useSyncExternalStore!==void 0?Fr.useSyncExternalStore:_x;wp.exports=Sp;var Rx=wp.exports;/**
77
+ */var Fr=N;function jx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var wx=typeof Object.is=="function"?Object.is:jx,Sx=Fr.useState,Nx=Fr.useEffect,kx=Fr.useLayoutEffect,Cx=Fr.useDebugValue;function Ex(e,t){var n=t(),r=Sx({inst:{value:n,getSnapshot:t}}),s=r[0].inst,l=r[1];return kx(function(){s.value=n,s.getSnapshot=t,sa(s)&&l({inst:s})},[e,n,t]),Nx(function(){return sa(s)&&l({inst:s}),e(function(){sa(s)&&l({inst:s})})},[e]),Cx(n),n}function sa(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!wx(e,n)}catch{return!0}}function _x(e,t){return t()}var Px=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?_x:Ex;Sp.useSyncExternalStore=Fr.useSyncExternalStore!==void 0?Fr.useSyncExternalStore:Px;wp.exports=Sp;var Rx=wp.exports;/**
78
78
  * @license React
79
79
  * use-sync-external-store-shim/with-selector.production.js
80
80
  *
@@ -82,6 +82,6 @@ Error generating stack: `+l.message+`
82
82
  *
83
83
  * This source code is licensed under the MIT license found in the
84
84
  * LICENSE file in the root directory of this source tree.
85
- */var Cl=N,bx=Rx;function Tx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ox=typeof Object.is=="function"?Object.is:Tx,Ix=bx.useSyncExternalStore,Mx=Cl.useRef,Lx=Cl.useEffect,Fx=Cl.useMemo,Ax=Cl.useDebugValue;jp.useSyncExternalStoreWithSelector=function(e,t,n,r,s){var l=Mx(null);if(l.current===null){var a={hasValue:!1,value:null};l.current=a}else a=l.current;l=Fx(function(){function u(m){if(!d){if(d=!0,h=m,m=r(m),s!==void 0&&a.hasValue){var w=a.value;if(s(w,m))return p=w}return p=m}if(w=p,Ox(h,m))return w;var j=r(m);return s!==void 0&&s(w,j)?(h=m,w):(h=m,p=j)}var d=!1,h,p,g=n===void 0?null:n;return[function(){return u(t())},g===null?void 0:function(){return u(g())}]},[t,n,r,s]);var o=Ix(e,l[0],l[1]);return Lx(function(){a.hasValue=!0,a.value=o},[o]),Ax(o),o};xp.exports=jp;var zx=xp.exports;const Dx=Cd(zx),Np={},{useDebugValue:Ux}=Fd,{useSyncExternalStoreWithSelector:$x}=Dx;let ad=!1;const Bx=e=>e;function Qx(e,t=Bx,n){(Np?"production":void 0)!=="production"&&n&&!ad&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),ad=!0);const r=$x(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return Ux(r),r}const Wx=e=>{(Np?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?xx(e):e,n=(r,s)=>Qx(t,r,s);return Object.assign(n,t),n},Hx=e=>Wx,Kx={};function qx(e,t){let n;try{n=e()}catch{return}return{getItem:s=>{var l;const a=u=>u===null?null:JSON.parse(u,void 0),o=(l=n.getItem(s))!=null?l:null;return o instanceof Promise?o.then(a):a(o)},setItem:(s,l)=>n.setItem(s,JSON.stringify(l,void 0)),removeItem:s=>n.removeItem(s)}}const Os=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return Os(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Os(r)(n)}}}},Vx=(e,t)=>(n,r,s)=>{let l={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:S=>S,version:0,merge:(S,c)=>({...c,...S}),...t},a=!1;const o=new Set,u=new Set;let d;try{d=l.getStorage()}catch{}if(!d)return e((...S)=>{console.warn(`[zustand persist middleware] Unable to update item '${l.name}', the given storage is currently unavailable.`),n(...S)},r,s);const h=Os(l.serialize),p=()=>{const S=l.partialize({...r()});let c;const f=h({state:S,version:l.version}).then(v=>d.setItem(l.name,v)).catch(v=>{c=v});if(c)throw c;return f},g=s.setState;s.setState=(S,c)=>{g(S,c),p()};const m=e((...S)=>{n(...S),p()},r,s);let w;const j=()=>{var S;if(!d)return;a=!1,o.forEach(f=>f(r()));const c=((S=l.onRehydrateStorage)==null?void 0:S.call(l,r()))||void 0;return Os(d.getItem.bind(d))(l.name).then(f=>{if(f)return l.deserialize(f)}).then(f=>{if(f)if(typeof f.version=="number"&&f.version!==l.version){if(l.migrate)return l.migrate(f.state,f.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return f.state}).then(f=>{var v;return w=l.merge(f,(v=r())!=null?v:m),n(w,!0),p()}).then(()=>{c==null||c(w,void 0),a=!0,u.forEach(f=>f(w))}).catch(f=>{c==null||c(void 0,f)})};return s.persist={setOptions:S=>{l={...l,...S},S.getStorage&&(d=S.getStorage())},clearStorage:()=>{d==null||d.removeItem(l.name)},getOptions:()=>l,rehydrate:()=>j(),hasHydrated:()=>a,onHydrate:S=>(o.add(S),()=>{o.delete(S)}),onFinishHydration:S=>(u.add(S),()=>{u.delete(S)})},j(),w||m},Gx=(e,t)=>(n,r,s)=>{let l={storage:qx(()=>localStorage),partialize:j=>j,version:0,merge:(j,S)=>({...S,...j}),...t},a=!1;const o=new Set,u=new Set;let d=l.storage;if(!d)return e((...j)=>{console.warn(`[zustand persist middleware] Unable to update item '${l.name}', the given storage is currently unavailable.`),n(...j)},r,s);const h=()=>{const j=l.partialize({...r()});return d.setItem(l.name,{state:j,version:l.version})},p=s.setState;s.setState=(j,S)=>{p(j,S),h()};const g=e((...j)=>{n(...j),h()},r,s);s.getInitialState=()=>g;let m;const w=()=>{var j,S;if(!d)return;a=!1,o.forEach(f=>{var v;return f((v=r())!=null?v:g)});const c=((S=l.onRehydrateStorage)==null?void 0:S.call(l,(j=r())!=null?j:g))||void 0;return Os(d.getItem.bind(d))(l.name).then(f=>{if(f)if(typeof f.version=="number"&&f.version!==l.version){if(l.migrate)return[!0,l.migrate(f.state,f.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,f.state];return[!1,void 0]}).then(f=>{var v;const[y,k]=f;if(m=l.merge(k,(v=r())!=null?v:g),n(m,!0),y)return h()}).then(()=>{c==null||c(m,void 0),m=r(),a=!0,u.forEach(f=>f(m))}).catch(f=>{c==null||c(void 0,f)})};return s.persist={setOptions:j=>{l={...l,...j},j.storage&&(d=j.storage)},clearStorage:()=>{d==null||d.removeItem(l.name)},getOptions:()=>l,rehydrate:()=>w(),hasHydrated:()=>a,onHydrate:j=>(o.add(j),()=>{o.delete(j)}),onFinishHydration:j=>(u.add(j),()=>{u.delete(j)})},l.skipHydration||w(),m||g},Jx=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((Kx?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),Vx(e,t)):Gx(e,t),Yx=Jx,zt=Hx()(Yx(e=>({theme:"dark",density:"comfy",grouping:"session",accent:"teal",filter:"all",search:"",selectedActionId:null,reviewerId:"ui-reviewer",setTheme:t=>e({theme:t}),setDensity:t=>e({density:t}),setGrouping:t=>e({grouping:t}),setAccent:t=>e({accent:t}),setFilter:t=>e({filter:t}),setSearch:t=>e({search:t}),setSelectedActionId:t=>e({selectedActionId:t}),setReviewerId:t=>e({reviewerId:t.trim()||"ui-reviewer"})}),{name:"waymark:ui",partialize:e=>({theme:e.theme,density:e.density,grouping:e.grouping,accent:e.accent,reviewerId:e.reviewerId})})),Is={teal:{c:"oklch(0.72 0.09 195)",ring:"oklch(0.72 0.09 195 / 0.28)"},blue:{c:"oklch(0.72 0.1 240)",ring:"oklch(0.72 0.1 240 / 0.28)"},green:{c:"oklch(0.76 0.14 155)",ring:"oklch(0.76 0.14 155 / 0.28)"},amber:{c:"oklch(0.82 0.13 75)",ring:"oklch(0.82 0.13 75 / 0.28)"},violet:{c:"oklch(0.72 0.14 300)",ring:"oklch(0.72 0.14 300 / 0.28)"}};function Xx({open:e,onClose:t}){const n=ju(),r=le(),{data:s=[]}=Ws(),{theme:l,density:a,setTheme:o,setDensity:u,setSelectedActionId:d}=zt(),[h,p]=N.useState(""),[g,m]=N.useState(0),w=N.useRef(null),j=N.useRef(null),S=N.useMemo(()=>{const y=[{id:"go-actions",label:"Go to Actions",icon:"actions",group:"Navigation",run:()=>n("/")},{id:"go-sessions",label:"Go to Sessions",icon:"sessions",group:"Navigation",run:()=>n("/sessions")},{id:"go-approvals",label:"Go to Approvals",icon:"approvals",group:"Navigation",run:()=>n("/approvals")},{id:"go-policy",label:"Go to Policy",icon:"policy",group:"Navigation",run:()=>n("/policy")},{id:"go-stats",label:"Go to Stats",icon:"stats",group:"Navigation",run:()=>n("/stats")},{id:"go-settings",label:"Go to Settings",icon:"settings",group:"Navigation",run:()=>n("/settings")}],k=[{id:"toggle-theme",label:`Switch to ${l==="dark"?"light":"dark"} theme`,icon:l==="dark"?"sun":"moon",group:"Commands",keywords:"theme dark light mode",run:()=>o(l==="dark"?"light":"dark")},{id:"cycle-density",label:`Density: cycle to ${a==="compact"?"comfy":a==="comfy"?"spacious":"compact"}`,icon:"sliders",group:"Commands",keywords:"density compact comfy spacious",run:()=>u(a==="compact"?"comfy":a==="comfy"?"spacious":"compact")},{id:"refresh-all",label:"Refresh all data",hint:"Invalidates every query",icon:"rollback",group:"Commands",keywords:"reload refetch sync",run:()=>r.invalidateQueries()}],E=s.slice(0,100).map(C=>({id:`action:${C.action_id}`,label:Nl(C),hint:C.target_path??C.action_id,icon:C.tool_name==="bash"?"command":C.tool_name==="read_file"?"eye":"doc",group:"Actions",keywords:`${C.tool_name} ${C.action_id} ${C.session_id} ${C.status} ${C.target_path??""}`,run:()=>{n("/"),d(C.action_id)}}));return[...y,...k,...E]},[l,a,s,n,r,o,u,d]),c=N.useMemo(()=>{const y=h.trim().toLowerCase();return y?S.filter(k=>k.label.toLowerCase().includes(y)||(k.hint??"").toLowerCase().includes(y)||(k.keywords??"").toLowerCase().includes(y)).slice(0,30):S.slice(0,12)},[S,h]);if(N.useEffect(()=>{m(0)},[h]),N.useEffect(()=>{g>=c.length&&m(Math.max(0,c.length-1))},[c,g]),N.useEffect(()=>{if(!e)return;const y=document.activeElement;p(""),m(0);const k=window.setTimeout(()=>{var E;return(E=w.current)==null?void 0:E.focus()},30);return()=>{var E;window.clearTimeout(k),(E=y==null?void 0:y.focus)==null||E.call(y)}},[e]),N.useEffect(()=>{if(!j.current)return;const y=j.current.querySelector(`[data-pidx="${g}"]`);y==null||y.scrollIntoView({block:"nearest"})},[g]),!e)return null;const f=y=>{var k;y.key==="ArrowDown"?(y.preventDefault(),m(E=>Math.min(c.length-1,E+1))):y.key==="ArrowUp"?(y.preventDefault(),m(E=>Math.max(0,E-1))):y.key==="Enter"?(y.preventDefault(),(k=c[g])==null||k.run(),t()):y.key==="Escape"&&(y.preventDefault(),t())},v=c.reduce((y,k,E)=>{var C;return(y[C=k.group]??(y[C]=[])).push({item:k,idx:E}),y},{});return i.jsx("div",{className:"palette-scrim",role:"dialog","aria-modal":"true","aria-label":"Command palette",onClick:t,children:i.jsxs("div",{className:"palette",onClick:y=>y.stopPropagation(),children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"0 14px",borderBottom:"1px solid var(--line)"},children:[i.jsx(A,{name:"search",size:14,style:{color:"var(--ink-3)"}}),i.jsx("input",{ref:w,value:h,onChange:y=>p(y.target.value),onKeyDown:f,placeholder:"Type to navigate, search actions, or run a command…","aria-label":"Command input",style:{borderBottom:"none",padding:"14px 0"}}),i.jsx("span",{className:"kbd",children:"esc"})]}),i.jsx("div",{className:"palette-list",ref:j,children:c.length===0?i.jsx("div",{style:{padding:24,textAlign:"center",color:"var(--ink-3)"},children:"No matches."}):Object.entries(v).map(([y,k])=>i.jsxs("div",{children:[i.jsx("div",{style:{padding:"8px 18px 4px",fontSize:10.5,textTransform:"uppercase",letterSpacing:"0.08em",color:"var(--ink-4)"},children:y}),k.map(({item:E,idx:C})=>i.jsxs("button",{"data-pidx":C,className:J("palette-item",C===g&&"on"),onMouseEnter:()=>m(C),onClick:()=>{E.run(),t()},style:{width:"100%",textAlign:"left"},children:[i.jsx(A,{name:E.icon,size:14,style:{color:"var(--ink-3)",flexShrink:0}}),i.jsx("span",{style:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:E.label}),E.hint&&i.jsx("span",{className:"muted mono",style:{fontSize:11,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:280},children:E.hint})]},E.id))]},y))}),i.jsxs("div",{style:{display:"flex",gap:12,padding:"8px 14px",borderTop:"1px solid var(--line)",fontSize:10.5,color:"var(--ink-3)"},children:[i.jsxs("span",{children:[i.jsx("span",{className:"kbd",children:"↑↓"})," navigate"]}),i.jsxs("span",{children:[i.jsx("span",{className:"kbd",children:"↵"})," select"]}),i.jsxs("span",{style:{marginLeft:"auto"},children:[i.jsx("span",{className:"kbd",children:"⌘K"})," open"]})]})]})})}function Zx({children:e,topbar:t}){const{theme:n,density:r,accent:s}=zt(),{data:l=[],isError:a}=Ws(),{data:o=[]}=Jy(),{data:u=[]}=hp(),{data:d=[]}=pp(),{data:h}=Pu(),{data:p={}}=_u(),{data:g}=vx({status:"active"}),[m,w]=N.useState(!1);N.useEffect(()=>{const C=P=>{(P.metaKey||P.ctrlKey)&&P.key.toLowerCase()==="k"&&(P.preventDefault(),w(!0))};return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)},[]),N.useEffect(()=>{document.documentElement.dataset.theme=n,document.documentElement.dataset.density=r;const{c:C,ring:P}=Is[s];document.documentElement.style.setProperty("--acc",C),document.documentElement.style.setProperty("--acc-dim",P)},[n,r,s]);const j=l.filter(C=>C.status==="pending").length,S=u.length+d.length,c=S>0||j>0,f=S+j,v=(g==null?void 0:g.count)??0,y=Object.keys(p).length,k=y>1,E=N.useMemo(()=>{const C=[{id:"/",label:"Actions",icon:"actions",count:l.length},{id:"/sessions",label:"Sessions",icon:"sessions",count:o.length},{id:"/approvals",label:"Approvals",icon:"approvals",count:f,attn:c},{id:"/policy",label:"Policy",icon:"policy"},{id:"/stats",label:"Stats",icon:"stats"},{id:"/agents",label:"Agents",icon:"agent",count:v>0?v:void 0}];return k&&C.push({id:"/hub",label:"Hub",icon:"folder",count:y}),C},[l.length,o.length,f,c,v,k,y]);return i.jsxs("div",{className:"app",children:[i.jsxs("aside",{className:"nav",children:[i.jsxs("div",{className:"brand",children:[i.jsx("div",{className:"brand-mark","aria-hidden":!0,children:"W"}),i.jsxs("div",{children:[i.jsx("div",{className:"brand-name",children:"waymark"}),i.jsx("div",{className:"brand-sub",children:"agent action viewer"})]})]}),i.jsxs("div",{children:[i.jsx("div",{className:"nav-section-label",children:"Workspace"}),i.jsx("ul",{className:"nav-list",children:E.map(C=>i.jsx("li",{children:i.jsxs(io,{to:C.id,end:!0,className:({isActive:P})=>J("nav-item",P&&"active"),children:[i.jsx(A,{name:C.icon,className:"nav-icon"}),i.jsx("span",{className:"nav-label",children:C.label}),C.count!==void 0&&i.jsx("span",{className:J("nav-count",C.attn&&"attn"),children:C.count})]})},C.id))})]}),i.jsxs("div",{children:[i.jsx("div",{className:"nav-section-label",children:"Project"}),i.jsx("ul",{className:"nav-list",children:i.jsx("li",{children:i.jsxs(io,{to:"/settings",className:({isActive:C})=>J("nav-item",C&&"active"),children:[i.jsx(A,{name:"settings",className:"nav-icon"}),i.jsx("span",{className:"nav-label",children:"Settings"})]})})})]}),i.jsx("div",{className:"nav-footer",children:i.jsxs("div",{className:"server-row",children:[i.jsx("span",{className:J("status-dot",a&&"off"),"aria-hidden":!0}),i.jsx("span",{children:a?"API unreachable":"MCP server live"}),i.jsx("span",{className:"server-port",title:(h==null?void 0:h.projectRoot)??void 0,children:h!=null&&h.port?`:${h.port}`:"—"})]})})]}),i.jsxs("div",{className:"main",children:[i.jsx(e0,{onOpenPalette:()=>w(!0),children:t}),i.jsx("main",{className:"page",children:e})]}),i.jsx(Xx,{open:m,onClose:()=>w(!1)})]})}function e0({children:e,onOpenPalette:t}){const{search:n,setSearch:r}=zt(),s=Gn(),l=s.pathname==="/"?"Actions":s.pathname.slice(1).split("/")[0]||"Actions";return i.jsxs("header",{className:"topbar",children:[i.jsxs("div",{className:"crumbs",children:[i.jsx("span",{className:"crumb current",children:l.charAt(0).toUpperCase()+l.slice(1)}),i.jsx("span",{className:"crumb-sep",children:"·"}),i.jsx("span",{className:"crumb",children:"live"})]}),i.jsxs("div",{className:"search",children:[i.jsx(A,{name:"search",size:14}),i.jsx("input",{id:"wm-search",placeholder:"Filter the current view…",value:n,onChange:a=>r(a.target.value),"aria-label":"Filter"})]}),i.jsxs("button",{className:"btn ghost",onClick:t,"aria-label":"Open command palette",style:{display:"inline-flex",alignItems:"center",gap:6},children:[i.jsx(A,{name:"command",size:12}),"Commands",i.jsx("span",{className:"kbd",children:"⌘K"})]}),i.jsx("div",{className:"topbar-right",children:e})]})}function t0(){const[e,t]=N.useState(!1),n=N.useRef(null),{theme:r,density:s,grouping:l,accent:a,setTheme:o,setDensity:u,setGrouping:d,setAccent:h}=zt();return N.useEffect(()=>{if(!e)return;const p=m=>{var w;(w=n.current)!=null&&w.contains(m.target)||t(!1)},g=m=>{m.key==="Escape"&&t(!1)};return window.addEventListener("mousedown",p),window.addEventListener("keydown",g),()=>{window.removeEventListener("mousedown",p),window.removeEventListener("keydown",g)}},[e]),i.jsxs("div",{ref:n,style:{position:"relative"},children:[i.jsx("button",{className:"icon-btn","aria-label":"Preferences","aria-expanded":e,onClick:()=>t(p=>!p),children:i.jsx(A,{name:"sliders",size:16})}),e&&i.jsxs("div",{className:"tweaks",role:"dialog","aria-label":"Preferences",children:[i.jsx("h4",{children:"Appearance"}),i.jsx(fi,{label:"Theme",children:i.jsx(ia,{options:["dark","light"],value:r,onChange:o})}),i.jsx(fi,{label:"Density",children:i.jsx(ia,{options:["compact","comfy","spacious"],value:s,onChange:u})}),i.jsx(fi,{label:"Grouping",children:i.jsx(ia,{options:["session","flat"],value:l,onChange:d})}),i.jsx(fi,{label:"Accent",children:i.jsx("div",{className:"accent-swatches",children:Object.keys(Is).map(p=>i.jsx("button",{className:J("accent-swatch",a===p&&"on"),style:{background:Is[p].c},"aria-label":`Accent ${p}`,onClick:()=>h(p)},p))})})]})]})}function fi({label:e,children:t}){return i.jsxs("div",{className:"tweak-row",children:[i.jsx("label",{children:e}),t]})}function ia({options:e,value:t,onChange:n}){return i.jsx("div",{className:"tweak-group",role:"group",children:e.map(r=>i.jsx("button",{className:J(t===r&&"on"),onClick:()=>n(r),type:"button",children:r},r))})}const od={actions:[["actions"],["stats"]],sessions:[["sessions"],["actions"]],approvals:[["approvals"],["actions"]],escalations:[["escalations"],["approvals"]],team:[["team"]],"approval-routes":[["approval-routes"]],"escalation-rules":[["escalation-rules"]],config:[["config"]]};function n0(){const e=le();N.useEffect(()=>{if(typeof EventSource>"u")return;let t=null,n=null,r=!1;const s=()=>{t=new EventSource("/api/events");const l=a=>()=>{for(const o of od[a])e.invalidateQueries({queryKey:[...o]})};Object.keys(od).forEach(a=>t==null?void 0:t.addEventListener(a,l(a))),t.onerror=()=>{t==null||t.close(),t=null,!r&&(n=window.setTimeout(s,3e3))}};return s(),()=>{r=!0,n!==null&&window.clearTimeout(n),t==null||t.close()}},[e])}const r0=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");function ud(e){return Array.from(e.querySelectorAll(r0)).filter(t=>{if(t.hasAttribute("disabled")||t.getAttribute("aria-hidden")==="true")return!1;const n=t.getBoundingClientRect();return n.width>0||n.height>0})}function kp(e,t){N.useEffect(()=>{if(!t)return;const n=e.current;if(!n)return;const r=document.activeElement;(ud(n)[0]??n).focus();const l=a=>{if(a.key!=="Tab")return;const o=ud(n);if(o.length===0){a.preventDefault(),n.focus();return}const u=o[0],d=o[o.length-1],h=document.activeElement;a.shiftKey&&h===u?(a.preventDefault(),d.focus()):!a.shiftKey&&h===d&&(a.preventDefault(),u.focus())};return n.addEventListener("keydown",l),()=>{var a;n.removeEventListener("keydown",l),(a=r==null?void 0:r.focus)==null||a.call(r)}},[t,e])}function Ue({open:e,title:t,body:n,confirmLabel:r="Confirm",cancelLabel:s="Cancel",tone:l="default",withReason:a=!1,reasonPlaceholder:o="Reason…",onConfirm:u,onClose:d}){const[h,p]=N.useState(""),g=N.useRef(null),m=N.useRef(null);return kp(m,e),N.useEffect(()=>{if(!e)return;p("");const w=window.setTimeout(()=>{var S;a&&((S=g.current)==null||S.focus())},50),j=S=>{S.key==="Escape"&&(S.preventDefault(),d())};return window.addEventListener("keydown",j),()=>{window.clearTimeout(w),window.removeEventListener("keydown",j)}},[e,d,a]),e?i.jsx("div",{className:"modal-scrim",onClick:d,children:i.jsxs("div",{ref:m,className:"modal",role:"dialog","aria-modal":"true","aria-labelledby":"confirm-title",onClick:w=>w.stopPropagation(),tabIndex:-1,children:[i.jsx("div",{className:"modal-head",children:i.jsx("div",{id:"confirm-title",className:"modal-title",children:t})}),i.jsxs("div",{className:"modal-body",children:[n,a&&i.jsx("textarea",{ref:g,rows:3,placeholder:o,value:h,onChange:w=>p(w.target.value)})]}),i.jsxs("div",{className:"modal-foot",children:[i.jsx("button",{className:"btn ghost",onClick:d,children:s}),i.jsx("button",{className:l==="danger"?"btn danger":"btn primary",onClick:()=>u(a&&h.trim()||void 0),children:r})]})]})}):null}function bu({row:e,focused:t,onOpen:n}){const r=dp(e),s=e.event_type==="observation",l=e.status==="pending"&&e.decision==="pending",a=e.tool_name==="write_file"&&!e.rolled_back&&r==="ok"&&!e.approved_by,o=mp(),u=vp(),d=gp(),[h,p]=N.useState(null),g=Nl(e),m=e.tool_name==="bash"?cp(e):"",w=e.target_path,j=e.tool_name==="bash"?i.jsx("span",{className:"intent-path mono",children:m.length>80?m.slice(0,78)+"…":m}):i.jsxs("span",{className:"intent-path",children:[i.jsx("span",{className:"dim",children:Sl(w).replace(ra(w),"")}),ra(w)]}),S=s?i.jsx("span",{className:"policy-chip obs",children:"plan-mode"}):e.decision==="block"?i.jsx("span",{className:"policy-chip block",title:e.policy_reason??void 0,children:"blocked"}):e.status==="rejected"||e.decision==="rejected"?i.jsx("span",{className:"policy-chip block",title:e.rejected_reason??void 0,children:"rejected"}):e.decision==="pending"?i.jsx("span",{className:"policy-chip pending",title:e.policy_reason??void 0,children:"approval"}):e.approved_by?i.jsx("span",{className:"policy-chip allow",title:`by ${e.approved_by}`,children:"approved"}):e.rolled_back?i.jsx("span",{className:"policy-chip",children:"rolled back"}):e.matched_rule?i.jsx("span",{className:"policy-chip allow",title:e.matched_rule,children:"allowed"}):null;return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:`action-row${t?" focused":""}${s?" obs":""}`,"data-state":r,children:[i.jsx("div",{className:"row-rail"}),i.jsxs("button",{type:"button",className:"action-row-open",onClick:()=>n(e),"aria-label":`${g} — ${r}. Open detail.`,children:[i.jsx("span",{className:"row-time",children:ct(e.created_at)}),i.jsxs("span",{className:"tool-tag","data-tool":e.tool_name,children:[i.jsx("span",{className:"tdot"}),e.tool_name]}),i.jsxs("span",{className:"row-intent",children:[i.jsx("span",{className:"intent-line",children:g}),i.jsxs("span",{className:"intent-sub",children:[j,S]})]}),i.jsxs("span",{className:"status-tag","data-s":r==="ok"?"success":r,children:[i.jsx("span",{className:"sdot"}),r==="ok"?"success":r]})]}),i.jsxs("div",{className:"row-actions",children:[l&&i.jsxs(i.Fragment,{children:[i.jsxs("button",{className:"btn ok",onClick:c=>{o.mutate(e.action_id)},disabled:o.isPending,children:[i.jsx(A,{name:"check",size:12}),"Approve"]}),i.jsxs("button",{className:"btn danger",onClick:c=>{p("reject")},disabled:u.isPending,children:[i.jsx(A,{name:"x",size:12}),"Reject"]})]}),a&&i.jsxs("button",{className:"btn ghost",onClick:c=>{c.stopPropagation(),p("rollback")},disabled:d.isPending,children:[i.jsx(A,{name:"rollback",size:12}),"Rollback"]})]})]}),i.jsx(Ue,{open:h==="reject",title:"Reject this action?",body:i.jsx("span",{children:g}),withReason:!0,reasonPlaceholder:"Why reject?",confirmLabel:"Reject",tone:"danger",onClose:()=>p(null),onConfirm:c=>{u.mutate({id:e.action_id,reason:c||"Not approved"}),p(null)}}),i.jsx(Ue,{open:h==="rollback",title:"Roll back this write?",body:i.jsxs("span",{children:["Restore ",ra(w)," to its before-snapshot."]}),confirmLabel:"Roll back",onClose:()=>p(null),onConfirm:()=>{d.mutate(e.action_id),p(null)}})]})}function s0({group:e,focusedId:t,onOpen:n}){const[r,s]=N.useState(e.live),l=(e.agent||"??").split(/\s+/).map(a=>a[0]).slice(0,2).join("").toUpperCase();return i.jsxs("section",{className:`session-group ${r?"":"collapsed"} ${e.live?"live":""}`,children:[i.jsxs("button",{className:"session-header",onClick:()=>s(a=>!a),"aria-expanded":r,style:{background:"transparent",width:"100%"},children:[i.jsx("div",{className:"session-chevron","aria-hidden":!0,children:i.jsx(A,{name:"chevron",size:14})}),i.jsx("div",{className:"session-avatar","aria-hidden":!0,children:l}),i.jsxs("div",{className:"session-summary",children:[i.jsxs("div",{className:"session-summary-top",children:[i.jsx("span",{children:e.summary}),e.live&&i.jsx("span",{className:"session-live-tag",children:"live"})]}),i.jsxs("div",{className:"session-summary-bottom",children:[e.agent,e.model?` · ${e.model}`:""," · session ",i.jsx("code",{children:e.session_id})," · ",ct(e.rows[0].created_at)]})]}),i.jsxs("div",{className:"session-stats",children:[i.jsxs("span",{className:"stat",children:[i.jsx("strong",{children:e.total})," actions"]}),i.jsxs("span",{className:"stat",children:[i.jsx("strong",{children:e.writes})," writes"]}),e.pending>0&&i.jsxs("span",{className:"stat warn",children:[i.jsx("strong",{children:e.pending})," pending"]}),e.errors>0&&i.jsxs("span",{className:"stat err",children:[i.jsx("strong",{children:e.errors})," errors"]})]})]}),i.jsx("div",{className:"session-body",children:e.rows.map(a=>i.jsx(bu,{row:a,focused:a.action_id===t,onOpen:n},a.action_id))})]})}function Cp({action:e,onClose:t}){const n=mp(),r=vp(),s=gp(),[l,a]=N.useState(null),o=N.useRef(null);if(kp(o,!!e&&!l),N.useEffect(()=>{if(!e)return;const c=f=>{f.key==="Escape"&&!l&&t()};return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[e,l,t]),!e)return null;const u=dp(e),d=e.status==="pending"&&e.decision==="pending",h=e.tool_name==="write_file",p=h&&!e.rolled_back&&u==="ok"&&!e.approved_by,g=Eu(e),m=h?qy(e.before_snapshot,e.after_snapshot):[],w=()=>n.mutate(e.action_id,{onSuccess:t}),j=c=>{r.mutate({id:e.action_id,reason:c||"Not approved"},{onSuccess:t}),a(null)},S=()=>{s.mutate(e.action_id,{onSuccess:t}),a(null)};return i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"scrim",onClick:t,"aria-hidden":!0}),i.jsxs("aside",{ref:o,className:"drawer",role:"dialog","aria-modal":"true","aria-labelledby":"drawer-title",tabIndex:-1,children:[i.jsxs("div",{className:"drawer-head",children:[i.jsxs("div",{children:[i.jsx("div",{id:"drawer-title",className:"drawer-head-title",children:Nl(e)}),i.jsxs("div",{className:"drawer-head-sub",children:[e.tool_name," · ",e.action_id]})]}),i.jsx("button",{className:"drawer-close",onClick:t,"aria-label":"Close detail",children:i.jsx(A,{name:"x",size:16})})]}),i.jsxs("div",{className:"drawer-body",children:[i.jsxs("section",{className:"drawer-section",children:[i.jsx("div",{className:"drawer-section-title",children:"Overview"}),i.jsxs("dl",{className:"kv-grid",children:[i.jsx("dt",{children:"session"}),i.jsx("dd",{children:e.session_id}),i.jsx("dt",{children:"status"}),i.jsx("dd",{children:e.status}),i.jsx("dt",{children:"decision"}),i.jsx("dd",{children:e.decision||"—"}),e.matched_rule&&i.jsxs(i.Fragment,{children:[i.jsx("dt",{children:"matched rule"}),i.jsx("dd",{children:e.matched_rule})]}),e.policy_reason&&i.jsxs(i.Fragment,{children:[i.jsx("dt",{children:"reason"}),i.jsx("dd",{children:e.policy_reason})]}),e.approved_by&&i.jsxs(i.Fragment,{children:[i.jsx("dt",{children:"approved by"}),i.jsx("dd",{children:e.approved_by})]}),e.rejected_reason&&i.jsxs(i.Fragment,{children:[i.jsx("dt",{children:"rejected"}),i.jsx("dd",{children:e.rejected_reason})]}),i.jsx("dt",{children:"created"}),i.jsx("dd",{children:e.created_at}),e.target_path&&i.jsxs(i.Fragment,{children:[i.jsx("dt",{children:"target"}),i.jsx("dd",{children:e.target_path})]})]})]}),e.tool_name==="bash"&&i.jsxs("section",{className:"drawer-section",children:[i.jsx("div",{className:"drawer-section-title",children:"Command"}),i.jsx("pre",{className:"code-block",children:cp(e)})]}),h&&m.length>0&&i.jsxs("section",{className:"drawer-section",children:[i.jsx("div",{className:"drawer-section-title",children:"Diff"}),i.jsxs("div",{className:"diff",children:[i.jsxs("div",{className:"diff-hdr",children:[i.jsx("div",{children:"before"}),i.jsx("div",{children:"after"})]}),i.jsxs("div",{className:"diff-body",children:[i.jsx("pre",{children:m.map((c,f)=>i.jsxs("span",{className:c.t==="eq"||c.t==="add"?"":"del",children:[c.l,`
85
+ */var Cl=N,bx=Rx;function Tx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ix=typeof Object.is=="function"?Object.is:Tx,Ox=bx.useSyncExternalStore,Mx=Cl.useRef,Lx=Cl.useEffect,Fx=Cl.useMemo,Ax=Cl.useDebugValue;jp.useSyncExternalStoreWithSelector=function(e,t,n,r,s){var l=Mx(null);if(l.current===null){var a={hasValue:!1,value:null};l.current=a}else a=l.current;l=Fx(function(){function u(m){if(!d){if(d=!0,h=m,m=r(m),s!==void 0&&a.hasValue){var w=a.value;if(s(w,m))return p=w}return p=m}if(w=p,Ix(h,m))return w;var j=r(m);return s!==void 0&&s(w,j)?(h=m,w):(h=m,p=j)}var d=!1,h,p,g=n===void 0?null:n;return[function(){return u(t())},g===null?void 0:function(){return u(g())}]},[t,n,r,s]);var o=Ox(e,l[0],l[1]);return Lx(function(){a.hasValue=!0,a.value=o},[o]),Ax(o),o};xp.exports=jp;var zx=xp.exports;const Dx=_d(zx),Np={},{useDebugValue:Ux}=zd,{useSyncExternalStoreWithSelector:$x}=Dx;let ud=!1;const Bx=e=>e;function Qx(e,t=Bx,n){(Np?"production":void 0)!=="production"&&n&&!ud&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),ud=!0);const r=$x(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return Ux(r),r}const Wx=e=>{(Np?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?xx(e):e,n=(r,s)=>Qx(t,r,s);return Object.assign(n,t),n},Hx=e=>Wx,Kx={};function qx(e,t){let n;try{n=e()}catch{return}return{getItem:s=>{var l;const a=u=>u===null?null:JSON.parse(u,void 0),o=(l=n.getItem(s))!=null?l:null;return o instanceof Promise?o.then(a):a(o)},setItem:(s,l)=>n.setItem(s,JSON.stringify(l,void 0)),removeItem:s=>n.removeItem(s)}}const Ms=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return Ms(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Ms(r)(n)}}}},Vx=(e,t)=>(n,r,s)=>{let l={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:S=>S,version:0,merge:(S,c)=>({...c,...S}),...t},a=!1;const o=new Set,u=new Set;let d;try{d=l.getStorage()}catch{}if(!d)return e((...S)=>{console.warn(`[zustand persist middleware] Unable to update item '${l.name}', the given storage is currently unavailable.`),n(...S)},r,s);const h=Ms(l.serialize),p=()=>{const S=l.partialize({...r()});let c;const f=h({state:S,version:l.version}).then(v=>d.setItem(l.name,v)).catch(v=>{c=v});if(c)throw c;return f},g=s.setState;s.setState=(S,c)=>{g(S,c),p()};const m=e((...S)=>{n(...S),p()},r,s);let w;const j=()=>{var S;if(!d)return;a=!1,o.forEach(f=>f(r()));const c=((S=l.onRehydrateStorage)==null?void 0:S.call(l,r()))||void 0;return Ms(d.getItem.bind(d))(l.name).then(f=>{if(f)return l.deserialize(f)}).then(f=>{if(f)if(typeof f.version=="number"&&f.version!==l.version){if(l.migrate)return l.migrate(f.state,f.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return f.state}).then(f=>{var v;return w=l.merge(f,(v=r())!=null?v:m),n(w,!0),p()}).then(()=>{c==null||c(w,void 0),a=!0,u.forEach(f=>f(w))}).catch(f=>{c==null||c(void 0,f)})};return s.persist={setOptions:S=>{l={...l,...S},S.getStorage&&(d=S.getStorage())},clearStorage:()=>{d==null||d.removeItem(l.name)},getOptions:()=>l,rehydrate:()=>j(),hasHydrated:()=>a,onHydrate:S=>(o.add(S),()=>{o.delete(S)}),onFinishHydration:S=>(u.add(S),()=>{u.delete(S)})},j(),w||m},Gx=(e,t)=>(n,r,s)=>{let l={storage:qx(()=>localStorage),partialize:j=>j,version:0,merge:(j,S)=>({...S,...j}),...t},a=!1;const o=new Set,u=new Set;let d=l.storage;if(!d)return e((...j)=>{console.warn(`[zustand persist middleware] Unable to update item '${l.name}', the given storage is currently unavailable.`),n(...j)},r,s);const h=()=>{const j=l.partialize({...r()});return d.setItem(l.name,{state:j,version:l.version})},p=s.setState;s.setState=(j,S)=>{p(j,S),h()};const g=e((...j)=>{n(...j),h()},r,s);s.getInitialState=()=>g;let m;const w=()=>{var j,S;if(!d)return;a=!1,o.forEach(f=>{var v;return f((v=r())!=null?v:g)});const c=((S=l.onRehydrateStorage)==null?void 0:S.call(l,(j=r())!=null?j:g))||void 0;return Ms(d.getItem.bind(d))(l.name).then(f=>{if(f)if(typeof f.version=="number"&&f.version!==l.version){if(l.migrate)return[!0,l.migrate(f.state,f.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,f.state];return[!1,void 0]}).then(f=>{var v;const[y,k]=f;if(m=l.merge(k,(v=r())!=null?v:g),n(m,!0),y)return h()}).then(()=>{c==null||c(m,void 0),m=r(),a=!0,u.forEach(f=>f(m))}).catch(f=>{c==null||c(void 0,f)})};return s.persist={setOptions:j=>{l={...l,...j},j.storage&&(d=j.storage)},clearStorage:()=>{d==null||d.removeItem(l.name)},getOptions:()=>l,rehydrate:()=>w(),hasHydrated:()=>a,onHydrate:j=>(o.add(j),()=>{o.delete(j)}),onFinishHydration:j=>(u.add(j),()=>{u.delete(j)})},l.skipHydration||w(),m||g},Jx=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((Kx?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),Vx(e,t)):Gx(e,t),Yx=Jx,zt=Hx()(Yx(e=>({theme:"dark",density:"comfy",grouping:"session",accent:"teal",filter:"all",search:"",selectedActionId:null,reviewerId:"ui-reviewer",setTheme:t=>e({theme:t}),setDensity:t=>e({density:t}),setGrouping:t=>e({grouping:t}),setAccent:t=>e({accent:t}),setFilter:t=>e({filter:t}),setSearch:t=>e({search:t}),setSelectedActionId:t=>e({selectedActionId:t}),setReviewerId:t=>e({reviewerId:t.trim()||"ui-reviewer"})}),{name:"waymark:ui",partialize:e=>({theme:e.theme,density:e.density,grouping:e.grouping,accent:e.accent,reviewerId:e.reviewerId})})),Ls={teal:{c:"oklch(0.72 0.09 195)",ring:"oklch(0.72 0.09 195 / 0.28)"},blue:{c:"oklch(0.72 0.1 240)",ring:"oklch(0.72 0.1 240 / 0.28)"},green:{c:"oklch(0.76 0.14 155)",ring:"oklch(0.76 0.14 155 / 0.28)"},amber:{c:"oklch(0.82 0.13 75)",ring:"oklch(0.82 0.13 75 / 0.28)"},violet:{c:"oklch(0.72 0.14 300)",ring:"oklch(0.72 0.14 300 / 0.28)"}};function Xx({open:e,onClose:t}){const n=ju(),r=le(),{data:s=[]}=Qr(),{theme:l,density:a,setTheme:o,setDensity:u,setSelectedActionId:d}=zt(),[h,p]=N.useState(""),[g,m]=N.useState(0),w=N.useRef(null),j=N.useRef(null),S=N.useMemo(()=>{const y=[{id:"go-actions",label:"Go to Actions",icon:"actions",group:"Navigation",run:()=>n("/")},{id:"go-sessions",label:"Go to Sessions",icon:"sessions",group:"Navigation",run:()=>n("/sessions")},{id:"go-approvals",label:"Go to Approvals",icon:"approvals",group:"Navigation",run:()=>n("/approvals")},{id:"go-policy",label:"Go to Policy",icon:"policy",group:"Navigation",run:()=>n("/policy")},{id:"go-stats",label:"Go to Stats",icon:"stats",group:"Navigation",run:()=>n("/stats")},{id:"go-settings",label:"Go to Settings",icon:"settings",group:"Navigation",run:()=>n("/settings")}],k=[{id:"toggle-theme",label:`Switch to ${l==="dark"?"light":"dark"} theme`,icon:l==="dark"?"sun":"moon",group:"Commands",keywords:"theme dark light mode",run:()=>o(l==="dark"?"light":"dark")},{id:"cycle-density",label:`Density: cycle to ${a==="compact"?"comfy":a==="comfy"?"spacious":"compact"}`,icon:"sliders",group:"Commands",keywords:"density compact comfy spacious",run:()=>u(a==="compact"?"comfy":a==="comfy"?"spacious":"compact")},{id:"refresh-all",label:"Refresh all data",hint:"Invalidates every query",icon:"rollback",group:"Commands",keywords:"reload refetch sync",run:()=>r.invalidateQueries()}],E=s.slice(0,100).map(C=>({id:`action:${C.action_id}`,label:Nl(C),hint:C.target_path??C.action_id,icon:C.tool_name==="bash"?"command":C.tool_name==="read_file"?"eye":"doc",group:"Actions",keywords:`${C.tool_name} ${C.action_id} ${C.session_id} ${C.status} ${C.target_path??""}`,run:()=>{n("/"),d(C.action_id)}}));return[...y,...k,...E]},[l,a,s,n,r,o,u,d]),c=N.useMemo(()=>{const y=h.trim().toLowerCase();return y?S.filter(k=>k.label.toLowerCase().includes(y)||(k.hint??"").toLowerCase().includes(y)||(k.keywords??"").toLowerCase().includes(y)).slice(0,30):S.slice(0,12)},[S,h]);if(N.useEffect(()=>{m(0)},[h]),N.useEffect(()=>{g>=c.length&&m(Math.max(0,c.length-1))},[c,g]),N.useEffect(()=>{if(!e)return;const y=document.activeElement;p(""),m(0);const k=window.setTimeout(()=>{var E;return(E=w.current)==null?void 0:E.focus()},30);return()=>{var E;window.clearTimeout(k),(E=y==null?void 0:y.focus)==null||E.call(y)}},[e]),N.useEffect(()=>{if(!j.current)return;const y=j.current.querySelector(`[data-pidx="${g}"]`);y==null||y.scrollIntoView({block:"nearest"})},[g]),!e)return null;const f=y=>{var k;y.key==="ArrowDown"?(y.preventDefault(),m(E=>Math.min(c.length-1,E+1))):y.key==="ArrowUp"?(y.preventDefault(),m(E=>Math.max(0,E-1))):y.key==="Enter"?(y.preventDefault(),(k=c[g])==null||k.run(),t()):y.key==="Escape"&&(y.preventDefault(),t())},v=c.reduce((y,k,E)=>{var C;return(y[C=k.group]??(y[C]=[])).push({item:k,idx:E}),y},{});return i.jsx("div",{className:"palette-scrim",role:"dialog","aria-modal":"true","aria-label":"Command palette",onClick:t,children:i.jsxs("div",{className:"palette",onClick:y=>y.stopPropagation(),children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"0 14px",borderBottom:"1px solid var(--line)"},children:[i.jsx(L,{name:"search",size:14,style:{color:"var(--ink-3)"}}),i.jsx("input",{ref:w,value:h,onChange:y=>p(y.target.value),onKeyDown:f,placeholder:"Type to navigate, search actions, or run a command…","aria-label":"Command input",style:{borderBottom:"none",padding:"14px 0"}}),i.jsx("span",{className:"kbd",children:"esc"})]}),i.jsx("div",{className:"palette-list",ref:j,children:c.length===0?i.jsx("div",{style:{padding:24,textAlign:"center",color:"var(--ink-3)"},children:"No matches."}):Object.entries(v).map(([y,k])=>i.jsxs("div",{children:[i.jsx("div",{style:{padding:"8px 18px 4px",fontSize:10.5,textTransform:"uppercase",letterSpacing:"0.08em",color:"var(--ink-4)"},children:y}),k.map(({item:E,idx:C})=>i.jsxs("button",{"data-pidx":C,className:J("palette-item",C===g&&"on"),onMouseEnter:()=>m(C),onClick:()=>{E.run(),t()},style:{width:"100%",textAlign:"left"},children:[i.jsx(L,{name:E.icon,size:14,style:{color:"var(--ink-3)",flexShrink:0}}),i.jsx("span",{style:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:E.label}),E.hint&&i.jsx("span",{className:"muted mono",style:{fontSize:11,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:280},children:E.hint})]},E.id))]},y))}),i.jsxs("div",{style:{display:"flex",gap:12,padding:"8px 14px",borderTop:"1px solid var(--line)",fontSize:10.5,color:"var(--ink-3)"},children:[i.jsxs("span",{children:[i.jsx("span",{className:"kbd",children:"↑↓"})," navigate"]}),i.jsxs("span",{children:[i.jsx("span",{className:"kbd",children:"↵"})," select"]}),i.jsxs("span",{style:{marginLeft:"auto"},children:[i.jsx("span",{className:"kbd",children:"⌘K"})," open"]})]})]})})}function Zx({children:e,topbar:t}){const{theme:n,density:r,accent:s}=zt(),{data:l=[],isError:a}=Qr(),{data:o=[]}=Jy(),{data:u=[]}=mp(),{data:d=[]}=vp(),{data:h}=_u(),{data:p={}}=Pu(),{data:g}=vx({status:"active"}),[m,w]=N.useState(!1);N.useEffect(()=>{const C=_=>{(_.metaKey||_.ctrlKey)&&_.key.toLowerCase()==="k"&&(_.preventDefault(),w(!0))};return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)},[]),N.useEffect(()=>{document.documentElement.dataset.theme=n,document.documentElement.dataset.density=r;const{c:C,ring:_}=Ls[s];document.documentElement.style.setProperty("--acc",C),document.documentElement.style.setProperty("--acc-dim",_)},[n,r,s]);const j=l.filter(C=>C.status==="pending").length,S=u.length+d.length,c=S>0||j>0,f=S+j,v=(g==null?void 0:g.count)??0,y=Object.keys(p).length,k=y>1,E=N.useMemo(()=>{const C=[{id:"/",label:"Actions",icon:"actions",count:l.length},{id:"/sessions",label:"Sessions",icon:"sessions",count:o.length},{id:"/approvals",label:"Approvals",icon:"approvals",count:f,attn:c},{id:"/policy",label:"Policy",icon:"policy"},{id:"/stats",label:"Stats",icon:"stats"},{id:"/agents",label:"Agents",icon:"agent",count:v>0?v:void 0}];return k&&C.push({id:"/hub",label:"Hub",icon:"folder",count:y}),C},[l.length,o.length,f,c,v,k,y]);return i.jsxs("div",{className:"app",children:[i.jsxs("aside",{className:"nav",children:[i.jsxs("div",{className:"brand",children:[i.jsx("div",{className:"brand-mark","aria-hidden":!0,children:"W"}),i.jsxs("div",{children:[i.jsx("div",{className:"brand-name",children:"waymark"}),i.jsx("div",{className:"brand-sub",children:"agent action viewer"})]})]}),i.jsxs("div",{children:[i.jsx("div",{className:"nav-section-label",children:"Workspace"}),i.jsx("ul",{className:"nav-list",children:E.map(C=>i.jsx("li",{children:i.jsxs(io,{to:C.id,end:!0,className:({isActive:_})=>J("nav-item",_&&"active"),children:[i.jsx(L,{name:C.icon,className:"nav-icon"}),i.jsx("span",{className:"nav-label",children:C.label}),C.count!==void 0&&i.jsx("span",{className:J("nav-count",C.attn&&"attn"),children:C.count})]})},C.id))})]}),i.jsxs("div",{children:[i.jsx("div",{className:"nav-section-label",children:"Project"}),i.jsx("ul",{className:"nav-list",children:i.jsx("li",{children:i.jsxs(io,{to:"/settings",className:({isActive:C})=>J("nav-item",C&&"active"),children:[i.jsx(L,{name:"settings",className:"nav-icon"}),i.jsx("span",{className:"nav-label",children:"Settings"})]})})})]}),i.jsx("div",{className:"nav-footer",children:i.jsxs("div",{className:"server-row",children:[i.jsx("span",{className:J("status-dot",a&&"off"),"aria-hidden":!0}),i.jsx("span",{children:a?"API unreachable":"MCP server live"}),i.jsx("span",{className:"server-port",title:(h==null?void 0:h.projectRoot)??void 0,children:h!=null&&h.port?`:${h.port}`:"—"})]})})]}),i.jsxs("div",{className:"main",children:[i.jsx(e0,{onOpenPalette:()=>w(!0),children:t}),i.jsx("main",{className:"page",children:e})]}),i.jsx(Xx,{open:m,onClose:()=>w(!1)})]})}function e0({children:e,onOpenPalette:t}){const{search:n,setSearch:r}=zt(),s=Gn(),l=s.pathname==="/"?"Actions":s.pathname.slice(1).split("/")[0]||"Actions";return i.jsxs("header",{className:"topbar",children:[i.jsxs("div",{className:"crumbs",children:[i.jsx("span",{className:"crumb current",children:l.charAt(0).toUpperCase()+l.slice(1)}),i.jsx("span",{className:"crumb-sep",children:"·"}),i.jsx("span",{className:"crumb",children:"live"})]}),i.jsxs("div",{className:"search",children:[i.jsx(L,{name:"search",size:14}),i.jsx("input",{id:"wm-search",placeholder:"Filter the current view…",value:n,onChange:a=>r(a.target.value),"aria-label":"Filter"})]}),i.jsxs("button",{className:"btn ghost",onClick:t,"aria-label":"Open command palette",style:{display:"inline-flex",alignItems:"center",gap:6},children:[i.jsx(L,{name:"command",size:12}),"Commands",i.jsx("span",{className:"kbd",children:"⌘K"})]}),i.jsx("div",{className:"topbar-right",children:e})]})}function t0(){const[e,t]=N.useState(!1),n=N.useRef(null),{theme:r,density:s,grouping:l,accent:a,reviewerId:o,setTheme:u,setDensity:d,setGrouping:h,setAccent:p,setReviewerId:g}=zt();return N.useEffect(()=>{if(!e)return;const m=j=>{var S;(S=n.current)!=null&&S.contains(j.target)||t(!1)},w=j=>{j.key==="Escape"&&t(!1)};return window.addEventListener("mousedown",m),window.addEventListener("keydown",w),()=>{window.removeEventListener("mousedown",m),window.removeEventListener("keydown",w)}},[e]),i.jsxs("div",{ref:n,style:{position:"relative"},children:[i.jsx("button",{className:"icon-btn","aria-label":"Preferences","aria-expanded":e,onClick:()=>t(m=>!m),children:i.jsx(L,{name:"sliders",size:16})}),e&&i.jsxs("div",{className:"tweaks",role:"dialog","aria-label":"Preferences",children:[i.jsx("h4",{children:"Appearance"}),i.jsx(Xr,{label:"Theme",children:i.jsx(ia,{options:["dark","light"],value:r,onChange:u})}),i.jsx(Xr,{label:"Density",children:i.jsx(ia,{options:["compact","comfy","spacious"],value:s,onChange:d})}),i.jsx(Xr,{label:"Grouping",children:i.jsx(ia,{options:["session","flat"],value:l,onChange:h})}),i.jsx(Xr,{label:"Accent",children:i.jsx("div",{className:"accent-swatches",children:Object.keys(Ls).map(m=>i.jsx("button",{className:J("accent-swatch",a===m&&"on"),style:{background:Ls[m].c},"aria-label":`Accent ${m}`,onClick:()=>p(m)},m))})}),i.jsx("h4",{style:{marginTop:12},children:"Identity"}),i.jsx(Xr,{label:"Reviewer ID",children:i.jsx("input",{type:"text",className:"tweak-input",value:o,placeholder:"ui-reviewer",onChange:m=>g(m.target.value)})})]})]})}function Xr({label:e,children:t}){return i.jsxs("div",{className:"tweak-row",children:[i.jsx("label",{children:e}),t]})}function ia({options:e,value:t,onChange:n}){return i.jsx("div",{className:"tweak-group",role:"group",children:e.map(r=>i.jsx("button",{className:J(t===r&&"on"),onClick:()=>n(r),type:"button",children:r},r))})}const cd={actions:[["actions"],["stats"]],sessions:[["sessions"],["actions"]],approvals:[["approvals"],["actions"]],escalations:[["escalations"],["approvals"]],team:[["team"]],"approval-routes":[["approval-routes"]],"escalation-rules":[["escalation-rules"]],config:[["config"]]};function n0(){const e=le();N.useEffect(()=>{if(typeof EventSource>"u")return;let t=null,n=null,r=!1;const s=()=>{t=new EventSource("/api/events");const l=a=>()=>{for(const o of cd[a])e.invalidateQueries({queryKey:[...o]})};Object.keys(cd).forEach(a=>t==null?void 0:t.addEventListener(a,l(a))),t.onerror=()=>{t==null||t.close(),t=null,!r&&(n=window.setTimeout(s,3e3))}};return s(),()=>{r=!0,n!==null&&window.clearTimeout(n),t==null||t.close()}},[e])}const r0=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");function dd(e){return Array.from(e.querySelectorAll(r0)).filter(t=>{if(t.hasAttribute("disabled")||t.getAttribute("aria-hidden")==="true")return!1;const n=t.getBoundingClientRect();return n.width>0||n.height>0})}function kp(e,t){N.useEffect(()=>{if(!t)return;const n=e.current;if(!n)return;const r=document.activeElement;(dd(n)[0]??n).focus();const l=a=>{if(a.key!=="Tab")return;const o=dd(n);if(o.length===0){a.preventDefault(),n.focus();return}const u=o[0],d=o[o.length-1],h=document.activeElement;a.shiftKey&&h===u?(a.preventDefault(),d.focus()):!a.shiftKey&&h===d&&(a.preventDefault(),u.focus())};return n.addEventListener("keydown",l),()=>{var a;n.removeEventListener("keydown",l),(a=r==null?void 0:r.focus)==null||a.call(r)}},[t,e])}function Ee({open:e,title:t,body:n,confirmLabel:r="Confirm",cancelLabel:s="Cancel",tone:l="default",withReason:a=!1,reasonPlaceholder:o="Reason…",onConfirm:u,onClose:d}){const[h,p]=N.useState(""),g=N.useRef(null),m=N.useRef(null);return kp(m,e),N.useEffect(()=>{if(!e)return;p("");const w=window.setTimeout(()=>{var S;a&&((S=g.current)==null||S.focus())},50),j=S=>{S.key==="Escape"&&(S.preventDefault(),d())};return window.addEventListener("keydown",j),()=>{window.clearTimeout(w),window.removeEventListener("keydown",j)}},[e,d,a]),e?i.jsx("div",{className:"modal-scrim",onClick:d,children:i.jsxs("div",{ref:m,className:"modal",role:"dialog","aria-modal":"true","aria-labelledby":"confirm-title",onClick:w=>w.stopPropagation(),tabIndex:-1,children:[i.jsx("div",{className:"modal-head",children:i.jsx("div",{id:"confirm-title",className:"modal-title",children:t})}),i.jsxs("div",{className:"modal-body",children:[n,a&&i.jsx("textarea",{ref:g,rows:3,placeholder:o,value:h,onChange:w=>p(w.target.value)})]}),i.jsxs("div",{className:"modal-foot",children:[i.jsx("button",{className:"btn ghost",onClick:d,children:s}),i.jsx("button",{className:l==="danger"?"btn danger":"btn primary",onClick:()=>u(a&&h.trim()||void 0),children:r})]})]})}):null}function Iu({row:e,focused:t,onOpen:n}){const r=hp(e),s=e.event_type==="observation",l=e.status==="pending"&&e.decision==="pending",a=e.tool_name==="write_file"&&!e.rolled_back&&r==="ok"&&!e.approved_by,o=bu(),u=Tu(),d=gp(),[h,p]=N.useState(null),g=Nl(e),m=e.tool_name==="bash"?fp(e):"",w=e.target_path,j=e.tool_name==="bash"?i.jsx("span",{className:"intent-path mono",children:m.length>80?m.slice(0,78)+"…":m}):i.jsxs("span",{className:"intent-path",children:[i.jsx("span",{className:"dim",children:Sl(w).replace(ra(w),"")}),ra(w)]}),S=s?i.jsx("span",{className:"policy-chip obs",children:"plan-mode"}):e.decision==="block"?i.jsx("span",{className:"policy-chip block",title:e.policy_reason??void 0,children:"blocked"}):e.status==="rejected"||e.decision==="rejected"?i.jsx("span",{className:"policy-chip block",title:e.rejected_reason??void 0,children:"rejected"}):e.decision==="pending"?i.jsx("span",{className:"policy-chip pending",title:e.policy_reason??void 0,children:"approval"}):e.approved_by?i.jsx("span",{className:"policy-chip allow",title:`by ${e.approved_by}`,children:"approved"}):e.rolled_back?i.jsx("span",{className:"policy-chip",children:"rolled back"}):e.matched_rule?i.jsx("span",{className:"policy-chip allow",title:e.matched_rule,children:"allowed"}):null;return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:`action-row${t?" focused":""}${s?" obs":""}`,"data-state":r,children:[i.jsx("div",{className:"row-rail"}),i.jsxs("button",{type:"button",className:"action-row-open",onClick:()=>n(e),"aria-label":`${g} — ${r}. Open detail.`,children:[i.jsx("span",{className:"row-time",children:nt(e.created_at)}),i.jsxs("span",{className:"tool-tag","data-tool":e.tool_name,children:[i.jsx("span",{className:"tdot"}),e.tool_name]}),i.jsxs("span",{className:"row-intent",children:[i.jsx("span",{className:"intent-line",children:g}),i.jsxs("span",{className:"intent-sub",children:[j,S]})]}),i.jsxs("span",{className:"status-tag","data-s":r==="ok"?"success":r,children:[i.jsx("span",{className:"sdot"}),r==="ok"?"success":r]})]}),i.jsxs("div",{className:"row-actions",children:[l&&i.jsxs(i.Fragment,{children:[i.jsxs("button",{className:"btn ok",onClick:c=>{o.mutate(e.action_id)},disabled:o.isPending,children:[i.jsx(L,{name:"check",size:12}),"Approve"]}),i.jsxs("button",{className:"btn danger",onClick:c=>{p("reject")},disabled:u.isPending,children:[i.jsx(L,{name:"x",size:12}),"Reject"]})]}),a&&i.jsxs("button",{className:"btn ghost",onClick:c=>{c.stopPropagation(),p("rollback")},disabled:d.isPending,children:[i.jsx(L,{name:"rollback",size:12}),"Rollback"]})]})]}),i.jsx(Ee,{open:h==="reject",title:"Reject this action?",body:i.jsx("span",{children:g}),withReason:!0,reasonPlaceholder:"Why reject?",confirmLabel:"Reject",tone:"danger",onClose:()=>p(null),onConfirm:c=>{u.mutate({id:e.action_id,reason:c||"Not approved"}),p(null)}}),i.jsx(Ee,{open:h==="rollback",title:"Roll back this write?",body:i.jsxs("span",{children:["Restore ",ra(w)," to its before-snapshot."]}),confirmLabel:"Roll back",onClose:()=>p(null),onConfirm:()=>{d.mutate(e.action_id),p(null)}})]})}function s0({group:e,focusedId:t,onOpen:n}){const[r,s]=N.useState(e.live),l=(e.agent||"??").split(/\s+/).map(a=>a[0]).slice(0,2).join("").toUpperCase();return i.jsxs("section",{className:`session-group ${r?"":"collapsed"} ${e.live?"live":""}`,children:[i.jsxs("button",{className:"session-header",onClick:()=>s(a=>!a),"aria-expanded":r,style:{background:"transparent",width:"100%"},children:[i.jsx("div",{className:"session-chevron","aria-hidden":!0,children:i.jsx(L,{name:"chevron",size:14})}),i.jsx("div",{className:"session-avatar","aria-hidden":!0,children:l}),i.jsxs("div",{className:"session-summary",children:[i.jsxs("div",{className:"session-summary-top",children:[i.jsx("span",{children:e.summary}),e.live&&i.jsx("span",{className:"session-live-tag",children:"live"})]}),i.jsxs("div",{className:"session-summary-bottom",children:[e.agent,e.model?` · ${e.model}`:""," · session ",i.jsx("code",{children:e.session_id})," · ",nt(e.rows[0].created_at)]})]}),i.jsxs("div",{className:"session-stats",children:[i.jsxs("span",{className:"stat",children:[i.jsx("strong",{children:e.total})," actions"]}),i.jsxs("span",{className:"stat",children:[i.jsx("strong",{children:e.writes})," writes"]}),e.pending>0&&i.jsxs("span",{className:"stat warn",children:[i.jsx("strong",{children:e.pending})," pending"]}),e.errors>0&&i.jsxs("span",{className:"stat err",children:[i.jsx("strong",{children:e.errors})," errors"]})]})]}),i.jsx("div",{className:"session-body",children:e.rows.map(a=>i.jsx(Iu,{row:a,focused:a.action_id===t,onOpen:n},a.action_id))})]})}function Cp({action:e,onClose:t}){const n=bu(),r=Tu(),s=gp(),[l,a]=N.useState(null),o=N.useRef(null);if(kp(o,!!e&&!l),N.useEffect(()=>{if(!e)return;const c=f=>{f.key==="Escape"&&!l&&t()};return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[e,l,t]),!e)return null;const u=hp(e),d=e.status==="pending"&&e.decision==="pending",h=e.tool_name==="write_file",p=h&&!e.rolled_back&&u==="ok"&&!e.approved_by,g=Eu(e),m=h?qy(e.before_snapshot,e.after_snapshot):[],w=()=>n.mutate(e.action_id,{onSuccess:t}),j=c=>{r.mutate({id:e.action_id,reason:c||"Not approved"},{onSuccess:t}),a(null)},S=()=>{s.mutate(e.action_id,{onSuccess:t}),a(null)};return i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"scrim",onClick:t,"aria-hidden":!0}),i.jsxs("aside",{ref:o,className:"drawer",role:"dialog","aria-modal":"true","aria-labelledby":"drawer-title",tabIndex:-1,children:[i.jsxs("div",{className:"drawer-head",children:[i.jsxs("div",{children:[i.jsx("div",{id:"drawer-title",className:"drawer-head-title",children:Nl(e)}),i.jsxs("div",{className:"drawer-head-sub",children:[e.tool_name," · ",e.action_id]})]}),i.jsx("button",{className:"drawer-close",onClick:t,"aria-label":"Close detail",children:i.jsx(L,{name:"x",size:16})})]}),i.jsxs("div",{className:"drawer-body",children:[i.jsxs("section",{className:"drawer-section",children:[i.jsx("div",{className:"drawer-section-title",children:"Overview"}),i.jsxs("dl",{className:"kv-grid",children:[i.jsx("dt",{children:"session"}),i.jsx("dd",{children:e.session_id}),i.jsx("dt",{children:"status"}),i.jsx("dd",{children:e.status}),i.jsx("dt",{children:"decision"}),i.jsx("dd",{children:e.decision||"—"}),e.matched_rule&&i.jsxs(i.Fragment,{children:[i.jsx("dt",{children:"matched rule"}),i.jsx("dd",{children:e.matched_rule})]}),e.policy_reason&&i.jsxs(i.Fragment,{children:[i.jsx("dt",{children:"reason"}),i.jsx("dd",{children:e.policy_reason})]}),e.approved_by&&i.jsxs(i.Fragment,{children:[i.jsx("dt",{children:"approved by"}),i.jsx("dd",{children:e.approved_by})]}),e.rejected_reason&&i.jsxs(i.Fragment,{children:[i.jsx("dt",{children:"rejected"}),i.jsx("dd",{children:e.rejected_reason})]}),i.jsx("dt",{children:"created"}),i.jsx("dd",{children:e.created_at}),e.target_path&&i.jsxs(i.Fragment,{children:[i.jsx("dt",{children:"target"}),i.jsx("dd",{children:e.target_path})]})]})]}),e.tool_name==="bash"&&i.jsxs("section",{className:"drawer-section",children:[i.jsx("div",{className:"drawer-section-title",children:"Command"}),i.jsx("pre",{className:"code-block",children:fp(e)})]}),h&&m.length>0&&i.jsxs("section",{className:"drawer-section",children:[i.jsx("div",{className:"drawer-section-title",children:"Diff"}),i.jsxs("div",{className:"diff",children:[i.jsxs("div",{className:"diff-hdr",children:[i.jsx("div",{children:"before"}),i.jsx("div",{children:"after"})]}),i.jsxs("div",{className:"diff-body",children:[i.jsx("pre",{children:m.map((c,f)=>i.jsxs("span",{className:c.t==="eq"||c.t==="add"?"":"del",children:[c.l,`
86
86
  `]},f))}),i.jsx("pre",{children:m.map((c,f)=>i.jsxs("span",{className:c.t==="eq"||c.t==="del"?"":"add",children:[c.r,`
87
- `]},f))})]})]})]}),i.jsxs("section",{className:"drawer-section",children:[i.jsx("div",{className:"drawer-section-title",children:"Payload"}),i.jsx("pre",{className:"code-block",children:JSON.stringify(g,null,2)})]}),e.stdout&&i.jsxs("section",{className:"drawer-section",children:[i.jsx("div",{className:"drawer-section-title",children:"Stdout"}),i.jsx("pre",{className:"code-block",children:e.stdout})]}),e.stderr&&i.jsxs("section",{className:"drawer-section",children:[i.jsx("div",{className:"drawer-section-title",children:"Stderr"}),i.jsx("pre",{className:"code-block",style:{color:"var(--err)"},children:e.stderr})]}),e.error_message&&i.jsxs("section",{className:"drawer-section",children:[i.jsx("div",{className:"drawer-section-title",children:"Error"}),i.jsx("pre",{className:"code-block",style:{color:"var(--err)"},children:e.error_message})]})]}),i.jsxs("div",{className:"drawer-foot",children:[d?i.jsxs(i.Fragment,{children:[i.jsxs("button",{className:"btn danger btn-lg",onClick:()=>a("reject"),disabled:r.isPending,children:[i.jsx(A,{name:"x",size:14}),"Reject"]}),i.jsxs("button",{className:"btn ok btn-lg",onClick:w,disabled:n.isPending,children:[i.jsx(A,{name:"check",size:14}),n.isPending?"Approving…":"Approve"]})]}):p?i.jsxs("button",{className:"btn btn-lg",onClick:()=>a("rollback"),disabled:s.isPending,children:[i.jsx(A,{name:"rollback",size:14}),"Rollback"]}):i.jsx("span",{className:"muted",children:"No actions available"}),i.jsx("div",{className:"spacer"}),i.jsx("button",{className:"btn",onClick:t,children:"Close"})]})]}),i.jsx(Ue,{open:l==="reject",title:"Reject this action?",body:i.jsx("span",{children:"The agent will see a rejection and stop. Add an optional reason so the log is clear."}),withReason:!0,reasonPlaceholder:"Why reject?",confirmLabel:"Reject",tone:"danger",onClose:()=>a(null),onConfirm:c=>j(c)}),i.jsx(Ue,{open:l==="rollback",title:"Roll back this write?",body:i.jsx("span",{children:"Waymark will restore the file to its before-snapshot. This cannot be undone."}),confirmLabel:"Roll back",onClose:()=>a(null),onConfirm:S})]})}const i0=["all","pending","blocked","errors","writes","bash"];function l0(){const{data:e=[],isLoading:t,isError:n,error:r}=Ws(),{filter:s,setFilter:l,search:a,grouping:o,selectedActionId:u,setSelectedActionId:d}=zt(),h=N.useMemo(()=>({all:e.length,pending:e.filter(c=>c.status==="pending").length,blocked:e.filter(c=>c.status==="blocked"||c.decision==="block").length,errors:e.filter(c=>c.status==="error").length,writes:e.filter(c=>c.tool_name==="write_file").length,bash:e.filter(c=>c.tool_name==="bash").length}),[e]),p=N.useMemo(()=>{const c=a.trim().toLowerCase();return e.filter(f=>!(s==="pending"&&f.status!=="pending"||s==="blocked"&&f.status!=="blocked"&&f.decision!=="block"||s==="errors"&&f.status!=="error"||s==="writes"&&f.tool_name!=="write_file"||s==="bash"&&f.tool_name!=="bash"||c&&![f.tool_name,f.target_path||"",f.intent||"",f.input_payload||""].join(" ").toLowerCase().includes(c)))},[e,s,a]),g=N.useMemo(()=>e.find(c=>c.action_id===u)??null,[e,u]),m=c=>d(c.action_id),w=()=>d(null),j=N.useMemo(()=>Ky(p),[p]),S=h.pending;return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"page-header",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"page-title",children:"Actions"}),i.jsx("p",{className:"page-sub",children:"Every MCP tool call intercepted by Waymark, with policy decision and full payload."})]}),i.jsxs("div",{className:"page-meta",children:[h.all>0&&i.jsxs("span",{children:[h.all," total"]}),S>0&&i.jsxs("span",{className:"live",style:{color:"var(--pending)"},children:[S," pending"]})]})]}),S>0&&i.jsxs("div",{className:"approval-banner",role:"status",children:[i.jsx("span",{className:"approval-banner-dot","aria-hidden":!0}),i.jsxs("div",{className:"approval-banner-text",children:[i.jsxs("div",{className:"approval-banner-title",children:[S," action",S===1?"":"s"," awaiting approval"]}),i.jsx("div",{className:"approval-banner-sub",children:"Agent is paused until you decide."})]}),i.jsx("button",{className:"btn primary",onClick:()=>l("pending"),children:"Review →"})]}),n&&i.jsxs("div",{className:"banner err",children:["Couldn't reach the Waymark API. ",r instanceof Error?r.message:""]}),i.jsx("div",{className:"pill-row",role:"tablist","aria-label":"Action filters",children:i0.map(c=>i.jsxs("button",{role:"tab","aria-selected":s===c,className:J("pill",s===c&&"active",c==="pending"&&S>0&&"attn"),onClick:()=>l(c),children:[c,i.jsx("span",{className:"pill-count",children:h[c]})]},c))}),t?i.jsx("div",{className:"card",children:i.jsx("div",{className:"card-body",style:{padding:0},children:Array.from({length:4}).map((c,f)=>i.jsxs("div",{style:{display:"flex",gap:14,padding:14,borderTop:f?"1px solid var(--line)":"none"},children:[i.jsx("div",{className:"skeleton",style:{width:54,height:14}}),i.jsx("div",{className:"skeleton",style:{width:90,height:18}}),i.jsx("div",{className:"skeleton",style:{flex:1,height:18}}),i.jsx("div",{className:"skeleton",style:{width:70,height:18}})]},f))})}):p.length===0?i.jsx(a0,{hasAny:e.length>0}):o==="session"?i.jsx("div",{children:j.map(c=>i.jsx(s0,{group:c,focusedId:u,onOpen:m},c.session_id))}):i.jsx("div",{className:"card",style:{padding:0},children:p.map(c=>i.jsx(bu,{row:c,focused:c.action_id===u,onOpen:m},c.action_id))}),i.jsx(Cp,{action:g,onClose:w})]})}function a0({hasAny:e}){return i.jsxs("div",{className:"empty",children:[i.jsx("div",{className:"empty-title",children:e?"No actions match.":"No actions yet."}),i.jsx("div",{className:"empty-sub",children:e?"Try a different filter or clear the search.":"Actions will appear here the moment an agent calls an MCP tool. Waymark intercepts every call, applies your policy, and logs it."}),!e&&i.jsx("div",{className:"empty-hint",children:"npx @way_marks/cli status"})]})}function o0(){const{data:e=[],isLoading:t,isError:n,error:r}=Ws(),{selectedActionId:s,setSelectedActionId:l}=zt(),[a,o]=N.useState(null),[u,d]=N.useState(null),h=Yy(),p=N.useMemo(()=>{const m=new Map;for(const S of e){const c=S.session_id||"unknown";m.has(c)||m.set(c,[]),m.get(c).push(S)}const w=Date.now(),j=[];for(const[S,c]of m.entries()){const f=y=>{var k;return((k=Lt(y.created_at))==null?void 0:k.getTime())??0};c.sort((y,k)=>f(k)-f(y));const v=f(c[0]);j.push({session_id:S,latest:v,live:w-v<5*60*1e3,total:c.length,pending:c.filter(y=>y.status==="pending").length,errors:c.filter(y=>y.status==="error"||y.status==="blocked"||y.status==="rejected").length,writes:c.filter(y=>y.tool_name==="write_file"&&!y.rolled_back).length,rolledBack:c.filter(y=>y.rolled_back).length,rows:c,started:c[c.length-1].created_at})}return j.sort((S,c)=>c.latest-S.latest),j},[e]),g=N.useMemo(()=>e.find(m=>m.action_id===s)??null,[e,s]);return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"page-header",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"page-title",children:"Sessions"}),i.jsx("p",{className:"page-sub",children:"One session = one agent process. Atomic rollback restores every action in a session to its before-snapshot."})]}),i.jsx("div",{className:"page-meta",children:p.length>0&&i.jsxs("span",{children:[p.length," session",p.length===1?"":"s"]})})]}),n&&i.jsxs("div",{className:"banner err",children:["Couldn't load sessions. ",r instanceof Error?r.message:""]}),t&&p.length===0?i.jsx("div",{className:"card",children:Array.from({length:2}).map((m,w)=>i.jsxs("div",{style:{padding:18,borderTop:w?"1px solid var(--line)":"none"},children:[i.jsx("div",{className:"skeleton",style:{width:"40%",height:14,marginBottom:8}}),i.jsx("div",{className:"skeleton",style:{width:"80%",height:10}})]},w))}):p.length===0?i.jsxs("div",{className:"empty",children:[i.jsx("div",{className:"empty-title",children:"No sessions yet."}),i.jsx("div",{className:"empty-sub",children:"A session starts when an agent first calls an MCP tool."})]}):i.jsx("div",{style:{display:"flex",flexDirection:"column",gap:14},children:p.map(m=>{const w=a===m.session_id,j=m.writes>0&&m.rolledBack<m.total;return i.jsxs("article",{className:J("card",m.live&&"live-card"),style:m.live?{borderColor:"oklch(0.74 0.13 155 / 0.35)"}:void 0,children:[i.jsxs("header",{className:"card-header",style:{flexWrap:"wrap",gap:14},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,minWidth:0,flex:1},children:[i.jsx("div",{className:"session-avatar",children:m.session_id.slice(0,2).toUpperCase()}),i.jsxs("div",{style:{minWidth:0},children:[i.jsxs("div",{className:"card-title",style:{display:"flex",gap:10,alignItems:"baseline"},children:[i.jsx("code",{children:m.session_id}),m.live&&i.jsx("span",{className:"session-live-tag",children:"live"})]}),i.jsxs("div",{className:"card-sub mono",style:{marginTop:2},children:[m.total," actions · started ",ct(m.started)," · latest ",ct(new Date(m.latest).toISOString())]})]})]}),i.jsxs("div",{className:"session-stats",style:{flexShrink:0},children:[i.jsxs("span",{className:"stat",children:[i.jsx("strong",{children:m.total})," actions"]}),i.jsxs("span",{className:"stat",children:[i.jsx("strong",{children:m.writes})," writes"]}),m.pending>0&&i.jsxs("span",{className:"stat warn",children:[i.jsx("strong",{children:m.pending})," pending"]}),m.errors>0&&i.jsxs("span",{className:"stat err",children:[i.jsx("strong",{children:m.errors})," errors"]}),m.rolledBack>0&&i.jsxs("span",{className:"stat",children:[i.jsx("strong",{children:m.rolledBack})," reverted"]})]}),i.jsxs("div",{style:{display:"flex",gap:6,flexShrink:0},children:[i.jsxs("button",{className:"btn",onClick:()=>o(w?null:m.session_id),"aria-expanded":w,children:[i.jsx(A,{name:"chevron",size:12,style:{transform:w?"rotate(180deg)":"none",transition:"transform 0.15s"}}),w?"Hide actions":"Show actions"]}),i.jsxs("button",{className:"btn danger",disabled:!j||h.isPending,onClick:()=>d(m.session_id),children:[i.jsx(A,{name:"rollback",size:12}),"Rollback"]})]})]}),w&&i.jsx("div",{className:"card-body flush",children:m.rows.map(S=>i.jsx(bu,{row:S,focused:S.action_id===s,onOpen:c=>l(c.action_id)},S.action_id))})]},m.session_id)})}),i.jsx(Ue,{open:u!==null,title:"Roll back entire session?",body:i.jsx("span",{children:"Every write in this session will be restored to its before-snapshot. Reads and bash commands are ignored. This cannot be undone."}),confirmLabel:"Roll back session",tone:"danger",onClose:()=>d(null),onConfirm:()=>{u&&h.mutate(u),d(null)}}),i.jsx(Cp,{action:g,onClose:()=>l(null)})]})}function u0(){const{data:e=[],isLoading:t,isError:n}=hp(),{data:r=[],isLoading:s,isError:l}=pp(),[a,o]=N.useState("pending"),u=e.length+r.length,d=a==="pending"&&e.length===0&&r.length>0?"escalated":a;return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"page-header",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"page-title",children:"Approvals"}),i.jsx("p",{className:"page-sub",children:"Reviewer inbox for actions held by policy. Pending requests are held on the triggering agent; escalated requests timed out and were routed to a backup reviewer."})]}),i.jsx("div",{className:"page-meta",children:u>0?i.jsxs("span",{className:"live",style:{color:"var(--pending)"},children:[u," awaiting"]}):i.jsx("span",{children:"All clear"})})]}),(n||l)&&i.jsx("div",{className:"banner err",children:"Couldn't load the approvals queue. Retrying…"}),i.jsxs("div",{className:"pill-row",role:"tablist","aria-label":"Approval queues",children:[i.jsx(la,{id:"pending",label:"Pending",count:e.length,current:d,onClick:o,attn:!0}),i.jsx(la,{id:"escalated",label:"Escalated",count:r.length,current:d,onClick:o,attn:!0}),i.jsx(la,{id:"history",label:"History",count:void 0,current:d,onClick:o})]}),d==="pending"&&(t&&e.length===0?i.jsx(cd,{}):e.length===0?i.jsx(aa,{icon:"check",title:"Inbox zero.",sub:"No approvals awaiting decision."}):i.jsx("div",{className:"queue",children:e.map(h=>i.jsx(c0,{req:h},h.request_id))})),d==="escalated"&&(s&&r.length===0?i.jsx(cd,{}):r.length===0?i.jsx(aa,{icon:"check",title:"No escalations.",sub:"Requests that time out will surface here."}):i.jsx("div",{className:"queue",children:r.map(h=>i.jsx(d0,{req:h},h.request_id))})),d==="history"&&i.jsx(aa,{icon:"doc",title:"History view coming soon.",sub:"Once a session is selected we'll show the full approval + escalation history here. For now, use the Sessions tab."})]})}function la({id:e,label:t,count:n,current:r,onClick:s,attn:l=!1}){const a=r===e;return i.jsxs("button",{role:"tab","aria-selected":a,className:J("pill",a&&"active",l&&n!==void 0&&n>0&&"attn"),onClick:()=>s(e),children:[t,n!==void 0&&i.jsx("span",{className:"pill-count",children:n})]})}function cd(){return i.jsx("div",{className:"queue",children:Array.from({length:2}).map((e,t)=>i.jsxs("div",{className:"card",style:{padding:18,display:"flex",flexDirection:"column",gap:10},children:[i.jsx("div",{className:"skeleton",style:{width:"60%",height:14}}),i.jsx("div",{className:"skeleton",style:{width:"40%",height:10}}),i.jsx("div",{className:"skeleton",style:{width:"100%",height:38}})]},t))})}function aa({icon:e,title:t,sub:n}){return i.jsxs("div",{className:"empty",children:[i.jsx("div",{style:{display:"grid",placeItems:"center",marginBottom:8},children:i.jsx(A,{name:e,size:24})}),i.jsx("div",{className:"empty-title",children:t}),i.jsx("div",{className:"empty-sub",children:n})]})}function Ep(e){if(!e)return[];try{const t=JSON.parse(e);return Array.isArray(t)?t.map(String):[]}catch{return[]}}function c0({req:e}){const t=zt(o=>o.reviewerId),n=Xy(t),r=Zy(t),s=Ep(e.approver_ids),[l,a]=N.useState(null);return i.jsxs(i.Fragment,{children:[i.jsxs("article",{className:"queue-card card",children:[i.jsxs("div",{className:"card-body",style:{display:"flex",flexDirection:"column",gap:10},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,flexWrap:"wrap"},children:[i.jsx("span",{className:"policy-chip pending",children:"awaiting approval"}),i.jsxs("span",{className:"mono muted",style:{fontSize:11},children:["route ",e.route_id]}),i.jsx("span",{className:"mono muted",style:{fontSize:11,marginLeft:"auto"},children:ct(e.triggered_at)})]}),i.jsxs("div",{style:{display:"flex",alignItems:"baseline",gap:10,flexWrap:"wrap"},children:[i.jsxs("div",{className:"card-title",children:["Session ",i.jsx("code",{children:e.session_id})]}),i.jsxs("div",{className:"mono muted",style:{fontSize:12},children:["triggered by ",e.triggered_by]})]}),i.jsxs("dl",{className:"kv-grid",children:[i.jsx("dt",{children:"approvers"}),i.jsx("dd",{children:s.length?s.join(", "):"any"}),i.jsx("dt",{children:"votes"}),i.jsxs("dd",{children:[e.approved_count," approve · ",e.rejected_count," reject"]}),i.jsx("dt",{children:"request"}),i.jsx("dd",{children:e.request_id})]})]}),i.jsxs("footer",{className:"drawer-foot",style:{borderTop:"1px solid var(--line)"},children:[i.jsxs("button",{className:"btn danger",onClick:()=>a("reject"),disabled:r.isPending,children:[i.jsx(A,{name:"x",size:12})," Reject"]}),i.jsx("div",{className:"spacer"}),i.jsxs("button",{className:"btn primary",onClick:()=>a("approve"),disabled:n.isPending,children:[i.jsx(A,{name:"check",size:12})," Approve"]})]})]}),i.jsx(Ue,{open:l==="approve",title:"Approve this request?",body:i.jsxs("span",{children:["You are approving as ",i.jsx("strong",{children:t}),"."]}),withReason:!0,reasonPlaceholder:"Optional note",confirmLabel:"Approve",onClose:()=>a(null),onConfirm:o=>{n.mutate({requestId:e.request_id,reason:o}),a(null)}}),i.jsx(Ue,{open:l==="reject",title:"Reject this request?",body:i.jsx("span",{children:"The agent will see a rejection and stop."}),withReason:!0,reasonPlaceholder:"Why reject?",confirmLabel:"Reject",tone:"danger",onClose:()=>a(null),onConfirm:o=>{r.mutate({requestId:e.request_id,reason:o}),a(null)}})]})}function d0({req:e}){const t=zt(u=>u.reviewerId),n=Ep(e.escalation_targets),r=n.includes(t)?t:n[0]??t,s=px(r),[l,a]=N.useState(null),o=N.useMemo(()=>{const u=Lt(e.escalation_deadline);if(!u)return null;const d=u.getTime()-Date.now(),h=Math.round(d/6e4);return h<=0?{label:"deadline passed",overdue:!0}:h<60?{label:`deadline in ${h}m`,overdue:!1}:{label:`deadline in ${Math.round(h/60)}h`,overdue:!1}},[e.escalation_deadline]);return i.jsxs(i.Fragment,{children:[i.jsxs("article",{className:"queue-card card",children:[i.jsxs("div",{className:"card-body",style:{display:"flex",flexDirection:"column",gap:10},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,flexWrap:"wrap"},children:[i.jsx("span",{className:"policy-chip block",title:"Escalated",children:"escalated"}),o&&i.jsx("span",{className:"mono",style:{fontSize:11,color:o.overdue?"var(--err)":"var(--pending)"},children:o.label}),i.jsxs("span",{className:"mono muted",style:{fontSize:11,marginLeft:"auto"},children:["triggered ",ct(e.escalation_triggered_at)]})]}),i.jsxs("div",{style:{display:"flex",alignItems:"baseline",gap:10,flexWrap:"wrap"},children:[i.jsxs("div",{className:"card-title",children:["Session ",i.jsx("code",{children:e.session_id})]}),i.jsxs("div",{className:"mono muted",style:{fontSize:12},children:["from approval ",e.approval_request_id]})]}),i.jsxs("dl",{className:"kv-grid",children:[i.jsx("dt",{children:"targets"}),i.jsx("dd",{children:n.length?n.join(", "):"—"}),i.jsx("dt",{children:"deadline"}),i.jsx("dd",{children:e.escalation_deadline}),i.jsx("dt",{children:"request"}),i.jsx("dd",{children:e.request_id})]})]}),i.jsxs("footer",{className:"drawer-foot",style:{borderTop:"1px solid var(--line)"},children:[i.jsxs("button",{className:"btn danger",onClick:()=>a("block"),disabled:s.isPending,children:[i.jsx(A,{name:"x",size:12})," Block"]}),i.jsx("div",{className:"spacer"}),i.jsxs("button",{className:"btn primary",onClick:()=>a("proceed"),disabled:s.isPending,children:[i.jsx(A,{name:"check",size:12})," Allow to proceed"]})]})]}),i.jsx(Ue,{open:l==="proceed",title:"Allow this request to proceed?",body:i.jsxs("span",{children:["Agent will be unblocked as ",i.jsx("strong",{children:r}),"."]}),withReason:!0,reasonPlaceholder:"Optional note",confirmLabel:"Allow",onClose:()=>a(null),onConfirm:u=>{s.mutate({requestId:e.request_id,decision:"proceed",reason:u}),a(null)}}),i.jsx(Ue,{open:l==="block",title:"Block this request?",body:i.jsx("span",{children:"Agent will be denied and the session will remain paused."}),withReason:!0,reasonPlaceholder:"Why block?",confirmLabel:"Block",tone:"danger",onClose:()=>a(null),onConfirm:u=>{s.mutate({requestId:e.request_id,decision:"block",reason:u}),a(null)}})]})}function f0(){const{data:e,isLoading:t,isError:n,error:r}=Gy(),s=(e==null?void 0:e.policies)??{allowedPaths:[],blockedPaths:[],requireApproval:[],blockedCommands:[],maxBashOutputBytes:0};return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"page-header",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"page-title",children:"Policy"}),i.jsxs("p",{className:"page-sub",children:["Policies are read fresh on every tool call — edits to ",i.jsx("code",{className:"mono",children:"waymark.config.json"})," ","take effect immediately, with no restart required."]})]}),i.jsxs("div",{className:"page-meta",children:[(e==null?void 0:e.version)&&i.jsxs("span",{children:["version ",e.version]}),typeof s.maxBashOutputBytes=="number"&&i.jsxs("span",{children:["max stdout ",s.maxBashOutputBytes.toLocaleString()," bytes"]})]})]}),n&&i.jsxs("div",{className:"banner err",children:["Couldn't load policy. ",r instanceof Error?r.message:""]}),t&&!e?i.jsx(p0,{}):i.jsxs("div",{className:"policy-grid",children:[i.jsx(hi,{tone:"ok",iconName:"shield",title:"Allowed paths",description:"Agents may read and write files matching these globs.",rules:s.allowedPaths??[],kind:"path",emptyLabel:"No explicit allow list — default deny."}),i.jsx(hi,{tone:"err",iconName:"x",title:"Blocked paths",description:"Denied unconditionally. Checked before allowedPaths.",rules:s.blockedPaths??[],kind:"path",emptyLabel:"No blocked paths."}),i.jsx(hi,{tone:"pending",iconName:"bell",title:"Requires approval",description:"Writes here go pending until a reviewer decides.",rules:s.requireApproval??[],kind:"path",emptyLabel:"No paths require approval."}),i.jsx(hi,{tone:"err",iconName:"command",title:"Blocked commands",description:"Bash rules. Plain = substring match. Regex = i-flag JS regex.",rules:s.blockedCommands??[],kind:"command",emptyLabel:"No blocked commands."})]})]})}function hi({tone:e,iconName:t,title:n,description:r,rules:s,kind:l,emptyLabel:a}){const o=e==="ok"?"var(--ok)":e==="err"?"var(--err)":"var(--pending)";return i.jsxs("article",{className:"policy-card",children:[i.jsxs("div",{className:"policy-card-title",style:{display:"flex",alignItems:"center",gap:8,marginBottom:6},children:[i.jsx(A,{name:t,size:14,style:{color:o}}),i.jsx("span",{children:n}),i.jsx("span",{className:"chip mono",style:{marginLeft:"auto",color:"var(--ink-3)"},children:s.length})]}),i.jsx("p",{style:{fontSize:12,color:"var(--ink-3)",marginBottom:10},children:r}),s.length===0?i.jsx("div",{className:"muted mono",style:{fontSize:11.5},children:a}):i.jsx("ul",{style:{listStyle:"none"},children:s.map(u=>i.jsx(h0,{rule:u,kind:l},u))})]})}function h0({rule:e,kind:t}){const n=t==="command"&&e.startsWith("regex:"),r=n?e.slice(6):e,s=t==="path"?"glob":n?"regex":"plain";return i.jsxs("li",{className:"policy-rule",children:[i.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r}),i.jsx("span",{className:"tag",children:s})]})}function p0(){return i.jsx("div",{className:"policy-grid",children:Array.from({length:4}).map((e,t)=>i.jsxs("div",{className:"policy-card",children:[i.jsx("div",{className:"skeleton",style:{width:"40%",height:14,marginBottom:10}}),i.jsx("div",{className:"skeleton",style:{width:"90%",height:10,marginBottom:14}}),i.jsx("div",{className:"skeleton",style:{width:"70%",height:10,marginBottom:6}}),i.jsx("div",{className:"skeleton",style:{width:"60%",height:10,marginBottom:6}}),i.jsx("div",{className:"skeleton",style:{width:"80%",height:10}})]},t))})}const oa=30,dd=10*60*1e3;function m0(){const{data:e,isLoading:t,isError:n,error:r}=mx(),{data:s=[]}=Ws(),l=N.useMemo(()=>{const u=Date.now(),d=u-oa*dd,h=Array.from({length:oa},()=>({total:0,errors:0,blocked:0}));for(const p of s){const g=Lt(p.created_at);if(!g)continue;const m=g.getTime();if(m<d||m>u)continue;const w=Math.min(oa-1,Math.floor((m-d)/dd));h[w].total+=1,p.status==="error"&&(h[w].errors+=1),(p.status==="blocked"||p.decision==="block")&&(h[w].blocked+=1)}return h},[s]),a=l.reduce((u,d)=>u+d.total,0),o=l.reduce((u,d)=>u+d.errors+d.blocked,0);return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"page-header",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"page-title",children:"Stats"}),i.jsx("p",{className:"page-sub",children:"Activity across all sessions. Sparkline groups the last 5 hours into 10-minute buckets."})]}),i.jsxs("div",{className:"page-meta",children:[e&&i.jsxs("span",{children:[e.totalActions," total"]}),e&&i.jsxs("span",{children:[e.todayCount," today"]})]})]}),n&&i.jsxs("div",{className:"banner err",children:["Couldn't load stats. ",r instanceof Error?r.message:""]}),t&&!e?i.jsx(x0,{}):e?i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"stat-grid",children:[i.jsx(pi,{label:"Total actions",value:e.totalActions,sub:`${e.thisWeekCount} this week`}),i.jsx(pi,{label:"Pending",value:e.pendingCount,tone:e.pendingCount>0?"pending":void 0,sub:e.pendingCount>0?"agent paused":"all clear"}),i.jsx(pi,{label:"Rejected",value:e.rejectedCount,tone:e.rejectedCount>0?"err":void 0,sub:"this lifetime"}),i.jsx(pi,{label:"Approved",value:e.approvedCount,tone:e.approvedCount>0?"ok":void 0,sub:`${e.todayCount} today`})]}),i.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1.3fr 1fr",gap:14,marginBottom:18},children:[i.jsxs("section",{className:"card",children:[i.jsx("header",{className:"card-header",children:i.jsxs("div",{children:[i.jsx("div",{className:"card-title",children:"Activity"}),i.jsxs("div",{className:"card-sub",children:["Last 5 hours · ",a," action",a===1?"":"s",o>0&&`, ${o} red`]})]})}),i.jsxs("div",{className:"card-body",children:[i.jsx(v0,{buckets:l}),i.jsxs("div",{style:{display:"flex",justifyContent:"space-between",color:"var(--ink-3)",fontSize:10,fontFamily:"var(--font-mono)",marginTop:6},children:[i.jsx("span",{children:"5h ago"}),i.jsx("span",{children:"now"})]})]})]}),i.jsxs("section",{className:"card",children:[i.jsx("header",{className:"card-header",children:i.jsxs("div",{children:[i.jsx("div",{className:"card-title",children:"By tool"}),i.jsx("div",{className:"card-sub",children:"Top 5 tools across all sessions"})]})}),i.jsx("div",{className:"card-body",children:i.jsx(y0,{rows:e.topTools})})]})]}),i.jsxs("section",{className:"card",children:[i.jsx("header",{className:"card-header",children:i.jsxs("div",{children:[i.jsx("div",{className:"card-title",children:"Hot paths"}),i.jsx("div",{className:"card-sub",children:"Most frequently touched files"})]})}),i.jsx("div",{className:"card-body",children:e.topPaths.length===0?i.jsx("div",{className:"muted",children:"No path data yet."}):i.jsx("ul",{className:"list",style:{margin:"-6px -18px -18px"},children:e.topPaths.map(u=>i.jsxs("li",{children:[i.jsx(A,{name:"doc",size:14,style:{color:"var(--ink-3)"}}),i.jsx("span",{className:"mono",style:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:Sl(u.path,5)}),i.jsxs("span",{className:"mono muted",style:{fontSize:12},children:[u.count,"×"]})]},u.path))})})]})]}):null]})}function pi({label:e,value:t,sub:n,tone:r}){const s=r==="ok"?"var(--ok)":r==="err"?"var(--err)":r==="pending"?"var(--pending)":void 0;return i.jsxs("div",{className:"stat-card",children:[i.jsx("div",{className:"stat-label",children:e}),i.jsx("div",{className:"stat-value",style:{color:s},children:t}),i.jsx("div",{className:"stat-delta",children:n})]})}function v0({buckets:e}){const n=Math.max(1,...e.map(s=>s.total)),r=100/e.length;return i.jsx("svg",{className:"spark",style:{height:80,width:"100%"},viewBox:"0 0 100 80",preserveAspectRatio:"none",children:e.map((s,l)=>{const a=s.total/n*74,o=s.errors+s.blocked>0;return i.jsx("rect",{x:l*r+.3,y:80-a-2,width:Math.max(.5,r-.6),height:Math.max(1,a),rx:.6,fill:o?"var(--err)":"var(--acc)",opacity:o?.88:.55},l)})})}const g0={write_file:"doc",read_file:"eye",delete_file:"trash",bash:"command",copilot:"command"};function y0({rows:e}){if(e.length===0)return i.jsx("div",{className:"muted",children:"No tool usage yet."});const t=Math.max(...e.map(n=>n.count));return i.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:e.map(n=>{const r=g0[n.tool]??"command";return i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,fontSize:12},children:[i.jsxs("span",{className:"tool-tag","data-tool":n.tool,style:{minWidth:110},children:[i.jsx("span",{className:"tdot"}),i.jsx(A,{name:r,size:11}),n.tool]}),i.jsx("div",{style:{flex:1,height:8,background:"var(--bg-2)",borderRadius:3,overflow:"hidden"},children:i.jsx("div",{style:{width:`${n.count/t*100}%`,height:"100%",background:"var(--acc)",opacity:.7}})}),i.jsx("span",{className:"mono muted",style:{fontSize:11,width:32,textAlign:"right"},children:n.count})]},n.tool)})})}function x0(){return i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"stat-grid",children:Array.from({length:4}).map((e,t)=>i.jsxs("div",{className:"stat-card",children:[i.jsx("div",{className:"skeleton",style:{width:"50%",height:10,marginBottom:10}}),i.jsx("div",{className:"skeleton",style:{width:"30%",height:24,marginBottom:10}}),i.jsx("div",{className:"skeleton",style:{width:"70%",height:10}})]},t))}),i.jsx("div",{className:"card",style:{padding:18},children:i.jsx("div",{className:"skeleton",style:{width:"100%",height:80}})})]})}function j0({port:e,enabled:t}){const{data:n,isLoading:r,isError:s}=ux(e,t);if(!t)return i.jsx(fd,{label:"—",sub:"not running"});if(r&&!n)return i.jsx("div",{className:"skeleton",style:{width:110,height:30,borderRadius:6}});if(s||!n)return i.jsx(fd,{label:"—",sub:"unreachable",tone:"err"});const l=n.totalActions??0,a=n.pendingCount??0;return i.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center",fontSize:11.5,fontFamily:"var(--font-mono)"},children:[i.jsxs("span",{children:[i.jsx("strong",{style:{color:"var(--ink-1)"},children:l})," ",i.jsx("span",{className:"muted",children:"actions"})]}),a>0&&i.jsxs("span",{style:{color:"var(--pending)"},children:[i.jsx("strong",{children:a})," pending"]})]})}function fd({label:e,sub:t,tone:n}){return i.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-end",minWidth:90},children:[i.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:13,color:n==="err"?"var(--err)":"var(--ink-2)"},children:e}),t&&i.jsx("span",{className:"muted",style:{fontSize:10.5},children:t})]})}function w0(){const{data:e={},isLoading:t,isError:n,error:r}=_u(),{data:s}=Pu(),l=N.useMemo(()=>{const h=Object.values(e);return h.sort((p,g)=>{var c,f;const m=v=>v==="running"?0:v==="paused"?1:2,w=m(p.status)-m(g.status);if(w!==0)return w;const j=p.startedAt?((c=Lt(p.startedAt))==null?void 0:c.getTime())??0:0;return(g.startedAt?((f=Lt(g.startedAt))==null?void 0:f.getTime())??0:0)-j}),h},[e]),a=N.useMemo(()=>({total:l.length,running:l.filter(h=>h.status==="running").length,paused:l.filter(h=>h.status==="paused").length,stopped:l.filter(h=>h.status==="stopped").length}),[l]),o=hx(),[u,d]=N.useState(!1);return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"page-header",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"page-title",children:"Hub"}),i.jsx("p",{className:"page-sub",children:"Every Waymark instance registered on this machine. Open one, pause the agent, or stop the server — without leaving the dashboard you're already in."})]}),i.jsxs("div",{className:"page-meta",children:[i.jsxs("span",{children:[a.total," project",a.total===1?"":"s"]}),a.running>0&&i.jsxs("span",{className:"live",style:{color:"var(--ok)"},children:[a.running," running"]}),a.paused>0&&i.jsxs("span",{style:{color:"var(--pending)"},children:[a.paused," paused"]}),a.stopped>0&&i.jsxs("span",{children:[a.stopped," stopped"]})]})]}),n&&i.jsxs("div",{className:"banner err",children:["Couldn't load hub. ",r instanceof Error?r.message:""]}),i.jsxs("div",{className:"toolbar",children:[i.jsx("span",{className:"muted",style:{fontSize:12},children:"Live counts probe each peer every 5 s. Stopped projects keep their entry for 7 days."}),i.jsx("div",{className:"toolbar-spacer"}),i.jsxs("button",{className:"btn ghost",onClick:()=>d(!0),disabled:o.isPending||a.stopped===0,title:a.stopped===0?"No stopped projects to clean up":"Garbage collect stopped projects > 7 days old",children:[i.jsx(A,{name:"trash",size:12})," Clean up stopped"]})]}),t&&l.length===0?i.jsx("div",{className:"card",children:i.jsx("div",{className:"card-body",children:i.jsx("div",{className:"skeleton",style:{height:64}})})}):l.length===0?i.jsxs("div",{className:"empty",children:[i.jsx("div",{className:"empty-title",children:"No projects registered."}),i.jsxs("div",{className:"empty-sub",children:["Run ",i.jsx("code",{children:"npx @way_marks/cli init"})," + ",i.jsx("code",{children:"start"})," in another project to see it here."]})]}):i.jsx("div",{style:{display:"flex",flexDirection:"column",gap:10},children:l.map(h=>i.jsx(S0,{project:h,isCurrent:(s==null?void 0:s.projectName)===h.projectName&&(s==null?void 0:s.port)===h.port},h.id))}),i.jsx(Ue,{open:u,title:"Garbage collect stopped projects?",body:i.jsx("span",{children:"Removes registry entries for projects that have been stopped for more than 7 days. Has no effect on running or paused projects."}),confirmLabel:"Clean up",onClose:()=>d(!1),onConfirm:()=>{o.mutate(),d(!1)}})]})}function S0({project:e,isCurrent:t}){var h;const n=cx(),r=dx(),s=fx(),[l,a]=N.useState(!1),o=`http://localhost:${e.port}`,u=e.status==="running",d=e.status==="paused";return i.jsxs(i.Fragment,{children:[i.jsx("article",{className:J("card",t&&"live-card"),style:t?{borderColor:"oklch(0.74 0.13 155 / 0.4)"}:void 0,children:i.jsxs("div",{className:"card-body",style:{display:"grid",gridTemplateColumns:"auto 1fr auto auto",gap:14,alignItems:"center"},children:[i.jsx("div",{className:J("status-dot",!u&&"off"),"aria-hidden":!0,style:{background:u?"var(--ok)":d?"var(--pending)":"var(--ink-4)",boxShadow:u?void 0:"none",animation:u?void 0:"none"}}),i.jsxs("div",{style:{minWidth:0},children:[i.jsxs("div",{style:{display:"flex",gap:10,alignItems:"baseline",flexWrap:"wrap"},children:[i.jsx("span",{className:"card-title",children:e.projectName}),t&&i.jsx("span",{className:"policy-chip allow",children:"this dashboard"}),i.jsxs("span",{className:"muted mono",style:{fontSize:11},children:[":",e.port]}),i.jsx("span",{className:"muted mono",style:{fontSize:11},children:e.status})]}),i.jsxs("div",{className:"card-sub mono",style:{marginTop:2},children:[Sl(e.projectRoot,5),e.startedAt&&i.jsxs(i.Fragment,{children:[" · started ",ct(((h=Lt(e.startedAt))==null?void 0:h.toISOString())??null)]}),e.user&&i.jsxs(i.Fragment,{children:[" · ",e.user,"@",e.hostname??"local"]})]})]}),i.jsx(j0,{port:e.port,enabled:u}),i.jsxs("div",{style:{display:"flex",gap:6,flexShrink:0},children:[i.jsxs("a",{className:"btn",href:o,target:"_blank",rel:"noreferrer noopener","aria-label":`Open ${e.projectName}`,children:[i.jsx(A,{name:"external",size:12})," Open"]}),u&&i.jsx("button",{className:"btn ghost",onClick:()=>n.mutate(e.id),disabled:n.isPending,children:"Pause"}),d&&i.jsx("button",{className:"btn ghost",onClick:()=>r.mutate(e.id),disabled:r.isPending,children:"Resume"}),(u||d)&&!t&&i.jsxs("button",{className:"btn danger",onClick:()=>a(!0),disabled:s.isPending,children:[i.jsx(A,{name:"x",size:12})," Stop"]})]})]})}),i.jsx(Ue,{open:l,title:`Stop ${e.projectName}?`,body:i.jsxs("span",{children:["Sends SIGTERM to its MCP and API processes, releases port :",e.port,", and marks the registry entry as stopped. The agent in that project will lose its Waymark guard until you restart it."]}),confirmLabel:"Stop",tone:"danger",onClose:()=>a(!1),onConfirm:()=>{s.mutate(e.id),a(!1)}})]})}function N0(){const{theme:e,density:t,grouping:n,accent:r,reviewerId:s,setTheme:l,setDensity:a,setGrouping:o,setAccent:u,setReviewerId:d}=zt(),[h,p]=N.useState(s),g=h.trim()!==s;return i.jsxs(i.Fragment,{children:[i.jsx("h2",{children:"Preferences"}),i.jsxs("section",{className:"card",children:[i.jsx("header",{className:"card-header",children:i.jsxs("div",{children:[i.jsx("div",{className:"card-title",children:"Reviewer identity"}),i.jsx("div",{className:"card-sub",children:"Used when approving, rejecting, or deciding escalations. Must match an approver id in the route or escalation target list for the server to accept the decision."})]})}),i.jsxs("div",{className:"card-body",children:[i.jsxs("div",{className:"field",style:{maxWidth:360},children:[i.jsx("label",{htmlFor:"reviewer-id",children:"Your reviewer id"}),i.jsx("input",{id:"reviewer-id",value:h,placeholder:"alice@waymark.dev",onChange:m=>p(m.target.value)}),i.jsxs("span",{className:"hint",children:["Stored in ",i.jsx("code",{children:"localStorage"})," only — nothing is sent until you act."]})]}),i.jsxs("div",{style:{display:"flex",gap:8,marginTop:14},children:[i.jsxs("button",{className:"btn primary",disabled:!g||!h.trim(),onClick:()=>d(h.trim()),children:[i.jsx(A,{name:"check",size:12})," Save"]}),i.jsx("button",{className:"btn ghost",disabled:!g,onClick:()=>p(s),children:"Reset"})]})]})]}),i.jsxs("section",{className:"card",children:[i.jsx("header",{className:"card-header",children:i.jsxs("div",{children:[i.jsx("div",{className:"card-title",children:"Appearance"}),i.jsx("div",{className:"card-sub",children:"Same controls as the Tweaks popover in the topbar. Preferences are saved per browser."})]})}),i.jsxs("div",{className:"card-body",style:{display:"grid",gap:12},children:[i.jsx(mi,{label:"Theme",children:i.jsx(ua,{options:["dark","light"],value:e,onChange:l})}),i.jsx(mi,{label:"Density",children:i.jsx(ua,{options:["compact","comfy","spacious"],value:t,onChange:a})}),i.jsx(mi,{label:"Grouping",children:i.jsx(ua,{options:["session","flat"],value:n,onChange:o})}),i.jsx(mi,{label:"Accent",children:i.jsx("div",{className:"accent-swatches",children:Object.keys(Is).map(m=>i.jsx("button",{className:J("accent-swatch",r===m&&"on"),style:{background:Is[m].c},"aria-label":`Accent ${m}`,onClick:()=>u(m)},m))})})]})]})]})}function mi({label:e,children:t}){return i.jsxs("div",{className:"tweak-row",style:{padding:"6px 0"},children:[i.jsx("label",{children:e}),t]})}function ua({options:e,value:t,onChange:n}){return i.jsx("div",{className:"tweak-group",role:"group",children:e.map(r=>i.jsx("button",{className:J(t===r&&"on"),onClick:()=>n(r),type:"button",children:r},r))})}function k0(){const{data:e=[],isLoading:t,isError:n,error:r}=Ru(),s=ex(),l=tx(),[a,o]=N.useState(""),[u,d]=N.useState(""),[h,p]=N.useState(""),[g,m]=N.useState(""),[w,j]=N.useState(null),S=()=>{o(""),d(""),p(""),m("")},c=f=>{f.preventDefault(),!(!a.trim()||!u.trim()||!h.trim())&&s.mutate({member_id:a.trim(),name:u.trim(),email:h.trim(),slack_id:g.trim()||void 0},{onSuccess:S})};return i.jsxs(i.Fragment,{children:[i.jsx("h2",{children:"Team"}),i.jsxs("section",{className:"card",children:[i.jsx("header",{className:"card-header",children:i.jsxs("div",{children:[i.jsx("div",{className:"card-title",children:"Add member"}),i.jsx("div",{className:"card-sub",children:"Members can be referenced from approval routes and escalation targets by their member id."})]})}),i.jsxs("form",{className:"card-body",onSubmit:c,children:[i.jsxs("div",{className:"form-grid",children:[i.jsxs("div",{className:"field",children:[i.jsx("label",{htmlFor:"m-id",children:"Member id"}),i.jsx("input",{id:"m-id",required:!0,value:a,onChange:f=>o(f.target.value),placeholder:"alice"})]}),i.jsxs("div",{className:"field",children:[i.jsx("label",{htmlFor:"m-name",children:"Name"}),i.jsx("input",{id:"m-name",required:!0,value:u,onChange:f=>d(f.target.value),placeholder:"Alice Wong"})]}),i.jsxs("div",{className:"field",children:[i.jsx("label",{htmlFor:"m-email",children:"Email"}),i.jsx("input",{id:"m-email",type:"email",required:!0,value:h,onChange:f=>p(f.target.value),placeholder:"alice@waymark.dev"})]}),i.jsxs("div",{className:"field",children:[i.jsx("label",{htmlFor:"m-slack",children:"Slack id (optional)"}),i.jsx("input",{id:"m-slack",value:g,onChange:f=>m(f.target.value),placeholder:"U01ABCD23"})]})]}),i.jsxs("div",{style:{display:"flex",gap:8,marginTop:14},children:[i.jsxs("button",{className:"btn primary",type:"submit",disabled:s.isPending,children:[i.jsx(A,{name:"plus",size:12})," ",s.isPending?"Adding…":"Add member"]}),i.jsx("button",{className:"btn ghost",type:"button",onClick:S,disabled:s.isPending,children:"Reset"})]})]})]}),i.jsxs("section",{className:"card",children:[i.jsx("header",{className:"card-header",children:i.jsxs("div",{children:[i.jsx("div",{className:"card-title",children:"Members"}),i.jsxs("div",{className:"card-sub",children:[e.length," active"]})]})}),n?i.jsxs("div",{className:"banner err",style:{margin:18},children:["Couldn't load team. ",r instanceof Error?r.message:""]}):t&&e.length===0?i.jsx(C0,{}):e.length===0?i.jsx(E0,{title:"No members yet.",sub:"Add at least one member before configuring approval routes."}):i.jsx("ul",{className:"list",children:e.map(f=>i.jsxs("li",{children:[i.jsxs("div",{style:{flex:1,minWidth:0},children:[i.jsxs("div",{className:"list-title",children:[f.name," ",i.jsxs("span",{className:"muted mono",style:{fontSize:11},children:["· ",f.member_id]})]}),i.jsxs("div",{className:"list-sub",children:[f.email,f.slack_id?` · slack ${f.slack_id}`:""," · added ",ct(f.added_at)]})]}),i.jsxs("button",{className:"btn ghost","aria-label":`Remove ${f.name}`,onClick:()=>j(f.member_id),disabled:l.isPending,children:[i.jsx(A,{name:"trash",size:12})," Remove"]})]},f.member_id))})]}),i.jsx(Ue,{open:w!==null,title:"Remove this team member?",body:i.jsx("span",{children:"They'll stop appearing in approval routes and escalation targets."}),confirmLabel:"Remove",tone:"danger",onClose:()=>j(null),onConfirm:()=>{w&&l.mutate(w),j(null)}})]})}function C0(){return i.jsx("ul",{className:"list",children:Array.from({length:3}).map((e,t)=>i.jsxs("li",{style:{display:"block"},children:[i.jsx("div",{className:"skeleton",style:{width:"40%",height:12,marginBottom:6}}),i.jsx("div",{className:"skeleton",style:{width:"70%",height:10}})]},t))})}function E0({title:e,sub:t}){return i.jsxs("div",{className:"empty",style:{margin:18},children:[i.jsx("div",{className:"empty-title",children:e}),i.jsx("div",{className:"empty-sub",children:t})]})}function P0(e){if(!e)return[];try{const t=JSON.parse(e);return Array.isArray(t)?t.map(String):[]}catch{return[]}}function _0(){const{data:e=[],isLoading:t,isError:n,error:r}=nx(),{data:s=[]}=Ru(),l=rx(),a=sx(),[o,u]=N.useState(""),[d,h]=N.useState(""),[p,g]=N.useState(""),[m,w]=N.useState(""),[j,S]=N.useState(null),c=()=>{u(""),h(""),g(""),w("")},f=v=>{v.preventDefault();const y=p.split(",").map(k=>k.trim()).filter(Boolean);!o.trim()||!d.trim()||y.length===0||l.mutate({route_id:o.trim(),name:d.trim(),approver_ids:y,description:m.trim()||void 0},{onSuccess:c})};return i.jsxs(i.Fragment,{children:[i.jsx("h2",{children:"Approval routes"}),i.jsxs("section",{className:"card",children:[i.jsx("header",{className:"card-header",children:i.jsxs("div",{children:[i.jsx("div",{className:"card-title",children:"Add route"}),i.jsxs("div",{className:"card-sub",children:["Approver ids must match members. ",s.length>0&&`Available: ${s.map(v=>v.member_id).join(", ")}`]})]})}),i.jsxs("form",{className:"card-body",onSubmit:f,children:[i.jsxs("div",{className:"form-grid",children:[i.jsxs("div",{className:"field",children:[i.jsx("label",{htmlFor:"r-id",children:"Route id"}),i.jsx("input",{id:"r-id",required:!0,value:o,onChange:v=>u(v.target.value),placeholder:"prod-write-route"})]}),i.jsxs("div",{className:"field",children:[i.jsx("label",{htmlFor:"r-name",children:"Name"}),i.jsx("input",{id:"r-name",required:!0,value:d,onChange:v=>h(v.target.value),placeholder:"Production writes"})]}),i.jsxs("div",{className:"field",style:{gridColumn:"1 / -1"},children:[i.jsx("label",{htmlFor:"r-approvers",children:"Approver ids"}),i.jsx("input",{id:"r-approvers",required:!0,value:p,onChange:v=>g(v.target.value),placeholder:"alice, bob"}),i.jsx("span",{className:"hint",children:"Comma-separated list of member ids."})]}),i.jsxs("div",{className:"field",style:{gridColumn:"1 / -1"},children:[i.jsx("label",{htmlFor:"r-desc",children:"Description (optional)"}),i.jsx("input",{id:"r-desc",value:m,onChange:v=>w(v.target.value),placeholder:"Two-person review for production writes"})]})]}),i.jsxs("div",{style:{display:"flex",gap:8,marginTop:14},children:[i.jsxs("button",{className:"btn primary",type:"submit",disabled:l.isPending,children:[i.jsx(A,{name:"plus",size:12})," ",l.isPending?"Adding…":"Add route"]}),i.jsx("button",{className:"btn ghost",type:"button",onClick:c,disabled:l.isPending,children:"Reset"})]})]})]}),i.jsxs("section",{className:"card",children:[i.jsx("header",{className:"card-header",children:i.jsxs("div",{children:[i.jsx("div",{className:"card-title",children:"Routes"}),i.jsxs("div",{className:"card-sub",children:[e.length," configured"]})]})}),n?i.jsxs("div",{className:"banner err",style:{margin:18},children:["Couldn't load routes. ",r instanceof Error?r.message:""]}):t&&e.length===0?i.jsx("div",{className:"card-body",children:i.jsx("div",{className:"skeleton",style:{height:36}})}):e.length===0?i.jsxs("div",{className:"empty",style:{margin:18},children:[i.jsx("div",{className:"empty-title",children:"No routes yet."}),i.jsx("div",{className:"empty-sub",children:"Add a route to control which approvers see which kind of write."})]}):i.jsx("ul",{className:"list",children:e.map(v=>{const y=P0(v.approver_ids);return i.jsxs("li",{children:[i.jsxs("div",{style:{flex:1,minWidth:0},children:[i.jsxs("div",{className:"list-title",children:[v.name," ",i.jsxs("span",{className:"muted mono",style:{fontSize:11},children:["· ",v.route_id]})]}),i.jsxs("div",{className:"list-sub",children:[y.length," approver",y.length===1?"":"s"," (",y.join(", "),") · ",v.required_approvers," required · added ",ct(v.created_at)]}),v.description&&i.jsx("div",{style:{color:"var(--ink-2)",fontSize:12,marginTop:4},children:v.description})]}),i.jsxs("button",{className:"btn ghost","aria-label":`Delete ${v.name}`,onClick:()=>S(v.route_id),disabled:a.isPending,children:[i.jsx(A,{name:"trash",size:12})," Delete"]})]},v.route_id)})})]}),i.jsx(Ue,{open:j!==null,title:"Delete this route?",body:i.jsx("span",{children:"Existing approval requests using this route will not be affected."}),confirmLabel:"Delete",tone:"danger",onClose:()=>S(null),onConfirm:()=>{j&&a.mutate(j),S(null)}})]})}function R0(e){if(!e)return[];try{const t=JSON.parse(e);return Array.isArray(t)?t.map(String):[]}catch{return[]}}function b0(){const{data:e=[],isLoading:t,isError:n,error:r}=ix(),{data:s=[]}=Ru(),l=lx(),a=ax(),[o,u]=N.useState(""),[d,h]=N.useState(""),[p,g]=N.useState(""),[m,w]=N.useState("24"),[j,S]=N.useState(""),[c,f]=N.useState(null),v=()=>{u(""),h(""),g(""),w("24"),S("")},y=k=>{k.preventDefault();const E=p.split(",").map(P=>P.trim()).filter(Boolean);if(!o.trim()||!d.trim()||E.length===0)return;const C=Number.parseInt(m,10);l.mutate({rule_id:o.trim(),name:d.trim(),escalation_targets:E,description:j.trim()||void 0,timeout_hours:Number.isFinite(C)?C:void 0},{onSuccess:v})};return i.jsxs(i.Fragment,{children:[i.jsx("h2",{children:"Escalation rules"}),i.jsxs("section",{className:"card",children:[i.jsx("header",{className:"card-header",children:i.jsxs("div",{children:[i.jsx("div",{className:"card-title",children:"Add rule"}),i.jsxs("div",{className:"card-sub",children:["When an approval request times out, it's routed to the listed targets.",s.length>0&&` Available: ${s.map(k=>k.member_id).join(", ")}`]})]})}),i.jsxs("form",{className:"card-body",onSubmit:y,children:[i.jsxs("div",{className:"form-grid",children:[i.jsxs("div",{className:"field",children:[i.jsx("label",{htmlFor:"e-id",children:"Rule id"}),i.jsx("input",{id:"e-id",required:!0,value:o,onChange:k=>u(k.target.value),placeholder:"security-escalation"})]}),i.jsxs("div",{className:"field",children:[i.jsx("label",{htmlFor:"e-name",children:"Name"}),i.jsx("input",{id:"e-name",required:!0,value:d,onChange:k=>h(k.target.value),placeholder:"Security lead override"})]}),i.jsxs("div",{className:"field",style:{gridColumn:"1 / -1"},children:[i.jsx("label",{htmlFor:"e-targets",children:"Targets"}),i.jsx("input",{id:"e-targets",required:!0,value:p,onChange:k=>g(k.target.value),placeholder:"security-lead, oncall"}),i.jsx("span",{className:"hint",children:"Comma-separated member ids."})]}),i.jsxs("div",{className:"field",children:[i.jsx("label",{htmlFor:"e-timeout",children:"Timeout (hours)"}),i.jsx("input",{id:"e-timeout",type:"number",min:1,value:m,onChange:k=>w(k.target.value)})]}),i.jsxs("div",{className:"field",style:{gridColumn:"span 2"},children:[i.jsx("label",{htmlFor:"e-desc",children:"Description (optional)"}),i.jsx("input",{id:"e-desc",value:j,onChange:k=>S(k.target.value)})]})]}),i.jsxs("div",{style:{display:"flex",gap:8,marginTop:14},children:[i.jsxs("button",{className:"btn primary",type:"submit",disabled:l.isPending,children:[i.jsx(A,{name:"plus",size:12})," ",l.isPending?"Adding…":"Add rule"]}),i.jsx("button",{className:"btn ghost",type:"button",onClick:v,disabled:l.isPending,children:"Reset"})]})]})]}),i.jsxs("section",{className:"card",children:[i.jsx("header",{className:"card-header",children:i.jsxs("div",{children:[i.jsx("div",{className:"card-title",children:"Rules"}),i.jsxs("div",{className:"card-sub",children:[e.length," configured"]})]})}),n?i.jsxs("div",{className:"banner err",style:{margin:18},children:["Couldn't load rules. ",r instanceof Error?r.message:""]}):t&&e.length===0?i.jsx("div",{className:"card-body",children:i.jsx("div",{className:"skeleton",style:{height:36}})}):e.length===0?i.jsxs("div",{className:"empty",style:{margin:18},children:[i.jsx("div",{className:"empty-title",children:"No rules yet."}),i.jsx("div",{className:"empty-sub",children:"Add a rule so approvals don't sit forever when reviewers are offline."})]}):i.jsx("ul",{className:"list",children:e.map(k=>{const E=R0(k.escalation_targets);return i.jsxs("li",{children:[i.jsxs("div",{style:{flex:1,minWidth:0},children:[i.jsxs("div",{className:"list-title",children:[k.name," ",i.jsxs("span",{className:"muted mono",style:{fontSize:11},children:["· ",k.rule_id]})]}),i.jsxs("div",{className:"list-sub",children:[E.length," target",E.length===1?"":"s"," (",E.join(", "),") · timeout ",k.timeout_hours,"h · added ",ct(k.created_at)]}),k.description&&i.jsx("div",{style:{color:"var(--ink-2)",fontSize:12,marginTop:4},children:k.description})]}),i.jsxs("button",{className:"btn ghost","aria-label":`Delete ${k.name}`,onClick:()=>f(k.rule_id),disabled:a.isPending,children:[i.jsx(A,{name:"trash",size:12})," Delete"]})]},k.rule_id)})})]}),i.jsx(Ue,{open:c!==null,title:"Delete this rule?",body:i.jsx("span",{children:"Existing escalation requests using this rule will not be affected."}),confirmLabel:"Delete",tone:"danger",onClose:()=>f(null),onConfirm:()=>{c&&a.mutate(c),f(null)}})]})}function T0(){var s,l;const{data:e,isLoading:t,isError:n,error:r}=ox();return i.jsxs(i.Fragment,{children:[i.jsx("h2",{children:"Remediation blocks"}),i.jsxs("section",{className:"card",children:[i.jsx("header",{className:"card-header",children:i.jsxs("div",{children:[i.jsx("div",{className:"card-title",children:"Auto-blocks"}),i.jsxs("div",{className:"card-sub",children:["Risk-engine-derived rules that auto-block sessions exhibiting suspicious patterns. Configure thresholds in ",i.jsx("code",{children:"waymark.config.json"}),"."]})]})}),i.jsx("div",{className:"card-body",children:n?i.jsxs("div",{className:"banner err",children:["Couldn't load blocks. ",r instanceof Error?r.message:""]}):t?i.jsx("div",{className:"skeleton",style:{height:36}}):e!=null&&e.message&&(((s=e.blocks)==null?void 0:s.length)??0)===0?i.jsxs("div",{className:"empty",children:[i.jsx("div",{className:"empty-title",children:"Auto-block storage not yet implemented."}),i.jsx("div",{className:"empty-sub",children:e.message})]}):(((l=e==null?void 0:e.blocks)==null?void 0:l.length)??0)===0?i.jsxs("div",{className:"empty",children:[i.jsx("div",{className:"empty-title",children:"No auto-blocks active."}),i.jsx("div",{className:"empty-sub",children:"Once the risk engine flags a session, blocks appear here."})]}):i.jsx("pre",{className:"code-block",children:JSON.stringify(e==null?void 0:e.blocks,null,2)})})]})]})}function O0(){const{data:e}=Pu(),{data:t={},isLoading:n,isError:r,error:s}=_u(),l=Object.values(t);return i.jsxs(i.Fragment,{children:[i.jsx("h2",{children:"Projects"}),i.jsxs("section",{className:"card",children:[i.jsx("header",{className:"card-header",children:i.jsxs("div",{children:[i.jsx("div",{className:"card-title",children:"Current project"}),i.jsx("div",{className:"card-sub",children:"The Waymark instance serving this dashboard."})]})}),i.jsx("div",{className:"card-body",children:e?i.jsxs("dl",{className:"kv-grid",style:{gridTemplateColumns:"140px 1fr"},children:[i.jsx("dt",{children:"name"}),i.jsx("dd",{children:e.projectName}),i.jsx("dt",{children:"port"}),i.jsxs("dd",{children:[":",e.port]}),e.projectRoot&&i.jsxs(i.Fragment,{children:[i.jsx("dt",{children:"root"}),i.jsx("dd",{children:e.projectRoot})]})]}):i.jsx("div",{className:"muted",children:"Loading…"})})]}),i.jsxs("section",{className:"card",children:[i.jsx("header",{className:"card-header",children:i.jsxs("div",{children:[i.jsx("div",{className:"card-title",children:"Hub"}),i.jsx("div",{className:"card-sub",children:"Other Waymark instances on this machine. Click to open."})]})}),r?i.jsxs("div",{className:"banner err",style:{margin:18},children:["Couldn't load hub. ",s instanceof Error?s.message:""]}):n&&l.length===0?i.jsx("div",{className:"card-body",children:i.jsx("div",{className:"skeleton",style:{height:36}})}):l.length===0?i.jsxs("div",{className:"empty",style:{margin:18},children:[i.jsx("div",{className:"empty-title",children:"No other projects."}),i.jsxs("div",{className:"empty-sub",children:["Run ",i.jsx("code",{children:"npx @way_marks/cli start"})," in another project to register it here."]})]}):i.jsx("ul",{className:"list",children:l.map(a=>{const o=a.startedAt?Lt(a.startedAt):null,u=a.status==="running",d=`http://localhost:${a.port}/`;return i.jsxs("li",{children:[i.jsxs("div",{style:{flex:1,minWidth:0},children:[i.jsxs("div",{className:"list-title",style:{display:"flex",gap:8,alignItems:"center"},children:[i.jsx("span",{className:J("status-dot",!u&&"off"),"aria-hidden":!0}),a.projectName,i.jsxs("span",{className:"muted mono",style:{fontSize:11},children:["· :",a.port]})]}),i.jsxs("div",{className:"list-sub",children:[Sl(a.projectRoot,4),o&&` · started ${ct(o.toISOString())}`]})]}),i.jsxs("a",{className:"btn ghost",href:d,target:"_blank",rel:"noreferrer noopener","aria-label":`Open ${a.projectName} dashboard`,children:[i.jsx(A,{name:"external",size:12})," Open"]})]},a.id)})})]})]})}const I0=[{to:"preferences",label:"Preferences",icon:"sliders"},{to:"team",label:"Team",icon:"team"},{to:"approval-routes",label:"Approval routes",icon:"approvals"},{to:"escalation-rules",label:"Escalation rules",icon:"bell"},{to:"remediation",label:"Remediation blocks",icon:"shield"},{to:"projects",label:"Projects",icon:"folder"}];function M0(){return i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"page-header",children:i.jsxs("div",{children:[i.jsx("h1",{className:"page-title",children:"Settings"}),i.jsx("p",{className:"page-sub",children:"Team, approval routing, escalation rules, and per-workspace preferences. Everything here is project-local."})]})}),i.jsxs("div",{className:"settings",children:[i.jsx("nav",{className:"settings-nav","aria-label":"Settings",children:I0.map(e=>i.jsxs(io,{to:e.to,className:({isActive:t})=>J(t&&"active"),end:!1,children:[i.jsx(A,{name:e.icon,size:14}),i.jsx("span",{children:e.label})]},e.to))}),i.jsx("div",{className:"settings-section",children:i.jsxs(Jh,{children:[i.jsx(Ne,{index:!0,element:i.jsx(Hg,{to:"preferences",replace:!0})}),i.jsx(Ne,{path:"preferences",element:i.jsx(N0,{})}),i.jsx(Ne,{path:"team",element:i.jsx(k0,{})}),i.jsx(Ne,{path:"approval-routes",element:i.jsx(_0,{})}),i.jsx(Ne,{path:"escalation-rules",element:i.jsx(b0,{})}),i.jsx(Ne,{path:"remediation",element:i.jsx(T0,{})}),i.jsx(Ne,{path:"projects",element:i.jsx(O0,{})})]})})]})]})}function L0(e){const t=Math.floor((Date.now()-e)/1e3);return t<60?`${t}s`:t<3600?`${Math.floor(t/60)}m`:t<86400?`${Math.floor(t/3600)}h`:`${Math.floor(t/86400)}d`}function F0(e){switch(e){case"thinking":case"running":case"executing":return"badge-executing";case"waiting":case"pending":case"idle":return"badge-waiting";case"done":case"completed":return"badge-ok";case"error":return"badge-err";default:return"badge-default"}}function A0(e){return e===0?"—":e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function z0({session:e,selected:t,onClick:n}){var l;const r=(e.totalInputTokens??0)+(e.totalOutputTokens??0),s=((l=e.currentTasks)==null?void 0:l[0])??null;return i.jsxs("div",{className:J("session-card",t&&"selected"),onClick:n,role:"button",tabIndex:0,onKeyDown:a=>a.key==="Enter"&&(n==null?void 0:n()),"aria-selected":t,children:[i.jsxs("div",{className:"session-card-header",children:[i.jsx("span",{className:J("badge",F0(e.status)),children:e.status}),i.jsx("span",{className:"session-agent",children:e.agentCli}),i.jsxs("span",{className:"session-pid",children:["PID ",e.pid]}),i.jsx("span",{className:"session-age",children:L0(e.startedAt)})]}),i.jsx("div",{className:"session-project",children:e.projectName||e.cwd}),s&&i.jsx("div",{className:"session-task",children:s}),i.jsxs("div",{className:"session-metrics",children:[i.jsxs("div",{className:"metric-item",children:[i.jsx("div",{className:"metric-label",children:"Context"}),i.jsx("div",{className:"context-bar",children:i.jsx("div",{className:J("context-fill",e.contextPercent>80&&"context-fill-warn"),style:{width:`${Math.min(100,e.contextPercent)}%`}})}),i.jsxs("div",{className:"metric-value",children:[Math.round(e.contextPercent),"%"]})]}),i.jsxs("div",{className:"metric-item",children:[i.jsx("div",{className:"metric-label",children:"Tokens"}),i.jsx("div",{className:"metric-value",children:A0(r)})]}),i.jsxs("div",{className:"metric-item",children:[i.jsx("div",{className:"metric-label",children:"Turns"}),i.jsx("div",{className:"metric-value",children:e.turnCount})]}),e.memMb>0&&i.jsxs("div",{className:"metric-item",children:[i.jsx("div",{className:"metric-label",children:"Mem"}),i.jsxs("div",{className:"metric-value",children:[Math.round(e.memMb)," MB"]})]})]}),(e.gitBranch||e.gitAdded+e.gitModified>0)&&i.jsxs("div",{className:"session-git",children:[e.gitBranch&&i.jsxs("span",{className:"git-branch",children:["⎇ ",e.gitBranch]}),e.gitAdded>0&&i.jsxs("span",{className:"git-added",children:["+",e.gitAdded]}),e.gitModified>0&&i.jsxs("span",{className:"git-modified",children:["~",e.gitModified]})]}),e.model&&i.jsx("div",{className:"session-model",children:e.model})]})}function hd({label:e,pct:t}){const n=t>=90?"pill-danger":t>=60?"pill-warn":"pill-ok";return i.jsxs("span",{className:J("rate-pill",n),children:[e,": ",Math.round(t),"%"]})}function D0({rateLimits:e}){return e.length===0?i.jsx("div",{className:"rate-limit-empty",children:"No rate limit data — install the abtop StatusLine hook to enable."}):i.jsx("div",{className:"rate-limit-badges",children:e.map(t=>i.jsxs("div",{className:"rate-limit-row",children:[i.jsx("span",{className:"rate-source",children:t.source}),i.jsx(hd,{label:"5h",pct:t.fiveHour.usedPercent}),t.sevenDay&&i.jsx(hd,{label:"7d",pct:t.sevenDay.usedPercent}),i.jsxs("span",{className:"rate-reset",children:["resets ",new Date(t.fiveHour.resetsAtIso).toLocaleTimeString()]})]},t.source))})}function U0({agentPorts:e,orphanPorts:t}){return e.length>0||t.length>0?i.jsxs("div",{className:"ports-list",children:[e.length>0&&i.jsxs("section",{children:[i.jsx("h3",{className:"ports-section-title",children:"Agent ports"}),i.jsxs("table",{className:"ports-table",children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{children:"Port"}),i.jsx("th",{children:"PID"}),i.jsx("th",{children:"Agent"}),i.jsx("th",{children:"Command"}),i.jsx("th",{children:"Session"})]})}),i.jsx("tbody",{children:e.map(r=>i.jsxs("tr",{children:[i.jsx("td",{children:r.port}),i.jsx("td",{children:r.pid}),i.jsx("td",{children:r.agentCli}),i.jsx("td",{children:i.jsx("code",{children:r.command})}),i.jsx("td",{className:"port-session-id",children:r.sessionId})]},`${r.pid}-${r.port}`))})]})]}),t.length>0&&i.jsxs("section",{children:[i.jsx("h3",{className:"ports-section-title orphan",children:"Orphan ports (no live session)"}),i.jsxs("table",{className:"ports-table",children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{children:"Port"}),i.jsx("th",{children:"PID"}),i.jsx("th",{children:"Command"}),i.jsx("th",{children:"Last project"})]})}),i.jsx("tbody",{children:t.map(r=>i.jsxs("tr",{className:"orphan-row",children:[i.jsx("td",{children:r.port}),i.jsx("td",{children:r.pid}),i.jsx("td",{children:i.jsx("code",{children:r.command})}),i.jsx("td",{children:r.projectName||"—"})]},`${r.pid}-${r.port}`))})]})]})]}):i.jsx("div",{className:"ports-empty",children:"No agent-held ports detected."})}const Pp=new Set(["thinking","executing"]),$0=new Set(["waiting","rateLimited"]),B0=new Set(["done"]);function Q0(e,t){return t==="all"?!0:t==="active"?Pp.has(e.status):t==="waiting"?$0.has(e.status):t==="done"?B0.has(e.status):!0}function W0(){const[e,t]=N.useState("all"),[n,r]=N.useState("all"),[s,l]=N.useState("sessions"),[a,o]=N.useState(null),{data:u,isLoading:d,isError:h,error:p,dataUpdatedAt:g}=gx(),m=((u==null?void 0:u.sessions)??[]).filter(c=>!(e!=="all"&&c.agentCli!==e||!Q0(c,n))),w=((u==null?void 0:u.sessions)??[]).filter(c=>Pp.has(c.status)),j=m.find(c=>c.sessionId===a)??null,S=g?new Date(g).toLocaleTimeString():null;return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"page-header",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"page-title",children:"Agent Monitor"}),i.jsx("p",{className:"page-sub",children:"Live view of running AI agent sessions (Claude, Codex, GitHub Copilot CLI). Refreshes every 3 seconds."})]}),i.jsxs("div",{className:"page-meta",children:[i.jsxs("span",{children:[((u==null?void 0:u.sessions)??[]).length," total"]}),w.length>0&&i.jsxs("span",{className:"badge-ok",children:[w.length," active"]}),S&&i.jsxs("span",{className:"text-muted",children:["updated ",S]})]})]}),h&&i.jsxs("div",{className:"banner err",children:["Cannot reach agent monitor. ",p instanceof Error?p.message:""]}),i.jsx("div",{className:"tab-row",role:"tablist",children:["sessions","rate-limits","ports"].map(c=>i.jsx("button",{role:"tab","aria-selected":s===c,className:J("tab-btn",s===c&&"active"),onClick:()=>l(c),children:c==="sessions"?`Sessions (${m.length})`:c==="rate-limits"?"Rate Limits":"Ports"},c))}),s==="sessions"&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"filter-row",children:[i.jsx("div",{className:"filter-group",role:"group","aria-label":"Agent filter",children:["all","claude","codex","copilot"].map(c=>i.jsx("button",{className:J("filter-btn",e===c&&"active"),onClick:()=>t(c),children:c},c))}),i.jsx("div",{className:"filter-group",role:"group","aria-label":"Status filter",children:["all","active","waiting","done"].map(c=>i.jsx("button",{className:J("filter-btn",n===c&&"active"),onClick:()=>r(c),children:c},c))})]}),d&&!u?i.jsxs("div",{className:"empty-state",children:[i.jsx(A,{name:"agent",size:32}),i.jsx("p",{children:"Loading agent sessions…"})]}):m.length===0?i.jsxs("div",{className:"empty-state",children:[i.jsx(A,{name:"agent",size:32}),i.jsx("p",{children:"No agent sessions found."}),e!=="all"&&i.jsxs("p",{className:"text-muted",children:["Filtered by: ",e]}),n!=="all"&&i.jsxs("p",{className:"text-muted",children:["Status: ",n]})]}):i.jsx("div",{className:"session-grid",children:m.map(c=>i.jsx(z0,{session:c,selected:c.sessionId===a,onClick:()=>o(c.sessionId===a?null:c.sessionId)},c.sessionId))}),j&&i.jsxs("div",{className:"session-detail",children:[i.jsxs("div",{className:"detail-header",children:[i.jsxs("h2",{className:"detail-title",children:["Session detail — ",j.agentCli]}),i.jsx("button",{className:"btn ghost",onClick:()=>o(null),children:i.jsx(A,{name:"x",size:14})})]}),i.jsxs("dl",{className:"detail-grid",children:[i.jsx("dt",{children:"Session ID"}),i.jsx("dd",{children:i.jsx("code",{children:j.sessionId})}),i.jsx("dt",{children:"PID"}),i.jsx("dd",{children:j.pid}),i.jsx("dt",{children:"CWD"}),i.jsx("dd",{children:i.jsx("code",{children:j.cwd})}),i.jsx("dt",{children:"Model"}),i.jsx("dd",{children:j.model||"—"}),i.jsx("dt",{children:"Turns"}),i.jsx("dd",{children:j.turnCount}),i.jsx("dt",{children:"Compactions"}),i.jsx("dd",{children:j.compactionCount}),i.jsx("dt",{children:"Context window"}),i.jsxs("dd",{children:[(j.contextWindow??0).toLocaleString()," tokens"]}),i.jsx("dt",{children:"Input tokens"}),i.jsx("dd",{children:(j.totalInputTokens??0).toLocaleString()}),i.jsx("dt",{children:"Output tokens"}),i.jsx("dd",{children:(j.totalOutputTokens??0).toLocaleString()}),(j.totalCacheRead??0)>0&&i.jsxs(i.Fragment,{children:[i.jsx("dt",{children:"Cache read"}),i.jsx("dd",{children:j.totalCacheRead.toLocaleString()})]}),j.version&&i.jsxs(i.Fragment,{children:[i.jsx("dt",{children:"Version"}),i.jsx("dd",{children:j.version})]})]}),(j.toolCalls??[]).length>0&&i.jsxs("div",{className:"detail-section",children:[i.jsx("h3",{children:"Recent tool calls"}),i.jsx("ul",{className:"tool-calls-list",children:(j.toolCalls??[]).slice(0,20).map((c,f)=>i.jsxs("li",{className:"tool-call-item",children:[i.jsx("code",{children:c.name}),i.jsx("span",{className:"tool-arg",children:c.arg}),c.durationMs>0&&i.jsxs("span",{className:"tool-duration",children:[c.durationMs,"ms"]})]},f))})]}),(j.fileAccesses??[]).length>0&&i.jsxs("div",{className:"detail-section",children:[i.jsx("h3",{children:"File accesses"}),i.jsx("ul",{className:"file-access-list",children:(j.fileAccesses??[]).slice(0,30).map((c,f)=>i.jsxs("li",{className:"file-access-item",children:[i.jsx("span",{className:"fa-op",children:c.operation}),i.jsx("code",{children:c.path})]},f))})]}),(j.children??[]).length>0&&i.jsxs("div",{className:"detail-section",children:[i.jsx("h3",{children:"Child processes"}),i.jsx("ul",{className:"children-list",children:(j.children??[]).map(c=>i.jsxs("li",{children:[i.jsx("code",{children:c.command})," (PID ",c.pid,")",c.port&&i.jsxs(i.Fragment,{children:[" · port ",c.port]}),c.memKb>0&&i.jsxs(i.Fragment,{children:[" · ",Math.round(c.memKb/1024)," MB"]})]},c.pid))})]})]})]}),s==="rate-limits"&&i.jsx("div",{className:"tab-content",children:i.jsx(D0,{rateLimits:(u==null?void 0:u.rateLimits)??[]})}),s==="ports"&&i.jsx("div",{className:"tab-content",children:i.jsx(U0,{agentPorts:(u==null?void 0:u.sessions.flatMap(c=>(c.children??[]).filter(f=>f.port).map(f=>({port:f.port,pid:f.pid,command:f.command,sessionId:c.sessionId,agentCli:c.agentCli}))))??[],orphanPorts:(u==null?void 0:u.orphanPorts)??[]})})]})}function H0(){return n0(),i.jsx(Zx,{topbar:i.jsx(t0,{}),children:i.jsxs(Jh,{children:[i.jsx(Ne,{path:"/",element:i.jsx(l0,{})}),i.jsx(Ne,{path:"/sessions",element:i.jsx(o0,{})}),i.jsx(Ne,{path:"/approvals",element:i.jsx(u0,{})}),i.jsx(Ne,{path:"/policy",element:i.jsx(f0,{})}),i.jsx(Ne,{path:"/stats",element:i.jsx(m0,{})}),i.jsx(Ne,{path:"/hub",element:i.jsx(w0,{})}),i.jsx(Ne,{path:"/agents",element:i.jsx(W0,{})}),i.jsx(Ne,{path:"/settings/*",element:i.jsx(M0,{})})]})})}const K0=new Ty({defaultOptions:{queries:{staleTime:1e3,refetchOnWindowFocus:!1,retry:1}}}),_p=document.getElementById("root");if(!_p)throw new Error("#root not found");Uh(_p).render(i.jsx(N.StrictMode,{children:i.jsx(Oy,{client:K0,children:i.jsx(ey,{children:i.jsx(Vy,{children:i.jsx(H0,{})})})})}));
87
+ `]},f))})]})]})]}),i.jsxs("section",{className:"drawer-section",children:[i.jsx("div",{className:"drawer-section-title",children:"Payload"}),i.jsx("pre",{className:"code-block",children:JSON.stringify(g,null,2)})]}),e.stdout&&i.jsxs("section",{className:"drawer-section",children:[i.jsx("div",{className:"drawer-section-title",children:"Stdout"}),i.jsx("pre",{className:"code-block",children:e.stdout})]}),e.stderr&&i.jsxs("section",{className:"drawer-section",children:[i.jsx("div",{className:"drawer-section-title",children:"Stderr"}),i.jsx("pre",{className:"code-block",style:{color:"var(--err)"},children:e.stderr})]}),e.error_message&&i.jsxs("section",{className:"drawer-section",children:[i.jsx("div",{className:"drawer-section-title",children:"Error"}),i.jsx("pre",{className:"code-block",style:{color:"var(--err)"},children:e.error_message})]})]}),i.jsxs("div",{className:"drawer-foot",children:[d?i.jsxs(i.Fragment,{children:[i.jsxs("button",{className:"btn danger btn-lg",onClick:()=>a("reject"),disabled:r.isPending,children:[i.jsx(L,{name:"x",size:14}),"Reject"]}),i.jsxs("button",{className:"btn ok btn-lg",onClick:w,disabled:n.isPending,children:[i.jsx(L,{name:"check",size:14}),n.isPending?"Approving…":"Approve"]})]}):p?i.jsxs("button",{className:"btn btn-lg",onClick:()=>a("rollback"),disabled:s.isPending,children:[i.jsx(L,{name:"rollback",size:14}),"Rollback"]}):i.jsx("span",{className:"muted",children:"No actions available"}),i.jsx("div",{className:"spacer"}),i.jsx("button",{className:"btn",onClick:t,children:"Close"})]})]}),i.jsx(Ee,{open:l==="reject",title:"Reject this action?",body:i.jsx("span",{children:"The agent will see a rejection and stop. Add an optional reason so the log is clear."}),withReason:!0,reasonPlaceholder:"Why reject?",confirmLabel:"Reject",tone:"danger",onClose:()=>a(null),onConfirm:c=>j(c)}),i.jsx(Ee,{open:l==="rollback",title:"Roll back this write?",body:i.jsx("span",{children:"Waymark will restore the file to its before-snapshot. This cannot be undone."}),confirmLabel:"Roll back",onClose:()=>a(null),onConfirm:S})]})}const i0=["all","pending","blocked","errors","writes","bash"];function l0(){const{data:e=[],isLoading:t,isError:n,error:r}=Qr(),{filter:s,setFilter:l,search:a,grouping:o,selectedActionId:u,setSelectedActionId:d}=zt(),h=N.useMemo(()=>({all:e.length,pending:e.filter(c=>c.status==="pending").length,blocked:e.filter(c=>c.status==="blocked"||c.decision==="block").length,errors:e.filter(c=>c.status==="error").length,writes:e.filter(c=>c.tool_name==="write_file").length,bash:e.filter(c=>c.tool_name==="bash").length}),[e]),p=N.useMemo(()=>{const c=a.trim().toLowerCase();return e.filter(f=>!(s==="pending"&&f.status!=="pending"||s==="blocked"&&f.status!=="blocked"&&f.decision!=="block"||s==="errors"&&f.status!=="error"||s==="writes"&&f.tool_name!=="write_file"||s==="bash"&&f.tool_name!=="bash"||c&&![f.tool_name,f.target_path||"",f.intent||"",f.input_payload||""].join(" ").toLowerCase().includes(c)))},[e,s,a]),g=N.useMemo(()=>e.find(c=>c.action_id===u)??null,[e,u]),m=c=>d(c.action_id),w=()=>d(null),j=N.useMemo(()=>Ky(p),[p]),S=h.pending;return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"page-header",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"page-title",children:"Actions"}),i.jsx("p",{className:"page-sub",children:"Every MCP tool call intercepted by Waymark, with policy decision and full payload."})]}),i.jsxs("div",{className:"page-meta",children:[h.all>0&&i.jsxs("span",{children:[h.all," total"]}),S>0&&i.jsxs("span",{className:"live",style:{color:"var(--pending)"},children:[S," pending"]})]})]}),S>0&&i.jsxs("div",{className:"approval-banner",role:"status",children:[i.jsx("span",{className:"approval-banner-dot","aria-hidden":!0}),i.jsxs("div",{className:"approval-banner-text",children:[i.jsxs("div",{className:"approval-banner-title",children:[S," action",S===1?"":"s"," awaiting approval"]}),i.jsx("div",{className:"approval-banner-sub",children:"Agent is paused until you decide."})]}),i.jsx("button",{className:"btn primary",onClick:()=>l("pending"),children:"Review →"})]}),n&&i.jsxs("div",{className:"banner err",children:["Couldn't reach the Waymark API. ",r instanceof Error?r.message:""]}),i.jsx("div",{className:"pill-row",role:"tablist","aria-label":"Action filters",children:i0.map(c=>i.jsxs("button",{role:"tab","aria-selected":s===c,className:J("pill",s===c&&"active",c==="pending"&&S>0&&"attn"),onClick:()=>l(c),children:[c,i.jsx("span",{className:"pill-count",children:h[c]})]},c))}),t?i.jsx("div",{className:"card",children:i.jsx("div",{className:"card-body",style:{padding:0},children:Array.from({length:4}).map((c,f)=>i.jsxs("div",{style:{display:"flex",gap:14,padding:14,borderTop:f?"1px solid var(--line)":"none"},children:[i.jsx("div",{className:"skeleton",style:{width:54,height:14}}),i.jsx("div",{className:"skeleton",style:{width:90,height:18}}),i.jsx("div",{className:"skeleton",style:{flex:1,height:18}}),i.jsx("div",{className:"skeleton",style:{width:70,height:18}})]},f))})}):p.length===0?i.jsx(a0,{hasAny:e.length>0}):o==="session"?i.jsx("div",{children:j.map(c=>i.jsx(s0,{group:c,focusedId:u,onOpen:m},c.session_id))}):i.jsx("div",{className:"card",style:{padding:0},children:p.map(c=>i.jsx(Iu,{row:c,focused:c.action_id===u,onOpen:m},c.action_id))}),i.jsx(Cp,{action:g,onClose:w})]})}function a0({hasAny:e}){return i.jsxs("div",{className:"empty",children:[i.jsx("div",{className:"empty-title",children:e?"No actions match.":"No actions yet."}),i.jsx("div",{className:"empty-sub",children:e?"Try a different filter or clear the search.":"Actions will appear here the moment an agent calls an MCP tool. Waymark intercepts every call, applies your policy, and logs it."}),!e&&i.jsx("div",{className:"empty-hint",children:"npx @way_marks/cli status"})]})}function o0(){const{data:e=[],isLoading:t,isError:n,error:r}=Qr(),{selectedActionId:s,setSelectedActionId:l}=zt(),[a,o]=N.useState(null),[u,d]=N.useState(null),h=Yy(),p=N.useMemo(()=>{const m=new Map;for(const S of e){const c=S.session_id||"unknown";m.has(c)||m.set(c,[]),m.get(c).push(S)}const w=Date.now(),j=[];for(const[S,c]of m.entries()){const f=y=>{var k;return((k=Lt(y.created_at))==null?void 0:k.getTime())??0};c.sort((y,k)=>f(k)-f(y));const v=f(c[0]);j.push({session_id:S,latest:v,live:w-v<5*60*1e3,total:c.length,pending:c.filter(y=>y.status==="pending").length,errors:c.filter(y=>y.status==="error"||y.status==="blocked"||y.status==="rejected").length,writes:c.filter(y=>y.tool_name==="write_file"&&!y.rolled_back).length,rolledBack:c.filter(y=>y.rolled_back).length,rows:c,started:c[c.length-1].created_at})}return j.sort((S,c)=>c.latest-S.latest),j},[e]),g=N.useMemo(()=>e.find(m=>m.action_id===s)??null,[e,s]);return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"page-header",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"page-title",children:"Sessions"}),i.jsx("p",{className:"page-sub",children:"One session = one agent process. Atomic rollback restores every action in a session to its before-snapshot."})]}),i.jsx("div",{className:"page-meta",children:p.length>0&&i.jsxs("span",{children:[p.length," session",p.length===1?"":"s"]})})]}),n&&i.jsxs("div",{className:"banner err",children:["Couldn't load sessions. ",r instanceof Error?r.message:""]}),t&&p.length===0?i.jsx("div",{className:"card",children:Array.from({length:2}).map((m,w)=>i.jsxs("div",{style:{padding:18,borderTop:w?"1px solid var(--line)":"none"},children:[i.jsx("div",{className:"skeleton",style:{width:"40%",height:14,marginBottom:8}}),i.jsx("div",{className:"skeleton",style:{width:"80%",height:10}})]},w))}):p.length===0?i.jsxs("div",{className:"empty",children:[i.jsx("div",{className:"empty-title",children:"No sessions yet."}),i.jsx("div",{className:"empty-sub",children:"A session starts when an agent first calls an MCP tool."})]}):i.jsx("div",{style:{display:"flex",flexDirection:"column",gap:14},children:p.map(m=>{const w=a===m.session_id,j=m.writes>0&&m.rolledBack<m.total;return i.jsxs("article",{className:J("card",m.live&&"live-card"),style:m.live?{borderColor:"oklch(0.74 0.13 155 / 0.35)"}:void 0,children:[i.jsxs("header",{className:"card-header",style:{flexWrap:"wrap",gap:14},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,minWidth:0,flex:1},children:[i.jsx("div",{className:"session-avatar",children:m.session_id.slice(0,2).toUpperCase()}),i.jsxs("div",{style:{minWidth:0},children:[i.jsxs("div",{className:"card-title",style:{display:"flex",gap:10,alignItems:"baseline"},children:[i.jsx("code",{children:m.session_id}),m.live&&i.jsx("span",{className:"session-live-tag",children:"live"})]}),i.jsxs("div",{className:"card-sub mono",style:{marginTop:2},children:[m.total," actions · started ",nt(m.started)," · latest ",nt(new Date(m.latest).toISOString())]})]})]}),i.jsxs("div",{className:"session-stats",style:{flexShrink:0},children:[i.jsxs("span",{className:"stat",children:[i.jsx("strong",{children:m.total})," actions"]}),i.jsxs("span",{className:"stat",children:[i.jsx("strong",{children:m.writes})," writes"]}),m.pending>0&&i.jsxs("span",{className:"stat warn",children:[i.jsx("strong",{children:m.pending})," pending"]}),m.errors>0&&i.jsxs("span",{className:"stat err",children:[i.jsx("strong",{children:m.errors})," errors"]}),m.rolledBack>0&&i.jsxs("span",{className:"stat",children:[i.jsx("strong",{children:m.rolledBack})," reverted"]})]}),i.jsxs("div",{style:{display:"flex",gap:6,flexShrink:0},children:[i.jsxs("button",{className:"btn",onClick:()=>o(w?null:m.session_id),"aria-expanded":w,children:[i.jsx(L,{name:"chevron",size:12,style:{transform:w?"rotate(180deg)":"none",transition:"transform 0.15s"}}),w?"Hide actions":"Show actions"]}),i.jsxs("button",{className:"btn danger",disabled:!j||h.isPending,onClick:()=>d(m.session_id),children:[i.jsx(L,{name:"rollback",size:12}),"Rollback"]})]})]}),w&&i.jsx("div",{className:"card-body flush",children:m.rows.map(S=>i.jsx(Iu,{row:S,focused:S.action_id===s,onOpen:c=>l(c.action_id)},S.action_id))})]},m.session_id)})}),i.jsx(Ee,{open:u!==null,title:"Roll back entire session?",body:i.jsx("span",{children:"Every write in this session will be restored to its before-snapshot. Reads and bash commands are ignored. This cannot be undone."}),confirmLabel:"Roll back session",tone:"danger",onClose:()=>d(null),onConfirm:()=>{u&&h.mutate(u),d(null)}}),i.jsx(Cp,{action:g,onClose:()=>l(null)})]})}function u0(){const{data:e=[],isLoading:t,isError:n}=mp(),{data:r=[],isLoading:s,isError:l}=vp(),{data:a=[]}=Qr(),o=a.filter(m=>m.decision==="pending"&&m.status==="pending"),[u,d]=N.useState("pending"),h=e.length+o.length,p=h+r.length,g=u==="pending"&&h===0&&r.length>0?"escalated":u;return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"page-header",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"page-title",children:"Approvals"}),i.jsx("p",{className:"page-sub",children:"Reviewer inbox for actions held by policy. Pending requests are held on the triggering agent; escalated requests timed out and were routed to a backup reviewer."})]}),i.jsx("div",{className:"page-meta",children:p>0?i.jsxs("span",{className:"live",style:{color:"var(--pending)"},children:[p," awaiting"]}):i.jsx("span",{children:"All clear"})})]}),(n||l)&&i.jsx("div",{className:"banner err",children:"Couldn't load the approvals queue. Retrying…"}),i.jsxs("div",{className:"pill-row",role:"tablist","aria-label":"Approval queues",children:[i.jsx(la,{id:"pending",label:"Pending",count:h,current:g,onClick:d,attn:!0}),i.jsx(la,{id:"escalated",label:"Escalated",count:r.length,current:g,onClick:d,attn:!0}),i.jsx(la,{id:"history",label:"History",count:void 0,current:g,onClick:d})]}),g==="pending"&&(t&&h===0?i.jsx(fd,{}):h===0?i.jsx(aa,{icon:"check",title:"Inbox zero.",sub:"No approvals awaiting decision."}):i.jsxs("div",{className:"queue",children:[o.map(m=>i.jsx(c0,{action:m},m.action_id)),e.map(m=>i.jsx(d0,{req:m},m.request_id))]})),g==="escalated"&&(s&&r.length===0?i.jsx(fd,{}):r.length===0?i.jsx(aa,{icon:"check",title:"No escalations.",sub:"Requests that time out will surface here."}):i.jsx("div",{className:"queue",children:r.map(m=>i.jsx(f0,{req:m},m.request_id))})),g==="history"&&i.jsx(aa,{icon:"doc",title:"History view coming soon.",sub:"Once a session is selected we'll show the full approval + escalation history here. For now, use the Sessions tab."})]})}function la({id:e,label:t,count:n,current:r,onClick:s,attn:l=!1}){const a=r===e;return i.jsxs("button",{role:"tab","aria-selected":a,className:J("pill",a&&"active",l&&n!==void 0&&n>0&&"attn"),onClick:()=>s(e),children:[t,n!==void 0&&i.jsx("span",{className:"pill-count",children:n})]})}function fd(){return i.jsx("div",{className:"queue",children:Array.from({length:2}).map((e,t)=>i.jsxs("div",{className:"card",style:{padding:18,display:"flex",flexDirection:"column",gap:10},children:[i.jsx("div",{className:"skeleton",style:{width:"60%",height:14}}),i.jsx("div",{className:"skeleton",style:{width:"40%",height:10}}),i.jsx("div",{className:"skeleton",style:{width:"100%",height:38}})]},t))})}function aa({icon:e,title:t,sub:n}){return i.jsxs("div",{className:"empty",children:[i.jsx("div",{style:{display:"grid",placeItems:"center",marginBottom:8},children:i.jsx(L,{name:e,size:24})}),i.jsx("div",{className:"empty-title",children:t}),i.jsx("div",{className:"empty-sub",children:n})]})}function Ep(e){if(!e)return[];try{const t=JSON.parse(e);return Array.isArray(t)?t.map(String):[]}catch{return[]}}function c0({action:e}){const t=bu(),n=Tu(),[r,s]=N.useState(null),l=e.target_path?e.target_path.split("/").slice(-2).join("/"):e.tool_name;return i.jsxs(i.Fragment,{children:[i.jsxs("article",{className:"queue-card card",children:[i.jsxs("div",{className:"card-body",style:{display:"flex",flexDirection:"column",gap:10},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,flexWrap:"wrap"},children:[i.jsx("span",{className:"policy-chip pending",children:"policy hold"}),i.jsx("span",{className:"mono muted",style:{fontSize:11},children:e.tool_name}),i.jsx("span",{className:"mono muted",style:{fontSize:11,marginLeft:"auto"},children:nt(e.created_at)})]}),i.jsx("div",{style:{display:"flex",alignItems:"baseline",gap:10,flexWrap:"wrap"},children:i.jsx("div",{className:"card-title",title:e.target_path??void 0,children:l})}),i.jsxs("dl",{className:"kv-grid",children:[i.jsx("dt",{children:"rule"}),i.jsx("dd",{children:e.matched_rule??"—"}),i.jsx("dt",{children:"reason"}),i.jsx("dd",{children:e.policy_reason??"—"}),i.jsx("dt",{children:"session"}),i.jsx("dd",{children:i.jsxs("code",{children:[e.session_id.slice(0,8),"…"]})})]})]}),i.jsxs("footer",{className:"drawer-foot",style:{borderTop:"1px solid var(--line)"},children:[i.jsxs("button",{className:"btn danger",onClick:()=>s("reject"),disabled:n.isPending,children:[i.jsx(L,{name:"x",size:12})," Reject"]}),i.jsx("div",{className:"spacer"}),i.jsxs("button",{className:"btn primary",onClick:()=>s("approve"),disabled:t.isPending,children:[i.jsx(L,{name:"check",size:12})," Approve"]})]})]}),i.jsx(Ee,{open:r==="approve",title:"Approve this action?",body:i.jsx("span",{children:"The agent will be unblocked and the write will proceed."}),confirmLabel:"Approve",onClose:()=>s(null),onConfirm:()=>{t.mutate(e.action_id),s(null)}}),i.jsx(Ee,{open:r==="reject",title:"Reject this action?",body:i.jsx("span",{children:"The agent will see a rejection and the write will be cancelled."}),withReason:!0,reasonPlaceholder:"Why reject?",confirmLabel:"Reject",tone:"danger",onClose:()=>s(null),onConfirm:a=>{n.mutate({id:e.action_id,reason:a??"Rejected"}),s(null)}})]})}function d0({req:e}){const t=zt(o=>o.reviewerId),n=Xy(t),r=Zy(t),s=Ep(e.approver_ids),[l,a]=N.useState(null);return i.jsxs(i.Fragment,{children:[i.jsxs("article",{className:"queue-card card",children:[i.jsxs("div",{className:"card-body",style:{display:"flex",flexDirection:"column",gap:10},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,flexWrap:"wrap"},children:[i.jsx("span",{className:"policy-chip pending",children:"awaiting approval"}),i.jsxs("span",{className:"mono muted",style:{fontSize:11},children:["route ",e.route_id]}),i.jsx("span",{className:"mono muted",style:{fontSize:11,marginLeft:"auto"},children:nt(e.triggered_at)})]}),i.jsxs("div",{style:{display:"flex",alignItems:"baseline",gap:10,flexWrap:"wrap"},children:[i.jsxs("div",{className:"card-title",children:["Session ",i.jsx("code",{children:e.session_id})]}),i.jsxs("div",{className:"mono muted",style:{fontSize:12},children:["triggered by ",e.triggered_by]})]}),i.jsxs("dl",{className:"kv-grid",children:[i.jsx("dt",{children:"approvers"}),i.jsx("dd",{children:s.length?s.join(", "):"any"}),i.jsx("dt",{children:"votes"}),i.jsxs("dd",{children:[e.approved_count," approve · ",e.rejected_count," reject"]}),i.jsx("dt",{children:"request"}),i.jsx("dd",{children:e.request_id})]})]}),i.jsxs("footer",{className:"drawer-foot",style:{borderTop:"1px solid var(--line)"},children:[i.jsxs("button",{className:"btn danger",onClick:()=>a("reject"),disabled:r.isPending,children:[i.jsx(L,{name:"x",size:12})," Reject"]}),i.jsx("div",{className:"spacer"}),i.jsxs("button",{className:"btn primary",onClick:()=>a("approve"),disabled:n.isPending,children:[i.jsx(L,{name:"check",size:12})," Approve"]})]})]}),i.jsx(Ee,{open:l==="approve",title:"Approve this request?",body:i.jsxs("span",{children:["You are approving as ",i.jsx("strong",{children:t}),"."]}),withReason:!0,reasonPlaceholder:"Optional note",confirmLabel:"Approve",onClose:()=>a(null),onConfirm:o=>{n.mutate({requestId:e.request_id,reason:o}),a(null)}}),i.jsx(Ee,{open:l==="reject",title:"Reject this request?",body:i.jsx("span",{children:"The agent will see a rejection and stop."}),withReason:!0,reasonPlaceholder:"Why reject?",confirmLabel:"Reject",tone:"danger",onClose:()=>a(null),onConfirm:o=>{r.mutate({requestId:e.request_id,reason:o}),a(null)}})]})}function f0({req:e}){const t=zt(u=>u.reviewerId),n=Ep(e.escalation_targets),r=n.includes(t)?t:n[0]??t,s=px(r),[l,a]=N.useState(null),o=N.useMemo(()=>{const u=Lt(e.escalation_deadline);if(!u)return null;const d=u.getTime()-Date.now(),h=Math.round(d/6e4);return h<=0?{label:"deadline passed",overdue:!0}:h<60?{label:`deadline in ${h}m`,overdue:!1}:{label:`deadline in ${Math.round(h/60)}h`,overdue:!1}},[e.escalation_deadline]);return i.jsxs(i.Fragment,{children:[i.jsxs("article",{className:"queue-card card",children:[i.jsxs("div",{className:"card-body",style:{display:"flex",flexDirection:"column",gap:10},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,flexWrap:"wrap"},children:[i.jsx("span",{className:"policy-chip block",title:"Escalated",children:"escalated"}),o&&i.jsx("span",{className:"mono",style:{fontSize:11,color:o.overdue?"var(--err)":"var(--pending)"},children:o.label}),i.jsxs("span",{className:"mono muted",style:{fontSize:11,marginLeft:"auto"},children:["triggered ",nt(e.escalation_triggered_at)]})]}),i.jsxs("div",{style:{display:"flex",alignItems:"baseline",gap:10,flexWrap:"wrap"},children:[i.jsxs("div",{className:"card-title",children:["Session ",i.jsx("code",{children:e.session_id})]}),i.jsxs("div",{className:"mono muted",style:{fontSize:12},children:["from approval ",e.approval_request_id]})]}),i.jsxs("dl",{className:"kv-grid",children:[i.jsx("dt",{children:"targets"}),i.jsx("dd",{children:n.length?n.join(", "):"—"}),i.jsx("dt",{children:"deadline"}),i.jsx("dd",{children:e.escalation_deadline}),i.jsx("dt",{children:"request"}),i.jsx("dd",{children:e.request_id})]})]}),i.jsxs("footer",{className:"drawer-foot",style:{borderTop:"1px solid var(--line)"},children:[i.jsxs("button",{className:"btn danger",onClick:()=>a("block"),disabled:s.isPending,children:[i.jsx(L,{name:"x",size:12})," Block"]}),i.jsx("div",{className:"spacer"}),i.jsxs("button",{className:"btn primary",onClick:()=>a("proceed"),disabled:s.isPending,children:[i.jsx(L,{name:"check",size:12})," Allow to proceed"]})]})]}),i.jsx(Ee,{open:l==="proceed",title:"Allow this request to proceed?",body:i.jsxs("span",{children:["Agent will be unblocked as ",i.jsx("strong",{children:r}),"."]}),withReason:!0,reasonPlaceholder:"Optional note",confirmLabel:"Allow",onClose:()=>a(null),onConfirm:u=>{s.mutate({requestId:e.request_id,decision:"proceed",reason:u}),a(null)}}),i.jsx(Ee,{open:l==="block",title:"Block this request?",body:i.jsx("span",{children:"Agent will be denied and the session will remain paused."}),withReason:!0,reasonPlaceholder:"Why block?",confirmLabel:"Block",tone:"danger",onClose:()=>a(null),onConfirm:u=>{s.mutate({requestId:e.request_id,decision:"block",reason:u}),a(null)}})]})}function h0(){const{data:e,isLoading:t,isError:n,error:r}=Gy(),s=(e==null?void 0:e.policies)??{allowedPaths:[],blockedPaths:[],requireApproval:[],blockedCommands:[],maxBashOutputBytes:0};return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"page-header",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"page-title",children:"Policy"}),i.jsxs("p",{className:"page-sub",children:["Policies are read fresh on every tool call — edits to ",i.jsx("code",{className:"mono",children:"waymark.config.json"})," ","take effect immediately, with no restart required."]})]}),i.jsxs("div",{className:"page-meta",children:[(e==null?void 0:e.version)&&i.jsxs("span",{children:["version ",e.version]}),typeof s.maxBashOutputBytes=="number"&&i.jsxs("span",{children:["max stdout ",s.maxBashOutputBytes.toLocaleString()," bytes"]})]})]}),n&&i.jsxs("div",{className:"banner err",children:["Couldn't load policy. ",r instanceof Error?r.message:""]}),t&&!e?i.jsx(m0,{}):i.jsxs("div",{className:"policy-grid",children:[i.jsx(hi,{tone:"ok",iconName:"shield",title:"Allowed paths",description:"Agents may read and write files matching these globs.",rules:s.allowedPaths??[],kind:"path",emptyLabel:"No explicit allow list — default deny."}),i.jsx(hi,{tone:"err",iconName:"x",title:"Blocked paths",description:"Denied unconditionally. Checked before allowedPaths.",rules:s.blockedPaths??[],kind:"path",emptyLabel:"No blocked paths."}),i.jsx(hi,{tone:"pending",iconName:"bell",title:"Requires approval",description:"Writes here go pending until a reviewer decides.",rules:s.requireApproval??[],kind:"path",emptyLabel:"No paths require approval."}),i.jsx(hi,{tone:"err",iconName:"command",title:"Blocked commands",description:"Bash rules. Plain = substring match. Regex = i-flag JS regex.",rules:s.blockedCommands??[],kind:"command",emptyLabel:"No blocked commands."})]})]})}function hi({tone:e,iconName:t,title:n,description:r,rules:s,kind:l,emptyLabel:a}){const o=e==="ok"?"var(--ok)":e==="err"?"var(--err)":"var(--pending)";return i.jsxs("article",{className:"policy-card",children:[i.jsxs("div",{className:"policy-card-title",style:{display:"flex",alignItems:"center",gap:8,marginBottom:6},children:[i.jsx(L,{name:t,size:14,style:{color:o}}),i.jsx("span",{children:n}),i.jsx("span",{className:"chip mono",style:{marginLeft:"auto",color:"var(--ink-3)"},children:s.length})]}),i.jsx("p",{style:{fontSize:12,color:"var(--ink-3)",marginBottom:10},children:r}),s.length===0?i.jsx("div",{className:"muted mono",style:{fontSize:11.5},children:a}):i.jsx("ul",{style:{listStyle:"none"},children:s.map(u=>i.jsx(p0,{rule:u,kind:l},u))})]})}function p0({rule:e,kind:t}){const n=t==="command"&&e.startsWith("regex:"),r=n?e.slice(6):e,s=t==="path"?"glob":n?"regex":"plain";return i.jsxs("li",{className:"policy-rule",children:[i.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r}),i.jsx("span",{className:"tag",children:s})]})}function m0(){return i.jsx("div",{className:"policy-grid",children:Array.from({length:4}).map((e,t)=>i.jsxs("div",{className:"policy-card",children:[i.jsx("div",{className:"skeleton",style:{width:"40%",height:14,marginBottom:10}}),i.jsx("div",{className:"skeleton",style:{width:"90%",height:10,marginBottom:14}}),i.jsx("div",{className:"skeleton",style:{width:"70%",height:10,marginBottom:6}}),i.jsx("div",{className:"skeleton",style:{width:"60%",height:10,marginBottom:6}}),i.jsx("div",{className:"skeleton",style:{width:"80%",height:10}})]},t))})}const oa=30,hd=10*60*1e3;function v0(){const{data:e,isLoading:t,isError:n,error:r}=mx(),{data:s=[]}=Qr(),l=N.useMemo(()=>{const u=Date.now(),d=u-oa*hd,h=Array.from({length:oa},()=>({total:0,errors:0,blocked:0}));for(const p of s){const g=Lt(p.created_at);if(!g)continue;const m=g.getTime();if(m<d||m>u)continue;const w=Math.min(oa-1,Math.floor((m-d)/hd));h[w].total+=1,p.status==="error"&&(h[w].errors+=1),(p.status==="blocked"||p.decision==="block")&&(h[w].blocked+=1)}return h},[s]),a=l.reduce((u,d)=>u+d.total,0),o=l.reduce((u,d)=>u+d.errors+d.blocked,0);return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"page-header",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"page-title",children:"Stats"}),i.jsx("p",{className:"page-sub",children:"Activity across all sessions. Sparkline groups the last 5 hours into 10-minute buckets."})]}),i.jsxs("div",{className:"page-meta",children:[e&&i.jsxs("span",{children:[e.totalActions," total"]}),e&&i.jsxs("span",{children:[e.todayCount," today"]})]})]}),n&&i.jsxs("div",{className:"banner err",children:["Couldn't load stats. ",r instanceof Error?r.message:""]}),t&&!e?i.jsx(j0,{}):e?i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"stat-grid",children:[i.jsx(pi,{label:"Total actions",value:e.totalActions,sub:`${e.thisWeekCount} this week`}),i.jsx(pi,{label:"Pending",value:e.pendingCount,tone:e.pendingCount>0?"pending":void 0,sub:e.pendingCount>0?"agent paused":"all clear"}),i.jsx(pi,{label:"Rejected",value:e.rejectedCount,tone:e.rejectedCount>0?"err":void 0,sub:"this lifetime"}),i.jsx(pi,{label:"Approved",value:e.approvedCount,tone:e.approvedCount>0?"ok":void 0,sub:`${e.todayCount} today`})]}),i.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1.3fr 1fr",gap:14,marginBottom:18},children:[i.jsxs("section",{className:"card",children:[i.jsx("header",{className:"card-header",children:i.jsxs("div",{children:[i.jsx("div",{className:"card-title",children:"Activity"}),i.jsxs("div",{className:"card-sub",children:["Last 5 hours · ",a," action",a===1?"":"s",o>0&&`, ${o} red`]})]})}),i.jsxs("div",{className:"card-body",children:[i.jsx(g0,{buckets:l}),i.jsxs("div",{style:{display:"flex",justifyContent:"space-between",color:"var(--ink-3)",fontSize:10,fontFamily:"var(--font-mono)",marginTop:6},children:[i.jsx("span",{children:"5h ago"}),i.jsx("span",{children:"now"})]})]})]}),i.jsxs("section",{className:"card",children:[i.jsx("header",{className:"card-header",children:i.jsxs("div",{children:[i.jsx("div",{className:"card-title",children:"By tool"}),i.jsx("div",{className:"card-sub",children:"Top 5 tools across all sessions"})]})}),i.jsx("div",{className:"card-body",children:i.jsx(x0,{rows:e.topTools})})]})]}),i.jsxs("section",{className:"card",children:[i.jsx("header",{className:"card-header",children:i.jsxs("div",{children:[i.jsx("div",{className:"card-title",children:"Hot paths"}),i.jsx("div",{className:"card-sub",children:"Most frequently touched files"})]})}),i.jsx("div",{className:"card-body",children:e.topPaths.length===0?i.jsx("div",{className:"muted",children:"No path data yet."}):i.jsx("ul",{className:"list",style:{margin:"-6px -18px -18px"},children:e.topPaths.map(u=>i.jsxs("li",{children:[i.jsx(L,{name:"doc",size:14,style:{color:"var(--ink-3)"}}),i.jsx("span",{className:"mono",style:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:Sl(u.path,5)}),i.jsxs("span",{className:"mono muted",style:{fontSize:12},children:[u.count,"×"]})]},u.path))})})]})]}):null]})}function pi({label:e,value:t,sub:n,tone:r}){const s=r==="ok"?"var(--ok)":r==="err"?"var(--err)":r==="pending"?"var(--pending)":void 0;return i.jsxs("div",{className:"stat-card",children:[i.jsx("div",{className:"stat-label",children:e}),i.jsx("div",{className:"stat-value",style:{color:s},children:t}),i.jsx("div",{className:"stat-delta",children:n})]})}function g0({buckets:e}){const n=Math.max(1,...e.map(s=>s.total)),r=100/e.length;return i.jsx("svg",{className:"spark",style:{height:80,width:"100%"},viewBox:"0 0 100 80",preserveAspectRatio:"none",children:e.map((s,l)=>{const a=s.total/n*74,o=s.errors+s.blocked>0;return i.jsx("rect",{x:l*r+.3,y:80-a-2,width:Math.max(.5,r-.6),height:Math.max(1,a),rx:.6,fill:o?"var(--err)":"var(--acc)",opacity:o?.88:.55},l)})})}const y0={write_file:"doc",read_file:"eye",delete_file:"trash",bash:"command",copilot:"command"};function x0({rows:e}){if(e.length===0)return i.jsx("div",{className:"muted",children:"No tool usage yet."});const t=Math.max(...e.map(n=>n.count));return i.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:e.map(n=>{const r=y0[n.tool]??"command";return i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,fontSize:12},children:[i.jsxs("span",{className:"tool-tag","data-tool":n.tool,style:{minWidth:110},children:[i.jsx("span",{className:"tdot"}),i.jsx(L,{name:r,size:11}),n.tool]}),i.jsx("div",{style:{flex:1,height:8,background:"var(--bg-2)",borderRadius:3,overflow:"hidden"},children:i.jsx("div",{style:{width:`${n.count/t*100}%`,height:"100%",background:"var(--acc)",opacity:.7}})}),i.jsx("span",{className:"mono muted",style:{fontSize:11,width:32,textAlign:"right"},children:n.count})]},n.tool)})})}function j0(){return i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"stat-grid",children:Array.from({length:4}).map((e,t)=>i.jsxs("div",{className:"stat-card",children:[i.jsx("div",{className:"skeleton",style:{width:"50%",height:10,marginBottom:10}}),i.jsx("div",{className:"skeleton",style:{width:"30%",height:24,marginBottom:10}}),i.jsx("div",{className:"skeleton",style:{width:"70%",height:10}})]},t))}),i.jsx("div",{className:"card",style:{padding:18},children:i.jsx("div",{className:"skeleton",style:{width:"100%",height:80}})})]})}function w0({port:e,enabled:t}){const{data:n,isLoading:r,isError:s}=ux(e,t);if(!t)return i.jsx(pd,{label:"—",sub:"not running"});if(r&&!n)return i.jsx("div",{className:"skeleton",style:{width:110,height:30,borderRadius:6}});if(s||!n)return i.jsx(pd,{label:"—",sub:"unreachable",tone:"err"});const l=n.totalActions??0,a=n.pendingCount??0;return i.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center",fontSize:11.5,fontFamily:"var(--font-mono)"},children:[i.jsxs("span",{children:[i.jsx("strong",{style:{color:"var(--ink-1)"},children:l})," ",i.jsx("span",{className:"muted",children:"actions"})]}),a>0&&i.jsxs("span",{style:{color:"var(--pending)"},children:[i.jsx("strong",{children:a})," pending"]})]})}function pd({label:e,sub:t,tone:n}){return i.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-end",minWidth:90},children:[i.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:13,color:n==="err"?"var(--err)":"var(--ink-2)"},children:e}),t&&i.jsx("span",{className:"muted",style:{fontSize:10.5},children:t})]})}function S0(){const{data:e={},isLoading:t,isError:n,error:r}=Pu(),{data:s}=_u(),l=N.useMemo(()=>{const h=Object.values(e);return h.sort((p,g)=>{var c,f;const m=v=>v==="running"?0:v==="paused"?1:2,w=m(p.status)-m(g.status);if(w!==0)return w;const j=p.startedAt?((c=Lt(p.startedAt))==null?void 0:c.getTime())??0:0;return(g.startedAt?((f=Lt(g.startedAt))==null?void 0:f.getTime())??0:0)-j}),h},[e]),a=N.useMemo(()=>({total:l.length,running:l.filter(h=>h.status==="running").length,paused:l.filter(h=>h.status==="paused").length,stopped:l.filter(h=>h.status==="stopped").length}),[l]),o=hx(),[u,d]=N.useState(!1);return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"page-header",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"page-title",children:"Hub"}),i.jsx("p",{className:"page-sub",children:"Every Waymark instance registered on this machine. Open one, pause the agent, or stop the server — without leaving the dashboard you're already in."})]}),i.jsxs("div",{className:"page-meta",children:[i.jsxs("span",{children:[a.total," project",a.total===1?"":"s"]}),a.running>0&&i.jsxs("span",{className:"live",style:{color:"var(--ok)"},children:[a.running," running"]}),a.paused>0&&i.jsxs("span",{style:{color:"var(--pending)"},children:[a.paused," paused"]}),a.stopped>0&&i.jsxs("span",{children:[a.stopped," stopped"]})]})]}),n&&i.jsxs("div",{className:"banner err",children:["Couldn't load hub. ",r instanceof Error?r.message:""]}),i.jsxs("div",{className:"toolbar",children:[i.jsx("span",{className:"muted",style:{fontSize:12},children:"Live counts probe each peer every 5 s. Stopped projects keep their entry for 7 days."}),i.jsx("div",{className:"toolbar-spacer"}),i.jsxs("button",{className:"btn ghost",onClick:()=>d(!0),disabled:o.isPending||a.stopped===0,title:a.stopped===0?"No stopped projects to clean up":"Garbage collect stopped projects > 7 days old",children:[i.jsx(L,{name:"trash",size:12})," Clean up stopped"]})]}),t&&l.length===0?i.jsx("div",{className:"card",children:i.jsx("div",{className:"card-body",children:i.jsx("div",{className:"skeleton",style:{height:64}})})}):l.length===0?i.jsxs("div",{className:"empty",children:[i.jsx("div",{className:"empty-title",children:"No projects registered."}),i.jsxs("div",{className:"empty-sub",children:["Run ",i.jsx("code",{children:"npx @way_marks/cli init"})," + ",i.jsx("code",{children:"start"})," in another project to see it here."]})]}):i.jsx("div",{style:{display:"flex",flexDirection:"column",gap:10},children:l.map(h=>i.jsx(N0,{project:h,isCurrent:(s==null?void 0:s.projectName)===h.projectName&&(s==null?void 0:s.port)===h.port},h.id))}),i.jsx(Ee,{open:u,title:"Garbage collect stopped projects?",body:i.jsx("span",{children:"Removes registry entries for projects that have been stopped for more than 7 days. Has no effect on running or paused projects."}),confirmLabel:"Clean up",onClose:()=>d(!1),onConfirm:()=>{o.mutate(),d(!1)}})]})}function N0({project:e,isCurrent:t}){var h;const n=cx(),r=dx(),s=fx(),[l,a]=N.useState(!1),o=`http://localhost:${e.port}`,u=e.status==="running",d=e.status==="paused";return i.jsxs(i.Fragment,{children:[i.jsx("article",{className:J("card",t&&"live-card"),style:t?{borderColor:"oklch(0.74 0.13 155 / 0.4)"}:void 0,children:i.jsxs("div",{className:"card-body",style:{display:"grid",gridTemplateColumns:"auto 1fr auto auto",gap:14,alignItems:"center"},children:[i.jsx("div",{className:J("status-dot",!u&&"off"),"aria-hidden":!0,style:{background:u?"var(--ok)":d?"var(--pending)":"var(--ink-4)",boxShadow:u?void 0:"none",animation:u?void 0:"none"}}),i.jsxs("div",{style:{minWidth:0},children:[i.jsxs("div",{style:{display:"flex",gap:10,alignItems:"baseline",flexWrap:"wrap"},children:[i.jsx("span",{className:"card-title",children:e.projectName}),t&&i.jsx("span",{className:"policy-chip allow",children:"this dashboard"}),i.jsxs("span",{className:"muted mono",style:{fontSize:11},children:[":",e.port]}),i.jsx("span",{className:"muted mono",style:{fontSize:11},children:e.status})]}),i.jsxs("div",{className:"card-sub mono",style:{marginTop:2},children:[Sl(e.projectRoot,5),e.startedAt&&i.jsxs(i.Fragment,{children:[" · started ",nt(((h=Lt(e.startedAt))==null?void 0:h.toISOString())??null)]}),e.user&&i.jsxs(i.Fragment,{children:[" · ",e.user,"@",e.hostname??"local"]})]})]}),i.jsx(w0,{port:e.port,enabled:u}),i.jsxs("div",{style:{display:"flex",gap:6,flexShrink:0},children:[i.jsxs("a",{className:"btn",href:o,target:"_blank",rel:"noreferrer noopener","aria-label":`Open ${e.projectName}`,children:[i.jsx(L,{name:"external",size:12})," Open"]}),u&&i.jsx("button",{className:"btn ghost",onClick:()=>n.mutate(e.id),disabled:n.isPending,children:"Pause"}),d&&i.jsx("button",{className:"btn ghost",onClick:()=>r.mutate(e.id),disabled:r.isPending,children:"Resume"}),(u||d)&&!t&&i.jsxs("button",{className:"btn danger",onClick:()=>a(!0),disabled:s.isPending,children:[i.jsx(L,{name:"x",size:12})," Stop"]})]})]})}),i.jsx(Ee,{open:l,title:`Stop ${e.projectName}?`,body:i.jsxs("span",{children:["Sends SIGTERM to its MCP and API processes, releases port :",e.port,", and marks the registry entry as stopped. The agent in that project will lose its Waymark guard until you restart it."]}),confirmLabel:"Stop",tone:"danger",onClose:()=>a(!1),onConfirm:()=>{s.mutate(e.id),a(!1)}})]})}function k0(){const{theme:e,density:t,grouping:n,accent:r,reviewerId:s,setTheme:l,setDensity:a,setGrouping:o,setAccent:u,setReviewerId:d}=zt(),[h,p]=N.useState(s),g=h.trim()!==s;return i.jsxs(i.Fragment,{children:[i.jsx("h2",{children:"Preferences"}),i.jsxs("section",{className:"card",children:[i.jsx("header",{className:"card-header",children:i.jsxs("div",{children:[i.jsx("div",{className:"card-title",children:"Reviewer identity"}),i.jsx("div",{className:"card-sub",children:"Used when approving, rejecting, or deciding escalations. Must match an approver id in the route or escalation target list for the server to accept the decision."})]})}),i.jsxs("div",{className:"card-body",children:[i.jsxs("div",{className:"field",style:{maxWidth:360},children:[i.jsx("label",{htmlFor:"reviewer-id",children:"Your reviewer id"}),i.jsx("input",{id:"reviewer-id",value:h,placeholder:"alice@waymark.dev",onChange:m=>p(m.target.value)}),i.jsxs("span",{className:"hint",children:["Stored in ",i.jsx("code",{children:"localStorage"})," only — nothing is sent until you act."]})]}),i.jsxs("div",{style:{display:"flex",gap:8,marginTop:14},children:[i.jsxs("button",{className:"btn primary",disabled:!g||!h.trim(),onClick:()=>d(h.trim()),children:[i.jsx(L,{name:"check",size:12})," Save"]}),i.jsx("button",{className:"btn ghost",disabled:!g,onClick:()=>p(s),children:"Reset"})]})]})]}),i.jsxs("section",{className:"card",children:[i.jsx("header",{className:"card-header",children:i.jsxs("div",{children:[i.jsx("div",{className:"card-title",children:"Appearance"}),i.jsx("div",{className:"card-sub",children:"Same controls as the Tweaks popover in the topbar. Preferences are saved per browser."})]})}),i.jsxs("div",{className:"card-body",style:{display:"grid",gap:12},children:[i.jsx(mi,{label:"Theme",children:i.jsx(ua,{options:["dark","light"],value:e,onChange:l})}),i.jsx(mi,{label:"Density",children:i.jsx(ua,{options:["compact","comfy","spacious"],value:t,onChange:a})}),i.jsx(mi,{label:"Grouping",children:i.jsx(ua,{options:["session","flat"],value:n,onChange:o})}),i.jsx(mi,{label:"Accent",children:i.jsx("div",{className:"accent-swatches",children:Object.keys(Ls).map(m=>i.jsx("button",{className:J("accent-swatch",r===m&&"on"),style:{background:Ls[m].c},"aria-label":`Accent ${m}`,onClick:()=>u(m)},m))})})]})]})]})}function mi({label:e,children:t}){return i.jsxs("div",{className:"tweak-row",style:{padding:"6px 0"},children:[i.jsx("label",{children:e}),t]})}function ua({options:e,value:t,onChange:n}){return i.jsx("div",{className:"tweak-group",role:"group",children:e.map(r=>i.jsx("button",{className:J(t===r&&"on"),onClick:()=>n(r),type:"button",children:r},r))})}function C0(){const{data:e=[],isLoading:t,isError:n,error:r}=Ru(),s=ex(),l=tx(),[a,o]=N.useState(""),[u,d]=N.useState(""),[h,p]=N.useState(""),[g,m]=N.useState(""),[w,j]=N.useState(null),S=()=>{o(""),d(""),p(""),m("")},c=f=>{f.preventDefault(),!(!a.trim()||!u.trim()||!h.trim())&&s.mutate({member_id:a.trim(),name:u.trim(),email:h.trim(),slack_id:g.trim()||void 0},{onSuccess:S})};return i.jsxs(i.Fragment,{children:[i.jsx("h2",{children:"Team"}),i.jsxs("section",{className:"card",children:[i.jsx("header",{className:"card-header",children:i.jsxs("div",{children:[i.jsx("div",{className:"card-title",children:"Add member"}),i.jsx("div",{className:"card-sub",children:"Members can be referenced from approval routes and escalation targets by their member id."})]})}),i.jsxs("form",{className:"card-body",onSubmit:c,children:[i.jsxs("div",{className:"form-grid",children:[i.jsxs("div",{className:"field",children:[i.jsx("label",{htmlFor:"m-id",children:"Member id"}),i.jsx("input",{id:"m-id",required:!0,value:a,onChange:f=>o(f.target.value),placeholder:"alice"})]}),i.jsxs("div",{className:"field",children:[i.jsx("label",{htmlFor:"m-name",children:"Name"}),i.jsx("input",{id:"m-name",required:!0,value:u,onChange:f=>d(f.target.value),placeholder:"Alice Wong"})]}),i.jsxs("div",{className:"field",children:[i.jsx("label",{htmlFor:"m-email",children:"Email"}),i.jsx("input",{id:"m-email",type:"email",required:!0,value:h,onChange:f=>p(f.target.value),placeholder:"alice@waymark.dev"})]}),i.jsxs("div",{className:"field",children:[i.jsx("label",{htmlFor:"m-slack",children:"Slack id (optional)"}),i.jsx("input",{id:"m-slack",value:g,onChange:f=>m(f.target.value),placeholder:"U01ABCD23"})]})]}),i.jsxs("div",{style:{display:"flex",gap:8,marginTop:14},children:[i.jsxs("button",{className:"btn primary",type:"submit",disabled:s.isPending,children:[i.jsx(L,{name:"plus",size:12})," ",s.isPending?"Adding…":"Add member"]}),i.jsx("button",{className:"btn ghost",type:"button",onClick:S,disabled:s.isPending,children:"Reset"})]})]})]}),i.jsxs("section",{className:"card",children:[i.jsx("header",{className:"card-header",children:i.jsxs("div",{children:[i.jsx("div",{className:"card-title",children:"Members"}),i.jsxs("div",{className:"card-sub",children:[e.length," active"]})]})}),n?i.jsxs("div",{className:"banner err",style:{margin:18},children:["Couldn't load team. ",r instanceof Error?r.message:""]}):t&&e.length===0?i.jsx(E0,{}):e.length===0?i.jsx(_0,{title:"No members yet.",sub:"Add at least one member before configuring approval routes."}):i.jsx("ul",{className:"list",children:e.map(f=>i.jsxs("li",{children:[i.jsxs("div",{style:{flex:1,minWidth:0},children:[i.jsxs("div",{className:"list-title",children:[f.name," ",i.jsxs("span",{className:"muted mono",style:{fontSize:11},children:["· ",f.member_id]})]}),i.jsxs("div",{className:"list-sub",children:[f.email,f.slack_id?` · slack ${f.slack_id}`:""," · added ",nt(f.added_at)]})]}),i.jsxs("button",{className:"btn ghost","aria-label":`Remove ${f.name}`,onClick:()=>j(f.member_id),disabled:l.isPending,children:[i.jsx(L,{name:"trash",size:12})," Remove"]})]},f.member_id))})]}),i.jsx(Ee,{open:w!==null,title:"Remove this team member?",body:i.jsx("span",{children:"They'll stop appearing in approval routes and escalation targets."}),confirmLabel:"Remove",tone:"danger",onClose:()=>j(null),onConfirm:()=>{w&&l.mutate(w),j(null)}})]})}function E0(){return i.jsx("ul",{className:"list",children:Array.from({length:3}).map((e,t)=>i.jsxs("li",{style:{display:"block"},children:[i.jsx("div",{className:"skeleton",style:{width:"40%",height:12,marginBottom:6}}),i.jsx("div",{className:"skeleton",style:{width:"70%",height:10}})]},t))})}function _0({title:e,sub:t}){return i.jsxs("div",{className:"empty",style:{margin:18},children:[i.jsx("div",{className:"empty-title",children:e}),i.jsx("div",{className:"empty-sub",children:t})]})}function P0(e){if(!e)return[];try{const t=JSON.parse(e);return Array.isArray(t)?t.map(String):[]}catch{return[]}}function R0(){const{data:e=[],isLoading:t,isError:n,error:r}=nx(),{data:s=[]}=Ru(),l=rx(),a=sx(),[o,u]=N.useState(""),[d,h]=N.useState(""),[p,g]=N.useState(""),[m,w]=N.useState(""),[j,S]=N.useState(null),c=()=>{u(""),h(""),g(""),w("")},f=v=>{v.preventDefault();const y=p.split(",").map(k=>k.trim()).filter(Boolean);!o.trim()||!d.trim()||y.length===0||l.mutate({route_id:o.trim(),name:d.trim(),approver_ids:y,description:m.trim()||void 0},{onSuccess:c})};return i.jsxs(i.Fragment,{children:[i.jsx("h2",{children:"Approval routes"}),i.jsxs("section",{className:"card",children:[i.jsx("header",{className:"card-header",children:i.jsxs("div",{children:[i.jsx("div",{className:"card-title",children:"Add route"}),i.jsxs("div",{className:"card-sub",children:["Approver ids must match members. ",s.length>0&&`Available: ${s.map(v=>v.member_id).join(", ")}`]})]})}),i.jsxs("form",{className:"card-body",onSubmit:f,children:[i.jsxs("div",{className:"form-grid",children:[i.jsxs("div",{className:"field",children:[i.jsx("label",{htmlFor:"r-id",children:"Route id"}),i.jsx("input",{id:"r-id",required:!0,value:o,onChange:v=>u(v.target.value),placeholder:"prod-write-route"})]}),i.jsxs("div",{className:"field",children:[i.jsx("label",{htmlFor:"r-name",children:"Name"}),i.jsx("input",{id:"r-name",required:!0,value:d,onChange:v=>h(v.target.value),placeholder:"Production writes"})]}),i.jsxs("div",{className:"field",style:{gridColumn:"1 / -1"},children:[i.jsx("label",{htmlFor:"r-approvers",children:"Approver ids"}),i.jsx("input",{id:"r-approvers",required:!0,value:p,onChange:v=>g(v.target.value),placeholder:"alice, bob"}),i.jsx("span",{className:"hint",children:"Comma-separated list of member ids."})]}),i.jsxs("div",{className:"field",style:{gridColumn:"1 / -1"},children:[i.jsx("label",{htmlFor:"r-desc",children:"Description (optional)"}),i.jsx("input",{id:"r-desc",value:m,onChange:v=>w(v.target.value),placeholder:"Two-person review for production writes"})]})]}),i.jsxs("div",{style:{display:"flex",gap:8,marginTop:14},children:[i.jsxs("button",{className:"btn primary",type:"submit",disabled:l.isPending,children:[i.jsx(L,{name:"plus",size:12})," ",l.isPending?"Adding…":"Add route"]}),i.jsx("button",{className:"btn ghost",type:"button",onClick:c,disabled:l.isPending,children:"Reset"})]})]})]}),i.jsxs("section",{className:"card",children:[i.jsx("header",{className:"card-header",children:i.jsxs("div",{children:[i.jsx("div",{className:"card-title",children:"Routes"}),i.jsxs("div",{className:"card-sub",children:[e.length," configured"]})]})}),n?i.jsxs("div",{className:"banner err",style:{margin:18},children:["Couldn't load routes. ",r instanceof Error?r.message:""]}):t&&e.length===0?i.jsx("div",{className:"card-body",children:i.jsx("div",{className:"skeleton",style:{height:36}})}):e.length===0?i.jsxs("div",{className:"empty",style:{margin:18},children:[i.jsx("div",{className:"empty-title",children:"No routes yet."}),i.jsx("div",{className:"empty-sub",children:"Add a route to control which approvers see which kind of write."})]}):i.jsx("ul",{className:"list",children:e.map(v=>{const y=P0(v.approver_ids);return i.jsxs("li",{children:[i.jsxs("div",{style:{flex:1,minWidth:0},children:[i.jsxs("div",{className:"list-title",children:[v.name," ",i.jsxs("span",{className:"muted mono",style:{fontSize:11},children:["· ",v.route_id]})]}),i.jsxs("div",{className:"list-sub",children:[y.length," approver",y.length===1?"":"s"," (",y.join(", "),") · ",v.required_approvers," required · added ",nt(v.created_at)]}),v.description&&i.jsx("div",{style:{color:"var(--ink-2)",fontSize:12,marginTop:4},children:v.description})]}),i.jsxs("button",{className:"btn ghost","aria-label":`Delete ${v.name}`,onClick:()=>S(v.route_id),disabled:a.isPending,children:[i.jsx(L,{name:"trash",size:12})," Delete"]})]},v.route_id)})})]}),i.jsx(Ee,{open:j!==null,title:"Delete this route?",body:i.jsx("span",{children:"Existing approval requests using this route will not be affected."}),confirmLabel:"Delete",tone:"danger",onClose:()=>S(null),onConfirm:()=>{j&&a.mutate(j),S(null)}})]})}function b0(e){if(!e)return[];try{const t=JSON.parse(e);return Array.isArray(t)?t.map(String):[]}catch{return[]}}function T0(){const{data:e=[],isLoading:t,isError:n,error:r}=ix(),{data:s=[]}=Ru(),l=lx(),a=ax(),[o,u]=N.useState(""),[d,h]=N.useState(""),[p,g]=N.useState(""),[m,w]=N.useState("24"),[j,S]=N.useState(""),[c,f]=N.useState(null),v=()=>{u(""),h(""),g(""),w("24"),S("")},y=k=>{k.preventDefault();const E=p.split(",").map(_=>_.trim()).filter(Boolean);if(!o.trim()||!d.trim()||E.length===0)return;const C=Number.parseInt(m,10);l.mutate({rule_id:o.trim(),name:d.trim(),escalation_targets:E,description:j.trim()||void 0,timeout_hours:Number.isFinite(C)?C:void 0},{onSuccess:v})};return i.jsxs(i.Fragment,{children:[i.jsx("h2",{children:"Escalation rules"}),i.jsxs("section",{className:"card",children:[i.jsx("header",{className:"card-header",children:i.jsxs("div",{children:[i.jsx("div",{className:"card-title",children:"Add rule"}),i.jsxs("div",{className:"card-sub",children:["When an approval request times out, it's routed to the listed targets.",s.length>0&&` Available: ${s.map(k=>k.member_id).join(", ")}`]})]})}),i.jsxs("form",{className:"card-body",onSubmit:y,children:[i.jsxs("div",{className:"form-grid",children:[i.jsxs("div",{className:"field",children:[i.jsx("label",{htmlFor:"e-id",children:"Rule id"}),i.jsx("input",{id:"e-id",required:!0,value:o,onChange:k=>u(k.target.value),placeholder:"security-escalation"})]}),i.jsxs("div",{className:"field",children:[i.jsx("label",{htmlFor:"e-name",children:"Name"}),i.jsx("input",{id:"e-name",required:!0,value:d,onChange:k=>h(k.target.value),placeholder:"Security lead override"})]}),i.jsxs("div",{className:"field",style:{gridColumn:"1 / -1"},children:[i.jsx("label",{htmlFor:"e-targets",children:"Targets"}),i.jsx("input",{id:"e-targets",required:!0,value:p,onChange:k=>g(k.target.value),placeholder:"security-lead, oncall"}),i.jsx("span",{className:"hint",children:"Comma-separated member ids."})]}),i.jsxs("div",{className:"field",children:[i.jsx("label",{htmlFor:"e-timeout",children:"Timeout (hours)"}),i.jsx("input",{id:"e-timeout",type:"number",min:1,value:m,onChange:k=>w(k.target.value)})]}),i.jsxs("div",{className:"field",style:{gridColumn:"span 2"},children:[i.jsx("label",{htmlFor:"e-desc",children:"Description (optional)"}),i.jsx("input",{id:"e-desc",value:j,onChange:k=>S(k.target.value)})]})]}),i.jsxs("div",{style:{display:"flex",gap:8,marginTop:14},children:[i.jsxs("button",{className:"btn primary",type:"submit",disabled:l.isPending,children:[i.jsx(L,{name:"plus",size:12})," ",l.isPending?"Adding…":"Add rule"]}),i.jsx("button",{className:"btn ghost",type:"button",onClick:v,disabled:l.isPending,children:"Reset"})]})]})]}),i.jsxs("section",{className:"card",children:[i.jsx("header",{className:"card-header",children:i.jsxs("div",{children:[i.jsx("div",{className:"card-title",children:"Rules"}),i.jsxs("div",{className:"card-sub",children:[e.length," configured"]})]})}),n?i.jsxs("div",{className:"banner err",style:{margin:18},children:["Couldn't load rules. ",r instanceof Error?r.message:""]}):t&&e.length===0?i.jsx("div",{className:"card-body",children:i.jsx("div",{className:"skeleton",style:{height:36}})}):e.length===0?i.jsxs("div",{className:"empty",style:{margin:18},children:[i.jsx("div",{className:"empty-title",children:"No rules yet."}),i.jsx("div",{className:"empty-sub",children:"Add a rule so approvals don't sit forever when reviewers are offline."})]}):i.jsx("ul",{className:"list",children:e.map(k=>{const E=b0(k.escalation_targets);return i.jsxs("li",{children:[i.jsxs("div",{style:{flex:1,minWidth:0},children:[i.jsxs("div",{className:"list-title",children:[k.name," ",i.jsxs("span",{className:"muted mono",style:{fontSize:11},children:["· ",k.rule_id]})]}),i.jsxs("div",{className:"list-sub",children:[E.length," target",E.length===1?"":"s"," (",E.join(", "),") · timeout ",k.timeout_hours,"h · added ",nt(k.created_at)]}),k.description&&i.jsx("div",{style:{color:"var(--ink-2)",fontSize:12,marginTop:4},children:k.description})]}),i.jsxs("button",{className:"btn ghost","aria-label":`Delete ${k.name}`,onClick:()=>f(k.rule_id),disabled:a.isPending,children:[i.jsx(L,{name:"trash",size:12})," Delete"]})]},k.rule_id)})})]}),i.jsx(Ee,{open:c!==null,title:"Delete this rule?",body:i.jsx("span",{children:"Existing escalation requests using this rule will not be affected."}),confirmLabel:"Delete",tone:"danger",onClose:()=>f(null),onConfirm:()=>{c&&a.mutate(c),f(null)}})]})}function I0(){var s,l;const{data:e,isLoading:t,isError:n,error:r}=ox();return i.jsxs(i.Fragment,{children:[i.jsx("h2",{children:"Remediation blocks"}),i.jsxs("section",{className:"card",children:[i.jsx("header",{className:"card-header",children:i.jsxs("div",{children:[i.jsx("div",{className:"card-title",children:"Auto-blocks"}),i.jsxs("div",{className:"card-sub",children:["Risk-engine-derived rules that auto-block sessions exhibiting suspicious patterns. Configure thresholds in ",i.jsx("code",{children:"waymark.config.json"}),"."]})]})}),i.jsx("div",{className:"card-body",children:n?i.jsxs("div",{className:"banner err",children:["Couldn't load blocks. ",r instanceof Error?r.message:""]}):t?i.jsx("div",{className:"skeleton",style:{height:36}}):e!=null&&e.message&&(((s=e.blocks)==null?void 0:s.length)??0)===0?i.jsxs("div",{className:"empty",children:[i.jsx("div",{className:"empty-title",children:"Auto-block storage not yet implemented."}),i.jsx("div",{className:"empty-sub",children:e.message})]}):(((l=e==null?void 0:e.blocks)==null?void 0:l.length)??0)===0?i.jsxs("div",{className:"empty",children:[i.jsx("div",{className:"empty-title",children:"No auto-blocks active."}),i.jsx("div",{className:"empty-sub",children:"Once the risk engine flags a session, blocks appear here."})]}):i.jsx("pre",{className:"code-block",children:JSON.stringify(e==null?void 0:e.blocks,null,2)})})]})]})}function O0(){const{data:e}=_u(),{data:t={},isLoading:n,isError:r,error:s}=Pu(),l=Object.values(t);return i.jsxs(i.Fragment,{children:[i.jsx("h2",{children:"Projects"}),i.jsxs("section",{className:"card",children:[i.jsx("header",{className:"card-header",children:i.jsxs("div",{children:[i.jsx("div",{className:"card-title",children:"Current project"}),i.jsx("div",{className:"card-sub",children:"The Waymark instance serving this dashboard."})]})}),i.jsx("div",{className:"card-body",children:e?i.jsxs("dl",{className:"kv-grid",style:{gridTemplateColumns:"140px 1fr"},children:[i.jsx("dt",{children:"name"}),i.jsx("dd",{children:e.projectName}),i.jsx("dt",{children:"port"}),i.jsxs("dd",{children:[":",e.port]}),e.projectRoot&&i.jsxs(i.Fragment,{children:[i.jsx("dt",{children:"root"}),i.jsx("dd",{children:e.projectRoot})]})]}):i.jsx("div",{className:"muted",children:"Loading…"})})]}),i.jsxs("section",{className:"card",children:[i.jsx("header",{className:"card-header",children:i.jsxs("div",{children:[i.jsx("div",{className:"card-title",children:"Hub"}),i.jsx("div",{className:"card-sub",children:"Other Waymark instances on this machine. Click to open."})]})}),r?i.jsxs("div",{className:"banner err",style:{margin:18},children:["Couldn't load hub. ",s instanceof Error?s.message:""]}):n&&l.length===0?i.jsx("div",{className:"card-body",children:i.jsx("div",{className:"skeleton",style:{height:36}})}):l.length===0?i.jsxs("div",{className:"empty",style:{margin:18},children:[i.jsx("div",{className:"empty-title",children:"No other projects."}),i.jsxs("div",{className:"empty-sub",children:["Run ",i.jsx("code",{children:"npx @way_marks/cli start"})," in another project to register it here."]})]}):i.jsx("ul",{className:"list",children:l.map(a=>{const o=a.startedAt?Lt(a.startedAt):null,u=a.status==="running",d=`http://localhost:${a.port}/`;return i.jsxs("li",{children:[i.jsxs("div",{style:{flex:1,minWidth:0},children:[i.jsxs("div",{className:"list-title",style:{display:"flex",gap:8,alignItems:"center"},children:[i.jsx("span",{className:J("status-dot",!u&&"off"),"aria-hidden":!0}),a.projectName,i.jsxs("span",{className:"muted mono",style:{fontSize:11},children:["· :",a.port]})]}),i.jsxs("div",{className:"list-sub",children:[Sl(a.projectRoot,4),o&&` · started ${nt(o.toISOString())}`]})]}),i.jsxs("a",{className:"btn ghost",href:d,target:"_blank",rel:"noreferrer noopener","aria-label":`Open ${a.projectName} dashboard`,children:[i.jsx(L,{name:"external",size:12})," Open"]})]},a.id)})})]})]})}const M0=[{to:"preferences",label:"Preferences",icon:"sliders"},{to:"team",label:"Team",icon:"team"},{to:"approval-routes",label:"Approval routes",icon:"approvals"},{to:"escalation-rules",label:"Escalation rules",icon:"bell"},{to:"remediation",label:"Remediation blocks",icon:"shield"},{to:"projects",label:"Projects",icon:"folder"}];function L0(){return i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"page-header",children:i.jsxs("div",{children:[i.jsx("h1",{className:"page-title",children:"Settings"}),i.jsx("p",{className:"page-sub",children:"Team, approval routing, escalation rules, and per-workspace preferences. Everything here is project-local."})]})}),i.jsxs("div",{className:"settings",children:[i.jsx("nav",{className:"settings-nav","aria-label":"Settings",children:M0.map(e=>i.jsxs(io,{to:e.to,className:({isActive:t})=>J(t&&"active"),end:!1,children:[i.jsx(L,{name:e.icon,size:14}),i.jsx("span",{children:e.label})]},e.to))}),i.jsx("div",{className:"settings-section",children:i.jsxs(Xh,{children:[i.jsx(Ne,{index:!0,element:i.jsx(Hg,{to:"preferences",replace:!0})}),i.jsx(Ne,{path:"preferences",element:i.jsx(k0,{})}),i.jsx(Ne,{path:"team",element:i.jsx(C0,{})}),i.jsx(Ne,{path:"approval-routes",element:i.jsx(R0,{})}),i.jsx(Ne,{path:"escalation-rules",element:i.jsx(T0,{})}),i.jsx(Ne,{path:"remediation",element:i.jsx(I0,{})}),i.jsx(Ne,{path:"projects",element:i.jsx(O0,{})})]})})]})]})}function F0(e){const t=Math.floor((Date.now()-e)/1e3);return t<60?`${t}s`:t<3600?`${Math.floor(t/60)}m`:t<86400?`${Math.floor(t/3600)}h`:`${Math.floor(t/86400)}d`}function A0(e){switch(e){case"thinking":case"running":case"executing":return"badge-executing";case"waiting":case"pending":case"idle":return"badge-waiting";case"done":case"completed":return"badge-ok";case"error":return"badge-err";default:return"badge-default"}}function z0(e){return e===0?"—":e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function D0({session:e,selected:t,onClick:n}){var l;const r=(e.totalInputTokens??0)+(e.totalOutputTokens??0),s=((l=e.currentTasks)==null?void 0:l[0])??null;return i.jsxs("div",{className:J("session-card",t&&"selected"),onClick:n,role:"button",tabIndex:0,onKeyDown:a=>a.key==="Enter"&&(n==null?void 0:n()),"aria-selected":t,children:[i.jsxs("div",{className:"session-card-header",children:[i.jsx("span",{className:J("badge",A0(e.status)),children:e.status}),i.jsx("span",{className:"session-agent",children:e.agentCli}),i.jsxs("span",{className:"session-pid",children:["PID ",e.pid]}),i.jsx("span",{className:"session-age",children:F0(e.startedAt)})]}),i.jsx("div",{className:"session-project",children:e.projectName||e.cwd}),s&&i.jsx("div",{className:"session-task",children:s}),i.jsxs("div",{className:"session-metrics",children:[i.jsxs("div",{className:"metric-item",children:[i.jsx("div",{className:"metric-label",children:"Context"}),i.jsx("div",{className:"context-bar",children:i.jsx("div",{className:J("context-fill",e.contextPercent>80&&"context-fill-warn"),style:{width:`${Math.min(100,e.contextPercent)}%`}})}),i.jsxs("div",{className:"metric-value",children:[Math.round(e.contextPercent),"%"]})]}),i.jsxs("div",{className:"metric-item",children:[i.jsx("div",{className:"metric-label",children:"Tokens"}),i.jsx("div",{className:"metric-value",children:z0(r)})]}),i.jsxs("div",{className:"metric-item",children:[i.jsx("div",{className:"metric-label",children:"Turns"}),i.jsx("div",{className:"metric-value",children:e.turnCount})]}),e.memMb>0&&i.jsxs("div",{className:"metric-item",children:[i.jsx("div",{className:"metric-label",children:"Mem"}),i.jsxs("div",{className:"metric-value",children:[Math.round(e.memMb)," MB"]})]})]}),(e.gitBranch||e.gitAdded+e.gitModified>0)&&i.jsxs("div",{className:"session-git",children:[e.gitBranch&&i.jsxs("span",{className:"git-branch",children:["⎇ ",e.gitBranch]}),e.gitAdded>0&&i.jsxs("span",{className:"git-added",children:["+",e.gitAdded]}),e.gitModified>0&&i.jsxs("span",{className:"git-modified",children:["~",e.gitModified]})]}),e.model&&i.jsx("div",{className:"session-model",children:e.model})]})}function md({label:e,pct:t}){const n=t>=90?"pill-danger":t>=60?"pill-warn":"pill-ok";return i.jsxs("span",{className:J("rate-pill",n),children:[e,": ",Math.round(t),"%"]})}function U0({rateLimits:e}){return e.length===0?i.jsx("div",{className:"rate-limit-empty",children:"No rate limit data — install the abtop StatusLine hook to enable."}):i.jsx("div",{className:"rate-limit-badges",children:e.map(t=>i.jsxs("div",{className:"rate-limit-row",children:[i.jsx("span",{className:"rate-source",children:t.source}),i.jsx(md,{label:"5h",pct:t.fiveHour.usedPercent}),t.sevenDay&&i.jsx(md,{label:"7d",pct:t.sevenDay.usedPercent}),i.jsxs("span",{className:"rate-reset",children:["resets ",new Date(t.fiveHour.resetsAtIso).toLocaleTimeString()]})]},t.source))})}function $0({agentPorts:e,orphanPorts:t}){return e.length>0||t.length>0?i.jsxs("div",{className:"ports-list",children:[e.length>0&&i.jsxs("section",{children:[i.jsx("h3",{className:"ports-section-title",children:"Agent ports"}),i.jsxs("table",{className:"ports-table",children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{children:"Port"}),i.jsx("th",{children:"PID"}),i.jsx("th",{children:"Agent"}),i.jsx("th",{children:"Command"}),i.jsx("th",{children:"Session"})]})}),i.jsx("tbody",{children:e.map(r=>i.jsxs("tr",{children:[i.jsx("td",{children:r.port}),i.jsx("td",{children:r.pid}),i.jsx("td",{children:r.agentCli}),i.jsx("td",{children:i.jsx("code",{children:r.command})}),i.jsx("td",{className:"port-session-id",children:r.sessionId})]},`${r.pid}-${r.port}`))})]})]}),t.length>0&&i.jsxs("section",{children:[i.jsx("h3",{className:"ports-section-title orphan",children:"Orphan ports (no live session)"}),i.jsxs("table",{className:"ports-table",children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{children:"Port"}),i.jsx("th",{children:"PID"}),i.jsx("th",{children:"Command"}),i.jsx("th",{children:"Last project"})]})}),i.jsx("tbody",{children:t.map(r=>i.jsxs("tr",{className:"orphan-row",children:[i.jsx("td",{children:r.port}),i.jsx("td",{children:r.pid}),i.jsx("td",{children:i.jsx("code",{children:r.command})}),i.jsx("td",{children:r.projectName||"—"})]},`${r.pid}-${r.port}`))})]})]})]}):i.jsx("div",{className:"ports-empty",children:"No agent-held ports detected."})}const _p=new Set(["thinking","executing"]),B0=new Set(["waiting","rateLimited"]),Q0=new Set(["done"]);function W0(e,t){return t==="all"?!0:t==="active"?_p.has(e.status):t==="waiting"?B0.has(e.status):t==="done"?Q0.has(e.status):!0}function H0(){const[e,t]=N.useState("all"),[n,r]=N.useState("all"),[s,l]=N.useState("sessions"),[a,o]=N.useState(null),{data:u,isLoading:d,isError:h,error:p,dataUpdatedAt:g}=gx(),m=((u==null?void 0:u.sessions)??[]).filter(c=>!(e!=="all"&&c.agentCli!==e||!W0(c,n))),w=((u==null?void 0:u.sessions)??[]).filter(c=>_p.has(c.status)),j=m.find(c=>c.sessionId===a)??null,S=g?new Date(g).toLocaleTimeString():null;return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"page-header",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"page-title",children:"Agent Monitor"}),i.jsx("p",{className:"page-sub",children:"Live view of running AI agent sessions (Claude, Codex, GitHub Copilot CLI). Refreshes every 3 seconds."})]}),i.jsxs("div",{className:"page-meta",children:[i.jsxs("span",{children:[((u==null?void 0:u.sessions)??[]).length," total"]}),w.length>0&&i.jsxs("span",{className:"badge-ok",children:[w.length," active"]}),S&&i.jsxs("span",{className:"text-muted",children:["updated ",S]})]})]}),h&&i.jsxs("div",{className:"banner err",children:["Cannot reach agent monitor. ",p instanceof Error?p.message:""]}),i.jsx("div",{className:"tab-row",role:"tablist",children:["sessions","rate-limits","ports"].map(c=>i.jsx("button",{role:"tab","aria-selected":s===c,className:J("tab-btn",s===c&&"active"),onClick:()=>l(c),children:c==="sessions"?`Sessions (${m.length})`:c==="rate-limits"?"Rate Limits":"Ports"},c))}),s==="sessions"&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"filter-row",children:[i.jsx("div",{className:"filter-group",role:"group","aria-label":"Agent filter",children:["all","claude","codex","copilot"].map(c=>i.jsx("button",{className:J("filter-btn",e===c&&"active"),onClick:()=>t(c),children:c},c))}),i.jsx("div",{className:"filter-group",role:"group","aria-label":"Status filter",children:["all","active","waiting","done"].map(c=>i.jsx("button",{className:J("filter-btn",n===c&&"active"),onClick:()=>r(c),children:c},c))})]}),d&&!u?i.jsxs("div",{className:"empty-state",children:[i.jsx(L,{name:"agent",size:32}),i.jsx("p",{children:"Loading agent sessions…"})]}):m.length===0?i.jsxs("div",{className:"empty-state",children:[i.jsx(L,{name:"agent",size:32}),i.jsx("p",{children:"No agent sessions found."}),e!=="all"&&i.jsxs("p",{className:"text-muted",children:["Filtered by: ",e]}),n!=="all"&&i.jsxs("p",{className:"text-muted",children:["Status: ",n]})]}):i.jsx("div",{className:"session-grid",children:m.map(c=>i.jsx(D0,{session:c,selected:c.sessionId===a,onClick:()=>o(c.sessionId===a?null:c.sessionId)},c.sessionId))}),j&&i.jsxs("div",{className:"session-detail",children:[i.jsxs("div",{className:"detail-header",children:[i.jsxs("h2",{className:"detail-title",children:["Session detail — ",j.agentCli]}),i.jsx("button",{className:"btn ghost",onClick:()=>o(null),children:i.jsx(L,{name:"x",size:14})})]}),i.jsxs("dl",{className:"detail-grid",children:[i.jsx("dt",{children:"Session ID"}),i.jsx("dd",{children:i.jsx("code",{children:j.sessionId})}),i.jsx("dt",{children:"PID"}),i.jsx("dd",{children:j.pid}),i.jsx("dt",{children:"CWD"}),i.jsx("dd",{children:i.jsx("code",{children:j.cwd})}),i.jsx("dt",{children:"Model"}),i.jsx("dd",{children:j.model||"—"}),i.jsx("dt",{children:"Turns"}),i.jsx("dd",{children:j.turnCount}),i.jsx("dt",{children:"Compactions"}),i.jsx("dd",{children:j.compactionCount}),i.jsx("dt",{children:"Context window"}),i.jsxs("dd",{children:[(j.contextWindow??0).toLocaleString()," tokens"]}),i.jsx("dt",{children:"Input tokens"}),i.jsx("dd",{children:(j.totalInputTokens??0).toLocaleString()}),i.jsx("dt",{children:"Output tokens"}),i.jsx("dd",{children:(j.totalOutputTokens??0).toLocaleString()}),(j.totalCacheRead??0)>0&&i.jsxs(i.Fragment,{children:[i.jsx("dt",{children:"Cache read"}),i.jsx("dd",{children:j.totalCacheRead.toLocaleString()})]}),j.version&&i.jsxs(i.Fragment,{children:[i.jsx("dt",{children:"Version"}),i.jsx("dd",{children:j.version})]})]}),(j.toolCalls??[]).length>0&&i.jsxs("div",{className:"detail-section",children:[i.jsx("h3",{children:"Recent tool calls"}),i.jsx("ul",{className:"tool-calls-list",children:(j.toolCalls??[]).slice(0,20).map((c,f)=>i.jsxs("li",{className:"tool-call-item",children:[i.jsx("code",{children:c.name}),i.jsx("span",{className:"tool-arg",children:c.arg}),c.durationMs>0&&i.jsxs("span",{className:"tool-duration",children:[c.durationMs,"ms"]})]},f))})]}),(j.fileAccesses??[]).length>0&&i.jsxs("div",{className:"detail-section",children:[i.jsx("h3",{children:"File accesses"}),i.jsx("ul",{className:"file-access-list",children:(j.fileAccesses??[]).slice(0,30).map((c,f)=>i.jsxs("li",{className:"file-access-item",children:[i.jsx("span",{className:"fa-op",children:c.operation}),i.jsx("code",{children:c.path})]},f))})]}),(j.children??[]).length>0&&i.jsxs("div",{className:"detail-section",children:[i.jsx("h3",{children:"Child processes"}),i.jsx("ul",{className:"children-list",children:(j.children??[]).map(c=>i.jsxs("li",{children:[i.jsx("code",{children:c.command})," (PID ",c.pid,")",c.port&&i.jsxs(i.Fragment,{children:[" · port ",c.port]}),c.memKb>0&&i.jsxs(i.Fragment,{children:[" · ",Math.round(c.memKb/1024)," MB"]})]},c.pid))})]})]})]}),s==="rate-limits"&&i.jsx("div",{className:"tab-content",children:i.jsx(U0,{rateLimits:(u==null?void 0:u.rateLimits)??[]})}),s==="ports"&&i.jsx("div",{className:"tab-content",children:i.jsx($0,{agentPorts:(u==null?void 0:u.sessions.flatMap(c=>(c.children??[]).filter(f=>f.port).map(f=>({port:f.port,pid:f.pid,command:f.command,sessionId:c.sessionId,agentCli:c.agentCli}))))??[],orphanPorts:(u==null?void 0:u.orphanPorts)??[]})})]})}function K0(){return n0(),i.jsx(Zx,{topbar:i.jsx(t0,{}),children:i.jsxs(Xh,{children:[i.jsx(Ne,{path:"/",element:i.jsx(l0,{})}),i.jsx(Ne,{path:"/sessions",element:i.jsx(o0,{})}),i.jsx(Ne,{path:"/approvals",element:i.jsx(u0,{})}),i.jsx(Ne,{path:"/policy",element:i.jsx(h0,{})}),i.jsx(Ne,{path:"/stats",element:i.jsx(v0,{})}),i.jsx(Ne,{path:"/hub",element:i.jsx(S0,{})}),i.jsx(Ne,{path:"/agents",element:i.jsx(H0,{})}),i.jsx(Ne,{path:"/settings/*",element:i.jsx(L0,{})})]})})}const q0=new Ty({defaultOptions:{queries:{staleTime:1e3,refetchOnWindowFocus:!1,retry:1}}}),Pp=document.getElementById("root");if(!Pp)throw new Error("#root not found");Bh(Pp).render(i.jsx(N.StrictMode,{children:i.jsx(Iy,{client:q0,children:i.jsx(ey,{children:i.jsx(Vy,{children:i.jsx(K0,{})})})})}));