diff --git a/qimingclaw/crates/agent-electron-client/embedded/sgrobot-digital/src/lib/api.ts b/qimingclaw/crates/agent-electron-client/embedded/sgrobot-digital/src/lib/api.ts index 4c2c7ac0..bebeea79 100644 --- a/qimingclaw/crates/agent-electron-client/embedded/sgrobot-digital/src/lib/api.ts +++ b/qimingclaw/crates/agent-electron-client/embedded/sgrobot-digital/src/lib/api.ts @@ -13,6 +13,7 @@ import type { ChannelDetail, BrowserSession, ApprovalSubscriptionPreferences, + PlanStepDispatchPolicy, NotificationPreferences, UserNotification, DebugStoreResponse, @@ -544,7 +545,7 @@ export function getEventLog(params: { // Notifications // --------------------------------------------------------------------------- -export { type ApprovalSubscriptionPreferences, type NotificationPreferences, type UserNotification }; +export { type ApprovalSubscriptionPreferences, type NotificationPreferences, type PlanStepDispatchPolicy, type UserNotification }; export function getNotifications( status: string = 'unread', @@ -595,6 +596,37 @@ export function getApprovalHistory(params: Record { + return apiFetch('/api/plan-step/dispatch-policy'); +} + +export function patchPlanStepDispatchPolicy( + patch: Partial, +): Promise { + return apiFetch('/api/plan-step/dispatch-policy', { + method: 'PATCH', + body: JSON.stringify(patch), + }); +} + +export function getPlanSteps(params: Record = {}): Promise { + const query = new URLSearchParams(); + Object.entries(params).forEach(([key, value]) => { + if (value !== undefined && value !== null && `${value}`.trim() !== '') query.set(key, `${value}`); + }); + const suffix = query.toString(); + return apiFetch(`/api/digital-employee/plan-steps${suffix ? `?${suffix}` : ''}`); +} + +export function getPlanStepGraph(params: Record = {}): Promise { + const query = new URLSearchParams(); + Object.entries(params).forEach(([key, value]) => { + if (value !== undefined && value !== null && `${value}`.trim() !== '') query.set(key, `${value}`); + }); + const suffix = query.toString(); + return apiFetch(`/api/digital-employee/plan-step-graph${suffix ? `?${suffix}` : ''}`); +} + export function markNotificationRead(id: string): Promise { return apiFetch<{ ok: boolean }>(`/api/notifications/${encodeURIComponent(id)}/read`, { method: 'POST', 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 cb011823..e832b217 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 @@ -34,6 +34,7 @@ import type { MemoryEntry, NotificationPreferences, PlanDispatchResponse, + PlanStepDispatchPolicy, PlanStepSummary, RouteDecisionRecord, RouteDecisionTimelineResponse, @@ -89,6 +90,7 @@ interface AdapterState { notificationStateById?: Record; notificationPreferences?: NotificationPreferences; approvalSubscriptionPreferences?: ApprovalSubscriptionPreferences; + planStepDispatchPolicy?: PlanStepDispatchPolicy; consoleRole?: string; rolePreferences?: Record; profile: { @@ -691,7 +693,7 @@ const PLAN_SCHEDULES: Record; export function isQimingclawDigitalApiEnabled(): boolean { @@ -784,11 +786,28 @@ export async function handleQimingclawDigitalApi( await readQimingclawSnapshot(), ) as T; } + if (method === 'GET' && pathname === '/api/plan-step/dispatch-policy') { + return planStepDispatchPolicy(notificationAdapterState(await readQimingclawSnapshot())) as T; + } + if (method === 'PATCH' && pathname === '/api/plan-step/dispatch-policy') { + return await handlePlanStepDispatchPolicyPatch( + parseJsonBody>(options.body), + await readQimingclawSnapshot(), + ) as T; + } + if (method === 'GET' && pathname === '/api/digital-employee/plan-steps') { + const rows = filterPlanStepRows(planStepRows(await readQimingclawSnapshot()), url.searchParams); + return { ...paginateBusinessRows(rows, url.searchParams), source: BUSINESS_VIEW_SOURCE } as T; + } + if (method === 'GET' && pathname === '/api/digital-employee/plan-step-graph') { + const rows = filterPlanStepRows(planStepGraphRows(await readQimingclawSnapshot()), url.searchParams); + return { ...paginateBusinessRows(rows, url.searchParams), source: BUSINESS_VIEW_SOURCE } as T; + } if (method === 'GET' && pathname === '/api/digital-employee/approval-history') { const rows = filterApprovalHistoryRows(approvalHistoryRows(await readQimingclawSnapshot()), url.searchParams); return { ...paginateBusinessRows(rows, url.searchParams), source: BUSINESS_VIEW_SOURCE } as T; } - const businessViewMatch = pathname.match(/^\/api\/digital-employee\/(plans|tasks|runs|events|artifacts|approvals|approval-history|route-decisions|notifications|audits)$/); + const businessViewMatch = pathname.match(/^\/api\/digital-employee\/(plans|plan-steps|plan-step-graph|tasks|runs|events|artifacts|approvals|approval-history|route-decisions|notifications|audits)$/); if (method === 'GET' && businessViewMatch) { return buildBusinessViewResponse(businessViewMatch[1] as BusinessViewKind, await readQimingclawSnapshot(), url.searchParams) as T; } @@ -964,6 +983,7 @@ function defaultState(): AdapterState { notificationStateById: {}, notificationPreferences: defaultNotificationPreferences(), approvalSubscriptionPreferences: defaultApprovalSubscriptionPreferences(), + planStepDispatchPolicy: defaultPlanStepDispatchPolicy(), consoleRole: 'sales', rolePreferences: {}, profile: { @@ -990,6 +1010,7 @@ function normalizeAdapterState(value: Partial): AdapterState { ...value, notificationPreferences: notificationPreferences(value), approvalSubscriptionPreferences: approvalSubscriptionPreferences(value), + planStepDispatchPolicy: planStepDispatchPolicy(value), }; } @@ -2520,6 +2541,8 @@ function auditLevelLabel(level: string): string { function buildBusinessViewResponse(kind: BusinessViewKind, snapshot: QimingclawSnapshot | null, searchParams: URLSearchParams): Record { const rowsByKind: Record = { plans: businessPlanRows(snapshot), + 'plan-steps': planStepRows(snapshot), + 'plan-step-graph': planStepGraphRows(snapshot), tasks: businessTaskRows(snapshot), runs: businessRunRows(snapshot), events: businessEventRows(snapshot), @@ -2532,19 +2555,140 @@ function buildBusinessViewResponse(kind: BusinessViewKind, snapshot: QimingclawS }; const rows = kind === 'route-decisions' ? filterRouteDecisionRows(rowsByKind[kind], searchParams) - : kind === 'approval-history' - ? filterApprovalHistoryRows(rowsByKind[kind], searchParams) - : kind === 'notifications' - ? filterNotificationRows(rowsByKind[kind], searchParams) - : kind === 'audits' - ? filterAuditRows(rowsByKind[kind], searchParams) - : filterBusinessRows(rowsByKind[kind], searchParams); + : kind === 'plan-steps' || kind === 'plan-step-graph' + ? filterPlanStepRows(rowsByKind[kind], searchParams) + : kind === 'approval-history' + ? filterApprovalHistoryRows(rowsByKind[kind], searchParams) + : kind === 'notifications' + ? filterNotificationRows(rowsByKind[kind], searchParams) + : kind === 'audits' + ? filterAuditRows(rowsByKind[kind], searchParams) + : filterBusinessRows(rowsByKind[kind], searchParams); return { ...paginateBusinessRows(rows, searchParams), source: BUSINESS_VIEW_SOURCE, }; } +function planStepRows(snapshot: QimingclawSnapshot | null): BusinessViewRow[] { + return runtimePlanSteps(snapshot) + .map((step) => { + const payload = asRecord(step.payload) ?? {}; + const dependencyGraph = asRecord(payload.dependencyGraph ?? payload.dependency_graph) ?? {}; + const lastDispatch = asRecord(payload.lastDispatch ?? payload.last_dispatch) ?? {}; + const readiness = planStepDispatchReadiness(step, snapshot, payload); + const blockedDependencies = uniqueStrings(arrayValue(dependencyGraph.blockedDependencies ?? dependencyGraph.blocked_dependencies)); + const waitingDependencies = uniqueStrings(arrayValue(dependencyGraph.waitingDependencies ?? dependencyGraph.waiting_dependencies)); + const satisfiedDependencies = uniqueStrings(arrayValue(dependencyGraph.satisfiedDependencies ?? dependencyGraph.satisfied_dependencies)); + return { + step_id: step.id, + node_id: step.id, + remote_id: step.remoteId ?? null, + plan_id: step.planId, + title: step.title, + status: step.status, + seq: step.seq, + depends_on: step.dependsOn, + dependency_count: step.dependsOn.length, + dependency_status: stringValue(dependencyGraph.status) || stepDependencyStatus(step, blockedDependencies, waitingDependencies), + blocked_dependencies: blockedDependencies, + blocked_dependency_count: blockedDependencies.length, + waiting_dependencies: waitingDependencies, + waiting_dependency_count: waitingDependencies.length, + satisfied_dependencies: satisfiedDependencies, + preferred_skill_ids: step.preferredSkillIds, + task_id: readiness.taskId, + dispatchable: readiness.dispatchable, + skip_reason: readiness.skipReason, + last_dispatch_status: stringValue(lastDispatch.status) || null, + last_dispatch_at: stringValue(lastDispatch.occurredAt ?? lastDispatch.occurred_at) || null, + sync_status: step.syncStatus, + last_synced_at: step.lastSyncedAt ?? null, + sync_error: step.syncError ?? null, + created_at: step.createdAt, + updated_at: step.updatedAt, + entity_type: 'plan_step', + entity_id: step.id, + source: BUSINESS_VIEW_SOURCE, + }; + }) + .sort((left, right) => stringValue(left.plan_id).localeCompare(stringValue(right.plan_id)) || Number(left.seq ?? 0) - Number(right.seq ?? 0) || stringValue(left.step_id).localeCompare(stringValue(right.step_id))); +} + +function planStepGraphRows(snapshot: QimingclawSnapshot | null): BusinessViewRow[] { + return planStepRows(snapshot).map((row) => ({ + node_id: stringValue(row.node_id) || stringValue(row.step_id), + step_id: stringValue(row.step_id), + plan_id: stringValue(row.plan_id) || null, + title: stringValue(row.title), + status: stringValue(row.status), + seq: row.seq, + depends_on: arrayValue(row.depends_on), + dependency_status: stringValue(row.dependency_status) || null, + blocked_dependencies: arrayValue(row.blocked_dependencies), + waiting_dependencies: arrayValue(row.waiting_dependencies), + satisfied_dependencies: arrayValue(row.satisfied_dependencies), + dispatchable: row.dispatchable === true, + skip_reason: stringValue(row.skip_reason) || null, + sync_status: stringValue(row.sync_status) || null, + updated_at: stringValue(row.updated_at) || null, + entity_type: 'plan_step_graph_node', + entity_id: stringValue(row.step_id), + source: BUSINESS_VIEW_SOURCE, + })); +} + +function filterPlanStepRows(rows: BusinessViewRow[], searchParams: URLSearchParams): BusinessViewRow[] { + const planId = stringValue(searchParams.get('plan_id')); + const stepId = stringValue(searchParams.get('step_id')) || stringValue(searchParams.get('id')); + const status = stringValue(searchParams.get('status')); + const syncStatus = stringValue(searchParams.get('sync_status')); + return filterBusinessRows(rows, searchParams) + .filter((row) => !planId || stringValue(row.plan_id) === planId) + .filter((row) => !stepId || stringValue(row.step_id) === stepId || stringValue(row.node_id) === stepId || stringValue(row.entity_id) === stepId) + .filter((row) => !status || stringValue(row.status) === status) + .filter((row) => !syncStatus || stringValue(row.sync_status) === syncStatus); +} + +function stepDependencyStatus(step: QimingclawPlanStepRecord, blockedDependencies: string[], waitingDependencies: string[]): string { + if (blockedDependencies.length > 0) return 'blocked'; + if (waitingDependencies.length > 0) return 'waiting'; + if (step.dependsOn.length > 0) return 'ready'; + return 'independent'; +} + +function planStepDispatchReadiness( + step: QimingclawPlanStepRecord, + snapshot: QimingclawSnapshot | null, + payload: Record, +): { taskId: string | null; dispatchable: boolean; skipReason: string | null } { + const tasks = runtimePlanTasks(snapshot, step.planId); + const task = tasks.find((candidate) => taskStepId(candidate) === step.id) + ?? tasks.find((candidate) => !isTerminalRuntimeTaskStatus(candidate.status)) + ?? null; + const taskId = task?.id ?? null; + let skipReason: string | null = null; + if (step.status.toLowerCase() !== 'ready') skipReason = 'not_ready'; + else if (!task) skipReason = 'missing_task'; + else if (isTerminalRuntimeTaskStatus(task.status)) skipReason = 'task_terminal'; + else if (runtimeRuns(snapshot).some((run) => run.taskId === task.id && isActiveRuntimeRunStatus(run.status))) skipReason = 'task_already_running'; + else if (runtimeApprovals(snapshot).some((approval) => isOpenRuntimeApprovalStatus(approval.status) && (approval.planId === step.planId || approval.taskId === task.id || stringValue(asRecord(approval.payload)?.stepId ?? asRecord(approval.payload)?.step_id) === step.id))) skipReason = 'approval_pending'; + else if (payload.auto_dispatch === false || payload.autoDispatch === false) skipReason = 'auto_dispatch_disabled'; + return { taskId, dispatchable: !skipReason, skipReason }; +} + +function isTerminalRuntimeTaskStatus(status: string): boolean { + return ['completed', 'succeeded', 'success', 'done', 'skipped', 'cancelled', 'canceled'].includes(status.toLowerCase()); +} + +function isActiveRuntimeRunStatus(status: string): boolean { + return ['running', 'pending', 'queued', 'started'].includes(status.toLowerCase()); +} + +function isOpenRuntimeApprovalStatus(status: string): boolean { + return ['pending', 'reviewing', 'open', 'waiting'].includes(status.toLowerCase() || 'pending'); +} + function routeDecisionRows(snapshot: QimingclawSnapshot | null): BusinessViewRow[] { return runtimeEvents(snapshot) .filter((event) => event.kind === 'route_decision') @@ -3325,6 +3469,8 @@ function businessRowEntityIds(row: BusinessViewRow): string[] { row.run_id, row.event_id, row.history_id, + row.step_id, + row.node_id, row.artifact_id, row.approval_id, row.notification_id, @@ -3652,6 +3798,15 @@ function defaultApprovalSubscriptionPreferences(): ApprovalSubscriptionPreferenc }; } +function defaultPlanStepDispatchPolicy(): PlanStepDispatchPolicy { + return { + enabled: true, + max_per_sweep: 3, + auto_dispatch_ready_steps: true, + updated_at: null, + }; +} + function approvalSubscriptionPreferences(state: Partial | null | undefined): ApprovalSubscriptionPreferences { const stored = state?.approvalSubscriptionPreferences; const fallback = defaultApprovalSubscriptionPreferences(); @@ -3671,6 +3826,19 @@ function approvalSubscriptionPreferences(state: Partial | null | u }; } +function planStepDispatchPolicy(state: Partial | null | undefined): PlanStepDispatchPolicy { + const stored = state?.planStepDispatchPolicy; + const fallback = defaultPlanStepDispatchPolicy(); + if (!stored || typeof stored !== 'object') return fallback; + const maxPerSweep = Number(stored.max_per_sweep); + return { + enabled: stored.enabled !== false, + max_per_sweep: Number.isFinite(maxPerSweep) ? Math.max(1, Math.min(Math.floor(maxPerSweep), 10)) : fallback.max_per_sweep, + auto_dispatch_ready_steps: stored.auto_dispatch_ready_steps !== false, + updated_at: typeof stored.updated_at === 'string' ? stored.updated_at : fallback.updated_at, + }; +} + function notificationPreferences(state: Partial | null | undefined): NotificationPreferences { const stored = state?.notificationPreferences; const fallback = defaultNotificationPreferences(); @@ -3749,6 +3917,31 @@ async function handleApprovalSubscriptionPreferencesPatch( return next; } +async function handlePlanStepDispatchPolicyPatch( + patch: Partial, + snapshot: QimingclawSnapshot | null, +): Promise { + const state = snapshot?.uiState ?? await readBridgeUiState() ?? readState(); + const current = planStepDispatchPolicy(state); + const next = planStepDispatchPolicy({ + planStepDispatchPolicy: { + ...current, + ...patch, + updated_at: new Date().toISOString(), + }, + }); + await saveState( + { + ...normalizeAdapterState(state), + planStepDispatchPolicy: next, + }, + 'update_plan_step_dispatch_policy', + undefined, + { plan_step_dispatch_policy: next }, + ); + return next; +} + function approvalNotifications(snapshot: QimingclawSnapshot | null): UserNotification[] { const summaries = new Map(businessApprovalRows(snapshot).map((approval) => [stringValue(approval.approval_id), approval])); return buildApprovals(snapshot) 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 6f81110e..7e3f3f8f 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 @@ -195,6 +195,13 @@ export interface ApprovalSubscriptionPreferences { updated_at: string | null; } +export interface PlanStepDispatchPolicy { + enabled: boolean; + max_per_sweep: number; + auto_dispatch_ready_steps: boolean; + updated_at: string | null; +} + export type ChatRouteMode = 'auto' | 'chat' | 'direct' | 'plan'; export interface WsMessage { diff --git a/qimingclaw/crates/agent-electron-client/public/sgrobot-digital/assets/index-Dar5kQHh.js b/qimingclaw/crates/agent-electron-client/public/sgrobot-digital/assets/index-Dar5kQHh.js new file mode 100644 index 00000000..0da95210 --- /dev/null +++ b/qimingclaw/crates/agent-electron-client/public/sgrobot-digital/assets/index-Dar5kQHh.js @@ -0,0 +1,184 @@ +(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))r(c);new MutationObserver(c=>{for(const d of c)if(d.type==="childList")for(const _ of d.addedNodes)_.tagName==="LINK"&&_.rel==="modulepreload"&&r(_)}).observe(document,{childList:!0,subtree:!0});function i(c){const d={};return c.integrity&&(d.integrity=c.integrity),c.referrerPolicy&&(d.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?d.credentials="include":c.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function r(c){if(c.ep)return;c.ep=!0;const d=i(c);fetch(c.href,d)}})();function Jb(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Ad={exports:{}},ar={};/** + * @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 yh;function Fb(){if(yh)return ar;yh=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function i(r,c,d){var _=null;if(d!==void 0&&(_=""+d),c.key!==void 0&&(_=""+c.key),"key"in c){d={};for(var y in c)y!=="key"&&(d[y]=c[y])}else d=c;return c=d.ref,{$$typeof:n,type:r,key:_,ref:c!==void 0?c:null,props:d}}return ar.Fragment=a,ar.jsx=i,ar.jsxs=i,ar}var vh;function Wb(){return vh||(vh=1,Ad.exports=Fb()),Ad.exports}var o=Wb(),Ed={exports:{}},xe={};/** + * @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 bh;function Pb(){if(bh)return xe;bh=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),_=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),j=Symbol.iterator;function R(E){return E===null||typeof E!="object"?null:(E=j&&E[j]||E["@@iterator"],typeof E=="function"?E:null)}var A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},D=Object.assign,T={};function M(E,Y,ee){this.props=E,this.context=Y,this.refs=T,this.updater=ee||A}M.prototype.isReactComponent={},M.prototype.setState=function(E,Y){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,Y,"setState")},M.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function J(){}J.prototype=M.prototype;function Q(E,Y,ee){this.props=E,this.context=Y,this.refs=T,this.updater=ee||A}var ae=Q.prototype=new J;ae.constructor=Q,D(ae,M.prototype),ae.isPureReactComponent=!0;var re=Array.isArray;function he(){}var W={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function V(E,Y,ee){var te=ee.ref;return{$$typeof:n,type:E,key:Y,ref:te!==void 0?te:null,props:ee}}function U(E,Y){return V(E.type,Y,E.props)}function le(E){return typeof E=="object"&&E!==null&&E.$$typeof===n}function qe(E){var Y={"=":"=0",":":"=2"};return"$"+E.replace(/[=:]/g,function(ee){return Y[ee]})}var F=/\/+/g;function de(E,Y){return typeof E=="object"&&E!==null&&E.key!=null?qe(""+E.key):Y.toString(36)}function H(E){switch(E.status){case"fulfilled":return E.value;case"rejected":throw E.reason;default:switch(typeof E.status=="string"?E.then(he,he):(E.status="pending",E.then(function(Y){E.status==="pending"&&(E.status="fulfilled",E.value=Y)},function(Y){E.status==="pending"&&(E.status="rejected",E.reason=Y)})),E.status){case"fulfilled":return E.value;case"rejected":throw E.reason}}throw E}function $(E,Y,ee,te,fe){var Se=typeof E;(Se==="undefined"||Se==="boolean")&&(E=null);var Z=!1;if(E===null)Z=!0;else switch(Se){case"bigint":case"string":case"number":Z=!0;break;case"object":switch(E.$$typeof){case n:case a:Z=!0;break;case S:return Z=E._init,$(Z(E._payload),Y,ee,te,fe)}}if(Z)return fe=fe(E),Z=te===""?"."+de(E,0):te,re(fe)?(ee="",Z!=null&&(ee=Z.replace(F,"$&/")+"/"),$(fe,Y,ee,"",function(Le){return Le})):fe!=null&&(le(fe)&&(fe=U(fe,ee+(fe.key==null||E&&E.key===fe.key?"":(""+fe.key).replace(F,"$&/")+"/")+Z)),Y.push(fe)),1;Z=0;var ce=te===""?".":te+":";if(re(E))for(var Oe=0;Oe>>1,Ae=$[ye];if(0>>1;yec(ee,ie))tec(fe,ee)?($[ye]=fe,$[te]=ie,ye=te):($[ye]=ee,$[Y]=ie,ye=Y);else if(tec(fe,ie))$[ye]=fe,$[te]=ie,ye=te;else break e}}return K}function c($,K){var ie=$.sortIndex-K.sortIndex;return ie!==0?ie:$.id-K.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var _=Date,y=_.now();n.unstable_now=function(){return _.now()-y}}var p=[],g=[],S=1,x=null,j=3,R=!1,A=!1,D=!1,T=!1,M=typeof setTimeout=="function"?setTimeout:null,J=typeof clearTimeout=="function"?clearTimeout:null,Q=typeof setImmediate<"u"?setImmediate:null;function ae($){for(var K=i(g);K!==null;){if(K.callback===null)r(g);else if(K.startTime<=$)r(g),K.sortIndex=K.expirationTime,a(p,K);else break;K=i(g)}}function re($){if(D=!1,ae($),!A)if(i(p)!==null)A=!0,he||(he=!0,qe());else{var K=i(g);K!==null&&H(re,K.startTime-$)}}var he=!1,W=-1,P=5,V=-1;function U(){return T?!0:!(n.unstable_now()-V$&&U());){var ye=x.callback;if(typeof ye=="function"){x.callback=null,j=x.priorityLevel;var Ae=ye(x.expirationTime<=$);if($=n.unstable_now(),typeof Ae=="function"){x.callback=Ae,ae($),K=!0;break t}x===i(p)&&r(p),ae($)}else r(p);x=i(p)}if(x!==null)K=!0;else{var E=i(g);E!==null&&H(re,E.startTime-$),K=!1}}break e}finally{x=null,j=ie,R=!1}K=void 0}}finally{K?qe():he=!1}}}var qe;if(typeof Q=="function")qe=function(){Q(le)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,de=F.port2;F.port1.onmessage=le,qe=function(){de.postMessage(null)}}else qe=function(){M(le,0)};function H($,K){W=M(function(){$(n.unstable_now())},K)}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($){$.callback=null},n.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<$?Math.floor(1e3/$):5},n.unstable_getCurrentPriorityLevel=function(){return j},n.unstable_next=function($){switch(j){case 1:case 2:case 3:var K=3;break;default:K=j}var ie=j;j=K;try{return $()}finally{j=ie}},n.unstable_requestPaint=function(){T=!0},n.unstable_runWithPriority=function($,K){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var ie=j;j=$;try{return K()}finally{j=ie}},n.unstable_scheduleCallback=function($,K,ie){var ye=n.unstable_now();switch(typeof ie=="object"&&ie!==null?(ie=ie.delay,ie=typeof ie=="number"&&0ye?($.sortIndex=ie,a(g,$),i(p)===null&&$===i(g)&&(D?(J(W),W=-1):D=!0,H(re,ie-ye))):($.sortIndex=Ae,a(p,$),A||R||(A=!0,he||(he=!0,qe()))),$},n.unstable_shouldYield=U,n.unstable_wrapCallback=function($){var K=j;return function(){var ie=j;j=K;try{return $.apply(this,arguments)}finally{j=ie}}}})(Td)),Td}var kh;function n0(){return kh||(kh=1,Nd.exports=t0()),Nd.exports}var Dd={exports:{}},Lt={};/** + * @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 jh;function a0(){if(jh)return Lt;jh=1;var n=_f();function a(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(a){console.error(a)}}return n(),Dd.exports=a0(),Dd.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 Ah;function i0(){if(Ah)return lr;Ah=1;var n=n0(),a=_f(),i=l0();function r(e){var t="https://react.dev/errors/"+e;if(1Ae||(e.current=ye[Ae],ye[Ae]=null,Ae--)}function ee(e,t){Ae++,ye[Ae]=e.current,e.current=t}var te=E(null),fe=E(null),Se=E(null),Z=E(null);function ce(e,t){switch(ee(Se,t),ee(fe,e),ee(te,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Hp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Hp(t),e=Gp(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Y(te),ee(te,e)}function Oe(){Y(te),Y(fe),Y(Se)}function Le(e){e.memoizedState!==null&&ee(Z,e);var t=te.current,l=Gp(t,e.type);t!==l&&(ee(fe,e),ee(te,l))}function Mt(e){fe.current===e&&(Y(te),Y(fe)),Z.current===e&&(Y(Z),Ps._currentValue=ie)}var zt,Be;function Me(e){if(zt===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);zt=t&&t[1]||"",Be=-1)":-1u||w[s]!==O[u]){var B=` +`+w[s].replace(" at new "," at ");return e.displayName&&B.includes("")&&(B=B.replace("",e.displayName)),B}while(1<=s&&0<=u);break}}}finally{Fe=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?Me(l):""}function Gn(e,t){switch(e.tag){case 26:case 27:case 5:return Me(e.type);case 16:return Me("Lazy");case 13:return e.child!==t&&t!==null?Me("Suspense Fallback"):Me("Suspense");case 19:return Me("SuspenseList");case 0:case 15:return tn(e.type,!1);case 11:return tn(e.type.render,!1);case 1:return tn(e.type,!0);case 31:return Me("Activity");default:return""}}function as(e){try{var t="",l=null;do t+=Gn(e,l),l=e,e=e.return;while(e);return t}catch(s){return` +Error generating stack: `+s.message+` +`+s.stack}}var ls=Object.prototype.hasOwnProperty,yl=n.unstable_scheduleCallback,is=n.unstable_cancelCallback,So=n.unstable_shouldYield,Bt=n.unstable_requestPaint,Ot=n.unstable_now,ke=n.unstable_getCurrentPriorityLevel,Ra=n.unstable_ImmediatePriority,Ut=n.unstable_UserBlockingPriority,qt=n.unstable_NormalPriority,ti=n.unstable_LowPriority,mn=n.unstable_IdlePriority,Ht=n.log,ni=n.unstable_setDisableYieldValue,nn=null,xt=null;function _n(e){if(typeof Ht=="function"&&ni(e),xt&&typeof xt.setStrictMode=="function")try{xt.setStrictMode(nn,e)}catch{}}var We=Math.clz32?Math.clz32:$a,xo=Math.log,Ar=Math.LN2;function $a(e){return e>>>=0,e===0?32:31-(xo(e)/Ar|0)|0}var ai=256,Ma=262144,li=4194304;function la(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 ii(e,t,l){var s=e.pendingLanes;if(s===0)return 0;var u=0,f=e.suspendedLanes,h=e.pingedLanes;e=e.warmLanes;var b=s&134217727;return b!==0?(s=b&~f,s!==0?u=la(s):(h&=b,h!==0?u=la(h):l||(l=b&~e,l!==0&&(u=la(l))))):(b=s&~f,b!==0?u=la(b):h!==0?u=la(h):l||(l=s&~e,l!==0&&(u=la(l)))),u===0?0:t!==0&&t!==u&&(t&f)===0&&(f=u&-u,l=t&-t,f>=l||f===32&&(l&4194048)!==0)?t:u}function vl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Cn(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 Qe(){var e=li;return li<<=1,(li&62914560)===0&&(li=4194304),e}function Ee(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function ia(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function If(e,t,l,s,u,f){var h=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 b=e.entanglements,w=e.expirationTimes,O=e.hiddenUpdates;for(l=h&~l;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Eo=/[\n"\\]/g;function Vt(e){return e.replace(Eo,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function fs(e,t,l,s,u,f,h,b){e.name="",h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.type=h:e.removeAttribute("type"),t!=null?h==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Qt(t)):e.value!==""+Qt(t)&&(e.value=""+Qt(t)):h!=="submit"&&h!=="reset"||e.removeAttribute("value"),t!=null?ms(e,h,Qt(t)):l!=null?ms(e,h,Qt(l)):s!=null&&e.removeAttribute("value"),u==null&&f!=null&&(e.defaultChecked=!!f),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.name=""+Qt(b):e.removeAttribute("name")}function Cr(e,t,l,s,u,f,h,b){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),t!=null||l!=null){if(!(f!=="submit"&&f!=="reset"||t!=null)){oi(e);return}l=l!=null?""+Qt(l):"",t=t!=null?""+Qt(t):l,b||t===e.value||(e.value=t),e.defaultValue=t}s=s??u,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=b?e.checked:!!s,e.defaultChecked=!!s,h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.name=h),oi(e)}function ms(e,t,l){t==="number"&&Qn(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function Ba(e,t,l,s){if(e=e.options,t){t={};for(var u=0;u"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ys=!1;if(hn)try{var da={};Object.defineProperty(da,"passive",{get:function(){ys=!0}}),window.addEventListener("test",da,da),window.removeEventListener("test",da,da)}catch{ys=!1}var $n=null,Xn=null,ui=null;function Rr(){if(ui)return ui;var e,t=Xn,l=t.length,s,u="value"in $n?$n.value:$n.textContent,f=u.length;for(e=0;e=bs),Xf=" ",Zf=!1;function Jf(e,t){switch(e){case"keyup":return yv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ff(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var mi=!1;function bv(e,t){switch(e){case"compositionend":return Ff(t);case"keypress":return t.which!==32?null:(Zf=!0,Xf);case"textInput":return e=t.data,e===Xf&&Zf?null:e;default:return null}}function Sv(e,t){if(mi)return e==="compositionend"||!Ro&&Jf(e,t)?(e=Rr(),ui=Xn=$n=null,mi=!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:l,offset:t-e};e=s}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=im(l)}}function rm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?rm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function cm(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Qn(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=Qn(e.document)}return t}function zo(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 Nv=hn&&"documentMode"in document&&11>=document.documentMode,_i=null,Oo=null,js=null,qo=!1;function om(e,t,l){var s=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;qo||_i==null||_i!==Qn(s)||(s=_i,"selectionStart"in s&&zo(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),js&&ks(js,s)||(js=s,s=kc(Oo,"onSelect"),0>=h,u-=h,Jn=1<<32-We(t)+u|l<we?(De=oe,oe=null):De=oe.sibling;var He=q(N,oe,z[we],G);if(He===null){oe===null&&(oe=De);break}e&&oe&&He.alternate===null&&t(N,oe),C=f(He,C,we),Ue===null?me=He:Ue.sibling=He,Ue=He,oe=De}if(we===z.length)return l(N,oe),Re&&ma(N,we),me;if(oe===null){for(;wewe?(De=oe,oe=null):De=oe.sibling;var ol=q(N,oe,He.value,G);if(ol===null){oe===null&&(oe=De);break}e&&oe&&ol.alternate===null&&t(N,oe),C=f(ol,C,we),Ue===null?me=ol:Ue.sibling=ol,Ue=ol,oe=De}if(He.done)return l(N,oe),Re&&ma(N,we),me;if(oe===null){for(;!He.done;we++,He=z.next())He=I(N,He.value,G),He!==null&&(C=f(He,C,we),Ue===null?me=He:Ue.sibling=He,Ue=He);return Re&&ma(N,we),me}for(oe=s(oe);!He.done;we++,He=z.next())He=L(oe,N,we,He.value,G),He!==null&&(e&&He.alternate!==null&&oe.delete(He.key===null?we:He.key),C=f(He,C,we),Ue===null?me=He:Ue.sibling=He,Ue=He);return e&&oe.forEach(function(Zb){return t(N,Zb)}),Re&&ma(N,we),me}function Je(N,C,z,G){if(typeof z=="object"&&z!==null&&z.type===D&&z.key===null&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case R:e:{for(var me=z.key;C!==null;){if(C.key===me){if(me=z.type,me===D){if(C.tag===7){l(N,C.sibling),G=u(C,z.props.children),G.return=N,N=G;break e}}else if(C.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===P&&Ol(me)===C.type){l(N,C.sibling),G=u(C,z.props),Ts(G,z),G.return=N,N=G;break e}l(N,C);break}else t(N,C);C=C.sibling}z.type===D?(G=Dl(z.props.children,N.mode,G,z.key),G.return=N,N=G):(G=Ur(z.type,z.key,z.props,null,N.mode,G),Ts(G,z),G.return=N,N=G)}return h(N);case A:e:{for(me=z.key;C!==null;){if(C.key===me)if(C.tag===4&&C.stateNode.containerInfo===z.containerInfo&&C.stateNode.implementation===z.implementation){l(N,C.sibling),G=u(C,z.children||[]),G.return=N,N=G;break e}else{l(N,C);break}else t(N,C);C=C.sibling}G=Io(z,N.mode,G),G.return=N,N=G}return h(N);case P:return z=Ol(z),Je(N,C,z,G)}if(H(z))return se(N,C,z,G);if(qe(z)){if(me=qe(z),typeof me!="function")throw Error(r(150));return z=me.call(z),ve(N,C,z,G)}if(typeof z.then=="function")return Je(N,C,Vr(z),G);if(z.$$typeof===Q)return Je(N,C,Yr(N,z),G);Xr(N,z)}return typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint"?(z=""+z,C!==null&&C.tag===6?(l(N,C.sibling),G=u(C,z),G.return=N,N=G):(l(N,C),G=Yo(z,N.mode,G),G.return=N,N=G),h(N)):l(N,C)}return function(N,C,z,G){try{Ns=0;var me=Je(N,C,z,G);return wi=null,me}catch(oe){if(oe===ji||oe===Kr)throw oe;var Ue=ln(29,oe,null,N.mode);return Ue.lanes=G,Ue.return=N,Ue}finally{}}}var Ll=Rm(!0),$m=Rm(!1),Qa=!1;function nu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function au(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 Va(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Xa(e,t,l){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(Ye&2)!==0){var u=s.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),s.pending=t,t=Br(e),hm(e,null,l),t}return Lr(e,s,t,l),Br(e)}function Ds(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,l|=s,t.lanes=l,ko(e,l)}}function lu(e,t){var l=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,l===s)){var u=null,f=null;if(l=l.firstBaseUpdate,l!==null){do{var h={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};f===null?u=f=h:f=f.next=h,l=l.next}while(l!==null);f===null?u=f=t:f=f.next=t}else u=f=t;l={baseState:s.baseState,firstBaseUpdate:u,lastBaseUpdate:f,shared:s.shared,callbacks:s.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var iu=!1;function Rs(){if(iu){var e=ki;if(e!==null)throw e}}function $s(e,t,l,s){iu=!1;var u=e.updateQueue;Qa=!1;var f=u.firstBaseUpdate,h=u.lastBaseUpdate,b=u.shared.pending;if(b!==null){u.shared.pending=null;var w=b,O=w.next;w.next=null,h===null?f=O:h.next=O,h=w;var B=e.alternate;B!==null&&(B=B.updateQueue,b=B.lastBaseUpdate,b!==h&&(b===null?B.firstBaseUpdate=O:b.next=O,B.lastBaseUpdate=w))}if(f!==null){var I=u.baseState;h=0,B=O=w=null,b=f;do{var q=b.lane&-536870913,L=q!==b.lane;if(L?(Te&q)===q:(s&q)===q){q!==0&&q===xi&&(iu=!0),B!==null&&(B=B.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{var se=e,ve=b;q=t;var Je=l;switch(ve.tag){case 1:if(se=ve.payload,typeof se=="function"){I=se.call(Je,I,q);break e}I=se;break e;case 3:se.flags=se.flags&-65537|128;case 0:if(se=ve.payload,q=typeof se=="function"?se.call(Je,I,q):se,q==null)break e;I=x({},I,q);break e;case 2:Qa=!0}}q=b.callback,q!==null&&(e.flags|=64,L&&(e.flags|=8192),L=u.callbacks,L===null?u.callbacks=[q]:L.push(q))}else L={lane:q,tag:b.tag,payload:b.payload,callback:b.callback,next:null},B===null?(O=B=L,w=I):B=B.next=L,h|=q;if(b=b.next,b===null){if(b=u.shared.pending,b===null)break;L=b,b=L.next,L.next=null,u.lastBaseUpdate=L,u.shared.pending=null}}while(!0);B===null&&(w=I),u.baseState=w,u.firstBaseUpdate=O,u.lastBaseUpdate=B,f===null&&(u.shared.lanes=0),Pa|=h,e.lanes=h,e.memoizedState=I}}function Mm(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function zm(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;ef?f:8;var h=$.T,b={};$.T=b,ju(e,!1,t,l);try{var w=u(),O=$.S;if(O!==null&&O(b,w),w!==null&&typeof w=="object"&&typeof w.then=="function"){var B=Lv(w,s);Os(e,t,B,un(e))}else Os(e,t,s,un(e))}catch(I){Os(e,t,{then:function(){},status:"rejected",reason:I},un())}finally{K.p=f,h!==null&&b.types!==null&&(h.types=b.types),$.T=h}}function Iv(){}function xu(e,t,l,s){if(e.tag!==5)throw Error(r(476));var u=m_(e).queue;f_(e,u,t,ie,l===null?Iv:function(){return __(e),l(s)})}function m_(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ga,lastRenderedState:ie},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ga,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function __(e){var t=m_(e);t.next===null&&(t=e.alternate.memoizedState),Os(e,t.next.queue,{},un())}function ku(){return Nt(Ps)}function p_(){return mt().memoizedState}function h_(){return mt().memoizedState}function Kv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=un();e=Va(l);var s=Xa(t,e,l);s!==null&&(Pt(s,t,l),Ds(s,t,l)),t={cache:Wo()},e.payload=t;return}t=t.return}}function Qv(e,t,l){var s=un();l={lane:s,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},lc(e)?y_(t,l):(l=Ho(e,t,l,s),l!==null&&(Pt(l,e,s),v_(l,t,s)))}function g_(e,t,l){var s=un();Os(e,t,l,s)}function Os(e,t,l,s){var u={lane:s,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(lc(e))y_(t,u);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var h=t.lastRenderedState,b=f(h,l);if(u.hasEagerState=!0,u.eagerState=b,an(b,h))return Lr(e,t,u,0),Pe===null&&qr(),!1}catch{}finally{}if(l=Ho(e,t,u,s),l!==null)return Pt(l,e,s),v_(l,t,s),!0}return!1}function ju(e,t,l,s){if(s={lane:2,revertLane:nd(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},lc(e)){if(t)throw Error(r(479))}else t=Ho(e,l,s,2),t!==null&&Pt(t,e,2)}function lc(e){var t=e.alternate;return e===je||t!==null&&t===je}function y_(e,t){Ei=Fr=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function v_(e,t,l){if((l&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,l|=s,t.lanes=l,ko(e,l)}}var qs={readContext:Nt,use:ec,useCallback:ct,useContext:ct,useEffect:ct,useImperativeHandle:ct,useLayoutEffect:ct,useInsertionEffect:ct,useMemo:ct,useReducer:ct,useRef:ct,useState:ct,useDebugValue:ct,useDeferredValue:ct,useTransition:ct,useSyncExternalStore:ct,useId:ct,useHostTransitionStatus:ct,useFormState:ct,useActionState:ct,useOptimistic:ct,useMemoCache:ct,useCacheRefresh:ct};qs.useEffectEvent=ct;var b_={readContext:Nt,use:ec,useCallback:function(e,t){return It().memoizedState=[e,t===void 0?null:t],e},useContext:Nt,useEffect:a_,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,nc(4194308,4,r_.bind(null,t,e),l)},useLayoutEffect:function(e,t){return nc(4194308,4,e,t)},useInsertionEffect:function(e,t){nc(4,2,e,t)},useMemo:function(e,t){var l=It();t=t===void 0?null:t;var s=e();if(Bl){_n(!0);try{e()}finally{_n(!1)}}return l.memoizedState=[s,t],s},useReducer:function(e,t,l){var s=It();if(l!==void 0){var u=l(t);if(Bl){_n(!0);try{l(t)}finally{_n(!1)}}}else u=t;return s.memoizedState=s.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},s.queue=e,e=e.dispatch=Qv.bind(null,je,e),[s.memoizedState,e]},useRef:function(e){var t=It();return e={current:e},t.memoizedState=e},useState:function(e){e=gu(e);var t=e.queue,l=g_.bind(null,je,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:bu,useDeferredValue:function(e,t){var l=It();return Su(l,e,t)},useTransition:function(){var e=gu(!1);return e=f_.bind(null,je,e.queue,!0,!1),It().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var s=je,u=It();if(Re){if(l===void 0)throw Error(r(407));l=l()}else{if(l=t(),Pe===null)throw Error(r(349));(Te&127)!==0||Hm(s,t,l)}u.memoizedState=l;var f={value:l,getSnapshot:t};return u.queue=f,a_(Ym.bind(null,s,f,e),[e]),s.flags|=2048,Ni(9,{destroy:void 0},Gm.bind(null,s,f,l,t),null),l},useId:function(){var e=It(),t=Pe.identifierPrefix;if(Re){var l=Fn,s=Jn;l=(s&~(1<<32-We(s)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Wr++,0<\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof s.is=="string"?h.createElement("select",{is:s.is}):h.createElement("select"),s.multiple?f.multiple=!0:s.size&&(f.size=s.size);break;default:f=typeof s.is=="string"?h.createElement(u,{is:s.is}):h.createElement(u)}}f[dt]=t,f[ue]=s;e:for(h=t.child;h!==null;){if(h.tag===5||h.tag===6)f.appendChild(h.stateNode);else if(h.tag!==4&&h.tag!==27&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===t)break e;for(;h.sibling===null;){if(h.return===null||h.return===t)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}t.stateNode=f;e:switch(Dt(f,u,s),u){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&va(t)}}return at(t),Lu(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&va(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(r(166));if(e=Se.current,bi(t)){if(e=t.stateNode,l=t.memoizedProps,s=null,u=Ct,u!==null)switch(u.tag){case 27:case 5:s=u.memoizedProps}e[dt]=t,e=!!(e.nodeValue===l||s!==null&&s.suppressHydrationWarning===!0||Bp(e.nodeValue,l)),e||Ia(t,!0)}else e=jc(e).createTextNode(s),e[dt]=t,t.stateNode=e}return at(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(s=bi(t),l!==null){if(e===null){if(!s)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[dt]=t}else Rl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;at(t),e=!1}else l=Xo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(rn(t),t):(rn(t),null);if((t.flags&128)!==0)throw Error(r(558))}return at(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=bi(t),s!==null&&s.dehydrated!==null){if(e===null){if(!u)throw Error(r(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(r(317));u[dt]=t}else Rl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;at(t),u=!1}else u=Xo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(rn(t),t):(rn(t),null)}return rn(t),(t.flags&128)!==0?(t.lanes=l,t):(l=s!==null,e=e!==null&&e.memoizedState!==null,l&&(s=t.child,u=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(u=s.alternate.memoizedState.cachePool.pool),f=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(f=s.memoizedState.cachePool.pool),f!==u&&(s.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),oc(t,t.updateQueue),at(t),null);case 4:return Oe(),e===null&&sd(t.stateNode.containerInfo),at(t),null;case 10:return pa(t.type),at(t),null;case 19:if(Y(ft),s=t.memoizedState,s===null)return at(t),null;if(u=(t.flags&128)!==0,f=s.rendering,f===null)if(u)Bs(s,!1);else{if(ot!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=Jr(e),f!==null){for(t.flags|=128,Bs(s,!1),e=f.updateQueue,t.updateQueue=e,oc(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)gm(l,e),l=l.sibling;return ee(ft,ft.current&1|2),Re&&ma(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&Ot()>_c&&(t.flags|=128,u=!0,Bs(s,!1),t.lanes=4194304)}else{if(!u)if(e=Jr(f),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,oc(t,e),Bs(s,!0),s.tail===null&&s.tailMode==="hidden"&&!f.alternate&&!Re)return at(t),null}else 2*Ot()-s.renderingStartTime>_c&&l!==536870912&&(t.flags|=128,u=!0,Bs(s,!1),t.lanes=4194304);s.isBackwards?(f.sibling=t.child,t.child=f):(e=s.last,e!==null?e.sibling=f:t.child=f,s.last=f)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Ot(),e.sibling=null,l=ft.current,ee(ft,u?l&1|2:l&1),Re&&ma(t,s.treeForkCount),e):(at(t),null);case 22:case 23:return rn(t),ru(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(l&536870912)!==0&&(t.flags&128)===0&&(at(t),t.subtreeFlags&6&&(t.flags|=8192)):at(t),l=t.updateQueue,l!==null&&oc(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==l&&(t.flags|=2048),e!==null&&Y(zl),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),pa(ht),at(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function Fv(e,t){switch(Qo(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return pa(ht),Oe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Mt(t),null;case 31:if(t.memoizedState!==null){if(rn(t),t.alternate===null)throw Error(r(340));Rl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(rn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Rl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Y(ft),null;case 4:return Oe(),null;case 10:return pa(t.type),null;case 22:case 23:return rn(t),ru(),e!==null&&Y(zl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return pa(ht),null;case 25:return null;default:return null}}function I_(e,t){switch(Qo(t),t.tag){case 3:pa(ht),Oe();break;case 26:case 27:case 5:Mt(t);break;case 4:Oe();break;case 31:t.memoizedState!==null&&rn(t);break;case 13:rn(t);break;case 19:Y(ft);break;case 10:pa(t.type);break;case 22:case 23:rn(t),ru(),e!==null&&Y(zl);break;case 24:pa(ht)}}function Us(e,t){try{var l=t.updateQueue,s=l!==null?l.lastEffect:null;if(s!==null){var u=s.next;l=u;do{if((l.tag&e)===e){s=void 0;var f=l.create,h=l.inst;s=f(),h.destroy=s}l=l.next}while(l!==u)}}catch(b){Ke(t,t.return,b)}}function Fa(e,t,l){try{var s=t.updateQueue,u=s!==null?s.lastEffect:null;if(u!==null){var f=u.next;s=f;do{if((s.tag&e)===e){var h=s.inst,b=h.destroy;if(b!==void 0){h.destroy=void 0,u=t;var w=l,O=b;try{O()}catch(B){Ke(u,w,B)}}}s=s.next}while(s!==f)}}catch(B){Ke(t,t.return,B)}}function K_(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{zm(t,l)}catch(s){Ke(e,e.return,s)}}}function Q_(e,t,l){l.props=Ul(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(s){Ke(e,t,s)}}function Hs(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof l=="function"?e.refCleanup=l(s):l.current=s}}catch(u){Ke(e,t,u)}}function Wn(e,t){var l=e.ref,s=e.refCleanup;if(l!==null)if(typeof s=="function")try{s()}catch(u){Ke(e,t,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(u){Ke(e,t,u)}else l.current=null}function V_(e){var t=e.type,l=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&s.focus();break e;case"img":l.src?s.src=l.src:l.srcSet&&(s.srcset=l.srcSet)}}catch(u){Ke(e,e.return,u)}}function Bu(e,t,l){try{var s=e.stateNode;vb(s,e.type,l,t),s[ue]=t}catch(u){Ke(e,e.return,u)}}function X_(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ll(e.type)||e.tag===4}function Uu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||X_(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&&ll(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 Hu(e,t,l){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=Rn));else if(s!==4&&(s===27&&ll(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(Hu(e,t,l),e=e.sibling;e!==null;)Hu(e,t,l),e=e.sibling}function uc(e,t,l){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(s!==4&&(s===27&&ll(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(uc(e,t,l),e=e.sibling;e!==null;)uc(e,t,l),e=e.sibling}function Z_(e){var t=e.stateNode,l=e.memoizedProps;try{for(var s=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);Dt(t,s,l),t[dt]=e,t[ue]=l}catch(f){Ke(e,e.return,f)}}var ba=!1,vt=!1,Gu=!1,J_=typeof WeakSet=="function"?WeakSet:Set,wt=null;function Wv(e,t){if(e=e.containerInfo,od=Dc,e=cm(e),zo(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var s=l.getSelection&&l.getSelection();if(s&&s.rangeCount!==0){l=s.anchorNode;var u=s.anchorOffset,f=s.focusNode;s=s.focusOffset;try{l.nodeType,f.nodeType}catch{l=null;break e}var h=0,b=-1,w=-1,O=0,B=0,I=e,q=null;t:for(;;){for(var L;I!==l||u!==0&&I.nodeType!==3||(b=h+u),I!==f||s!==0&&I.nodeType!==3||(w=h+s),I.nodeType===3&&(h+=I.nodeValue.length),(L=I.firstChild)!==null;)q=I,I=L;for(;;){if(I===e)break t;if(q===l&&++O===u&&(b=h),q===f&&++B===s&&(w=h),(L=I.nextSibling)!==null)break;I=q,q=I.parentNode}I=L}l=b===-1||w===-1?null:{start:b,end:w}}else l=null}l=l||{start:0,end:0}}else l=null;for(ud={focusedElem:e,selectionRange:l},Dc=!1,wt=t;wt!==null;)if(t=wt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,wt=e;else for(;wt!==null;){switch(t=wt,f=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(l=0;l title"))),Dt(f,s,l),f[dt]=e,pt(f),s=f;break e;case"link":var h=nh("link","href",u).get(s+(l.href||""));if(h){for(var b=0;bJe&&(h=Je,Je=ve,ve=h);var N=sm(b,ve),C=sm(b,Je);if(N&&C&&(L.rangeCount!==1||L.anchorNode!==N.node||L.anchorOffset!==N.offset||L.focusNode!==C.node||L.focusOffset!==C.offset)){var z=I.createRange();z.setStart(N.node,N.offset),L.removeAllRanges(),ve>Je?(L.addRange(z),L.extend(C.node,C.offset)):(z.setEnd(C.node,C.offset),L.addRange(z))}}}}for(I=[],L=b;L=L.parentNode;)L.nodeType===1&&I.push({element:L,left:L.scrollLeft,top:L.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;bl?32:l,$.T=null,l=Zu,Zu=null;var f=tl,h=wa;if(jt=0,Mi=tl=null,wa=0,(Ye&6)!==0)throw Error(r(331));var b=Ye;if(Ye|=4,rp(f.current),lp(f,f.current,h,l),Ye=b,Vs(0,!1),xt&&typeof xt.onPostCommitFiberRoot=="function")try{xt.onPostCommitFiberRoot(nn,f)}catch{}return!0}finally{K.p=u,$.T=s,wp(e,t)}}function Ep(e,t,l){t=yn(l,t),t=Cu(e.stateNode,t,2),e=Xa(e,t,2),e!==null&&(ia(e,2),Pn(e))}function Ke(e,t,l){if(e.tag===3)Ep(e,e,l);else for(;t!==null;){if(t.tag===3){Ep(t,e,l);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(el===null||!el.has(s))){e=yn(l,e),l=C_(2),s=Xa(t,l,2),s!==null&&(N_(l,s,t,e),ia(s,2),Pn(s));break}}t=t.return}}function Pu(e,t,l){var s=e.pingCache;if(s===null){s=e.pingCache=new tb;var u=new Set;s.set(t,u)}else u=s.get(t),u===void 0&&(u=new Set,s.set(t,u));u.has(l)||(Ku=!0,u.add(l),e=sb.bind(null,e,t,l),t.then(e,e))}function sb(e,t,l){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Pe===e&&(Te&l)===l&&(ot===4||ot===3&&(Te&62914560)===Te&&300>Ot()-mc?(Ye&2)===0&&zi(e,0):Qu|=l,$i===Te&&($i=0)),Pn(e)}function Cp(e,t){t===0&&(t=Qe()),e=Tl(e,t),e!==null&&(ia(e,t),Pn(e))}function rb(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),Cp(e,l)}function cb(e,t){var l=0;switch(e.tag){case 31:case 13:var s=e.stateNode,u=e.memoizedState;u!==null&&(l=u.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(r(314))}s!==null&&s.delete(t),Cp(e,l)}function ob(e,t){return yl(e,t)}var bc=null,qi=null,ed=!1,Sc=!1,td=!1,al=0;function Pn(e){e!==qi&&e.next===null&&(qi===null?bc=qi=e:qi=qi.next=e),Sc=!0,ed||(ed=!0,db())}function Vs(e,t){if(!td&&Sc){td=!0;do for(var l=!1,s=bc;s!==null;){if(e!==0){var u=s.pendingLanes;if(u===0)var f=0;else{var h=s.suspendedLanes,b=s.pingedLanes;f=(1<<31-We(42|e)+1)-1,f&=u&~(h&~b),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(l=!0,Rp(s,f))}else f=Te,f=ii(s,s===Pe?f:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(f&3)===0||vl(s,f)||(l=!0,Rp(s,f));s=s.next}while(l);td=!1}}function ub(){Np()}function Np(){Sc=ed=!1;var e=0;al!==0&&Sb()&&(e=al);for(var t=Ot(),l=null,s=bc;s!==null;){var u=s.next,f=Tp(s,t);f===0?(s.next=null,l===null?bc=u:l.next=u,u===null&&(qi=l)):(l=s,(e!==0||(f&3)!==0)&&(Sc=!0)),s=u}jt!==0&&jt!==5||Vs(e),al!==0&&(al=0)}function Tp(e,t){for(var l=e.suspendedLanes,s=e.pingedLanes,u=e.expirationTimes,f=e.pendingLanes&-62914561;0b)break;var B=w.transferSize,I=w.initiatorType;B&&Up(I)&&(w=w.responseEnd,h+=B*(w"u"?null:document;function Wp(e,t,l){var s=Li;if(s&&typeof t=="string"&&t){var u=Vt(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof l=="string"&&(u+='[crossorigin="'+l+'"]'),Fp.has(u)||(Fp.add(u),e={rel:e,crossOrigin:l,href:t},s.querySelector(u)===null&&(t=s.createElement("link"),Dt(t,"link",e),pt(t),s.head.appendChild(t)))}}function Tb(e){Aa.D(e),Wp("dns-prefetch",e,null)}function Db(e,t){Aa.C(e,t),Wp("preconnect",e,t)}function Rb(e,t,l){Aa.L(e,t,l);var s=Li;if(s&&e&&t){var u='link[rel="preload"][as="'+Vt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(u+='[imagesrcset="'+Vt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(u+='[imagesizes="'+Vt(l.imageSizes)+'"]')):u+='[href="'+Vt(e)+'"]';var f=u;switch(t){case"style":f=Bi(e);break;case"script":f=Ui(e)}jn.has(f)||(e=x({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),jn.set(f,e),s.querySelector(u)!==null||t==="style"&&s.querySelector(Fs(f))||t==="script"&&s.querySelector(Ws(f))||(t=s.createElement("link"),Dt(t,"link",e),pt(t),s.head.appendChild(t)))}}function $b(e,t){Aa.m(e,t);var l=Li;if(l&&e){var s=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+Vt(s)+'"][href="'+Vt(e)+'"]',f=u;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Ui(e)}if(!jn.has(f)&&(e=x({rel:"modulepreload",href:e},t),jn.set(f,e),l.querySelector(u)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Ws(f)))return}s=l.createElement("link"),Dt(s,"link",e),pt(s),l.head.appendChild(s)}}}function Mb(e,t,l){Aa.S(e,t,l);var s=Li;if(s&&e){var u=qa(s).hoistableStyles,f=Bi(e);t=t||"default";var h=u.get(f);if(!h){var b={loading:0,preload:null};if(h=s.querySelector(Fs(f)))b.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":t},l),(l=jn.get(f))&&gd(e,l);var w=h=s.createElement("link");pt(w),Dt(w,"link",e),w._p=new Promise(function(O,B){w.onload=O,w.onerror=B}),w.addEventListener("load",function(){b.loading|=1}),w.addEventListener("error",function(){b.loading|=2}),b.loading|=4,Ac(h,t,s)}h={type:"stylesheet",instance:h,count:1,state:b},u.set(f,h)}}}function zb(e,t){Aa.X(e,t);var l=Li;if(l&&e){var s=qa(l).hoistableScripts,u=Ui(e),f=s.get(u);f||(f=l.querySelector(Ws(u)),f||(e=x({src:e,async:!0},t),(t=jn.get(u))&&yd(e,t),f=l.createElement("script"),pt(f),Dt(f,"link",e),l.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},s.set(u,f))}}function Ob(e,t){Aa.M(e,t);var l=Li;if(l&&e){var s=qa(l).hoistableScripts,u=Ui(e),f=s.get(u);f||(f=l.querySelector(Ws(u)),f||(e=x({src:e,async:!0,type:"module"},t),(t=jn.get(u))&&yd(e,t),f=l.createElement("script"),pt(f),Dt(f,"link",e),l.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},s.set(u,f))}}function Pp(e,t,l,s){var u=(u=Se.current)?wc(u):null;if(!u)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=Bi(l.href),l=qa(u).hoistableStyles,s=l.get(t),s||(s={type:"style",instance:null,count:0,state:null},l.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=Bi(l.href);var f=qa(u).hoistableStyles,h=f.get(e);if(h||(u=u.ownerDocument||u,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,h),(f=u.querySelector(Fs(e)))&&!f._p&&(h.instance=f,h.state.loading=5),jn.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},jn.set(e,l),f||qb(u,e,l,h.state))),t&&s===null)throw Error(r(528,""));return h}if(t&&s!==null)throw Error(r(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ui(l),l=qa(u).hoistableScripts,s=l.get(t),s||(s={type:"script",instance:null,count:0,state:null},l.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Bi(e){return'href="'+Vt(e)+'"'}function Fs(e){return'link[rel="stylesheet"]['+e+"]"}function eh(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function qb(e,t,l,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),Dt(t,"link",l),pt(t),e.head.appendChild(t))}function Ui(e){return'[src="'+Vt(e)+'"]'}function Ws(e){return"script[async]"+e}function th(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+Vt(l.href)+'"]');if(s)return t.instance=s,pt(s),s;var u=x({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),pt(s),Dt(s,"style",u),Ac(s,l.precedence,e),t.instance=s;case"stylesheet":u=Bi(l.href);var f=e.querySelector(Fs(u));if(f)return t.state.loading|=4,t.instance=f,pt(f),f;s=eh(l),(u=jn.get(u))&&gd(s,u),f=(e.ownerDocument||e).createElement("link"),pt(f);var h=f;return h._p=new Promise(function(b,w){h.onload=b,h.onerror=w}),Dt(f,"link",s),t.state.loading|=4,Ac(f,l.precedence,e),t.instance=f;case"script":return f=Ui(l.src),(u=e.querySelector(Ws(f)))?(t.instance=u,pt(u),u):(s=l,(u=jn.get(f))&&(s=x({},l),yd(s,u)),e=e.ownerDocument||e,u=e.createElement("script"),pt(u),Dt(u,"link",s),e.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,Ac(s,l.precedence,e));return t.instance}function Ac(e,t,l){for(var s=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=s.length?s[s.length-1]:null,f=u,h=0;h title"):null)}function Lb(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;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 lh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Bb(e,t,l,s){if(l.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var u=Bi(s.href),f=t.querySelector(Fs(u));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Cc.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=f,pt(f);return}f=t.ownerDocument||t,s=eh(s),(u=jn.get(u))&&gd(s,u),f=f.createElement("link"),pt(f);var h=f;h._p=new Promise(function(b,w){h.onload=b,h.onerror=w}),Dt(f,"link",s),l.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=Cc.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var vd=0;function Ub(e,t){return e.stylesheets&&e.count===0&&Tc(e,e.stylesheets),0vd?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(u)}}:null}function Cc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Tc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Nc=null;function Tc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Nc=new Map,t.forEach(Hb,e),Nc=null,Cc.call(e))}function Hb(e,t){if(!(t.state.loading&4)){var l=Nc.get(e);if(l)var s=l.get(null);else{l=new Map,Nc.set(e,l);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),Cd.exports=i0(),Cd.exports}var r0=s0();/** + * 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 Ch="popstate";function Nh(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function c0(n={}){function a(c,d){let{pathname:_="/",search:y="",hash:p=""}=Jl(c.location.hash.substring(1));return!_.startsWith("/")&&!_.startsWith(".")&&(_="/"+_),Xd("",{pathname:_,search:y,hash:p},d.state&&d.state.usr||null,d.state&&d.state.key||"default")}function i(c,d){let _=c.document.querySelector("base"),y="";if(_&&_.getAttribute("href")){let p=c.location.href,g=p.indexOf("#");y=g===-1?p:p.slice(0,g)}return y+"#"+(typeof d=="string"?d:_r(d))}function r(c,d){An(c.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(d)})`)}return u0(a,i,r,n)}function it(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function An(n,a){if(!n){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function o0(){return Math.random().toString(36).substring(2,10)}function Th(n,a){return{usr:n.state,key:n.key,idx:a,masked:n.mask?{pathname:n.pathname,search:n.search,hash:n.hash}:void 0}}function Xd(n,a,i=null,r,c){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof a=="string"?Jl(a):a,state:i,key:a&&a.key||r||o0(),mask:c}}function _r({pathname:n="/",search:a="",hash:i=""}){return a&&a!=="?"&&(n+=a.charAt(0)==="?"?a:"?"+a),i&&i!=="#"&&(n+=i.charAt(0)==="#"?i:"#"+i),n}function Jl(n){let a={};if(n){let i=n.indexOf("#");i>=0&&(a.hash=n.substring(i),n=n.substring(0,i));let r=n.indexOf("?");r>=0&&(a.search=n.substring(r),n=n.substring(0,r)),n&&(a.pathname=n)}return a}function u0(n,a,i,r={}){let{window:c=document.defaultView,v5Compat:d=!1}=r,_=c.history,y="POP",p=null,g=S();g==null&&(g=0,_.replaceState({..._.state,idx:g},""));function S(){return(_.state||{idx:null}).idx}function x(){y="POP";let T=S(),M=T==null?null:T-g;g=T,p&&p({action:y,location:D.location,delta:M})}function j(T,M){y="PUSH";let J=Nh(T)?T:Xd(D.location,T,M);i&&i(J,T),g=S()+1;let Q=Th(J,g),ae=D.createHref(J.mask||J);try{_.pushState(Q,"",ae)}catch(re){if(re instanceof DOMException&&re.name==="DataCloneError")throw re;c.location.assign(ae)}d&&p&&p({action:y,location:D.location,delta:1})}function R(T,M){y="REPLACE";let J=Nh(T)?T:Xd(D.location,T,M);i&&i(J,T),g=S();let Q=Th(J,g),ae=D.createHref(J.mask||J);_.replaceState(Q,"",ae),d&&p&&p({action:y,location:D.location,delta:0})}function A(T){return d0(c,T)}let D={get action(){return y},get location(){return n(c,_)},listen(T){if(p)throw new Error("A history only accepts one active listener");return c.addEventListener(Ch,x),p=T,()=>{c.removeEventListener(Ch,x),p=null}},createHref(T){return a(c,T)},createURL:A,encodeLocation(T){let M=A(T);return{pathname:M.pathname,search:M.search,hash:M.hash}},push:j,replace:R,go(T){return _.go(T)}};return D}function d0(n,a,i=!1){let r="http://localhost";n&&(r=n.location.origin!=="null"?n.location.origin:n.location.href),it(r,"No window.location.(origin|href) available to create URL");let c=typeof a=="string"?a:_r(a);return c=c.replace(/ $/,"%20"),!i&&c.startsWith("//")&&(c=r+c),new URL(c,r)}function Ag(n,a,i="/"){return f0(n,a,i,!1)}function f0(n,a,i,r,c){let d=typeof a=="string"?Jl(a):a,_=Ca(d.pathname||"/",i);if(_==null)return null;let y=m0(n),p=null,g=w0(_);for(let S=0;p==null&&S{let S={relativePath:g===void 0?_.path||"":g,caseSensitive:_.caseSensitive===!0,childrenIndex:y,route:_};if(S.relativePath.startsWith("/")){if(!S.relativePath.startsWith(r)&&p)return;it(S.relativePath.startsWith(r),`Absolute route path "${S.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),S.relativePath=S.relativePath.slice(r.length)}let x=Ln([r,S.relativePath]),j=i.concat(S);_.children&&_.children.length>0&&(it(_.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),Eg(_.children,a,j,x,p)),!(_.path==null&&!_.index)&&a.push({path:x,score:S0(x,_.index),routesMeta:j})};return n.forEach((_,y)=>{var p;if(_.path===""||!((p=_.path)!=null&&p.includes("?")))d(_,y);else for(let g of Cg(_.path))d(_,y,!0,g)}),a}function Cg(n){let a=n.split("/");if(a.length===0)return[];let[i,...r]=a,c=i.endsWith("?"),d=i.replace(/\?$/,"");if(r.length===0)return c?[d,""]:[d];let _=Cg(r.join("/")),y=[];return y.push(..._.map(p=>p===""?d:[d,p].join("/"))),c&&y.push(..._),y.map(p=>n.startsWith("/")&&p===""?"/":p)}function _0(n){n.sort((a,i)=>a.score!==i.score?i.score-a.score:x0(a.routesMeta.map(r=>r.childrenIndex),i.routesMeta.map(r=>r.childrenIndex)))}var p0=/^:[\w-]+$/,h0=3,g0=2,y0=1,v0=10,b0=-2,Dh=n=>n==="*";function S0(n,a){let i=n.split("/"),r=i.length;return i.some(Dh)&&(r+=b0),a&&(r+=g0),i.filter(c=>!Dh(c)).reduce((c,d)=>c+(p0.test(d)?h0:d===""?y0:v0),r)}function x0(n,a){return n.length===a.length&&n.slice(0,-1).every((r,c)=>r===a[c])?n[n.length-1]-a[a.length-1]:0}function k0(n,a,i=!1){let{routesMeta:r}=n,c={},d="/",_=[];for(let y=0;y{if(S==="*"){let A=y[j]||"";_=d.slice(0,d.length-A.length).replace(/(.)\/+$/,"$1")}const R=y[j];return x&&!R?g[S]=void 0:g[S]=(R||"").replace(/%2F/g,"/"),g},{}),pathname:d,pathnameBase:_,pattern:n}}function j0(n,a=!1,i=!0){An(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 r=[],c="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(_,y,p,g,S)=>{if(r.push({paramName:y,isOptional:p!=null}),p){let x=S.charAt(g+_.length);return x&&x!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(r.push({paramName:"*"}),c+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?c+="\\/*$":n!==""&&n!=="/"&&(c+="(?:(?=\\/|$))"),[new RegExp(c,a?void 0:"i"),r]}function w0(n){try{return n.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return An(!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 (${a}).`),n}}function Ca(n,a){if(a==="/")return n;if(!n.toLowerCase().startsWith(a.toLowerCase()))return null;let i=a.endsWith("/")?a.length-1:a.length,r=n.charAt(i);return r&&r!=="/"?null:n.slice(i)||"/"}var A0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function E0(n,a="/"){let{pathname:i,search:r="",hash:c=""}=typeof n=="string"?Jl(n):n,d;return i?(i=Ng(i),i.startsWith("/")?d=Rh(i.substring(1),"/"):d=Rh(i,a)):d=a,{pathname:d,search:T0(r),hash:D0(c)}}function Rh(n,a){let i=Fc(a).split("/");return n.split("/").forEach(c=>{c===".."?i.length>1&&i.pop():c!=="."&&i.push(c)}),i.length>1?i.join("/"):"/"}function Rd(n,a,i,r){return`Cannot include a '${n}' character in a manually specified \`to.${a}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function C0(n){return n.filter((a,i)=>i===0||a.route.path&&a.route.path.length>0)}function pf(n){let a=C0(n);return a.map((i,r)=>r===a.length-1?i.pathname:i.pathnameBase)}function co(n,a,i,r=!1){let c;typeof n=="string"?c=Jl(n):(c={...n},it(!c.pathname||!c.pathname.includes("?"),Rd("?","pathname","search",c)),it(!c.pathname||!c.pathname.includes("#"),Rd("#","pathname","hash",c)),it(!c.search||!c.search.includes("#"),Rd("#","search","hash",c)));let d=n===""||c.pathname==="",_=d?"/":c.pathname,y;if(_==null)y=i;else{let x=a.length-1;if(!r&&_.startsWith("..")){let j=_.split("/");for(;j[0]==="..";)j.shift(),x-=1;c.pathname=j.join("/")}y=x>=0?a[x]:"/"}let p=E0(c,y),g=_&&_!=="/"&&_.endsWith("/"),S=(d||_===".")&&i.endsWith("/");return!p.pathname.endsWith("/")&&(g||S)&&(p.pathname+="/"),p}var Ng=n=>n.replace(/\/\/+/g,"/"),Ln=n=>Ng(n.join("/")),Fc=n=>n.replace(/\/+$/,""),N0=n=>Fc(n).replace(/^\/*/,"/"),T0=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,D0=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,R0=class{constructor(n,a,i,r=!1){this.status=n,this.statusText=a||"",this.internal=r,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}};function $0(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function M0(n){let a=n.map(i=>i.route.path).filter(Boolean);return Ln(a)||"/"}var Tg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Dg(n,a){let i=n;if(typeof i!="string"||!A0.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let r=i,c=!1;if(Tg)try{let d=new URL(window.location.href),_=i.startsWith("//")?new URL(d.protocol+i):new URL(i),y=Ca(_.pathname,a);_.origin===d.origin&&y!=null?i=y+_.search+_.hash:c=!0}catch{An(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:c,to:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Rg=["POST","PUT","PATCH","DELETE"];new Set(Rg);var z0=["GET",...Rg];new Set(z0);var Fi=k.createContext(null);Fi.displayName="DataRouter";var oo=k.createContext(null);oo.displayName="DataRouterState";var $g=k.createContext(!1);function O0(){return k.useContext($g)}var Mg=k.createContext({isTransitioning:!1});Mg.displayName="ViewTransition";var q0=k.createContext(new Map);q0.displayName="Fetchers";var L0=k.createContext(null);L0.displayName="Await";var fn=k.createContext(null);fn.displayName="Navigation";var yr=k.createContext(null);yr.displayName="Location";var na=k.createContext({outlet:null,matches:[],isDataRoute:!1});na.displayName="Route";var hf=k.createContext(null);hf.displayName="RouteError";var zg="REACT_ROUTER_ERROR",B0="REDIRECT",U0="ROUTE_ERROR_RESPONSE";function H0(n){if(n.startsWith(`${zg}:${B0}:{`))try{let a=JSON.parse(n.slice(28));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string"&&typeof a.location=="string"&&typeof a.reloadDocument=="boolean"&&typeof a.replace=="boolean")return a}catch{}}function G0(n){if(n.startsWith(`${zg}:${U0}:{`))try{let a=JSON.parse(n.slice(40));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string")return new R0(a.status,a.statusText,a.data)}catch{}}function Y0(n,{relative:a}={}){it(Wi(),"useHref() may be used only in the context of a component.");let{basename:i,navigator:r}=k.useContext(fn),{hash:c,pathname:d,search:_}=vr(n,{relative:a}),y=d;return i!=="/"&&(y=d==="/"?i:Ln([i,d])),r.createHref({pathname:y,search:_,hash:c})}function Wi(){return k.useContext(yr)!=null}function Hn(){return it(Wi(),"useLocation() may be used only in the context of a component."),k.useContext(yr).location}var Og="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function qg(n){k.useContext(fn).static||k.useLayoutEffect(n)}function gf(){let{isDataRoute:n}=k.useContext(na);return n?nS():I0()}function I0(){it(Wi(),"useNavigate() may be used only in the context of a component.");let n=k.useContext(Fi),{basename:a,navigator:i}=k.useContext(fn),{matches:r}=k.useContext(na),{pathname:c}=Hn(),d=JSON.stringify(pf(r)),_=k.useRef(!1);return qg(()=>{_.current=!0}),k.useCallback((p,g={})=>{if(An(_.current,Og),!_.current)return;if(typeof p=="number"){i.go(p);return}let S=co(p,JSON.parse(d),c,g.relative==="path");n==null&&a!=="/"&&(S.pathname=S.pathname==="/"?a:Ln([a,S.pathname])),(g.replace?i.replace:i.push)(S,g.state,g)},[a,i,d,c,n])}k.createContext(null);function vr(n,{relative:a}={}){let{matches:i}=k.useContext(na),{pathname:r}=Hn(),c=JSON.stringify(pf(i));return k.useMemo(()=>co(n,JSON.parse(c),r,a==="path"),[n,c,r,a])}function K0(n,a){return Lg(n,a)}function Lg(n,a,i){var T;it(Wi(),"useRoutes() may be used only in the context of a component.");let{navigator:r}=k.useContext(fn),{matches:c}=k.useContext(na),d=c[c.length-1],_=d?d.params:{},y=d?d.pathname:"/",p=d?d.pathnameBase:"/",g=d&&d.route;{let M=g&&g.path||"";Ug(y,!g||M.endsWith("*")||M.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${y}" (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 S=Hn(),x;if(a){let M=typeof a=="string"?Jl(a):a;it(p==="/"||((T=M.pathname)==null?void 0:T.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 "${M.pathname}" was given in the \`location\` prop.`),x=M}else x=S;let j=x.pathname||"/",R=j;if(p!=="/"){let M=p.replace(/^\//,"").split("/");R="/"+j.replace(/^\//,"").split("/").slice(M.length).join("/")}let A=i&&i.state.matches.length?i.state.matches.map(M=>Object.assign(M,{route:i.manifest[M.route.id]||M.route})):Ag(n,{pathname:R});An(g||A!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),An(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 "${x.pathname}${x.search}${x.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 D=J0(A&&A.map(M=>Object.assign({},M,{params:Object.assign({},_,M.params),pathname:Ln([p,r.encodeLocation?r.encodeLocation(M.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathname]),pathnameBase:M.pathnameBase==="/"?p:Ln([p,r.encodeLocation?r.encodeLocation(M.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathnameBase])})),c,i);return a&&D?k.createElement(yr.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...x},navigationType:"POP"}},D):D}function Q0(){let n=tS(),a=$0(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),i=n instanceof Error?n.stack:null,r="rgba(200,200,200, 0.5)",c={padding:"0.5rem",backgroundColor:r},d={padding:"2px 4px",backgroundColor:r},_=null;return console.error("Error handled by React Router default ErrorBoundary:",n),_=k.createElement(k.Fragment,null,k.createElement("p",null,"💿 Hey developer 👋"),k.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",k.createElement("code",{style:d},"ErrorBoundary")," or"," ",k.createElement("code",{style:d},"errorElement")," prop on your route.")),k.createElement(k.Fragment,null,k.createElement("h2",null,"Unexpected Application Error!"),k.createElement("h3",{style:{fontStyle:"italic"}},a),i?k.createElement("pre",{style:c},i):null,_)}var V0=k.createElement(Q0,null),Bg=class extends k.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,a){return a.location!==n.location||a.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:a.error,location:a.location,revalidation:n.revalidation||a.revalidation}}componentDidCatch(n,a){this.props.onError?this.props.onError(n,a):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 i=G0(n.digest);i&&(n=i)}let a=n!==void 0?k.createElement(na.Provider,{value:this.props.routeContext},k.createElement(hf.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?k.createElement(X0,{error:n},a):a}};Bg.contextType=$g;var $d=new WeakMap;function X0({children:n,error:a}){let{basename:i}=k.useContext(fn);if(typeof a=="object"&&a&&"digest"in a&&typeof a.digest=="string"){let r=H0(a.digest);if(r){let c=$d.get(a);if(c)throw c;let d=Dg(r.location,i);if(Tg&&!$d.get(a))if(d.isExternal||r.reloadDocument)window.location.href=d.absoluteURL||d.to;else{const _=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(d.to,{replace:r.replace}));throw $d.set(a,_),_}return k.createElement("meta",{httpEquiv:"refresh",content:`0;url=${d.absoluteURL||d.to}`})}}return n}function Z0({routeContext:n,match:a,children:i}){let r=k.useContext(Fi);return r&&r.static&&r.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=a.route.id),k.createElement(na.Provider,{value:n},i)}function J0(n,a=[],i){let r=i==null?void 0:i.state;if(n==null){if(!r)return null;if(r.errors)n=r.matches;else if(a.length===0&&!r.initialized&&r.matches.length>0)n=r.matches;else return null}let c=n,d=r==null?void 0:r.errors;if(d!=null){let S=c.findIndex(x=>x.route.id&&(d==null?void 0:d[x.route.id])!==void 0);it(S>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).join(",")}`),c=c.slice(0,Math.min(c.length,S+1))}let _=!1,y=-1;if(i&&r){_=r.renderFallback;for(let S=0;S=0?c=c.slice(0,y+1):c=[c[0]];break}}}}let p=i==null?void 0:i.onError,g=r&&p?(S,x)=>{var j,R;p(S,{location:r.location,params:((R=(j=r.matches)==null?void 0:j[0])==null?void 0:R.params)??{},pattern:M0(r.matches),errorInfo:x})}:void 0;return c.reduceRight((S,x,j)=>{let R,A=!1,D=null,T=null;r&&(R=d&&x.route.id?d[x.route.id]:void 0,D=x.route.errorElement||V0,_&&(y<0&&j===0?(Ug("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),A=!0,T=null):y===j&&(A=!0,T=x.route.hydrateFallbackElement||null)));let M=a.concat(c.slice(0,j+1)),J=()=>{let Q;return R?Q=D:A?Q=T:x.route.Component?Q=k.createElement(x.route.Component,null):x.route.element?Q=x.route.element:Q=S,k.createElement(Z0,{match:x,routeContext:{outlet:S,matches:M,isDataRoute:r!=null},children:Q})};return r&&(x.route.ErrorBoundary||x.route.errorElement||j===0)?k.createElement(Bg,{location:r.location,revalidation:r.revalidation,component:D,error:R,children:J(),routeContext:{outlet:null,matches:M,isDataRoute:!0},onError:g}):J()},null)}function yf(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function F0(n){let a=k.useContext(Fi);return it(a,yf(n)),a}function W0(n){let a=k.useContext(oo);return it(a,yf(n)),a}function P0(n){let a=k.useContext(na);return it(a,yf(n)),a}function vf(n){let a=P0(n),i=a.matches[a.matches.length-1];return it(i.route.id,`${n} can only be used on routes that contain a unique "id"`),i.route.id}function eS(){return vf("useRouteId")}function tS(){var r;let n=k.useContext(hf),a=W0("useRouteError"),i=vf("useRouteError");return n!==void 0?n:(r=a.errors)==null?void 0:r[i]}function nS(){let{router:n}=F0("useNavigate"),a=vf("useNavigate"),i=k.useRef(!1);return qg(()=>{i.current=!0}),k.useCallback(async(c,d={})=>{An(i.current,Og),i.current&&(typeof c=="number"?await n.navigate(c):await n.navigate(c,{fromRouteId:a,...d}))},[n,a])}var $h={};function Ug(n,a,i){!a&&!$h[n]&&($h[n]=!0,An(!1,i))}k.memo(aS);function aS({routes:n,manifest:a,future:i,state:r,isStatic:c,onError:d}){return Lg(n,void 0,{manifest:a,state:r,isStatic:c,onError:d})}function lS({to:n,replace:a,state:i,relative:r}){it(Wi()," may be used only in the context of a component.");let{static:c}=k.useContext(fn);An(!c," 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:d}=k.useContext(na),{pathname:_}=Hn(),y=gf(),p=co(n,pf(d),_,r==="path"),g=JSON.stringify(p);return k.useEffect(()=>{y(JSON.parse(g),{replace:a,state:i,relative:r})},[y,g,r,a,i]),null}function Zd(n){it(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function iS({basename:n="/",children:a=null,location:i,navigationType:r="POP",navigator:c,static:d=!1,useTransitions:_}){it(!Wi(),"You cannot render a inside another . You should never have more than one in your app.");let y=n.replace(/^\/*/,"/"),p=k.useMemo(()=>({basename:y,navigator:c,static:d,useTransitions:_,future:{}}),[y,c,d,_]);typeof i=="string"&&(i=Jl(i));let{pathname:g="/",search:S="",hash:x="",state:j=null,key:R="default",mask:A}=i,D=k.useMemo(()=>{let T=Ca(g,y);return T==null?null:{location:{pathname:T,search:S,hash:x,state:j,key:R,mask:A},navigationType:r}},[y,g,S,x,j,R,r,A]);return An(D!=null,` is not able to match the URL "${g}${S}${x}" because it does not start with the basename, so the won't render anything.`),D==null?null:k.createElement(fn.Provider,{value:p},k.createElement(yr.Provider,{children:a,value:D}))}function sS({children:n,location:a}){return K0(Jd(n),a)}function Jd(n,a=[]){let i=[];return k.Children.forEach(n,(r,c)=>{if(!k.isValidElement(r))return;let d=[...a,c];if(r.type===k.Fragment){i.push.apply(i,Jd(r.props.children,d));return}it(r.type===Zd,`[${typeof r.type=="string"?r.type:r.type.name}] is not a component. All component children of must be a or `),it(!r.props.index||!r.props.children,"An index route cannot have child routes.");let _={id:r.props.id||d.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(_.children=Jd(r.props.children,d)),i.push(_)}),i}var Ic="get",Kc="application/x-www-form-urlencoded";function uo(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function rS(n){return uo(n)&&n.tagName.toLowerCase()==="button"}function cS(n){return uo(n)&&n.tagName.toLowerCase()==="form"}function oS(n){return uo(n)&&n.tagName.toLowerCase()==="input"}function uS(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function dS(n,a){return n.button===0&&(!a||a==="_self")&&!uS(n)}var Lc=null;function fS(){if(Lc===null)try{new FormData(document.createElement("form"),0),Lc=!1}catch{Lc=!0}return Lc}var mS=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Md(n){return n!=null&&!mS.has(n)?(An(!1,`"${n}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${Kc}"`),null):n}function _S(n,a){let i,r,c,d,_;if(cS(n)){let y=n.getAttribute("action");r=y?Ca(y,a):null,i=n.getAttribute("method")||Ic,c=Md(n.getAttribute("enctype"))||Kc,d=new FormData(n)}else if(rS(n)||oS(n)&&(n.type==="submit"||n.type==="image")){let y=n.form;if(y==null)throw new Error('Cannot submit a