chrome-devtools-frontend 1.0.1616061 → 1.0.1621064
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/AUTHORS +1 -0
- package/docs/checklist/README.md +8 -7
- package/eslint.config.mjs +7 -0
- package/front_end/core/common/Object.ts +11 -2
- package/front_end/core/dom_extension/DOMExtension.ts +11 -8
- package/front_end/core/host/AidaClient.ts +8 -0
- package/front_end/core/host/AidaGcaTranslation.ts +1 -0
- package/front_end/core/host/UserMetrics.ts +0 -1
- package/front_end/core/platform/api/HostRuntime.ts +2 -2
- package/front_end/core/platform/browser/HostRuntime.ts +4 -2
- package/front_end/core/platform/node/HostRuntime.ts +2 -2
- package/front_end/core/root/ExperimentNames.ts +0 -1
- package/front_end/core/sdk/NetworkManager.ts +30 -4
- package/front_end/core/sdk/NetworkRequest.ts +2 -10
- package/front_end/core/sdk/Resource.ts +2 -1
- package/front_end/core/sdk/ServerSentEventsProtocol.ts +1 -1
- package/front_end/core/sdk/TraceObject.ts +7 -2
- package/front_end/entrypoint_template.html +1 -2
- package/front_end/entrypoints/greendev_floaty/FloatyEntrypoint.ts +119 -15
- package/front_end/entrypoints/greendev_floaty/greendev_floaty.ts +0 -2
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +43 -33
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotLoader.ts +2 -1
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotWorkerDispatcher.ts +9 -6
- package/front_end/entrypoints/main/MainImpl.ts +0 -2
- package/front_end/generated/InspectorBackendCommands.ts +8 -7
- package/front_end/generated/SupportedCSSProperties.js +119 -100
- package/front_end/generated/protocol-mapping.d.ts +1 -9
- package/front_end/generated/protocol-proxy-api.d.ts +1 -9
- package/front_end/generated/protocol.ts +24 -1
- package/front_end/legacy/legacy-defs.d.ts +1 -1
- package/front_end/models/ai_assistance/AiConversation.ts +1 -0
- package/front_end/models/ai_assistance/AiHistoryStorage.ts +39 -0
- package/front_end/models/ai_assistance/agents/AiAgent.ts +2 -0
- package/front_end/models/ai_assistance/agents/ConversationSummaryAgent.ts +28 -16
- package/front_end/models/ai_assistance/agents/GreenDevAgent.ts +512 -0
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +112 -145
- package/front_end/models/ai_assistance/agents/README.md +0 -5
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +9 -16
- package/front_end/models/ai_assistance/ai_assistance.ts +2 -0
- package/front_end/models/ai_code_completion/AiCodeCompletion.ts +19 -1
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +48 -13
- package/front_end/models/bindings/SymbolizedError.ts +95 -8
- package/front_end/models/emulation/DeviceModeModel.ts +42 -13
- package/front_end/models/emulation/EmulatedDevices.ts +1 -1
- package/front_end/models/issues_manager/IssuesManager.ts +13 -6
- package/front_end/models/issues_manager/IssuesManagerEvents.ts +1 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +2 -2
- package/front_end/models/live-metrics/web-vitals-injected/web-vitals-injected.ts +1 -0
- package/front_end/models/stack_trace/DetailedErrorStackParser.ts +49 -10
- package/front_end/models/stack_trace/ErrorStackParser.ts +18 -0
- package/front_end/models/stack_trace/StackTraceModel.ts +5 -1
- package/front_end/models/text_utils/ContentData.ts +71 -10
- package/front_end/models/trace/types/File.ts +8 -1
- package/front_end/models/web_mcp/WebMCPModel.ts +22 -0
- package/front_end/models/workspace/UISourceCode.ts +4 -4
- package/front_end/panels/accessibility/ARIAAttributesView.ts +4 -4
- package/front_end/panels/accessibility/AccessibilitySubPane.ts +3 -2
- package/front_end/panels/accessibility/SourceOrderView.ts +4 -4
- package/front_end/panels/ai_assistance/ai_assistance.ts +1 -0
- package/front_end/panels/ai_assistance/components/ChatInput.ts +66 -0
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +144 -21
- package/front_end/panels/ai_assistance/components/ChatView.ts +43 -8
- package/front_end/panels/ai_assistance/components/ExportForAgentsDialog.ts +1 -0
- package/front_end/panels/ai_assistance/components/WalkthroughUtils.ts +74 -0
- package/front_end/panels/ai_assistance/components/WalkthroughView.ts +34 -5
- package/front_end/panels/ai_assistance/components/chatMessage.css +11 -0
- package/front_end/panels/ai_assistance/components/walkthroughView.css +7 -0
- package/front_end/panels/application/ApplicationPanelTreeElement.ts +1 -1
- package/front_end/panels/application/CookieItemsView.ts +8 -9
- package/front_end/panels/application/DOMStorageItemsView.ts +3 -3
- package/front_end/panels/application/DeviceBoundSessionsModel.ts +7 -0
- package/front_end/panels/application/DeviceBoundSessionsTreeElement.ts +21 -0
- package/front_end/panels/application/DeviceBoundSessionsView.ts +2 -2
- package/front_end/panels/application/ExtensionStorageItemsView.ts +1 -1
- package/front_end/panels/application/KeyValueStorageItemsView.ts +32 -14
- package/front_end/panels/application/ResourcesPanel.ts +5 -5
- package/front_end/panels/application/StorageItemsToolbar.ts +0 -19
- package/front_end/panels/application/WebMCPView.ts +285 -86
- package/front_end/panels/application/components/BounceTrackingMitigationsView.ts +4 -4
- package/front_end/panels/application/preloading/components/MismatchedPreloadingGrid.ts +4 -4
- package/front_end/panels/application/webMCPView.css +261 -182
- package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +9 -5
- package/front_end/panels/changes/ChangesSidebar.ts +2 -2
- package/front_end/panels/changes/ChangesView.ts +9 -14
- package/front_end/panels/console/ConsolePanel.ts +10 -3
- package/front_end/panels/console/ConsoleSidebar.ts +5 -5
- package/front_end/panels/console/ConsoleView.ts +11 -4
- package/front_end/panels/console/ConsoleViewMessage.ts +1 -19
- package/front_end/panels/coverage/CoverageView.ts +4 -5
- package/front_end/panels/elements/ElementsPanel.ts +9 -12
- package/front_end/panels/elements/ElementsSidebarPane.ts +4 -5
- package/front_end/panels/elements/ElementsTreeElement.ts +61 -0
- package/front_end/panels/elements/ElementsTreeOutline.ts +46 -0
- package/front_end/panels/elements/LayersWidget.ts +2 -2
- package/front_end/panels/elements/MetricsSidebarPane.ts +5 -4
- package/front_end/panels/elements/StylePropertiesSection.ts +1 -1
- package/front_end/panels/elements/StylePropertyTreeElement.ts +11 -6
- package/front_end/panels/elements/StylesSidebarPane.ts +4 -1
- package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +19 -20
- package/front_end/panels/elements/components/ElementsBreadcrumbsUtils.ts +29 -29
- package/front_end/panels/elements/components/QueryContainer.ts +5 -6
- package/front_end/panels/elements/components/components.ts +0 -2
- package/front_end/panels/emulation/MediaQueryInspector.ts +4 -7
- package/front_end/panels/layer_viewer/LayerDetailsView.ts +4 -7
- package/front_end/panels/layer_viewer/Layers3DView.ts +2 -2
- package/front_end/panels/lighthouse/LighthouseStartView.ts +2 -2
- package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +47 -66
- package/front_end/panels/network/NetworkConfigView.ts +11 -11
- package/front_end/panels/network/RequestConditionsDrawer.ts +6 -4
- package/front_end/panels/network/RequestCookiesView.ts +2 -2
- package/front_end/panels/network/RequestDeviceBoundSessionsView.ts +2 -2
- package/front_end/panels/network/RequestHeadersView.ts +2 -2
- package/front_end/panels/network/components/DirectSocketConnectionView.ts +4 -5
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +6 -9
- package/front_end/panels/profiler/HeapProfileView.ts +29 -4
- package/front_end/panels/profiler/ProfilesPanel.ts +1 -1
- package/front_end/panels/protocol_monitor/JSONEditor.css +8 -1
- package/front_end/panels/protocol_monitor/JSONEditor.ts +7 -2
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +6 -4
- package/front_end/panels/recorder/components/ControlButton.ts +4 -4
- package/front_end/panels/recorder/components/StepView.ts +6 -6
- package/front_end/panels/search/SearchView.ts +4 -7
- package/front_end/panels/sources/DebuggerPausedMessage.ts +18 -22
- package/front_end/panels/sources/SourcesView.ts +1 -1
- package/front_end/panels/sources/TabbedEditorContainer.ts +2 -2
- package/front_end/panels/sources/ThreadsSidebarPane.ts +2 -4
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +24 -20
- package/front_end/panels/timeline/StatusDialog.ts +5 -8
- package/front_end/panels/timeline/ThirdPartyTreeView.ts +10 -0
- package/front_end/panels/timeline/TimelineLoader.ts +3 -4
- package/front_end/panels/timeline/TimelineSelectorStatsView.ts +2 -2
- package/front_end/panels/timeline/components/TimelineRangeSummaryView.ts +2 -0
- package/front_end/panels/timeline/components/TimelineSummary.ts +9 -1
- package/front_end/panels/timeline/components/timelineSummary.css +4 -0
- package/front_end/panels/timeline/overlays/components/TimespanBreakdownOverlay.ts +2 -2
- package/front_end/panels/timeline/thirdPartyTreeView.css +8 -1
- package/front_end/panels/web_audio/WebAudioView.ts +5 -4
- package/front_end/panels/whats_new/ReleaseNoteText.ts +9 -9
- package/front_end/panels/whats_new/resources/WNDT.md +9 -6
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.d.ts +41 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Extension.d.ts +13 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Extension.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Extension.js +21 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Extension.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/ElementHandle.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js +5 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ElementHandle.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Extension.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Extension.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Extension.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Extension.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js +52 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebMCP.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebMCP.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts +25 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/third_party/urlpattern-polyfill/urlpattern-polyfill.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/third_party/urlpattern-polyfill/urlpattern-polyfill.js +853 -0
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +91 -11
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +1046 -33
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.d.ts +41 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Extension.d.ts +13 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Extension.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Extension.js +21 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Extension.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js +5 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ElementHandle.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Extension.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Extension.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Extension.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Extension.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js +52 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebMCP.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebMCP.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts +25 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/third_party/urlpattern-polyfill/urlpattern-polyfill.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/third_party/urlpattern-polyfill/urlpattern-polyfill.js +805 -0
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +91 -11
- package/front_end/third_party/puppeteer/package/package.json +3 -2
- package/front_end/third_party/puppeteer/package/src/api/ElementHandle.ts +53 -11
- package/front_end/third_party/puppeteer/package/src/api/Extension.ts +29 -1
- package/front_end/third_party/puppeteer/package/src/bidi/ElementHandle.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +6 -0
- package/front_end/third_party/puppeteer/package/src/cdp/BrowserConnector.ts +2 -0
- package/front_end/third_party/puppeteer/package/src/cdp/ElementHandle.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Extension.ts +9 -2
- package/front_end/third_party/puppeteer/package/src/cdp/TargetManager.ts +59 -0
- package/front_end/third_party/puppeteer/package/src/cdp/WebMCP.ts +6 -1
- package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +26 -0
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +2 -0
- package/front_end/third_party/puppeteer/package/src/node/ChromeLauncher.ts +0 -1
- package/front_end/third_party/puppeteer/package/src/revisions.ts +2 -2
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +2 -1
- package/front_end/third_party/web-vitals/README.chromium +2 -2
- package/front_end/third_party/web-vitals/package/README.md +21 -10
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onCLS.js +2 -4
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onFCP.js +1 -2
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.d.ts +4 -0
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.js +44 -39
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onLCP.js +25 -19
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onTTFB.js +1 -2
- package/front_end/third_party/web-vitals/package/dist/modules/lib/doubleRAF.js +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/getActivationStart.js +1 -2
- package/front_end/third_party/web-vitals/package/dist/modules/lib/getLoadState.js +16 -18
- package/front_end/third_party/web-vitals/package/dist/modules/lib/getVisibilityWatcher.js +2 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/initMetric.d.ts +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/observe.js +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/interactionCountPolyfill.d.ts +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/interactionCountPolyfill.js +1 -3
- package/front_end/third_party/web-vitals/package/dist/modules/lib/whenActivated.js +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/whenIdleOrHidden.js +11 -7
- package/front_end/third_party/web-vitals/package/dist/modules/onCLS.js +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/types/inp.d.ts +4 -0
- package/front_end/third_party/web-vitals/package/dist/modules/types.d.ts +1 -2
- package/front_end/third_party/web-vitals/package/dist/modules/types.js +0 -1
- package/front_end/third_party/web-vitals/package/package.json +24 -27
- package/front_end/third_party/web-vitals/package/src/attribution/onCLS.ts +2 -7
- package/front_end/third_party/web-vitals/package/src/attribution/onFCP.ts +1 -2
- package/front_end/third_party/web-vitals/package/src/attribution/onINP.ts +49 -43
- package/front_end/third_party/web-vitals/package/src/attribution/onLCP.ts +27 -24
- package/front_end/third_party/web-vitals/package/src/attribution/onTTFB.ts +1 -2
- package/front_end/third_party/web-vitals/package/src/lib/doubleRAF.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/lib/getActivationStart.ts +1 -2
- package/front_end/third_party/web-vitals/package/src/lib/getLoadState.ts +21 -20
- package/front_end/third_party/web-vitals/package/src/lib/getVisibilityWatcher.ts +2 -3
- package/front_end/third_party/web-vitals/package/src/lib/observe.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/lib/polyfills/interactionCountPolyfill.ts +2 -4
- package/front_end/third_party/web-vitals/package/src/lib/whenActivated.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/lib/whenIdleOrHidden.ts +13 -7
- package/front_end/third_party/web-vitals/package/src/onCLS.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/types/inp.ts +4 -0
- package/front_end/third_party/web-vitals/package/src/types.ts +1 -2
- package/front_end/third_party/web-vitals/patches/0001-Add-onEachInteraction-to-onINP-options.patch +13 -74
- package/front_end/third_party/web-vitals/rebuild.sh +3 -3
- package/front_end/third_party/web-vitals/web-vitals-tsconfig.json +0 -1
- package/front_end/ui/components/icon_button/iconButton.css +1 -0
- package/front_end/ui/components/legacy_wrapper/LegacyWrapper.ts +6 -6
- package/front_end/ui/components/lists/list.css +4 -0
- package/front_end/ui/legacy/Dialog.ts +21 -2
- package/front_end/ui/legacy/SoftContextMenu.ts +3 -3
- package/front_end/ui/legacy/SplitWidget.ts +9 -9
- package/front_end/ui/legacy/TabbedPane.ts +12 -12
- package/front_end/ui/legacy/View.ts +24 -22
- package/front_end/ui/legacy/ViewManager.ts +12 -12
- package/front_end/ui/legacy/ViewRegistration.ts +2 -2
- package/front_end/ui/legacy/Widget.ts +165 -119
- package/front_end/ui/legacy/components/source_frame/ImageView.ts +10 -5
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +9 -6
- package/front_end/ui/legacy/components/utils/Linkifier.ts +37 -11
- package/front_end/ui/legacy/components/utils/jsUtils.css +1 -0
- package/front_end/ui/legacy/inspectorCommon.css +0 -6
- package/front_end/ui/lit/render.ts +11 -9
- package/front_end/ui/visual_logging/KnownContextValues.ts +36 -0
- package/package.json +1 -1
- package/front_end/Images/src/dots-circle.svg +0 -10
- package/front_end/panels/elements/components/Helper.ts +0 -35
- package/front_end/third_party/web-vitals/package/dist/modules/types/polyfills.d.ts +0 -4
- package/front_end/third_party/web-vitals/package/dist/modules/types/polyfills.js +0 -16
- package/front_end/third_party/web-vitals/package/src/types/polyfills.ts +0 -24
|
@@ -0,0 +1,805 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Copyright 2020 Intel Corporation
|
|
3
|
+
|
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
6
|
+
in the Software without restriction, including without limitation the rights
|
|
7
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
9
|
+
furnished to do so, subject to the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be included in
|
|
12
|
+
all copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
20
|
+
THE SOFTWARE.
|
|
21
|
+
*/
|
|
22
|
+
// node_modules/urlpattern-polyfill/dist/urlpattern.js
|
|
23
|
+
var Pe = Object.defineProperty;
|
|
24
|
+
var a = (e, t) => Pe(e, "name", { value: t, configurable: true });
|
|
25
|
+
var P = class {
|
|
26
|
+
type = 3;
|
|
27
|
+
name = "";
|
|
28
|
+
prefix = "";
|
|
29
|
+
value = "";
|
|
30
|
+
suffix = "";
|
|
31
|
+
modifier = 3;
|
|
32
|
+
constructor(t, r, n, c, l, f) {
|
|
33
|
+
this.type = t, this.name = r, this.prefix = n, this.value = c, this.suffix = l, this.modifier = f;
|
|
34
|
+
}
|
|
35
|
+
hasCustomName() {
|
|
36
|
+
return this.name !== "" && typeof this.name != "number";
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
a(P, "Part");
|
|
40
|
+
var Re = /[$_\p{ID_Start}]/u;
|
|
41
|
+
var Ee = /[$_\u200C\u200D\p{ID_Continue}]/u;
|
|
42
|
+
var v = ".*";
|
|
43
|
+
function Oe(e, t) {
|
|
44
|
+
return (t ? /^[\x00-\xFF]*$/ : /^[\x00-\x7F]*$/).test(e);
|
|
45
|
+
}
|
|
46
|
+
a(Oe, "isASCII");
|
|
47
|
+
function D(e, t = false) {
|
|
48
|
+
let r = [], n = 0;
|
|
49
|
+
for (; n < e.length; ) {
|
|
50
|
+
let c = e[n], l = a(function(f) {
|
|
51
|
+
if (!t) throw new TypeError(f);
|
|
52
|
+
r.push({ type: "INVALID_CHAR", index: n, value: e[n++] });
|
|
53
|
+
}, "ErrorOrInvalid");
|
|
54
|
+
if (c === "*") {
|
|
55
|
+
r.push({ type: "ASTERISK", index: n, value: e[n++] });
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
if (c === "+" || c === "?") {
|
|
59
|
+
r.push({ type: "OTHER_MODIFIER", index: n, value: e[n++] });
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
if (c === "\\") {
|
|
63
|
+
r.push({ type: "ESCAPED_CHAR", index: n++, value: e[n++] });
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
if (c === "{") {
|
|
67
|
+
r.push({ type: "OPEN", index: n, value: e[n++] });
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
if (c === "}") {
|
|
71
|
+
r.push({ type: "CLOSE", index: n, value: e[n++] });
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
if (c === ":") {
|
|
75
|
+
let f = "", s = n + 1;
|
|
76
|
+
for (; s < e.length; ) {
|
|
77
|
+
let i = e.substr(s, 1);
|
|
78
|
+
if (s === n + 1 && Re.test(i) || s !== n + 1 && Ee.test(i)) {
|
|
79
|
+
f += e[s++];
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
if (!f) {
|
|
85
|
+
l(`Missing parameter name at ${n}`);
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
r.push({ type: "NAME", index: n, value: f }), n = s;
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
91
|
+
if (c === "(") {
|
|
92
|
+
let f = 1, s = "", i = n + 1, o = false;
|
|
93
|
+
if (e[i] === "?") {
|
|
94
|
+
l(`Pattern cannot start with "?" at ${i}`);
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
97
|
+
for (; i < e.length; ) {
|
|
98
|
+
if (!Oe(e[i], false)) {
|
|
99
|
+
l(`Invalid character '${e[i]}' at ${i}.`), o = true;
|
|
100
|
+
break;
|
|
101
|
+
}
|
|
102
|
+
if (e[i] === "\\") {
|
|
103
|
+
s += e[i++] + e[i++];
|
|
104
|
+
continue;
|
|
105
|
+
}
|
|
106
|
+
if (e[i] === ")") {
|
|
107
|
+
if (f--, f === 0) {
|
|
108
|
+
i++;
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
} else if (e[i] === "(" && (f++, e[i + 1] !== "?")) {
|
|
112
|
+
l(`Capturing groups are not allowed at ${i}`), o = true;
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
115
|
+
s += e[i++];
|
|
116
|
+
}
|
|
117
|
+
if (o) continue;
|
|
118
|
+
if (f) {
|
|
119
|
+
l(`Unbalanced pattern at ${n}`);
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
122
|
+
if (!s) {
|
|
123
|
+
l(`Missing pattern at ${n}`);
|
|
124
|
+
continue;
|
|
125
|
+
}
|
|
126
|
+
r.push({ type: "REGEX", index: n, value: s }), n = i;
|
|
127
|
+
continue;
|
|
128
|
+
}
|
|
129
|
+
r.push({ type: "CHAR", index: n, value: e[n++] });
|
|
130
|
+
}
|
|
131
|
+
return r.push({ type: "END", index: n, value: "" }), r;
|
|
132
|
+
}
|
|
133
|
+
a(D, "lexer");
|
|
134
|
+
function F(e, t = {}) {
|
|
135
|
+
let r = D(e);
|
|
136
|
+
t.delimiter ??= "/#?", t.prefixes ??= "./";
|
|
137
|
+
let n = `[^${x(t.delimiter)}]+?`, c = [], l = 0, f = 0, s = "", i = /* @__PURE__ */ new Set(), o = a((u) => {
|
|
138
|
+
if (f < r.length && r[f].type === u) return r[f++].value;
|
|
139
|
+
}, "tryConsume"), h = a(() => o("OTHER_MODIFIER") ?? o("ASTERISK"), "tryConsumeModifier"), p = a((u) => {
|
|
140
|
+
let d = o(u);
|
|
141
|
+
if (d !== void 0) return d;
|
|
142
|
+
let { type: g, index: y } = r[f];
|
|
143
|
+
throw new TypeError(`Unexpected ${g} at ${y}, expected ${u}`);
|
|
144
|
+
}, "mustConsume"), A = a(() => {
|
|
145
|
+
let u = "", d;
|
|
146
|
+
for (; d = o("CHAR") ?? o("ESCAPED_CHAR"); ) u += d;
|
|
147
|
+
return u;
|
|
148
|
+
}, "consumeText"), xe = a((u) => u, "DefaultEncodePart"), N = t.encodePart || xe, H = "", $ = a((u) => {
|
|
149
|
+
H += u;
|
|
150
|
+
}, "appendToPendingFixedValue"), M = a(() => {
|
|
151
|
+
H.length && (c.push(new P(3, "", "", N(H), "", 3)), H = "");
|
|
152
|
+
}, "maybeAddPartFromPendingFixedValue"), X = a((u, d, g, y, Z) => {
|
|
153
|
+
let m = 3;
|
|
154
|
+
switch (Z) {
|
|
155
|
+
case "?":
|
|
156
|
+
m = 1;
|
|
157
|
+
break;
|
|
158
|
+
case "*":
|
|
159
|
+
m = 0;
|
|
160
|
+
break;
|
|
161
|
+
case "+":
|
|
162
|
+
m = 2;
|
|
163
|
+
break;
|
|
164
|
+
}
|
|
165
|
+
if (!d && !g && m === 3) {
|
|
166
|
+
$(u);
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
if (M(), !d && !g) {
|
|
170
|
+
if (!u) return;
|
|
171
|
+
c.push(new P(3, "", "", N(u), "", m));
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
let S;
|
|
175
|
+
g ? g === "*" ? S = v : S = g : S = n;
|
|
176
|
+
let k = 2;
|
|
177
|
+
S === n ? (k = 1, S = "") : S === v && (k = 0, S = "");
|
|
178
|
+
let E;
|
|
179
|
+
if (d ? E = d : g && (E = l++), i.has(E)) throw new TypeError(`Duplicate name '${E}'.`);
|
|
180
|
+
i.add(E), c.push(new P(k, E, N(u), S, N(y), m));
|
|
181
|
+
}, "addPart");
|
|
182
|
+
for (; f < r.length; ) {
|
|
183
|
+
let u = o("CHAR"), d = o("NAME"), g = o("REGEX");
|
|
184
|
+
if (!d && !g && (g = o("ASTERISK")), d || g) {
|
|
185
|
+
let m = u ?? "";
|
|
186
|
+
t.prefixes.indexOf(m) === -1 && ($(m), m = ""), M();
|
|
187
|
+
let S = h();
|
|
188
|
+
X(m, d, g, "", S);
|
|
189
|
+
continue;
|
|
190
|
+
}
|
|
191
|
+
let y = u ?? o("ESCAPED_CHAR");
|
|
192
|
+
if (y) {
|
|
193
|
+
$(y);
|
|
194
|
+
continue;
|
|
195
|
+
}
|
|
196
|
+
if (o("OPEN")) {
|
|
197
|
+
let m = A(), S = o("NAME"), k = o("REGEX");
|
|
198
|
+
!S && !k && (k = o("ASTERISK"));
|
|
199
|
+
let E = A();
|
|
200
|
+
p("CLOSE");
|
|
201
|
+
let be = h();
|
|
202
|
+
X(m, S, k, E, be);
|
|
203
|
+
continue;
|
|
204
|
+
}
|
|
205
|
+
M(), p("END");
|
|
206
|
+
}
|
|
207
|
+
return c;
|
|
208
|
+
}
|
|
209
|
+
a(F, "parse");
|
|
210
|
+
function x(e) {
|
|
211
|
+
return e.replace(/([.+*?^${}()[\]|/\\])/g, "\\$1");
|
|
212
|
+
}
|
|
213
|
+
a(x, "escapeString");
|
|
214
|
+
function B(e) {
|
|
215
|
+
return e && e.ignoreCase ? "ui" : "u";
|
|
216
|
+
}
|
|
217
|
+
a(B, "flags");
|
|
218
|
+
function q(e, t, r) {
|
|
219
|
+
return W(F(e, r), t, r);
|
|
220
|
+
}
|
|
221
|
+
a(q, "stringToRegexp");
|
|
222
|
+
function T(e) {
|
|
223
|
+
switch (e) {
|
|
224
|
+
case 0:
|
|
225
|
+
return "*";
|
|
226
|
+
case 1:
|
|
227
|
+
return "?";
|
|
228
|
+
case 2:
|
|
229
|
+
return "+";
|
|
230
|
+
case 3:
|
|
231
|
+
return "";
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
a(T, "modifierToString");
|
|
235
|
+
function W(e, t, r = {}) {
|
|
236
|
+
r.delimiter ??= "/#?", r.prefixes ??= "./", r.sensitive ??= false, r.strict ??= false, r.end ??= true, r.start ??= true, r.endsWith = "";
|
|
237
|
+
let n = r.start ? "^" : "";
|
|
238
|
+
for (let s of e) {
|
|
239
|
+
if (s.type === 3) {
|
|
240
|
+
s.modifier === 3 ? n += x(s.value) : n += `(?:${x(s.value)})${T(s.modifier)}`;
|
|
241
|
+
continue;
|
|
242
|
+
}
|
|
243
|
+
t && t.push(s.name);
|
|
244
|
+
let i = `[^${x(r.delimiter)}]+?`, o = s.value;
|
|
245
|
+
if (s.type === 1 ? o = i : s.type === 0 && (o = v), !s.prefix.length && !s.suffix.length) {
|
|
246
|
+
s.modifier === 3 || s.modifier === 1 ? n += `(${o})${T(s.modifier)}` : n += `((?:${o})${T(s.modifier)})`;
|
|
247
|
+
continue;
|
|
248
|
+
}
|
|
249
|
+
if (s.modifier === 3 || s.modifier === 1) {
|
|
250
|
+
n += `(?:${x(s.prefix)}(${o})${x(s.suffix)})`, n += T(s.modifier);
|
|
251
|
+
continue;
|
|
252
|
+
}
|
|
253
|
+
n += `(?:${x(s.prefix)}`, n += `((?:${o})(?:`, n += x(s.suffix), n += x(s.prefix), n += `(?:${o}))*)${x(s.suffix)})`, s.modifier === 0 && (n += "?");
|
|
254
|
+
}
|
|
255
|
+
let c = `[${x(r.endsWith)}]|$`, l = `[${x(r.delimiter)}]`;
|
|
256
|
+
if (r.end) return r.strict || (n += `${l}?`), r.endsWith.length ? n += `(?=${c})` : n += "$", new RegExp(n, B(r));
|
|
257
|
+
r.strict || (n += `(?:${l}(?=${c}))?`);
|
|
258
|
+
let f = false;
|
|
259
|
+
if (e.length) {
|
|
260
|
+
let s = e[e.length - 1];
|
|
261
|
+
s.type === 3 && s.modifier === 3 && (f = r.delimiter.indexOf(s) > -1);
|
|
262
|
+
}
|
|
263
|
+
return f || (n += `(?=${l}|${c})`), new RegExp(n, B(r));
|
|
264
|
+
}
|
|
265
|
+
a(W, "partsToRegexp");
|
|
266
|
+
var b = { delimiter: "", prefixes: "", sensitive: true, strict: true };
|
|
267
|
+
var J = { delimiter: ".", prefixes: "", sensitive: true, strict: true };
|
|
268
|
+
var Q = { delimiter: "/", prefixes: "/", sensitive: true, strict: true };
|
|
269
|
+
function ee(e, t) {
|
|
270
|
+
return e.length ? e[0] === "/" ? true : !t || e.length < 2 ? false : (e[0] == "\\" || e[0] == "{") && e[1] == "/" : false;
|
|
271
|
+
}
|
|
272
|
+
a(ee, "isAbsolutePathname");
|
|
273
|
+
function te(e, t) {
|
|
274
|
+
return e.startsWith(t) ? e.substring(t.length, e.length) : e;
|
|
275
|
+
}
|
|
276
|
+
a(te, "maybeStripPrefix");
|
|
277
|
+
function ke(e, t) {
|
|
278
|
+
return e.endsWith(t) ? e.substr(0, e.length - t.length) : e;
|
|
279
|
+
}
|
|
280
|
+
a(ke, "maybeStripSuffix");
|
|
281
|
+
function _(e) {
|
|
282
|
+
return !e || e.length < 2 ? false : e[0] === "[" || (e[0] === "\\" || e[0] === "{") && e[1] === "[";
|
|
283
|
+
}
|
|
284
|
+
a(_, "treatAsIPv6Hostname");
|
|
285
|
+
var re = ["ftp", "file", "http", "https", "ws", "wss"];
|
|
286
|
+
function U(e) {
|
|
287
|
+
if (!e) return true;
|
|
288
|
+
for (let t of re) if (e.test(t)) return true;
|
|
289
|
+
return false;
|
|
290
|
+
}
|
|
291
|
+
a(U, "isSpecialScheme");
|
|
292
|
+
function ne(e, t) {
|
|
293
|
+
if (e = te(e, "#"), t || e === "") return e;
|
|
294
|
+
let r = new URL("https://example.com");
|
|
295
|
+
return r.hash = e, r.hash ? r.hash.substring(1, r.hash.length) : "";
|
|
296
|
+
}
|
|
297
|
+
a(ne, "canonicalizeHash");
|
|
298
|
+
function se(e, t) {
|
|
299
|
+
if (e = te(e, "?"), t || e === "") return e;
|
|
300
|
+
let r = new URL("https://example.com");
|
|
301
|
+
return r.search = e, r.search ? r.search.substring(1, r.search.length) : "";
|
|
302
|
+
}
|
|
303
|
+
a(se, "canonicalizeSearch");
|
|
304
|
+
function ie(e, t) {
|
|
305
|
+
return t || e === "" ? e : _(e) ? K(e) : j(e);
|
|
306
|
+
}
|
|
307
|
+
a(ie, "canonicalizeHostname");
|
|
308
|
+
function ae(e, t) {
|
|
309
|
+
if (t || e === "") return e;
|
|
310
|
+
let r = new URL("https://example.com");
|
|
311
|
+
return r.password = e, r.password;
|
|
312
|
+
}
|
|
313
|
+
a(ae, "canonicalizePassword");
|
|
314
|
+
function oe(e, t) {
|
|
315
|
+
if (t || e === "") return e;
|
|
316
|
+
let r = new URL("https://example.com");
|
|
317
|
+
return r.username = e, r.username;
|
|
318
|
+
}
|
|
319
|
+
a(oe, "canonicalizeUsername");
|
|
320
|
+
function ce(e, t, r) {
|
|
321
|
+
if (r || e === "") return e;
|
|
322
|
+
if (t && !re.includes(t)) return new URL(`${t}:${e}`).pathname;
|
|
323
|
+
let n = e[0] == "/";
|
|
324
|
+
return e = new URL(n ? e : "/-" + e, "https://example.com").pathname, n || (e = e.substring(2, e.length)), e;
|
|
325
|
+
}
|
|
326
|
+
a(ce, "canonicalizePathname");
|
|
327
|
+
function le(e, t, r) {
|
|
328
|
+
return z(t) === e && (e = ""), r || e === "" ? e : G(e);
|
|
329
|
+
}
|
|
330
|
+
a(le, "canonicalizePort");
|
|
331
|
+
function fe(e, t) {
|
|
332
|
+
return e = ke(e, ":"), t || e === "" ? e : w(e);
|
|
333
|
+
}
|
|
334
|
+
a(fe, "canonicalizeProtocol");
|
|
335
|
+
function z(e) {
|
|
336
|
+
switch (e) {
|
|
337
|
+
case "ws":
|
|
338
|
+
case "http":
|
|
339
|
+
return "80";
|
|
340
|
+
case "wws":
|
|
341
|
+
case "https":
|
|
342
|
+
return "443";
|
|
343
|
+
case "ftp":
|
|
344
|
+
return "21";
|
|
345
|
+
default:
|
|
346
|
+
return "";
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
a(z, "defaultPortForProtocol");
|
|
350
|
+
function w(e) {
|
|
351
|
+
if (e === "") return e;
|
|
352
|
+
if (/^[-+.A-Za-z0-9]*$/.test(e)) return e.toLowerCase();
|
|
353
|
+
throw new TypeError(`Invalid protocol '${e}'.`);
|
|
354
|
+
}
|
|
355
|
+
a(w, "protocolEncodeCallback");
|
|
356
|
+
function he(e) {
|
|
357
|
+
if (e === "") return e;
|
|
358
|
+
let t = new URL("https://example.com");
|
|
359
|
+
return t.username = e, t.username;
|
|
360
|
+
}
|
|
361
|
+
a(he, "usernameEncodeCallback");
|
|
362
|
+
function ue(e) {
|
|
363
|
+
if (e === "") return e;
|
|
364
|
+
let t = new URL("https://example.com");
|
|
365
|
+
return t.password = e, t.password;
|
|
366
|
+
}
|
|
367
|
+
a(ue, "passwordEncodeCallback");
|
|
368
|
+
function j(e) {
|
|
369
|
+
if (e === "") return e;
|
|
370
|
+
if (/[\t\n\r #%/:<>?@[\]^\\|]/g.test(e)) throw new TypeError(`Invalid hostname '${e}'`);
|
|
371
|
+
let t = new URL("https://example.com");
|
|
372
|
+
return t.hostname = e, t.hostname;
|
|
373
|
+
}
|
|
374
|
+
a(j, "hostnameEncodeCallback");
|
|
375
|
+
function K(e) {
|
|
376
|
+
if (e === "") return e;
|
|
377
|
+
if (/[^0-9a-fA-F[\]:]/g.test(e)) throw new TypeError(`Invalid IPv6 hostname '${e}'`);
|
|
378
|
+
return e.toLowerCase();
|
|
379
|
+
}
|
|
380
|
+
a(K, "ipv6HostnameEncodeCallback");
|
|
381
|
+
function G(e) {
|
|
382
|
+
if (e === "" || /^[0-9]*$/.test(e) && parseInt(e) <= 65535) return e;
|
|
383
|
+
throw new TypeError(`Invalid port '${e}'.`);
|
|
384
|
+
}
|
|
385
|
+
a(G, "portEncodeCallback");
|
|
386
|
+
function de(e) {
|
|
387
|
+
if (e === "") return e;
|
|
388
|
+
let t = new URL("https://example.com");
|
|
389
|
+
return t.pathname = e[0] !== "/" ? "/-" + e : e, e[0] !== "/" ? t.pathname.substring(2, t.pathname.length) : t.pathname;
|
|
390
|
+
}
|
|
391
|
+
a(de, "standardURLPathnameEncodeCallback");
|
|
392
|
+
function pe(e) {
|
|
393
|
+
return e === "" ? e : new URL(`data:${e}`).pathname;
|
|
394
|
+
}
|
|
395
|
+
a(pe, "pathURLPathnameEncodeCallback");
|
|
396
|
+
function ge(e) {
|
|
397
|
+
if (e === "") return e;
|
|
398
|
+
let t = new URL("https://example.com");
|
|
399
|
+
return t.search = e, t.search.substring(1, t.search.length);
|
|
400
|
+
}
|
|
401
|
+
a(ge, "searchEncodeCallback");
|
|
402
|
+
function me(e) {
|
|
403
|
+
if (e === "") return e;
|
|
404
|
+
let t = new URL("https://example.com");
|
|
405
|
+
return t.hash = e, t.hash.substring(1, t.hash.length);
|
|
406
|
+
}
|
|
407
|
+
a(me, "hashEncodeCallback");
|
|
408
|
+
var C = class {
|
|
409
|
+
#i;
|
|
410
|
+
#n = [];
|
|
411
|
+
#t = {};
|
|
412
|
+
#e = 0;
|
|
413
|
+
#s = 1;
|
|
414
|
+
#l = 0;
|
|
415
|
+
#o = 0;
|
|
416
|
+
#d = 0;
|
|
417
|
+
#p = 0;
|
|
418
|
+
#g = false;
|
|
419
|
+
constructor(t) {
|
|
420
|
+
this.#i = t;
|
|
421
|
+
}
|
|
422
|
+
get result() {
|
|
423
|
+
return this.#t;
|
|
424
|
+
}
|
|
425
|
+
parse() {
|
|
426
|
+
for (this.#n = D(this.#i, true); this.#e < this.#n.length; this.#e += this.#s) {
|
|
427
|
+
if (this.#s = 1, this.#n[this.#e].type === "END") {
|
|
428
|
+
if (this.#o === 0) {
|
|
429
|
+
this.#b(), this.#f() ? this.#r(9, 1) : this.#h() ? this.#r(8, 1) : this.#r(7, 0);
|
|
430
|
+
continue;
|
|
431
|
+
} else if (this.#o === 2) {
|
|
432
|
+
this.#u(5);
|
|
433
|
+
continue;
|
|
434
|
+
}
|
|
435
|
+
this.#r(10, 0);
|
|
436
|
+
break;
|
|
437
|
+
}
|
|
438
|
+
if (this.#d > 0) if (this.#A()) this.#d -= 1;
|
|
439
|
+
else continue;
|
|
440
|
+
if (this.#T()) {
|
|
441
|
+
this.#d += 1;
|
|
442
|
+
continue;
|
|
443
|
+
}
|
|
444
|
+
switch (this.#o) {
|
|
445
|
+
case 0:
|
|
446
|
+
this.#P() && this.#u(1);
|
|
447
|
+
break;
|
|
448
|
+
case 1:
|
|
449
|
+
if (this.#P()) {
|
|
450
|
+
this.#C();
|
|
451
|
+
let t = 7, r = 1;
|
|
452
|
+
this.#E() ? (t = 2, r = 3) : this.#g && (t = 2), this.#r(t, r);
|
|
453
|
+
}
|
|
454
|
+
break;
|
|
455
|
+
case 2:
|
|
456
|
+
this.#S() ? this.#u(3) : (this.#x() || this.#h() || this.#f()) && this.#u(5);
|
|
457
|
+
break;
|
|
458
|
+
case 3:
|
|
459
|
+
this.#O() ? this.#r(4, 1) : this.#S() && this.#r(5, 1);
|
|
460
|
+
break;
|
|
461
|
+
case 4:
|
|
462
|
+
this.#S() && this.#r(5, 1);
|
|
463
|
+
break;
|
|
464
|
+
case 5:
|
|
465
|
+
this.#y() ? this.#p += 1 : this.#w() && (this.#p -= 1), this.#k() && !this.#p ? this.#r(6, 1) : this.#x() ? this.#r(7, 0) : this.#h() ? this.#r(8, 1) : this.#f() && this.#r(9, 1);
|
|
466
|
+
break;
|
|
467
|
+
case 6:
|
|
468
|
+
this.#x() ? this.#r(7, 0) : this.#h() ? this.#r(8, 1) : this.#f() && this.#r(9, 1);
|
|
469
|
+
break;
|
|
470
|
+
case 7:
|
|
471
|
+
this.#h() ? this.#r(8, 1) : this.#f() && this.#r(9, 1);
|
|
472
|
+
break;
|
|
473
|
+
case 8:
|
|
474
|
+
this.#f() && this.#r(9, 1);
|
|
475
|
+
break;
|
|
476
|
+
case 9:
|
|
477
|
+
break;
|
|
478
|
+
case 10:
|
|
479
|
+
break;
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
this.#t.hostname !== void 0 && this.#t.port === void 0 && (this.#t.port = "");
|
|
483
|
+
}
|
|
484
|
+
#r(t, r) {
|
|
485
|
+
switch (this.#o) {
|
|
486
|
+
case 0:
|
|
487
|
+
break;
|
|
488
|
+
case 1:
|
|
489
|
+
this.#t.protocol = this.#c();
|
|
490
|
+
break;
|
|
491
|
+
case 2:
|
|
492
|
+
break;
|
|
493
|
+
case 3:
|
|
494
|
+
this.#t.username = this.#c();
|
|
495
|
+
break;
|
|
496
|
+
case 4:
|
|
497
|
+
this.#t.password = this.#c();
|
|
498
|
+
break;
|
|
499
|
+
case 5:
|
|
500
|
+
this.#t.hostname = this.#c();
|
|
501
|
+
break;
|
|
502
|
+
case 6:
|
|
503
|
+
this.#t.port = this.#c();
|
|
504
|
+
break;
|
|
505
|
+
case 7:
|
|
506
|
+
this.#t.pathname = this.#c();
|
|
507
|
+
break;
|
|
508
|
+
case 8:
|
|
509
|
+
this.#t.search = this.#c();
|
|
510
|
+
break;
|
|
511
|
+
case 9:
|
|
512
|
+
this.#t.hash = this.#c();
|
|
513
|
+
break;
|
|
514
|
+
case 10:
|
|
515
|
+
break;
|
|
516
|
+
}
|
|
517
|
+
this.#o !== 0 && t !== 10 && ([1, 2, 3, 4].includes(this.#o) && [6, 7, 8, 9].includes(t) && (this.#t.hostname ??= ""), [1, 2, 3, 4, 5, 6].includes(this.#o) && [8, 9].includes(t) && (this.#t.pathname ??= this.#g ? "/" : ""), [1, 2, 3, 4, 5, 6, 7].includes(this.#o) && t === 9 && (this.#t.search ??= "")), this.#R(t, r);
|
|
518
|
+
}
|
|
519
|
+
#R(t, r) {
|
|
520
|
+
this.#o = t, this.#l = this.#e + r, this.#e += r, this.#s = 0;
|
|
521
|
+
}
|
|
522
|
+
#b() {
|
|
523
|
+
this.#e = this.#l, this.#s = 0;
|
|
524
|
+
}
|
|
525
|
+
#u(t) {
|
|
526
|
+
this.#b(), this.#o = t;
|
|
527
|
+
}
|
|
528
|
+
#m(t) {
|
|
529
|
+
return t < 0 && (t = this.#n.length - t), t < this.#n.length ? this.#n[t] : this.#n[this.#n.length - 1];
|
|
530
|
+
}
|
|
531
|
+
#a(t, r) {
|
|
532
|
+
let n = this.#m(t);
|
|
533
|
+
return n.value === r && (n.type === "CHAR" || n.type === "ESCAPED_CHAR" || n.type === "INVALID_CHAR");
|
|
534
|
+
}
|
|
535
|
+
#P() {
|
|
536
|
+
return this.#a(this.#e, ":");
|
|
537
|
+
}
|
|
538
|
+
#E() {
|
|
539
|
+
return this.#a(this.#e + 1, "/") && this.#a(this.#e + 2, "/");
|
|
540
|
+
}
|
|
541
|
+
#S() {
|
|
542
|
+
return this.#a(this.#e, "@");
|
|
543
|
+
}
|
|
544
|
+
#O() {
|
|
545
|
+
return this.#a(this.#e, ":");
|
|
546
|
+
}
|
|
547
|
+
#k() {
|
|
548
|
+
return this.#a(this.#e, ":");
|
|
549
|
+
}
|
|
550
|
+
#x() {
|
|
551
|
+
return this.#a(this.#e, "/");
|
|
552
|
+
}
|
|
553
|
+
#h() {
|
|
554
|
+
if (this.#a(this.#e, "?")) return true;
|
|
555
|
+
if (this.#n[this.#e].value !== "?") return false;
|
|
556
|
+
let t = this.#m(this.#e - 1);
|
|
557
|
+
return t.type !== "NAME" && t.type !== "REGEX" && t.type !== "CLOSE" && t.type !== "ASTERISK";
|
|
558
|
+
}
|
|
559
|
+
#f() {
|
|
560
|
+
return this.#a(this.#e, "#");
|
|
561
|
+
}
|
|
562
|
+
#T() {
|
|
563
|
+
return this.#n[this.#e].type == "OPEN";
|
|
564
|
+
}
|
|
565
|
+
#A() {
|
|
566
|
+
return this.#n[this.#e].type == "CLOSE";
|
|
567
|
+
}
|
|
568
|
+
#y() {
|
|
569
|
+
return this.#a(this.#e, "[");
|
|
570
|
+
}
|
|
571
|
+
#w() {
|
|
572
|
+
return this.#a(this.#e, "]");
|
|
573
|
+
}
|
|
574
|
+
#c() {
|
|
575
|
+
let t = this.#n[this.#e], r = this.#m(this.#l).index;
|
|
576
|
+
return this.#i.substring(r, t.index);
|
|
577
|
+
}
|
|
578
|
+
#C() {
|
|
579
|
+
let t = {};
|
|
580
|
+
Object.assign(t, b), t.encodePart = w;
|
|
581
|
+
let r = q(this.#c(), void 0, t);
|
|
582
|
+
this.#g = U(r);
|
|
583
|
+
}
|
|
584
|
+
};
|
|
585
|
+
a(C, "Parser");
|
|
586
|
+
var V = ["protocol", "username", "password", "hostname", "port", "pathname", "search", "hash"];
|
|
587
|
+
var O = "*";
|
|
588
|
+
function Se(e, t) {
|
|
589
|
+
if (typeof e != "string") throw new TypeError("parameter 1 is not of type 'string'.");
|
|
590
|
+
let r = new URL(e, t);
|
|
591
|
+
return { protocol: r.protocol.substring(0, r.protocol.length - 1), username: r.username, password: r.password, hostname: r.hostname, port: r.port, pathname: r.pathname, search: r.search !== "" ? r.search.substring(1, r.search.length) : void 0, hash: r.hash !== "" ? r.hash.substring(1, r.hash.length) : void 0 };
|
|
592
|
+
}
|
|
593
|
+
a(Se, "extractValues");
|
|
594
|
+
function R(e, t) {
|
|
595
|
+
return t ? I(e) : e;
|
|
596
|
+
}
|
|
597
|
+
a(R, "processBaseURLString");
|
|
598
|
+
function L(e, t, r) {
|
|
599
|
+
let n;
|
|
600
|
+
if (typeof t.baseURL == "string") try {
|
|
601
|
+
n = new URL(t.baseURL), t.protocol === void 0 && (e.protocol = R(n.protocol.substring(0, n.protocol.length - 1), r)), !r && t.protocol === void 0 && t.hostname === void 0 && t.port === void 0 && t.username === void 0 && (e.username = R(n.username, r)), !r && t.protocol === void 0 && t.hostname === void 0 && t.port === void 0 && t.username === void 0 && t.password === void 0 && (e.password = R(n.password, r)), t.protocol === void 0 && t.hostname === void 0 && (e.hostname = R(n.hostname, r)), t.protocol === void 0 && t.hostname === void 0 && t.port === void 0 && (e.port = R(n.port, r)), t.protocol === void 0 && t.hostname === void 0 && t.port === void 0 && t.pathname === void 0 && (e.pathname = R(n.pathname, r)), t.protocol === void 0 && t.hostname === void 0 && t.port === void 0 && t.pathname === void 0 && t.search === void 0 && (e.search = R(n.search.substring(1, n.search.length), r)), t.protocol === void 0 && t.hostname === void 0 && t.port === void 0 && t.pathname === void 0 && t.search === void 0 && t.hash === void 0 && (e.hash = R(n.hash.substring(1, n.hash.length), r));
|
|
602
|
+
} catch {
|
|
603
|
+
throw new TypeError(`invalid baseURL '${t.baseURL}'.`);
|
|
604
|
+
}
|
|
605
|
+
if (typeof t.protocol == "string" && (e.protocol = fe(t.protocol, r)), typeof t.username == "string" && (e.username = oe(t.username, r)), typeof t.password == "string" && (e.password = ae(t.password, r)), typeof t.hostname == "string" && (e.hostname = ie(t.hostname, r)), typeof t.port == "string" && (e.port = le(t.port, e.protocol, r)), typeof t.pathname == "string") {
|
|
606
|
+
if (e.pathname = t.pathname, n && !ee(e.pathname, r)) {
|
|
607
|
+
let c = n.pathname.lastIndexOf("/");
|
|
608
|
+
c >= 0 && (e.pathname = R(n.pathname.substring(0, c + 1), r) + e.pathname);
|
|
609
|
+
}
|
|
610
|
+
e.pathname = ce(e.pathname, e.protocol, r);
|
|
611
|
+
}
|
|
612
|
+
return typeof t.search == "string" && (e.search = se(t.search, r)), typeof t.hash == "string" && (e.hash = ne(t.hash, r)), e;
|
|
613
|
+
}
|
|
614
|
+
a(L, "applyInit");
|
|
615
|
+
function I(e) {
|
|
616
|
+
return e.replace(/([+*?:{}()\\])/g, "\\$1");
|
|
617
|
+
}
|
|
618
|
+
a(I, "escapePatternString");
|
|
619
|
+
function Te(e) {
|
|
620
|
+
return e.replace(/([.+*?^${}()[\]|/\\])/g, "\\$1");
|
|
621
|
+
}
|
|
622
|
+
a(Te, "escapeRegexpString");
|
|
623
|
+
function Ae(e, t) {
|
|
624
|
+
t.delimiter ??= "/#?", t.prefixes ??= "./", t.sensitive ??= false, t.strict ??= false, t.end ??= true, t.start ??= true, t.endsWith = "";
|
|
625
|
+
let r = ".*", n = `[^${Te(t.delimiter)}]+?`, c = /[$_\u200C\u200D\p{ID_Continue}]/u, l = "";
|
|
626
|
+
for (let f = 0; f < e.length; ++f) {
|
|
627
|
+
let s = e[f];
|
|
628
|
+
if (s.type === 3) {
|
|
629
|
+
if (s.modifier === 3) {
|
|
630
|
+
l += I(s.value);
|
|
631
|
+
continue;
|
|
632
|
+
}
|
|
633
|
+
l += `{${I(s.value)}}${T(s.modifier)}`;
|
|
634
|
+
continue;
|
|
635
|
+
}
|
|
636
|
+
let i = s.hasCustomName(), o = !!s.suffix.length || !!s.prefix.length && (s.prefix.length !== 1 || !t.prefixes.includes(s.prefix)), h = f > 0 ? e[f - 1] : null, p = f < e.length - 1 ? e[f + 1] : null;
|
|
637
|
+
if (!o && i && s.type === 1 && s.modifier === 3 && p && !p.prefix.length && !p.suffix.length) if (p.type === 3) {
|
|
638
|
+
let A = p.value.length > 0 ? p.value[0] : "";
|
|
639
|
+
o = c.test(A);
|
|
640
|
+
} else o = !p.hasCustomName();
|
|
641
|
+
if (!o && !s.prefix.length && h && h.type === 3) {
|
|
642
|
+
let A = h.value[h.value.length - 1];
|
|
643
|
+
o = t.prefixes.includes(A);
|
|
644
|
+
}
|
|
645
|
+
o && (l += "{"), l += I(s.prefix), i && (l += `:${s.name}`), s.type === 2 ? l += `(${s.value})` : s.type === 1 ? i || (l += `(${n})`) : s.type === 0 && (!i && (!h || h.type === 3 || h.modifier !== 3 || o || s.prefix !== "") ? l += "*" : l += `(${r})`), s.type === 1 && i && s.suffix.length && c.test(s.suffix[0]) && (l += "\\"), l += I(s.suffix), o && (l += "}"), s.modifier !== 3 && (l += T(s.modifier));
|
|
646
|
+
}
|
|
647
|
+
return l;
|
|
648
|
+
}
|
|
649
|
+
a(Ae, "partsToPattern");
|
|
650
|
+
var Y = class {
|
|
651
|
+
#i;
|
|
652
|
+
#n = {};
|
|
653
|
+
#t = {};
|
|
654
|
+
#e = {};
|
|
655
|
+
#s = {};
|
|
656
|
+
#l = false;
|
|
657
|
+
constructor(t = {}, r, n) {
|
|
658
|
+
try {
|
|
659
|
+
let c;
|
|
660
|
+
if (typeof r == "string" ? c = r : n = r, typeof t == "string") {
|
|
661
|
+
let i = new C(t);
|
|
662
|
+
if (i.parse(), t = i.result, c === void 0 && typeof t.protocol != "string") throw new TypeError("A base URL must be provided for a relative constructor string.");
|
|
663
|
+
t.baseURL = c;
|
|
664
|
+
} else {
|
|
665
|
+
if (!t || typeof t != "object") throw new TypeError("parameter 1 is not of type 'string' and cannot convert to dictionary.");
|
|
666
|
+
if (c) throw new TypeError("parameter 1 is not of type 'string'.");
|
|
667
|
+
}
|
|
668
|
+
typeof n > "u" && (n = { ignoreCase: false });
|
|
669
|
+
let l = { ignoreCase: n.ignoreCase === true }, f = { pathname: O, protocol: O, username: O, password: O, hostname: O, port: O, search: O, hash: O };
|
|
670
|
+
this.#i = L(f, t, true), z(this.#i.protocol) === this.#i.port && (this.#i.port = "");
|
|
671
|
+
let s;
|
|
672
|
+
for (s of V) {
|
|
673
|
+
if (!(s in this.#i)) continue;
|
|
674
|
+
let i = {}, o = this.#i[s];
|
|
675
|
+
switch (this.#t[s] = [], s) {
|
|
676
|
+
case "protocol":
|
|
677
|
+
Object.assign(i, b), i.encodePart = w;
|
|
678
|
+
break;
|
|
679
|
+
case "username":
|
|
680
|
+
Object.assign(i, b), i.encodePart = he;
|
|
681
|
+
break;
|
|
682
|
+
case "password":
|
|
683
|
+
Object.assign(i, b), i.encodePart = ue;
|
|
684
|
+
break;
|
|
685
|
+
case "hostname":
|
|
686
|
+
Object.assign(i, J), _(o) ? i.encodePart = K : i.encodePart = j;
|
|
687
|
+
break;
|
|
688
|
+
case "port":
|
|
689
|
+
Object.assign(i, b), i.encodePart = G;
|
|
690
|
+
break;
|
|
691
|
+
case "pathname":
|
|
692
|
+
U(this.#n.protocol) ? (Object.assign(i, Q, l), i.encodePart = de) : (Object.assign(i, b, l), i.encodePart = pe);
|
|
693
|
+
break;
|
|
694
|
+
case "search":
|
|
695
|
+
Object.assign(i, b, l), i.encodePart = ge;
|
|
696
|
+
break;
|
|
697
|
+
case "hash":
|
|
698
|
+
Object.assign(i, b, l), i.encodePart = me;
|
|
699
|
+
break;
|
|
700
|
+
}
|
|
701
|
+
try {
|
|
702
|
+
this.#s[s] = F(o, i), this.#n[s] = W(this.#s[s], this.#t[s], i), this.#e[s] = Ae(this.#s[s], i), this.#l = this.#l || this.#s[s].some((h) => h.type === 2);
|
|
703
|
+
} catch {
|
|
704
|
+
throw new TypeError(`invalid ${s} pattern '${this.#i[s]}'.`);
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
} catch (c) {
|
|
708
|
+
throw new TypeError(`Failed to construct 'URLPattern': ${c.message}`);
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
get [Symbol.toStringTag]() {
|
|
712
|
+
return "URLPattern";
|
|
713
|
+
}
|
|
714
|
+
test(t = {}, r) {
|
|
715
|
+
let n = { pathname: "", protocol: "", username: "", password: "", hostname: "", port: "", search: "", hash: "" };
|
|
716
|
+
if (typeof t != "string" && r) throw new TypeError("parameter 1 is not of type 'string'.");
|
|
717
|
+
if (typeof t > "u") return false;
|
|
718
|
+
try {
|
|
719
|
+
typeof t == "object" ? n = L(n, t, false) : n = L(n, Se(t, r), false);
|
|
720
|
+
} catch {
|
|
721
|
+
return false;
|
|
722
|
+
}
|
|
723
|
+
let c;
|
|
724
|
+
for (c of V) if (!this.#n[c].exec(n[c])) return false;
|
|
725
|
+
return true;
|
|
726
|
+
}
|
|
727
|
+
exec(t = {}, r) {
|
|
728
|
+
let n = { pathname: "", protocol: "", username: "", password: "", hostname: "", port: "", search: "", hash: "" };
|
|
729
|
+
if (typeof t != "string" && r) throw new TypeError("parameter 1 is not of type 'string'.");
|
|
730
|
+
if (typeof t > "u") return;
|
|
731
|
+
try {
|
|
732
|
+
typeof t == "object" ? n = L(n, t, false) : n = L(n, Se(t, r), false);
|
|
733
|
+
} catch {
|
|
734
|
+
return null;
|
|
735
|
+
}
|
|
736
|
+
let c = {};
|
|
737
|
+
r ? c.inputs = [t, r] : c.inputs = [t];
|
|
738
|
+
let l;
|
|
739
|
+
for (l of V) {
|
|
740
|
+
let f = this.#n[l].exec(n[l]);
|
|
741
|
+
if (!f) return null;
|
|
742
|
+
let s = {};
|
|
743
|
+
for (let [i, o] of this.#t[l].entries()) if (typeof o == "string" || typeof o == "number") {
|
|
744
|
+
let h = f[i + 1];
|
|
745
|
+
s[o] = h;
|
|
746
|
+
}
|
|
747
|
+
c[l] = { input: n[l] ?? "", groups: s };
|
|
748
|
+
}
|
|
749
|
+
return c;
|
|
750
|
+
}
|
|
751
|
+
static compareComponent(t, r, n) {
|
|
752
|
+
let c = a((i, o) => {
|
|
753
|
+
for (let h of ["type", "modifier", "prefix", "value", "suffix"]) {
|
|
754
|
+
if (i[h] < o[h]) return -1;
|
|
755
|
+
if (i[h] === o[h]) continue;
|
|
756
|
+
return 1;
|
|
757
|
+
}
|
|
758
|
+
return 0;
|
|
759
|
+
}, "comparePart"), l = new P(3, "", "", "", "", 3), f = new P(0, "", "", "", "", 3), s = a((i, o) => {
|
|
760
|
+
let h = 0;
|
|
761
|
+
for (; h < Math.min(i.length, o.length); ++h) {
|
|
762
|
+
let p = c(i[h], o[h]);
|
|
763
|
+
if (p) return p;
|
|
764
|
+
}
|
|
765
|
+
return i.length === o.length ? 0 : c(i[h] ?? l, o[h] ?? l);
|
|
766
|
+
}, "comparePartList");
|
|
767
|
+
return !r.#e[t] && !n.#e[t] ? 0 : r.#e[t] && !n.#e[t] ? s(r.#s[t], [f]) : !r.#e[t] && n.#e[t] ? s([f], n.#s[t]) : s(r.#s[t], n.#s[t]);
|
|
768
|
+
}
|
|
769
|
+
get protocol() {
|
|
770
|
+
return this.#e.protocol;
|
|
771
|
+
}
|
|
772
|
+
get username() {
|
|
773
|
+
return this.#e.username;
|
|
774
|
+
}
|
|
775
|
+
get password() {
|
|
776
|
+
return this.#e.password;
|
|
777
|
+
}
|
|
778
|
+
get hostname() {
|
|
779
|
+
return this.#e.hostname;
|
|
780
|
+
}
|
|
781
|
+
get port() {
|
|
782
|
+
return this.#e.port;
|
|
783
|
+
}
|
|
784
|
+
get pathname() {
|
|
785
|
+
return this.#e.pathname;
|
|
786
|
+
}
|
|
787
|
+
get search() {
|
|
788
|
+
return this.#e.search;
|
|
789
|
+
}
|
|
790
|
+
get hash() {
|
|
791
|
+
return this.#e.hash;
|
|
792
|
+
}
|
|
793
|
+
get hasRegExpGroups() {
|
|
794
|
+
return this.#l;
|
|
795
|
+
}
|
|
796
|
+
};
|
|
797
|
+
a(Y, "URLPattern");
|
|
798
|
+
|
|
799
|
+
// node_modules/urlpattern-polyfill/index.js
|
|
800
|
+
if (!globalThis.URLPattern) {
|
|
801
|
+
globalThis.URLPattern = Y;
|
|
802
|
+
}
|
|
803
|
+
export {
|
|
804
|
+
Y as URLPattern
|
|
805
|
+
};
|