@paulirish/trace_engine 0.0.66 → 0.0.67-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 +19 -17
- package/analyze-trace.mjs +6 -144
- package/core/common/Base64.d.ts +12 -0
- package/core/common/CharacterIdMap.d.ts +5 -0
- package/core/common/Color.d.ts +357 -0
- package/core/common/ColorConverter.d.ts +26 -0
- package/core/common/ColorUtils.d.ts +45 -0
- package/core/common/Console.d.ts +54 -0
- package/core/common/Debouncer.d.ts +8 -0
- package/core/common/EventTarget.d.ts +22 -0
- package/core/common/Gzip.d.ts +23 -0
- package/core/common/JavaScriptMetaData.d.ts +20 -0
- package/core/common/Lazy.d.ts +4 -0
- package/core/common/MapWithDefault.d.ts +9 -0
- package/core/common/Mutex.d.ts +13 -0
- package/core/common/Object.d.ts +20 -0
- package/core/common/ParsedURL.d.ts +87 -0
- package/core/common/Progress.d.ts +47 -0
- package/core/common/ResolverBase.d.ts +29 -0
- package/core/common/ResourceType.d.ts +52 -0
- package/core/common/ReturnToPanel.d.ts +10 -0
- package/core/common/Revealer.d.ts +66 -0
- package/core/common/Runnable.d.ts +14 -0
- package/core/common/SegmentedRange.d.ts +14 -0
- package/core/common/SettingRegistration.d.ts +136 -0
- package/core/common/Settings.d.ts +226 -0
- package/core/common/SimpleHistoryManager.d.ts +20 -0
- package/core/common/Srcset.d.ts +16 -0
- package/core/common/StringOutputStream.d.ts +10 -0
- package/core/common/TextDictionary.d.ts +11 -0
- package/core/common/Throttler.d.ts +12 -0
- package/core/common/Trie.d.ts +24 -0
- package/core/common/VersionController.d.ts +85 -0
- package/core/common/common.d.ts +33 -1
- package/core/host/AidaClient.d.ts +73 -0
- package/core/host/AidaClientTypes.d.ts +355 -0
- package/core/host/AidaGcaTranslation.d.ts +10 -0
- package/core/host/DispatchHttpRequestClient.d.ts +14 -0
- package/core/host/GcaClient.d.ts +14 -0
- package/core/host/GcaTypes.d.ts +411 -0
- package/core/host/GdpClient.d.ts +84 -0
- package/core/host/InspectorFrontendHost.d.ts +29 -0
- package/core/host/InspectorFrontendHostAPI.d.ts +425 -0
- package/core/host/InspectorFrontendHostStub.d.ts +151 -0
- package/core/host/Platform.d.ts +11 -0
- package/core/host/ResourceLoader.d.ts +15 -0
- package/core/host/UserMetrics.d.ts +116 -0
- package/core/host/UserMetricsEnums.d.ts +883 -0
- package/core/host/host.d.ts +13 -1
- package/core/i18n/ByteUtilities.d.ts +11 -0
- package/core/i18n/DevToolsLocale.d.ts +41 -0
- package/core/i18n/NumberFormatter.d.ts +11 -0
- package/core/i18n/i18n.d.ts +10 -0
- package/core/i18n/i18nImpl.d.ts +64 -0
- package/core/i18n/i18nTypes.d.ts +5 -0
- package/core/i18n/locales.d.ts +15 -0
- package/core/i18n/time-utilities.d.ts +16 -0
- package/core/platform/StringUtilities.d.ts +0 -21
- package/core/protocol_client/CDPConnection.d.ts +77 -0
- package/core/protocol_client/ConnectionTransport.d.ts +9 -0
- package/core/protocol_client/DevToolsCDPConnection.d.ts +16 -0
- package/core/protocol_client/InspectorBackend.d.ts +223 -0
- package/core/protocol_client/protocol_client.d.ts +5 -0
- package/core/root/DevToolsContext.d.ts +34 -0
- package/core/root/ExperimentNames.d.ts +8 -0
- package/core/root/Runtime.d.ts +351 -0
- package/core/root/root.d.ts +4 -1
- package/core/sdk/AccessibilityModel.d.ts +76 -0
- package/core/sdk/AnimationModel.d.ts +161 -0
- package/core/sdk/AutofillModel.d.ts +23 -0
- package/core/sdk/CPUProfilerModel.d.ts +46 -0
- package/core/sdk/CPUThrottlingManager.d.ts +47 -0
- package/core/sdk/CSSContainerQuery.d.ts +42 -0
- package/core/sdk/CSSFontFace.d.ts +10 -0
- package/core/sdk/CSSLayer.d.ts +9 -0
- package/core/sdk/CSSLocation.d.ts +14 -0
- package/core/sdk/CSSMatchedStyles.d.ts +138 -0
- package/core/sdk/CSSMedia.d.ts +36 -0
- package/core/sdk/CSSMetadata.d.ts +87 -0
- package/core/sdk/CSSModel.d.ts +180 -0
- package/core/sdk/CSSNavigation.d.ts +10 -0
- package/core/sdk/CSSProperty.d.ts +53 -0
- package/core/sdk/CSSPropertyParser.d.ts +131 -0
- package/core/sdk/CSSPropertyParserMatchers.d.ts +442 -0
- package/core/sdk/CSSQuery.d.ts +22 -0
- package/core/sdk/CSSRule.d.ts +132 -0
- package/core/sdk/CSSScope.d.ts +9 -0
- package/core/sdk/CSSStartingStyle.d.ts +9 -0
- package/core/sdk/CSSStyleDeclaration.d.ts +38 -0
- package/core/sdk/CSSStyleSheetHeader.d.ts +53 -0
- package/core/sdk/CSSSupports.d.ts +10 -0
- package/core/sdk/CategorizedBreakpoint.d.ts +42 -0
- package/core/sdk/ChildTargetManager.d.ts +40 -0
- package/core/sdk/CompilerSourceMappingContentProvider.d.ts +12 -0
- package/core/sdk/Connections.d.ts +36 -0
- package/core/sdk/ConsoleModel.d.ts +127 -0
- package/core/sdk/ConsoleModelTypes.d.ts +6 -0
- package/core/sdk/Cookie.d.ts +68 -0
- package/core/sdk/CookieModel.d.ts +31 -0
- package/core/sdk/CookieParser.d.ts +14 -0
- package/core/sdk/CrashReportContextModel.d.ts +8 -0
- package/core/sdk/DOMDebuggerModel.d.ts +127 -0
- package/core/sdk/DOMModel.d.ts +436 -0
- package/core/sdk/DOMStorageModel.d.ts +79 -0
- package/core/sdk/DebuggerModel.d.ts +272 -0
- package/core/sdk/EmulationModel.d.ts +95 -0
- package/core/sdk/EnhancedTracesParser.d.ts +105 -0
- package/core/sdk/EventBreakpointsModel.d.ts +66 -0
- package/core/sdk/FrameAssociated.d.ts +6 -0
- package/core/sdk/FrameManager.d.ts +68 -0
- package/core/sdk/HeapProfilerModel.d.ts +75 -0
- package/core/sdk/HttpReasonPhraseStrings.d.ts +5 -0
- package/core/sdk/IOModel.d.ts +10 -0
- package/core/sdk/IsolateManager.d.ts +53 -0
- package/core/sdk/IssuesModel.d.ts +28 -0
- package/core/sdk/LayerTreeBase.d.ts +70 -0
- package/core/sdk/LogModel.d.ts +20 -0
- package/core/sdk/NetworkManager.d.ts +418 -0
- package/core/sdk/NetworkRequest.d.ts +469 -0
- package/core/sdk/NetworkRequestAccess.d.ts +91 -0
- package/core/sdk/OverlayColorGenerator.d.ts +14 -0
- package/core/sdk/OverlayModel.d.ts +186 -0
- package/core/sdk/OverlayPersistentHighlighter.d.ts +116 -0
- package/core/sdk/PageFunctions.d.ts +22 -0
- package/core/sdk/PageLoad.d.ts +14 -0
- package/core/sdk/PageResourceLoader.d.ts +111 -0
- package/core/sdk/PaintProfiler.d.ts +43 -0
- package/core/sdk/PerformanceMetricsModel.d.ts +12 -0
- package/core/sdk/PreloadingModel.d.ts +146 -0
- package/core/sdk/RehydratingConnection.d.ts +73 -0
- package/core/sdk/RehydratingObject.d.ts +59 -0
- package/core/sdk/RemoteObject.d.ts +210 -0
- package/core/sdk/Resource.d.ts +36 -0
- package/core/sdk/ResourceTreeModel.d.ts +278 -0
- package/core/sdk/RuntimeModel.d.ts +163 -0
- package/core/sdk/SDKModel.d.ts +30 -0
- package/core/sdk/SDKSettings.d.ts +53 -0
- package/core/sdk/ScopeTreeCache.d.ts +21 -0
- package/core/sdk/ScreenCaptureModel.d.ts +69 -0
- package/core/sdk/Script.d.ts +134 -0
- package/core/sdk/SecurityOrigin.d.ts +108 -0
- package/core/sdk/SecurityOriginManager.d.ts +23 -0
- package/core/sdk/ServerSentEvents.d.ts +18 -0
- package/core/sdk/ServerSentEventsProtocol.d.ts +18 -0
- package/core/sdk/ServerTiming.d.ts +24 -0
- package/core/sdk/ServiceWorkerCacheModel.d.ts +71 -0
- package/core/sdk/ServiceWorkerManager.d.ts +125 -0
- package/core/sdk/SourceMap.d.ts +197 -0
- package/core/sdk/SourceMapCache.d.ts +12 -0
- package/core/sdk/SourceMapFunctionRanges.d.ts +26 -0
- package/core/sdk/SourceMapManager.d.ts +46 -0
- package/core/sdk/SourceMapRangeMappings.d.ts +15 -0
- package/core/sdk/SourceMapScopeChainEntry.d.ts +23 -0
- package/core/sdk/SourceMapScopesInfo.d.ts +109 -0
- package/core/sdk/StorageBucketsModel.d.ts +48 -0
- package/core/sdk/StorageKeyManager.d.ts +38 -0
- package/core/sdk/Target.d.ts +79 -0
- package/core/sdk/TargetManager.d.ts +92 -0
- package/core/sdk/TraceObject.d.ts +43 -0
- package/core/sdk/WebAuthnModel.d.ts +29 -0
- package/core/sdk/sdk.d.ts +97 -1
- package/core/text_utils/CodeMirrorUtils.d.ts +3 -0
- package/core/text_utils/ContentData.d.ts +94 -0
- package/core/text_utils/ContentProvider.d.ts +42 -0
- package/core/text_utils/StaticContentProvider.d.ts +13 -0
- package/core/text_utils/StreamingContentData.d.ts +49 -0
- package/core/text_utils/Text.d.ts +19 -0
- package/core/text_utils/TextCursor.d.ts +9 -0
- package/core/text_utils/TextRange.d.ts +81 -0
- package/core/text_utils/TextUtils.d.ts +97 -0
- package/core/text_utils/WasmDisassembly.d.ts +29 -0
- package/core/text_utils/text_utils.d.ts +11 -0
- package/entrypoints/formatter_actions/formatter_actions.d.ts +48 -0
- package/generated/InspectorBackendCommands.d.ts +14 -0
- package/generated/SupportedCSSProperties.d.ts +18 -0
- package/generated/protocol-mapping.d.ts +5930 -0
- package/generated/protocol-proxy-api.d.ts +5396 -0
- package/generated/protocol.d.ts +26 -72
- package/index.js +6 -0
- package/locales/af.json +171 -174
- package/locales/am.json +351 -354
- package/locales/ar.json +352 -355
- package/locales/as.json +350 -353
- package/locales/az.json +341 -344
- package/locales/be.json +351 -354
- package/locales/bg.json +351 -354
- package/locales/bn.json +351 -354
- package/locales/bs.json +253 -256
- package/locales/ca.json +283 -286
- package/locales/cs.json +336 -339
- package/locales/cy.json +144 -147
- package/locales/da.json +232 -235
- package/locales/de.json +251 -254
- package/locales/el.json +336 -339
- package/locales/en-GB.json +132 -135
- package/locales/es-419.json +282 -285
- package/locales/es.json +282 -285
- package/locales/et.json +236 -239
- package/locales/eu.json +131 -134
- package/locales/fa.json +351 -354
- package/locales/fi.json +283 -286
- package/locales/fil.json +128 -131
- package/locales/fr-CA.json +310 -313
- package/locales/fr.json +309 -312
- package/locales/gl.json +264 -267
- package/locales/gu.json +352 -355
- package/locales/he.json +352 -355
- package/locales/hi.json +336 -339
- package/locales/hr.json +257 -260
- package/locales/hu.json +342 -345
- package/locales/hy.json +351 -354
- package/locales/id.json +128 -131
- package/locales/is.json +304 -307
- package/locales/it.json +221 -224
- package/locales/ja.json +351 -354
- package/locales/ka.json +352 -355
- package/locales/kk.json +352 -355
- package/locales/km.json +351 -354
- package/locales/kn.json +352 -355
- package/locales/ko.json +351 -354
- package/locales/ky.json +350 -353
- package/locales/lo.json +352 -355
- package/locales/lt.json +323 -326
- package/locales/lv.json +317 -320
- package/locales/mk.json +352 -355
- package/locales/ml.json +351 -354
- package/locales/mn.json +351 -354
- package/locales/mr.json +351 -354
- package/locales/ms.json +128 -131
- package/locales/my.json +350 -353
- package/locales/ne.json +336 -339
- package/locales/nl.json +183 -186
- package/locales/no.json +238 -241
- package/locales/or.json +351 -354
- package/locales/pa.json +351 -354
- package/locales/pl.json +307 -310
- package/locales/pt-PT.json +273 -276
- package/locales/pt.json +270 -273
- package/locales/ro.json +309 -312
- package/locales/ru.json +351 -354
- package/locales/si.json +352 -355
- package/locales/sk.json +333 -336
- package/locales/sl.json +273 -276
- package/locales/sq.json +316 -319
- package/locales/sr-Latn.json +256 -259
- package/locales/sr.json +352 -355
- package/locales/sv.json +296 -299
- package/locales/sw.json +128 -131
- package/locales/ta.json +352 -355
- package/locales/te.json +350 -353
- package/locales/th.json +352 -355
- package/locales/tr.json +327 -330
- package/locales/uk.json +351 -354
- package/locales/ur.json +352 -355
- package/locales/uz.json +232 -235
- package/locales/vi.json +352 -355
- package/locales/zh-HK.json +352 -355
- package/locales/zh-TW.json +351 -354
- package/locales/zh.json +351 -354
- package/locales/zu.json +127 -130
- package/models/crux-manager/CrUXManager.d.ts +107 -0
- package/models/crux-manager/crux-manager.d.ts +1 -0
- package/models/emulation/DeviceModeModel.d.ts +156 -0
- package/models/emulation/EmulatedDevices.d.ts +148 -0
- package/models/emulation/emulation.d.ts +3 -0
- package/models/formatter/FormatterWorkerPool.d.ts +58 -0
- package/models/formatter/ScriptFormatter.d.ts +11 -0
- package/models/formatter/formatter.d.ts +3 -0
- package/models/trace/ModelImpl.d.ts +1 -1
- package/models/trace/extras/extras.d.ts +2 -7
- package/models/trace/handlers/ScriptsHandler.d.ts +2 -2
- package/models/trace/insights/CLSCulprits.d.ts +14 -14
- package/models/trace/insights/Cache.d.ts +8 -8
- package/models/trace/insights/CharacterSet.d.ts +10 -10
- package/models/trace/insights/Common.d.ts +4 -4
- package/models/trace/insights/DOMSize.d.ts +15 -15
- package/models/trace/insights/DocumentLatency.d.ts +13 -13
- package/models/trace/insights/DuplicatedJavaScript.d.ts +7 -7
- package/models/trace/insights/FontDisplay.d.ts +7 -7
- package/models/trace/insights/ForcedReflow.d.ts +9 -9
- package/models/trace/insights/INPBreakdown.d.ts +10 -10
- package/models/trace/insights/ImageDelivery.d.ts +12 -13
- package/models/trace/insights/LCPBreakdown.d.ts +13 -13
- package/models/trace/insights/LCPDiscovery.d.ts +12 -12
- package/models/trace/insights/LegacyJavaScript.d.ts +7 -7
- package/models/trace/insights/ModernHTTP.d.ts +7 -7
- package/models/trace/insights/NetworkDependencyTree.d.ts +21 -104
- package/models/trace/insights/RenderBlocking.d.ts +7 -7
- package/models/trace/insights/SlowCSSSelector.d.ts +12 -12
- package/models/trace/insights/ThirdParties.d.ts +8 -8
- package/models/trace/insights/Viewport.d.ts +5 -5
- package/models/trace/insights/types.d.ts +1 -1
- package/models/trace/lantern/core/NetworkAnalyzer.d.ts +0 -1
- package/models/trace/lantern/graph/BaseNode.d.ts +2 -2
- package/models/trace/lantern/graph/CPUNode.d.ts +2 -4
- package/models/trace/lantern/lantern.js +6 -8
- package/models/trace/lantern/simulation/TCPConnection.d.ts +4 -4
- package/models/trace/lantern/types/Lantern.d.ts +19 -27
- package/models/trace/trace.js +529 -18
- package/models/trace/types/Configuration.d.ts +1 -1
- package/models/trace/types/Extensions.d.ts +1 -1
- package/models/trace/types/File.d.ts +5 -5
- package/models/trace/types/Timing.js +6 -14
- package/models/trace/types/TraceEvents.d.ts +24 -24
- package/models/trace/types/TraceEvents.js +187 -984
- package/models/trace/types/types.js +6 -8
- package/package.json +30 -8
- package/third_party/codemirror.next/codemirror.next.d.ts +9196 -0
- package/third_party/i18n/i18n-impl.d.ts +25 -0
- package/third_party/i18n/i18n.d.ts +3 -0
- package/third_party/i18n/localized-string-set.d.ts +49 -0
- package/third_party/intl-messageformat/intl-messageformat.d.ts +1 -0
- package/third_party/source-map-scopes-codec/package/src/builder/builder.d.ts +67 -0
- package/third_party/source-map-scopes-codec/package/src/builder/safe_builder.d.ts +38 -0
- package/third_party/source-map-scopes-codec/package/src/codec.d.ts +48 -0
- package/third_party/source-map-scopes-codec/package/src/decode/decode.d.ts +31 -0
- package/third_party/source-map-scopes-codec/package/src/encode/encode.d.ts +8 -0
- package/third_party/source-map-scopes-codec/package/src/encode/encoder.d.ts +6 -0
- package/third_party/source-map-scopes-codec/package/src/mod.d.ts +5 -0
- package/third_party/source-map-scopes-codec/package/src/scopes.d.ts +168 -0
- package/third_party/source-map-scopes-codec/package/src/util.d.ts +5 -0
- package/third_party/source-map-scopes-codec/package/src/vlq.d.ts +14 -0
- package/third_party/source-map-scopes-codec/source-map-scopes-codec.d.ts +1 -0
- package/third_party/third-party-web/lib/nostats-subset.d.ts +2 -0
- package/third_party/third-party-web/package/lib/index.d.ts +34 -0
- package/third_party/third-party-web/package/lib/subsets/nostats.d.ts +1 -0
- package/third_party/third-party-web/third-party-web.d.ts +2 -1
- package/.tmp/tsbuildinfo/analyze-inspector-issues.d.mts +0 -13
- package/.tmp/tsbuildinfo/analyze-inspector-issues.d.mts.map +0 -1
- package/.tmp/tsbuildinfo/analyze-trace.d.mts +0 -17
- package/.tmp/tsbuildinfo/analyze-trace.d.mts.map +0 -1
- package/.tmp/tsbuildinfo/models/trace/extras/polyfills.d.ts +0 -4
- package/.tmp/tsbuildinfo/models/trace/extras/polyfills.d.ts.map +0 -1
- package/.tmp/tsbuildinfo/test/test-trace-engine.d.mts +0 -2
- package/.tmp/tsbuildinfo/test/test-trace-engine.d.mts.map +0 -1
- package/.tmp/tsbuildinfo/third_party/third-party-web/third-party-web.d.ts +0 -3
- package/.tmp/tsbuildinfo/third_party/third-party-web/third-party-web.d.ts.map +0 -1
- package/.tmp/tsbuildinfo/tsconfig.tsbuildinfo +0 -1
- package/analyze-inspector-issues.mjs +0 -60
- package/core/common/common.js +0 -1
- package/core/host/host.js +0 -1
- package/core/platform/ArrayUtilities.js +0 -224
- package/core/platform/ArrayUtilities.js.map +0 -1
- package/core/platform/Brand.js +0 -5
- package/core/platform/Brand.js.map +0 -1
- package/core/platform/Constructor.js +0 -5
- package/core/platform/Constructor.js.map +0 -1
- package/core/platform/DateUtilities.js +0 -14
- package/core/platform/DateUtilities.js.map +0 -1
- package/core/platform/DevToolsPath.js +0 -28
- package/core/platform/DevToolsPath.js.map +0 -1
- package/core/platform/HostRuntime.js +0 -31
- package/core/platform/HostRuntime.js.map +0 -1
- package/core/platform/KeyboardUtilities.js +0 -34
- package/core/platform/KeyboardUtilities.js.map +0 -1
- package/core/platform/MapUtilities.js +0 -80
- package/core/platform/MapUtilities.js.map +0 -1
- package/core/platform/MimeType.js +0 -157
- package/core/platform/MimeType.js.map +0 -1
- package/core/platform/NumberUtilities.js +0 -73
- package/core/platform/NumberUtilities.js.map +0 -1
- package/core/platform/Size.js +0 -36
- package/core/platform/Size.js.map +0 -1
- package/core/platform/StringUtilities.js +0 -731
- package/core/platform/StringUtilities.js.map +0 -1
- package/core/platform/Timing.js +0 -10
- package/core/platform/Timing.js.map +0 -1
- package/core/platform/TypedArrayUtilities.js +0 -158
- package/core/platform/TypedArrayUtilities.js.map +0 -1
- package/core/platform/TypescriptUtilities.js +0 -17
- package/core/platform/TypescriptUtilities.js.map +0 -1
- package/core/platform/UIString.js +0 -5
- package/core/platform/UIString.js.map +0 -1
- package/core/platform/UserVisibleError.js +0 -23
- package/core/platform/UserVisibleError.js.map +0 -1
- package/core/platform/api/HostRuntime.js +0 -5
- package/core/platform/api/HostRuntime.js.map +0 -1
- package/core/platform/api/api-tsconfig.json +0 -58
- package/core/platform/api/api-tsconfig.ref.json +0 -26
- package/core/platform/api/api.js +0 -6
- package/core/platform/api/api.js.map +0 -1
- package/core/platform/browser/HostRuntime.js +0 -165
- package/core/platform/browser/HostRuntime.js.map +0 -1
- package/core/platform/browser/browser-tsconfig.json +0 -59
- package/core/platform/browser/browser-tsconfig.ref.json +0 -27
- package/core/platform/browser/browser.js +0 -6
- package/core/platform/browser/browser.js.map +0 -1
- package/core/platform/browser/bundle-tsconfig.json +0 -59
- package/core/platform/browser/bundle-tsconfig.ref.json +0 -27
- package/core/platform/bundle-tsconfig.json +0 -59
- package/core/platform/bundle-tsconfig.ref.json +0 -27
- package/core/platform/foundation_unittests-tsconfig.json +0 -73
- package/core/platform/foundation_unittests-tsconfig.ref.json +0 -40
- package/core/platform/foundation_unittests_node_typecheck-tsconfig.json +0 -70
- package/core/platform/node/HostRuntime.js +0 -127
- package/core/platform/node/HostRuntime.js.map +0 -1
- package/core/platform/node/bundle-tsconfig.json +0 -59
- package/core/platform/node/bundle-tsconfig.ref.json +0 -27
- package/core/platform/node/node-tsconfig.json +0 -59
- package/core/platform/node/node-tsconfig.ref.json +0 -27
- package/core/platform/node/node.js +0 -6
- package/core/platform/node/node.js.map +0 -1
- package/core/platform/platform-tsconfig.json +0 -81
- package/core/platform/platform-tsconfig.ref.json +0 -49
- package/core/platform/platform.js +0 -28
- package/core/platform/platform.js.map +0 -1
- package/core/platform/platform_node_typecheck-tsconfig.json +0 -78
- package/core/platform/platform_node_typecheck.stamp +0 -0
- package/core/root/root.js +0 -1
- package/core/sdk/sdk.js +0 -1
- package/generated/protocol.js +0 -3304
- package/locales/en-US.json +0 -1058
- package/locales/en-XL.json +0 -1058
- package/models/cpu_profile/CPUProfileDataModel.js +0 -517
- package/models/cpu_profile/CPUProfileDataModel.js.map +0 -1
- package/models/cpu_profile/ProfileTreeModel.js +0 -90
- package/models/cpu_profile/ProfileTreeModel.js.map +0 -1
- package/models/cpu_profile/bundle-tsconfig.json +0 -59
- package/models/cpu_profile/bundle-tsconfig.ref.json +0 -27
- package/models/cpu_profile/cpu_profile-tsconfig.json +0 -63
- package/models/cpu_profile/cpu_profile-tsconfig.ref.json +0 -31
- package/models/cpu_profile/cpu_profile.js +0 -7
- package/models/cpu_profile/cpu_profile.js.map +0 -1
- package/models/cpu_profile/cpu_profile_node_typecheck-tsconfig.json +0 -60
- package/models/cpu_profile/cpu_profile_node_typecheck.stamp +0 -0
- package/models/cpu_profile/foundation_unittests-tsconfig.json +0 -63
- package/models/cpu_profile/foundation_unittests-tsconfig.ref.json +0 -30
- package/models/cpu_profile/foundation_unittests_node_typecheck-tsconfig.json +0 -60
- package/models/issues_manager/CheckFormsIssuesTrigger.d.ts +0 -1
- package/models/issues_manager/CheckFormsIssuesTrigger.js +0 -1
- package/models/issues_manager/ContrastCheckTrigger.d.ts +0 -1
- package/models/issues_manager/ContrastCheckTrigger.js +0 -1
- package/models/issues_manager/DeprecationIssue.d.ts +0 -1
- package/models/issues_manager/DeprecationIssue.js +0 -1
- package/models/issues_manager/IssueResolver.d.ts +0 -1
- package/models/issues_manager/IssueResolver.js +0 -1
- package/models/issues_manager/RelatedIssue.d.ts +0 -1
- package/models/issues_manager/RelatedIssue.js +0 -1
- package/models/issues_manager/SourceFrameIssuesManager.d.ts +0 -1
- package/models/issues_manager/SourceFrameIssuesManager.js +0 -1
- package/models/trace/EntityMapper.js +0 -133
- package/models/trace/EntityMapper.js.map +0 -1
- package/models/trace/EventsSerializer.js +0 -90
- package/models/trace/EventsSerializer.js.map +0 -1
- package/models/trace/LanternComputationData.js +0 -374
- package/models/trace/LanternComputationData.js.map +0 -1
- package/models/trace/LegacyTracingModel.d.ts +0 -1
- package/models/trace/LegacyTracingModel.js +0 -1
- package/models/trace/ModelImpl.js +0 -181
- package/models/trace/ModelImpl.js.map +0 -1
- package/models/trace/Name.js +0 -115
- package/models/trace/Name.js.map +0 -1
- package/models/trace/Processor.js +0 -618
- package/models/trace/Processor.js.map +0 -1
- package/models/trace/Styles.js +0 -836
- package/models/trace/Styles.js.map +0 -1
- package/models/trace/TracingManager.d.ts +0 -1
- package/models/trace/TracingManager.js +0 -1
- package/models/trace/bundle-tsconfig.json +0 -77
- package/models/trace/bundle-tsconfig.ref.json +0 -45
- package/models/trace/extras/FilmStrip.js +0 -45
- package/models/trace/extras/FilmStrip.js.map +0 -1
- package/models/trace/extras/Initiators.js +0 -47
- package/models/trace/extras/Initiators.js.map +0 -1
- package/models/trace/extras/MainThreadActivity.js +0 -77
- package/models/trace/extras/MainThreadActivity.js.map +0 -1
- package/models/trace/extras/ScriptDuplication.js +0 -163
- package/models/trace/extras/ScriptDuplication.js.map +0 -1
- package/models/trace/extras/StackTraceForEvent.js +0 -192
- package/models/trace/extras/StackTraceForEvent.js.map +0 -1
- package/models/trace/extras/ThirdParties.js +0 -119
- package/models/trace/extras/ThirdParties.js.map +0 -1
- package/models/trace/extras/TraceFilter.js +0 -51
- package/models/trace/extras/TraceFilter.js.map +0 -1
- package/models/trace/extras/TraceTree.js +0 -621
- package/models/trace/extras/TraceTree.js.map +0 -1
- package/models/trace/extras/bundle-tsconfig.json +0 -59
- package/models/trace/extras/bundle-tsconfig.ref.json +0 -27
- package/models/trace/extras/extras-tsconfig.json +0 -81
- package/models/trace/extras/extras-tsconfig.ref.json +0 -49
- package/models/trace/extras/extras.js +0 -13
- package/models/trace/extras/extras.js.map +0 -1
- package/models/trace/extras/extras_node_typecheck-tsconfig.json +0 -78
- package/models/trace/extras/extras_node_typecheck.stamp +0 -0
- package/models/trace/extras/foundation_unittests-tsconfig.json +0 -91
- package/models/trace/extras/foundation_unittests-tsconfig.ref.json +0 -58
- package/models/trace/extras/foundation_unittests_node_typecheck-tsconfig.json +0 -88
- package/models/trace/foundation_unittests-tsconfig.json +0 -70
- package/models/trace/foundation_unittests-tsconfig.ref.json +0 -37
- package/models/trace/foundation_unittests_node_typecheck-tsconfig.json +0 -67
- package/models/trace/handlers/AnimationFramesHandler.js +0 -110
- package/models/trace/handlers/AnimationFramesHandler.js.map +0 -1
- package/models/trace/handlers/AnimationHandler.js +0 -27
- package/models/trace/handlers/AnimationHandler.js.map +0 -1
- package/models/trace/handlers/AsyncJSCallsHandler.js +0 -188
- package/models/trace/handlers/AsyncJSCallsHandler.js.map +0 -1
- package/models/trace/handlers/DOMStatsHandler.js +0 -22
- package/models/trace/handlers/DOMStatsHandler.js.map +0 -1
- package/models/trace/handlers/ExtensionTraceDataHandler.js +0 -264
- package/models/trace/handlers/ExtensionTraceDataHandler.js.map +0 -1
- package/models/trace/handlers/FlowsHandler.js +0 -149
- package/models/trace/handlers/FlowsHandler.js.map +0 -1
- package/models/trace/handlers/FramesHandler.js +0 -491
- package/models/trace/handlers/FramesHandler.js.map +0 -1
- package/models/trace/handlers/GPUHandler.js +0 -36
- package/models/trace/handlers/GPUHandler.js.map +0 -1
- package/models/trace/handlers/ImagePaintingHandler.js +0 -148
- package/models/trace/handlers/ImagePaintingHandler.js.map +0 -1
- package/models/trace/handlers/InitiatorsHandler.js +0 -181
- package/models/trace/handlers/InitiatorsHandler.js.map +0 -1
- package/models/trace/handlers/InvalidationsHandler.js +0 -127
- package/models/trace/handlers/InvalidationsHandler.js.map +0 -1
- package/models/trace/handlers/LargestImagePaintHandler.js +0 -86
- package/models/trace/handlers/LargestImagePaintHandler.js.map +0 -1
- package/models/trace/handlers/LargestTextPaintHandler.js +0 -28
- package/models/trace/handlers/LargestTextPaintHandler.js.map +0 -1
- package/models/trace/handlers/LayerTreeHandler.js +0 -104
- package/models/trace/handlers/LayerTreeHandler.js.map +0 -1
- package/models/trace/handlers/LayoutShiftsHandler.js +0 -457
- package/models/trace/handlers/LayoutShiftsHandler.js.map +0 -1
- package/models/trace/handlers/MemoryHandler.js +0 -22
- package/models/trace/handlers/MemoryHandler.js.map +0 -1
- package/models/trace/handlers/MetaHandler.js +0 -442
- package/models/trace/handlers/MetaHandler.js.map +0 -1
- package/models/trace/handlers/ModelHandlers.js +0 -33
- package/models/trace/handlers/ModelHandlers.js.map +0 -1
- package/models/trace/handlers/NetworkRequestsHandler.js +0 -578
- package/models/trace/handlers/NetworkRequestsHandler.js.map +0 -1
- package/models/trace/handlers/PageFramesHandler.js +0 -43
- package/models/trace/handlers/PageFramesHandler.js.map +0 -1
- package/models/trace/handlers/PageLoadMetricsHandler.js +0 -462
- package/models/trace/handlers/PageLoadMetricsHandler.js.map +0 -1
- package/models/trace/handlers/RendererHandler.js +0 -346
- package/models/trace/handlers/RendererHandler.js.map +0 -1
- package/models/trace/handlers/SamplesHandler.js +0 -261
- package/models/trace/handlers/SamplesHandler.js.map +0 -1
- package/models/trace/handlers/ScreenshotsHandler.js +0 -56
- package/models/trace/handlers/ScreenshotsHandler.js.map +0 -1
- package/models/trace/handlers/ScriptsHandler.js +0 -286
- package/models/trace/handlers/ScriptsHandler.js.map +0 -1
- package/models/trace/handlers/SelectorStatsHandler.js +0 -72
- package/models/trace/handlers/SelectorStatsHandler.js.map +0 -1
- package/models/trace/handlers/Threads.js +0 -108
- package/models/trace/handlers/Threads.js.map +0 -1
- package/models/trace/handlers/UserInteractionsHandler.js +0 -319
- package/models/trace/handlers/UserInteractionsHandler.js.map +0 -1
- package/models/trace/handlers/UserTimingsHandler.js +0 -194
- package/models/trace/handlers/UserTimingsHandler.js.map +0 -1
- package/models/trace/handlers/WarningsHandler.js +0 -135
- package/models/trace/handlers/WarningsHandler.js.map +0 -1
- package/models/trace/handlers/WorkersHandler.js +0 -34
- package/models/trace/handlers/WorkersHandler.js.map +0 -1
- package/models/trace/handlers/bundle-tsconfig.json +0 -59
- package/models/trace/handlers/bundle-tsconfig.ref.json +0 -27
- package/models/trace/handlers/foundation_unittests-tsconfig.json +0 -102
- package/models/trace/handlers/foundation_unittests-tsconfig.ref.json +0 -69
- package/models/trace/handlers/foundation_unittests_node_typecheck-tsconfig.json +0 -99
- package/models/trace/handlers/handlers-tsconfig.json +0 -112
- package/models/trace/handlers/handlers-tsconfig.ref.json +0 -80
- package/models/trace/handlers/handlers.js +0 -8
- package/models/trace/handlers/handlers.js.map +0 -1
- package/models/trace/handlers/handlers_node_typecheck-tsconfig.json +0 -109
- package/models/trace/handlers/handlers_node_typecheck.stamp +0 -0
- package/models/trace/handlers/helpers.js +0 -164
- package/models/trace/handlers/helpers.js.map +0 -1
- package/models/trace/handlers/types.js +0 -2
- package/models/trace/handlers/types.js.map +0 -1
- package/models/trace/helpers/Extensions.js +0 -42
- package/models/trace/helpers/Extensions.js.map +0 -1
- package/models/trace/helpers/Network.js +0 -103
- package/models/trace/helpers/Network.js.map +0 -1
- package/models/trace/helpers/SamplesIntegrator.js +0 -512
- package/models/trace/helpers/SamplesIntegrator.js.map +0 -1
- package/models/trace/helpers/SyntheticEvents.js +0 -94
- package/models/trace/helpers/SyntheticEvents.js.map +0 -1
- package/models/trace/helpers/Timing.js +0 -207
- package/models/trace/helpers/Timing.js.map +0 -1
- package/models/trace/helpers/Trace.js +0 -817
- package/models/trace/helpers/Trace.js.map +0 -1
- package/models/trace/helpers/TreeHelpers.js +0 -255
- package/models/trace/helpers/TreeHelpers.js.map +0 -1
- package/models/trace/helpers/bundle-tsconfig.json +0 -59
- package/models/trace/helpers/bundle-tsconfig.ref.json +0 -27
- package/models/trace/helpers/foundation_unittests-tsconfig.json +0 -73
- package/models/trace/helpers/foundation_unittests-tsconfig.ref.json +0 -40
- package/models/trace/helpers/foundation_unittests_node_typecheck-tsconfig.json +0 -70
- package/models/trace/helpers/helpers-tsconfig.json +0 -77
- package/models/trace/helpers/helpers-tsconfig.ref.json +0 -45
- package/models/trace/helpers/helpers.js +0 -11
- package/models/trace/helpers/helpers.js.map +0 -1
- package/models/trace/helpers/helpers_node_typecheck-tsconfig.json +0 -74
- package/models/trace/helpers/helpers_node_typecheck.stamp +0 -0
- package/models/trace/insights/CLSCulprits.js +0 -519
- package/models/trace/insights/CLSCulprits.js.map +0 -1
- package/models/trace/insights/Cache.js +0 -210
- package/models/trace/insights/Cache.js.map +0 -1
- package/models/trace/insights/CharacterSet.js +0 -132
- package/models/trace/insights/CharacterSet.js.map +0 -1
- package/models/trace/insights/Common.js +0 -366
- package/models/trace/insights/Common.js.map +0 -1
- package/models/trace/insights/DOMSize.js +0 -182
- package/models/trace/insights/DOMSize.js.map +0 -1
- package/models/trace/insights/DocumentLatency.js +0 -259
- package/models/trace/insights/DocumentLatency.js.map +0 -1
- package/models/trace/insights/DuplicatedJavaScript.js +0 -99
- package/models/trace/insights/DuplicatedJavaScript.js.map +0 -1
- package/models/trace/insights/FontDisplay.js +0 -93
- package/models/trace/insights/FontDisplay.js.map +0 -1
- package/models/trace/insights/ForcedReflow.js +0 -162
- package/models/trace/insights/ForcedReflow.js.map +0 -1
- package/models/trace/insights/INPBreakdown.js +0 -130
- package/models/trace/insights/INPBreakdown.js.map +0 -1
- package/models/trace/insights/ImageDelivery.js +0 -264
- package/models/trace/insights/ImageDelivery.js.map +0 -1
- package/models/trace/insights/LCPBreakdown.js +0 -200
- package/models/trace/insights/LCPBreakdown.js.map +0 -1
- package/models/trace/insights/LCPDiscovery.js +0 -190
- package/models/trace/insights/LCPDiscovery.js.map +0 -1
- package/models/trace/insights/LegacyJavaScript.js +0 -99
- package/models/trace/insights/LegacyJavaScript.js.map +0 -1
- package/models/trace/insights/Models.js +0 -23
- package/models/trace/insights/Models.js.map +0 -1
- package/models/trace/insights/ModernHTTP.js +0 -205
- package/models/trace/insights/ModernHTTP.js.map +0 -1
- package/models/trace/insights/NetworkDependencyTree.js +0 -972
- package/models/trace/insights/NetworkDependencyTree.js.map +0 -1
- package/models/trace/insights/RenderBlocking.js +0 -191
- package/models/trace/insights/RenderBlocking.js.map +0 -1
- package/models/trace/insights/SlowCSSSelector.js +0 -140
- package/models/trace/insights/SlowCSSSelector.js.map +0 -1
- package/models/trace/insights/Statistics.js +0 -93
- package/models/trace/insights/Statistics.js.map +0 -1
- package/models/trace/insights/ThirdParties.js +0 -110
- package/models/trace/insights/ThirdParties.js.map +0 -1
- package/models/trace/insights/Viewport.js +0 -105
- package/models/trace/insights/Viewport.js.map +0 -1
- package/models/trace/insights/bundle-tsconfig.json +0 -59
- package/models/trace/insights/bundle-tsconfig.ref.json +0 -27
- package/models/trace/insights/foundation_unittests-tsconfig.json +0 -98
- package/models/trace/insights/foundation_unittests-tsconfig.ref.json +0 -65
- package/models/trace/insights/foundation_unittests_node_typecheck-tsconfig.json +0 -95
- package/models/trace/insights/insights-tsconfig.json +0 -114
- package/models/trace/insights/insights-tsconfig.ref.json +0 -82
- package/models/trace/insights/insights.js +0 -10
- package/models/trace/insights/insights.js.map +0 -1
- package/models/trace/insights/insights_node_typecheck-tsconfig.json +0 -111
- package/models/trace/insights/insights_node_typecheck.stamp +0 -0
- package/models/trace/insights/types.js +0 -41
- package/models/trace/insights/types.js.map +0 -1
- package/models/trace/lantern/bundle-tsconfig.json +0 -71
- package/models/trace/lantern/bundle-tsconfig.ref.json +0 -39
- package/models/trace/lantern/core/LanternError.js +0 -7
- package/models/trace/lantern/core/LanternError.js.map +0 -1
- package/models/trace/lantern/core/NetworkAnalyzer.js +0 -488
- package/models/trace/lantern/core/NetworkAnalyzer.js.map +0 -1
- package/models/trace/lantern/core/bundle-tsconfig.json +0 -59
- package/models/trace/lantern/core/bundle-tsconfig.ref.json +0 -27
- package/models/trace/lantern/core/core-tsconfig.json +0 -60
- package/models/trace/lantern/core/core-tsconfig.ref.json +0 -28
- package/models/trace/lantern/core/core.js +0 -6
- package/models/trace/lantern/core/core.js.map +0 -1
- package/models/trace/lantern/core/core_node_typecheck-tsconfig.json +0 -57
- package/models/trace/lantern/core/core_node_typecheck.stamp +0 -0
- package/models/trace/lantern/core/foundation_unittests-tsconfig.json +0 -69
- package/models/trace/lantern/core/foundation_unittests-tsconfig.ref.json +0 -36
- package/models/trace/lantern/core/foundation_unittests_node_typecheck-tsconfig.json +0 -66
- package/models/trace/lantern/graph/BaseNode.js +0 -277
- package/models/trace/lantern/graph/BaseNode.js.map +0 -1
- package/models/trace/lantern/graph/CPUNode.js +0 -80
- package/models/trace/lantern/graph/CPUNode.js.map +0 -1
- package/models/trace/lantern/graph/NetworkNode.js +0 -95
- package/models/trace/lantern/graph/NetworkNode.js.map +0 -1
- package/models/trace/lantern/graph/PageDependencyGraph.js +0 -574
- package/models/trace/lantern/graph/PageDependencyGraph.js.map +0 -1
- package/models/trace/lantern/graph/bundle-tsconfig.json +0 -59
- package/models/trace/lantern/graph/bundle-tsconfig.ref.json +0 -27
- package/models/trace/lantern/graph/foundation_unittests-tsconfig.json +0 -61
- package/models/trace/lantern/graph/foundation_unittests-tsconfig.ref.json +0 -28
- package/models/trace/lantern/graph/foundation_unittests_node_typecheck-tsconfig.json +0 -58
- package/models/trace/lantern/graph/graph-tsconfig.json +0 -65
- package/models/trace/lantern/graph/graph-tsconfig.ref.json +0 -33
- package/models/trace/lantern/graph/graph.js +0 -8
- package/models/trace/lantern/graph/graph.js.map +0 -1
- package/models/trace/lantern/graph/graph_node_typecheck-tsconfig.json +0 -62
- package/models/trace/lantern/graph/graph_node_typecheck.stamp +0 -0
- package/models/trace/lantern/lantern.js.map +0 -1
- package/models/trace/lantern/metrics/FirstContentfulPaint.js +0 -137
- package/models/trace/lantern/metrics/FirstContentfulPaint.js.map +0 -1
- package/models/trace/lantern/metrics/Interactive.js +0 -68
- package/models/trace/lantern/metrics/Interactive.js.map +0 -1
- package/models/trace/lantern/metrics/LargestContentfulPaint.js +0 -69
- package/models/trace/lantern/metrics/LargestContentfulPaint.js.map +0 -1
- package/models/trace/lantern/metrics/MaxPotentialFID.js +0 -49
- package/models/trace/lantern/metrics/MaxPotentialFID.js.map +0 -1
- package/models/trace/lantern/metrics/Metric.js +0 -69
- package/models/trace/lantern/metrics/Metric.js.map +0 -1
- package/models/trace/lantern/metrics/SpeedIndex.js +0 -102
- package/models/trace/lantern/metrics/SpeedIndex.js.map +0 -1
- package/models/trace/lantern/metrics/TBTUtils.js +0 -65
- package/models/trace/lantern/metrics/TBTUtils.js.map +0 -1
- package/models/trace/lantern/metrics/TotalBlockingTime.js +0 -79
- package/models/trace/lantern/metrics/TotalBlockingTime.js.map +0 -1
- package/models/trace/lantern/metrics/bundle-tsconfig.json +0 -59
- package/models/trace/lantern/metrics/bundle-tsconfig.ref.json +0 -27
- package/models/trace/lantern/metrics/foundation_unittests-tsconfig.json +0 -76
- package/models/trace/lantern/metrics/foundation_unittests-tsconfig.ref.json +0 -43
- package/models/trace/lantern/metrics/foundation_unittests_node_typecheck-tsconfig.json +0 -73
- package/models/trace/lantern/metrics/metrics-tsconfig.json +0 -75
- package/models/trace/lantern/metrics/metrics-tsconfig.ref.json +0 -43
- package/models/trace/lantern/metrics/metrics.js +0 -12
- package/models/trace/lantern/metrics/metrics.js.map +0 -1
- package/models/trace/lantern/metrics/metrics_node_typecheck-tsconfig.json +0 -72
- package/models/trace/lantern/metrics/metrics_node_typecheck.stamp +0 -0
- package/models/trace/lantern/simulation/ConnectionPool.js +0 -116
- package/models/trace/lantern/simulation/ConnectionPool.js.map +0 -1
- package/models/trace/lantern/simulation/Constants.js +0 -45
- package/models/trace/lantern/simulation/Constants.js.map +0 -1
- package/models/trace/lantern/simulation/DNSCache.js +0 -48
- package/models/trace/lantern/simulation/DNSCache.js.map +0 -1
- package/models/trace/lantern/simulation/SimulationTimingMap.js +0 -135
- package/models/trace/lantern/simulation/SimulationTimingMap.js.map +0 -1
- package/models/trace/lantern/simulation/Simulator.js +0 -455
- package/models/trace/lantern/simulation/Simulator.js.map +0 -1
- package/models/trace/lantern/simulation/TCPConnection.js +0 -155
- package/models/trace/lantern/simulation/TCPConnection.js.map +0 -1
- package/models/trace/lantern/simulation/bundle-tsconfig.json +0 -59
- package/models/trace/lantern/simulation/bundle-tsconfig.ref.json +0 -27
- package/models/trace/lantern/simulation/foundation_unittests-tsconfig.json +0 -75
- package/models/trace/lantern/simulation/foundation_unittests-tsconfig.ref.json +0 -42
- package/models/trace/lantern/simulation/foundation_unittests_node_typecheck-tsconfig.json +0 -72
- package/models/trace/lantern/simulation/simulation-tsconfig.json +0 -70
- package/models/trace/lantern/simulation/simulation-tsconfig.ref.json +0 -38
- package/models/trace/lantern/simulation/simulation.js +0 -10
- package/models/trace/lantern/simulation/simulation.js.map +0 -1
- package/models/trace/lantern/simulation/simulation_node_typecheck-tsconfig.json +0 -67
- package/models/trace/lantern/simulation/simulation_node_typecheck.stamp +0 -0
- package/models/trace/lantern/testing/bundle-tsconfig.json +0 -60
- package/models/trace/lantern/testing/bundle-tsconfig.ref.json +0 -27
- package/models/trace/lantern/testing/testing-tsconfig.json +0 -63
- package/models/trace/lantern/testing/testing-tsconfig.ref.json +0 -30
- package/models/trace/lantern/types/Lantern.js +0 -25
- package/models/trace/lantern/types/Lantern.js.map +0 -1
- package/models/trace/lantern/types/bundle-tsconfig.json +0 -59
- package/models/trace/lantern/types/bundle-tsconfig.ref.json +0 -27
- package/models/trace/lantern/types/types-tsconfig.json +0 -59
- package/models/trace/lantern/types/types-tsconfig.ref.json +0 -27
- package/models/trace/lantern/types/types.js +0 -5
- package/models/trace/lantern/types/types.js.map +0 -1
- package/models/trace/lantern/types/types_node_typecheck-tsconfig.json +0 -56
- package/models/trace/lantern/types/types_node_typecheck.stamp +0 -0
- package/models/trace/trace-tsconfig.json +0 -89
- package/models/trace/trace-tsconfig.ref.json +0 -57
- package/models/trace/trace.js.map +0 -1
- package/models/trace/trace_node_typecheck-tsconfig.json +0 -86
- package/models/trace/trace_node_typecheck.stamp +0 -0
- package/models/trace/types/Configuration.js +0 -19
- package/models/trace/types/Configuration.js.map +0 -1
- package/models/trace/types/Extensions.js +0 -38
- package/models/trace/types/Extensions.js.map +0 -1
- package/models/trace/types/File.js +0 -82
- package/models/trace/types/File.js.map +0 -1
- package/models/trace/types/Overlays.js +0 -5
- package/models/trace/types/Overlays.js.map +0 -1
- package/models/trace/types/Timing.js.map +0 -1
- package/models/trace/types/TraceEvents.js.map +0 -1
- package/models/trace/types/bundle-tsconfig.json +0 -59
- package/models/trace/types/bundle-tsconfig.ref.json +0 -27
- package/models/trace/types/foundation_unittests-tsconfig.json +0 -67
- package/models/trace/types/foundation_unittests-tsconfig.ref.json +0 -34
- package/models/trace/types/foundation_unittests_node_typecheck-tsconfig.json +0 -64
- package/models/trace/types/types-tsconfig.json +0 -76
- package/models/trace/types/types-tsconfig.ref.json +0 -44
- package/models/trace/types/types.js.map +0 -1
- package/models/trace/types/types_node_typecheck-tsconfig.json +0 -73
- package/models/trace/types/types_node_typecheck.stamp +0 -0
- package/test/invalid-animation-events.json.gz +0 -0
- package/test/test-trace-engine.mjs +0 -191
- package/third_party/legacy-javascript/bundle-tsconfig.json +0 -59
- package/third_party/legacy-javascript/bundle-tsconfig.ref.json +0 -27
- package/third_party/legacy-javascript/legacy-javascript-tsconfig.ref.json +0 -15
- package/third_party/legacy-javascript/legacy-javascript.js +0 -3
- package/third_party/legacy-javascript/legacy-javascript.js.map +0 -1
- package/third_party/legacy-javascript/lib/legacy-javascript.js +0 -1119
- package/third_party/marked/marked.d.ts +0 -1
- package/third_party/marked/marked.js +0 -1
- package/third_party/third-party-web/third-party-web.js +0 -1
- package/tsconfig.json +0 -29
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
// Copyright 2020 The Chromium Authors
|
|
2
|
-
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
-
// found in the LICENSE file.
|
|
4
|
-
export var ArrowKey;
|
|
5
|
-
(function (ArrowKey) {
|
|
6
|
-
ArrowKey["UP"] = "ArrowUp";
|
|
7
|
-
ArrowKey["DOWN"] = "ArrowDown";
|
|
8
|
-
ArrowKey["LEFT"] = "ArrowLeft";
|
|
9
|
-
ArrowKey["RIGHT"] = "ArrowRight";
|
|
10
|
-
})(ArrowKey || (ArrowKey = {}));
|
|
11
|
-
export var PageKey;
|
|
12
|
-
(function (PageKey) {
|
|
13
|
-
PageKey["UP"] = "PageUp";
|
|
14
|
-
PageKey["DOWN"] = "PageDown";
|
|
15
|
-
})(PageKey || (PageKey = {}));
|
|
16
|
-
export const ENTER_KEY = 'Enter';
|
|
17
|
-
export const ESCAPE_KEY = 'Escape';
|
|
18
|
-
export const TAB_KEY = 'Tab';
|
|
19
|
-
export const ARROW_KEYS = new Set([
|
|
20
|
-
"ArrowUp" /* ArrowKey.UP */,
|
|
21
|
-
"ArrowDown" /* ArrowKey.DOWN */,
|
|
22
|
-
"ArrowLeft" /* ArrowKey.LEFT */,
|
|
23
|
-
"ArrowRight" /* ArrowKey.RIGHT */,
|
|
24
|
-
]);
|
|
25
|
-
export function keyIsArrowKey(key) {
|
|
26
|
-
return ARROW_KEYS.has(key);
|
|
27
|
-
}
|
|
28
|
-
export function isEscKey(event) {
|
|
29
|
-
return event.key === 'Escape';
|
|
30
|
-
}
|
|
31
|
-
export function isEnterOrSpaceKey(event) {
|
|
32
|
-
return event.key === 'Enter' || event.key === ' ';
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=KeyboardUtilities.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"KeyboardUtilities.js","sourceRoot":"","sources":["../../../../../../front_end/core/platform/KeyboardUtilities.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,yEAAyE;AACzE,6BAA6B;AAE7B,MAAM,CAAN,IAAkB,QAKjB;AALD,WAAkB,QAAQ;IACxB,0BAAc,CAAA;IACd,8BAAkB,CAAA;IAClB,8BAAkB,CAAA;IAClB,gCAAoB,CAAA;AACtB,CAAC,EALiB,QAAQ,KAAR,QAAQ,QAKzB;AAED,MAAM,CAAN,IAAkB,OAGjB;AAHD,WAAkB,OAAO;IACvB,wBAAa,CAAA;IACb,4BAAiB,CAAA;AACnB,CAAC,EAHiB,OAAO,KAAP,OAAO,QAGxB;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,OAAO,CAAC;AACjC,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC;AACnC,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,CAAC;AAE7B,MAAM,CAAC,MAAM,UAAU,GAAkB,IAAI,GAAG,CAAW;;;;;CAK1D,CAAC,CAAC;AAEH,MAAM,UAAU,aAAa,CAAC,GAAW;IACvC,OAAO,UAAU,CAAC,GAAG,CAAC,GAAe,CAAC,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,KAA6B;IACpD,OAAO,KAAK,CAAC,GAAG,KAAK,QAAQ,CAAC;AAChC,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,KAA6B;IAC7D,OAAO,KAAK,CAAC,GAAG,KAAK,OAAO,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG,CAAC;AACpD,CAAC","sourcesContent":["// Copyright 2020 The Chromium Authors\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nexport const enum ArrowKey {\n UP = 'ArrowUp',\n DOWN = 'ArrowDown',\n LEFT = 'ArrowLeft',\n RIGHT = 'ArrowRight',\n}\n\nexport const enum PageKey {\n UP = 'PageUp',\n DOWN = 'PageDown',\n}\n\nexport const ENTER_KEY = 'Enter';\nexport const ESCAPE_KEY = 'Escape';\nexport const TAB_KEY = 'Tab';\n\nexport const ARROW_KEYS: Set<ArrowKey> = new Set<ArrowKey>([\n ArrowKey.UP,\n ArrowKey.DOWN,\n ArrowKey.LEFT,\n ArrowKey.RIGHT,\n]);\n\nexport function keyIsArrowKey(key: string): key is ArrowKey {\n return ARROW_KEYS.has(key as ArrowKey);\n}\n\nexport function isEscKey(event: {readonly key: string}): boolean {\n return event.key === 'Escape';\n}\n\nexport function isEnterOrSpaceKey(event: {readonly key: string}): boolean {\n return event.key === 'Enter' || event.key === ' ';\n}\n"]}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
// Copyright 2020 The Chromium Authors
|
|
2
|
-
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
-
// found in the LICENSE file.
|
|
4
|
-
export const inverse = function (map) {
|
|
5
|
-
const result = new Multimap();
|
|
6
|
-
for (const [key, value] of map.entries()) {
|
|
7
|
-
result.set(value, key);
|
|
8
|
-
}
|
|
9
|
-
return result;
|
|
10
|
-
};
|
|
11
|
-
export class Multimap {
|
|
12
|
-
map = new Map();
|
|
13
|
-
set(key, value) {
|
|
14
|
-
let set = this.map.get(key);
|
|
15
|
-
if (!set) {
|
|
16
|
-
set = new Set();
|
|
17
|
-
this.map.set(key, set);
|
|
18
|
-
}
|
|
19
|
-
set.add(value);
|
|
20
|
-
}
|
|
21
|
-
get(key) {
|
|
22
|
-
return this.map.get(key) || new Set();
|
|
23
|
-
}
|
|
24
|
-
has(key) {
|
|
25
|
-
return this.map.has(key);
|
|
26
|
-
}
|
|
27
|
-
hasValue(key, value) {
|
|
28
|
-
const set = this.map.get(key);
|
|
29
|
-
if (!set) {
|
|
30
|
-
return false;
|
|
31
|
-
}
|
|
32
|
-
return set.has(value);
|
|
33
|
-
}
|
|
34
|
-
get size() {
|
|
35
|
-
return this.map.size;
|
|
36
|
-
}
|
|
37
|
-
delete(key, value) {
|
|
38
|
-
const values = this.get(key);
|
|
39
|
-
if (!values) {
|
|
40
|
-
return false;
|
|
41
|
-
}
|
|
42
|
-
const result = values.delete(value);
|
|
43
|
-
if (!values.size) {
|
|
44
|
-
this.map.delete(key);
|
|
45
|
-
}
|
|
46
|
-
return result;
|
|
47
|
-
}
|
|
48
|
-
deleteAll(key) {
|
|
49
|
-
this.map.delete(key);
|
|
50
|
-
}
|
|
51
|
-
keysArray() {
|
|
52
|
-
return [...this.map.keys()];
|
|
53
|
-
}
|
|
54
|
-
keys() {
|
|
55
|
-
return this.map.keys();
|
|
56
|
-
}
|
|
57
|
-
valuesArray() {
|
|
58
|
-
const result = [];
|
|
59
|
-
for (const set of this.map.values()) {
|
|
60
|
-
result.push(...set.values());
|
|
61
|
-
}
|
|
62
|
-
return result;
|
|
63
|
-
}
|
|
64
|
-
clear() {
|
|
65
|
-
this.map.clear();
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Gets value for key, assigning a default if value is falsy.
|
|
70
|
-
*/
|
|
71
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
72
|
-
export function getWithDefault(map, key, defaultValueFactory) {
|
|
73
|
-
let value = map.get(key);
|
|
74
|
-
if (value === undefined || value === null) {
|
|
75
|
-
value = defaultValueFactory(key);
|
|
76
|
-
map.set(key, value);
|
|
77
|
-
}
|
|
78
|
-
return value;
|
|
79
|
-
}
|
|
80
|
-
//# sourceMappingURL=MapUtilities.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MapUtilities.js","sourceRoot":"","sources":["../../../../../../front_end/core/platform/MapUtilities.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,yEAAyE;AACzE,6BAA6B;AAE7B,MAAM,CAAC,MAAM,OAAO,GAAG,UAAe,GAAc;IAClD,MAAM,MAAM,GAAG,IAAI,QAAQ,EAAQ,CAAC;IACpC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,GAAG,CAAC,OAAO,EAAE,EAAE,CAAC;QACzC,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACzB,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF,MAAM,OAAO,QAAQ;IACX,GAAG,GAAG,IAAI,GAAG,EAAa,CAAC;IAEnC,GAAG,CAAC,GAAM,EAAE,KAAQ;QAClB,IAAI,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAC5B,IAAI,CAAC,GAAG,EAAE,CAAC;YACT,GAAG,GAAG,IAAI,GAAG,EAAE,CAAC;YAChB,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QACzB,CAAC;QACD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AAC,IAAI,EAAE,CAAC;IACzB,CAAC;IAED,WAAW;QACT,MAAM,MAAM,GAAG,EAAE,CAAC;QAClB,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC;YACpC,MAAM,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;QAC/B,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,KAAK;QACH,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC;IACnB,CAAC;CACF;AAED;;GAEG;AACH,mEAAmE;AACnE,MAAM,UAAU,cAAc,CAC1B,GAA4B,EAAE,GAAM,EAAE,mBAAmC;IAC3E,IAAI,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACzB,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QAC1C,KAAK,GAAG,mBAAmB,CAAC,GAAG,CAAC,CAAC;QACjC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACtB,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["// Copyright 2020 The Chromium Authors\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nexport const inverse = function<K, V>(map: Map<K, V>): Multimap<V, K> {\n const result = new Multimap<V, K>();\n for (const [key, value] of map.entries()) {\n result.set(value, key);\n }\n return result;\n};\n\nexport class Multimap<K, V> {\n private map = new Map<K, Set<V>>();\n\n set(key: K, value: V): void {\n let set = this.map.get(key);\n if (!set) {\n set = new Set();\n this.map.set(key, set);\n }\n set.add(value);\n }\n\n get(key: K): Set<V> {\n return this.map.get(key) || new Set();\n }\n\n has(key: K): boolean {\n return this.map.has(key);\n }\n\n hasValue(key: K, value: V): boolean {\n const set = this.map.get(key);\n if (!set) {\n return false;\n }\n return set.has(value);\n }\n\n get size(): number {\n return this.map.size;\n }\n\n delete(key: K, value: V): boolean {\n const values = this.get(key);\n if (!values) {\n return false;\n }\n const result = values.delete(value);\n if (!values.size) {\n this.map.delete(key);\n }\n return result;\n }\n\n deleteAll(key: K): void {\n this.map.delete(key);\n }\n\n keysArray(): K[] {\n return [...this.map.keys()];\n }\n\n keys(): IterableIterator<K> {\n return this.map.keys();\n }\n\n valuesArray(): V[] {\n const result = [];\n for (const set of this.map.values()) {\n result.push(...set.values());\n }\n return result;\n }\n\n clear(): void {\n this.map.clear();\n }\n}\n\n/**\n * Gets value for key, assigning a default if value is falsy.\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport function getWithDefault<K extends {}, V>(\n map: WeakMap<K, V>|Map<K, V>, key: K, defaultValueFactory: (key?: K) => V): V {\n let value = map.get(key);\n if (value === undefined || value === null) {\n value = defaultValueFactory(key);\n map.set(key, value);\n }\n\n return value;\n}\n"]}
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
// Copyright 2023 The Chromium Authors
|
|
2
|
-
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
-
// found in the LICENSE file.
|
|
4
|
-
export var MimeType;
|
|
5
|
-
(function (MimeType) {
|
|
6
|
-
MimeType["HTML"] = "text/html";
|
|
7
|
-
MimeType["XML"] = "text/xml";
|
|
8
|
-
MimeType["PLAIN"] = "text/plain";
|
|
9
|
-
MimeType["XHTML"] = "application/xhtml+xml";
|
|
10
|
-
MimeType["SVG"] = "image/svg+xml";
|
|
11
|
-
MimeType["CSS"] = "text/css";
|
|
12
|
-
MimeType["XSL"] = "text/xsl";
|
|
13
|
-
MimeType["VTT"] = "text/vtt";
|
|
14
|
-
MimeType["PDF"] = "application/pdf";
|
|
15
|
-
MimeType["EVENTSTREAM"] = "text/event-stream";
|
|
16
|
-
})(MimeType || (MimeType = {}));
|
|
17
|
-
/**
|
|
18
|
-
* MIME types other than the ones with the "text" type that have text content.
|
|
19
|
-
*/
|
|
20
|
-
const ADDITIONAL_TEXT_MIME_TYPES = new Set([
|
|
21
|
-
'application/ecmascript',
|
|
22
|
-
'application/javascript',
|
|
23
|
-
'application/json',
|
|
24
|
-
'application/json+protobuf',
|
|
25
|
-
'application/mpegurl',
|
|
26
|
-
'application/vnd.apple.mpegurl',
|
|
27
|
-
'application/vnd.dart',
|
|
28
|
-
'application/xml',
|
|
29
|
-
'application/x-aspx',
|
|
30
|
-
'application/x-javascript',
|
|
31
|
-
'application/x-jsp',
|
|
32
|
-
'application/x-httpd-php',
|
|
33
|
-
'application/x-mpegurl',
|
|
34
|
-
'audio/mpegurl',
|
|
35
|
-
'audio/x-mpegurl',
|
|
36
|
-
]);
|
|
37
|
-
/**
|
|
38
|
-
* @returns true iff `mimeType` has textual content. Concretely we return true if:
|
|
39
|
-
* - `mimeType` starts with "text/" or "multipart/"
|
|
40
|
-
* - `mimeType` ends with "+xml"
|
|
41
|
-
* - `mimeType` contains "json"
|
|
42
|
-
* - if `mimeType` is one of a predefined list textual mime types.
|
|
43
|
-
*/
|
|
44
|
-
export function isTextType(mimeType) {
|
|
45
|
-
return mimeType.startsWith('text/') || mimeType.startsWith('multipart/') || mimeType.includes('json') ||
|
|
46
|
-
mimeType.endsWith('+xml') || ADDITIONAL_TEXT_MIME_TYPES.has(mimeType);
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Port of net::HttpUtils::ParseContentType to extract mimeType and charset from
|
|
50
|
-
* the 'Content-Type' header.
|
|
51
|
-
*/
|
|
52
|
-
export function parseContentType(contentType) {
|
|
53
|
-
if (contentType === '*/*') {
|
|
54
|
-
return { mimeType: null, charset: null };
|
|
55
|
-
}
|
|
56
|
-
const { mimeType, params } = parseMimeType(contentType);
|
|
57
|
-
const charset = params.get('charset')?.toLowerCase().trim() ?? null;
|
|
58
|
-
return { mimeType, charset };
|
|
59
|
-
}
|
|
60
|
-
function parseMimeType(contentType) {
|
|
61
|
-
// Remove any leading and trailing whitespace. Note that String.prototype.trim removes a lot more
|
|
62
|
-
// than what the spec considers whitespace. We are fine with that.
|
|
63
|
-
contentType = contentType.trim();
|
|
64
|
-
// The mimetype is basically everything until the first ';' (but trimmed).
|
|
65
|
-
let mimeTypeEnd = findFirstIndexOf(contentType, ' \t;(');
|
|
66
|
-
if (mimeTypeEnd < 0) {
|
|
67
|
-
mimeTypeEnd = contentType.length;
|
|
68
|
-
}
|
|
69
|
-
const slashPos = contentType.indexOf('/');
|
|
70
|
-
if (slashPos < 0 || slashPos > mimeTypeEnd) {
|
|
71
|
-
return { mimeType: null, params: new Map() };
|
|
72
|
-
}
|
|
73
|
-
const mimeType = contentType.substring(0, mimeTypeEnd).toLowerCase();
|
|
74
|
-
// Iterate over parameters. We can't split the string around semicolons because quoted
|
|
75
|
-
// strings may include semicolons.
|
|
76
|
-
const params = new Map();
|
|
77
|
-
let offset = contentType.indexOf(';', mimeTypeEnd);
|
|
78
|
-
while (offset >= 0 && offset < contentType.length) {
|
|
79
|
-
// Trim off the semicolon.
|
|
80
|
-
++offset;
|
|
81
|
-
// Trim off whitespace
|
|
82
|
-
offset = findFirstIndexNotOf(contentType, ' \t', offset);
|
|
83
|
-
if (offset < 0) {
|
|
84
|
-
continue;
|
|
85
|
-
}
|
|
86
|
-
const paramNameStart = offset;
|
|
87
|
-
// Extend parameter name until we run into semicolon or equals sign.
|
|
88
|
-
offset = findFirstIndexOf(contentType, ';=', offset);
|
|
89
|
-
if (offset < 0 || contentType[offset] === ';') {
|
|
90
|
-
// Nothing more to do if no more input or there is no parameter value.
|
|
91
|
-
continue;
|
|
92
|
-
}
|
|
93
|
-
const paramName = contentType.substring(paramNameStart, offset).toLowerCase();
|
|
94
|
-
// Trim off the '='.
|
|
95
|
-
++offset;
|
|
96
|
-
// Trim off whitespace.
|
|
97
|
-
offset = findFirstIndexNotOf(contentType, ' \t', offset);
|
|
98
|
-
let paramValue = '';
|
|
99
|
-
if (offset < 0 || contentType[offset] === ';') {
|
|
100
|
-
// Nothing to do here: the value is an unquoted string of only whitespace.
|
|
101
|
-
continue;
|
|
102
|
-
}
|
|
103
|
-
else if (contentType[offset] !== '"') {
|
|
104
|
-
// Not a quote so we can copy the value as-is.
|
|
105
|
-
const valueStart = offset;
|
|
106
|
-
offset = contentType.indexOf(';', offset);
|
|
107
|
-
const valueEnd = offset >= 0 ? offset : contentType.length;
|
|
108
|
-
paramValue = contentType.substring(valueStart, valueEnd).trimEnd();
|
|
109
|
-
}
|
|
110
|
-
else {
|
|
111
|
-
// Otherwise append data with special handling for backslashes, until a close quote.
|
|
112
|
-
// Don't trim whitespace for quoted strings.
|
|
113
|
-
// Trim off the opening quote '"'
|
|
114
|
-
++offset;
|
|
115
|
-
while (offset < contentType.length && contentType[offset] !== '"') {
|
|
116
|
-
// Skip over backslash and append the next character, when not at the end
|
|
117
|
-
// of the string. Otherwise, copy the next character (which may be a backslash).
|
|
118
|
-
if (contentType[offset] === '\\' && offset + 1 < contentType.length) {
|
|
119
|
-
++offset;
|
|
120
|
-
}
|
|
121
|
-
paramValue += contentType[offset];
|
|
122
|
-
++offset;
|
|
123
|
-
}
|
|
124
|
-
offset = contentType.indexOf(';', offset);
|
|
125
|
-
}
|
|
126
|
-
if (!params.has(paramName)) {
|
|
127
|
-
// The first one wins!
|
|
128
|
-
params.set(paramName, paramValue);
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
return { mimeType, params };
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* @returns the smallest index of any character in 'characters' or -1 if none of
|
|
135
|
-
* the characters occur in 'searchString'
|
|
136
|
-
*/
|
|
137
|
-
function findFirstIndexOf(searchString, characters, pos = 0) {
|
|
138
|
-
for (let i = pos; i < searchString.length; i++) {
|
|
139
|
-
if (characters.includes(searchString[i])) {
|
|
140
|
-
return i;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
return -1;
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* @returns the smallest index of any character not in 'characters' or -1 if only
|
|
147
|
-
* 'characters' occur in 'searchString'
|
|
148
|
-
*/
|
|
149
|
-
function findFirstIndexNotOf(searchString, characters, pos = 0) {
|
|
150
|
-
for (let i = pos; i < searchString.length; i++) {
|
|
151
|
-
if (!characters.includes(searchString[i])) {
|
|
152
|
-
return i;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
return -1;
|
|
156
|
-
}
|
|
157
|
-
//# sourceMappingURL=MimeType.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MimeType.js","sourceRoot":"","sources":["../../../../../../front_end/core/platform/MimeType.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,yEAAyE;AACzE,6BAA6B;AAE7B,MAAM,CAAN,IAAkB,QAWjB;AAXD,WAAkB,QAAQ;IACxB,8BAAkB,CAAA;IAClB,4BAAgB,CAAA;IAChB,gCAAoB,CAAA;IACpB,2CAA+B,CAAA;IAC/B,iCAAqB,CAAA;IACrB,4BAAgB,CAAA;IAChB,4BAAgB,CAAA;IAChB,4BAAgB,CAAA;IAChB,mCAAuB,CAAA;IACvB,6CAAiC,CAAA;AACnC,CAAC,EAXiB,QAAQ,KAAR,QAAQ,QAWzB;AAED;;GAEG;AACH,MAAM,0BAA0B,GAAG,IAAI,GAAG,CAAC;IACzC,wBAAwB;IACxB,wBAAwB;IACxB,kBAAkB;IAClB,2BAA2B;IAC3B,qBAAqB;IACrB,+BAA+B;IAC/B,sBAAsB;IACtB,iBAAiB;IACjB,oBAAoB;IACpB,0BAA0B;IAC1B,mBAAmB;IACnB,yBAAyB;IACzB,uBAAuB;IACvB,eAAe;IACf,iBAAiB;CAClB,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CAAC,QAAgB;IACzC,OAAO,QAAQ,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,QAAQ,CAAC,UAAU,CAAC,YAAY,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC;QACjG,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,0BAA0B,C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AAC,YAAoB,EAAE,UAAkB,EAAE,GAAG,GAAG,CAAC;IAC5E,KAAK,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAC/C,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAC1C,OAAO,CAAC,CAAC;QACX,CAAC;IACH,CAAC;IACD,OAAO,CAAC,CAAC,CAAC;AACZ,CAAC","sourcesContent":["// Copyright 2023 The Chromium Authors\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nexport const enum MimeType {\n HTML = 'text/html',\n XML = 'text/xml',\n PLAIN = 'text/plain',\n XHTML = 'application/xhtml+xml',\n SVG = 'image/svg+xml',\n CSS = 'text/css',\n XSL = 'text/xsl',\n VTT = 'text/vtt',\n PDF = 'application/pdf',\n EVENTSTREAM = 'text/event-stream',\n}\n\n/**\n * MIME types other than the ones with the \"text\" type that have text content.\n */\nconst ADDITIONAL_TEXT_MIME_TYPES = new Set([\n 'application/ecmascript',\n 'application/javascript',\n 'application/json',\n 'application/json+protobuf',\n 'application/mpegurl',\n 'application/vnd.apple.mpegurl',\n 'application/vnd.dart',\n 'application/xml',\n 'application/x-aspx',\n 'application/x-javascript',\n 'application/x-jsp',\n 'application/x-httpd-php',\n 'application/x-mpegurl',\n 'audio/mpegurl',\n 'audio/x-mpegurl',\n]);\n\n/**\n * @returns true iff `mimeType` has textual content. Concretely we return true if:\n * - `mimeType` starts with \"text/\" or \"multipart/\"\n * - `mimeType` ends with \"+xml\"\n * - `mimeType` contains \"json\"\n * - if `mimeType` is one of a predefined list textual mime types.\n */\nexport function isTextType(mimeType: string): boolean {\n return mimeType.startsWith('text/') || mimeType.startsWith('multipart/') || mimeType.includes('json') ||\n mimeType.endsWith('+xml') || ADDITIONAL_TEXT_MIME_TYPES.has(mimeType);\n}\n\n/**\n * Port of net::HttpUtils::ParseContentType to extract mimeType and charset from\n * the 'Content-Type' header.\n */\nexport function parseContentType(contentType: string): {mimeType: string|null, charset: string|null} {\n if (contentType === '*/*') {\n return {mimeType: null, charset: null};\n }\n\n const {mimeType, params} = parseMimeType(contentType);\n const charset = params.get('charset')?.toLowerCase().trim() ?? null;\n return {mimeType, charset};\n}\n\nfunction parseMimeType(contentType: string): {mimeType: string|null, params: Map<string, string>} {\n // Remove any leading and trailing whitespace. Note that String.prototype.trim removes a lot more\n // than what the spec considers whitespace. We are fine with that.\n contentType = contentType.trim();\n\n // The mimetype is basically everything until the first ';' (but trimmed).\n let mimeTypeEnd = findFirstIndexOf(contentType, ' \\t;(');\n if (mimeTypeEnd < 0) {\n mimeTypeEnd = contentType.length;\n }\n\n const slashPos = contentType.indexOf('/');\n if (slashPos < 0 || slashPos > mimeTypeEnd) {\n return {mimeType: null, params: new Map()};\n }\n const mimeType = contentType.substring(0, mimeTypeEnd).toLowerCase();\n\n // Iterate over parameters. We can't split the string around semicolons because quoted\n // strings may include semicolons.\n const params = new Map<string, string>();\n let offset = contentType.indexOf(';', mimeTypeEnd);\n while (offset >= 0 && offset < contentType.length) {\n // Trim off the semicolon.\n ++offset;\n\n // Trim off whitespace\n offset = findFirstIndexNotOf(contentType, ' \\t', offset);\n if (offset < 0) {\n continue;\n }\n const paramNameStart = offset;\n\n // Extend parameter name until we run into semicolon or equals sign.\n offset = findFirstIndexOf(contentType, ';=', offset);\n if (offset < 0 || contentType[offset] === ';') {\n // Nothing more to do if no more input or there is no parameter value.\n continue;\n }\n\n const paramName = contentType.substring(paramNameStart, offset).toLowerCase();\n\n // Trim off the '='.\n ++offset;\n\n // Trim off whitespace.\n offset = findFirstIndexNotOf(contentType, ' \\t', offset);\n\n let paramValue = '';\n if (offset < 0 || contentType[offset] === ';') {\n // Nothing to do here: the value is an unquoted string of only whitespace.\n continue;\n } else if (contentType[offset] !== '\"') {\n // Not a quote so we can copy the value as-is.\n const valueStart = offset;\n offset = contentType.indexOf(';', offset);\n const valueEnd = offset >= 0 ? offset : contentType.length;\n\n paramValue = contentType.substring(valueStart, valueEnd).trimEnd();\n } else {\n // Otherwise append data with special handling for backslashes, until a close quote.\n // Don't trim whitespace for quoted strings.\n\n // Trim off the opening quote '\"'\n ++offset;\n\n while (offset < contentType.length && contentType[offset] !== '\"') {\n // Skip over backslash and append the next character, when not at the end\n // of the string. Otherwise, copy the next character (which may be a backslash).\n if (contentType[offset] === '\\\\' && offset + 1 < contentType.length) {\n ++offset;\n }\n paramValue += contentType[offset];\n ++offset;\n }\n\n offset = contentType.indexOf(';', offset);\n }\n if (!params.has(paramName)) {\n // The first one wins!\n params.set(paramName, paramValue);\n }\n }\n\n return {mimeType, params};\n}\n\n/**\n * @returns the smallest index of any character in 'characters' or -1 if none of\n * the characters occur in 'searchString'\n */\nfunction findFirstIndexOf(searchString: string, characters: string, pos = 0): number {\n for (let i = pos; i < searchString.length; i++) {\n if (characters.includes(searchString[i])) {\n return i;\n }\n }\n return -1;\n}\n\n/**\n * @returns the smallest index of any character not in 'characters' or -1 if only\n * 'characters' occur in 'searchString'\n */\nfunction findFirstIndexNotOf(searchString: string, characters: string, pos = 0): number {\n for (let i = pos; i < searchString.length; i++) {\n if (!characters.includes(searchString[i])) {\n return i;\n }\n }\n return -1;\n}\n"]}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
// Copyright 2020 The Chromium Authors
|
|
2
|
-
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
-
// found in the LICENSE file.
|
|
4
|
-
export const clamp = (num, min, max) => {
|
|
5
|
-
let clampedNumber = num;
|
|
6
|
-
if (num < min) {
|
|
7
|
-
clampedNumber = min;
|
|
8
|
-
}
|
|
9
|
-
else if (num > max) {
|
|
10
|
-
clampedNumber = max;
|
|
11
|
-
}
|
|
12
|
-
return clampedNumber;
|
|
13
|
-
};
|
|
14
|
-
export const mod = (m, n) => {
|
|
15
|
-
return ((m % n) + n) % n;
|
|
16
|
-
};
|
|
17
|
-
export const toFixedIfFloating = (value) => {
|
|
18
|
-
if (!value || Number.isNaN(Number(value))) {
|
|
19
|
-
return value;
|
|
20
|
-
}
|
|
21
|
-
const number = Number(value);
|
|
22
|
-
return number % 1 ? number.toFixed(3) : String(number);
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* Rounds a number (including float) down.
|
|
26
|
-
*/
|
|
27
|
-
export const floor = (value, precision = 0) => {
|
|
28
|
-
// Allows for rounding to the nearest whole number.
|
|
29
|
-
// Ex: 1 / 10 -> round down to nearest 10th place
|
|
30
|
-
// Ex: 1 / 5 -> round down to nearest 5
|
|
31
|
-
// Ex: 1 / 50 -> round down to nearest 50
|
|
32
|
-
if (precision > 0 && precision < 1) {
|
|
33
|
-
precision = 1 / precision;
|
|
34
|
-
return Math.floor(value / precision) * precision;
|
|
35
|
-
}
|
|
36
|
-
const mult = Math.pow(10, precision);
|
|
37
|
-
return Math.floor(value * mult) / mult;
|
|
38
|
-
};
|
|
39
|
-
/**
|
|
40
|
-
* Computes the great common divisor for two numbers.
|
|
41
|
-
* If the numbers are floats, they will be rounded to an integer.
|
|
42
|
-
*/
|
|
43
|
-
export const greatestCommonDivisor = (a, b) => {
|
|
44
|
-
a = Math.round(a);
|
|
45
|
-
b = Math.round(b);
|
|
46
|
-
while (b !== 0) {
|
|
47
|
-
const t = b;
|
|
48
|
-
b = a % b;
|
|
49
|
-
a = t;
|
|
50
|
-
}
|
|
51
|
-
return a;
|
|
52
|
-
};
|
|
53
|
-
const commonRatios = new Map([
|
|
54
|
-
['8∶5', '16∶10'],
|
|
55
|
-
]);
|
|
56
|
-
export const aspectRatio = (width, height) => {
|
|
57
|
-
const divisor = greatestCommonDivisor(width, height);
|
|
58
|
-
if (divisor !== 0) {
|
|
59
|
-
width /= divisor;
|
|
60
|
-
height /= divisor;
|
|
61
|
-
}
|
|
62
|
-
const result = `${width}∶${height}`;
|
|
63
|
-
return commonRatios.get(result) || result;
|
|
64
|
-
};
|
|
65
|
-
export const withThousandsSeparator = function (num) {
|
|
66
|
-
let str = String(num);
|
|
67
|
-
const re = /(\d+)(\d{3})/;
|
|
68
|
-
while (str.match(re)) {
|
|
69
|
-
str = str.replace(re, '$1\xA0$2');
|
|
70
|
-
} // \xa0 is a non-breaking space
|
|
71
|
-
return str;
|
|
72
|
-
};
|
|
73
|
-
//# sourceMappingURL=NumberUtilities.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NumberUtilities.js","sourceRoot":"","sources":["../../../../../../front_end/core/platform/NumberUtilities.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,yEAAyE;AACzE,6BAA6B;AAE7B,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,GAAW,EAAE,GAAW,EAAE,GAAW,EAAU,EAAE;IACrE,IAAI,aAAa,GAAG,GAAG,CAAC;IACxB,IAAI,GAAG,GAAG,GAAG,EAAE,CAAC;QACd,aAAa,GAAG,GAAG,CAAC;IACtB,CAAC;SAAM,IAAI,GAAG,GAAG,GAAG,EAAE,CAAC;QACrB,aAAa,GAAG,GAAG,CAAC;IACtB,CAAC;IACD,OAAO,aAAa,CAAC;AACvB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,CAAS,EAAE,CAAS,EAAU,EAAE;IAClD,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;AAC3B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAAa,EAAU,EAAE;IACzD,IAAI,CAAC,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;QAC1C,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC7B,OAAO,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CA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AAC;IACrD,IAAI,OAAO,KAAK,CAAC,EAAE,CAAC;QAClB,KAAK,IAAI,OAAO,CAAC;QACjB,MAAM,IAAI,OAAO,CAAC;IACpB,CAAC;IACD,MAAM,MAAM,GAAG,GAAG,KAAK,IAAI,MAAM,EAAE,CAAC;IACpC,OAAO,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC;AAC5C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,UAAS,GAAW;IACxD,IAAI,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IACtB,MAAM,EAAE,GAAG,cAAc,CAAC;IAC1B,OAAO,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC;QACrB,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;IACpC,CAAC,CAAE,+BAA+B;IAClC,OAAO,GAAG,CAAC;AACb,CAAC,CAAC","sourcesContent":["// Copyright 2020 The Chromium Authors\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nexport const clamp = (num: number, min: number, max: number): number => {\n let clampedNumber = num;\n if (num < min) {\n clampedNumber = min;\n } else if (num > max) {\n clampedNumber = max;\n }\n return clampedNumber;\n};\n\nexport const mod = (m: number, n: number): number => {\n return ((m % n) + n) % n;\n};\n\nexport const toFixedIfFloating = (value: string): string => {\n if (!value || Number.isNaN(Number(value))) {\n return value;\n }\n const number = Number(value);\n return number % 1 ? number.toFixed(3) : String(number);\n};\n\n/**\n * Rounds a number (including float) down.\n */\nexport const floor = (value: number, precision = 0): number => {\n // Allows for rounding to the nearest whole number.\n // Ex: 1 / 10 -> round down to nearest 10th place\n // Ex: 1 / 5 -> round down to nearest 5\n // Ex: 1 / 50 -> round down to nearest 50\n if (precision > 0 && precision < 1) {\n precision = 1 / precision;\n return Math.floor(value / precision) * precision;\n }\n\n const mult = Math.pow(10, precision);\n return Math.floor(value * mult) / mult;\n};\n\n/**\n * Computes the great common divisor for two numbers.\n * If the numbers are floats, they will be rounded to an integer.\n */\nexport const greatestCommonDivisor = (a: number, b: number): number => {\n a = Math.round(a);\n b = Math.round(b);\n while (b !== 0) {\n const t = b;\n b = a % b;\n a = t;\n }\n return a;\n};\n\nconst commonRatios = new Map([\n ['8∶5', '16∶10'],\n]);\n\nexport const aspectRatio = (width: number, height: number): string => {\n const divisor = greatestCommonDivisor(width, height);\n if (divisor !== 0) {\n width /= divisor;\n height /= divisor;\n }\n const result = `${width}∶${height}`;\n return commonRatios.get(result) || result;\n};\n\nexport const withThousandsSeparator = function(num: number): string {\n let str = String(num);\n const re = /(\\d+)(\\d{3})/;\n while (str.match(re)) {\n str = str.replace(re, '$1\\xA0$2');\n } // \\xa0 is a non-breaking space\n return str;\n};\n"]}
|
package/core/platform/Size.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
// Copyright 2026 The Chromium Authors
|
|
2
|
-
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
-
// found in the LICENSE file.
|
|
4
|
-
export class Size {
|
|
5
|
-
width;
|
|
6
|
-
height;
|
|
7
|
-
constructor(width, height) {
|
|
8
|
-
this.width = width;
|
|
9
|
-
this.height = height;
|
|
10
|
-
}
|
|
11
|
-
clipTo(size) {
|
|
12
|
-
if (!size) {
|
|
13
|
-
return this;
|
|
14
|
-
}
|
|
15
|
-
return new Size(Math.min(this.width, size.width), Math.min(this.height, size.height));
|
|
16
|
-
}
|
|
17
|
-
scale(scale) {
|
|
18
|
-
return new Size(this.width * scale, this.height * scale);
|
|
19
|
-
}
|
|
20
|
-
isEqual(size) {
|
|
21
|
-
return size !== null && this.width === size.width && this.height === size.height;
|
|
22
|
-
}
|
|
23
|
-
widthToMax(size) {
|
|
24
|
-
return new Size(Math.max(this.width, (typeof size === 'number' ? size : size.width)), this.height);
|
|
25
|
-
}
|
|
26
|
-
addWidth(size) {
|
|
27
|
-
return new Size(this.width + (typeof size === 'number' ? size : size.width), this.height);
|
|
28
|
-
}
|
|
29
|
-
heightToMax(size) {
|
|
30
|
-
return new Size(this.width, Math.max(this.height, (typeof size === 'number' ? size : size.height)));
|
|
31
|
-
}
|
|
32
|
-
addHeight(size) {
|
|
33
|
-
return new Size(this.width, this.height + (typeof size === 'number' ? size : size.height));
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
//# sourceMappingURL=Size.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Size.js","sourceRoot":"","sources":["../../../../../../front_end/core/platform/Size.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,yEAAyE;AACzE,6BAA6B;AAE7B,MAAM,OAAO,IAAI;IACf,KAAK,CAAS;IACd,MAAM,CAAS;IACf,YAAY,KAAa,EAAE,MAAc;QACvC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,MAAM,CAAC,IAAgB;QACrB,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IACxF,CAAC;IAED,KAAK,CAAC,KAAa;QACjB,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,KAAK,EAAE,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC;IAC3D,CAAC;IAED,OAAO,CAAC,IAAe;QACrB,OAAO,IAAI,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,MAAM,CAAC;IACnF,CAAC;IAED,UAAU,CAAC,IAAiB;QAC1B,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IACrG,CAAC;IAED,QAAQ,CAAC,IAAiB;QACxB,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAC5F,CAAC;IAED,WAAW,CAAC,IAAiB;QAC3B,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACtG,CAAC;IAED,SAAS,CAAC,IAAiB;QACzB,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,GAAG,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7F,CAAC;CACF","sourcesContent":["// Copyright 2026 The Chromium Authors\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nexport class Size {\n width: number;\n height: number;\n constructor(width: number, height: number) {\n this.width = width;\n this.height = height;\n }\n\n clipTo(size?: Size|null): Size {\n if (!size) {\n return this;\n }\n return new Size(Math.min(this.width, size.width), Math.min(this.height, size.height));\n }\n\n scale(scale: number): Size {\n return new Size(this.width * scale, this.height * scale);\n }\n\n isEqual(size: Size|null): boolean {\n return size !== null && this.width === size.width && this.height === size.height;\n }\n\n widthToMax(size: number|Size): Size {\n return new Size(Math.max(this.width, (typeof size === 'number' ? size : size.width)), this.height);\n }\n\n addWidth(size: number|Size): Size {\n return new Size(this.width + (typeof size === 'number' ? size : size.width), this.height);\n }\n\n heightToMax(size: number|Size): Size {\n return new Size(this.width, Math.max(this.height, (typeof size === 'number' ? size : size.height)));\n }\n\n addHeight(size: number|Size): Size {\n return new Size(this.width, this.height + (typeof size === 'number' ? size : size.height));\n }\n}\n"]}
|