Update debugger-frontend from 3adf51a...97e9912 (#49784)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49784

Changelog: [Internal] - Update `react-native/debugger-frontend` from 3adf51a...97e9912

Resyncs `react-native/debugger-frontend` from GitHub - see `rn-chrome-devtools-frontend` [changelog](https://github.com/facebookexperimental/rn-chrome-devtools-frontend/compare/3adf51aa915c2deb26f5d373751a15b4d0c8f259...97e9912605ce73b06f67fc607c1a5c434a67d6de).

Reviewed By: huntie

Differential Revision: D70487787

fbshipit-source-id: 6f3b47a254f45b770798ff3af8ade1c9a6d7fc64
This commit is contained in:
Ruslan Lesiutin authored and Facebook GitHub Bot committed 2025-03-03 06:08:30 -08:00
1 parent 515ff1e626
commit 81e490164f
4 files changed
+5 -5

No files matched your search

+2 -2
View File
@@ -1,5 +1,5 @@
@generated SignedSource<<b51c1f03d2e1bf82b4b2829c06a3672a>>
Git revision: 3adf51aa915c2deb26f5d373751a15b4d0c8f259
@generated SignedSource<<347069bf171def94f2e48bf1e82bb02d>>
Git revision: 97e9912605ce73b06f67fc607c1a5c434a67d6de
Built with --nohooks: false
Is local checkout: false
Remote URL: https://github.com/facebookexperimental/rn-chrome-devtools-frontend
@@ -1 +1 @@
import*as e from"../../core/common/common.js";import*as t from"../../core/host/host.js";import*as a from"../../core/i18n/i18n.js";import*as s from"../../ui/legacy/legacy.js";import*as n from"../../ui/visual_logging/visual_logging.js";import*as o from"../../core/root/root.js";import*as r from"../../core/sdk/sdk.js";import*as i from"../../panels/mobile_throttling/mobile_throttling.js";import*as l from"../../ui/legacy/components/utils/utils.js";import*as d from"../../core/platform/platform.js";import*as c from"../../models/bindings/bindings.js";const g=new CSSStyleSheet;g.replaceSync(':host{padding:12px}[is="dt-checkbox"]{margin:0 0 10px;flex:none}.panel-section-separator{height:1px;margin-bottom:10px;background:var(--sys-color-divider);flex:none}.panel-section-separator:last-child{background:transparent}.chrome-select-label{margin-bottom:16px}\n/*# sourceURL=renderingOptions.css */\n');const h={paintFlashing:"Paint flashing",highlightsAreasOfThePageGreen:"Highlights areas of the page (green) that need to be repainted. May not be suitable for people prone to photosensitive epilepsy.",layoutShiftRegions:"Layout Shift Regions",highlightsAreasOfThePageBlueThat:"Highlights areas of the page (blue) that were shifted. May not be suitable for people prone to photosensitive epilepsy.",layerBorders:"Layer borders",showsLayerBordersOrangeoliveAnd:"Shows layer borders (orange/olive) and tiles (cyan).",frameRenderingStats:"Frame Rendering Stats",plotsFrameThroughputDropped:"Plots frame throughput, dropped frames distribution, and GPU memory.",scrollingPerformanceIssues:"Scrolling performance issues",highlightsElementsTealThatCan:"Highlights elements (teal) that can slow down scrolling, including touch & wheel event handlers and other main-thread scrolling situations.",highlightAdFrames:"Highlight ad frames",highlightsFramesRedDetectedToBe:"Highlights frames (red) detected to be ads.",coreWebVitals:"Core Web Vitals",showsAnOverlayWithCoreWebVitals:"Shows an overlay with Core Web Vitals.",disableLocalFonts:"Disable local fonts",disablesLocalSourcesInFontface:"Disables `local()` sources in `@font-face` rules. Requires a page reload to apply.",emulateAFocusedPage:"Emulate a focused page",emulatesAFocusedPage:"Keep page focused. Commonly used for debugging disappearing elements.",emulateAutoDarkMode:"Enable automatic dark mode",emulatesAutoDarkMode:"Enables automatic dark mode and sets `prefers-color-scheme` to `dark`.",forcesMediaTypeForTestingPrint:"Forces media type for testing print and screen styles",forcesCssPreferscolorschemeMedia:"Forces CSS `prefers-color-scheme` media feature",forcesCssPrefersreducedmotion:"Forces CSS `prefers-reduced-motion` media feature",forcesCssPreferscontrastMedia:"Forces CSS `prefers-contrast` media feature",forcesCssPrefersreduceddataMedia:"Forces CSS `prefers-reduced-data` media feature",forcesCssPrefersreducedtransparencyMedia:"Forces CSS `prefers-reduced-transparency` media feature",forcesCssColorgamutMediaFeature:"Forces CSS `color-gamut` media feature",forcesVisionDeficiencyEmulation:"Forces vision deficiency emulation",disableAvifImageFormat:"Disable `AVIF` image format",requiresAPageReloadToApplyAnd:"Requires a page reload to apply and disables caching for image requests.",disableWebpImageFormat:"Disable `WebP` image format",forcesCssForcedColors:"Forces CSS forced-colors media feature"},u=a.i18n.registerUIStrings("entrypoints/inspector_main/RenderingOptions.ts",h),p=a.i18n.getLocalizedString.bind(void 0,u);class m extends s.Widget.VBox{constructor(){super(!0),this.element.setAttribute("jslog",`${n.panel("rendering").track({resize:!0})}`),this.#e(p(h.paintFlashing),p(h.highlightsAreasOfThePageGreen),e.Settings.Settings.instance().moduleSetting("show-paint-rects")),this.#e(p(h.layoutShiftRegions),p(h.highlightsAreasOfThePageBlueThat),e.Settings.Settings.instance().moduleSetting("show-layout-shift-regions")),this.#e(p(h.layerBorders),p(h.showsLayerBordersOrangeoliveAnd),e.Settings.Settings.instance().moduleSetting("show-debug-borders")),this.#e(p(h.frameRenderingStats),p(h.plotsFrameThroughputDropped),e.Settings.Settings.instance().moduleSetting("show-fps-counter")),this.#e(p(h.scrollingPerformanceIssues),p(h.highlightsElementsTealThatCan),e.Settings.Settings.instance().moduleSetting("show-scroll-bottleneck-rects")),this.#e(p(h.highlightAdFrames),p(h.highlightsFramesRedDetectedToBe),e.Settings.Settings.instance().moduleSetting("show-ad-highlights")),this.#e(p(h.coreWebVitals),p(h.showsAnOverlayWithCoreWebVitals),e.Settings.Settings.instance().moduleSetting("show-web-vitals"),{toggle:t.UserMetrics.Action.ToggleShowWebVitals}),this.#e(p(h.disableLocalFonts),p(h.disablesLocalSourcesInFontface),e.Settings.Settings.instance().moduleSetting("local-fonts-disabled")),this.#e(p(h.emulateAFocusedPage),p(h.emulatesAFocusedPage),e.Settings.Settings.instance().moduleSetting("emulate-page-focus"),{toggle:t.UserMetrics.Action.ToggleEmulateFocusedPageFromRenderingTab}),this.#e(p(h.emulateAutoDarkMode),Line truncated
import*as e from"../../core/common/common.js";import*as t from"../../core/host/host.js";import*as a from"../../core/i18n/i18n.js";import*as s from"../../ui/legacy/legacy.js";import*as n from"../../ui/visual_logging/visual_logging.js";import*as r from"../../core/root/root.js";import*as o from"../../core/sdk/sdk.js";import*as i from"../../panels/mobile_throttling/mobile_throttling.js";import*as l from"../../ui/legacy/components/utils/utils.js";import*as d from"../../core/platform/platform.js";import*as c from"../../models/bindings/bindings.js";const g=new CSSStyleSheet;g.replaceSync(':host{padding:12px}[is="dt-checkbox"]{margin:0 0 10px;flex:none}.panel-section-separator{height:1px;margin-bottom:10px;background:var(--sys-color-divider);flex:none}.panel-section-separator:last-child{background:transparent}.chrome-select-label{margin-bottom:16px}\n/*# sourceURL=renderingOptions.css */\n');const h={paintFlashing:"Paint flashing",highlightsAreasOfThePageGreen:"Highlights areas of the page (green) that need to be repainted. May not be suitable for people prone to photosensitive epilepsy.",layoutShiftRegions:"Layout Shift Regions",highlightsAreasOfThePageBlueThat:"Highlights areas of the page (blue) that were shifted. May not be suitable for people prone to photosensitive epilepsy.",layerBorders:"Layer borders",showsLayerBordersOrangeoliveAnd:"Shows layer borders (orange/olive) and tiles (cyan).",frameRenderingStats:"Frame Rendering Stats",plotsFrameThroughputDropped:"Plots frame throughput, dropped frames distribution, and GPU memory.",scrollingPerformanceIssues:"Scrolling performance issues",highlightsElementsTealThatCan:"Highlights elements (teal) that can slow down scrolling, including touch & wheel event handlers and other main-thread scrolling situations.",highlightAdFrames:"Highlight ad frames",highlightsFramesRedDetectedToBe:"Highlights frames (red) detected to be ads.",coreWebVitals:"Core Web Vitals",showsAnOverlayWithCoreWebVitals:"Shows an overlay with Core Web Vitals.",disableLocalFonts:"Disable local fonts",disablesLocalSourcesInFontface:"Disables `local()` sources in `@font-face` rules. Requires a page reload to apply.",emulateAFocusedPage:"Emulate a focused page",emulatesAFocusedPage:"Keep page focused. Commonly used for debugging disappearing elements.",emulateAutoDarkMode:"Enable automatic dark mode",emulatesAutoDarkMode:"Enables automatic dark mode and sets `prefers-color-scheme` to `dark`.",forcesMediaTypeForTestingPrint:"Forces media type for testing print and screen styles",forcesCssPreferscolorschemeMedia:"Forces CSS `prefers-color-scheme` media feature",forcesCssPrefersreducedmotion:"Forces CSS `prefers-reduced-motion` media feature",forcesCssPreferscontrastMedia:"Forces CSS `prefers-contrast` media feature",forcesCssPrefersreduceddataMedia:"Forces CSS `prefers-reduced-data` media feature",forcesCssPrefersreducedtransparencyMedia:"Forces CSS `prefers-reduced-transparency` media feature",forcesCssColorgamutMediaFeature:"Forces CSS `color-gamut` media feature",forcesVisionDeficiencyEmulation:"Forces vision deficiency emulation",disableAvifImageFormat:"Disable `AVIF` image format",requiresAPageReloadToApplyAnd:"Requires a page reload to apply and disables caching for image requests.",disableWebpImageFormat:"Disable `WebP` image format",forcesCssForcedColors:"Forces CSS forced-colors media feature"},u=a.i18n.registerUIStrings("entrypoints/inspector_main/RenderingOptions.ts",h),p=a.i18n.getLocalizedString.bind(void 0,u);class m extends s.Widget.VBox{constructor(){super(!0),this.element.setAttribute("jslog",`${n.panel("rendering").track({resize:!0})}`),this.#e(p(h.paintFlashing),p(h.highlightsAreasOfThePageGreen),e.Settings.Settings.instance().moduleSetting("show-paint-rects")),this.#e(p(h.layoutShiftRegions),p(h.highlightsAreasOfThePageBlueThat),e.Settings.Settings.instance().moduleSetting("show-layout-shift-regions")),this.#e(p(h.layerBorders),p(h.showsLayerBordersOrangeoliveAnd),e.Settings.Settings.instance().moduleSetting("show-debug-borders")),this.#e(p(h.frameRenderingStats),p(h.plotsFrameThroughputDropped),e.Settings.Settings.instance().moduleSetting("show-fps-counter")),this.#e(p(h.scrollingPerformanceIssues),p(h.highlightsElementsTealThatCan),e.Settings.Settings.instance().moduleSetting("show-scroll-bottleneck-rects")),this.#e(p(h.highlightAdFrames),p(h.highlightsFramesRedDetectedToBe),e.Settings.Settings.instance().moduleSetting("show-ad-highlights")),this.#e(p(h.coreWebVitals),p(h.showsAnOverlayWithCoreWebVitals),e.Settings.Settings.instance().moduleSetting("show-web-vitals"),{toggle:t.UserMetrics.Action.ToggleShowWebVitals}),this.#e(p(h.disableLocalFonts),p(h.disablesLocalSourcesInFontface),e.Settings.Settings.instance().moduleSetting("local-fonts-disabled")),this.#e(p(h.emulateAFocusedPage),p(h.emulatesAFocusedPage),e.Settings.Settings.instance().moduleSetting("emulate-page-focus"),{toggle:t.UserMetrics.Action.ToggleEmulateFocusedPageFromRenderingTab}),this.#e(p(h.emulateAutoDarkMode),Line truncated
@@ -1 +1 @@
var e=Object.freeze({__proto__:null,defaults:()=>({includeRuntimeCallStats:!1,showAllEvents:!1,debugMode:!1}),configToCacheKey:function(e){return JSON.stringify(e)}});const n=["primary","primary-light","primary-dark","secondary","secondary-light","secondary-dark","tertiary","tertiary-light","tertiary-dark","error"];function t(e){return"marker"===e.dataType}function r(e){const n="track"in e&&Boolean(e.track);return("track-entry"===e.dataType||void 0===e.dataType)&&n}var a=Object.freeze({__proto__:null,colorIsValid:function(e){return n.includes(e)},isExtensionPayloadMarker:t,isExtensionPayloadTrackEntry:r,isValidExtensionPayload:function(e){return t(e)||r(e)},isSyntheticExtensionEntry:function(e){return"devtools.extension"===e.cat}});var i=Object.freeze({__proto__:null,traceEventKeyToValues:function(e){const n=e.split("-");switch(n[0]){case"p":if(5!==n.length||!n.every(((e,n)=>0===n||"number"==typeof e||!isNaN(parseInt(e,10)))))throw new Error(`Invalid ProfileCallKey: ${e}`);return{type:n[0],processID:parseInt(n[1],10),threadID:parseInt(n[2],10),sampleIndex:parseInt(n[3],10),protocol:parseInt(n[4],10)};case"r":if(2!==n.length||"number"!=typeof n[1]&&isNaN(parseInt(n[1],10)))throw new Error(`Invalid RawEvent Key: ${e}`);return{type:n[0],rawIndex:parseInt(n[1],10)};case"s":if(2!==n.length||"number"!=typeof n[1]&&isNaN(parseInt(n[1],10)))throw new Error(`Invalid NativeSyntheticEvent Key: ${e}`);return{type:n[0],rawIndex:parseInt(n[1],10)};default:throw new Error(`Unknown trace event key: ${e}`)}}});var c=Object.freeze({__proto__:null,MicroSeconds:function(e){return e},MilliSeconds:function(e){return e},Seconds:function(e){return e}});function o(e){return"b"===e||"e"===e||"n"===e}const u=[I,h,k,S,y,E];const s=[...u,R];function m(e){return"ScheduleStyleInvalidationTracking"===e.name}function l(e){return"StyleRecalcInvalidationTracking"===e.name}function f(e){return"StyleInvalidatorInvalidationTracking"===e.name}function d(e){return"X"===e.ph}function v(e){return"I"===e.ph}function T(e){return v(e)||d(e)}function E(e){return"navigationStart"===e.name}function p(e){return"LayoutShift"===e.name}function g(e){return"LayoutInvalidationTracking"===e.name}function S(e){return"firstContentfulPaint"===e.name}function y(e){return"largestContentfulPaint::Candidate"===e.name}function h(e){return"MarkLoad"===e.name}function k(e){return"firstPaint"===e.name}function I(e){return"MarkDOMContent"===e.name}function R(e){return"InteractiveTime"===e.name}function C(e){return"EventTiming"===e.name}function b(e){return"SyntheticNetworkRequest"===e.name}function P(e){return"SyntheticWebSocketConnectionEvent"===e.name}const L=new Set(["b","n","e","T","S","F","p"]);function F(e){return L.has(e.ph)}function w(e){return"callFrame"in e}function W(e){return"WebSocketCreate"===e.name}function D(e){return"WebSocketSendHandshakeRequest"===e.name||"WebSocketReceiveHandshakeResponse"===e.name||"WebSocketDestroy"===e.name}function M(e){return"WebSocketSend"===e.name||"WebSocketReceive"===e.name}function _(e){return W(e)||D(e)||M(e)}var N=Object.freeze({__proto__:null,isNestableAsyncPhase:o,isAsyncPhase:function(e){return o(e)||"S"===e||"T"===e||"F"===e||"p"===e},isFlowPhase:function(e){return"s"===e||"t"===e||"f"===e},objectIsTraceEventCallFrame:function(e){return"functionName"in e&&"string"==typeof e.functionName&&"scriptId"in e&&("string"==typeof e.scriptId||"number"==typeof e.scriptId)&&"columnNumber"in e&&"number"==typeof e.columnNumber&&"lineNumber"in e&&"number"==typeof e.lineNumber&&"url"in e&&"string"==typeof e.url},isTraceEventRunTask:function(e){return"RunTask"===e.name},isTraceEventAuctionWorkletRunningInProcess:function(e){return"AuctionWorkletRunningInProcess"===e.name},isTraceEventAuctionWorkletDoneWithProcess:function(e){return"AuctionWorkletDoneWithProcess"===e.name},isTraceEventScreenshot:function(e){return"Screenshot"===e.name},MarkerName:["MarkDOMContent","MarkLoad","firstPaint","firstContentfulPaint","largestContentfulPaint::Candidate"],isTraceEventMarkerEvent:function(e){return u.some((n=>n(e)))},eventIsPageLoadEvent:function(e){return s.some((n=>n(e)))},isTraceEventTracingSessionIdForWorker:function(e){return"TracingSessionIdForWorker"===e.name},isTraceEventScheduleStyleInvalidationTracking:m,isTraceEventStyleRecalcInvalidationTracking:l,isTraceEventStyleInvalidatorInvalidationTracking:f,isTraceEventBeginCommitCompositorFrame:function(e){return"BeginCommitCompositorFrame"===e.name},isTraceEventScheduleStyleRecalculation:function(e){return"ScheduleStyleRecalculation"===e.name},isTraceEventRenderFrameImplCreateChildFrame:function(e){return"RenderFrameImpl::createChildFrame"===e.name},isTraceEventTargetRundown:function(e){if("disabled-by-default-devtools.target-rundown"!==e.cat)return!1;const n=e.args?.data;return!!n&&("frame"in n&&"frameType"in n&&"url"in n&&"isolate"in n&&"v8context"in n&&"scriptId"in n)},isTraceEventScriptRundown:function(e){if("disabled-by-default-devtools.v8-source-rundown"!==e.cat)return!1;const n=e.args?.Line truncated
var e=Object.freeze({__proto__:null,defaults:()=>({includeRuntimeCallStats:!1,showAllEvents:!1,debugMode:!1}),configToCacheKey:function(e){return JSON.stringify(e)}});const n=["primary","primary-light","primary-dark","secondary","secondary-light","secondary-dark","tertiary","tertiary-light","tertiary-dark","error"];function t(e){return"marker"===e.dataType}function r(e){const n="track"in e&&Boolean(e.track);return("track-entry"===e.dataType||void 0===e.dataType)&&n}var a=Object.freeze({__proto__:null,colorIsValid:function(e){return n.includes(e)},isExtensionPayloadMarker:t,isExtensionPayloadTrackEntry:r,isValidExtensionPayload:function(e){return t(e)||r(e)},isSyntheticExtensionEntry:function(e){return"devtools.extension"===e.cat}});var i=Object.freeze({__proto__:null,traceEventKeyToValues:function(e){const n=e.split("-");switch(n[0]){case"p":if(5!==n.length||!n.every(((e,n)=>0===n||"number"==typeof e||!isNaN(parseInt(e,10)))))throw new Error(`Invalid ProfileCallKey: ${e}`);return{type:n[0],processID:parseInt(n[1],10),threadID:parseInt(n[2],10),sampleIndex:parseInt(n[3],10),protocol:parseInt(n[4],10)};case"r":if(2!==n.length||"number"!=typeof n[1]&&isNaN(parseInt(n[1],10)))throw new Error(`Invalid RawEvent Key: ${e}`);return{type:n[0],rawIndex:parseInt(n[1],10)};case"s":if(2!==n.length||"number"!=typeof n[1]&&isNaN(parseInt(n[1],10)))throw new Error(`Invalid SyntheticEvent Key: ${e}`);return{type:n[0],rawIndex:parseInt(n[1],10)};default:throw new Error(`Unknown trace event key: ${e}`)}}});var c=Object.freeze({__proto__:null,MicroSeconds:function(e){return e},MilliSeconds:function(e){return e},Seconds:function(e){return e}});function o(e){return"b"===e||"e"===e||"n"===e}const u=[I,h,k,S,y,E];const s=[...u,R];function m(e){return"ScheduleStyleInvalidationTracking"===e.name}function l(e){return"StyleRecalcInvalidationTracking"===e.name}function f(e){return"StyleInvalidatorInvalidationTracking"===e.name}function d(e){return"X"===e.ph}function v(e){return"I"===e.ph}function T(e){return v(e)||d(e)}function E(e){return"navigationStart"===e.name}function p(e){return"LayoutShift"===e.name}function g(e){return"LayoutInvalidationTracking"===e.name}function S(e){return"firstContentfulPaint"===e.name}function y(e){return"largestContentfulPaint::Candidate"===e.name}function h(e){return"MarkLoad"===e.name}function k(e){return"firstPaint"===e.name}function I(e){return"MarkDOMContent"===e.name}function R(e){return"InteractiveTime"===e.name}function C(e){return"EventTiming"===e.name}function b(e){return"SyntheticNetworkRequest"===e.name}function P(e){return"SyntheticWebSocketConnectionEvent"===e.name}const L=new Set(["b","n","e","T","S","F","p"]);function F(e){return L.has(e.ph)}function w(e){return"callFrame"in e}function W(e){return"WebSocketCreate"===e.name}function D(e){return"WebSocketSendHandshakeRequest"===e.name||"WebSocketReceiveHandshakeResponse"===e.name||"WebSocketDestroy"===e.name}function M(e){return"WebSocketSend"===e.name||"WebSocketReceive"===e.name}function _(e){return W(e)||D(e)||M(e)}var N=Object.freeze({__proto__:null,isNestableAsyncPhase:o,isAsyncPhase:function(e){return o(e)||"S"===e||"T"===e||"F"===e||"p"===e},isFlowPhase:function(e){return"s"===e||"t"===e||"f"===e},objectIsTraceEventCallFrame:function(e){return"functionName"in e&&"string"==typeof e.functionName&&"scriptId"in e&&("string"==typeof e.scriptId||"number"==typeof e.scriptId)&&"columnNumber"in e&&"number"==typeof e.columnNumber&&"lineNumber"in e&&"number"==typeof e.lineNumber&&"url"in e&&"string"==typeof e.url},isTraceEventRunTask:function(e){return"RunTask"===e.name},isTraceEventAuctionWorkletRunningInProcess:function(e){return"AuctionWorkletRunningInProcess"===e.name},isTraceEventAuctionWorkletDoneWithProcess:function(e){return"AuctionWorkletDoneWithProcess"===e.name},isTraceEventScreenshot:function(e){return"Screenshot"===e.name},MarkerName:["MarkDOMContent","MarkLoad","firstPaint","firstContentfulPaint","largestContentfulPaint::Candidate"],isTraceEventMarkerEvent:function(e){return u.some((n=>n(e)))},eventIsPageLoadEvent:function(e){return s.some((n=>n(e)))},isTraceEventTracingSessionIdForWorker:function(e){return"TracingSessionIdForWorker"===e.name},isTraceEventScheduleStyleInvalidationTracking:m,isTraceEventStyleRecalcInvalidationTracking:l,isTraceEventStyleInvalidatorInvalidationTracking:f,isTraceEventBeginCommitCompositorFrame:function(e){return"BeginCommitCompositorFrame"===e.name},isTraceEventScheduleStyleRecalculation:function(e){return"ScheduleStyleRecalculation"===e.name},isTraceEventRenderFrameImplCreateChildFrame:function(e){return"RenderFrameImpl::createChildFrame"===e.name},isTraceEventTargetRundown:function(e){if("disabled-by-default-devtools.target-rundown"!==e.cat)return!1;const n=e.args?.data;return!!n&&("frame"in n&&"frameType"in n&&"url"in n&&"isolate"in n&&"v8context"in n&&"scriptId"in n)},isTraceEventScriptRundown:function(e){if("disabled-by-default-devtools.v8-source-rundown"!==e.cat)return!1;const n=e.args?.data;rLine truncated
@@ -1 +1 @@
import*as e from"../../core/i18n/i18n.js";import*as t from"../../ui/legacy/legacy.js";import*as i from"../../core/sdk/sdk.js";import*as n from"../../third_party/react-devtools/react-devtools.js";import*as o from"../../core/common/common.js";import*as s from"../../models/workspace/workspace.js";import*as r from"../../models/bindings/bindings.js";import*as a from"../../models/logs/logs.js";import*as l from"../../core/host/host.js";import*as d from"../../models/react_native/react_native.js";class c extends i.SDKModel.SDKModel{static FUSEBOX_BINDING_NAMESPACE="react-devtools";#e;#t;#i=new Set;#n=!1;#o=!1;#s=null;#r=null;constructor(e){super(e),this.#e={listen:e=>(this.#i.add(e),()=>{this.#i.delete(e)}),send:(e,t)=>{this.#a({event:e,payload:t})}};const t=e.model(d.ReactDevToolsBindingsModel.ReactDevToolsBindingsModel);if(null===t)throw new Error("Failed to construct ReactDevToolsModel: ReactDevToolsBindingsModel was null");this.#t=t,t.addEventListener("BackendExecutionContextCreated",this.#l,this),t.addEventListener("BackendExecutionContextUnavailable",this.#d,this),t.addEventListener("BackendExecutionContextDestroyed",this.#c,this),window.addEventListener("beforeunload",this.#h)}dispose(){this.#s?.removeListener("reloadAppForProfiling",this.#u),this.#s?.shutdown(),this.#t.removeEventListener("BackendExecutionContextCreated",this.#l,this),this.#t.removeEventListener("BackendExecutionContextUnavailable",this.#d,this),this.#t.removeEventListener("BackendExecutionContextDestroyed",this.#c,this),window.removeEventListener("beforeunload",this.#h),this.#s=null,this.#r=null,this.#i.clear()}ensureInitialized(){this.#n||(this.#n=!0,this.#m())}async#m(){try{const e=this.#t;await e.enable(),e.subscribeToDomainMessages(c.FUSEBOX_BINDING_NAMESPACE,(e=>this.#g(e))),await e.initializeDomain(c.FUSEBOX_BINDING_NAMESPACE),this.#o=!0,this.#p()}catch(e){this.dispatchEventToListeners("InitializationFailed",e.message)}}isInitialized(){return this.#o}getBridgeOrThrow(){if(null===this.#s)throw new Error("Failed to get bridge from ReactDevToolsModel: bridge was null");return this.#s}getStoreOrThrow(){if(null===this.#r)throw new Error("Failed to get store from ReactDevToolsModel: store was null");return this.#r}#g(e){if(e)for(const t of this.#i)t(e)}async#a(e){const t=this.#t;if(!t)throw new Error("Failed to send message from ReactDevToolsModel: ReactDevToolsBindingsModel was null");return t.sendMessage(c.FUSEBOX_BINDING_NAMESPACE,e)}#h=()=>{this.#s?.shutdown()};#l(){const e=this.#t;if(!e)throw new Error("ReactDevToolsModel failed to handle BackendExecutionContextCreated event: ReactDevToolsBindingsModel was null");e.isEnabled()?this.#p():this.ensureInitialized()}#p(){this.#s=n.createBridge(this.#e),this.#r=n.createStore(this.#s,{supportsReloadAndProfile:!0}),this.#s.addListener("reloadAppForProfiling",this.#u),this.dispatchEventToListeners("InitializationCompleted")}#u(){i.ResourceTreeModel.ResourceTreeModel.reloadAllPages(!1)}#d({data:e}){this.dispatchEventToListeners("InitializationFailed",e)}#c(){this.#s?.shutdown(),this.#s=null,this.#r=null,this.#i.clear(),this.dispatchEventToListeners("Destroyed")}}i.SDKModel.SDKModel.register(c,{capabilities:4,autostart:!1});var h=Object.freeze({__proto__:null,ReactDevToolsModel:c});const u={sendFeedback:"[FB-only] Send feedback"},m=e.i18n.registerUIStrings("panels/react_devtools/ReactDevToolsViewBase.ts",u),g=e.i18n.getLocalizedString.bind(void 0,m);function p(e,t){const{sourceURL:i,line:n,column:l}=t||e;!async function(e,t,i){const n=s.Workspace.WorkspaceImpl.instance().uiSourceCodeForURL(e);if(n){const e=await r.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().normalizeUILocation(n.uiLocation(t,i));return void o.Revealer.reveal(e)}const l=r.ResourceUtils.resourceForURL(e);if(l)return void o.Revealer.reveal(l);const d=a.NetworkLog.NetworkLog.instance().requestForURL(e);if(!d)throw new Error("Could not find resource for "+e);o.Revealer.reveal(d)}(i,n-1,l-1)}class v extends t.View.SimpleView{#v;#w=null;constructor(e,t){super(t),this.#v=e,this.#E(),i.TargetManager.TargetManager.instance().observeModels(c,this),this.element.style.userSelect="text"}wasShown(){super.wasShown(),this.registerCSSFiles([n.CSS])}modelAdded(e){this.#w=e,e.addEventListener("InitializationCompleted",this.#f,this),e.addEventListener("InitializationFailed",this.#b,this),e.addEventListener("Destroyed",this.#C,this),e.isInitialized()?this.#D():e.ensureInitialized()}modelRemoved(e){e.removeEventListener("InitializationCompleted",this.#f,this),e.removeEventListener("InitializationFailed",this.#b,this),e.removeEventListener("Destroyed",this.#C,this)}#f(){this.#D()}#b({data:e}){this.#x(e)}#C(){this.#E()}#D(){this.#B();const e=this.#w;if(null===e)throw new Error("Attempted to render React DevTools panel, but the model was null");const t=window.matchMedia("(prefers-color-scheme: dark)").matches;("components"===this.#v?n.initializeComponents:n.initializeProfiler)(this.contentElement,{bridge:e.getBridgeOrThrow(),store:e.getSLine truncated
import*as e from"../../core/i18n/i18n.js";import*as t from"../../ui/legacy/legacy.js";import*as i from"../../core/sdk/sdk.js";import*as n from"../../third_party/react-devtools/react-devtools.js";import*as o from"../../core/common/common.js";import*as s from"../../models/workspace/workspace.js";import*as r from"../../models/bindings/bindings.js";import*as a from"../../models/logs/logs.js";import*as l from"../../core/host/host.js";import*as d from"../../models/react_native/react_native.js";class c extends i.SDKModel.SDKModel{static FUSEBOX_BINDING_NAMESPACE="react-devtools";#e;#t;#i=new Set;#n=!1;#o=!1;#s=null;#r=null;constructor(e){super(e),this.#e={listen:e=>(this.#i.add(e),()=>{this.#i.delete(e)}),send:(e,t)=>{this.#a({event:e,payload:t})}};const t=e.model(d.ReactDevToolsBindingsModel.ReactDevToolsBindingsModel);if(null===t)throw new Error("Failed to construct ReactDevToolsModel: ReactDevToolsBindingsModel was null");this.#t=t,t.addEventListener("BackendExecutionContextCreated",this.#l,this),t.addEventListener("BackendExecutionContextUnavailable",this.#d,this),t.addEventListener("BackendExecutionContextDestroyed",this.#c,this),window.addEventListener("beforeunload",this.#h)}dispose(){this.#s?.removeListener("reloadAppForProfiling",this.#m),this.#s?.shutdown(),this.#t.removeEventListener("BackendExecutionContextCreated",this.#l,this),this.#t.removeEventListener("BackendExecutionContextUnavailable",this.#d,this),this.#t.removeEventListener("BackendExecutionContextDestroyed",this.#c,this),window.removeEventListener("beforeunload",this.#h),this.#s=null,this.#r=null,this.#i.clear()}ensureInitialized(){this.#n||(this.#n=!0,this.#u())}async#u(){try{const e=this.#t;await e.enable(),e.subscribeToDomainMessages(c.FUSEBOX_BINDING_NAMESPACE,(e=>this.#g(e))),await e.initializeDomain(c.FUSEBOX_BINDING_NAMESPACE),this.#o=!0,this.#p()}catch(e){this.dispatchEventToListeners("InitializationFailed",e.message)}}isInitialized(){return this.#o}getBridgeOrThrow(){if(null===this.#s)throw new Error("Failed to get bridge from ReactDevToolsModel: bridge was null");return this.#s}getStoreOrThrow(){if(null===this.#r)throw new Error("Failed to get store from ReactDevToolsModel: store was null");return this.#r}#g(e){if(e)for(const t of this.#i)t(e)}async#a(e){const t=this.#t;if(!t)throw new Error("Failed to send message from ReactDevToolsModel: ReactDevToolsBindingsModel was null");return t.sendMessage(c.FUSEBOX_BINDING_NAMESPACE,e)}#h=()=>{this.#s?.shutdown()};#l(){const e=this.#t;if(!e)throw new Error("ReactDevToolsModel failed to handle BackendExecutionContextCreated event: ReactDevToolsBindingsModel was null");e.isEnabled()?this.#p():this.ensureInitialized()}#p(){this.#s=n.createBridge(this.#e),this.#r=n.createStore(this.#s,{supportsReloadAndProfile:!0}),this.#s.addListener("reloadAppForProfiling",this.#m),this.dispatchEventToListeners("InitializationCompleted")}#m(){const e=i.TargetManager.TargetManager.instance().primaryPageTarget();e?.pageAgent().invoke_reload({ignoreCache:!0})}#d({data:e}){this.dispatchEventToListeners("InitializationFailed",e)}#c(){this.#s?.shutdown(),this.#s=null,this.#r=null,this.#i.clear(),this.dispatchEventToListeners("Destroyed")}}i.SDKModel.SDKModel.register(c,{capabilities:4,autostart:!1});var h=Object.freeze({__proto__:null,ReactDevToolsModel:c});const m={sendFeedback:"[FB-only] Send feedback"},u=e.i18n.registerUIStrings("panels/react_devtools/ReactDevToolsViewBase.ts",m),g=e.i18n.getLocalizedString.bind(void 0,u);function p(e,t){const{sourceURL:i,line:n,column:l}=t||e;!async function(e,t,i){const n=s.Workspace.WorkspaceImpl.instance().uiSourceCodeForURL(e);if(n){const e=await r.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().normalizeUILocation(n.uiLocation(t,i));return void o.Revealer.reveal(e)}const l=r.ResourceUtils.resourceForURL(e);if(l)return void o.Revealer.reveal(l);const d=a.NetworkLog.NetworkLog.instance().requestForURL(e);if(!d)throw new Error("Could not find resource for "+e);o.Revealer.reveal(d)}(i,n-1,l-1)}class v extends t.View.SimpleView{#v;#w=null;constructor(e,t){super(t),this.#v=e,this.#E(),i.TargetManager.TargetManager.instance().observeModels(c,this),this.element.style.userSelect="text"}wasShown(){super.wasShown(),this.registerCSSFiles([n.CSS])}modelAdded(e){this.#w=e,e.addEventListener("InitializationCompleted",this.#f,this),e.addEventListener("InitializationFailed",this.#b,this),e.addEventListener("Destroyed",this.#C,this),e.isInitialized()?this.#D():e.ensureInitialized()}modelRemoved(e){e.removeEventListener("InitializationCompleted",this.#f,this),e.removeEventListener("InitializationFailed",this.#b,this),e.removeEventListener("Destroyed",this.#C,this)}#f(){this.#D()}#b({data:e}){this.#x(e)}#C(){this.#E()}#D(){this.#B();const e=this.#w;if(null===e)throw new Error("Attempted to render React DevTools panel, but the model was null");const t=window.matchMedia("(prefers-color-scheme: dark)").matches;("components"===this.#v?n.initializeComponents:n.initializeProfiler)(thLine truncated