diff --git a/qimingclaw/crates/agent-electron-client/embedded/sgrobot-digital/src/lib/qimingclawAdapter.ts b/qimingclaw/crates/agent-electron-client/embedded/sgrobot-digital/src/lib/qimingclawAdapter.ts index 7b1a7837..7c6c008e 100644 --- a/qimingclaw/crates/agent-electron-client/embedded/sgrobot-digital/src/lib/qimingclawAdapter.ts +++ b/qimingclaw/crates/agent-electron-client/embedded/sgrobot-digital/src/lib/qimingclawAdapter.ts @@ -1,5 +1,6 @@ import type { ApprovalEntry, + ApprovalTimelineResponse, ArtifactEntry, CanonicalEvent, CronJob, @@ -639,6 +640,10 @@ export async function handleQimingclawDigitalApi( if (method === 'GET' && pathname === '/api/artifact') { return { artifacts: buildArtifacts(await readQimingclawSnapshot()) } as T; } + const approvalTimelineMatch = pathname.match(/^\/api\/approval\/([^/]+)\/timeline$/); + if (method === 'GET' && approvalTimelineMatch) { + return buildApprovalTimeline(decodeURIComponent(approvalTimelineMatch[1] || ''), await readQimingclawSnapshot()) as T; + } if (method === 'GET' && pathname === '/api/memory') { return { entries: await readMemoryEntries(url.searchParams.get('query'), url.searchParams.get('category')) } as T; } @@ -1963,6 +1968,107 @@ function buildApprovals(snapshot: QimingclawSnapshot | null): ApprovalEntry[] { return [...runtimeApprovalEntries, ...syncReviewEntries]; } +function buildApprovalTimeline(approvalId: string, snapshot: QimingclawSnapshot | null): ApprovalTimelineResponse { + const approval = buildApprovals(snapshot).find((candidate) => stringValue(candidate.approval_id) === approvalId) ?? null; + const runtimeApproval = runtimeApprovals(snapshot).find((candidate) => candidate.id === approvalId) ?? null; + const approvalPayload = asRecord(approval?.payload ?? runtimeApproval?.payload); + const approvalAcpPermission = acpPermissionFromPayload(approvalPayload); + const refs = { + approvalId, + planId: stringValue(approval?.plan_id) || runtimeApproval?.planId || '', + taskId: stringValue(approval?.task_id) || runtimeApproval?.taskId || '', + runId: stringValue(approval?.run_id) || runtimeApproval?.runId || '', + permissionId: approvalAcpPermission.permissionId, + sessionId: approvalAcpPermission.sessionId, + }; + const approvalCreatedAt = stringValue(approval?.created_at) || runtimeApproval?.createdAt || runtimeApproval?.updatedAt || ''; + const entries: ApprovalTimelineResponse['events'] = []; + + if (approval || runtimeApproval) { + const title = stringValue(approval?.title) || runtimeApproval?.title || '待确认事项'; + const status = stringValue(approval?.status) || runtimeApproval?.status || 'pending'; + entries.push({ + event_id: `${approvalId}:approval_record`, + kind: 'approval_record', + status, + message: `审批记录:${title} -> ${status}`, + occurred_at: approvalCreatedAt || new Date().toISOString(), + payload: approvalPayload, + source_type: 'approval', + }); + } + + for (const event of runtimeEvents(snapshot)) { + if (!isApprovalTimelineEvent(event, refs)) continue; + const payload = asRecord(event.payload); + entries.push({ + event_id: event.id, + kind: event.kind, + status: approvalTimelineEventStatus(event, payload), + message: event.message || event.kind, + occurred_at: event.occurredAt, + payload, + source_type: stringValue(payload?.source) || 'runtime_event', + }); + } + + return { + approval_id: approvalId, + approval, + events: dedupeApprovalTimelineEvents(entries) + .sort((left, right) => left.occurred_at.localeCompare(right.occurred_at) || left.event_id.localeCompare(right.event_id)), + }; +} + +function acpPermissionFromPayload(payload: Record | null): { permissionId: string; sessionId: string } { + const nested = asRecord(payload?.acpPermission) ?? asRecord(payload?.acp_permission) ?? asRecord(payload?.permission); + return { + permissionId: stringValue(nested?.permission_id) || stringValue(nested?.permissionId) || stringValue(payload?.permission_id) || stringValue(payload?.permissionId), + sessionId: stringValue(nested?.session_id) || stringValue(nested?.sessionId) || stringValue(payload?.session_id) || stringValue(payload?.sessionId), + }; +} + +function isApprovalTimelineEvent( + event: QimingclawEventRecord, + refs: { approvalId: string; planId: string; taskId: string; runId: string; permissionId: string; sessionId: string }, +): boolean { + const payload = asRecord(event.payload); + const payloadApprovalId = stringValue(payload?.approvalId) + || stringValue(payload?.approval_id) + || stringValue(payload?.decision_id) + || stringValue(payload?.decisionId); + if (payloadApprovalId === refs.approvalId) return true; + if (event.id.startsWith(`${refs.approvalId}:`)) return true; + + const acpPermission = acpPermissionFromPayload(payload); + if (refs.permissionId && acpPermission.permissionId === refs.permissionId) return true; + if (refs.sessionId && acpPermission.sessionId === refs.sessionId) return true; + + const approvalLikeKind = event.kind.includes('approval') || event.kind.includes('permission'); + if (!approvalLikeKind) return false; + if (refs.runId && event.runId === refs.runId) return true; + if (refs.taskId && event.taskId === refs.taskId) return true; + if (refs.planId && event.planId === refs.planId) return true; + return false; +} + +function approvalTimelineEventStatus(event: QimingclawEventRecord, payload: Record | null): string | null { + return stringValue(payload?.nextStatus) + || stringValue(payload?.next_status) + || stringValue(payload?.status) + || stringValue(payload?.decision) + || (event.kind === 'approval_decision' ? 'completed' : null); +} + +function dedupeApprovalTimelineEvents(events: ApprovalTimelineResponse['events']): ApprovalTimelineResponse['events'] { + const seen = new Set(); + return events.filter((event) => { + if (seen.has(event.event_id)) return false; + seen.add(event.event_id); + return true; + }); +} + function buildWorkdayDecisions( state: AdapterState, date: string, diff --git a/qimingclaw/crates/agent-electron-client/embedded/sgrobot-digital/src/types/api.ts b/qimingclaw/crates/agent-electron-client/embedded/sgrobot-digital/src/types/api.ts index b15654e4..86f31554 100644 --- a/qimingclaw/crates/agent-electron-client/embedded/sgrobot-digital/src/types/api.ts +++ b/qimingclaw/crates/agent-electron-client/embedded/sgrobot-digital/src/types/api.ts @@ -443,6 +443,22 @@ export interface ApprovalEntry { [key: string]: any; } +export interface ApprovalTimelineEvent { + event_id: string; + kind: string; + status?: string | null; + message: string; + occurred_at: string; + payload?: Record | null; + source_type: string; +} + +export interface ApprovalTimelineResponse { + approval_id: string; + approval: ApprovalEntry | null; + events: ApprovalTimelineEvent[]; +} + export interface ArtifactEntry { artifact_id?: string; subject_id: string; diff --git a/qimingclaw/crates/agent-electron-client/public/sgrobot-digital/assets/index-Dm9GtUrc.js b/qimingclaw/crates/agent-electron-client/public/sgrobot-digital/assets/index-Dm9GtUrc.js deleted file mode 100644 index 86132d37..00000000 --- a/qimingclaw/crates/agent-electron-client/public/sgrobot-digital/assets/index-Dm9GtUrc.js +++ /dev/null @@ -1,138 +0,0 @@ -(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))c(d);new MutationObserver(d=>{for(const f of d)if(f.type==="childList")for(const h of f.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&c(h)}).observe(document,{childList:!0,subtree:!0});function s(d){const f={};return d.integrity&&(f.integrity=d.integrity),d.referrerPolicy&&(f.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?f.credentials="include":d.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function c(d){if(d.ep)return;d.ep=!0;const f=s(d);fetch(d.href,f)}})();function Qv(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Qo={exports:{}},Es={};/** - * @license React - * react-jsx-runtime.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Ap;function Kv(){if(Ap)return Es;Ap=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function s(c,d,f){var h=null;if(f!==void 0&&(h=""+f),d.key!==void 0&&(h=""+d.key),"key"in d){f={};for(var _ in d)_!=="key"&&(f[_]=d[_])}else f=d;return d=f.ref,{$$typeof:n,type:c,key:h,ref:d!==void 0?d:null,props:f}}return Es.Fragment=i,Es.jsx=s,Es.jsxs=s,Es}var Tp;function Xv(){return Tp||(Tp=1,Qo.exports=Kv()),Qo.exports}var u=Xv(),Ko={exports:{}},ge={};/** - * @license React - * react.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Cp;function Zv(){if(Cp)return ge;Cp=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),h=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),S=Symbol.for("react.activity"),w=Symbol.iterator;function M(k){return k===null||typeof k!="object"?null:(k=w&&k[w]||k["@@iterator"],typeof k=="function"?k:null)}var A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},O=Object.assign,z={};function q(k,B,J){this.props=k,this.context=B,this.refs=z,this.updater=J||A}q.prototype.isReactComponent={},q.prototype.setState=function(k,B){if(typeof k!="object"&&typeof k!="function"&&k!=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,k,B,"setState")},q.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function I(){}I.prototype=q.prototype;function V(k,B,J){this.props=k,this.context=B,this.refs=z,this.updater=J||A}var ee=V.prototype=new I;ee.constructor=V,O(ee,q.prototype),ee.isPureReactComponent=!0;var ne=Array.isArray;function he(){}var X={H:null,A:null,T:null,S:null},ie=Object.prototype.hasOwnProperty;function ae(k,B,J){var W=J.ref;return{$$typeof:n,type:k,key:B,ref:W!==void 0?W:null,props:J}}function be(k,B){return ae(k.type,B,k.props)}function Be(k){return typeof k=="object"&&k!==null&&k.$$typeof===n}function ze(k){var B={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(J){return B[J]})}var K=/\/+/g;function re(k,B){return typeof k=="object"&&k!==null&&k.key!=null?ze(""+k.key):B.toString(36)}function L(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(he,he):(k.status="pending",k.then(function(B){k.status==="pending"&&(k.status="fulfilled",k.value=B)},function(B){k.status==="pending"&&(k.status="rejected",k.reason=B)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function C(k,B,J,W,de){var _e=typeof k;(_e==="undefined"||_e==="boolean")&&(k=null);var Z=!1;if(k===null)Z=!0;else switch(_e){case"bigint":case"string":case"number":Z=!0;break;case"object":switch(k.$$typeof){case n:case i:Z=!0;break;case x:return Z=k._init,C(Z(k._payload),B,J,W,de)}}if(Z)return de=de(k),Z=W===""?"."+re(k,0):W,ne(de)?(J="",Z!=null&&(J=Z.replace(K,"$&/")+"/"),C(de,B,J,"",function(Oe){return Oe})):de!=null&&(Be(de)&&(de=be(de,J+(de.key==null||k&&k.key===de.key?"":(""+de.key).replace(K,"$&/")+"/")+Z)),B.push(de)),1;Z=0;var P=W===""?".":W+":";if(ne(k))for(var Me=0;Me>>1,Se=C[me];if(0>>1;med(J,le))Wd(de,J)?(C[me]=de,C[W]=le,me=W):(C[me]=J,C[B]=le,me=B);else if(Wd(de,le))C[me]=de,C[W]=le,me=W;else break e}}return Q}function d(C,Q){var le=C.sortIndex-Q.sortIndex;return le!==0?le:C.id-Q.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;n.unstable_now=function(){return f.now()}}else{var h=Date,_=h.now();n.unstable_now=function(){return h.now()-_}}var p=[],g=[],x=1,S=null,w=3,M=!1,A=!1,O=!1,z=!1,q=typeof setTimeout=="function"?setTimeout:null,I=typeof clearTimeout=="function"?clearTimeout:null,V=typeof setImmediate<"u"?setImmediate:null;function ee(C){for(var Q=s(g);Q!==null;){if(Q.callback===null)c(g);else if(Q.startTime<=C)c(g),Q.sortIndex=Q.expirationTime,i(p,Q);else break;Q=s(g)}}function ne(C){if(O=!1,ee(C),!A)if(s(p)!==null)A=!0,he||(he=!0,ze());else{var Q=s(g);Q!==null&&L(ne,Q.startTime-C)}}var he=!1,X=-1,ie=5,ae=-1;function be(){return z?!0:!(n.unstable_now()-aeC&&be());){var me=S.callback;if(typeof me=="function"){S.callback=null,w=S.priorityLevel;var Se=me(S.expirationTime<=C);if(C=n.unstable_now(),typeof Se=="function"){S.callback=Se,ee(C),Q=!0;break t}S===s(p)&&c(p),ee(C)}else c(p);S=s(p)}if(S!==null)Q=!0;else{var k=s(g);k!==null&&L(ne,k.startTime-C),Q=!1}}break e}finally{S=null,w=le,M=!1}Q=void 0}}finally{Q?ze():he=!1}}}var ze;if(typeof V=="function")ze=function(){V(Be)};else if(typeof MessageChannel<"u"){var K=new MessageChannel,re=K.port2;K.port1.onmessage=Be,ze=function(){re.postMessage(null)}}else ze=function(){q(Be,0)};function L(C,Q){X=q(function(){C(n.unstable_now())},Q)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(C){C.callback=null},n.unstable_forceFrameRate=function(C){0>C||125me?(C.sortIndex=le,i(g,C),s(p)===null&&C===s(g)&&(O?(I(X),X=-1):O=!0,L(ne,le-me))):(C.sortIndex=Se,i(p,C),A||M||(A=!0,he||(he=!0,ze()))),C},n.unstable_shouldYield=be,n.unstable_wrapCallback=function(C){var Q=w;return function(){var le=w;w=Q;try{return C.apply(this,arguments)}finally{w=le}}}})(Vo)),Vo}var Rp;function Fv(){return Rp||(Rp=1,Zo.exports=Jv()),Zo.exports}var Jo={exports:{}},kt={};/** - * @license React - * react-dom.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var zp;function Iv(){if(zp)return kt;zp=1;var n=Td();function i(p){var g="https://react.dev/errors/"+p;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),Jo.exports=Iv(),Jo.exports}/** - * @license React - * react-dom-client.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Op;function Pv(){if(Op)return As;Op=1;var n=Fv(),i=Td(),s=Wv();function c(e){var t="https://react.dev/errors/"+e;if(1Se||(e.current=me[Se],me[Se]=null,Se--)}function J(e,t){Se++,me[Se]=e.current,e.current=t}var W=k(null),de=k(null),_e=k(null),Z=k(null);function P(e,t){switch(J(_e,t),J(de,e),J(W,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Fh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Fh(t),e=Ih(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(W),J(W,e)}function Me(){B(W),B(de),B(_e)}function Oe(e){e.memoizedState!==null&&J(Z,e);var t=W.current,a=Ih(t,e.type);t!==a&&(J(de,e),J(W,a))}function xe(e){de.current===e&&(B(W),B(de)),Z.current===e&&(B(Z),xs._currentValue=le)}var At,yt;function Te(e){if(At===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);At=t&&t[1]||"",yt=-1)":-1r||j[l]!==D[r]){var U=` -`+j[l].replace(" at new "," at ");return e.displayName&&U.includes("")&&(U=U.replace("",e.displayName)),U}while(1<=l&&0<=r);break}}}finally{nt=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Te(a):""}function ji(e,t){switch(e.tag){case 26:case 27:case 5:return Te(e.type);case 16:return Te("Lazy");case 13:return e.child!==t&&t!==null?Te("Suspense Fallback"):Te("Suspense");case 19:return Te("SuspenseList");case 0:case 15:return Yn(e.type,!1);case 11:return Yn(e.type.render,!1);case 1:return Yn(e.type,!0);case 31:return Te("Activity");default:return""}}function Al(e){try{var t="",a=null;do t+=ji(e,a),a=e,e=e.return;while(e);return t}catch(l){return` -Error generating stack: `+l.message+` -`+l.stack}}var wi=Object.prototype.hasOwnProperty,ki=n.unstable_scheduleCallback,vt=n.unstable_cancelCallback,Qs=n.unstable_shouldYield,ke=n.unstable_requestPaint,ht=n.unstable_now,Pt=n.unstable_getCurrentPriorityLevel,en=n.unstable_ImmediatePriority,Fa=n.unstable_UserBlockingPriority,Nt=n.unstable_NormalPriority,Tt=n.unstable_LowPriority,Ia=n.unstable_IdlePriority,Qn=n.log,Wa=n.unstable_setDisableYieldValue,Kn=null,Xe=null;function En(e){if(typeof Qn=="function"&&Wa(e),Xe&&typeof Xe.setStrictMode=="function")try{Xe.setStrictMode(Kn,e)}catch{}}var wt=Math.clz32?Math.clz32:Ei,ma=Math.log,Hc=Math.LN2;function Ei(e){return e>>>=0,e===0?32:31-(ma(e)/Hc|0)|0}var Tl=256,Cl=262144,Nl=4194304;function Xn(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Dt(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var r=0,o=e.suspendedLanes,m=e.pingedLanes;e=e.warmLanes;var y=l&134217727;return y!==0?(l=y&~o,l!==0?r=Xn(l):(m&=y,m!==0?r=Xn(m):a||(a=y&~e,a!==0&&(r=Xn(a))))):(y=l&~o,y!==0?r=Xn(y):m!==0?r=Xn(m):a||(a=l&~e,a!==0&&(r=Xn(a)))),r===0?0:t!==0&&t!==r&&(t&o)===0&&(o=r&-r,a=t&-t,o>=a||o===32&&(a&4194048)!==0)?t:r}function Le(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ce(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Dl(){var e=Nl;return Nl<<=1,(Nl&62914560)===0&&(Nl=4194304),e}function Ks(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function tn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Fd(e,t,a,l,r,o){var m=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var y=e.entanglements,j=e.expirationTimes,D=e.hiddenUpdates;for(a=m&~a;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Fs=/[\n"\\]/g;function zt(e){return e.replace(Fs,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Mi(e,t,a,l,r,o,m,y){e.name="",m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.type=m:e.removeAttribute("type"),t!=null?m==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Rt(t)):e.value!==""+Rt(t)&&(e.value=""+Rt(t)):m!=="submit"&&m!=="reset"||e.removeAttribute("value"),t!=null?Oi(e,m,Rt(t)):a!=null?Oi(e,m,Rt(a)):l!=null&&e.removeAttribute("value"),r==null&&o!=null&&(e.defaultChecked=!!o),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.name=""+Rt(y):e.removeAttribute("name")}function Is(e,t,a,l,r,o,m,y){if(o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.type=o),t!=null||a!=null){if(!(o!=="submit"&&o!=="reset"||t!=null)){Ri(e);return}a=a!=null?""+Rt(a):"",t=t!=null?""+Rt(t):a,y||t===e.value||(e.value=t),e.defaultValue=t}l=l??r,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=y?e.checked:!!l,e.defaultChecked=!!l,m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(e.name=m),Ri(e)}function Oi(e,t,a){t==="number"&&Pa(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function va(e,t,a,l){if(e=e.options,t){t={};for(var r=0;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ll=!1;if(nn)try{var wa={};Object.defineProperty(wa,"passive",{get:function(){Ll=!0}}),window.addEventListener("test",wa,wa),window.removeEventListener("test",wa,wa)}catch{Ll=!1}var v=null,F=null,ue=null;function Re(){if(ue)return ue;var e,t=F,a=t.length,l,r="value"in v?v.value:v.textContent,o=r.length;for(e=0;e=Yi),nf=" ",af=!1;function lf(e,t){switch(e){case"keyup":return f_.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function sf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ul=!1;function h_(e,t){switch(e){case"compositionend":return sf(t);case"keypress":return t.which!==32?null:(af=!0,nf);case"textInput":return e=t.data,e===nf&&af?null:e;default:return null}}function p_(e,t){if(Ul)return e==="compositionend"||!Jc&&lf(e,t)?(e=Re(),ue=F=v=null,Ul=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=hf(a)}}function gf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?gf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function yf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Pa(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=Pa(e.document)}return t}function Wc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var j_=nn&&"documentMode"in document&&11>=document.documentMode,Bl=null,Pc=null,Zi=null,eu=!1;function _f(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;eu||Bl==null||Bl!==Pa(l)||(l=Bl,"selectionStart"in l&&Wc(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Zi&&Xi(Zi,l)||(Zi=l,l=Kr(Pc,"onSelect"),0>=m,r-=m,Mn=1<<32-wt(t)+r|a<ve?(Ae=se,se=null):Ae=se.sibling;var qe=R(T,se,N[ve],H);if(qe===null){se===null&&(se=Ae);break}e&&se&&qe.alternate===null&&t(T,se),E=o(qe,E,ve),$e===null?ce=qe:$e.sibling=qe,$e=qe,se=Ae}if(ve===N.length)return a(T,se),Ne&&Jn(T,ve),ce;if(se===null){for(;veve?(Ae=se,se=null):Ae=se.sibling;var Xa=R(T,se,qe.value,H);if(Xa===null){se===null&&(se=Ae);break}e&&se&&Xa.alternate===null&&t(T,se),E=o(Xa,E,ve),$e===null?ce=Xa:$e.sibling=Xa,$e=Xa,se=Ae}if(qe.done)return a(T,se),Ne&&Jn(T,ve),ce;if(se===null){for(;!qe.done;ve++,qe=N.next())qe=G(T,qe.value,H),qe!==null&&(E=o(qe,E,ve),$e===null?ce=qe:$e.sibling=qe,$e=qe);return Ne&&Jn(T,ve),ce}for(se=l(se);!qe.done;ve++,qe=N.next())qe=$(se,T,ve,qe.value,H),qe!==null&&(e&&qe.alternate!==null&&se.delete(qe.key===null?ve:qe.key),E=o(qe,E,ve),$e===null?ce=qe:$e.sibling=qe,$e=qe);return e&&se.forEach(function(Yv){return t(T,Yv)}),Ne&&Jn(T,ve),ce}function Ke(T,E,N,H){if(typeof N=="object"&&N!==null&&N.type===O&&N.key===null&&(N=N.props.children),typeof N=="object"&&N!==null){switch(N.$$typeof){case M:e:{for(var ce=N.key;E!==null;){if(E.key===ce){if(ce=N.type,ce===O){if(E.tag===7){a(T,E.sibling),H=r(E,N.props.children),H.return=T,T=H;break e}}else if(E.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===ie&&ul(ce)===E.type){a(T,E.sibling),H=r(E,N.props),Pi(H,N),H.return=T,T=H;break e}a(T,E);break}else t(T,E);E=E.sibling}N.type===O?(H=ll(N.props.children,T.mode,H,N.key),H.return=T,T=H):(H=cr(N.type,N.key,N.props,null,T.mode,H),Pi(H,N),H.return=T,T=H)}return m(T);case A:e:{for(ce=N.key;E!==null;){if(E.key===ce)if(E.tag===4&&E.stateNode.containerInfo===N.containerInfo&&E.stateNode.implementation===N.implementation){a(T,E.sibling),H=r(E,N.children||[]),H.return=T,T=H;break e}else{a(T,E);break}else t(T,E);E=E.sibling}H=ru(N,T.mode,H),H.return=T,T=H}return m(T);case ie:return N=ul(N),Ke(T,E,N,H)}if(L(N))return te(T,E,N,H);if(ze(N)){if(ce=ze(N),typeof ce!="function")throw Error(c(150));return N=ce.call(N),fe(T,E,N,H)}if(typeof N.then=="function")return Ke(T,E,pr(N),H);if(N.$$typeof===V)return Ke(T,E,dr(T,N),H);gr(T,N)}return typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint"?(N=""+N,E!==null&&E.tag===6?(a(T,E.sibling),H=r(E,N),H.return=T,T=H):(a(T,E),H=su(N,T.mode,H),H.return=T,T=H),m(T)):a(T,E)}return function(T,E,N,H){try{Wi=0;var ce=Ke(T,E,N,H);return Il=null,ce}catch(se){if(se===Fl||se===mr)throw se;var $e=Xt(29,se,null,T.mode);return $e.lanes=H,$e.return=T,$e}finally{}}}var dl=Hf(!0),Gf=Hf(!1),Ca=!1;function vu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function bu(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Na(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Da(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ue&2)!==0){var r=l.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),l.pending=t,t=rr(e),kf(e,null,a),t}return sr(e,l,t,a),rr(e)}function es(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,pe(e,a)}}function Su(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var r=null,o=null;if(a=a.firstBaseUpdate,a!==null){do{var m={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};o===null?r=o=m:o=o.next=m,a=a.next}while(a!==null);o===null?r=o=t:o=o.next=t}else r=o=t;a={baseState:l.baseState,firstBaseUpdate:r,lastBaseUpdate:o,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var xu=!1;function ts(){if(xu){var e=Jl;if(e!==null)throw e}}function ns(e,t,a,l){xu=!1;var r=e.updateQueue;Ca=!1;var o=r.firstBaseUpdate,m=r.lastBaseUpdate,y=r.shared.pending;if(y!==null){r.shared.pending=null;var j=y,D=j.next;j.next=null,m===null?o=D:m.next=D,m=j;var U=e.alternate;U!==null&&(U=U.updateQueue,y=U.lastBaseUpdate,y!==m&&(y===null?U.firstBaseUpdate=D:y.next=D,U.lastBaseUpdate=j))}if(o!==null){var G=r.baseState;m=0,U=D=j=null,y=o;do{var R=y.lane&-536870913,$=R!==y.lane;if($?(Ee&R)===R:(l&R)===R){R!==0&&R===Vl&&(xu=!0),U!==null&&(U=U.next={lane:0,tag:y.tag,payload:y.payload,callback:null,next:null});e:{var te=e,fe=y;R=t;var Ke=a;switch(fe.tag){case 1:if(te=fe.payload,typeof te=="function"){G=te.call(Ke,G,R);break e}G=te;break e;case 3:te.flags=te.flags&-65537|128;case 0:if(te=fe.payload,R=typeof te=="function"?te.call(Ke,G,R):te,R==null)break e;G=S({},G,R);break e;case 2:Ca=!0}}R=y.callback,R!==null&&(e.flags|=64,$&&(e.flags|=8192),$=r.callbacks,$===null?r.callbacks=[R]:$.push(R))}else $={lane:R,tag:y.tag,payload:y.payload,callback:y.callback,next:null},U===null?(D=U=$,j=G):U=U.next=$,m|=R;if(y=y.next,y===null){if(y=r.shared.pending,y===null)break;$=y,y=$.next,$.next=null,r.lastBaseUpdate=$,r.shared.pending=null}}while(!0);U===null&&(j=G),r.baseState=j,r.firstBaseUpdate=D,r.lastBaseUpdate=U,o===null&&(r.shared.lanes=0),$a|=m,e.lanes=m,e.memoizedState=G}}function Yf(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function Qf(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;eo?o:8;var m=C.T,y={};C.T=y,Hu(e,!1,t,a);try{var j=r(),D=C.S;if(D!==null&&D(y,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){var U=R_(j,l);is(e,t,U,It(e))}else is(e,t,l,It(e))}catch(G){is(e,t,{then:function(){},status:"rejected",reason:G},It())}finally{Q.p=o,m!==null&&y.types!==null&&(m.types=y.types),C.T=m}}function L_(){}function Uu(e,t,a,l){if(e.tag!==5)throw Error(c(476));var r=xm(e).queue;Sm(e,r,t,le,a===null?L_:function(){return jm(e),a(l)})}function xm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:le,baseState:le,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pn,lastRenderedState:le},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pn,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function jm(e){var t=xm(e);t.next===null&&(t=e.alternate.memoizedState),is(e,t.next.queue,{},It())}function Bu(){return St(xs)}function wm(){return ct().memoizedState}function km(){return ct().memoizedState}function U_(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=It();e=Na(a);var l=Da(t,e,a);l!==null&&(Lt(l,t,a),es(l,t,a)),t={cache:pu()},e.payload=t;return}t=t.return}}function B_(e,t,a){var l=It();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Er(e)?Am(t,a):(a=lu(e,t,a,l),a!==null&&(Lt(a,e,l),Tm(a,t,l)))}function Em(e,t,a){var l=It();is(e,t,a,l)}function is(e,t,a,l){var r={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Er(e))Am(t,r);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var m=t.lastRenderedState,y=o(m,a);if(r.hasEagerState=!0,r.eagerState=y,Kt(y,m))return sr(e,t,r,0),Ve===null&&ir(),!1}catch{}finally{}if(a=lu(e,t,r,l),a!==null)return Lt(a,e,l),Tm(a,t,l),!0}return!1}function Hu(e,t,a,l){if(l={lane:2,revertLane:bo(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Er(e)){if(t)throw Error(c(479))}else t=lu(e,a,l,2),t!==null&&Lt(t,e,2)}function Er(e){var t=e.alternate;return e===ye||t!==null&&t===ye}function Am(e,t){Pl=vr=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Tm(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,pe(e,a)}}var ss={readContext:St,use:xr,useCallback:at,useContext:at,useEffect:at,useImperativeHandle:at,useLayoutEffect:at,useInsertionEffect:at,useMemo:at,useReducer:at,useRef:at,useState:at,useDebugValue:at,useDeferredValue:at,useTransition:at,useSyncExternalStore:at,useId:at,useHostTransitionStatus:at,useFormState:at,useActionState:at,useOptimistic:at,useMemoCache:at,useCacheRefresh:at};ss.useEffectEvent=at;var Cm={readContext:St,use:xr,useCallback:function(e,t){return Ct().memoizedState=[e,t===void 0?null:t],e},useContext:St,useEffect:fm,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,wr(4194308,4,gm.bind(null,t,e),a)},useLayoutEffect:function(e,t){return wr(4194308,4,e,t)},useInsertionEffect:function(e,t){wr(4,2,e,t)},useMemo:function(e,t){var a=Ct();t=t===void 0?null:t;var l=e();if(fl){En(!0);try{e()}finally{En(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=Ct();if(a!==void 0){var r=a(t);if(fl){En(!0);try{a(t)}finally{En(!1)}}}else r=t;return l.memoizedState=l.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},l.queue=e,e=e.dispatch=B_.bind(null,ye,e),[l.memoizedState,e]},useRef:function(e){var t=Ct();return e={current:e},t.memoizedState=e},useState:function(e){e=Mu(e);var t=e.queue,a=Em.bind(null,ye,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:qu,useDeferredValue:function(e,t){var a=Ct();return Lu(a,e,t)},useTransition:function(){var e=Mu(!1);return e=Sm.bind(null,ye,e.queue,!0,!1),Ct().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=ye,r=Ct();if(Ne){if(a===void 0)throw Error(c(407));a=a()}else{if(a=t(),Ve===null)throw Error(c(349));(Ee&127)!==0||Ff(l,t,a)}r.memoizedState=a;var o={value:a,getSnapshot:t};return r.queue=o,fm(Wf.bind(null,l,o,e),[e]),l.flags|=2048,ti(9,{destroy:void 0},If.bind(null,l,o,a,t),null),a},useId:function(){var e=Ct(),t=Ve.identifierPrefix;if(Ne){var a=On,l=Mn;a=(l&~(1<<32-wt(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=br++,0<\/script>",o=o.removeChild(o.firstChild);break;case"select":o=typeof l.is=="string"?m.createElement("select",{is:l.is}):m.createElement("select"),l.multiple?o.multiple=!0:l.size&&(o.size=l.size);break;default:o=typeof l.is=="string"?m.createElement(r,{is:l.is}):m.createElement(r)}}o[pt]=t,o[Ze]=l;e:for(m=t.child;m!==null;){if(m.tag===5||m.tag===6)o.appendChild(m.stateNode);else if(m.tag!==4&&m.tag!==27&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===t)break e;for(;m.sibling===null;){if(m.return===null||m.return===t)break e;m=m.return}m.sibling.return=m.return,m=m.sibling}t.stateNode=o;e:switch(jt(o,r,l),r){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&ta(t)}}return Fe(t),to(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&ta(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(c(166));if(e=_e.current,Xl(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,r=bt,r!==null)switch(r.tag){case 27:case 5:l=r.memoizedProps}e[pt]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||Vh(e.nodeValue,a)),e||Aa(t,!0)}else e=Xr(e).createTextNode(l),e[pt]=t,t.stateNode=e}return Fe(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=Xl(t),a!==null){if(e===null){if(!l)throw Error(c(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(557));e[pt]=t}else il(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Fe(t),e=!1}else a=du(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Vt(t),t):(Vt(t),null);if((t.flags&128)!==0)throw Error(c(558))}return Fe(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=Xl(t),l!==null&&l.dehydrated!==null){if(e===null){if(!r)throw Error(c(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(c(317));r[pt]=t}else il(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Fe(t),r=!1}else r=du(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(Vt(t),t):(Vt(t),null)}return Vt(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,r=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(r=l.alternate.memoizedState.cachePool.pool),o=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(o=l.memoizedState.cachePool.pool),o!==r&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Dr(t,t.updateQueue),Fe(t),null);case 4:return Me(),e===null&&wo(t.stateNode.containerInfo),Fe(t),null;case 10:return In(t.type),Fe(t),null;case 19:if(B(rt),l=t.memoizedState,l===null)return Fe(t),null;if(r=(t.flags&128)!==0,o=l.rendering,o===null)if(r)cs(l,!1);else{if(lt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(o=_r(e),o!==null){for(t.flags|=128,cs(l,!1),e=o.updateQueue,t.updateQueue=e,Dr(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Ef(a,e),a=a.sibling;return J(rt,rt.current&1|2),Ne&&Jn(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&ht()>$r&&(t.flags|=128,r=!0,cs(l,!1),t.lanes=4194304)}else{if(!r)if(e=_r(o),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,Dr(t,e),cs(l,!0),l.tail===null&&l.tailMode==="hidden"&&!o.alternate&&!Ne)return Fe(t),null}else 2*ht()-l.renderingStartTime>$r&&a!==536870912&&(t.flags|=128,r=!0,cs(l,!1),t.lanes=4194304);l.isBackwards?(o.sibling=t.child,t.child=o):(e=l.last,e!==null?e.sibling=o:t.child=o,l.last=o)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=ht(),e.sibling=null,a=rt.current,J(rt,r?a&1|2:a&1),Ne&&Jn(t,l.treeForkCount),e):(Fe(t),null);case 22:case 23:return Vt(t),wu(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(Fe(t),t.subtreeFlags&6&&(t.flags|=8192)):Fe(t),a=t.updateQueue,a!==null&&Dr(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&B(cl),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),In(ot),Fe(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function K_(e,t){switch(uu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return In(ot),Me(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return xe(t),null;case 31:if(t.memoizedState!==null){if(Vt(t),t.alternate===null)throw Error(c(340));il()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Vt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));il()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(rt),null;case 4:return Me(),null;case 10:return In(t.type),null;case 22:case 23:return Vt(t),wu(),e!==null&&B(cl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return In(ot),null;case 25:return null;default:return null}}function Pm(e,t){switch(uu(t),t.tag){case 3:In(ot),Me();break;case 26:case 27:case 5:xe(t);break;case 4:Me();break;case 31:t.memoizedState!==null&&Vt(t);break;case 13:Vt(t);break;case 19:B(rt);break;case 10:In(t.type);break;case 22:case 23:Vt(t),wu(),e!==null&&B(cl);break;case 24:In(ot)}}function us(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var r=l.next;a=r;do{if((a.tag&e)===e){l=void 0;var o=a.create,m=a.inst;l=o(),m.destroy=l}a=a.next}while(a!==r)}}catch(y){Ge(t,t.return,y)}}function Ma(e,t,a){try{var l=t.updateQueue,r=l!==null?l.lastEffect:null;if(r!==null){var o=r.next;l=o;do{if((l.tag&e)===e){var m=l.inst,y=m.destroy;if(y!==void 0){m.destroy=void 0,r=t;var j=a,D=y;try{D()}catch(U){Ge(r,j,U)}}}l=l.next}while(l!==o)}}catch(U){Ge(t,t.return,U)}}function eh(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Qf(t,a)}catch(l){Ge(e,e.return,l)}}}function th(e,t,a){a.props=ml(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){Ge(e,t,l)}}function os(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(r){Ge(e,t,r)}}function $n(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(r){Ge(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(r){Ge(e,t,r)}else a.current=null}function nh(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(r){Ge(e,e.return,r)}}function no(e,t,a){try{var l=e.stateNode;mv(l,e.type,a,t),l[Ze]=t}catch(r){Ge(e,e.return,r)}}function ah(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ha(e.type)||e.tag===4}function ao(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ah(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&&Ha(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function lo(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Gt));else if(l!==4&&(l===27&&Ha(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(lo(e,t,a),e=e.sibling;e!==null;)lo(e,t,a),e=e.sibling}function Rr(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&Ha(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Rr(e,t,a),e=e.sibling;e!==null;)Rr(e,t,a),e=e.sibling}function lh(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);jt(t,l,a),t[pt]=e,t[Ze]=a}catch(o){Ge(e,e.return,o)}}var na=!1,mt=!1,io=!1,ih=typeof WeakSet=="function"?WeakSet:Set,_t=null;function X_(e,t){if(e=e.containerInfo,Ao=Pr,e=yf(e),Wc(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var r=l.anchorOffset,o=l.focusNode;l=l.focusOffset;try{a.nodeType,o.nodeType}catch{a=null;break e}var m=0,y=-1,j=-1,D=0,U=0,G=e,R=null;t:for(;;){for(var $;G!==a||r!==0&&G.nodeType!==3||(y=m+r),G!==o||l!==0&&G.nodeType!==3||(j=m+l),G.nodeType===3&&(m+=G.nodeValue.length),($=G.firstChild)!==null;)R=G,G=$;for(;;){if(G===e)break t;if(R===a&&++D===r&&(y=m),R===o&&++U===l&&(j=m),($=G.nextSibling)!==null)break;G=R,R=G.parentNode}G=$}a=y===-1||j===-1?null:{start:y,end:j}}else a=null}a=a||{start:0,end:0}}else a=null;for(To={focusedElem:e,selectionRange:a},Pr=!1,_t=t;_t!==null;)if(t=_t,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,_t=e;else for(;_t!==null;){switch(t=_t,o=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a title"))),jt(o,l,a),o[pt]=e,it(o),l=o;break e;case"link":var m=dp("link","href",r).get(l+(a.href||""));if(m){for(var y=0;yKe&&(m=Ke,Ke=fe,fe=m);var T=pf(y,fe),E=pf(y,Ke);if(T&&E&&($.rangeCount!==1||$.anchorNode!==T.node||$.anchorOffset!==T.offset||$.focusNode!==E.node||$.focusOffset!==E.offset)){var N=G.createRange();N.setStart(T.node,T.offset),$.removeAllRanges(),fe>Ke?($.addRange(N),$.extend(E.node,E.offset)):(N.setEnd(E.node,E.offset),$.addRange(N))}}}}for(G=[],$=y;$=$.parentNode;)$.nodeType===1&&G.push({element:$,left:$.scrollLeft,top:$.scrollTop});for(typeof y.focus=="function"&&y.focus(),y=0;ya?32:a,C.T=null,a=mo,mo=null;var o=La,m=ra;if(gt=0,si=La=null,ra=0,(Ue&6)!==0)throw Error(c(331));var y=Ue;if(Ue|=4,gh(o.current),mh(o,o.current,m,a),Ue=y,gs(0,!1),Xe&&typeof Xe.onPostCommitFiberRoot=="function")try{Xe.onPostCommitFiberRoot(Kn,o)}catch{}return!0}finally{Q.p=r,C.T=l,Mh(e,t)}}function $h(e,t,a){t=ln(a,t),t=Ku(e.stateNode,t,2),e=Da(e,t,2),e!==null&&(tn(e,2),qn(e))}function Ge(e,t,a){if(e.tag===3)$h(e,e,a);else for(;t!==null;){if(t.tag===3){$h(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(qa===null||!qa.has(l))){e=ln(a,e),a=qm(2),l=Da(t,a,2),l!==null&&(Lm(a,l,t,e),tn(l,2),qn(l));break}}t=t.return}}function yo(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new J_;var r=new Set;l.set(t,r)}else r=l.get(t),r===void 0&&(r=new Set,l.set(t,r));r.has(a)||(co=!0,r.add(a),e=ev.bind(null,e,t,a),t.then(e,e))}function ev(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ve===e&&(Ee&a)===a&&(lt===4||lt===3&&(Ee&62914560)===Ee&&300>ht()-Or?(Ue&2)===0&&ri(e,0):uo|=a,ii===Ee&&(ii=0)),qn(e)}function qh(e,t){t===0&&(t=Dl()),e=al(e,t),e!==null&&(tn(e,t),qn(e))}function tv(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),qh(e,a)}function nv(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,r=e.memoizedState;r!==null&&(a=r.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(c(314))}l!==null&&l.delete(t),qh(e,a)}function av(e,t){return ki(e,t)}var Gr=null,ui=null,_o=!1,Yr=!1,vo=!1,Ba=0;function qn(e){e!==ui&&e.next===null&&(ui===null?Gr=ui=e:ui=ui.next=e),Yr=!0,_o||(_o=!0,iv())}function gs(e,t){if(!vo&&Yr){vo=!0;do for(var a=!1,l=Gr;l!==null;){if(e!==0){var r=l.pendingLanes;if(r===0)var o=0;else{var m=l.suspendedLanes,y=l.pingedLanes;o=(1<<31-wt(42|e)+1)-1,o&=r&~(m&~y),o=o&201326741?o&201326741|1:o?o|2:0}o!==0&&(a=!0,Hh(l,o))}else o=Ee,o=Dt(l,l===Ve?o:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(o&3)===0||Le(l,o)||(a=!0,Hh(l,o));l=l.next}while(a);vo=!1}}function lv(){Lh()}function Lh(){Yr=_o=!1;var e=0;Ba!==0&&pv()&&(e=Ba);for(var t=ht(),a=null,l=Gr;l!==null;){var r=l.next,o=Uh(l,t);o===0?(l.next=null,a===null?Gr=r:a.next=r,r===null&&(ui=a)):(a=l,(e!==0||(o&3)!==0)&&(Yr=!0)),l=r}gt!==0&>!==5||gs(e),Ba!==0&&(Ba=0)}function Uh(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,r=e.expirationTimes,o=e.pendingLanes&-62914561;0y)break;var U=j.transferSize,G=j.initiatorType;U&&Jh(G)&&(j=j.responseEnd,m+=U*(j"u"?null:document;function rp(e,t,a){var l=oi;if(l&&typeof t=="string"&&t){var r=zt(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof a=="string"&&(r+='[crossorigin="'+a+'"]'),sp.has(r)||(sp.add(r),e={rel:e,crossOrigin:a,href:t},l.querySelector(r)===null&&(t=l.createElement("link"),jt(t,"link",e),it(t),l.head.appendChild(t)))}}function wv(e){ca.D(e),rp("dns-prefetch",e,null)}function kv(e,t){ca.C(e,t),rp("preconnect",e,t)}function Ev(e,t,a){ca.L(e,t,a);var l=oi;if(l&&e&&t){var r='link[rel="preload"][as="'+zt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(r+='[imagesrcset="'+zt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(r+='[imagesizes="'+zt(a.imageSizes)+'"]')):r+='[href="'+zt(e)+'"]';var o=r;switch(t){case"style":o=di(e);break;case"script":o=fi(e)}dn.has(o)||(e=S({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),dn.set(o,e),l.querySelector(r)!==null||t==="style"&&l.querySelector(bs(o))||t==="script"&&l.querySelector(Ss(o))||(t=l.createElement("link"),jt(t,"link",e),it(t),l.head.appendChild(t)))}}function Av(e,t){ca.m(e,t);var a=oi;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+zt(l)+'"][href="'+zt(e)+'"]',o=r;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=fi(e)}if(!dn.has(o)&&(e=S({rel:"modulepreload",href:e},t),dn.set(o,e),a.querySelector(r)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Ss(o)))return}l=a.createElement("link"),jt(l,"link",e),it(l),a.head.appendChild(l)}}}function Tv(e,t,a){ca.S(e,t,a);var l=oi;if(l&&e){var r=Nn(l).hoistableStyles,o=di(e);t=t||"default";var m=r.get(o);if(!m){var y={loading:0,preload:null};if(m=l.querySelector(bs(o)))y.loading=5;else{e=S({rel:"stylesheet",href:e,"data-precedence":t},a),(a=dn.get(o))&&Oo(e,a);var j=m=l.createElement("link");it(j),jt(j,"link",e),j._p=new Promise(function(D,U){j.onload=D,j.onerror=U}),j.addEventListener("load",function(){y.loading|=1}),j.addEventListener("error",function(){y.loading|=2}),y.loading|=4,Vr(m,t,l)}m={type:"stylesheet",instance:m,count:1,state:y},r.set(o,m)}}}function Cv(e,t){ca.X(e,t);var a=oi;if(a&&e){var l=Nn(a).hoistableScripts,r=fi(e),o=l.get(r);o||(o=a.querySelector(Ss(r)),o||(e=S({src:e,async:!0},t),(t=dn.get(r))&&$o(e,t),o=a.createElement("script"),it(o),jt(o,"link",e),a.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},l.set(r,o))}}function Nv(e,t){ca.M(e,t);var a=oi;if(a&&e){var l=Nn(a).hoistableScripts,r=fi(e),o=l.get(r);o||(o=a.querySelector(Ss(r)),o||(e=S({src:e,async:!0,type:"module"},t),(t=dn.get(r))&&$o(e,t),o=a.createElement("script"),it(o),jt(o,"link",e),a.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},l.set(r,o))}}function cp(e,t,a,l){var r=(r=_e.current)?Zr(r):null;if(!r)throw Error(c(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=di(a.href),a=Nn(r).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=di(a.href);var o=Nn(r).hoistableStyles,m=o.get(e);if(m||(r=r.ownerDocument||r,m={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},o.set(e,m),(o=r.querySelector(bs(e)))&&!o._p&&(m.instance=o,m.state.loading=5),dn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},dn.set(e,a),o||Dv(r,e,a,m.state))),t&&l===null)throw Error(c(528,""));return m}if(t&&l!==null)throw Error(c(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=fi(a),a=Nn(r).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,e))}}function di(e){return'href="'+zt(e)+'"'}function bs(e){return'link[rel="stylesheet"]['+e+"]"}function up(e){return S({},e,{"data-precedence":e.precedence,precedence:null})}function Dv(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),jt(t,"link",a),it(t),e.head.appendChild(t))}function fi(e){return'[src="'+zt(e)+'"]'}function Ss(e){return"script[async]"+e}function op(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+zt(a.href)+'"]');if(l)return t.instance=l,it(l),l;var r=S({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),it(l),jt(l,"style",r),Vr(l,a.precedence,e),t.instance=l;case"stylesheet":r=di(a.href);var o=e.querySelector(bs(r));if(o)return t.state.loading|=4,t.instance=o,it(o),o;l=up(a),(r=dn.get(r))&&Oo(l,r),o=(e.ownerDocument||e).createElement("link"),it(o);var m=o;return m._p=new Promise(function(y,j){m.onload=y,m.onerror=j}),jt(o,"link",l),t.state.loading|=4,Vr(o,a.precedence,e),t.instance=o;case"script":return o=fi(a.src),(r=e.querySelector(Ss(o)))?(t.instance=r,it(r),r):(l=a,(r=dn.get(o))&&(l=S({},a),$o(l,r)),e=e.ownerDocument||e,r=e.createElement("script"),it(r),jt(r,"link",l),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(c(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,Vr(l,a.precedence,e));return t.instance}function Vr(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=l.length?l[l.length-1]:null,o=r,m=0;m title"):null)}function Rv(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function mp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function zv(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var r=di(l.href),o=t.querySelector(bs(r));if(o){t=o._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Fr.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=o,it(o);return}o=t.ownerDocument||t,l=up(l),(r=dn.get(r))&&Oo(l,r),o=o.createElement("link"),it(o);var m=o;m._p=new Promise(function(y,j){m.onload=y,m.onerror=j}),jt(o,"link",l),a.instance=o}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Fr.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var qo=0;function Mv(e,t){return e.stylesheets&&e.count===0&&Wr(e,e.stylesheets),0qo?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(r)}}:null}function Fr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Wr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ir=null;function Wr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ir=new Map,t.forEach(Ov,e),Ir=null,Fr.call(e))}function Ov(e,t){if(!(t.state.loading&4)){var a=Ir.get(e);if(a)var l=a.get(null);else{a=new Map,Ir.set(e,a);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),Xo.exports=Pv(),Xo.exports}var tb=eb();/** - * react-router v7.17.0 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */var qp="popstate";function Lp(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function nb(n={}){function i(d,f){let{pathname:h="/",search:_="",hash:p=""}=xl(d.location.hash.substring(1));return!h.startsWith("/")&&!h.startsWith(".")&&(h="/"+h),od("",{pathname:h,search:_,hash:p},f.state&&f.state.usr||null,f.state&&f.state.key||"default")}function s(d,f){let h=d.document.querySelector("base"),_="";if(h&&h.getAttribute("href")){let p=d.location.href,g=p.indexOf("#");_=g===-1?p:p.slice(0,g)}return _+"#"+(typeof f=="string"?f:Os(f))}function c(d,f){fn(d.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(f)})`)}return lb(i,s,c,n)}function tt(n,i){if(n===!1||n===null||typeof n>"u")throw new Error(i)}function fn(n,i){if(!n){typeof console<"u"&&console.warn(i);try{throw new Error(i)}catch{}}}function ab(){return Math.random().toString(36).substring(2,10)}function Up(n,i){return{usr:n.state,key:n.key,idx:i,masked:n.mask?{pathname:n.pathname,search:n.search,hash:n.hash}:void 0}}function od(n,i,s=null,c,d){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof i=="string"?xl(i):i,state:s,key:i&&i.key||c||ab(),mask:d}}function Os({pathname:n="/",search:i="",hash:s=""}){return i&&i!=="?"&&(n+=i.charAt(0)==="?"?i:"?"+i),s&&s!=="#"&&(n+=s.charAt(0)==="#"?s:"#"+s),n}function xl(n){let i={};if(n){let s=n.indexOf("#");s>=0&&(i.hash=n.substring(s),n=n.substring(0,s));let c=n.indexOf("?");c>=0&&(i.search=n.substring(c),n=n.substring(0,c)),n&&(i.pathname=n)}return i}function lb(n,i,s,c={}){let{window:d=document.defaultView,v5Compat:f=!1}=c,h=d.history,_="POP",p=null,g=x();g==null&&(g=0,h.replaceState({...h.state,idx:g},""));function x(){return(h.state||{idx:null}).idx}function S(){_="POP";let z=x(),q=z==null?null:z-g;g=z,p&&p({action:_,location:O.location,delta:q})}function w(z,q){_="PUSH";let I=Lp(z)?z:od(O.location,z,q);s&&s(I,z),g=x()+1;let V=Up(I,g),ee=O.createHref(I.mask||I);try{h.pushState(V,"",ee)}catch(ne){if(ne instanceof DOMException&&ne.name==="DataCloneError")throw ne;d.location.assign(ee)}f&&p&&p({action:_,location:O.location,delta:1})}function M(z,q){_="REPLACE";let I=Lp(z)?z:od(O.location,z,q);s&&s(I,z),g=x();let V=Up(I,g),ee=O.createHref(I.mask||I);h.replaceState(V,"",ee),f&&p&&p({action:_,location:O.location,delta:0})}function A(z){return ib(d,z)}let O={get action(){return _},get location(){return n(d,h)},listen(z){if(p)throw new Error("A history only accepts one active listener");return d.addEventListener(qp,S),p=z,()=>{d.removeEventListener(qp,S),p=null}},createHref(z){return i(d,z)},createURL:A,encodeLocation(z){let q=A(z);return{pathname:q.pathname,search:q.search,hash:q.hash}},push:w,replace:M,go(z){return h.go(z)}};return O}function ib(n,i,s=!1){let c="http://localhost";n&&(c=n.location.origin!=="null"?n.location.origin:n.location.href),tt(c,"No window.location.(origin|href) available to create URL");let d=typeof i=="string"?i:Os(i);return d=d.replace(/ $/,"%20"),!s&&d.startsWith("//")&&(d=c+d),new URL(d,c)}function Rg(n,i,s="/"){return sb(n,i,s,!1)}function sb(n,i,s,c,d){let f=typeof i=="string"?xl(i):i,h=da(f.pathname||"/",s);if(h==null)return null;let _=rb(n),p=null,g=vb(h);for(let x=0;p==null&&x<_.length;++x)p=yb(_[x],g,c);return p}function rb(n){let i=zg(n);return cb(i),i}function zg(n,i=[],s=[],c="",d=!1){let f=(h,_,p=d,g)=>{let x={relativePath:g===void 0?h.path||"":g,caseSensitive:h.caseSensitive===!0,childrenIndex:_,route:h};if(x.relativePath.startsWith("/")){if(!x.relativePath.startsWith(c)&&p)return;tt(x.relativePath.startsWith(c),`Absolute route path "${x.relativePath}" nested under path "${c}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),x.relativePath=x.relativePath.slice(c.length)}let S=xn([c,x.relativePath]),w=s.concat(x);h.children&&h.children.length>0&&(tt(h.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${S}".`),zg(h.children,i,w,S,p)),!(h.path==null&&!h.index)&&i.push({path:S,score:pb(S,h.index),routesMeta:w})};return n.forEach((h,_)=>{var p;if(h.path===""||!((p=h.path)!=null&&p.includes("?")))f(h,_);else for(let g of Mg(h.path))f(h,_,!0,g)}),i}function Mg(n){let i=n.split("/");if(i.length===0)return[];let[s,...c]=i,d=s.endsWith("?"),f=s.replace(/\?$/,"");if(c.length===0)return d?[f,""]:[f];let h=Mg(c.join("/")),_=[];return _.push(...h.map(p=>p===""?f:[f,p].join("/"))),d&&_.push(...h),_.map(p=>n.startsWith("/")&&p===""?"/":p)}function cb(n){n.sort((i,s)=>i.score!==s.score?s.score-i.score:gb(i.routesMeta.map(c=>c.childrenIndex),s.routesMeta.map(c=>c.childrenIndex)))}var ub=/^:[\w-]+$/,ob=3,db=2,fb=1,mb=10,hb=-2,Bp=n=>n==="*";function pb(n,i){let s=n.split("/"),c=s.length;return s.some(Bp)&&(c+=hb),i&&(c+=db),s.filter(d=>!Bp(d)).reduce((d,f)=>d+(ub.test(f)?ob:f===""?fb:mb),c)}function gb(n,i){return n.length===i.length&&n.slice(0,-1).every((c,d)=>c===i[d])?n[n.length-1]-i[i.length-1]:0}function yb(n,i,s=!1){let{routesMeta:c}=n,d={},f="/",h=[];for(let _=0;_{if(x==="*"){let A=_[w]||"";h=f.slice(0,f.length-A.length).replace(/(.)\/+$/,"$1")}const M=_[w];return S&&!M?g[x]=void 0:g[x]=(M||"").replace(/%2F/g,"/"),g},{}),pathname:f,pathnameBase:h,pattern:n}}function _b(n,i=!1,s=!0){fn(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let c=[],d="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(h,_,p,g,x)=>{if(c.push({paramName:_,isOptional:p!=null}),p){let S=x.charAt(g+h.length);return S&&S!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(c.push({paramName:"*"}),d+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?d+="\\/*$":n!==""&&n!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,i?void 0:"i"),c]}function vb(n){try{return n.split("/").map(i=>decodeURIComponent(i).replace(/\//g,"%2F")).join("/")}catch(i){return fn(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${i}).`),n}}function da(n,i){if(i==="/")return n;if(!n.toLowerCase().startsWith(i.toLowerCase()))return null;let s=i.endsWith("/")?i.length-1:i.length,c=n.charAt(s);return c&&c!=="/"?null:n.slice(s)||"/"}var bb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Sb(n,i="/"){let{pathname:s,search:c="",hash:d=""}=typeof n=="string"?xl(n):n,f;return s?(s=Og(s),s.startsWith("/")?f=Hp(s.substring(1),"/"):f=Hp(s,i)):f=i,{pathname:f,search:wb(c),hash:kb(d)}}function Hp(n,i){let s=Sc(i).split("/");return n.split("/").forEach(d=>{d===".."?s.length>1&&s.pop():d!=="."&&s.push(d)}),s.length>1?s.join("/"):"/"}function Fo(n,i,s,c){return`Cannot include a '${n}' character in a manually specified \`to.${i}\` field [${JSON.stringify(c)}]. Please separate it out to the \`to.${s}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function xb(n){return n.filter((i,s)=>s===0||i.route.path&&i.route.path.length>0)}function Cd(n){let i=xb(n);return i.map((s,c)=>c===i.length-1?s.pathname:s.pathnameBase)}function Cc(n,i,s,c=!1){let d;typeof n=="string"?d=xl(n):(d={...n},tt(!d.pathname||!d.pathname.includes("?"),Fo("?","pathname","search",d)),tt(!d.pathname||!d.pathname.includes("#"),Fo("#","pathname","hash",d)),tt(!d.search||!d.search.includes("#"),Fo("#","search","hash",d)));let f=n===""||d.pathname==="",h=f?"/":d.pathname,_;if(h==null)_=s;else{let S=i.length-1;if(!c&&h.startsWith("..")){let w=h.split("/");for(;w[0]==="..";)w.shift(),S-=1;d.pathname=w.join("/")}_=S>=0?i[S]:"/"}let p=Sb(d,_),g=h&&h!=="/"&&h.endsWith("/"),x=(f||h===".")&&s.endsWith("/");return!p.pathname.endsWith("/")&&(g||x)&&(p.pathname+="/"),p}var Og=n=>n.replace(/\/\/+/g,"/"),xn=n=>Og(n.join("/")),Sc=n=>n.replace(/\/+$/,""),jb=n=>Sc(n).replace(/^\/*/,"/"),wb=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,kb=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,Eb=class{constructor(n,i,s,c=!1){this.status=n,this.statusText=i||"",this.internal=c,s instanceof Error?(this.data=s.toString(),this.error=s):this.data=s}};function Ab(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function Tb(n){let i=n.map(s=>s.route.path).filter(Boolean);return xn(i)||"/"}var $g=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function qg(n,i){let s=n;if(typeof s!="string"||!bb.test(s))return{absoluteURL:void 0,isExternal:!1,to:s};let c=s,d=!1;if($g)try{let f=new URL(window.location.href),h=s.startsWith("//")?new URL(f.protocol+s):new URL(s),_=da(h.pathname,i);h.origin===f.origin&&_!=null?s=_+h.search+h.hash:d=!0}catch{fn(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:c,isExternal:d,to:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Lg=["POST","PUT","PATCH","DELETE"];new Set(Lg);var Cb=["GET",...Lg];new Set(Cb);var vi=b.createContext(null);vi.displayName="DataRouter";var Nc=b.createContext(null);Nc.displayName="DataRouterState";var Ug=b.createContext(!1);function Nb(){return b.useContext(Ug)}var Bg=b.createContext({isTransitioning:!1});Bg.displayName="ViewTransition";var Db=b.createContext(new Map);Db.displayName="Fetchers";var Rb=b.createContext(null);Rb.displayName="Await";var Wt=b.createContext(null);Wt.displayName="Navigation";var Us=b.createContext(null);Us.displayName="Location";var Gn=b.createContext({outlet:null,matches:[],isDataRoute:!1});Gn.displayName="Route";var Nd=b.createContext(null);Nd.displayName="RouteError";var Hg="REACT_ROUTER_ERROR",zb="REDIRECT",Mb="ROUTE_ERROR_RESPONSE";function Ob(n){if(n.startsWith(`${Hg}:${zb}:{`))try{let i=JSON.parse(n.slice(28));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.location=="string"&&typeof i.reloadDocument=="boolean"&&typeof i.replace=="boolean")return i}catch{}}function $b(n){if(n.startsWith(`${Hg}:${Mb}:{`))try{let i=JSON.parse(n.slice(40));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string")return new Eb(i.status,i.statusText,i.data)}catch{}}function qb(n,{relative:i}={}){tt(bi(),"useHref() may be used only in the context of a component.");let{basename:s,navigator:c}=b.useContext(Wt),{hash:d,pathname:f,search:h}=Bs(n,{relative:i}),_=f;return s!=="/"&&(_=f==="/"?s:xn([s,f])),c.createHref({pathname:_,search:h,hash:d})}function bi(){return b.useContext(Us)!=null}function wn(){return tt(bi(),"useLocation() may be used only in the context of a component."),b.useContext(Us).location}var Gg="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Yg(n){b.useContext(Wt).static||b.useLayoutEffect(n)}function Dd(){let{isDataRoute:n}=b.useContext(Gn);return n?Fb():Lb()}function Lb(){tt(bi(),"useNavigate() may be used only in the context of a component.");let n=b.useContext(vi),{basename:i,navigator:s}=b.useContext(Wt),{matches:c}=b.useContext(Gn),{pathname:d}=wn(),f=JSON.stringify(Cd(c)),h=b.useRef(!1);return Yg(()=>{h.current=!0}),b.useCallback((p,g={})=>{if(fn(h.current,Gg),!h.current)return;if(typeof p=="number"){s.go(p);return}let x=Cc(p,JSON.parse(f),d,g.relative==="path");n==null&&i!=="/"&&(x.pathname=x.pathname==="/"?i:xn([i,x.pathname])),(g.replace?s.replace:s.push)(x,g.state,g)},[i,s,f,d,n])}b.createContext(null);function Bs(n,{relative:i}={}){let{matches:s}=b.useContext(Gn),{pathname:c}=wn(),d=JSON.stringify(Cd(s));return b.useMemo(()=>Cc(n,JSON.parse(d),c,i==="path"),[n,d,c,i])}function Ub(n,i){return Qg(n,i)}function Qg(n,i,s){var z;tt(bi(),"useRoutes() may be used only in the context of a component.");let{navigator:c}=b.useContext(Wt),{matches:d}=b.useContext(Gn),f=d[d.length-1],h=f?f.params:{},_=f?f.pathname:"/",p=f?f.pathnameBase:"/",g=f&&f.route;{let q=g&&g.path||"";Xg(_,!g||q.endsWith("*")||q.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${_}" (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 x=wn(),S;if(i){let q=typeof i=="string"?xl(i):i;tt(p==="/"||((z=q.pathname)==null?void 0:z.startsWith(p)),`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 "${p}" but pathname "${q.pathname}" was given in the \`location\` prop.`),S=q}else S=x;let w=S.pathname||"/",M=w;if(p!=="/"){let q=p.replace(/^\//,"").split("/");M="/"+w.replace(/^\//,"").split("/").slice(q.length).join("/")}let A=s&&s.state.matches.length?s.state.matches.map(q=>Object.assign(q,{route:s.manifest[q.route.id]||q.route})):Rg(n,{pathname:M});fn(g||A!=null,`No routes matched location "${S.pathname}${S.search}${S.hash}" `),fn(A==null||A[A.length-1].route.element!==void 0||A[A.length-1].route.Component!==void 0||A[A.length-1].route.lazy!==void 0,`Matched leaf route at location "${S.pathname}${S.search}${S.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 O=Qb(A&&A.map(q=>Object.assign({},q,{params:Object.assign({},h,q.params),pathname:xn([p,c.encodeLocation?c.encodeLocation(q.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:q.pathname]),pathnameBase:q.pathnameBase==="/"?p:xn([p,c.encodeLocation?c.encodeLocation(q.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:q.pathnameBase])})),d,s);return i&&O?b.createElement(Us.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...S},navigationType:"POP"}},O):O}function Bb(){let n=Jb(),i=Ab(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),s=n instanceof Error?n.stack:null,c="rgba(200,200,200, 0.5)",d={padding:"0.5rem",backgroundColor:c},f={padding:"2px 4px",backgroundColor:c},h=null;return console.error("Error handled by React Router default ErrorBoundary:",n),h=b.createElement(b.Fragment,null,b.createElement("p",null,"💿 Hey developer 👋"),b.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",b.createElement("code",{style:f},"ErrorBoundary")," or"," ",b.createElement("code",{style:f},"errorElement")," prop on your route.")),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},i),s?b.createElement("pre",{style:d},s):null,h)}var Hb=b.createElement(Bb,null),Kg=class extends b.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,i){return i.location!==n.location||i.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:i.error,location:i.location,revalidation:n.revalidation||i.revalidation}}componentDidCatch(n,i){this.props.onError?this.props.onError(n,i):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const s=$b(n.digest);s&&(n=s)}let i=n!==void 0?b.createElement(Gn.Provider,{value:this.props.routeContext},b.createElement(Nd.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?b.createElement(Gb,{error:n},i):i}};Kg.contextType=Ug;var Io=new WeakMap;function Gb({children:n,error:i}){let{basename:s}=b.useContext(Wt);if(typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){let c=Ob(i.digest);if(c){let d=Io.get(i);if(d)throw d;let f=qg(c.location,s);if($g&&!Io.get(i))if(f.isExternal||c.reloadDocument)window.location.href=f.absoluteURL||f.to;else{const h=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:c.replace}));throw Io.set(i,h),h}return b.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return n}function Yb({routeContext:n,match:i,children:s}){let c=b.useContext(vi);return c&&c.static&&c.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=i.route.id),b.createElement(Gn.Provider,{value:n},s)}function Qb(n,i=[],s){let c=s==null?void 0:s.state;if(n==null){if(!c)return null;if(c.errors)n=c.matches;else if(i.length===0&&!c.initialized&&c.matches.length>0)n=c.matches;else return null}let d=n,f=c==null?void 0:c.errors;if(f!=null){let x=d.findIndex(S=>S.route.id&&(f==null?void 0:f[S.route.id])!==void 0);tt(x>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(f).join(",")}`),d=d.slice(0,Math.min(d.length,x+1))}let h=!1,_=-1;if(s&&c){h=c.renderFallback;for(let x=0;x=0?d=d.slice(0,_+1):d=[d[0]];break}}}}let p=s==null?void 0:s.onError,g=c&&p?(x,S)=>{var w,M;p(x,{location:c.location,params:((M=(w=c.matches)==null?void 0:w[0])==null?void 0:M.params)??{},pattern:Tb(c.matches),errorInfo:S})}:void 0;return d.reduceRight((x,S,w)=>{let M,A=!1,O=null,z=null;c&&(M=f&&S.route.id?f[S.route.id]:void 0,O=S.route.errorElement||Hb,h&&(_<0&&w===0?(Xg("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),A=!0,z=null):_===w&&(A=!0,z=S.route.hydrateFallbackElement||null)));let q=i.concat(d.slice(0,w+1)),I=()=>{let V;return M?V=O:A?V=z:S.route.Component?V=b.createElement(S.route.Component,null):S.route.element?V=S.route.element:V=x,b.createElement(Yb,{match:S,routeContext:{outlet:x,matches:q,isDataRoute:c!=null},children:V})};return c&&(S.route.ErrorBoundary||S.route.errorElement||w===0)?b.createElement(Kg,{location:c.location,revalidation:c.revalidation,component:O,error:M,children:I(),routeContext:{outlet:null,matches:q,isDataRoute:!0},onError:g}):I()},null)}function Rd(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Kb(n){let i=b.useContext(vi);return tt(i,Rd(n)),i}function Xb(n){let i=b.useContext(Nc);return tt(i,Rd(n)),i}function Zb(n){let i=b.useContext(Gn);return tt(i,Rd(n)),i}function zd(n){let i=Zb(n),s=i.matches[i.matches.length-1];return tt(s.route.id,`${n} can only be used on routes that contain a unique "id"`),s.route.id}function Vb(){return zd("useRouteId")}function Jb(){var c;let n=b.useContext(Nd),i=Xb("useRouteError"),s=zd("useRouteError");return n!==void 0?n:(c=i.errors)==null?void 0:c[s]}function Fb(){let{router:n}=Kb("useNavigate"),i=zd("useNavigate"),s=b.useRef(!1);return Yg(()=>{s.current=!0}),b.useCallback(async(d,f={})=>{fn(s.current,Gg),s.current&&(typeof d=="number"?await n.navigate(d):await n.navigate(d,{fromRouteId:i,...f}))},[n,i])}var Gp={};function Xg(n,i,s){!i&&!Gp[n]&&(Gp[n]=!0,fn(!1,s))}b.memo(Ib);function Ib({routes:n,manifest:i,future:s,state:c,isStatic:d,onError:f}){return Qg(n,void 0,{manifest:i,state:c,isStatic:d,onError:f})}function Wb({to:n,replace:i,state:s,relative:c}){tt(bi()," may be used only in the context of a component.");let{static:d}=b.useContext(Wt);fn(!d," must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.");let{matches:f}=b.useContext(Gn),{pathname:h}=wn(),_=Dd(),p=Cc(n,Cd(f),h,c==="path"),g=JSON.stringify(p);return b.useEffect(()=>{_(JSON.parse(g),{replace:i,state:s,relative:c})},[_,g,c,i,s]),null}function dd(n){tt(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function Pb({basename:n="/",children:i=null,location:s,navigationType:c="POP",navigator:d,static:f=!1,useTransitions:h}){tt(!bi(),"You cannot render a inside another . You should never have more than one in your app.");let _=n.replace(/^\/*/,"/"),p=b.useMemo(()=>({basename:_,navigator:d,static:f,useTransitions:h,future:{}}),[_,d,f,h]);typeof s=="string"&&(s=xl(s));let{pathname:g="/",search:x="",hash:S="",state:w=null,key:M="default",mask:A}=s,O=b.useMemo(()=>{let z=da(g,_);return z==null?null:{location:{pathname:z,search:x,hash:S,state:w,key:M,mask:A},navigationType:c}},[_,g,x,S,w,M,c,A]);return fn(O!=null,` is not able to match the URL "${g}${x}${S}" because it does not start with the basename, so the won't render anything.`),O==null?null:b.createElement(Wt.Provider,{value:p},b.createElement(Us.Provider,{children:i,value:O}))}function e0({children:n,location:i}){return Ub(fd(n),i)}function fd(n,i=[]){let s=[];return b.Children.forEach(n,(c,d)=>{if(!b.isValidElement(c))return;let f=[...i,d];if(c.type===b.Fragment){s.push.apply(s,fd(c.props.children,f));return}tt(c.type===dd,`[${typeof c.type=="string"?c.type:c.type.name}] is not a component. All component children of must be a or `),tt(!c.props.index||!c.props.children,"An index route cannot have child routes.");let h={id:c.props.id||f.join("-"),caseSensitive:c.props.caseSensitive,element:c.props.element,Component:c.props.Component,index:c.props.index,path:c.props.path,middleware:c.props.middleware,loader:c.props.loader,action:c.props.action,hydrateFallbackElement:c.props.hydrateFallbackElement,HydrateFallback:c.props.HydrateFallback,errorElement:c.props.errorElement,ErrorBoundary:c.props.ErrorBoundary,hasErrorBoundary:c.props.hasErrorBoundary===!0||c.props.ErrorBoundary!=null||c.props.errorElement!=null,shouldRevalidate:c.props.shouldRevalidate,handle:c.props.handle,lazy:c.props.lazy};c.props.children&&(h.children=fd(c.props.children,f)),s.push(h)}),s}var mc="get",hc="application/x-www-form-urlencoded";function Dc(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function t0(n){return Dc(n)&&n.tagName.toLowerCase()==="button"}function n0(n){return Dc(n)&&n.tagName.toLowerCase()==="form"}function a0(n){return Dc(n)&&n.tagName.toLowerCase()==="input"}function l0(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function i0(n,i){return n.button===0&&(!i||i==="_self")&&!l0(n)}var sc=null;function s0(){if(sc===null)try{new FormData(document.createElement("form"),0),sc=!1}catch{sc=!0}return sc}var r0=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Wo(n){return n!=null&&!r0.has(n)?(fn(!1,`"${n}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${hc}"`),null):n}function c0(n,i){let s,c,d,f,h;if(n0(n)){let _=n.getAttribute("action");c=_?da(_,i):null,s=n.getAttribute("method")||mc,d=Wo(n.getAttribute("enctype"))||hc,f=new FormData(n)}else if(t0(n)||a0(n)&&(n.type==="submit"||n.type==="image")){let _=n.form;if(_==null)throw new Error('Cannot submit a