From a6f6ccf07973736e9851a66c088822ec123383d2 Mon Sep 17 00:00:00 2001 From: legop3 Date: Wed, 8 Jul 2026 12:53:39 -0400 Subject: [PATCH] optional but always on transfer --- server/public/assets/index-B3q8p1Xf.js | 148 ------------------ server/public/assets/index-B3q8p1Xf.js.map | 1 - server/public/assets/index-htN8tzuK.js | 148 ++++++++++++++++++ server/public/assets/index-htN8tzuK.js.map | 1 + server/public/index.html | 2 +- to-do.md | 8 +- .../components/InterInstancePanel/index.jsx | 11 +- .../src/components/RoverQueuesPanel/index.jsx | 10 +- webui/src/components/SettingsPanel/index.jsx | 44 +++++- webui/src/controls/overcurrentLimiter.js | 34 +++- .../hooks/useIncomingInterInstanceTransfer.js | 6 +- webui/src/lib/interInstanceTransfer.js | 18 +-- 12 files changed, 253 insertions(+), 178 deletions(-) delete mode 100644 server/public/assets/index-B3q8p1Xf.js delete mode 100644 server/public/assets/index-B3q8p1Xf.js.map create mode 100644 server/public/assets/index-htN8tzuK.js create mode 100644 server/public/assets/index-htN8tzuK.js.map diff --git a/server/public/assets/index-B3q8p1Xf.js b/server/public/assets/index-B3q8p1Xf.js deleted file mode 100644 index e18af870..00000000 --- a/server/public/assets/index-B3q8p1Xf.js +++ /dev/null @@ -1,148 +0,0 @@ -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 ov(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Q9={exports:{}},V8={};var es;function uv(){if(es)return V8;es=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 v in u)v!=="key"&&(h[v]=u[v])}else h=u;return u=h.ref,{$$typeof:t,type:i,key:d,ref:u!==void 0?u:null,props:h}}return V8.Fragment=c,V8.jsx=n,V8.jsxs=n,V8}var cs;function hv(){return cs||(cs=1,Q9.exports=uv()),Q9.exports}var r=hv(),X9={exports:{}},P1={};var as;function dv(){if(as)return P1;as=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"),v=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),z=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),y=Symbol.iterator;function M(E){return E===null||typeof E!="object"?null:(E=y&&E[y]||E["@@iterator"],typeof E=="function"?E:null)}var L={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,C={};function B(E,O,Q){this.props=E,this.context=O,this.refs=C,this.updater=Q||L}B.prototype.isReactComponent={},B.prototype.setState=function(E,O){if(typeof E!="object"&&typeof E!="function"&&E!=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,E,O,"setState")},B.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function A(){}A.prototype=B.prototype;function H(E,O,Q){this.props=E,this.context=O,this.refs=C,this.updater=Q||L}var N=H.prototype=new A;N.constructor=H,S(N,B.prototype),N.isPureReactComponent=!0;var _=Array.isArray;function j(){}var T={H:null,A:null,T:null,S:null},V=Object.prototype.hasOwnProperty;function F(E,O,Q){var r1=Q.ref;return{$$typeof:t,type:E,key:O,ref:r1!==void 0?r1:null,props:Q}}function q(E,O){return F(E.type,O,E.props)}function $(E){return typeof E=="object"&&E!==null&&E.$$typeof===t}function D(E){var O={"=":"=0",":":"=2"};return"$"+E.replace(/[=:]/g,function(Q){return O[Q]})}var t1=/\/+/g;function n1(E,O){return typeof E=="object"&&E!==null&&E.key!=null?D(""+E.key):O.toString(36)}function Y(E){switch(E.status){case"fulfilled":return E.value;case"rejected":throw E.reason;default:switch(typeof E.status=="string"?E.then(j,j):(E.status="pending",E.then(function(O){E.status==="pending"&&(E.status="fulfilled",E.value=O)},function(O){E.status==="pending"&&(E.status="rejected",E.reason=O)})),E.status){case"fulfilled":return E.value;case"rejected":throw E.reason}}throw E}function R(E,O,Q,r1,m1){var p1=typeof E;(p1==="undefined"||p1==="boolean")&&(E=null);var S1=!1;if(E===null)S1=!0;else switch(p1){case"bigint":case"string":case"number":S1=!0;break;case"object":switch(E.$$typeof){case t:case c:S1=!0;break;case g:return S1=E._init,R(S1(E._payload),O,Q,r1,m1)}}if(S1)return m1=m1(E),S1=r1===""?"."+n1(E,0):r1,_(m1)?(Q="",S1!=null&&(Q=S1.replace(t1,"$&/")+"/"),R(m1,O,Q,"",function(T1){return T1})):m1!=null&&($(m1)&&(m1=q(m1,Q+(m1.key==null||E&&E.key===m1.key?"":(""+m1.key).replace(t1,"$&/")+"/")+S1)),O.push(m1)),1;S1=0;var F1=r1===""?".":r1+":";if(_(E))for(var R1=0;R1>>1,u1=R[K];if(0>>1;Ku(Q,U))r1u(m1,Q)?(R[K]=m1,R[r1]=U,K=r1):(R[K]=Q,R[O]=U,K=O);else if(r1u(m1,U))R[K]=m1,R[r1]=U,K=r1;else break t}}return P}function u(R,P){var U=R.sortIndex-P.sortIndex;return U!==0?U:R.id-P.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,v=d.now();t.unstable_now=function(){return d.now()-v}}var p=[],z=[],g=1,b=null,y=3,M=!1,L=!1,S=!1,C=!1,B=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,H=typeof setImmediate<"u"?setImmediate:null;function N(R){for(var P=n(z);P!==null;){if(P.callback===null)i(z);else if(P.startTime<=R)i(z),P.sortIndex=P.expirationTime,c(p,P);else break;P=n(z)}}function _(R){if(S=!1,N(R),!L)if(n(p)!==null)L=!0,j||(j=!0,D());else{var P=n(z);P!==null&&Y(_,P.startTime-R)}}var j=!1,T=-1,V=5,F=-1;function q(){return C?!0:!(t.unstable_now()-FR&&q());){var K=b.callback;if(typeof K=="function"){b.callback=null,y=b.priorityLevel;var u1=K(b.expirationTime<=R);if(R=t.unstable_now(),typeof u1=="function"){b.callback=u1,N(R),P=!0;break e}b===n(p)&&i(p),N(R)}else i(p);b=n(p)}if(b!==null)P=!0;else{var E=n(z);E!==null&&Y(_,E.startTime-R),P=!1}}break t}finally{b=null,y=U,M=!1}P=void 0}}finally{P?D():j=!1}}}var D;if(typeof H=="function")D=function(){H($)};else if(typeof MessageChannel<"u"){var t1=new MessageChannel,n1=t1.port2;t1.port1.onmessage=$,D=function(){n1.postMessage(null)}}else D=function(){B($,0)};function Y(R,P){T=B(function(){R(t.unstable_now())},P)}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(R){R.callback=null},t.unstable_forceFrameRate=function(R){0>R||125K?(R.sortIndex=U,c(z,R),n(p)===null&&R===n(z)&&(S?(A(T),T=-1):S=!0,Y(_,U-K))):(R.sortIndex=u1,c(p,R),L||M||(L=!0,j||(j=!0,D()))),R},t.unstable_shouldYield=q,t.unstable_wrapCallback=function(R){var P=y;return function(){var U=y;y=P;try{return R.apply(this,arguments)}finally{y=U}}}})(tc)),tc}var ls;function mv(){return ls||(ls=1,J9.exports=fv()),J9.exports}var ec={exports:{}},J2={};var is;function vv(){if(is)return J2;is=1;var t=ga();function c(p){var z="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(),ec.exports=vv(),ec.exports}var os;function pv(){if(os)return B8;os=1;var t=mv(),c=ga(),n=mu();function i(e){var a="https://react.dev/errors/"+e;if(1u1||(e.current=K[u1],K[u1]=null,u1--)}function Q(e,a){u1++,K[u1]=e.current,e.current=a}var r1=E(null),m1=E(null),p1=E(null),S1=E(null);function F1(e,a){switch(Q(p1,a),Q(m1,e),Q(r1,null),a.nodeType){case 9:case 11:e=(e=a.documentElement)&&(e=e.namespaceURI)?Ci(e):0;break;default:if(e=a.tagName,a=a.namespaceURI)a=Ci(a),e=Si(a,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}O(r1),Q(r1,e)}function R1(){O(r1),O(m1),O(p1)}function T1(e){e.memoizedState!==null&&Q(S1,e);var a=r1.current,l=Si(a,e.type);a!==l&&(Q(m1,e),Q(r1,l))}function Q1(e){m1.current===e&&(O(r1),O(m1)),S1.current===e&&(O(S1),S8._currentValue=U)}var q1,r2;function i1(e){if(q1===void 0)try{throw Error()}catch(l){var a=l.stack.trim().match(/\n( *(at )?)/);q1=a&&a[1]||"",r2=-1)":-1f||I[o]!==W[f]){var s1=` -`+I[o].replace(" at new "," at ");return e.displayName&&s1.includes("")&&(s1=s1.replace("",e.displayName)),s1}while(1<=o&&0<=f);break}}}finally{L1=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?i1(l):""}function k1(e,a){switch(e.tag){case 26:case 27:case 5:return i1(e.type);case 16:return i1("Lazy");case 13:return e.child!==a&&a!==null?i1("Suspense Fallback"):i1("Suspense");case 19:return i1("SuspenseList");case 0:case 15:return I1(e.type,!1);case 11:return I1(e.type.render,!1);case 1:return I1(e.type,!0);case 31:return i1("Activity");default:return""}}function b1(e){try{var a="",l=null;do a+=k1(e,l),l=e,e=e.return;while(e);return a}catch(o){return` -Error generating stack: `+o.message+` -`+o.stack}}var H1=Object.prototype.hasOwnProperty,g1=t.unstable_scheduleCallback,C1=t.unstable_cancelCallback,x1=t.unstable_shouldYield,_1=t.unstable_requestPaint,a1=t.unstable_now,y1=t.unstable_getCurrentPriorityLevel,M1=t.unstable_ImmediatePriority,N1=t.unstable_UserBlockingPriority,K1=t.unstable_NormalPriority,N2=t.unstable_LowPriority,J1=t.unstable_IdlePriority,v1=t.log,e1=t.unstable_setDisableYieldValue,d1=null,w1=null;function O1(e){if(typeof v1=="function"&&e1(e),w1&&typeof w1.setStrictMode=="function")try{w1.setStrictMode(d1,e)}catch{}}var z1=Math.clz32?Math.clz32:t2,U1=Math.log,o2=Math.LN2;function t2(e){return e>>>=0,e===0?32:31-(U1(e)/o2|0)|0}var e2=256,I2=262144,W2=4194304;function P2(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 w2(e,a,l){var o=e.pendingLanes;if(o===0)return 0;var f=0,x=e.suspendedLanes,w=e.pingedLanes;e=e.warmLanes;var k=o&134217727;return k!==0?(o=k&~x,o!==0?f=P2(o):(w&=k,w!==0?f=P2(w):l||(l=k&~e,l!==0&&(f=P2(l))))):(k=o&~x,k!==0?f=P2(k):w!==0?f=P2(w):l||(l=o&~e,l!==0&&(f=P2(l)))),f===0?0:a!==0&&a!==f&&(a&x)===0&&(x=f&-f,l=a&-a,x>=l||x===32&&(l&4194048)!==0)?a:f}function R4(e,a){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&a)===0}function Kd(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 nn(){var e=W2;return W2<<=1,(W2&62914560)===0&&(W2=4194304),e}function _e(e){for(var a=[],l=0;31>l;l++)a.push(e);return a}function q0(e,a){e.pendingLanes|=a,a!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Qd(e,a,l,o,f,x){var w=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 k=e.entanglements,I=e.expirationTimes,W=e.hiddenUpdates;for(l=w&~l;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var cf=/[\n"\\]/g;function x4(e){return e.replace(cf,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Pe(e,a,l,o,f,x,w,k){e.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?e.type=w:e.removeAttribute("type"),a!=null?w==="number"?(a===0&&e.value===""||e.value!=a)&&(e.value=""+g4(a)):e.value!==""+g4(a)&&(e.value=""+g4(a)):w!=="submit"&&w!=="reset"||e.removeAttribute("value"),a!=null?$e(e,w,g4(a)):l!=null?$e(e,w,g4(l)):o!=null&&e.removeAttribute("value"),f==null&&x!=null&&(e.defaultChecked=!!x),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?e.name=""+g4(k):e.removeAttribute("name")}function xn(e,a,l,o,f,x,w,k){if(x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.type=x),a!=null||l!=null){if(!(x!=="submit"&&x!=="reset"||a!=null)){Ie(e);return}l=l!=null?""+g4(l):"",a=a!=null?""+g4(a):l,k||a===e.value||(e.value=a),e.defaultValue=a}o=o??f,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=k?e.checked:!!o,e.defaultChecked=!!o,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(e.name=w),Ie(e)}function $e(e,a,l){a==="number"&&f5(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function k6(e,a,l,o){if(e=e.options,a){a={};for(var f=0;f"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Qe=!1;if(J4)try{var I0={};Object.defineProperty(I0,"passive",{get:function(){Qe=!0}}),window.addEventListener("test",I0,I0),window.removeEventListener("test",I0,I0)}catch{Qe=!1}var w3=null,Xe=null,v5=null;function Sn(){if(v5)return v5;var e,a=Xe,l=a.length,o,f="value"in w3?w3.value:w3.textContent,x=f.length;for(e=0;e=Z0),Nn=" ",jn=!1;function kn(e,a){switch(e){case"keyup":return Nf.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fn(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var T6=!1;function kf(e,a){switch(e){case"compositionend":return Fn(a);case"keypress":return a.which!==32?null:(jn=!0,Nn);case"textInput":return e=a.data,e===Nn&&jn?null:e;default:return null}}function Ff(e,a){if(T6)return e==="compositionend"||!c7&&kn(e,a)?(e=Sn(),v5=Xe=w3=null,T6=!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=Un(l)}}function Pn(e,a){return e&&a?e===a?!0:e&&e.nodeType===3?!1:a&&a.nodeType===3?Pn(e,a.parentNode):"contains"in e?e.contains(a):e.compareDocumentPosition?!!(e.compareDocumentPosition(a)&16):!1:!1}function $n(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var a=f5(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=f5(e.document)}return a}function r7(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 Uf=J4&&"documentMode"in document&&11>=document.documentMode,_6=null,l7=null,Q0=null,i7=!1;function Zn(e,a,l){var o=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;i7||_6==null||_6!==f5(o)||(o=_6,"selectionStart"in o&&r7(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}),Q0&&K0(Q0,o)||(Q0=o,o=st(l7,"onSelect"),0>=w,f-=w,I4=1<<32-z1(a)+f|l<G1?(a2=B1,B1=null):a2=B1.sibling;var i2=J(G,B1,X[G1],o1);if(i2===null){B1===null&&(B1=a2);break}e&&B1&&i2.alternate===null&&a(G,B1),Z=x(i2,Z,G1),l2===null?j1=i2:l2.sibling=i2,l2=i2,B1=a2}if(G1===X.length)return l(G,B1),n2&&e3(G,G1),j1;if(B1===null){for(;G1G1?(a2=B1,B1=null):a2=B1.sibling;var $3=J(G,B1,i2.value,o1);if($3===null){B1===null&&(B1=a2);break}e&&B1&&$3.alternate===null&&a(G,B1),Z=x($3,Z,G1),l2===null?j1=$3:l2.sibling=$3,l2=$3,B1=a2}if(i2.done)return l(G,B1),n2&&e3(G,G1),j1;if(B1===null){for(;!i2.done;G1++,i2=X.next())i2=h1(G,i2.value,o1),i2!==null&&(Z=x(i2,Z,G1),l2===null?j1=i2:l2.sibling=i2,l2=i2);return n2&&e3(G,G1),j1}for(B1=o(B1);!i2.done;G1++,i2=X.next())i2=c1(B1,G,G1,i2.value,o1),i2!==null&&(e&&i2.alternate!==null&&B1.delete(i2.key===null?G1:i2.key),Z=x(i2,Z,G1),l2===null?j1=i2:l2.sibling=i2,l2=i2);return e&&B1.forEach(function(sv){return a(G,sv)}),n2&&e3(G,G1),j1}function v2(G,Z,X,o1){if(typeof X=="object"&&X!==null&&X.type===S&&X.key===null&&(X=X.props.children),typeof X=="object"&&X!==null){switch(X.$$typeof){case M:t:{for(var j1=X.key;Z!==null;){if(Z.key===j1){if(j1=X.type,j1===S){if(Z.tag===7){l(G,Z.sibling),o1=f(Z,X.props.children),o1.return=G,G=o1;break t}}else if(Z.elementType===j1||typeof j1=="object"&&j1!==null&&j1.$$typeof===V&&s6(j1)===Z.type){l(G,Z.sibling),o1=f(Z,X.props),c8(o1,X),o1.return=G,G=o1;break t}l(G,Z);break}else a(G,Z);Z=Z.sibling}X.type===S?(o1=a6(X.props.children,G.mode,o1,X.key),o1.return=G,G=o1):(o1=S5(X.type,X.key,X.props,null,G.mode,o1),c8(o1,X),o1.return=G,G=o1)}return w(G);case L:t:{for(j1=X.key;Z!==null;){if(Z.key===j1)if(Z.tag===4&&Z.stateNode.containerInfo===X.containerInfo&&Z.stateNode.implementation===X.implementation){l(G,Z.sibling),o1=f(Z,X.children||[]),o1.return=G,G=o1;break t}else{l(G,Z);break}else a(G,Z);Z=Z.sibling}o1=m7(X,G.mode,o1),o1.return=G,G=o1}return w(G);case V:return X=s6(X),v2(G,Z,X,o1)}if(Y(X))return A1(G,Z,X,o1);if(D(X)){if(j1=D(X),typeof j1!="function")throw Error(i(150));return X=j1.call(X),E1(G,Z,X,o1)}if(typeof X.then=="function")return v2(G,Z,j5(X),o1);if(X.$$typeof===H)return v2(G,Z,L5(G,X),o1);k5(G,X)}return typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint"?(X=""+X,Z!==null&&Z.tag===6?(l(G,Z.sibling),o1=f(Z,X),o1.return=G,G=o1):(l(G,Z),o1=f7(X,G.mode,o1),o1.return=G,G=o1),w(G)):l(G,Z)}return function(G,Z,X,o1){try{e8=0;var j1=v2(G,Z,X,o1);return K6=null,j1}catch(B1){if(B1===Y6||B1===B5)throw B1;var l2=h4(29,B1,null,G.mode);return l2.lanes=o1,l2.return=G,l2}finally{}}}var u6=vr(!0),pr=vr(!1),L3=!1;function H7(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function A7(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 V3(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function B3(e,a,l){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(u2&2)!==0){var f=o.pending;return f===null?a.next=a:(a.next=f.next,f.next=a),o.pending=a,a=C5(e),Jn(e,null,l),a}return w5(e,o,a,l),C5(e)}function a8(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,ln(e,l)}}function L7(e,a){var l=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,l===o)){var f=null,x=null;if(l=l.firstBaseUpdate,l!==null){do{var w={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};x===null?f=x=w:x=x.next=w,l=l.next}while(l!==null);x===null?f=x=a:x=x.next=a}else f=x=a;l={baseState:o.baseState,firstBaseUpdate:f,lastBaseUpdate:x,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 V7=!1;function n8(){if(V7){var e=G6;if(e!==null)throw e}}function r8(e,a,l,o){V7=!1;var f=e.updateQueue;L3=!1;var x=f.firstBaseUpdate,w=f.lastBaseUpdate,k=f.shared.pending;if(k!==null){f.shared.pending=null;var I=k,W=I.next;I.next=null,w===null?x=W:w.next=W,w=I;var s1=e.alternate;s1!==null&&(s1=s1.updateQueue,k=s1.lastBaseUpdate,k!==w&&(k===null?s1.firstBaseUpdate=W:k.next=W,s1.lastBaseUpdate=I))}if(x!==null){var h1=f.baseState;w=0,s1=W=I=null,k=x;do{var J=k.lane&-536870913,c1=J!==k.lane;if(c1?(c2&J)===J:(o&J)===J){J!==0&&J===Z6&&(V7=!0),s1!==null&&(s1=s1.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});t:{var A1=e,E1=k;J=a;var v2=l;switch(E1.tag){case 1:if(A1=E1.payload,typeof A1=="function"){h1=A1.call(v2,h1,J);break t}h1=A1;break t;case 3:A1.flags=A1.flags&-65537|128;case 0:if(A1=E1.payload,J=typeof A1=="function"?A1.call(v2,h1,J):A1,J==null)break t;h1=b({},h1,J);break t;case 2:L3=!0}}J=k.callback,J!==null&&(e.flags|=64,c1&&(e.flags|=8192),c1=f.callbacks,c1===null?f.callbacks=[J]:c1.push(J))}else c1={lane:J,tag:k.tag,payload:k.payload,callback:k.callback,next:null},s1===null?(W=s1=c1,I=h1):s1=s1.next=c1,w|=J;if(k=k.next,k===null){if(k=f.shared.pending,k===null)break;c1=k,k=c1.next,c1.next=null,f.lastBaseUpdate=c1,f.shared.pending=null}}while(!0);s1===null&&(I=h1),f.baseState=I,f.firstBaseUpdate=W,f.lastBaseUpdate=s1,x===null&&(f.shared.lanes=0),R3|=w,e.lanes=w,e.memoizedState=h1}}function gr(e,a){if(typeof e!="function")throw Error(i(191,e));e.call(a)}function xr(e,a){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;ex?x:8;var w=R.T,k={};R.T=k,Y7(e,!1,a,l);try{var I=f(),W=R.S;if(W!==null&&W(k,I),I!==null&&typeof I=="object"&&typeof I.then=="function"){var s1=Xf(I,o);s8(e,a,s1,p4(e))}else s8(e,a,o,p4(e))}catch(h1){s8(e,a,{then:function(){},status:"rejected",reason:h1},p4())}finally{P.p=x,w!==null&&k.types!==null&&(w.types=k.types),R.T=w}}function am(){}function Z7(e,a,l,o){if(e.tag!==5)throw Error(i(476));var f=Qr(e).queue;Kr(e,f,a,U,l===null?am:function(){return Xr(e),l(o)})}function Qr(e){var a=e.memoizedState;if(a!==null)return a;a={memoizedState:U,baseState:U,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:r3,lastRenderedState:U},next:null};var l={};return a.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:r3,lastRenderedState:l},next:null},e.memoizedState=a,e=e.alternate,e!==null&&(e.memoizedState=a),a}function Xr(e){var a=Qr(e);a.next===null&&(a=e.alternate.memoizedState),s8(e,a.next.queue,{},p4())}function G7(){return K2(S8)}function Wr(){return L2().memoizedState}function Jr(){return L2().memoizedState}function nm(e){for(var a=e.return;a!==null;){switch(a.tag){case 24:case 3:var l=p4();e=V3(l);var o=B3(a,e,l);o!==null&&(s4(o,a,l),a8(o,a,l)),a={cache:M7()},e.payload=a;return}a=a.return}}function rm(e,a,l){var o=p4();l={lane:o,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},I5(e)?el(a,l):(l=h7(e,a,l,o),l!==null&&(s4(l,e,o),cl(l,a,o)))}function tl(e,a,l){var o=p4();s8(e,a,l,o)}function s8(e,a,l,o){var f={lane:o,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(I5(e))el(a,f);else{var x=e.alternate;if(e.lanes===0&&(x===null||x.lanes===0)&&(x=a.lastRenderedReducer,x!==null))try{var w=a.lastRenderedState,k=x(w,l);if(f.hasEagerState=!0,f.eagerState=k,u4(k,w))return w5(e,a,f,0),p2===null&&M5(),!1}catch{}finally{}if(l=h7(e,a,f,o),l!==null)return s4(l,e,o),cl(l,a,o),!0}return!1}function Y7(e,a,l,o){if(o={lane:2,revertLane:H9(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},I5(e)){if(a)throw Error(i(479))}else a=h7(e,l,o,2),a!==null&&s4(a,e,2)}function I5(e){var a=e.alternate;return e===Z1||a!==null&&a===Z1}function el(e,a){X6=E5=!0;var l=e.pending;l===null?a.next=a:(a.next=l.next,l.next=a),e.pending=a}function cl(e,a,l){if((l&4194048)!==0){var o=a.lanes;o&=e.pendingLanes,l|=o,a.lanes=l,ln(e,l)}}var o8={readContext:K2,use:q5,useCallback:C2,useContext:C2,useEffect:C2,useImperativeHandle:C2,useLayoutEffect:C2,useInsertionEffect:C2,useMemo:C2,useReducer:C2,useRef:C2,useState:C2,useDebugValue:C2,useDeferredValue:C2,useTransition:C2,useSyncExternalStore:C2,useId:C2,useHostTransitionStatus:C2,useFormState:C2,useActionState:C2,useOptimistic:C2,useMemoCache:C2,useCacheRefresh:C2};o8.useEffectEvent=C2;var al={readContext:K2,use:q5,useCallback:function(e,a){return e4().memoizedState=[e,a===void 0?null:a],e},useContext:K2,useEffect:Dr,useImperativeHandle:function(e,a,l){l=l!=null?l.concat([e]):null,O5(4194308,4,Pr.bind(null,a,e),l)},useLayoutEffect:function(e,a){return O5(4194308,4,e,a)},useInsertionEffect:function(e,a){O5(4,2,e,a)},useMemo:function(e,a){var l=e4();a=a===void 0?null:a;var o=e();if(h6){O1(!0);try{e()}finally{O1(!1)}}return l.memoizedState=[o,a],o},useReducer:function(e,a,l){var o=e4();if(l!==void 0){var f=l(a);if(h6){O1(!0);try{l(a)}finally{O1(!1)}}}else f=a;return o.memoizedState=o.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},o.queue=e,e=e.dispatch=rm.bind(null,Z1,e),[o.memoizedState,e]},useRef:function(e){var a=e4();return e={current:e},a.memoizedState=e},useState:function(e){e=O7(e);var a=e.queue,l=tl.bind(null,Z1,a);return a.dispatch=l,[e.memoizedState,l]},useDebugValue:P7,useDeferredValue:function(e,a){var l=e4();return $7(l,e,a)},useTransition:function(){var e=O7(!1);return e=Kr.bind(null,Z1,e.queue,!0,!1),e4().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,a,l){var o=Z1,f=e4();if(n2){if(l===void 0)throw Error(i(407));l=l()}else{if(l=a(),p2===null)throw Error(i(349));(c2&127)!==0||Cr(o,a,l)}f.memoizedState=l;var x={value:l,getSnapshot:a};return f.queue=x,Dr(Hr.bind(null,o,x,e),[e]),o.flags|=2048,J6(9,{destroy:void 0},Sr.bind(null,o,x,l,a),null),l},useId:function(){var e=e4(),a=p2.identifierPrefix;if(n2){var l=P4,o=I4;l=(o&~(1<<32-z1(o)-1)).toString(32)+l,a="_"+a+"R_"+l,l=T5++,0<\/script>",x=x.removeChild(x.firstChild);break;case"select":x=typeof o.is=="string"?w.createElement("select",{is:o.is}):w.createElement("select"),o.multiple?x.multiple=!0:o.size&&(x.size=o.size);break;default:x=typeof o.is=="string"?w.createElement(f,{is:o.is}):w.createElement(f)}}x[G2]=a,x[c4]=o;t:for(w=a.child;w!==null;){if(w.tag===5||w.tag===6)x.appendChild(w.stateNode);else if(w.tag!==4&&w.tag!==27&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===a)break t;for(;w.sibling===null;){if(w.return===null||w.return===a)break t;w=w.return}w.sibling.return=w.return,w=w.sibling}a.stateNode=x;t:switch(X2(x,f,o),f){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break t;case"img":o=!0;break t;default:o=!1}o&&i3(a)}}return x2(a),s9(a,a.type,e===null?null:e.memoizedProps,a.pendingProps,l),null;case 6:if(e&&a.stateNode!=null)e.memoizedProps!==o&&i3(a);else{if(typeof o!="string"&&a.stateNode===null)throw Error(i(166));if(e=p1.current,P6(a)){if(e=a.stateNode,l=a.memoizedProps,o=null,f=Y2,f!==null)switch(f.tag){case 27:case 5:o=f.memoizedProps}e[G2]=a,e=!!(e.nodeValue===l||o!==null&&o.suppressHydrationWarning===!0||Mi(e.nodeValue,l)),e||H3(a,!0)}else e=ot(e).createTextNode(o),e[G2]=a,a.stateNode=e}return x2(a),null;case 31:if(l=a.memoizedState,e===null||e.memoizedState!==null){if(o=P6(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[G2]=a}else n6(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;x2(a),e=!1}else l=x7(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return a.flags&256?(f4(a),a):(f4(a),null);if((a.flags&128)!==0)throw Error(i(558))}return x2(a),null;case 13:if(o=a.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=P6(a),o!==null&&o.dehydrated!==null){if(e===null){if(!f)throw Error(i(318));if(f=a.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(i(317));f[G2]=a}else n6(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;x2(a),f=!1}else f=x7(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return a.flags&256?(f4(a),a):(f4(a),null)}return f4(a),(a.flags&128)!==0?(a.lanes=l,a):(l=o!==null,e=e!==null&&e.memoizedState!==null,l&&(o=a.child,f=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(f=o.alternate.memoizedState.cachePool.pool),x=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(x=o.memoizedState.cachePool.pool),x!==f&&(o.flags|=2048)),l!==e&&l&&(a.child.flags|=8192),Y5(a,a.updateQueue),x2(a),null);case 4:return R1(),e===null&&B9(a.stateNode.containerInfo),x2(a),null;case 10:return a3(a.type),x2(a),null;case 19:if(O(A2),o=a.memoizedState,o===null)return x2(a),null;if(f=(a.flags&128)!==0,x=o.rendering,x===null)if(f)h8(o,!1);else{if(S2!==0||e!==null&&(e.flags&128)!==0)for(e=a.child;e!==null;){if(x=R5(e),x!==null){for(a.flags|=128,h8(o,!1),e=x.updateQueue,a.updateQueue=e,Y5(a,e),a.subtreeFlags=0,e=l,l=a.child;l!==null;)tr(l,e),l=l.sibling;return Q(A2,A2.current&1|2),n2&&e3(a,o.treeForkCount),a.child}e=e.sibling}o.tail!==null&&a1()>J5&&(a.flags|=128,f=!0,h8(o,!1),a.lanes=4194304)}else{if(!f)if(e=R5(x),e!==null){if(a.flags|=128,f=!0,e=e.updateQueue,a.updateQueue=e,Y5(a,e),h8(o,!0),o.tail===null&&o.tailMode==="hidden"&&!x.alternate&&!n2)return x2(a),null}else 2*a1()-o.renderingStartTime>J5&&l!==536870912&&(a.flags|=128,f=!0,h8(o,!1),a.lanes=4194304);o.isBackwards?(x.sibling=a.child,a.child=x):(e=o.last,e!==null?e.sibling=x:a.child=x,o.last=x)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=a1(),e.sibling=null,l=A2.current,Q(A2,f?l&1|2:l&1),n2&&e3(a,o.treeForkCount),e):(x2(a),null);case 22:case 23:return f4(a),N7(),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&&(x2(a),a.subtreeFlags&6&&(a.flags|=8192)):x2(a),l=a.updateQueue,l!==null&&Y5(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&&O(i6),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),a.memoizedState.cache!==l&&(a.flags|=2048),a3(j2),x2(a),null;case 25:return null;case 30:return null}throw Error(i(156,a.tag))}function um(e,a){switch(p7(a),a.tag){case 1:return e=a.flags,e&65536?(a.flags=e&-65537|128,a):null;case 3:return a3(j2),R1(),e=a.flags,(e&65536)!==0&&(e&128)===0?(a.flags=e&-65537|128,a):null;case 26:case 27:case 5:return Q1(a),null;case 31:if(a.memoizedState!==null){if(f4(a),a.alternate===null)throw Error(i(340));n6()}return e=a.flags,e&65536?(a.flags=e&-65537|128,a):null;case 13:if(f4(a),e=a.memoizedState,e!==null&&e.dehydrated!==null){if(a.alternate===null)throw Error(i(340));n6()}return e=a.flags,e&65536?(a.flags=e&-65537|128,a):null;case 19:return O(A2),null;case 4:return R1(),null;case 10:return a3(a.type),null;case 22:case 23:return f4(a),N7(),e!==null&&O(i6),e=a.flags,e&65536?(a.flags=e&-65537|128,a):null;case 24:return a3(j2),null;case 25:return null;default:return null}}function Al(e,a){switch(p7(a),a.tag){case 3:a3(j2),R1();break;case 26:case 27:case 5:Q1(a);break;case 4:R1();break;case 31:a.memoizedState!==null&&f4(a);break;case 13:f4(a);break;case 19:O(A2);break;case 10:a3(a.type);break;case 22:case 23:f4(a),N7(),e!==null&&O(i6);break;case 24:a3(j2)}}function d8(e,a){try{var l=a.updateQueue,o=l!==null?l.lastEffect:null;if(o!==null){var f=o.next;l=f;do{if((l.tag&e)===e){o=void 0;var x=l.create,w=l.inst;o=x(),w.destroy=o}l=l.next}while(l!==f)}}catch(k){d2(a,a.return,k)}}function k3(e,a,l){try{var o=a.updateQueue,f=o!==null?o.lastEffect:null;if(f!==null){var x=f.next;o=x;do{if((o.tag&e)===e){var w=o.inst,k=w.destroy;if(k!==void 0){w.destroy=void 0,f=a;var I=l,W=k;try{W()}catch(s1){d2(f,I,s1)}}}o=o.next}while(o!==x)}}catch(s1){d2(a,a.return,s1)}}function Ll(e){var a=e.updateQueue;if(a!==null){var l=e.stateNode;try{xr(a,l)}catch(o){d2(e,e.return,o)}}}function Vl(e,a,l){l.props=d6(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(o){d2(e,a,o)}}function f8(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(f){d2(e,a,f)}}function $4(e,a){var l=e.ref,o=e.refCleanup;if(l!==null)if(typeof o=="function")try{o()}catch(f){d2(e,a,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(f){d2(e,a,f)}else l.current=null}function Bl(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(f){d2(e,e.return,f)}}function o9(e,a,l){try{var o=e.stateNode;jm(o,e.type,l,a),o[c4]=a}catch(f){d2(e,e.return,f)}}function Nl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&D3(e.type)||e.tag===4}function u9(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||Nl(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&&D3(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 h9(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=W4));else if(o!==4&&(o===27&&D3(e.type)&&(l=e.stateNode,a=null),e=e.child,e!==null))for(h9(e,a,l),e=e.sibling;e!==null;)h9(e,a,l),e=e.sibling}function K5(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&&D3(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(K5(e,a,l),e=e.sibling;e!==null;)K5(e,a,l),e=e.sibling}function jl(e){var a=e.stateNode,l=e.memoizedProps;try{for(var o=e.type,f=a.attributes;f.length;)a.removeAttributeNode(f[0]);X2(a,o,l),a[G2]=e,a[c4]=l}catch(x){d2(e,e.return,x)}}var s3=!1,R2=!1,d9=!1,kl=typeof WeakSet=="function"?WeakSet:Set,Z2=null;function hm(e,a){if(e=e.containerInfo,k9=pt,e=$n(e),r7(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 f=o.anchorOffset,x=o.focusNode;o=o.focusOffset;try{l.nodeType,x.nodeType}catch{l=null;break t}var w=0,k=-1,I=-1,W=0,s1=0,h1=e,J=null;e:for(;;){for(var c1;h1!==l||f!==0&&h1.nodeType!==3||(k=w+f),h1!==x||o!==0&&h1.nodeType!==3||(I=w+o),h1.nodeType===3&&(w+=h1.nodeValue.length),(c1=h1.firstChild)!==null;)J=h1,h1=c1;for(;;){if(h1===e)break e;if(J===l&&++W===f&&(k=w),J===x&&++s1===o&&(I=w),(c1=h1.nextSibling)!==null)break;h1=J,J=h1.parentNode}h1=c1}l=k===-1||I===-1?null:{start:k,end:I}}else l=null}l=l||{start:0,end:0}}else l=null;for(F9={focusedElem:e,selectionRange:l},pt=!1,Z2=a;Z2!==null;)if(a=Z2,e=a.child,(a.subtreeFlags&1028)!==0&&e!==null)e.return=a,Z2=e;else for(;Z2!==null;){switch(a=Z2,x=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"))),X2(x,o,l),x[G2]=e,$2(x),o=x;break t;case"link":var w=qi("link","href",f).get(o+(l.href||""));if(w){for(var k=0;kv2&&(w=v2,v2=E1,E1=w);var G=In(k,E1),Z=In(k,v2);if(G&&Z&&(c1.rangeCount!==1||c1.anchorNode!==G.node||c1.anchorOffset!==G.offset||c1.focusNode!==Z.node||c1.focusOffset!==Z.offset)){var X=h1.createRange();X.setStart(G.node,G.offset),c1.removeAllRanges(),E1>v2?(c1.addRange(X),c1.extend(Z.node,Z.offset)):(X.setEnd(Z.node,Z.offset),c1.addRange(X))}}}}for(h1=[],c1=k;c1=c1.parentNode;)c1.nodeType===1&&h1.push({element:c1,left:c1.scrollLeft,top:c1.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;kl?32:l,R.T=null,l=z9,z9=null;var x=T3,w=f3;if(q2=0,n0=T3=null,f3=0,(u2&6)!==0)throw Error(i(331));var k=u2;if(u2|=4,Pl(x.current),Ol(x,x.current,w,l),u2=k,z8(0,!1),w1&&typeof w1.onPostCommitFiberRoot=="function")try{w1.onPostCommitFiberRoot(d1,x)}catch{}return!0}finally{P.p=f,R.T=o,si(e,a)}}function ui(e,a,l){a=b4(l,a),a=W7(e.stateNode,a,2),e=B3(e,a,2),e!==null&&(q0(e,2),Z4(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"&&(E3===null||!E3.has(o))){e=b4(l,e),l=hl(2),o=B3(a,l,2),o!==null&&(dl(l,o,a,e),q0(o,2),Z4(o));break}}a=a.return}}function w9(e,a,l){var o=e.pingCache;if(o===null){o=e.pingCache=new mm;var f=new Set;o.set(a,f)}else f=o.get(a),f===void 0&&(f=new Set,o.set(a,f));f.has(l)||(v9=!0,f.add(l),e=zm.bind(null,e,a,l),a.then(e,e))}function zm(e,a,l){var o=e.pingCache;o!==null&&o.delete(a),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,p2===e&&(c2&l)===l&&(S2===4||S2===3&&(c2&62914560)===c2&&300>a1()-W5?(u2&2)===0&&r0(e,0):p9|=l,a0===c2&&(a0=0)),Z4(e)}function hi(e,a){a===0&&(a=nn()),e=c6(e,a),e!==null&&(q0(e,a),Z4(e))}function bm(e){var a=e.memoizedState,l=0;a!==null&&(l=a.retryLane),hi(e,l)}function ym(e,a){var l=0;switch(e.tag){case 31:case 13:var o=e.stateNode,f=e.memoizedState;f!==null&&(l=f.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),hi(e,l)}function Mm(e,a){return g1(e,a)}var rt=null,i0=null,C9=!1,lt=!1,S9=!1,q3=0;function Z4(e){e!==i0&&e.next===null&&(i0===null?rt=i0=e:i0=i0.next=e),lt=!0,C9||(C9=!0,Cm())}function z8(e,a){if(!S9&<){S9=!0;do for(var l=!1,o=rt;o!==null;){if(e!==0){var f=o.pendingLanes;if(f===0)var x=0;else{var w=o.suspendedLanes,k=o.pingedLanes;x=(1<<31-z1(42|e)+1)-1,x&=f&~(w&~k),x=x&201326741?x&201326741|1:x?x|2:0}x!==0&&(l=!0,vi(o,x))}else x=c2,x=w2(o,o===p2?x:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(x&3)===0||R4(o,x)||(l=!0,vi(o,x));o=o.next}while(l);S9=!1}}function wm(){di()}function di(){lt=C9=!1;var e=0;q3!==0&&Fm()&&(e=q3);for(var a=a1(),l=null,o=rt;o!==null;){var f=o.next,x=fi(o,a);x===0?(o.next=null,l===null?rt=f:l.next=f,f===null&&(i0=l)):(l=o,(e!==0||(x&3)!==0)&&(lt=!0)),o=f}q2!==0&&q2!==5||z8(e),q3!==0&&(q3=0)}function fi(e,a){for(var l=e.suspendedLanes,o=e.pingedLanes,f=e.expirationTimes,x=e.pendingLanes&-62914561;0k)break;var s1=I.transferSize,h1=I.initiatorType;s1&&wi(h1)&&(I=I.responseEnd,w+=s1*(I"u"?null:document;function Ri(e,a,l){var o=s0;if(o&&typeof a=="string"&&a){var f=x4(a);f='link[rel="'+e+'"][href="'+f+'"]',typeof l=="string"&&(f+='[crossorigin="'+l+'"]'),Fi.has(f)||(Fi.add(f),e={rel:e,crossOrigin:l,href:a},o.querySelector(f)===null&&(a=o.createElement("link"),X2(a,"link",e),$2(a),o.head.appendChild(a)))}}function Im(e){m3.D(e),Ri("dns-prefetch",e,null)}function Pm(e,a){m3.C(e,a),Ri("preconnect",e,a)}function $m(e,a,l){m3.L(e,a,l);var o=s0;if(o&&e&&a){var f='link[rel="preload"][as="'+x4(a)+'"]';a==="image"&&l&&l.imageSrcSet?(f+='[imagesrcset="'+x4(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(f+='[imagesizes="'+x4(l.imageSizes)+'"]')):f+='[href="'+x4(e)+'"]';var x=f;switch(a){case"style":x=o0(e);break;case"script":x=u0(e)}H4.has(x)||(e=b({rel:"preload",href:a==="image"&&l&&l.imageSrcSet?void 0:e,as:a},l),H4.set(x,e),o.querySelector(f)!==null||a==="style"&&o.querySelector(w8(x))||a==="script"&&o.querySelector(C8(x))||(a=o.createElement("link"),X2(a,"link",e),$2(a),o.head.appendChild(a)))}}function Zm(e,a){m3.m(e,a);var l=s0;if(l&&e){var o=a&&typeof a.as=="string"?a.as:"script",f='link[rel="modulepreload"][as="'+x4(o)+'"][href="'+x4(e)+'"]',x=f;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":x=u0(e)}if(!H4.has(x)&&(e=b({rel:"modulepreload",href:e},a),H4.set(x,e),l.querySelector(f)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(C8(x)))return}o=l.createElement("link"),X2(o,"link",e),$2(o),l.head.appendChild(o)}}}function Gm(e,a,l){m3.S(e,a,l);var o=s0;if(o&&e){var f=N6(o).hoistableStyles,x=o0(e);a=a||"default";var w=f.get(x);if(!w){var k={loading:0,preload:null};if(w=o.querySelector(w8(x)))k.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":a},l),(l=H4.get(x))&&O9(e,l);var I=w=o.createElement("link");$2(I),X2(I,"link",e),I._p=new Promise(function(W,s1){I.onload=W,I.onerror=s1}),I.addEventListener("load",function(){k.loading|=1}),I.addEventListener("error",function(){k.loading|=2}),k.loading|=4,ht(w,a,o)}w={type:"stylesheet",instance:w,count:1,state:k},f.set(x,w)}}}function Ym(e,a){m3.X(e,a);var l=s0;if(l&&e){var o=N6(l).hoistableScripts,f=u0(e),x=o.get(f);x||(x=l.querySelector(C8(f)),x||(e=b({src:e,async:!0},a),(a=H4.get(f))&&U9(e,a),x=l.createElement("script"),$2(x),X2(x,"link",e),l.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},o.set(f,x))}}function Km(e,a){m3.M(e,a);var l=s0;if(l&&e){var o=N6(l).hoistableScripts,f=u0(e),x=o.get(f);x||(x=l.querySelector(C8(f)),x||(e=b({src:e,async:!0,type:"module"},a),(a=H4.get(f))&&U9(e,a),x=l.createElement("script"),$2(x),X2(x,"link",e),l.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},o.set(f,x))}}function Ei(e,a,l,o){var f=(f=p1.current)?ut(f):null;if(!f)throw Error(i(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(a=o0(l.href),l=N6(f).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=o0(l.href);var x=N6(f).hoistableStyles,w=x.get(e);if(w||(f=f.ownerDocument||f,w={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},x.set(e,w),(x=f.querySelector(w8(e)))&&!x._p&&(w.instance=x,w.state.loading=5),H4.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},H4.set(e,l),x||Qm(f,e,l,w.state))),a&&o===null)throw Error(i(528,""));return w}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=u0(l),l=N6(f).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 o0(e){return'href="'+x4(e)+'"'}function w8(e){return'link[rel="stylesheet"]['+e+"]"}function Ti(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function Qm(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}),X2(a,"link",l),$2(a),e.head.appendChild(a))}function u0(e){return'[src="'+x4(e)+'"]'}function C8(e){return"script[async]"+e}function _i(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,$2(o),o;var f=b({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),$2(o),X2(o,"style",f),ht(o,l.precedence,e),a.instance=o;case"stylesheet":f=o0(l.href);var x=e.querySelector(w8(f));if(x)return a.state.loading|=4,a.instance=x,$2(x),x;o=Ti(l),(f=H4.get(f))&&O9(o,f),x=(e.ownerDocument||e).createElement("link"),$2(x);var w=x;return w._p=new Promise(function(k,I){w.onload=k,w.onerror=I}),X2(x,"link",o),a.state.loading|=4,ht(x,l.precedence,e),a.instance=x;case"script":return x=u0(l.src),(f=e.querySelector(C8(x)))?(a.instance=f,$2(f),f):(o=l,(f=H4.get(x))&&(o=b({},l),U9(o,f)),e=e.ownerDocument||e,f=e.createElement("script"),$2(f),X2(f,"link",o),e.head.appendChild(f),a.instance=f);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,ht(o,l.precedence,e));return a.instance}function ht(e,a,l){for(var o=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=o.length?o[o.length-1]:null,x=f,w=0;w title"):null)}function Xm(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 Oi(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Wm(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 f=o0(o.href),x=a.querySelector(w8(f));if(x){a=x._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(e.count++,e=ft.bind(e),a.then(e,e)),l.state.loading|=4,l.instance=x,$2(x);return}x=a.ownerDocument||a,o=Ti(o),(f=H4.get(f))&&O9(o,f),x=x.createElement("link"),$2(x);var w=x;w._p=new Promise(function(k,I){w.onload=k,w.onerror=I}),X2(x,"link",o),l.instance=x}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,a),(a=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=ft.bind(e),a.addEventListener("load",l),a.addEventListener("error",l))}}var I9=0;function Jm(e,a){return e.stylesheets&&e.count===0&&vt(e,e.stylesheets),0I9?50:800)+a);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(f)}}:null}function ft(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)vt(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var mt=null;function vt(e,a){e.stylesheets=null,e.unsuspend!==null&&(e.count++,mt=new Map,a.forEach(tv,e),mt=null,ft.call(e))}function tv(e,a){if(!(a.state.loading&4)){var l=mt.get(e);if(l)var o=l.get(null);else{l=new Map,mt.set(e,l);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),x=0;x"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(c){console.error(c)}}return t(),W9.exports=pv(),W9.exports}var xv=gv();var hs="popstate";function zv(t={}){function c(i,u){let{pathname:h,search:d,hash:v}=i.location;return qc("",{pathname:h,search:d,hash:v},u.state&&u.state.usr||null,u.state&&u.state.key||"default")}function n(i,u){return typeof u=="string"?u:G8(u)}return yv(c,n,null,t)}function y2(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 bv(){return Math.random().toString(36).substring(2,10)}function ds(t,c){return{usr:t.state,key:t.key,idx:c}}function qc(t,c,n=null,i){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof c=="string"?B0(c):c,state:n,key:c&&c.key||i||bv()}}function G8({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 B0(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 yv(t,c,n,i={}){let{window:u=document.defaultView,v5Compat:h=!1}=i,d=u.history,v="POP",p=null,z=g();z==null&&(z=0,d.replaceState({...d.state,idx:z},""));function g(){return(d.state||{idx:null}).idx}function b(){v="POP";let C=g(),B=C==null?null:C-z;z=C,p&&p({action:v,location:S.location,delta:B})}function y(C,B){v="PUSH";let A=qc(S.location,C,B);z=g()+1;let H=ds(A,z),N=S.createHref(A);try{d.pushState(H,"",N)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;u.location.assign(N)}h&&p&&p({action:v,location:S.location,delta:1})}function M(C,B){v="REPLACE";let A=qc(S.location,C,B);z=g();let H=ds(A,z),N=S.createHref(A);d.replaceState(H,"",N),h&&p&&p({action:v,location:S.location,delta:0})}function L(C){return Mv(C)}let S={get action(){return v},get location(){return t(u,d)},listen(C){if(p)throw new Error("A history only accepts one active listener");return u.addEventListener(hs,b),p=C,()=>{u.removeEventListener(hs,b),p=null}},createHref(C){return c(u,C)},createURL:L,encodeLocation(C){let B=L(C);return{pathname:B.pathname,search:B.search,hash:B.hash}},push:y,replace:M,go(C){return d.go(C)}};return S}function Mv(t,c=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),y2(n,"No window.location.(origin|href) available to create URL");let i=typeof t=="string"?t:G8(t);return i=i.replace(/ $/,"%20"),!c&&i.startsWith("//")&&(i=n+i),new URL(i,n)}function vu(t,c,n="/"){return wv(t,c,n,!1)}function wv(t,c,n,i){let u=typeof c=="string"?B0(c):c,h=b3(u.pathname||"/",n);if(h==null)return null;let d=pu(t);Cv(d);let v=null;for(let p=0;v==null&&p{let g={relativePath:z===void 0?d.path||"":z,caseSensitive:d.caseSensitive===!0,childrenIndex:v,route:d};if(g.relativePath.startsWith("/")){if(!g.relativePath.startsWith(i)&&p)return;y2(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=x3([i,g.relativePath]),y=n.concat(g);d.children&&d.children.length>0&&(y2(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${b}".`),pu(d.children,c,y,b,p)),!(d.path==null&&!d.index)&&c.push({path:b,score:Nv(b,d.index),routesMeta:y})};return t.forEach((d,v)=>{if(d.path===""||!d.path?.includes("?"))h(d,v);else for(let p of gu(d.path))h(d,v,!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("/")),v=[];return v.push(...d.map(p=>p===""?h:[h,p].join("/"))),u&&v.push(...d),v.map(p=>t.startsWith("/")&&p===""?"/":p)}function Cv(t){t.sort((c,n)=>c.score!==n.score?n.score-c.score:jv(c.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}var Sv=/^:[\w-]+$/,Hv=3,Av=2,Lv=1,Vv=10,Bv=-2,fs=t=>t==="*";function Nv(t,c){let n=t.split("/"),i=n.length;return n.some(fs)&&(i+=Bv),c&&(i+=Av),n.filter(u=>!fs(u)).reduce((u,h)=>u+(Sv.test(h)?Hv:h===""?Lv:Vv),i)}function jv(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 kv(t,c,n=!1){let{routesMeta:i}=t,u={},h="/",d=[];for(let v=0;v{if(g==="*"){let L=v[y]||"";d=h.slice(0,h.length-L.length).replace(/(.)\/+$/,"$1")}const M=v[y];return b&&!M?z[g]=void 0:z[g]=(M||"").replace(/%2F/g,"/"),z},{}),pathname:h,pathnameBase:d,pattern:t}}function Fv(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,v,p)=>(i.push({paramName:v,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 Rv(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 b3(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 Ev=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Tv=t=>Ev.test(t);function _v(t,c="/"){let{pathname:n,search:i="",hash:u=""}=typeof t=="string"?B0(t):t,h;if(n)if(Tv(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=ms(n.substring(1),"/"):h=ms(n,c)}else h=c;return{pathname:h,search:Ov(i),hash:Uv(u)}}function ms(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 cc(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 qv(t){return t.filter((c,n)=>n===0||c.route.path&&c.route.path.length>0)}function xu(t){let c=qv(t);return c.map((n,i)=>i===c.length-1?n.pathname:n.pathnameBase)}function zu(t,c,n,i=!1){let u;typeof t=="string"?u=B0(t):(u={...t},y2(!u.pathname||!u.pathname.includes("?"),cc("?","pathname","search",u)),y2(!u.pathname||!u.pathname.includes("#"),cc("#","pathname","hash",u)),y2(!u.search||!u.search.includes("#"),cc("#","search","hash",u)));let h=t===""||u.pathname==="",d=h?"/":u.pathname,v;if(d==null)v=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("/")}v=b>=0?c[b]:"/"}let p=_v(u,v),z=d&&d!=="/"&&d.endsWith("/"),g=(h||d===".")&&n.endsWith("/");return!p.pathname.endsWith("/")&&(z||g)&&(p.pathname+="/"),p}var x3=t=>t.join("/").replace(/\/\/+/g,"/"),Dv=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),Ov=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,Uv=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function Iv(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 bu=["POST","PUT","PATCH","DELETE"];new Set(bu);var Pv=["GET",...bu];new Set(Pv);var N0=m.createContext(null);N0.displayName="DataRouter";var Me=m.createContext(null);Me.displayName="DataRouterState";m.createContext(!1);var yu=m.createContext({isTransitioning:!1});yu.displayName="ViewTransition";var $v=m.createContext(new Map);$v.displayName="Fetchers";var Zv=m.createContext(null);Zv.displayName="Await";var K4=m.createContext(null);K4.displayName="Navigation";var a5=m.createContext(null);a5.displayName="Location";var y3=m.createContext({outlet:null,matches:[],isDataRoute:!1});y3.displayName="Route";var xa=m.createContext(null);xa.displayName="RouteError";function Gv(t,{relative:c}={}){y2(n5(),"useHref() may be used only in the context of a component.");let{basename:n,navigator:i}=m.useContext(K4),{hash:u,pathname:h,search:d}=r5(t,{relative:c}),v=h;return n!=="/"&&(v=h==="/"?n:x3([n,h])),i.createHref({pathname:v,search:d,hash:u})}function n5(){return m.useContext(a5)!=null}function K3(){return y2(n5(),"useLocation() may be used only in the context of a component."),m.useContext(a5).location}var Mu="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function wu(t){m.useContext(K4).static||m.useLayoutEffect(t)}function Yv(){let{isDataRoute:t}=m.useContext(y3);return t?ip():Kv()}function Kv(){y2(n5(),"useNavigate() may be used only in the context of a component.");let t=m.useContext(N0),{basename:c,navigator:n}=m.useContext(K4),{matches:i}=m.useContext(y3),{pathname:u}=K3(),h=JSON.stringify(xu(i)),d=m.useRef(!1);return wu(()=>{d.current=!0}),m.useCallback((p,z={})=>{if(U4(d.current,Mu),!d.current)return;if(typeof p=="number"){n.go(p);return}let g=zu(p,JSON.parse(h),u,z.relative==="path");t==null&&c!=="/"&&(g.pathname=g.pathname==="/"?c:x3([c,g.pathname])),(z.replace?n.replace:n.push)(g,z.state,z)},[c,n,h,u,t])}m.createContext(null);function r5(t,{relative:c}={}){let{matches:n}=m.useContext(y3),{pathname:i}=K3(),u=JSON.stringify(xu(n));return m.useMemo(()=>zu(t,JSON.parse(u),i,c==="path"),[t,u,i,c])}function Qv(t,c){return Cu(t,c)}function Cu(t,c,n,i,u){y2(n5(),"useRoutes() may be used only in the context of a component.");let{navigator:h}=m.useContext(K4),{matches:d}=m.useContext(y3),v=d[d.length-1],p=v?v.params:{},z=v?v.pathname:"/",g=v?v.pathnameBase:"/",b=v&&v.route;{let A=b&&b.path||"";Su(z,!b||A.endsWith("*")||A.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${z}" (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=K3(),M;if(c){let A=typeof c=="string"?B0(c):c;y2(g==="/"||A.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 "${A.pathname}" was given in the \`location\` prop.`),M=A}else M=y;let L=M.pathname||"/",S=L;if(g!=="/"){let A=g.replace(/^\//,"").split("/");S="/"+L.replace(/^\//,"").split("/").slice(A.length).join("/")}let C=vu(t,{pathname:S});U4(b||C!=null,`No routes matched location "${M.pathname}${M.search}${M.hash}" `),U4(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.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=ep(C&&C.map(A=>Object.assign({},A,{params:Object.assign({},p,A.params),pathname:x3([g,h.encodeLocation?h.encodeLocation(A.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathname]),pathnameBase:A.pathnameBase==="/"?g:x3([g,h.encodeLocation?h.encodeLocation(A.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathnameBase])})),d,n,i,u);return c&&B?m.createElement(a5.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...M},navigationType:"POP"}},B):B}function Xv(){let t=lp(),c=Iv(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=m.createElement(m.Fragment,null,m.createElement("p",null,"💿 Hey developer 👋"),m.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",m.createElement("code",{style:h},"ErrorBoundary")," or"," ",m.createElement("code",{style:h},"errorElement")," prop on your route.")),m.createElement(m.Fragment,null,m.createElement("h2",null,"Unexpected Application Error!"),m.createElement("h3",{style:{fontStyle:"italic"}},c),n?m.createElement("pre",{style:u},n):null,d)}var Wv=m.createElement(Xv,null),Jv=class extends m.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?m.createElement(y3.Provider,{value:this.props.routeContext},m.createElement(xa.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function tp({routeContext:t,match:c,children:n}){let i=m.useContext(N0);return i&&i.static&&i.staticContext&&(c.route.errorElement||c.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=c.route.id),m.createElement(y3.Provider,{value:t},n)}function ep(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);y2(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 v=!1,p=-1;if(n)for(let g=0;g=0?h=h.slice(0,p+1):h=[h[0]];break}}}let z=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,L=!1,S=null,C=null;n&&(M=d&&b.route.id?d[b.route.id]:void 0,S=b.route.errorElement||Wv,v&&(p<0&&y===0?(Su("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),L=!0,C=null):p===y&&(L=!0,C=b.route.hydrateFallbackElement||null)));let B=c.concat(h.slice(0,y+1)),A=()=>{let H;return M?H=S:L?H=C:b.route.Component?H=m.createElement(b.route.Component,null):b.route.element?H=b.route.element:H=g,m.createElement(tp,{match:b,routeContext:{outlet:g,matches:B,isDataRoute:n!=null},children:H})};return n&&(b.route.ErrorBoundary||b.route.errorElement||y===0)?m.createElement(Jv,{location:n.location,revalidation:n.revalidation,component:S,error:M,children:A(),routeContext:{outlet:null,matches:B,isDataRoute:!0},onError:z}):A()},null)}function za(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function cp(t){let c=m.useContext(N0);return y2(c,za(t)),c}function ap(t){let c=m.useContext(Me);return y2(c,za(t)),c}function np(t){let c=m.useContext(y3);return y2(c,za(t)),c}function ba(t){let c=np(t),n=c.matches[c.matches.length-1];return y2(n.route.id,`${t} can only be used on routes that contain a unique "id"`),n.route.id}function rp(){return ba("useRouteId")}function lp(){let t=m.useContext(xa),c=ap("useRouteError"),n=ba("useRouteError");return t!==void 0?t:c.errors?.[n]}function ip(){let{router:t}=cp("useNavigate"),c=ba("useNavigate"),n=m.useRef(!1);return wu(()=>{n.current=!0}),m.useCallback(async(u,h={})=>{U4(n.current,Mu),n.current&&(typeof u=="number"?t.navigate(u):await t.navigate(u,{fromRouteId:c,...h}))},[t,c])}var vs={};function Su(t,c,n){!c&&!vs[t]&&(vs[t]=!0,U4(!1,n))}m.memo(sp);function sp({routes:t,future:c,state:n,unstable_onError:i}){return Cu(t,void 0,n,i,c)}function z6(t){y2(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function op({basename:t="/",children:c=null,location:n,navigationType:i="POP",navigator:u,static:h=!1}){y2(!n5(),"You cannot render a inside another . You should never have more than one in your app.");let d=t.replace(/^\/*/,"/"),v=m.useMemo(()=>({basename:d,navigator:u,static:h,future:{}}),[d,u,h]);typeof n=="string"&&(n=B0(n));let{pathname:p="/",search:z="",hash:g="",state:b=null,key:y="default"}=n,M=m.useMemo(()=>{let L=b3(p,d);return L==null?null:{location:{pathname:L,search:z,hash:g,state:b,key:y},navigationType:i}},[d,p,z,g,b,y,i]);return U4(M!=null,` is not able to match the URL "${p}${z}${g}" because it does not start with the basename, so the won't render anything.`),M==null?null:m.createElement(K4.Provider,{value:v},m.createElement(a5.Provider,{children:c,value:M}))}function up({children:t,location:c}){return Qv(Dc(t),c)}function Dc(t,c=[]){let n=[];return m.Children.forEach(t,(i,u)=>{if(!m.isValidElement(i))return;let h=[...c,u];if(i.type===m.Fragment){n.push.apply(n,Dc(i.props.children,h));return}y2(i.type===z6,`[${typeof i.type=="string"?i.type:i.type.name}] is not a component. All component children of must be a or `),y2(!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=Dc(i.props.children,h)),n.push(d)}),n}var Pt="get",$t="application/x-www-form-urlencoded";function we(t){return t!=null&&typeof t.tagName=="string"}function hp(t){return we(t)&&t.tagName.toLowerCase()==="button"}function dp(t){return we(t)&&t.tagName.toLowerCase()==="form"}function fp(t){return we(t)&&t.tagName.toLowerCase()==="input"}function mp(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function vp(t,c){return t.button===0&&(!c||c==="_self")&&!mp(t)}var wt=null;function pp(){if(wt===null)try{new FormData(document.createElement("form"),0),wt=!1}catch{wt=!0}return wt}var gp=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ac(t){return t!=null&&!gp.has(t)?(U4(!1,`"${t}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${$t}"`),null):t}function xp(t,c){let n,i,u,h,d;if(dp(t)){let v=t.getAttribute("action");i=v?b3(v,c):null,n=t.getAttribute("method")||Pt,u=ac(t.getAttribute("enctype"))||$t,h=new FormData(t)}else if(hp(t)||fp(t)&&(t.type==="submit"||t.type==="image")){let v=t.form;if(v==null)throw new Error('Cannot submit a diff --git a/webui/src/components/RoverQueuesPanel/index.jsx b/webui/src/components/RoverQueuesPanel/index.jsx index 7c3443ed..c0528a1d 100644 --- a/webui/src/components/RoverQueuesPanel/index.jsx +++ b/webui/src/components/RoverQueuesPanel/index.jsx @@ -7,9 +7,10 @@ import { useSharedClock } from '../../hooks/useSharedClock.js'; import CardFrame from '../CardFrame/index.jsx'; import RoverLabel from '../RoverLabel/index.jsx'; import { trackAnalyticsEvent } from '../../analytics/index.js'; -import { openExternalRoverWithPrompt } from '../../lib/interInstanceTransfer.js'; +import { openExternalRover } from '../../lib/interInstanceTransfer.js'; import { ExternalInstancesCompact } from '../InterInstancePanel/index.jsx'; import { isFeatureEnabled } from '../../lib/features.js'; +import { useSettingsNamespace } from '../../settings/index.js'; function classNames(...values) { return values.filter(Boolean).join(' '); @@ -62,6 +63,7 @@ export default function RoverQueuesPanel({ const localTurnQueues = useSessionSelector((state) => state.session?.turnQueues ?? {}); const localUsers = useSessionSelector((state) => state.session?.users ?? []); const interInstanceEnabled = useSessionSelector((state) => isFeatureEnabled(state, 'interInstance')); + const { value: pageSettings } = useSettingsNamespace('page', { interInstanceTransferSettings: true }); const selfId = useSessionSelector((state) => state.session?.socketId || null); const assignedRoverId = useSessionSelector((state) => String(state.session?.assignment?.roverId || '').trim()); const assignedRoverName = useSessionSelector((state) => { @@ -75,6 +77,7 @@ export default function RoverQueuesPanel({ const [rebootPending, setRebootPending] = useState(false); const externalMode = Boolean(externalInstance); const externalBlocked = Boolean(externalMode && disabledOverlay); + const includeInterInstanceSettings = pageSettings?.interInstanceTransferSettings !== false; const roster = Array.isArray(rosterOverride) ? rosterOverride : localRoster; const turnQueues = turnQueuesOverride && typeof turnQueuesOverride === 'object' ? turnQueuesOverride : localTurnQueues; const users = Array.isArray(usersOverride) ? usersOverride : localUsers; @@ -113,9 +116,10 @@ export default function RoverQueuesPanel({ /* External queue cards deliberately reuse the local row layout, but their action cannot go through this Socket.IO server. The row opens the remote - instance, optionally carrying settings after the source-page prompt. + instance and follows the saved Page setting for cookie/settings transfer + instead of interrupting each click with a confirmation popup. */ - openExternalRoverWithPrompt(externalInstance, targetRoverId); + openExternalRover(externalInstance, targetRoverId, { includeSettings: includeInterInstanceSettings }); return; } setPending((prev) => ({ ...prev, [targetRoverId]: true })); diff --git a/webui/src/components/SettingsPanel/index.jsx b/webui/src/components/SettingsPanel/index.jsx index d3a788dc..e2adbfe5 100644 --- a/webui/src/components/SettingsPanel/index.jsx +++ b/webui/src/components/SettingsPanel/index.jsx @@ -91,6 +91,18 @@ function RangeSetting({ label, value, disabled = false, onChange }) { ); } +function reconnectSocketWithTransport(socket, transport) { + if (!socket?.io?.opts) return; + /* + Socket.IO reads its manager options when reconnecting. Keep this mutation in + one helper instead of inside the component body so the settings handler only + expresses the user-facing action: save preference, then reconnect. + */ + socket.io.opts.transports = transport === 'polling' ? ['polling'] : ['websocket', 'polling']; + socket.disconnect(); + socket.connect(); +} + export default function SettingsPanel() { const keymap = useControlSelector((control) => control.state.keymap); const roverId = useControlSelector((control) => control.state.roverId); @@ -103,6 +115,7 @@ export default function SettingsPanel() { connectionTransport: 'websocket', swapMobileControlColumns: false, driveMacroBackoffEnabled: true, + interInstanceTransferSettings: true, }); const { value: audioSettings, save: saveAudioSettings } = useSettingsNamespace('audio', AUDIO_SETTINGS_DEFAULTS); const { value: videoSettings, save: saveVideoSettings } = useSettingsNamespace('video', VIDEO_SETTINGS_DEFAULTS); @@ -112,6 +125,7 @@ export default function SettingsPanel() { typeof pageSettings?.driveMacroBackoffEnabled === 'boolean' ? pageSettings.driveMacroBackoffEnabled : true; + const interInstanceTransferSettings = pageSettings?.interInstanceTransferSettings !== false; const masterVolume = Number.isFinite(audioSettings?.masterVolume) ? audioSettings.masterVolume : AUDIO_SETTINGS_DEFAULTS.masterVolume; const alertVolume = Number.isFinite(audioSettings?.alertVolume) ? audioSettings.alertVolume : AUDIO_SETTINGS_DEFAULTS.alertVolume; const roverVolume = Number.isFinite(audioSettings?.roverVolume) ? audioSettings.roverVolume : AUDIO_SETTINGS_DEFAULTS.roverVolume; @@ -144,10 +158,7 @@ export default function SettingsPanel() { const next = event.target.value; savePageSettings((current) => ({ ...(current ?? {}), connectionTransport: next })); trackAnalyticsEvent('settings_change', { setting: 'connection_transport', value: next }); - if (!socket?.io?.opts) return; - socket.io.opts.transports = next === 'polling' ? ['polling'] : ['websocket', 'polling']; - socket.disconnect(); - socket.connect(); + reconnectSocketWithTransport(socket, next); }; const handleAudioRange = (key) => (event) => { @@ -180,6 +191,17 @@ export default function SettingsPanel() { trackAnalyticsEvent('settings_change', { setting: 'driveMacroBackoffEnabled', value: checked }); }; + const handleInterInstanceTransferSettings = (event) => { + const checked = Boolean(event.target.checked); + /* + This replaces the old per-click transfer confirmation. Keeping the choice + in Page settings makes external-server navigation immediate while still + letting users opt out of sending their current settings cookie. + */ + savePageSettings((current) => ({ ...(current ?? {}), interInstanceTransferSettings: checked })); + trackAnalyticsEvent('settings_change', { setting: 'interInstanceTransferSettings', value: checked }); + }; + const handleVideoFilterChange = (event) => { const nextFilter = normalizeVideoFilter(event.target.value); @@ -329,6 +351,20 @@ export default function SettingsPanel() { Switching reconnects your session. + + + + Transfer settings when opening external servers + + + Sends this browser's saved identity and page settings to the destination server automatically. + + diff --git a/webui/src/controls/overcurrentLimiter.js b/webui/src/controls/overcurrentLimiter.js index 309ecee1..dafa7df5 100644 --- a/webui/src/controls/overcurrentLimiter.js +++ b/webui/src/controls/overcurrentLimiter.js @@ -17,6 +17,8 @@ export const DEFAULT_OVERCURRENT_LIMITS = { outputRateMs: 250, }; +const RECOVERED_CAP_THRESHOLD = 0.999; + function createInitialCaps() { return OVERCURRENT_GROUPS.reduce((acc, group) => { acc[group.key] = { cap: 1, clearSec: 0 }; @@ -54,7 +56,17 @@ export function useOvercurrentLimiter(roverId, options = {}) { [overcurrentFlags], ); const needsRecoveryTick = useMemo( - () => Object.values(caps || {}).some((entry) => (Number.isFinite(entry?.cap) ? entry.cap : 1) < 0.999), + () => + Object.values(caps || {}).some((entry) => { + /* + Recovery intentionally completes at a tiny tolerance below exactly 1. + The limiter advances in timed floating-point steps, so requiring an + exact 1 can strand the UI at a visually empty bar while the limiter is + still technically active at a value like 0.9992. + */ + const cap = Number.isFinite(entry?.cap) ? entry.cap : 1; + return cap < RECOVERED_CAP_THRESHOLD; + }), [caps], ); const shouldTick = Boolean(roverId) && (hasAnyOvercurrent || needsRecoveryTick); @@ -81,9 +93,15 @@ export function useOvercurrentLimiter(roverId, options = {}) { const over = group.motors.some((motor) => Boolean(flagsRef.current?.[motor])); const nextClear = over ? 0 : prevClear + deltaSec; const allowRecover = !over && nextClear >= releaseDelay; - const nextCap = clampUnit( + const rawNextCap = clampUnit( over ? prevCap - downRate * deltaSec : allowRecover ? prevCap + upRate * deltaSec : prevCap, ); + /* + Once recovery reaches the shared completion threshold, snap the cap + to exactly full strength. This keeps the tick loop, command scaling, + and HUD visibility from disagreeing over a harmless fractional tail. + */ + const nextCap = !over && rawNextCap >= RECOVERED_CAP_THRESHOLD ? 1 : rawNextCap; if (Math.abs(nextCap - prevCap) > 0.0001 || Math.abs(nextClear - prevClear) > 0.0001) { changed = true; } @@ -137,7 +155,17 @@ export function useOvercurrentLimiter(roverId, options = {}) { caps, overcurrent, scales, - isActive: (scales?.drive?.left ?? 1) < 1 || (scales?.drive?.right ?? 1) < 1 || (scales?.aux?.main ?? 1) < 1 || (scales?.aux?.side ?? 1) < 1, + /* + HUD and resend behavior should only remain active while the limiter has + meaningful scale left to recover. Using the same threshold as the tick + loop prevents an empty overcurrent overlay from staying mounted after + recovery has already stopped. + */ + isActive: + (scales?.drive?.left ?? 1) < RECOVERED_CAP_THRESHOLD || + (scales?.drive?.right ?? 1) < RECOVERED_CAP_THRESHOLD || + (scales?.aux?.main ?? 1) < RECOVERED_CAP_THRESHOLD || + (scales?.aux?.side ?? 1) < RECOVERED_CAP_THRESHOLD, config, adminImmune, }), diff --git a/webui/src/hooks/useIncomingInterInstanceTransfer.js b/webui/src/hooks/useIncomingInterInstanceTransfer.js index 3026ca94..65a46d23 100644 --- a/webui/src/hooks/useIncomingInterInstanceTransfer.js +++ b/webui/src/hooks/useIncomingInterInstanceTransfer.js @@ -25,9 +25,9 @@ export default function useIncomingInterInstanceTransfer() { } try { /* - The source page already asked before adding settingsTransfer. A present - transfer param is therefore an explicit instruction to replace the local - settings cookie without asking again on the destination server. + The source page only adds settingsTransfer when its saved Page setting + allows it. A present transfer param is therefore an explicit instruction + to replace the local settings cookie without asking again here. */ const nextSettings = base64UrlDecodeJson(transfer); settings.saveAll(nextSettings && typeof nextSettings === 'object' ? nextSettings : {}); diff --git a/webui/src/lib/interInstanceTransfer.js b/webui/src/lib/interInstanceTransfer.js index f95ad0a7..08973826 100644 --- a/webui/src/lib/interInstanceTransfer.js +++ b/webui/src/lib/interInstanceTransfer.js @@ -1,5 +1,5 @@ // Inter-Instance Transfer Helpers -// Purpose: Builds cross-server links and moves the local settings cookie only when the user opts in before leaving. +// Purpose: Builds cross-server links and optionally carries the local settings cookie when page settings allow it. // Scope: Keeps URL encoding and settings-transfer behavior out of the rover queue rendering code. import { loadSettings } from '../settings/persistence.js'; @@ -27,8 +27,9 @@ export function buildExternalRoverUrl(instance, roverId, { includeSettings = fal const url = new URL(publicUrl); if (roverId) url.searchParams.set('rover', String(roverId)); /* - The destination always applies settingsTransfer if present, so this helper - only adds it after the current page has already asked for consent. + The destination always applies settingsTransfer if present. Whether this + source page includes the payload is controlled by the persistent Page + settings toggle, so cross-server navigation does not need a per-click popup. */ if (includeSettings) { url.searchParams.set('settingsTransfer', base64UrlEncodeJson(loadSettings())); @@ -36,13 +37,8 @@ export function buildExternalRoverUrl(instance, roverId, { includeSettings = fal return url.toString(); } -export function openExternalRoverWithPrompt(instance, roverId) { - const withoutTransfer = buildExternalRoverUrl(instance, roverId); - if (!withoutTransfer) return; - const instanceName = String(instance?.instance?.name || instance?.url || 'that server'); - const includeSettings = window.confirm( - `Transfer your identity and settings to ${instanceName}? Press Cancel to open without transferring them.`, - ); +export function openExternalRover(instance, roverId, { includeSettings = true } = {}) { const targetUrl = buildExternalRoverUrl(instance, roverId, { includeSettings }); - window.location.href = targetUrl || withoutTransfer; + if (!targetUrl) return; + window.location.href = targetUrl; }