@mcp-use/inspector 12.0.4-canary.1 → 20.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -6
- package/dist/cdn/AnimatePresence-B4HhIdgq.js +393 -0
- package/dist/cdn/ChatTab-5ya_YTFV.js +13218 -0
- package/dist/cdn/CheckboxIndicator-BF2cKfbA.js +251 -0
- package/dist/cdn/ConnectionSettingsForm-iwNW86ZU.js +873 -0
- package/dist/cdn/ConnectionSettingsTab-CeK83dxn.js +145 -0
- package/dist/cdn/ElicitationTab-upPXq2q7.js +654 -0
- package/dist/cdn/FormContext-Cl51-7O7.js +135 -0
- package/dist/cdn/InspectorContext-DzXtgyTx.js +143 -0
- package/dist/cdn/JSONDisplay-D3RcyO9z.js +324 -0
- package/dist/cdn/ListTabHeader-8lULn-90.js +88 -0
- package/dist/cdn/ManufactOAuthCallback-DEM8mhWD.js +31 -0
- package/dist/cdn/NotificationsTab-CWopTIzT.js +290 -0
- package/dist/cdn/OAuthCallback-BxuOVgdb.js +58 -0
- package/dist/cdn/PromptsTab-Cspfnl6n.js +4400 -0
- package/dist/cdn/ResourcesTab-BczUMFil.js +584 -0
- package/dist/cdn/SamplingTab-6u5s845G.js +658 -0
- package/dist/cdn/ServerMetadataTab-DS0eiyyD.js +244 -0
- package/dist/cdn/StatusIcon-BGXOEU2u.js +66 -0
- package/dist/cdn/ToolsTab-CUhwP4rZ.js +2067 -0
- package/dist/cdn/ViewPreview-CxJc1Kht.js +237 -0
- package/dist/cdn/WidgetDebugContext-D4usL_MA.js +324 -0
- package/dist/cdn/WidgetWrapper-BJJtLqMb.js +2211 -0
- package/dist/cdn/apple-touch-icon.png +0 -0
- package/dist/cdn/basePath-B8HuhIMu.js +25 -0
- package/dist/cdn/bell-CGjAO_0s.js +10 -0
- package/dist/cdn/browser-CbQIH4w2.js +42 -0
- package/dist/cdn/brush-B_mKhyxG.js +17 -0
- package/dist/cdn/bundle-mjs-B0nmHDtp.js +1953 -0
- package/dist/cdn/card-DqjqAq0o.js +41 -0
- package/dist/cdn/cfWorker-Bxcs9rNe.js +10799 -0
- package/dist/cdn/checkbox-B4oUG6Rr.js +20 -0
- package/dist/cdn/chunk-BO2N2NFS-Cy167e0X.js +17500 -0
- package/dist/cdn/chunk-QUQL4437-XnDcYQEx.js +1508 -0
- package/dist/cdn/clock-CmUbSx_B.js +12 -0
- package/dist/cdn/code-V_0nf5rg.js +10 -0
- package/dist/cdn/createLucideIcon-C5fZZ6oB.js +38 -0
- package/dist/cdn/dialog-Dnl-pZsY.js +1028 -0
- package/dist/cdn/dist-DjXr_YO3.js +616 -0
- package/dist/cdn/dist-mRDqCgKU.js +2305 -0
- package/dist/cdn/external-link-CjmfT6rW.js +17 -0
- package/dist/cdn/eye-B7H96av8.js +29 -0
- package/dist/cdn/favicon-96x96.png +0 -0
- package/dist/cdn/favicon-black.svg +5 -8
- package/dist/cdn/favicon-white.svg +4 -7
- package/dist/cdn/favicon.ico +0 -0
- package/dist/cdn/favicon.svg +5 -0
- package/dist/cdn/folder-open-B3lu2rG_.js +7 -0
- package/dist/cdn/hash-BVQnWi7q.js +33 -0
- package/dist/cdn/highlighted-body-OFNGDK62-CoReNbTX.js +36 -0
- package/dist/cdn/history-Csw4rb44.js +17 -0
- package/dist/cdn/index-browser-CVUwR-Bu.js +1934 -0
- package/dist/cdn/info-CNiOwqkf.js +19 -0
- package/dist/cdn/input-BLxOA7V-.js +10215 -0
- package/dist/cdn/inspector-settings-layout-0VDsjeqb.js +4 -0
- package/dist/cdn/inspector.css +1 -2
- package/dist/cdn/inspector.js +10854 -133726
- package/dist/cdn/jsx-runtime-CIxvMpEo.js +180 -0
- package/dist/cdn/label-CBvG613A.js +60 -0
- package/dist/cdn/loader-circle-BLy9A_pp.js +7 -0
- package/dist/cdn/manufact-auth-0TVxpeTA.js +387 -0
- package/dist/cdn/maximize-2-CH5Lq90B.js +21 -0
- package/dist/cdn/maximize-BALCV_ep.js +21 -0
- package/dist/cdn/mermaid-GHXKKRXX-DgVIbk-D.js +2 -0
- package/dist/cdn/message-square-BnxdpJxZ.js +7 -0
- package/dist/cdn/not-found-BcNNsTjS.js +34 -0
- package/dist/cdn/pdf-CxFT9FER.js +16291 -0
- package/dist/cdn/play-vuZ5PLnI.js +7 -0
- package/dist/cdn/popover-C_SSrXT0.js +2005 -0
- package/dist/cdn/react-BIs9pQ3H.js +926 -0
- package/dist/cdn/react-yUi9mVK4.js +5411 -0
- package/dist/cdn/refresh-cw-BXY-Pa0U.js +21 -0
- package/dist/cdn/save-Tgil_AJZ.js +34 -0
- package/dist/cdn/schemaHelpers-DTV38jGq.js +16 -0
- package/dist/cdn/select-BZ_IoKxg.js +2594 -0
- package/dist/cdn/servers-Dm72iTpY.js +26 -0
- package/dist/cdn/shared-uMiV6Fx1.js +1700 -0
- package/dist/cdn/sheet-CerCdhxz.js +78 -0
- package/dist/cdn/site.webmanifest +21 -0
- package/dist/cdn/sparkles-BntO2rDR.js +23 -0
- package/dist/cdn/spinner-CWcJhIY_.js +15 -0
- package/dist/cdn/square-check-big-BvwQ17Bl.js +10 -0
- package/dist/cdn/switch-DtQOLb9R.js +664 -0
- package/dist/cdn/tabs-subtle-C5cy35sY.js +787 -0
- package/dist/cdn/telemetry-Ct6pVkM1.js +240 -0
- package/dist/cdn/textarea-Bj-CT7hC.js +14 -0
- package/dist/cdn/trash-2-RwpJY5SL.js +25 -0
- package/dist/cdn/useAriaLabelledBy-Bm9qHGK6.js +29 -0
- package/dist/cdn/useCompositeItem-CNJ6MXdi.js +26 -0
- package/dist/cdn/useConfig-CwxZ6Quj.js +208 -0
- package/dist/cdn/useHostedSession-BA39Aegc.js +153 -0
- package/dist/cdn/useMCPPrompts-D3_Hla_z.js +104 -0
- package/dist/cdn/useSavedRequests-Ci2I919u.js +51 -0
- package/dist/cdn/useViewHostProps-C7vjco2m.js +348 -0
- package/dist/cdn/web-app-manifest-192x192.png +0 -0
- package/dist/cdn/web-app-manifest-512x512.png +0 -0
- package/dist/cdn/wrench-DzGmCfnb.js +7 -0
- package/dist/cdn/x-C3vRQIYu.js +10 -0
- package/dist/cdn/zap-Mb-pbw2X.js +10 -0
- package/dist/cli.js +1060 -3601
- package/dist/client/auth/manufact-auth.d.ts +30 -0
- package/dist/client/auth/manufact-auth.d.ts.map +1 -0
- package/dist/client/chat-history/ChatHistoryHeader.d.ts +4 -0
- package/dist/client/chat-history/ChatHistoryHeader.d.ts.map +1 -0
- package/dist/client/chat-history/ChatHistoryPanel.d.ts +28 -0
- package/dist/client/chat-history/ChatHistoryPanel.d.ts.map +1 -0
- package/dist/client/chat-history/ChatHistoryRail.d.ts +5 -0
- package/dist/client/chat-history/ChatHistoryRail.d.ts.map +1 -0
- package/dist/client/chat-history/ChatList.d.ts +18 -0
- package/dist/client/chat-history/ChatList.d.ts.map +1 -0
- package/dist/client/chat-history/ChatTitleReveal.d.ts +10 -0
- package/dist/client/chat-history/ChatTitleReveal.d.ts.map +1 -0
- package/dist/client/chat-history/chat-events-to-inspector-messages.d.ts +13 -0
- package/dist/client/chat-history/chat-events-to-inspector-messages.d.ts.map +1 -0
- package/dist/client/chat-history/chat-title.d.ts +10 -0
- package/dist/client/chat-history/chat-title.d.ts.map +1 -0
- package/dist/client/chat-history/providers/local-storage.d.ts +21 -0
- package/dist/client/chat-history/providers/local-storage.d.ts.map +1 -0
- package/dist/client/chat-history/types.d.ts +39 -0
- package/dist/client/chat-history/types.d.ts.map +1 -0
- package/dist/client/chat-history/useChatHistory.d.ts +20 -0
- package/dist/client/chat-history/useChatHistory.d.ts.map +1 -0
- package/dist/client/chat-history/useChatTitleGeneration.d.ts +17 -0
- package/dist/client/chat-history/useChatTitleGeneration.d.ts.map +1 -0
- package/dist/client/components/AddToClientDropdown.d.ts.map +1 -1
- package/dist/client/components/ChatTab.d.ts +28 -3
- package/dist/client/components/ChatTab.d.ts.map +1 -1
- package/dist/client/components/IframeConsole.d.ts.map +1 -1
- package/dist/client/components/MCPAppsDebugControls.d.ts +2 -18
- package/dist/client/components/MCPAppsDebugControls.d.ts.map +1 -1
- package/dist/client/components/PromptsTab.d.ts +1 -1
- package/dist/client/components/PromptsTab.d.ts.map +1 -1
- package/dist/client/components/ResourcesTab.d.ts +1 -1
- package/dist/client/components/ResourcesTab.d.ts.map +1 -1
- package/dist/client/components/ToolsTab.d.ts +3 -3
- package/dist/client/components/ToolsTab.d.ts.map +1 -1
- package/dist/client/components/chat/AssistantMessage.d.ts +2 -1
- package/dist/client/components/chat/AssistantMessage.d.ts.map +1 -1
- package/dist/client/components/chat/ChatHeader.d.ts +20 -2
- package/dist/client/components/chat/ChatHeader.d.ts.map +1 -1
- package/dist/client/components/chat/ChatInput.d.ts +6 -2
- package/dist/client/components/chat/ChatInput.d.ts.map +1 -1
- package/dist/client/components/chat/ChatInputArea.d.ts +31 -3
- package/dist/client/components/chat/ChatInputArea.d.ts.map +1 -1
- package/dist/client/components/chat/ChatLandingForm.d.ts +5 -42
- package/dist/client/components/chat/ChatLandingForm.d.ts.map +1 -1
- package/dist/client/components/chat/ChatScrollToBottomButton.d.ts +7 -0
- package/dist/client/components/chat/ChatScrollToBottomButton.d.ts.map +1 -0
- package/dist/client/components/chat/ChatTraceView.d.ts +7 -0
- package/dist/client/components/chat/ChatTraceView.d.ts.map +1 -0
- package/dist/client/components/chat/ConfigurationDialog.d.ts +12 -2
- package/dist/client/components/chat/ConfigurationDialog.d.ts.map +1 -1
- package/dist/client/components/chat/ConfigureEmptyState.d.ts +2 -5
- package/dist/client/components/chat/ConfigureEmptyState.d.ts.map +1 -1
- package/dist/client/components/chat/CopyButton.d.ts.map +1 -1
- package/dist/client/components/chat/FloatingChatElicitation.d.ts +10 -0
- package/dist/client/components/chat/FloatingChatElicitation.d.ts.map +1 -0
- package/dist/client/components/chat/MessageList.d.ts +6 -11
- package/dist/client/components/chat/MessageList.d.ts.map +1 -1
- package/dist/client/components/chat/MessageMetaActions.d.ts +7 -0
- package/dist/client/components/chat/MessageMetaActions.d.ts.map +1 -0
- package/dist/client/components/chat/PromptsDropdown.d.ts +1 -1
- package/dist/client/components/chat/PromptsDropdown.d.ts.map +1 -1
- package/dist/client/components/chat/StreamingAssistantContent.d.ts +7 -0
- package/dist/client/components/chat/StreamingAssistantContent.d.ts.map +1 -0
- package/dist/client/components/chat/SystemPromptButton.d.ts +11 -0
- package/dist/client/components/chat/SystemPromptButton.d.ts.map +1 -0
- package/dist/client/components/chat/ToolCallDisplay.d.ts.map +1 -1
- package/dist/client/components/chat/ToolResultRenderer.d.ts +2 -9
- package/dist/client/components/chat/ToolResultRenderer.d.ts.map +1 -1
- package/dist/client/components/chat/ToolSelector.d.ts.map +1 -1
- package/dist/client/components/chat/UserMessage.d.ts +2 -1
- package/dist/client/components/chat/UserMessage.d.ts.map +1 -1
- package/dist/client/components/chat/chat-bar-styles.d.ts +6 -0
- package/dist/client/components/chat/chat-bar-styles.d.ts.map +1 -0
- package/dist/client/components/chat/conversion.d.ts +1 -1
- package/dist/client/components/chat/conversion.d.ts.map +1 -1
- package/dist/client/components/chat/freeTier.d.ts +11 -0
- package/dist/client/components/chat/freeTier.d.ts.map +1 -1
- package/dist/client/components/chat/providerMeta.d.ts +10 -1
- package/dist/client/components/chat/providerMeta.d.ts.map +1 -1
- package/dist/client/components/chat/streamdown-code-slim.d.ts +4 -0
- package/dist/client/components/chat/streamdown-code-slim.d.ts.map +1 -0
- package/dist/client/components/chat/system-prompt/local-storage.d.ts +5 -0
- package/dist/client/components/chat/system-prompt/local-storage.d.ts.map +1 -0
- package/dist/client/components/chat/system-prompt/types.d.ts +8 -0
- package/dist/client/components/chat/system-prompt/types.d.ts.map +1 -0
- package/dist/client/components/chat/system-prompt/useLocalSystemPrompt.d.ts +3 -0
- package/dist/client/components/chat/system-prompt/useLocalSystemPrompt.d.ts.map +1 -0
- package/dist/client/components/chat/system-prompt-default.d.ts +2 -0
- package/dist/client/components/chat/system-prompt-default.d.ts.map +1 -0
- package/dist/client/components/chat/trace.d.ts +84 -0
- package/dist/client/components/chat/trace.d.ts.map +1 -0
- package/dist/client/components/chat/types.d.ts +2 -1
- package/dist/client/components/chat/types.d.ts.map +1 -1
- package/dist/client/components/chat/useChatMessages.d.ts +4 -0
- package/dist/client/components/chat/useChatMessages.d.ts.map +1 -1
- package/dist/client/components/chat/useChatMessagesClientSide.d.ts +14 -2
- package/dist/client/components/chat/useChatMessagesClientSide.d.ts.map +1 -1
- package/dist/client/components/chat/useChatScrollToBottom.d.ts +13 -0
- package/dist/client/components/chat/useChatScrollToBottom.d.ts.map +1 -0
- package/dist/client/components/chat/useConfig.d.ts +2 -2
- package/dist/client/components/chat/useConfig.d.ts.map +1 -1
- package/dist/client/components/chat/useHostedChatMode.d.ts +14 -0
- package/dist/client/components/chat/useHostedChatMode.d.ts.map +1 -0
- package/dist/client/components/chat/useManagedCloudModel.d.ts +14 -0
- package/dist/client/components/chat/useManagedCloudModel.d.ts.map +1 -0
- package/dist/client/components/chat/utils.d.ts +0 -4
- package/dist/client/components/chat/utils.d.ts.map +1 -1
- package/dist/client/components/elicitation/shared/ElicitationAskUserPanel.d.ts +12 -0
- package/dist/client/components/elicitation/shared/ElicitationAskUserPanel.d.ts.map +1 -0
- package/dist/client/components/elicitation/shared/elicitationToAskUserQuestions.d.ts +9 -0
- package/dist/client/components/elicitation/shared/elicitationToAskUserQuestions.d.ts.map +1 -0
- package/dist/client/components/prompts/PromptExecutionPanel.d.ts +1 -1
- package/dist/client/components/prompts/PromptExecutionPanel.d.ts.map +1 -1
- package/dist/client/components/prompts/PromptInputForm.d.ts +1 -1
- package/dist/client/components/prompts/PromptInputForm.d.ts.map +1 -1
- package/dist/client/components/prompts/PromptResultDisplay.d.ts +1 -1
- package/dist/client/components/prompts/PromptResultDisplay.d.ts.map +1 -1
- package/dist/client/components/prompts/PromptsList.d.ts +1 -1
- package/dist/client/components/prompts/PromptsList.d.ts.map +1 -1
- package/dist/client/components/prompts/SavedPromptsList.d.ts.map +1 -1
- package/dist/client/components/resources/PropsConfigDialog.d.ts +1 -1
- package/dist/client/components/resources/PropsConfigDialog.d.ts.map +1 -1
- package/dist/client/components/resources/ResourceResultDisplay.d.ts +1 -1
- package/dist/client/components/resources/ResourceResultDisplay.d.ts.map +1 -1
- package/dist/client/components/resources/ResourcesList.d.ts +1 -1
- package/dist/client/components/resources/ResourcesList.d.ts.map +1 -1
- package/dist/client/components/shared/CollapsibleJSON.d.ts +6 -0
- package/dist/client/components/shared/CollapsibleJSON.d.ts.map +1 -0
- package/dist/client/components/shared/InspectorScrollArea.d.ts +9 -0
- package/dist/client/components/shared/InspectorScrollArea.d.ts.map +1 -0
- package/dist/client/components/shared/JSONDisplay.d.ts +5 -1
- package/dist/client/components/shared/JSONDisplay.d.ts.map +1 -1
- package/dist/client/components/shared/ListItem.d.ts +1 -3
- package/dist/client/components/shared/ListItem.d.ts.map +1 -1
- package/dist/client/components/shared/ListTabHeader.d.ts +4 -1
- package/dist/client/components/shared/ListTabHeader.d.ts.map +1 -1
- package/dist/client/components/shared/MarkdownRenderer.d.ts.map +1 -1
- package/dist/client/components/shared/SearchTabHeader.d.ts +28 -0
- package/dist/client/components/shared/SearchTabHeader.d.ts.map +1 -0
- package/dist/client/components/shared/StatusIcon.d.ts +12 -0
- package/dist/client/components/shared/StatusIcon.d.ts.map +1 -0
- package/dist/client/components/shared/index.d.ts +4 -1
- package/dist/client/components/shared/index.d.ts.map +1 -1
- package/dist/client/components/tools/SavedRequestsList.d.ts.map +1 -1
- package/dist/client/components/tools/ToolExecutionPanel.d.ts +1 -1
- package/dist/client/components/tools/ToolExecutionPanel.d.ts.map +1 -1
- package/dist/client/components/tools/ToolInputForm.d.ts +1 -1
- package/dist/client/components/tools/ToolInputForm.d.ts.map +1 -1
- package/dist/client/components/tools/ToolResultDisplay.d.ts +0 -6
- package/dist/client/components/tools/ToolResultDisplay.d.ts.map +1 -1
- package/dist/client/components/tools/ToolsList.d.ts +1 -1
- package/dist/client/components/tools/ToolsList.d.ts.map +1 -1
- package/dist/client/components/tools/useToolExecution.d.ts +26 -0
- package/dist/client/components/tools/useToolExecution.d.ts.map +1 -0
- package/dist/client/components/tools/useToolsTabNavigation.d.ts +35 -0
- package/dist/client/components/tools/useToolsTabNavigation.d.ts.map +1 -0
- package/dist/client/components/ui/WidgetWrapper.d.ts +2 -2
- package/dist/client/components/ui/WidgetWrapper.d.ts.map +1 -1
- package/dist/client/components/ui/alert-dialog.d.ts +8 -5
- package/dist/client/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/client/components/ui/ask-user-questions.d.ts +80 -0
- package/dist/client/components/ui/ask-user-questions.d.ts.map +1 -0
- package/dist/client/components/ui/badge.d.ts +32 -7
- package/dist/client/components/ui/badge.d.ts.map +1 -1
- package/dist/client/components/ui/button.d.ts +31 -11
- package/dist/client/components/ui/button.d.ts.map +1 -1
- package/dist/client/components/ui/chat-message.d.ts +23 -0
- package/dist/client/components/ui/chat-message.d.ts.map +1 -0
- package/dist/client/components/ui/checkbox.d.ts +2 -3
- package/dist/client/components/ui/checkbox.d.ts.map +1 -1
- package/dist/client/components/ui/client-icons.d.ts +0 -4
- package/dist/client/components/ui/client-icons.d.ts.map +1 -1
- package/dist/client/components/ui/command.d.ts +13 -64
- package/dist/client/components/ui/command.d.ts.map +1 -1
- package/dist/client/components/ui/dialog.d.ts +36 -12
- package/dist/client/components/ui/dialog.d.ts.map +1 -1
- package/dist/client/components/ui/dropdown-menu.d.ts +17 -48
- package/dist/client/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/client/components/ui/dropdown.d.ts +30 -0
- package/dist/client/components/ui/dropdown.d.ts.map +1 -0
- package/dist/client/components/ui/file-thumbnail.d.ts +9 -0
- package/dist/client/components/ui/file-thumbnail.d.ts.map +1 -0
- package/dist/client/components/ui/label.d.ts +1 -2
- package/dist/client/components/ui/label.d.ts.map +1 -1
- package/dist/client/components/ui/menu-item.d.ts +52 -0
- package/dist/client/components/ui/menu-item.d.ts.map +1 -0
- package/dist/client/components/ui/mesh-tab-background.d.ts +10 -0
- package/dist/client/components/ui/mesh-tab-background.d.ts.map +1 -0
- package/dist/client/components/ui/not-found.d.ts.map +1 -1
- package/dist/client/components/ui/popover.d.ts +4 -5
- package/dist/client/components/ui/popover.d.ts.map +1 -1
- package/dist/client/components/ui/scroll-area.d.ts +4 -0
- package/dist/client/components/ui/scroll-area.d.ts.map +1 -0
- package/dist/client/components/ui/select.d.ts +50 -9
- package/dist/client/components/ui/select.d.ts.map +1 -1
- package/dist/client/components/ui/sheet.d.ts +9 -7
- package/dist/client/components/ui/sheet.d.ts.map +1 -1
- package/dist/client/components/ui/skeleton.d.ts +4 -0
- package/dist/client/components/ui/skeleton.d.ts.map +1 -0
- package/dist/client/components/ui/spinner.d.ts +1 -1
- package/dist/client/components/ui/spinner.d.ts.map +1 -1
- package/dist/client/components/ui/switch.d.ts +19 -7
- package/dist/client/components/ui/switch.d.ts.map +1 -1
- package/dist/client/components/ui/tabs-subtle.d.ts +25 -0
- package/dist/client/components/ui/tabs-subtle.d.ts.map +1 -0
- package/dist/client/components/ui/tooltip.d.ts +41 -6
- package/dist/client/components/ui/tooltip.d.ts.map +1 -1
- package/dist/client/context/InspectorContext.d.ts +6 -10
- package/dist/client/context/InspectorContext.d.ts.map +1 -1
- package/dist/client/context/WidgetDebugContext.d.ts +2 -3
- package/dist/client/context/WidgetDebugContext.d.ts.map +1 -1
- package/dist/client/hooks/use-merge-split.d.ts +36 -0
- package/dist/client/hooks/use-merge-split.d.ts.map +1 -0
- package/dist/client/hooks/use-proximity-hover-index.d.ts +27 -0
- package/dist/client/hooks/use-proximity-hover-index.d.ts.map +1 -0
- package/dist/client/hooks/use-proximity-hover.d.ts +26 -0
- package/dist/client/hooks/use-proximity-hover.d.ts.map +1 -0
- package/dist/client/hooks/use-touch-primary.d.ts +2 -0
- package/dist/client/hooks/use-touch-primary.d.ts.map +1 -0
- package/dist/client/hooks/useHostedSession.d.ts +4 -14
- package/dist/client/hooks/useHostedSession.d.ts.map +1 -1
- package/dist/client/hooks/useMCPPrompts.d.ts +1 -1
- package/dist/client/hooks/useMCPPrompts.d.ts.map +1 -1
- package/dist/client/hooks/useMcpAppsHostContext.d.ts +2 -2
- package/dist/client/hooks/useMcpAppsHostContext.d.ts.map +1 -1
- package/dist/client/hooks/usePropsLLM.d.ts +1 -1
- package/dist/client/hooks/usePropsLLM.d.ts.map +1 -1
- package/dist/client/hooks/useSavedRequests.d.ts +6 -0
- package/dist/client/hooks/useSavedRequests.d.ts.map +1 -0
- package/dist/client/hooks/useViewHostProps.d.ts +19 -0
- package/dist/client/hooks/useViewHostProps.d.ts.map +1 -0
- package/dist/client/index.d.ts +19 -2
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +19306 -16141
- package/dist/client/lib/elevated.d.ts +28 -0
- package/dist/client/lib/elevated.d.ts.map +1 -0
- package/dist/client/lib/font-weight.d.ts +10 -0
- package/dist/client/lib/font-weight.d.ts.map +1 -0
- package/dist/client/lib/icon-context.d.ts +15 -0
- package/dist/client/lib/icon-context.d.ts.map +1 -0
- package/dist/client/lib/shape-context.d.ts +21 -0
- package/dist/client/lib/shape-context.d.ts.map +1 -0
- package/dist/client/lib/springs.d.ts +32 -0
- package/dist/client/lib/springs.d.ts.map +1 -0
- package/dist/client/lib/surface-classes.d.ts +2 -0
- package/dist/client/lib/surface-classes.d.ts.map +1 -0
- package/dist/client/lib/surface-context.d.ts +7 -0
- package/dist/client/lib/surface-context.d.ts.map +1 -0
- package/dist/client/lib/utils.d.ts +1 -1
- package/dist/client/lib/utils.d.ts.map +1 -1
- package/dist/client/mcp-apps/csp.d.ts +26 -0
- package/dist/client/mcp-apps/csp.d.ts.map +1 -0
- package/dist/client/mcp-apps/debug/csp-suggestions.d.ts +17 -0
- package/dist/client/mcp-apps/debug/csp-suggestions.d.ts.map +1 -0
- package/dist/client/mcp-apps/logging-transport.d.ts +13 -0
- package/dist/client/mcp-apps/logging-transport.d.ts.map +1 -0
- package/dist/client/rpc-traffic-coalesce.d.ts +7 -0
- package/dist/client/rpc-traffic-coalesce.d.ts.map +1 -0
- package/dist/client/rpc-traffic-store.d.ts +37 -0
- package/dist/client/rpc-traffic-store.d.ts.map +1 -0
- package/dist/client/telemetry/capture.d.ts +7 -0
- package/dist/client/telemetry/capture.d.ts.map +1 -0
- package/dist/client/telemetry/events.d.ts +1 -1
- package/dist/client/telemetry/events.d.ts.map +1 -1
- package/dist/client/telemetry/index.d.ts +2 -1
- package/dist/client/telemetry/index.d.ts.map +1 -1
- package/dist/client/telemetry/init.d.ts +2 -0
- package/dist/client/telemetry/init.d.ts.map +1 -0
- package/dist/client/telemetry/utils.d.ts +5 -0
- package/dist/client/telemetry/utils.d.ts.map +1 -1
- package/dist/client/types/message-content-block.d.ts +19 -0
- package/dist/client/types/message-content-block.d.ts.map +1 -0
- package/dist/client/types/pending-requests.d.ts +17 -0
- package/dist/client/types/pending-requests.d.ts.map +1 -0
- package/dist/client/utils/basePath.d.ts +34 -0
- package/dist/client/utils/basePath.d.ts.map +1 -0
- package/dist/client/utils/browser.d.ts +5 -0
- package/dist/client/utils/browser.d.ts.map +1 -0
- package/dist/client/utils/format.d.ts +4 -0
- package/dist/client/utils/format.d.ts.map +1 -0
- package/dist/client/utils/highlightJson.d.ts +11 -0
- package/dist/client/utils/highlightJson.d.ts.map +1 -0
- package/dist/client/utils/jsonUtils.d.ts +4 -0
- package/dist/client/utils/jsonUtils.d.ts.map +1 -1
- package/dist/client/utils/mcpClientUtils.d.ts.map +1 -1
- package/dist/client/utils/servers.d.ts +14 -0
- package/dist/client/utils/servers.d.ts.map +1 -0
- package/dist/server/cdn-shell.d.ts +18 -0
- package/dist/server/cdn-shell.d.ts.map +1 -0
- package/dist/server/cdn-shell.js +10 -0
- package/dist/server/chunk-5B3SXGZP.js +43 -0
- package/dist/server/chunk-6XWDZEFF.js +194 -0
- package/dist/server/chunk-ESODOPDD.js +50 -0
- package/dist/server/chunk-IKTZUWSX.js +0 -0
- package/dist/server/{chunk-57KIBVKX.js → chunk-J67FVPHF.js} +27 -26
- package/dist/server/chunk-K2F2AJOI.js +619 -0
- package/dist/server/chunk-K2V2SDQD.js +40 -0
- package/dist/server/{chunk-R4ISUE7T.js → chunk-THQ67TSE.js} +31 -32
- package/dist/server/chunk-TPHRVELX.js +130 -0
- package/dist/server/chunk-WFT4JHYI.js +24 -0
- package/dist/server/cli.js +23 -25
- package/dist/server/create-dev-api-app.d.ts +4 -0
- package/dist/server/create-dev-api-app.d.ts.map +1 -0
- package/dist/server/create-dev-api-app.js +11 -0
- package/dist/server/favicon-links.d.ts +12 -0
- package/dist/server/favicon-links.d.ts.map +1 -0
- package/dist/server/favicon-links.js +11 -0
- package/dist/server/favicon-static.d.ts +4 -0
- package/dist/server/favicon-static.d.ts.map +1 -0
- package/dist/server/favicon-static.js +8 -0
- package/dist/server/index.d.ts +3 -4
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +13 -17
- package/dist/server/middleware.d.ts +14 -3
- package/dist/server/middleware.d.ts.map +1 -1
- package/dist/server/middleware.js +9 -9
- package/dist/server/proxy/index.d.ts +3 -0
- package/dist/server/proxy/index.d.ts.map +1 -0
- package/dist/server/proxy/index.js +12 -0
- package/dist/server/proxy/mcp-proxy.d.ts +99 -0
- package/dist/server/proxy/mcp-proxy.d.ts.map +1 -0
- package/dist/server/proxy/mcp-proxy.js +8 -0
- package/dist/server/proxy/oauth-proxy.d.ts +26 -0
- package/dist/server/proxy/oauth-proxy.d.ts.map +1 -0
- package/dist/server/proxy/oauth-proxy.js +9 -0
- package/dist/server/proxy-routes.d.ts +16 -0
- package/dist/server/proxy-routes.d.ts.map +1 -0
- package/dist/server/proxy-routes.js +10 -0
- package/dist/server/rpc-log-bus.js +73 -3
- package/dist/server/server.d.ts +3 -8
- package/dist/server/server.d.ts.map +1 -1
- package/dist/server/server.js +15 -92
- package/dist/server/version.js +1 -1
- package/dist/server/vite-dev-api-plugin.d.ts +4 -0
- package/dist/server/vite-dev-api-plugin.d.ts.map +1 -0
- package/dist/server/vite-dev-api-plugin.js +30 -0
- package/dist/web/apple-touch-icon.png +0 -0
- package/dist/web/assets/AnimatePresence-CthXziG2.js +9 -0
- package/dist/web/assets/ChatTab-CiAqtqhj.js +460 -0
- package/dist/web/assets/ConnectionSettingsTab-CTh6MFKE.js +1 -0
- package/dist/web/assets/ElicitationTab-B3Eg0_Jm.js +1 -0
- package/dist/web/assets/FormContext-Cqc_A12u.js +1 -0
- package/dist/web/assets/ListTabHeader-G-nQX18m.js +1 -0
- package/dist/web/assets/ManufactOAuthCallback-B-tdkUA2.js +1 -0
- package/dist/web/assets/NotificationsTab-BgLjxuos.js +1 -0
- package/dist/web/assets/OAuthCallback-Bp-jLoQs.js +1 -0
- package/dist/web/assets/PromptsTab-CA-SZs43.js +61 -0
- package/dist/web/assets/ResourcesTab-DdMIW_af.js +2 -0
- package/dist/web/assets/SamplingTab-DjyDG01W.js +1 -0
- package/dist/web/assets/ServerMetadataTab-Q4PlqP_B.js +1 -0
- package/dist/web/assets/ToolsTab-BHk8GCmd.js +8 -0
- package/dist/web/assets/ViewPreview-DWtmwzCb.js +1 -0
- package/dist/web/assets/WidgetWrapper-B43lqbld.js +34 -0
- package/dist/web/assets/brush--0LobUi4.js +1 -0
- package/dist/web/assets/bundle-mjs-8puS6ou7.js +1 -0
- package/dist/web/assets/checkbox-_GzEPQic.js +1 -0
- package/dist/web/assets/chunk-BO2N2NFS-BdIeB5Lr.js +131 -0
- package/dist/web/assets/code-tME-5H6D.js +1 -0
- package/dist/web/assets/createLucideIcon-B3b8EU0b.js +1 -0
- package/dist/web/assets/dist-DQjEDTKs.js +21 -0
- package/dist/web/assets/highlighted-body-OFNGDK62-Dp3e1QHL.js +1 -0
- package/dist/web/assets/index-Bbn-6QR2.js +475 -0
- package/dist/web/assets/index-BjH-Qp85.css +1 -0
- package/dist/web/assets/input-CjmxOFr6.js +1 -0
- package/dist/web/assets/inspector-settings-layout-yjKRJDai.js +1 -0
- package/dist/web/assets/jsx-runtime-Cjj9sGSy.js +1 -0
- package/dist/web/assets/label-B5Q_Zr8M.js +1 -0
- package/dist/web/assets/maximize-2-BTT9QQU9.js +1 -0
- package/dist/web/assets/maximize-_O55kFcr.js +1 -0
- package/dist/web/assets/mermaid-GHXKKRXX-yq1lkD3x.js +1 -0
- package/dist/web/assets/pdf-C3cfS_Ha.js +54 -0
- package/dist/web/assets/react-CU_d2d5K.js +1 -0
- package/dist/web/assets/refresh-cw-C9wQl8_d.js +1 -0
- package/dist/web/assets/save-B-MsgxX9.js +1 -0
- package/dist/web/assets/schemaHelpers-DLNTQr_6.js +1 -0
- package/dist/web/assets/select-C0xlfLAa.js +1 -0
- package/dist/web/assets/shared-Dfwy7nyg.js +1 -0
- package/dist/web/assets/sheet-CRPrEqAa.js +1 -0
- package/dist/web/assets/sparkles-2OAsc1aP.js +1 -0
- package/dist/web/assets/tabs-subtle-Dxgism9f.js +1 -0
- package/dist/web/assets/textarea-Ci09-en6.js +1 -0
- package/dist/web/assets/useConfig-b1f_iVFH.js +1 -0
- package/dist/web/assets/useMCPPrompts-CPskz9af.js +1 -0
- package/dist/web/assets/useViewHostProps-BgsQ2yYl.js +1 -0
- package/dist/web/assets/zap-Du2Uc5pa.js +1 -0
- package/dist/web/favicon-96x96.png +0 -0
- package/dist/web/favicon-black.svg +5 -8
- package/dist/web/favicon-white.svg +4 -7
- package/dist/web/favicon.ico +0 -0
- package/dist/web/favicon.svg +5 -0
- package/dist/web/index.html +13 -20
- package/dist/web/site.webmanifest +21 -0
- package/dist/web/web-app-manifest-192x192.png +0 -0
- package/dist/web/web-app-manifest-512x512.png +0 -0
- package/package.json +29 -30
- package/dist/client/components/FullscreenNavbar.d.ts +0 -9
- package/dist/client/components/FullscreenNavbar.d.ts.map +0 -1
- package/dist/client/components/LoginModal.d.ts +0 -11
- package/dist/client/components/LoginModal.d.ts.map +0 -1
- package/dist/client/components/MCPAppsRenderer.d.ts +0 -53
- package/dist/client/components/MCPAppsRenderer.d.ts.map +0 -1
- package/dist/client/components/McpUIRenderer.d.ts +0 -19
- package/dist/client/components/McpUIRenderer.d.ts.map +0 -1
- package/dist/client/components/OpenAIComponentRenderer.d.ts +0 -51
- package/dist/client/components/OpenAIComponentRenderer.d.ts.map +0 -1
- package/dist/client/components/chat/InlineElicitationCard.d.ts +0 -10
- package/dist/client/components/chat/InlineElicitationCard.d.ts.map +0 -1
- package/dist/client/components/chat/MCPUIResource.d.ts +0 -11
- package/dist/client/components/chat/MCPUIResource.d.ts.map +0 -1
- package/dist/client/components/elicitation/shared/ElicitationFormFields.d.ts +0 -21
- package/dist/client/components/elicitation/shared/ElicitationFormFields.d.ts.map +0 -1
- package/dist/client/components/elicitation/shared/index.d.ts +0 -3
- package/dist/client/components/elicitation/shared/index.d.ts.map +0 -1
- package/dist/client/components/elicitation/shared/useElicitationForm.d.ts +0 -23
- package/dist/client/components/elicitation/shared/useElicitationForm.d.ts.map +0 -1
- package/dist/client/components/logging/JsonRpcLoggerView.d.ts +0 -20
- package/dist/client/components/logging/JsonRpcLoggerView.d.ts.map +0 -1
- package/dist/client/components/prompts/PromptsTabHeader.d.ts +0 -17
- package/dist/client/components/prompts/PromptsTabHeader.d.ts.map +0 -1
- package/dist/client/components/prompts/index.d.ts +0 -6
- package/dist/client/components/prompts/index.d.ts.map +0 -1
- package/dist/client/components/resources/ResourcesTabHeader.d.ts +0 -16
- package/dist/client/components/resources/ResourcesTabHeader.d.ts.map +0 -1
- package/dist/client/components/resources/index.d.ts +0 -4
- package/dist/client/components/resources/index.d.ts.map +0 -1
- package/dist/client/components/shared/RpcPanel.d.ts +0 -21
- package/dist/client/components/shared/RpcPanel.d.ts.map +0 -1
- package/dist/client/components/tools/ToolsTabHeader.d.ts +0 -17
- package/dist/client/components/tools/ToolsTabHeader.d.ts.map +0 -1
- package/dist/client/components/tools/index.d.ts +0 -7
- package/dist/client/components/tools/index.d.ts.map +0 -1
- package/dist/client/components/ui/SandboxedIframe.d.ts +0 -64
- package/dist/client/components/ui/SandboxedIframe.d.ts.map +0 -1
- package/dist/client/components/ui/aurora-background.d.ts +0 -9
- package/dist/client/components/ui/aurora-background.d.ts.map +0 -1
- package/dist/client/constants/iframe.d.ts +0 -9
- package/dist/client/constants/iframe.d.ts.map +0 -1
- package/dist/client/constants/index.d.ts +0 -7
- package/dist/client/constants/index.d.ts.map +0 -1
- package/dist/client/constants/mcp-apps.d.ts +0 -39
- package/dist/client/constants/mcp-apps.d.ts.map +0 -1
- package/dist/client/hooks/usePrismTheme.d.ts +0 -5
- package/dist/client/hooks/usePrismTheme.d.ts.map +0 -1
- package/dist/client/lib/use-sandbox-remount-generation.d.ts +0 -9
- package/dist/client/lib/use-sandbox-remount-generation.d.ts.map +0 -1
- package/dist/client/lib/widget-fullscreen.d.ts +0 -17
- package/dist/client/lib/widget-fullscreen.d.ts.map +0 -1
- package/dist/client/telemetry/telemetry.d.ts +0 -42
- package/dist/client/telemetry/telemetry.d.ts.map +0 -1
- package/dist/client/types/elicitation.d.ts +0 -9
- package/dist/client/types/elicitation.d.ts.map +0 -1
- package/dist/client/utils/clipboard.d.ts +0 -6
- package/dist/client/utils/clipboard.d.ts.map +0 -1
- package/dist/client/utils/iframeConsoleInterceptor.d.ts +0 -6
- package/dist/client/utils/iframeConsoleInterceptor.d.ts.map +0 -1
- package/dist/client/utils/widget-detection.d.ts +0 -31
- package/dist/client/utils/widget-detection.d.ts.map +0 -1
- package/dist/llm/__tests__/messageFormat.test.d.ts +0 -2
- package/dist/llm/__tests__/messageFormat.test.d.ts.map +0 -1
- package/dist/llm/__tests__/providerToolResults.test.d.ts +0 -2
- package/dist/llm/__tests__/providerToolResults.test.d.ts.map +0 -1
- package/dist/llm/__tests__/toolResultParts.test.d.ts +0 -2
- package/dist/llm/__tests__/toolResultParts.test.d.ts.map +0 -1
- package/dist/llm/messageFormat.d.ts +0 -48
- package/dist/llm/messageFormat.d.ts.map +0 -1
- package/dist/llm/ndjson.d.ts +0 -5
- package/dist/llm/ndjson.d.ts.map +0 -1
- package/dist/llm/providers/anthropic.d.ts +0 -19
- package/dist/llm/providers/anthropic.d.ts.map +0 -1
- package/dist/llm/providers/google.d.ts +0 -19
- package/dist/llm/providers/google.d.ts.map +0 -1
- package/dist/llm/providers/index.d.ts +0 -19
- package/dist/llm/providers/index.d.ts.map +0 -1
- package/dist/llm/providers/ollama/index.d.ts +0 -18
- package/dist/llm/providers/ollama/index.d.ts.map +0 -1
- package/dist/llm/providers/ollama/utils.d.ts +0 -7
- package/dist/llm/providers/ollama/utils.d.ts.map +0 -1
- package/dist/llm/providers/openai.d.ts +0 -19
- package/dist/llm/providers/openai.d.ts.map +0 -1
- package/dist/llm/schemaUtils.d.ts +0 -2
- package/dist/llm/schemaUtils.d.ts.map +0 -1
- package/dist/llm/sse.d.ts +0 -15
- package/dist/llm/sse.d.ts.map +0 -1
- package/dist/llm/toolLoop.d.ts +0 -40
- package/dist/llm/toolLoop.d.ts.map +0 -1
- package/dist/llm/toolResultParts.d.ts +0 -28
- package/dist/llm/toolResultParts.d.ts.map +0 -1
- package/dist/llm/types.d.ts +0 -102
- package/dist/llm/types.d.ts.map +0 -1
- package/dist/server/chunk-A4VH7AIP.js +0 -738
- package/dist/server/chunk-CVECQ7BJ.js +0 -78
- package/dist/server/chunk-IDMHJUEM.js +0 -42
- package/dist/server/chunk-JWSNP6DN.js +0 -164
- package/dist/server/chunk-LJ4XSPDK.js +0 -322
- package/dist/server/chunk-OBMEB36B.js +0 -71
- package/dist/server/chunk-PJNKFX2R.js +0 -2351
- package/dist/server/chunk-QQ37LGLJ.js +0 -127
- package/dist/server/chunk-UTW44YSH.js +0 -322
- package/dist/server/file-utils.d.ts +0 -11
- package/dist/server/file-utils.d.ts.map +0 -1
- package/dist/server/file-utils.js +0 -11
- package/dist/server/routes/mcp-apps.d.ts +0 -12
- package/dist/server/routes/mcp-apps.d.ts.map +0 -1
- package/dist/server/shared-routes.d.ts +0 -11
- package/dist/server/shared-routes.d.ts.map +0 -1
- package/dist/server/shared-routes.js +0 -11
- package/dist/server/shared-static.d.ts +0 -57
- package/dist/server/shared-static.d.ts.map +0 -1
- package/dist/server/shared-static.js +0 -11
- package/dist/server/shared-utils.d.ts +0 -175
- package/dist/server/shared-utils.d.ts.map +0 -1
- package/dist/server/shared-utils.js +0 -21
- package/dist/server/transport-wrapper.d.ts +0 -6
- package/dist/server/transport-wrapper.d.ts.map +0 -1
- package/dist/server/transport-wrapper.js +0 -68
- package/dist/server/tunnel.d.ts +0 -11
- package/dist/server/tunnel.d.ts.map +0 -1
- package/dist/server/tunnel.js +0 -13
- package/dist/web/assets/1c-Ck39aYGA.js +0 -1
- package/dist/web/assets/abnf-BuzL1jyp.js +0 -1
- package/dist/web/assets/accesslog-C4d8zjYK.js +0 -1
- package/dist/web/assets/actionscript-yhwXJGpA.js +0 -1
- package/dist/web/assets/ada-DS7GMjM1.js +0 -1
- package/dist/web/assets/angelscript-BNqWtPa-.js +0 -1
- package/dist/web/assets/apache-CDWq3Rq5.js +0 -1
- package/dist/web/assets/applescript-8S6EVXRM.js +0 -1
- package/dist/web/assets/arcade-DC7EGdDp.js +0 -1
- package/dist/web/assets/arduino-8rhiPNbi.js +0 -1
- package/dist/web/assets/armasm-CXSk1xrZ.js +0 -1
- package/dist/web/assets/asciidoc-Cky4dUsA.js +0 -1
- package/dist/web/assets/aspectj-Dq_7W5m_.js +0 -1
- package/dist/web/assets/autohotkey-BNhcw-Zd.js +0 -1
- package/dist/web/assets/autoit-B6QVlGNy.js +0 -1
- package/dist/web/assets/avrasm-CHV0d4It.js +0 -1
- package/dist/web/assets/awk-DCB3Eg4O.js +0 -1
- package/dist/web/assets/axapta-Dxohu7yY.js +0 -1
- package/dist/web/assets/bash-Bvq6q0eu.js +0 -1
- package/dist/web/assets/basic-B6HvpaoU.js +0 -1
- package/dist/web/assets/bnf-CuNWJiZD.js +0 -1
- package/dist/web/assets/brainfuck-CwbwmNek.js +0 -3
- package/dist/web/assets/c-J3NpqNLd.js +0 -1
- package/dist/web/assets/c-like-CEyttHu3.js +0 -1
- package/dist/web/assets/cal-De1Inhwg.js +0 -1
- package/dist/web/assets/capnproto-Dfm52ju9.js +0 -1
- package/dist/web/assets/ceylon-C7k7iR7b.js +0 -1
- package/dist/web/assets/clean-BApy5Jiy.js +0 -1
- package/dist/web/assets/clojure-D99J3Nqd.js +0 -1
- package/dist/web/assets/clojure-repl-C-7y8JbJ.js +0 -1
- package/dist/web/assets/cmake-Cyp9hqgM.js +0 -1
- package/dist/web/assets/coffeescript-Di8oatND.js +0 -1
- package/dist/web/assets/coq-CTcQXuml.js +0 -1
- package/dist/web/assets/core-Dn-Gjdkn.js +0 -4
- package/dist/web/assets/cos-B5PyisGk.js +0 -1
- package/dist/web/assets/cpp-CpoL8Vn2.js +0 -1
- package/dist/web/assets/crmsh-BzEJ2UMf.js +0 -1
- package/dist/web/assets/crystal-DwthdjeS.js +0 -1
- package/dist/web/assets/csharp-DX0uiYC_.js +0 -1
- package/dist/web/assets/csp-Dz_hLI0l.js +0 -1
- package/dist/web/assets/css-CBX-iPig.js +0 -1
- package/dist/web/assets/d-BFcEc2Wd.js +0 -1
- package/dist/web/assets/dart-XM_3t8vN.js +0 -1
- package/dist/web/assets/delphi-DoGEkNsl.js +0 -1
- package/dist/web/assets/diff-DmFtonrj.js +0 -1
- package/dist/web/assets/django-BdZ5M382.js +0 -1
- package/dist/web/assets/dns-D08imUXg.js +0 -1
- package/dist/web/assets/dockerfile-B5VmPrWY.js +0 -1
- package/dist/web/assets/dos-CGSFxCkI.js +0 -1
- package/dist/web/assets/dsconfig-ca2r_GVK.js +0 -1
- package/dist/web/assets/dts-JQegxFM5.js +0 -1
- package/dist/web/assets/dust-Djaschl2.js +0 -1
- package/dist/web/assets/ebnf-CZryUL-X.js +0 -1
- package/dist/web/assets/elixir-D0_cpeEe.js +0 -1
- package/dist/web/assets/elm-CeVRiPaW.js +0 -1
- package/dist/web/assets/erb-xkDOjk65.js +0 -1
- package/dist/web/assets/erlang-Bjd1hpKB.js +0 -1
- package/dist/web/assets/erlang-repl-CAHsxSfj.js +0 -1
- package/dist/web/assets/excel-kF3e3kEL.js +0 -1
- package/dist/web/assets/fix-DcDIoRCK.js +0 -1
- package/dist/web/assets/flix-Ho4BNqBJ.js +0 -1
- package/dist/web/assets/fortran-14t4qTUY.js +0 -1
- package/dist/web/assets/fsharp-L5i6f6LO.js +0 -1
- package/dist/web/assets/gams-B1FvFmVr.js +0 -1
- package/dist/web/assets/gauss-DhPFrKEG.js +0 -1
- package/dist/web/assets/gcode-fU_PdGTz.js +0 -1
- package/dist/web/assets/gherkin-D35RpAlM.js +0 -1
- package/dist/web/assets/glsl-Ce3B2spn.js +0 -1
- package/dist/web/assets/gml-q_8zkRjy.js +0 -1
- package/dist/web/assets/go-tjnmgxFo.js +0 -1
- package/dist/web/assets/golo-D0DdehTP.js +0 -1
- package/dist/web/assets/gradle-BuEALrHh.js +0 -1
- package/dist/web/assets/groovy-BwBwLxy1.js +0 -1
- package/dist/web/assets/haml-BBZG2pIn.js +0 -1
- package/dist/web/assets/handlebars-CBCTIWBg.js +0 -1
- package/dist/web/assets/haskell-Ddd09HDp.js +0 -1
- package/dist/web/assets/haxe-B2rZ5fx2.js +0 -1
- package/dist/web/assets/hsp-I8h4zcwW.js +0 -1
- package/dist/web/assets/htmlbars-BU4KGKFH.js +0 -1
- package/dist/web/assets/http-DN5nyOjy.js +0 -1
- package/dist/web/assets/hy-CpeSsEuG.js +0 -1
- package/dist/web/assets/index-C4BqUITd.css +0 -2
- package/dist/web/assets/index-C8FrI8_O.js +0 -848
- package/dist/web/assets/inform7-BE7aHqNb.js +0 -1
- package/dist/web/assets/ini-Z84ip27g.js +0 -1
- package/dist/web/assets/irpf90-CVwarimj.js +0 -1
- package/dist/web/assets/isbl-ghISknvV.js +0 -1
- package/dist/web/assets/java-CEw02vbP.js +0 -1
- package/dist/web/assets/javascript-gThRHhsu.js +0 -1
- package/dist/web/assets/jboss-cli-C9bhouu8.js +0 -1
- package/dist/web/assets/json-CajKCx8k.js +0 -1
- package/dist/web/assets/julia-DoYLhEhE.js +0 -1
- package/dist/web/assets/julia-repl-BZUBP0N8.js +0 -1
- package/dist/web/assets/kotlin-DwLRtiOv.js +0 -2
- package/dist/web/assets/lasso-DzjodXDX.js +0 -1
- package/dist/web/assets/latex-TLlwzbIz.js +0 -1
- package/dist/web/assets/ldif-CCayDc2m.js +0 -1
- package/dist/web/assets/leaf-Bz7MjUha.js +0 -1
- package/dist/web/assets/less-5c3Sx665.js +0 -1
- package/dist/web/assets/lisp-nrbFh6lg.js +0 -1
- package/dist/web/assets/livecodeserver-B6AET3RQ.js +0 -1
- package/dist/web/assets/livescript-DluKBsMk.js +0 -1
- package/dist/web/assets/llvm-7haFOmp0.js +0 -1
- package/dist/web/assets/lsl-vQhUcPVp.js +0 -1
- package/dist/web/assets/lua-D6YEEohY.js +0 -1
- package/dist/web/assets/makefile-ps86vsQu.js +0 -1
- package/dist/web/assets/markdown-D4av7eDS.js +0 -1
- package/dist/web/assets/mathematica-KZAZ3f_4.js +0 -1
- package/dist/web/assets/matlab-DvaEq_2L.js +0 -1
- package/dist/web/assets/maxima-DmpshiQZ.js +0 -1
- package/dist/web/assets/mel-B-mMlzQm.js +0 -1
- package/dist/web/assets/mercury-C7wy29Qr.js +0 -1
- package/dist/web/assets/mipsasm-BWGxDN2L.js +0 -1
- package/dist/web/assets/mizar-BO0ByJsv.js +0 -1
- package/dist/web/assets/module-3nkmv-tD.js +0 -4
- package/dist/web/assets/mojolicious-DQzQPzHI.js +0 -1
- package/dist/web/assets/monkey-zmRhai32.js +0 -1
- package/dist/web/assets/moonscript-I4NDcPGQ.js +0 -1
- package/dist/web/assets/n1ql-DWiekVW7.js +0 -1
- package/dist/web/assets/nginx-DzGKMR5i.js +0 -1
- package/dist/web/assets/nim-CkSCDiz8.js +0 -1
- package/dist/web/assets/nix-ZeFazZ2H.js +0 -1
- package/dist/web/assets/node-repl-CPsBepeY.js +0 -1
- package/dist/web/assets/nsis-CPX7KHgX.js +0 -1
- package/dist/web/assets/objectivec-C9QgxLTf.js +0 -1
- package/dist/web/assets/ocaml-C3nG7mvn.js +0 -1
- package/dist/web/assets/openscad-DeCdwUSM.js +0 -1
- package/dist/web/assets/oxygene-DYdFEz9Q.js +0 -1
- package/dist/web/assets/parser3-ZcIhJT1P.js +0 -1
- package/dist/web/assets/perl-C6XfEYw8.js +0 -1
- package/dist/web/assets/pf-8XkdEzY8.js +0 -1
- package/dist/web/assets/pgsql-DAhhqJ5S.js +0 -1
- package/dist/web/assets/php-CSilrJt2.js +0 -1
- package/dist/web/assets/php-template-BNZ8XzCJ.js +0 -1
- package/dist/web/assets/plaintext-Bh7iCuMT.js +0 -1
- package/dist/web/assets/pony-CSAjk_Rh.js +0 -1
- package/dist/web/assets/powershell-5tevpPDi.js +0 -1
- package/dist/web/assets/processing-B5UBw4db.js +0 -1
- package/dist/web/assets/profile-BYWKRUf-.js +0 -1
- package/dist/web/assets/prolog-Z-kheNQb.js +0 -1
- package/dist/web/assets/properties-CP2GAgCT.js +0 -1
- package/dist/web/assets/protobuf-DwaP-ZBz.js +0 -1
- package/dist/web/assets/puppet-DCo1p-e1.js +0 -1
- package/dist/web/assets/purebasic-B4oTIbaC.js +0 -1
- package/dist/web/assets/python-Cxw0FOMN.js +0 -1
- package/dist/web/assets/python-repl-BggDorti.js +0 -1
- package/dist/web/assets/q-D0x0YPyq.js +0 -1
- package/dist/web/assets/qml-Dphl0SMd.js +0 -1
- package/dist/web/assets/r-D_JMfTn3.js +0 -1
- package/dist/web/assets/reasonml-CXdNSKcE.js +0 -1
- package/dist/web/assets/rib-D3-TlPeW.js +0 -1
- package/dist/web/assets/roboconf-DEm7cd22.js +0 -1
- package/dist/web/assets/routeros-DdjuRfl6.js +0 -1
- package/dist/web/assets/rpc-logger-TPNV75J4-C40n6UNr.js +0 -1
- package/dist/web/assets/rsl-BrnG8AH0.js +0 -1
- package/dist/web/assets/ruby-aB1innqz.js +0 -1
- package/dist/web/assets/ruleslanguage-BPmfiapH.js +0 -1
- package/dist/web/assets/rust-DqQz2VhN.js +0 -1
- package/dist/web/assets/sas-D4-lEVkU.js +0 -1
- package/dist/web/assets/scala-77Na58um.js +0 -1
- package/dist/web/assets/scheme-2Qe3EDmu.js +0 -1
- package/dist/web/assets/scilab-DZps5Q31.js +0 -1
- package/dist/web/assets/scss-B3Vtu9UP.js +0 -1
- package/dist/web/assets/shell-CrQcV8OK.js +0 -1
- package/dist/web/assets/smali-BTfpnEqn.js +0 -2
- package/dist/web/assets/smalltalk-CpIWoTp_.js +0 -1
- package/dist/web/assets/sml-DoJUdr8i.js +0 -1
- package/dist/web/assets/sqf-Bs26a1hR.js +0 -1
- package/dist/web/assets/sql-BXs9CZyk.js +0 -1
- package/dist/web/assets/sql_more-CQVJyFAZ.js +0 -1
- package/dist/web/assets/stan-B6HH5NgR.js +0 -1
- package/dist/web/assets/stata-VKr1FNBF.js +0 -3
- package/dist/web/assets/step21-Ba6oj9Wj.js +0 -1
- package/dist/web/assets/stylus-DhJmSeI6.js +0 -1
- package/dist/web/assets/subunit-B0bGuVIS.js +0 -3
- package/dist/web/assets/swift-C5NITCOW.js +0 -1
- package/dist/web/assets/taggerscript-DzMn6Q_H.js +0 -1
- package/dist/web/assets/tap-D-CsbE0z.js +0 -1
- package/dist/web/assets/tcl-mxaB-b0O.js +0 -1
- package/dist/web/assets/thrift-D15bAw3O.js +0 -1
- package/dist/web/assets/tp-CYW80aaN.js +0 -1
- package/dist/web/assets/twig-DUx5lHKo.js +0 -1
- package/dist/web/assets/typescript-FKxWpH0A.js +0 -1
- package/dist/web/assets/vala-C8SPe1Je.js +0 -1
- package/dist/web/assets/vbnet-DPOz3qH4.js +0 -1
- package/dist/web/assets/vbscript-BFMfNF7s.js +0 -1
- package/dist/web/assets/vbscript-html-3FBmwJu9.js +0 -1
- package/dist/web/assets/verilog-CiVb5cnG.js +0 -1
- package/dist/web/assets/vhdl-BQaFQ0Ys.js +0 -1
- package/dist/web/assets/vim-k5mEfOIE.js +0 -1
- package/dist/web/assets/x86asm-B-SWMOrZ.js +0 -1
- package/dist/web/assets/xl-BpV7JOX6.js +0 -1
- package/dist/web/assets/xml-7_gIAAop.js +0 -1
- package/dist/web/assets/xquery-D3UKuxgH.js +0 -1
- package/dist/web/assets/yaml-CL8bO3oj.js +0 -1
- package/dist/web/assets/zephir-foimhbl6.js +0 -1
|
@@ -0,0 +1,1508 @@
|
|
|
1
|
+
import { s as e, t } from "./react-BIs9pQ3H.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/react-router@7.16.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/react-router/dist/development/chunk-QUQL4437.mjs
|
|
3
|
+
var n = /* @__PURE__ */ e(t(), 1), r = "popstate";
|
|
4
|
+
function i(e) {
|
|
5
|
+
return typeof e == "object" && !!e && "pathname" in e && "search" in e && "hash" in e && "state" in e && "key" in e;
|
|
6
|
+
}
|
|
7
|
+
function a(e = {}) {
|
|
8
|
+
function t(e, t) {
|
|
9
|
+
let n = t.state?.masked, { pathname: r, search: i, hash: a } = n || e.location;
|
|
10
|
+
return u("", {
|
|
11
|
+
pathname: r,
|
|
12
|
+
search: i,
|
|
13
|
+
hash: a
|
|
14
|
+
}, t.state && t.state.usr || null, t.state && t.state.key || "default", n ? {
|
|
15
|
+
pathname: e.location.pathname,
|
|
16
|
+
search: e.location.search,
|
|
17
|
+
hash: e.location.hash
|
|
18
|
+
} : void 0);
|
|
19
|
+
}
|
|
20
|
+
function n(e, t) {
|
|
21
|
+
return typeof t == "string" ? t : d(t);
|
|
22
|
+
}
|
|
23
|
+
return p(t, n, null, e);
|
|
24
|
+
}
|
|
25
|
+
function o(e, t) {
|
|
26
|
+
if (e === !1 || e == null) throw Error(t);
|
|
27
|
+
}
|
|
28
|
+
function s(e, t) {
|
|
29
|
+
if (!e) {
|
|
30
|
+
typeof console < "u" && console.warn(t);
|
|
31
|
+
try {
|
|
32
|
+
throw Error(t);
|
|
33
|
+
} catch {}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function c() {
|
|
37
|
+
return Math.random().toString(36).substring(2, 10);
|
|
38
|
+
}
|
|
39
|
+
function l(e, t) {
|
|
40
|
+
return {
|
|
41
|
+
usr: e.state,
|
|
42
|
+
key: e.key,
|
|
43
|
+
idx: t,
|
|
44
|
+
masked: e.mask ? {
|
|
45
|
+
pathname: e.pathname,
|
|
46
|
+
search: e.search,
|
|
47
|
+
hash: e.hash
|
|
48
|
+
} : void 0
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function u(e, t, n = null, r, i) {
|
|
52
|
+
return {
|
|
53
|
+
pathname: typeof e == "string" ? e : e.pathname,
|
|
54
|
+
search: "",
|
|
55
|
+
hash: "",
|
|
56
|
+
...typeof t == "string" ? f(t) : t,
|
|
57
|
+
state: n,
|
|
58
|
+
key: t && t.key || r || c(),
|
|
59
|
+
mask: i
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
function d({ pathname: e = "/", search: t = "", hash: n = "" }) {
|
|
63
|
+
return t && t !== "?" && (e += t.charAt(0) === "?" ? t : "?" + t), n && n !== "#" && (e += n.charAt(0) === "#" ? n : "#" + n), e;
|
|
64
|
+
}
|
|
65
|
+
function f(e) {
|
|
66
|
+
let t = {};
|
|
67
|
+
if (e) {
|
|
68
|
+
let n = e.indexOf("#");
|
|
69
|
+
n >= 0 && (t.hash = e.substring(n), e = e.substring(0, n));
|
|
70
|
+
let r = e.indexOf("?");
|
|
71
|
+
r >= 0 && (t.search = e.substring(r), e = e.substring(0, r)), e && (t.pathname = e);
|
|
72
|
+
}
|
|
73
|
+
return t;
|
|
74
|
+
}
|
|
75
|
+
function p(e, t, n, a = {}) {
|
|
76
|
+
let { window: o = document.defaultView, v5Compat: s = !1 } = a, c = o.history, d = "POP", f = null, p = h();
|
|
77
|
+
p ?? (p = 0, c.replaceState({
|
|
78
|
+
...c.state,
|
|
79
|
+
idx: p
|
|
80
|
+
}, ""));
|
|
81
|
+
function h() {
|
|
82
|
+
return (c.state || { idx: null }).idx;
|
|
83
|
+
}
|
|
84
|
+
function g() {
|
|
85
|
+
d = "POP";
|
|
86
|
+
let e = h(), t = e == null ? null : e - p;
|
|
87
|
+
p = e, f && f({
|
|
88
|
+
action: d,
|
|
89
|
+
location: b.location,
|
|
90
|
+
delta: t
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
function _(e, t) {
|
|
94
|
+
d = "PUSH";
|
|
95
|
+
let r = i(e) ? e : u(b.location, e, t);
|
|
96
|
+
n && n(r, e), p = h() + 1;
|
|
97
|
+
let a = l(r, p), m = b.createHref(r.mask || r);
|
|
98
|
+
try {
|
|
99
|
+
c.pushState(a, "", m);
|
|
100
|
+
} catch (e) {
|
|
101
|
+
if (e instanceof DOMException && e.name === "DataCloneError") throw e;
|
|
102
|
+
o.location.assign(m);
|
|
103
|
+
}
|
|
104
|
+
s && f && f({
|
|
105
|
+
action: d,
|
|
106
|
+
location: b.location,
|
|
107
|
+
delta: 1
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
function v(e, t) {
|
|
111
|
+
d = "REPLACE";
|
|
112
|
+
let r = i(e) ? e : u(b.location, e, t);
|
|
113
|
+
n && n(r, e), p = h();
|
|
114
|
+
let a = l(r, p), o = b.createHref(r.mask || r);
|
|
115
|
+
c.replaceState(a, "", o), s && f && f({
|
|
116
|
+
action: d,
|
|
117
|
+
location: b.location,
|
|
118
|
+
delta: 0
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
function y(e) {
|
|
122
|
+
return m(o, e);
|
|
123
|
+
}
|
|
124
|
+
let b = {
|
|
125
|
+
get action() {
|
|
126
|
+
return d;
|
|
127
|
+
},
|
|
128
|
+
get location() {
|
|
129
|
+
return e(o, c);
|
|
130
|
+
},
|
|
131
|
+
listen(e) {
|
|
132
|
+
if (f) throw Error("A history only accepts one active listener");
|
|
133
|
+
return o.addEventListener(r, g), f = e, () => {
|
|
134
|
+
o.removeEventListener(r, g), f = null;
|
|
135
|
+
};
|
|
136
|
+
},
|
|
137
|
+
createHref(e) {
|
|
138
|
+
return t(o, e);
|
|
139
|
+
},
|
|
140
|
+
createURL: y,
|
|
141
|
+
encodeLocation(e) {
|
|
142
|
+
let t = y(e);
|
|
143
|
+
return {
|
|
144
|
+
pathname: t.pathname,
|
|
145
|
+
search: t.search,
|
|
146
|
+
hash: t.hash
|
|
147
|
+
};
|
|
148
|
+
},
|
|
149
|
+
push: _,
|
|
150
|
+
replace: v,
|
|
151
|
+
go(e) {
|
|
152
|
+
return c.go(e);
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
return b;
|
|
156
|
+
}
|
|
157
|
+
function m(e, t, n = !1) {
|
|
158
|
+
let r = "http://localhost";
|
|
159
|
+
e && (r = e.location.origin === "null" ? e.location.href : e.location.origin), o(r, "No window.location.(origin|href) available to create URL");
|
|
160
|
+
let i = typeof t == "string" ? t : d(t);
|
|
161
|
+
return i = i.replace(/ $/, "%20"), !n && i.startsWith("//") && (i = r + i), new URL(i, r);
|
|
162
|
+
}
|
|
163
|
+
function h(e, t, n = "/") {
|
|
164
|
+
return g(e, t, n, !1);
|
|
165
|
+
}
|
|
166
|
+
function g(e, t, n, r, i) {
|
|
167
|
+
let a = k((typeof t == "string" ? f(t) : t).pathname || "/", n);
|
|
168
|
+
if (a == null) return null;
|
|
169
|
+
let o = i ?? v(e), s = null, c = ae(a);
|
|
170
|
+
for (let e = 0; s == null && e < o.length; ++e) s = re(o[e], c, r);
|
|
171
|
+
return s;
|
|
172
|
+
}
|
|
173
|
+
function _(e, t) {
|
|
174
|
+
let { route: n, pathname: r, params: i } = e;
|
|
175
|
+
return {
|
|
176
|
+
id: n.id,
|
|
177
|
+
pathname: r,
|
|
178
|
+
params: i,
|
|
179
|
+
data: t[n.id],
|
|
180
|
+
loaderData: t[n.id],
|
|
181
|
+
handle: n.handle
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
function v(e) {
|
|
185
|
+
let t = y(e);
|
|
186
|
+
return x(t), t;
|
|
187
|
+
}
|
|
188
|
+
function y(e, t = [], n = [], r = "", i = !1) {
|
|
189
|
+
let a = (e, a, s = i, c) => {
|
|
190
|
+
let l = {
|
|
191
|
+
relativePath: c === void 0 ? e.path || "" : c,
|
|
192
|
+
caseSensitive: e.caseSensitive === !0,
|
|
193
|
+
childrenIndex: a,
|
|
194
|
+
route: e
|
|
195
|
+
};
|
|
196
|
+
if (l.relativePath.startsWith("/")) {
|
|
197
|
+
if (!l.relativePath.startsWith(r) && s) return;
|
|
198
|
+
o(l.relativePath.startsWith(r), `Absolute route path "${l.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`), l.relativePath = l.relativePath.slice(r.length);
|
|
199
|
+
}
|
|
200
|
+
let u = j([r, l.relativePath]), d = n.concat(l);
|
|
201
|
+
e.children && e.children.length > 0 && (o(e.index !== !0, `Index routes must not have child routes. Please remove all child routes from route path "${u}".`), y(e.children, t, d, u, s)), !(e.path == null && !e.index) && t.push({
|
|
202
|
+
path: u,
|
|
203
|
+
score: D(u, e.index),
|
|
204
|
+
routesMeta: d
|
|
205
|
+
});
|
|
206
|
+
};
|
|
207
|
+
return e.forEach((e, t) => {
|
|
208
|
+
if (e.path === "" || !e.path?.includes("?")) a(e, t);
|
|
209
|
+
else for (let n of b(e.path)) a(e, t, !0, n);
|
|
210
|
+
}), t;
|
|
211
|
+
}
|
|
212
|
+
function b(e) {
|
|
213
|
+
let t = e.split("/");
|
|
214
|
+
if (t.length === 0) return [];
|
|
215
|
+
let [n, ...r] = t, i = n.endsWith("?"), a = n.replace(/\?$/, "");
|
|
216
|
+
if (r.length === 0) return i ? [a, ""] : [a];
|
|
217
|
+
let o = b(r.join("/")), s = [];
|
|
218
|
+
return s.push(...o.map((e) => e === "" ? a : [a, e].join("/"))), i && s.push(...o), s.map((t) => e.startsWith("/") && t === "" ? "/" : t);
|
|
219
|
+
}
|
|
220
|
+
function x(e) {
|
|
221
|
+
e.sort((e, t) => e.score === t.score ? ne(e.routesMeta.map((e) => e.childrenIndex), t.routesMeta.map((e) => e.childrenIndex)) : t.score - e.score);
|
|
222
|
+
}
|
|
223
|
+
var S = /^:[\w-]+$/, C = 3, ee = 2, w = 1, T = 10, te = -2, E = (e) => e === "*";
|
|
224
|
+
function D(e, t) {
|
|
225
|
+
let n = e.split("/"), r = n.length;
|
|
226
|
+
return n.some(E) && (r += te), t && (r += ee), n.filter((e) => !E(e)).reduce((e, t) => e + (S.test(t) ? C : t === "" ? w : T), r);
|
|
227
|
+
}
|
|
228
|
+
function ne(e, t) {
|
|
229
|
+
return e.length === t.length && e.slice(0, -1).every((e, n) => e === t[n]) ? e[e.length - 1] - t[t.length - 1] : 0;
|
|
230
|
+
}
|
|
231
|
+
function re(e, t, n = !1) {
|
|
232
|
+
let { routesMeta: r } = e, i = {}, a = "/", o = [];
|
|
233
|
+
for (let e = 0; e < r.length; ++e) {
|
|
234
|
+
let s = r[e], c = e === r.length - 1, l = a === "/" ? t : t.slice(a.length) || "/", u = O({
|
|
235
|
+
path: s.relativePath,
|
|
236
|
+
caseSensitive: s.caseSensitive,
|
|
237
|
+
end: c
|
|
238
|
+
}, l), d = s.route;
|
|
239
|
+
if (!u && c && n && !r[r.length - 1].route.index && (u = O({
|
|
240
|
+
path: s.relativePath,
|
|
241
|
+
caseSensitive: s.caseSensitive,
|
|
242
|
+
end: !1
|
|
243
|
+
}, l)), !u) return null;
|
|
244
|
+
Object.assign(i, u.params), o.push({
|
|
245
|
+
params: i,
|
|
246
|
+
pathname: j([a, u.pathname]),
|
|
247
|
+
pathnameBase: pe(j([a, u.pathnameBase])),
|
|
248
|
+
route: d
|
|
249
|
+
}), u.pathnameBase !== "/" && (a = j([a, u.pathnameBase]));
|
|
250
|
+
}
|
|
251
|
+
return o;
|
|
252
|
+
}
|
|
253
|
+
function O(e, t) {
|
|
254
|
+
typeof e == "string" && (e = {
|
|
255
|
+
path: e,
|
|
256
|
+
caseSensitive: !1,
|
|
257
|
+
end: !0
|
|
258
|
+
});
|
|
259
|
+
let [n, r] = ie(e.path, e.caseSensitive, e.end), i = t.match(n);
|
|
260
|
+
if (!i) return null;
|
|
261
|
+
let a = i[0], o = a.replace(/(.)\/+$/, "$1"), s = i.slice(1);
|
|
262
|
+
return {
|
|
263
|
+
params: r.reduce((e, { paramName: t, isOptional: n }, r) => {
|
|
264
|
+
if (t === "*") {
|
|
265
|
+
let e = s[r] || "";
|
|
266
|
+
o = a.slice(0, a.length - e.length).replace(/(.)\/+$/, "$1");
|
|
267
|
+
}
|
|
268
|
+
let i = s[r];
|
|
269
|
+
return n && !i ? e[t] = void 0 : e[t] = (i || "").replace(/%2F/g, "/"), e;
|
|
270
|
+
}, {}),
|
|
271
|
+
pathname: a,
|
|
272
|
+
pathnameBase: o,
|
|
273
|
+
pattern: e
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
function ie(e, t = !1, n = !0) {
|
|
277
|
+
s(e === "*" || !e.endsWith("*") || e.endsWith("/*"), `Route path "${e}" will be treated as if it were "${e.replace(/\*$/, "/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/, "/*")}".`);
|
|
278
|
+
let r = [], i = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(/\/:([\w-]+)(\?)?/g, (e, t, n, i, a) => {
|
|
279
|
+
if (r.push({
|
|
280
|
+
paramName: t,
|
|
281
|
+
isOptional: n != null
|
|
282
|
+
}), n) {
|
|
283
|
+
let t = a.charAt(i + e.length);
|
|
284
|
+
return t && t !== "/" ? "/([^\\/]*)" : "(?:/([^\\/]*))?";
|
|
285
|
+
}
|
|
286
|
+
return "/([^\\/]+)";
|
|
287
|
+
}).replace(/\/([\w-]+)\?(\/|$)/g, "(/$1)?$2");
|
|
288
|
+
return e.endsWith("*") ? (r.push({ paramName: "*" }), i += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : n ? i += "\\/*$" : e !== "" && e !== "/" && (i += "(?:(?=\\/|$))"), [new RegExp(i, t ? void 0 : "i"), r];
|
|
289
|
+
}
|
|
290
|
+
function ae(e) {
|
|
291
|
+
try {
|
|
292
|
+
return e.split("/").map((e) => decodeURIComponent(e).replace(/\//g, "%2F")).join("/");
|
|
293
|
+
} catch (t) {
|
|
294
|
+
return s(!1, `The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`), e;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
function k(e, t) {
|
|
298
|
+
if (t === "/") return e;
|
|
299
|
+
if (!e.toLowerCase().startsWith(t.toLowerCase())) return null;
|
|
300
|
+
let n = t.endsWith("/") ? t.length - 1 : t.length, r = e.charAt(n);
|
|
301
|
+
return r && r !== "/" ? null : e.slice(n) || "/";
|
|
302
|
+
}
|
|
303
|
+
var oe = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
|
|
304
|
+
function se(e, t = "/") {
|
|
305
|
+
let { pathname: n, search: r = "", hash: i = "" } = typeof e == "string" ? f(e) : e, a;
|
|
306
|
+
return n ? (n = fe(n), a = n.startsWith("/") ? ce(n.substring(1), "/") : ce(n, t)) : a = t, {
|
|
307
|
+
pathname: a,
|
|
308
|
+
search: me(r),
|
|
309
|
+
hash: he(i)
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
function ce(e, t) {
|
|
313
|
+
let n = M(t).split("/");
|
|
314
|
+
return e.split("/").forEach((e) => {
|
|
315
|
+
e === ".." ? n.length > 1 && n.pop() : e !== "." && n.push(e);
|
|
316
|
+
}), n.length > 1 ? n.join("/") : "/";
|
|
317
|
+
}
|
|
318
|
+
function le(e, t, n, r) {
|
|
319
|
+
return `Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`;
|
|
320
|
+
}
|
|
321
|
+
function ue(e) {
|
|
322
|
+
return e.filter((e, t) => t === 0 || e.route.path && e.route.path.length > 0);
|
|
323
|
+
}
|
|
324
|
+
function de(e) {
|
|
325
|
+
let t = ue(e);
|
|
326
|
+
return t.map((e, n) => n === t.length - 1 ? e.pathname : e.pathnameBase);
|
|
327
|
+
}
|
|
328
|
+
function A(e, t, n, r = !1) {
|
|
329
|
+
let i;
|
|
330
|
+
typeof e == "string" ? i = f(e) : (i = { ...e }, o(!i.pathname || !i.pathname.includes("?"), le("?", "pathname", "search", i)), o(!i.pathname || !i.pathname.includes("#"), le("#", "pathname", "hash", i)), o(!i.search || !i.search.includes("#"), le("#", "search", "hash", i)));
|
|
331
|
+
let a = e === "" || i.pathname === "", s = a ? "/" : i.pathname, c;
|
|
332
|
+
if (s == null) c = n;
|
|
333
|
+
else {
|
|
334
|
+
let e = t.length - 1;
|
|
335
|
+
if (!r && s.startsWith("..")) {
|
|
336
|
+
let t = s.split("/");
|
|
337
|
+
for (; t[0] === "..";) t.shift(), --e;
|
|
338
|
+
i.pathname = t.join("/");
|
|
339
|
+
}
|
|
340
|
+
c = e >= 0 ? t[e] : "/";
|
|
341
|
+
}
|
|
342
|
+
let l = se(i, c), u = s && s !== "/" && s.endsWith("/"), d = (a || s === ".") && n.endsWith("/");
|
|
343
|
+
return !l.pathname.endsWith("/") && (u || d) && (l.pathname += "/"), l;
|
|
344
|
+
}
|
|
345
|
+
var fe = (e) => e.replace(/\/\/+/g, "/"), j = (e) => fe(e.join("/")), M = (e) => e.replace(/\/+$/, ""), pe = (e) => M(e).replace(/^\/*/, "/"), me = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, he = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e, ge = class {
|
|
346
|
+
constructor(e, t, n, r = !1) {
|
|
347
|
+
this.status = e, this.statusText = t || "", this.internal = r, n instanceof Error ? (this.data = n.toString(), this.error = n) : this.data = n;
|
|
348
|
+
}
|
|
349
|
+
};
|
|
350
|
+
function _e(e) {
|
|
351
|
+
return e != null && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.internal == "boolean" && "data" in e;
|
|
352
|
+
}
|
|
353
|
+
function ve(e) {
|
|
354
|
+
return j(e.map((e) => e.route.path).filter(Boolean)) || "/";
|
|
355
|
+
}
|
|
356
|
+
var ye = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0;
|
|
357
|
+
function be(e, t) {
|
|
358
|
+
let n = e;
|
|
359
|
+
if (typeof n != "string" || !oe.test(n)) return {
|
|
360
|
+
absoluteURL: void 0,
|
|
361
|
+
isExternal: !1,
|
|
362
|
+
to: n
|
|
363
|
+
};
|
|
364
|
+
let r = n, i = !1;
|
|
365
|
+
if (ye) try {
|
|
366
|
+
let e = new URL(window.location.href), r = n.startsWith("//") ? new URL(e.protocol + n) : new URL(n), a = k(r.pathname, t);
|
|
367
|
+
r.origin === e.origin && a != null ? n = a + r.search + r.hash : i = !0;
|
|
368
|
+
} catch {
|
|
369
|
+
s(!1, `<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`);
|
|
370
|
+
}
|
|
371
|
+
return {
|
|
372
|
+
absoluteURL: r,
|
|
373
|
+
isExternal: i,
|
|
374
|
+
to: n
|
|
375
|
+
};
|
|
376
|
+
}
|
|
377
|
+
Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
|
|
378
|
+
var xe = [
|
|
379
|
+
"POST",
|
|
380
|
+
"PUT",
|
|
381
|
+
"PATCH",
|
|
382
|
+
"DELETE"
|
|
383
|
+
];
|
|
384
|
+
new Set(xe);
|
|
385
|
+
var Se = ["GET", ...xe];
|
|
386
|
+
new Set(Se);
|
|
387
|
+
var N = n.createContext(null);
|
|
388
|
+
N.displayName = "DataRouter";
|
|
389
|
+
var P = n.createContext(null);
|
|
390
|
+
P.displayName = "DataRouterState";
|
|
391
|
+
var Ce = n.createContext(!1);
|
|
392
|
+
function we() {
|
|
393
|
+
return n.useContext(Ce);
|
|
394
|
+
}
|
|
395
|
+
var Te = n.createContext({ isTransitioning: !1 });
|
|
396
|
+
Te.displayName = "ViewTransition";
|
|
397
|
+
var Ee = n.createContext(/* @__PURE__ */ new Map());
|
|
398
|
+
Ee.displayName = "Fetchers";
|
|
399
|
+
var De = n.createContext(null);
|
|
400
|
+
De.displayName = "Await";
|
|
401
|
+
var F = n.createContext(null);
|
|
402
|
+
F.displayName = "Navigation";
|
|
403
|
+
var I = n.createContext(null);
|
|
404
|
+
I.displayName = "Location";
|
|
405
|
+
var L = n.createContext({
|
|
406
|
+
outlet: null,
|
|
407
|
+
matches: [],
|
|
408
|
+
isDataRoute: !1
|
|
409
|
+
});
|
|
410
|
+
L.displayName = "Route";
|
|
411
|
+
var R = n.createContext(null);
|
|
412
|
+
R.displayName = "RouteError";
|
|
413
|
+
var Oe = "REACT_ROUTER_ERROR", ke = "REDIRECT", Ae = "ROUTE_ERROR_RESPONSE";
|
|
414
|
+
function je(e) {
|
|
415
|
+
if (e.startsWith(`${Oe}:${ke}:{`)) try {
|
|
416
|
+
let t = JSON.parse(e.slice(28));
|
|
417
|
+
if (typeof t == "object" && t && typeof t.status == "number" && typeof t.statusText == "string" && typeof t.location == "string" && typeof t.reloadDocument == "boolean" && typeof t.replace == "boolean") return t;
|
|
418
|
+
} catch {}
|
|
419
|
+
}
|
|
420
|
+
function Me(e) {
|
|
421
|
+
if (e.startsWith(`${Oe}:${Ae}:{`)) try {
|
|
422
|
+
let t = JSON.parse(e.slice(40));
|
|
423
|
+
if (typeof t == "object" && t && typeof t.status == "number" && typeof t.statusText == "string") return new ge(t.status, t.statusText, t.data);
|
|
424
|
+
} catch {}
|
|
425
|
+
}
|
|
426
|
+
function Ne(e, { relative: t } = {}) {
|
|
427
|
+
o(z(), "useHref() may be used only in the context of a <Router> component.");
|
|
428
|
+
let { basename: r, navigator: i } = n.useContext(F), { hash: a, pathname: s, search: c } = H(e, { relative: t }), l = s;
|
|
429
|
+
return r !== "/" && (l = s === "/" ? r : j([r, s])), i.createHref({
|
|
430
|
+
pathname: l,
|
|
431
|
+
search: c,
|
|
432
|
+
hash: a
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
function z() {
|
|
436
|
+
return n.useContext(I) != null;
|
|
437
|
+
}
|
|
438
|
+
function B() {
|
|
439
|
+
return o(z(), "useLocation() may be used only in the context of a <Router> component."), n.useContext(I).location;
|
|
440
|
+
}
|
|
441
|
+
var Pe = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
|
|
442
|
+
function Fe(e) {
|
|
443
|
+
n.useContext(F).static || n.useLayoutEffect(e);
|
|
444
|
+
}
|
|
445
|
+
function V() {
|
|
446
|
+
let { isDataRoute: e } = n.useContext(L);
|
|
447
|
+
return e ? $e() : Ie();
|
|
448
|
+
}
|
|
449
|
+
function Ie() {
|
|
450
|
+
o(z(), "useNavigate() may be used only in the context of a <Router> component.");
|
|
451
|
+
let e = n.useContext(N), { basename: t, navigator: r } = n.useContext(F), { matches: i } = n.useContext(L), { pathname: a } = B(), c = JSON.stringify(de(i)), l = n.useRef(!1);
|
|
452
|
+
return Fe(() => {
|
|
453
|
+
l.current = !0;
|
|
454
|
+
}), n.useCallback((n, i = {}) => {
|
|
455
|
+
if (s(l.current, Pe), !l.current) return;
|
|
456
|
+
if (typeof n == "number") {
|
|
457
|
+
r.go(n);
|
|
458
|
+
return;
|
|
459
|
+
}
|
|
460
|
+
let o = A(n, JSON.parse(c), a, i.relative === "path");
|
|
461
|
+
e == null && t !== "/" && (o.pathname = o.pathname === "/" ? t : j([t, o.pathname])), (i.replace ? r.replace : r.push)(o, i.state, i);
|
|
462
|
+
}, [
|
|
463
|
+
t,
|
|
464
|
+
r,
|
|
465
|
+
c,
|
|
466
|
+
a,
|
|
467
|
+
e
|
|
468
|
+
]);
|
|
469
|
+
}
|
|
470
|
+
n.createContext(null);
|
|
471
|
+
function Le() {
|
|
472
|
+
let { matches: e } = n.useContext(L);
|
|
473
|
+
return e[e.length - 1]?.params ?? {};
|
|
474
|
+
}
|
|
475
|
+
function H(e, { relative: t } = {}) {
|
|
476
|
+
let { matches: r } = n.useContext(L), { pathname: i } = B(), a = JSON.stringify(de(r));
|
|
477
|
+
return n.useMemo(() => A(e, JSON.parse(a), i, t === "path"), [
|
|
478
|
+
e,
|
|
479
|
+
a,
|
|
480
|
+
i,
|
|
481
|
+
t
|
|
482
|
+
]);
|
|
483
|
+
}
|
|
484
|
+
function Re(e, t) {
|
|
485
|
+
return ze(e, t);
|
|
486
|
+
}
|
|
487
|
+
function ze(e, t, r) {
|
|
488
|
+
o(z(), "useRoutes() may be used only in the context of a <Router> component.");
|
|
489
|
+
let { navigator: i } = n.useContext(F), { matches: a } = n.useContext(L), c = a[a.length - 1], l = c ? c.params : {}, u = c ? c.pathname : "/", d = c ? c.pathnameBase : "/", p = c && c.route;
|
|
490
|
+
{
|
|
491
|
+
let e = p && p.path || "";
|
|
492
|
+
tt(u, !p || e.endsWith("*") || e.endsWith("*?"), `You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${e}">) 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.
|
|
493
|
+
|
|
494
|
+
Please change the parent <Route path="${e}"> to <Route path="${e === "/" ? "*" : `${e}/*`}">.`);
|
|
495
|
+
}
|
|
496
|
+
let m = B(), g;
|
|
497
|
+
if (t) {
|
|
498
|
+
let e = typeof t == "string" ? f(t) : t;
|
|
499
|
+
o(d === "/" || e.pathname?.startsWith(d), `When overriding the location using \`<Routes location>\` 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 "${d}" but pathname "${e.pathname}" was given in the \`location\` prop.`), g = e;
|
|
500
|
+
} else g = m;
|
|
501
|
+
let _ = g.pathname || "/", v = _;
|
|
502
|
+
if (d !== "/") {
|
|
503
|
+
let e = d.replace(/^\//, "").split("/");
|
|
504
|
+
v = "/" + _.replace(/^\//, "").split("/").slice(e.length).join("/");
|
|
505
|
+
}
|
|
506
|
+
let y = r && r.state.matches.length ? r.state.matches.map((e) => Object.assign(e, { route: r.manifest[e.route.id] || e.route })) : h(e, { pathname: v });
|
|
507
|
+
s(p || y != null, `No routes matched location "${g.pathname}${g.search}${g.hash}" `), s(y == null || y[y.length - 1].route.element !== void 0 || y[y.length - 1].route.Component !== void 0 || y[y.length - 1].route.lazy !== void 0, `Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);
|
|
508
|
+
let b = Ge(y && y.map((e) => Object.assign({}, e, {
|
|
509
|
+
params: Object.assign({}, l, e.params),
|
|
510
|
+
pathname: j([d, i.encodeLocation ? i.encodeLocation(e.pathname.replace(/%/g, "%25").replace(/\?/g, "%3F").replace(/#/g, "%23")).pathname : e.pathname]),
|
|
511
|
+
pathnameBase: e.pathnameBase === "/" ? d : j([d, i.encodeLocation ? i.encodeLocation(e.pathnameBase.replace(/%/g, "%25").replace(/\?/g, "%3F").replace(/#/g, "%23")).pathname : e.pathnameBase])
|
|
512
|
+
})), a, r);
|
|
513
|
+
return t && b ? /* @__PURE__ */ n.createElement(I.Provider, { value: {
|
|
514
|
+
location: {
|
|
515
|
+
pathname: "/",
|
|
516
|
+
search: "",
|
|
517
|
+
hash: "",
|
|
518
|
+
state: null,
|
|
519
|
+
key: "default",
|
|
520
|
+
mask: void 0,
|
|
521
|
+
...g
|
|
522
|
+
},
|
|
523
|
+
navigationType: "POP"
|
|
524
|
+
} }, b) : b;
|
|
525
|
+
}
|
|
526
|
+
function Be() {
|
|
527
|
+
let e = Qe(), t = _e(e) ? `${e.status} ${e.statusText}` : e instanceof Error ? e.message : JSON.stringify(e), r = e instanceof Error ? e.stack : null, i = "rgba(200,200,200, 0.5)", a = {
|
|
528
|
+
padding: "0.5rem",
|
|
529
|
+
backgroundColor: i
|
|
530
|
+
}, o = {
|
|
531
|
+
padding: "2px 4px",
|
|
532
|
+
backgroundColor: i
|
|
533
|
+
}, s = null;
|
|
534
|
+
return console.error("Error handled by React Router default ErrorBoundary:", e), s = /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ n.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ n.createElement("code", { style: o }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ n.createElement("code", { style: o }, "errorElement"), " prop on your route.")), /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ n.createElement("h3", { style: { fontStyle: "italic" } }, t), r ? /* @__PURE__ */ n.createElement("pre", { style: a }, r) : null, s);
|
|
535
|
+
}
|
|
536
|
+
var Ve = /* @__PURE__ */ n.createElement(Be, null), He = class extends n.Component {
|
|
537
|
+
constructor(e) {
|
|
538
|
+
super(e), this.state = {
|
|
539
|
+
location: e.location,
|
|
540
|
+
revalidation: e.revalidation,
|
|
541
|
+
error: e.error
|
|
542
|
+
};
|
|
543
|
+
}
|
|
544
|
+
static getDerivedStateFromError(e) {
|
|
545
|
+
return { error: e };
|
|
546
|
+
}
|
|
547
|
+
static getDerivedStateFromProps(e, t) {
|
|
548
|
+
return t.location !== e.location || t.revalidation !== "idle" && e.revalidation === "idle" ? {
|
|
549
|
+
error: e.error,
|
|
550
|
+
location: e.location,
|
|
551
|
+
revalidation: e.revalidation
|
|
552
|
+
} : {
|
|
553
|
+
error: e.error === void 0 ? t.error : e.error,
|
|
554
|
+
location: t.location,
|
|
555
|
+
revalidation: e.revalidation || t.revalidation
|
|
556
|
+
};
|
|
557
|
+
}
|
|
558
|
+
componentDidCatch(e, t) {
|
|
559
|
+
this.props.onError ? this.props.onError(e, t) : console.error("React Router caught the following error during render", e);
|
|
560
|
+
}
|
|
561
|
+
render() {
|
|
562
|
+
let e = this.state.error;
|
|
563
|
+
if (this.context && typeof e == "object" && e && "digest" in e && typeof e.digest == "string") {
|
|
564
|
+
let t = Me(e.digest);
|
|
565
|
+
t && (e = t);
|
|
566
|
+
}
|
|
567
|
+
let t = e === void 0 ? this.props.children : /* @__PURE__ */ n.createElement(L.Provider, { value: this.props.routeContext }, /* @__PURE__ */ n.createElement(R.Provider, {
|
|
568
|
+
value: e,
|
|
569
|
+
children: this.props.component
|
|
570
|
+
}));
|
|
571
|
+
return this.context ? /* @__PURE__ */ n.createElement(Ue, { error: e }, t) : t;
|
|
572
|
+
}
|
|
573
|
+
};
|
|
574
|
+
He.contextType = Ce;
|
|
575
|
+
var U = /* @__PURE__ */ new WeakMap();
|
|
576
|
+
function Ue({ children: e, error: t }) {
|
|
577
|
+
let { basename: r } = n.useContext(F);
|
|
578
|
+
if (typeof t == "object" && t && "digest" in t && typeof t.digest == "string") {
|
|
579
|
+
let e = je(t.digest);
|
|
580
|
+
if (e) {
|
|
581
|
+
let i = U.get(t);
|
|
582
|
+
if (i) throw i;
|
|
583
|
+
let a = be(e.location, r);
|
|
584
|
+
if (ye && !U.get(t)) if (a.isExternal || e.reloadDocument) window.location.href = a.absoluteURL || a.to;
|
|
585
|
+
else {
|
|
586
|
+
let n = Promise.resolve().then(() => window.__reactRouterDataRouter.navigate(a.to, { replace: e.replace }));
|
|
587
|
+
throw U.set(t, n), n;
|
|
588
|
+
}
|
|
589
|
+
return /* @__PURE__ */ n.createElement("meta", {
|
|
590
|
+
httpEquiv: "refresh",
|
|
591
|
+
content: `0;url=${a.absoluteURL || a.to}`
|
|
592
|
+
});
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
return e;
|
|
596
|
+
}
|
|
597
|
+
function We({ routeContext: e, match: t, children: r }) {
|
|
598
|
+
let i = n.useContext(N);
|
|
599
|
+
return i && i.static && i.staticContext && (t.route.errorElement || t.route.ErrorBoundary) && (i.staticContext._deepestRenderedBoundaryId = t.route.id), /* @__PURE__ */ n.createElement(L.Provider, { value: e }, r);
|
|
600
|
+
}
|
|
601
|
+
function Ge(e, t = [], r) {
|
|
602
|
+
let i = r?.state;
|
|
603
|
+
if (e == null) {
|
|
604
|
+
if (!i) return null;
|
|
605
|
+
if (i.errors) e = i.matches;
|
|
606
|
+
else if (t.length === 0 && !i.initialized && i.matches.length > 0) e = i.matches;
|
|
607
|
+
else return null;
|
|
608
|
+
}
|
|
609
|
+
let a = e, s = i?.errors;
|
|
610
|
+
if (s != null) {
|
|
611
|
+
let e = a.findIndex((e) => e.route.id && s?.[e.route.id] !== void 0);
|
|
612
|
+
o(e >= 0, `Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`), a = a.slice(0, Math.min(a.length, e + 1));
|
|
613
|
+
}
|
|
614
|
+
let c = !1, l = -1;
|
|
615
|
+
if (r && i) {
|
|
616
|
+
c = i.renderFallback;
|
|
617
|
+
for (let e = 0; e < a.length; e++) {
|
|
618
|
+
let t = a[e];
|
|
619
|
+
if ((t.route.HydrateFallback || t.route.hydrateFallbackElement) && (l = e), t.route.id) {
|
|
620
|
+
let { loaderData: e, errors: n } = i, o = t.route.loader && !e.hasOwnProperty(t.route.id) && (!n || n[t.route.id] === void 0);
|
|
621
|
+
if (t.route.lazy || o) {
|
|
622
|
+
r.isStatic && (c = !0), a = l >= 0 ? a.slice(0, l + 1) : [a[0]];
|
|
623
|
+
break;
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
let u = r?.onError, d = i && u ? (e, t) => {
|
|
629
|
+
u(e, {
|
|
630
|
+
location: i.location,
|
|
631
|
+
params: i.matches?.[0]?.params ?? {},
|
|
632
|
+
pattern: ve(i.matches),
|
|
633
|
+
errorInfo: t
|
|
634
|
+
});
|
|
635
|
+
} : void 0;
|
|
636
|
+
return a.reduceRight((e, r, o) => {
|
|
637
|
+
let u, f = !1, p = null, m = null;
|
|
638
|
+
i && (u = s && r.route.id ? s[r.route.id] : void 0, p = r.route.errorElement || Ve, c && (l < 0 && o === 0 ? (tt("route-fallback", !1, "No `HydrateFallback` element provided to render during initial hydration"), f = !0, m = null) : l === o && (f = !0, m = r.route.hydrateFallbackElement || null)));
|
|
639
|
+
let h = t.concat(a.slice(0, o + 1)), g = () => {
|
|
640
|
+
let t;
|
|
641
|
+
return t = u ? p : f ? m : r.route.Component ? /* @__PURE__ */ n.createElement(r.route.Component, null) : r.route.element ? r.route.element : e, /* @__PURE__ */ n.createElement(We, {
|
|
642
|
+
match: r,
|
|
643
|
+
routeContext: {
|
|
644
|
+
outlet: e,
|
|
645
|
+
matches: h,
|
|
646
|
+
isDataRoute: i != null
|
|
647
|
+
},
|
|
648
|
+
children: t
|
|
649
|
+
});
|
|
650
|
+
};
|
|
651
|
+
return i && (r.route.ErrorBoundary || r.route.errorElement || o === 0) ? /* @__PURE__ */ n.createElement(He, {
|
|
652
|
+
location: i.location,
|
|
653
|
+
revalidation: i.revalidation,
|
|
654
|
+
component: p,
|
|
655
|
+
error: u,
|
|
656
|
+
children: g(),
|
|
657
|
+
routeContext: {
|
|
658
|
+
outlet: null,
|
|
659
|
+
matches: h,
|
|
660
|
+
isDataRoute: !0
|
|
661
|
+
},
|
|
662
|
+
onError: d
|
|
663
|
+
}) : g();
|
|
664
|
+
}, null);
|
|
665
|
+
}
|
|
666
|
+
function W(e) {
|
|
667
|
+
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
668
|
+
}
|
|
669
|
+
function Ke(e) {
|
|
670
|
+
let t = n.useContext(N);
|
|
671
|
+
return o(t, W(e)), t;
|
|
672
|
+
}
|
|
673
|
+
function G(e) {
|
|
674
|
+
let t = n.useContext(P);
|
|
675
|
+
return o(t, W(e)), t;
|
|
676
|
+
}
|
|
677
|
+
function qe(e) {
|
|
678
|
+
let t = n.useContext(L);
|
|
679
|
+
return o(t, W(e)), t;
|
|
680
|
+
}
|
|
681
|
+
function Je(e) {
|
|
682
|
+
let t = qe(e), n = t.matches[t.matches.length - 1];
|
|
683
|
+
return o(n.route.id, `${e} can only be used on routes that contain a unique "id"`), n.route.id;
|
|
684
|
+
}
|
|
685
|
+
function Ye() {
|
|
686
|
+
return Je("useRouteId");
|
|
687
|
+
}
|
|
688
|
+
function Xe() {
|
|
689
|
+
let e = G("useNavigation");
|
|
690
|
+
return n.useMemo(() => {
|
|
691
|
+
let { matches: t, historyAction: n, ...r } = e.navigation;
|
|
692
|
+
return r;
|
|
693
|
+
}, [e.navigation]);
|
|
694
|
+
}
|
|
695
|
+
function Ze() {
|
|
696
|
+
let { matches: e, loaderData: t } = G("useMatches");
|
|
697
|
+
return n.useMemo(() => e.map((e) => _(e, t)), [e, t]);
|
|
698
|
+
}
|
|
699
|
+
function Qe() {
|
|
700
|
+
let e = n.useContext(R), t = G("useRouteError"), r = Je("useRouteError");
|
|
701
|
+
return e === void 0 ? t.errors?.[r] : e;
|
|
702
|
+
}
|
|
703
|
+
function $e() {
|
|
704
|
+
let { router: e } = Ke("useNavigate"), t = Je("useNavigate"), r = n.useRef(!1);
|
|
705
|
+
return Fe(() => {
|
|
706
|
+
r.current = !0;
|
|
707
|
+
}), n.useCallback(async (n, i = {}) => {
|
|
708
|
+
s(r.current, Pe), r.current && (typeof n == "number" ? await e.navigate(n) : await e.navigate(n, {
|
|
709
|
+
fromRouteId: t,
|
|
710
|
+
...i
|
|
711
|
+
}));
|
|
712
|
+
}, [e, t]);
|
|
713
|
+
}
|
|
714
|
+
var et = {};
|
|
715
|
+
function tt(e, t, n) {
|
|
716
|
+
!t && !et[e] && (et[e] = !0, s(!1, n));
|
|
717
|
+
}
|
|
718
|
+
n.memo(nt);
|
|
719
|
+
function nt({ routes: e, manifest: t, future: n, state: r, isStatic: i, onError: a }) {
|
|
720
|
+
return ze(e, void 0, {
|
|
721
|
+
manifest: t,
|
|
722
|
+
state: r,
|
|
723
|
+
isStatic: i,
|
|
724
|
+
onError: a,
|
|
725
|
+
future: n
|
|
726
|
+
});
|
|
727
|
+
}
|
|
728
|
+
function rt(e) {
|
|
729
|
+
o(!1, "A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.");
|
|
730
|
+
}
|
|
731
|
+
function it({ basename: e = "/", children: t = null, location: r, navigationType: i = "POP", navigator: a, static: c = !1, useTransitions: l }) {
|
|
732
|
+
o(!z(), "You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");
|
|
733
|
+
let u = e.replace(/^\/*/, "/"), d = n.useMemo(() => ({
|
|
734
|
+
basename: u,
|
|
735
|
+
navigator: a,
|
|
736
|
+
static: c,
|
|
737
|
+
useTransitions: l,
|
|
738
|
+
future: {}
|
|
739
|
+
}), [
|
|
740
|
+
u,
|
|
741
|
+
a,
|
|
742
|
+
c,
|
|
743
|
+
l
|
|
744
|
+
]);
|
|
745
|
+
typeof r == "string" && (r = f(r));
|
|
746
|
+
let { pathname: p = "/", search: m = "", hash: h = "", state: g = null, key: _ = "default", mask: v } = r, y = n.useMemo(() => {
|
|
747
|
+
let e = k(p, u);
|
|
748
|
+
return e == null ? null : {
|
|
749
|
+
location: {
|
|
750
|
+
pathname: e,
|
|
751
|
+
search: m,
|
|
752
|
+
hash: h,
|
|
753
|
+
state: g,
|
|
754
|
+
key: _,
|
|
755
|
+
mask: v
|
|
756
|
+
},
|
|
757
|
+
navigationType: i
|
|
758
|
+
};
|
|
759
|
+
}, [
|
|
760
|
+
u,
|
|
761
|
+
p,
|
|
762
|
+
m,
|
|
763
|
+
h,
|
|
764
|
+
g,
|
|
765
|
+
_,
|
|
766
|
+
i,
|
|
767
|
+
v
|
|
768
|
+
]);
|
|
769
|
+
return s(y != null, `<Router basename="${u}"> is not able to match the URL "${p}${m}${h}" because it does not start with the basename, so the <Router> won't render anything.`), y == null ? null : /* @__PURE__ */ n.createElement(F.Provider, { value: d }, /* @__PURE__ */ n.createElement(I.Provider, {
|
|
770
|
+
children: t,
|
|
771
|
+
value: y
|
|
772
|
+
}));
|
|
773
|
+
}
|
|
774
|
+
function at({ children: e, location: t }) {
|
|
775
|
+
return Re(ot(e), t);
|
|
776
|
+
}
|
|
777
|
+
n.Component;
|
|
778
|
+
function ot(e, t = []) {
|
|
779
|
+
let r = [];
|
|
780
|
+
return n.Children.forEach(e, (e, i) => {
|
|
781
|
+
if (!n.isValidElement(e)) return;
|
|
782
|
+
let a = [...t, i];
|
|
783
|
+
if (e.type === n.Fragment) {
|
|
784
|
+
r.push.apply(r, ot(e.props.children, a));
|
|
785
|
+
return;
|
|
786
|
+
}
|
|
787
|
+
o(e.type === rt, `[${typeof e.type == "string" ? e.type : e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`), o(!e.props.index || !e.props.children, "An index route cannot have child routes.");
|
|
788
|
+
let s = {
|
|
789
|
+
id: e.props.id || a.join("-"),
|
|
790
|
+
caseSensitive: e.props.caseSensitive,
|
|
791
|
+
element: e.props.element,
|
|
792
|
+
Component: e.props.Component,
|
|
793
|
+
index: e.props.index,
|
|
794
|
+
path: e.props.path,
|
|
795
|
+
middleware: e.props.middleware,
|
|
796
|
+
loader: e.props.loader,
|
|
797
|
+
action: e.props.action,
|
|
798
|
+
hydrateFallbackElement: e.props.hydrateFallbackElement,
|
|
799
|
+
HydrateFallback: e.props.HydrateFallback,
|
|
800
|
+
errorElement: e.props.errorElement,
|
|
801
|
+
ErrorBoundary: e.props.ErrorBoundary,
|
|
802
|
+
hasErrorBoundary: e.props.hasErrorBoundary === !0 || e.props.ErrorBoundary != null || e.props.errorElement != null,
|
|
803
|
+
shouldRevalidate: e.props.shouldRevalidate,
|
|
804
|
+
handle: e.props.handle,
|
|
805
|
+
lazy: e.props.lazy
|
|
806
|
+
};
|
|
807
|
+
e.props.children && (s.children = ot(e.props.children, a)), r.push(s);
|
|
808
|
+
}), r;
|
|
809
|
+
}
|
|
810
|
+
var K = "get", q = "application/x-www-form-urlencoded";
|
|
811
|
+
function J(e) {
|
|
812
|
+
return typeof HTMLElement < "u" && e instanceof HTMLElement;
|
|
813
|
+
}
|
|
814
|
+
function st(e) {
|
|
815
|
+
return J(e) && e.tagName.toLowerCase() === "button";
|
|
816
|
+
}
|
|
817
|
+
function ct(e) {
|
|
818
|
+
return J(e) && e.tagName.toLowerCase() === "form";
|
|
819
|
+
}
|
|
820
|
+
function lt(e) {
|
|
821
|
+
return J(e) && e.tagName.toLowerCase() === "input";
|
|
822
|
+
}
|
|
823
|
+
function ut(e) {
|
|
824
|
+
return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
|
|
825
|
+
}
|
|
826
|
+
function dt(e, t) {
|
|
827
|
+
return e.button === 0 && (!t || t === "_self") && !ut(e);
|
|
828
|
+
}
|
|
829
|
+
function ft(e = "") {
|
|
830
|
+
return new URLSearchParams(typeof e == "string" || Array.isArray(e) || e instanceof URLSearchParams ? e : Object.keys(e).reduce((t, n) => {
|
|
831
|
+
let r = e[n];
|
|
832
|
+
return t.concat(Array.isArray(r) ? r.map((e) => [n, e]) : [[n, r]]);
|
|
833
|
+
}, []));
|
|
834
|
+
}
|
|
835
|
+
function pt(e, t) {
|
|
836
|
+
let n = ft(e);
|
|
837
|
+
return t && t.forEach((e, r) => {
|
|
838
|
+
n.has(r) || t.getAll(r).forEach((e) => {
|
|
839
|
+
n.append(r, e);
|
|
840
|
+
});
|
|
841
|
+
}), n;
|
|
842
|
+
}
|
|
843
|
+
var Y = null;
|
|
844
|
+
function mt() {
|
|
845
|
+
if (Y === null) try {
|
|
846
|
+
new FormData(document.createElement("form"), 0), Y = !1;
|
|
847
|
+
} catch {
|
|
848
|
+
Y = !0;
|
|
849
|
+
}
|
|
850
|
+
return Y;
|
|
851
|
+
}
|
|
852
|
+
var ht = /* @__PURE__ */ new Set([
|
|
853
|
+
"application/x-www-form-urlencoded",
|
|
854
|
+
"multipart/form-data",
|
|
855
|
+
"text/plain"
|
|
856
|
+
]);
|
|
857
|
+
function gt(e) {
|
|
858
|
+
return e != null && !ht.has(e) ? (s(!1, `"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${q}"`), null) : e;
|
|
859
|
+
}
|
|
860
|
+
function _t(e, t) {
|
|
861
|
+
let n, r, i, a, o;
|
|
862
|
+
if (ct(e)) {
|
|
863
|
+
let o = e.getAttribute("action");
|
|
864
|
+
r = o ? k(o, t) : null, n = e.getAttribute("method") || K, i = gt(e.getAttribute("enctype")) || q, a = new FormData(e);
|
|
865
|
+
} else if (st(e) || lt(e) && (e.type === "submit" || e.type === "image")) {
|
|
866
|
+
let o = e.form;
|
|
867
|
+
if (o == null) throw Error("Cannot submit a <button> or <input type=\"submit\"> without a <form>");
|
|
868
|
+
let s = e.getAttribute("formaction") || o.getAttribute("action");
|
|
869
|
+
if (r = s ? k(s, t) : null, n = e.getAttribute("formmethod") || o.getAttribute("method") || K, i = gt(e.getAttribute("formenctype")) || gt(o.getAttribute("enctype")) || q, a = new FormData(o, e), !mt()) {
|
|
870
|
+
let { name: t, type: n, value: r } = e;
|
|
871
|
+
if (n === "image") {
|
|
872
|
+
let e = t ? `${t}.` : "";
|
|
873
|
+
a.append(`${e}x`, "0"), a.append(`${e}y`, "0");
|
|
874
|
+
} else t && a.append(t, r);
|
|
875
|
+
}
|
|
876
|
+
} else if (J(e)) throw Error("Cannot submit element that is not <form>, <button>, or <input type=\"submit|image\">");
|
|
877
|
+
else n = K, r = null, i = q, o = e;
|
|
878
|
+
return a && i === "text/plain" && (o = a, a = void 0), {
|
|
879
|
+
action: r,
|
|
880
|
+
method: n.toLowerCase(),
|
|
881
|
+
encType: i,
|
|
882
|
+
formData: a,
|
|
883
|
+
body: o
|
|
884
|
+
};
|
|
885
|
+
}
|
|
886
|
+
Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
|
|
887
|
+
var vt = {
|
|
888
|
+
"&": "\\u0026",
|
|
889
|
+
">": "\\u003e",
|
|
890
|
+
"<": "\\u003c",
|
|
891
|
+
"\u2028": "\\u2028",
|
|
892
|
+
"\u2029": "\\u2029"
|
|
893
|
+
}, yt = /[&><\u2028\u2029]/g;
|
|
894
|
+
function bt(e) {
|
|
895
|
+
return e.replace(yt, (e) => vt[e]);
|
|
896
|
+
}
|
|
897
|
+
function xt(e, t) {
|
|
898
|
+
if (e === !1 || e == null) throw Error(t);
|
|
899
|
+
}
|
|
900
|
+
function St(e, t, n, r) {
|
|
901
|
+
let i = typeof e == "string" ? new URL(e, typeof window > "u" ? "server://singlefetch/" : window.location.origin) : e;
|
|
902
|
+
return n ? i.pathname.endsWith("/") ? i.pathname = `${i.pathname}_.${r}` : i.pathname = `${i.pathname}.${r}` : i.pathname === "/" ? i.pathname = `_root.${r}` : t && k(i.pathname, t) === "/" ? i.pathname = `${M(t)}/_root.${r}` : i.pathname = `${M(i.pathname)}.${r}`, i;
|
|
903
|
+
}
|
|
904
|
+
async function Ct(e, t) {
|
|
905
|
+
if (e.id in t) return t[e.id];
|
|
906
|
+
try {
|
|
907
|
+
let n = await import(
|
|
908
|
+
/* @vite-ignore */
|
|
909
|
+
/* webpackIgnore: true */
|
|
910
|
+
e.module
|
|
911
|
+
);
|
|
912
|
+
return t[e.id] = n, n;
|
|
913
|
+
} catch (t) {
|
|
914
|
+
return console.error(`Error loading route module \`${e.module}\`, reloading page...`), console.error(t), window.__reactRouterContext && window.__reactRouterContext.isSpaMode, window.location.reload(), new Promise(() => {});
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
function wt(e) {
|
|
918
|
+
return e != null && typeof e.page == "string";
|
|
919
|
+
}
|
|
920
|
+
function Tt(e) {
|
|
921
|
+
return e == null ? !1 : e.href == null ? e.rel === "preload" && typeof e.imageSrcSet == "string" && typeof e.imageSizes == "string" : typeof e.rel == "string" && typeof e.href == "string";
|
|
922
|
+
}
|
|
923
|
+
async function Et(e, t, n) {
|
|
924
|
+
return jt((await Promise.all(e.map(async (e) => {
|
|
925
|
+
let r = t.routes[e.route.id];
|
|
926
|
+
if (r) {
|
|
927
|
+
let e = await Ct(r, n);
|
|
928
|
+
return e.links ? e.links() : [];
|
|
929
|
+
}
|
|
930
|
+
return [];
|
|
931
|
+
}))).flat(1).filter(Tt).filter((e) => e.rel === "stylesheet" || e.rel === "preload").map((e) => e.rel === "stylesheet" ? {
|
|
932
|
+
...e,
|
|
933
|
+
rel: "prefetch",
|
|
934
|
+
as: "style"
|
|
935
|
+
} : {
|
|
936
|
+
...e,
|
|
937
|
+
rel: "prefetch"
|
|
938
|
+
}));
|
|
939
|
+
}
|
|
940
|
+
function Dt(e, t, n, r, i, a) {
|
|
941
|
+
let o = (e, t) => n[t] ? e.route.id !== n[t].route.id : !0, s = (e, t) => n[t].pathname !== e.pathname || n[t].route.path?.endsWith("*") && n[t].params["*"] !== e.params["*"];
|
|
942
|
+
return a === "assets" ? t.filter((e, t) => o(e, t) || s(e, t)) : a === "data" ? t.filter((t, a) => {
|
|
943
|
+
let c = r.routes[t.route.id];
|
|
944
|
+
if (!c || !c.hasLoader) return !1;
|
|
945
|
+
if (o(t, a) || s(t, a)) return !0;
|
|
946
|
+
if (t.route.shouldRevalidate) {
|
|
947
|
+
let r = t.route.shouldRevalidate({
|
|
948
|
+
currentUrl: new URL(i.pathname + i.search + i.hash, window.origin),
|
|
949
|
+
currentParams: n[0]?.params || {},
|
|
950
|
+
nextUrl: new URL(e, window.origin),
|
|
951
|
+
nextParams: t.params,
|
|
952
|
+
defaultShouldRevalidate: !0
|
|
953
|
+
});
|
|
954
|
+
if (typeof r == "boolean") return r;
|
|
955
|
+
}
|
|
956
|
+
return !0;
|
|
957
|
+
}) : [];
|
|
958
|
+
}
|
|
959
|
+
function Ot(e, t, { includeHydrateFallback: n } = {}) {
|
|
960
|
+
return kt(e.map((e) => {
|
|
961
|
+
let r = t.routes[e.route.id];
|
|
962
|
+
if (!r) return [];
|
|
963
|
+
let i = [r.module];
|
|
964
|
+
return r.clientActionModule && (i = i.concat(r.clientActionModule)), r.clientLoaderModule && (i = i.concat(r.clientLoaderModule)), n && r.hydrateFallbackModule && (i = i.concat(r.hydrateFallbackModule)), r.imports && (i = i.concat(r.imports)), i;
|
|
965
|
+
}).flat(1));
|
|
966
|
+
}
|
|
967
|
+
function kt(e) {
|
|
968
|
+
return [...new Set(e)];
|
|
969
|
+
}
|
|
970
|
+
function At(e) {
|
|
971
|
+
let t = {}, n = Object.keys(e).sort();
|
|
972
|
+
for (let r of n) t[r] = e[r];
|
|
973
|
+
return t;
|
|
974
|
+
}
|
|
975
|
+
function jt(e, t) {
|
|
976
|
+
let n = /* @__PURE__ */ new Set(), r = new Set(t);
|
|
977
|
+
return e.reduce((e, i) => {
|
|
978
|
+
if (t && !wt(i) && i.as === "script" && i.href && r.has(i.href)) return e;
|
|
979
|
+
let a = JSON.stringify(At(i));
|
|
980
|
+
return n.has(a) || (n.add(a), e.push({
|
|
981
|
+
key: a,
|
|
982
|
+
link: i
|
|
983
|
+
})), e;
|
|
984
|
+
}, []);
|
|
985
|
+
}
|
|
986
|
+
function X() {
|
|
987
|
+
let e = n.useContext(N);
|
|
988
|
+
return xt(e, "You must render this element inside a <DataRouterContext.Provider> element"), e;
|
|
989
|
+
}
|
|
990
|
+
function Mt() {
|
|
991
|
+
let e = n.useContext(P);
|
|
992
|
+
return xt(e, "You must render this element inside a <DataRouterStateContext.Provider> element"), e;
|
|
993
|
+
}
|
|
994
|
+
var Z = n.createContext(void 0);
|
|
995
|
+
Z.displayName = "FrameworkContext";
|
|
996
|
+
function Nt() {
|
|
997
|
+
let e = n.useContext(Z);
|
|
998
|
+
return xt(e, "You must render this element inside a <HydratedRouter> element"), e;
|
|
999
|
+
}
|
|
1000
|
+
function Pt(e, t) {
|
|
1001
|
+
let r = n.useContext(Z), [i, a] = n.useState(!1), [o, s] = n.useState(!1), { onFocus: c, onBlur: l, onMouseEnter: u, onMouseLeave: d, onTouchStart: f } = t, p = n.useRef(null);
|
|
1002
|
+
n.useEffect(() => {
|
|
1003
|
+
if (e === "render" && s(!0), e === "viewport") {
|
|
1004
|
+
let e = new IntersectionObserver((e) => {
|
|
1005
|
+
e.forEach((e) => {
|
|
1006
|
+
s(e.isIntersecting);
|
|
1007
|
+
});
|
|
1008
|
+
}, { threshold: .5 });
|
|
1009
|
+
return p.current && e.observe(p.current), () => {
|
|
1010
|
+
e.disconnect();
|
|
1011
|
+
};
|
|
1012
|
+
}
|
|
1013
|
+
}, [e]), n.useEffect(() => {
|
|
1014
|
+
if (i) {
|
|
1015
|
+
let e = setTimeout(() => {
|
|
1016
|
+
s(!0);
|
|
1017
|
+
}, 100);
|
|
1018
|
+
return () => {
|
|
1019
|
+
clearTimeout(e);
|
|
1020
|
+
};
|
|
1021
|
+
}
|
|
1022
|
+
}, [i]);
|
|
1023
|
+
let m = () => {
|
|
1024
|
+
a(!0);
|
|
1025
|
+
}, h = () => {
|
|
1026
|
+
a(!1), s(!1);
|
|
1027
|
+
};
|
|
1028
|
+
return r ? e === "intent" ? [
|
|
1029
|
+
o,
|
|
1030
|
+
p,
|
|
1031
|
+
{
|
|
1032
|
+
onFocus: Q(c, m),
|
|
1033
|
+
onBlur: Q(l, h),
|
|
1034
|
+
onMouseEnter: Q(u, m),
|
|
1035
|
+
onMouseLeave: Q(d, h),
|
|
1036
|
+
onTouchStart: Q(f, m)
|
|
1037
|
+
}
|
|
1038
|
+
] : [
|
|
1039
|
+
o,
|
|
1040
|
+
p,
|
|
1041
|
+
{}
|
|
1042
|
+
] : [
|
|
1043
|
+
!1,
|
|
1044
|
+
p,
|
|
1045
|
+
{}
|
|
1046
|
+
];
|
|
1047
|
+
}
|
|
1048
|
+
function Q(e, t) {
|
|
1049
|
+
return (n) => {
|
|
1050
|
+
e && e(n), n.defaultPrevented || t(n);
|
|
1051
|
+
};
|
|
1052
|
+
}
|
|
1053
|
+
function Ft({ page: e, ...t }) {
|
|
1054
|
+
let r = we(), { router: i } = X(), a = n.useMemo(() => h(i.routes, e, i.basename), [
|
|
1055
|
+
i.routes,
|
|
1056
|
+
e,
|
|
1057
|
+
i.basename
|
|
1058
|
+
]);
|
|
1059
|
+
return a ? r ? /* @__PURE__ */ n.createElement(Lt, {
|
|
1060
|
+
page: e,
|
|
1061
|
+
matches: a,
|
|
1062
|
+
...t
|
|
1063
|
+
}) : /* @__PURE__ */ n.createElement(Rt, {
|
|
1064
|
+
page: e,
|
|
1065
|
+
matches: a,
|
|
1066
|
+
...t
|
|
1067
|
+
}) : null;
|
|
1068
|
+
}
|
|
1069
|
+
function It(e) {
|
|
1070
|
+
let { manifest: t, routeModules: r } = Nt(), [i, a] = n.useState([]);
|
|
1071
|
+
return n.useEffect(() => {
|
|
1072
|
+
let n = !1;
|
|
1073
|
+
return Et(e, t, r).then((e) => {
|
|
1074
|
+
n || a(e);
|
|
1075
|
+
}), () => {
|
|
1076
|
+
n = !0;
|
|
1077
|
+
};
|
|
1078
|
+
}, [
|
|
1079
|
+
e,
|
|
1080
|
+
t,
|
|
1081
|
+
r
|
|
1082
|
+
]), i;
|
|
1083
|
+
}
|
|
1084
|
+
function Lt({ page: e, matches: t, ...r }) {
|
|
1085
|
+
let i = B(), { future: a } = Nt(), { basename: o } = X(), s = n.useMemo(() => {
|
|
1086
|
+
if (e === i.pathname + i.search + i.hash) return [];
|
|
1087
|
+
let n = St(e, o, a.v8_trailingSlashAwareDataRequests, "rsc"), r = !1, s = [];
|
|
1088
|
+
for (let e of t) typeof e.route.shouldRevalidate == "function" ? r = !0 : s.push(e.route.id);
|
|
1089
|
+
return r && s.length > 0 && n.searchParams.set("_routes", s.join(",")), [n.pathname + n.search];
|
|
1090
|
+
}, [
|
|
1091
|
+
o,
|
|
1092
|
+
a.v8_trailingSlashAwareDataRequests,
|
|
1093
|
+
e,
|
|
1094
|
+
i,
|
|
1095
|
+
t
|
|
1096
|
+
]);
|
|
1097
|
+
return /* @__PURE__ */ n.createElement(n.Fragment, null, s.map((e) => /* @__PURE__ */ n.createElement("link", {
|
|
1098
|
+
key: e,
|
|
1099
|
+
rel: "prefetch",
|
|
1100
|
+
as: "fetch",
|
|
1101
|
+
href: e,
|
|
1102
|
+
...r
|
|
1103
|
+
})));
|
|
1104
|
+
}
|
|
1105
|
+
function Rt({ page: e, matches: t, ...r }) {
|
|
1106
|
+
let i = B(), { future: a, manifest: o, routeModules: s } = Nt(), { basename: c } = X(), { loaderData: l, matches: u } = Mt(), d = n.useMemo(() => Dt(e, t, u, o, i, "data"), [
|
|
1107
|
+
e,
|
|
1108
|
+
t,
|
|
1109
|
+
u,
|
|
1110
|
+
o,
|
|
1111
|
+
i
|
|
1112
|
+
]), f = n.useMemo(() => Dt(e, t, u, o, i, "assets"), [
|
|
1113
|
+
e,
|
|
1114
|
+
t,
|
|
1115
|
+
u,
|
|
1116
|
+
o,
|
|
1117
|
+
i
|
|
1118
|
+
]), p = n.useMemo(() => {
|
|
1119
|
+
if (e === i.pathname + i.search + i.hash) return [];
|
|
1120
|
+
let n = /* @__PURE__ */ new Set(), r = !1;
|
|
1121
|
+
if (t.forEach((e) => {
|
|
1122
|
+
let t = o.routes[e.route.id];
|
|
1123
|
+
!t || !t.hasLoader || (!d.some((t) => t.route.id === e.route.id) && e.route.id in l && s[e.route.id]?.shouldRevalidate || t.hasClientLoader ? r = !0 : n.add(e.route.id));
|
|
1124
|
+
}), n.size === 0) return [];
|
|
1125
|
+
let u = St(e, c, a.v8_trailingSlashAwareDataRequests, "data");
|
|
1126
|
+
return r && n.size > 0 && u.searchParams.set("_routes", t.filter((e) => n.has(e.route.id)).map((e) => e.route.id).join(",")), [u.pathname + u.search];
|
|
1127
|
+
}, [
|
|
1128
|
+
c,
|
|
1129
|
+
a.v8_trailingSlashAwareDataRequests,
|
|
1130
|
+
l,
|
|
1131
|
+
i,
|
|
1132
|
+
o,
|
|
1133
|
+
d,
|
|
1134
|
+
t,
|
|
1135
|
+
e,
|
|
1136
|
+
s
|
|
1137
|
+
]), m = n.useMemo(() => Ot(f, o), [f, o]), h = It(f);
|
|
1138
|
+
return /* @__PURE__ */ n.createElement(n.Fragment, null, p.map((e) => /* @__PURE__ */ n.createElement("link", {
|
|
1139
|
+
key: e,
|
|
1140
|
+
rel: "prefetch",
|
|
1141
|
+
as: "fetch",
|
|
1142
|
+
href: e,
|
|
1143
|
+
...r
|
|
1144
|
+
})), m.map((e) => /* @__PURE__ */ n.createElement("link", {
|
|
1145
|
+
key: e,
|
|
1146
|
+
rel: "modulepreload",
|
|
1147
|
+
href: e,
|
|
1148
|
+
...r
|
|
1149
|
+
})), h.map(({ key: e, link: t }) => /* @__PURE__ */ n.createElement("link", {
|
|
1150
|
+
key: e,
|
|
1151
|
+
nonce: r.nonce,
|
|
1152
|
+
...t,
|
|
1153
|
+
crossOrigin: t.crossOrigin ?? r.crossOrigin
|
|
1154
|
+
})));
|
|
1155
|
+
}
|
|
1156
|
+
function zt(...e) {
|
|
1157
|
+
return (t) => {
|
|
1158
|
+
e.forEach((e) => {
|
|
1159
|
+
typeof e == "function" ? e(t) : e != null && (e.current = t);
|
|
1160
|
+
});
|
|
1161
|
+
};
|
|
1162
|
+
}
|
|
1163
|
+
n.Component;
|
|
1164
|
+
var Bt = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0;
|
|
1165
|
+
try {
|
|
1166
|
+
Bt && (window.__reactRouterVersion = "7.16.0");
|
|
1167
|
+
} catch {}
|
|
1168
|
+
function Vt({ basename: e, children: t, useTransitions: r, window: i }) {
|
|
1169
|
+
let o = n.useRef();
|
|
1170
|
+
o.current ??= a({
|
|
1171
|
+
window: i,
|
|
1172
|
+
v5Compat: !0
|
|
1173
|
+
});
|
|
1174
|
+
let s = o.current, [c, l] = n.useState({
|
|
1175
|
+
action: s.action,
|
|
1176
|
+
location: s.location
|
|
1177
|
+
}), u = n.useCallback((e) => {
|
|
1178
|
+
r === !1 ? l(e) : n.startTransition(() => l(e));
|
|
1179
|
+
}, [r]);
|
|
1180
|
+
return n.useLayoutEffect(() => s.listen(u), [s, u]), /* @__PURE__ */ n.createElement(it, {
|
|
1181
|
+
basename: e,
|
|
1182
|
+
children: t,
|
|
1183
|
+
location: c.location,
|
|
1184
|
+
navigationType: c.action,
|
|
1185
|
+
navigator: s,
|
|
1186
|
+
useTransitions: r
|
|
1187
|
+
});
|
|
1188
|
+
}
|
|
1189
|
+
function Ht({ basename: e, children: t, history: r, useTransitions: i }) {
|
|
1190
|
+
let [a, o] = n.useState({
|
|
1191
|
+
action: r.action,
|
|
1192
|
+
location: r.location
|
|
1193
|
+
}), s = n.useCallback((e) => {
|
|
1194
|
+
i === !1 ? o(e) : n.startTransition(() => o(e));
|
|
1195
|
+
}, [i]);
|
|
1196
|
+
return n.useLayoutEffect(() => r.listen(s), [r, s]), /* @__PURE__ */ n.createElement(it, {
|
|
1197
|
+
basename: e,
|
|
1198
|
+
children: t,
|
|
1199
|
+
location: a.location,
|
|
1200
|
+
navigationType: a.action,
|
|
1201
|
+
navigator: r,
|
|
1202
|
+
useTransitions: i
|
|
1203
|
+
});
|
|
1204
|
+
}
|
|
1205
|
+
Ht.displayName = "unstable_HistoryRouter";
|
|
1206
|
+
var Ut = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Wt = n.forwardRef(function({ onClick: e, discover: t = "render", prefetch: r = "none", relative: i, reloadDocument: a, replace: o, mask: s, state: c, target: l, to: u, preventScrollReset: d, viewTransition: f, defaultShouldRevalidate: p, ...m }, h) {
|
|
1207
|
+
let { basename: g, navigator: _, useTransitions: v } = n.useContext(F), y = typeof u == "string" && Ut.test(u), b = be(u, g);
|
|
1208
|
+
u = b.to;
|
|
1209
|
+
let x = Ne(u, { relative: i }), S = B(), C = null;
|
|
1210
|
+
if (s) {
|
|
1211
|
+
let e = A(s, [], S.mask ? S.mask.pathname : "/", !0);
|
|
1212
|
+
g !== "/" && (e.pathname = e.pathname === "/" ? g : j([g, e.pathname])), C = _.createHref(e);
|
|
1213
|
+
}
|
|
1214
|
+
let [ee, w, T] = Pt(r, m), te = Zt(u, {
|
|
1215
|
+
replace: o,
|
|
1216
|
+
mask: s,
|
|
1217
|
+
state: c,
|
|
1218
|
+
target: l,
|
|
1219
|
+
preventScrollReset: d,
|
|
1220
|
+
relative: i,
|
|
1221
|
+
viewTransition: f,
|
|
1222
|
+
defaultShouldRevalidate: p,
|
|
1223
|
+
useTransitions: v
|
|
1224
|
+
});
|
|
1225
|
+
function E(t) {
|
|
1226
|
+
e && e(t), t.defaultPrevented || te(t);
|
|
1227
|
+
}
|
|
1228
|
+
let D = !(b.isExternal || a), ne = /* @__PURE__ */ n.createElement("a", {
|
|
1229
|
+
...m,
|
|
1230
|
+
...T,
|
|
1231
|
+
href: (D ? C : void 0) || b.absoluteURL || x,
|
|
1232
|
+
onClick: D ? E : e,
|
|
1233
|
+
ref: zt(h, w),
|
|
1234
|
+
target: l,
|
|
1235
|
+
"data-discover": !y && t === "render" ? "true" : void 0
|
|
1236
|
+
});
|
|
1237
|
+
return ee && !y ? /* @__PURE__ */ n.createElement(n.Fragment, null, ne, /* @__PURE__ */ n.createElement(Ft, { page: x })) : ne;
|
|
1238
|
+
});
|
|
1239
|
+
Wt.displayName = "Link";
|
|
1240
|
+
var Gt = n.forwardRef(function({ "aria-current": e = "page", caseSensitive: t = !1, className: r = "", end: i = !1, style: a, to: o, viewTransition: s, children: c, ...l }, u) {
|
|
1241
|
+
let d = H(o, { relative: l.relative }), f = B(), p = n.useContext(P), { navigator: m, basename: h } = n.useContext(F), g = p != null && cn(d) && s === !0, _ = m.encodeLocation ? m.encodeLocation(d).pathname : d.pathname, v = f.pathname, y = p && p.navigation && p.navigation.location ? p.navigation.location.pathname : null;
|
|
1242
|
+
t || (v = v.toLowerCase(), y = y ? y.toLowerCase() : null, _ = _.toLowerCase()), y && h && (y = k(y, h) || y);
|
|
1243
|
+
let b = _ !== "/" && _.endsWith("/") ? _.length - 1 : _.length, x = v === _ || !i && v.startsWith(_) && v.charAt(b) === "/", S = y != null && (y === _ || !i && y.startsWith(_) && y.charAt(_.length) === "/"), C = {
|
|
1244
|
+
isActive: x,
|
|
1245
|
+
isPending: S,
|
|
1246
|
+
isTransitioning: g
|
|
1247
|
+
}, ee = x ? e : void 0, w;
|
|
1248
|
+
w = typeof r == "function" ? r(C) : [
|
|
1249
|
+
r,
|
|
1250
|
+
x ? "active" : null,
|
|
1251
|
+
S ? "pending" : null,
|
|
1252
|
+
g ? "transitioning" : null
|
|
1253
|
+
].filter(Boolean).join(" ");
|
|
1254
|
+
let T = typeof a == "function" ? a(C) : a;
|
|
1255
|
+
return /* @__PURE__ */ n.createElement(Wt, {
|
|
1256
|
+
...l,
|
|
1257
|
+
"aria-current": ee,
|
|
1258
|
+
className: w,
|
|
1259
|
+
ref: u,
|
|
1260
|
+
style: T,
|
|
1261
|
+
to: o,
|
|
1262
|
+
viewTransition: s
|
|
1263
|
+
}, typeof c == "function" ? c(C) : c);
|
|
1264
|
+
});
|
|
1265
|
+
Gt.displayName = "NavLink";
|
|
1266
|
+
var Kt = n.forwardRef(({ discover: e = "render", fetcherKey: t, navigate: r, reloadDocument: i, replace: a, state: o, method: s = K, action: c, onSubmit: l, relative: u, preventScrollReset: d, viewTransition: f, defaultShouldRevalidate: p, ...m }, h) => {
|
|
1267
|
+
let { useTransitions: g } = n.useContext(F), _ = tn(), v = nn(c, { relative: u }), y = s.toLowerCase() === "get" ? "get" : "post", b = typeof c == "string" && Ut.test(c);
|
|
1268
|
+
return /* @__PURE__ */ n.createElement("form", {
|
|
1269
|
+
ref: h,
|
|
1270
|
+
method: y,
|
|
1271
|
+
action: v,
|
|
1272
|
+
onSubmit: i ? l : (e) => {
|
|
1273
|
+
if (l && l(e), e.defaultPrevented) return;
|
|
1274
|
+
e.preventDefault();
|
|
1275
|
+
let i = e.nativeEvent.submitter, c = i?.getAttribute("formmethod") || s, m = () => _(i || e.currentTarget, {
|
|
1276
|
+
fetcherKey: t,
|
|
1277
|
+
method: c,
|
|
1278
|
+
navigate: r,
|
|
1279
|
+
replace: a,
|
|
1280
|
+
state: o,
|
|
1281
|
+
relative: u,
|
|
1282
|
+
preventScrollReset: d,
|
|
1283
|
+
viewTransition: f,
|
|
1284
|
+
defaultShouldRevalidate: p
|
|
1285
|
+
});
|
|
1286
|
+
g && r !== !1 ? n.startTransition(() => m()) : m();
|
|
1287
|
+
},
|
|
1288
|
+
...m,
|
|
1289
|
+
"data-discover": !b && e === "render" ? "true" : void 0
|
|
1290
|
+
});
|
|
1291
|
+
});
|
|
1292
|
+
Kt.displayName = "Form";
|
|
1293
|
+
function qt({ getKey: e, storageKey: t, ...r }) {
|
|
1294
|
+
let i = n.useContext(Z), { basename: a } = n.useContext(F), o = B(), s = Ze();
|
|
1295
|
+
on({
|
|
1296
|
+
getKey: e,
|
|
1297
|
+
storageKey: t
|
|
1298
|
+
});
|
|
1299
|
+
let c = n.useMemo(() => {
|
|
1300
|
+
if (!i || !e) return null;
|
|
1301
|
+
let t = an(o, s, a, e);
|
|
1302
|
+
return t === o.key ? null : t;
|
|
1303
|
+
}, []);
|
|
1304
|
+
if (!i || i.isSpaMode) return null;
|
|
1305
|
+
let l = ((e, t) => {
|
|
1306
|
+
if (!window.history.state || !window.history.state.key) {
|
|
1307
|
+
let e = Math.random().toString(32).slice(2);
|
|
1308
|
+
window.history.replaceState({ key: e }, "");
|
|
1309
|
+
}
|
|
1310
|
+
try {
|
|
1311
|
+
let n = JSON.parse(sessionStorage.getItem(e) || "{}")[t || window.history.state.key];
|
|
1312
|
+
typeof n == "number" && window.scrollTo(0, n);
|
|
1313
|
+
} catch (t) {
|
|
1314
|
+
console.error(t), sessionStorage.removeItem(e);
|
|
1315
|
+
}
|
|
1316
|
+
}).toString();
|
|
1317
|
+
return /* @__PURE__ */ n.createElement("script", {
|
|
1318
|
+
...r,
|
|
1319
|
+
suppressHydrationWarning: !0,
|
|
1320
|
+
dangerouslySetInnerHTML: { __html: `(${l})(${bt(JSON.stringify(t || rn))}, ${bt(JSON.stringify(c))})` }
|
|
1321
|
+
});
|
|
1322
|
+
}
|
|
1323
|
+
qt.displayName = "ScrollRestoration";
|
|
1324
|
+
function Jt(e) {
|
|
1325
|
+
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
1326
|
+
}
|
|
1327
|
+
function Yt(e) {
|
|
1328
|
+
let t = n.useContext(N);
|
|
1329
|
+
return o(t, Jt(e)), t;
|
|
1330
|
+
}
|
|
1331
|
+
function Xt(e) {
|
|
1332
|
+
let t = n.useContext(P);
|
|
1333
|
+
return o(t, Jt(e)), t;
|
|
1334
|
+
}
|
|
1335
|
+
function Zt(e, { target: t, replace: r, mask: i, state: a, preventScrollReset: o, relative: s, viewTransition: c, defaultShouldRevalidate: l, useTransitions: u } = {}) {
|
|
1336
|
+
let f = V(), p = B(), m = H(e, { relative: s });
|
|
1337
|
+
return n.useCallback((h) => {
|
|
1338
|
+
if (dt(h, t)) {
|
|
1339
|
+
h.preventDefault();
|
|
1340
|
+
let t = r === void 0 ? d(p) === d(m) : r, g = () => f(e, {
|
|
1341
|
+
replace: t,
|
|
1342
|
+
mask: i,
|
|
1343
|
+
state: a,
|
|
1344
|
+
preventScrollReset: o,
|
|
1345
|
+
relative: s,
|
|
1346
|
+
viewTransition: c,
|
|
1347
|
+
defaultShouldRevalidate: l
|
|
1348
|
+
});
|
|
1349
|
+
u ? n.startTransition(() => g()) : g();
|
|
1350
|
+
}
|
|
1351
|
+
}, [
|
|
1352
|
+
p,
|
|
1353
|
+
f,
|
|
1354
|
+
m,
|
|
1355
|
+
r,
|
|
1356
|
+
i,
|
|
1357
|
+
a,
|
|
1358
|
+
t,
|
|
1359
|
+
e,
|
|
1360
|
+
o,
|
|
1361
|
+
s,
|
|
1362
|
+
c,
|
|
1363
|
+
l,
|
|
1364
|
+
u
|
|
1365
|
+
]);
|
|
1366
|
+
}
|
|
1367
|
+
function Qt(e) {
|
|
1368
|
+
s(typeof URLSearchParams < "u", "You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");
|
|
1369
|
+
let t = n.useRef(ft(e)), r = n.useRef(!1), i = B(), a = n.useMemo(() => pt(i.search, r.current ? null : t.current), [i.search]), o = V();
|
|
1370
|
+
return [a, n.useCallback((e, t) => {
|
|
1371
|
+
let n = ft(typeof e == "function" ? e(new URLSearchParams(a)) : e);
|
|
1372
|
+
r.current = !0, o("?" + n, t);
|
|
1373
|
+
}, [o, a])];
|
|
1374
|
+
}
|
|
1375
|
+
var $t = 0, en = () => `__${String(++$t)}__`;
|
|
1376
|
+
function tn() {
|
|
1377
|
+
let { router: e } = Yt("useSubmit"), { basename: t } = n.useContext(F), r = Ye(), i = e.fetch, a = e.navigate;
|
|
1378
|
+
return n.useCallback(async (e, n = {}) => {
|
|
1379
|
+
let { action: o, method: s, encType: c, formData: l, body: u } = _t(e, t);
|
|
1380
|
+
n.navigate === !1 ? await i(n.fetcherKey || en(), r, n.action || o, {
|
|
1381
|
+
defaultShouldRevalidate: n.defaultShouldRevalidate,
|
|
1382
|
+
preventScrollReset: n.preventScrollReset,
|
|
1383
|
+
formData: l,
|
|
1384
|
+
body: u,
|
|
1385
|
+
formMethod: n.method || s,
|
|
1386
|
+
formEncType: n.encType || c,
|
|
1387
|
+
flushSync: n.flushSync
|
|
1388
|
+
}) : await a(n.action || o, {
|
|
1389
|
+
defaultShouldRevalidate: n.defaultShouldRevalidate,
|
|
1390
|
+
preventScrollReset: n.preventScrollReset,
|
|
1391
|
+
formData: l,
|
|
1392
|
+
body: u,
|
|
1393
|
+
formMethod: n.method || s,
|
|
1394
|
+
formEncType: n.encType || c,
|
|
1395
|
+
replace: n.replace,
|
|
1396
|
+
state: n.state,
|
|
1397
|
+
fromRouteId: r,
|
|
1398
|
+
flushSync: n.flushSync,
|
|
1399
|
+
viewTransition: n.viewTransition
|
|
1400
|
+
});
|
|
1401
|
+
}, [
|
|
1402
|
+
i,
|
|
1403
|
+
a,
|
|
1404
|
+
t,
|
|
1405
|
+
r
|
|
1406
|
+
]);
|
|
1407
|
+
}
|
|
1408
|
+
function nn(e, { relative: t } = {}) {
|
|
1409
|
+
let { basename: r } = n.useContext(F), i = n.useContext(L);
|
|
1410
|
+
o(i, "useFormAction must be used inside a RouteContext");
|
|
1411
|
+
let [a] = i.matches.slice(-1), s = { ...H(e || ".", { relative: t }) }, c = B();
|
|
1412
|
+
if (e == null) {
|
|
1413
|
+
s.search = c.search;
|
|
1414
|
+
let e = new URLSearchParams(s.search), t = e.getAll("index");
|
|
1415
|
+
if (t.some((e) => e === "")) {
|
|
1416
|
+
e.delete("index"), t.filter((e) => e).forEach((t) => e.append("index", t));
|
|
1417
|
+
let n = e.toString();
|
|
1418
|
+
s.search = n ? `?${n}` : "";
|
|
1419
|
+
}
|
|
1420
|
+
}
|
|
1421
|
+
return (!e || e === ".") && a.route.index && (s.search = s.search ? s.search.replace(/^\?/, "?index&") : "?index"), r !== "/" && (s.pathname = s.pathname === "/" ? r : j([r, s.pathname])), d(s);
|
|
1422
|
+
}
|
|
1423
|
+
var rn = "react-router-scroll-positions", $ = {};
|
|
1424
|
+
function an(e, t, n, r) {
|
|
1425
|
+
let i = null;
|
|
1426
|
+
return r && (i = r(n === "/" ? e : {
|
|
1427
|
+
...e,
|
|
1428
|
+
pathname: k(e.pathname, n) || e.pathname
|
|
1429
|
+
}, t)), i ??= e.key, i;
|
|
1430
|
+
}
|
|
1431
|
+
function on({ getKey: e, storageKey: t } = {}) {
|
|
1432
|
+
let { router: r } = Yt("useScrollRestoration"), { restoreScrollPosition: i, preventScrollReset: a } = Xt("useScrollRestoration"), { basename: o } = n.useContext(F), c = B(), l = Ze(), u = Xe();
|
|
1433
|
+
n.useEffect(() => (window.history.scrollRestoration = "manual", () => {
|
|
1434
|
+
window.history.scrollRestoration = "auto";
|
|
1435
|
+
}), []), sn(n.useCallback(() => {
|
|
1436
|
+
if (u.state === "idle") {
|
|
1437
|
+
let t = an(c, l, o, e);
|
|
1438
|
+
$[t] = window.scrollY;
|
|
1439
|
+
}
|
|
1440
|
+
try {
|
|
1441
|
+
sessionStorage.setItem(t || rn, JSON.stringify($));
|
|
1442
|
+
} catch (e) {
|
|
1443
|
+
s(!1, `Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`);
|
|
1444
|
+
}
|
|
1445
|
+
window.history.scrollRestoration = "auto";
|
|
1446
|
+
}, [
|
|
1447
|
+
u.state,
|
|
1448
|
+
e,
|
|
1449
|
+
o,
|
|
1450
|
+
c,
|
|
1451
|
+
l,
|
|
1452
|
+
t
|
|
1453
|
+
])), typeof document < "u" && (n.useLayoutEffect(() => {
|
|
1454
|
+
try {
|
|
1455
|
+
let e = sessionStorage.getItem(t || rn);
|
|
1456
|
+
e && ($ = JSON.parse(e));
|
|
1457
|
+
} catch {}
|
|
1458
|
+
}, [t]), n.useLayoutEffect(() => {
|
|
1459
|
+
let t = r?.enableScrollRestoration($, () => window.scrollY, e ? (t, n) => an(t, n, o, e) : void 0);
|
|
1460
|
+
return () => t && t();
|
|
1461
|
+
}, [
|
|
1462
|
+
r,
|
|
1463
|
+
o,
|
|
1464
|
+
e
|
|
1465
|
+
]), n.useLayoutEffect(() => {
|
|
1466
|
+
if (i !== !1) {
|
|
1467
|
+
if (typeof i == "number") {
|
|
1468
|
+
window.scrollTo(0, i);
|
|
1469
|
+
return;
|
|
1470
|
+
}
|
|
1471
|
+
try {
|
|
1472
|
+
if (c.hash) {
|
|
1473
|
+
let e = document.getElementById(decodeURIComponent(c.hash.slice(1)));
|
|
1474
|
+
if (e) {
|
|
1475
|
+
e.scrollIntoView();
|
|
1476
|
+
return;
|
|
1477
|
+
}
|
|
1478
|
+
}
|
|
1479
|
+
} catch {
|
|
1480
|
+
s(!1, `"${c.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`);
|
|
1481
|
+
}
|
|
1482
|
+
a !== !0 && window.scrollTo(0, 0);
|
|
1483
|
+
}
|
|
1484
|
+
}, [
|
|
1485
|
+
c,
|
|
1486
|
+
i,
|
|
1487
|
+
a
|
|
1488
|
+
]));
|
|
1489
|
+
}
|
|
1490
|
+
function sn(e, t) {
|
|
1491
|
+
let { capture: r } = t || {};
|
|
1492
|
+
n.useEffect(() => {
|
|
1493
|
+
let t = r == null ? void 0 : { capture: r };
|
|
1494
|
+
return window.addEventListener("pagehide", e, t), () => {
|
|
1495
|
+
window.removeEventListener("pagehide", e, t);
|
|
1496
|
+
};
|
|
1497
|
+
}, [e, r]);
|
|
1498
|
+
}
|
|
1499
|
+
function cn(e, { relative: t } = {}) {
|
|
1500
|
+
let r = n.useContext(Te);
|
|
1501
|
+
o(r != null, "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");
|
|
1502
|
+
let { basename: i } = Yt("useViewTransitionState"), a = H(e, { relative: t });
|
|
1503
|
+
if (!r.isTransitioning) return !1;
|
|
1504
|
+
let s = k(r.currentLocation.pathname, i) || r.currentLocation.pathname, c = k(r.nextLocation.pathname, i) || r.nextLocation.pathname;
|
|
1505
|
+
return O(a.pathname, c) != null || O(a.pathname, s) != null;
|
|
1506
|
+
}
|
|
1507
|
+
//#endregion
|
|
1508
|
+
export { B as a, Qt as c, at as i, Wt as n, V as o, rt as r, Le as s, Vt as t };
|