From eba4b1dc1d4f3be12669408028f37e893fcc8079 Mon Sep 17 00:00:00 2001 From: legop3 Date: Sun, 19 Jul 2026 20:52:50 -0400 Subject: [PATCH 1/2] add realtime upload/download host stats --- pi/roverd/host_stats.go | 99 +++++++++++- pi/roverd/host_stats_test.go | 79 ++++++++++ pi/roverd/wsclient.go | 9 +- server/public/assets/index-C-g10Rjz.js | 148 ++++++++++++++++++ server/public/assets/index-C-g10Rjz.js.map | 1 + server/public/assets/index-DY2RJqPm.js | 148 ------------------ server/public/assets/index-DY2RJqPm.js.map | 1 - server/public/index.html | 2 +- to-do.md | 10 +- .../src/components/PiHostStatsCard/index.jsx | 33 +++- 10 files changed, 363 insertions(+), 167 deletions(-) create mode 100644 pi/roverd/host_stats_test.go create mode 100644 server/public/assets/index-C-g10Rjz.js create mode 100644 server/public/assets/index-C-g10Rjz.js.map delete mode 100644 server/public/assets/index-DY2RJqPm.js delete mode 100644 server/public/assets/index-DY2RJqPm.js.map diff --git a/pi/roverd/host_stats.go b/pi/roverd/host_stats.go index 2b1834b4..e13afc6a 100644 --- a/pi/roverd/host_stats.go +++ b/pi/roverd/host_stats.go @@ -3,6 +3,7 @@ package roverd import ( "bufio" "context" + "errors" "fmt" "math" "os" @@ -14,7 +15,7 @@ import ( ) const ( - hostStatsInterval = 5 * time.Second + hostStatsInterval = 1 * time.Second rootFilesystem = "/" ) @@ -63,7 +64,24 @@ type WiFiStats struct { TXBytes *uint64 `json:"txBytes,omitempty"` RXPackets *uint64 `json:"rxPackets,omitempty"` TXPackets *uint64 `json:"txPackets,omitempty"` + DownloadMbps *float64 `json:"downloadMbps,omitempty"` + UploadMbps *float64 `json:"uploadMbps,omitempty"` InactiveMs *int `json:"inactiveMs,omitempty"` + + // networkSampledAt records the instant associated with the kernel byte + // counters. Keeping it out of JSON lets the websocket loop calculate rates + // with monotonic Go timestamps without expanding the browser contract with + // an implementation-only value. + networkSampledAt time.Time +} + +// networkRateSample is scoped to one rover websocket connection. A new +// connection intentionally starts a new baseline so counters from an old boot +// or network interface lifetime can never create an artificial traffic spike. +type networkRateSample struct { + rxBytes uint64 + txBytes uint64 + sampledAt time.Time } // CollectHostStats gathers every source independently so one missing kernel @@ -370,12 +388,81 @@ func collectWiFiStats(ctx context.Context) (*WiFiStats, error) { return nil, err } - // The interface is used only to ask iw about the active connection. It is - // not copied into WiFiStats because the UI does not need to expose it. - if err := enrichWiFiWithIW(ctx, iface, stats); err != nil { - return stats, err + // The interface is used only for local collection. It is not copied into + // WiFiStats because the UI does not need to expose Linux device names. + iwErr := enrichWiFiWithIW(ctx, iface, stats) + + // Read the kernel counters after iw because iw also provides cumulative + // station counters. The kernel interface values deliberately win: they are + // the host-traffic source used for both the cumulative display and Mbps math. + // Link capacity still comes independently from iw's bitrate fields. + counterErr := enrichWiFiWithNetworkCounters(iface, stats) + return stats, errors.Join(counterErr, iwErr) +} + +func enrichWiFiWithNetworkCounters(iface string, stats *WiFiStats) error { + basePath := "/sys/class/net/" + iface + "/statistics/" + rxBytes, err := readUintFile(basePath + "rx_bytes") + if err != nil { + return fmt.Errorf("read %s receive bytes: %w", iface, err) } - return stats, nil + txBytes, err := readUintFile(basePath + "tx_bytes") + if err != nil { + return fmt.Errorf("read %s transmit bytes: %w", iface, err) + } + + stats.RXBytes = &rxBytes + stats.TXBytes = &txBytes + // Capture the timestamp immediately beside the counter reads so unrelated + // host-stat collection latency cannot distort the elapsed-time divisor. + stats.networkSampledAt = time.Now() + return nil +} + +func readUintFile(path string) (uint64, error) { + raw, err := os.ReadFile(path) + if err != nil { + return 0, err + } + return strconv.ParseUint(strings.TrimSpace(string(raw)), 10, 64) +} + +func applyNetworkThroughput(stats *WiFiStats, previous *networkRateSample) *networkRateSample { + if stats == nil || stats.RXBytes == nil || stats.TXBytes == nil || stats.networkSampledAt.IsZero() { + // Do not discard the last valid baseline during a temporary read failure. + // The next successful calculation then covers the full elapsed interval and + // remains an accurate average for all traffic transferred during the gap. + return previous + } + + current := &networkRateSample{ + rxBytes: *stats.RXBytes, + txBytes: *stats.TXBytes, + sampledAt: stats.networkSampledAt, + } + if previous == nil { + return current + } + + elapsed := current.sampledAt.Sub(previous.sampledAt).Seconds() + // Linux counters can return to zero after an interface reset. Re-baselining + // on any decrease prevents unsigned underflow from becoming a huge false + // throughput spike in the host-stat card. + if elapsed <= 0 || current.rxBytes < previous.rxBytes || current.txBytes < previous.txBytes { + return current + } + + downloadMbps := bytesToMbps(current.rxBytes-previous.rxBytes, elapsed) + uploadMbps := bytesToMbps(current.txBytes-previous.txBytes, elapsed) + stats.DownloadMbps = &downloadMbps + stats.UploadMbps = &uploadMbps + return current +} + +func bytesToMbps(byteDelta uint64, elapsedSeconds float64) float64 { + // Mbps uses decimal megabits, matching network equipment and link-rate + // conventions: eight bits per byte and 1,000,000 bits per megabit. + return roundOneDecimal((float64(byteDelta) * 8) / elapsedSeconds / 1_000_000) } func readWirelessStats() (string, *WiFiStats, error) { diff --git a/pi/roverd/host_stats_test.go b/pi/roverd/host_stats_test.go new file mode 100644 index 00000000..f4b9c297 --- /dev/null +++ b/pi/roverd/host_stats_test.go @@ -0,0 +1,79 @@ +package roverd + +import ( + "testing" + "time" +) + +func TestApplyNetworkThroughputCalculatesMbpsFromActualElapsedTime(t *testing.T) { + startedAt := time.Unix(100, 0) + previous := &networkRateSample{rxBytes: 1_000, txBytes: 2_000, sampledAt: startedAt} + rxBytes := uint64(2_001_000) + txBytes := uint64(1_002_000) + stats := &WiFiStats{ + RXBytes: &rxBytes, + TXBytes: &txBytes, + networkSampledAt: startedAt.Add(2 * time.Second), + } + + next := applyNetworkThroughput(stats, previous) + + if stats.DownloadMbps == nil || *stats.DownloadMbps != 8.0 { + t.Fatalf("expected 8.0 Mbps download, got %v", stats.DownloadMbps) + } + if stats.UploadMbps == nil || *stats.UploadMbps != 4.0 { + t.Fatalf("expected 4.0 Mbps upload, got %v", stats.UploadMbps) + } + if next == nil || next.rxBytes != rxBytes || next.txBytes != txBytes { + t.Fatalf("expected current counters to become the next baseline, got %#v", next) + } +} + +func TestApplyNetworkThroughputFirstSampleOnlyEstablishesBaseline(t *testing.T) { + rxBytes := uint64(100) + txBytes := uint64(200) + stats := &WiFiStats{RXBytes: &rxBytes, TXBytes: &txBytes, networkSampledAt: time.Unix(100, 0)} + + next := applyNetworkThroughput(stats, nil) + + if stats.DownloadMbps != nil || stats.UploadMbps != nil { + t.Fatalf("expected no rates for the first sample, got download=%v upload=%v", stats.DownloadMbps, stats.UploadMbps) + } + if next == nil { + t.Fatal("expected the first valid sample to establish a baseline") + } +} + +func TestApplyNetworkThroughputCounterResetEstablishesNewBaseline(t *testing.T) { + startedAt := time.Unix(100, 0) + previous := &networkRateSample{rxBytes: 10_000, txBytes: 20_000, sampledAt: startedAt} + rxBytes := uint64(10) + txBytes := uint64(20) + stats := &WiFiStats{RXBytes: &rxBytes, TXBytes: &txBytes, networkSampledAt: startedAt.Add(time.Second)} + + next := applyNetworkThroughput(stats, previous) + + if stats.DownloadMbps != nil || stats.UploadMbps != nil { + t.Fatalf("expected no rates after a counter reset, got download=%v upload=%v", stats.DownloadMbps, stats.UploadMbps) + } + if next == nil || next.rxBytes != rxBytes || next.txBytes != txBytes { + t.Fatalf("expected reset counters to become the new baseline, got %#v", next) + } +} + +func TestApplyNetworkThroughputInvalidElapsedTimeEstablishesNewBaseline(t *testing.T) { + sampledAt := time.Unix(100, 0) + previous := &networkRateSample{rxBytes: 100, txBytes: 200, sampledAt: sampledAt} + rxBytes := uint64(200) + txBytes := uint64(300) + stats := &WiFiStats{RXBytes: &rxBytes, TXBytes: &txBytes, networkSampledAt: sampledAt} + + next := applyNetworkThroughput(stats, previous) + + if stats.DownloadMbps != nil || stats.UploadMbps != nil { + t.Fatalf("expected no rates with zero elapsed time, got download=%v upload=%v", stats.DownloadMbps, stats.UploadMbps) + } + if next == nil || next.sampledAt != sampledAt { + t.Fatalf("expected invalid timing sample to become the new baseline, got %#v", next) + } +} diff --git a/pi/roverd/wsclient.go b/pi/roverd/wsclient.go index fcb120b8..241a11fa 100644 --- a/pi/roverd/wsclient.go +++ b/pi/roverd/wsclient.go @@ -531,14 +531,21 @@ func (c *WSClient) forwardEvents(ctx context.Context, conn *websocket.Conn) { } func (c *WSClient) forwardHostStats(ctx context.Context, conn *websocket.Conn) { + var previousNetworkSample *networkRateSample + send := func() bool { // Host stats are collected on demand so each outbound message describes // the current Pi state. Collection failures are encoded into the stats // payload, which keeps this telemetry path from closing the rover socket. + stats := CollectHostStats(ctx) + // Throughput is derived here because this loop owns the ordered, periodic + // samples for one connection. CollectHostStats stays independent, while a + // reconnect automatically receives a clean counter baseline. + previousNetworkSample = applyNetworkThroughput(stats.WiFi, previousNetworkSample) msg := hostStatsMessage{ Type: "hostStats", Timestamp: time.Now().UnixMilli(), - Stats: CollectHostStats(ctx), + Stats: stats, } if err := writeJSON(ctx, conn, msg); err != nil { c.log.Printf("host stats send failed: %v", err) diff --git a/server/public/assets/index-C-g10Rjz.js b/server/public/assets/index-C-g10Rjz.js new file mode 100644 index 00000000..1c53e16d --- /dev/null +++ b/server/public/assets/index-C-g10Rjz.js @@ -0,0 +1,148 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/OrbitControls-BJ-UXxdt.js","assets/three.module--MGUDD-H.js"])))=>i.map(i=>d[i]); +(function(){const c=document.createElement("link").relList;if(c&&c.supports&&c.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))i(u);new MutationObserver(u=>{for(const h of u)if(h.type==="childList")for(const d of h.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&i(d)}).observe(document,{childList:!0,subtree:!0});function n(u){const h={};return u.integrity&&(h.integrity=u.integrity),u.referrerPolicy&&(h.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?h.credentials="include":u.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function i(u){if(u.ep)return;u.ep=!0;const h=n(u);fetch(u.href,h)}})();function Jv(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var vc={exports:{}},_8={};var ks;function tp(){if(ks)return _8;ks=1;var t=Symbol.for("react.transitional.element"),c=Symbol.for("react.fragment");function n(i,u,h){var d=null;if(h!==void 0&&(d=""+h),u.key!==void 0&&(d=""+u.key),"key"in u){h={};for(var m in u)m!=="key"&&(h[m]=u[m])}else h=u;return u=h.ref,{$$typeof:t,type:i,key:d,ref:u!==void 0?u:null,props:h}}return _8.Fragment=c,_8.jsx=n,_8.jsxs=n,_8}var Fs;function ep(){return Fs||(Fs=1,vc.exports=tp()),vc.exports}var r=ep(),pc={exports:{}},$1={};var Rs;function cp(){if(Rs)return $1;Rs=1;var t=Symbol.for("react.transitional.element"),c=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),d=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),y=Symbol.iterator;function M(_){return _===null||typeof _!="object"?null:(_=y&&_[y]||_["@@iterator"],typeof _=="function"?_:null)}var H={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},L=Object.assign,S={};function B(_,G,e1){this.props=_,this.context=G,this.refs=S,this.updater=e1||H}B.prototype.isReactComponent={},B.prototype.setState=function(_,G){if(typeof _!="object"&&typeof _!="function"&&_!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,_,G,"setState")},B.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function C(){}C.prototype=B.prototype;function w(_,G,e1){this.props=_,this.context=G,this.refs=S,this.updater=e1||H}var j=w.prototype=new C;j.constructor=w,L(j,B.prototype),j.isPureReactComponent=!0;var E=Array.isArray;function k(){}var R={H:null,A:null,T:null,S:null},V=Object.prototype.hasOwnProperty;function N(_,G,e1){var Q=e1.ref;return{$$typeof:t,type:_,key:G,ref:Q!==void 0?Q:null,props:e1}}function D(_,G){return N(_.type,G,_.props)}function q(_){return typeof _=="object"&&_!==null&&_.$$typeof===t}function Z(_){var G={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(e1){return G[e1]})}var t1=/\/+/g;function Y(_,G){return typeof _=="object"&&_!==null&&_.key!=null?Z(""+_.key):G.toString(36)}function P(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(k,k):(_.status="pending",_.then(function(G){_.status==="pending"&&(_.status="fulfilled",_.value=G)},function(G){_.status==="pending"&&(_.status="rejected",_.reason=G)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function T(_,G,e1,Q,n1){var s1=typeof _;(s1==="undefined"||s1==="boolean")&&(_=null);var c1=!1;if(_===null)c1=!0;else switch(s1){case"bigint":case"string":case"number":c1=!0;break;case"object":switch(_.$$typeof){case t:case c:c1=!0;break;case g:return c1=_._init,T(c1(_._payload),G,e1,Q,n1)}}if(c1)return n1=n1(_),c1=Q===""?"."+Y(_,0):Q,E(n1)?(e1="",c1!=null&&(e1=c1.replace(t1,"$&/")+"/"),T(n1,G,e1,"",function(R1){return R1})):n1!=null&&(q(n1)&&(n1=D(n1,e1+(n1.key==null||_&&_.key===n1.key?"":(""+n1.key).replace(t1,"$&/")+"/")+c1)),G.push(n1)),1;c1=0;var y1=Q===""?".":Q+":";if(E(_))for(var b1=0;b1<_.length;b1++)Q=_[b1],s1=y1+Y(Q,b1),c1+=T(Q,G,e1,s1,n1);else if(b1=M(_),typeof b1=="function")for(_=b1.call(_),b1=0;!(Q=_.next()).done;)Q=Q.value,s1=y1+Y(Q,b1++),c1+=T(Q,G,e1,s1,n1);else if(s1==="object"){if(typeof _.then=="function")return T(P(_),G,e1,Q,n1);throw G=String(_),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return c1}function U(_,G,e1){if(_==null)return _;var Q=[],n1=0;return T(_,Q,"","",function(s1){return G.call(e1,s1,n1++)}),Q}function I(_){if(_._status===-1){var G=_._result;G=G(),G.then(function(e1){(_._status===0||_._status===-1)&&(_._status=1,_._result=e1)},function(e1){(_._status===0||_._status===-1)&&(_._status=2,_._result=e1)}),_._status===-1&&(_._status=0,_._result=G)}if(_._status===1)return _._result.default;throw _._result}var i1=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)},v1={map:U,forEach:function(_,G,e1){U(_,function(){G.apply(this,arguments)},e1)},count:function(_){var G=0;return U(_,function(){G++}),G},toArray:function(_){return U(_,function(G){return G})||[]},only:function(_){if(!q(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};return $1.Activity=b,$1.Children=v1,$1.Component=B,$1.Fragment=n,$1.Profiler=u,$1.PureComponent=w,$1.StrictMode=i,$1.Suspense=p,$1.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=R,$1.__COMPILER_RUNTIME={__proto__:null,c:function(_){return R.H.useMemoCache(_)}},$1.cache=function(_){return function(){return _.apply(null,arguments)}},$1.cacheSignal=function(){return null},$1.cloneElement=function(_,G,e1){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var Q=L({},_.props),n1=_.key;if(G!=null)for(s1 in G.key!==void 0&&(n1=""+G.key),G)!V.call(G,s1)||s1==="key"||s1==="__self"||s1==="__source"||s1==="ref"&&G.ref===void 0||(Q[s1]=G[s1]);var s1=arguments.length-2;if(s1===1)Q.children=e1;else if(1>>1,v1=T[i1];if(0>>1;i1<_;){var G=2*(i1+1)-1,e1=T[G],Q=G+1,n1=T[Q];if(0>u(e1,I))Qu(n1,e1)?(T[i1]=n1,T[Q]=I,i1=Q):(T[i1]=e1,T[G]=I,i1=G);else if(Qu(n1,I))T[i1]=n1,T[Q]=I,i1=Q;else break t}}return U}function u(T,U){var I=T.sortIndex-U.sortIndex;return I!==0?I:T.id-U.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;t.unstable_now=function(){return h.now()}}else{var d=Date,m=d.now();t.unstable_now=function(){return d.now()-m}}var p=[],x=[],g=1,b=null,y=3,M=!1,H=!1,L=!1,S=!1,B=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;function j(T){for(var U=n(x);U!==null;){if(U.callback===null)i(x);else if(U.startTime<=T)i(x),U.sortIndex=U.expirationTime,c(p,U);else break;U=n(x)}}function E(T){if(L=!1,j(T),!H)if(n(p)!==null)H=!0,k||(k=!0,Z());else{var U=n(x);U!==null&&P(E,U.startTime-T)}}var k=!1,R=-1,V=5,N=-1;function D(){return S?!0:!(t.unstable_now()-NT&&D());){var i1=b.callback;if(typeof i1=="function"){b.callback=null,y=b.priorityLevel;var v1=i1(b.expirationTime<=T);if(T=t.unstable_now(),typeof v1=="function"){b.callback=v1,j(T),U=!0;break e}b===n(p)&&i(p),j(T)}else i(p);b=n(p)}if(b!==null)U=!0;else{var _=n(x);_!==null&&P(E,_.startTime-T),U=!1}}break t}finally{b=null,y=I,M=!1}U=void 0}}finally{U?Z():k=!1}}}var Z;if(typeof w=="function")Z=function(){w(q)};else if(typeof MessageChannel<"u"){var t1=new MessageChannel,Y=t1.port2;t1.port1.onmessage=q,Z=function(){Y.postMessage(null)}}else Z=function(){B(q,0)};function P(T,U){R=B(function(){T(t.unstable_now())},U)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(T){T.callback=null},t.unstable_forceFrameRate=function(T){0>T||125i1?(T.sortIndex=I,c(x,T),n(p)===null&&T===n(x)&&(L?(C(R),R=-1):L=!0,P(E,I-i1))):(T.sortIndex=v1,c(p,T),H||M||(H=!0,k||(k=!0,Z()))),T},t.unstable_shouldYield=D,t.unstable_wrapCallback=function(T){var U=y;return function(){var I=y;y=U;try{return T.apply(this,arguments)}finally{y=I}}}})(zc)),zc}var _s;function np(){return _s||(_s=1,xc.exports=ap()),xc.exports}var bc={exports:{}},W2={};var qs;function rp(){if(qs)return W2;qs=1;var t=Ia();function c(p){var x="https://react.dev/errors/"+p;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(c){console.error(c)}}return t(),bc.exports=rp(),bc.exports}var Os;function lp(){if(Os)return q8;Os=1;var t=np(),c=Ia(),n=Pu();function i(e){var a="https://react.dev/errors/"+e;if(1v1||(e.current=i1[v1],i1[v1]=null,v1--)}function e1(e,a){v1++,i1[v1]=e.current,e.current=a}var Q=_(null),n1=_(null),s1=_(null),c1=_(null);function y1(e,a){switch(e1(s1,a),e1(n1,e),e1(Q,null),a.nodeType){case 9:case 11:e=(e=a.documentElement)&&(e=e.namespaceURI)?cs(e):0;break;default:if(e=a.tagName,a=a.namespaceURI)a=cs(a),e=as(a,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}G(Q),e1(Q,e)}function b1(){G(Q),G(n1),G(s1)}function R1(e){e.memoizedState!==null&&e1(c1,e);var a=Q.current,l=as(a,e.type);a!==l&&(e1(n1,e),e1(Q,l))}function E1(e){n1.current===e&&(G(Q),G(n1)),c1.current===e&&(G(c1),F8._currentValue=I)}var _1,a2;function P1(e){if(_1===void 0)try{throw Error()}catch(l){var a=l.stack.trim().match(/\n( *(at )?)/);_1=a&&a[1]||"",a2=-1)":-1v||O[o]!==J[v]){var u1=` +`+O[o].replace(" at new "," at ");return e.displayName&&u1.includes("")&&(u1=u1.replace("",e.displayName)),u1}while(1<=o&&0<=v);break}}}finally{j1=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?P1(l):""}function A1(e,a){switch(e.tag){case 26:case 27:case 5:return P1(e.type);case 16:return P1("Lazy");case 13:return e.child!==a&&a!==null?P1("Suspense Fallback"):P1("Suspense");case 19:return P1("SuspenseList");case 0:case 15:return z1(e.type,!1);case 11:return z1(e.type.render,!1);case 1:return z1(e.type,!0);case 31:return P1("Activity");default:return""}}function q1(e){try{var a="",l=null;do a+=A1(e,l),l=e,e=e.return;while(e);return a}catch(o){return` +Error generating stack: `+o.message+` +`+o.stack}}var Y1=Object.prototype.hasOwnProperty,V1=t.unstable_scheduleCallback,D1=t.unstable_cancelCallback,g1=t.unstable_shouldYield,B1=t.unstable_requestPaint,r1=t.unstable_now,w1=t.unstable_getCurrentPriorityLevel,x1=t.unstable_ImmediatePriority,C1=t.unstable_UserBlockingPriority,l1=t.unstable_NormalPriority,M1=t.unstable_LowPriority,p1=t.unstable_IdlePriority,X1=t.log,g2=t.unstable_setDisableYieldValue,h1=null,L1=null;function k1(e){if(typeof X1=="function"&&g2(e),L1&&typeof L1.setStrictMode=="function")try{L1.setStrictMode(h1,e)}catch{}}var H1=Math.clz32?Math.clz32:Q1,u2=Math.log,s2=Math.LN2;function Q1(e){return e>>>=0,e===0?32:31-(u2(e)/s2|0)|0}var n2=256,X2=262144,P4=4194304;function p4(e){var a=e&42;if(a!==0)return a;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function A2(e,a,l){var o=e.pendingLanes;if(o===0)return 0;var v=0,z=e.suspendedLanes,A=e.pingedLanes;e=e.warmLanes;var F=o&134217727;return F!==0?(o=F&~z,o!==0?v=p4(o):(A&=F,A!==0?v=p4(A):l||(l=F&~e,l!==0&&(v=p4(l))))):(F=o&~z,F!==0?v=p4(F):A!==0?v=p4(A):l||(l=o&~e,l!==0&&(v=p4(l)))),v===0?0:a!==0&&a!==v&&(a&z)===0&&(z=v&-v,l=a&-a,z>=l||z===32&&(l&4194048)!==0)?a:v}function F4(e,a){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&a)===0}function Df(e,a){switch(e){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Tn(){var e=P4;return P4<<=1,(P4&62914560)===0&&(P4=4194304),e}function a7(e){for(var a=[],l=0;31>l;l++)a.push(e);return a}function Y0(e,a){e.pendingLanes|=a,a!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Of(e,a,l,o,v,z){var A=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var F=e.entanglements,O=e.expirationTimes,J=e.hiddenUpdates;for(l=A&~l;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Gf=/[\n"\\]/g;function x4(e){return e.replace(Gf,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function o7(e,a,l,o,v,z,A,F){e.name="",A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?e.type=A:e.removeAttribute("type"),a!=null?A==="number"?(a===0&&e.value===""||e.value!=a)&&(e.value=""+g4(a)):e.value!==""+g4(a)&&(e.value=""+g4(a)):A!=="submit"&&A!=="reset"||e.removeAttribute("value"),a!=null?u7(e,A,g4(a)):l!=null?u7(e,A,g4(l)):o!=null&&e.removeAttribute("value"),v==null&&z!=null&&(e.defaultChecked=!!z),v!=null&&(e.checked=v&&typeof v!="function"&&typeof v!="symbol"),F!=null&&typeof F!="function"&&typeof F!="symbol"&&typeof F!="boolean"?e.name=""+g4(F):e.removeAttribute("name")}function Qn(e,a,l,o,v,z,A,F){if(z!=null&&typeof z!="function"&&typeof z!="symbol"&&typeof z!="boolean"&&(e.type=z),a!=null||l!=null){if(!(z!=="submit"&&z!=="reset"||a!=null)){s7(e);return}l=l!=null?""+g4(l):"",a=a!=null?""+g4(a):l,F||a===e.value||(e.value=a),e.defaultValue=a}o=o??v,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=F?e.checked:!!o,e.defaultChecked=!!o,A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(e.name=A),s7(e)}function u7(e,a,l){a==="number"&&A5(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function O6(e,a,l,o){if(e=e.options,a){a={};for(var v=0;v"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),v7=!1;if(t3)try{var W0={};Object.defineProperty(W0,"passive",{get:function(){v7=!0}}),window.addEventListener("test",W0,W0),window.removeEventListener("test",W0,W0)}catch{v7=!1}var C3=null,p7=null,L5=null;function ar(){if(L5)return L5;var e,a=p7,l=a.length,o,v="value"in C3?C3.value:C3.textContent,z=v.length;for(e=0;e=e8),or=" ",ur=!1;function hr(e,a){switch(e){case"keyup":return ym.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function dr(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var $6=!1;function wm(e,a){switch(e){case"compositionend":return dr(a);case"keypress":return a.which!==32?null:(ur=!0,or);case"textInput":return e=a.data,e===or&&ur?null:e;default:return null}}function Cm(e,a){if($6)return e==="compositionend"||!y7&&hr(e,a)?(e=ar(),L5=p7=C3=null,$6=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1=a)return{node:l,offset:a-e};e=o}t:{for(;l;){if(l.nextSibling){l=l.nextSibling;break t}l=l.parentNode}l=void 0}l=br(l)}}function Mr(e,a){return e&&a?e===a?!0:e&&e.nodeType===3?!1:a&&a.nodeType===3?Mr(e,a.parentNode):"contains"in e?e.contains(a):e.compareDocumentPosition?!!(e.compareDocumentPosition(a)&16):!1:!1}function wr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var a=A5(e.document);a instanceof e.HTMLIFrameElement;){try{var l=typeof a.contentWindow.location.href=="string"}catch{l=!1}if(l)e=a.contentWindow;else break;a=A5(e.document)}return a}function C7(e){var a=e&&e.nodeName&&e.nodeName.toLowerCase();return a&&(a==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||a==="textarea"||e.contentEditable==="true")}var Nm=t3&&"documentMode"in document&&11>=document.documentMode,Z6=null,S7=null,r8=null,A7=!1;function Cr(e,a,l){var o=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;A7||Z6==null||Z6!==A5(o)||(o=Z6,"selectionStart"in o&&C7(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),r8&&n8(r8,o)||(r8=o,o=yt(S7,"onSelect"),0>=A,v-=A,$4=1<<32-H1(a)+v|l<G1?(e2=F1,F1=null):e2=F1.sibling;var l2=a1(K,F1,W[G1],d1);if(l2===null){F1===null&&(F1=e2);break}e&&F1&&l2.alternate===null&&a(K,F1),$=z(l2,$,G1),r2===null?T1=l2:r2.sibling=l2,r2=l2,F1=e2}if(G1===W.length)return l(K,F1),c2&&c3(K,G1),T1;if(F1===null){for(;G1G1?(e2=F1,F1=null):e2=F1.sibling;var Z3=a1(K,F1,l2.value,d1);if(Z3===null){F1===null&&(F1=e2);break}e&&F1&&Z3.alternate===null&&a(K,F1),$=z(Z3,$,G1),r2===null?T1=Z3:r2.sibling=Z3,r2=Z3,F1=e2}if(l2.done)return l(K,F1),c2&&c3(K,G1),T1;if(F1===null){for(;!l2.done;G1++,l2=W.next())l2=f1(K,l2.value,d1),l2!==null&&($=z(l2,$,G1),r2===null?T1=l2:r2.sibling=l2,r2=l2);return c2&&c3(K,G1),T1}for(F1=o(F1);!l2.done;G1++,l2=W.next())l2=o1(F1,K,G1,l2.value,d1),l2!==null&&(e&&l2.alternate!==null&&F1.delete(l2.key===null?G1:l2.key),$=z(l2,$,G1),r2===null?T1=l2:r2.sibling=l2,r2=l2);return e&&F1.forEach(function(Wv){return a(K,Wv)}),c2&&c3(K,G1),T1}function v2(K,$,W,d1){if(typeof W=="object"&&W!==null&&W.type===L&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case M:t:{for(var T1=W.key;$!==null;){if($.key===T1){if(T1=W.type,T1===L){if($.tag===7){l(K,$.sibling),d1=v($,W.props.children),d1.return=K,K=d1;break t}}else if($.elementType===T1||typeof T1=="object"&&T1!==null&&T1.$$typeof===V&&m6(T1)===$.type){l(K,$.sibling),d1=v($,W.props),h8(d1,W),d1.return=K,K=d1;break t}l(K,$);break}else a(K,$);$=$.sibling}W.type===L?(d1=o6(W.props.children,K.mode,d1,W.key),d1.return=K,K=d1):(d1=_5(W.type,W.key,W.props,null,K.mode,d1),h8(d1,W),d1.return=K,K=d1)}return A(K);case H:t:{for(T1=W.key;$!==null;){if($.key===T1)if($.tag===4&&$.stateNode.containerInfo===W.containerInfo&&$.stateNode.implementation===W.implementation){l(K,$.sibling),d1=v($,W.children||[]),d1.return=K,K=d1;break t}else{l(K,$);break}else a(K,$);$=$.sibling}d1=k7(W,K.mode,d1),d1.return=K,K=d1}return A(K);case V:return W=m6(W),v2(K,$,W,d1)}if(P(W))return N1(K,$,W,d1);if(Z(W)){if(T1=Z(W),typeof T1!="function")throw Error(i(150));return W=T1.call(W),O1(K,$,W,d1)}if(typeof W.then=="function")return v2(K,$,$5(W),d1);if(W.$$typeof===w)return v2(K,$,O5(K,W),d1);Z5(K,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,$!==null&&$.tag===6?(l(K,$.sibling),d1=v($,W),d1.return=K,K=d1):(l(K,$),d1=N7(W,K.mode,d1),d1.return=K,K=d1),A(K)):l(K,$)}return function(K,$,W,d1){try{u8=0;var T1=v2(K,$,W,d1);return a0=null,T1}catch(F1){if(F1===c0||F1===I5)throw F1;var r2=u4(29,F1,null,K.mode);return r2.lanes=d1,r2.return=K,r2}finally{}}}var p6=Gr(!0),Yr=Gr(!1),V3=!1;function $7(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Z7(e,a){e=e.updateQueue,a.updateQueue===e&&(a.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function B3(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function j3(e,a,l){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(o2&2)!==0){var v=o.pending;return v===null?a.next=a:(a.next=v.next,v.next=a),o.pending=a,a=T5(e),jr(e,null,l),a}return E5(e,o,a,l),T5(e)}function d8(e,a,l){if(a=a.updateQueue,a!==null&&(a=a.shared,(l&4194048)!==0)){var o=a.lanes;o&=e.pendingLanes,l|=o,a.lanes=l,qn(e,l)}}function G7(e,a){var l=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,l===o)){var v=null,z=null;if(l=l.firstBaseUpdate,l!==null){do{var A={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};z===null?v=z=A:z=z.next=A,l=l.next}while(l!==null);z===null?v=z=a:z=z.next=a}else v=z=a;l={baseState:o.baseState,firstBaseUpdate:v,lastBaseUpdate:z,shared:o.shared,callbacks:o.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=a:e.next=a,l.lastBaseUpdate=a}var Y7=!1;function f8(){if(Y7){var e=e0;if(e!==null)throw e}}function m8(e,a,l,o){Y7=!1;var v=e.updateQueue;V3=!1;var z=v.firstBaseUpdate,A=v.lastBaseUpdate,F=v.shared.pending;if(F!==null){v.shared.pending=null;var O=F,J=O.next;O.next=null,A===null?z=J:A.next=J,A=O;var u1=e.alternate;u1!==null&&(u1=u1.updateQueue,F=u1.lastBaseUpdate,F!==A&&(F===null?u1.firstBaseUpdate=J:F.next=J,u1.lastBaseUpdate=O))}if(z!==null){var f1=v.baseState;A=0,u1=J=O=null,F=z;do{var a1=F.lane&-536870913,o1=a1!==F.lane;if(o1?(t2&a1)===a1:(o&a1)===a1){a1!==0&&a1===t0&&(Y7=!0),u1!==null&&(u1=u1.next={lane:0,tag:F.tag,payload:F.payload,callback:null,next:null});t:{var N1=e,O1=F;a1=a;var v2=l;switch(O1.tag){case 1:if(N1=O1.payload,typeof N1=="function"){f1=N1.call(v2,f1,a1);break t}f1=N1;break t;case 3:N1.flags=N1.flags&-65537|128;case 0:if(N1=O1.payload,a1=typeof N1=="function"?N1.call(v2,f1,a1):N1,a1==null)break t;f1=b({},f1,a1);break t;case 2:V3=!0}}a1=F.callback,a1!==null&&(e.flags|=64,o1&&(e.flags|=8192),o1=v.callbacks,o1===null?v.callbacks=[a1]:o1.push(a1))}else o1={lane:a1,tag:F.tag,payload:F.payload,callback:F.callback,next:null},u1===null?(J=u1=o1,O=f1):u1=u1.next=o1,A|=a1;if(F=F.next,F===null){if(F=v.shared.pending,F===null)break;o1=F,F=o1.next,o1.next=null,v.lastBaseUpdate=o1,v.shared.pending=null}}while(!0);u1===null&&(O=f1),v.baseState=O,v.firstBaseUpdate=J,v.lastBaseUpdate=u1,z===null&&(v.shared.lanes=0),E3|=A,e.lanes=A,e.memoizedState=f1}}function Kr(e,a){if(typeof e!="function")throw Error(i(191,e));e.call(a)}function Qr(e,a){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;ez?z:8;var A=T.T,F={};T.T=F,f9(e,!1,a,l);try{var O=v(),J=T.S;if(J!==null&&J(F,O),O!==null&&typeof O=="object"&&typeof O.then=="function"){var u1=Om(O,o);g8(e,a,u1,v4(e))}else g8(e,a,o,v4(e))}catch(f1){g8(e,a,{then:function(){},status:"rejected",reason:f1},v4())}finally{U.p=z,A!==null&&F.types!==null&&(A.types=F.types),T.T=A}}function Gm(){}function h9(e,a,l,o){if(e.tag!==5)throw Error(i(476));var v=Ll(e).queue;Hl(e,v,a,I,l===null?Gm:function(){return Vl(e),l(o)})}function Ll(e){var a=e.memoizedState;if(a!==null)return a;a={memoizedState:I,baseState:I,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:l3,lastRenderedState:I},next:null};var l={};return a.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:l3,lastRenderedState:l},next:null},e.memoizedState=a,e=e.alternate,e!==null&&(e.memoizedState=a),a}function Vl(e){var a=Ll(e);a.next===null&&(a=e.alternate.memoizedState),g8(e,a.next.queue,{},v4())}function d9(){return Y2(F8)}function Bl(){return j2().memoizedState}function jl(){return j2().memoizedState}function Ym(e){for(var a=e.return;a!==null;){switch(a.tag){case 24:case 3:var l=v4();e=B3(l);var o=j3(a,e,l);o!==null&&(i4(o,a,l),d8(o,a,l)),a={cache:O7()},e.payload=a;return}a=a.return}}function Km(e,a,l){var o=v4();l={lane:o,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},ct(e)?kl(a,l):(l=B7(e,a,l,o),l!==null&&(i4(l,e,o),Fl(l,a,o)))}function Nl(e,a,l){var o=v4();g8(e,a,l,o)}function g8(e,a,l,o){var v={lane:o,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(ct(e))kl(a,v);else{var z=e.alternate;if(e.lanes===0&&(z===null||z.lanes===0)&&(z=a.lastRenderedReducer,z!==null))try{var A=a.lastRenderedState,F=z(A,l);if(v.hasEagerState=!0,v.eagerState=F,o4(F,A))return E5(e,a,v,0),p2===null&&R5(),!1}catch{}finally{}if(l=B7(e,a,v,o),l!==null)return i4(l,e,o),Fl(l,a,o),!0}return!1}function f9(e,a,l,o){if(o={lane:2,revertLane:$9(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},ct(e)){if(a)throw Error(i(479))}else a=B7(e,l,o,2),a!==null&&i4(a,e,2)}function ct(e){var a=e.alternate;return e===Z1||a!==null&&a===Z1}function kl(e,a){r0=K5=!0;var l=e.pending;l===null?a.next=a:(a.next=l.next,l.next=a),e.pending=a}function Fl(e,a,l){if((l&4194048)!==0){var o=a.lanes;o&=e.pendingLanes,l|=o,a.lanes=l,qn(e,l)}}var x8={readContext:Y2,use:W5,useCallback:H2,useContext:H2,useEffect:H2,useImperativeHandle:H2,useLayoutEffect:H2,useInsertionEffect:H2,useMemo:H2,useReducer:H2,useRef:H2,useState:H2,useDebugValue:H2,useDeferredValue:H2,useTransition:H2,useSyncExternalStore:H2,useId:H2,useHostTransitionStatus:H2,useFormState:H2,useActionState:H2,useOptimistic:H2,useMemoCache:H2,useCacheRefresh:H2};x8.useEffectEvent=H2;var Rl={readContext:Y2,use:W5,useCallback:function(e,a){return t4().memoizedState=[e,a===void 0?null:a],e},useContext:Y2,useEffect:xl,useImperativeHandle:function(e,a,l){l=l!=null?l.concat([e]):null,tt(4194308,4,Ml.bind(null,a,e),l)},useLayoutEffect:function(e,a){return tt(4194308,4,e,a)},useInsertionEffect:function(e,a){tt(4,2,e,a)},useMemo:function(e,a){var l=t4();a=a===void 0?null:a;var o=e();if(g6){k1(!0);try{e()}finally{k1(!1)}}return l.memoizedState=[o,a],o},useReducer:function(e,a,l){var o=t4();if(l!==void 0){var v=l(a);if(g6){k1(!0);try{l(a)}finally{k1(!1)}}}else v=a;return o.memoizedState=o.baseState=v,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:v},o.queue=e,e=e.dispatch=Km.bind(null,Z1,e),[o.memoizedState,e]},useRef:function(e){var a=t4();return e={current:e},a.memoizedState=e},useState:function(e){e=l9(e);var a=e.queue,l=Nl.bind(null,Z1,a);return a.dispatch=l,[e.memoizedState,l]},useDebugValue:o9,useDeferredValue:function(e,a){var l=t4();return u9(l,e,a)},useTransition:function(){var e=l9(!1);return e=Hl.bind(null,Z1,e.queue,!0,!1),t4().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,a,l){var o=Z1,v=t4();if(c2){if(l===void 0)throw Error(i(407));l=l()}else{if(l=a(),p2===null)throw Error(i(349));(t2&127)!==0||cl(o,a,l)}v.memoizedState=l;var z={value:l,getSnapshot:a};return v.queue=z,xl(nl.bind(null,o,z,e),[e]),o.flags|=2048,i0(9,{destroy:void 0},al.bind(null,o,z,l,a),null),l},useId:function(){var e=t4(),a=p2.identifierPrefix;if(c2){var l=Z4,o=$4;l=(o&~(1<<32-H1(o)-1)).toString(32)+l,a="_"+a+"R_"+l,l=Q5++,0<\/script>",z=z.removeChild(z.firstChild);break;case"select":z=typeof o.is=="string"?A.createElement("select",{is:o.is}):A.createElement("select"),o.multiple?z.multiple=!0:o.size&&(z.size=o.size);break;default:z=typeof o.is=="string"?A.createElement(v,{is:o.is}):A.createElement(v)}}z[Z2]=a,z[e4]=o;t:for(A=a.child;A!==null;){if(A.tag===5||A.tag===6)z.appendChild(A.stateNode);else if(A.tag!==4&&A.tag!==27&&A.child!==null){A.child.return=A,A=A.child;continue}if(A===a)break t;for(;A.sibling===null;){if(A.return===null||A.return===a)break t;A=A.return}A.sibling.return=A.return,A=A.sibling}a.stateNode=z;t:switch(Q2(z,v,o),v){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break t;case"img":o=!0;break t;default:o=!1}o&&s3(a)}}return z2(a),H9(a,a.type,e===null?null:e.memoizedProps,a.pendingProps,l),null;case 6:if(e&&a.stateNode!=null)e.memoizedProps!==o&&s3(a);else{if(typeof o!="string"&&a.stateNode===null)throw Error(i(166));if(e=s1.current,W6(a)){if(e=a.stateNode,l=a.memoizedProps,o=null,v=G2,v!==null)switch(v.tag){case 27:case 5:o=v.memoizedProps}e[Z2]=a,e=!!(e.nodeValue===l||o!==null&&o.suppressHydrationWarning===!0||ts(e.nodeValue,l)),e||H3(a,!0)}else e=Mt(e).createTextNode(o),e[Z2]=a,a.stateNode=e}return z2(a),null;case 31:if(l=a.memoizedState,e===null||e.memoizedState!==null){if(o=W6(a),l!==null){if(e===null){if(!o)throw Error(i(318));if(e=a.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(557));e[Z2]=a}else u6(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;z2(a),e=!1}else l=T7(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return a.flags&256?(d4(a),a):(d4(a),null);if((a.flags&128)!==0)throw Error(i(558))}return z2(a),null;case 13:if(o=a.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(v=W6(a),o!==null&&o.dehydrated!==null){if(e===null){if(!v)throw Error(i(318));if(v=a.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(i(317));v[Z2]=a}else u6(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;z2(a),v=!1}else v=T7(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=v),v=!0;if(!v)return a.flags&256?(d4(a),a):(d4(a),null)}return d4(a),(a.flags&128)!==0?(a.lanes=l,a):(l=o!==null,e=e!==null&&e.memoizedState!==null,l&&(o=a.child,v=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(v=o.alternate.memoizedState.cachePool.pool),z=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(z=o.memoizedState.cachePool.pool),z!==v&&(o.flags|=2048)),l!==e&&l&&(a.child.flags|=8192),it(a,a.updateQueue),z2(a),null);case 4:return b1(),e===null&&K9(a.stateNode.containerInfo),z2(a),null;case 10:return n3(a.type),z2(a),null;case 19:if(G(B2),o=a.memoizedState,o===null)return z2(a),null;if(v=(a.flags&128)!==0,z=o.rendering,z===null)if(v)b8(o,!1);else{if(L2!==0||e!==null&&(e.flags&128)!==0)for(e=a.child;e!==null;){if(z=Y5(e),z!==null){for(a.flags|=128,b8(o,!1),e=z.updateQueue,a.updateQueue=e,it(a,e),a.subtreeFlags=0,e=l,l=a.child;l!==null;)Nr(l,e),l=l.sibling;return e1(B2,B2.current&1|2),c2&&c3(a,o.treeForkCount),a.child}e=e.sibling}o.tail!==null&&r1()>dt&&(a.flags|=128,v=!0,b8(o,!1),a.lanes=4194304)}else{if(!v)if(e=Y5(z),e!==null){if(a.flags|=128,v=!0,e=e.updateQueue,a.updateQueue=e,it(a,e),b8(o,!0),o.tail===null&&o.tailMode==="hidden"&&!z.alternate&&!c2)return z2(a),null}else 2*r1()-o.renderingStartTime>dt&&l!==536870912&&(a.flags|=128,v=!0,b8(o,!1),a.lanes=4194304);o.isBackwards?(z.sibling=a.child,a.child=z):(e=o.last,e!==null?e.sibling=z:a.child=z,o.last=z)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=r1(),e.sibling=null,l=B2.current,e1(B2,v?l&1|2:l&1),c2&&c3(a,o.treeForkCount),e):(z2(a),null);case 22:case 23:return d4(a),Q7(),o=a.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(a.flags|=8192):o&&(a.flags|=8192),o?(l&536870912)!==0&&(a.flags&128)===0&&(z2(a),a.subtreeFlags&6&&(a.flags|=8192)):z2(a),l=a.updateQueue,l!==null&&it(a,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),o=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(o=a.memoizedState.cachePool.pool),o!==l&&(a.flags|=2048),e!==null&&G(f6),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),a.memoizedState.cache!==l&&(a.flags|=2048),n3(k2),z2(a),null;case 25:return null;case 30:return null}throw Error(i(156,a.tag))}function tv(e,a){switch(R7(a),a.tag){case 1:return e=a.flags,e&65536?(a.flags=e&-65537|128,a):null;case 3:return n3(k2),b1(),e=a.flags,(e&65536)!==0&&(e&128)===0?(a.flags=e&-65537|128,a):null;case 26:case 27:case 5:return E1(a),null;case 31:if(a.memoizedState!==null){if(d4(a),a.alternate===null)throw Error(i(340));u6()}return e=a.flags,e&65536?(a.flags=e&-65537|128,a):null;case 13:if(d4(a),e=a.memoizedState,e!==null&&e.dehydrated!==null){if(a.alternate===null)throw Error(i(340));u6()}return e=a.flags,e&65536?(a.flags=e&-65537|128,a):null;case 19:return G(B2),null;case 4:return b1(),null;case 10:return n3(a.type),null;case 22:case 23:return d4(a),Q7(),e!==null&&G(f6),e=a.flags,e&65536?(a.flags=e&-65537|128,a):null;case 24:return n3(k2),null;case 25:return null;default:return null}}function ri(e,a){switch(R7(a),a.tag){case 3:n3(k2),b1();break;case 26:case 27:case 5:E1(a);break;case 4:b1();break;case 31:a.memoizedState!==null&&d4(a);break;case 13:d4(a);break;case 19:G(B2);break;case 10:n3(a.type);break;case 22:case 23:d4(a),Q7(),e!==null&&G(f6);break;case 24:n3(k2)}}function y8(e,a){try{var l=a.updateQueue,o=l!==null?l.lastEffect:null;if(o!==null){var v=o.next;l=v;do{if((l.tag&e)===e){o=void 0;var z=l.create,A=l.inst;o=z(),A.destroy=o}l=l.next}while(l!==v)}}catch(F){d2(a,a.return,F)}}function F3(e,a,l){try{var o=a.updateQueue,v=o!==null?o.lastEffect:null;if(v!==null){var z=v.next;o=z;do{if((o.tag&e)===e){var A=o.inst,F=A.destroy;if(F!==void 0){A.destroy=void 0,v=a;var O=l,J=F;try{J()}catch(u1){d2(v,O,u1)}}}o=o.next}while(o!==z)}}catch(u1){d2(a,a.return,u1)}}function li(e){var a=e.updateQueue;if(a!==null){var l=e.stateNode;try{Qr(a,l)}catch(o){d2(e,e.return,o)}}}function ii(e,a,l){l.props=x6(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(o){d2(e,a,o)}}function M8(e,a){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof l=="function"?e.refCleanup=l(o):l.current=o}}catch(v){d2(e,a,v)}}function G4(e,a){var l=e.ref,o=e.refCleanup;if(l!==null)if(typeof o=="function")try{o()}catch(v){d2(e,a,v)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(v){d2(e,a,v)}else l.current=null}function si(e){var a=e.type,l=e.memoizedProps,o=e.stateNode;try{t:switch(a){case"button":case"input":case"select":case"textarea":l.autoFocus&&o.focus();break t;case"img":l.src?o.src=l.src:l.srcSet&&(o.srcset=l.srcSet)}}catch(v){d2(e,e.return,v)}}function L9(e,a,l){try{var o=e.stateNode;Mv(o,e.type,l,a),o[e4]=a}catch(v){d2(e,e.return,v)}}function oi(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&O3(e.type)||e.tag===4}function V9(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||oi(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&O3(e.type)||e.flags&2||e.child===null||e.tag===4)continue t;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function B9(e,a,l){var o=e.tag;if(o===5||o===6)e=e.stateNode,a?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,a):(a=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,a.appendChild(e),l=l._reactRootContainer,l!=null||a.onclick!==null||(a.onclick=J4));else if(o!==4&&(o===27&&O3(e.type)&&(l=e.stateNode,a=null),e=e.child,e!==null))for(B9(e,a,l),e=e.sibling;e!==null;)B9(e,a,l),e=e.sibling}function st(e,a,l){var o=e.tag;if(o===5||o===6)e=e.stateNode,a?l.insertBefore(e,a):l.appendChild(e);else if(o!==4&&(o===27&&O3(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(st(e,a,l),e=e.sibling;e!==null;)st(e,a,l),e=e.sibling}function ui(e){var a=e.stateNode,l=e.memoizedProps;try{for(var o=e.type,v=a.attributes;v.length;)a.removeAttributeNode(v[0]);Q2(a,o,l),a[Z2]=e,a[e4]=l}catch(z){d2(e,e.return,z)}}var o3=!1,E2=!1,j9=!1,hi=typeof WeakSet=="function"?WeakSet:Set,P2=null;function ev(e,a){if(e=e.containerInfo,W9=Vt,e=wr(e),C7(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else t:{l=(l=e.ownerDocument)&&l.defaultView||window;var o=l.getSelection&&l.getSelection();if(o&&o.rangeCount!==0){l=o.anchorNode;var v=o.anchorOffset,z=o.focusNode;o=o.focusOffset;try{l.nodeType,z.nodeType}catch{l=null;break t}var A=0,F=-1,O=-1,J=0,u1=0,f1=e,a1=null;e:for(;;){for(var o1;f1!==l||v!==0&&f1.nodeType!==3||(F=A+v),f1!==z||o!==0&&f1.nodeType!==3||(O=A+o),f1.nodeType===3&&(A+=f1.nodeValue.length),(o1=f1.firstChild)!==null;)a1=f1,f1=o1;for(;;){if(f1===e)break e;if(a1===l&&++J===v&&(F=A),a1===z&&++u1===o&&(O=A),(o1=f1.nextSibling)!==null)break;f1=a1,a1=f1.parentNode}f1=o1}l=F===-1||O===-1?null:{start:F,end:O}}else l=null}l=l||{start:0,end:0}}else l=null;for(J9={focusedElem:e,selectionRange:l},Vt=!1,P2=a;P2!==null;)if(a=P2,e=a.child,(a.subtreeFlags&1028)!==0&&e!==null)e.return=a,P2=e;else for(;P2!==null;){switch(a=P2,z=a.alternate,e=a.flags,a.tag){case 0:if((e&4)!==0&&(e=a.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l title"))),Q2(z,o,l),z[Z2]=e,I2(z),o=z;break t;case"link":var A=gs("link","href",v).get(o+(l.href||""));if(A){for(var F=0;Fv2&&(A=v2,v2=O1,O1=A);var K=yr(F,O1),$=yr(F,v2);if(K&&$&&(o1.rangeCount!==1||o1.anchorNode!==K.node||o1.anchorOffset!==K.offset||o1.focusNode!==$.node||o1.focusOffset!==$.offset)){var W=f1.createRange();W.setStart(K.node,K.offset),o1.removeAllRanges(),O1>v2?(o1.addRange(W),o1.extend($.node,$.offset)):(W.setEnd($.node,$.offset),o1.addRange(W))}}}}for(f1=[],o1=F;o1=o1.parentNode;)o1.nodeType===1&&f1.push({element:o1,left:o1.scrollLeft,top:o1.scrollTop});for(typeof F.focus=="function"&&F.focus(),F=0;Fl?32:l,T.T=null,l=_9,_9=null;var z=_3,A=m3;if(D2=0,d0=_3=null,m3=0,(o2&6)!==0)throw Error(i(331));var F=o2;if(o2|=4,Mi(z.current),zi(z,z.current,A,l),o2=F,L8(0,!1),L1&&typeof L1.onPostCommitFiberRoot=="function")try{L1.onPostCommitFiberRoot(h1,z)}catch{}return!0}finally{U.p=v,T.T=o,Di(e,a)}}function Ui(e,a,l){a=b4(l,a),a=g9(e.stateNode,a,2),e=j3(e,a,2),e!==null&&(Y0(e,2),Y4(e))}function d2(e,a,l){if(e.tag===3)Ui(e,e,l);else for(;a!==null;){if(a.tag===3){Ui(a,e,l);break}else if(a.tag===1){var o=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(T3===null||!T3.has(o))){e=b4(l,e),l=Il(2),o=j3(a,l,2),o!==null&&(Pl(l,o,a,e),Y0(o,2),Y4(o));break}}a=a.return}}function U9(e,a,l){var o=e.pingCache;if(o===null){o=e.pingCache=new nv;var v=new Set;o.set(a,v)}else v=o.get(a),v===void 0&&(v=new Set,o.set(a,v));v.has(l)||(F9=!0,v.add(l),e=ov.bind(null,e,a,l),a.then(e,e))}function ov(e,a,l){var o=e.pingCache;o!==null&&o.delete(a),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,p2===e&&(t2&l)===l&&(L2===4||L2===3&&(t2&62914560)===t2&&300>r1()-ht?(o2&2)===0&&f0(e,0):R9|=l,h0===t2&&(h0=0)),Y4(e)}function Ii(e,a){a===0&&(a=Tn()),e=s6(e,a),e!==null&&(Y0(e,a),Y4(e))}function uv(e){var a=e.memoizedState,l=0;a!==null&&(l=a.retryLane),Ii(e,l)}function hv(e,a){var l=0;switch(e.tag){case 31:case 13:var o=e.stateNode,v=e.memoizedState;v!==null&&(l=v.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(i(314))}o!==null&&o.delete(a),Ii(e,l)}function dv(e,a){return V1(e,a)}var xt=null,v0=null,I9=!1,zt=!1,P9=!1,D3=0;function Y4(e){e!==v0&&e.next===null&&(v0===null?xt=v0=e:v0=v0.next=e),zt=!0,I9||(I9=!0,mv())}function L8(e,a){if(!P9&&zt){P9=!0;do for(var l=!1,o=xt;o!==null;){if(e!==0){var v=o.pendingLanes;if(v===0)var z=0;else{var A=o.suspendedLanes,F=o.pingedLanes;z=(1<<31-H1(42|e)+1)-1,z&=v&~(A&~F),z=z&201326741?z&201326741|1:z?z|2:0}z!==0&&(l=!0,Gi(o,z))}else z=t2,z=A2(o,o===p2?z:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(z&3)===0||F4(o,z)||(l=!0,Gi(o,z));o=o.next}while(l);P9=!1}}function fv(){Pi()}function Pi(){zt=I9=!1;var e=0;D3!==0&&Cv()&&(e=D3);for(var a=r1(),l=null,o=xt;o!==null;){var v=o.next,z=$i(o,a);z===0?(o.next=null,l===null?xt=v:l.next=v,v===null&&(v0=l)):(l=o,(e!==0||(z&3)!==0)&&(zt=!0)),o=v}D2!==0&&D2!==5||L8(e),D3!==0&&(D3=0)}function $i(e,a){for(var l=e.suspendedLanes,o=e.pingedLanes,v=e.expirationTimes,z=e.pendingLanes&-62914561;0F)break;var u1=O.transferSize,f1=O.initiatorType;u1&&es(f1)&&(O=O.responseEnd,A+=u1*(O"u"?null:document;function fs(e,a,l){var o=p0;if(o&&typeof a=="string"&&a){var v=x4(a);v='link[rel="'+e+'"][href="'+v+'"]',typeof l=="string"&&(v+='[crossorigin="'+l+'"]'),ds.has(v)||(ds.add(v),e={rel:e,crossOrigin:l,href:a},o.querySelector(v)===null&&(a=o.createElement("link"),Q2(a,"link",e),I2(a),o.head.appendChild(a)))}}function kv(e){v3.D(e),fs("dns-prefetch",e,null)}function Fv(e,a){v3.C(e,a),fs("preconnect",e,a)}function Rv(e,a,l){v3.L(e,a,l);var o=p0;if(o&&e&&a){var v='link[rel="preload"][as="'+x4(a)+'"]';a==="image"&&l&&l.imageSrcSet?(v+='[imagesrcset="'+x4(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(v+='[imagesizes="'+x4(l.imageSizes)+'"]')):v+='[href="'+x4(e)+'"]';var z=v;switch(a){case"style":z=g0(e);break;case"script":z=x0(e)}A4.has(z)||(e=b({rel:"preload",href:a==="image"&&l&&l.imageSrcSet?void 0:e,as:a},l),A4.set(z,e),o.querySelector(v)!==null||a==="style"&&o.querySelector(N8(z))||a==="script"&&o.querySelector(k8(z))||(a=o.createElement("link"),Q2(a,"link",e),I2(a),o.head.appendChild(a)))}}function Ev(e,a){v3.m(e,a);var l=p0;if(l&&e){var o=a&&typeof a.as=="string"?a.as:"script",v='link[rel="modulepreload"][as="'+x4(o)+'"][href="'+x4(e)+'"]',z=v;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":z=x0(e)}if(!A4.has(z)&&(e=b({rel:"modulepreload",href:e},a),A4.set(z,e),l.querySelector(v)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(k8(z)))return}o=l.createElement("link"),Q2(o,"link",e),I2(o),l.head.appendChild(o)}}}function Tv(e,a,l){v3.S(e,a,l);var o=p0;if(o&&e){var v=q6(o).hoistableStyles,z=g0(e);a=a||"default";var A=v.get(z);if(!A){var F={loading:0,preload:null};if(A=o.querySelector(N8(z)))F.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":a},l),(l=A4.get(z))&&lc(e,l);var O=A=o.createElement("link");I2(O),Q2(O,"link",e),O._p=new Promise(function(J,u1){O.onload=J,O.onerror=u1}),O.addEventListener("load",function(){F.loading|=1}),O.addEventListener("error",function(){F.loading|=2}),F.loading|=4,Ct(A,a,o)}A={type:"stylesheet",instance:A,count:1,state:F},v.set(z,A)}}}function _v(e,a){v3.X(e,a);var l=p0;if(l&&e){var o=q6(l).hoistableScripts,v=x0(e),z=o.get(v);z||(z=l.querySelector(k8(v)),z||(e=b({src:e,async:!0},a),(a=A4.get(v))&&ic(e,a),z=l.createElement("script"),I2(z),Q2(z,"link",e),l.head.appendChild(z)),z={type:"script",instance:z,count:1,state:null},o.set(v,z))}}function qv(e,a){v3.M(e,a);var l=p0;if(l&&e){var o=q6(l).hoistableScripts,v=x0(e),z=o.get(v);z||(z=l.querySelector(k8(v)),z||(e=b({src:e,async:!0,type:"module"},a),(a=A4.get(v))&&ic(e,a),z=l.createElement("script"),I2(z),Q2(z,"link",e),l.head.appendChild(z)),z={type:"script",instance:z,count:1,state:null},o.set(v,z))}}function ms(e,a,l,o){var v=(v=s1.current)?wt(v):null;if(!v)throw Error(i(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(a=g0(l.href),l=q6(v).hoistableStyles,o=l.get(a),o||(o={type:"style",instance:null,count:0,state:null},l.set(a,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=g0(l.href);var z=q6(v).hoistableStyles,A=z.get(e);if(A||(v=v.ownerDocument||v,A={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},z.set(e,A),(z=v.querySelector(N8(e)))&&!z._p&&(A.instance=z,A.state.loading=5),A4.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},A4.set(e,l),z||Dv(v,e,l,A.state))),a&&o===null)throw Error(i(528,""));return A}if(a&&o!==null)throw Error(i(529,""));return null;case"script":return a=l.async,l=l.src,typeof l=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=x0(l),l=q6(v).hoistableScripts,o=l.get(a),o||(o={type:"script",instance:null,count:0,state:null},l.set(a,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,e))}}function g0(e){return'href="'+x4(e)+'"'}function N8(e){return'link[rel="stylesheet"]['+e+"]"}function vs(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function Dv(e,a,l,o){e.querySelector('link[rel="preload"][as="style"]['+a+"]")?o.loading=1:(a=e.createElement("link"),o.preload=a,a.addEventListener("load",function(){return o.loading|=1}),a.addEventListener("error",function(){return o.loading|=2}),Q2(a,"link",l),I2(a),e.head.appendChild(a))}function x0(e){return'[src="'+x4(e)+'"]'}function k8(e){return"script[async]"+e}function ps(e,a,l){if(a.count++,a.instance===null)switch(a.type){case"style":var o=e.querySelector('style[data-href~="'+x4(l.href)+'"]');if(o)return a.instance=o,I2(o),o;var v=b({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),I2(o),Q2(o,"style",v),Ct(o,l.precedence,e),a.instance=o;case"stylesheet":v=g0(l.href);var z=e.querySelector(N8(v));if(z)return a.state.loading|=4,a.instance=z,I2(z),z;o=vs(l),(v=A4.get(v))&&lc(o,v),z=(e.ownerDocument||e).createElement("link"),I2(z);var A=z;return A._p=new Promise(function(F,O){A.onload=F,A.onerror=O}),Q2(z,"link",o),a.state.loading|=4,Ct(z,l.precedence,e),a.instance=z;case"script":return z=x0(l.src),(v=e.querySelector(k8(z)))?(a.instance=v,I2(v),v):(o=l,(v=A4.get(z))&&(o=b({},l),ic(o,v)),e=e.ownerDocument||e,v=e.createElement("script"),I2(v),Q2(v,"link",o),e.head.appendChild(v),a.instance=v);case"void":return null;default:throw Error(i(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(o=a.instance,a.state.loading|=4,Ct(o,l.precedence,e));return a.instance}function Ct(e,a,l){for(var o=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),v=o.length?o[o.length-1]:null,z=v,A=0;A title"):null)}function Ov(e,a,l){if(l===1||a.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;switch(a.rel){case"stylesheet":return e=a.disabled,typeof a.precedence=="string"&&e==null;default:return!0}case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function zs(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Uv(e,a,l,o){if(l.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var v=g0(o.href),z=a.querySelector(N8(v));if(z){a=z._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(e.count++,e=At.bind(e),a.then(e,e)),l.state.loading|=4,l.instance=z,I2(z);return}z=a.ownerDocument||a,o=vs(o),(v=A4.get(v))&&lc(o,v),z=z.createElement("link"),I2(z);var A=z;A._p=new Promise(function(F,O){A.onload=F,A.onerror=O}),Q2(z,"link",o),l.instance=z}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,a),(a=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=At.bind(e),a.addEventListener("load",l),a.addEventListener("error",l))}}var sc=0;function Iv(e,a){return e.stylesheets&&e.count===0&&Lt(e,e.stylesheets),0sc?50:800)+a);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(v)}}:null}function At(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Lt(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ht=null;function Lt(e,a){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ht=new Map,a.forEach(Pv,e),Ht=null,At.call(e))}function Pv(e,a){if(!(a.state.loading&4)){var l=Ht.get(e);if(l)var o=l.get(null);else{l=new Map,Ht.set(e,l);for(var v=e.querySelectorAll("link[data-precedence],style[data-precedence]"),z=0;z"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(c){console.error(c)}}return t(),gc.exports=lp(),gc.exports}var sp=ip();var Is="popstate";function op(t={}){function c(i,u){let{pathname:h,search:d,hash:m}=i.location;return la("",{pathname:h,search:d,hash:m},u.state&&u.state.usr||null,u.state&&u.state.key||"default")}function n(i,u){return typeof u=="string"?u:n5(u)}return hp(c,n,null,t)}function C2(t,c){if(t===!1||t===null||typeof t>"u")throw new Error(c)}function U4(t,c){if(!t){typeof console<"u"&&console.warn(c);try{throw new Error(c)}catch{}}}function up(){return Math.random().toString(36).substring(2,10)}function Ps(t,c){return{usr:t.state,key:t.key,idx:c}}function la(t,c,n=null,i){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof c=="string"?q0(c):c,state:n,key:c&&c.key||i||up()}}function n5({pathname:t="/",search:c="",hash:n=""}){return c&&c!=="?"&&(t+=c.charAt(0)==="?"?c:"?"+c),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function q0(t){let c={};if(t){let n=t.indexOf("#");n>=0&&(c.hash=t.substring(n),t=t.substring(0,n));let i=t.indexOf("?");i>=0&&(c.search=t.substring(i),t=t.substring(0,i)),t&&(c.pathname=t)}return c}function hp(t,c,n,i={}){let{window:u=document.defaultView,v5Compat:h=!1}=i,d=u.history,m="POP",p=null,x=g();x==null&&(x=0,d.replaceState({...d.state,idx:x},""));function g(){return(d.state||{idx:null}).idx}function b(){m="POP";let S=g(),B=S==null?null:S-x;x=S,p&&p({action:m,location:L.location,delta:B})}function y(S,B){m="PUSH";let C=la(L.location,S,B);x=g()+1;let w=Ps(C,x),j=L.createHref(C);try{d.pushState(w,"",j)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;u.location.assign(j)}h&&p&&p({action:m,location:L.location,delta:1})}function M(S,B){m="REPLACE";let C=la(L.location,S,B);x=g();let w=Ps(C,x),j=L.createHref(C);d.replaceState(w,"",j),h&&p&&p({action:m,location:L.location,delta:0})}function H(S){return dp(S)}let L={get action(){return m},get location(){return t(u,d)},listen(S){if(p)throw new Error("A history only accepts one active listener");return u.addEventListener(Is,b),p=S,()=>{u.removeEventListener(Is,b),p=null}},createHref(S){return c(u,S)},createURL:H,encodeLocation(S){let B=H(S);return{pathname:B.pathname,search:B.search,hash:B.hash}},push:y,replace:M,go(S){return d.go(S)}};return L}function dp(t,c=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),C2(n,"No window.location.(origin|href) available to create URL");let i=typeof t=="string"?t:n5(t);return i=i.replace(/ $/,"%20"),!c&&i.startsWith("//")&&(i=n+i),new URL(i,n)}function $u(t,c,n="/"){return fp(t,c,n,!1)}function fp(t,c,n,i){let u=typeof c=="string"?q0(c):c,h=y3(u.pathname||"/",n);if(h==null)return null;let d=Zu(t);mp(d);let m=null;for(let p=0;m==null&&p{let g={relativePath:x===void 0?d.path||"":x,caseSensitive:d.caseSensitive===!0,childrenIndex:m,route:d};if(g.relativePath.startsWith("/")){if(!g.relativePath.startsWith(i)&&p)return;C2(g.relativePath.startsWith(i),`Absolute route path "${g.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(i.length)}let b=z3([i,g.relativePath]),y=n.concat(g);d.children&&d.children.length>0&&(C2(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${b}".`),Zu(d.children,c,y,b,p)),!(d.path==null&&!d.index)&&c.push({path:b,score:yp(b,d.index),routesMeta:y})};return t.forEach((d,m)=>{if(d.path===""||!d.path?.includes("?"))h(d,m);else for(let p of Gu(d.path))h(d,m,!0,p)}),c}function Gu(t){let c=t.split("/");if(c.length===0)return[];let[n,...i]=c,u=n.endsWith("?"),h=n.replace(/\?$/,"");if(i.length===0)return u?[h,""]:[h];let d=Gu(i.join("/")),m=[];return m.push(...d.map(p=>p===""?h:[h,p].join("/"))),u&&m.push(...d),m.map(p=>t.startsWith("/")&&p===""?"/":p)}function mp(t){t.sort((c,n)=>c.score!==n.score?n.score-c.score:Mp(c.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}var vp=/^:[\w-]+$/,pp=3,gp=2,xp=1,zp=10,bp=-2,$s=t=>t==="*";function yp(t,c){let n=t.split("/"),i=n.length;return n.some($s)&&(i+=bp),c&&(i+=gp),n.filter(u=>!$s(u)).reduce((u,h)=>u+(vp.test(h)?pp:h===""?xp:zp),i)}function Mp(t,c){return t.length===c.length&&t.slice(0,-1).every((i,u)=>i===c[u])?t[t.length-1]-c[c.length-1]:0}function wp(t,c,n=!1){let{routesMeta:i}=t,u={},h="/",d=[];for(let m=0;m{if(g==="*"){let H=m[y]||"";d=h.slice(0,h.length-H.length).replace(/(.)\/+$/,"$1")}const M=m[y];return b&&!M?x[g]=void 0:x[g]=(M||"").replace(/%2F/g,"/"),x},{}),pathname:h,pathnameBase:d,pattern:t}}function Cp(t,c=!1,n=!0){U4(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let i=[],u="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,m,p)=>(i.push({paramName:m,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(i.push({paramName:"*"}),u+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?u+="\\/*$":t!==""&&t!=="/"&&(u+="(?:(?=\\/|$))"),[new RegExp(u,c?void 0:"i"),i]}function Sp(t){try{return t.split("/").map(c=>decodeURIComponent(c).replace(/\//g,"%2F")).join("/")}catch(c){return U4(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${c}).`),t}}function y3(t,c){if(c==="/")return t;if(!t.toLowerCase().startsWith(c.toLowerCase()))return null;let n=c.endsWith("/")?c.length-1:c.length,i=t.charAt(n);return i&&i!=="/"?null:t.slice(n)||"/"}var Ap=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Hp=t=>Ap.test(t);function Lp(t,c="/"){let{pathname:n,search:i="",hash:u=""}=typeof t=="string"?q0(t):t,h;if(n)if(Hp(n))h=n;else{if(n.includes("//")){let d=n;n=n.replace(/\/\/+/g,"/"),U4(!1,`Pathnames cannot have embedded double slashes - normalizing ${d} -> ${n}`)}n.startsWith("/")?h=Zs(n.substring(1),"/"):h=Zs(n,c)}else h=c;return{pathname:h,search:jp(i),hash:Np(u)}}function Zs(t,c){let n=c.replace(/\/+$/,"").split("/");return t.split("/").forEach(u=>{u===".."?n.length>1&&n.pop():u!=="."&&n.push(u)}),n.length>1?n.join("/"):"/"}function yc(t,c,n,i){return`Cannot include a '${t}' character in a manually specified \`to.${c}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function Vp(t){return t.filter((c,n)=>n===0||c.route.path&&c.route.path.length>0)}function Yu(t){let c=Vp(t);return c.map((n,i)=>i===c.length-1?n.pathname:n.pathnameBase)}function Ku(t,c,n,i=!1){let u;typeof t=="string"?u=q0(t):(u={...t},C2(!u.pathname||!u.pathname.includes("?"),yc("?","pathname","search",u)),C2(!u.pathname||!u.pathname.includes("#"),yc("#","pathname","hash",u)),C2(!u.search||!u.search.includes("#"),yc("#","search","hash",u)));let h=t===""||u.pathname==="",d=h?"/":u.pathname,m;if(d==null)m=n;else{let b=c.length-1;if(!i&&d.startsWith("..")){let y=d.split("/");for(;y[0]==="..";)y.shift(),b-=1;u.pathname=y.join("/")}m=b>=0?c[b]:"/"}let p=Lp(u,m),x=d&&d!=="/"&&d.endsWith("/"),g=(h||d===".")&&n.endsWith("/");return!p.pathname.endsWith("/")&&(x||g)&&(p.pathname+="/"),p}var z3=t=>t.join("/").replace(/\/\/+/g,"/"),Bp=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),jp=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,Np=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function kp(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Qu=["POST","PUT","PATCH","DELETE"];new Set(Qu);var Fp=["GET",...Qu];new Set(Fp);var D0=f.createContext(null);D0.displayName="DataRouter";var _e=f.createContext(null);_e.displayName="DataRouterState";f.createContext(!1);var Xu=f.createContext({isTransitioning:!1});Xu.displayName="ViewTransition";var Rp=f.createContext(new Map);Rp.displayName="Fetchers";var Ep=f.createContext(null);Ep.displayName="Await";var X4=f.createContext(null);X4.displayName="Navigation";var p5=f.createContext(null);p5.displayName="Location";var M3=f.createContext({outlet:null,matches:[],isDataRoute:!1});M3.displayName="Route";var Pa=f.createContext(null);Pa.displayName="RouteError";function Tp(t,{relative:c}={}){C2(g5(),"useHref() may be used only in the context of a component.");let{basename:n,navigator:i}=f.useContext(X4),{hash:u,pathname:h,search:d}=x5(t,{relative:c}),m=h;return n!=="/"&&(m=h==="/"?n:z3([n,h])),i.createHref({pathname:m,search:d,hash:u})}function g5(){return f.useContext(p5)!=null}function e6(){return C2(g5(),"useLocation() may be used only in the context of a component."),f.useContext(p5).location}var Wu="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Ju(t){f.useContext(X4).static||f.useLayoutEffect(t)}function $a(){let{isDataRoute:t}=f.useContext(M3);return t?Qp():_p()}function _p(){C2(g5(),"useNavigate() may be used only in the context of a component.");let t=f.useContext(D0),{basename:c,navigator:n}=f.useContext(X4),{matches:i}=f.useContext(M3),{pathname:u}=e6(),h=JSON.stringify(Yu(i)),d=f.useRef(!1);return Ju(()=>{d.current=!0}),f.useCallback((p,x={})=>{if(U4(d.current,Wu),!d.current)return;if(typeof p=="number"){n.go(p);return}let g=Ku(p,JSON.parse(h),u,x.relative==="path");t==null&&c!=="/"&&(g.pathname=g.pathname==="/"?c:z3([c,g.pathname])),(x.replace?n.replace:n.push)(g,x.state,x)},[c,n,h,u,t])}f.createContext(null);function x5(t,{relative:c}={}){let{matches:n}=f.useContext(M3),{pathname:i}=e6(),u=JSON.stringify(Yu(n));return f.useMemo(()=>Ku(t,JSON.parse(u),i,c==="path"),[t,u,i,c])}function qp(t,c){return th(t,c)}function th(t,c,n,i,u){C2(g5(),"useRoutes() may be used only in the context of a component.");let{navigator:h}=f.useContext(X4),{matches:d}=f.useContext(M3),m=d[d.length-1],p=m?m.params:{},x=m?m.pathname:"/",g=m?m.pathnameBase:"/",b=m&&m.route;{let C=b&&b.path||"";eh(x,!b||C.endsWith("*")||C.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${x}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. + +Please change the parent to .`)}let y=e6(),M;if(c){let C=typeof c=="string"?q0(c):c;C2(g==="/"||C.pathname?.startsWith(g),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${g}" but pathname "${C.pathname}" was given in the \`location\` prop.`),M=C}else M=y;let H=M.pathname||"/",L=H;if(g!=="/"){let C=g.replace(/^\//,"").split("/");L="/"+H.replace(/^\//,"").split("/").slice(C.length).join("/")}let S=$u(t,{pathname:L});U4(b||S!=null,`No routes matched location "${M.pathname}${M.search}${M.hash}" `),U4(S==null||S[S.length-1].route.element!==void 0||S[S.length-1].route.Component!==void 0||S[S.length-1].route.lazy!==void 0,`Matched leaf route at location "${M.pathname}${M.search}${M.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let B=Pp(S&&S.map(C=>Object.assign({},C,{params:Object.assign({},p,C.params),pathname:z3([g,h.encodeLocation?h.encodeLocation(C.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathname]),pathnameBase:C.pathnameBase==="/"?g:z3([g,h.encodeLocation?h.encodeLocation(C.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathnameBase])})),d,n,i,u);return c&&B?f.createElement(p5.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...M},navigationType:"POP"}},B):B}function Dp(){let t=Kp(),c=kp(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i="rgba(200,200,200, 0.5)",u={padding:"0.5rem",backgroundColor:i},h={padding:"2px 4px",backgroundColor:i},d=null;return console.error("Error handled by React Router default ErrorBoundary:",t),d=f.createElement(f.Fragment,null,f.createElement("p",null,"💿 Hey developer 👋"),f.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",f.createElement("code",{style:h},"ErrorBoundary")," or"," ",f.createElement("code",{style:h},"errorElement")," prop on your route.")),f.createElement(f.Fragment,null,f.createElement("h2",null,"Unexpected Application Error!"),f.createElement("h3",{style:{fontStyle:"italic"}},c),n?f.createElement("pre",{style:u},n):null,d)}var Op=f.createElement(Dp,null),Up=class extends f.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,c){return c.location!==t.location||c.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:c.error,location:c.location,revalidation:t.revalidation||c.revalidation}}componentDidCatch(t,c){this.props.onError?this.props.onError(t,c):console.error("React Router caught the following error during render",t)}render(){return this.state.error!==void 0?f.createElement(M3.Provider,{value:this.props.routeContext},f.createElement(Pa.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Ip({routeContext:t,match:c,children:n}){let i=f.useContext(D0);return i&&i.static&&i.staticContext&&(c.route.errorElement||c.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=c.route.id),f.createElement(M3.Provider,{value:t},n)}function Pp(t,c=[],n=null,i=null,u=null){if(t==null){if(!n)return null;if(n.errors)t=n.matches;else if(c.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let h=t,d=n?.errors;if(d!=null){let g=h.findIndex(b=>b.route.id&&d?.[b.route.id]!==void 0);C2(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).join(",")}`),h=h.slice(0,Math.min(h.length,g+1))}let m=!1,p=-1;if(n)for(let g=0;g=0?h=h.slice(0,p+1):h=[h[0]];break}}}let x=n&&i?(g,b)=>{i(g,{location:n.location,params:n.matches?.[0]?.params??{},errorInfo:b})}:void 0;return h.reduceRight((g,b,y)=>{let M,H=!1,L=null,S=null;n&&(M=d&&b.route.id?d[b.route.id]:void 0,L=b.route.errorElement||Op,m&&(p<0&&y===0?(eh("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),H=!0,S=null):p===y&&(H=!0,S=b.route.hydrateFallbackElement||null)));let B=c.concat(h.slice(0,y+1)),C=()=>{let w;return M?w=L:H?w=S:b.route.Component?w=f.createElement(b.route.Component,null):b.route.element?w=b.route.element:w=g,f.createElement(Ip,{match:b,routeContext:{outlet:g,matches:B,isDataRoute:n!=null},children:w})};return n&&(b.route.ErrorBoundary||b.route.errorElement||y===0)?f.createElement(Up,{location:n.location,revalidation:n.revalidation,component:L,error:M,children:C(),routeContext:{outlet:null,matches:B,isDataRoute:!0},onError:x}):C()},null)}function Za(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function $p(t){let c=f.useContext(D0);return C2(c,Za(t)),c}function Zp(t){let c=f.useContext(_e);return C2(c,Za(t)),c}function Gp(t){let c=f.useContext(M3);return C2(c,Za(t)),c}function Ga(t){let c=Gp(t),n=c.matches[c.matches.length-1];return C2(n.route.id,`${t} can only be used on routes that contain a unique "id"`),n.route.id}function Yp(){return Ga("useRouteId")}function Kp(){let t=f.useContext(Pa),c=Zp("useRouteError"),n=Ga("useRouteError");return t!==void 0?t:c.errors?.[n]}function Qp(){let{router:t}=$p("useNavigate"),c=Ga("useNavigate"),n=f.useRef(!1);return Ju(()=>{n.current=!0}),f.useCallback(async(u,h={})=>{U4(n.current,Wu),n.current&&(typeof u=="number"?t.navigate(u):await t.navigate(u,{fromRouteId:c,...h}))},[t,c])}var Gs={};function eh(t,c,n){!c&&!Gs[t]&&(Gs[t]=!0,U4(!1,n))}f.memo(Xp);function Xp({routes:t,future:c,state:n,unstable_onError:i}){return th(t,void 0,n,i,c)}function Y3(t){C2(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function Wp({basename:t="/",children:c=null,location:n,navigationType:i="POP",navigator:u,static:h=!1}){C2(!g5(),"You cannot render a inside another . You should never have more than one in your app.");let d=t.replace(/^\/*/,"/"),m=f.useMemo(()=>({basename:d,navigator:u,static:h,future:{}}),[d,u,h]);typeof n=="string"&&(n=q0(n));let{pathname:p="/",search:x="",hash:g="",state:b=null,key:y="default"}=n,M=f.useMemo(()=>{let H=y3(p,d);return H==null?null:{location:{pathname:H,search:x,hash:g,state:b,key:y},navigationType:i}},[d,p,x,g,b,y,i]);return U4(M!=null,` is not able to match the URL "${p}${x}${g}" because it does not start with the basename, so the won't render anything.`),M==null?null:f.createElement(X4.Provider,{value:m},f.createElement(p5.Provider,{children:c,value:M}))}function Jp({children:t,location:c}){return qp(ia(t),c)}function ia(t,c=[]){let n=[];return f.Children.forEach(t,(i,u)=>{if(!f.isValidElement(i))return;let h=[...c,u];if(i.type===f.Fragment){n.push.apply(n,ia(i.props.children,h));return}C2(i.type===Y3,`[${typeof i.type=="string"?i.type:i.type.name}] is not a component. All component children of must be a or `),C2(!i.props.index||!i.props.children,"An index route cannot have child routes.");let d={id:i.props.id||h.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,middleware:i.props.middleware,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(d.children=ia(i.props.children,h)),n.push(d)}),n}var le="get",ie="application/x-www-form-urlencoded";function qe(t){return t!=null&&typeof t.tagName=="string"}function tg(t){return qe(t)&&t.tagName.toLowerCase()==="button"}function eg(t){return qe(t)&&t.tagName.toLowerCase()==="form"}function cg(t){return qe(t)&&t.tagName.toLowerCase()==="input"}function ag(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function ng(t,c){return t.button===0&&(!c||c==="_self")&&!ag(t)}var Et=null;function rg(){if(Et===null)try{new FormData(document.createElement("form"),0),Et=!1}catch{Et=!0}return Et}var lg=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Mc(t){return t!=null&&!lg.has(t)?(U4(!1,`"${t}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${ie}"`),null):t}function ig(t,c){let n,i,u,h,d;if(eg(t)){let m=t.getAttribute("action");i=m?y3(m,c):null,n=t.getAttribute("method")||le,u=Mc(t.getAttribute("enctype"))||ie,h=new FormData(t)}else if(tg(t)||cg(t)&&(t.type==="submit"||t.type==="image")){let m=t.form;if(m==null)throw new Error('Cannot submit a