@buoy-gg/highlight-updates 7.0.63 → 7.0.65
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 +9 -0
- package/lib/commonjs/highlight-updates/components/HighlightUpdatesModal.js +1 -1
- package/lib/commonjs/highlight-updates/utils/CommitProfiler.js +1 -1
- package/lib/commonjs/highlight-updates/utils/HighlightUpdatesController.js +1 -1
- package/lib/commonjs/highlight-updates/utils/PerformanceLogger.js +2 -2
- package/lib/commonjs/highlight-updates/utils/ProfilerInterceptor.js +1 -1
- package/lib/commonjs/highlight-updates/utils/RenderCauseDetector.js +4 -4
- package/lib/commonjs/highlight-updates/utils/RenderTracker.js +1 -1
- package/lib/commonjs/highlight-updates/utils/namedComposite.js +1 -1
- package/lib/module/highlight-updates/components/HighlightUpdatesModal.js +1 -1
- package/lib/module/highlight-updates/utils/CommitProfiler.js +1 -1
- package/lib/module/highlight-updates/utils/HighlightUpdatesController.js +1 -1
- package/lib/module/highlight-updates/utils/PerformanceLogger.js +2 -2
- package/lib/module/highlight-updates/utils/ProfilerInterceptor.js +1 -1
- package/lib/module/highlight-updates/utils/RenderCauseDetector.js +4 -4
- package/lib/module/highlight-updates/utils/RenderTracker.js +1 -1
- package/lib/module/highlight-updates/utils/namedComposite.js +1 -1
- package/lib/typescript/highlight-updates/utils/HighlightUpdatesController.d.ts +12 -0
- package/lib/typescript/highlight-updates/utils/RenderTracker.d.ts +3 -0
- package/lib/typescript/highlight-updates/utils/namedComposite.d.ts +1 -0
- package/lib/web/index.mjs +28 -28
- package/package.json +6 -6
package/lib/web/index.mjs
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
"use client";var
|
|
1
|
+
"use client";var bn=Object.defineProperty;var zu=Object.getOwnPropertyDescriptor;var Lu=Object.getOwnPropertyNames;var Bu=Object.prototype.hasOwnProperty;var l=(e,t)=>bn(e,"name",{value:t,configurable:true});var Kt=(e,t)=>()=>(e&&(t=e(e=0)),t);var sa=(e,t)=>{for(var n in t)bn(e,n,{get:t[n],enumerable:true})},zr=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Lu(t))!Bu.call(e,o)&&o!==n&&bn(e,o,{get:()=>t[o],enumerable:!(r=zu(t,o))||r.enumerable});return e},Vu=(e,t,n)=>(zr(e,t,"default"),n&&zr(n,t,"default"));var Hu=e=>zr(bn({},"__esModule",{value:true}),e);var ee,U=Kt(()=>{"use strict";ee=(()=>{try{let e=globalThis.Capacitor;if(e&&typeof e.isNativePlatform=="function"&&e.isNativePlatform())return e.DEBUG===true}catch{}return process.env.NODE_ENV!=="production"})();typeof window<"u"&&typeof globalThis.global>"u"&&(globalThis.global=globalThis)});function vn(e){return Xe[e]||e}function ca(e){for(let[t,n]of Object.entries(Xe))if(n===e)return t;return null}function ua(e){return e in Xe}function da(){return Object.keys(Xe)}function ga(){return[...new Set(Object.values(Xe))]}var Xe,ha=Kt(()=>{"use strict";U();Xe={RCTView:"View",RCTSafeAreaView:"SafeAreaView",RCTModalHostView:"Modal",RCTText:"Text",RCTRawText:"RawText",RCTVirtualText:"VirtualText",RCTTextInlineImage:"TextInlineImage",RCTImageView:"Image",RCTImage:"Image",RCTScrollView:"ScrollView",RCTScrollContentView:"ScrollContentView",AndroidHorizontalScrollView:"HorizontalScrollView",AndroidHorizontalScrollContentView:"HorizontalScrollContentView",RCTSinglelineTextInputView:"TextInput",RCTMultilineTextInputView:"TextInput (Multiline)",AndroidTextInput:"TextInput",RCTInputAccessoryView:"InputAccessoryView",RCTRefreshControl:"RefreshControl",AndroidSwipeRefreshLayout:"RefreshControl",PullToRefreshView:"RefreshControl",RCTSwitch:"Switch",AndroidSwitch:"Switch",RCTSlider:"Slider",RCTActivityIndicatorView:"ActivityIndicator",AndroidProgressBar:"ActivityIndicator",AndroidDrawerLayout:"DrawerLayout",VirtualView:"VirtualView",VirtualViewExperimental:"VirtualView",DebuggingOverlay:"DebuggingOverlay",LayoutConformance:"LayoutConformance",UnimplementedNativeView:"UnimplementedView",RKShimmeringView:"ShimmeringView",RCTTemplateView:"TemplateView",RCTAxialGradientView:"AxialGradientView",RCTMap:"Map",RCTWebView:"WebView",RCTKeyframes:"Keyframes",RCTImpressionTrackingView:"ImpressionTrackingView",RNSVGSvgView:"Svg",RNSVGGroup:"G",RNSVGPath:"Path",RNSVGText:"SvgText",RNSVGTSpan:"TSpan",RNSVGTextPath:"TextPath",RNSVGImage:"SvgImage",RNSVGCircle:"Circle",RNSVGEllipse:"Ellipse",RNSVGLine:"Line",RNSVGRect:"Rect",RNSVGClipPath:"ClipPath",RNSVGDefs:"Defs",RNSVGUse:"Use",RNSVGSymbol:"Symbol",RNSVGPattern:"Pattern",RNSVGMask:"Mask",RNSVGForeignObject:"ForeignObject",RNSVGMarker:"Marker",RNSVGLinearGradient:"LinearGradient",RNSVGRadialGradient:"RadialGradient",RNSVGFilter:"Filter",RNSVGFeBlend:"FeBlend",RNSVGFeColorMatrix:"FeColorMatrix",RNSVGFeComposite:"FeComposite",RNSVGFeFlood:"FeFlood",RNSVGFeGaussianBlur:"FeGaussianBlur",RNSVGFeMerge:"FeMerge",RNSVGFeOffset:"FeOffset",RNSVGPolygon:"Polygon",RNSVGPolyline:"Polyline",RNSVGStop:"Stop",RNGestureHandlerRootView:"GestureHandlerRootView",RNGestureHandlerButton:"GestureHandlerButton",RNCSafeAreaProvider:"SafeAreaProvider",RNCSafeAreaView:"SafeAreaView",RNSScreen:"Screen",RNSScreenContainer:"ScreenContainer",RNSScreenStack:"ScreenStack",RNSScreenStackHeaderConfig:"ScreenStackHeaderConfig",RNSScreenStackHeaderSubview:"ScreenStackHeaderSubview",RNSSearchBar:"SearchBar",RNSFullWindowOverlay:"FullWindowOverlay",RNSModalScreen:"ModalScreen",ReanimatedView:"Animated.View",ExpoView:"ExpoView",ExpoBlurView:"BlurView",ExpoLinearGradient:"LinearGradient",ExpoImage:"ExpoImage",ExpoVideoView:"VideoView",ExpoCamera:"Camera",ExpoBarCodeScannerView:"BarCodeScanner",RNCWebView:"WebView",AIRMap:"MapView",AIRMapMarker:"Marker",AIRMapPolyline:"Polyline",AIRMapPolygon:"Polygon",AIRMapCircle:"Circle",AIRMapCallout:"Callout",RCTVideo:"Video",LottieAnimationView:"LottieView",FastImageView:"FastImage"};l(vn,"getComponentDisplayName");l(ca,"getNativeViewType");l(ua,"isKnownViewType");l(da,"getAllNativeViewTypes");l(ga,"getAllComponentNames")});function pa(){return qt=performance.now(),qt}function ma(e,t){qt>0&&e>0&&(qt=0)}var qt,Lr,fa,Qe,Cn=Kt(()=>{"use strict";U();qt=0;l(pa,"markEventReceived");l(ma,"markOverlayRendered");Lr=class tp{constructor(){this.enabled=false;this.batchCounter=0;this.listeners=new Set;this.rollingStats={batchCount:0,totalNodes:0,totalFiltered:0,totalProcessed:0,totalTime:0,maxTime:0,minTime:1/0,avgMeasurementTime:0};this.recentBatches=[];this.MAX_HISTORY=100;this.summaryInterval=null;this.SUMMARY_INTERVAL_MS=1e4}setEnabled(t){let n=this.enabled;this.enabled=t,t&&!n?this.resetStats():!t&&n&&this.stopSummaryInterval()}isEnabled(){return this.enabled}startBatch(t,n){let r=`batch_${++this.batchCounter}`,o=performance.now(),i=null,s=null,a=null,u=null,c=null,d=0,g=0,T=0,b=0,v;return{markFilteringComplete:l((f,S)=>{i=performance.now(),d=f,g=S},"markFilteringComplete"),markMeasurementStart:l(()=>{s=performance.now()},"markMeasurementStart"),markMeasurementComplete:l((f,S)=>{a=performance.now(),T=f,b=S},"markMeasurementComplete"),markTrackingComplete:l(()=>{u=performance.now()},"markTrackingComplete"),markCallbackComplete:l(()=>{c=performance.now()},"markCallbackComplete"),setOverlayRenderTime:l(f=>{v=f},"setOverlayRenderTime"),getBatchId:l(()=>r,"getBatchId"),finish:l(()=>{let f=performance.now(),S={batchId:r,timestamp:Date.now(),nodesReceived:t,nodesFiltered:d,nodesToProcess:g,batchSize:n,nodesInBatch:Math.min(g,n),filteringTime:i?i-o:0,measurementTime:s&&a?a-s:0,trackingTime:a&&u?u-a:0,callbackTime:u&&c?c-u:0,totalTime:f-o,measurementSuccessCount:T,measurementFailCount:b,overlayRenderTime:v};return this.enabled&&this.recordMetrics(S),S},"finish")}}recordMetrics(t){this.rollingStats.batchCount++,this.rollingStats.totalNodes+=t.nodesReceived,this.rollingStats.totalFiltered+=t.nodesFiltered,this.rollingStats.totalProcessed+=t.nodesInBatch,this.rollingStats.totalTime+=t.totalTime,this.rollingStats.maxTime=Math.max(this.rollingStats.maxTime,t.totalTime),this.rollingStats.minTime=Math.min(this.rollingStats.minTime,t.totalTime);let n=this.rollingStats.avgMeasurementTime,r=this.rollingStats.batchCount;this.rollingStats.avgMeasurementTime=n+(t.measurementTime-n)/r,this.recentBatches.push(t),this.recentBatches.length>this.MAX_HISTORY&&this.recentBatches.shift(),this.notifyListeners(t)}logBatch(t){let{batchId:n,nodesReceived:r,nodesFiltered:o,nodesInBatch:i,batchSize:s,filteringTime:a,measurementTime:u,trackingTime:c,callbackTime:d,totalTime:g,measurementSuccessCount:T,measurementFailCount:b,overlayRenderTime:v}=t;console.log("[Buoy]",`[HighlightPerf] ${n} | In:${r} Filt:${o} Proc:${i}/${s} | Filter:${a.toFixed(1)}ms Measure:${u.toFixed(1)}ms Track:${c.toFixed(1)}ms Callback:${d.toFixed(1)}ms | Total:${g.toFixed(1)}ms`+(v?` Render:${v.toFixed(1)}ms`:"")+` | Success:${T} Fail:${b}`),g>100&&console.warn("[Buoy]",`[HighlightPerf] \u26A0\uFE0F SLOW BATCH: ${g.toFixed(1)}ms - Measurement phase: ${u.toFixed(1)}ms (${(u/g*100).toFixed(0)}%)`)}logSummary(){if(this.rollingStats.batchCount===0)return;let t=this.rollingStats,n=t.totalTime/t.batchCount,r=t.totalNodes/t.batchCount;console.log("[Buoy]",`
|
|
2
2
|
[HighlightPerf] \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 SUMMARY (last ${this.SUMMARY_INTERVAL_MS/1e3}s) \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550
|
|
3
|
-
Batches: ${
|
|
4
|
-
Avg nodes/batch: ${
|
|
5
|
-
Avg total time: ${
|
|
6
|
-
Avg measurement time: ${
|
|
7
|
-
Min/Max time: ${
|
|
3
|
+
Batches: ${t.batchCount}
|
|
4
|
+
Avg nodes/batch: ${r.toFixed(1)} (filtered: ${(t.totalFiltered/t.batchCount).toFixed(1)})
|
|
5
|
+
Avg total time: ${n.toFixed(1)}ms
|
|
6
|
+
Avg measurement time: ${t.avgMeasurementTime.toFixed(1)}ms
|
|
7
|
+
Min/Max time: ${t.minTime.toFixed(1)}ms / ${t.maxTime.toFixed(1)}ms
|
|
8
8
|
\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550
|
|
9
|
-
`),this.resetStats()}resetStats(){this.rollingStats={batchCount:0,totalNodes:0,totalFiltered:0,totalProcessed:0,totalTime:0,maxTime:0,minTime:1/0,avgMeasurementTime:0}}startSummaryInterval(){this.stopSummaryInterval(),this.summaryInterval=setInterval(()=>{this.logSummary()},this.SUMMARY_INTERVAL_MS)}stopSummaryInterval(){this.summaryInterval&&(clearInterval(this.summaryInterval),this.summaryInterval=null)}subscribe(
|
|
9
|
+
`),this.resetStats()}resetStats(){this.rollingStats={batchCount:0,totalNodes:0,totalFiltered:0,totalProcessed:0,totalTime:0,maxTime:0,minTime:1/0,avgMeasurementTime:0}}startSummaryInterval(){this.stopSummaryInterval(),this.summaryInterval=setInterval(()=>{this.logSummary()},this.SUMMARY_INTERVAL_MS)}stopSummaryInterval(){this.summaryInterval&&(clearInterval(this.summaryInterval),this.summaryInterval=null)}subscribe(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}notifyListeners(t){for(let n of this.listeners)try{n(t)}catch(r){console.error("[Buoy]","[HighlightPerf] Error in metrics listener:",r)}}getRecentBatches(){return[...this.recentBatches]}getRollingStats(){return{...this.rollingStats}}clear(){this.recentBatches=[],this.resetStats(),this.batchCounter=0}generateReport(){let t=this.recentBatches;if(t.length===0)return"No performance data collected yet.";let n=t.reduce((s,a)=>s+a.totalTime,0)/t.length,r=t.reduce((s,a)=>s+a.measurementTime,0)/t.length,o=t.filter(s=>s.totalTime>100),i=t.filter(s=>s.totalTime<20);return`
|
|
10
10
|
\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
|
|
11
11
|
\u2551 HIGHLIGHT UPDATES PERFORMANCE REPORT \u2551
|
|
12
12
|
\u2560\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2563
|
|
13
|
-
\u2551 Total batches analyzed: ${
|
|
14
|
-
\u2551 Average total time: ${
|
|
15
|
-
\u2551 Average measure time: ${
|
|
13
|
+
\u2551 Total batches analyzed: ${t.length.toString().padStart(5)} \u2551
|
|
14
|
+
\u2551 Average total time: ${n.toFixed(1).padStart(5)}ms \u2551
|
|
15
|
+
\u2551 Average measure time: ${r.toFixed(1).padStart(5)}ms (${(r/n*100).toFixed(0)}% of total) \u2551
|
|
16
16
|
\u2560\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2563
|
|
17
|
-
\u2551 Fast batches (<20ms): ${
|
|
18
|
-
\u2551 Slow batches (>100ms): ${
|
|
17
|
+
\u2551 Fast batches (<20ms): ${i.length.toString().padStart(5)} (${(i.length/t.length*100).toFixed(0)}%) \u2551
|
|
18
|
+
\u2551 Slow batches (>100ms): ${o.length.toString().padStart(5)} (${(o.length/t.length*100).toFixed(0)}%) \u2551
|
|
19
19
|
\u2560\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2563
|
|
20
20
|
\u2551 Time breakdown (avg): \u2551
|
|
21
|
-
\u2551 Filtering: ${
|
|
22
|
-
\u2551 Measurement: ${
|
|
23
|
-
\u2551 Tracking: ${(
|
|
24
|
-
\u2551 Callback: ${(
|
|
21
|
+
\u2551 Filtering: ${t.reduce((s,a)=>s+a.filteringTime,0/t.length).toFixed(1).padStart(6)}ms \u2551
|
|
22
|
+
\u2551 Measurement: ${r.toFixed(1).padStart(6)}ms \u2190 Primary bottleneck \u2551
|
|
23
|
+
\u2551 Tracking: ${(t.reduce((s,a)=>s+a.trackingTime,0)/t.length).toFixed(1).padStart(6)}ms \u2551
|
|
24
|
+
\u2551 Callback: ${(t.reduce((s,a)=>s+a.callbackTime,0)/t.length).toFixed(1).padStart(6)}ms \u2551
|
|
25
25
|
\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
|
|
26
|
-
`}},Ke=new Bo});function Bl(e){if(e.testID&&e.testID.trim())return true;let t=(e.componentName??"").trim();if(!t||Jn.has(t)||Ho.has(t))return false;let n=(e.viewType??"").trim();return!(n&&Jn.has(n)&&t===n||/^comp(\s|$)/i.test(t)||t.startsWith("_"))}var Jn,Ho,Hl=Mt(()=>{"use strict";j();Jn=new Set(["View","RCTView","Text","RCTText","RawText","RCTRawText","VirtualText","RCTVirtualText","ScrollView","RCTScrollView","RCTScrollContentView","SafeAreaView","RCTSafeAreaView","Pressable","TouchableOpacity","Image","RCTImageView"]),Ho=new Set(["Unknown","Anonymous","CellRenderer","NativeComponent"])});var Mo={};Vo(Mo,{RenderTracker:()=>V,default:()=>Eo});var Yn,$o,Fo,V,Eo,Ne=Mt(()=>{"use strict";j();Ao();ln();Hl();Yn=200,$o=150,Fo=class{constructor(){this.renders=new Map;this.listeners=new Set;this.stateListeners=new Set;this.settingsListeners=new Set;this.filterListeners=new Set;this.renderEventCallbacks=new Set;this.isTracking=false;this.isPaused=false;this.settings={batchSize:$o,showRenderCount:true,performanceLogging:false,trackRenderCauses:false,enableRenderHistory:false,maxRenderHistoryPerComponent:20,capturePropsOnRender:false,captureStateOnRender:false,debugLogLevel:"off",excludeDevTools:true,showHostViews:false};this.isBatchMode=false;this.batchDirty=false;this.filters={includeTestID:new Set,includeNativeID:new Set,includeViewType:new Set,includeComponent:new Set,excludeTestID:new Set,excludeNativeID:new Set,excludeViewType:new Set,excludeComponent:new Set,includePatterns:[],excludePatterns:[]}}trackRender(e){if(this.isPaused)return;let t=String(e.nativeTag),n=Date.now(),r=this.renders.get(t);if(r){if(r.renderCount=e.count,r.lastRenderTime=n,r.color=e.color,e.measurements&&(r.measurements=e.measurements),e.testID&&!r.testID&&(r.testID=e.testID),e.nativeID&&!r.nativeID&&(r.nativeID=e.nativeID),e.accessibilityLabel&&!r.accessibilityLabel&&(r.accessibilityLabel=e.accessibilityLabel),e.componentName&&!r.componentName&&(r.componentName=e.componentName),e.renderCause&&(r.lastRenderCause=e.renderCause),this.settings.enableRenderHistory){let o=e.renderCause||{type:"unknown",timestamp:n};this.addRenderEvent(r,o,e.capturedProps,e.capturedState)}}else{let o={id:t,nativeTag:e.nativeTag,viewType:e.viewType,displayName:qn(e.viewType),testID:e.testID,nativeID:e.nativeID,accessibilityLabel:e.accessibilityLabel,componentName:e.componentName,renderCount:e.count,firstRenderTime:n,lastRenderTime:n,measurements:e.measurements,color:e.color,lastRenderCause:e.renderCause};if(this.settings.enableRenderHistory){o.renderHistory=[];let i=e.renderCause||{type:e.count===1?"mount":"unknown",timestamp:n};this.addRenderEvent(o,i,e.capturedProps,e.capturedState)}if(this.renders.set(t,o),this.renders.size>Yn){let i=Array.from(this.renders.values()).sort((l,a)=>l.lastRenderTime-a.lastRenderTime).slice(0,this.renders.size-Yn);for(let l of i)this.renders.delete(l.id)}}this.isBatchMode?this.batchDirty=true:this.notifyListeners()}addRenderEvent(e,t,n,r){e.renderHistory||(e.renderHistory=[]);let o={id:`${e.nativeTag}-${t.timestamp}`,timestamp:t.timestamp,cause:t,renderNumber:e.renderCount,capturedProps:this.settings.capturePropsOnRender?n:void 0,capturedState:this.settings.captureStateOnRender?r:void 0};e.renderHistory.push(o);let i=Math.max(5,Math.min(50,this.settings.maxRenderHistoryPerComponent));e.renderHistory.length>i&&(e.renderHistory=e.renderHistory.slice(-i)),this.notifyRenderEventCallbacks(o,e)}notifyRenderEventCallbacks(e,t){this.renderEventCallbacks.forEach(n=>{try{n(e,t)}catch{}})}emitRenderEvent(e){if(this.renderEventCallbacks.size===0)return;let t=Date.now(),n=e.renderCause||{type:"unknown",timestamp:t},r={id:String(e.nativeTag),nativeTag:e.nativeTag,viewType:e.viewType,displayName:qn(e.viewType),testID:e.testID,nativeID:e.nativeID,accessibilityLabel:e.accessibilityLabel,componentName:e.componentName,renderCount:e.count,firstRenderTime:t,lastRenderTime:t,measurements:e.measurements,color:e.color,lastRenderCause:n,renderHistory:[]},o={id:`${e.nativeTag}-${t}-${e.count}`,timestamp:t,renderNumber:e.count,cause:n,capturedProps:void 0,capturedState:void 0};this.notifyRenderEventCallbacks(o,r)}startBatch(){this.isBatchMode=true,this.batchDirty=false}endBatch(){this.isBatchMode=false,this.batchDirty&&(this.batchDirty=false,this.notifyListeners())}getRenders(){return Array.from(this.renders.values()).map(e=>({...e}))}passesFilters(e){if(this.filters.includePatterns.length>0&&!this.matchesAnyPatternForInfo(e,this.filters.includePatterns)||this.filters.excludePatterns.length>0&&this.matchesAnyPatternForInfo(e,this.filters.excludePatterns))return false;if(this.filters.includeViewType.size>0){let t=e.viewType||"",n=e.displayName||"";if(!this.matchesPattern(t,this.filters.includeViewType)&&!this.matchesPattern(n,this.filters.includeViewType))return false}if(this.filters.includeTestID.size>0&&(!e.testID||!this.matchesPattern(e.testID,this.filters.includeTestID))||this.filters.includeNativeID.size>0&&(!e.nativeID||!this.matchesPattern(e.nativeID,this.filters.includeNativeID))||this.filters.includeComponent.size>0&&(!e.componentName||!this.matchesPattern(e.componentName,this.filters.includeComponent)))return false;if(this.filters.excludeViewType.size>0){let t=e.viewType||"",n=e.displayName||"";if(this.matchesPattern(t,this.filters.excludeViewType)||this.matchesPattern(n,this.filters.excludeViewType))return false}return!(this.filters.excludeTestID.size>0&&e.testID&&this.matchesPattern(e.testID,this.filters.excludeTestID)||this.filters.excludeNativeID.size>0&&e.nativeID&&this.matchesPattern(e.nativeID,this.filters.excludeNativeID)||this.filters.excludeComponent.size>0&&e.componentName&&this.matchesPattern(e.componentName,this.filters.excludeComponent))}matchesAnyPatternForInfo(e,t){for(let n of t){let r=n.value.toLowerCase();switch(n.type){case"any":if(e.viewType.toLowerCase().includes(r)||e.displayName?.toLowerCase().includes(r)||e.testID?.toLowerCase().includes(r)||e.nativeID?.toLowerCase().includes(r)||e.componentName?.toLowerCase().includes(r)||e.accessibilityLabel?.toLowerCase().includes(r))return true;break;case"viewType":if(e.viewType.toLowerCase().includes(r)||e.displayName?.toLowerCase().includes(r))return true;break;case"testID":if(e.testID?.toLowerCase().includes(r))return true;break;case"nativeID":if(e.nativeID?.toLowerCase().includes(r))return true;break;case"component":if(e.componentName?.toLowerCase().includes(r))return true;break;case"accessibilityLabel":if(e.accessibilityLabel?.toLowerCase().includes(r))return true;break}}return false}hasActiveFilters(){return this.filters.includePatterns.length>0||this.filters.excludePatterns.length>0||this.filters.includeViewType.size>0||this.filters.includeTestID.size>0||this.filters.includeNativeID.size>0||this.filters.includeComponent.size>0||this.filters.excludeViewType.size>0||this.filters.excludeTestID.size>0||this.filters.excludeNativeID.size>0||this.filters.excludeComponent.size>0||this.filters.minRenderCount!==void 0||this.filters.maxRenderCount!==void 0}getFilteredRenders(e=""){let t=this.getRenders();if(this.settings.showHostViews||(t=t.filter(Bl)),e.trim()){let n=e.toLowerCase();t=t.filter(r=>r.viewType.toLowerCase().includes(n)||r.displayName.toLowerCase().includes(n)||r.testID?.toLowerCase().includes(n)||r.nativeID?.toLowerCase().includes(n)||r.accessibilityLabel?.toLowerCase().includes(n)||r.componentName?.toLowerCase().includes(n)||String(r.nativeTag).includes(n))}return t=t.filter(n=>this.passesFilters(n)),this.filters.minRenderCount!==void 0&&(t=t.filter(n=>n.renderCount>=this.filters.minRenderCount)),this.filters.maxRenderCount!==void 0&&(t=t.filter(n=>n.renderCount<=this.filters.maxRenderCount)),t.sort((n,r)=>r.lastRenderTime-n.lastRenderTime)}matchesPattern(e,t){let n=e.toLowerCase();for(let r of t){let o=r.toLowerCase();if(n.includes(o))return true}return false}getRender(e){return this.renders.get(e)}clear(){this.renders.clear(),this.notifyListeners()}resetRenderCount(e){let t=this.renders.get(e);t&&(t.renderCount=0,this.notifyListeners())}start(){this.isTracking=true,this.isPaused=false,this.notifyStateListeners()}stop(){this.isTracking=false,this.isPaused=false,this.notifyStateListeners()}pause(){this.isPaused=true,this.notifyStateListeners()}resume(){this.isPaused=false,this.notifyStateListeners()}togglePause(){this.isPaused=!this.isPaused,this.notifyStateListeners()}getState(){return{isTracking:this.isTracking,isPaused:this.isPaused}}replaceRenders(e,t){let n=new Map;for(let[r,o]of this.renders)o.renderHistory&&o.renderHistory.length>0&&n.set(r,o.renderHistory);this.renders=new Map(e.map(r=>{let o=n.get(r.id),i=o&&!(r.renderHistory&&r.renderHistory.length>0)?{...r,renderHistory:o}:r;return[i.id,i]})),t&&(this.isTracking!==t.isTracking||this.isPaused!==t.isPaused)&&(this.isTracking=t.isTracking,this.isPaused=t.isPaused,this.notifyStateListeners()),this.notifyListeners()}hydrateRender(e){let t=this.renders.get(e.id);this.renders.set(e.id,t?{...t,...e}:e),this.notifyListeners()}getFilters(){return this.filters}setFilters(e){this.filters={...this.filters,...e},this.notifyListeners(),this.notifyFilterListeners()}addIncludePattern(e,t){let n=`include${e.charAt(0).toUpperCase()+e.slice(1)}`;this.filters[n].add(t),this.notifyListeners()}removeIncludePattern(e,t){let n=`include${e.charAt(0).toUpperCase()+e.slice(1)}`;this.filters[n].delete(t),this.notifyListeners()}addExcludePattern(e,t){let n=`exclude${e.charAt(0).toUpperCase()+e.slice(1)}`;this.filters[n].add(t),this.notifyListeners()}removeExcludePattern(e,t){let n=`exclude${e.charAt(0).toUpperCase()+e.slice(1)}`;this.filters[n].delete(t),this.notifyListeners()}clearFilters(){this.filters={includeTestID:new Set,includeNativeID:new Set,includeViewType:new Set,includeComponent:new Set,excludeTestID:new Set,excludeNativeID:new Set,excludeViewType:new Set,excludeComponent:new Set,includePatterns:[],excludePatterns:[],minRenderCount:void 0,maxRenderCount:void 0},this.notifyListeners()}getAvailableProps(){let e=new Set,t=new Set,n=new Set,r=new Set,o=new Set;for(let i of this.renders.values())i.viewType&&e.add(i.viewType),i.testID&&t.add(i.testID),i.nativeID&&n.add(i.nativeID),i.componentName&&r.add(i.componentName),i.accessibilityLabel&&o.add(i.accessibilityLabel);return{viewTypes:Array.from(e).sort(),testIDs:Array.from(t).sort(),nativeIDs:Array.from(n).sort(),componentNames:Array.from(r).sort(),accessibilityLabels:Array.from(o).sort()}}getStats(){let e=0;for(let t of this.renders.values())e+=t.renderCount;return{totalComponents:this.renders.size,totalRenders:e}}subscribe(e){return this.listeners.add(e),e(this.getRenders()),()=>{this.listeners.delete(e)}}subscribeToState(e){return this.stateListeners.add(e),e(this.getState()),()=>{this.stateListeners.delete(e)}}subscribeToSettings(e){return this.settingsListeners.add(e),e(this.settings),()=>{this.settingsListeners.delete(e)}}subscribeToFilters(e){return this.filterListeners.add(e),e(this.filters),()=>{this.filterListeners.delete(e)}}onRenderEvent(e){return this.renderEventCallbacks.add(e),()=>{this.renderEventCallbacks.delete(e)}}getRenderEventCallbackCount(){return this.renderEventCallbacks.size}shouldShowRender(e){let t=this.filters;return!(t.includePatterns.length>0&&!this.matchesAnyPatternForInfo(e,t.includePatterns)||t.excludePatterns.length>0&&this.matchesAnyPatternForInfo(e,t.excludePatterns)||(t.includeViewType.size>0||t.includeTestID.size>0||t.includeNativeID.size>0||t.includeComponent.size>0)&&!(t.includeViewType.size>0&&t.includeViewType.has(e.viewType)||t.includeTestID.size>0&&e.testID&&t.includeTestID.has(e.testID)||t.includeNativeID.size>0&&e.nativeID&&t.includeNativeID.has(e.nativeID)||t.includeComponent.size>0&&e.componentName&&t.includeComponent.has(e.componentName))||t.excludeViewType.has(e.viewType)||e.testID&&t.excludeTestID.has(e.testID)||e.nativeID&&t.excludeNativeID.has(e.nativeID)||e.componentName&&t.excludeComponent.has(e.componentName))}getSettings(){return{...this.settings}}setSettings(e){e.batchSize!==void 0&&(e.batchSize=Math.max(10,Math.min(500,e.batchSize))),e.maxRenderHistoryPerComponent!==void 0&&(e.maxRenderHistoryPerComponent=Math.max(5,Math.min(50,e.maxRenderHistoryPerComponent))),e.enableRenderHistory&&!this.settings.trackRenderCauses&&(e.trackRenderCauses=true),e.trackRenderCauses===false&&this.settings.enableRenderHistory&&(e.enableRenderHistory=false),this.settings={...this.settings,...e},e.performanceLogging!==void 0&&Ke.setEnabled(e.performanceLogging),this.notifySettingsListeners()}clearAllRenderHistory(){for(let e of this.renders.values())e.renderHistory=[];this.notifyListeners()}clearRenderHistory(e){let t=this.renders.get(e);t&&(t.renderHistory=[],this.notifyListeners())}getRenderHistoryStats(){let e=0,t=0;for(let n of this.renders.values())n.renderHistory&&n.renderHistory.length>0&&(e+=n.renderHistory.length,t++);return{totalEvents:e,componentsWithHistory:t,averageEventsPerComponent:t>0?e/t:0}}getBatchSize(){return this.settings.batchSize}setBatchSize(e){this.setSettings({batchSize:e})}notifyListeners(){let e=this.getRenders();for(let t of this.listeners)try{t(e)}catch(n){console.error("[RenderTracker] Error in listener:",n)}}notifyStateListeners(){let e=this.getState();for(let t of this.stateListeners)try{t(e)}catch(n){console.error("[RenderTracker] Error in state listener:",n)}}notifySettingsListeners(){let e=this.getSettings();for(let t of this.settingsListeners)try{t(e)}catch(n){console.error("[RenderTracker] Error in settings listener:",n)}}notifyFilterListeners(){let e=this.getFilters();for(let t of this.filterListeners)try{t(e)}catch(n){console.error("[RenderTracker] Error in filter listener:",n)}}},V=new Fo,Eo=V});j();j();import{useState as Xn,useEffect as Qn,useCallback as Ml}from"react";import{HighlighterIcon as Oo,HighlightIcon as _o}from"@buoy-gg/floating-tools-core/web";j();import{getDOMFiber as Zn,getDOMNodeHandle as $l,getDOMPublicInstance as Fl,isDOMElement as Wo}from"@buoy-gg/shared-ui/web/utils";j();var dt=null,ht=null,Ft=false,Et=false,sn=null;function jo(e){if(!e)return{type:"null"};let t=e,n={};if(t.canonical){n.type="Fabric";let r=t.canonical;if(r.publicInstance){let o=r.publicInstance;n.hasMeasure=typeof o.measure=="function",n.nativeTag=o.__nativeTag??o._nativeTag??"unknown"}}else typeof t.measure=="function"?(n.type="Legacy",n.hasMeasure=true,n.nativeTag=t.__nativeTag??t._nativeTag??t.nativeTag??"unknown"):(n.type="Unknown",n.keys=Object.keys(t).slice(0,10));return n}function El(){let e=window.__REACT_DEVTOOLS_GLOBAL_HOOK__;!e||typeof e.emit!="function"||dt||(dt=e.emit.bind(e),e.emit=function(t,...n){if(t==="traceUpdates"&&Et){let r=n[0];r.size>0&&console.log(`[PROFILER] traceUpdates: ${r.size} nodes`,Array.from(r).map((o,i)=>({index:i,...jo(o)}))),sn&&sn(r)}return dt(t,...n)})}function Ol(){let e=window.__REACT_DEVTOOLS_GLOBAL_HOOK__?.reactDevtoolsAgent;!e||typeof e.emit!="function"||ht||(ht=e.emit.bind(e),e.emit=function(t,...n){if(Et&&t==="drawTraceUpdates"){let r=n[0];r.length>0&&console.log(`[PROFILER] drawTraceUpdates: ${r.length} nodes`,r.map((o,i)=>({index:i,color:o.color,...jo(o.node)})))}return ht(t,...n)})}function _l(){let e=window.__REACT_DEVTOOLS_GLOBAL_HOOK__;e?.rendererInterfaces&&e.rendererInterfaces.forEach(t=>{if(typeof t.setTraceUpdatesEnabled=="function")try{t.setTraceUpdatesEnabled(false)}catch{}})}function Uo(e){sn=e}function Go(){typeof Z<"u"&&!Z||Ft||(El(),Ol(),Ft=true)}function Ko(){if(!Ft)return;let e=window.__REACT_DEVTOOLS_GLOBAL_HOOK__;dt&&e&&(e.emit=dt,dt=null),ht&&e?.reactDevtoolsAgent&&(e.reactDevtoolsAgent.emit=ht,ht=null),_l(),sn=null,Ft=false}function Wl(){return Ft}function jl(){Et=true}function Ul(){Et=false}function Gl(){return Et}var qo={};Vo(qo,{AccessibilityInfo:()=>Yl,ActivityIndicator:()=>Hs,Alert:()=>$s,Animated:()=>Xl,AppRegistry:()=>Zl,AppState:()=>es,Appearance:()=>Ql,BackHandler:()=>ts,Button:()=>Ms,CheckBox:()=>gs,Clipboard:()=>ns,DeviceEventEmitter:()=>ks,Dimensions:()=>qe,Easing:()=>rs,FlatList:()=>Yo,I18nManager:()=>os,Image:()=>ps,ImageBackground:()=>fs,InteractionManager:()=>as,Keyboard:()=>is,KeyboardAvoidingView:()=>ms,LayoutAnimation:()=>ls,Linking:()=>ss,LogBox:()=>Ds,Modal:()=>Qo,NativeEventEmitter:()=>cs,NativeModules:()=>Jl,PanResponder:()=>us,Picker:()=>ys,PixelRatio:()=>er,Platform:()=>Jo,Pressable:()=>Xo,ProgressBar:()=>bs,RefreshControl:()=>vs,SafeAreaView:()=>Cs,ScrollView:()=>Be,SectionList:()=>Ts,Share:()=>ds,StatusBar:()=>ws,StyleSheet:()=>be,Switch:()=>gt,Text:()=>h,TextInput:()=>cn,Touchable:()=>Ss,TouchableHighlight:()=>As,TouchableNativeFeedback:()=>xs,TouchableOpacity:()=>J,TouchableWithoutFeedback:()=>Bs,UIManager:()=>Ot,Vibration:()=>hs,View:()=>d,VirtualizedList:()=>Is,YellowBox:()=>Rs,findNodeHandle:()=>pt,unstable_createElement:()=>ql,useColorScheme:()=>Ps,useLocaleContext:()=>Ls,useWindowDimensions:()=>Ns});j();Dl(qo,Kl);import*as Kl from"react-native-web";import{unstable_createElement as ql,NativeModules as Jl,AccessibilityInfo as Yl,Animated as Xl,Appearance as Ql,AppRegistry as Zl,AppState as es,BackHandler as ts,Clipboard as ns,Dimensions as qe,Easing as rs,I18nManager as os,Keyboard as is,InteractionManager as as,LayoutAnimation as ls,Linking as ss,NativeEventEmitter as cs,PanResponder as us,PixelRatio as er,Platform as Jo,Share as ds,StyleSheet as be,UIManager as Ot,Vibration as hs,CheckBox as gs,FlatList as Yo,Image as ps,ImageBackground as fs,KeyboardAvoidingView as ms,Picker as ys,ProgressBar as bs,RefreshControl as vs,SafeAreaView as Cs,SectionList as Ts,StatusBar as ws,Touchable as Ss,TouchableNativeFeedback as xs,VirtualizedList as Is,YellowBox as Rs,LogBox as Ds,DeviceEventEmitter as ks,useColorScheme as Ps,useLocaleContext as Ls,useWindowDimensions as Ns}from"react-native-web";import*as ve from"react-native-web";import{createElement as zs,forwardRef as Vs}from"react";function we(e){let t=Vs((r,o)=>{let{accessibilityState:i,accessibilityValue:l,...a}=r;for(let c of["busy","checked","disabled","expanded","selected"])i?.[c]!==void 0&&a[`aria-${c}`]===void 0&&(a[`aria-${c}`]=i[c]);for(let[c,s]of Object.entries({min:"valuemin",max:"valuemax",now:"valuenow",text:"valuetext"}))l?.[c]!==void 0&&a[`aria-${s}`]===void 0&&(a[`aria-${s}`]=l[c]);return zs(e,{...a,ref:o})}),n=e.State;return n&&Object.assign(t,{State:n}),t.displayName=e.displayName??e.name??"NativeWebView",t}var d=we(ve.View),h=we(ve.Text),cn=we(ve.TextInput),J=we(ve.TouchableOpacity),As=we(ve.TouchableHighlight),Bs=we(ve.TouchableWithoutFeedback),Xo=we(ve.Pressable),Be=we(ve.ScrollView),Qo=we(ve.Modal),gt=we(ve.Switch),Hs=we(ve.ActivityIndicator),Ms=we(ve.Button),pt=ve.findNodeHandle,$s={alert(e,t,n,r){if(typeof document>"u")return;let o=document.createElement("dialog");o.dataset.buoyRoot="",o.setAttribute("aria-label",e),o.style.cssText="position:fixed;inset:0;margin:auto;width:min(440px,90vw);padding:24px;border:1px solid #475569;border-radius:14px;background:#17212e;color:#f1f5f9;font:14px system-ui;box-shadow:0 20px 80px #0008;z-index:2147483647";let i=document.createElement("h2");if(i.textContent=e,i.style.cssText="font-size:18px;margin:0 0 12px",o.appendChild(i),t){let s=document.createElement("p");s.textContent=t,s.style.cssText="line-height:1.5;white-space:pre-wrap;margin:0 0 20px",o.appendChild(s)}let l=document.createElement("div");l.style.cssText="display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px";let a=n?.length?n:[{text:"OK"}],c=()=>{o.close?.(),o.remove()};for(let s of a){let u=document.createElement("button");u.type="button",u.textContent=s.text??"OK",u.style.cssText=`padding:9px 14px;border:1px solid #64748b;border-radius:7px;color:white;background:${s.style==="destructive"?"#a52b38":"#283a4d"};cursor:pointer;font:inherit`,u.onclick=()=>{c(),s.onPress?.()},l.appendChild(u)}o.addEventListener("cancel",s=>{s.preventDefault(),r?.cancelable!==false&&(c(),r?.onDismiss?.())}),o.appendChild(l),document.body.appendChild(o),o.showModal?o.showModal():o.setAttribute("open","")}};Ne();j();import{getDOMControlProps as Fs,getDOMNodeHandle as Es,getDOMPublicInstance as Os,isDOMElement as _s}from"@buoy-gg/shared-ui/web/utils";j();function Zo(e){return e?e.x>=-.1&&e.x<=1.1&&e.y>=-.1&&e.y<=1.1:false}function tr(e,t,n){if(!e||t<=0||n<=0)return false;let r=e.x+e.width/2,o=e.y+e.height/2,i=t*.1,l=n*.1;return r>=-i&&r<=t+i&&o>=-l&&o<=n+l}function ei(e){return String(e??"").toLowerCase().replace(/\s+/g," ").replace(/(\d)[,\u00a0\u202f](?=\d{3}\b)/g,"$1").trim()}function un(e,t){if(t.nativeTag!=null&&e.nativeTag===t.nativeTag)return 1e3;if(t.testID&&!t.query){if(!e.testID||e.testID.toLowerCase()!==t.testID.trim().toLowerCase())return 0;let l=200;return e.tap&&(l+=Zo(e.tap)?20:-40),l}let n=String(t.query??t.testID??"").trim().toLowerCase();if(!n)return 0;let r=[e.testID,e.label,e.text,e.name].filter(Boolean).map(l=>l.toLowerCase()),o=0;for(let l of r)l===n?o=Math.max(o,100):l.startsWith(n)?o=Math.max(o,50):l.includes(n)&&(o=Math.max(o,25));let i=ei(n);if(i)for(let l of r){let a=ei(l);a===i?o=Math.max(o,90):a.startsWith(i)?o=Math.max(o,45):a.includes(i)&&(o=Math.max(o,22))}return t.testID&&e.testID&&e.testID.toLowerCase()===t.testID.toLowerCase()&&(o=Math.max(o,200)),o===0?0:((e.testID??"").toLowerCase().startsWith("buoy-dial-")&&(o+=40),e.tap&&(Zo(e.tap)?o+=20:o-=40),o)}var dn=5,Ws=22,nr=new Set(["View","RCTView","ScrollView","RCTScrollView","RCTScrollContentView","SafeAreaView","RCTSafeAreaView","AndroidHorizontalScrollContentView","KeyboardAvoidingView","Pressable","PlatformPressable","TouchableOpacity","TouchableHighlight","TouchableWithoutFeedback","TouchableNativeFeedback","AnimatedComponent","Wrapper"]);function ti(){return typeof globalThis>"u"?null:globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__??null}var rr=0,ni=false;function js(){if(ni)return;let e=ti();if(!e)return;let t=e.onCommitFiberRoot;e.onCommitFiberRoot=function(...n){return rr++,typeof t=="function"?t.apply(e,n):void 0},ni=true}var Us=250;function ri(){let e=new Map;return t=>{let n=[],r=t,o=0,i=false;for(;r&&o<400;){let l=e.get(r);if(l!==void 0){i=l;break}if(se(r)?.__buoyDevToolsRoot){i=true,e.set(r,true);break}n.push(r),r=r.return,o++}for(let l of n)e.set(l,i);return i}}function Je(){let e=ti();if(!e)return[];let t=[];try{if(e.renderers&&typeof e.renderers.forEach=="function"&&e.renderers.forEach((n,r)=>{try{let o=e.getFiberRoots?.(r);o&&o.forEach(i=>t.push(i))}catch{}}),t.length===0&&e.getFiberRoots){let n=e.getFiberRoots(1);n&&n.forEach(r=>t.push(r))}}catch{}return t}function oi(e){return e.tag===Ws&&e.memoizedState!==null}var Ye=false,or=0,hn=false;function ii(e,t){let n=Ye;Ye=e;try{return t()}finally{Ye=n}}function Gs(e){let t=e.memoizedProps;return t?t["aria-hidden"]===true&&(t.activityState!==void 0||"shouldFreeze"in t)||t.isFocused===false&&(t.routeKey!==void 0||"freezeContents"in t):false}function ai(e){let t=e.memoizedProps?.activityState;return t===0||t===1||e.memoizedProps?.isPageFocused===false?true:!Ye&&Gs(e)?(or++,true):false}function He(e,t,n=0,r=new Set){if(!(!e||r.has(e)||n>500)){if(r.add(e),oi(e)||ai(e)){e.sibling&&He(e.sibling,t,n,r);return}t(e),e.child&&He(e.child,t,n+1,r),e.sibling&&He(e.sibling,t,n,r)}}function ir(e){let t=Os(e);if(t)return t;if(!e)return null;let n=e;return n.canonical?.publicInstance?n.canonical.publicInstance:n.canonical&&typeof n.canonical.measure=="function"?n.canonical:typeof n.measure=="function"||typeof n.measureInWindow=="function"?n:null}function ft(e){let t=Es(e);if(t!==null)return t;if(e==null)return null;let n=e;if(typeof n.__nativeTag=="number")return n.__nativeTag;if(typeof n._nativeTag=="number")return n._nativeTag;if(typeof n.nativeTag=="number")return n.nativeTag;if(n.canonical){if(typeof n.canonical.__nativeTag=="number")return n.canonical.__nativeTag;if(typeof n.canonical._nativeTag=="number")return n.canonical._nativeTag;if(typeof n.canonical.nativeTag=="number")return n.canonical.nativeTag}return null}function ar(e){let t=ir(e.stateNode);if(t)return{instance:t,nativeTag:ft(e.stateNode),stateNode:e.stateNode};let n=[];e.child&&n.push(e.child);let r=0;for(;n.length>0&&r<4e3;){r++;let o=n.pop();if(!o)continue;let i=ir(o.stateNode);if(i)return{instance:i,nativeTag:ft(o.stateNode),stateNode:o.stateNode};o.child&&n.push(o.child),o.sibling&&n.push(o.sibling)}return null}function Ks(e){let t=e,n=0;for(;t&&n++<200;){let r=t.stateNode;if(r&&typeof r.scrollTo=="function"){let o=typeof r.getNativeScrollRef=="function"&&r.getNativeScrollRef()||null,i=typeof r.getInnerViewNode=="function"&&r.getInnerViewNode()||typeof r.getScrollableNode=="function"&&r.getScrollableNode()||r;return{instance:r,nativeRef:o,innerNode:i}}t=t.return}return null}async function qs(e,t,n,r){try{if(_s(n))return n.scrollIntoView({block:"nearest",inline:"nearest",behavior:"instant"}),await new Promise(c=>setTimeout(c,16)),true;let o=Ks(e);if(!o)return false;let i=t,l=null,a=c=>new Promise(s=>{let u=false,p=y=>{u||(u=true,s(y))},T=setTimeout(()=>p(null),600);try{c(y=>{clearTimeout(T),p(y)})}catch{clearTimeout(T),p(null)}});if(o.nativeRef&&typeof i.measureLayout=="function"&&(l=await a(c=>i.measureLayout(o.nativeRef,(s,u)=>c(u),()=>c(null)))),l==null){let c=pt(t),s=typeof o.innerNode=="number"?o.innerNode:pt(o.innerNode);c!=null&&s!=null&&(l=await a(u=>Ot.measureLayout(c,s,()=>u(null),(p,T)=>u(T))))}return l==null?false:(o.instance.scrollTo({y:Math.max(0,l-r),animated:false}),await new Promise(c=>setTimeout(c,120)),true)}catch{return false}}function Xe(e){let t=e?.type;return t?typeof t=="string"?t:t.displayName||t.name||null:null}function lr(e){let t=e?._debugOwner||e?.return,n=0;for(;t&&n<30;){n++;let r=Xe(t);if(r&&!nr.has(r)&&typeof t.type!="string")return r;t=t.return}return null}function se(e){return Fs(e?.stateNode,e?.memoizedProps??e?.pendingProps??null)}function li(e,t=0){if(typeof e=="string")return e;if(typeof e=="number"&&Number.isFinite(e))return String(e);if(Array.isArray(e)&&t<4){let n=[];for(let r of e){let o=li(r,t+1);o&&n.push(o)}return n.length>0?n.join(""):void 0}}function Js(e){return e.replace(/\s+/g," ").trim()}function sr(e){if(!e)return;let t=n=>{let r=li(n);if(r===void 0)return;let o=Js(r);return o?hn?o:o.slice(0,80):void 0};return t(e.children)??t(e.title)??t(e.label)??t(e.placeholder)??void 0}function Ys(e,t){let n=[],r=(i,l)=>{if(!i||l>t||n.length>=4)return;if(i!==e){let c=se(i);if(c&&(typeof c.onPress=="function"||typeof c.onLongPress=="function"))return}let a=sr(se(i));a&&!n.includes(a)&&n.push(a),i.child&&r(i.child,l+1),i!==e&&i.sibling&&r(i.sibling,l)};e.child&&r(e.child,1);let o=n.join(" ").trim();return o?o.slice(0,80):void 0}function Xs(e){let t=e,n=0,r=null,o=null;for(;t&&n<25&&!(r&&o);){let i=se(t);i&&(!r&&typeof i.onPress=="function"&&(r=i.onPress),!o&&typeof i.onLongPress=="function"&&(o=i.onLongPress)),t=t.return,n++}return r?{handler:r,kind:"onPress",longPress:o??void 0}:o?{handler:o,kind:"onLongPress"}:null}function Qe(e){return new Promise(t=>{let n=false,r=o=>{n||(n=true,t(o))};setTimeout(()=>r(null),1e3);try{typeof e.measureInWindow=="function"?e.measureInWindow((o,i,l,a)=>{l>0&&a>0?r({x:o,y:i,width:l,height:a}):r(null)}):typeof e.measure=="function"?e.measure((o,i,l,a,c,s)=>{l>0&&a>0&&c!=null&&s!=null?r({x:c,y:s,width:l,height:a}):r(null)}):r(null)}catch{r(null)}})}var Qs=new Set(["RCTActivityIndicatorView","AndroidProgressBar"]);function cr(){let e=Je();if(e.length===0)return[];let t=[],n=new Map,r=new Map,o=ri();for(let i of e)He(i.current,l=>{let a=se(l);if(!a)return;let c=typeof a.onPress=="function"||typeof a.onLongPress=="function",s=typeof a.onValueChange=="function",u=typeof a.onChangeText=="function",p=a.testID||void 0,T=a.accessibilityLabel||void 0,y=a.accessibilityRole||a.role||void 0,b=sr(a),f=y==="button"||y==="link"||y==="menuitem"||y==="tab"||y==="switch"||y==="checkbox",S=typeof l.type=="string"&&Qs.has(l.type)&&a.animating!==false;if(!c&&!s&&!u&&!p&&!T&&!b&&!f&&!S)return;let v=null,P=null,g=null;if(s){let w=a.value,N=typeof w=="number"||typeof a.minimumValue=="number";P={handler:a.onValueChange,kind:N?"slider":"toggle",current:w,min:typeof a.minimumValue=="number"?a.minimumValue:void 0,max:typeof a.maximumValue=="number"?a.maximumValue:void 0}}else u?g={handler:a.onChangeText,current:typeof a.value=="string"?a.value:void 0}:v=Xs(l);let D=Xe(l),k=D??"Unknown";(!D||nr.has(D)||typeof l.type=="string")&&(k=lr(l)??D??"Unknown");let R=ar(l);if(!R&&!p)return;!b&&!T&&c&&(b=Ys(l,6));let _=R?.instance??null,Q=R?.nativeTag??null,z=(_?n.get(_):void 0)??(Q!=null?r.get(Q):void 0);if(z){!z.press&&v?z.press=v:z.press&&v?.longPress&&!z.press.longPress&&(z.press.longPress=v.longPress),!z.valueControl&&P&&(z.valueControl=P),!z.textControl&&g&&(z.textControl=g),!z.testID&&p&&(z.testID=p),!z.label&&T&&(z.label=T),!z.text&&b&&(z.text=b),_&&!n.has(_)&&n.set(_,z),Q!=null&&!r.has(Q)&&r.set(Q,z);return}let W={nativeTag:Q,name:k,role:y??(S?"progressbar":void 0),testID:p,label:T,text:b,instance:_,stateNode:R?.stateNode??null,fiber:l,press:v,valueControl:P,textControl:g,rect:null,buoy:o(l)};t.push(W),_&&n.set(_,W),Q!=null&&r.set(Q,W)});return t}function Zs(e,t){return t.nativeTag!=null?e.nativeTag===t.nativeTag:t.testID&&e.testID?e.testID.toLowerCase()===t.testID.toLowerCase():false}function ur(e){let t=cr();return e.includeBuoy?t:t.filter(n=>!n.buoy||Zs(n,e))}async function si(e){await Promise.all(e.map(async t=>{t.instance&&(t.rect=await Qe(t.instance))}))}var ec=/^(FlatList|SectionList|VirtualizedSectionList|VirtualizedList|Animated\(.*\)|AnimatedComponent.*)$/;async function tc(e,t){let n=[],r=ri();for(let i of Je())He(i.current,l=>{if(Xe(l)!=="VirtualizedList")return;let a=l.memoizedProps;if(!a||typeof a.getItemCount!="function"||!e&&r(l))return;let c;try{c=Number(a.getItemCount(a.data))}catch{return}if(!Number.isFinite(c)||c<=0)return;let s=[],u=(y,b)=>{for(let f=y?.child;f;f=f.sibling){let S=Xe(f);if(S!=="VirtualizedList"){if(S==="CellRenderer"){s.push(f);continue}b<40&&u(f,b+1)}}};u(l,0);let p=l,T=lr(p);for(let y=0;y<6&&T&&ec.test(T);y++)p=p._debugOwner||p.return,T=lr(p);n.push({owner:T,items:c,cells:s})});let o=[];for(let i of n){let l=(await Promise.all(i.cells.map(async a=>{let c=ar(a);return c?Qe(c.instance):null}))).filter(t).length;l>0&&i.items>l&&o.push({owner:i.owner,items:i.items,listed:l})}return o}async function dr(e={}){let t=Ye,n=hn;Ye=!!e.includeHidden,hn=!!e.fullText;try{return await nc(e)}finally{Ye=t,hn=n}}async function nc(e){or=0;let t=cr(),n=or,r=e.includeBuoy?t:t.filter(u=>!u.buoy),o=t.length-r.length;await si(r);let i=qe.get("window"),l=Math.round(i.width)||1,a=Math.round(i.height)||1,c=[];for(let u of r){let p=u.rect;if(!p&&!u.testID)continue;let T,y;if(p){let S=p.x+p.width/2,v=p.y+p.height/2;if(v<-a*.1||v>a*1.1||S<-l*.1||S>l*1.1)continue;T={x:Pe(S/l),y:Pe(v/a)},y={x:Pe(p.x/l),y:Pe(p.y/a),width:Pe(p.width/l),height:Pe(p.height/a)}}let b=u.valueControl?u.valueControl.kind:u.textControl?"text":void 0,f=u.valueControl?u.valueControl.current:u.textControl?.current;c.push({nativeTag:u.nativeTag,name:u.name,role:u.role,testID:u.testID,label:u.label,text:u.text,interactive:!!(u.press||u.valueControl||u.textControl),longPressable:u.press&&(u.press.kind==="onLongPress"||u.press.longPress)?true:void 0,control:b,value:f,tap:T,frame:y})}c.sort((u,p)=>{let T=u.tap?.y??2,y=p.tap?.y??2;return Math.abs(T-y)>.02?T-y:(u.tap?.x??2)-(p.tap?.x??2)});let s=await tc(!!e.includeBuoy,u=>{if(!u)return false;let p=u.x+u.width/2;return u.y<=a*1.1&&u.y+u.height>=-a*.1&&p>=-l*.1&&p<=l*1.1});return{screen:{width:l,height:a},count:c.length,elements:c,...o>0?{hiddenBuoy:o}:{},...n>0?{hiddenScreens:n}:{},...s.length?{lists:s}:{}}}function Pe(e){return Math.round(e*100)/100}function ci(e){return{nativeTag:e.nativeTag,testID:e.testID,label:e.label,text:e.text,name:e.name}}function hr(e,t){return un(ci(e),t)}function ui(e,t,n){if(!(!e||!t||!n))return{x:(e.x+e.width/2)/t,y:(e.y+e.height/2)/n}}function di(e){let t=e?e.x+e.width/2:0,n=e?e.y+e.height/2:0;return{nativeEvent:{locationX:e?e.width/2:0,locationY:e?e.height/2:0,pageX:t,pageY:n,timestamp:0,target:null,identifier:1,touches:[],changedTouches:[]},persist:()=>{},preventDefault:()=>{},stopPropagation:()=>{},isDefaultPrevented:()=>false,isPropagationStopped:()=>false,target:null,currentTarget:null,type:"press",timeStamp:0}}async function rc(e){let t=ii(!!e.includeHidden,()=>ur(e));if(t.length===0)return{tapped:false,reason:"No React fiber roots / elements found on screen."};let n=t.map(g=>({c:g,score:hr(g,e)})).filter(g=>g.score>0).sort((g,D)=>D.score-g.score),r=g=>!!(g.press||g.valueControl||g.textControl);if(n.length===0&&!e.includeHidden&&ii(true,()=>ur(e)).map(g=>({c:g,score:hr(g,e)})).filter(g=>g.score>0).length>0)return{tapped:false,reason:"That element is only on a screen that isn't showing (another tab, or a screen under the current one). Navigate to it first, or pass includeHidden:true if you really mean the hidden one."};if(n.length===0)return{tapped:false,reason:"No element matched. Call describe_screen to see available elements (match by testID, text, or name).",candidates:t.filter(r).slice(0,12).map(g=>({nativeTag:g.nativeTag,name:g.name,testID:g.testID,text:g.text}))};let o=qe.get("window"),i=o.width||1,l=o.height||1,a=n.slice(0,15);await Promise.all(a.map(async g=>{g.c.instance&&!g.c.rect&&(g.c.rect=await Qe(g.c.instance))}));for(let g of a)g.score=un({...ci(g.c),tap:ui(g.c.rect,i,l)},e);a.sort((g,D)=>D.score-g.score);let c=a.find(g=>r(g.c))??n.find(g=>r(g.c))??a[0],s=c.c,u=(g,D)=>g.press&&g.press.handler===D.press?.handler||g.valueControl&&g.valueControl.handler===D.valueControl?.handler||g.textControl&&g.textControl.handler===D.textControl?.handler,p=a.filter(g=>g!==c&&r(g.c)&&g.score===c.score).filter(g=>!u(g.c,s)).filter((g,D,k)=>k.findIndex(R=>u(R.c,g.c))===D).slice(0,3).map(g=>({nativeTag:g.c.nativeTag,name:g.c.name,testID:g.c.testID,text:g.c.text,tap:ui(g.c.rect,i,l)})),T=e.nativeTag==null&&!(e.testID&&!e.query);if(T&&p.length>0){let g=[s,...p.map(D=>a.find(k=>k.c.nativeTag===D.nativeTag)?.c).filter(Boolean)];return{tapped:false,reason:`"${e.query}" matches ${g.length} different controls equally well, so nothing was tapped. Tap one by its nativeTag.`,candidates:g.map(D=>({nativeTag:D.nativeTag,name:D.name,testID:D.testID,text:D.text}))}}let y=a[0];if(T&&y&&y!==c&&!r(y.c)&&y.score>=90&&c.score<y.score-40)return{tapped:false,reason:`The best match for "${e.query}" is "${y.c.text??y.c.label??y.c.name}", which has no JS press handler (it may be native, like a tab bar button). The closest pressable match, "${s.text??s.label??s.name}", is a much weaker match, so nothing was tapped. Use navigate, or tap a specific element by nativeTag.`,candidates:[{nativeTag:s.nativeTag,name:s.name,testID:s.testID,text:s.text}]};if(!r(s))return{tapped:false,reason:`Matched "${s.name}"${s.text?` ("${s.text}")`:""} but it has no onPress / onValueChange / onChangeText handler (e.g. a react-native-gesture-handler GestureDetector). This element can't be driven in JS.`,matched:{nativeTag:s.nativeTag,name:s.name,testID:s.testID,label:s.label,text:s.text,via:"onPress"}};s.instance&&!s.rect&&(s.rect=await Qe(s.instance));let b=false;(s.rect==null||!tr(s.rect,i,l))&&e.scrollIntoView!==false&&s.instance&&(b=await qs(s.fiber,s.instance,s.stateNode,80),b&&(s.rect=await Qe(s.instance)));let f={nativeTag:s.nativeTag,name:s.name,testID:s.testID,label:s.label,text:s.text};js();let S=rr,v=Date.now(),P=async g=>(await new Promise(D=>setTimeout(D,Us)),{tapped:true,scrolled:b,matched:g,effect:{commits:rr-S,observedMs:Date.now()-v},...p.length?{alsoMatched:p}:{}});try{if(s.press){if(e.longPress){let D=s.press.kind==="onLongPress"?s.press.handler:s.press.longPress;return D?(D(di(s.rect)),await P({...f,via:"onLongPress"})):{tapped:false,scrolled:b,reason:`Matched "${s.name}"${s.text?` ("${s.text}")`:""} but it has no onLongPress handler \u2014 call tap_element without longPress to tap it normally.`,matched:{...f,via:"onPress"}}}return s.press.handler(di(s.rect)),await P({...f,via:s.press.kind})}if(s.valueControl){let D=s.valueControl,k;if(D.kind==="toggle")k=typeof e.value=="boolean"?e.value:!D.current;else{let R=D.min??0,_=D.max??1;typeof e.value=="number"?k=Math.min(_,Math.max(R,e.value)):k=D.current===_?R:_}return D.handler(k),await P({...f,via:"onValueChange",value:k})}let g=e.text??(typeof e.value=="string"?e.value:"");return s.textControl.handler(g),await P({...f,via:"onChangeText",value:g})}catch(g){return{tapped:false,scrolled:b,reason:`handler threw: ${g instanceof Error?g.message:String(g)}`,matched:{...f,via:s.press?s.press.kind:s.valueControl?"onValueChange":"onChangeText"}}}}var oc=5e3,ic=3e4,ac=50,lc=150;async function sc(e){if(!(e.nativeTag!=null||!!String(e.testID??"").trim()||!!String(e.query??"").trim()))return{ok:false,waitedMs:0,polls:0,reason:"Nothing to wait for \u2014 pass nativeTag, testID or query."};let t=Math.min(Math.max(e.timeoutMs??oc,0),ic),n=Math.max(e.pollMs??lc,ac),r=e.gone===true,o=Date.now(),i=0;for(;;){i+=1;let{hit:l,closest:a}=await cc(e);if(r?!l:l)return{ok:true,waitedMs:Date.now()-o,polls:i,matched:l??void 0};if(Date.now()-o>=t){let c=a?.length?a:void 0,s=r?`Still on screen after ${t}ms.`:c?`Not on screen after ${t}ms \u2014 ${c.length===1?"one element":`${c.length} elements`} matched but ${c.some(u=>u.onScreen)?"not well enough":"none is visible"}. See \`closest\`; do not retry with different words, call describeScreen.`:`Not on screen after ${t}ms, and nothing matched those words at all. Call describeScreen to see what is there.`;return{ok:false,waitedMs:Date.now()-o,polls:i,reason:s,matched:l??void 0,closest:c}}await new Promise(c=>setTimeout(c,n))}}async function cc(e){let t=ur(e).map(a=>({c:a,score:hr(a,e)})).filter(a=>a.score>0).sort((a,c)=>c.score-a.score).slice(0,8);if(t.length===0)return{hit:null,closest:void 0};await si(t.map(a=>a.c));let n=qe.get("window"),r=Math.round(n.width)||1,o=Math.round(n.height)||1,i=null;for(let{c:a}of t)if(tr(a.rect,r,o)){i={nativeTag:a.nativeTag,name:a.name,testID:a.testID,label:a.label,text:a.text,interactive:!!(a.press||a.valueControl||a.textControl)};break}let l=t.slice(0,3).map(({c:a})=>({name:a.name,testID:a.testID,text:a.text,onScreen:tr(a.rect,r,o)}));return{hit:i,closest:l}}function gr(e){let t=e,n=0;for(;t&&n<400;){if(se(t)?.__buoyDevToolsRoot)return true;t=t.return,n++}return false}function uc(e,t){let n=se(e.fiber);if(typeof n?.onPress=="function"||typeof n?.onValueChange=="function"||typeof n?.onChangeText=="function")return e;let r=null,o=e.fiber?.return,i=0;for(;o&&i<25;){if(typeof se(o)?.onPress=="function"){r=o;break}o=o.return,i++}if(!r)return e;let l=r;for(let a=0;a<6&&l;a++){let c=t.get(l);if(c)return c;l=l.return}return e}function pr(e){let t=cr();if(t.length===0)return null;let n=new Map;for(let a of t)n.set(a.fiber,a);let r=t.find(a=>a.nativeTag===e),o=null;if(!r){for(let a of Je())if(He(a.current,c=>{o||c.stateNode&&ft(c.stateNode)===e&&(o=c)}),o)break}let i=r??null;if(!i&&o){let a=o,c=0,s=null;for(;a&&c<25;){let u=n.get(a);if(u){if(u.press||u.valueControl||u.textControl){i=u;break}s||(s=u)}a=a.return,c++}i||(i=s)}if(!i||(i=uc(i,n),!i.press&&!i.valueControl&&!i.textControl)||gr(i.fiber))return null;let l=i.valueControl?i.valueControl.kind:i.textControl?"text":"press";return{nativeTag:i.nativeTag,name:i.name,role:i.role,testID:i.testID,label:i.label,text:i.text,control:l,value:i.valueControl?i.valueControl.current:i.textControl?i.textControl.current:void 0}}function dc(e){let t=null;for(let n of Je())if(He(n.current,r=>{!t&&r.stateNode&&ft(r.stateNode)===e&&(t=r)}),t)break;return t}function hi(){let e=[];for(let t of Je()){let n=t.current?.child,r=0;for(;n&&r++<200;){if(n.tag===dn&&n.stateNode){e.push(n);break}n=n.child}}return e}function hc(e,t){let n=globalThis.nativeFabricUIManager;if(!n||typeof n.findNodeAtPoint!="function")return null;let r=hi().filter(o=>o.stateNode?.node);return r.length?new Promise(o=>{let i=setTimeout(()=>o(null),1e3),l=r.length,a=null;r.forEach((c,s)=>{try{n.findNodeAtPoint(c.stateNode.node,e,t,u=>{u&&(!a||s>=a.i)&&(a={i:s,fiber:u}),--l===0&&(clearTimeout(i),o(a?.fiber??null))})}catch{--l===0&&(clearTimeout(i),o(a?.fiber??null))}})}):null}function gc(e,t){let n=Ot?.findSubviewIn;if(typeof n!="function")return null;let r=hi()[0],o=r?ft(r.stateNode)??pt(r.stateNode):null;return o==null?null:new Promise(i=>{let l=setTimeout(()=>i(null),1e3);try{n.call(Ot,o,[e,t],a=>{clearTimeout(l),i(typeof a=="number"?dc(a):null)})}catch{clearTimeout(l),i(null)}})}function pc(){let e=[],t=new Set,n=o=>{let i=[],l=(a,c)=>{for(let s=a;s&&i.length<5e3;s=s.sibling)t.has(s)||c>500||oi(s)||ai(s)||(s.tag===dn&&s.stateNode?i.push(s):s.child&&l(s.child,c+1))};return o.child&&l(o.child,0),i},r=(o,i)=>{t.has(o)||i>500||(t.add(o),e.push(o),gi(n(o)).forEach(l=>r(l,i+1)))};for(let o of Je())gi(n(o.current)).forEach(i=>r(i,0));return e}function gi(e){let t=e.map(n=>{let r=Number(fr(se(n)?.style).zIndex);return Number.isFinite(r)?r:0});return e.map((n,r)=>({h:n,i:r})).sort((n,r)=>t[n.i]-t[r.i]||n.i-r.i).map(({h:n})=>n)}function fr(e,t=0){return!e||typeof e!="object"||t>10?{}:Array.isArray(e)?Object.assign({},...e.map(n=>fr(n,t+1))):e}var fc=new Set(["RCTScrollView","AndroidHorizontalScrollView","RCTScrollContentView"]);function mc(e){if(typeof e.type=="string"&&fc.has(e.type)&&e.type!=="RCTScrollContentView")return true;let t=fr(se(e)?.style).overflow;return t==="hidden"||t==="scroll"}function yc(e){let t=se(e)?.pointerEvents??se(e)?.style?.pointerEvents;if(t==="none")return"all";let n=e.return,r=0;for(;n&&r++<200;){let o=se(n)?.pointerEvents??se(n)?.style?.pointerEvents;if(o==="none"||o==="box-only"&&n.tag===dn)return"all";n=n.return}return t==="box-none"?"self":null}async function bc(e,t,n){let r=await Promise.all(n.map(a=>{let c=ir(a.stateNode);return c?Qe(c):Promise.resolve(null)})),o=new Map;n.forEach((a,c)=>o.set(a,r[c]));let i=a=>!!a&&e>=a.x&&e<=a.x+a.width&&t>=a.y&&t<=a.y+a.height,l=a=>{for(let c=a.return,s=0;c&&s<300;c=c.return,s++)if(c.tag===dn&&o.has(c)&&mc(c)&&!i(o.get(c)))return true;return false};for(let a=n.length-1;a>=0;a--)if(!(!i(r[a])||yc(n[a])||l(n[a])))return n[a];return null}function vc(e,t){let n=globalThis.document,r=globalThis.window;if(!n?.elementFromPoint||!r)return null;let o=n.elementFromPoint(e*r.innerWidth,t*r.innerHeight);for(;o;){let i=Object.keys(o).find(l=>l.startsWith("__reactFiber$"));if(i)return o[i];o=o.parentElement}return null}async function Cc(e){let t=Math.min(1,Math.max(0,Number(e?.x))),n=Math.min(1,Math.max(0,Number(e?.y)));if(!Number.isFinite(t)||!Number.isFinite(n))return{found:false,method:"none",reason:"x and y must be numbers from 0 to 1."};let r=qe.get("window"),o=t*r.width,i=n*r.height,l="none",a=null,c=vc(t,n);if(c)l="dom",a=c;else{let b=hc(o,i);if(b)l="fabric",a=await b;else{let S=gc(o,i);S&&(l="paper",a=await S)}let f=pc();(!a||!new Set(f).has(a))&&(a=await bc(o,i,f),l="measured")}if(!a)return{found:false,method:l};let s=se(a)??{},u=ft(a.stateNode),p=[],T=a,y=0;for(;T&&y++<80&&p.length<6;){let b=Xe(T);b&&typeof T.type!="string"&&!nr.has(b)&&p[p.length-1]!==b&&p.push(b),T=T.return}return{found:true,method:l,buoy:gr(a),view:{name:Xe(a)??"Unknown",nativeTag:u,testID:s.testID||void 0,label:s.accessibilityLabel||s["aria-label"]||void 0,text:sr(s)},path:p,target:u!=null?pr(u):null}}async function Tc(){let e=[];for(let r of Je())He(r.current,o=>{let i=o.stateNode;o.tag===1&&i&&typeof i.getCamera=="function"&&!gr(o)&&e.push(o)});let t=qe.get("window"),n=r=>Promise.race([r,new Promise(o=>setTimeout(()=>o(null),1e3))]);return{maps:(await Promise.all(e.slice(0,5).map(async r=>{try{let o=await n(Promise.resolve(r.stateNode.getCamera()));if(!o)return null;let i=ar(r),l=i?await Qe(i.instance):null,a=se(r)??{};return{name:Xe(r)??"Map",testID:typeof a.testID=="string"?a.testID:void 0,frame:l&&t.width&&t.height?{x:Pe(l.x/t.width),y:Pe(l.y/t.height),width:Pe(l.width/t.width),height:Pe(l.height/t.height)}:void 0,camera:{heading:typeof o.heading=="number"?o.heading:void 0,pitch:typeof o.pitch=="number"?o.pitch:void 0,altitude:typeof o.altitude=="number"?o.altitude:void 0,zoom:typeof o.zoom=="number"?o.zoom:void 0,center:o.center}}}catch{return null}}))).filter(r=>!!r)}}ln();j();j();function wc(e){return!!e&&typeof e=="object"&&("next"in e||"queue"in e||"memoizedState"in e)}function pi(e,t,n){if(e===t)return false;if(n?.isClassComponent||!wc(t))return true;let r=e,o=t;for(let i=0;o!=null&&i<64;i++){if(o.queue!=null&&(r==null||!Object.is(r.memoizedState,o.memoizedState)))return true;o=o.next,r=r!=null?r.next:null}return false}function Sc(e,t){return pi(e?.memoizedState,t?.memoizedState,{isClassComponent:t?.tag===1})}var fi={RCTText:{alwaysTrack:["children"],skip:[],description:"Text component - children is the displayed content"},RCTVirtualText:{alwaysTrack:["children"],skip:[],description:"Virtual Text (nested) - children is the displayed content"},RCTView:{alwaysTrack:[],skip:["children"],description:"View container - children are React elements"},RCTImageView:{alwaysTrack:["source"],skip:["children"],description:"Image - source contains the image URL/require"},RCTTextInput:{alwaysTrack:["value","defaultValue"],skip:["children"],description:"TextInput - value is the input content"},RCTSwitch:{alwaysTrack:["value"],skip:["children"],description:"Switch - value is the toggle state"},default:{alwaysTrack:[],skip:["children"],description:"Unknown component type"}};function xc(e){return e&&fi[e]||fi.default}var gn=new WeakMap;function mr(e){if(!e)return;let t=gn.get(e);if(t||e.alternate&&(t=gn.get(e.alternate),t))return t}function Ic(e,t){e&&(gn.set(e,t),e.alternate&&gn.set(e.alternate,t))}var Se=new Map,yr=500,Rc=10,br=50,mi=50,Dc=new Set(["View","Text","TextImpl","Image","ScrollView","FlatList","SectionList","TouchableOpacity","TouchableHighlight","TouchableWithoutFeedback","Pressable","TextInput","Switch","ActivityIndicator","Modal","StatusBar","KeyboardAvoidingView","AnimatedComponent","AnimatedComponentWrapper","Fragment","Suspense","Provider","Consumer","Context","ForwardRef","Unknown","Component"]);function yi(e){return!!(!e||Dc.has(e)||e.startsWith("Animated"))}function bi(e){if(!e)return null;let t=e._debugOwner||e.return,n=0,r=null;for(;t&&n<30;){let o=t.tag;if(o===0||o===1||o===11||o===15){let i=Me(t);if(r||(r=t),!yi(i))return t}t=t.return,n++}return r}function Me(e){if(!e)return null;let t=e.type;if(t){if(typeof t=="string")return t;if(t.name)return t.name;if(t.displayName)return t.displayName}return null}function kc(e){if(!e||typeof e!="object")return"unknown";if(e.queue!==null&&e.queue!==void 0)return"useState";let t=e.memoizedState;if(t!==null&&typeof t=="object"&&!Array.isArray(t)&&"current"in t&&Object.keys(t).length===1)return"useRef";if(Array.isArray(t)&&t.length===2){let[,n]=t;if(Array.isArray(n)||n===null)return typeof t[0]=="function"?"useCallback":"useMemo"}return t!==null&&typeof t=="object"&&!Array.isArray(t)&&("tag"in t||"create"in t||"destroy"in t)?"useEffect":"unknown"}function Pc(e,t){let n=e?.memoizedState;switch(t){case"useState":case"useReducer":return n;case"useRef":return n?.current;case"useMemo":case"useCallback":return Array.isArray(n)?n[0]:n;case"useEffect":return"[effect]";default:return n}}function mt(e){if(!e?.memoizedState)return null;let t=e.memoizedState;if(typeof t!="object"||t===null||!("next"in t)&&!("queue"in t)&&!("memoizedState"in t))return null;let n=[],r=t,o=0;for(;r!==null&&o<br;){let i=kc(r),l=Pc(r,i);n.push({index:o,type:i,value:l,rawState:r.memoizedState}),r=r.next,o++}return n.length>0?n:null}function Lc(e,t){if(!e||!t)return null;let n=[],r=Math.max(e.length,t.length);for(let o=0;o<r;o++){let i=e[o],l=t[o];if(!i&&l){n.push({index:o,type:l.type,currentValue:pn(l.value,l.type),description:`Hook[${o}] added`});continue}if(i&&!l){n.push({index:o,type:i.type,previousValue:pn(i.value,i.type),description:`Hook[${o}] removed`});continue}if(i&&l){if(i.rawState===l.rawState||l.type==="useEffect"||l.type==="useMemo"||l.type==="useCallback")continue;if(l.type==="useState"||l.type==="useReducer"||l.type==="useRef"){let a=pn(i.value,i.type),c=pn(l.value,l.type);n.push({index:o,type:l.type,previousValue:a,currentValue:c,description:`${a} \u2192 ${c}`})}}}return n.length>0?n:null}function pn(e,t){return yt(e)}function yt(e){if(e===null)return null;if(e!==void 0)return typeof e=="boolean"||typeof e=="number"?e:typeof e=="string"?e.length>30?e.slice(0,30)+"...":e:typeof e=="function"?`[Function: ${e.name||"anonymous"}]`:Array.isArray(e)?`[Array: ${e.length} items]`:typeof e=="object"?`{Object: ${Object.keys(e).length} keys}`:String(e)}function Nc(e){if(!e)return{cause:"unknown",hookChanges:null};let t=e,n=e.alternate,r=mr(e);if(r&&n){let c=mt(e),s=mt(n),u=r.extractedHooks;if(c&&s&&u&&u.length>0){let p=u.find(T=>T.type==="useState");if(p){let T=c.find(b=>b.index===p.index),y=s.find(b=>b.index===p.index);if(T&&y){let b=T.value===p.value,f=y.value===p.value;b&&!f&&(t=n,n=e)}}}}let o=mt(t),i=null,l=null,a=null;return n?(i=n.memoizedProps,l=n.memoizedState,a=mt(n)):r&&(i=r.memoizedProps,l=r.memoizedState,a=r.extractedHooks),Ic(t,{memoizedProps:t.memoizedProps,memoizedState:t.memoizedState,extractedHooks:o}),i===null?{cause:"mount",hookChanges:null}:vr(i,t.memoizedProps)?pi(l,t.memoizedState,{isClassComponent:t.tag===1})?{cause:"state",hookChanges:Lc(a,o)}:{cause:"parent",hookChanges:null}:{cause:"props",hookChanges:null}}function vr(e,t){if(e===t)return true;if(!e||!t||typeof e!="object"||typeof t!="object")return false;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return false;for(let o of n)if(e[o]!==t[o])return false;return true}function bt(e,t=3){let n=new WeakSet;function r(o,i){if(i>t)return"[MAX_DEPTH]";if(o===null)return null;if(o===void 0)return;if(typeof o=="function")return`[Function: ${o.name||"anonymous"}]`;if(typeof o=="symbol")return`[Symbol: ${o.toString()}]`;if(typeof o!="object")return o;if(n.has(o))return"[Circular]";if(n.add(o),Array.isArray(o))return o.slice(0,10).map(c=>r(c,i+1));let l={},a=Object.keys(o).slice(0,20);for(let c of a)try{l[c]=r(o[c],i+1)}catch{l[c]="[Error accessing]"}return l}return r(e,0)}function _t(e){return e===void 0?"undefined":{0:"FunctionComponent",1:"ClassComponent",2:"IndeterminateComponent",3:"HostRoot",4:"HostPortal",5:"HostComponent",6:"HostText",7:"Fragment",8:"Mode",9:"ContextConsumer",10:"ContextProvider",11:"ForwardRef",12:"Profiler",13:"SuspenseComponent",14:"MemoComponent",15:"SimpleMemoComponent"}[e]||`Unknown(${e})`}function zc(e,t){if(!(!t.hookChanges||t.hookChanges.length===0))for(let n of t.hookChanges)console.log(`[${e||"Unknown"}] ${n.type}[${n.index}]: ${n.previousValue} \u2192 ${n.currentValue}`)}function Vc(e,t,n,r,o){let i=Me(n)||"Unknown",l=typeof t?.type=="string"?t.type:"Unknown",{cause:a,hookChanges:c}=r;if(console.log(`[RENDER] ${i} (${l}:${e}) | Cause: ${a.toUpperCase()}`+(o&&o.length>0?` | Props: [${o.join(", ")}]`:"")),c&&c.length>0)for(let s of c)console.log(` \u2514\u2500 ${s.type}[${s.index}]: ${s.previousValue} \u2192 ${s.currentValue}`)}function vi(e,t,n,r,o,i,l){let a=Me(n)||"Unknown",c=typeof t?.type=="string"?t.type:"Unknown";console.log(`
|
|
27
|
-
[RN-BUOY RENDER DEBUG] \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550`),console.log(
|
|
28
|
-
`),console.log(
|
|
26
|
+
`}};l(Lr,"PerformanceLoggerSingleton");fa=Lr,Qe=new fa});function ya(e){if(e.isComponent===true||e.testID&&e.testID.trim())return true;let t=(e.componentName??"").trim();if(!t||Br.has(t)||ba.has(t))return false;let n=(e.viewType??"").trim();return!(n&&Br.has(n)&&t===n||/^comp(\s|$)/i.test(t)||t.startsWith("_"))}var Br,ba,Au=Kt(()=>{"use strict";U();Br=new Set(["View","RCTView","Text","RCTText","RawText","RCTRawText","VirtualText","RCTVirtualText","ScrollView","RCTScrollView","RCTScrollContentView","SafeAreaView","RCTSafeAreaView","Pressable","TouchableOpacity","Image","RCTImageView"]),ba=new Set(["Unknown","Anonymous","CellRenderer","NativeComponent"]);l(ya,"isNamedComposite")});var va={};sa(va,{RenderTracker:()=>B,default:()=>wa});var Vr,Ca,Hr,Ta,B,wa,Ve=Kt(()=>{"use strict";U();ha();Cn();Au();Vr=200,Ca=150,Hr=class np{constructor(){this.renders=new Map;this.listeners=new Set;this.stateListeners=new Set;this.settingsListeners=new Set;this.filterListeners=new Set;this.renderEventCallbacks=new Set;this.isTracking=false;this.isPaused=false;this.settings={batchSize:Ca,showRenderCount:true,performanceLogging:false,trackRenderCauses:false,enableRenderHistory:false,maxRenderHistoryPerComponent:20,capturePropsOnRender:false,captureStateOnRender:false,debugLogLevel:"off",excludeDevTools:true,showHostViews:false};this.isBatchMode=false;this.batchDirty=false;this.filters={includeTestID:new Set,includeNativeID:new Set,includeViewType:new Set,includeComponent:new Set,excludeTestID:new Set,excludeNativeID:new Set,excludeViewType:new Set,excludeComponent:new Set,includePatterns:[],excludePatterns:[]}}trackRender(t){if(this.isPaused)return;let n=String(t.nativeTag),r=Date.now(),o=this.renders.get(n);if(o){if(o.renderCount=t.count,o.lastRenderTime=r,o.color=t.color,t.measurements&&(o.measurements=t.measurements),t.testID&&!o.testID&&(o.testID=t.testID),t.nativeID&&!o.nativeID&&(o.nativeID=t.nativeID),t.accessibilityLabel&&!o.accessibilityLabel&&(o.accessibilityLabel=t.accessibilityLabel),t.componentName&&!o.componentName&&(o.componentName=t.componentName),t.renderCause&&(o.lastRenderCause=t.renderCause),this.settings.enableRenderHistory){let i=t.renderCause||{type:"unknown",timestamp:r};this.addRenderEvent(o,i,t.capturedProps,t.capturedState)}}else{let i={id:n,nativeTag:t.nativeTag,viewType:t.viewType,displayName:vn(t.viewType),testID:t.testID,nativeID:t.nativeID,accessibilityLabel:t.accessibilityLabel,componentName:t.componentName,...t.isComponent===void 0?{}:{isComponent:t.isComponent},renderCount:t.count,firstRenderTime:r,lastRenderTime:r,measurements:t.measurements,color:t.color,lastRenderCause:t.renderCause};if(this.settings.enableRenderHistory){i.renderHistory=[];let s=t.renderCause||{type:t.count===1?"mount":"unknown",timestamp:r};this.addRenderEvent(i,s,t.capturedProps,t.capturedState)}if(this.renders.set(n,i),this.renders.size>Vr){let s=Array.from(this.renders.values()).sort((a,u)=>a.lastRenderTime-u.lastRenderTime).slice(0,this.renders.size-Vr);for(let a of s)this.renders.delete(a.id)}}this.isBatchMode?this.batchDirty=true:this.notifyListeners()}addRenderEvent(t,n,r,o){t.renderHistory||(t.renderHistory=[]);let i={id:`${t.nativeTag}-${n.timestamp}`,timestamp:n.timestamp,cause:n,renderNumber:t.renderCount,capturedProps:this.settings.capturePropsOnRender?r:void 0,capturedState:this.settings.captureStateOnRender?o:void 0};t.renderHistory.push(i);let s=Math.max(5,Math.min(50,this.settings.maxRenderHistoryPerComponent));t.renderHistory.length>s&&(t.renderHistory=t.renderHistory.slice(-s)),this.notifyRenderEventCallbacks(i,t)}notifyRenderEventCallbacks(t,n){this.renderEventCallbacks.forEach(r=>{try{r(t,n)}catch{}})}emitRenderEvent(t){if(this.renderEventCallbacks.size===0)return;let n=Date.now(),r=t.renderCause||{type:"unknown",timestamp:n},o={id:String(t.nativeTag),nativeTag:t.nativeTag,viewType:t.viewType,displayName:vn(t.viewType),testID:t.testID,nativeID:t.nativeID,accessibilityLabel:t.accessibilityLabel,componentName:t.componentName,renderCount:t.count,firstRenderTime:n,lastRenderTime:n,measurements:t.measurements,color:t.color,lastRenderCause:r,renderHistory:[]},i={id:`${t.nativeTag}-${n}-${t.count}`,timestamp:n,renderNumber:t.count,cause:r,capturedProps:void 0,capturedState:void 0};this.notifyRenderEventCallbacks(i,o)}startBatch(){this.isBatchMode=true,this.batchDirty=false}endBatch(){this.isBatchMode=false,this.batchDirty&&(this.batchDirty=false,this.notifyListeners())}getRenders(){return Array.from(this.renders.values()).map(t=>({...t}))}passesFilters(t){if(this.filters.includePatterns.length>0&&!this.matchesAnyPatternForInfo(t,this.filters.includePatterns)||this.filters.excludePatterns.length>0&&this.matchesAnyPatternForInfo(t,this.filters.excludePatterns))return false;if(this.filters.includeViewType.size>0){let n=t.viewType||"",r=t.displayName||"";if(!this.matchesPattern(n,this.filters.includeViewType)&&!this.matchesPattern(r,this.filters.includeViewType))return false}if(this.filters.includeTestID.size>0&&(!t.testID||!this.matchesPattern(t.testID,this.filters.includeTestID))||this.filters.includeNativeID.size>0&&(!t.nativeID||!this.matchesPattern(t.nativeID,this.filters.includeNativeID))||this.filters.includeComponent.size>0&&(!t.componentName||!this.matchesPattern(t.componentName,this.filters.includeComponent)))return false;if(this.filters.excludeViewType.size>0){let n=t.viewType||"",r=t.displayName||"";if(this.matchesPattern(n,this.filters.excludeViewType)||this.matchesPattern(r,this.filters.excludeViewType))return false}return!(this.filters.excludeTestID.size>0&&t.testID&&this.matchesPattern(t.testID,this.filters.excludeTestID)||this.filters.excludeNativeID.size>0&&t.nativeID&&this.matchesPattern(t.nativeID,this.filters.excludeNativeID)||this.filters.excludeComponent.size>0&&t.componentName&&this.matchesPattern(t.componentName,this.filters.excludeComponent))}matchesAnyPatternForInfo(t,n){for(let r of n){let o=r.value.toLowerCase();switch(r.type){case"any":if(t.viewType.toLowerCase().includes(o)||t.displayName?.toLowerCase().includes(o)||t.testID?.toLowerCase().includes(o)||t.nativeID?.toLowerCase().includes(o)||t.componentName?.toLowerCase().includes(o)||t.accessibilityLabel?.toLowerCase().includes(o))return true;break;case"viewType":if(t.viewType.toLowerCase().includes(o)||t.displayName?.toLowerCase().includes(o))return true;break;case"testID":if(t.testID?.toLowerCase().includes(o))return true;break;case"nativeID":if(t.nativeID?.toLowerCase().includes(o))return true;break;case"component":if(t.componentName?.toLowerCase().includes(o))return true;break;case"accessibilityLabel":if(t.accessibilityLabel?.toLowerCase().includes(o))return true;break}}return false}hasActiveFilters(){return this.filters.includePatterns.length>0||this.filters.excludePatterns.length>0||this.filters.includeViewType.size>0||this.filters.includeTestID.size>0||this.filters.includeNativeID.size>0||this.filters.includeComponent.size>0||this.filters.excludeViewType.size>0||this.filters.excludeTestID.size>0||this.filters.excludeNativeID.size>0||this.filters.excludeComponent.size>0||this.filters.minRenderCount!==void 0||this.filters.maxRenderCount!==void 0}getFilteredRenders(t=""){let n=this.getRenders();if(this.settings.showHostViews||(n=n.filter(ya)),t.trim()){let r=t.toLowerCase();n=n.filter(o=>o.viewType.toLowerCase().includes(r)||o.displayName.toLowerCase().includes(r)||o.testID?.toLowerCase().includes(r)||o.nativeID?.toLowerCase().includes(r)||o.accessibilityLabel?.toLowerCase().includes(r)||o.componentName?.toLowerCase().includes(r)||String(o.nativeTag).includes(r))}return n=n.filter(r=>this.passesFilters(r)),this.filters.minRenderCount!==void 0&&(n=n.filter(r=>r.renderCount>=this.filters.minRenderCount)),this.filters.maxRenderCount!==void 0&&(n=n.filter(r=>r.renderCount<=this.filters.maxRenderCount)),n.sort((r,o)=>o.lastRenderTime-r.lastRenderTime)}matchesPattern(t,n){let r=t.toLowerCase();for(let o of n){let i=o.toLowerCase();if(r.includes(i))return true}return false}getRender(t){return this.renders.get(t)}clear(){this.renders.clear(),this.notifyListeners()}resetRenderCount(t){let n=this.renders.get(t);n&&(n.renderCount=0,this.notifyListeners())}start(){this.isTracking=true,this.isPaused=false,this.notifyStateListeners()}stop(){this.isTracking=false,this.isPaused=false,this.notifyStateListeners()}pause(){this.isPaused=true,this.notifyStateListeners()}resume(){this.isPaused=false,this.notifyStateListeners()}togglePause(){this.isPaused=!this.isPaused,this.notifyStateListeners()}getState(){return{isTracking:this.isTracking,isPaused:this.isPaused}}replaceRenders(t,n){let r=new Map;for(let[o,i]of this.renders)i.renderHistory&&i.renderHistory.length>0&&r.set(o,i.renderHistory);this.renders=new Map(t.map(o=>{let i=r.get(o.id),s=i&&!(o.renderHistory&&o.renderHistory.length>0)?{...o,renderHistory:i}:o;return[s.id,s]})),n&&(this.isTracking!==n.isTracking||this.isPaused!==n.isPaused)&&(this.isTracking=n.isTracking,this.isPaused=n.isPaused,this.notifyStateListeners()),this.notifyListeners()}hydrateRender(t){let n=this.renders.get(t.id);this.renders.set(t.id,n?{...n,...t}:t),this.notifyListeners()}getFilters(){return this.filters}setFilters(t){this.filters={...this.filters,...t},this.notifyListeners(),this.notifyFilterListeners()}addIncludePattern(t,n){let r=`include${t.charAt(0).toUpperCase()+t.slice(1)}`;this.filters[r].add(n),this.notifyListeners()}removeIncludePattern(t,n){let r=`include${t.charAt(0).toUpperCase()+t.slice(1)}`;this.filters[r].delete(n),this.notifyListeners()}addExcludePattern(t,n){let r=`exclude${t.charAt(0).toUpperCase()+t.slice(1)}`;this.filters[r].add(n),this.notifyListeners()}removeExcludePattern(t,n){let r=`exclude${t.charAt(0).toUpperCase()+t.slice(1)}`;this.filters[r].delete(n),this.notifyListeners()}clearFilters(){this.filters={includeTestID:new Set,includeNativeID:new Set,includeViewType:new Set,includeComponent:new Set,excludeTestID:new Set,excludeNativeID:new Set,excludeViewType:new Set,excludeComponent:new Set,includePatterns:[],excludePatterns:[],minRenderCount:void 0,maxRenderCount:void 0},this.notifyListeners()}getAvailableProps(){let t=new Set,n=new Set,r=new Set,o=new Set,i=new Set;for(let s of this.renders.values())s.viewType&&t.add(s.viewType),s.testID&&n.add(s.testID),s.nativeID&&r.add(s.nativeID),s.componentName&&o.add(s.componentName),s.accessibilityLabel&&i.add(s.accessibilityLabel);return{viewTypes:Array.from(t).sort(),testIDs:Array.from(n).sort(),nativeIDs:Array.from(r).sort(),componentNames:Array.from(o).sort(),accessibilityLabels:Array.from(i).sort()}}getStats(){let t=0;for(let n of this.renders.values())t+=n.renderCount;return{totalComponents:this.renders.size,totalRenders:t}}subscribe(t){return this.listeners.add(t),t(this.getRenders()),()=>{this.listeners.delete(t)}}subscribeToState(t){return this.stateListeners.add(t),t(this.getState()),()=>{this.stateListeners.delete(t)}}subscribeToSettings(t){return this.settingsListeners.add(t),t(this.settings),()=>{this.settingsListeners.delete(t)}}subscribeToFilters(t){return this.filterListeners.add(t),t(this.filters),()=>{this.filterListeners.delete(t)}}onRenderEvent(t){return this.renderEventCallbacks.add(t),()=>{this.renderEventCallbacks.delete(t)}}getRenderEventCallbackCount(){return this.renderEventCallbacks.size}shouldShowRender(t){let n=this.filters;return!(n.includePatterns.length>0&&!this.matchesAnyPatternForInfo(t,n.includePatterns)||n.excludePatterns.length>0&&this.matchesAnyPatternForInfo(t,n.excludePatterns)||(n.includeViewType.size>0||n.includeTestID.size>0||n.includeNativeID.size>0||n.includeComponent.size>0)&&!(n.includeViewType.size>0&&n.includeViewType.has(t.viewType)||n.includeTestID.size>0&&t.testID&&n.includeTestID.has(t.testID)||n.includeNativeID.size>0&&t.nativeID&&n.includeNativeID.has(t.nativeID)||n.includeComponent.size>0&&t.componentName&&n.includeComponent.has(t.componentName))||n.excludeViewType.has(t.viewType)||t.testID&&n.excludeTestID.has(t.testID)||t.nativeID&&n.excludeNativeID.has(t.nativeID)||t.componentName&&n.excludeComponent.has(t.componentName))}getSettings(){return{...this.settings}}setSettings(t){t.batchSize!==void 0&&(t.batchSize=Math.max(10,Math.min(500,t.batchSize))),t.maxRenderHistoryPerComponent!==void 0&&(t.maxRenderHistoryPerComponent=Math.max(5,Math.min(50,t.maxRenderHistoryPerComponent))),t.enableRenderHistory&&!this.settings.trackRenderCauses&&(t.trackRenderCauses=true),t.trackRenderCauses===false&&this.settings.enableRenderHistory&&(t.enableRenderHistory=false),this.settings={...this.settings,...t},t.performanceLogging!==void 0&&Qe.setEnabled(t.performanceLogging),this.notifySettingsListeners()}clearAllRenderHistory(){for(let t of this.renders.values())t.renderHistory=[];this.notifyListeners()}clearRenderHistory(t){let n=this.renders.get(t);n&&(n.renderHistory=[],this.notifyListeners())}getRenderHistoryStats(){let t=0,n=0;for(let r of this.renders.values())r.renderHistory&&r.renderHistory.length>0&&(t+=r.renderHistory.length,n++);return{totalEvents:t,componentsWithHistory:n,averageEventsPerComponent:n>0?t/n:0}}getBatchSize(){return this.settings.batchSize}setBatchSize(t){this.setSettings({batchSize:t})}notifyListeners(){let t=this.getRenders();for(let n of this.listeners)try{n(t)}catch(r){console.error("[Buoy]","[RenderTracker] Error in listener:",r)}}notifyStateListeners(){let t=this.getState();for(let n of this.stateListeners)try{n(t)}catch(r){console.error("[Buoy]","[RenderTracker] Error in state listener:",r)}}notifySettingsListeners(){let t=this.getSettings();for(let n of this.settingsListeners)try{n(t)}catch(r){console.error("[Buoy]","[RenderTracker] Error in settings listener:",r)}}notifyFilterListeners(){let t=this.getFilters();for(let n of this.filterListeners)try{n(t)}catch(r){console.error("[Buoy]","[RenderTracker] Error in filter listener:",r)}}};l(Hr,"RenderTrackerSingleton");Ta=Hr,B=new Ta,wa=B});U();U();import{useState as Ar,useEffect as Er,useCallback as Eu}from"react";import{HighlighterIcon as Sa,HighlightIcon as xa}from"@buoy-gg/floating-tools-core/web";U();import{getDOMFiber as Fr,getDOMNodeHandle as Ia,getDOMPublicInstance as Fu,isDOMElement as Ra}from"@buoy-gg/shared-ui/web/utils";U();var xt=null,It=null,Jt=false,Yt=false,Tn=null;function Mr(e){if(!e)return{type:"null"};let t=e,n={};if(t.canonical){n.type="Fabric";let r=t.canonical;if(r.publicInstance){let o=r.publicInstance;n.hasMeasure=typeof o.measure=="function",n.nativeTag=o.__nativeTag??o._nativeTag??"unknown"}}else typeof t.measure=="function"?(n.type="Legacy",n.hasMeasure=true,n.nativeTag=t.__nativeTag??t._nativeTag??t.nativeTag??"unknown"):(n.type="Unknown",n.keys=Object.keys(t).slice(0,10));return n}l(Mr,"describeNode");function Da(){let e=window.__REACT_DEVTOOLS_GLOBAL_HOOK__;!e||typeof e.emit!="function"||xt||(xt=e.emit.bind(e),e.emit=function(t,...n){if(t==="traceUpdates"&&Yt){let r=n[0];r.size>0&&console.log("[Buoy]",`[PROFILER] traceUpdates: ${r.size} nodes`,Array.from(r).map((o,i)=>({index:i,...Mr(o)}))),Tn&&Tn(r)}return xt(t,...n)})}l(Da,"swizzleHookEmit");function ka(){let e=window.__REACT_DEVTOOLS_GLOBAL_HOOK__?.reactDevtoolsAgent;!e||typeof e.emit!="function"||It||(It=e.emit.bind(e),e.emit=function(t,...n){if(Yt&&t==="drawTraceUpdates"){let r=n[0];r.length>0&&console.log("[Buoy]",`[PROFILER] drawTraceUpdates: ${r.length} nodes`,r.map((o,i)=>({index:i,color:o.color,...Mr(o.node)})))}return It(t,...n)})}l(ka,"swizzleAgentEmit");function Pa(){let e=window.__REACT_DEVTOOLS_GLOBAL_HOOK__;e?.rendererInterfaces&&e.rendererInterfaces.forEach(t=>{if(typeof t.setTraceUpdatesEnabled=="function")try{t.setTraceUpdatesEnabled(false)}catch{}})}l(Pa,"disableTracingOnAllRenderers");function $r(e){Tn=e}l($r,"setComparisonCallback");function Or(){typeof ee<"u"&&!ee||Jt||(Da(),ka(),Jt=true)}l(Or,"installProfilerInterceptor");function _r(){if(!Jt)return;let e=window.__REACT_DEVTOOLS_GLOBAL_HOOK__;xt&&e&&(e.emit=xt,xt=null),It&&e?.reactDevtoolsAgent&&(e.reactDevtoolsAgent.emit=It,It=null),Pa(),Tn=null,Jt=false}l(_r,"uninstallProfilerInterceptor");function Na(){return Jt}l(Na,"isInterceptorInstalled");function za(){Yt=true}l(za,"enableProfilerLogging");function La(){Yt=false}l(La,"disableProfilerLogging");function Ba(){return Yt}l(Ba,"isLoggingEnabled");var Va={};sa(Va,{AccessibilityInfo:()=>_u,ActivityIndicator:()=>Bd,Alert:()=>Hd,Animated:()=>Wu,AppRegistry:()=>ju,AppState:()=>Gu,Appearance:()=>Uu,BackHandler:()=>Ku,Button:()=>Vd,CheckBox:()=>id,Clipboard:()=>qu,DeviceEventEmitter:()=>Cd,Dimensions:()=>Ze,Easing:()=>Ju,FlatList:()=>Aa,I18nManager:()=>Yu,Image:()=>ad,ImageBackground:()=>ld,InteractionManager:()=>Qu,Keyboard:()=>Xu,KeyboardAvoidingView:()=>sd,LayoutAnimation:()=>Zu,Linking:()=>ed,LogBox:()=>vd,Modal:()=>_a,NativeEventEmitter:()=>td,NativeModules:()=>Ou,PanResponder:()=>nd,Picker:()=>cd,PixelRatio:()=>Wr,Platform:()=>Ha,Pressable:()=>$a,ProgressBar:()=>ud,RefreshControl:()=>dd,SafeAreaView:()=>gd,ScrollView:()=>Me,SectionList:()=>hd,Share:()=>rd,StatusBar:()=>pd,StyleSheet:()=>ve,Switch:()=>Rt,Text:()=>p,TextInput:()=>wn,Touchable:()=>md,TouchableHighlight:()=>zd,TouchableNativeFeedback:()=>fd,TouchableOpacity:()=>Y,TouchableWithoutFeedback:()=>Ld,UIManager:()=>Xt,Vibration:()=>od,View:()=>h,VirtualizedList:()=>yd,YellowBox:()=>bd,findNodeHandle:()=>Dt,unstable_createElement:()=>$u,useColorScheme:()=>Td,useLocaleContext:()=>wd,useWindowDimensions:()=>Sd});U();Vu(Va,Mu);import*as Mu from"react-native-web";import{unstable_createElement as $u,NativeModules as Ou,AccessibilityInfo as _u,Animated as Wu,Appearance as Uu,AppRegistry as ju,AppState as Gu,BackHandler as Ku,Clipboard as qu,Dimensions as Ze,Easing as Ju,I18nManager as Yu,Keyboard as Xu,InteractionManager as Qu,LayoutAnimation as Zu,Linking as ed,NativeEventEmitter as td,PanResponder as nd,PixelRatio as Wr,Platform as Ha,Share as rd,StyleSheet as ve,UIManager as Xt,Vibration as od,CheckBox as id,FlatList as Aa,Image as ad,ImageBackground as ld,KeyboardAvoidingView as sd,Picker as cd,ProgressBar as ud,RefreshControl as dd,SafeAreaView as gd,SectionList as hd,StatusBar as pd,Touchable as md,TouchableNativeFeedback as fd,VirtualizedList as yd,YellowBox as bd,LogBox as vd,DeviceEventEmitter as Cd,useColorScheme as Td,useLocaleContext as wd,useWindowDimensions as Sd}from"react-native-web";import*as Ce from"react-native-web";import{createElement as Ur,forwardRef as Ea,useCallback as xd,useRef as Id}from"react";U();import{useEffect as Rd,useState as Dd}from"react";import{createPortal as kd}from"react-dom";U();var Pd='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif';import{jsx as Nd}from"react/jsx-runtime";var Qt=Symbol.for("@buoy-gg/portal-host"),Fa=l(e=>{if(!(e instanceof Element))return false;if(e.closest("input, textarea, select"))return true;let t=e.closest("[contenteditable]")?.getAttribute("contenteditable")?.toLowerCase();return t===""||t==="true"||t==="plaintext-only"},"isTextField");function jr(){let e=document;if(e[Qt])return e[Qt].host;let t=document.createElement("div");t.dataset.buoyPortalHost="",Object.assign(t.style,{position:"fixed",inset:"0",zIndex:"2147483647",pointerEvents:"none",fontFamily:Pd});let n=l(()=>{let d=document.fullscreenElement,g=d&&d.tagName!=="CANVAS"?d:document.body;t.parentElement!==g&&g.appendChild(t)},"move"),r=new Map,o=l(d=>{(!t.contains(d.target)||!Fa(d.target))&&r.set(d.code||d.key,{key:d.key,code:d.code,location:d.location,keyCode:d.keyCode,which:d.which,altKey:d.altKey,ctrlKey:d.ctrlKey,metaKey:d.metaKey,shiftKey:d.shiftKey})},"down"),i=l(d=>{r.delete(d.code||d.key)},"up"),s=l(()=>r.clear(),"clear"),a=l(()=>{let d=[...r.values()];r.clear();for(let g of d)document.dispatchEvent(new KeyboardEvent("keyup",{...g,bubbles:true}))},"focus"),u=l(d=>{Fa(d.target)&&d.stopPropagation()},"key"),c=l(d=>d.stopPropagation(),"wheel");return n(),document.addEventListener("fullscreenchange",n),document.addEventListener("keydown",o,true),document.addEventListener("keyup",i,true),window.addEventListener("blur",s),t.addEventListener("focusin",a),t.addEventListener("keydown",u),t.addEventListener("keyup",u),t.addEventListener("keypress",u),t.addEventListener("wheel",c,{passive:true}),e[Qt]={host:t,users:0,dispose:l(()=>{document.removeEventListener("fullscreenchange",n),document.removeEventListener("keydown",o,true),document.removeEventListener("keyup",i,true),window.removeEventListener("blur",s),t.remove(),delete e[Qt]},"dispose")},t}l(jr,"getBuoyPortalHost");function Ma({children:e}){let[t,n]=Dd(null);return Rd(()=>{let r=jr(),o=document[Qt];return o.users++,n(r),()=>{--o.users===0&&o.dispose()}},[]),t?kd(Nd("div",{"data-buoy-root":"",style:{display:"contents",pointerEvents:"auto"},children:e}),t):null}l(Ma,"BuoyPortal");function Te(e){let t=Ea((r,o)=>{let{accessibilityState:i,accessibilityValue:s,...a}=r;for(let u of["busy","checked","disabled","expanded","selected"])i?.[u]!==void 0&&a[`aria-${u}`]===void 0&&(a[`aria-${u}`]=i[u]);for(let[u,c]of Object.entries({min:"valuemin",max:"valuemax",now:"valuenow",text:"valuetext"}))s?.[u]!==void 0&&a[`aria-${c}`]===void 0&&(a[`aria-${c}`]=s[u]);return Ur(e,{...a,ref:o})}),n=e.State;return n&&Object.assign(t,{State:n}),t.displayName=e.displayName??e.name??"NativeWebView",t}l(Te,"withAccessibility");var h=Te(Ce.View),p=Te(Ce.Text),wn=Te(Ce.TextInput),Y=Te(Ce.TouchableOpacity),zd=Te(Ce.TouchableHighlight),Ld=Te(Ce.TouchableWithoutFeedback),$a=Te(Ce.Pressable),Me=Te(Ce.ScrollView),Oa=Ea((e,t)=>{let n=Id(null),r=xd(o=>{if(o){let i=o;for(;i.parentElement&&i.parentElement!==document.body;)i=i.parentElement;i.parentElement===document.body&&(n.current=i,Object.assign(i.style,{position:"relative",zIndex:"2147483647",pointerEvents:"auto"}),jr().appendChild(i))}else n.current&&(document.body.appendChild(n.current),n.current=null);typeof t=="function"?t(o):t&&(t.current=o)},[t]);return Ur(Ma,null,Ur(Ce.Modal,{...e,ref:r}))});Oa.displayName="Modal";var _a=Te(Oa),Rt=Te(Ce.Switch),Bd=Te(Ce.ActivityIndicator),Vd=Te(Ce.Button),Dt=Ce.findNodeHandle,Hd={alert(e,t,n,r){if(typeof document>"u")return;let o=document.createElement("dialog");o.dataset.buoyRoot="",o.setAttribute("aria-label",e),o.style.cssText="position:fixed;inset:0;margin:auto;width:min(440px,90vw);padding:24px;border:1px solid #475569;border-radius:14px;background:#17212e;color:#f1f5f9;font:14px system-ui;box-shadow:0 20px 80px #0008;z-index:2147483647";let i=document.createElement("h2");if(i.textContent=e,i.style.cssText="font-size:18px;margin:0 0 12px",o.appendChild(i),t){let c=document.createElement("p");c.textContent=t,c.style.cssText="line-height:1.5;white-space:pre-wrap;margin:0 0 20px",o.appendChild(c)}let s=document.createElement("div");s.style.cssText="display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px";let a=n?.length?n:[{text:"OK"}],u=l(()=>{o.close?.(),o.remove()},"close");for(let c of a){let d=document.createElement("button");d.type="button",d.textContent=c.text??"OK",d.style.cssText=`padding:9px 14px;border:1px solid #64748b;border-radius:7px;color:white;background:${c.style==="destructive"?"#a52b38":"#283a4d"};cursor:pointer;font:inherit`,d.onclick=()=>{u(),c.onPress?.()},s.appendChild(d)}o.addEventListener("cancel",c=>{c.preventDefault(),r?.cancelable!==false&&(u(),r?.onDismiss?.())}),o.appendChild(s),document.body.appendChild(o),o.showModal?o.showModal():o.setAttribute("open","")}};Ve();U();import{getDOMControlProps as Ad,getDOMNodeHandle as Ed,getDOMPublicInstance as Fd,isDOMElement as Md}from"@buoy-gg/shared-ui/web/utils";U();function Gr(e){return e?e.x>=-.1&&e.x<=1.1&&e.y>=-.1&&e.y<=1.1:false}l(Gr,"isOnScreenTap");function Sn(e,t,n){if(!e||t<=0||n<=0)return false;let r=e.x+e.width/2,o=e.y+e.height/2,i=t*.1,s=n*.1;return r>=-i&&r<=t+i&&o>=-s&&o<=n+s}l(Sn,"isRectCenterOnScreen");function Kr(e){return String(e??"").toLowerCase().replace(/\s+/g," ").replace(/(\d)[,\u00a0\u202f](?=\d{3}\b)/g,"$1").trim()}l(Kr,"looseText");function Zt(e,t){if(t.nativeTag!=null&&e.nativeTag===t.nativeTag)return 1e3;if(t.testID&&!t.query){if(!e.testID||e.testID.toLowerCase()!==t.testID.trim().toLowerCase())return 0;let s=200;return e.tap&&(s+=Gr(e.tap)?20:-40),s}let n=String(t.query??t.testID??"").trim().toLowerCase();if(!n)return 0;let r=[e.testID,e.label,e.text,e.name].filter(Boolean).map(s=>s.toLowerCase()),o=0;for(let s of r)s===n?o=Math.max(o,100):s.startsWith(n)?o=Math.max(o,50):s.includes(n)&&(o=Math.max(o,25));let i=Kr(n);if(i)for(let s of r){let a=Kr(s);a===i?o=Math.max(o,90):a.startsWith(i)?o=Math.max(o,45):a.includes(i)&&(o=Math.max(o,22))}return t.testID&&e.testID&&e.testID.toLowerCase()===t.testID.toLowerCase()&&(o=Math.max(o,200)),o===0?0:((e.testID??"").toLowerCase().startsWith("buoy-dial-")&&(o+=40),e.tap&&(Gr(e.tap)?o+=20:o-=40),o)}l(Zt,"scoreTapMatch");var xn=5,$d=22,qr=new Set(["View","RCTView","ScrollView","RCTScrollView","RCTScrollContentView","SafeAreaView","RCTSafeAreaView","AndroidHorizontalScrollContentView","KeyboardAvoidingView","Pressable","PlatformPressable","TouchableOpacity","TouchableHighlight","TouchableWithoutFeedback","TouchableNativeFeedback","AnimatedComponent","Wrapper"]);function Jr(){return typeof globalThis>"u"?null:globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__??null}l(Jr,"getReactDevToolsHook");var Yr=0,Wa=false;function Ua(){if(Wa)return;let e=Jr();if(!e)return;let t=e.onCommitFiberRoot;e.onCommitFiberRoot=function(...n){return Yr++,typeof t=="function"?t.apply(e,n):void 0},Wa=true}l(Ua,"ensureCommitCounter");var Od=250;function Xr(){let e=new Map;return t=>{let n=[],r=t,o=0,i=false;for(;r&&o<400;){let s=e.get(r);if(s!==void 0){i=s;break}if(le(r)?.__buoyDevToolsRoot){i=true,e.set(r,true);break}n.push(r),r=r.return,o++}for(let s of n)e.set(s,i);return i}}l(Xr,"makeChromeCheck");function $e(){let e=Jr();if(!e)return[];let t=[];try{if(e.renderers&&typeof e.renderers.forEach=="function"&&e.renderers.forEach((n,r)=>{try{let o=e.getFiberRoots?.(r);o&&o.forEach(i=>t.push(i))}catch{}}),t.length===0&&e.getFiberRoots){let n=e.getFiberRoots(1);n&&n.forEach(r=>t.push(r))}}catch{}return t}l($e,"getAllFiberRoots");function Qr(e){return e.tag===$d&&e.memoizedState!==null}l(Qr,"isHiddenOffscreen");var et=false,Zr=0,In=false;function eo(e,t){let n=et;et=e;try{return t()}finally{et=n}}l(eo,"withHiddenScreens");function ja(e){let t=e.memoizedProps;return t?t["aria-hidden"]===true&&(t.activityState!==void 0||"shouldFreeze"in t)||t.isFocused===false&&(t.routeKey!==void 0||"freezeContents"in t):false}l(ja,"isNotShowingScreen");function to(e){let t=e.memoizedProps?.activityState;return t===0||t===1||e.memoizedProps?.isPageFocused===false?true:!et&&ja(e)?(Zr++,true):false}l(to,"isInactiveScreen");function He(e,t,n=0,r=new Set){if(!(!e||r.has(e)||n>500)){if(r.add(e),Qr(e)||to(e)){e.sibling&&He(e.sibling,t,n,r);return}t(e),e.child&&He(e.child,t,n+1,r),e.sibling&&He(e.sibling,t,n,r)}}l(He,"traverseFiberTree");function Rn(e){let t=Fd(e);if(t)return t;if(!e)return null;let n=e;return n.canonical?.publicInstance?n.canonical.publicInstance:n.canonical&&typeof n.canonical.measure=="function"?n.canonical:typeof n.measure=="function"||typeof n.measureInWindow=="function"?n:null}l(Rn,"getPublicInstance");function tt(e){let t=Ed(e);if(t!==null)return t;if(e==null)return null;let n=e;if(typeof n.__nativeTag=="number")return n.__nativeTag;if(typeof n._nativeTag=="number")return n._nativeTag;if(typeof n.nativeTag=="number")return n.nativeTag;if(n.canonical){if(typeof n.canonical.__nativeTag=="number")return n.canonical.__nativeTag;if(typeof n.canonical._nativeTag=="number")return n.canonical._nativeTag;if(typeof n.canonical.nativeTag=="number")return n.canonical.nativeTag}return null}l(tt,"getNativeTag");function Dn(e){let t=Rn(e.stateNode);if(t)return{instance:t,nativeTag:tt(e.stateNode),stateNode:e.stateNode};let n=[];e.child&&n.push(e.child);let r=0;for(;n.length>0&&r<4e3;){r++;let o=n.pop();if(!o)continue;let i=Rn(o.stateNode);if(i)return{instance:i,nativeTag:tt(o.stateNode),stateNode:o.stateNode};o.child&&n.push(o.child),o.sibling&&n.push(o.sibling)}return null}l(Dn,"findHostInstance");function Ga(e){let t=e,n=0;for(;t&&n++<200;){let r=t.stateNode;if(r&&typeof r.scrollTo=="function"){let o=typeof r.getNativeScrollRef=="function"&&r.getNativeScrollRef()||null,i=typeof r.getInnerViewNode=="function"&&r.getInnerViewNode()||typeof r.getScrollableNode=="function"&&r.getScrollableNode()||r;return{instance:r,nativeRef:o,innerNode:i}}t=t.return}return null}l(Ga,"findScrollAncestor");async function Ka(e,t,n,r){try{if(Md(n))return n.scrollIntoView({block:"nearest",inline:"nearest",behavior:"instant"}),await new Promise(u=>setTimeout(u,16)),true;let o=Ga(e);if(!o)return false;let i=t,s=null,a=l(u=>new Promise(c=>{let d=false,g=l(b=>{d||(d=true,c(b))},"settle"),T=setTimeout(()=>g(null),600);try{u(b=>{clearTimeout(T),g(b)})}catch{clearTimeout(T),g(null)}}),"withTimeout");if(o.nativeRef&&typeof i.measureLayout=="function"&&(s=await a(u=>i.measureLayout(o.nativeRef,(c,d)=>u(d),()=>u(null)))),s==null){let u=Dt(t),c=typeof o.innerNode=="number"?o.innerNode:Dt(o.innerNode);u!=null&&c!=null&&(s=await a(d=>Xt.measureLayout(u,c,()=>d(null),(g,T)=>d(T))))}return s==null?false:(o.instance.scrollTo({y:Math.max(0,s-r),animated:false}),await new Promise(u=>setTimeout(u,120)),true)}catch{return false}}l(Ka,"scrollIntoView");function Oe(e){let t=e?.type;return t?typeof t=="string"?t:t.displayName||t.name||null:null}l(Oe,"getComponentName");function kn(e){let t=e?._debugOwner||e?.return,n=0;for(;t&&n<30;){n++;let r=Oe(t);if(r&&!qr.has(r)&&typeof t.type!="string")return r;t=t.return}return null}l(kn,"getOwningComponentName");function le(e){return Ad(e?.stateNode,e?.memoizedProps??e?.pendingProps??null)}l(le,"getProps");function no(e,t=0){if(typeof e=="string")return e;if(typeof e=="number"&&Number.isFinite(e))return String(e);if(Array.isArray(e)&&t<4){let n=[];for(let r of e){let o=no(r,t+1);o&&n.push(o)}return n.length>0?n.join(""):void 0}}l(no,"flattenText");function qa(e){return e.replace(/\s+/g," ").trim()}l(qa,"normalizeVisibleText");function Pn(e){if(!e)return;let t=l(n=>{let r=no(n);if(r===void 0)return;let o=qa(r);return o?In?o:o.slice(0,80):void 0},"pick");return t(e.children)??t(e.title)??t(e.label)??t(e.placeholder)??void 0}l(Pn,"getVisibleText");function Ja(e,t){let n=[],r=l((i,s)=>{if(!i||s>t||n.length>=4)return;if(i!==e){let u=le(i);if(u&&(typeof u.onPress=="function"||typeof u.onLongPress=="function"))return}let a=Pn(le(i));a&&!n.includes(a)&&n.push(a),i.child&&r(i.child,s+1),i!==e&&i.sibling&&r(i.sibling,s)},"visit");e.child&&r(e.child,1);let o=n.join(" ").trim();return o?o.slice(0,80):void 0}l(Ja,"collectDescendantText");function Ya(e){let t=e,n=0,r=null,o=null;for(;t&&n<25&&!(r&&o);){let i=le(t);i&&(!r&&typeof i.onPress=="function"&&(r=i.onPress),!o&&typeof i.onLongPress=="function"&&(o=i.onLongPress)),t=t.return,n++}return r?{handler:r,kind:"onPress",longPress:o??void 0}:o?{handler:o,kind:"onLongPress"}:null}l(Ya,"findPressHandler");function _e(e){return new Promise(t=>{let n=false,r=l(o=>{n||(n=true,t(o))},"done");setTimeout(()=>r(null),1e3);try{typeof e.measureInWindow=="function"?e.measureInWindow((o,i,s,a)=>{s>0&&a>0?r({x:o,y:i,width:s,height:a}):r(null)}):typeof e.measure=="function"?e.measure((o,i,s,a,u,c)=>{s>0&&a>0&&u!=null&&c!=null?r({x:u,y:c,width:s,height:a}):r(null)}):r(null)}catch{r(null)}})}l(_e,"measureInstance");var _d=new Set(["RCTActivityIndicatorView","AndroidProgressBar"]);function Nn(){let e=$e();if(e.length===0)return[];let t=[],n=new Map,r=new Map,o=Xr();for(let i of e)He(i.current,s=>{let a=le(s);if(!a)return;let u=typeof a.onPress=="function"||typeof a.onLongPress=="function",c=typeof a.onValueChange=="function",d=typeof a.onChangeText=="function",g=a.testID||void 0,T=a.accessibilityLabel||void 0,b=a.accessibilityRole||a.role||void 0,v=Pn(a),f=b==="button"||b==="link"||b==="menuitem"||b==="tab"||b==="switch"||b==="checkbox",S=typeof s.type=="string"&&_d.has(s.type)&&a.animating!==false;if(!u&&!c&&!d&&!g&&!T&&!v&&!f&&!S)return;let C=null,N=null,m=null;if(c){let x=a.value,L=typeof x=="number"||typeof a.minimumValue=="number";N={handler:a.onValueChange,kind:L?"slider":"toggle",current:x,min:typeof a.minimumValue=="number"?a.minimumValue:void 0,max:typeof a.maximumValue=="number"?a.maximumValue:void 0}}else d?m={handler:a.onChangeText,current:typeof a.value=="string"?a.value:void 0}:C=Ya(s);let k=Oe(s),P=k??"Unknown";(!k||qr.has(k)||typeof s.type=="string")&&(P=kn(s)??k??"Unknown");let D=Dn(s);if(!D&&!g)return;!v&&!T&&u&&(v=Ja(s,6));let W=D?.instance??null,Z=D?.nativeTag??null,V=(W?n.get(W):void 0)??(Z!=null?r.get(Z):void 0);if(V){!V.press&&C?V.press=C:V.press&&C?.longPress&&!V.press.longPress&&(V.press.longPress=C.longPress),!V.valueControl&&N&&(V.valueControl=N),!V.textControl&&m&&(V.textControl=m),!V.testID&&g&&(V.testID=g),!V.label&&T&&(V.label=T),!V.text&&v&&(V.text=v),W&&!n.has(W)&&n.set(W,V),Z!=null&&!r.has(Z)&&r.set(Z,V);return}let j={nativeTag:Z,name:P,role:b??(S?"progressbar":void 0),testID:g,label:T,text:v,instance:W,stateNode:D?.stateNode??null,fiber:s,press:C,valueControl:N,textControl:m,rect:null,buoy:o(s)};t.push(j),W&&n.set(W,j),Z!=null&&r.set(Z,j)});return t}l(Nn,"collectCandidates");function Xa(e,t){return t.nativeTag!=null?e.nativeTag===t.nativeTag:t.testID&&e.testID?e.testID.toLowerCase()===t.testID.toLowerCase():false}l(Xa,"explicitlyTargets");function zn(e){let t=Nn();return e.includeBuoy?t:t.filter(n=>!n.buoy||Xa(n,e))}l(zn,"appCandidates");async function ro(e){await Promise.all(e.map(async t=>{t.instance&&(t.rect=await _e(t.instance))}))}l(ro,"measureCandidates");var Wd=/^(FlatList|SectionList|VirtualizedSectionList|VirtualizedList|Animated\(.*\)|AnimatedComponent.*)$/;async function Qa(e,t){let n=[],r=Xr();for(let i of $e())He(i.current,s=>{if(Oe(s)!=="VirtualizedList")return;let a=s.memoizedProps;if(!a||typeof a.getItemCount!="function"||!e&&r(s))return;let u;try{u=Number(a.getItemCount(a.data))}catch{return}if(!Number.isFinite(u)||u<=0)return;let c=[],d=l((b,v)=>{for(let f=b?.child;f;f=f.sibling){let S=Oe(f);if(S!=="VirtualizedList"){if(S==="CellRenderer"){c.push(f);continue}v<40&&d(f,v+1)}}},"walk");d(s,0);let g=s,T=kn(g);for(let b=0;b<6&&T&&Wd.test(T);b++)g=g._debugOwner||g.return,T=kn(g);n.push({owner:T,items:u,cells:c})});let o=[];for(let i of n){let s=(await Promise.all(i.cells.map(async a=>{let u=Dn(a);return u?_e(u.instance):null}))).filter(t).length;s>0&&i.items>s&&o.push({owner:i.owner,items:i.items,listed:s})}return o}l(Qa,"collectLists");async function Ln(e={}){let t=et,n=In;et=!!e.includeHidden,In=!!e.fullText;try{return await Za(e)}finally{et=t,In=n}}l(Ln,"describeScreen");async function Za(e){Zr=0;let t=Nn(),n=Zr,r=e.includeBuoy?t:t.filter(d=>!d.buoy),o=t.length-r.length;await ro(r);let i=Ze.get("window"),s=Math.round(i.width)||1,a=Math.round(i.height)||1,u=[];for(let d of r){let g=d.rect;if(!g&&!d.testID)continue;let T,b;if(g){let S=g.x+g.width/2,C=g.y+g.height/2;if(C<-a*.1||C>a*1.1||S<-s*.1||S>s*1.1)continue;T={x:ke(S/s),y:ke(C/a)},b={x:ke(g.x/s),y:ke(g.y/a),width:ke(g.width/s),height:ke(g.height/a)}}let v=d.valueControl?d.valueControl.kind:d.textControl?"text":void 0,f=d.valueControl?d.valueControl.current:d.textControl?.current;u.push({nativeTag:d.nativeTag,name:d.name,role:d.role,testID:d.testID,label:d.label,text:d.text,interactive:!!(d.press||d.valueControl||d.textControl),longPressable:d.press&&(d.press.kind==="onLongPress"||d.press.longPress)?true:void 0,control:v,value:f,tap:T,frame:b})}u.sort((d,g)=>{let T=d.tap?.y??2,b=g.tap?.y??2;return Math.abs(T-b)>.02?T-b:(d.tap?.x??2)-(g.tap?.x??2)});let c=await Qa(!!e.includeBuoy,d=>{if(!d)return false;let g=d.x+d.width/2;return d.y<=a*1.1&&d.y+d.height>=-a*.1&&g>=-s*.1&&g<=s*1.1});return{screen:{width:s,height:a},count:u.length,elements:u,...o>0?{hiddenBuoy:o}:{},...n>0?{hiddenScreens:n}:{},...c.length?{lists:c}:{}}}l(Za,"describeScreenInner");function ke(e){return Math.round(e*100)/100}l(ke,"round2");function oo(e){return{nativeTag:e.nativeTag,testID:e.testID,label:e.label,text:e.text,name:e.name}}l(oo,"fieldsOf");function Bn(e,t){return Zt(oo(e),t)}l(Bn,"matchScore");function io(e,t,n){if(!(!e||!t||!n))return{x:(e.x+e.width/2)/t,y:(e.y+e.height/2)/n}}l(io,"tapPoint");function ao(e){let t=e?e.x+e.width/2:0,n=e?e.y+e.height/2:0;return{nativeEvent:{locationX:e?e.width/2:0,locationY:e?e.height/2:0,pageX:t,pageY:n,timestamp:0,target:null,identifier:1,touches:[],changedTouches:[]},persist:l(()=>{},"persist"),preventDefault:l(()=>{},"preventDefault"),stopPropagation:l(()=>{},"stopPropagation"),isDefaultPrevented:l(()=>false,"isDefaultPrevented"),isPropagationStopped:l(()=>false,"isPropagationStopped"),target:null,currentTarget:null,type:"press",timeStamp:0}}l(ao,"makeSyntheticPressEvent");async function el(e){let t=eo(!!e.includeHidden,()=>zn(e));if(t.length===0)return{tapped:false,reason:"No React fiber roots / elements found on screen."};let n=t.map(m=>({c:m,score:Bn(m,e)})).filter(m=>m.score>0).sort((m,k)=>k.score-m.score),r=l(m=>!!(m.press||m.valueControl||m.textControl),"isInteractive");if(n.length===0&&!e.includeHidden&&eo(true,()=>zn(e)).map(m=>({c:m,score:Bn(m,e)})).filter(m=>m.score>0).length>0)return{tapped:false,reason:"That element is only on a screen that isn't showing (another tab, or a screen under the current one). Navigate to it first, or pass includeHidden:true if you really mean the hidden one."};if(n.length===0)return{tapped:false,reason:"No element matched. Call describe_screen to see available elements (match by testID, text, or name).",candidates:t.filter(r).slice(0,12).map(m=>({nativeTag:m.nativeTag,name:m.name,testID:m.testID,text:m.text}))};let o=Ze.get("window"),i=o.width||1,s=o.height||1,a=n.slice(0,15);await Promise.all(a.map(async m=>{m.c.instance&&!m.c.rect&&(m.c.rect=await _e(m.c.instance))}));for(let m of a)m.score=Zt({...oo(m.c),tap:io(m.c.rect,i,s)},e);a.sort((m,k)=>k.score-m.score);let u=a.find(m=>r(m.c))??n.find(m=>r(m.c))??a[0],c=u.c,d=l((m,k)=>m.press&&m.press.handler===k.press?.handler||m.valueControl&&m.valueControl.handler===k.valueControl?.handler||m.textControl&&m.textControl.handler===k.textControl?.handler,"sameControl"),g=a.filter(m=>m!==u&&r(m.c)&&m.score===u.score).filter(m=>!d(m.c,c)).filter((m,k,P)=>P.findIndex(D=>d(D.c,m.c))===k).slice(0,3).map(m=>({nativeTag:m.c.nativeTag,name:m.c.name,testID:m.c.testID,text:m.c.text,tap:io(m.c.rect,i,s)})),T=e.nativeTag==null&&!(e.testID&&!e.query);if(T&&g.length>0){let m=[c,...g.map(k=>a.find(P=>P.c.nativeTag===k.nativeTag)?.c).filter(Boolean)];return{tapped:false,reason:`"${e.query}" matches ${m.length} different controls equally well, so nothing was tapped. Tap one by its nativeTag.`,candidates:m.map(k=>({nativeTag:k.nativeTag,name:k.name,testID:k.testID,text:k.text}))}}let b=a[0];if(T&&b&&b!==u&&!r(b.c)&&b.score>=90&&u.score<b.score-40)return{tapped:false,reason:`The best match for "${e.query}" is "${b.c.text??b.c.label??b.c.name}", which has no JS press handler (it may be native, like a tab bar button). The closest pressable match, "${c.text??c.label??c.name}", is a much weaker match, so nothing was tapped. Use navigate, or tap a specific element by nativeTag.`,candidates:[{nativeTag:c.nativeTag,name:c.name,testID:c.testID,text:c.text}]};if(!r(c))return{tapped:false,reason:`Matched "${c.name}"${c.text?` ("${c.text}")`:""} but it has no onPress / onValueChange / onChangeText handler (e.g. a react-native-gesture-handler GestureDetector). This element can't be driven in JS.`,matched:{nativeTag:c.nativeTag,name:c.name,testID:c.testID,label:c.label,text:c.text,via:"onPress"}};c.instance&&!c.rect&&(c.rect=await _e(c.instance));let v=false;(c.rect==null||!Sn(c.rect,i,s))&&e.scrollIntoView!==false&&c.instance&&(v=await Ka(c.fiber,c.instance,c.stateNode,80),v&&(c.rect=await _e(c.instance)));let f={nativeTag:c.nativeTag,name:c.name,testID:c.testID,label:c.label,text:c.text};Ua();let S=Yr,C=Date.now(),N=l(async m=>(await new Promise(k=>setTimeout(k,Od)),{tapped:true,scrolled:v,matched:m,effect:{commits:Yr-S,observedMs:Date.now()-C},...g.length?{alsoMatched:g}:{}}),"fired");try{if(c.press){if(e.longPress){let k=c.press.kind==="onLongPress"?c.press.handler:c.press.longPress;return k?(k(ao(c.rect)),await N({...f,via:"onLongPress"})):{tapped:false,scrolled:v,reason:`Matched "${c.name}"${c.text?` ("${c.text}")`:""} but it has no onLongPress handler \u2014 call tap_element without longPress to tap it normally.`,matched:{...f,via:"onPress"}}}return c.press.handler(ao(c.rect)),await N({...f,via:c.press.kind})}if(c.valueControl){let k=c.valueControl,P;if(k.kind==="toggle")P=typeof e.value=="boolean"?e.value:!k.current;else{let D=k.min??0,W=k.max??1;typeof e.value=="number"?P=Math.min(W,Math.max(D,e.value)):P=k.current===W?D:W}return k.handler(P),await N({...f,via:"onValueChange",value:P})}let m=e.text??(typeof e.value=="string"?e.value:"");return c.textControl.handler(m),await N({...f,via:"onChangeText",value:m})}catch(m){return{tapped:false,scrolled:v,reason:`handler threw: ${m instanceof Error?m.message:String(m)}`,matched:{...f,via:c.press?c.press.kind:c.valueControl?"onValueChange":"onChangeText"}}}}l(el,"tapElement");var Ud=5e3,jd=3e4,Gd=50,Kd=150;async function tl(e){if(!(e.nativeTag!=null||!!String(e.testID??"").trim()||!!String(e.query??"").trim()))return{ok:false,waitedMs:0,polls:0,reason:"Nothing to wait for \u2014 pass nativeTag, testID or query."};let t=Math.min(Math.max(e.timeoutMs??Ud,0),jd),n=Math.max(e.pollMs??Kd,Gd),r=e.gone===true,o=Date.now(),i=0;for(;;){i+=1;let{hit:s,closest:a}=await nl(e);if(r?!s:s)return{ok:true,waitedMs:Date.now()-o,polls:i,matched:s??void 0};if(Date.now()-o>=t){let u=a?.length?a:void 0,c=r?`Still on screen after ${t}ms.`:u?`Not on screen after ${t}ms \u2014 ${u.length===1?"one element":`${u.length} elements`} matched but ${u.some(d=>d.onScreen)?"not well enough":"none is visible"}. See \`closest\`; do not retry with different words, call describeScreen.`:`Not on screen after ${t}ms, and nothing matched those words at all. Call describeScreen to see what is there.`;return{ok:false,waitedMs:Date.now()-o,polls:i,reason:c,matched:s??void 0,closest:u}}await new Promise(u=>setTimeout(u,n))}}l(tl,"waitFor");async function nl(e){let t=zn(e).map(a=>({c:a,score:Bn(a,e)})).filter(a=>a.score>0).sort((a,u)=>u.score-a.score).slice(0,8);if(t.length===0)return{hit:null,closest:void 0};await ro(t.map(a=>a.c));let n=Ze.get("window"),r=Math.round(n.width)||1,o=Math.round(n.height)||1,i=null;for(let{c:a}of t)if(Sn(a.rect,r,o)){i={nativeTag:a.nativeTag,name:a.name,testID:a.testID,label:a.label,text:a.text,interactive:!!(a.press||a.valueControl||a.textControl)};break}let s=t.slice(0,3).map(({c:a})=>({name:a.name,testID:a.testID,text:a.text,onScreen:Sn(a.rect,r,o)}));return{hit:i,closest:s}}l(nl,"findOnScreen");function Vn(e){let t=e,n=0;for(;t&&n<400;){if(le(t)?.__buoyDevToolsRoot)return true;t=t.return,n++}return false}l(Vn,"isBuoyChrome");function rl(e,t){let n=le(e.fiber);if(typeof n?.onPress=="function"||typeof n?.onValueChange=="function"||typeof n?.onChangeText=="function")return e;let r=null,o=e.fiber?.return,i=0;for(;o&&i<25;){if(typeof le(o)?.onPress=="function"){r=o;break}o=o.return,i++}if(!r)return e;let s=r;for(let a=0;a<6&&s;a++){let u=t.get(s);if(u)return u;s=s.return}return e}l(rl,"preferHandlerOwner");function Hn(e){let t=Nn();if(t.length===0)return null;let n=new Map;for(let a of t)n.set(a.fiber,a);let r=t.find(a=>a.nativeTag===e),o=null;if(!r){for(let a of $e())if(He(a.current,u=>{o||u.stateNode&&tt(u.stateNode)===e&&(o=u)}),o)break}let i=r??null;if(!i&&o){let a=o,u=0,c=null;for(;a&&u<25;){let d=n.get(a);if(d){if(d.press||d.valueControl||d.textControl){i=d;break}c||(c=d)}a=a.return,u++}i||(i=c)}if(!i||(i=rl(i,n),!i.press&&!i.valueControl&&!i.textControl)||Vn(i.fiber))return null;let s=i.valueControl?i.valueControl.kind:i.textControl?"text":"press";return{nativeTag:i.nativeTag,name:i.name,role:i.role,testID:i.testID,label:i.label,text:i.text,control:s,value:i.valueControl?i.valueControl.current:i.textControl?i.textControl.current:void 0}}l(Hn,"resolveTouchTarget");function ol(e){let t=null;for(let n of $e())if(He(n.current,r=>{!t&&r.stateNode&&tt(r.stateNode)===e&&(t=r)}),t)break;return t}l(ol,"fiberForTag");function lo(){let e=[];for(let t of $e()){let n=t.current?.child,r=0;for(;n&&r++<200;){if(n.tag===xn&&n.stateNode){e.push(n);break}n=n.child}}return e}l(lo,"rootHostFibers");function il(e,t){let n=globalThis.nativeFabricUIManager;if(!n||typeof n.findNodeAtPoint!="function")return null;let r=lo().filter(o=>o.stateNode?.node);return r.length?new Promise(o=>{let i=setTimeout(()=>o(null),1e3),s=r.length,a=null;r.forEach((u,c)=>{try{n.findNodeAtPoint(u.stateNode.node,e,t,d=>{d&&(!a||c>=a.i)&&(a={i:c,fiber:d}),--s===0&&(clearTimeout(i),o(a?.fiber??null))})}catch{--s===0&&(clearTimeout(i),o(a?.fiber??null))}})}):null}l(il,"fabricFiberAt");function al(e,t){let n=Xt?.findSubviewIn;if(typeof n!="function")return null;let r=lo()[0],o=r?tt(r.stateNode)??Dt(r.stateNode):null;return o==null?null:new Promise(i=>{let s=setTimeout(()=>i(null),1e3);try{n.call(Xt,o,[e,t],a=>{clearTimeout(s),i(typeof a=="number"?ol(a):null)})}catch{clearTimeout(s),i(null)}})}l(al,"paperFiberAt");function ll(){let e=[],t=new Set,n=l(o=>{let i=[],s=l((a,u)=>{for(let c=a;c&&i.length<5e3;c=c.sibling)t.has(c)||u>500||Qr(c)||to(c)||(c.tag===xn&&c.stateNode?i.push(c):c.child&&s(c.child,u+1))},"dig");return o.child&&s(o.child,0),i},"hostChildren"),r=l((o,i)=>{t.has(o)||i>500||(t.add(o),e.push(o),so(n(o)).forEach(s=>r(s,i+1)))},"walk");for(let o of $e())so(n(o.current)).forEach(i=>r(i,0));return e}l(ll,"visibleHostFibers");function so(e){let t=e.map(n=>{let r=Number(An(le(n)?.style).zIndex);return Number.isFinite(r)?r:0});return e.map((n,r)=>({h:n,i:r})).sort((n,r)=>t[n.i]-t[r.i]||n.i-r.i).map(({h:n})=>n)}l(so,"sortByZ");function An(e,t=0){return!e||typeof e!="object"||t>10?{}:Array.isArray(e)?Object.assign({},...e.map(n=>An(n,t+1))):e}l(An,"flatStyle");var qd=new Set(["RCTScrollView","AndroidHorizontalScrollView","RCTScrollContentView"]);function sl(e){if(typeof e.type=="string"&&qd.has(e.type)&&e.type!=="RCTScrollContentView")return true;let t=An(le(e)?.style).overflow;return t==="hidden"||t==="scroll"}l(sl,"clipsChildren");function cl(e){let t=le(e)?.pointerEvents??le(e)?.style?.pointerEvents;if(t==="none")return"all";let n=e.return,r=0;for(;n&&r++<200;){let o=le(n)?.pointerEvents??le(n)?.style?.pointerEvents;if(o==="none"||o==="box-only"&&n.tag===xn)return"all";n=n.return}return t==="box-none"?"self":null}l(cl,"passesTouchesThrough");async function ul(e,t,n){let r=await Promise.all(n.map(a=>{let u=Rn(a.stateNode);return u?_e(u):Promise.resolve(null)})),o=new Map;n.forEach((a,u)=>o.set(a,r[u]));let i=l(a=>!!a&&e>=a.x&&e<=a.x+a.width&&t>=a.y&&t<=a.y+a.height,"inside"),s=l(a=>{for(let u=a.return,c=0;u&&c<300;u=u.return,c++)if(u.tag===xn&&o.has(u)&&sl(u)&&!i(o.get(u)))return true;return false},"clippedAway");for(let a=n.length-1;a>=0;a--)if(!(!i(r[a])||cl(n[a])||s(n[a])))return n[a];return null}l(ul,"measuredFiberAt");function dl(e,t){let n=globalThis.document,r=globalThis.window;if(!n?.elementFromPoint||!r)return null;let o=n.elementFromPoint(e*r.innerWidth,t*r.innerHeight);for(;o;){let i=Object.keys(o).find(s=>s.startsWith("__reactFiber$"));if(i)return o[i];o=o.parentElement}return null}l(dl,"domFiberAt");async function gl(e){let t=Math.min(1,Math.max(0,Number(e?.x))),n=Math.min(1,Math.max(0,Number(e?.y)));if(!Number.isFinite(t)||!Number.isFinite(n))return{found:false,method:"none",reason:"x and y must be numbers from 0 to 1."};let r=Ze.get("window"),o=t*r.width,i=n*r.height,s="none",a=null,u=dl(t,n);if(u)s="dom",a=u;else{let v=il(o,i);if(v)s="fabric",a=await v;else{let S=al(o,i);S&&(s="paper",a=await S)}let f=ll();(!a||!new Set(f).has(a))&&(a=await ul(o,i,f),s="measured")}if(!a)return{found:false,method:s};let c=le(a)??{},d=tt(a.stateNode),g=[],T=a,b=0;for(;T&&b++<80&&g.length<6;){let v=Oe(T);v&&typeof T.type!="string"&&!qr.has(v)&&g[g.length-1]!==v&&g.push(v),T=T.return}return{found:true,method:s,buoy:Vn(a),view:{name:Oe(a)??"Unknown",nativeTag:d,testID:c.testID||void 0,label:c.accessibilityLabel||c["aria-label"]||void 0,text:Pn(c)},path:g,target:d!=null?Hn(d):null}}l(gl,"hitTest");async function hl(){let e=[];for(let r of $e())He(r.current,o=>{let i=o.stateNode;o.tag===1&&i&&typeof i.getCamera=="function"&&!Vn(o)&&e.push(o)});let t=Ze.get("window"),n=l(r=>Promise.race([r,new Promise(o=>setTimeout(()=>o(null),1e3))]),"timeout");return{maps:(await Promise.all(e.slice(0,5).map(async r=>{try{let o=await n(Promise.resolve(r.stateNode.getCamera()));if(!o)return null;let i=Dn(r),s=i?await _e(i.instance):null,a=le(r)??{};return{name:Oe(r)??"Map",testID:typeof a.testID=="string"?a.testID:void 0,frame:s&&t.width&&t.height?{x:ke(s.x/t.width),y:ke(s.y/t.height),width:ke(s.width/t.width),height:ke(s.height/t.height)}:void 0,camera:{heading:typeof o.heading=="number"?o.heading:void 0,pitch:typeof o.pitch=="number"?o.pitch:void 0,altitude:typeof o.altitude=="number"?o.altitude:void 0,zoom:typeof o.zoom=="number"?o.zoom:void 0,center:o.center}}}catch{return null}}))).filter(r=>!!r)}}l(hl,"readMaps");Cn();U();U();function pl(e){return!!e&&typeof e=="object"&&("next"in e||"queue"in e||"memoizedState"in e)}l(pl,"isHookList");function co(e,t,n){if(e===t)return false;if(n?.isClassComponent||!pl(t))return true;let r=e,o=t;for(let i=0;o!=null&&i<64;i++){if(o.queue!=null&&(r==null||!Object.is(r.memoizedState,o.memoizedState)))return true;o=o.next,r=r!=null?r.next:null}return false}l(co,"hookStateChanged");function ml(e,t){return co(e?.memoizedState,t?.memoizedState,{isClassComponent:t?.tag===1})}l(ml,"ownStateChanged");var fl={RCTText:{alwaysTrack:["children"],skip:[],description:"Text component - children is the displayed content"},RCTVirtualText:{alwaysTrack:["children"],skip:[],description:"Virtual Text (nested) - children is the displayed content"},RCTView:{alwaysTrack:[],skip:["children"],description:"View container - children are React elements"},RCTImageView:{alwaysTrack:["source"],skip:["children"],description:"Image - source contains the image URL/require"},RCTTextInput:{alwaysTrack:["value","defaultValue"],skip:["children"],description:"TextInput - value is the input content"},RCTSwitch:{alwaysTrack:["value"],skip:["children"],description:"Switch - value is the toggle state"},default:{alwaysTrack:[],skip:["children"],description:"Unknown component type"}};function yl(e){return e&&fl[e]||fl.default}l(yl,"getComponentPropConfig");var En=new WeakMap;function Fn(e){if(!e)return;let t=En.get(e);if(t||e.alternate&&(t=En.get(e.alternate),t))return t}l(Fn,"getComponentFiberPrevState");function bl(e,t){e&&(En.set(e,t),e.alternate&&En.set(e.alternate,t))}l(bl,"setComponentFiberState");var Ie=new Map,uo=500,Jd=10,go=50,vl=50,Yd=new Set(["View","Text","TextImpl","Image","ScrollView","FlatList","SectionList","TouchableOpacity","TouchableHighlight","TouchableWithoutFeedback","Pressable","TextInput","Switch","ActivityIndicator","Modal","StatusBar","KeyboardAvoidingView","AnimatedComponent","AnimatedComponentWrapper","Fragment","Suspense","Provider","Consumer","Context","ForwardRef","Unknown","Component"]);function ho(e){return!!(!e||Yd.has(e)||e.startsWith("Animated"))}l(ho,"isInternalComponentName");function po(e){if(!e)return null;let t=e._debugOwner||e.return,n=0,r=null;for(;t&&n<30;){let o=t.tag;if(o===0||o===1||o===11||o===15){let i=Ae(t);if(r||(r=t),!ho(i))return t}t=t.return,n++}return r}l(po,"getOwningComponentFiber");function Ae(e){if(!e)return null;let t=e.type;if(t){if(typeof t=="string")return t;if(t.displayName)return t.displayName;if(t.name)return t.name}return null}l(Ae,"getComponentNameFromFiber");function Cl(e){if(!e||typeof e!="object")return"unknown";if(e.queue!==null&&e.queue!==void 0)return"useState";let t=e.memoizedState;if(t!==null&&typeof t=="object"&&!Array.isArray(t)&&"current"in t&&Object.keys(t).length===1)return"useRef";if(Array.isArray(t)&&t.length===2){let[,n]=t;if(Array.isArray(n)||n===null)return typeof t[0]=="function"?"useCallback":"useMemo"}return t!==null&&typeof t=="object"&&!Array.isArray(t)&&("tag"in t||"create"in t||"destroy"in t)?"useEffect":"unknown"}l(Cl,"detectHookType");function Tl(e,t){let n=e?.memoizedState;switch(t){case"useState":case"useReducer":return n;case"useRef":return n?.current;case"useMemo":case"useCallback":return Array.isArray(n)?n[0]:n;case"useEffect":return"[effect]";default:return n}}l(Tl,"extractHookValue");function nt(e){if(!e?.memoizedState)return null;let t=e.memoizedState;if(typeof t!="object"||t===null||!("next"in t)&&!("queue"in t)&&!("memoizedState"in t))return null;let n=[],r=t,o=0;for(;r!==null&&o<go;){let i=Cl(r),s=Tl(r,i);n.push({index:o,type:i,value:s,rawState:r.memoizedState}),r=r.next,o++}return n.length>0?n:null}l(nt,"extractHookStates");function wl(e,t){if(!e||!t)return null;let n=[],r=Math.max(e.length,t.length);for(let o=0;o<r;o++){let i=e[o],s=t[o];if(!i&&s){n.push({index:o,type:s.type,currentValue:en(s.value,s.type),description:`Hook[${o}] added`});continue}if(i&&!s){n.push({index:o,type:i.type,previousValue:en(i.value,i.type),description:`Hook[${o}] removed`});continue}if(i&&s){if(i.rawState===s.rawState||s.type==="useEffect"||s.type==="useMemo"||s.type==="useCallback")continue;if(s.type==="useState"||s.type==="useReducer"||s.type==="useRef"){let a=en(i.value,i.type),u=en(s.value,s.type);n.push({index:o,type:s.type,previousValue:a,currentValue:u,description:`${a} \u2192 ${u}`})}}}return n.length>0?n:null}l(wl,"compareHookStates");function en(e,t){return rt(e)}l(en,"formatHookValue");function rt(e){if(e===null)return null;if(e!==void 0)return typeof e=="boolean"||typeof e=="number"?e:typeof e=="string"?e.length>30?e.slice(0,30)+"...":e:typeof e=="function"?`[Function: ${e.name||"anonymous"}]`:Array.isArray(e)?`[Array: ${e.length} items]`:typeof e=="object"?`{Object: ${Object.keys(e).length} keys}`:String(e)}l(rt,"formatDisplayValue");function Sl(e){if(!e)return{cause:"unknown",hookChanges:null};let t=e,n=e.alternate,r=Fn(e);if(r&&n){let u=nt(e),c=nt(n),d=r.extractedHooks;if(u&&c&&d&&d.length>0){let g=d.find(T=>T.type==="useState");if(g){let T=u.find(v=>v.index===g.index),b=c.find(v=>v.index===g.index);if(T&&b){let v=T.value===g.value,f=b.value===g.value;v&&!f&&(t=n,n=e)}}}}let o=nt(t),i=null,s=null,a=null;return n?(i=n.memoizedProps,s=n.memoizedState,a=nt(n)):r&&(i=r.memoizedProps,s=r.memoizedState,a=r.extractedHooks),bl(t,{memoizedProps:t.memoizedProps,memoizedState:t.memoizedState,extractedHooks:o}),i===null?{cause:"mount",hookChanges:null}:Mn(i,t.memoizedProps)?co(s,t.memoizedState,{isClassComponent:t.tag===1})?{cause:"state",hookChanges:wl(a,o)}:{cause:"parent",hookChanges:null}:{cause:"props",hookChanges:null}}l(Sl,"detectComponentCause");function Mn(e,t){if(e===t)return true;if(!e||!t||typeof e!="object"||typeof t!="object")return false;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return false;for(let o of n)if(e[o]!==t[o])return false;return true}l(Mn,"shallowEqual");function ot(e,t=3){let n=new WeakSet;function r(o,i){if(i>t)return"[MAX_DEPTH]";if(o===null)return null;if(o===void 0)return;if(typeof o=="function")return`[Function: ${o.name||"anonymous"}]`;if(typeof o=="symbol")return`[Symbol: ${o.toString()}]`;if(typeof o!="object")return o;if(n.has(o))return"[Circular]";if(n.add(o),Array.isArray(o))return o.slice(0,10).map(u=>r(u,i+1));let s={},a=Object.keys(o).slice(0,20);for(let u of a)try{s[u]=r(o[u],i+1)}catch{s[u]="[Error accessing]"}return s}return l(r,"stringify"),r(e,0)}l(ot,"safeStringify");function kt(e){return e===void 0?"undefined":{0:"FunctionComponent",1:"ClassComponent",2:"IndeterminateComponent",3:"HostRoot",4:"HostPortal",5:"HostComponent",6:"HostText",7:"Fragment",8:"Mode",9:"ContextConsumer",10:"ContextProvider",11:"ForwardRef",12:"Profiler",13:"SuspenseComponent",14:"MemoComponent",15:"SimpleMemoComponent"}[e]||`Unknown(${e})`}l(kt,"getTagName");function xl(e,t){if(!(!t.hookChanges||t.hookChanges.length===0))for(let n of t.hookChanges)console.log("[Buoy]",`[${e||"Unknown"}] ${n.type}[${n.index}]: ${n.previousValue} \u2192 ${n.currentValue}`)}l(xl,"logMinimal");function Il(e,t,n,r,o){let i=Ae(n)||"Unknown",s=typeof t?.type=="string"?t.type:"Unknown",{cause:a,hookChanges:u}=r;if(console.log("[Buoy]",`[RENDER] ${i} (${s}:${e}) | Cause: ${a.toUpperCase()}`+(o&&o.length>0?` | Props: [${o.join(", ")}]`:"")),u&&u.length>0)for(let c of u)console.log("[Buoy]",` \u2514\u2500 ${c.type}[${c.index}]: ${c.previousValue} \u2192 ${c.currentValue}`)}l(Il,"logVerbose");function mo(e,t,n,r,o,i,s){let a=Ae(n)||"Unknown",u=typeof t?.type=="string"?t.type:"Unknown";console.log("[Buoy]",`
|
|
27
|
+
[RN-BUOY RENDER DEBUG] \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550`),console.log("[Buoy]",`Render #${s} for ${u} (nativeTag: ${e})`),console.log("[Buoy]",`Timestamp: ${new Date().toISOString()}`),console.log("[Buoy]",`\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550
|
|
28
|
+
`),console.log("[Buoy]",`NATIVE FIBER (${u}):`),console.log("[Buoy]",` type: "${t?.type}"`),console.log("[Buoy]",` tag: ${t?.tag} (${kt(t?.tag)})`);let c=t?.alternate;console.log("[Buoy]",` Previous values source: ${c?"alternate":r?"storage":"none"}`);let d=t?.memoizedProps?.children,g=c?.memoizedProps?.children,T=g!==void 0?g:r?.memoizedProps?.children,b=T!==void 0?d!==T:false;console.log("[Buoy]",` memoizedProps.children: ${rt(d)}${b?` (was: ${rt(T)})`:T!==void 0?" (unchanged)":" (first render)"}`);let v=t?.memoizedProps?.style,f=c?.memoizedProps?.style,S=f!==void 0?f:r?.memoizedProps?.style,C=S!==void 0?v!==S:false;if(v&&(console.log("[Buoy]",` memoizedProps.style: ${JSON.stringify(ot(v,2))}${C?" (REFERENCE CHANGED)":""}`),C&&S)){let V=tn(v,S);console.log("[Buoy]",` \u2514\u2500 Values actually changed: ${!V}`)}console.log("[Buoy]",` All memoizedProps keys: [${Object.keys(t?.memoizedProps||{}).join(", ")}]`);let N=t?.memoizedProps?.testID,m=t?.memoizedProps?.nativeID,k=t?.memoizedProps?.accessibilityLabel;if(N&&console.log("[Buoy]",` testID: "${N}"`),m&&console.log("[Buoy]",` nativeID: "${m}"`),k&&console.log("[Buoy]",` accessibilityLabel: "${k}"`),console.log("[Buoy]",` alternate: ${c?"YES":"NO"}`),c&&console.log("[Buoy]",` alternate.memoizedProps.children: ${rt(g)}`),console.log("[Buoy]"," Tree structure:"),console.log("[Buoy]",` return (parent): ${t?.return?kt(t.return.tag):"null"}`),console.log("[Buoy]",` child: ${t?.child?kt(t.child.tag):"null"}`),console.log("[Buoy]",` sibling: ${t?.sibling?kt(t.sibling.tag):"null"}`),console.log("[Buoy]",""),console.log("[Buoy]",`COMPONENT FIBER (${a}):`),n){if(console.log("[Buoy]",` name: "${a}"`),console.log("[Buoy]",` type: ${typeof n.type} (${n.type?.name||n.type?.displayName||"anonymous"})`),console.log("[Buoy]",` tag: ${n.tag} (${kt(n.tag)})`),console.log("[Buoy]",` memoizedProps: ${JSON.stringify(ot(n.memoizedProps,2))}`),console.log("[Buoy]",` alternate: ${n.alternate?"YES":"NO"}`),n.alternate){console.log("[Buoy]",` ALTERNATE memoizedProps: ${JSON.stringify(ot(n.alternate.memoizedProps,2))}`);let L=!Mn(n.alternate.memoizedProps,n.memoizedProps);console.log("[Buoy]",` Props changed (vs alternate): ${L?"YES":"NO"}`),console.log("[Buoy]",` ALTERNATE memoizedState: ${n.alternate.memoizedState===n.memoizedState?"SAME":"DIFFERENT"}`)}let V=Fn(n);if(V){console.log("[Buoy]",` WeakMap PREVIOUS memoizedProps: ${JSON.stringify(ot(V.memoizedProps,2))}`);let L=!Mn(V.memoizedProps,n.memoizedProps);console.log("[Buoy]",` Props changed (vs WeakMap): ${L?"YES":"NO"}`)}else console.log("[Buoy]"," WeakMap PREVIOUS state: (not found - first render or WeakMap cleared)");if(n._debugOwner){let L=Ae(n._debugOwner);console.log("[Buoy]",` _debugOwner: "${L}"`);let ue=n._debugOwner,pe=1;for(;ue&&pe<5;){let Fe=Ae(ue);console.log("[Buoy]",` \u2514\u2500[${pe}] ${Fe||"unknown"} (tag: ${ue.tag})`),ue=ue._debugOwner,pe++}}let j=0,x=t._debugOwner||t.return;for(;x&&x!==n&&j<30;)x=x.return,j++;console.log("[Buoy]",` Depth from native fiber: ${j}`)}else console.log("[Buoy]"," (No component fiber found - could not walk up tree)");if(console.log("[Buoy]",""),console.log("[Buoy]","HOOKS:"),n?.memoizedState){let V=nt(n),j=n.alternate?nt(n.alternate):null,x=Fn(n),L=j||x?.extractedHooks,ue=j?"alternate":x?"WeakMap":"none";V&&V.length>0?(console.log("[Buoy]",` Total hooks: ${V.length}`),console.log("[Buoy]",` Previous values source: ${ue}`),V.forEach((pe,Fe)=>{let ye=L?.[Fe],Rr=ye?ye.rawState!==pe.rawState:false,St=ye?rt(ye.value):"N/A",jt=Rr?" \u2190 CHANGED":"";console.log("[Buoy]",` [${Fe}] ${pe.type}: ${rt(pe.value)}${ye?` (was: ${St})`:" (first render)"}${jt}`)})):(console.log("[Buoy]"," (Could not extract hooks - memoizedState structure not recognized)"),console.log("[Buoy]",` Raw memoizedState type: ${typeof n.memoizedState}`),console.log("[Buoy]",` Has 'next' property: ${"next"in(n.memoizedState||{})}`),console.log("[Buoy]",` Has 'queue' property: ${"queue"in(n.memoizedState||{})}`))}else console.log("[Buoy]"," (No memoizedState - class component, no hooks, or not a function component)");if(console.log("[Buoy]",""),console.log("[Buoy]","RAW HOOKS DATA:"),n?.memoizedState&&typeof n.memoizedState=="object"){let V=n.memoizedState,j=0;for(;V&&j<10;)console.log("[Buoy]",` Hook[${j}]:`),console.log("[Buoy]",` memoizedState: ${ot(V.memoizedState,2)}`),console.log("[Buoy]",` baseState: ${ot(V.baseState,2)}`),console.log("[Buoy]",` queue: ${V.queue?"[Queue present]":"null"}`),console.log("[Buoy]",` next: ${V.next?"[Next hook]":"null"}`),V=V.next,j++;j===0&&console.log("[Buoy]"," (memoizedState is not a hooks linked list)")}console.log("[Buoy]",""),console.log("[Buoy]","DETECTION RESULTS:"),console.log("[Buoy]",` Component Cause: ${o.cause.toUpperCase()}`),o.hookChanges&&o.hookChanges.length>0&&(console.log("[Buoy]"," Hook Changes Detected:"),o.hookChanges.forEach(V=>{console.log("[Buoy]",` [${V.index}] ${V.type}: ${V.previousValue} \u2192 ${V.currentValue}`),V.description&&console.log("[Buoy]",` ${V.description}`)}));let P=typeof t?.type=="string"?t.type:void 0,D=fo(r?.memoizedProps,t?.memoizedProps,P);D&&D.length>0?console.log("[Buoy]",` Native Props Changed: [${D.join(", ")}]`):r&&console.log("[Buoy]"," Native Props Changed: (none detected)"),console.log("[Buoy]",""),console.log("[Buoy]","BATCH CONTEXT:"),console.log("[Buoy]",` Batch size: ${i.size}`),console.log("[Buoy]",` All tags in batch: [${Array.from(i).slice(0,20).join(", ")}${i.size>20?"...":""}]`);let W=vo(t),Z=W!==null&&i.has(W);if(console.log("[Buoy]",` Parent nativeTag: ${W??"not found"}`),console.log("[Buoy]",` Parent in batch: ${Z?"YES":"NO"}`),i.size>1){console.log("[Buoy]"," Components in same batch:");let V=t?.return,j=0;for(;V&&j<10;){let x=Co(V.stateNode);if(x!==null&&i.has(x)){let L=Ae(V)||V.type;console.log("[Buoy]",` [depth ${j}] ${L} (tag: ${x})`)}V=V.return,j++}}console.log("[Buoy]",`
|
|
29
29
|
\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550
|
|
30
|
-
`)}function Cr(e,t,n,r="off"){let o=Date.now();if(!t)return{type:"unknown",timestamp:o};let i=t,l=t.alternate,a=Se.get(e);if(a&&l){let R=a.memoizedProps?.children,_=t.memoizedProps?.children,Q=l.memoizedProps?.children,z=t.memoizedProps===a.memoizedProps||R!==void 0&&_===R,W=l.memoizedProps===a.memoizedProps||R!==void 0&&Q===R;z&&!W&&(i=l,l=t,r==="all"&&console.log("[RenderCause] Detected fiber swap - using alternate as current"))}let c=null,s=null;l?(c=l.memoizedProps,s=l.memoizedState):a&&(c=a.memoizedProps,s=a.memoizedState);let u=c!==null?{memoizedProps:c,memoizedState:s,timestamp:o}:void 0,p={memoizedProps:i.memoizedProps,memoizedState:i.memoizedState,timestamp:o};Mc(e,p);let T=bi(i),y=Me(T)||void 0,b=Hc(i,y)||void 0,f=Nc(T),S=f.cause,v=f.hookChanges;if(!u){if(r!=="off"){if(r==="minimal")console.log(`[${y||"Unknown"}] MOUNT`);else if(r==="verbose"){let R=typeof i?.type=="string"?i.type:"Unknown";console.log(`[RENDER] ${y||"Unknown"} (${R}:${e}) | Cause: MOUNT`)}else if(r==="all"){let R=Se.has(e)?Se.size:1;vi(e,i,T,u,f,n,R)}}return{type:"mount",timestamp:o,componentCause:"mount",componentName:y}}let P=typeof i.type=="string"?i.type:void 0,g=Ci(u.memoizedProps,p.memoizedProps,P);if(r!=="off"){if(r==="minimal")zc(y,f);else if(r==="verbose")Vc(e,i,T,f,g);else if(r==="all"){let R=Se.has(e)?Se.size:1;vi(e,i,T,u,f,n,R)}}if(g&&g.length>0)return{type:"props",changedKeys:g.slice(0,Rc),timestamp:o,componentCause:S,componentName:y,parentComponentName:b,hookChanges:v||void 0};let D=Ac(u.memoizedState,p.memoizedState);if(D&&D.length>0)return{type:"hooks",hookIndices:D,timestamp:o,componentCause:S,componentName:y,parentComponentName:b,hookChanges:v||void 0};let k=Si(i);return k&&n.has(k)?{type:"parent",timestamp:o,componentCause:S,componentName:y,parentComponentName:b,hookChanges:v||void 0}:S==="state"?{type:"state",timestamp:o,componentCause:S,componentName:y,parentComponentName:b,hookChanges:v||void 0}:S==="props"?{type:"props",timestamp:o,componentCause:S,componentName:y,parentComponentName:b}:S==="parent"?{type:"parent",timestamp:o,componentCause:S,componentName:y,parentComponentName:b}:{type:"unknown",timestamp:o,componentCause:S,componentName:y,parentComponentName:b}}function Ci(e,t,n){if(e===t||!e||!t||typeof e!="object"||typeof t!="object"||Array.isArray(e)||Array.isArray(t))return null;let r=xc(n),o=new Set([...Object.keys(e),...Object.keys(t)]),i=[];for(let l of o)if(!l.startsWith("__")&&!r.skip.includes(l)){if(l==="children"){if(!r.alwaysTrack.includes("children"))continue;let a=e[l],c=t[l];a!==c&&(Ti(a)&&Ti(c)?i.push(`children: ${wi(a)} \u2192 ${wi(c)}`):i.push("children (content)"));continue}if(e[l]!==t[l]){let a=e[l],c=t[l];l==="style"?fn(a,c)?i.push(`${l} (ref only)`):i.push(l):typeof a=="function"&&typeof c=="function"?i.push(`${l} (fn ref)`):i.push(l)}}return i.length>0?i:null}function fn(e,t,n=0){if(n>5)return false;if(e===t)return true;if(typeof e!=typeof t)return false;if(typeof e!="object"||e===null||t===null)return e===t;if(Array.isArray(e)!==Array.isArray(t))return false;if(Array.isArray(e)){if(e.length!==t.length)return false;for(let i=0;i<e.length;i++)if(!fn(e[i],t[i],n+1))return false;return true}let r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return false;for(let i of r)if(!o.includes(i)||!fn(e[i],t[i],n+1))return false;return true}function Ti(e){return e==null||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function wi(e){return e===null?"null":e===void 0?"undefined":typeof e=="string"?e.length>20?`"${e.slice(0,20)}..."`:`"${e}"`:typeof e=="number"||typeof e=="boolean"?String(e):"[object]"}function Ac(e,t){if(e===t||e==null||t==null||typeof e!="object"||typeof t!="object")return null;let n=[],r=e,o=t,i=0;for(;o!==null&&i<br;)(r===null||Bc(r,o))&&n.push(i),o=o?.next??null,r=r?.next??null,i++;return n.length>0?n:null}function Bc(e,t){return e===t?false:e.memoizedState!==t.memoizedState||e.baseState!==void 0&&e.baseState!==t.baseState}function Si(e){let t=e?.return,n=0;for(;t&&n<mi;){if(t.stateNode){let r=xi(t.stateNode);if(r!=null)return r}t=t.return,n++}return null}function Hc(e,t){if(!e)return null;let n=bi(e);if(!n)return null;let r=n.return,o=0;for(;r&&o<mi;){let i=r.tag;if(i===0||i===1||i===11||i===15){let l=Me(r);if(l&&!yi(l)&&l!==t)return l}r=r.return,o++}return null}function xi(e){return e?typeof e.__nativeTag=="number"?e.__nativeTag:typeof e._nativeTag=="number"?e._nativeTag:typeof e.canonical?.__nativeTag=="number"?e.canonical.__nativeTag:typeof e.canonical?.publicInstance?.__nativeTag=="number"?e.canonical.publicInstance.__nativeTag:null:null}function Mc(e,t){if(Se.size>=yr){let n=Array.from(Se.entries());n.sort((o,i)=>o[1].timestamp-i[1].timestamp);let r=Math.floor(yr/4);for(let o=0;o<r;o++)Se.delete(n[o][0])}Se.set(e,t)}function Ii(){Se.clear()}function $c(e){Se.delete(e)}function Fc(){return{storedStates:Se.size,maxStates:yr}}var Ec=5,Ri=200,mn=20,yn=30;function $e(e,t=0,n=new WeakSet){if(e==null||typeof e=="boolean"||typeof e=="number")return e;if(typeof e=="string")return e.length>Ri?e.slice(0,Ri)+"...":e;if(typeof e=="function")return`[Function: ${e.name||"anonymous"}]`;if(typeof e=="symbol")return`[Symbol: ${e.description||""}]`;if(t>=Ec)return Array.isArray(e)?`[Array: ${e.length} items]`:typeof e=="object"?`[Object: ${Object.keys(e).length} keys]`:"[...]";if(typeof e=="object"){if(n.has(e))return"[Circular]";n.add(e)}if(Array.isArray(e)){let r=e.slice(0,mn).map(o=>$e(o,t+1,n));return e.length>mn&&r.push(`[...${e.length-mn} more]`),r}if(e instanceof Date)return e.toISOString();if(e instanceof Error)return`[Error: ${e.message}]`;if(e instanceof RegExp)return e.toString();if(e instanceof Map){let r={__type:"Map",__size:e.size},o=0;for(let[i,l]of e){if(o>=yn){r[`...${e.size-o} more`]=true;break}let a=typeof i=="string"?i:String(i);r[a]=$e(l,t+1,n),o++}return r}if(e instanceof Set)return{__type:"Set",__size:e.size,values:Array.from(e).slice(0,mn).map(r=>$e(r,t+1,n))};if(typeof e=="object"){let r={},o=Object.keys(e),i=o.slice(0,yn);for(let l of i)if(!(l.startsWith("__")||l==="children"))try{r[l]=$e(e[l],t+1,n)}catch{r[l]="[Error accessing property]"}return o.length>yn&&(r[`...${o.length-yn} more keys`]=true),r}return"[Unknown type]"}function Oc(e){if(e?.memoizedProps)return $e(e.memoizedProps)}function _c(e){if(!e?.memoizedState)return;let t=e.memoizedState;if(typeof t=="object"&&t!==null&&"next"in t){let n=[],r=t,o=0;for(;r&&o<br;)n.push({index:o,memoizedState:$e(r.memoizedState)}),r=r.next,o++;return{__type:"Hooks",hooks:n}}return $e(t)}import{notifySubscriberCountChange as Di}from"@buoy-gg/shared-ui/web";j();var Tr=new Set(["HighlightUpdatesOverlay","HighlightUpdatesModal","HighlightFilterView","RenderDetailView","RenderListItem","RenderListItemInner","RenderHistoryViewer","RenderHistoryFooter","RenderCauseBadge","TwoLevelCauseBadge","EnhancedCauseDisplay","IsolatedRenderList","IsolatedRenderListInner","StatsDisplay","StatsDisplayInner","CurrentStateView","EventStepperFooter","EventsModal","UnifiedEventList","UnifiedEventItem","UnifiedEventDetail","UnifiedEventFilters","UnifiedEventViewer","ReactQueryEventDetail","EventsCopySettingsView"]),Wt=["HighlightUpdates","RenderList","RenderDetail","RenderHistory","RenderCause","EventStepper","UnifiedEvent","EventsModal","EventsCopy"],ki=new Set(["JsModalComponent","JsModal","TypePicker","PatternInput","PatternChip","DetectedItemsSection","DetectedCategoryBadge","IdentifierBadge","CategoryBadge","AppRenderer","AppOverlay","FloatingTools","DialDevTools","DevToolsVisibilityProvider","AppHostProvider","MinimizedToolsProvider","ModalHeader","TabSelector","SectionHeader","DraggableHeader","WindowControls","TreeDiffViewer","DataViewer","SplitDiffViewer","VirtualizedDataExplorer","DiffSummary","TypeLegend","IndentGuides","IndentGuidesOverlay","CyberpunkInput","DiffView","AnswerCard","DetailsSection","DetailRow","QuickActionsSection","FilterOptionCard","SearchSection","SearchSectionInner","HeaderActions","HeaderActionsInner","MainListHeader","FilterViewHeader","DetailViewHeader","FloatingMenu","FloatingDevTools","MinimizedToolsStack","MinimizedToolsContext","GlitchToolButton","ExpandablePopover","CollapsedPeek","ExpandedWrapper","DialIcon","DialMenu","DialIconItem","OnboardingTooltip","MenuLauncherIcon","DevToolsSettingsModal","SettingsModal","ImageOverlayModal","ImageOverlayStandalone","ToolCard","ToolIcon","GripVerticalIcon","UserStatus","Divider","ChevronDown","ChevronUp","ChevronLeft","ChevronRight","ChevronDownIcon","ChevronUpIcon","ChevronLeftIcon","ChevronRightIcon","LogBox","LogBoxLog","LogBoxLogNotification","LogBoxNotificationContainer","_LogBoxNotificationContainer","LogBoxInspector","LogBoxInspectorContainer","LogBoxInspectorHeader","LogBoxInspectorBody","LogBoxInspectorFooter","LogBoxInspectorMessageHeader","LogBoxInspectorStackFrame","LogBoxInspectorSection","LogBoxButton","LogBoxMessage","PerfMonitorOverlay","PerfMonitorModal","PerfMonitorRoot","PerfHudInline","PerfDiagnostics","MetricSparkline","JsFallbackNotice","AutomationConfigView","AutomationProgressOverlay","AutomationResumer","SaveBenchmarkPrompt","SavedCasesModal","BatchBarReport","BatchReportView","PerfHudInlineInner","PerfMonitorOverlayInner","MiniMetric","MetricRow","MetricNumber","MetricSparklineInner","RecColumn","PillBody","FullBody","TargetLine","PagesSection","ProbesSection","TaskTable","TaskRow","BusySparkline"]),wr=["JsModal","ImageOverlay","PerfMonitor","PerfHud","JsTop"],Pi=new Set(["VirtualizedDataExplorer","TreeDiffView","TreeDiffRow","DataViewer","DiffView","DiffSummary","FloatingDevTools","FloatingMenu","FloatingBubble","MinimizedDock","DialMenu","DialItem","ExpandableSection","ChevronIcon","GlitchText","SettingsModal","SettingsRow","OnboardingFlow","DevToolsMenu"]),Sr=false;function Wc(e){Sr=e}function Li(){return Sr}var jc=new Set(["PerfHudInline","PerfHudInlineInner","PerfDiagnostics","MetricSparkline","MetricSparklineInner","JsFallbackNotice","AutomationConfigView","AutomationProgressOverlay","AutomationResumer","SaveBenchmarkPrompt","SavedCasesModal","BatchBarReport","BatchReportView","MiniMetric","MetricRow","MetricNumber","RecColumn","PillBody","FullBody","TargetLine","PagesSection","ProbesSection"]);function Ni(e){return e.startsWith("PerfMonitor")||e.startsWith("PerfHud")||jc.has(e)}var Uc=new Set(["TaskTable","TaskRow","BusySparkline"]);function Gc(e){return e.startsWith("JsTop")||Uc.has(e)}function Kc(e){if(Tr.has(e))return true;for(let t=0;t<Wt.length;t++)if(e.startsWith(Wt[t]))return true;if(Sr)return Ni(e)||Gc(e);if(ki.has(e)||Pi.has(e))return true;for(let t=0;t<wr.length;t++)if(e.startsWith(wr[t]))return true;return false}function qc(e){if(Tr.has(e))return true;for(let t=0;t<Wt.length;t++)if(e.startsWith(Wt[t]))return true;return false}var ce=false,vt=false,Fe=false,ze=false,ie=null,Ve=null,bn=null,jt=null,zi=false,Ce=false,vn=new Set,xr=new Set,Ir=new Map,Rr=["#37afa9","#63b19e","#80b393","#97b488","#abb67d","#beb771","#cfb965","#dfba57","#efbb49","#febc38"],Jc=false;function q(e,t){Jc&&(t!==void 0?console.log(`[HighlightUpdates] ${e}`,t):console.log(`[HighlightUpdates] ${e}`))}function Dr(e){let t=Fl(e);if(t)return t;if(!e)return null;let n=e;return n.canonical?.publicInstance?n.canonical.publicInstance:n.canonical&&typeof n.canonical.measure=="function"?n.canonical:typeof n.measure=="function"?n:null}function Ct(e){let t=$l(e);if(t!==null)return t;if(e==null)return null;let n=e;if(n.__nativeTag!=null)return n.__nativeTag;if(n._nativeTag!=null)return n._nativeTag;if(n.nativeTag!=null)return n.nativeTag;if(n.canonical){if(n.canonical.__nativeTag!=null)return n.canonical.__nativeTag;if(n.canonical._nativeTag!=null)return n.canonical._nativeTag;if(n.canonical.nativeTag!=null)return n.canonical.nativeTag}return null}function kr(e){let t=e,n={viewType:"Unknown"};t?.canonical?.viewConfig?.uiViewClassName?n.viewType=t.canonical.viewConfig.uiViewClassName:t?.viewConfig?.uiViewClassName?n.viewType=t.viewConfig.uiViewClassName:Wo(t)&&(n.viewType=t.tagName.toLowerCase());let r=t?.canonical?.internalInstanceHandle||t?._internalInstanceHandle||t?._internalFiberInstanceHandleDEV||Zn(t),o=t?.canonical?.currentProps,i=t?.canonical?.pendingProps,l=r?.pendingProps,a=r?.memoizedProps;return n.testID=o?.testID||i?.testID||l?.testID||a?.testID||l?.["data-testid"]||a?.["data-testid"]||void 0,n.nativeID=o?.nativeID||i?.nativeID||l?.nativeID||a?.nativeID||l?.id||a?.id||void 0,n.accessibilityLabel=o?.accessibilityLabel||i?.accessibilityLabel||l?.accessibilityLabel||a?.accessibilityLabel||l?.["aria-label"]||a?.["aria-label"]||void 0,n.componentName=ru(r)||void 0,n}var Vi=false,Yc=false,Pr=null;var Xc=new Set;var Qc=new Set(["highlight-updates-overlay","__rn_buoy__highlight-modal"]),Zc=new Set(["jsmodal-root","image-overlay-standalone","logbox_inspector","logbox"]),Ze=new Map,Ai=500;function eu(){Ze.clear()}function Bi(e){return e?!!(Qc.has(e)||e.startsWith("__highlight_")):false}function Hi(e){if(!e)return false;if(Zc.has(e))return true;let t=e.charCodeAt(0);return!!(t===95&&e.startsWith("__rn_buoy__")||t===108&&e.startsWith("logbox"))}function Mi(e){if(!e)return null;let t=e.type;if(t){if(typeof t=="string")return t;if(t.name)return t.name;if(t.displayName)return t.displayName}let n=e.elementType;if(n){if(n.name)return n.name;if(n.displayName)return n.displayName}return null}var tu=new Set(["View","Text","TextImpl","Image","ScrollView","FlatList","SectionList","TouchableOpacity","TouchableHighlight","TouchableWithoutFeedback","Pressable","TextInput","Switch","ActivityIndicator","Modal","StatusBar","KeyboardAvoidingView","AnimatedComponent","AnimatedComponentWrapper","ScreenContainer","ScreenStack","Screen","ScreenContentWrapper","Svg","G","Path","Rect","Circle","Line","Polygon","Polyline","Ellipse","Text as SVGText","TSpan","TextPath","Use","Symbol","Defs","ClipPath","LinearGradient","RadialGradient","Stop","Mask","Pattern","Image as SVGImage","SafeAreaProvider","SafeAreaView","SafeAreaListener","GestureHandlerRootView","GestureDetector","ReanimatedView","ReanimatedText","ReanimatedImage","ReanimatedScrollView","Fragment","Suspense","Provider","Consumer","Context","ForwardRef"]);function nu(e){return!!(!e||tu.has(e)||e==="Unknown"||e==="Component"||e.startsWith("Animated"))}function ru(e){if(!e)return null;let t=e._debugOwner||e.return,n=0,r=null;for(;t&&n<30;){let o=Mi(t);if(o&&typeof t.type!="string"&&(r||(r=o),!nu(o)))return o;t=t.return,n++}return r}function ou(e){let t=e,n=t?.canonical?.internalInstanceHandle||t?._internalInstanceHandle||t?._internalFiberInstanceHandleDEV||Zn(t),r=Ct(e)||Ct(t?.canonical?.publicInstance),o=Li(),i=!o&&V.getSettings().excludeDevTools;if(i&&Wo(e)&&e.closest("[data-buoy-root]"))return true;if(r!=null&&i){let c=Ze.get(r);if(c!==void 0)return c}let l=false,a=n?.pendingProps?.nativeID||n?.memoizedProps?.nativeID||t?.canonical?.currentProps?.nativeID||null;if((Bi(a)||i&&Hi(a))&&(l=true),!l&&n){let c=n,s=0;for(;c&&s<30;){let u=Mi(c);if(u){if(Tr.has(u)){l=true;break}for(let T of Wt)if(u.startsWith(T)){l=true;break}if(l)break;if(o&&Ni(u)){l=true;break}if(i){if(ki.has(u)||Pi.has(u)){l=true;break}for(let T of wr)if(u.startsWith(T)){l=true;break}if(l)break}}let p=c.pendingProps?.nativeID||c.memoizedProps?.nativeID;if(Bi(p)){l=true;break}if(i&&Hi(p)){l=true;break}c=c.return,s++}}if(l&&r!=null&&i){if(Ze.size>=Ai){let c=Array.from(Ze.keys());for(let s=0;s<Ai/2;s++)Ze.delete(c[s])}Ze.set(r,l)}return l}function iu(e){let t=Math.min(e-1,Rr.length-1);return Rr[Math.max(0,t)]}function au(e){if(e.size===0||!ce&&!Fe||V.getState().isPaused)return;Ke.isEnabled()&&Vl();let t=V.getBatchSize(),n=Ke.startBatch(e.size,t),r=[],o=0,i=0,l=V.hasActiveFilters();for(let s of e)if(s&&typeof s=="object")try{if(ou(s)){o++;continue}let u=Dr(s),p=Ct(s)||Ct(u);if(p==null)continue;let T=kr(s);if(l&&!V.passesFilters(T)){i++;continue}let y=V.getSettings().showRenderCount,b,f;y?(b=(Ir.get(p)||0)+1,Ir.set(p,b),f=iu(b)):(b=0,f=Rr[0]),r.push({node:s,color:f,count:b})}catch{}if(n.markFilteringComplete(o+i,r.length),r.length===0){n.finish();return}Vi&&console.log(`[HighlightUpdates] ${r.length} component(s) re-rendered`);let a=V.getRenderEventCallbackCount()>0;if(!Ve&&!a){Vi&&console.log("[HighlightUpdates] No highlightCallback and no event callbacks - skipping render"),zi=false;return}n.markMeasurementStart();let c=r.slice(0,t*4).map(({node:s,color:u,count:p})=>new Promise(T=>{let y=false,b=g=>{y||(y=true,clearTimeout(f),T(g))},f=setTimeout(()=>b({rect:null,stateNode:s,color:u,count:p}),500),S=Dr(s),v=Ct(s)||Ct(S);if(v==null){b({rect:null,stateNode:s,color:u,count:p});return}let P=(g,D,k,R,_,Q)=>{if(_==null||Q==null||k==null||R==null){b({rect:null,stateNode:s,color:u,count:p});return}b({rect:{id:v,x:_,y:Q,width:k,height:R,color:u,count:p},stateNode:s,color:u,count:p})};if(!S){let g=s.node,D=globalThis.nativeFabricUIManager;if(g&&D?.measure){try{D.measure(g,P)}catch{b({rect:null,stateNode:s,color:u,count:p})}return}b({rect:null,stateNode:s,color:u,count:p});return}try{S.measure(P)}catch{b({rect:null,stateNode:s,color:u,count:p})}}));Promise.all(c).then(s=>{let u=s.filter(T=>T.rect!==null),p=u.map(T=>T.rect);n.markMeasurementComplete(u.length,s.length-u.length),p.length>0&&Ve&&ce&&!vt&&Ve(p),setTimeout(()=>{try{for(let f of u)f.rect&&lu(f.rect.id,f.stateNode)}catch(f){q("registerTrackedNode batch failed",f)}let T=V.getSettings(),y=T.trackRenderCauses&&T.showRenderCount,b=null;if(y){b=new Set;for(let{rect:f}of u)f&&b.add(f.id)}if(ce){V.startBatch();for(let{rect:f,stateNode:S,color:v,count:P}of u)if(f){let g=kr(S),D;if(y&&b){let k=Lr(S);D=Cr(f.id,k,b,T.debugLogLevel)}V.trackRender({nativeTag:f.id,viewType:g.viewType,testID:g.testID,nativeID:g.nativeID,accessibilityLabel:g.accessibilityLabel,componentName:g.componentName,measurements:{x:f.x,y:f.y,width:f.width,height:f.height},color:v,count:P,renderCause:D})}V.endBatch()}else for(let{rect:f,stateNode:S,color:v,count:P}of u)if(f){let g=kr(S),D;if(y&&b){let k=Lr(S);D=Cr(f.id,k,b,T.debugLogLevel)}V.emitRenderEvent({nativeTag:f.id,viewType:g.viewType,testID:g.testID,nativeID:g.nativeID,accessibilityLabel:g.accessibilityLabel,componentName:g.componentName,measurements:{x:f.x,y:f.y,width:f.width,height:f.height},color:v,count:P,renderCause:D})}n.markTrackingComplete(),n.markCallbackComplete(),n.finish()},0)}).catch(s=>{console.error("[HighlightUpdates] Error in measurement pipeline:",s),n.finish()})}var $i=globalThis.WeakRef,Cn=new Map;function lu(e,t){if(!(e==null||t==null||typeof t!="object"))try{Cn.set(e,$i?new $i(t):{deref:()=>t})}catch{Cn.set(e,{deref:()=>t})}}function su(e){let t=Cn.get(e)?.deref();return t||Cn.delete(e),t??null}function cu(e){return new Promise(t=>{try{e.measure((n,r,o,i,l,a)=>{l==null||a==null||o==null||i==null?t(null):t({x:l,y:a,width:o,height:i})})}catch{t(null)}})}function Lr(e){let t=e;return t?.canonical?.internalInstanceHandle||t?._internalInstanceHandle||t?._internalFiberInstanceHandleDEV||Zn(t)||null}function uu(e){let t=Lr(e),n=0;for(;t&&n++<200;){let r=t.stateNode;if(r&&typeof r.scrollTo=="function"){let o=typeof r.getNativeScrollRef=="function"&&r.getNativeScrollRef()||null,i=typeof r.getInnerViewNode=="function"&&r.getInnerViewNode()||typeof r.getScrollableNode=="function"&&r.getScrollableNode()||r;return{instance:r,nativeRef:o,innerNode:i}}t=t.return}return null}async function du(e,t,n){try{let r=uu(e);if(!r)return false;let o=t,i=null,l=a=>new Promise(c=>{let s=false,u=T=>{s||(s=true,c(T))},p=setTimeout(()=>u(null),600);try{a(T=>{clearTimeout(p),u(T)})}catch{clearTimeout(p),u(null)}});if(r.nativeRef&&typeof o.measureLayout=="function"&&(i=await l(a=>o.measureLayout(r.nativeRef,(c,s)=>a(s),()=>a(null)))),i==null){let a=pt(t),c=typeof r.innerNode=="number"?r.innerNode:pt(r.innerNode);a!=null&&c!=null&&(i=await l(s=>Ot.measureLayout(a,c,()=>s(null),(u,p)=>s(p))))}return i==null?false:(r.instance.scrollTo({y:Math.max(0,i-n),animated:false}),await new Promise(a=>setTimeout(a,80)),true)}catch{return false}}function hu(e,t){let n=[e.testID,e.nativeID,e.accessibilityLabel,e.componentName,e.viewType,String(e.nativeTag)],r=0;for(let o of n){if(!o)continue;let i=o.toLowerCase();if(i===t)return 3;i.startsWith(t)?r=Math.max(r,2):i.includes(t)&&(r=Math.max(r,1))}return r}async function gu(e){let t=e.scrollIntoView!==false,n=typeof e.margin=="number"?e.margin:12,r=V.getRenders(),o=async()=>{let v=await dr(),P=(e.query??"").trim().toLowerCase(),g;for(let R of v.elements){if(e.nativeTag!=null&&R.nativeTag===e.nativeTag){g={el:R,score:1e3};break}let _=un({nativeTag:R.nativeTag,testID:R.testID,label:R.label,text:R.text,name:R.name,tap:R.tap},{query:P||void 0,nativeTag:e.nativeTag});_<=0||(!g||_>g.score)&&(g={el:R,score:_})}if(!g?.el.frame)return{matched:false,reason:"no-match",candidates:[]};let D=v.screen,k=g.el.frame;return{matched:true,live:true,rect:{x:k.x*D.width,y:k.y*D.height,width:k.width*D.width,height:k.height*D.height},scale:er.get(),screen:{width:D.width,height:D.height},nativeTag:g.el.nativeTag??void 0,componentName:g.el.name,testID:g.el.testID}};if(r.length===0)return o();let i=(e.query??"").trim().toLowerCase(),l=i?r.map(v=>({r:v,score:hu(v,i)})).filter(v=>v.score>0).sort((v,P)=>P.score-v.score||P.r.lastRenderTime-v.r.lastRenderTime):[],a=l.slice(0,8).map(({r:v})=>({nativeTag:v.nativeTag,componentName:v.componentName,testID:v.testID,nativeID:v.nativeID,viewType:v.viewType,renderCount:v.renderCount})),c=e.nativeTag??(l.length>0?l[0].r.nativeTag:void 0);if(c==null){let v=await o();return v.matched?v:{matched:false,reason:"no-match",candidates:a}}let s=r.find(v=>v.nativeTag===c),u=null,p=false,T=false,y=su(c);if(y){let v=Dr(y);v&&(t&&(T=await du(y,v,n)),u=await cu(v),p=!!u)}if(!u&&s?.measurements&&(u={...s.measurements}),!u)return{matched:false,reason:"no-measurement",nativeTag:c,candidates:a};let b=er.get(),f=qe.get("window"),S=u.x>=-1&&u.y>=-1&&u.x+u.width<=f.width+1&&u.y+u.height<=f.height+1;return{matched:true,live:p,scrolled:T,inView:S,rect:u,scale:b,screen:{width:f.width,height:f.height},nativeTag:c,componentName:s?.componentName,testID:s?.testID,candidates:a}}function Fi(e){if(!ie?.rendererInterfaces){q("No rendererInterfaces available");return}let t=0;if(ie.rendererInterfaces.forEach((n,r)=>{if(typeof n.setTraceUpdatesEnabled=="function")try{n.setTraceUpdatesEnabled(e),t++,q(`Renderer ${r}: setTraceUpdatesEnabled(${e})`)}catch(o){q(`Renderer ${r}: error setting trace updates`,o)}else q(`Renderer ${r}: no setTraceUpdatesEnabled method`)}),q(`Set trace updates ${e?"enabled":"disabled"} on ${t} renderer(s)`),ie.reactDevtoolsAgent?.setTraceUpdatesEnabled)try{ie.reactDevtoolsAgent.setTraceUpdatesEnabled(e),q("Also set trace updates on agent")}catch(n){q("Error setting trace updates on agent",n)}}function Ei(){ie&&(jt||(q("Subscribing to traceUpdates event"),typeof ie.sub=="function"?(jt=ie.sub("traceUpdates",au),q("Subscribed using hook.sub()")):q("hook.sub not available, traceUpdates may not work"),Fi(true)))}function Nr(){Fi(false),jt&&(jt(),jt=null,q("Unsubscribed from traceUpdates event"))}function Oi(e){Ve=e,q(`Highlight callback ${e?"set":"cleared"}`)}function pu(e){bn=e,q(`Badge press callback ${e?"set":"cleared"}`)}function fu(){return bn}function mu(e){bn&&bn(e)}var zr=null,Tn=null;function yu(e){zr=e,e&&Tn!==null&&e(Tn)}function bu(e){if(pe){pe("setSpotlight",{nativeTag:e});return}Tn=e,zr&&zr(e)}var pe=null;function vu(e){pe=e}function Cu(e){ce!==e.enabled&&(ce=e.enabled,Vr()),Ce!==e.frozen&&(Ce=e.frozen,Sn())}function Tu(){return Tn}function Vr(){xr.forEach(e=>{try{e(ce)}catch(t){console.error("[HighlightUpdates] Error in state listener:",t)}})}function _i(e){return xr.add(e),e(ce),()=>{xr.delete(e)}}function wn(){if(typeof Z<"u"&&!Z)return q("Only available in development builds"),false;if(pe||ze)return true;if(ie=window?.__REACT_DEVTOOLS_GLOBAL_HOOK__||null,!ie)return q("React DevTools hook not found"),false;if(q("Hook found"),q(`Hook has sub: ${typeof ie.sub=="function"}`),q(`Hook has on: ${typeof ie.on=="function"}`),q(`Hook has emit: ${typeof ie.emit=="function"}`),Go(),ie.rendererInterfaces&&ie.rendererInterfaces.size>0)return ze=true,q(`Initialized with ${ie.rendererInterfaces.size} renderer(s)`),Wi(),true;let e=setInterval(()=>{ie?.rendererInterfaces&&ie.rendererInterfaces.size>0&&(clearInterval(e),ze=true,q(`Initialized with ${ie.rendererInterfaces.size} renderer(s) (delayed)`),Wi())},100);return setTimeout(()=>clearInterval(e),1e4),false}function Wi(){typeof window<"u"&&(window.__HIGHLIGHT_UPDATES_CONTROLLER__={enable:Ut,disable:Gt,toggle:ji,isEnabled:Ui,setEnabled:Gi,subscribe:_i,initialize:wn,destroy:Ji,isInitialized:()=>ze,setHighlightCallback:Oi})}function Ut(){typeof Z<"u"&&!Z||(ze||wn(),vt&&(vt=false),!ce&&(q("Enabling highlights"),Fe||Ei(),V.start(),ce=true,Vr(),Di("render")))}function Gt(){typeof Z<"u"&&!Z||ce&&(q("Disabling highlights"),Yc=false,zi=false,Pr&&(clearTimeout(Pr),Pr=null),Xc.clear(),Ze.clear(),Ii(),Ce&&(Ce=false,Sn()),Fe||Nr(),V.stop(),ce=false,Vr(),Di("render"))}function wu(){typeof Z<"u"&&!Z||Fe||(ze||wn(),q("Enabling background tracking"),ce||Ei(),Fe=true)}function Su(){typeof Z<"u"&&!Z||Fe&&(q("Disabling background tracking"),Fe=false,ce||Nr())}function xu(){return Fe}function ji(){if(!(typeof Z<"u"&&!Z)){if(pe){pe("toggle");return}ce?Gt():Ut()}}function Iu(){if(pe){pe("clearRenderCounts");return}Ir.clear(),V.clear(),q("Cleared render counts")}function Ui(){return ce}function Gi(e){if(pe){pe("setEnabled",{enabled:e});return}e?Ut():Gt()}function Ar(e){vt!==e&&(vt=e,e&&Ve&&Ve([]))}function Ru(){return vt}function Du(e){if(pe){pe("setSilentTracking",{enabled:e});return}e?(Ut(),Ar(true)):(Ar(false),Gt())}function ku(){return ze}function Sn(){vn.forEach(e=>{try{e(Ce)}catch(t){console.error("[HighlightUpdates] Error in freeze listener:",t)}})}function Pu(e){return vn.add(e),e(Ce),()=>{vn.delete(e)}}function Ki(){typeof Z<"u"&&!Z||Ce||(Ce=true,q("Freeze mode enabled"),Sn())}function qi(){typeof Z<"u"&&!Z||Ce&&(Ce=false,q("Freeze mode disabled"),Ve&&Ve([]),Sn())}function Lu(){if(pe){pe("toggleFreeze");return}Ce?qi():Ki()}function Nu(){return Ce}function Ji(){ze&&(Nr(),Ko(),Uo(null),Ce=false,vn.clear(),ce=false,ie=null,Ve=null,ze=false,typeof window<"u"&&delete window.__HIGHLIGHT_UPDATES_CONTROLLER__,q("Destroyed"))}var zu={subscribe:_i,enable:Ut,disable:Gt,toggle:ji,isEnabled:Ui,setEnabled:Gi,initialize:wn,destroy:Ji,isInitialized:ku,setHighlightCallback:Oi,clearRenderCounts:Iu,freeze:Ki,unfreeze:qi,toggleFreeze:Lu,getFrozen:Nu,subscribeToFreeze:Pu,setBadgePressCallback:pu,getBadgePressCallback:fu,handleBadgePress:mu,setSpotlightCallback:yu,setSpotlight:bu,getSpotlight:Tu,clearDevToolsCache:eu,enableBackgroundTracking:wu,disableBackgroundTracking:Su,isBackgroundTrackingEnabled:xu,setRemoteHandler:vu,replaceRemoteState:Cu,locateComponent:gu,setHighlightsSuppressed:Ar,getHighlightsSuppressed:Ru,setSilentTracking:Du},M=zu;j();import Vu,{useState as ue,useEffect as xe,useRef as et,useCallback as te}from"react";import{Power as Au,JsModal as Bu,devToolsStorageKeys as Tt,persistentStorage as xn,night as Kt,TickProvider as Yi,windowDragProps as Hu}from"@buoy-gg/shared-ui/web";import{useIsPro as Mu}from"@buoy-gg/license/web";Ne();j();import{useMemo as In,useState as Xi,useCallback as qt}from"react";import{CopyButton as $u,formatRelativeTime as Fu,PlusIcon as Eu,MinusIcon as Ou,EventStepperFooter as _u,Lock as Wu,night as F,useLimit as ju,monoFont as wt}from"@buoy-gg/shared-ui/web";import{TreeDiffViewer as Uu}from"@buoy-gg/shared-ui/web/dataViewer";j();import{buoyColors as Ee,night as ne,monoFont as tt}from"@buoy-gg/shared-ui/web";import{Fragment as Gu,jsx as G,jsxs as ae}from"react/jsx-runtime";var Oe={mount:{label:"MOUNT",color:Ee.success,tip:"First render of this component."},props:{label:"PROPS",color:Ee.warning,tip:"Native props changed. Consider React.memo() or useCallback for handlers."},state:{label:"STATE",color:"#a855f7",tip:"Component state changed via setState."},hooks:{label:"HOOKS",color:"#ec4899",tip:"Hook values changed (useState, useReducer, useMemo, etc.)."},context:{label:"CONTEXT",color:"#06b6d4",tip:"React context value changed."},parent:{label:"PARENT",color:Ee.textSecondary,tip:"Parent component re-rendered. Consider wrapping with React.memo()."},unknown:{label:"?",color:Ee.textMuted,tip:"Could not determine render cause."}},Jt={mount:{label:"mount",color:Ee.success,tip:"First render of this component."},props:{label:"props",color:Ee.warning,tip:"Component received different props from parent."},state:{label:"state",color:"#a855f7",tip:"Component's own state changed (useState/useReducer)."},parent:{label:"parent",color:Ee.textSecondary,tip:"Parent re-rendered but this component's props/state didn't change. Consider React.memo()."},unknown:{label:"?",color:Ee.textMuted,tip:"Could not determine component render cause."}};function Qi({cause:e,compact:t=false,showKeys:n=false,showTwoLevel:r=false,testID:o}){let i=Oe[e.type],l=e.componentCause?Jt[e.componentCause]:null,a=r&&l&&e.componentCause!==e.type;return ae(d,{nativeID:"__rn_buoy__cause-badge",testID:o,style:[A.container,t&&A.containerCompact],children:[a&&ae(Gu,{children:[G(d,{style:[A.badge,t&&A.badgeCompact,A.componentBadge,{backgroundColor:l.color+"15"}],children:G(h,{testID:o?`${o}-component`:void 0,style:[A.badgeText,t&&A.badgeTextCompact,A.componentBadgeText,{color:l.color}],children:l.label})}),G(h,{style:[A.arrowText,t&&A.arrowTextCompact],children:"\u2192"})]}),G(d,{style:[A.badge,t&&A.badgeCompact,{backgroundColor:i.color+"20"}],children:G(h,{testID:o?`${o}-native`:void 0,style:[A.badgeText,t&&A.badgeTextCompact,{color:i.color}],children:i.label})}),n&&e.changedKeys&&e.changedKeys.length>0&&G(h,{testID:o?`${o}-keys`:void 0,style:[A.keysText,t&&A.keysTextCompact],numberOfLines:1,children:e.changedKeys.join(", ")}),n&&e.hookIndices&&e.hookIndices.length>0&&ae(h,{testID:o?`${o}-hooks`:void 0,style:[A.keysText,t&&A.keysTextCompact],numberOfLines:1,children:["Hook ",e.hookIndices.join(", ")]})]})}function Ku({cause:e}){let t=Oe[e.type],n=e.componentCause?Jt[e.componentCause]:null,r=e.componentName||"Component";return ae(d,{nativeID:"__rn_buoy__two-level-cause",style:A.twoLevelContainer,children:[n&&ae(d,{style:A.twoLevelRow,children:[G(h,{style:A.twoLevelLabel,children:"Component:"}),G(h,{style:A.twoLevelName,children:r}),G(h,{style:A.twoLevelText,children:"re-rendered due to"}),G(d,{style:[A.badge,{backgroundColor:n.color+"20"}],children:G(h,{style:[A.badgeText,{color:n.color}],children:n.label.toUpperCase()})})]}),ae(d,{style:A.twoLevelRow,children:[G(h,{style:A.twoLevelLabel,children:"Native:"}),G(d,{style:[A.badge,{backgroundColor:t.color+"20"}],children:G(h,{style:[A.badgeText,{color:t.color}],children:t.label})}),e.changedKeys&&e.changedKeys.length>0&&ae(h,{style:A.twoLevelKeys,children:["[",e.changedKeys.join(", "),"]"]})]})]})}function Zi({cause:e,nativeType:t}){let n=Oe[e.type],r=e.componentCause?Jt[e.componentCause]:null,o=e.componentName||"Unknown",i=e.hookChanges&&e.hookChanges.length>0,l=e.changedKeys&&e.changedKeys.length>0,a=e.changedKeys?.filter(s=>s.includes("(ref only)")||s.includes("(fn ref)"))||[],c=e.changedKeys?.filter(s=>!s.includes("(ref only)")&&!s.includes("(fn ref)"))||[];return ae(d,{nativeID:"__rn_buoy__enhanced-cause",style:A.enhancedContainer,children:[ae(d,{style:A.enhancedHeader,children:[G(h,{style:A.enhancedComponentName,children:o}),t&&G(d,{style:A.enhancedNativeTag,children:G(h,{style:A.enhancedNativeTagText,children:t})})]}),ae(d,{style:A.enhancedFlowContainer,children:[G(h,{style:A.enhancedFlowLabel,children:"Cause:"}),r&&G(d,{style:[A.enhancedFlowBadge,{backgroundColor:r.color+"20"}],children:G(h,{style:[A.enhancedFlowBadgeText,{color:r.color}],children:r.label.toUpperCase()})}),G(h,{style:A.enhancedFlowArrow,children:"\u2192"}),G(d,{style:[A.enhancedFlowBadge,{backgroundColor:n.color+"20"}],children:G(h,{style:[A.enhancedFlowBadgeText,{color:n.color}],children:n.label})})]}),i&&ae(d,{style:A.enhancedSection,children:[G(h,{style:A.enhancedSectionTitle,children:"Component State Changed:"}),e.hookChanges.map(s=>ae(d,{style:A.enhancedChangeRow,children:[G(h,{style:A.enhancedChangeIcon,children:"\u26A1"}),ae(h,{style:A.enhancedChangeText,children:["Hook[",s.index,"] (",s.type,"): ",s.description]})]},s.index))]}),c.length>0&&ae(d,{style:A.enhancedSection,children:[G(h,{style:A.enhancedSectionTitle,children:"Native Props Changed:"}),c.map((s,u)=>ae(d,{style:A.enhancedChangeRow,children:[G(h,{style:A.enhancedChangeIcon,children:"~"}),G(h,{style:A.enhancedChangeText,children:s})]},u))]}),a.length>0&&ae(d,{style:A.enhancedSection,children:[G(h,{style:[A.enhancedSectionTitle,{color:ne.color.textTertiary}],children:"Reference Changes (optimization opportunity):"}),a.map((s,u)=>ae(d,{style:A.enhancedChangeRow,children:[G(h,{style:[A.enhancedChangeIcon,{color:ne.color.textTertiary}],children:"\u25CB"}),G(h,{style:[A.enhancedChangeText,{color:ne.color.textTertiary}],children:s})]},u))]}),!i&&!l&&e.type!=="mount"&&G(d,{style:A.enhancedSection,children:G(h,{style:A.enhancedNoChanges,children:e.type==="parent"?"Parent re-rendered (consider React.memo)":"No specific changes detected"})})]})}var A=be.create({container:{flexDirection:"row",alignItems:"center",gap:6},containerCompact:{gap:4},badge:{paddingVertical:3,paddingHorizontal:6,borderRadius:4},badgeCompact:{paddingVertical:2,paddingHorizontal:5},componentBadge:{borderStyle:"dashed",borderWidth:1,borderColor:ne.color.border},badgeText:{fontSize:10,fontWeight:"700"},badgeTextCompact:{fontSize:9},componentBadgeText:{fontWeight:"500",textTransform:"lowercase"},arrowText:{fontSize:10,color:ne.color.textTertiary},arrowTextCompact:{fontSize:9},keysText:{fontSize:11,color:ne.color.textSecondary,fontFamily:tt,flex:1},keysTextCompact:{fontSize:10},twoLevelContainer:{gap:8},twoLevelRow:{flexDirection:"row",alignItems:"center",flexWrap:"wrap",gap:6},twoLevelLabel:{fontSize:11,fontWeight:"600",color:ne.color.textSecondary,minWidth:70},twoLevelName:{fontSize:11,fontWeight:"600",color:ne.color.text,fontFamily:tt},twoLevelText:{fontSize:11,color:ne.color.textSecondary},twoLevelKeys:{fontSize:10,color:ne.color.textSecondary,fontFamily:tt},enhancedContainer:{gap:12},enhancedHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:8},enhancedComponentName:{fontSize:14,fontWeight:"700",color:ne.color.text,fontFamily:tt},enhancedNativeTag:{backgroundColor:ne.color.bg,paddingVertical:2,paddingHorizontal:6,borderRadius:4},enhancedNativeTagText:{fontSize:10,fontWeight:"600",color:ne.color.textTertiary,fontFamily:tt},enhancedFlowContainer:{flexDirection:"row",alignItems:"center",gap:8,paddingVertical:8,paddingHorizontal:12,backgroundColor:ne.color.bg,borderRadius:6},enhancedFlowLabel:{fontSize:11,fontWeight:"600",color:ne.color.textSecondary},enhancedFlowBadge:{paddingVertical:3,paddingHorizontal:8,borderRadius:4},enhancedFlowBadgeText:{fontSize:10,fontWeight:"700"},enhancedFlowArrow:{fontSize:14,color:ne.color.textTertiary,fontWeight:"300"},enhancedSection:{gap:6},enhancedSectionTitle:{fontSize:11,fontWeight:"600",color:ne.color.textSecondary,letterSpacing:.3},enhancedChangeRow:{flexDirection:"row",alignItems:"flex-start",gap:6,paddingLeft:4},enhancedChangeIcon:{fontSize:12,color:ne.color.warning,fontFamily:tt,width:16},enhancedChangeText:{fontSize:12,color:ne.color.text,fontFamily:tt,flex:1},enhancedNoChanges:{fontSize:12,color:ne.color.textTertiary,fontStyle:"italic",paddingLeft:4}});j();function qu(e,t){let n=e.filter(y=>y.renderCount>=t.minRenders);if(t.filterCauses.length>0){let y=new Set(t.filterCauses);n=n.filter(b=>y.has(b.lastRenderCause?.type??"unknown"))}let r=e.flatMap(y=>[y.firstRenderTime,y.lastRenderTime]).filter(y=>Number.isFinite(y)),o=r.length>0?Math.max(...r)-Math.min(...r):0,i=Math.max(.001,o/1e3),l=(t.groupByName?Ju(n):n.map(y=>[y])).map(y=>Yu(y,t,i));Qu(l,t.sortBy);let a=t.topN===-1?0:Math.max(0,l.length-t.topN),c=t.topN===-1?l:l.slice(0,t.topN),s=e.reduce((y,b)=>y+b.renderCount,0),u=Xu(e),p=0,T=false;for(let y of e)y.lastRenderCause||(p+=y.renderCount),y.renderHistory&&y.renderHistory.length>0&&(T=true);return{totalUniqueComponents:n.length,totalRenders:s,windowMs:o,causeBreakdown:u,rows:c,truncated:a,dataGaps:{historyOff:!T,propsCaptureOff:!e.some(y=>y.renderHistory?.some(b=>b.capturedProps!==void 0)),stateCaptureOff:!e.some(y=>y.renderHistory?.some(b=>b.capturedState!==void 0)),rendersWithoutCause:p}}}function Ju(e){let t=new Map;for(let n of e){let r=n.componentName||n.displayName||n.viewType,o=t.get(r);o?o.push(n):t.set(r,[n])}return Array.from(t.values())}function Yu(e,t,n){let r=e[0],o=r.componentName||r.displayName||r.viewType,i=0,l={},a=new Map,c=new Map,s=new Map,u=0,p=0,T=0;for(let k of e){i+=k.renderCount;let R=k.lastRenderCause;if(!R)continue;let _=R.type;l[_]=(l[_]??0)+k.renderCount;let Q=(R.hookChanges?.length??0)>0,z=(R.changedKeys?.length??0)>0;if(_==="parent"&&(R.componentCause==="state"||R.componentCause==="props"||Q||z?p+=k.renderCount:T+=k.renderCount),_==="props"&&!z&&(u+=k.renderCount),R.parentComponentName&&s.set(R.parentComponentName,(s.get(R.parentComponentName)??0)+1),t.aggregateCauses&&R.hookChanges)for(let W of R.hookChanges){let w=`${W.type}[${W.index}]`,N=a.get(w);N?N.count+=1:a.set(w,{count:1,sample:Zu(W)})}if(R.changedKeys)for(let W of R.changedKeys)W.includes("(ref only)")||c.set(W,(c.get(W)??0)+1)}let y=Array.from(a.entries()).sort((k,R)=>R[1].count-k[1].count).slice(0,3).map(([k,R])=>({hook:k,count:R.count,sample:R.sample})),b=Array.from(c.entries()).sort((k,R)=>R[1]-k[1]).slice(0,5).map(([k])=>k),f="unknown",S=-1;for(let[k,R]of Object.entries(l))(R??0)>S&&(S=R??0,f=k);let v,P=0;for(let[k,R]of s)R>P&&(P=R,v=k);let g=e.map(k=>k.renderCount).sort((k,R)=>R-k),D=i/n;return{name:o,viewType:r.viewType,instances:e.length,renders:i,causeMix:l,dominantCause:f,hookCauses:y,changedKeys:b,unknownPropsCount:u,parentWithOwnChange:p,parentNoChange:T,parentName:v,instanceCounts:g,rate:D,source:e}}function Xu(e){let t={};for(let n of e){let r=n.lastRenderCause?.type??"unknown";t[r]=(t[r]??0)+n.renderCount}return t}function Qu(e,t){switch(t){case"renderCount":e.sort((n,r)=>r.renders-n.renders);break;case"rate":e.sort((n,r)=>r.rate-n.rate);break;case"name":e.sort((n,r)=>n.name.localeCompare(r.name));break}}var ea=32;function ta(e){if(e===null)return"null";if(e===void 0)return"undefined";if(typeof e=="function")return"[Fn]";if(typeof e=="object")return Array.isArray(e)?`[Array(${e.length})]`:"[Obj]";let t=String(e);return t.length>ea?t.slice(0,ea-1)+"\u2026":t}function Zu(e){return e.previousValue===void 0&&e.currentValue===void 0?e.description:`${ta(e.previousValue)} \u2192 ${ta(e.currentValue)}`}function na(e){return e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function Br(e){return e>=100?`${e.toFixed(0)}/s`:e>=10?`${e.toFixed(1)}/s`:`${e.toFixed(2)}/s`}function ra(e){let t=Object.entries(e).sort((n,r)=>(r[1]??0)-(n[1]??0));return t.length===0?"(no causes recorded)":t.map(([n,r])=>`${n} ${r}`).join(" \xB7 ")}function oa(e){let t=[],n=Object.entries(e.causeMix).filter(([,o])=>(o??0)>0).sort((o,i)=>(i[1]??0)-(o[1]??0)),r=n.length>=2&&(n[1]?.[1]??0)>=e.renders*.1;if(e.dominantCause==="hooks"&&e.hookCauses.length>0){let o=e.hookCauses[0];o.sample?t.push(`hooks \xD7${o.count} ${o.hook}: ${o.sample}`):t.push(`hooks \xD7${o.count} ${o.hook}`)}else if(e.dominantCause==="props"){if(e.changedKeys.length>0){let o=e.changedKeys.slice(0,3).join(", ");t.push(`props (${o})`)}else t.push("props (keys not captured)");e.unknownPropsCount>0&&e.changedKeys.length>0&&t.push(`[${e.unknownPropsCount} unidentified]`)}else if(e.dominantCause==="parent"){let o="parent cascade";e.parentNoChange>0&&e.parentWithOwnChange===0&&(o="parent cascade, no own change"),e.parentName&&(o+=` \u2190 ${e.parentName}`),t.push(o)}else e.dominantCause==="mount"?t.push("mount"):e.dominantCause==="state"?t.push("state"):e.dominantCause==="context"?t.push("context"):t.push("unknown");if(r){let o=n.map(([i,l])=>`${i}:${l}`).join(" + ");t.push(`(${o})`)}return t.join(" ")}function ia(e){if(e.instances<=1)return e.name;let t=e.instanceCounts,n=t[0]??0,r=t[t.length-1]??0;if(n-r<=1)return`${e.name} \xD7${e.instances} (${n} each)`;let o=t.slice(1),i=o.reduce((a,c)=>a+c,0),l=o.length>0?i/o.length:0;return`${e.name} \xD7${e.instances} (top ${n}, others ~${Math.round(l)})`}var ed="React Native render report \u2014 review the data and identify why components are re-rendering.";function aa(e,t){let n=[];n.push(ed),n.push(""),n.push(`Window: ${na(e.windowMs)} \xB7 ${e.totalUniqueComponents} components \xB7 ${e.totalRenders} renders`),n.push(`Cause mix: ${ra(e.causeBreakdown)}`),n.push(""),n.push("Top offenders (count \xB7 rate \xB7 component \xB7 cause):"),n.push("");let r=e.rows.map(ia),o=Math.min(36,Math.max(8,...r.map(c=>c.length))),i=Math.max(3,...e.rows.map(c=>`\xD7${c.renders}`.length)),l=Math.max(5,...e.rows.map(c=>Br(c.rate).length));for(let c=0;c<e.rows.length;c++){let s=e.rows[c],u=(r[c]??s.name).padEnd(o),p=`\xD7${s.renders}`.padStart(i),T=Br(s.rate).padStart(l),y=oa(s);n.push(` ${p} ${T} ${u} ${y}`)}e.truncated>0&&(n.push(""),n.push(`... ${e.truncated} more (set topN=-1 to expand)`));let a=la(e);if(a.length>0){n.push(""),n.push("Data availability:");for(let c of a)n.push(` \xB7 ${c}`)}return n.join(`
|
|
31
|
-
`)}function
|
|
32
|
-
`)}function nd(e,t,n){let r={exportedAt:new Date().toISOString(),summary:{windowMs:t.windowMs,totalComponents:t.totalUniqueComponents,totalRenders:t.totalRenders,causeBreakdown:t.causeBreakdown,truncated:t.truncated,dataGaps:t.dataGaps},components:t.rows.map(o=>({name:o.name,viewType:o.viewType,instances:o.instances,instanceCounts:o.instances>1?o.instanceCounts:void 0,renders:o.renders,ratePerSec:Number(o.rate.toFixed(3)),dominantCause:o.dominantCause,causeMix:o.causeMix,hookCauses:o.hookCauses,changedKeys:o.changedKeys,unknownPropsCount:o.unknownPropsCount||void 0,parentName:o.parentName,parentWithOwnChange:o.parentWithOwnChange||void 0,parentNoChange:o.parentNoChange||void 0,...n.includeHistory?{history:rd(o.source)}:{}}))};return n.includeHistory?JSON.stringify(r,null,2):JSON.stringify(r)}function rd(e){return e.map(t=>({name:t.componentName||t.displayName,nativeTag:t.nativeTag,renderCount:t.renderCount,history:t.renderHistory?.map(n=>({n:n.renderNumber,t:n.timestamp,cause:{type:n.cause.type,componentCause:n.cause.componentCause,changedKeys:n.cause.changedKeys,parentComponentName:n.cause.parentComponentName,hookChanges:n.cause.hookChanges?.map(r=>({type:r.type,index:r.index,desc:r.description}))}}))}))}function Hr(e,t){let n=qu(e,t);switch(t.format){case"summary":return aa(n,t);case"markdown-table":return td(n,t);case"json":return nd(e,n,t);default:return aa(n,t)}}function od(e,t){return Hr(e,t).length}function sa(e){return{totalComponents:e.length,totalRenders:e.reduce((t,n)=>t+n.renderCount,0)}}function id(e){return Hr([e],{format:"summary",topN:-1,minRenders:1,filterCauses:[],groupByName:false,aggregateCauses:true,sortBy:"renderCount",includeHistory:false})}import{jsx as E,jsxs as X}from"react/jsx-runtime";function ca({render:e,disableInternalFooter:t=false,selectedEventIndex:n,onEventIndexChange:r,onAddFilter:o,isPro:i=false}){let[l,a]=Xi(0),c=n??l,s=r??a,u=In(()=>!e.renderHistory||e.renderHistory.length===0?[]:[...e.renderHistory].sort((z,W)=>z.timestamp-W.timestamp),[e.renderHistory]),p=u.length,T=u[c],y=ju("highlightUpdates.detailEvents"),b=i?1/0:y,f=In(()=>Math.max(0,p-b),[b,p]),S=T?.cause||e.lastRenderCause,v=qt(()=>{c>0&&s(c-1)},[c,s]),P=qt(()=>{let z=Math.min(b-1,p-1);c<z&&s(c+1)},[c,p,s,b]),g=In(()=>id(e),[e]),D=e.componentName||e.displayName,k=e.viewType,R=e.lastRenderTime-e.firstRenderTime,_=R>0?(e.renderCount/(R/1e3)).toFixed(1):e.renderCount.toString(),Q=!t&&p>1;return X(d,{style:L.container,children:[X(d,{style:L.header,children:[X(d,{style:L.headerLeft,children:[E(h,{testID:"buoy-highlight-detail-name",style:L.componentName,numberOfLines:1,children:D}),E(d,{style:L.nativeTypeBadge,children:E(h,{testID:"buoy-highlight-detail-type",style:L.nativeTypeText,children:k})})]}),E($u,{value:g,size:14,testID:"buoy-highlight-detail-copy"})]}),X(Be,{testID:"buoy-highlight-detail-scroll",style:L.scrollView,contentContainerStyle:[L.scrollContent,Q&&{paddingBottom:100}],showsVerticalScrollIndicator:false,children:[S&&E(ad,{cause:S,renderNumber:T?.renderNumber}),E(ld,{render:e,rendersPerSec:_}),f>0&&X(d,{testID:"buoy-highlight-detail-locked",style:L.lockedBanner,children:[E(Wu,{size:14,color:F.color.warning}),X(h,{testID:"buoy-highlight-detail-locked-text",style:L.lockedBannerText,children:[f," ",f===1?"event":"events"," hidden"]}),E(h,{style:L.lockedBannerSubtext,children:"Upgrade to Pro"})]}),o&&E(sd,{render:e,onAddFilter:o})]}),Q&&E(_u,{currentIndex:c,totalItems:p,onPrevious:v,onNext:P,itemLabel:"Render",subtitle:T?.timestamp?Fu(new Date(T.timestamp)):void 0,applySafeAreaInset:false,absolute:true})]})}function ad({cause:e,renderNumber:t}){let n=e.componentCause||e.type,r=e.componentCause?Jt[e.componentCause]:Oe[e.type],o=e.hookChanges&&e.hookChanges.length>0,i=e.changedKeys&&e.changedKeys.length>0,l=()=>e.type==="mount"?"First render":n==="parent"?"Triggered by":"Changed:";return X(d,{testID:"buoy-highlight-detail-cause",style:L.answerCard,children:[X(d,{style:L.causeBadgeRow,children:[E(h,{testID:"buoy-highlight-detail-cause-label",style:L.causeLabel,children:l()}),E(d,{style:[L.causeBadgeLarge,{backgroundColor:r.color+"20"}],children:E(h,{testID:"buoy-highlight-detail-cause-badge",style:[L.causeBadgeLargeText,{color:r.color}],children:r.label.toUpperCase()})})]}),o&&E(d,{style:L.hookChangesContainer,children:e.hookChanges.map((a,c)=>{let s=`${a.type}[${a.index}]`,u={[s]:a.previousValue},p={[s]:a.currentValue};return E(d,{style:L.hookDiffContainer,children:E(Uu,{oldValue:u,newValue:p,theme:"dark",showUnchanged:false})},c)})}),!o&&i&&E(d,{style:L.propsChangesContainer,children:e.changedKeys.filter(a=>!a.includes("(ref only)")).slice(0,5).map((a,c)=>E(d,{style:L.propChangeChip,children:E(h,{testID:`buoy-highlight-detail-changed-${c}`,style:L.propChangeText,children:a})},c))})]})}function ld({render:e,rendersPerSec:t}){let n=e.testID||e.nativeID||e.accessibilityLabel,r=e.measurements;return X(d,{style:L.detailsSection,children:[n&&X(d,{testID:"buoy-highlight-detail-identifiers",style:L.detailsCard,children:[E(h,{style:L.detailsCardTitle,children:"Identifiers"}),e.testID&&E(Mr,{label:"testID",value:e.testID}),e.nativeID&&E(Mr,{label:"nativeID",value:e.nativeID}),e.accessibilityLabel&&E(Mr,{label:"a11y",value:e.accessibilityLabel})]}),X(d,{testID:"buoy-highlight-detail-stats",style:L.statsRow,children:[X(d,{testID:"buoy-highlight-detail-stat-renders",style:L.statItem,children:[E(h,{testID:"buoy-highlight-detail-stat-renders-value",style:[L.statValue,{color:e.color}],children:e.renderCount}),E(h,{style:L.statLabel,children:"renders"})]}),E(d,{style:L.statDivider}),X(d,{testID:"buoy-highlight-detail-stat-rate",style:L.statItem,children:[E(h,{testID:"buoy-highlight-detail-stat-rate-value",style:L.statValue,children:t}),E(h,{style:L.statLabel,children:"/sec"})]}),E(d,{style:L.statDivider}),X(d,{testID:"buoy-highlight-detail-stat-tag",style:L.statItem,children:[E(h,{testID:"buoy-highlight-detail-stat-tag-value",style:L.statValue,children:e.nativeTag}),E(h,{style:L.statLabel,children:"tag"})]})]}),r&&X(d,{testID:"buoy-highlight-detail-measure",style:L.measurementsRow,children:[X(d,{style:L.measurementItem,children:[E(h,{style:L.measurementLabel,children:"x"}),E(h,{testID:"buoy-highlight-detail-measure-x",style:L.measurementValue,children:Math.round(e.measurements.x)})]}),X(d,{style:L.measurementItem,children:[E(h,{style:L.measurementLabel,children:"y"}),E(h,{testID:"buoy-highlight-detail-measure-y",style:L.measurementValue,children:Math.round(e.measurements.y)})]}),X(d,{style:L.measurementItem,children:[E(h,{style:L.measurementLabel,children:"w"}),E(h,{testID:"buoy-highlight-detail-measure-w",style:L.measurementValue,children:Math.round(e.measurements.width)})]}),X(d,{style:L.measurementItem,children:[E(h,{style:L.measurementLabel,children:"h"}),E(h,{testID:"buoy-highlight-detail-measure-h",style:L.measurementValue,children:Math.round(e.measurements.height)})]})]})]})}function Mr({label:e,value:t}){let n=`buoy-highlight-detail-id-${e.toLowerCase()}`;return X(d,{testID:n,style:L.detailRow,children:[E(h,{style:L.detailLabel,children:e}),E(h,{testID:`${n}-value`,style:L.detailValue,numberOfLines:1,children:t})]})}function sd({render:e,onAddFilter:t}){let[n,r]=Xi(null),o=In(()=>{let s=[];return e.nativeID&&s.push({type:"nativeID",value:e.nativeID,label:"nativeID"}),e.testID&&s.push({type:"testID",value:e.testID,label:"testID"}),e.accessibilityLabel&&s.push({type:"accessibilityLabel",value:e.accessibilityLabel,label:"a11y"}),e.componentName&&s.push({type:"component",value:e.componentName,label:"component"}),s.push({type:"viewType",value:e.viewType,label:"viewType"}),s},[e]),i=n!==null?o[n]:null,l=qt(s=>{r(u=>u===s?null:s)},[]),a=qt(()=>{i&&(t({type:i.type,value:i.value},"include"),r(null))},[i,t]),c=qt(()=>{i&&(t({type:i.type,value:i.value},"exclude"),r(null))},[i,t]);return X(d,{testID:"buoy-highlight-quick",style:L.quickActionsSection,children:[E(h,{style:L.quickActionsTitle,children:"Quick Filters"}),E(d,{style:L.filterOptionsList,children:o.map((s,u)=>E(cd,{testID:`buoy-highlight-quick-${s.type.toLowerCase()}`,label:s.label,value:s.value,isSelected:n===u,onSelect:()=>l(u)},s.type))}),X(d,{style:L.filterActionButtons,children:[X(J,{testID:"buoy-highlight-quick-include",accessibilityRole:"button",accessibilityLabel:"Only show this",style:[L.filterActionButton,L.filterActionButtonInclude,!i&&L.filterActionButtonDisabled],onPress:a,disabled:!i,activeOpacity:.7,children:[E(Eu,{size:14,color:i?F.color.accent:F.color.textTertiary}),E(h,{style:[L.filterActionButtonText,{color:i?F.color.accent:F.color.textTertiary}],children:"Only Show This"})]}),X(J,{testID:"buoy-highlight-quick-exclude",accessibilityRole:"button",accessibilityLabel:"Hide this",style:[L.filterActionButton,L.filterActionButtonExclude,!i&&L.filterActionButtonDisabled],onPress:c,disabled:!i,activeOpacity:.7,children:[E(Ou,{size:14,color:i?F.color.danger:F.color.textTertiary}),E(h,{style:[L.filterActionButtonText,{color:i?F.color.danger:F.color.textTertiary}],children:"Hide This"})]})]})]})}function cd({testID:e,label:t,value:n,isSelected:r,onSelect:o}){return X(J,{testID:e,accessibilityRole:"button",accessibilityLabel:`${t}, ${n}`,style:[L.filterOptionCard,r&&L.filterOptionCardSelected],onPress:o,activeOpacity:.7,children:[E(h,{style:[L.filterOptionLabel,r&&L.filterOptionLabelSelected],children:t}),E(h,{testID:e?`${e}-value`:void 0,style:[L.filterOptionValue,r&&L.filterOptionValueSelected],numberOfLines:1,children:n})]})}var L=be.create({container:{flex:1,backgroundColor:"transparent"},header:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:12,padding:16,paddingBottom:0},scrollView:{flex:1},scrollContent:{padding:16,paddingTop:12,paddingBottom:80,gap:12},headerLeft:{flex:1,flexDirection:"row",alignItems:"center",justifyContent:"center",gap:10},componentName:{fontSize:18,fontWeight:"700",color:F.color.text,flexShrink:1},nativeTypeBadge:{backgroundColor:F.color.bg,paddingVertical:3,paddingHorizontal:8,borderRadius:4},nativeTypeText:{fontSize:11,fontWeight:"600",color:F.color.textTertiary,fontFamily:wt},answerCard:{backgroundColor:F.color.surface,borderRadius:8,borderWidth:1,borderColor:F.color.border,padding:12,gap:6},causeBadgeRow:{flexDirection:"row",alignItems:"center",gap:8},causeBadgeLarge:{paddingVertical:4,paddingHorizontal:10,borderRadius:4},causeBadgeLargeText:{fontSize:11,fontWeight:"700",letterSpacing:.5},causeLabel:{fontSize:12,color:F.color.textSecondary,fontWeight:"500"},hookChangesContainer:{gap:6},hookDiffContainer:{backgroundColor:F.color.bg,borderRadius:6,overflow:"hidden"},propsChangesContainer:{flexDirection:"row",flexWrap:"wrap",gap:4},propChangeChip:{backgroundColor:F.color.bg,paddingVertical:2,paddingHorizontal:6,borderRadius:4},propChangeText:{fontSize:11,color:F.color.text,fontFamily:wt},detailsSection:{gap:10},detailsCard:{backgroundColor:F.color.surface,borderRadius:8,borderWidth:1,borderColor:F.color.border,padding:12,gap:6},detailsCardTitle:{fontSize:10,fontWeight:"600",color:F.color.textTertiary,letterSpacing:.5,textTransform:"uppercase",marginBottom:4},detailRow:{flexDirection:"row",alignItems:"center",gap:8},detailLabel:{fontSize:11,fontWeight:"600",color:F.color.textSecondary,minWidth:55},detailValue:{fontSize:12,color:F.color.text,fontFamily:wt,flex:1},statsRow:{flexDirection:"row",alignItems:"center",justifyContent:"center",backgroundColor:F.color.surface,borderRadius:8,borderWidth:1,borderColor:F.color.border,paddingVertical:10,paddingHorizontal:16},statItem:{flex:1,alignItems:"center"},statValue:{fontSize:16,fontWeight:"700",color:F.color.text,fontFamily:wt},statLabel:{fontSize:10,color:F.color.textTertiary,marginTop:2},statDivider:{width:1,height:24,backgroundColor:F.color.border,marginHorizontal:12},measurementsRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-around",backgroundColor:F.color.surface,borderRadius:8,borderWidth:1,borderColor:F.color.border,paddingVertical:8,paddingHorizontal:12},measurementItem:{flexDirection:"row",alignItems:"baseline",gap:4},measurementLabel:{fontSize:10,fontWeight:"600",color:F.color.textTertiary,textTransform:"uppercase"},measurementValue:{fontSize:12,fontWeight:"600",color:F.color.text,fontFamily:wt},quickActionsSection:{backgroundColor:F.color.surface,borderRadius:8,borderWidth:1,borderColor:F.color.border,padding:12,gap:10},quickActionsTitle:{fontSize:10,fontWeight:"600",color:F.color.textTertiary,letterSpacing:.5,textTransform:"uppercase",marginBottom:2},filterOptionsList:{gap:6},filterOptionCard:{flexDirection:"row",alignItems:"center",backgroundColor:F.color.surfaceElevated,borderRadius:6,paddingVertical:10,paddingHorizontal:12,borderWidth:1,borderColor:"transparent",gap:10},filterOptionCardSelected:{borderColor:F.color.accentBorderStrong,backgroundColor:F.color.accentSoft},filterOptionLabel:{fontSize:10,fontWeight:"600",color:F.color.textTertiary,minWidth:70},filterOptionLabelSelected:{color:F.color.accent},filterOptionValue:{fontSize:12,color:F.color.text,fontFamily:wt,flex:1},filterOptionValueSelected:{color:F.color.text},filterActionButtons:{flexDirection:"row",gap:8,marginTop:12},filterActionButton:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:4,paddingVertical:8,paddingHorizontal:10,borderRadius:6,borderWidth:1},filterActionButtonInclude:{backgroundColor:F.color.accentSoft,borderColor:F.color.accentBorderStrong},filterActionButtonExclude:{backgroundColor:F.color.dangerSoft,borderColor:F.color.danger+"40"},filterActionButtonDisabled:{backgroundColor:F.color.surfaceElevated,borderColor:F.color.border,opacity:.5},filterActionButtonText:{fontSize:11,fontWeight:"600"},lockedBanner:{flexDirection:"row",alignItems:"center",justifyContent:"center",backgroundColor:F.color.surface,borderRadius:8,borderWidth:1,borderColor:F.color.warning+"40",paddingVertical:12,paddingHorizontal:16,gap:8},lockedBannerText:{color:F.color.warning,fontSize:13,fontWeight:"600"},lockedBannerSubtext:{color:F.color.textTertiary,fontSize:12}});import{EventStepperFooter as ud}from"@buoy-gg/shared-ui/web";j();import{useState as nt,useCallback as rt}from"react";import{Eye as ua,Filter as $r,Plus as da,X as Rn,Box as ha,Settings as dd,Hash as hd,SectionHeader as ee,night as x,monoFont as St}from"@buoy-gg/shared-ui/web";j();import{Box as gd,Hash as ga,Layers as pd,Eye as fd,Search as md,FileCode as yd,buoyColors as Fr,night as pa,monoFont as fa}from"@buoy-gg/shared-ui/web";import{jsx as xt,jsxs as Er}from"react/jsx-runtime";var ma={viewType:{label:"ViewType",shortLabel:"View",color:pa.color.accent,icon:gd},testID:{label:"testID",shortLabel:"test",color:Fr.success,icon:ga},nativeID:{label:"nativeID",shortLabel:"native",color:"#f59e0b",icon:ga},component:{label:"Component",shortLabel:"Comp",color:"#a855f7",icon:yd},accessibilityLabel:{label:"a11y",shortLabel:"a11y",color:"#ec4899",icon:fd},nativeTag:{label:"tag",shortLabel:"tag",color:Fr.textMuted,icon:pd},any:{label:"Any",shortLabel:"Any",color:Fr.warning,icon:md}};function Yt({type:e,value:t,compact:n=false,badgeOnly:r=false,valueOnly:o=false,shortLabel:i=false,showIcon:l=false,testID:a}){let c=ma[e],s=c.icon,u=i?c.shortLabel:c.label;return o?xt(h,{testID:a?`${a}-value`:void 0,style:[fe.valueOnly,n&&fe.valueOnlyCompact,{color:c.color}],numberOfLines:1,children:t}):r?Er(d,{testID:a,style:[fe.badgeOnly,n&&fe.badgeOnlyCompact,{backgroundColor:c.color+"20",borderColor:c.color+"40"}],children:[l&&xt(s,{size:n?10:12,color:c.color}),xt(h,{style:[fe.badgeOnlyText,n&&fe.badgeOnlyTextCompact,{color:c.color}],children:u})]}):Er(d,{testID:a,accessibilityLabel:`${c.label} ${t}`,style:[fe.container,n&&fe.containerCompact],children:[Er(d,{style:[fe.badge,n&&fe.badgeCompact,{backgroundColor:c.color+"20"}],children:[l&&xt(s,{size:n?8:10,color:c.color}),xt(h,{style:[fe.badgeText,n&&fe.badgeTextCompact,{color:c.color}],children:u})]}),xt(h,{testID:a?`${a}-value`:void 0,style:[fe.value,n&&fe.valueCompact],numberOfLines:1,children:t})]})}var fe=be.create({container:{flexDirection:"row",alignItems:"center",gap:6},containerCompact:{gap:4},badge:{flexDirection:"row",alignItems:"center",paddingVertical:3,paddingHorizontal:6,borderRadius:4,gap:4},badgeCompact:{paddingVertical:2,paddingHorizontal:5,gap:3},badgeText:{fontSize:10,fontWeight:"700"},badgeTextCompact:{fontSize:9},value:{fontSize:12,color:pa.color.text,fontFamily:fa,flex:1},valueCompact:{fontSize:11},badgeOnly:{flexDirection:"row",alignItems:"center",paddingVertical:4,paddingHorizontal:8,borderRadius:6,borderWidth:1,gap:5},badgeOnlyCompact:{paddingVertical:2,paddingHorizontal:6,borderRadius:4,gap:4},badgeOnlyText:{fontSize:11,fontWeight:"600"},badgeOnlyTextCompact:{fontSize:9,fontWeight:"700"},valueOnly:{fontSize:12,fontFamily:fa},valueOnlyCompact:{fontSize:11},categoryBadge:{flexDirection:"row",alignItems:"center",paddingVertical:8,paddingLeft:10,paddingRight:6,borderRadius:8,gap:6},categoryBadgeText:{fontSize:11,fontWeight:"600"},categoryBadgeCount:{paddingHorizontal:6,paddingVertical:2,borderRadius:10,minWidth:20,alignItems:"center"},categoryBadgeCountText:{fontSize:10,fontWeight:"600"}});j();function It(e){return String(e).toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"unknown"}function ya(e){return`buoy-highlight-row-${It(e)}`}function ba(e,t){return`buoy-highlight-detected-${It(e)}-${It(t)}`}function va(e,t,n){return`buoy-highlight-${e}-chip-${It(t)}-${It(n)}`}function Rt(e){return`buoy-highlight-setting-${e}`}import{Fragment as Or,jsx as C,jsxs as $}from"react/jsx-runtime";var Xt=e=>ma[e],bd=["any","viewType","testID","nativeID","component","accessibilityLabel"];function Ca({mode:e,onSelect:t,onCancel:n}){return $(d,{nativeID:"__rn_buoy__type-picker",testID:`buoy-highlight-${e}-types`,style:m.typePicker,children:[C(d,{style:m.typePickerRow,children:bd.map(r=>{let o=Xt(r),i=o.icon;return $(J,{testID:`buoy-highlight-${e}-type-${r.toLowerCase()}`,accessibilityRole:"button",accessibilityLabel:o.label,style:[m.typeOption,{backgroundColor:o.color+"15",borderColor:o.color+"40"}],onPress:()=>t(r),children:[C(i,{size:14,color:o.color}),C(h,{style:[m.typeOptionText,{color:o.color}],children:o.label})]},r)})}),C(J,{testID:`buoy-highlight-${e}-types-cancel`,accessibilityRole:"button",accessibilityLabel:"Cancel",onPress:n,style:m.typePickerCancel,children:C(Rn,{size:16,color:x.color.textTertiary})})]})}function Ta({mode:e,type:t,onSubmit:n,onCancel:r}){let[o,i]=nt(""),l=Xt(t),a=()=>{o.trim()&&n(o.trim())};return $(d,{nativeID:"__rn_buoy__pattern-input",testID:`buoy-highlight-${e}-input-row`,style:m.patternInputContainer,children:[C(Yt,{type:t,value:"",badgeOnly:true,compact:true}),C(cn,{testID:`buoy-highlight-${e}-input`,value:o,onChangeText:i,onSubmitEditing:a,placeholder:"Enter pattern...",placeholderTextColor:x.color.placeholder,style:m.patternInput,autoFocus:true,returnKeyType:"done",autoCorrect:false,autoCapitalize:"none"}),o.trim()&&C(J,{testID:`buoy-highlight-${e}-submit`,accessibilityRole:"button",accessibilityLabel:"Add pattern",onPress:a,style:[m.addPatternButton,{backgroundColor:l.color+"20"}],children:C(h,{style:[m.addPatternButtonText,{color:l.color}],children:"Add"})}),C(J,{testID:`buoy-highlight-${e}-input-cancel`,accessibilityRole:"button",accessibilityLabel:"Cancel",onPress:r,style:m.cancelButton,children:C(Rn,{size:16,color:x.color.textTertiary})})]})}function wa({mode:e,pattern:t,onRemove:n}){let r=Xt(t.type);return $(J,{testID:va(e,t.type,t.value),accessibilityRole:"button",accessibilityLabel:`${r.label} ${t.value}, tap to remove`,style:[m.patternChip,{borderColor:r.color+"40"}],onPress:n,activeOpacity:.7,children:[C(d,{style:[m.patternChipBadge,{backgroundColor:r.color+"20"}],children:C(h,{style:[m.patternChipBadgeText,{color:r.color}],children:r.shortLabel})}),C(h,{style:m.patternChipValue,numberOfLines:1,children:t.value}),C(Rn,{size:12,color:x.color.textTertiary,style:m.patternChipX})]})}var vd={label:"All",shortLabel:"All",color:x.color.textSecondary,icon:ha};function Dt({filterType:e,count:t,isSelected:n,onPress:r}){let o=e==="all"?vd:Xt(e),i=`buoy-highlight-detected-cat-${String(e).toLowerCase()}`;return $(J,{testID:i,accessibilityRole:"button",accessibilityLabel:`${o.label}, ${t}`,style:[m.categoryBadge,{backgroundColor:o.color+"15",borderColor:n?o.color:o.color+"40",borderWidth:n?2:1}],onPress:r,children:[C(o.icon,{size:12,color:o.color}),C(h,{style:[m.categoryBadgeText,{color:o.color}],children:o.label}),C(d,{style:[m.categoryBadgeCountBubble,{backgroundColor:o.color+"25"}],children:C(h,{testID:`${i}-count`,style:[m.categoryBadgeCount,{color:o.color}],children:t})})]})}var Cd=[{value:20,label:"20"},{value:50,label:"50"},{value:100,label:"100"},{value:150,label:"150"},{value:250,label:"250"},{value:500,label:"500"}],_r=[{value:"off",label:"Off",description:"No debug logging"},{value:"minimal",label:"Minimal",description:"Only hook value changes"},{value:"verbose",label:"Verbose",description:"Component + cause + changes"},{value:"all",label:"All",description:"Full fiber dump"}];function Sa({filters:e,onFilterChange:t,settings:n,onSettingsChange:r,availableProps:o,activeTab:i}){let[l,a]=nt(false),[c,s]=nt(false),[u,p]=nt(null),[T,y]=nt(null),[b,f]=nt("all"),[S,v]=nt(null),P=(w=>{switch(w){case"viewType":return o.viewTypes.map(N=>({value:N,type:"viewType"}));case"testID":return o.testIDs.map(N=>({value:N,type:"testID"}));case"nativeID":return o.nativeIDs.map(N=>({value:N,type:"nativeID"}));case"component":return o.componentNames.map(N=>({value:N,type:"component"}));case"accessibilityLabel":return o.accessibilityLabels.map(N=>({value:N,type:"accessibilityLabel"}));case"all":default:return[...o.viewTypes.map(N=>({value:N,type:"viewType"})),...o.testIDs.map(N=>({value:N,type:"testID"})),...o.nativeIDs.map(N=>({value:N,type:"nativeID"})),...o.componentNames.map(N=>({value:N,type:"component"})),...o.accessibilityLabels.map(N=>({value:N,type:"accessibilityLabel"}))]}})(b),g=o.viewTypes.length+o.testIDs.length+o.nativeIDs.length+o.componentNames.length+o.accessibilityLabels.length,D=rt((w,N)=>{let le=[...e.includePatterns,{type:w,value:N}];t({includePatterns:le}),p(null)},[e.includePatterns,t]),k=rt((w,N)=>{let le=[...e.excludePatterns,{type:w,value:N}];t({excludePatterns:le}),y(null)},[e.excludePatterns,t]),R=rt(w=>{let N=e.includePatterns.filter((le,ge)=>ge!==w);t({includePatterns:N})},[e.includePatterns,t]),_=rt(w=>{let N=e.excludePatterns.filter((le,ge)=>ge!==w);t({excludePatterns:N})},[e.excludePatterns,t]),Q=rt((w,N)=>{v({type:w,value:N})},[]),z=rt(()=>{S&&(D(S.type,S.value),v(null))},[S,D]),W=rt(()=>{S&&(k(S.type,S.value),v(null))},[S,k]);return C(d,{style:m.container,children:C(Be,{nativeID:"__rn_buoy__filter-view",testID:"buoy-highlight-filter-scroll",style:m.scrollView,contentContainerStyle:m.scrollContent,showsVerticalScrollIndicator:false,children:i==="filters"?$(Or,{children:[$(d,{style:m.section,children:[$(ee,{children:[C(ee.Icon,{icon:ua,color:x.color.accent,size:12}),C(ee.Title,{children:"INCLUDE ONLY"}),e.includePatterns.length>0&&C(ee.Badge,{testID:"buoy-highlight-include-count",count:e.includePatterns.length,color:x.color.accent})]}),C(h,{style:m.sectionDescription,children:"Show only components matching these patterns. If any are set, components must match at least one."}),e.includePatterns.length>0&&C(d,{style:m.patternChips,children:e.includePatterns.map((w,N)=>C(wa,{mode:"include",pattern:w,onRemove:()=>R(N)},`${w.type}-${w.value}-${N}`))}),C(d,{style:m.addPatternRow,children:l?C(Ca,{mode:"include",onSelect:w=>{a(false),p(w)},onCancel:()=>a(false)}):u?C(Ta,{mode:"include",type:u,onSubmit:w=>D(u,w),onCancel:()=>p(null)}):$(J,{testID:"buoy-highlight-include-add",accessibilityRole:"button",accessibilityLabel:"Add include pattern",style:[m.addButton,{borderColor:x.color.accentBorderStrong}],onPress:()=>a(true),children:[C(da,{size:14,color:x.color.accent}),C(h,{style:[m.addButtonText,{color:x.color.accent}],children:"Add include pattern"})]})})]}),$(d,{style:m.section,children:[$(ee,{children:[C(ee.Icon,{icon:$r,color:x.color.accent,size:12}),C(ee.Title,{children:"EXCLUDE"}),e.excludePatterns.length>0&&C(ee.Badge,{testID:"buoy-highlight-exclude-count",count:e.excludePatterns.length,color:x.color.accent})]}),C(h,{style:m.sectionDescription,children:"Hide components matching these patterns from the list."}),e.excludePatterns.length>0&&C(d,{style:m.patternChips,children:e.excludePatterns.map((w,N)=>C(wa,{mode:"exclude",pattern:w,onRemove:()=>_(N)},`${w.type}-${w.value}-${N}`))}),C(d,{style:m.addPatternRow,children:c?C(Ca,{mode:"exclude",onSelect:w=>{s(false),y(w)},onCancel:()=>s(false)}):T?C(Ta,{mode:"exclude",type:T,onSubmit:w=>k(T,w),onCancel:()=>y(null)}):$(J,{testID:"buoy-highlight-exclude-add",accessibilityRole:"button",accessibilityLabel:"Add exclude pattern",style:[m.addButton,{borderColor:x.color.accentBorderStrong}],onPress:()=>s(true),children:[C(da,{size:14,color:x.color.accent}),C(h,{style:[m.addButtonText,{color:x.color.accent}],children:"Add exclude pattern"})]})})]}),$(d,{style:m.section,children:[$(ee,{children:[C(ee.Icon,{icon:hd,color:x.color.warning,size:12}),C(ee.Title,{children:"RENDER COUNT RANGE"}),(e.minRenderCount!==void 0||e.maxRenderCount!==void 0)&&C(ee.Badge,{count:1,color:x.color.warning})]}),C(h,{style:m.sectionDescription,children:"Show only components with render count in a specific range."}),$(d,{nativeID:"__rn_buoy__render-count-range",testID:"buoy-highlight-range",style:m.renderCountRangeContainer,children:[$(d,{style:m.renderCountInputRow,children:[$(d,{style:m.renderCountInputGroup,children:[C(h,{style:m.renderCountLabel,children:"Min"}),C(cn,{value:e.minRenderCount!==void 0?String(e.minRenderCount):"",onChangeText:w=>{let N=parseInt(w,10);w===""||w===void 0?t({minRenderCount:void 0}):!isNaN(N)&&N>=0&&t({minRenderCount:N})},testID:"buoy-highlight-range-min",placeholder:"0",placeholderTextColor:x.color.placeholder,style:m.renderCountInput,keyboardType:"number-pad",returnKeyType:"done"})]}),C(h,{style:m.renderCountSeparator,children:"to"}),$(d,{style:m.renderCountInputGroup,children:[C(h,{style:m.renderCountLabel,children:"Max"}),C(cn,{value:e.maxRenderCount!==void 0?String(e.maxRenderCount):"",onChangeText:w=>{let N=parseInt(w,10);w===""||w===void 0?t({maxRenderCount:void 0}):!isNaN(N)&&N>=0&&t({maxRenderCount:N})},testID:"buoy-highlight-range-max",placeholder:"\u221E",placeholderTextColor:x.color.placeholder,style:m.renderCountInput,keyboardType:"number-pad",returnKeyType:"done"})]})]}),(e.minRenderCount!==void 0||e.maxRenderCount!==void 0)&&$(J,{testID:"buoy-highlight-range-clear",accessibilityRole:"button",accessibilityLabel:"Clear range",style:m.clearRangeButton,onPress:()=>t({minRenderCount:void 0,maxRenderCount:void 0}),children:[C(Rn,{size:12,color:x.color.warning}),C(h,{style:m.clearRangeButtonText,children:"Clear Range"})]})]})]}),$(d,{style:m.section,children:[$(ee,{children:[C(ee.Icon,{icon:ha,color:x.color.textSecondary,size:12}),C(ee.Title,{children:"DETECTED ITEMS"})]}),C(h,{style:m.sectionDescription,children:"Tap an item to quickly add it as an exclude pattern."}),$(Be,{horizontal:true,showsHorizontalScrollIndicator:false,style:m.categoryBadgeScroll,contentContainerStyle:m.categoryBadgeScrollContent,children:[g>0&&C(Dt,{filterType:"all",count:g,isSelected:b==="all",onPress:()=>f("all")}),o.viewTypes.length>0&&C(Dt,{filterType:"viewType",count:o.viewTypes.length,isSelected:b==="viewType",onPress:()=>f("viewType")}),o.testIDs.length>0&&C(Dt,{filterType:"testID",count:o.testIDs.length,isSelected:b==="testID",onPress:()=>f("testID")}),o.nativeIDs.length>0&&C(Dt,{filterType:"nativeID",count:o.nativeIDs.length,isSelected:b==="nativeID",onPress:()=>f("nativeID")}),o.componentNames.length>0&&C(Dt,{filterType:"component",count:o.componentNames.length,isSelected:b==="component",onPress:()=>f("component")}),o.accessibilityLabels.length>0&&C(Dt,{filterType:"accessibilityLabel",count:o.accessibilityLabels.length,isSelected:b==="accessibilityLabel",onPress:()=>f("accessibilityLabel")})]}),C(d,{nativeID:"__rn_buoy__detected-items",testID:"buoy-highlight-detected",style:m.detectedItemsContainer,children:P.length>0?C(Be,{testID:"buoy-highlight-detected-scroll",style:m.detectedItemsScroll,contentContainerStyle:m.detectedItems,nestedScrollEnabled:true,showsVerticalScrollIndicator:true,children:P.map(w=>{let N=Xt(w.type);return C(J,{testID:ba(w.type,w.value),accessibilityRole:"button",accessibilityLabel:`${N.label} ${w.value}`,style:[m.detectedItem,{borderColor:N.color+"40"}],onPress:()=>Q(w.type,w.value),children:b==="all"?C(Yt,{type:w.type,value:w.value,compact:true,shortLabel:true}):C(h,{style:m.detectedItemText,numberOfLines:1,children:w.value})},`${w.type}-${w.value}`)})}):C(h,{testID:"buoy-highlight-detected-empty",style:m.emptyText,children:"No items detected yet. Start tracking to see components here."})})]}),C(Qo,{visible:S!==null,transparent:true,animationType:"fade",onRequestClose:()=>v(null),children:C(Xo,{accessible:false,testID:"buoy-highlight-detected-popup-backdrop",style:m.modalOverlay,onPress:()=>v(null),children:C(d,{accessible:false,testID:"buoy-highlight-detected-popup",style:m.actionPopup,children:S&&$(Or,{children:[C(d,{style:m.actionPopupHeader,children:C(Yt,{type:S.type,value:S.value,compact:true,shortLabel:true})}),$(d,{style:m.actionPopupButtons,children:[$(J,{testID:"buoy-highlight-detected-popup-include",accessibilityRole:"button",accessibilityLabel:"Include only",style:[m.actionPopupButton,m.actionPopupInclude],onPress:z,children:[C(ua,{size:16,color:x.color.accent}),C(h,{style:[m.actionPopupButtonText,{color:x.color.accent}],children:"Include Only"})]}),$(J,{testID:"buoy-highlight-detected-popup-exclude",accessibilityRole:"button",accessibilityLabel:"Exclude",style:[m.actionPopupButton,m.actionPopupExclude],onPress:W,children:[C($r,{size:16,color:x.color.accent}),C(h,{style:[m.actionPopupButtonText,{color:x.color.accent}],children:"Exclude"})]})]}),C(J,{testID:"buoy-highlight-detected-popup-cancel",accessibilityRole:"button",accessibilityLabel:"Cancel",style:m.actionPopupCancel,onPress:()=>v(null),children:C(h,{style:m.actionPopupCancelText,children:"Cancel"})})]})})})}),$(d,{style:m.section,children:[$(ee,{children:[C(ee.Icon,{icon:$r,color:x.color.textTertiary,size:12}),C(ee.Title,{children:"HOW FILTERS WORK"})]}),C(d,{style:m.howItWorks,children:$(h,{style:m.howItWorksText,children:[C(h,{style:m.howItWorksBold,children:"Any:"})," Matches against all fields",`
|
|
33
|
-
`,
|
|
34
|
-
`,
|
|
35
|
-
`,
|
|
36
|
-
`,'Requires "Show Render Count" to be enabled.']})]})]})
|
|
37
|
-
`,'Requires "Track Render Causes" to be enabled.']})]})]})
|
|
38
|
-
`,"The highlight overlay is always excluded to prevent infinite loops."]})]})]})]})]})})})})}var m=be.create({container:{flex:1,backgroundColor:"transparent"},scrollView:{flex:1},scrollContent:{paddingHorizontal:16,paddingTop:12,paddingBottom:32},section:{backgroundColor:x.color.surface,borderRadius:8,borderWidth:1,borderColor:x.color.border,marginBottom:12,overflow:"hidden"},sectionDescription:{fontSize:11,color:x.color.textSecondary,paddingHorizontal:16,paddingTop:8,lineHeight:16},patternChips:{flexDirection:"row",flexWrap:"wrap",gap:8,paddingHorizontal:16,paddingTop:12},patternChip:{flexDirection:"row",alignItems:"center",backgroundColor:x.color.surfaceElevated,borderRadius:6,borderWidth:1,paddingVertical:4,paddingLeft:4,paddingRight:6,maxWidth:"100%",gap:4},patternChipBadge:{paddingVertical:2,paddingHorizontal:5,borderRadius:4},patternChipBadgeText:{fontSize:9,fontWeight:"700"},patternChipValue:{fontSize:11,color:x.color.text,fontFamily:St,flexShrink:1},patternChipX:{marginLeft:2},addPatternRow:{paddingHorizontal:16,paddingTop:12,paddingBottom:16},addButton:{flexDirection:"row",alignItems:"center",justifyContent:"center",paddingVertical:10,paddingHorizontal:16,borderRadius:8,borderWidth:1,borderStyle:"dashed",gap:6},addButtonText:{fontSize:12,fontWeight:"500"},typePicker:{flexDirection:"row",alignItems:"center",gap:8},typePickerRow:{flex:1,flexDirection:"row",flexWrap:"wrap",gap:8},typeOption:{flexDirection:"row",alignItems:"center",paddingVertical:8,paddingHorizontal:12,borderRadius:6,borderWidth:1,backgroundColor:x.color.surfaceElevated,gap:6},typeOptionText:{fontSize:11,fontWeight:"600"},typePickerCancel:{padding:8},patternInputContainer:{flexDirection:"row",alignItems:"center",backgroundColor:x.color.surfaceElevated,borderRadius:8,borderWidth:1,borderColor:x.color.border,paddingLeft:4,paddingRight:8,paddingVertical:4,gap:4},patternInput:{flex:1,fontSize:12,color:x.color.text,paddingVertical:6,paddingHorizontal:4},addPatternButton:{paddingVertical:6,paddingHorizontal:10,borderRadius:4},addPatternButtonText:{fontSize:11,fontWeight:"600"},cancelButton:{padding:4},categoryBadgeScroll:{marginTop:12},categoryBadgeScrollContent:{paddingHorizontal:16,gap:8},categoryBadge:{flexDirection:"row",alignItems:"center",paddingVertical:8,paddingLeft:10,paddingRight:6,borderRadius:8,borderWidth:1,gap:6},categoryBadgeText:{fontSize:11,fontWeight:"600"},categoryBadgeCountBubble:{paddingHorizontal:6,paddingVertical:2,borderRadius:10,minWidth:20,alignItems:"center"},categoryBadgeCount:{fontSize:10,fontWeight:"600"},detectedItemsContainer:{paddingHorizontal:16,paddingTop:12,paddingBottom:16},detectedItemsScroll:{maxHeight:200},detectedItems:{flexDirection:"row",flexWrap:"wrap",gap:8},detectedItem:{flexDirection:"row",alignItems:"center",backgroundColor:x.color.surfaceElevated,borderRadius:6,borderWidth:1,paddingVertical:6,paddingHorizontal:10,gap:6},detectedItemText:{fontSize:11,color:x.color.text,fontFamily:St},emptyText:{fontSize:11,color:x.color.textTertiary,fontStyle:"italic",textAlign:"center",paddingVertical:16,paddingHorizontal:16},howItWorks:{paddingHorizontal:16,paddingVertical:12},howItWorksText:{fontSize:11,color:x.color.textTertiary,lineHeight:18,fontFamily:St},howItWorksBold:{fontWeight:"700",color:x.color.textSecondary},modalOverlay:{flex:1,backgroundColor:"rgba(0, 0, 0, 0.5)",justifyContent:"center",alignItems:"center",padding:32},actionPopup:{backgroundColor:x.color.surface,borderRadius:12,borderWidth:1,borderColor:x.color.border,width:"100%",maxWidth:300,overflow:"hidden"},actionPopupHeader:{padding:16,borderBottomWidth:1,borderBottomColor:x.color.separator,alignItems:"center"},actionPopupButtons:{flexDirection:"row",padding:12,gap:8},actionPopupButton:{flex:1,flexDirection:"row",alignItems:"center",justifyContent:"center",paddingVertical:12,paddingHorizontal:12,borderRadius:8,gap:8},actionPopupInclude:{backgroundColor:x.color.accentSoft},actionPopupExclude:{backgroundColor:x.color.accentSoft},actionPopupButtonText:{fontSize:13,fontWeight:"600"},actionPopupCancel:{padding:12,borderTopWidth:1,borderTopColor:x.color.separator,alignItems:"center"},actionPopupCancelText:{fontSize:13,color:x.color.textTertiary,fontWeight:"500"},settingsSection:{paddingHorizontal:16,paddingTop:8,paddingBottom:16},settingItem:{gap:8},settingItemSpaced:{marginTop:16,paddingTop:16,borderTopWidth:1,borderTopColor:x.color.separator},settingHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},settingLabel:{fontSize:13,fontWeight:"600",color:x.color.text},settingValue:{backgroundColor:x.color.fillSecondary,paddingHorizontal:10,paddingVertical:4,borderRadius:6},settingValueText:{fontSize:12,fontWeight:"700",color:x.color.textTertiary,fontFamily:St},settingDescription:{fontSize:11,color:x.color.textSecondary,lineHeight:16},settingDescriptionMuted:{fontSize:10,color:x.color.textTertiary,lineHeight:14,marginTop:4,fontStyle:"italic"},settingLabelDisabled:{color:x.color.textTertiary},settingWarning:{color:x.color.warning,fontWeight:"500"},batchSizePresets:{flexDirection:"row",flexWrap:"wrap",gap:8,marginTop:4},batchSizePreset:{paddingVertical:8,paddingHorizontal:14,borderRadius:6,backgroundColor:x.color.surfaceElevated,borderWidth:1,borderColor:x.color.border},batchSizePresetActive:{backgroundColor:x.color.fillSecondary,borderColor:x.color.fillTertiary},batchSizePresetText:{fontSize:12,fontWeight:"500",color:x.color.textSecondary,fontFamily:St},batchSizePresetTextActive:{color:x.color.textTertiary,fontWeight:"700"},renderCountRangeContainer:{paddingHorizontal:16,paddingTop:12,paddingBottom:16,gap:12},renderCountInputRow:{flexDirection:"row",alignItems:"center",gap:12},renderCountInputGroup:{flex:1,gap:4},renderCountLabel:{fontSize:10,fontWeight:"600",color:x.color.textTertiary,textTransform:"uppercase",letterSpacing:.5},renderCountInput:{backgroundColor:x.color.surfaceElevated,borderRadius:8,borderWidth:1,borderColor:x.color.border,paddingVertical:10,paddingHorizontal:12,fontSize:14,fontWeight:"600",color:x.color.text,fontFamily:St,textAlign:"center"},renderCountSeparator:{fontSize:12,color:x.color.textTertiary,marginTop:18},clearRangeButton:{flexDirection:"row",alignItems:"center",justifyContent:"center",paddingVertical:8,paddingHorizontal:12,borderRadius:6,backgroundColor:x.color.warningSoft,borderWidth:1,borderColor:x.color.warning+"40",gap:6,alignSelf:"center"},clearRangeButtonText:{fontSize:11,fontWeight:"600",color:x.color.warning}});j();import{useState as Td,useEffect as xa,useRef as wd,useCallback as Wr,memo as Sd,useMemo as Ia}from"react";Ne();j();import xd,{useMemo as Ra}from"react";import{ChevronRight as Id,night as ot,useRelativeTime as Rd,monoFont as Da}from"@buoy-gg/shared-ui/web";import{jsx as Re,jsxs as kt}from"react/jsx-runtime";function Dd({render:e,onPress:t}){let n=Ra(()=>e.testID?{type:"testID",value:e.testID}:e.nativeID?{type:"nativeID",value:e.nativeID}:e.componentName?{type:"component",value:e.componentName}:e.accessibilityLabel?{type:"accessibilityLabel",value:e.accessibilityLabel}:{type:"nativeTag",value:String(e.nativeTag)},[e.testID,e.nativeID,e.componentName,e.accessibilityLabel,e.nativeTag]),r=Ra(()=>e.accessibilityLabel&&n.type!=="accessibilityLabel"?{type:"accessibilityLabel",value:e.accessibilityLabel}:null,[e.accessibilityLabel,n.type]),o=Rd(e.lastRenderTime),i=ya(n.value);return kt(J,{testID:i,accessibilityRole:"button",accessibilityLabel:`${e.displayName}, ${n.type} ${n.value}, ${e.renderCount} renders`,style:Te.container,onPress:()=>t(e),activeOpacity:.7,children:[Re(d,{style:[Te.colorIndicator,{backgroundColor:e.color}]}),kt(d,{style:Te.content,children:[kt(d,{style:Te.topRow,children:[kt(d,{style:Te.viewTypeContainer,children:[Re(h,{testID:`${i}-name`,style:Te.viewType,numberOfLines:1,children:e.displayName}),r?Re(Yt,{type:r.type,value:r.value,compact:true,shortLabel:true}):e.displayName!==e.viewType?Re(h,{testID:`${i}-type`,style:Te.nativeType,numberOfLines:1,children:e.viewType}):null]}),Re(d,{style:[Te.renderCountBadge,{backgroundColor:e.color+"30"}],children:kt(h,{testID:`${i}-count`,style:[Te.renderCount,{color:e.color}],children:[e.renderCount,"x"]})})]}),e.lastRenderCause&&Re(d,{style:Te.causeRow,children:Re(Qi,{testID:`${i}-cause`,cause:e.lastRenderCause,compact:true,showKeys:true,showTwoLevel:true})}),kt(d,{style:Te.bottomRow,children:[Re(d,{style:Te.identifierContainer,children:Re(Yt,{testID:`${i}-identifier`,type:n.type,value:n.value,compact:true,shortLabel:true})}),Re(h,{testID:`${i}-time`,style:Te.timing,children:o})]})]}),Re(Id,{size:16,color:ot.color.textTertiary})]})}var ka=xd.memo(Dd,(e,t)=>{let n=e.render,r=t.render;return n.id===r.id&&n.renderCount===r.renderCount&&n.color===r.color&&n.lastRenderTime===r.lastRenderTime&&n.lastRenderCause?.type===r.lastRenderCause?.type&&n.lastRenderCause?.componentCause===r.lastRenderCause?.componentCause&&e.onPress===t.onPress}),Te=be.create({container:{flexDirection:"row",alignItems:"center",paddingVertical:10,paddingHorizontal:12,marginHorizontal:12,marginBottom:6,backgroundColor:ot.color.surface,borderRadius:8,borderWidth:1,borderColor:ot.color.border},colorIndicator:{width:4,height:36,borderRadius:2,marginRight:10},content:{flex:1,marginRight:8},topRow:{flexDirection:"row",alignItems:"center",marginBottom:4},causeRow:{marginBottom:4},viewTypeContainer:{flex:1,marginRight:8},viewType:{fontSize:13,fontWeight:"600",color:ot.color.text},nativeType:{fontSize:10,color:ot.color.textTertiary,fontFamily:Da,marginTop:1},accessibilityLabel:{fontSize:10,color:ot.color.accent,fontStyle:"italic",marginTop:1},renderCountBadge:{paddingHorizontal:8,paddingVertical:2,borderRadius:10},renderCount:{fontSize:11,fontWeight:"700",fontFamily:Da},bottomRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:8},identifierContainer:{flex:1,flexShrink:1,overflow:"hidden"},timing:{fontSize:10,color:ot.color.textTertiary,fontWeight:"500",flexShrink:0}});import{Lock as kd,night as jr,useLimit as Pd,ToolEmptyState as Ld,resolveListEmptyState as Nd}from"@buoy-gg/shared-ui/web";import{jsx as Qt,jsxs as Pa}from"react/jsx-runtime";function zd({searchText:e,filters:t,onSelectRender:n,onStatsChange:r,onRendersChange:o,isTracking:i,isPro:l=false}){let[a,c]=Td(()=>V.getFilteredRenders(e)),s=wd(null);xa(()=>V.subscribe(()=>{let v=V.getFilteredRenders(e);c(v),r(V.getStats()),o?.(v)}),[e,r,o]),xa(()=>{let v=V.getFilteredRenders(e);c(v),o?.(v)},[e,t,o]);let u=Pd("highlightUpdates.components"),p=l?1/0:u,T=Ia(()=>a.slice(0,p),[a,p]),y=Ia(()=>Math.max(0,a.length-p),[a.length,p]),b=Wr(v=>v.id,[]),f=Wr(({item:v,index:P})=>Qt(ka,{render:v,onPress:()=>n(v,P,T)}),[n,T]),S=Wr(()=>y<=0?null:Pa(d,{testID:"buoy-highlight-locked",style:Dn.lockedBanner,children:[Qt(kd,{size:14,color:jr.color.warning}),Pa(h,{testID:"buoy-highlight-locked-text",style:Dn.lockedBannerText,children:[y," more ",y===1?"component":"components"," locked"]}),Qt(h,{style:Dn.lockedBannerSubtext,children:"Upgrade to Pro"})]}),[y]);if(a.length===0){let v=e.trim(),P=V.getStats().totalComponents,g=v?V.getFilteredRenders("").length:0,D=Nd({subject:"components",verb:"tracked",search:e,total:v?g:P,capturing:i,blocked:v&&g===0&&P>0?"The active filters hide everything tracked, so there is nothing to search.":void 0,waiting:{otto:"stare",title:"No renders tracked",message:"Component renders will appear here"},paused:{title:"No renders tracked",message:"Enable tracking to start capturing"}});return Qt(Ld,{...D,testID:"buoy-highlight-empty"})}return Qt(Yo,{testID:"buoy-highlight-list",ref:s,data:T,renderItem:f,keyExtractor:b,contentContainerStyle:Dn.listContent,showsVerticalScrollIndicator:true,initialNumToRender:10,maxToRenderPerBatch:10,windowSize:10,scrollEnabled:false,ListFooterComponent:S})}var Vd=Sd(zd),Dn=be.create({listContent:{paddingTop:8},lockedBanner:{flexDirection:"row",alignItems:"center",justifyContent:"center",paddingVertical:12,paddingHorizontal:16,marginTop:8,gap:8},lockedBannerText:{color:jr.color.warning,fontSize:13,fontWeight:"500"},lockedBannerSubtext:{color:jr.color.textTertiary,fontSize:12}});j();import{memo as Pt}from"react";import{Trash2 as Ad,Search as Bd,Filter as Hd,Pause as Md,Copy as $d,ModalHeader as de,TabSelector as La,night as he,PowerToggleButton as Fd}from"@buoy-gg/shared-ui/web";j();import{useState as Ed,useEffect as Od,memo as _d}from"react";Ne();import{Activity as Wd,night as kn,monoFont as jd}from"@buoy-gg/shared-ui/web";import{jsx as Na,jsxs as Ud}from"react/jsx-runtime";function Gd(){let[e,t]=Ed({totalComponents:0,totalRenders:0});return Od(()=>V.subscribe(()=>{t(V.getStats())}),[]),Ud(d,{nativeID:"__rn_buoy__stats-row",testID:"buoy-highlight-stats",accessibilityLabel:`${e.totalComponents} components tracked`,style:za.headerChip,children:[Na(Wd,{size:12,color:kn.color.accent}),Na(h,{testID:"buoy-highlight-stats-value",style:[za.headerChipValue,{color:kn.color.accent}],children:e.totalComponents})]})}var Kd=_d(Gd),za=be.create({headerChip:{flexDirection:"row",alignItems:"center",gap:4,backgroundColor:kn.color.buttonSurface,paddingHorizontal:8,paddingVertical:5,borderRadius:12,borderWidth:1,borderColor:kn.color.border},headerChipValue:{fontSize:12,fontWeight:"600",fontFamily:jd}});import{jsx as Y,jsxs as Zt}from"react/jsx-runtime";var qd=Pt(function({isActive:e,searchText:t,onSearchChange:n,onSearchClose:r}){return e?Y(de.Search,{value:t,onChangeText:n,onCancel:()=>{n(""),r()},onDismiss:r,dismissOnBlur:true,clearOnlyWhenText:true,placeholder:"Search testID, nativeID, component...",accessibilityLabel:"Search renders",iconSize:14,testID:"buoy-highlight-search-field",containerTestID:"buoy-highlight-search-container",containerNativeID:"__rn_buoy__search-container",clearTestID:"buoy-highlight-search-clear"}):null}),Jd=qd,Yd=Pt(function({onSearchToggle:e,onFilterToggle:t,onToggleTracking:n,onToggleFreeze:r,onClear:o,onOpenCopySettings:i,isTracking:l,isFrozen:a,activeFilterCount:c,hasRenders:s}){return Zt(de.Actions,{children:[Y(J,{testID:"buoy-highlight-search",accessibilityRole:"button",accessibilityLabel:"Search renders",onPress:e,style:Le.headerActionButton,children:Y(Bd,{size:14,color:he.color.textSecondary})}),Y(J,{testID:"buoy-highlight-filters",accessibilityRole:"button",accessibilityLabel:c>0?`Filters, ${c} active`:"Filters",onPress:t,style:[Le.headerActionButton,c>0&&Le.activeFilterButton],children:Y(Hd,{size:14,color:c>0?he.color.accent:he.color.textTertiary})}),Y(J,{testID:"buoy-highlight-copy",accessibilityRole:"button",onPress:i,style:[Le.headerActionButton,!s&&Le.headerActionButtonDisabled],disabled:!s,accessibilityLabel:"Open copy settings",children:Y($d,{size:14,color:s?he.color.textSecondary:he.color.textTertiary})}),Y(J,{testID:"buoy-highlight-freeze",accessibilityRole:"button",accessibilityLabel:a?"Unfreeze frame":"Freeze frame",onPress:r,style:[Le.headerActionButton,a&&Le.freezeButton,!l&&Le.headerActionButtonDisabled],disabled:!l,children:Y(Md,{size:14,color:l?a?he.color.accent:he.color.textTertiary:he.color.textTertiary})}),Y(Fd,{testID:"buoy-highlight-power",isEnabled:l,onToggle:n,accessibilityLabel:"Toggle render tracking"}),Y(J,{testID:"buoy-highlight-clear",accessibilityRole:"button",accessibilityLabel:"Clear tracked renders",onPress:o,style:[Le.headerActionButton,!s&&Le.headerActionButtonDisabled],disabled:!s,children:Y(Ad,{size:14,color:s?he.color.textTertiary:he.color.textTertiary})})]})}),Xd=Yd,Qd=Pt(function({onBack:e,isSearchActive:t,searchText:n,onSearchChange:r,onSearchToggle:o,onSearchClose:i,onFilterToggle:l,onToggleTracking:a,onToggleFreeze:c,onClear:s,onOpenCopySettings:u,isTracking:p,isFrozen:T,activeFilterCount:y,hasRenders:b,searchInputRef:f}){return Zt(de,{children:[e&&Y(de.Navigation,{onBack:e}),Y(de.Content,{title:"",children:t?Y(Jd,{isActive:t,searchText:n,onSearchChange:r,onSearchClose:i,searchInputRef:f}):Y(Kd,{})}),Y(Xd,{onSearchToggle:o,onFilterToggle:l,onToggleTracking:a,onToggleFreeze:c,onClear:s,onOpenCopySettings:u,isTracking:p,isFrozen:T,activeFilterCount:y,hasRenders:b})]})}),Zd=Pt(function({onBack:e,activeTab:t,onTabChange:n,activeFilterCount:r=0}){let o=[{key:"filters",label:`Filters${r>0?` (${r})`:""}`},{key:"settings",label:"Settings"}];return Zt(de,{children:[Y(de.Navigation,{onBack:e}),Y(de.Content,{title:"",noMargin:true,children:Y(La,{tabs:o,activeTab:t,onTabChange:i=>n(i),testIDPrefix:"buoy-highlight-filter-tab"})}),Y(de.Actions,{})]})}),eh=Pt(function({onBack:e,activeTab:t,onTabChange:n,hasHistory:r=true}){let o=[{key:"details",label:"Details"},{key:"history",label:"History",disabled:!r}];return Zt(de,{children:[Y(de.Navigation,{onBack:e}),Y(de.Content,{title:"",noMargin:true,children:Y(La,{tabs:o,activeTab:t,onTabChange:i=>n(i),testIDPrefix:"buoy-highlight-detail-tab"})}),Y(de.Actions,{})]})}),th=Pt(function({onBack:e}){return Zt(de,{children:[Y(de.Navigation,{onBack:e}),Y(de.Content,{title:"Copy Settings",testID:"buoy-highlight-copy-title"})]})}),Le=be.create({headerActionButton:{width:32,height:32,borderRadius:8,backgroundColor:he.color.buttonSurface,borderWidth:1,borderColor:he.color.border,alignItems:"center",justifyContent:"center"},headerActionButtonDisabled:{opacity:.55},activeFilterButton:{backgroundColor:he.color.accentSoft,borderColor:he.color.accentBorderStrong},freezeButton:{backgroundColor:he.color.accentSoft,borderColor:he.color.accentBorderStrong}});j();import{useState as Ur,useCallback as Pn,useMemo as en}from"react";Ne();import{Clock as nh,GitBranch as rh,Database as Va,Lock as oh,formatRelativeTime as Aa,SectionHeader as Lt,EventStepperFooter as Ba,buoyColors as Ha,night as B,useLimit as Ma,ToolEmptyState as ih,monoFont as _e}from"@buoy-gg/shared-ui/web";import{TreeDiffViewer as $a}from"@buoy-gg/shared-ui/web/dataViewer";import{Fragment as ah,jsx as H,jsxs as K}from"react/jsx-runtime";function Gr(e){let t=new Date(e),n=t.getHours().toString().padStart(2,"0"),r=t.getMinutes().toString().padStart(2,"0"),o=t.getSeconds().toString().padStart(2,"0"),i=t.getMilliseconds().toString().padStart(3,"0");return`${n}:${r}:${o}.${i}`}function Fa({render:e,disableInternalFooter:t=false,selectedEventIndex:n,onEventIndexChange:r,isPro:o=false}){let[i,l]=Ur(0),a=n??i,c=r??l,[s,u]=Ur("current"),p=en(()=>!e.renderHistory||e.renderHistory.length===0?[]:[...e.renderHistory].sort((k,R)=>k.timestamp-R.timestamp),[e.renderHistory]),T=Ma("highlightUpdates.historyEvents"),y=o?1/0:T,b=en(()=>p.slice(-y),[p,y]),f=en(()=>Math.max(0,p.length-y),[p.length,y]),S=b.length,v=b[a],P=a>0?b[a-1]:null,g=Pn(()=>{a>0&&c(a-1)},[a,c]),D=Pn(()=>{a<S-1&&c(a+1)},[a,S,c]);if(S===0){let k=V.getSettings().enableRenderHistory;return H(ih,{testID:"buoy-highlight-history-empty",otto:k?"stare":"paused",title:"No Render History",message:k?"History is on and armed \u2014 this component has not re-rendered since. Interact with the app to record one.":"Enable render history tracking in settings to see render events here."})}return K(ah,{children:[K(d,{style:[I.container,{paddingBottom:!t&&S>1?80:0}],children:[f>0&&K(d,{testID:"buoy-highlight-history-locked",style:I.lockedBanner,children:[H(oh,{size:14,color:B.color.warning}),K(h,{testID:"buoy-highlight-history-locked-text",style:I.lockedBannerText,children:[f," older ",f===1?"render":"renders"," locked"]}),H(h,{style:I.lockedBannerSubtext,children:"Upgrade to Pro"})]}),K(d,{style:I.viewToggleContainer,children:[K(J,{testID:"buoy-highlight-history-mode-current",accessibilityRole:"button",accessibilityLabel:"Current state",style:[I.viewToggleCard,s==="current"&&I.viewToggleCardActive],onPress:()=>u("current"),activeOpacity:.8,children:[K(d,{style:I.viewToggleContent,children:[H(Va,{size:16,color:s==="current"?B.color.accent:B.color.textSecondary}),H(h,{style:[I.viewToggleLabel,s==="current"&&I.viewToggleLabelActive],children:"CURRENT STATE"})]}),K(h,{style:[I.viewToggleDescription,s==="current"&&{color:B.color.text}],children:["View render #",v?.renderNumber??0," details"]})]}),K(d,{testID:"buoy-highlight-history-mode-diff",accessibilityLabel:"Diff view, coming soon",style:[I.viewToggleCard,I.viewToggleCardDisabled],children:[K(d,{style:I.viewToggleContent,children:[H(rh,{size:16,color:B.color.textTertiary}),H(h,{style:[I.viewToggleLabel,I.viewToggleLabelDisabled],children:"DIFF VIEW"}),H(d,{style:I.todoBadge,children:H(h,{style:I.todoBadgeText,children:"TODO"})})]}),H(h,{style:[I.viewToggleDescription,{color:B.color.textTertiary}],children:"Compare renders side by side (coming soon)"})]})]}),H(Be,{testID:"buoy-highlight-history-scroll",style:I.contentScroll,contentContainerStyle:I.contentContainer,showsVerticalScrollIndicator:false,children:s==="current"?H(lh,{event:v,render:e}):H(sh,{previousEvent:P,currentEvent:v,render:e})})]}),!t&&H(Ba,{currentIndex:a,totalItems:S,onPrevious:g,onNext:D,itemLabel:"Render",subtitle:Aa(new Date(v?.timestamp??Date.now()))})]})}function lh({event:e,render:t}){if(!e)return H(d,{testID:"buoy-highlight-history-no-event",style:I.noEventContainer,children:H(h,{style:I.noEventText,children:"No event selected"})});let n=Oe[e.cause.type];return K(d,{style:I.currentStateContainer,children:[K(d,{style:I.eventHeader,children:[K(d,{style:I.eventHeaderLeft,children:[K(h,{testID:"buoy-highlight-history-event-title",style:I.eventTitle,children:["Render #",e.renderNumber]}),H(h,{testID:"buoy-highlight-history-event-time",style:I.eventTime,children:Gr(e.timestamp)})]}),K(d,{style:[I.eventBadge,{backgroundColor:t.color+"30"}],children:[H(d,{style:[I.eventBadgeDot,{backgroundColor:t.color}]}),H(h,{testID:"buoy-highlight-history-event-cause",style:[I.eventBadgeText,{color:t.color}],children:e.cause.type.toUpperCase()})]})]}),K(d,{style:I.section,children:[K(Lt,{children:[H(Lt.Icon,{icon:nh,color:n.color,size:12}),H(Lt.Title,{children:"WHY DID THIS RENDER?"})]}),H(d,{style:I.sectionContent,children:H(Zi,{cause:e.cause,nativeType:t.viewType})})]}),e.capturedProps&&Object.keys(e.capturedProps).length>0&&K(d,{style:I.section,children:[K(Lt,{children:[H(Lt.Icon,{icon:Va,color:B.color.accent,size:12}),H(Lt.Title,{children:"CAPTURED PROPS"})]}),H(d,{style:I.sectionContent,children:H(Be,{horizontal:true,showsHorizontalScrollIndicator:false,style:I.propsScrollView,children:H(h,{testID:"buoy-highlight-history-props",style:I.propsJson,children:JSON.stringify(e.capturedProps,null,2)})})})]})]})}function sh({previousEvent:e,currentEvent:t,render:n}){let[r,o]=Ur("props");if(!e||!t)return H(d,{style:I.noEventContainer,children:H(h,{style:I.noEventText,children:"Select an event with a previous event to compare"})});let i=Oe[e.cause.type],l=Oe[t.cause.type],a=e.capturedProps&&t.capturedProps,c=e.capturedState&&t.capturedState;return K(d,{style:I.diffContainer,children:[K(d,{style:I.compareBar,children:[K(d,{style:I.compareSide,children:[K(d,{style:I.compareLabelRow,children:[H(h,{style:[I.compareLabel,{color:Ha.warning}],children:"PREV"}),H(d,{style:[I.compareActionBadge,{backgroundColor:`${i.color}20`}],children:H(h,{style:[I.compareActionText,{color:i.color}],children:e.cause.type.toUpperCase()})})]}),K(d,{style:I.compareMeta,children:[K(h,{style:I.compareIndex,children:["#",e.renderNumber]}),H(h,{style:I.compareTime,children:Gr(e.timestamp)})]})]}),H(d,{style:I.compareDivider,children:H(h,{style:I.compareArrow,children:"\u2192"})}),K(d,{style:I.compareSide,children:[K(d,{style:I.compareLabelRow,children:[H(h,{style:[I.compareLabel,{color:Ha.success}],children:"CUR"}),H(d,{style:[I.compareActionBadge,{backgroundColor:`${l.color}20`}],children:H(h,{style:[I.compareActionText,{color:l.color}],children:t.cause.type.toUpperCase()})})]}),K(d,{style:I.compareMeta,children:[K(h,{style:I.compareIndex,children:["#",t.renderNumber]}),H(h,{style:I.compareTime,children:Gr(t.timestamp)})]})]})]}),K(d,{style:I.diffModeTabs,children:[H(J,{style:[I.diffModeTab,r==="cause"&&I.diffModeTabActive],onPress:()=>o("cause"),activeOpacity:.7,children:H(h,{style:[I.diffModeTabText,r==="cause"&&I.diffModeTabTextActive],children:"CAUSE"})}),H(J,{style:[I.diffModeTab,r==="props"&&I.diffModeTabActive,!a&&I.diffModeTabDisabled],onPress:()=>a&&o("props"),activeOpacity:a?.7:1,children:H(h,{style:[I.diffModeTabText,r==="props"&&I.diffModeTabTextActive,!a&&I.diffModeTabTextDisabled],children:"PROPS"})}),H(J,{style:[I.diffModeTab,r==="state"&&I.diffModeTabActive,!c&&I.diffModeTabDisabled],onPress:()=>c&&o("state"),activeOpacity:c?.7:1,children:H(h,{style:[I.diffModeTabText,r==="state"&&I.diffModeTabTextActive,!c&&I.diffModeTabTextDisabled],children:"STATE"})})]}),r==="cause"&&H(d,{style:I.diffSummary,children:H(Zi,{cause:t.cause,nativeType:n.viewType})}),r==="props"&&H(d,{style:I.treeDiffContainer,children:a?H($a,{oldValue:e.capturedProps,newValue:t.capturedProps,theme:"dark",showUnchanged:true}):K(d,{style:I.noDiffData,children:[H(h,{style:I.noDiffDataTitle,children:"Props Not Captured"}),H(h,{style:I.noDiffDataText,children:'Enable "Capture Props on Render" in settings to see props diff.'})]})}),r==="state"&&H(d,{style:I.treeDiffContainer,children:c?H($a,{oldValue:e.capturedState,newValue:t.capturedState,theme:"dark",showUnchanged:true}):K(d,{style:I.noDiffData,children:[H(h,{style:I.noDiffDataTitle,children:"State Not Captured"}),H(h,{style:I.noDiffDataText,children:'Enable "Capture State on Render" in settings to see state diff.'})]})})]})}function Ea({render:e,selectedEventIndex:t=0,onEventIndexChange:n=()=>{},isPro:r=false}){let o=en(()=>!e.renderHistory||e.renderHistory.length===0?[]:[...e.renderHistory].sort((T,y)=>T.timestamp-y.timestamp),[e.renderHistory]),i=Ma("highlightUpdates.historyEvents"),l=r?1/0:i,a=en(()=>o.slice(-l),[o,l]),c=a.length,s=a[t],u=Pn(()=>{n(Math.max(0,t-1))},[t,n]),p=Pn(()=>{n(Math.min(c-1,t+1))},[t,c,n]);return c<=1?null:H(Ba,{currentIndex:t,totalItems:c,onPrevious:u,onNext:p,itemLabel:"Render",subtitle:s?Aa(new Date(s.timestamp)):void 0})}var I=be.create({container:{flex:1,backgroundColor:"transparent"},emptyContainer:{flex:1,alignItems:"center",justifyContent:"center",padding:32,gap:12},emptyTitle:{fontSize:16,fontWeight:"600",color:B.color.text},emptyText:{fontSize:13,color:B.color.textSecondary,textAlign:"center",lineHeight:18},viewToggleContainer:{flexDirection:"row",padding:12,gap:8},viewToggleCard:{flex:1,backgroundColor:B.color.surface,borderRadius:8,borderWidth:1,borderColor:B.color.border,padding:10,gap:4},viewToggleCardActive:{borderColor:B.color.accentBorderStrong,backgroundColor:B.color.accentSoft},viewToggleCardDisabled:{opacity:.5},todoBadge:{backgroundColor:B.color.fillSecondary,paddingHorizontal:6,paddingVertical:2,borderRadius:4,marginLeft:4},todoBadgeText:{fontSize:9,fontWeight:"700",color:B.color.textTertiary,letterSpacing:.3},viewToggleContent:{flexDirection:"row",alignItems:"center",gap:6},viewToggleLabel:{fontSize:10,fontWeight:"700",color:B.color.textSecondary,letterSpacing:.5},viewToggleLabelActive:{color:B.color.accent},viewToggleLabelDisabled:{color:B.color.textTertiary},viewToggleDescription:{fontSize:11,color:B.color.textTertiary,marginTop:2},contentScroll:{flex:1},contentContainer:{padding:12,paddingTop:0},noEventContainer:{padding:24,alignItems:"center"},noEventText:{fontSize:13,color:B.color.textTertiary},currentStateContainer:{gap:12},eventHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",backgroundColor:B.color.surface,borderRadius:8,borderWidth:1,borderColor:B.color.border,padding:12},eventHeaderLeft:{gap:2},eventTitle:{fontSize:15,fontWeight:"700",color:B.color.text},eventTime:{fontSize:11,color:B.color.textTertiary,fontFamily:_e},eventBadge:{flexDirection:"row",alignItems:"center",paddingHorizontal:10,paddingVertical:4,borderRadius:12,gap:6},eventBadgeDot:{width:6,height:6,borderRadius:3},eventBadgeText:{fontSize:10,fontWeight:"700",fontFamily:_e},section:{backgroundColor:B.color.surface,borderRadius:8,borderWidth:1,borderColor:B.color.border,overflow:"hidden"},sectionContent:{padding:12,paddingTop:8},causeContainer:{marginBottom:12},changedList:{marginBottom:12,paddingLeft:4},changedListTitle:{fontSize:11,fontWeight:"600",color:B.color.textSecondary,marginBottom:6},changedItem:{fontSize:12,color:B.color.text,fontFamily:_e,marginBottom:3,paddingLeft:8},propsScrollView:{maxHeight:150},propsJson:{fontSize:11,fontFamily:_e,color:B.color.text,backgroundColor:B.color.bg,padding:10,borderRadius:6},diffContainer:{gap:12},compareBar:{flexDirection:"row",backgroundColor:B.color.surface,borderRadius:8,borderWidth:1,borderColor:B.color.border,padding:10},compareSide:{flex:1,gap:4},compareLabelRow:{flexDirection:"row",alignItems:"center",gap:8},compareLabel:{fontSize:10,fontWeight:"700",letterSpacing:.5},compareActionBadge:{paddingHorizontal:6,paddingVertical:2,borderRadius:4},compareActionText:{fontSize:9,fontWeight:"600"},compareMeta:{flexDirection:"row",alignItems:"center",gap:6},compareIndex:{fontSize:12,fontWeight:"600",color:B.color.text},compareTime:{fontSize:10,color:B.color.textTertiary,fontFamily:_e},compareDivider:{width:30,alignItems:"center",justifyContent:"center"},compareArrow:{fontSize:16,color:B.color.textTertiary},diffSummary:{backgroundColor:B.color.surface,borderRadius:8,borderWidth:1,borderColor:B.color.border,padding:12},diffSummaryTitle:{fontSize:11,fontWeight:"600",color:B.color.textSecondary,marginBottom:8},diffChanges:{gap:4},diffChangeItem:{flexDirection:"row",alignItems:"center",gap:6},diffChangeIcon:{fontSize:12,fontWeight:"700",color:B.color.warning,fontFamily:_e},diffChangeKey:{fontSize:12,color:B.color.text,fontFamily:_e},diffNoChanges:{fontSize:12,color:B.color.textTertiary,fontStyle:"italic"},diffPlaceholder:{fontSize:12,color:B.color.textTertiary,fontStyle:"italic",textAlign:"center",padding:16},diffModeTabs:{flexDirection:"row",backgroundColor:B.color.surface,borderRadius:8,borderWidth:1,borderColor:B.color.border,padding:4,gap:4},diffModeTab:{flex:1,paddingVertical:8,paddingHorizontal:12,borderRadius:6,alignItems:"center"},diffModeTabActive:{backgroundColor:B.color.accentSoft},diffModeTabDisabled:{opacity:.4},diffModeTabText:{fontSize:10,fontWeight:"600",color:B.color.textSecondary,letterSpacing:.5},diffModeTabTextActive:{color:B.color.accent},diffModeTabTextDisabled:{color:B.color.textTertiary},causeDiffContainer:{gap:8,marginBottom:12},causeDiffRow:{flexDirection:"row",alignItems:"center",gap:8},causeDiffLabel:{fontSize:11,fontWeight:"600",color:B.color.textSecondary,minWidth:80},causeDiffValue:{fontSize:12,color:B.color.text,fontFamily:_e,fontWeight:"500"},diffChangesTitle:{fontSize:11,fontWeight:"600",color:B.color.textSecondary,marginBottom:6},treeDiffContainer:{backgroundColor:B.color.surface,borderRadius:8,borderWidth:1,borderColor:B.color.border,overflow:"hidden",minHeight:150},noDiffData:{padding:24,alignItems:"center",gap:8},noDiffDataTitle:{fontSize:13,fontWeight:"600",color:B.color.text},noDiffDataText:{fontSize:12,color:B.color.textTertiary,textAlign:"center",lineHeight:18},lockedBanner:{flexDirection:"row",alignItems:"center",justifyContent:"center",paddingVertical:10,paddingHorizontal:16,marginHorizontal:12,marginTop:8,backgroundColor:B.color.warningSoft,borderRadius:8,borderWidth:1,borderColor:B.color.warning+"30",gap:8},lockedBannerText:{color:B.color.warning,fontSize:13,fontWeight:"500"},lockedBannerSubtext:{color:B.color.textTertiary,fontSize:12}});j();import{useCallback as Nt,useEffect as ch,useMemo as Ln,useState as Oa}from"react";import{DynamicFilterView as uh,macOSColors as Kr,night as qr,FileText as _a,FileCode as Wa,Zap as ja,Settings as dh,Eye as hh,Layers as gh,ToolbarCopyButton as ph,ExportPreview as fh,monoFont as mh}from"@buoy-gg/shared-ui/web";j();var Jr={format:"summary",topN:25,minRenders:2,filterCauses:[],groupByName:true,aggregateCauses:true,sortBy:"renderCount",includeHistory:false},Ua={llm:{format:"summary",topN:25,minRenders:2,filterCauses:[],groupByName:true,aggregateCauses:true,sortBy:"renderCount",includeHistory:false},table:{format:"markdown-table",topN:50,minRenders:2,filterCauses:[],groupByName:true,aggregateCauses:true,sortBy:"renderCount",includeHistory:false},json:{format:"json",topN:-1,minRenders:1,filterCauses:[],groupByName:false,aggregateCauses:true,sortBy:"renderCount",includeHistory:false},full:{format:"json",topN:-1,minRenders:1,filterCauses:[],groupByName:false,aggregateCauses:false,sortBy:"renderCount",includeHistory:true}};function yh(e){for(let[t,n]of Object.entries(Ua))if(Object.keys(n).every(r=>{let o=e[r],i=n[r];return Array.isArray(o)&&Array.isArray(i)?o.length===i.length&&o.every((l,a)=>l===i[a]):o===i}))return t;return null}var Ie={llm:{label:"LLM",description:"Compact summary for AI",color:"#10B981"},table:{label:"Table",description:"Markdown table",color:"#3B82F6"},json:{label:"JSON",description:"Structured data",color:"#F59E0B"},full:{label:"Full",description:"Everything incl. history",color:"#6B7280"}};j();import{definePersistedSetting as bh,devToolsStorageKeys as vh}from"@buoy-gg/shared-ui/web";var Ga=bh(vh.highlightUpdates.copySettings(),Jr,{sanitize:(e,t)=>({...e,filterCauses:t?.filterCauses??Jr.filterCauses})});async function Ch(e){await Ga.save(e)}async function Th(){return Ga.loadOrNull()}import{Fragment as wh,jsx as zt,jsxs as Sh}from"react/jsx-runtime";var xh=50*1024,Ih=200*1024,Rh=[{value:"mount",label:"Mount"},{value:"props",label:"Props"},{value:"hooks",label:"Hooks"},{value:"state",label:"State"},{value:"parent",label:"Parent"},{value:"context",label:"Context"},{value:"unknown",label:"Unknown"}];function Dh(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function kh(){let e=Date.now();return[{id:"1",nativeTag:1,viewType:"RCTView",displayName:"View",componentName:"PokemonListItem",renderCount:30,firstRenderTime:e-5e3,lastRenderTime:e,color:"#10B981",lastRenderCause:{type:"parent",timestamp:e,componentCause:"parent"}},{id:"2",nativeTag:2,viewType:"RCTView",displayName:"View",componentName:"CartHeader",renderCount:12,firstRenderTime:e-4e3,lastRenderTime:e,color:"#3B82F6",lastRenderCause:{type:"hooks",timestamp:e,componentCause:"state",hookChanges:[{type:"useState",index:2,previousValue:4,currentValue:5}]}},{id:"3",nativeTag:3,viewType:"RCTView",displayName:"View",componentName:"SearchBar",renderCount:8,firstRenderTime:e-3e3,lastRenderTime:e,color:"#F59E0B",lastRenderCause:{type:"props",timestamp:e,componentCause:"props",changedKeys:["query","onChange"]}}]}function Ph({renders:e}){let[t,n]=Oa(Jr),[r,o]=Oa(false);ch(()=>{let v=true;return Th().then(P=>{v&&P&&n(P)}),()=>{v=false}},[]);let i=Nt(v=>{n(v),Ch(v)},[]),l=e.length>0,a=l?e:kh(),c=Ln(()=>yh(t),[t]),s=Ln(()=>od(a,t),[a,t]),u=Ln(()=>s>=Ih?"danger":s>=xh?"warning":"none",[s]),p=Nt(()=>Hr(a,t),[a,t]),T=Nt(v=>{let P=Ua[v];P&&i({...P,filterCauses:[...P.filterCauses]})},[i]),y=Nt((v,P)=>{let[g,D]=v.split("::");if(g==="preset"){T(D);return}if(g==="format"){i({...t,format:P});return}if(g==="sort"){i({...t,sortBy:P});return}if(g==="topN"){i({...t,topN:P});return}if(g==="minRenders"){i({...t,minRenders:P});return}if(g==="cause"){let k=P,R=t.filterCauses.includes(k);i({...t,filterCauses:R?t.filterCauses.filter(_=>_!==k):[...t.filterCauses,k]});return}if(g==="signal"){let k=D;i({...t,[k]:!t[k]});return}},[t,i,T]),b=Nt(()=>{let{totalComponents:v,totalRenders:P}=sa(a);return zt(fh,{expanded:r,onExpandedChange:o,summary:`${v} component${v!==1?"s":""} \xB7 ${P} renders \xB7 ~${Dh(s)}${l?"":" (mock data)"}`,warningLevel:u,warningText:{warning:"Large payload \u2014 preview may be slow",danger:"Very large payload \u2014 try a smaller topN or turn off history"},testIDs:{expand:"buoy-highlight-copy-preview-show",collapse:"buoy-highlight-copy-preview-hide",summary:"buoy-highlight-copy-preview-summary",warning:"buoy-highlight-copy-size-warning"},renderBody:()=>{let g=p();return zt(Be,{testID:"buoy-highlight-copy-preview-scroll",style:Yr.previewScroll,nestedScrollEnabled:true,children:zt(h,{testID:"buoy-highlight-copy-preview-text",style:Yr.previewText,selectable:true,children:g})})}})},[r,a,s,u,l,p]),f=Nt(()=>{let{totalComponents:v}=sa(a),P=l?`${v} components`:"Mock data (no renders captured)";return Sh(wh,{children:[zt(h,{testID:"buoy-highlight-copy-status",style:Yr.statusLabel,children:P}),zt(ph,{value:p})]})},[l,a,p]),S=Ln(()=>({sections:[{id:"presets",title:"Presets",type:"custom",data:[{id:"preset::llm",label:Ie.llm.label,icon:ja,color:Ie.llm.color,value:"llm",isActive:c==="llm",description:Ie.llm.description},{id:"preset::table",label:Ie.table.label,icon:_a,color:Ie.table.color,value:"table",isActive:c==="table",description:Ie.table.description},{id:"preset::json",label:Ie.json.label,icon:Wa,color:Ie.json.color,value:"json",isActive:c==="json",description:Ie.json.description},{id:"preset::full",label:Ie.full.label,icon:gh,color:Ie.full.color,value:"full",isActive:c==="full",description:Ie.full.description},{id:"preset::custom",label:"Custom",icon:dh,color:qr.color.textSecondary,value:"custom",isActive:c===null,description:"User-configured"}]},{id:"format",title:"Format",type:"custom",data:[{id:"format::summary",label:"Summary",icon:ja,color:Kr.semantic.success,value:"summary",isActive:t.format==="summary",description:"Compact, LLM-ready"},{id:"format::markdown-table",label:"Table",icon:_a,color:Kr.semantic.info,value:"markdown-table",isActive:t.format==="markdown-table",description:"Markdown table"},{id:"format::json",label:"JSON",icon:Wa,color:Kr.semantic.warning,value:"json",isActive:t.format==="json",description:"Structured data"}]},{id:"sort",title:"Sort By",type:"custom",data:[{id:"sort::renderCount",label:"Count",value:"renderCount",isActive:t.sortBy==="renderCount",description:"Total renders"},{id:"sort::rate",label:"Rate",value:"rate",isActive:t.sortBy==="rate",description:"Renders / sec"},{id:"sort::name",label:"Name",value:"name",isActive:t.sortBy==="name",description:"Alphabetical"}]},{id:"topN",title:"Top N",type:"custom",data:[{id:"topN::10",label:"10",value:10,isActive:t.topN===10},{id:"topN::25",label:"25",value:25,isActive:t.topN===25},{id:"topN::50",label:"50",value:50,isActive:t.topN===50},{id:"topN::100",label:"100",value:100,isActive:t.topN===100},{id:"topN::-1",label:"All",value:-1,isActive:t.topN===-1}]},{id:"minRenders",title:"Min Renders",type:"custom",data:[{id:"minRenders::1",label:"1",value:1,isActive:t.minRenders===1},{id:"minRenders::2",label:"2",value:2,isActive:t.minRenders===2},{id:"minRenders::3",label:"3",value:3,isActive:t.minRenders===3},{id:"minRenders::5",label:"5",value:5,isActive:t.minRenders===5},{id:"minRenders::10",label:"10",value:10,isActive:t.minRenders===10}]},{id:"causes",title:"Filter Causes",type:"custom",description:t.filterCauses.length===0?"All causes shown":"Only the selected causes shown",data:Rh.map(v=>({id:`cause::${v.value}`,label:v.label,value:v.value,isActive:t.filterCauses.includes(v.value)}))},{id:"signal",title:"Signal Extraction",type:"custom",data:[{id:"signal::groupByName",label:"Group by name",value:"groupByName",isActive:t.groupByName,description:"Collapse list items"},{id:"signal::aggregateCauses",label:"Aggregate causes",value:"aggregateCauses",isActive:t.aggregateCauses,description:"Hook x N"},{id:"signal::includeHistory",label:"Include history",value:"includeHistory",isActive:t.includeHistory,description:"JSON only \u2014 large"}]}],previewSection:{enabled:true,title:"PREVIEW",icon:hh,content:b,headerActions:f},onFilterChange:y}),[t,c,y,b,f]);return zt(uh,{...S})}var Yr=be.create({previewScroll:{maxHeight:360},previewText:{fontFamily:mh,fontSize:11,color:qr.color.text,lineHeight:18},statusLabel:{fontSize:11,fontWeight:"600",color:qr.color.textTertiary,marginRight:8}});import{Fragment as Lh,jsx as re,jsxs as Xr}from"react/jsx-runtime";var Nh=Vu.memo(function(){return Xr(d,{testID:"buoy-highlight-disabled-banner",style:tn.disabledBanner,children:[re(Au,{size:14,color:Kt.color.warning}),re(h,{testID:"buoy-highlight-disabled-text",style:tn.disabledText,children:"Render tracking is disabled"})]})});function Qr({visible:e,onClose:t,onBack:n,onMinimize:r,enableSharedModalDimensions:o=false,initialNativeTag:i,onInitialNativeTagHandled:l,onRenderSelect:a,inline:c=false}){let s=Mu(),[u,p]=ue(false),[T,y]=ue(()=>M.getFrozen()),[b,f]=ue(()=>V.getStats().totalComponents>0),[S,v]=ue(null),[P,g]=ue(0),[D,k]=ue(false),[R,_]=ue(false),[Q,z]=ue([]),[W,w]=ue("filters"),[N,le]=ue("details"),[ge,Ae]=ue(0),[me,On]=ue(""),[ut,Bt]=ue(false),ho=et(null),Ht=et([]),go=et(V.getFilters()),[_n,po]=ue(()=>{let O=V.getFilters();return O.includePatterns.length+O.excludePatterns.length}),[ye,fo]=ue(()=>V.getFilters()),[Wn,mo]=ue(()=>V.getSettings()),yo=et(false),jn=et(false),an=et(false);xe(()=>{!e||yo.current||(yo.current=true)},[e]),xe(()=>{if(!e||jn.current)return;(async()=>{try{let O=await xn.getItem(Tt.highlightUpdates.filters());if(O){let U=JSON.parse(O),oe={includeTestID:new Set(U.includeTestID||[]),includeNativeID:new Set(U.includeNativeID||[]),includeViewType:new Set(U.includeViewType||[]),includeComponent:new Set(U.includeComponent||[]),excludeTestID:new Set(U.excludeTestID||[]),excludeNativeID:new Set(U.excludeNativeID||[]),excludeViewType:new Set(U.excludeViewType||[]),excludeComponent:new Set(U.excludeComponent||[]),includePatterns:U.includePatterns||[],excludePatterns:U.excludePatterns||[]};V.setFilters(oe);let ke=V.getFilters();go.current=ke,fo(ke),po(ke.includePatterns.length+ke.excludePatterns.length)}jn.current=true}catch{}})()},[e]),xe(()=>{if(!jn.current)return;(async()=>{try{let O={includeTestID:Array.from(ye.includeTestID),includeNativeID:Array.from(ye.includeNativeID),includeViewType:Array.from(ye.includeViewType),includeComponent:Array.from(ye.includeComponent),excludeTestID:Array.from(ye.excludeTestID),excludeNativeID:Array.from(ye.excludeNativeID),excludeViewType:Array.from(ye.excludeViewType),excludeComponent:Array.from(ye.excludeComponent),includePatterns:ye.includePatterns,excludePatterns:ye.excludePatterns};await xn.setItem(Tt.highlightUpdates.filters(),JSON.stringify(O))}catch{}})()},[ye]),xe(()=>{if(!e||an.current)return;(async()=>{try{let O=await xn.getItem(Tt.highlightUpdates.settings());if(O){let U=JSON.parse(O),{performanceLogging:oe,excludeDevTools:ke,...Ue}=U;V.setSettings(Ue),mo(V.getSettings())}an.current=true}catch{an.current=true}})()},[e]),xe(()=>{if(!an.current)return;(async()=>{try{let{performanceLogging:O,excludeDevTools:U,...oe}=Wn;await xn.setItem(Tt.highlightUpdates.settings(),JSON.stringify(oe))}catch{}})()},[Wn]),xe(()=>{let O=V.subscribeToState(U=>{p(U.isTracking)});return()=>{O()}},[]),xe(()=>{let O=M.subscribeToFreeze(U=>{y(U)});return()=>{O()}},[]),xe(()=>{ut&&requestAnimationFrame(()=>{ho.current?.focus()})},[ut]),xe(()=>{e||M.setSpotlight(null)},[e]),xe(()=>{if(e&&i!=null){let O=V.getRender(String(i));O&&(v(O),g(0),k(false),M.setSpotlight(O.nativeTag)),l?.()}},[e,i,l]);let bo=te(()=>{M.isInitialized()||M.initialize(),M.toggle()},[]),vo=te(()=>{M.toggleFreeze()},[]),Co=te(()=>{M.clearRenderCounts(),f(false)},[]),To=te(()=>{z(V.getFilteredRenders(me)),_(true)},[me]),wo=te(()=>{_(false)},[]),So=te(O=>{On(O)},[]),fl=te((O,U,oe)=>{v(O),g(U),le("details"),Ae(0),Ht.current=oe,M.setSpotlight(O.nativeTag)},[]);xe(()=>{if(!S)return;let O=String(S.nativeTag);return V.subscribe(()=>{let U=V.getRender(O);U&&v({...U})})},[S?.nativeTag]);let xo=et(null);xe(()=>{!a||!S||xo.current!==S.nativeTag&&(xo.current=S.nativeTag,a(S))},[S,a]);let ml=te(O=>{Ht.current=O},[]),Io=te(()=>{v(null),g(0),me&&Bt(true),M.setSpotlight(null)},[me]),yl=te(()=>{let O=Ht.current;if(P>0){let U=P-1,oe=O[U];oe&&(v(oe),g(U),M.setSpotlight(oe.nativeTag))}},[P]),bl=te(()=>{let O=Ht.current;if(P<O.length-1){let U=P+1,oe=O[U];oe&&(v(oe),g(U),M.setSpotlight(oe.nativeTag))}},[P]),Ro=te(()=>{k(false)},[]),Do=te(()=>{k(true)},[]),ko=te(()=>{Bt(true)},[]),Po=te(()=>{Bt(false)},[]),Un=te(O=>{V.setFilters(O);let U=V.getFilters();go.current=U,fo(U),po(U.includePatterns.length+U.excludePatterns.length)},[]),vl=te((O,U)=>{let oe=V.getFilters(),ke={};U==="include"?oe.includePatterns.some(Ue=>Ue.type===O.type&&Ue.value===O.value)||(ke.includePatterns=[...oe.includePatterns,O]):oe.excludePatterns.some(Ue=>Ue.type===O.type&&Ue.value===O.value)||(ke.excludePatterns=[...oe.excludePatterns,O]),Object.keys(ke).length>0&&(Un(ke),v(null),g(0),M.setSpotlight(null))},[Un]),Cl=te(O=>{V.setSettings(O),mo(V.getSettings())},[]),Tl=te(O=>{f(O.totalComponents>0)},[]),Lo=te(()=>R?re(th,{onBack:wo}):D?re(Zd,{onBack:Ro,activeTab:W,onTabChange:w,activeFilterCount:_n}):S?re(eh,{onBack:Io,activeTab:N,onTabChange:le,hasHistory:(S.renderHistory?.length??0)>0}):re(Qd,{onBack:n,isSearchActive:ut,searchText:me,onSearchChange:So,onSearchToggle:ko,onSearchClose:Po,onFilterToggle:Do,onToggleTracking:bo,onToggleFreeze:vo,onClear:Co,onOpenCopySettings:To,isTracking:u,isFrozen:T,activeFilterCount:_n,hasRenders:b,searchInputRef:ho}),[R,D,S,n,ut,me,u,T,_n,b,W,N,Ro,Io,wo,So,ko,Po,Do,bo,vo,Co,To]),wl=o?Tt.modal.root():Tt.highlightUpdates.modal();if(!e)return null;let Sl=Ht.current.length,No=S?N==="details"?re(ud,{currentIndex:P,totalItems:Sl,onPrevious:yl,onNext:bl,itemLabel:"Component",subtitle:S.componentName||S.displayName||S.viewType}):re(Ea,{render:S,selectedEventIndex:ge,onEventIndexChange:Ae,isPro:s}):null,zo=re(d,{nativeID:"__rn_buoy__highlight-modal",testID:"buoy-highlight-body",style:tn.container,children:R?re(Ph,{renders:Q}):S?N==="details"?re(ca,{render:S,disableInternalFooter:true,onAddFilter:vl,isPro:s}):re(Fa,{render:S,disableInternalFooter:true,selectedEventIndex:ge,onEventIndexChange:Ae,isPro:s}):D?re(Sa,{filters:ye,onFilterChange:Un,settings:Wn,onSettingsChange:Cl,availableProps:V.getAvailableProps(),activeTab:W}):Xr(Lh,{children:[!u&&re(Nh,{}),re(Vd,{searchText:me,filters:ye,onSelectRender:fl,onStatsChange:Tl,onRendersChange:ml,isTracking:u,isPro:s})]})});return c?re(Yi,{children:Xr(d,{style:tn.inlineRoot,children:[re(d,{style:tn.inlineHeader,...Hu,children:Lo()}),zo,No]})}):re(Yi,{children:re(Bu,{visible:e,onClose:t,onMinimize:r,persistenceKey:wl,header:{showToggleButton:true,customContent:Lo()},enablePersistence:true,initialMode:"bottomSheet",enableGlitchEffects:true,disableScrollWrapper:Jo.OS==="web",styles:{},footer:No,footerHeight:S&&(N==="details"||(S.renderHistory?.length??0)>1)?68:0,children:zo})})}function zh(e={}){return re(Qr,{...e,inline:true,visible:true,onClose:()=>{}})}var tn=be.create({inlineRoot:{flex:1,minHeight:0,backgroundColor:"transparent"},inlineHeader:{paddingHorizontal:12,paddingVertical:8,borderBottomWidth:1,borderBottomColor:Kt.color.border,backgroundColor:"transparent"},container:{flex:1,backgroundColor:"transparent"},disabledBanner:{flexDirection:"row",alignItems:"center",gap:8,padding:10,marginHorizontal:12,marginTop:8,backgroundColor:Kt.color.warningSoft,borderRadius:8,borderWidth:1,borderColor:Kt.color.warning+"20"},disabledText:{color:Kt.color.warning,fontSize:11,flex:1}});import{jsx as nn}from"react/jsx-runtime";function Vh({size:e}){let[t,n]=Xn(()=>M.isEnabled());return Qn(()=>M.subscribe(r=>{n(r)}),[]),nn(_o,{size:e,color:t?"#10b981":"#6b7280"})}function Ka(){return null}function qa(e){let[t,n]=Xn(null);Qn(()=>(e.visible&&M.setBadgePressCallback(o=>{n(o)}),()=>{e.visible||M.setBadgePressCallback(null)}),[e.visible]);let r=Ml(()=>{n(null)},[]);return nn(Qr,{...e,initialNativeTag:t,onInitialNativeTagHandled:r})}var Ah={id:"highlight-updates",name:"TOGGLE HIGHLIGHT",description:"Toggle component render highlights",slot:"row",icon:Vh,component:Ka,props:{},launchMode:"toggle-only",onPress:()=>{M.isInitialized()||M.initialize(),M.toggle()}};function Bh(e){let t=e?.enabledColor||"#10b981",n=e?.disabledColor||"#6b7280";e?.autoInitialize&&setTimeout(()=>{M.initialize()},1e3);let r=({size:o})=>{let[i,l]=Xn(()=>M.isEnabled());return Qn(()=>M.subscribe(a=>{l(a)}),[]),nn(_o,{size:o,color:i?t:n})};return{id:e?.id||"highlight-updates",name:e?.name||"TOGGLE HIGHLIGHT",description:e?.description||"Toggle component render highlights",slot:"row",icon:r,component:Ka,props:{},launchMode:"toggle-only",onPress:()=>{M.isInitialized()||M.initialize(),M.toggle()}}}var Hh={id:"highlight-updates-modal",name:"HIGHLIGHT",description:"View component render tracking modal",slot:"both",icon:({size:e})=>nn(Oo,{size:e}),component:qa,props:{enableSharedModalDimensions:false}};function Mh(e){let t=e?.enabledColor||"#10b981",n=e?.disabledColor||"#6b7280";return e?.autoInitialize&&setTimeout(()=>{M.initialize()},1e3),{id:e?.id||"highlight-updates-modal",name:e?.name||"HIGHLIGHT",description:e?.description||"View component render tracking modal",slot:"both",icon:({size:r})=>nn(Oo,{size:r,color:t}),component:qa,props:{enableSharedModalDimensions:false}}}j();j();import{getDOMFiber as $h,getDOMNodeHandle as Fh}from"@buoy-gg/shared-ui/web/utils";var Eh=new Set(["View","Text","TextImpl","Image","ScrollView","FlatList","SectionList","Pressable","TouchableOpacity","TouchableHighlight","TouchableWithoutFeedback","TouchableNativeFeedback","TextInput","Switch","ActivityIndicator","Modal","SafeAreaView","SafeAreaProvider","KeyboardAvoidingView","VirtualizedList","Screen","ScreenContainer","ScreenStack","ScreenContentWrapper","GestureHandlerRootView","GestureDetector","Wrapper"]);function Zr(e){let t=e.return,n=t?.elementType??t?.type;return t&&n?.$$typeof===Symbol.for("react.memo")&&(n.type===e.type||n.type===e.elementType)?t:null}function eo(e){let t="",n=e.tag===14||e.tag===15,r=e.tag===11,o=new Set,i=a=>{!a||o.has(a)||o.size>20||(o.add(a),t||(t=a.displayName||(typeof a=="function"?a.name:"")),a.$$typeof===Symbol.for("react.memo")&&(n=true,i(a.type)),a.$$typeof===Symbol.for("react.forward_ref")&&(r=true,i(a.render)))};i(e.elementType),i(e.type);let l=Zr(e);return l&&i(l.elementType??l.type),{name:t||"Anonymous",memo:n,forwardRef:r}}function Ja(e){if(!e||typeof e.type=="string"||![0,1,2,11,14,15].includes(e.tag))return false;let{name:t}=eo(e),n=e._debugSource?.fileName??"";return!Eh.has(t)&&!/^(Animated|RCT|Reanimated|Buoy|DevTools|FloatingDevTools|HighlightUpdates)/.test(t)&&!/[@/]buoy-gg\/|\/react-native\//.test(n)&&!e.memoizedProps?.__buoyDevToolsRoot}function Oh(e){let t=eo(e),n=Zr(e),r=e._debugSource??n?._debugSource;if(typeof r?.fileName=="string"&&r.fileName)t.source={fileName:r.fileName},Number.isFinite(r.lineNumber)&&(t.source.lineNumber=r.lineNumber),Number.isFinite(r.columnNumber)&&(t.source.columnNumber=r.columnNumber);else{let o=e._debugStack??n?._debugStack;typeof o?.stack=="string"&&(t.rawStack=o.stack)}return t}function _h(e){let t=e.child?[e.child]:[],n=0;for(;t.length&&n++<300;){let r=t.shift();if(r._debugOwner===e){let o=r._debugSource;if(typeof o?.fileName=="string"&&o.fileName)return{source:{fileName:o.fileName,...Number.isFinite(o.lineNumber)?{lineNumber:o.lineNumber}:{},...Number.isFinite(o.columnNumber)?{columnNumber:o.columnNumber}:{}}};if(typeof r._debugStack?.stack=="string")return{rawStack:r._debugStack.stack}}r.child&&t.push(r.child),r.sibling&&t.push(r.sibling)}}function Wh(e){let t=[],n=null,r=new Set,o=e;for(;o&&!r.has(o)&&r.size<400&&t.length<7;){r.add(o),Ja(o)&&(t.length||(n=o),t.push(Oh(o)));let l=Zr(o);o=o._debugOwner||l?._debugOwner||l?.return||o.return,l&&o===l&&(o=l._debugOwner||l.return)}if(!t.length)return{found:false,reason:"No app component was found for this view."};let i=n?_h(n):void 0;return{found:true,component:i?{...t[0],definedIn:i}:t[0],owners:t.slice(1)}}function jh(e){return e?.canonical?.internalInstanceHandle||e?._internalInstanceHandle||e?._internalFiberInstanceHandleDEV||$h(e)||null}function Uh(e){return Fh(e)??e?.__nativeTag??e?._nativeTag??e?.nativeTag??e?.canonical?.__nativeTag??e?.canonical?._nativeTag??e?.canonical?.nativeTag??null}var Gh=1e5;function Kh(e){let t=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__,n=[],r=l=>{try{t?.getFiberRoots?.(l)?.forEach(a=>n.push(a.current))}catch{}};t?.renderers?.forEach((l,a)=>r(a)),n.length||r(1);let o=[...n],i=new Set;for(;o.length;){if(i.size>=Gh)return{fiber:null,capped:true,any:true};let l=o.pop();if(!l||i.has(l))continue;i.add(l),l.sibling&&o.push(l.sibling);let a=l.memoizedProps??{};if(!(l.tag===22&&l.memoizedState!=null||a.__buoyDevToolsRoot||a.activityState===0||a.activityState===1||a.isPageFocused===false||a["aria-hidden"]===true&&(a.activityState!==void 0||"shouldFreeze"in a)||a.isFocused===false&&(a.routeKey!==void 0||"freezeContents"in a))){if(e(l))return{fiber:l,capped:false,any:true};l.child&&o.push(l.child)}}return{fiber:null,capped:false,any:n.length>0}}async function qh(e={}){try{let{nativeTag:t,query:n}=e??{};if(t!==void 0&&(!Number.isInteger(t)||t<0)||n!==void 0&&typeof n!="string")return{found:false,reason:"Pass a valid nativeTag or a text query."};let r=n?.trim();if(t==null&&!r)return{found:false,reason:"Pass a query or nativeTag."};let o=false,i=false,l=s=>{let u=Kh(s);return o||(o=u.capped),i||(i=u.any),u.fiber??void 0},a=s=>l(u=>u.stateNode&&Uh(u.stateNode)===s),c=t!=null?a(t):void 0;if(t==null&&r&&(c=l(s=>Ja(s)&&eo(s).name.toLowerCase()===r.toLowerCase()),!c)){let s=(await dr({})).elements.map(u=>({el:u,score:un(u,{query:r})})).filter(({score:u})=>u>0).sort((u,p)=>p.score-u.score)[0]?.el;s?.nativeTag!=null&&(c=a(s.nativeTag))}return!c&&!i?{found:false,reason:"No React tree was found. Use a dev build."}:c?Wh(jh(c.stateNode)??c):{found:false,reason:o?"The React tree is too big to search fully, and no view matched in the part searched. Pass the nativeTag from describe_screen.":"No view matched. Check describe_screen for its name or tag."}}catch{return{found:false,reason:"Could not read the React tree. Try again in a dev build."}}}Ne();j();j();import{resolveDOMEventEmitter as Jh}from"@buoy-gg/shared-ui/web/utils";var Yh=14,Xh=550,Qh=4e3,Zh=8e3,Ya=600,to=null,Xa=false,no=null,Nn=[],We="idle",je=[],ro=0,De=null;function eg(){if(Xa)return to;Xa=true;let e=Jh();return to=e.emitter,no=e.reason,to}function Vt(e){return typeof e=="number"&&Number.isFinite(e)?e:null}function Qa(e){let t=e?.nativeEvent;return t?Vt(t.target)??Vt(t.tag):null}function oo(e){let t=e?.nativeEvent;if(!t)return null;let n={x:Vt(t.pageX),y:Vt(t.pageY)};if(n.x!==null&&n.y!==null)return{x:n.x,y:n.y};for(let r of["changedTouches","touches"]){let o=t[r];if(Array.isArray(o)&&o.length){let i=o[0],l=Vt(i?.pageX),a=Vt(i?.pageY);if(l!==null&&a!==null)return{x:l,y:a}}}return null}function Za(e){je.push({...e,seq:++ro}),je.length>Ya&&(je=je.slice(-Ya))}function tg(e){let t=Qa(e);if(t===null)return;let n=oo(e),r=null;try{r=pr(t)}catch{}De={tag:t,x:n?.x??0,y:n?.y??0,t:Date.now(),drift:0,target:r}}function ng(e){if(!De)return;let t=oo(e);if(!t)return;let n=t.x-De.x,r=t.y-De.y;De.drift=Math.max(De.drift,Math.sqrt(n*n+r*r))}function rg(e){let t=De;if(De=null,!t||!t.target)return;let n=oo(e);if(n){let o=n.x-t.x,i=n.y-t.y;t.drift=Math.max(t.drift,Math.sqrt(o*o+i*i))}if(t.drift>Yh)return;let r=Date.now()-t.t;r>Qh||t.target.control!=="text"&&(t.target.control==="toggle"||t.target.control==="slider"||Za({t:Date.now(),kind:r>=Xh?"longPress":"press",target:t.target}))}function og(){De=null}function io(e){let t=Qa(e);if(t===null)return;let n=e.nativeEvent,r,o;if(typeof n.text=="string")r="text",o=n.text;else if(typeof n.value=="boolean")r="toggle",o=n.value;else if(typeof n.value=="number")r="slider",o=n.value;else return;let i=je[je.length-1];if(i&&i.kind===r&&i.target.nativeTag===t&&Date.now()-i.t<Zh){i.value=o,i.t=Date.now();return}let l=null;try{l=pr(t)}catch{}l&&Za({t:Date.now(),kind:r,target:l,value:o})}function ig(){if(We==="capturing")return rn();let e=eg();if(!e)return We="unavailable",rn();try{Nn=[e.addListener("topTouchStart",tg),e.addListener("topTouchMove",ng),e.addListener("topTouchEnd",rg),e.addListener("topTouchCancel",og),e.addListener("topChange",io),e.addListener("topValueChange",io),e.addListener("topSlidingComplete",io)],De=null,We="capturing"}catch(t){Nn=[],We="unavailable",no=t?.message??"addListener failed"}return rn()}function ag(){Nn.forEach(e=>{try{e.remove()}catch{}}),Nn=[],De=null,We==="capturing"&&(We="idle")}function lg(){je=[],ro=0}function rn(){return{status:We,reason:We==="unavailable"?no:null}}function sg(e=0){return{...rn(),records:je.filter(t=>t.seq>e),seq:ro}}j();var el=0,tl=1,nl=11,rl=14,ol=15,zn=1,cg=1e4,ug=300,dg=20,il=false,on=false,ao=false,Vn=false,An=0,it=0,Bn=0,at={},lt=new Map;function al(){return typeof globalThis>"u"?null:globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__??null}function lo(e){let t=e.flags??e.effectTag;return typeof t=="number"?t:0}function ll(e){return e===el||e===tl||e===nl||e===rl||e===ol}function so(e){let t=e.type;try{switch(e.tag){case el:case tl:return t?.displayName||t?.name||"Anonymous";case nl:return t?.displayName||t?.render?.displayName||t?.render?.name||"ForwardRef";case rl:case ol:{let n=t?.type??e.elementType?.type;return t?.displayName||n?.displayName||n?.name||"Memo"}default:return"Anonymous"}}catch{return"Anonymous"}}function hg(e){let t=e.actualDuration;if(typeof t!="number")return null;let n=t;for(let r=e.child;r!=null;r=r.sibling)typeof r.actualDuration=="number"&&(n-=r.actualDuration);return n>0?n:0}var gg=new Set(["View","Text","Image","ImageBackground","ScrollView","FlatList","SectionList","SafeAreaView","KeyboardAvoidingView","StatusBar","ActivityIndicator","RefreshControl","Modal","Switch","Pressable","PlatformPressable","TouchableOpacity","TouchableHighlight","TouchableWithoutFeedback","TouchableNativeFeedback","PressabilityDebugView","AnimatedComponent","Wrapper"]),sl=["Animated(","Pressability","Virtualized","CellRenderer"];function cl(e){if(gg.has(e))return true;for(let t=0;t<sl.length;t++)if(e.startsWith(sl[t]))return true;return false}var ul=40,dl=5;function pg(e,t){if(Object.is(e,t))return true;let n=typeof e;if(n!==typeof t)return false;if(n==="function")return true;if(e===null||t===null||n!=="object")return false;let r=Array.isArray(e);if(r!==Array.isArray(t))return false;if(r){if(e.length!==t.length)return false;for(let l=0;l<e.length;l++)if(!Object.is(e[l],t[l]))return false;return true}let o=Object.keys(e),i=Object.keys(t);if(o.length!==i.length)return false;for(let l=0;l<o.length;l++){let a=o[l];if(!Object.prototype.hasOwnProperty.call(t,a)||!Object.is(e[a],t[a]))return false}return true}function fg(e,t){let n=e.alternate;if(!n)return{cause:"mount"};let r=e.memoizedProps,o=n.memoizedProps;if(r!==o&&r&&o){let i=false,l=false,a,c=Object.keys(r),s=c.length<ul?c.length:ul;for(let u=0;u<s;u++){let p=c[u],T=o[p],y=r[p];if(!Object.is(T,y)&&(i=true,t&&(a||(a=[]),a.length<dl&&a.push(p)),!pg(T,y)&&(l=true,!t)))break}if(!l&&Object.keys(o).length!==c.length&&(i=true,l=true),i)return{cause:l?"props":"propsUnstable",changedKeys:a}}return Sc(n,e)?{cause:"hooks"}:{cause:"parent"}}function mg(e){for(let t=e.return;t!=null;t=t.return){if(!ll(t.tag)||(lo(t)&zn)===0)continue;let n=so(t);if(!cl(n))return n}}function yg(e,t){let n=so(e),r=hg(e);r!==null&&(ao=true);let o=r??0;it+=1,Bn+=o;let{cause:i,changedKeys:l}=fg(e,Vn);if(at[i]=(at[i]??0)+1,cl(n))return;let a=lt.get(n);if(!a){if(lt.size>=ug)return;a={renders:0,totalSelfMs:0,maxSelfMs:0,causes:{}},lt.set(n,a)}if(a.renders+=1,a.totalSelfMs+=o,o>a.maxSelfMs&&(a.maxSelfMs=o),a.causes[i]=(a.causes[i]??0)+1,Vn){if(l){a.changedProps||(a.changedProps=new Set);for(let c=0;c<l.length&&!(a.changedProps.size>=dl);c++)a.changedProps.add(l[c])}t&&!a.parentName&&(a.parentName=t)}}function bg(e){let t=e?.current;if(!t)return;let n=it,r=0,o=t;for(;o!=null&&(r+=1,!(r>cg));){let i=false,l=ll(o.tag);if(o.memoizedProps?.__buoyDevToolsRoot)i=true;else if(l){let a=so(o);qc(a)?i=true:Kc(a)||(lo(o)&zn)!==0&&yg(o,Vn?mg(o):void 0)}if(!i){let a=o.subtreeFlags;if(!(typeof a=="number"&&(a&zn)===0&&(lo(o)&zn)===0)&&o.child!=null){o=o.child;continue}}for(;o!=null;){if(o===t)return hl(n);if(o.sibling!=null){o=o.sibling;break}o=o.return}}hl(n)}function hl(e){it>e&&(An+=1)}function vg(){if(il)return true;let e=al();if(!e)return false;let t=e.onCommitFiberRoot;return e.onCommitFiberRoot=function(n,r,...o){if(on)try{bg(r)}catch{}return typeof t=="function"?t.call(e,n,r,...o):void 0},il=true,true}function Cg(){if(typeof Z<"u"&&!Z)return false;let e=al();return!!(e&&e.renderers&&e.renderers.size>0)}function Tg(){return on}function wg(e){vg()&&(lt=new Map,ao=false,Vn=e?.detail===true,An=0,it=0,Bn=0,at={},on=true)}function Sg(){if(!on&&it===0&<.size===0)return null;on=false;let e=Array.from(lt.entries()).sort((n,r)=>{let o=r[1].totalSelfMs-n[1].totalSelfMs;return o!==0?o:r[1].renders-n[1].renders}).slice(0,dg).map(([n,r])=>({name:n,renders:r.renders,totalMs:Hn(r.totalSelfMs),maxMs:Hn(r.maxSelfMs),avgMs:r.renders>0?Hn(r.totalSelfMs/r.renders):0,causes:r.causes,...r.changedProps&&r.changedProps.size>0?{changedProps:Array.from(r.changedProps)}:null,...r.parentName?{parentName:r.parentName}:null})),t={totalCommits:An,totalRenders:it,capturedDurations:ao,totalRenderMs:Hn(Bn),wastedRenders:(at.parent??0)+(at.propsUnstable??0),causes:at,topComponents:e};return lt=new Map,An=0,it=0,Bn=0,at={},t}function Hn(e){return Math.round(e*100)/100}var st={isSupported:Cg,isCapturing:Tg,startCapture:wg,stopCapture:Sg};function Mn(){M.isInitialized()||M.initialize()}function co(e){if(!e)return;let{hookChanges:t,...n}=e;return n}function xg(e){let{renderHistory:t,lastRenderCause:n,...r}=e;return{...r,lastRenderCause:co(n),historyCount:t?.length??0}}function Ig(e){try{return JSON.stringify(e),e}catch{return{...e,lastRenderCause:co(e.lastRenderCause),renderHistory:e.renderHistory?.map(t=>({...t,capturedProps:void 0,capturedState:void 0,cause:co(t.cause)??t.cause}))}}}function Rg(){return st.isSupported()?(st.startCapture({detail:true}),{ok:true}):{ok:false,reason:"render capture needs a dev build with the React DevTools hook available"}}function Dg(){return{summary:st.stopCapture()}}var kg={version:3,getSnapshot:()=>({enabled:M.isEnabled(),frozen:M.getFrozen(),highlightsSuppressed:M.getHighlightsSuppressed(),renders:V.getRenders().map(xg),trackerState:V.getState()}),subscribe:e=>{let t=M.subscribe(e),n=M.subscribeToFreeze(e),r=V.subscribe(e),o=V.subscribeToState(e);return()=>{t(),n(),r(),o()}},actions:{getComponentSource:async e=>{try{return await qh(e)}catch(t){return{found:false,reason:`Could not read the component's source: ${t instanceof Error?t.message:String(t)}`}}},beginMeasurement:()=>Rg(),endMeasurement:()=>Dg(),getRenderDetail:e=>{let{nativeTag:t}=e??{};if(t==null)return{found:false,reason:"missing nativeTag"};let n=V.getRender(String(t));return n?{found:true,nativeTag:t,render:Ig(n)}:{found:false,reason:"unknown nativeTag"}},toggle:()=>{Mn(),M.toggle()},setEnabled:e=>{Mn(),M.setEnabled(e.enabled)},toggleFreeze:()=>{M.toggleFreeze()},clearRenderCounts:()=>{M.clearRenderCounts()},setSpotlight:e=>{M.setSpotlight(e.nativeTag)},locateComponent:e=>(Mn(),M.locateComponent(e??{})),setSilentTracking:e=>{Mn(),M.setSilentTracking(e.enabled??false)},describeScreen:e=>dr(e??{}),tapElement:e=>rc(e??{}),waitFor:e=>sc(e??{}),hitTest:e=>Cc(e??{x:.5,y:.5}),readMaps:()=>Tc(),startTouchCapture:()=>ig(),stopTouchCapture:()=>(ag(),rn()),clearTouchCapture:()=>(lg(),{ok:true}),readTouchCapture:e=>sg(e?.sinceSeq??0)}};j();import{useEffect as $n,useState as uo,useRef as Fn,useCallback as gl,useLayoutEffect as Pg}from"react";import{night as En,monoFont as Lg}from"@buoy-gg/shared-ui/web";ln();Ne();import{Fragment as Ng,jsx as At,jsxs as pl}from"react/jsx-runtime";var zg=1e3;function Vg({onBadgePress:e}={}){let[t,n]=uo([]),[r,o]=uo(()=>M.getFrozen()),[i,l]=uo(null),a=Fn(null),c=Fn(0),s=Fn(0),u=Fn(r);u.current=r,Ke.isEnabled()&&(c.current=performance.now(),s.current=t.length),Pg(()=>{if(Ke.isEnabled()&&c.current>0&&s.current>0){let f=performance.now()-c.current;Al(s.current,f)}}),$n(()=>M.subscribeToFreeze(f=>{o(f)}),[]),$n(()=>V.subscribeToFilters(()=>{n(f=>f.filter(S=>{let v=V.getRender(String(S.id));return v?V.shouldShowRender(v):true}))}),[]),$n(()=>(M.setSpotlightCallback(f=>{l(f)}),()=>{M.setSpotlightCallback(null)}),[]);let p=gl(f=>{let S=Date.now(),v=f.map(P=>({...P,timestamp:S}));n(P=>{let g=[...P];for(let D of v){let k=g.findIndex(R=>R.id===D.id);k>=0?g[k]=D:g.push(D)}return g})},[]);$n(()=>(M.setHighlightCallback(p),a.current=setInterval(()=>{if(u.current)return;let f=Date.now();n(S=>S.filter(v=>f-v.timestamp<zg))},50),()=>{M.setHighlightCallback(null),a.current&&clearInterval(a.current)}),[p]);let T=e||M.getBadgePressCallback(),y=gl(f=>{e?e(f):M.handleBadgePress(f)},[e]),b=i?V.getRender(String(i)):null;return t.length===0&&!b?.measurements?null:pl(d,{style:ct.overlay,pointerEvents:"box-none",nativeID:"highlight-updates-overlay",children:[b?.measurements&&pl(Ng,{children:[At(d,{pointerEvents:"none",nativeID:"__spotlight_highlight__",style:[ct.spotlightHighlight,{left:b.measurements.x-3,top:b.measurements.y-3,width:b.measurements.width+6,height:b.measurements.height+6}]}),At(d,{pointerEvents:"none",style:[ct.spotlightLabel,{left:b.measurements.x,top:b.measurements.y+b.measurements.height+4}],children:At(h,{style:ct.spotlightLabelText,children:b.componentName||b.displayName||b.viewType})})]}),t.map(f=>At(d,{pointerEvents:"box-none",nativeID:`__highlight_rect_${f.id}__`,style:[ct.highlight,{left:f.x,top:f.y,width:f.width,height:f.height,borderColor:f.color}],children:f.count>0&&At(d,{style:[ct.badge,{backgroundColor:f.color}],nativeID:`__highlight_badge_${f.id}__`,pointerEvents:T?"auto":"none",hitSlop:{top:8,bottom:8,left:8,right:8},onStartShouldSetResponder:()=>!!T,onResponderGrant:()=>y(f.id),children:At(h,{style:ct.badgeText,nativeID:`__highlight_text_${f.id}__`,children:f.count})})},`highlight-${f.id}`))]})}var ct=be.create({overlay:{position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:999999,elevation:999999,borderWidth:0},highlight:{position:"absolute",borderWidth:2,borderStyle:"solid",backgroundColor:"transparent"},badge:{position:"absolute",top:0,right:0,height:14,borderRadius:0,justifyContent:"center",alignItems:"center",paddingHorizontal:2},badgeText:{color:"#000",fontSize:9,fontWeight:"bold"},spotlightHighlight:{position:"absolute",borderWidth:2,borderStyle:"dashed",borderColor:En.color.accent,backgroundColor:"transparent"},spotlightLabel:{position:"absolute",backgroundColor:En.color.surface,borderWidth:1,borderColor:En.color.accent,paddingHorizontal:8,paddingVertical:3,borderRadius:4},spotlightLabelText:{color:En.color.accent,fontSize:11,fontWeight:"600",fontFamily:Lg}});import{setRenderCaptureProvider as Ag}from"@buoy-gg/shared-ui/web";Ne();ln();Ao();j();function Bg(e){let t={exportedAt:new Date().toISOString(),totalComponents:e.length,totalRenders:e.reduce((n,r)=>n+r.renderCount,0),components:e.map(n=>({componentName:n.componentName||n.displayName,viewType:n.viewType,nativeTag:n.nativeTag,testID:n.testID,nativeID:n.nativeID,accessibilityLabel:n.accessibilityLabel,renderCount:n.renderCount,firstRenderTime:n.firstRenderTime,lastRenderTime:n.lastRenderTime,lastRenderCause:n.lastRenderCause?{type:n.lastRenderCause.type,componentCause:n.lastRenderCause.componentCause,changedKeys:n.lastRenderCause.changedKeys,hookChanges:n.lastRenderCause.hookChanges?.map(r=>({type:r.type,index:r.index,description:r.description}))}:null,renderHistory:n.renderHistory?.map(r=>({renderNumber:r.renderNumber,timestamp:r.timestamp,cause:{type:r.cause.type,componentCause:r.cause.componentCause,changedKeys:r.cause.changedKeys}}))}))};return JSON.stringify(t,null,2)}try{Ag({isSupported:st.isSupported,start:st.startCapture,stop:st.stopCapture,startLiveHighlights:()=>{try{let e=M.isEnabled(),t=M.getHighlightsSuppressed();return M.enable(),()=>{try{e?t&&M.setHighlightsSuppressed(true):M.disable()}catch{}}}catch{return null}}})}catch{}var Hg=e=>{let{RenderTracker:t}=(Ne(),kl(Mo));return t.onRenderEvent(e)};export{Oe as CAUSE_CONFIG,Jt as COMPONENT_CAUSE_CONFIG,st as CommitProfiler,Sa as HighlightFilterView,zh as HighlightToolView,M as HighlightUpdatesController,Qr as HighlightUpdatesModal,Vg as HighlightUpdatesOverlay,Ke as PerformanceLogger,Qi as RenderCauseBadge,ca as RenderDetailView,Ea as RenderHistoryFooter,Fa as RenderHistoryViewer,ka as RenderListItem,V as RenderTracker,Ku as TwoLevelCauseBadge,Ge as VIEW_TYPE_MAP,Oc as capturePropsSnapshot,_c as captureStateSnapshot,Ii as clearRenderCauseState,Mh as createHighlightUpdatesModalTool,Bh as createHighlightUpdatesTool,Cr as detectRenderCause,ba as detectedItemTestID,Ul as disableProfilerLogging,jl as enableProfilerLogging,Bg as generateRendersJson,zl as getAllComponentNames,Nl as getAllNativeViewTypes,qn as getComponentDisplayName,Pl as getNativeViewType,Fc as getRenderCauseStats,Hh as highlightUpdatesModalPreset,Ah as highlightUpdatesPreset,kg as highlightUpdatesSyncAdapter,It as identifierSlug,Go as installProfilerInterceptor,Li as isCapturingBuoyToolRenders,Wl as isInterceptorInstalled,Ll as isKnownViewType,Gl as isLoggingEnabled,Hg as onRenderEvent,va as patternChipTestID,$c as removeRenderCauseState,ya as renderRowTestID,$e as safeCloneForHistory,Wc as setCaptureBuoyToolRenders,Uo as setComparisonCallback,Rt as settingTestID,Ko as uninstallProfilerInterceptor};
|
|
30
|
+
`)}l(mo,"logComprehensiveRenderData");function $n(e,t,n,r="off"){let o=Date.now();if(!t)return{type:"unknown",timestamp:o};let i=t,s=t.alternate,a=Ie.get(e);if(a&&s){let D=a.memoizedProps?.children,W=t.memoizedProps?.children,Z=s.memoizedProps?.children,V=t.memoizedProps===a.memoizedProps||D!==void 0&&W===D,j=s.memoizedProps===a.memoizedProps||D!==void 0&&Z===D;V&&!j&&(i=s,s=t,r==="all"&&console.log("[Buoy]","[RenderCause] Detected fiber swap - using alternate as current"))}let u=null,c=null;s?(u=s.memoizedProps,c=s.memoizedState):a&&(u=a.memoizedProps,c=a.memoizedState);let d=u!==null?{memoizedProps:u,memoizedState:c,timestamp:o}:void 0,g={memoizedProps:i.memoizedProps,memoizedState:i.memoizedState,timestamp:o};Pl(e,g);let T=po(i),b=Ae(T)||void 0,v=kl(i,b)||void 0,f=Sl(T),S=f.cause,C=f.hookChanges;if(!d){if(r!=="off"){if(r==="minimal")console.log("[Buoy]",`[${b||"Unknown"}] MOUNT`);else if(r==="verbose"){let D=typeof i?.type=="string"?i.type:"Unknown";console.log("[Buoy]",`[RENDER] ${b||"Unknown"} (${D}:${e}) | Cause: MOUNT`)}else if(r==="all"){let D=Ie.has(e)?Ie.size:1;mo(e,i,T,d,f,n,D)}}return{type:"mount",timestamp:o,componentCause:"mount",componentName:b}}let N=typeof i.type=="string"?i.type:void 0,m=fo(d.memoizedProps,g.memoizedProps,N);if(r!=="off"){if(r==="minimal")xl(b,f);else if(r==="verbose")Il(e,i,T,f,m);else if(r==="all"){let D=Ie.has(e)?Ie.size:1;mo(e,i,T,d,f,n,D)}}if(m&&m.length>0)return{type:"props",changedKeys:m.slice(0,Jd),timestamp:o,componentCause:S,componentName:b,parentComponentName:v,hookChanges:C||void 0};let k=Rl(d.memoizedState,g.memoizedState);if(k&&k.length>0)return{type:"hooks",hookIndices:k,timestamp:o,componentCause:S,componentName:b,parentComponentName:v,hookChanges:C||void 0};let P=vo(i);return P&&n.has(P)?{type:"parent",timestamp:o,componentCause:S,componentName:b,parentComponentName:v,hookChanges:C||void 0}:S==="state"?{type:"state",timestamp:o,componentCause:S,componentName:b,parentComponentName:v,hookChanges:C||void 0}:S==="props"?{type:"props",timestamp:o,componentCause:S,componentName:b,parentComponentName:v}:S==="parent"?{type:"parent",timestamp:o,componentCause:S,componentName:b,parentComponentName:v}:{type:"unknown",timestamp:o,componentCause:S,componentName:b,parentComponentName:v}}l($n,"detectRenderCause");function fo(e,t,n){if(e===t||!e||!t||typeof e!="object"||typeof t!="object"||Array.isArray(e)||Array.isArray(t))return null;let r=yl(n),o=new Set([...Object.keys(e),...Object.keys(t)]),i=[];for(let s of o)if(!s.startsWith("__")&&!r.skip.includes(s)){if(s==="children"){if(!r.alwaysTrack.includes("children"))continue;let a=e[s],u=t[s];a!==u&&(yo(a)&&yo(u)?i.push(`children: ${bo(a)} \u2192 ${bo(u)}`):i.push("children (content)"));continue}if(e[s]!==t[s]){let a=e[s],u=t[s];s==="style"?tn(a,u)?i.push(`${s} (ref only)`):i.push(s):typeof a=="function"&&typeof u=="function"?i.push(`${s} (fn ref)`):i.push(s)}}return i.length>0?i:null}l(fo,"getChangedKeys");function tn(e,t,n=0){if(n>5)return false;if(e===t)return true;if(typeof e!=typeof t)return false;if(typeof e!="object"||e===null||t===null)return e===t;if(Array.isArray(e)!==Array.isArray(t))return false;if(Array.isArray(e)){if(e.length!==t.length)return false;for(let i=0;i<e.length;i++)if(!tn(e[i],t[i],n+1))return false;return true}let r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return false;for(let i of r)if(!o.includes(i)||!tn(e[i],t[i],n+1))return false;return true}l(tn,"deepEqual");function yo(e){return e==null||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}l(yo,"isPrimitive");function bo(e){return e===null?"null":e===void 0?"undefined":typeof e=="string"?e.length>20?`"${e.slice(0,20)}..."`:`"${e}"`:typeof e=="number"||typeof e=="boolean"?String(e):"[object]"}l(bo,"formatValue");function Rl(e,t){if(e===t||e==null||t==null||typeof e!="object"||typeof t!="object")return null;let n=[],r=e,o=t,i=0;for(;o!==null&&i<go;)(r===null||Dl(r,o))&&n.push(i),o=o?.next??null,r=r?.next??null,i++;return n.length>0?n:null}l(Rl,"detectHookChanges");function Dl(e,t){return e===t?false:e.memoizedState!==t.memoizedState||e.baseState!==void 0&&e.baseState!==t.baseState}l(Dl,"didHookChange");function vo(e){let t=e?.return,n=0;for(;t&&n<vl;){if(t.stateNode){let r=Co(t.stateNode);if(r!=null)return r}t=t.return,n++}return null}l(vo,"getParentNativeTag");function kl(e,t){if(!e)return null;let n=po(e);if(!n)return null;let r=n.return,o=0;for(;r&&o<vl;){let i=r.tag;if(i===0||i===1||i===11||i===15){let s=Ae(r);if(s&&!ho(s)&&s!==t)return s}r=r.return,o++}return null}l(kl,"getParentComponentName");function Co(e){return e?typeof e.__nativeTag=="number"?e.__nativeTag:typeof e._nativeTag=="number"?e._nativeTag:typeof e.canonical?.__nativeTag=="number"?e.canonical.__nativeTag:typeof e.canonical?.publicInstance?.__nativeTag=="number"?e.canonical.publicInstance.__nativeTag:null:null}l(Co,"getNativeTagFromStateNode");function Pl(e,t){if(Ie.size>=uo){let n=Array.from(Ie.entries());n.sort((o,i)=>o[1].timestamp-i[1].timestamp);let r=Math.floor(uo/4);for(let o=0;o<r;o++)Ie.delete(n[o][0])}Ie.set(e,t)}l(Pl,"updateStoredState");function To(){Ie.clear()}l(To,"clearRenderCauseState");function Nl(e){Ie.delete(e)}l(Nl,"removeRenderCauseState");function zl(){return{storedStates:Ie.size,maxStates:uo}}l(zl,"getRenderCauseStats");var Xd=5,Ll=200,On=20,_n=30;function Ee(e,t=0,n=new WeakSet){if(e==null||typeof e=="boolean"||typeof e=="number")return e;if(typeof e=="string")return e.length>Ll?e.slice(0,Ll)+"...":e;if(typeof e=="function")return`[Function: ${e.name||"anonymous"}]`;if(typeof e=="symbol")return`[Symbol: ${e.description||""}]`;if(t>=Xd)return Array.isArray(e)?`[Array: ${e.length} items]`:typeof e=="object"?`[Object: ${Object.keys(e).length} keys]`:"[...]";if(typeof e=="object"){if(n.has(e))return"[Circular]";n.add(e)}if(Array.isArray(e)){let r=e.slice(0,On).map(o=>Ee(o,t+1,n));return e.length>On&&r.push(`[...${e.length-On} more]`),r}if(e instanceof Date)return e.toISOString();if(e instanceof Error)return`[Error: ${e.message}]`;if(e instanceof RegExp)return e.toString();if(e instanceof Map){let r={__type:"Map",__size:e.size},o=0;for(let[i,s]of e){if(o>=_n){r[`...${e.size-o} more`]=true;break}let a=typeof i=="string"?i:String(i);r[a]=Ee(s,t+1,n),o++}return r}if(e instanceof Set)return{__type:"Set",__size:e.size,values:Array.from(e).slice(0,On).map(r=>Ee(r,t+1,n))};if(typeof e=="object"){let r={},o=Object.keys(e),i=o.slice(0,_n);for(let s of i)if(!(s.startsWith("__")||s==="children"))try{r[s]=Ee(e[s],t+1,n)}catch{r[s]="[Error accessing property]"}return o.length>_n&&(r[`...${o.length-_n} more keys`]=true),r}return"[Unknown type]"}l(Ee,"safeCloneForHistory");function Bl(e){if(e?.memoizedProps)return Ee(e.memoizedProps)}l(Bl,"capturePropsSnapshot");function Vl(e){if(!e?.memoizedState)return;let t=e.memoizedState;if(typeof t=="object"&&t!==null&&"next"in t){let n=[],r=t,o=0;for(;r&&o<go;)n.push({index:o,memoizedState:Ee(r.memoizedState)}),r=r.next,o++;return{__type:"Hooks",hooks:n}}return Ee(t)}l(Vl,"captureStateSnapshot");import{notifySubscriberCountChange as Hl}from"@buoy-gg/shared-ui/web";U();var wo=new Set(["HighlightUpdatesOverlay","HighlightUpdatesModal","HighlightFilterView","RenderDetailView","RenderListItem","RenderListItemInner","RenderHistoryViewer","RenderHistoryFooter","RenderCauseBadge","TwoLevelCauseBadge","EnhancedCauseDisplay","IsolatedRenderList","IsolatedRenderListInner","StatsDisplay","StatsDisplayInner","CurrentStateView","EventStepperFooter","EventsModal","UnifiedEventList","UnifiedEventItem","UnifiedEventDetail","UnifiedEventFilters","UnifiedEventViewer","ReactQueryEventDetail","EventsCopySettingsView"]),nn=["HighlightUpdates","RenderList","RenderDetail","RenderHistory","RenderCause","EventStepper","UnifiedEvent","EventsModal","EventsCopy"],Al=new Set(["JsModalComponent","JsModal","TypePicker","PatternInput","PatternChip","DetectedItemsSection","DetectedCategoryBadge","IdentifierBadge","CategoryBadge","AppRenderer","AppOverlay","FloatingTools","DialDevTools","DevToolsVisibilityProvider","AppHostProvider","MinimizedToolsProvider","ModalHeader","TabSelector","SectionHeader","DraggableHeader","WindowControls","TreeDiffViewer","DataViewer","SplitDiffViewer","VirtualizedDataExplorer","DiffSummary","TypeLegend","IndentGuides","IndentGuidesOverlay","CyberpunkInput","DiffView","AnswerCard","DetailsSection","DetailRow","QuickActionsSection","FilterOptionCard","SearchSection","SearchSectionInner","HeaderActions","HeaderActionsInner","MainListHeader","FilterViewHeader","DetailViewHeader","FloatingMenu","FloatingDevTools","MinimizedToolsStack","MinimizedToolsContext","GlitchToolButton","ExpandablePopover","CollapsedPeek","ExpandedWrapper","DialIcon","DialMenu","DialIconItem","OnboardingTooltip","MenuLauncherIcon","DevToolsSettingsModal","SettingsModal","ImageOverlayModal","ImageOverlayStandalone","ToolCard","ToolIcon","GripVerticalIcon","UserStatus","Divider","ChevronDown","ChevronUp","ChevronLeft","ChevronRight","ChevronDownIcon","ChevronUpIcon","ChevronLeftIcon","ChevronRightIcon","LogBox","LogBoxLog","LogBoxLogNotification","LogBoxNotificationContainer","_LogBoxNotificationContainer","LogBoxInspector","LogBoxInspectorContainer","LogBoxInspectorHeader","LogBoxInspectorBody","LogBoxInspectorFooter","LogBoxInspectorMessageHeader","LogBoxInspectorStackFrame","LogBoxInspectorSection","LogBoxButton","LogBoxMessage","PerfMonitorOverlay","PerfMonitorModal","PerfMonitorRoot","PerfHudInline","PerfDiagnostics","MetricSparkline","JsFallbackNotice","AutomationConfigView","AutomationProgressOverlay","AutomationResumer","SaveBenchmarkPrompt","SavedCasesModal","BatchBarReport","BatchReportView","PerfHudInlineInner","PerfMonitorOverlayInner","MiniMetric","MetricRow","MetricNumber","MetricSparklineInner","RecColumn","PillBody","FullBody","TargetLine","PagesSection","ProbesSection","TaskTable","TaskRow","BusySparkline"]),So=["JsModal","ImageOverlay","PerfMonitor","PerfHud","JsTop"],El=new Set(["VirtualizedDataExplorer","TreeDiffView","TreeDiffRow","DataViewer","DiffView","DiffSummary","FloatingDevTools","FloatingMenu","FloatingBubble","MinimizedDock","DialMenu","DialItem","ExpandableSection","ChevronIcon","GlitchText","SettingsModal","SettingsRow","OnboardingFlow","DevToolsMenu"]),xo=false;function Fl(e){xo=e}l(Fl,"setCaptureBuoyToolRenders");function Io(){return xo}l(Io,"isCapturingBuoyToolRenders");var Qd=new Set(["PerfHudInline","PerfHudInlineInner","PerfDiagnostics","MetricSparkline","MetricSparklineInner","JsFallbackNotice","AutomationConfigView","AutomationProgressOverlay","AutomationResumer","SaveBenchmarkPrompt","SavedCasesModal","BatchBarReport","BatchReportView","MiniMetric","MetricRow","MetricNumber","RecColumn","PillBody","FullBody","TargetLine","PagesSection","ProbesSection"]);function Ro(e){return e.startsWith("PerfMonitor")||e.startsWith("PerfHud")||Qd.has(e)}l(Ro,"isPerfMonitorComponentName");var Zd=new Set(["TaskTable","TaskRow","BusySparkline"]);function Ml(e){return e.startsWith("JsTop")||Zd.has(e)}l(Ml,"isJsTopComponentName");function $l(e){if(wo.has(e))return true;for(let t=0;t<nn.length;t++)if(e.startsWith(nn[t]))return true;if(xo)return Ro(e)||Ml(e);if(Al.has(e)||El.has(e))return true;for(let t=0;t<So.length;t++)if(e.startsWith(So[t]))return true;return false}l($l,"isDevToolsComponentName");function Ol(e){if(wo.has(e))return true;for(let t=0;t<nn.length;t++)if(e.startsWith(nn[t]))return true;return false}l(Ol,"isRenderLoopUnsafeName");var se=false,it=false,We=false,we=false,ae=null,Pe=null,Wn=null,rn=null,_l=false,Se=false,Un=new Set,Do=new Set,ko=new Map,Po=["#37afa9","#63b19e","#80b393","#97b488","#abb67d","#beb771","#cfb965","#dfba57","#efbb49","#febc38"],eg=false;function J(e,t){eg&&(t!==void 0?console.log("[Buoy]",`[HighlightUpdates] ${e}`,t):console.log("[Buoy]",`[HighlightUpdates] ${e}`))}l(J,"debugLog");function jn(e){let t=Fu(e);if(t)return t;if(!e)return null;let n=e;return n.canonical?.publicInstance?n.canonical.publicInstance:n.canonical&&typeof n.canonical.measure=="function"?n.canonical:typeof n.measure=="function"?n:null}l(jn,"getPublicInstance");function at(e){let t=Ia(e);if(t!==null)return t;if(e==null)return null;let n=e;if(n.__nativeTag!=null)return n.__nativeTag;if(n._nativeTag!=null)return n._nativeTag;if(n.nativeTag!=null)return n.nativeTag;if(n.canonical){if(n.canonical.__nativeTag!=null)return n.canonical.__nativeTag;if(n.canonical._nativeTag!=null)return n.canonical._nativeTag;if(n.canonical.nativeTag!=null)return n.canonical.nativeTag}return null}l(at,"getNativeTag");function Gn(e){let t=e,n={viewType:"Unknown"};t?.canonical?.viewConfig?.uiViewClassName?n.viewType=t.canonical.viewConfig.uiViewClassName:t?.viewConfig?.uiViewClassName?n.viewType=t.viewConfig.uiViewClassName:Ra(t)&&(n.viewType=t.tagName.toLowerCase());let r=t?.canonical?.internalInstanceHandle||t?._internalInstanceHandle||t?._internalFiberInstanceHandleDEV||Fr(t),o=t?.canonical?.currentProps,i=t?.canonical?.pendingProps,s=r?.pendingProps,a=r?.memoizedProps;return n.testID=o?.testID||i?.testID||s?.testID||a?.testID||s?.["data-testid"]||a?.["data-testid"]||void 0,n.nativeID=o?.nativeID||i?.nativeID||s?.nativeID||a?.nativeID||s?.id||a?.id||void 0,n.accessibilityLabel=o?.accessibilityLabel||i?.accessibilityLabel||s?.accessibilityLabel||a?.accessibilityLabel||s?.["aria-label"]||a?.["aria-label"]||void 0,n.componentName=Kl(r)||void 0,n}l(Gn,"extractComponentInfo");var Wl=false,tg=false,No=null;var ng=new Set;var rg=new Set(["highlight-updates-overlay","__rn_buoy__highlight-modal"]),og=new Set(["jsmodal-root","image-overlay-standalone","logbox_inspector","logbox"]),lt=new Map,Ul=500;function jl(){lt.clear()}l(jl,"clearDevToolsCache");function zo(e){return e?!!(rg.has(e)||e.startsWith("__highlight_")):false}l(zo,"isHighlightOverlayNativeID");function Lo(e){if(!e)return false;if(og.has(e))return true;let t=e.charCodeAt(0);return!!(t===95&&e.startsWith("__rn_buoy__")||t===108&&e.startsWith("logbox"))}l(Lo,"isOtherDevToolsNativeID");function Bo(e){if(!e)return null;let t=e.type;if(t){if(typeof t=="string")return t;if(t.displayName)return t.displayName;if(t.name)return t.name}let n=e.elementType;if(n){if(n.displayName)return n.displayName;if(n.name)return n.name}return null}l(Bo,"getComponentName");var ig=new Set(["View","Text","TextImpl","Image","ScrollView","FlatList","SectionList","TouchableOpacity","TouchableHighlight","TouchableWithoutFeedback","Pressable","TextInput","Switch","ActivityIndicator","Modal","StatusBar","KeyboardAvoidingView","AnimatedComponent","AnimatedComponentWrapper","ScreenContainer","ScreenStack","Screen","ScreenContentWrapper","Svg","G","Path","Rect","Circle","Line","Polygon","Polyline","Ellipse","Text as SVGText","TSpan","TextPath","Use","Symbol","Defs","ClipPath","LinearGradient","RadialGradient","Stop","Mask","Pattern","Image as SVGImage","SafeAreaProvider","SafeAreaView","SafeAreaListener","GestureHandlerRootView","GestureDetector","ReanimatedView","ReanimatedText","ReanimatedImage","ReanimatedScrollView","Fragment","Suspense","Provider","Consumer","Context","ForwardRef"]);function Gl(e){return!!(!e||ig.has(e)||e==="Unknown"||e==="Component"||e.startsWith("Animated"))}l(Gl,"isInternalComponent");function Kl(e){if(!e)return null;let t=e._debugOwner||e.return,n=0,r=null;for(;t&&n<30;){let o=Bo(t);if(o&&typeof t.type!="string"&&(r||(r=o),!Gl(o)))return o;t=t.return,n++}return r}l(Kl,"getOwningComponentName");function ql(e){let t=e,n=t?.canonical?.internalInstanceHandle||t?._internalInstanceHandle||t?._internalFiberInstanceHandleDEV||Fr(t),r=at(e)||at(t?.canonical?.publicInstance),o=Io(),i=!o&&B.getSettings().excludeDevTools;if(i&&Ra(e)&&e.closest("[data-buoy-root]"))return true;if(r!=null&&i){let u=lt.get(r);if(u!==void 0)return u}let s=false,a=n?.pendingProps?.nativeID||n?.memoizedProps?.nativeID||t?.canonical?.currentProps?.nativeID||null;if((zo(a)||i&&Lo(a))&&(s=true),!s&&n){let u=n,c=0;for(;u&&c<30;){let d=Bo(u);if(d){if(wo.has(d)){s=true;break}for(let T of nn)if(d.startsWith(T)){s=true;break}if(s)break;if(o&&Ro(d)){s=true;break}if(i){if(Al.has(d)||El.has(d)){s=true;break}for(let T of So)if(d.startsWith(T)){s=true;break}if(s)break}}let g=u.pendingProps?.nativeID||u.memoizedProps?.nativeID;if(zo(g)){s=true;break}if(i&&Lo(g)){s=true;break}u=u.return,c++}}if(s&&r!=null&&i){if(lt.size>=Ul){let u=Array.from(lt.keys());for(let c=0;c<Ul/2;c++)lt.delete(u[c])}lt.set(r,s)}return s}l(ql,"isOurOverlayNode");function Vo(e){let t=Math.min(e-1,Po.length-1);return Po[Math.max(0,t)]}l(Vo,"getColorForRenderCount");function Jl(e){if(e.size===0||!se&&!We||B.getState().isPaused)return;Qe.isEnabled()&&pa();let t=B.getBatchSize(),n=Qe.startBatch(e.size,t),r=[],o=0,i=0,s=B.hasActiveFilters();for(let c of e)if(c&&typeof c=="object")try{if(ql(c)){o++;continue}let d=jn(c),g=at(c)||at(d);if(g==null)continue;let T=Gn(c);if(s&&!B.passesFilters(T)){i++;continue}let b=B.getSettings().showRenderCount,v,f;b?(v=(ko.get(g)||0)+1,ko.set(g,v),f=Vo(v)):(v=0,f=Po[0]),r.push({node:c,color:f,count:v})}catch{}if(n.markFilteringComplete(o+i,r.length),r.length===0){n.finish();return}Wl&&console.log("[Buoy]",`[HighlightUpdates] ${r.length} component(s) re-rendered`);let a=B.getRenderEventCallbackCount()>0;if(!Pe&&!a){Wl&&console.log("[Buoy]","[HighlightUpdates] No highlightCallback and no event callbacks - skipping render"),_l=false;return}n.markMeasurementStart();let u=r.slice(0,t*4).map(({node:c,color:d,count:g})=>new Promise(T=>{let b=false,v=l(m=>{b||(b=true,clearTimeout(f),T(m))},"settle"),f=setTimeout(()=>v({rect:null,stateNode:c,color:d,count:g}),500),S=jn(c),C=at(c)||at(S);if(C==null){v({rect:null,stateNode:c,color:d,count:g});return}let N=l((m,k,P,D,W,Z)=>{if(W==null||Z==null||P==null||D==null){v({rect:null,stateNode:c,color:d,count:g});return}v({rect:{id:C,x:W,y:Z,width:P,height:D,color:d,count:g},stateNode:c,color:d,count:g})},"onMeasured");if(!S){let m=c.node,k=globalThis.nativeFabricUIManager;if(m&&k?.measure){try{k.measure(m,N)}catch{v({rect:null,stateNode:c,color:d,count:g})}return}v({rect:null,stateNode:c,color:d,count:g});return}try{S.measure(N)}catch{v({rect:null,stateNode:c,color:d,count:g})}}));Promise.all(u).then(c=>{let d=c.filter(T=>T.rect!==null),g=d.map(T=>T.rect);n.markMeasurementComplete(d.length,c.length-d.length),g.length>0&&Pe&&se&&!it&&Pe(g),setTimeout(()=>{try{for(let f of d)f.rect&&Ho(f.rect.id,f.stateNode)}catch(f){J("registerTrackedNode batch failed",f)}let T=B.getSettings(),b=T.trackRenderCauses&&T.showRenderCount,v=null;if(b){v=new Set;for(let{rect:f}of d)f&&v.add(f.id)}if(se){B.startBatch();for(let{rect:f,stateNode:S,color:C,count:N}of d)if(f){let m=Gn(S),k;if(b&&v){let P=Kn(S);k=$n(f.id,P,v,T.debugLogLevel)}B.trackRender({nativeTag:f.id,viewType:m.viewType,testID:m.testID,nativeID:m.nativeID,accessibilityLabel:m.accessibilityLabel,componentName:m.componentName,measurements:{x:f.x,y:f.y,width:f.width,height:f.height},color:C,count:N,renderCause:k})}B.endBatch()}else for(let{rect:f,stateNode:S,color:C,count:N}of d)if(f){let m=Gn(S),k;if(b&&v){let P=Kn(S);k=$n(f.id,P,v,T.debugLogLevel)}B.emitRenderEvent({nativeTag:f.id,viewType:m.viewType,testID:m.testID,nativeID:m.nativeID,accessibilityLabel:m.accessibilityLabel,componentName:m.componentName,measurements:{x:f.x,y:f.y,width:f.width,height:f.height},color:C,count:N,renderCause:k})}n.markTrackingComplete(),n.markCallbackComplete(),n.finish()},0)}).catch(c=>{console.error("[Buoy]","[HighlightUpdates] Error in measurement pipeline:",c),n.finish()})}l(Jl,"handleTraceUpdates");var Yl=globalThis.WeakRef,Pt=new Map;function Ho(e,t){if(!(e==null||t==null||typeof t!="object"))try{Pt.set(e,Yl?new Yl(t):{deref:l(()=>t,"deref")})}catch{Pt.set(e,{deref:l(()=>t,"deref")})}}l(Ho,"registerTrackedNode");function Xl(e){let t=Pt.get(e)?.deref();return t||Pt.delete(e),t??null}l(Xl,"derefNode");function Ql(e){return new Promise(t=>{try{e.measure((n,r,o,i,s,a)=>{s==null||a==null||o==null||i==null?t(null):t({x:s,y:a,width:o,height:i})})}catch{t(null)}})}l(Ql,"measureNode");function Kn(e){let t=e;return t?.canonical?.internalInstanceHandle||t?._internalInstanceHandle||t?._internalFiberInstanceHandleDEV||Fr(t)||null}l(Kn,"getFiberFromNode");function Zl(e){let t=Kn(e),n=0;for(;t&&n++<200;){let r=t.stateNode;if(r&&typeof r.scrollTo=="function"){let o=typeof r.getNativeScrollRef=="function"&&r.getNativeScrollRef()||null,i=typeof r.getInnerViewNode=="function"&&r.getInnerViewNode()||typeof r.getScrollableNode=="function"&&r.getScrollableNode()||r;return{instance:r,nativeRef:o,innerNode:i}}t=t.return}return null}l(Zl,"findScrollAncestor");async function es(e,t,n){try{let r=Zl(e);if(!r)return false;let o=t,i=null,s=l(a=>new Promise(u=>{let c=false,d=l(T=>{c||(c=true,u(T))},"settle"),g=setTimeout(()=>d(null),600);try{a(T=>{clearTimeout(g),d(T)})}catch{clearTimeout(g),d(null)}}),"withTimeout");if(r.nativeRef&&typeof o.measureLayout=="function"&&(i=await s(a=>o.measureLayout(r.nativeRef,(u,c)=>a(c),()=>a(null)))),i==null){let a=Dt(t),u=typeof r.innerNode=="number"?r.innerNode:Dt(r.innerNode);a!=null&&u!=null&&(i=await s(c=>Xt.measureLayout(a,u,()=>c(null),(d,g)=>c(g))))}return i==null?false:(r.instance.scrollTo({y:Math.max(0,i-n),animated:false}),await new Promise(a=>setTimeout(a,80)),true)}catch{return false}}l(es,"scrollDescendantIntoView");function ts(e,t){let n=[e.testID,e.nativeID,e.accessibilityLabel,e.componentName,e.viewType,String(e.nativeTag)],r=0;for(let o of n){if(!o)continue;let i=o.toLowerCase();if(i===t)return 3;i.startsWith(t)?r=Math.max(r,2):i.includes(t)&&(r=Math.max(r,1))}return r}l(ts,"matchScore");async function ns(e){let t=e.scrollIntoView!==false,n=typeof e.margin=="number"?e.margin:12,r=B.getRenders(),o=l(async()=>{let C=await Ln(),N=(e.query??"").trim().toLowerCase(),m;for(let D of C.elements){if(e.nativeTag!=null&&D.nativeTag===e.nativeTag){m={el:D,score:1e3};break}let W=Zt({nativeTag:D.nativeTag,testID:D.testID,label:D.label,text:D.text,name:D.name,tap:D.tap},{query:N||void 0,nativeTag:e.nativeTag});W<=0||(!m||W>m.score)&&(m={el:D,score:W})}if(!m?.el.frame)return{matched:false,reason:"no-match",candidates:[]};let k=C.screen,P=m.el.frame;return{matched:true,live:true,rect:{x:P.x*k.width,y:P.y*k.height,width:P.width*k.width,height:P.height*k.height},scale:Wr.get(),screen:{width:k.width,height:k.height},nativeTag:m.el.nativeTag??void 0,componentName:m.el.name,testID:m.el.testID}},"locateFromScreen");if(r.length===0)return o();let i=(e.query??"").trim().toLowerCase(),s=i?r.map(C=>({r:C,score:ts(C,i)})).filter(C=>C.score>0).sort((C,N)=>N.score-C.score||N.r.lastRenderTime-C.r.lastRenderTime):[],a=s.slice(0,8).map(({r:C})=>({nativeTag:C.nativeTag,componentName:C.componentName,testID:C.testID,nativeID:C.nativeID,viewType:C.viewType,renderCount:C.renderCount})),u=e.nativeTag??(s.length>0?s[0].r.nativeTag:void 0);if(u==null){let C=await o();return C.matched?C:{matched:false,reason:"no-match",candidates:a}}let c=r.find(C=>C.nativeTag===u),d=null,g=false,T=false,b=Xl(u);if(b){let C=jn(b);C&&(t&&(T=await es(b,C,n)),d=await Ql(C),g=!!d)}if(!d&&c?.measurements&&(d={...c.measurements}),!d)return{matched:false,reason:"no-measurement",nativeTag:u,candidates:a};let v=Wr.get(),f=Ze.get("window"),S=d.x>=-1&&d.y>=-1&&d.x+d.width<=f.width+1&&d.y+d.height<=f.height+1;return{matched:true,live:g,scrolled:T,inView:S,rect:d,scale:v,screen:{width:f.width,height:f.height},nativeTag:u,componentName:c?.componentName,testID:c?.testID,candidates:a}}l(ns,"locateComponent");function Ao(e){if(!ae?.rendererInterfaces){J("No rendererInterfaces available");return}let t=0;if(ae.rendererInterfaces.forEach((n,r)=>{if(typeof n.setTraceUpdatesEnabled=="function")try{n.setTraceUpdatesEnabled(e),t++,J(`Renderer ${r}: setTraceUpdatesEnabled(${e})`)}catch(o){J(`Renderer ${r}: error setting trace updates`,o)}else J(`Renderer ${r}: no setTraceUpdatesEnabled method`)}),J(`Set trace updates ${e?"enabled":"disabled"} on ${t} renderer(s)`),ae.reactDevtoolsAgent?.setTraceUpdatesEnabled)try{ae.reactDevtoolsAgent.setTraceUpdatesEnabled(e),J("Also set trace updates on agent")}catch(n){J("Error setting trace updates on agent",n)}}l(Ao,"setTraceUpdatesOnRenderers");function Eo(){ae&&(rn||(J("Subscribing to traceUpdates event"),typeof ae.sub=="function"?(rn=ae.sub("traceUpdates",Jl),J("Subscribed using hook.sub()")):J("hook.sub not available, traceUpdates may not work"),Ao(true)))}l(Eo,"subscribeToTraceUpdates");function qn(){Ao(false),rn&&(rn(),rn=null,J("Unsubscribed from traceUpdates event"))}l(qn,"unsubscribeFromTraceUpdates");function Fo(e){Pe=e,J(`Highlight callback ${e?"set":"cleared"}`)}l(Fo,"setHighlightCallback");function rs(e){Wn=e,J(`Badge press callback ${e?"set":"cleared"}`)}l(rs,"setBadgePressCallback");function os(){return Wn}l(os,"getBadgePressCallback");function is(e){Wn&&Wn(e)}l(is,"handleBadgePress");var Mo=null,Jn=null;function as(e){Mo=e,e&&Jn!==null&&e(Jn)}l(as,"setSpotlightCallback");function ls(e){if(me){me("setSpotlight",{nativeTag:e});return}Jn=e,Mo&&Mo(e)}l(ls,"setSpotlight");var me=null;function ss(e){me=e}l(ss,"setRemoteHandler");function cs(e){se!==e.enabled&&(se=e.enabled,Yn()),Se!==e.frozen&&(Se=e.frozen,on())}l(cs,"replaceRemoteState");function us(){return Jn}l(us,"getSpotlight");function Yn(){Do.forEach(e=>{try{e(se)}catch(t){console.error("[Buoy]","[HighlightUpdates] Error in state listener:",t)}})}l(Yn,"notifyStateListeners");function $o(e){return Do.add(e),e(se),()=>{Do.delete(e)}}l($o,"subscribe");function ds(e){if(typeof ee<"u"&&!ee)return{recordRenders:l(()=>{},"recordRenders"),disconnect:l(()=>{},"disconnect")};if(Ue!==void 0||we)throw new Error("Connect the render source before Highlight starts.");Ue=e;let t=true,n=new Set;return Nt(),{recordRenders(r){if(!t||!e||!se||B.getState().isPaused)return;let o=[];B.startBatch();try{for(let{host:i,name:s,count:a}of r){if(!i.isConnected)continue;let u=Ia(i);if(u===null)continue;let c=(B.getRender(String(u))?.renderCount??0)+a,d=Vo(c),{x:g,y:T,width:b,height:v}=i.getBoundingClientRect(),f={x:g,y:T,width:b,height:v};B.trackRender({nativeTag:u,viewType:s,componentName:s,isComponent:true,testID:i.getAttribute("data-testid")??void 0,measurements:f,color:d,count:c}),Ho(u,i),n.add(u),b>0&&v>0&&o.push({id:u,...f,color:d,count:B.getSettings().showRenderCount?c:0})}}finally{B.endBatch()}for(let i of n)B.getRender(String(i))||(n.delete(i),Pt.delete(i));!it&&o.length&&Pe?.(o)},disconnect(){if(t){t=false,st(),Pe?.([]),_o();for(let r of n)Pt.delete(r);n.clear(),Ue=void 0,we=false}}}}l(ds,"connectRenderSource");var Ue;function gs(){return Ue===void 0?void 0:Ue?"ready":"unavailable"}l(gs,"getRenderSourceStatus");function Nt(){if(typeof ee<"u"&&!ee)return J("Only available in development builds"),false;if(me||we)return true;if(Ue!==void 0)return we=Ue,Xn(),we;if(ae=window?.__REACT_DEVTOOLS_GLOBAL_HOOK__||null,!ae)return J("React DevTools hook not found"),false;if(J("Hook found"),J(`Hook has sub: ${typeof ae.sub=="function"}`),J(`Hook has on: ${typeof ae.on=="function"}`),J(`Hook has emit: ${typeof ae.emit=="function"}`),Or(),ae.rendererInterfaces&&ae.rendererInterfaces.size>0)return we=true,J(`Initialized with ${ae.rendererInterfaces.size} renderer(s)`),Xn(),true;let e=setInterval(()=>{ae?.rendererInterfaces&&ae.rendererInterfaces.size>0&&(clearInterval(e),we=true,J(`Initialized with ${ae.rendererInterfaces.size} renderer(s) (delayed)`),Xn())},100);return setTimeout(()=>clearInterval(e),1e4),false}l(Nt,"initialize");function Xn(){typeof window<"u"&&(window.__HIGHLIGHT_UPDATES_CONTROLLER__={enable:zt,disable:st,toggle:Oo,isEnabled:Wo,setEnabled:Uo,subscribe:$o,initialize:Nt,destroy:Ko,isInitialized:l(()=>we,"isInitialized"),setHighlightCallback:Fo})}l(Xn,"exposeGlobally");function zt(){typeof ee<"u"&&!ee||Ue!==false&&(we||Nt(),it&&(it=false),!se&&(J("Enabling highlights"),We||Eo(),B.start(),se=true,Yn(),Hl("render")))}l(zt,"enable");function st(){typeof ee<"u"&&!ee||se&&(J("Disabling highlights"),tg=false,_l=false,No&&(clearTimeout(No),No=null),ng.clear(),lt.clear(),To(),Se&&(Se=false,on()),We||qn(),B.stop(),se=false,Yn(),Hl("render"))}l(st,"disable");function hs(){typeof ee<"u"&&!ee||We||(we||Nt(),J("Enabling background tracking"),se||Eo(),We=true)}l(hs,"enableBackgroundTracking");function ps(){typeof ee<"u"&&!ee||We&&(J("Disabling background tracking"),We=false,se||qn())}l(ps,"disableBackgroundTracking");function ms(){return We}l(ms,"isBackgroundTrackingEnabled");function Oo(){if(!(typeof ee<"u"&&!ee)){if(me){me("toggle");return}se?st():zt()}}l(Oo,"toggle");function _o(){if(me){me("clearRenderCounts");return}ko.clear(),B.clear(),J("Cleared render counts")}l(_o,"clearRenderCounts");function Wo(){return se}l(Wo,"isEnabled");function Uo(e){if(me){me("setEnabled",{enabled:e});return}e?zt():st()}l(Uo,"setEnabled");function Qn(e){it!==e&&(it=e,e&&Pe&&Pe([]))}l(Qn,"setHighlightsSuppressed");function fs(){return it}l(fs,"getHighlightsSuppressed");function ys(e){if(me){me("setSilentTracking",{enabled:e});return}e?(zt(),Qn(true)):(Qn(false),st())}l(ys,"setSilentTracking");function bs(){return we}l(bs,"isInitialized");function on(){Un.forEach(e=>{try{e(Se)}catch(t){console.error("[Buoy]","[HighlightUpdates] Error in freeze listener:",t)}})}l(on,"notifyFreezeListeners");function vs(e){return Un.add(e),e(Se),()=>{Un.delete(e)}}l(vs,"subscribeToFreeze");function jo(){typeof ee<"u"&&!ee||Se||(Se=true,J("Freeze mode enabled"),on())}l(jo,"freeze");function Go(){typeof ee<"u"&&!ee||Se&&(Se=false,J("Freeze mode disabled"),Pe&&Pe([]),on())}l(Go,"unfreeze");function Cs(){if(me){me("toggleFreeze");return}Se?Go():jo()}l(Cs,"toggleFreeze");function Ts(){return Se}l(Ts,"getFrozen");function Ko(){we&&(qn(),_r(),$r(null),Se=false,Un.clear(),se=false,ae=null,Pe=null,we=false,typeof window<"u"&&delete window.__HIGHLIGHT_UPDATES_CONTROLLER__,J("Destroyed"))}l(Ko,"destroy");var ag={connectRenderSource:ds,getRenderSourceStatus:gs,subscribe:$o,enable:zt,disable:st,toggle:Oo,isEnabled:Wo,setEnabled:Uo,initialize:Nt,destroy:Ko,isInitialized:bs,setHighlightCallback:Fo,clearRenderCounts:_o,freeze:jo,unfreeze:Go,toggleFreeze:Cs,getFrozen:Ts,subscribeToFreeze:vs,setBadgePressCallback:rs,getBadgePressCallback:os,handleBadgePress:is,setSpotlightCallback:as,setSpotlight:ls,getSpotlight:us,clearDevToolsCache:jl,enableBackgroundTracking:hs,disableBackgroundTracking:ps,isBackgroundTrackingEnabled:ms,setRemoteHandler:ss,replaceRemoteState:cs,locateComponent:ns,setHighlightsSuppressed:Qn,getHighlightsSuppressed:fs,setSilentTracking:ys},E=ag;U();import lg,{useState as de,useEffect as Re,useRef as ct,useCallback as re}from"react";import{Power as sg,JsModal as cg,devToolsStorageKeys as Lt,persistentStorage as Zn,night as Bt,TickProvider as ws,windowDragProps as ug}from"@buoy-gg/shared-ui/web";import{useIsPro as dg}from"@buoy-gg/license/web";Ve();U();import{useMemo as er,useState as Ss,useCallback as an}from"react";import{CopyButton as gg,formatRelativeTime as hg,PlusIcon as pg,MinusIcon as mg,EventStepperFooter as fg,Lock as yg,night as $,useLimit as bg,monoFont as Vt}from"@buoy-gg/shared-ui/web";import{TreeDiffViewer as vg}from"@buoy-gg/shared-ui/web/dataViewer";U();import{buoyColors as je,night as oe,monoFont as ut}from"@buoy-gg/shared-ui/web";import{Fragment as Cg,jsx as K,jsxs as ce}from"react/jsx-runtime";var Ge={mount:{label:"MOUNT",color:je.success,tip:"First render of this component."},props:{label:"PROPS",color:je.warning,tip:"Native props changed. Consider React.memo() or useCallback for handlers."},state:{label:"STATE",color:"#a855f7",tip:"Component state changed via setState."},hooks:{label:"HOOKS",color:"#ec4899",tip:"Hook values changed (useState, useReducer, useMemo, etc.)."},context:{label:"CONTEXT",color:"#06b6d4",tip:"React context value changed."},parent:{label:"PARENT",color:je.textSecondary,tip:"Parent component re-rendered. Consider wrapping with React.memo()."},unknown:{label:"?",color:je.textMuted,tip:"Could not determine render cause."}},ln={mount:{label:"mount",color:je.success,tip:"First render of this component."},props:{label:"props",color:je.warning,tip:"Component received different props from parent."},state:{label:"state",color:"#a855f7",tip:"Component's own state changed (useState/useReducer)."},parent:{label:"parent",color:je.textSecondary,tip:"Parent re-rendered but this component's props/state didn't change. Consider React.memo()."},unknown:{label:"?",color:je.textMuted,tip:"Could not determine component render cause."}};function qo({cause:e,compact:t=false,showKeys:n=false,showTwoLevel:r=false,testID:o}){let i=Ge[e.type],s=e.componentCause?ln[e.componentCause]:null,a=r&&s&&e.componentCause!==e.type;return ce(h,{nativeID:"__rn_buoy__cause-badge",testID:o,style:[H.container,t&&H.containerCompact],children:[a&&ce(Cg,{children:[K(h,{style:[H.badge,t&&H.badgeCompact,H.componentBadge,{backgroundColor:s.color+"15"}],children:K(p,{testID:o?`${o}-component`:void 0,style:[H.badgeText,t&&H.badgeTextCompact,H.componentBadgeText,{color:s.color}],children:s.label})}),K(p,{style:[H.arrowText,t&&H.arrowTextCompact],children:"\u2192"})]}),K(h,{style:[H.badge,t&&H.badgeCompact,{backgroundColor:i.color+"20"}],children:K(p,{testID:o?`${o}-native`:void 0,style:[H.badgeText,t&&H.badgeTextCompact,{color:i.color}],children:i.label})}),n&&e.changedKeys&&e.changedKeys.length>0&&K(p,{testID:o?`${o}-keys`:void 0,style:[H.keysText,t&&H.keysTextCompact],numberOfLines:1,children:e.changedKeys.join(", ")}),n&&e.hookIndices&&e.hookIndices.length>0&&ce(p,{testID:o?`${o}-hooks`:void 0,style:[H.keysText,t&&H.keysTextCompact],numberOfLines:1,children:["Hook ",e.hookIndices.join(", ")]})]})}l(qo,"RenderCauseBadge");function xs({cause:e}){let t=Ge[e.type],n=e.componentCause?ln[e.componentCause]:null,r=e.componentName||"Component";return ce(h,{nativeID:"__rn_buoy__two-level-cause",style:H.twoLevelContainer,children:[n&&ce(h,{style:H.twoLevelRow,children:[K(p,{style:H.twoLevelLabel,children:"Component:"}),K(p,{style:H.twoLevelName,children:r}),K(p,{style:H.twoLevelText,children:"re-rendered due to"}),K(h,{style:[H.badge,{backgroundColor:n.color+"20"}],children:K(p,{style:[H.badgeText,{color:n.color}],children:n.label.toUpperCase()})})]}),ce(h,{style:H.twoLevelRow,children:[K(p,{style:H.twoLevelLabel,children:"Native:"}),K(h,{style:[H.badge,{backgroundColor:t.color+"20"}],children:K(p,{style:[H.badgeText,{color:t.color}],children:t.label})}),e.changedKeys&&e.changedKeys.length>0&&ce(p,{style:H.twoLevelKeys,children:["[",e.changedKeys.join(", "),"]"]})]})]})}l(xs,"TwoLevelCauseBadge");function Jo({cause:e,nativeType:t}){let n=Ge[e.type],r=e.componentCause?ln[e.componentCause]:null,o=e.componentName||"Unknown",i=e.hookChanges&&e.hookChanges.length>0,s=e.changedKeys&&e.changedKeys.length>0,a=e.changedKeys?.filter(c=>c.includes("(ref only)")||c.includes("(fn ref)"))||[],u=e.changedKeys?.filter(c=>!c.includes("(ref only)")&&!c.includes("(fn ref)"))||[];return ce(h,{nativeID:"__rn_buoy__enhanced-cause",style:H.enhancedContainer,children:[ce(h,{style:H.enhancedHeader,children:[K(p,{style:H.enhancedComponentName,children:o}),t&&K(h,{style:H.enhancedNativeTag,children:K(p,{style:H.enhancedNativeTagText,children:t})})]}),ce(h,{style:H.enhancedFlowContainer,children:[K(p,{style:H.enhancedFlowLabel,children:"Cause:"}),r&&K(h,{style:[H.enhancedFlowBadge,{backgroundColor:r.color+"20"}],children:K(p,{style:[H.enhancedFlowBadgeText,{color:r.color}],children:r.label.toUpperCase()})}),K(p,{style:H.enhancedFlowArrow,children:"\u2192"}),K(h,{style:[H.enhancedFlowBadge,{backgroundColor:n.color+"20"}],children:K(p,{style:[H.enhancedFlowBadgeText,{color:n.color}],children:n.label})})]}),i&&ce(h,{style:H.enhancedSection,children:[K(p,{style:H.enhancedSectionTitle,children:"Component State Changed:"}),e.hookChanges.map(c=>ce(h,{style:H.enhancedChangeRow,children:[K(p,{style:H.enhancedChangeIcon,children:"\u26A1"}),ce(p,{style:H.enhancedChangeText,children:["Hook[",c.index,"] (",c.type,"): ",c.description]})]},c.index))]}),u.length>0&&ce(h,{style:H.enhancedSection,children:[K(p,{style:H.enhancedSectionTitle,children:"Native Props Changed:"}),u.map((c,d)=>ce(h,{style:H.enhancedChangeRow,children:[K(p,{style:H.enhancedChangeIcon,children:"~"}),K(p,{style:H.enhancedChangeText,children:c})]},d))]}),a.length>0&&ce(h,{style:H.enhancedSection,children:[K(p,{style:[H.enhancedSectionTitle,{color:oe.color.textTertiary}],children:"Reference Changes (optimization opportunity):"}),a.map((c,d)=>ce(h,{style:H.enhancedChangeRow,children:[K(p,{style:[H.enhancedChangeIcon,{color:oe.color.textTertiary}],children:"\u25CB"}),K(p,{style:[H.enhancedChangeText,{color:oe.color.textTertiary}],children:c})]},d))]}),!i&&!s&&e.type!=="mount"&&K(h,{style:H.enhancedSection,children:K(p,{style:H.enhancedNoChanges,children:e.type==="parent"?"Parent re-rendered (consider React.memo)":"No specific changes detected"})})]})}l(Jo,"EnhancedCauseDisplay");var H=ve.create({container:{flexDirection:"row",alignItems:"center",gap:6},containerCompact:{gap:4},badge:{paddingVertical:3,paddingHorizontal:6,borderRadius:4},badgeCompact:{paddingVertical:2,paddingHorizontal:5},componentBadge:{borderStyle:"dashed",borderWidth:1,borderColor:oe.color.border},badgeText:{fontSize:10,fontWeight:"700"},badgeTextCompact:{fontSize:9},componentBadgeText:{fontWeight:"500",textTransform:"lowercase"},arrowText:{fontSize:10,color:oe.color.textTertiary},arrowTextCompact:{fontSize:9},keysText:{fontSize:11,color:oe.color.textSecondary,fontFamily:ut,flex:1},keysTextCompact:{fontSize:10},twoLevelContainer:{gap:8},twoLevelRow:{flexDirection:"row",alignItems:"center",flexWrap:"wrap",gap:6},twoLevelLabel:{fontSize:11,fontWeight:"600",color:oe.color.textSecondary,minWidth:70},twoLevelName:{fontSize:11,fontWeight:"600",color:oe.color.text,fontFamily:ut},twoLevelText:{fontSize:11,color:oe.color.textSecondary},twoLevelKeys:{fontSize:10,color:oe.color.textSecondary,fontFamily:ut},enhancedContainer:{gap:12},enhancedHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:8},enhancedComponentName:{fontSize:14,fontWeight:"700",color:oe.color.text,fontFamily:ut},enhancedNativeTag:{backgroundColor:oe.color.bg,paddingVertical:2,paddingHorizontal:6,borderRadius:4},enhancedNativeTagText:{fontSize:10,fontWeight:"600",color:oe.color.textTertiary,fontFamily:ut},enhancedFlowContainer:{flexDirection:"row",alignItems:"center",gap:8,paddingVertical:8,paddingHorizontal:12,backgroundColor:oe.color.bg,borderRadius:6},enhancedFlowLabel:{fontSize:11,fontWeight:"600",color:oe.color.textSecondary},enhancedFlowBadge:{paddingVertical:3,paddingHorizontal:8,borderRadius:4},enhancedFlowBadgeText:{fontSize:10,fontWeight:"700"},enhancedFlowArrow:{fontSize:14,color:oe.color.textTertiary,fontWeight:"300"},enhancedSection:{gap:6},enhancedSectionTitle:{fontSize:11,fontWeight:"600",color:oe.color.textSecondary,letterSpacing:.3},enhancedChangeRow:{flexDirection:"row",alignItems:"flex-start",gap:6,paddingLeft:4},enhancedChangeIcon:{fontSize:12,color:oe.color.warning,fontFamily:ut,width:16},enhancedChangeText:{fontSize:12,color:oe.color.text,fontFamily:ut,flex:1},enhancedNoChanges:{fontSize:12,color:oe.color.textTertiary,fontStyle:"italic",paddingLeft:4}});U();function Is(e,t){let n=e.filter(b=>b.renderCount>=t.minRenders);if(t.filterCauses.length>0){let b=new Set(t.filterCauses);n=n.filter(v=>b.has(v.lastRenderCause?.type??"unknown"))}let r=e.flatMap(b=>[b.firstRenderTime,b.lastRenderTime]).filter(b=>Number.isFinite(b)),o=r.length>0?Math.max(...r)-Math.min(...r):0,i=Math.max(.001,o/1e3),s=(t.groupByName?Rs(n):n.map(b=>[b])).map(b=>Ds(b,t,i));Ps(s,t.sortBy);let a=t.topN===-1?0:Math.max(0,s.length-t.topN),u=t.topN===-1?s:s.slice(0,t.topN),c=e.reduce((b,v)=>b+v.renderCount,0),d=ks(e),g=0,T=false;for(let b of e)b.lastRenderCause||(g+=b.renderCount),b.renderHistory&&b.renderHistory.length>0&&(T=true);return{totalUniqueComponents:n.length,totalRenders:c,windowMs:o,causeBreakdown:d,rows:u,truncated:a,dataGaps:{historyOff:!T,propsCaptureOff:!e.some(b=>b.renderHistory?.some(v=>v.capturedProps!==void 0)),stateCaptureOff:!e.some(b=>b.renderHistory?.some(v=>v.capturedState!==void 0)),rendersWithoutCause:g}}}l(Is,"buildReport");function Rs(e){let t=new Map;for(let n of e){let r=n.componentName||n.displayName||n.viewType,o=t.get(r);o?o.push(n):t.set(r,[n])}return Array.from(t.values())}l(Rs,"groupByComponentName");function Ds(e,t,n){let r=e[0],o=r.componentName||r.displayName||r.viewType,i=0,s={},a=new Map,u=new Map,c=new Map,d=0,g=0,T=0;for(let P of e){i+=P.renderCount;let D=P.lastRenderCause;if(!D)continue;let W=D.type;s[W]=(s[W]??0)+P.renderCount;let Z=(D.hookChanges?.length??0)>0,V=(D.changedKeys?.length??0)>0;if(W==="parent"&&(D.componentCause==="state"||D.componentCause==="props"||Z||V?g+=P.renderCount:T+=P.renderCount),W==="props"&&!V&&(d+=P.renderCount),D.parentComponentName&&c.set(D.parentComponentName,(c.get(D.parentComponentName)??0)+1),t.aggregateCauses&&D.hookChanges)for(let j of D.hookChanges){let x=`${j.type}[${j.index}]`,L=a.get(x);L?L.count+=1:a.set(x,{count:1,sample:zs(j)})}if(D.changedKeys)for(let j of D.changedKeys)j.includes("(ref only)")||u.set(j,(u.get(j)??0)+1)}let b=Array.from(a.entries()).sort((P,D)=>D[1].count-P[1].count).slice(0,3).map(([P,D])=>({hook:P,count:D.count,sample:D.sample})),v=Array.from(u.entries()).sort((P,D)=>D[1]-P[1]).slice(0,5).map(([P])=>P),f="unknown",S=-1;for(let[P,D]of Object.entries(s))(D??0)>S&&(S=D??0,f=P);let C,N=0;for(let[P,D]of c)D>N&&(N=D,C=P);let m=e.map(P=>P.renderCount).sort((P,D)=>D-P),k=i/n;return{name:o,viewType:r.viewType,instances:e.length,renders:i,causeMix:s,dominantCause:f,hookCauses:b,changedKeys:v,unknownPropsCount:d,parentWithOwnChange:g,parentNoChange:T,parentName:C,instanceCounts:m,rate:k,source:e}}l(Ds,"processGroup");function ks(e){let t={};for(let n of e){let r=n.lastRenderCause?.type??"unknown";t[r]=(t[r]??0)+n.renderCount}return t}l(ks,"aggregateCauseBreakdown");function Ps(e,t){switch(t){case"renderCount":e.sort((n,r)=>r.renders-n.renders);break;case"rate":e.sort((n,r)=>r.rate-n.rate);break;case"name":e.sort((n,r)=>n.name.localeCompare(r.name));break}}l(Ps,"sortRows");var Ns=32;function Yo(e){if(e===null)return"null";if(e===void 0)return"undefined";if(typeof e=="function")return"[Fn]";if(typeof e=="object")return Array.isArray(e)?`[Array(${e.length})]`:"[Obj]";let t=String(e);return t.length>Ns?t.slice(0,Ns-1)+"\u2026":t}l(Yo,"truncateValue");function zs(e){return e.previousValue===void 0&&e.currentValue===void 0?e.description:`${Yo(e.previousValue)} \u2192 ${Yo(e.currentValue)}`}l(zs,"formatHookSample");function Xo(e){return e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}l(Xo,"formatWindow");function tr(e){return e>=100?`${e.toFixed(0)}/s`:e>=10?`${e.toFixed(1)}/s`:`${e.toFixed(2)}/s`}l(tr,"formatRate");function Qo(e){let t=Object.entries(e).sort((n,r)=>(r[1]??0)-(n[1]??0));return t.length===0?"(no causes recorded)":t.map(([n,r])=>`${n} ${r}`).join(" \xB7 ")}l(Qo,"causeBreakdownLine");function Zo(e){let t=[],n=Object.entries(e.causeMix).filter(([,o])=>(o??0)>0).sort((o,i)=>(i[1]??0)-(o[1]??0)),r=n.length>=2&&(n[1]?.[1]??0)>=e.renders*.1;if(e.dominantCause==="hooks"&&e.hookCauses.length>0){let o=e.hookCauses[0];o.sample?t.push(`hooks \xD7${o.count} ${o.hook}: ${o.sample}`):t.push(`hooks \xD7${o.count} ${o.hook}`)}else if(e.dominantCause==="props"){if(e.changedKeys.length>0){let o=e.changedKeys.slice(0,3).join(", ");t.push(`props (${o})`)}else t.push("props (keys not captured)");e.unknownPropsCount>0&&e.changedKeys.length>0&&t.push(`[${e.unknownPropsCount} unidentified]`)}else if(e.dominantCause==="parent"){let o="parent cascade";e.parentNoChange>0&&e.parentWithOwnChange===0&&(o="parent cascade, no own change"),e.parentName&&(o+=` \u2190 ${e.parentName}`),t.push(o)}else e.dominantCause==="mount"?t.push("mount"):e.dominantCause==="state"?t.push("state"):e.dominantCause==="context"?t.push("context"):t.push("unknown");if(r){let o=n.map(([i,s])=>`${i}:${s}`).join(" + ");t.push(`(${o})`)}return t.join(" ")}l(Zo,"describeCause");function ei(e){if(e.instances<=1)return e.name;let t=e.instanceCounts,n=t[0]??0,r=t[t.length-1]??0;if(n-r<=1)return`${e.name} \xD7${e.instances} (${n} each)`;let o=t.slice(1),i=o.reduce((a,u)=>a+u,0),s=o.length>0?i/o.length:0;return`${e.name} \xD7${e.instances} (top ${n}, others ~${Math.round(s)})`}l(ei,"describeInstances");var Tg="React Native render report \u2014 review the data and identify why components are re-rendering.";function ti(e,t){let n=[];n.push(Tg),n.push(""),n.push(`Window: ${Xo(e.windowMs)} \xB7 ${e.totalUniqueComponents} components \xB7 ${e.totalRenders} renders`),n.push(`Cause mix: ${Qo(e.causeBreakdown)}`),n.push(""),n.push("Top offenders (count \xB7 rate \xB7 component \xB7 cause):"),n.push("");let r=e.rows.map(ei),o=Math.min(36,Math.max(8,...r.map(u=>u.length))),i=Math.max(3,...e.rows.map(u=>`\xD7${u.renders}`.length)),s=Math.max(5,...e.rows.map(u=>tr(u.rate).length));for(let u=0;u<e.rows.length;u++){let c=e.rows[u],d=(r[u]??c.name).padEnd(o),g=`\xD7${c.renders}`.padStart(i),T=tr(c.rate).padStart(s),b=Zo(c);n.push(` ${g} ${T} ${d} ${b}`)}e.truncated>0&&(n.push(""),n.push(`... ${e.truncated} more (set topN=-1 to expand)`));let a=ni(e);if(a.length>0){n.push(""),n.push("Data availability:");for(let u of a)n.push(` \xB7 ${u}`)}return n.join(`
|
|
31
|
+
`)}l(ti,"generateSummary");function ni(e){let t=[];return e.dataGaps.rendersWithoutCause>0&&t.push(`${e.dataGaps.rendersWithoutCause} renders had no cause info (enable trackRenderCauses for more detail)`),e.dataGaps.propsCaptureOff&&t.push("prop snapshots not captured (enable capturePropsOnRender to see prop diffs for 'props (keys not captured)' rows)"),e.dataGaps.stateCaptureOff&&t.push("state snapshots not captured (enable captureStateOnRender)"),e.dataGaps.historyOff&&t.push("render history off (enable enableRenderHistory for per-render timeline)"),t}l(ni,"buildDataFooter");function Ls(e,t){let n=[];n.push("# React Render Report"),n.push(""),n.push(`**Window:** ${Xo(e.windowMs)} \xB7 **Components:** ${e.totalUniqueComponents} \xB7 **Renders:** ${e.totalRenders}`),n.push(`**Cause mix:** ${Qo(e.causeBreakdown)}`),n.push(""),n.push("| Component | Renders | Rate | Cause |"),n.push("|---|---:|---:|---|");for(let o of e.rows){let i=ei(o),s=Zo(o).replace(/\|/g,"\\|");n.push(`| ${i} | ${o.renders} | ${tr(o.rate)} | ${s} |`)}e.truncated>0&&(n.push(""),n.push(`_... ${e.truncated} more rows_`));let r=ni(e);if(r.length>0){n.push(""),n.push("**Data availability:**");for(let o of r)n.push(`- ${o}`)}return n.join(`
|
|
32
|
+
`)}l(Ls,"generateMarkdownTable");function Bs(e,t,n){let r={exportedAt:new Date().toISOString(),summary:{windowMs:t.windowMs,totalComponents:t.totalUniqueComponents,totalRenders:t.totalRenders,causeBreakdown:t.causeBreakdown,truncated:t.truncated,dataGaps:t.dataGaps},components:t.rows.map(o=>({name:o.name,viewType:o.viewType,instances:o.instances,instanceCounts:o.instances>1?o.instanceCounts:void 0,renders:o.renders,ratePerSec:Number(o.rate.toFixed(3)),dominantCause:o.dominantCause,causeMix:o.causeMix,hookCauses:o.hookCauses,changedKeys:o.changedKeys,unknownPropsCount:o.unknownPropsCount||void 0,parentName:o.parentName,parentWithOwnChange:o.parentWithOwnChange||void 0,parentNoChange:o.parentNoChange||void 0,...n.includeHistory?{history:Vs(o.source)}:{}}))};return n.includeHistory?JSON.stringify(r,null,2):JSON.stringify(r)}l(Bs,"generateJson");function Vs(e){return e.map(t=>({name:t.componentName||t.displayName,nativeTag:t.nativeTag,renderCount:t.renderCount,history:t.renderHistory?.map(n=>({n:n.renderNumber,t:n.timestamp,cause:{type:n.cause.type,componentCause:n.cause.componentCause,changedKeys:n.cause.changedKeys,parentComponentName:n.cause.parentComponentName,hookChanges:n.cause.hookChanges?.map(r=>({type:r.type,index:r.index,desc:r.description}))}}))}))}l(Vs,"extractHistory");function nr(e,t){let n=Is(e,t);switch(t.format){case"summary":return ti(n,t);case"markdown-table":return Ls(n,t);case"json":return Bs(e,n,t);default:return ti(n,t)}}l(nr,"generateExport");function Hs(e,t){return nr(e,t).length}l(Hs,"estimateExportSize");function ri(e){return{totalComponents:e.length,totalRenders:e.reduce((t,n)=>t+n.renderCount,0)}}l(ri,"getExportSummary");function As(e){return nr([e],{format:"summary",topN:-1,minRenders:1,filterCauses:[],groupByName:false,aggregateCauses:true,sortBy:"renderCount",includeHistory:false})}l(As,"generateSingleComponentExport");import{jsx as O,jsxs as Q}from"react/jsx-runtime";function oi({render:e,disableInternalFooter:t=false,selectedEventIndex:n,onEventIndexChange:r,onAddFilter:o,isPro:i=false}){let[s,a]=Ss(0),u=n??s,c=r??a,d=er(()=>!e.renderHistory||e.renderHistory.length===0?[]:[...e.renderHistory].sort((V,j)=>V.timestamp-j.timestamp),[e.renderHistory]),g=d.length,T=d[u],b=bg("highlightUpdates.detailEvents"),v=i?1/0:b,f=er(()=>Math.max(0,g-v),[v,g]),S=T?.cause||e.lastRenderCause,C=an(()=>{u>0&&c(u-1)},[u,c]),N=an(()=>{let V=Math.min(v-1,g-1);u<V&&c(u+1)},[u,g,c,v]),m=er(()=>As(e),[e]),k=e.componentName||e.displayName,P=e.viewType,D=e.lastRenderTime-e.firstRenderTime,W=D>0?(e.renderCount/(D/1e3)).toFixed(1):e.renderCount.toString(),Z=!t&&g>1;return Q(h,{style:z.container,children:[Q(h,{style:z.header,children:[Q(h,{style:z.headerLeft,children:[O(p,{testID:"buoy-highlight-detail-name",style:z.componentName,numberOfLines:1,children:k}),O(h,{style:z.nativeTypeBadge,children:O(p,{testID:"buoy-highlight-detail-type",style:z.nativeTypeText,children:P})})]}),O(gg,{value:m,size:14,testID:"buoy-highlight-detail-copy"})]}),Q(Me,{testID:"buoy-highlight-detail-scroll",style:z.scrollView,contentContainerStyle:[z.scrollContent,Z&&{paddingBottom:100}],showsVerticalScrollIndicator:false,children:[S&&O(Es,{cause:S,renderNumber:T?.renderNumber}),O(Fs,{render:e,rendersPerSec:W}),f>0&&Q(h,{testID:"buoy-highlight-detail-locked",style:z.lockedBanner,children:[O(yg,{size:14,color:$.color.warning}),Q(p,{testID:"buoy-highlight-detail-locked-text",style:z.lockedBannerText,children:[f," ",f===1?"event":"events"," hidden"]}),O(p,{style:z.lockedBannerSubtext,children:"Upgrade to Pro"})]}),o&&O(Ms,{render:e,onAddFilter:o})]}),Z&&O(fg,{currentIndex:u,totalItems:g,onPrevious:C,onNext:N,itemLabel:"Render",subtitle:T?.timestamp?hg(new Date(T.timestamp)):void 0,applySafeAreaInset:false,absolute:true})]})}l(oi,"RenderDetailView");function Es({cause:e,renderNumber:t}){let n=e.componentCause||e.type,r=e.componentCause?ln[e.componentCause]:Ge[e.type],o=e.hookChanges&&e.hookChanges.length>0,i=e.changedKeys&&e.changedKeys.length>0,s=l(()=>e.type==="mount"?"First render":n==="parent"?"Triggered by":"Changed:","getLabel");return Q(h,{testID:"buoy-highlight-detail-cause",style:z.answerCard,children:[Q(h,{style:z.causeBadgeRow,children:[O(p,{testID:"buoy-highlight-detail-cause-label",style:z.causeLabel,children:s()}),O(h,{style:[z.causeBadgeLarge,{backgroundColor:r.color+"20"}],children:O(p,{testID:"buoy-highlight-detail-cause-badge",style:[z.causeBadgeLargeText,{color:r.color}],children:r.label.toUpperCase()})})]}),o&&O(h,{style:z.hookChangesContainer,children:e.hookChanges.map((a,u)=>{let c=`${a.type}[${a.index}]`,d={[c]:a.previousValue},g={[c]:a.currentValue};return O(h,{style:z.hookDiffContainer,children:O(vg,{oldValue:d,newValue:g,theme:"dark",showUnchanged:false})},u)})}),!o&&i&&O(h,{style:z.propsChangesContainer,children:e.changedKeys.filter(a=>!a.includes("(ref only)")).slice(0,5).map((a,u)=>O(h,{style:z.propChangeChip,children:O(p,{testID:`buoy-highlight-detail-changed-${u}`,style:z.propChangeText,children:a})},u))})]})}l(Es,"AnswerCard");function Fs({render:e,rendersPerSec:t}){let n=e.testID||e.nativeID||e.accessibilityLabel,r=e.measurements;return Q(h,{style:z.detailsSection,children:[n&&Q(h,{testID:"buoy-highlight-detail-identifiers",style:z.detailsCard,children:[O(p,{style:z.detailsCardTitle,children:"Identifiers"}),e.testID&&O(rr,{label:"testID",value:e.testID}),e.nativeID&&O(rr,{label:"nativeID",value:e.nativeID}),e.accessibilityLabel&&O(rr,{label:"a11y",value:e.accessibilityLabel})]}),Q(h,{testID:"buoy-highlight-detail-stats",style:z.statsRow,children:[Q(h,{testID:"buoy-highlight-detail-stat-renders",style:z.statItem,children:[O(p,{testID:"buoy-highlight-detail-stat-renders-value",style:[z.statValue,{color:e.color}],children:e.renderCount}),O(p,{style:z.statLabel,children:"renders"})]}),O(h,{style:z.statDivider}),Q(h,{testID:"buoy-highlight-detail-stat-rate",style:z.statItem,children:[O(p,{testID:"buoy-highlight-detail-stat-rate-value",style:z.statValue,children:t}),O(p,{style:z.statLabel,children:"/sec"})]}),O(h,{style:z.statDivider}),Q(h,{testID:"buoy-highlight-detail-stat-tag",style:z.statItem,children:[O(p,{testID:"buoy-highlight-detail-stat-tag-value",style:z.statValue,children:e.nativeTag}),O(p,{style:z.statLabel,children:"tag"})]})]}),r&&Q(h,{testID:"buoy-highlight-detail-measure",style:z.measurementsRow,children:[Q(h,{style:z.measurementItem,children:[O(p,{style:z.measurementLabel,children:"x"}),O(p,{testID:"buoy-highlight-detail-measure-x",style:z.measurementValue,children:Math.round(e.measurements.x)})]}),Q(h,{style:z.measurementItem,children:[O(p,{style:z.measurementLabel,children:"y"}),O(p,{testID:"buoy-highlight-detail-measure-y",style:z.measurementValue,children:Math.round(e.measurements.y)})]}),Q(h,{style:z.measurementItem,children:[O(p,{style:z.measurementLabel,children:"w"}),O(p,{testID:"buoy-highlight-detail-measure-w",style:z.measurementValue,children:Math.round(e.measurements.width)})]}),Q(h,{style:z.measurementItem,children:[O(p,{style:z.measurementLabel,children:"h"}),O(p,{testID:"buoy-highlight-detail-measure-h",style:z.measurementValue,children:Math.round(e.measurements.height)})]})]})]})}l(Fs,"DetailsSection");function rr({label:e,value:t}){let n=`buoy-highlight-detail-id-${e.toLowerCase()}`;return Q(h,{testID:n,style:z.detailRow,children:[O(p,{style:z.detailLabel,children:e}),O(p,{testID:`${n}-value`,style:z.detailValue,numberOfLines:1,children:t})]})}l(rr,"DetailRow");function Ms({render:e,onAddFilter:t}){let[n,r]=Ss(null),o=er(()=>{let c=[];return e.nativeID&&c.push({type:"nativeID",value:e.nativeID,label:"nativeID"}),e.testID&&c.push({type:"testID",value:e.testID,label:"testID"}),e.accessibilityLabel&&c.push({type:"accessibilityLabel",value:e.accessibilityLabel,label:"a11y"}),e.componentName&&c.push({type:"component",value:e.componentName,label:"component"}),c.push({type:"viewType",value:e.viewType,label:"viewType"}),c},[e]),i=n!==null?o[n]:null,s=an(c=>{r(d=>d===c?null:c)},[]),a=an(()=>{i&&(t({type:i.type,value:i.value},"include"),r(null))},[i,t]),u=an(()=>{i&&(t({type:i.type,value:i.value},"exclude"),r(null))},[i,t]);return Q(h,{testID:"buoy-highlight-quick",style:z.quickActionsSection,children:[O(p,{style:z.quickActionsTitle,children:"Quick Filters"}),O(h,{style:z.filterOptionsList,children:o.map((c,d)=>O($s,{testID:`buoy-highlight-quick-${c.type.toLowerCase()}`,label:c.label,value:c.value,isSelected:n===d,onSelect:()=>s(d)},c.type))}),Q(h,{style:z.filterActionButtons,children:[Q(Y,{testID:"buoy-highlight-quick-include",accessibilityRole:"button",accessibilityLabel:"Only show this",style:[z.filterActionButton,z.filterActionButtonInclude,!i&&z.filterActionButtonDisabled],onPress:a,disabled:!i,activeOpacity:.7,children:[O(pg,{size:14,color:i?$.color.accent:$.color.textTertiary}),O(p,{style:[z.filterActionButtonText,{color:i?$.color.accent:$.color.textTertiary}],children:"Only Show This"})]}),Q(Y,{testID:"buoy-highlight-quick-exclude",accessibilityRole:"button",accessibilityLabel:"Hide this",style:[z.filterActionButton,z.filterActionButtonExclude,!i&&z.filterActionButtonDisabled],onPress:u,disabled:!i,activeOpacity:.7,children:[O(mg,{size:14,color:i?$.color.danger:$.color.textTertiary}),O(p,{style:[z.filterActionButtonText,{color:i?$.color.danger:$.color.textTertiary}],children:"Hide This"})]})]})]})}l(Ms,"QuickActionsSection");function $s({testID:e,label:t,value:n,isSelected:r,onSelect:o}){return Q(Y,{testID:e,accessibilityRole:"button",accessibilityLabel:`${t}, ${n}`,style:[z.filterOptionCard,r&&z.filterOptionCardSelected],onPress:o,activeOpacity:.7,children:[O(p,{style:[z.filterOptionLabel,r&&z.filterOptionLabelSelected],children:t}),O(p,{testID:e?`${e}-value`:void 0,style:[z.filterOptionValue,r&&z.filterOptionValueSelected],numberOfLines:1,children:n})]})}l($s,"FilterOptionCard");var z=ve.create({container:{flex:1,backgroundColor:"transparent"},header:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:12,padding:16,paddingBottom:0},scrollView:{flex:1},scrollContent:{padding:16,paddingTop:12,paddingBottom:80,gap:12},headerLeft:{flex:1,flexDirection:"row",alignItems:"center",justifyContent:"center",gap:10},componentName:{fontSize:18,fontWeight:"700",color:$.color.text,flexShrink:1},nativeTypeBadge:{backgroundColor:$.color.bg,paddingVertical:3,paddingHorizontal:8,borderRadius:4},nativeTypeText:{fontSize:11,fontWeight:"600",color:$.color.textTertiary,fontFamily:Vt},answerCard:{backgroundColor:$.color.surface,borderRadius:8,borderWidth:1,borderColor:$.color.border,padding:12,gap:6},causeBadgeRow:{flexDirection:"row",alignItems:"center",gap:8},causeBadgeLarge:{paddingVertical:4,paddingHorizontal:10,borderRadius:4},causeBadgeLargeText:{fontSize:11,fontWeight:"700",letterSpacing:.5},causeLabel:{fontSize:12,color:$.color.textSecondary,fontWeight:"500"},hookChangesContainer:{gap:6},hookDiffContainer:{backgroundColor:$.color.bg,borderRadius:6,overflow:"hidden"},propsChangesContainer:{flexDirection:"row",flexWrap:"wrap",gap:4},propChangeChip:{backgroundColor:$.color.bg,paddingVertical:2,paddingHorizontal:6,borderRadius:4},propChangeText:{fontSize:11,color:$.color.text,fontFamily:Vt},detailsSection:{gap:10},detailsCard:{backgroundColor:$.color.surface,borderRadius:8,borderWidth:1,borderColor:$.color.border,padding:12,gap:6},detailsCardTitle:{fontSize:10,fontWeight:"600",color:$.color.textTertiary,letterSpacing:.5,textTransform:"uppercase",marginBottom:4},detailRow:{flexDirection:"row",alignItems:"center",gap:8},detailLabel:{fontSize:11,fontWeight:"600",color:$.color.textSecondary,minWidth:55},detailValue:{fontSize:12,color:$.color.text,fontFamily:Vt,flex:1},statsRow:{flexDirection:"row",alignItems:"center",justifyContent:"center",backgroundColor:$.color.surface,borderRadius:8,borderWidth:1,borderColor:$.color.border,paddingVertical:10,paddingHorizontal:16},statItem:{flex:1,alignItems:"center"},statValue:{fontSize:16,fontWeight:"700",color:$.color.text,fontFamily:Vt},statLabel:{fontSize:10,color:$.color.textTertiary,marginTop:2},statDivider:{width:1,height:24,backgroundColor:$.color.border,marginHorizontal:12},measurementsRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-around",backgroundColor:$.color.surface,borderRadius:8,borderWidth:1,borderColor:$.color.border,paddingVertical:8,paddingHorizontal:12},measurementItem:{flexDirection:"row",alignItems:"baseline",gap:4},measurementLabel:{fontSize:10,fontWeight:"600",color:$.color.textTertiary,textTransform:"uppercase"},measurementValue:{fontSize:12,fontWeight:"600",color:$.color.text,fontFamily:Vt},quickActionsSection:{backgroundColor:$.color.surface,borderRadius:8,borderWidth:1,borderColor:$.color.border,padding:12,gap:10},quickActionsTitle:{fontSize:10,fontWeight:"600",color:$.color.textTertiary,letterSpacing:.5,textTransform:"uppercase",marginBottom:2},filterOptionsList:{gap:6},filterOptionCard:{flexDirection:"row",alignItems:"center",backgroundColor:$.color.surfaceElevated,borderRadius:6,paddingVertical:10,paddingHorizontal:12,borderWidth:1,borderColor:"transparent",gap:10},filterOptionCardSelected:{borderColor:$.color.accentBorderStrong,backgroundColor:$.color.accentSoft},filterOptionLabel:{fontSize:10,fontWeight:"600",color:$.color.textTertiary,minWidth:70},filterOptionLabelSelected:{color:$.color.accent},filterOptionValue:{fontSize:12,color:$.color.text,fontFamily:Vt,flex:1},filterOptionValueSelected:{color:$.color.text},filterActionButtons:{flexDirection:"row",gap:8,marginTop:12},filterActionButton:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:4,paddingVertical:8,paddingHorizontal:10,borderRadius:6,borderWidth:1},filterActionButtonInclude:{backgroundColor:$.color.accentSoft,borderColor:$.color.accentBorderStrong},filterActionButtonExclude:{backgroundColor:$.color.dangerSoft,borderColor:$.color.danger+"40"},filterActionButtonDisabled:{backgroundColor:$.color.surfaceElevated,borderColor:$.color.border,opacity:.5},filterActionButtonText:{fontSize:11,fontWeight:"600"},lockedBanner:{flexDirection:"row",alignItems:"center",justifyContent:"center",backgroundColor:$.color.surface,borderRadius:8,borderWidth:1,borderColor:$.color.warning+"40",paddingVertical:12,paddingHorizontal:16,gap:8},lockedBannerText:{color:$.color.warning,fontSize:13,fontWeight:"600"},lockedBannerSubtext:{color:$.color.textTertiary,fontSize:12}});import{EventStepperFooter as wg}from"@buoy-gg/shared-ui/web";U();import{useState as dt,useCallback as gt}from"react";import{Eye as Os,Filter as ii,Plus as _s,X as or,Box as Ws,Settings as Sg,Hash as xg,SectionHeader as te,night as I,monoFont as Ht}from"@buoy-gg/shared-ui/web";U();import{Box as Ig,Hash as Us,Layers as Rg,Eye as Dg,Search as kg,FileCode as Pg,buoyColors as ai,night as js,monoFont as Gs}from"@buoy-gg/shared-ui/web";import{jsx as At,jsxs as li}from"react/jsx-runtime";var Ks={viewType:{label:"ViewType",shortLabel:"View",color:js.color.accent,icon:Ig},testID:{label:"testID",shortLabel:"test",color:ai.success,icon:Us},nativeID:{label:"nativeID",shortLabel:"native",color:"#f59e0b",icon:Us},component:{label:"Component",shortLabel:"Comp",color:"#a855f7",icon:Pg},accessibilityLabel:{label:"a11y",shortLabel:"a11y",color:"#ec4899",icon:Dg},nativeTag:{label:"tag",shortLabel:"tag",color:ai.textMuted,icon:Rg},any:{label:"Any",shortLabel:"Any",color:ai.warning,icon:kg}};function Et({type:e,value:t,compact:n=false,badgeOnly:r=false,valueOnly:o=false,shortLabel:i=false,showIcon:s=false,testID:a}){let u=Ks[e],c=u.icon,d=i?u.shortLabel:u.label;return o?At(p,{testID:a?`${a}-value`:void 0,style:[fe.valueOnly,n&&fe.valueOnlyCompact,{color:u.color}],numberOfLines:1,children:t}):r?li(h,{testID:a,style:[fe.badgeOnly,n&&fe.badgeOnlyCompact,{backgroundColor:u.color+"20",borderColor:u.color+"40"}],children:[s&&At(c,{size:n?10:12,color:u.color}),At(p,{style:[fe.badgeOnlyText,n&&fe.badgeOnlyTextCompact,{color:u.color}],children:d})]}):li(h,{testID:a,accessibilityLabel:`${u.label} ${t}`,style:[fe.container,n&&fe.containerCompact],children:[li(h,{style:[fe.badge,n&&fe.badgeCompact,{backgroundColor:u.color+"20"}],children:[s&&At(c,{size:n?8:10,color:u.color}),At(p,{style:[fe.badgeText,n&&fe.badgeTextCompact,{color:u.color}],children:d})]}),At(p,{testID:a?`${a}-value`:void 0,style:[fe.value,n&&fe.valueCompact],numberOfLines:1,children:t})]})}l(Et,"IdentifierBadge");var fe=ve.create({container:{flexDirection:"row",alignItems:"center",gap:6},containerCompact:{gap:4},badge:{flexDirection:"row",alignItems:"center",paddingVertical:3,paddingHorizontal:6,borderRadius:4,gap:4},badgeCompact:{paddingVertical:2,paddingHorizontal:5,gap:3},badgeText:{fontSize:10,fontWeight:"700"},badgeTextCompact:{fontSize:9},value:{fontSize:12,color:js.color.text,fontFamily:Gs,flex:1},valueCompact:{fontSize:11},badgeOnly:{flexDirection:"row",alignItems:"center",paddingVertical:4,paddingHorizontal:8,borderRadius:6,borderWidth:1,gap:5},badgeOnlyCompact:{paddingVertical:2,paddingHorizontal:6,borderRadius:4,gap:4},badgeOnlyText:{fontSize:11,fontWeight:"600"},badgeOnlyTextCompact:{fontSize:9,fontWeight:"700"},valueOnly:{fontSize:12,fontFamily:Gs},valueOnlyCompact:{fontSize:11},categoryBadge:{flexDirection:"row",alignItems:"center",paddingVertical:8,paddingLeft:10,paddingRight:6,borderRadius:8,gap:6},categoryBadgeText:{fontSize:11,fontWeight:"600"},categoryBadgeCount:{paddingHorizontal:6,paddingVertical:2,borderRadius:10,minWidth:20,alignItems:"center"},categoryBadgeCountText:{fontSize:10,fontWeight:"600"}});U();function ht(e){return String(e).toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"unknown"}l(ht,"identifierSlug");function si(e){return`buoy-highlight-row-${ht(e)}`}l(si,"renderRowTestID");function ci(e,t){return`buoy-highlight-detected-${ht(e)}-${ht(t)}`}l(ci,"detectedItemTestID");function ui(e,t,n){return`buoy-highlight-${e}-chip-${ht(t)}-${ht(n)}`}l(ui,"patternChipTestID");function pt(e){return`buoy-highlight-setting-${e}`}l(pt,"settingTestID");import{Fragment as di,jsx as w,jsxs as M}from"react/jsx-runtime";var sn=l(e=>Ks[e],"getFilterConfig"),Ng=["any","viewType","testID","nativeID","component","accessibilityLabel"];function gi({mode:e,onSelect:t,onCancel:n}){return M(h,{nativeID:"__rn_buoy__type-picker",testID:`buoy-highlight-${e}-types`,style:y.typePicker,children:[w(h,{style:y.typePickerRow,children:Ng.map(r=>{let o=sn(r),i=o.icon;return M(Y,{testID:`buoy-highlight-${e}-type-${r.toLowerCase()}`,accessibilityRole:"button",accessibilityLabel:o.label,style:[y.typeOption,{backgroundColor:o.color+"15",borderColor:o.color+"40"}],onPress:()=>t(r),children:[w(i,{size:14,color:o.color}),w(p,{style:[y.typeOptionText,{color:o.color}],children:o.label})]},r)})}),w(Y,{testID:`buoy-highlight-${e}-types-cancel`,accessibilityRole:"button",accessibilityLabel:"Cancel",onPress:n,style:y.typePickerCancel,children:w(or,{size:16,color:I.color.textTertiary})})]})}l(gi,"TypePicker");function hi({mode:e,type:t,onSubmit:n,onCancel:r}){let[o,i]=dt(""),s=sn(t),a=l(()=>{o.trim()&&n(o.trim())},"handleSubmit");return M(h,{nativeID:"__rn_buoy__pattern-input",testID:`buoy-highlight-${e}-input-row`,style:y.patternInputContainer,children:[w(Et,{type:t,value:"",badgeOnly:true,compact:true}),w(wn,{testID:`buoy-highlight-${e}-input`,value:o,onChangeText:i,onSubmitEditing:a,placeholder:"Enter pattern...",placeholderTextColor:I.color.placeholder,style:y.patternInput,autoFocus:true,returnKeyType:"done",autoCorrect:false,autoCapitalize:"none"}),o.trim()&&w(Y,{testID:`buoy-highlight-${e}-submit`,accessibilityRole:"button",accessibilityLabel:"Add pattern",onPress:a,style:[y.addPatternButton,{backgroundColor:s.color+"20"}],children:w(p,{style:[y.addPatternButtonText,{color:s.color}],children:"Add"})}),w(Y,{testID:`buoy-highlight-${e}-input-cancel`,accessibilityRole:"button",accessibilityLabel:"Cancel",onPress:r,style:y.cancelButton,children:w(or,{size:16,color:I.color.textTertiary})})]})}l(hi,"PatternInput");function pi({mode:e,pattern:t,onRemove:n}){let r=sn(t.type);return M(Y,{testID:ui(e,t.type,t.value),accessibilityRole:"button",accessibilityLabel:`${r.label} ${t.value}, tap to remove`,style:[y.patternChip,{borderColor:r.color+"40"}],onPress:n,activeOpacity:.7,children:[w(h,{style:[y.patternChipBadge,{backgroundColor:r.color+"20"}],children:w(p,{style:[y.patternChipBadgeText,{color:r.color}],children:r.shortLabel})}),w(p,{style:y.patternChipValue,numberOfLines:1,children:t.value}),w(or,{size:12,color:I.color.textTertiary,style:y.patternChipX})]})}l(pi,"PatternChip");var zg={label:"All",shortLabel:"All",color:I.color.textSecondary,icon:Ws};function mt({filterType:e,count:t,isSelected:n,onPress:r}){let o=e==="all"?zg:sn(e),i=`buoy-highlight-detected-cat-${String(e).toLowerCase()}`;return M(Y,{testID:i,accessibilityRole:"button",accessibilityLabel:`${o.label}, ${t}`,style:[y.categoryBadge,{backgroundColor:o.color+"15",borderColor:n?o.color:o.color+"40",borderWidth:n?2:1}],onPress:r,children:[w(o.icon,{size:12,color:o.color}),w(p,{style:[y.categoryBadgeText,{color:o.color}],children:o.label}),w(h,{style:[y.categoryBadgeCountBubble,{backgroundColor:o.color+"25"}],children:w(p,{testID:`${i}-count`,style:[y.categoryBadgeCount,{color:o.color}],children:t})})]})}l(mt,"DetectedCategoryBadge");var Lg=[{value:20,label:"20"},{value:50,label:"50"},{value:100,label:"100"},{value:150,label:"150"},{value:250,label:"250"},{value:500,label:"500"}],mi=[{value:"off",label:"Off",description:"No debug logging"},{value:"minimal",label:"Minimal",description:"Only hook value changes"},{value:"verbose",label:"Verbose",description:"Component + cause + changes"},{value:"all",label:"All",description:"Full fiber dump"}];function fi({filters:e,onFilterChange:t,settings:n,onSettingsChange:r,availableProps:o,activeTab:i}){let[s,a]=dt(false),[u,c]=dt(false),[d,g]=dt(null),[T,b]=dt(null),[v,f]=dt("all"),[S,C]=dt(null),N=l(x=>{switch(x){case"viewType":return o.viewTypes.map(L=>({value:L,type:"viewType"}));case"testID":return o.testIDs.map(L=>({value:L,type:"testID"}));case"nativeID":return o.nativeIDs.map(L=>({value:L,type:"nativeID"}));case"component":return o.componentNames.map(L=>({value:L,type:"component"}));case"accessibilityLabel":return o.accessibilityLabels.map(L=>({value:L,type:"accessibilityLabel"}));case"all":default:return[...o.viewTypes.map(L=>({value:L,type:"viewType"})),...o.testIDs.map(L=>({value:L,type:"testID"})),...o.nativeIDs.map(L=>({value:L,type:"nativeID"})),...o.componentNames.map(L=>({value:L,type:"component"})),...o.accessibilityLabels.map(L=>({value:L,type:"accessibilityLabel"}))]}},"getItemsForCategory")(v),m=o.viewTypes.length+o.testIDs.length+o.nativeIDs.length+o.componentNames.length+o.accessibilityLabels.length,k=gt((x,L)=>{let ue=[...e.includePatterns,{type:x,value:L}];t({includePatterns:ue}),g(null)},[e.includePatterns,t]),P=gt((x,L)=>{let ue=[...e.excludePatterns,{type:x,value:L}];t({excludePatterns:ue}),b(null)},[e.excludePatterns,t]),D=gt(x=>{let L=e.includePatterns.filter((ue,pe)=>pe!==x);t({includePatterns:L})},[e.includePatterns,t]),W=gt(x=>{let L=e.excludePatterns.filter((ue,pe)=>pe!==x);t({excludePatterns:L})},[e.excludePatterns,t]),Z=gt((x,L)=>{C({type:x,value:L})},[]),V=gt(()=>{S&&(k(S.type,S.value),C(null))},[S,k]),j=gt(()=>{S&&(P(S.type,S.value),C(null))},[S,P]);return w(h,{style:y.container,children:w(Me,{nativeID:"__rn_buoy__filter-view",testID:"buoy-highlight-filter-scroll",style:y.scrollView,contentContainerStyle:y.scrollContent,showsVerticalScrollIndicator:false,children:i==="filters"?M(di,{children:[M(h,{style:y.section,children:[M(te,{children:[w(te.Icon,{icon:Os,color:I.color.accent,size:12}),w(te.Title,{children:"INCLUDE ONLY"}),e.includePatterns.length>0&&w(te.Badge,{testID:"buoy-highlight-include-count",count:e.includePatterns.length,color:I.color.accent})]}),w(p,{style:y.sectionDescription,children:"Show only components matching these patterns. If any are set, components must match at least one."}),e.includePatterns.length>0&&w(h,{style:y.patternChips,children:e.includePatterns.map((x,L)=>w(pi,{mode:"include",pattern:x,onRemove:()=>D(L)},`${x.type}-${x.value}-${L}`))}),w(h,{style:y.addPatternRow,children:s?w(gi,{mode:"include",onSelect:x=>{a(false),g(x)},onCancel:()=>a(false)}):d?w(hi,{mode:"include",type:d,onSubmit:x=>k(d,x),onCancel:()=>g(null)}):M(Y,{testID:"buoy-highlight-include-add",accessibilityRole:"button",accessibilityLabel:"Add include pattern",style:[y.addButton,{borderColor:I.color.accentBorderStrong}],onPress:()=>a(true),children:[w(_s,{size:14,color:I.color.accent}),w(p,{style:[y.addButtonText,{color:I.color.accent}],children:"Add include pattern"})]})})]}),M(h,{style:y.section,children:[M(te,{children:[w(te.Icon,{icon:ii,color:I.color.accent,size:12}),w(te.Title,{children:"EXCLUDE"}),e.excludePatterns.length>0&&w(te.Badge,{testID:"buoy-highlight-exclude-count",count:e.excludePatterns.length,color:I.color.accent})]}),w(p,{style:y.sectionDescription,children:"Hide components matching these patterns from the list."}),e.excludePatterns.length>0&&w(h,{style:y.patternChips,children:e.excludePatterns.map((x,L)=>w(pi,{mode:"exclude",pattern:x,onRemove:()=>W(L)},`${x.type}-${x.value}-${L}`))}),w(h,{style:y.addPatternRow,children:u?w(gi,{mode:"exclude",onSelect:x=>{c(false),b(x)},onCancel:()=>c(false)}):T?w(hi,{mode:"exclude",type:T,onSubmit:x=>P(T,x),onCancel:()=>b(null)}):M(Y,{testID:"buoy-highlight-exclude-add",accessibilityRole:"button",accessibilityLabel:"Add exclude pattern",style:[y.addButton,{borderColor:I.color.accentBorderStrong}],onPress:()=>c(true),children:[w(_s,{size:14,color:I.color.accent}),w(p,{style:[y.addButtonText,{color:I.color.accent}],children:"Add exclude pattern"})]})})]}),M(h,{style:y.section,children:[M(te,{children:[w(te.Icon,{icon:xg,color:I.color.warning,size:12}),w(te.Title,{children:"RENDER COUNT RANGE"}),(e.minRenderCount!==void 0||e.maxRenderCount!==void 0)&&w(te.Badge,{count:1,color:I.color.warning})]}),w(p,{style:y.sectionDescription,children:"Show only components with render count in a specific range."}),M(h,{nativeID:"__rn_buoy__render-count-range",testID:"buoy-highlight-range",style:y.renderCountRangeContainer,children:[M(h,{style:y.renderCountInputRow,children:[M(h,{style:y.renderCountInputGroup,children:[w(p,{style:y.renderCountLabel,children:"Min"}),w(wn,{value:e.minRenderCount!==void 0?String(e.minRenderCount):"",onChangeText:x=>{let L=parseInt(x,10);x===""||x===void 0?t({minRenderCount:void 0}):!isNaN(L)&&L>=0&&t({minRenderCount:L})},testID:"buoy-highlight-range-min",placeholder:"0",placeholderTextColor:I.color.placeholder,style:y.renderCountInput,keyboardType:"number-pad",returnKeyType:"done"})]}),w(p,{style:y.renderCountSeparator,children:"to"}),M(h,{style:y.renderCountInputGroup,children:[w(p,{style:y.renderCountLabel,children:"Max"}),w(wn,{value:e.maxRenderCount!==void 0?String(e.maxRenderCount):"",onChangeText:x=>{let L=parseInt(x,10);x===""||x===void 0?t({maxRenderCount:void 0}):!isNaN(L)&&L>=0&&t({maxRenderCount:L})},testID:"buoy-highlight-range-max",placeholder:"\u221E",placeholderTextColor:I.color.placeholder,style:y.renderCountInput,keyboardType:"number-pad",returnKeyType:"done"})]})]}),(e.minRenderCount!==void 0||e.maxRenderCount!==void 0)&&M(Y,{testID:"buoy-highlight-range-clear",accessibilityRole:"button",accessibilityLabel:"Clear range",style:y.clearRangeButton,onPress:()=>t({minRenderCount:void 0,maxRenderCount:void 0}),children:[w(or,{size:12,color:I.color.warning}),w(p,{style:y.clearRangeButtonText,children:"Clear Range"})]})]})]}),M(h,{style:y.section,children:[M(te,{children:[w(te.Icon,{icon:Ws,color:I.color.textSecondary,size:12}),w(te.Title,{children:"DETECTED ITEMS"})]}),w(p,{style:y.sectionDescription,children:"Tap an item to quickly add it as an exclude pattern."}),M(Me,{horizontal:true,showsHorizontalScrollIndicator:false,style:y.categoryBadgeScroll,contentContainerStyle:y.categoryBadgeScrollContent,children:[m>0&&w(mt,{filterType:"all",count:m,isSelected:v==="all",onPress:()=>f("all")}),o.viewTypes.length>0&&w(mt,{filterType:"viewType",count:o.viewTypes.length,isSelected:v==="viewType",onPress:()=>f("viewType")}),o.testIDs.length>0&&w(mt,{filterType:"testID",count:o.testIDs.length,isSelected:v==="testID",onPress:()=>f("testID")}),o.nativeIDs.length>0&&w(mt,{filterType:"nativeID",count:o.nativeIDs.length,isSelected:v==="nativeID",onPress:()=>f("nativeID")}),o.componentNames.length>0&&w(mt,{filterType:"component",count:o.componentNames.length,isSelected:v==="component",onPress:()=>f("component")}),o.accessibilityLabels.length>0&&w(mt,{filterType:"accessibilityLabel",count:o.accessibilityLabels.length,isSelected:v==="accessibilityLabel",onPress:()=>f("accessibilityLabel")})]}),w(h,{nativeID:"__rn_buoy__detected-items",testID:"buoy-highlight-detected",style:y.detectedItemsContainer,children:N.length>0?w(Me,{testID:"buoy-highlight-detected-scroll",style:y.detectedItemsScroll,contentContainerStyle:y.detectedItems,nestedScrollEnabled:true,showsVerticalScrollIndicator:true,children:N.map(x=>{let L=sn(x.type);return w(Y,{testID:ci(x.type,x.value),accessibilityRole:"button",accessibilityLabel:`${L.label} ${x.value}`,style:[y.detectedItem,{borderColor:L.color+"40"}],onPress:()=>Z(x.type,x.value),children:v==="all"?w(Et,{type:x.type,value:x.value,compact:true,shortLabel:true}):w(p,{style:y.detectedItemText,numberOfLines:1,children:x.value})},`${x.type}-${x.value}`)})}):w(p,{testID:"buoy-highlight-detected-empty",style:y.emptyText,children:"No items detected yet. Start tracking to see components here."})})]}),w(_a,{visible:S!==null,transparent:true,animationType:"fade",onRequestClose:()=>C(null),children:w($a,{accessible:false,testID:"buoy-highlight-detected-popup-backdrop",style:y.modalOverlay,onPress:()=>C(null),children:w(h,{accessible:false,testID:"buoy-highlight-detected-popup",style:y.actionPopup,children:S&&M(di,{children:[w(h,{style:y.actionPopupHeader,children:w(Et,{type:S.type,value:S.value,compact:true,shortLabel:true})}),M(h,{style:y.actionPopupButtons,children:[M(Y,{testID:"buoy-highlight-detected-popup-include",accessibilityRole:"button",accessibilityLabel:"Include only",style:[y.actionPopupButton,y.actionPopupInclude],onPress:V,children:[w(Os,{size:16,color:I.color.accent}),w(p,{style:[y.actionPopupButtonText,{color:I.color.accent}],children:"Include Only"})]}),M(Y,{testID:"buoy-highlight-detected-popup-exclude",accessibilityRole:"button",accessibilityLabel:"Exclude",style:[y.actionPopupButton,y.actionPopupExclude],onPress:j,children:[w(ii,{size:16,color:I.color.accent}),w(p,{style:[y.actionPopupButtonText,{color:I.color.accent}],children:"Exclude"})]})]}),w(Y,{testID:"buoy-highlight-detected-popup-cancel",accessibilityRole:"button",accessibilityLabel:"Cancel",style:y.actionPopupCancel,onPress:()=>C(null),children:w(p,{style:y.actionPopupCancelText,children:"Cancel"})})]})})})}),M(h,{style:y.section,children:[M(te,{children:[w(te.Icon,{icon:ii,color:I.color.textTertiary,size:12}),w(te.Title,{children:"HOW FILTERS WORK"})]}),w(h,{style:y.howItWorks,children:M(p,{style:y.howItWorksText,children:[w(p,{style:y.howItWorksBold,children:"Any:"})," Matches against all fields",`
|
|
33
|
+
`,w(p,{style:y.howItWorksBold,children:"ViewType:"})," Native component class (RCTView, RCTText)",`
|
|
34
|
+
`,w(p,{style:y.howItWorksBold,children:"testID:"})," Component testID prop",`
|
|
35
|
+
`,w(p,{style:y.howItWorksBold,children:"Component:"})," React component name from fiber"]})})]})]}):w(di,{children:M(h,{style:y.section,children:[M(te,{children:[w(te.Icon,{icon:Sg,color:I.color.textTertiary,size:12}),w(te.Title,{children:"SETTINGS"})]}),M(h,{style:y.settingsSection,children:[M(h,{style:y.settingItem,children:[M(h,{style:y.settingHeader,children:[w(p,{style:y.settingLabel,children:"Show Render Count"}),w(Rt,{testID:pt("showRenderCount"),value:n.showRenderCount,onValueChange:x=>{r({showRenderCount:x}),!x&&n.trackRenderCauses&&r({trackRenderCauses:false})},trackColor:{false:I.color.surfaceElevated,true:I.color.accent+"80"},thumbColor:n.showRenderCount?I.color.accent:I.color.knob})]}),w(p,{style:y.settingDescription,children:"Display render count badge on highlights. Disabling improves performance by skipping count tracking."})]}),M(h,{style:[y.settingItem,y.settingItemSpaced],children:[M(h,{style:y.settingHeader,children:[w(p,{style:[y.settingLabel,!n.showRenderCount&&y.settingLabelDisabled],children:"Track Render Causes"}),w(Rt,{testID:pt("trackRenderCauses"),value:n.trackRenderCauses,onValueChange:x=>r({trackRenderCauses:x}),trackColor:{false:I.color.surfaceElevated,true:I.color.warning+"80"},thumbColor:n.trackRenderCauses?I.color.warning:I.color.knob,disabled:!n.showRenderCount})]}),M(p,{style:y.settingDescription,children:["Detect WHY components render (props, hooks, parent re-render).",!n.showRenderCount&&M(p,{style:y.settingWarning,children:[`
|
|
36
|
+
`,'Requires "Show Render Count" to be enabled.']})]})]}),M(h,{style:[y.settingItem,y.settingItemSpaced],children:[M(h,{style:y.settingHeader,children:[w(p,{style:[y.settingLabel,!n.trackRenderCauses&&y.settingLabelDisabled],children:"Enable Render History"}),w(Rt,{testID:pt("enableRenderHistory"),value:n.enableRenderHistory,onValueChange:x=>r({enableRenderHistory:x}),trackColor:{false:I.color.surfaceElevated,true:I.color.accent+"80"},thumbColor:n.enableRenderHistory?I.color.accent:I.color.knob,disabled:!n.trackRenderCauses})]}),M(p,{style:y.settingDescription,children:["Store render events for each component to view in the History tab.",!n.trackRenderCauses&&M(p,{style:y.settingWarning,children:[`
|
|
37
|
+
`,'Requires "Track Render Causes" to be enabled.']})]})]}),M(h,{style:[y.settingItem,y.settingItemSpaced],children:[M(h,{style:y.settingHeader,children:[w(p,{style:y.settingLabel,children:"Debug Log Level"}),w(h,{style:y.settingValue,children:w(p,{testID:"buoy-highlight-setting-debugLogLevel-value",style:[y.settingValueText,n.debugLogLevel!=="off"&&{color:I.color.warning}],children:mi.find(x=>x.value===n.debugLogLevel)?.label||"Off"})})]}),w(p,{style:y.settingDescription,children:"Control console logging verbosity for render cause detection."}),w(h,{style:y.batchSizePresets,children:mi.map(x=>w(Y,{style:[y.batchSizePreset,n.debugLogLevel===x.value&&y.batchSizePresetActive,x.value!=="off"&&n.debugLogLevel===x.value&&{backgroundColor:I.color.warningSoft,borderColor:I.color.warning}],onPress:()=>r({debugLogLevel:x.value}),testID:`buoy-highlight-preset-log-${x.value}`,accessibilityRole:"button",accessibilityLabel:`Debug log level ${x.label}`,children:w(p,{style:[y.batchSizePresetText,n.debugLogLevel===x.value&&y.batchSizePresetTextActive,x.value!=="off"&&n.debugLogLevel===x.value&&{color:I.color.warning}],children:x.label})},x.value))}),M(p,{style:y.settingDescriptionMuted,children:[mi.find(x=>x.value===n.debugLogLevel)?.description,n.debugLogLevel!=="off"&&" \u2022 Check Metro console for logs"]})]}),M(h,{style:[y.settingItem,y.settingItemSpaced],children:[M(h,{style:y.settingHeader,children:[w(p,{style:y.settingLabel,children:"Batch Size"}),w(h,{style:y.settingValue,children:w(p,{testID:"buoy-highlight-setting-batchSize-value",style:y.settingValueText,children:n.batchSize})})]}),w(p,{style:y.settingDescription,children:"Maximum components to highlight per render update. Higher values capture more re-renders but may impact performance on complex screens."}),w(h,{style:y.batchSizePresets,children:Lg.map(x=>w(Y,{style:[y.batchSizePreset,n.batchSize===x.value&&y.batchSizePresetActive],onPress:()=>r({batchSize:x.value}),testID:`buoy-highlight-preset-batch-${x.value}`,accessibilityRole:"button",accessibilityLabel:`Batch size ${x.label}`,children:w(p,{style:[y.batchSizePresetText,n.batchSize===x.value&&y.batchSizePresetTextActive],children:x.label})},x.value))})]}),M(h,{style:[y.settingItem,y.settingItemSpaced],children:[M(h,{style:y.settingHeader,children:[w(p,{style:y.settingLabel,children:"Show host views"}),w(Rt,{testID:pt("showHostViews"),value:!!n.showHostViews,onValueChange:x=>r({showHostViews:x}),trackColor:{false:I.color.surfaceElevated,true:I.color.accent+"80"},thumbColor:n.showHostViews?I.color.accent:I.color.knob})]}),w(p,{style:y.settingDescription,children:"Include anonymous View / RCTView / Text hosts. Off by default so the list is named composites (what actually re-rendered)."})]}),M(h,{style:[y.settingItem,y.settingItemSpaced],children:[M(h,{style:y.settingHeader,children:[w(p,{style:y.settingLabel,children:"Highlight Dev Tools"}),w(Rt,{testID:pt("excludeDevTools"),value:!n.excludeDevTools,onValueChange:x=>r({excludeDevTools:!x}),trackColor:{false:I.color.surfaceElevated,true:I.color.accent+"80"},thumbColor:n.excludeDevTools?I.color.knob:I.color.accent})]}),M(p,{style:y.settingDescription,children:["Show re-render highlights on Buoy dev tools (floating menu, modals, etc.). Useful for optimizing the dev tools themselves.",!n.excludeDevTools&&M(p,{style:y.settingWarning,children:[`
|
|
38
|
+
`,"The highlight overlay is always excluded to prevent infinite loops."]})]})]})]})]})})})})}l(fi,"HighlightFilterView");var y=ve.create({container:{flex:1,backgroundColor:"transparent"},scrollView:{flex:1},scrollContent:{paddingHorizontal:16,paddingTop:12,paddingBottom:32},section:{backgroundColor:I.color.surface,borderRadius:8,borderWidth:1,borderColor:I.color.border,marginBottom:12,overflow:"hidden"},sectionDescription:{fontSize:11,color:I.color.textSecondary,paddingHorizontal:16,paddingTop:8,lineHeight:16},patternChips:{flexDirection:"row",flexWrap:"wrap",gap:8,paddingHorizontal:16,paddingTop:12},patternChip:{flexDirection:"row",alignItems:"center",backgroundColor:I.color.surfaceElevated,borderRadius:6,borderWidth:1,paddingVertical:4,paddingLeft:4,paddingRight:6,maxWidth:"100%",gap:4},patternChipBadge:{paddingVertical:2,paddingHorizontal:5,borderRadius:4},patternChipBadgeText:{fontSize:9,fontWeight:"700"},patternChipValue:{fontSize:11,color:I.color.text,fontFamily:Ht,flexShrink:1},patternChipX:{marginLeft:2},addPatternRow:{paddingHorizontal:16,paddingTop:12,paddingBottom:16},addButton:{flexDirection:"row",alignItems:"center",justifyContent:"center",paddingVertical:10,paddingHorizontal:16,borderRadius:8,borderWidth:1,borderStyle:"dashed",gap:6},addButtonText:{fontSize:12,fontWeight:"500"},typePicker:{flexDirection:"row",alignItems:"center",gap:8},typePickerRow:{flex:1,flexDirection:"row",flexWrap:"wrap",gap:8},typeOption:{flexDirection:"row",alignItems:"center",paddingVertical:8,paddingHorizontal:12,borderRadius:6,borderWidth:1,backgroundColor:I.color.surfaceElevated,gap:6},typeOptionText:{fontSize:11,fontWeight:"600"},typePickerCancel:{padding:8},patternInputContainer:{flexDirection:"row",alignItems:"center",backgroundColor:I.color.surfaceElevated,borderRadius:8,borderWidth:1,borderColor:I.color.border,paddingLeft:4,paddingRight:8,paddingVertical:4,gap:4},patternInput:{flex:1,fontSize:12,color:I.color.text,paddingVertical:6,paddingHorizontal:4},addPatternButton:{paddingVertical:6,paddingHorizontal:10,borderRadius:4},addPatternButtonText:{fontSize:11,fontWeight:"600"},cancelButton:{padding:4},categoryBadgeScroll:{marginTop:12},categoryBadgeScrollContent:{paddingHorizontal:16,gap:8},categoryBadge:{flexDirection:"row",alignItems:"center",paddingVertical:8,paddingLeft:10,paddingRight:6,borderRadius:8,borderWidth:1,gap:6},categoryBadgeText:{fontSize:11,fontWeight:"600"},categoryBadgeCountBubble:{paddingHorizontal:6,paddingVertical:2,borderRadius:10,minWidth:20,alignItems:"center"},categoryBadgeCount:{fontSize:10,fontWeight:"600"},detectedItemsContainer:{paddingHorizontal:16,paddingTop:12,paddingBottom:16},detectedItemsScroll:{maxHeight:200},detectedItems:{flexDirection:"row",flexWrap:"wrap",gap:8},detectedItem:{flexDirection:"row",alignItems:"center",backgroundColor:I.color.surfaceElevated,borderRadius:6,borderWidth:1,paddingVertical:6,paddingHorizontal:10,gap:6},detectedItemText:{fontSize:11,color:I.color.text,fontFamily:Ht},emptyText:{fontSize:11,color:I.color.textTertiary,fontStyle:"italic",textAlign:"center",paddingVertical:16,paddingHorizontal:16},howItWorks:{paddingHorizontal:16,paddingVertical:12},howItWorksText:{fontSize:11,color:I.color.textTertiary,lineHeight:18,fontFamily:Ht},howItWorksBold:{fontWeight:"700",color:I.color.textSecondary},modalOverlay:{flex:1,backgroundColor:"rgba(0, 0, 0, 0.5)",justifyContent:"center",alignItems:"center",padding:32},actionPopup:{backgroundColor:I.color.surface,borderRadius:12,borderWidth:1,borderColor:I.color.border,width:"100%",maxWidth:300,overflow:"hidden"},actionPopupHeader:{padding:16,borderBottomWidth:1,borderBottomColor:I.color.separator,alignItems:"center"},actionPopupButtons:{flexDirection:"row",padding:12,gap:8},actionPopupButton:{flex:1,flexDirection:"row",alignItems:"center",justifyContent:"center",paddingVertical:12,paddingHorizontal:12,borderRadius:8,gap:8},actionPopupInclude:{backgroundColor:I.color.accentSoft},actionPopupExclude:{backgroundColor:I.color.accentSoft},actionPopupButtonText:{fontSize:13,fontWeight:"600"},actionPopupCancel:{padding:12,borderTopWidth:1,borderTopColor:I.color.separator,alignItems:"center"},actionPopupCancelText:{fontSize:13,color:I.color.textTertiary,fontWeight:"500"},settingsSection:{paddingHorizontal:16,paddingTop:8,paddingBottom:16},settingItem:{gap:8},settingItemSpaced:{marginTop:16,paddingTop:16,borderTopWidth:1,borderTopColor:I.color.separator},settingHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},settingLabel:{fontSize:13,fontWeight:"600",color:I.color.text},settingValue:{backgroundColor:I.color.fillSecondary,paddingHorizontal:10,paddingVertical:4,borderRadius:6},settingValueText:{fontSize:12,fontWeight:"700",color:I.color.textTertiary,fontFamily:Ht},settingDescription:{fontSize:11,color:I.color.textSecondary,lineHeight:16},settingDescriptionMuted:{fontSize:10,color:I.color.textTertiary,lineHeight:14,marginTop:4,fontStyle:"italic"},settingLabelDisabled:{color:I.color.textTertiary},settingWarning:{color:I.color.warning,fontWeight:"500"},batchSizePresets:{flexDirection:"row",flexWrap:"wrap",gap:8,marginTop:4},batchSizePreset:{paddingVertical:8,paddingHorizontal:14,borderRadius:6,backgroundColor:I.color.surfaceElevated,borderWidth:1,borderColor:I.color.border},batchSizePresetActive:{backgroundColor:I.color.fillSecondary,borderColor:I.color.fillTertiary},batchSizePresetText:{fontSize:12,fontWeight:"500",color:I.color.textSecondary,fontFamily:Ht},batchSizePresetTextActive:{color:I.color.textTertiary,fontWeight:"700"},renderCountRangeContainer:{paddingHorizontal:16,paddingTop:12,paddingBottom:16,gap:12},renderCountInputRow:{flexDirection:"row",alignItems:"center",gap:12},renderCountInputGroup:{flex:1,gap:4},renderCountLabel:{fontSize:10,fontWeight:"600",color:I.color.textTertiary,textTransform:"uppercase",letterSpacing:.5},renderCountInput:{backgroundColor:I.color.surfaceElevated,borderRadius:8,borderWidth:1,borderColor:I.color.border,paddingVertical:10,paddingHorizontal:12,fontSize:14,fontWeight:"600",color:I.color.text,fontFamily:Ht,textAlign:"center"},renderCountSeparator:{fontSize:12,color:I.color.textTertiary,marginTop:18},clearRangeButton:{flexDirection:"row",alignItems:"center",justifyContent:"center",paddingVertical:8,paddingHorizontal:12,borderRadius:6,backgroundColor:I.color.warningSoft,borderWidth:1,borderColor:I.color.warning+"40",gap:6,alignSelf:"center"},clearRangeButtonText:{fontSize:11,fontWeight:"600",color:I.color.warning}});U();import{useState as Bg,useEffect as qs,useRef as Vg,useCallback as yi,memo as Hg,useMemo as Js}from"react";Ve();U();import Ag,{useMemo as Ys}from"react";import{ChevronRight as Eg,night as ft,useRelativeTime as Fg,monoFont as Xs}from"@buoy-gg/shared-ui/web";import{jsx as Ne,jsxs as Ft}from"react/jsx-runtime";function Qs({render:e,onPress:t}){let n=Ys(()=>e.testID?{type:"testID",value:e.testID}:e.nativeID?{type:"nativeID",value:e.nativeID}:e.componentName?{type:"component",value:e.componentName}:e.accessibilityLabel?{type:"accessibilityLabel",value:e.accessibilityLabel}:{type:"nativeTag",value:String(e.nativeTag)},[e.testID,e.nativeID,e.componentName,e.accessibilityLabel,e.nativeTag]),r=Ys(()=>e.accessibilityLabel&&n.type!=="accessibilityLabel"?{type:"accessibilityLabel",value:e.accessibilityLabel}:null,[e.accessibilityLabel,n.type]),o=Fg(e.lastRenderTime),i=si(n.value);return Ft(Y,{testID:i,accessibilityRole:"button",accessibilityLabel:`${e.displayName}, ${n.type} ${n.value}, ${e.renderCount} renders`,style:xe.container,onPress:()=>t(e),activeOpacity:.7,children:[Ne(h,{style:[xe.colorIndicator,{backgroundColor:e.color}]}),Ft(h,{style:xe.content,children:[Ft(h,{style:xe.topRow,children:[Ft(h,{style:xe.viewTypeContainer,children:[Ne(p,{testID:`${i}-name`,style:xe.viewType,numberOfLines:1,children:e.displayName}),r?Ne(Et,{type:r.type,value:r.value,compact:true,shortLabel:true}):e.displayName!==e.viewType?Ne(p,{testID:`${i}-type`,style:xe.nativeType,numberOfLines:1,children:e.viewType}):null]}),Ne(h,{style:[xe.renderCountBadge,{backgroundColor:e.color+"30"}],children:Ft(p,{testID:`${i}-count`,style:[xe.renderCount,{color:e.color}],children:[e.renderCount,"x"]})})]}),e.lastRenderCause&&Ne(h,{style:xe.causeRow,children:Ne(qo,{testID:`${i}-cause`,cause:e.lastRenderCause,compact:true,showKeys:true,showTwoLevel:true})}),Ft(h,{style:xe.bottomRow,children:[Ne(h,{style:xe.identifierContainer,children:Ne(Et,{testID:`${i}-identifier`,type:n.type,value:n.value,compact:true,shortLabel:true})}),Ne(p,{testID:`${i}-time`,style:xe.timing,children:o})]})]}),Ne(Eg,{size:16,color:ft.color.textTertiary})]})}l(Qs,"RenderListItemInner");var Zs=Ag.memo(Qs,(e,t)=>{let n=e.render,r=t.render;return n.id===r.id&&n.renderCount===r.renderCount&&n.color===r.color&&n.lastRenderTime===r.lastRenderTime&&n.lastRenderCause?.type===r.lastRenderCause?.type&&n.lastRenderCause?.componentCause===r.lastRenderCause?.componentCause&&e.onPress===t.onPress}),xe=ve.create({container:{flexDirection:"row",alignItems:"center",paddingVertical:10,paddingHorizontal:12,marginHorizontal:12,marginBottom:6,backgroundColor:ft.color.surface,borderRadius:8,borderWidth:1,borderColor:ft.color.border},colorIndicator:{width:4,height:36,borderRadius:2,marginRight:10},content:{flex:1,marginRight:8},topRow:{flexDirection:"row",alignItems:"center",marginBottom:4},causeRow:{marginBottom:4},viewTypeContainer:{flex:1,marginRight:8},viewType:{fontSize:13,fontWeight:"600",color:ft.color.text},nativeType:{fontSize:10,color:ft.color.textTertiary,fontFamily:Xs,marginTop:1},accessibilityLabel:{fontSize:10,color:ft.color.accent,fontStyle:"italic",marginTop:1},renderCountBadge:{paddingHorizontal:8,paddingVertical:2,borderRadius:10},renderCount:{fontSize:11,fontWeight:"700",fontFamily:Xs},bottomRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:8},identifierContainer:{flex:1,flexShrink:1,overflow:"hidden"},timing:{fontSize:10,color:ft.color.textTertiary,fontWeight:"500",flexShrink:0}});import{Lock as Mg,night as bi,useLimit as $g,ToolEmptyState as Og,resolveListEmptyState as _g}from"@buoy-gg/shared-ui/web";import{jsx as cn,jsxs as ec}from"react/jsx-runtime";function tc({searchText:e,filters:t,onSelectRender:n,onStatsChange:r,onRendersChange:o,isTracking:i,isPro:s=false}){let[a,u]=Bg(()=>B.getFilteredRenders(e)),c=Vg(null);qs(()=>B.subscribe(()=>{let C=B.getFilteredRenders(e);u(C),r(B.getStats()),o?.(C)}),[e,r,o]),qs(()=>{let C=B.getFilteredRenders(e);u(C),o?.(C)},[e,t,o]);let d=$g("highlightUpdates.components"),g=s?1/0:d,T=Js(()=>a.slice(0,g),[a,g]),b=Js(()=>Math.max(0,a.length-g),[a.length,g]),v=yi(C=>C.id,[]),f=yi(({item:C,index:N})=>cn(Zs,{render:C,onPress:()=>n(C,N,T)}),[n,T]),S=yi(()=>b<=0?null:ec(h,{testID:"buoy-highlight-locked",style:ir.lockedBanner,children:[cn(Mg,{size:14,color:bi.color.warning}),ec(p,{testID:"buoy-highlight-locked-text",style:ir.lockedBannerText,children:[b," more ",b===1?"component":"components"," locked"]}),cn(p,{style:ir.lockedBannerSubtext,children:"Upgrade to Pro"})]}),[b]);if(a.length===0){let C=e.trim(),N=B.getStats().totalComponents,m=C?B.getFilteredRenders("").length:0,k=_g({subject:"components",verb:"tracked",search:e,total:C?m:N,capturing:i,blocked:C&&m===0&&N>0?"The active filters hide everything tracked, so there is nothing to search.":void 0,waiting:{otto:"stare",title:"No renders tracked",message:"Component renders will appear here"},paused:{title:"No renders tracked",message:"Enable tracking to start capturing"}});return cn(Og,{...k,testID:"buoy-highlight-empty"})}return cn(Aa,{testID:"buoy-highlight-list",ref:c,data:T,renderItem:f,keyExtractor:v,contentContainerStyle:ir.listContent,showsVerticalScrollIndicator:true,initialNumToRender:10,maxToRenderPerBatch:10,windowSize:10,scrollEnabled:false,ListFooterComponent:S})}l(tc,"IsolatedRenderListInner");var Wg=Hg(tc),ir=ve.create({listContent:{paddingTop:8},lockedBanner:{flexDirection:"row",alignItems:"center",justifyContent:"center",paddingVertical:12,paddingHorizontal:16,marginTop:8,gap:8},lockedBannerText:{color:bi.color.warning,fontSize:13,fontWeight:"500"},lockedBannerSubtext:{color:bi.color.textTertiary,fontSize:12}});U();import{memo as Mt}from"react";import{Trash2 as Ug,Search as jg,Filter as Gg,Pause as Kg,Copy as qg,ModalHeader as ge,TabSelector as nc,night as he,PowerToggleButton as Jg}from"@buoy-gg/shared-ui/web";U();import{useState as Yg,useEffect as Xg,memo as Qg}from"react";Ve();import{Activity as Zg,night as ar,monoFont as eh}from"@buoy-gg/shared-ui/web";import{jsx as rc,jsxs as th}from"react/jsx-runtime";function oc(){let[e,t]=Yg({totalComponents:0,totalRenders:0});return Xg(()=>B.subscribe(()=>{t(B.getStats())}),[]),th(h,{nativeID:"__rn_buoy__stats-row",testID:"buoy-highlight-stats",accessibilityLabel:`${e.totalComponents} components tracked`,style:ic.headerChip,children:[rc(Zg,{size:12,color:ar.color.accent}),rc(p,{testID:"buoy-highlight-stats-value",style:[ic.headerChipValue,{color:ar.color.accent}],children:e.totalComponents})]})}l(oc,"StatsDisplayInner");var nh=Qg(oc),ic=ve.create({headerChip:{flexDirection:"row",alignItems:"center",gap:4,backgroundColor:ar.color.buttonSurface,paddingHorizontal:8,paddingVertical:5,borderRadius:12,borderWidth:1,borderColor:ar.color.border},headerChipValue:{fontSize:12,fontWeight:"600",fontFamily:eh}});import{jsx as X,jsxs as un}from"react/jsx-runtime";var rh=Mt(l(function({isActive:e,searchText:t,onSearchChange:n,onSearchClose:r}){return e?X(ge.Search,{value:t,onChangeText:n,onCancel:()=>{n(""),r()},onDismiss:r,dismissOnBlur:true,clearOnlyWhenText:true,placeholder:"Search testID, nativeID, component...",accessibilityLabel:"Search renders",iconSize:14,testID:"buoy-highlight-search-field",containerTestID:"buoy-highlight-search-container",containerNativeID:"__rn_buoy__search-container",clearTestID:"buoy-highlight-search-clear"}):null},"SearchSection")),oh=rh,ih=Mt(l(function({onSearchToggle:e,onFilterToggle:t,onToggleTracking:n,onToggleFreeze:r,onClear:o,onOpenCopySettings:i,isTracking:s,isFrozen:a,activeFilterCount:u,hasRenders:c}){return un(ge.Actions,{children:[X(Y,{testID:"buoy-highlight-search",accessibilityRole:"button",accessibilityLabel:"Search renders",onPress:e,style:Be.headerActionButton,children:X(jg,{size:14,color:he.color.textSecondary})}),X(Y,{testID:"buoy-highlight-filters",accessibilityRole:"button",accessibilityLabel:u>0?`Filters, ${u} active`:"Filters",onPress:t,style:[Be.headerActionButton,u>0&&Be.activeFilterButton],children:X(Gg,{size:14,color:u>0?he.color.accent:he.color.textTertiary})}),X(Y,{testID:"buoy-highlight-copy",accessibilityRole:"button",onPress:i,style:[Be.headerActionButton,!c&&Be.headerActionButtonDisabled],disabled:!c,accessibilityLabel:"Open copy settings",children:X(qg,{size:14,color:c?he.color.textSecondary:he.color.textTertiary})}),X(Y,{testID:"buoy-highlight-freeze",accessibilityRole:"button",accessibilityLabel:a?"Unfreeze frame":"Freeze frame",onPress:r,style:[Be.headerActionButton,a&&Be.freezeButton,!s&&Be.headerActionButtonDisabled],disabled:!s,children:X(Kg,{size:14,color:s?a?he.color.accent:he.color.textTertiary:he.color.textTertiary})}),X(Jg,{testID:"buoy-highlight-power",isEnabled:s,onToggle:n,accessibilityLabel:"Toggle render tracking"}),X(Y,{testID:"buoy-highlight-clear",accessibilityRole:"button",accessibilityLabel:"Clear tracked renders",onPress:o,style:[Be.headerActionButton,!c&&Be.headerActionButtonDisabled],disabled:!c,children:X(Ug,{size:14,color:c?he.color.textTertiary:he.color.textTertiary})})]})},"HeaderActions")),ah=ih,lh=Mt(l(function({onBack:e,isSearchActive:t,searchText:n,onSearchChange:r,onSearchToggle:o,onSearchClose:i,onFilterToggle:s,onToggleTracking:a,onToggleFreeze:u,onClear:c,onOpenCopySettings:d,isTracking:g,isFrozen:T,activeFilterCount:b,hasRenders:v,searchInputRef:f}){return un(ge,{children:[e&&X(ge.Navigation,{onBack:e}),X(ge.Content,{title:"",children:t?X(oh,{isActive:t,searchText:n,onSearchChange:r,onSearchClose:i,searchInputRef:f}):X(nh,{})}),X(ah,{onSearchToggle:o,onFilterToggle:s,onToggleTracking:a,onToggleFreeze:u,onClear:c,onOpenCopySettings:d,isTracking:g,isFrozen:T,activeFilterCount:b,hasRenders:v})]})},"MainListHeader")),sh=Mt(l(function({onBack:e,activeTab:t,onTabChange:n,activeFilterCount:r=0}){let o=[{key:"filters",label:`Filters${r>0?` (${r})`:""}`},{key:"settings",label:"Settings"}];return un(ge,{children:[X(ge.Navigation,{onBack:e}),X(ge.Content,{title:"",noMargin:true,children:X(nc,{tabs:o,activeTab:t,onTabChange:i=>n(i),testIDPrefix:"buoy-highlight-filter-tab"})}),X(ge.Actions,{})]})},"FilterViewHeader")),ch=Mt(l(function({onBack:e,activeTab:t,onTabChange:n,hasHistory:r=true}){let o=[{key:"details",label:"Details"},{key:"history",label:"History",disabled:!r}];return un(ge,{children:[X(ge.Navigation,{onBack:e}),X(ge.Content,{title:"",noMargin:true,children:X(nc,{tabs:o,activeTab:t,onTabChange:i=>n(i),testIDPrefix:"buoy-highlight-detail-tab"})}),X(ge.Actions,{})]})},"DetailViewHeader")),uh=Mt(l(function({onBack:e}){return un(ge,{children:[X(ge.Navigation,{onBack:e}),X(ge.Content,{title:"Copy Settings",testID:"buoy-highlight-copy-title"})]})},"CopySettingsViewHeader")),Be=ve.create({headerActionButton:{width:32,height:32,borderRadius:8,backgroundColor:he.color.buttonSurface,borderWidth:1,borderColor:he.color.border,alignItems:"center",justifyContent:"center"},headerActionButtonDisabled:{opacity:.55},activeFilterButton:{backgroundColor:he.color.accentSoft,borderColor:he.color.accentBorderStrong},freezeButton:{backgroundColor:he.color.accentSoft,borderColor:he.color.accentBorderStrong}});U();import{useState as vi,useCallback as lr,useMemo as dn}from"react";Ve();import{Clock as dh,GitBranch as gh,Database as ac,Lock as hh,formatRelativeTime as lc,SectionHeader as $t,EventStepperFooter as sc,buoyColors as cc,night as A,useLimit as uc,ToolEmptyState as ph,monoFont as Ke}from"@buoy-gg/shared-ui/web";import{TreeDiffViewer as dc}from"@buoy-gg/shared-ui/web/dataViewer";import{Fragment as mh,jsx as F,jsxs as q}from"react/jsx-runtime";function sr(e){let t=new Date(e),n=t.getHours().toString().padStart(2,"0"),r=t.getMinutes().toString().padStart(2,"0"),o=t.getSeconds().toString().padStart(2,"0"),i=t.getMilliseconds().toString().padStart(3,"0");return`${n}:${r}:${o}.${i}`}l(sr,"formatTimeWithMs");function Ci({render:e,disableInternalFooter:t=false,selectedEventIndex:n,onEventIndexChange:r,isPro:o=false}){let[i,s]=vi(0),a=n??i,u=r??s,[c,d]=vi("current"),g=dn(()=>!e.renderHistory||e.renderHistory.length===0?[]:[...e.renderHistory].sort((P,D)=>P.timestamp-D.timestamp),[e.renderHistory]),T=uc("highlightUpdates.historyEvents"),b=o?1/0:T,v=dn(()=>g.slice(-b),[g,b]),f=dn(()=>Math.max(0,g.length-b),[g.length,b]),S=v.length,C=v[a],N=a>0?v[a-1]:null,m=lr(()=>{a>0&&u(a-1)},[a,u]),k=lr(()=>{a<S-1&&u(a+1)},[a,S,u]);if(S===0){let P=B.getSettings().enableRenderHistory;return F(ph,{testID:"buoy-highlight-history-empty",otto:P?"stare":"paused",title:"No Render History",message:P?"History is on and armed \u2014 this component has not re-rendered since. Interact with the app to record one.":"Enable render history tracking in settings to see render events here."})}return q(mh,{children:[q(h,{style:[R.container,{paddingBottom:!t&&S>1?80:0}],children:[f>0&&q(h,{testID:"buoy-highlight-history-locked",style:R.lockedBanner,children:[F(hh,{size:14,color:A.color.warning}),q(p,{testID:"buoy-highlight-history-locked-text",style:R.lockedBannerText,children:[f," older ",f===1?"render":"renders"," locked"]}),F(p,{style:R.lockedBannerSubtext,children:"Upgrade to Pro"})]}),q(h,{style:R.viewToggleContainer,children:[q(Y,{testID:"buoy-highlight-history-mode-current",accessibilityRole:"button",accessibilityLabel:"Current state",style:[R.viewToggleCard,c==="current"&&R.viewToggleCardActive],onPress:()=>d("current"),activeOpacity:.8,children:[q(h,{style:R.viewToggleContent,children:[F(ac,{size:16,color:c==="current"?A.color.accent:A.color.textSecondary}),F(p,{style:[R.viewToggleLabel,c==="current"&&R.viewToggleLabelActive],children:"CURRENT STATE"})]}),q(p,{style:[R.viewToggleDescription,c==="current"&&{color:A.color.text}],children:["View render #",C?.renderNumber??0," details"]})]}),q(h,{testID:"buoy-highlight-history-mode-diff",accessibilityLabel:"Diff view, coming soon",style:[R.viewToggleCard,R.viewToggleCardDisabled],children:[q(h,{style:R.viewToggleContent,children:[F(gh,{size:16,color:A.color.textTertiary}),F(p,{style:[R.viewToggleLabel,R.viewToggleLabelDisabled],children:"DIFF VIEW"}),F(h,{style:R.todoBadge,children:F(p,{style:R.todoBadgeText,children:"TODO"})})]}),F(p,{style:[R.viewToggleDescription,{color:A.color.textTertiary}],children:"Compare renders side by side (coming soon)"})]})]}),F(Me,{testID:"buoy-highlight-history-scroll",style:R.contentScroll,contentContainerStyle:R.contentContainer,showsVerticalScrollIndicator:false,children:c==="current"?F(gc,{event:C,render:e}):F(hc,{previousEvent:N,currentEvent:C,render:e})})]}),!t&&F(sc,{currentIndex:a,totalItems:S,onPrevious:m,onNext:k,itemLabel:"Render",subtitle:lc(new Date(C?.timestamp??Date.now()))})]})}l(Ci,"RenderHistoryViewer");function gc({event:e,render:t}){if(!e)return F(h,{testID:"buoy-highlight-history-no-event",style:R.noEventContainer,children:F(p,{style:R.noEventText,children:"No event selected"})});let n=Ge[e.cause.type];return q(h,{style:R.currentStateContainer,children:[q(h,{style:R.eventHeader,children:[q(h,{style:R.eventHeaderLeft,children:[q(p,{testID:"buoy-highlight-history-event-title",style:R.eventTitle,children:["Render #",e.renderNumber]}),F(p,{testID:"buoy-highlight-history-event-time",style:R.eventTime,children:sr(e.timestamp)})]}),q(h,{style:[R.eventBadge,{backgroundColor:t.color+"30"}],children:[F(h,{style:[R.eventBadgeDot,{backgroundColor:t.color}]}),F(p,{testID:"buoy-highlight-history-event-cause",style:[R.eventBadgeText,{color:t.color}],children:e.cause.type.toUpperCase()})]})]}),q(h,{style:R.section,children:[q($t,{children:[F($t.Icon,{icon:dh,color:n.color,size:12}),F($t.Title,{children:"WHY DID THIS RENDER?"})]}),F(h,{style:R.sectionContent,children:F(Jo,{cause:e.cause,nativeType:t.viewType})})]}),e.capturedProps&&Object.keys(e.capturedProps).length>0&&q(h,{style:R.section,children:[q($t,{children:[F($t.Icon,{icon:ac,color:A.color.accent,size:12}),F($t.Title,{children:"CAPTURED PROPS"})]}),F(h,{style:R.sectionContent,children:F(Me,{horizontal:true,showsHorizontalScrollIndicator:false,style:R.propsScrollView,children:F(p,{testID:"buoy-highlight-history-props",style:R.propsJson,children:JSON.stringify(e.capturedProps,null,2)})})})]})]})}l(gc,"CurrentStateView");function hc({previousEvent:e,currentEvent:t,render:n}){let[r,o]=vi("props");if(!e||!t)return F(h,{style:R.noEventContainer,children:F(p,{style:R.noEventText,children:"Select an event with a previous event to compare"})});let i=Ge[e.cause.type],s=Ge[t.cause.type],a=e.capturedProps&&t.capturedProps,u=e.capturedState&&t.capturedState;return q(h,{style:R.diffContainer,children:[q(h,{style:R.compareBar,children:[q(h,{style:R.compareSide,children:[q(h,{style:R.compareLabelRow,children:[F(p,{style:[R.compareLabel,{color:cc.warning}],children:"PREV"}),F(h,{style:[R.compareActionBadge,{backgroundColor:`${i.color}20`}],children:F(p,{style:[R.compareActionText,{color:i.color}],children:e.cause.type.toUpperCase()})})]}),q(h,{style:R.compareMeta,children:[q(p,{style:R.compareIndex,children:["#",e.renderNumber]}),F(p,{style:R.compareTime,children:sr(e.timestamp)})]})]}),F(h,{style:R.compareDivider,children:F(p,{style:R.compareArrow,children:"\u2192"})}),q(h,{style:R.compareSide,children:[q(h,{style:R.compareLabelRow,children:[F(p,{style:[R.compareLabel,{color:cc.success}],children:"CUR"}),F(h,{style:[R.compareActionBadge,{backgroundColor:`${s.color}20`}],children:F(p,{style:[R.compareActionText,{color:s.color}],children:t.cause.type.toUpperCase()})})]}),q(h,{style:R.compareMeta,children:[q(p,{style:R.compareIndex,children:["#",t.renderNumber]}),F(p,{style:R.compareTime,children:sr(t.timestamp)})]})]})]}),q(h,{style:R.diffModeTabs,children:[F(Y,{style:[R.diffModeTab,r==="cause"&&R.diffModeTabActive],onPress:()=>o("cause"),activeOpacity:.7,children:F(p,{style:[R.diffModeTabText,r==="cause"&&R.diffModeTabTextActive],children:"CAUSE"})}),F(Y,{style:[R.diffModeTab,r==="props"&&R.diffModeTabActive,!a&&R.diffModeTabDisabled],onPress:()=>a&&o("props"),activeOpacity:a?.7:1,children:F(p,{style:[R.diffModeTabText,r==="props"&&R.diffModeTabTextActive,!a&&R.diffModeTabTextDisabled],children:"PROPS"})}),F(Y,{style:[R.diffModeTab,r==="state"&&R.diffModeTabActive,!u&&R.diffModeTabDisabled],onPress:()=>u&&o("state"),activeOpacity:u?.7:1,children:F(p,{style:[R.diffModeTabText,r==="state"&&R.diffModeTabTextActive,!u&&R.diffModeTabTextDisabled],children:"STATE"})})]}),r==="cause"&&F(h,{style:R.diffSummary,children:F(Jo,{cause:t.cause,nativeType:n.viewType})}),r==="props"&&F(h,{style:R.treeDiffContainer,children:a?F(dc,{oldValue:e.capturedProps,newValue:t.capturedProps,theme:"dark",showUnchanged:true}):q(h,{style:R.noDiffData,children:[F(p,{style:R.noDiffDataTitle,children:"Props Not Captured"}),F(p,{style:R.noDiffDataText,children:'Enable "Capture Props on Render" in settings to see props diff.'})]})}),r==="state"&&F(h,{style:R.treeDiffContainer,children:u?F(dc,{oldValue:e.capturedState,newValue:t.capturedState,theme:"dark",showUnchanged:true}):q(h,{style:R.noDiffData,children:[F(p,{style:R.noDiffDataTitle,children:"State Not Captured"}),F(p,{style:R.noDiffDataText,children:'Enable "Capture State on Render" in settings to see state diff.'})]})})]})}l(hc,"DiffView");function Ti({render:e,selectedEventIndex:t=0,onEventIndexChange:n=l(()=>{},"onEventIndexChange"),isPro:r=false}){let o=dn(()=>!e.renderHistory||e.renderHistory.length===0?[]:[...e.renderHistory].sort((T,b)=>T.timestamp-b.timestamp),[e.renderHistory]),i=uc("highlightUpdates.historyEvents"),s=r?1/0:i,a=dn(()=>o.slice(-s),[o,s]),u=a.length,c=a[t],d=lr(()=>{n(Math.max(0,t-1))},[t,n]),g=lr(()=>{n(Math.min(u-1,t+1))},[t,u,n]);return u<=1?null:F(sc,{currentIndex:t,totalItems:u,onPrevious:d,onNext:g,itemLabel:"Render",subtitle:c?lc(new Date(c.timestamp)):void 0})}l(Ti,"RenderHistoryFooter");var R=ve.create({container:{flex:1,backgroundColor:"transparent"},emptyContainer:{flex:1,alignItems:"center",justifyContent:"center",padding:32,gap:12},emptyTitle:{fontSize:16,fontWeight:"600",color:A.color.text},emptyText:{fontSize:13,color:A.color.textSecondary,textAlign:"center",lineHeight:18},viewToggleContainer:{flexDirection:"row",padding:12,gap:8},viewToggleCard:{flex:1,backgroundColor:A.color.surface,borderRadius:8,borderWidth:1,borderColor:A.color.border,padding:10,gap:4},viewToggleCardActive:{borderColor:A.color.accentBorderStrong,backgroundColor:A.color.accentSoft},viewToggleCardDisabled:{opacity:.5},todoBadge:{backgroundColor:A.color.fillSecondary,paddingHorizontal:6,paddingVertical:2,borderRadius:4,marginLeft:4},todoBadgeText:{fontSize:9,fontWeight:"700",color:A.color.textTertiary,letterSpacing:.3},viewToggleContent:{flexDirection:"row",alignItems:"center",gap:6},viewToggleLabel:{fontSize:10,fontWeight:"700",color:A.color.textSecondary,letterSpacing:.5},viewToggleLabelActive:{color:A.color.accent},viewToggleLabelDisabled:{color:A.color.textTertiary},viewToggleDescription:{fontSize:11,color:A.color.textTertiary,marginTop:2},contentScroll:{flex:1},contentContainer:{padding:12,paddingTop:0},noEventContainer:{padding:24,alignItems:"center"},noEventText:{fontSize:13,color:A.color.textTertiary},currentStateContainer:{gap:12},eventHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",backgroundColor:A.color.surface,borderRadius:8,borderWidth:1,borderColor:A.color.border,padding:12},eventHeaderLeft:{gap:2},eventTitle:{fontSize:15,fontWeight:"700",color:A.color.text},eventTime:{fontSize:11,color:A.color.textTertiary,fontFamily:Ke},eventBadge:{flexDirection:"row",alignItems:"center",paddingHorizontal:10,paddingVertical:4,borderRadius:12,gap:6},eventBadgeDot:{width:6,height:6,borderRadius:3},eventBadgeText:{fontSize:10,fontWeight:"700",fontFamily:Ke},section:{backgroundColor:A.color.surface,borderRadius:8,borderWidth:1,borderColor:A.color.border,overflow:"hidden"},sectionContent:{padding:12,paddingTop:8},causeContainer:{marginBottom:12},changedList:{marginBottom:12,paddingLeft:4},changedListTitle:{fontSize:11,fontWeight:"600",color:A.color.textSecondary,marginBottom:6},changedItem:{fontSize:12,color:A.color.text,fontFamily:Ke,marginBottom:3,paddingLeft:8},propsScrollView:{maxHeight:150},propsJson:{fontSize:11,fontFamily:Ke,color:A.color.text,backgroundColor:A.color.bg,padding:10,borderRadius:6},diffContainer:{gap:12},compareBar:{flexDirection:"row",backgroundColor:A.color.surface,borderRadius:8,borderWidth:1,borderColor:A.color.border,padding:10},compareSide:{flex:1,gap:4},compareLabelRow:{flexDirection:"row",alignItems:"center",gap:8},compareLabel:{fontSize:10,fontWeight:"700",letterSpacing:.5},compareActionBadge:{paddingHorizontal:6,paddingVertical:2,borderRadius:4},compareActionText:{fontSize:9,fontWeight:"600"},compareMeta:{flexDirection:"row",alignItems:"center",gap:6},compareIndex:{fontSize:12,fontWeight:"600",color:A.color.text},compareTime:{fontSize:10,color:A.color.textTertiary,fontFamily:Ke},compareDivider:{width:30,alignItems:"center",justifyContent:"center"},compareArrow:{fontSize:16,color:A.color.textTertiary},diffSummary:{backgroundColor:A.color.surface,borderRadius:8,borderWidth:1,borderColor:A.color.border,padding:12},diffSummaryTitle:{fontSize:11,fontWeight:"600",color:A.color.textSecondary,marginBottom:8},diffChanges:{gap:4},diffChangeItem:{flexDirection:"row",alignItems:"center",gap:6},diffChangeIcon:{fontSize:12,fontWeight:"700",color:A.color.warning,fontFamily:Ke},diffChangeKey:{fontSize:12,color:A.color.text,fontFamily:Ke},diffNoChanges:{fontSize:12,color:A.color.textTertiary,fontStyle:"italic"},diffPlaceholder:{fontSize:12,color:A.color.textTertiary,fontStyle:"italic",textAlign:"center",padding:16},diffModeTabs:{flexDirection:"row",backgroundColor:A.color.surface,borderRadius:8,borderWidth:1,borderColor:A.color.border,padding:4,gap:4},diffModeTab:{flex:1,paddingVertical:8,paddingHorizontal:12,borderRadius:6,alignItems:"center"},diffModeTabActive:{backgroundColor:A.color.accentSoft},diffModeTabDisabled:{opacity:.4},diffModeTabText:{fontSize:10,fontWeight:"600",color:A.color.textSecondary,letterSpacing:.5},diffModeTabTextActive:{color:A.color.accent},diffModeTabTextDisabled:{color:A.color.textTertiary},causeDiffContainer:{gap:8,marginBottom:12},causeDiffRow:{flexDirection:"row",alignItems:"center",gap:8},causeDiffLabel:{fontSize:11,fontWeight:"600",color:A.color.textSecondary,minWidth:80},causeDiffValue:{fontSize:12,color:A.color.text,fontFamily:Ke,fontWeight:"500"},diffChangesTitle:{fontSize:11,fontWeight:"600",color:A.color.textSecondary,marginBottom:6},treeDiffContainer:{backgroundColor:A.color.surface,borderRadius:8,borderWidth:1,borderColor:A.color.border,overflow:"hidden",minHeight:150},noDiffData:{padding:24,alignItems:"center",gap:8},noDiffDataTitle:{fontSize:13,fontWeight:"600",color:A.color.text},noDiffDataText:{fontSize:12,color:A.color.textTertiary,textAlign:"center",lineHeight:18},lockedBanner:{flexDirection:"row",alignItems:"center",justifyContent:"center",paddingVertical:10,paddingHorizontal:16,marginHorizontal:12,marginTop:8,backgroundColor:A.color.warningSoft,borderRadius:8,borderWidth:1,borderColor:A.color.warning+"30",gap:8},lockedBannerText:{color:A.color.warning,fontSize:13,fontWeight:"500"},lockedBannerSubtext:{color:A.color.textTertiary,fontSize:12}});U();import{useCallback as Ot,useEffect as fh,useMemo as cr,useState as pc}from"react";import{DynamicFilterView as yh,macOSColors as wi,night as Si,FileText as mc,FileCode as fc,Zap as yc,Settings as bh,Eye as vh,Layers as Ch,ToolbarCopyButton as Th,ExportPreview as wh,monoFont as Sh}from"@buoy-gg/shared-ui/web";U();var xi={format:"summary",topN:25,minRenders:2,filterCauses:[],groupByName:true,aggregateCauses:true,sortBy:"renderCount",includeHistory:false},bc={llm:{format:"summary",topN:25,minRenders:2,filterCauses:[],groupByName:true,aggregateCauses:true,sortBy:"renderCount",includeHistory:false},table:{format:"markdown-table",topN:50,minRenders:2,filterCauses:[],groupByName:true,aggregateCauses:true,sortBy:"renderCount",includeHistory:false},json:{format:"json",topN:-1,minRenders:1,filterCauses:[],groupByName:false,aggregateCauses:true,sortBy:"renderCount",includeHistory:false},full:{format:"json",topN:-1,minRenders:1,filterCauses:[],groupByName:false,aggregateCauses:false,sortBy:"renderCount",includeHistory:true}};function vc(e){for(let[t,n]of Object.entries(bc))if(Object.keys(n).every(r=>{let o=e[r],i=n[r];return Array.isArray(o)&&Array.isArray(i)?o.length===i.length&&o.every((s,a)=>s===i[a]):o===i}))return t;return null}l(vc,"detectActivePreset");var De={llm:{label:"LLM",description:"Compact summary for AI",color:"#10B981"},table:{label:"Table",description:"Markdown table",color:"#3B82F6"},json:{label:"JSON",description:"Structured data",color:"#F59E0B"},full:{label:"Full",description:"Everything incl. history",color:"#6B7280"}};U();import{definePersistedSetting as xh,devToolsStorageKeys as Ih}from"@buoy-gg/shared-ui/web";var Cc=xh(Ih.highlightUpdates.copySettings(),xi,{sanitize:l((e,t)=>({...e,filterCauses:t?.filterCauses??xi.filterCauses}),"sanitize")});async function Tc(e){await Cc.save(e)}l(Tc,"saveCopySettings");async function wc(){return Cc.loadOrNull()}l(wc,"loadCopySettings");import{Fragment as Rh,jsx as _t,jsxs as Dh}from"react/jsx-runtime";var kh=50*1024,Ph=200*1024,Nh=[{value:"mount",label:"Mount"},{value:"props",label:"Props"},{value:"hooks",label:"Hooks"},{value:"state",label:"State"},{value:"parent",label:"Parent"},{value:"context",label:"Context"},{value:"unknown",label:"Unknown"}];function Sc(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}l(Sc,"formatBytes");function xc(){let e=Date.now();return[{id:"1",nativeTag:1,viewType:"RCTView",displayName:"View",componentName:"PokemonListItem",renderCount:30,firstRenderTime:e-5e3,lastRenderTime:e,color:"#10B981",lastRenderCause:{type:"parent",timestamp:e,componentCause:"parent"}},{id:"2",nativeTag:2,viewType:"RCTView",displayName:"View",componentName:"CartHeader",renderCount:12,firstRenderTime:e-4e3,lastRenderTime:e,color:"#3B82F6",lastRenderCause:{type:"hooks",timestamp:e,componentCause:"state",hookChanges:[{type:"useState",index:2,previousValue:4,currentValue:5}]}},{id:"3",nativeTag:3,viewType:"RCTView",displayName:"View",componentName:"SearchBar",renderCount:8,firstRenderTime:e-3e3,lastRenderTime:e,color:"#F59E0B",lastRenderCause:{type:"props",timestamp:e,componentCause:"props",changedKeys:["query","onChange"]}}]}l(xc,"createMockRenders");function Ic({renders:e}){let[t,n]=pc(xi),[r,o]=pc(false);fh(()=>{let C=true;return wc().then(N=>{C&&N&&n(N)}),()=>{C=false}},[]);let i=Ot(C=>{n(C),Tc(C)},[]),s=e.length>0,a=s?e:xc(),u=cr(()=>vc(t),[t]),c=cr(()=>Hs(a,t),[a,t]),d=cr(()=>c>=Ph?"danger":c>=kh?"warning":"none",[c]),g=Ot(()=>nr(a,t),[a,t]),T=Ot(C=>{let N=bc[C];N&&i({...N,filterCauses:[...N.filterCauses]})},[i]),b=Ot((C,N)=>{let[m,k]=C.split("::");if(m==="preset"){T(k);return}if(m==="format"){i({...t,format:N});return}if(m==="sort"){i({...t,sortBy:N});return}if(m==="topN"){i({...t,topN:N});return}if(m==="minRenders"){i({...t,minRenders:N});return}if(m==="cause"){let P=N,D=t.filterCauses.includes(P);i({...t,filterCauses:D?t.filterCauses.filter(W=>W!==P):[...t.filterCauses,P]});return}if(m==="signal"){let P=k;i({...t,[P]:!t[P]});return}},[t,i,T]),v=Ot(()=>{let{totalComponents:C,totalRenders:N}=ri(a);return _t(wh,{expanded:r,onExpandedChange:o,summary:`${C} component${C!==1?"s":""} \xB7 ${N} renders \xB7 ~${Sc(c)}${s?"":" (mock data)"}`,warningLevel:d,warningText:{warning:"Large payload \u2014 preview may be slow",danger:"Very large payload \u2014 try a smaller topN or turn off history"},testIDs:{expand:"buoy-highlight-copy-preview-show",collapse:"buoy-highlight-copy-preview-hide",summary:"buoy-highlight-copy-preview-summary",warning:"buoy-highlight-copy-size-warning"},renderBody:()=>{let m=g();return _t(Me,{testID:"buoy-highlight-copy-preview-scroll",style:Ii.previewScroll,nestedScrollEnabled:true,children:_t(p,{testID:"buoy-highlight-copy-preview-text",style:Ii.previewText,selectable:true,children:m})})}})},[r,a,c,d,s,g]),f=Ot(()=>{let{totalComponents:C}=ri(a),N=s?`${C} components`:"Mock data (no renders captured)";return Dh(Rh,{children:[_t(p,{testID:"buoy-highlight-copy-status",style:Ii.statusLabel,children:N}),_t(Th,{value:g})]})},[s,a,g]),S=cr(()=>({sections:[{id:"presets",title:"Presets",type:"custom",data:[{id:"preset::llm",label:De.llm.label,icon:yc,color:De.llm.color,value:"llm",isActive:u==="llm",description:De.llm.description},{id:"preset::table",label:De.table.label,icon:mc,color:De.table.color,value:"table",isActive:u==="table",description:De.table.description},{id:"preset::json",label:De.json.label,icon:fc,color:De.json.color,value:"json",isActive:u==="json",description:De.json.description},{id:"preset::full",label:De.full.label,icon:Ch,color:De.full.color,value:"full",isActive:u==="full",description:De.full.description},{id:"preset::custom",label:"Custom",icon:bh,color:Si.color.textSecondary,value:"custom",isActive:u===null,description:"User-configured"}]},{id:"format",title:"Format",type:"custom",data:[{id:"format::summary",label:"Summary",icon:yc,color:wi.semantic.success,value:"summary",isActive:t.format==="summary",description:"Compact, LLM-ready"},{id:"format::markdown-table",label:"Table",icon:mc,color:wi.semantic.info,value:"markdown-table",isActive:t.format==="markdown-table",description:"Markdown table"},{id:"format::json",label:"JSON",icon:fc,color:wi.semantic.warning,value:"json",isActive:t.format==="json",description:"Structured data"}]},{id:"sort",title:"Sort By",type:"custom",data:[{id:"sort::renderCount",label:"Count",value:"renderCount",isActive:t.sortBy==="renderCount",description:"Total renders"},{id:"sort::rate",label:"Rate",value:"rate",isActive:t.sortBy==="rate",description:"Renders / sec"},{id:"sort::name",label:"Name",value:"name",isActive:t.sortBy==="name",description:"Alphabetical"}]},{id:"topN",title:"Top N",type:"custom",data:[{id:"topN::10",label:"10",value:10,isActive:t.topN===10},{id:"topN::25",label:"25",value:25,isActive:t.topN===25},{id:"topN::50",label:"50",value:50,isActive:t.topN===50},{id:"topN::100",label:"100",value:100,isActive:t.topN===100},{id:"topN::-1",label:"All",value:-1,isActive:t.topN===-1}]},{id:"minRenders",title:"Min Renders",type:"custom",data:[{id:"minRenders::1",label:"1",value:1,isActive:t.minRenders===1},{id:"minRenders::2",label:"2",value:2,isActive:t.minRenders===2},{id:"minRenders::3",label:"3",value:3,isActive:t.minRenders===3},{id:"minRenders::5",label:"5",value:5,isActive:t.minRenders===5},{id:"minRenders::10",label:"10",value:10,isActive:t.minRenders===10}]},{id:"causes",title:"Filter Causes",type:"custom",description:t.filterCauses.length===0?"All causes shown":"Only the selected causes shown",data:Nh.map(C=>({id:`cause::${C.value}`,label:C.label,value:C.value,isActive:t.filterCauses.includes(C.value)}))},{id:"signal",title:"Signal Extraction",type:"custom",data:[{id:"signal::groupByName",label:"Group by name",value:"groupByName",isActive:t.groupByName,description:"Collapse list items"},{id:"signal::aggregateCauses",label:"Aggregate causes",value:"aggregateCauses",isActive:t.aggregateCauses,description:"Hook x N"},{id:"signal::includeHistory",label:"Include history",value:"includeHistory",isActive:t.includeHistory,description:"JSON only \u2014 large"}]}],previewSection:{enabled:true,title:"PREVIEW",icon:vh,content:v,headerActions:f},onFilterChange:b}),[t,u,b,v,f]);return _t(yh,{...S})}l(Ic,"RendersCopySettingsView");var Ii=ve.create({previewScroll:{maxHeight:360},previewText:{fontFamily:Sh,fontSize:11,color:Si.color.text,lineHeight:18},statusLabel:{fontSize:11,fontWeight:"600",color:Si.color.textTertiary,marginRight:8}});import{Fragment as zh,jsx as ne,jsxs as Ri}from"react/jsx-runtime";var Lh=lg.memo(l(function(){return Ri(h,{testID:"buoy-highlight-disabled-banner",style:gn.disabledBanner,children:[ne(sg,{size:14,color:Bt.color.warning}),ne(p,{testID:"buoy-highlight-disabled-text",style:gn.disabledText,children:"Render tracking is disabled"})]})},"DisabledBanner"));function ur({visible:e,onClose:t,onBack:n,onMinimize:r,enableSharedModalDimensions:o=false,initialNativeTag:i,onInitialNativeTagHandled:s,onRenderSelect:a,inline:u=false}){let c=dg(),[d,g]=de(false),[T,b]=de(()=>E.getFrozen()),[v,f]=de(()=>B.getStats().totalComponents>0),[S,C]=de(null),[N,m]=de(0),[k,P]=de(false),[D,W]=de(false),[Z,V]=de([]),[j,x]=de("filters"),[L,ue]=de("details"),[pe,Fe]=de(0),[ye,Rr]=de(""),[St,jt]=de(false),Oi=ct(null),Gt=ct([]),_i=ct(B.getFilters()),[Dr,Wi]=de(()=>{let _=B.getFilters();return _.includePatterns.length+_.excludePatterns.length}),[be,Ui]=de(()=>B.getFilters()),[kr,ji]=de(()=>B.getSettings()),Gi=ct(false),Pr=ct(false),yn=ct(false);Re(()=>{!e||Gi.current||(Gi.current=true)},[e]),Re(()=>{if(!e||Pr.current)return;l(async()=>{try{let _=await Zn.getItem(Lt.highlightUpdates.filters());if(_){let G=JSON.parse(_),ie={includeTestID:new Set(G.includeTestID||[]),includeNativeID:new Set(G.includeNativeID||[]),includeViewType:new Set(G.includeViewType||[]),includeComponent:new Set(G.includeComponent||[]),excludeTestID:new Set(G.excludeTestID||[]),excludeNativeID:new Set(G.excludeNativeID||[]),excludeViewType:new Set(G.excludeViewType||[]),excludeComponent:new Set(G.excludeComponent||[]),includePatterns:G.includePatterns||[],excludePatterns:G.excludePatterns||[]};B.setFilters(ie);let Le=B.getFilters();_i.current=Le,Ui(Le),Wi(Le.includePatterns.length+Le.excludePatterns.length)}Pr.current=true}catch{}},"loadFilters")()},[e]),Re(()=>{if(!Pr.current)return;l(async()=>{try{let _={includeTestID:Array.from(be.includeTestID),includeNativeID:Array.from(be.includeNativeID),includeViewType:Array.from(be.includeViewType),includeComponent:Array.from(be.includeComponent),excludeTestID:Array.from(be.excludeTestID),excludeNativeID:Array.from(be.excludeNativeID),excludeViewType:Array.from(be.excludeViewType),excludeComponent:Array.from(be.excludeComponent),includePatterns:be.includePatterns,excludePatterns:be.excludePatterns};await Zn.setItem(Lt.highlightUpdates.filters(),JSON.stringify(_))}catch{}},"saveFilters")()},[be]),Re(()=>{if(!e||yn.current)return;l(async()=>{try{let _=await Zn.getItem(Lt.highlightUpdates.settings());if(_){let G=JSON.parse(_),{performanceLogging:ie,excludeDevTools:Le,...Ye}=G;B.setSettings(Ye),ji(B.getSettings())}yn.current=true}catch{yn.current=true}},"loadSettings")()},[e]),Re(()=>{if(!yn.current)return;l(async()=>{try{let{performanceLogging:_,excludeDevTools:G,...ie}=kr;await Zn.setItem(Lt.highlightUpdates.settings(),JSON.stringify(ie))}catch{}},"saveSettings")()},[kr]),Re(()=>{let _=B.subscribeToState(G=>{g(G.isTracking)});return()=>{_()}},[]),Re(()=>{let _=E.subscribeToFreeze(G=>{b(G)});return()=>{_()}},[]),Re(()=>{St&&requestAnimationFrame(()=>{Oi.current?.focus()})},[St]),Re(()=>{e||E.setSpotlight(null)},[e]),Re(()=>{if(e&&i!=null){let _=B.getRender(String(i));_&&(C(_),m(0),P(false),E.setSpotlight(_.nativeTag)),s?.()}},[e,i,s]);let Ki=re(()=>{E.isInitialized()||E.initialize(),E.toggle()},[]),qi=re(()=>{E.toggleFreeze()},[]),Ji=re(()=>{E.clearRenderCounts(),f(false)},[]),Yi=re(()=>{V(B.getFilteredRenders(ye)),W(true)},[ye]),Xi=re(()=>{W(false)},[]),Qi=re(_=>{Rr(_)},[]),wu=re((_,G,ie)=>{C(_),m(G),ue("details"),Fe(0),Gt.current=ie,E.setSpotlight(_.nativeTag)},[]);Re(()=>{if(!S)return;let _=String(S.nativeTag);return B.subscribe(()=>{let G=B.getRender(_);G&&C({...G})})},[S?.nativeTag]);let Zi=ct(null);Re(()=>{!a||!S||Zi.current!==S.nativeTag&&(Zi.current=S.nativeTag,a(S))},[S,a]);let Su=re(_=>{Gt.current=_},[]),ea=re(()=>{C(null),m(0),ye&&jt(true),E.setSpotlight(null)},[ye]),xu=re(()=>{let _=Gt.current;if(N>0){let G=N-1,ie=_[G];ie&&(C(ie),m(G),E.setSpotlight(ie.nativeTag))}},[N]),Iu=re(()=>{let _=Gt.current;if(N<_.length-1){let G=N+1,ie=_[G];ie&&(C(ie),m(G),E.setSpotlight(ie.nativeTag))}},[N]),ta=re(()=>{P(false)},[]),na=re(()=>{P(true)},[]),ra=re(()=>{jt(true)},[]),oa=re(()=>{jt(false)},[]),Nr=re(_=>{B.setFilters(_);let G=B.getFilters();_i.current=G,Ui(G),Wi(G.includePatterns.length+G.excludePatterns.length)},[]),Ru=re((_,G)=>{let ie=B.getFilters(),Le={};G==="include"?ie.includePatterns.some(Ye=>Ye.type===_.type&&Ye.value===_.value)||(Le.includePatterns=[...ie.includePatterns,_]):ie.excludePatterns.some(Ye=>Ye.type===_.type&&Ye.value===_.value)||(Le.excludePatterns=[...ie.excludePatterns,_]),Object.keys(Le).length>0&&(Nr(Le),C(null),m(0),E.setSpotlight(null))},[Nr]),Du=re(_=>{B.setSettings(_),ji(B.getSettings())},[]),ku=re(_=>{f(_.totalComponents>0)},[]),ia=re(()=>D?ne(uh,{onBack:Xi}):k?ne(sh,{onBack:ta,activeTab:j,onTabChange:x,activeFilterCount:Dr}):S?ne(ch,{onBack:ea,activeTab:L,onTabChange:ue,hasHistory:(S.renderHistory?.length??0)>0}):ne(lh,{onBack:n,isSearchActive:St,searchText:ye,onSearchChange:Qi,onSearchToggle:ra,onSearchClose:oa,onFilterToggle:na,onToggleTracking:Ki,onToggleFreeze:qi,onClear:Ji,onOpenCopySettings:Yi,isTracking:d,isFrozen:T,activeFilterCount:Dr,hasRenders:v,searchInputRef:Oi}),[D,k,S,n,St,ye,d,T,Dr,v,j,L,ta,ea,Xi,Qi,ra,oa,na,Ki,qi,Ji,Yi]),Pu=o?Lt.modal.root():Lt.highlightUpdates.modal();if(!e)return null;let Nu=Gt.current.length,aa=S?L==="details"?ne(wg,{currentIndex:N,totalItems:Nu,onPrevious:xu,onNext:Iu,itemLabel:"Component",subtitle:S.componentName||S.displayName||S.viewType}):ne(Ti,{render:S,selectedEventIndex:pe,onEventIndexChange:Fe,isPro:c}):null,la=ne(h,{nativeID:"__rn_buoy__highlight-modal",testID:"buoy-highlight-body",style:gn.container,children:D?ne(Ic,{renders:Z}):S?L==="details"?ne(oi,{render:S,disableInternalFooter:true,onAddFilter:Ru,isPro:c}):ne(Ci,{render:S,disableInternalFooter:true,selectedEventIndex:pe,onEventIndexChange:Fe,isPro:c}):k?ne(fi,{filters:be,onFilterChange:Nr,settings:kr,onSettingsChange:Du,availableProps:B.getAvailableProps(),activeTab:j}):Ri(zh,{children:[E.getRenderSourceStatus()==="unavailable"?ne(p,{style:{color:Bt.color.warning,padding:16},children:"Not in this app"}):!d&&ne(Lh,{}),ne(Wg,{searchText:ye,filters:be,onSelectRender:wu,onStatsChange:ku,onRendersChange:Su,isTracking:d,isPro:c})]})});return u?ne(ws,{children:Ri(h,{style:gn.inlineRoot,children:[ne(h,{style:gn.inlineHeader,...ug,children:ia()}),la,aa]})}):ne(ws,{children:ne(cg,{visible:e,onClose:t,onMinimize:r,persistenceKey:Pu,header:{showToggleButton:true,customContent:ia()},enablePersistence:true,initialMode:"bottomSheet",enableGlitchEffects:true,disableScrollWrapper:Ha.OS==="web",styles:{},footer:aa,footerHeight:S&&(L==="details"||(S.renderHistory?.length??0)>1)?68:0,children:la})})}l(ur,"HighlightUpdatesModal");function Rc(e={}){return ne(ur,{...e,inline:true,visible:true,onClose:()=>{}})}l(Rc,"HighlightToolView");var gn=ve.create({inlineRoot:{flex:1,minHeight:0,backgroundColor:"transparent"},inlineHeader:{paddingHorizontal:12,paddingVertical:8,borderBottomWidth:1,borderBottomColor:Bt.color.border,backgroundColor:"transparent"},container:{flex:1,backgroundColor:"transparent"},disabledBanner:{flexDirection:"row",alignItems:"center",gap:8,padding:10,marginHorizontal:12,marginTop:8,backgroundColor:Bt.color.warningSoft,borderRadius:8,borderWidth:1,borderColor:Bt.color.warning+"20"},disabledText:{color:Bt.color.warning,fontSize:11,flex:1}});import{jsx as hn}from"react/jsx-runtime";function Dc({size:e}){let[t,n]=Ar(()=>E.isEnabled());return Er(()=>E.subscribe(r=>{n(r)}),[]),hn(xa,{size:e,color:t?"#10b981":"#6b7280"})}l(Dc,"HighlightIcon");function Di(){return null}l(Di,"EmptyComponent");function ki(e){let[t,n]=Ar(null);Er(()=>(e.visible&&E.setBadgePressCallback(o=>{n(o)}),()=>{e.visible||E.setBadgePressCallback(null)}),[e.visible]);let r=Eu(()=>{n(null)},[]);return hn(ur,{...e,initialNativeTag:t,onInitialNativeTagHandled:r})}l(ki,"HighlightUpdatesModalWithBadgeNavigation");var Bh={id:"highlight-updates",name:"TOGGLE HIGHLIGHT",description:"Toggle component render highlights",slot:"row",icon:Dc,component:Di,props:{},launchMode:"toggle-only",onPress:l(()=>{E.isInitialized()||E.initialize(),E.toggle()},"onPress")};function kc(e){let t=e?.enabledColor||"#10b981",n=e?.disabledColor||"#6b7280";e?.autoInitialize&&setTimeout(()=>{E.initialize()},1e3);let r=l(({size:o})=>{let[i,s]=Ar(()=>E.isEnabled());return Er(()=>E.subscribe(a=>{s(a)}),[]),hn(xa,{size:o,color:i?t:n})},"CustomHighlightIcon");return{id:e?.id||"highlight-updates",name:e?.name||"TOGGLE HIGHLIGHT",description:e?.description||"Toggle component render highlights",slot:"row",icon:r,component:Di,props:{},launchMode:"toggle-only",onPress:l(()=>{E.isInitialized()||E.initialize(),E.toggle()},"onPress")}}l(kc,"createHighlightUpdatesTool");var Vh={id:"highlight-updates-modal",name:"HIGHLIGHT",description:"View component render tracking modal",slot:"both",icon:l(({size:e})=>hn(Sa,{size:e}),"icon"),component:ki,props:{enableSharedModalDimensions:false}};function Pc(e){let t=e?.enabledColor||"#10b981",n=e?.disabledColor||"#6b7280";return e?.autoInitialize&&setTimeout(()=>{E.initialize()},1e3),{id:e?.id||"highlight-updates-modal",name:e?.name||"HIGHLIGHT",description:e?.description||"View component render tracking modal",slot:"both",icon:l(({size:r})=>hn(Sa,{size:r,color:t}),"icon"),component:ki,props:{enableSharedModalDimensions:false}}}l(Pc,"createHighlightUpdatesModalTool");U();U();import{getDOMFiber as Hh,getDOMNodeHandle as Ah}from"@buoy-gg/shared-ui/web/utils";var Eh=new Set(["View","Text","TextImpl","Image","ScrollView","FlatList","SectionList","Pressable","TouchableOpacity","TouchableHighlight","TouchableWithoutFeedback","TouchableNativeFeedback","TextInput","Switch","ActivityIndicator","Modal","SafeAreaView","SafeAreaProvider","KeyboardAvoidingView","VirtualizedList","Screen","ScreenContainer","ScreenStack","ScreenContentWrapper","GestureHandlerRootView","GestureDetector","Wrapper"]);function dr(e){let t=e.return,n=t?.elementType??t?.type;return t&&n?.$$typeof===Symbol.for("react.memo")&&(n.type===e.type||n.type===e.elementType)?t:null}l(dr,"memoParent");function gr(e){let t="",n=e.tag===14||e.tag===15,r=e.tag===11,o=new Set,i=l(a=>{!a||o.has(a)||o.size>20||(o.add(a),t||(t=a.displayName||(typeof a=="function"?a.name:"")),a.$$typeof===Symbol.for("react.memo")&&(n=true,i(a.type)),a.$$typeof===Symbol.for("react.forward_ref")&&(r=true,i(a.render)))},"visit");i(e.elementType),i(e.type);let s=dr(e);return s&&i(s.elementType??s.type),{name:t||"Anonymous",memo:n,forwardRef:r}}l(gr,"typeInfo");function Pi(e){if(!e||typeof e.type=="string"||![0,1,2,11,14,15].includes(e.tag))return false;let{name:t}=gr(e),n=e._debugSource?.fileName??"";return!Eh.has(t)&&!/^(Animated|RCT|Reanimated|Buoy|DevTools|FloatingDevTools|HighlightUpdates)/.test(t)&&!/[@/]buoy-gg\/|\/react-native\//.test(n)&&!e.memoizedProps?.__buoyDevToolsRoot}l(Pi,"isUserComponent");function Nc(e){let t=gr(e),n=dr(e),r=e._debugSource??n?._debugSource;if(typeof r?.fileName=="string"&&r.fileName)t.source={fileName:r.fileName},Number.isFinite(r.lineNumber)&&(t.source.lineNumber=r.lineNumber),Number.isFinite(r.columnNumber)&&(t.source.columnNumber=r.columnNumber);else{let o=e._debugStack??n?._debugStack;typeof o?.stack=="string"&&(t.rawStack=o.stack)}return t}l(Nc,"entry");function zc(e){let t=e.child?[e.child]:[],n=0;for(;t.length&&n++<300;){let r=t.shift();if(r._debugOwner===e){let o=r._debugSource;if(typeof o?.fileName=="string"&&o.fileName)return{source:{fileName:o.fileName,...Number.isFinite(o.lineNumber)?{lineNumber:o.lineNumber}:{},...Number.isFinite(o.columnNumber)?{columnNumber:o.columnNumber}:{}}};if(typeof r._debugStack?.stack=="string")return{rawStack:r._debugStack.stack}}r.child&&t.push(r.child),r.sibling&&t.push(r.sibling)}}l(zc,"definitionOf");function Lc(e){let t=[],n=null,r=new Set,o=e;for(;o&&!r.has(o)&&r.size<400&&t.length<7;){r.add(o),Pi(o)&&(t.length||(n=o),t.push(Nc(o)));let s=dr(o);o=o._debugOwner||s?._debugOwner||s?.return||o.return,s&&o===s&&(o=s._debugOwner||s.return)}if(!t.length)return{found:false,reason:"No app component was found for this view."};let i=n?zc(n):void 0;return{found:true,component:i?{...t[0],definedIn:i}:t[0],owners:t.slice(1)}}l(Lc,"sourceFromFiber");function Bc(e){return e?.canonical?.internalInstanceHandle||e?._internalInstanceHandle||e?._internalFiberInstanceHandleDEV||Hh(e)||null}l(Bc,"fiberFromStateNode");function Vc(e){return Ah(e)??e?.__nativeTag??e?._nativeTag??e?.nativeTag??e?.canonical?.__nativeTag??e?.canonical?._nativeTag??e?.canonical?.nativeTag??null}l(Vc,"nativeTag");var Fh=1e5;function Hc(e){let t=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__,n=[],r=l(s=>{try{t?.getFiberRoots?.(s)?.forEach(a=>n.push(a.current))}catch{}},"addRoots");t?.renderers?.forEach((s,a)=>r(a)),n.length||r(1);let o=[...n],i=new Set;for(;o.length;){if(i.size>=Fh)return{fiber:null,capped:true,any:true};let s=o.pop();if(!s||i.has(s))continue;i.add(s),s.sibling&&o.push(s.sibling);let a=s.memoizedProps??{};if(!(s.tag===22&&s.memoizedState!=null||a.__buoyDevToolsRoot||a.activityState===0||a.activityState===1||a.isPageFocused===false||a["aria-hidden"]===true&&(a.activityState!==void 0||"shouldFreeze"in a)||a.isFocused===false&&(a.routeKey!==void 0||"freezeContents"in a))){if(e(s))return{fiber:s,capped:false,any:true};s.child&&o.push(s.child)}}return{fiber:null,capped:false,any:n.length>0}}l(Hc,"findLiveFiber");async function Ac(e={}){try{let{nativeTag:t,query:n}=e??{};if(t!==void 0&&(!Number.isInteger(t)||t<0)||n!==void 0&&typeof n!="string")return{found:false,reason:"Pass a valid nativeTag or a text query."};let r=n?.trim();if(t==null&&!r)return{found:false,reason:"Pass a query or nativeTag."};let o=false,i=false,s=l(c=>{let d=Hc(c);return o||(o=d.capped),i||(i=d.any),d.fiber??void 0},"find"),a=l(c=>s(d=>d.stateNode&&Vc(d.stateNode)===c),"byTag"),u=t!=null?a(t):void 0;if(t==null&&r&&(u=s(c=>Pi(c)&&gr(c).name.toLowerCase()===r.toLowerCase()),!u)){let c=(await Ln({})).elements.map(d=>({el:d,score:Zt(d,{query:r})})).filter(({score:d})=>d>0).sort((d,g)=>g.score-d.score)[0]?.el;c?.nativeTag!=null&&(u=a(c.nativeTag))}return!u&&!i?{found:false,reason:"No React tree was found. Use a dev build."}:u?Lc(Bc(u.stateNode)??u):{found:false,reason:o?"The React tree is too big to search fully, and no view matched in the part searched. Pass the nativeTag from describe_screen.":"No view matched. Check describe_screen for its name or tag."}}catch{return{found:false,reason:"Could not read the React tree. Try again in a dev build."}}}l(Ac,"getComponentSource");Ve();U();U();import{resolveDOMEventEmitter as Mh}from"@buoy-gg/shared-ui/web/utils";var $h=14,Oh=550,_h=4e3,Wh=8e3,Ec=600,Ni=null,Fc=false,zi=null,hr=[],qe="idle",Je=[],Li=0,ze=null;function Mc(){if(Fc)return Ni;Fc=true;let e=Mh();return Ni=e.emitter,zi=e.reason,Ni}l(Mc,"getEmitter");function yt(e){return typeof e=="number"&&Number.isFinite(e)?e:null}l(yt,"num");function Bi(e){let t=e?.nativeEvent;return t?yt(t.target)??yt(t.tag):null}l(Bi,"tagOf");function pr(e){let t=e?.nativeEvent;if(!t)return null;let n={x:yt(t.pageX),y:yt(t.pageY)};if(n.x!==null&&n.y!==null)return{x:n.x,y:n.y};for(let r of["changedTouches","touches"]){let o=t[r];if(Array.isArray(o)&&o.length){let i=o[0],s=yt(i?.pageX),a=yt(i?.pageY);if(s!==null&&a!==null)return{x:s,y:a}}}return null}l(pr,"pointOf");function Vi(e){Je.push({...e,seq:++Li}),Je.length>Ec&&(Je=Je.slice(-Ec))}l(Vi,"push");function $c(e){let t=Bi(e);if(t===null)return;let n=pr(e),r=null;try{r=Hn(t)}catch{}ze={tag:t,x:n?.x??0,y:n?.y??0,t:Date.now(),drift:0,target:r}}l($c,"onTouchStart");function Oc(e){if(!ze)return;let t=pr(e);if(!t)return;let n=t.x-ze.x,r=t.y-ze.y;ze.drift=Math.max(ze.drift,Math.sqrt(n*n+r*r))}l(Oc,"onTouchMove");function _c(e){let t=ze;if(ze=null,!t||!t.target)return;let n=pr(e);if(n){let o=n.x-t.x,i=n.y-t.y;t.drift=Math.max(t.drift,Math.sqrt(o*o+i*i))}if(t.drift>$h)return;let r=Date.now()-t.t;r>_h||t.target.control!=="text"&&(t.target.control==="toggle"||t.target.control==="slider"||Vi({t:Date.now(),kind:r>=Oh?"longPress":"press",target:t.target}))}l(_c,"onTouchEnd");function Wc(){ze=null}l(Wc,"onTouchCancel");function mr(e){let t=Bi(e);if(t===null)return;let n=e.nativeEvent,r,o;if(typeof n.text=="string")r="text",o=n.text;else if(typeof n.value=="boolean")r="toggle",o=n.value;else if(typeof n.value=="number")r="slider",o=n.value;else return;let i=Je[Je.length-1];if(i&&i.kind===r&&i.target.nativeTag===t&&Date.now()-i.t<Wh){i.value=o,i.t=Date.now();return}let s=null;try{s=Hn(t)}catch{}s&&Vi({t:Date.now(),kind:r,target:s,value:o})}l(mr,"onChange");function Uc(){if(qe==="capturing")return Wt();let e=Mc();if(!e)return qe="unavailable",Wt();try{hr=[e.addListener("topTouchStart",$c),e.addListener("topTouchMove",Oc),e.addListener("topTouchEnd",_c),e.addListener("topTouchCancel",Wc),e.addListener("topChange",mr),e.addListener("topValueChange",mr),e.addListener("topSlidingComplete",mr)],ze=null,qe="capturing"}catch(t){hr=[],qe="unavailable",zi=t?.message??"addListener failed"}return Wt()}l(Uc,"startTouchCapture");function jc(){hr.forEach(e=>{try{e.remove()}catch{}}),hr=[],ze=null,qe==="capturing"&&(qe="idle")}l(jc,"stopTouchCapture");function Gc(){Je=[],Li=0}l(Gc,"clearTouchCapture");function Wt(){return{status:qe,reason:qe==="unavailable"?zi:null}}l(Wt,"getTouchCaptureStatus");function Kc(e=0){return{...Wt(),records:Je.filter(t=>t.seq>e),seq:Li}}l(Kc,"readTouchCapture");U();var qc=0,Jc=1,Yc=11,Xc=14,Qc=15,fr=1,Uh=1e4,jh=300,Gh=20,Zc=false,pn=false,Hi=false,yr=false,br=0,bt=0,vr=0,vt={},Ct=new Map;function Ai(){return typeof globalThis>"u"?null:globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__??null}l(Ai,"getHook");function Cr(e){let t=e.flags??e.effectTag;return typeof t=="number"?t:0}l(Cr,"getFlags");function Ei(e){return e===qc||e===Jc||e===Yc||e===Xc||e===Qc}l(Ei,"isCompositeTag");function Tr(e){let t=e.type;try{switch(e.tag){case qc:case Jc:return t?.displayName||t?.name||"Anonymous";case Yc:return t?.displayName||t?.render?.displayName||t?.render?.name||"ForwardRef";case Xc:case Qc:{let n=t?.type??e.elementType?.type;return t?.displayName||n?.displayName||n?.name||"Memo"}default:return"Anonymous"}}catch{return"Anonymous"}}l(Tr,"getComponentName");function eu(e){let t=e.actualDuration;if(typeof t!="number")return null;let n=t;for(let r=e.child;r!=null;r=r.sibling)typeof r.actualDuration=="number"&&(n-=r.actualDuration);return n>0?n:0}l(eu,"computeSelfMs");var Kh=new Set(["View","Text","Image","ImageBackground","ScrollView","FlatList","SectionList","SafeAreaView","KeyboardAvoidingView","StatusBar","ActivityIndicator","RefreshControl","Modal","Switch","Pressable","PlatformPressable","TouchableOpacity","TouchableHighlight","TouchableWithoutFeedback","TouchableNativeFeedback","PressabilityDebugView","AnimatedComponent","Wrapper"]),tu=["Animated(","Pressability","Virtualized","CellRenderer"];function Fi(e){if(Kh.has(e))return true;for(let t=0;t<tu.length;t++)if(e.startsWith(tu[t]))return true;return false}l(Fi,"isFrameworkWrapperName");var nu=40,ru=5;function ou(e,t){if(Object.is(e,t))return true;let n=typeof e;if(n!==typeof t)return false;if(n==="function")return true;if(e===null||t===null||n!=="object")return false;let r=Array.isArray(e);if(r!==Array.isArray(t))return false;if(r){if(e.length!==t.length)return false;for(let s=0;s<e.length;s++)if(!Object.is(e[s],t[s]))return false;return true}let o=Object.keys(e),i=Object.keys(t);if(o.length!==i.length)return false;for(let s=0;s<o.length;s++){let a=o[s];if(!Object.prototype.hasOwnProperty.call(t,a)||!Object.is(e[a],t[a]))return false}return true}l(ou,"isEquivalentValue");function iu(e,t){let n=e.alternate;if(!n)return{cause:"mount"};let r=e.memoizedProps,o=n.memoizedProps;if(r!==o&&r&&o){let i=false,s=false,a,u=Object.keys(r),c=u.length<nu?u.length:nu;for(let d=0;d<c;d++){let g=u[d],T=o[g],b=r[g];if(!Object.is(T,b)&&(i=true,t&&(a||(a=[]),a.length<ru&&a.push(g)),!ou(T,b)&&(s=true,!t)))break}if(!s&&Object.keys(o).length!==u.length&&(i=true,s=true),i)return{cause:s?"props":"propsUnstable",changedKeys:a}}return ml(n,e)?{cause:"hooks"}:{cause:"parent"}}l(iu,"detectCause");function au(e){for(let t=e.return;t!=null;t=t.return){if(!Ei(t.tag)||(Cr(t)&fr)===0)continue;let n=Tr(t);if(!Fi(n))return n}}l(au,"nearestRenderedAncestorName");function lu(e,t){let n=Tr(e),r=eu(e);r!==null&&(Hi=true);let o=r??0;bt+=1,vr+=o;let{cause:i,changedKeys:s}=iu(e,yr);if(vt[i]=(vt[i]??0)+1,Fi(n))return;let a=Ct.get(n);if(!a){if(Ct.size>=jh)return;a={renders:0,totalSelfMs:0,maxSelfMs:0,causes:{}},Ct.set(n,a)}if(a.renders+=1,a.totalSelfMs+=o,o>a.maxSelfMs&&(a.maxSelfMs=o),a.causes[i]=(a.causes[i]??0)+1,yr){if(s){a.changedProps||(a.changedProps=new Set);for(let u=0;u<s.length&&!(a.changedProps.size>=ru);u++)a.changedProps.add(s[u])}t&&!a.parentName&&(a.parentName=t)}}l(lu,"recordRender");function su(e){let t=e?.current;if(!t)return;let n=bt,r=0,o=t;for(;o!=null&&(r+=1,!(r>Uh));){let i=false,s=Ei(o.tag);if(o.memoizedProps?.__buoyDevToolsRoot||o.memoizedProps?.["data-buoy-root"]!==void 0)i=true;else if(s){let a=Tr(o);Ol(a)?i=true:$l(a)||(Cr(o)&fr)!==0&&lu(o,yr?au(o):void 0)}if(!i){let a=o.subtreeFlags;if(!(typeof a=="number"&&(a&fr)===0&&(Cr(o)&fr)===0)&&o.child!=null){o=o.child;continue}}for(;o!=null;){if(o===t)return Mi(n);if(o.sibling!=null){o=o.sibling;break}o=o.return}}Mi(n)}l(su,"handleCommit");function Mi(e){bt>e&&(br+=1)}l(Mi,"finalizeCommit");function cu(){if(Zc)return true;let e=Ai();if(!e)return false;let t=e.onCommitFiberRoot;return e.onCommitFiberRoot=function(n,r,...o){if(pn)try{su(r)}catch{}return typeof t=="function"?t.call(e,n,r,...o):void 0},Zc=true,true}l(cu,"ensureHookInstalled");function uu(){if(typeof ee<"u"&&!ee)return false;let e=Ai();return!!(e&&e.renderers&&e.renderers.size>0)}l(uu,"isSupported");function du(){return pn}l(du,"isCapturing");function gu(e){cu()&&(Ct=new Map,Hi=false,yr=e?.detail===true,br=0,bt=0,vr=0,vt={},pn=true)}l(gu,"startCapture");function hu(){if(!pn&&bt===0&&Ct.size===0)return null;pn=false;let e=Array.from(Ct.entries()).sort((n,r)=>{let o=r[1].totalSelfMs-n[1].totalSelfMs;return o!==0?o:r[1].renders-n[1].renders}).slice(0,Gh).map(([n,r])=>({name:n,renders:r.renders,totalMs:mn(r.totalSelfMs),maxMs:mn(r.maxSelfMs),avgMs:r.renders>0?mn(r.totalSelfMs/r.renders):0,causes:r.causes,...r.changedProps&&r.changedProps.size>0?{changedProps:Array.from(r.changedProps)}:null,...r.parentName?{parentName:r.parentName}:null})),t={totalCommits:br,totalRenders:bt,capturedDurations:Hi,totalRenderMs:mn(vr),wastedRenders:(vt.parent??0)+(vt.propsUnstable??0),causes:vt,topComponents:e};return Ct=new Map,br=0,bt=0,vr=0,vt={},t}l(hu,"stopCapture");function mn(e){return Math.round(e*100)/100}l(mn,"round2");var Tt={isSupported:uu,isCapturing:du,startCapture:gu,stopCapture:hu};function fn(){E.isInitialized()||E.initialize()}l(fn,"ensureInitialized");function wr(e){if(!e)return;let{hookChanges:t,...n}=e;return n}l(wr,"toWireCause");function pu(e){let{renderHistory:t,lastRenderCause:n,...r}=e;return{...r,lastRenderCause:wr(n),historyCount:t?.length??0}}l(pu,"toWireRender");function mu(e){try{return JSON.stringify(e),e}catch{return{...e,lastRenderCause:wr(e.lastRenderCause),renderHistory:e.renderHistory?.map(t=>({...t,capturedProps:void 0,capturedState:void 0,cause:wr(t.cause)??t.cause}))}}}l(mu,"jsonSafeRender");function fu(){return Tt.isSupported()?(Tt.startCapture({detail:true}),{ok:true}):{ok:false,reason:"render capture needs a dev build with the React DevTools hook available"}}l(fu,"beginMeasurement");function yu(){return{summary:Tt.stopCapture()}}l(yu,"endMeasurement");var qh={version:3,getSnapshot:l(()=>({enabled:E.isEnabled(),frozen:E.getFrozen(),highlightsSuppressed:E.getHighlightsSuppressed(),renders:B.getRenders().map(pu),trackerState:B.getState()}),"getSnapshot"),subscribe:l(e=>{let t=E.subscribe(e),n=E.subscribeToFreeze(e),r=B.subscribe(e),o=B.subscribeToState(e);return()=>{t(),n(),r(),o()}},"subscribe"),actions:{getComponentSource:l(async e=>{try{return await Ac(e)}catch(t){return{found:false,reason:`Could not read the component's source: ${t instanceof Error?t.message:String(t)}`}}},"getComponentSource"),beginMeasurement:l(()=>fu(),"beginMeasurement"),endMeasurement:l(()=>yu(),"endMeasurement"),getRenderDetail:l(e=>{let{nativeTag:t}=e??{};if(t==null)return{found:false,reason:"missing nativeTag"};let n=B.getRender(String(t));return n?{found:true,nativeTag:t,render:mu(n)}:{found:false,reason:"unknown nativeTag"}},"getRenderDetail"),toggle:l(()=>{fn(),E.toggle()},"toggle"),setEnabled:l(e=>{fn(),E.setEnabled(e.enabled)},"setEnabled"),toggleFreeze:l(()=>{E.toggleFreeze()},"toggleFreeze"),clearRenderCounts:l(()=>{E.clearRenderCounts()},"clearRenderCounts"),setSpotlight:l(e=>{E.setSpotlight(e.nativeTag)},"setSpotlight"),locateComponent:l(e=>(fn(),E.locateComponent(e??{})),"locateComponent"),setSilentTracking:l(e=>{fn(),E.setSilentTracking(e.enabled??false)},"setSilentTracking"),describeScreen:l(e=>Ln(e??{}),"describeScreen"),tapElement:l(e=>el(e??{}),"tapElement"),waitFor:l(e=>tl(e??{}),"waitFor"),hitTest:l(e=>gl(e??{x:.5,y:.5}),"hitTest"),readMaps:l(()=>hl(),"readMaps"),startTouchCapture:l(()=>Uc(),"startTouchCapture"),stopTouchCapture:l(()=>(jc(),Wt()),"stopTouchCapture"),clearTouchCapture:l(()=>(Gc(),{ok:true}),"clearTouchCapture"),readTouchCapture:l(e=>Kc(e?.sinceSeq??0),"readTouchCapture")}};U();import{useEffect as Sr,useState as $i,useRef as xr,useCallback as bu,useLayoutEffect as Jh}from"react";import{night as Ir,monoFont as Yh}from"@buoy-gg/shared-ui/web";Cn();Ve();import{Fragment as Xh,jsx as Ut,jsxs as vu}from"react/jsx-runtime";var Qh=1e3;function Cu({onBadgePress:e}={}){let[t,n]=$i([]),[r,o]=$i(()=>E.getFrozen()),[i,s]=$i(null),a=xr(null),u=xr(0),c=xr(0),d=xr(r);d.current=r,Qe.isEnabled()&&(u.current=performance.now(),c.current=t.length),Jh(()=>{if(Qe.isEnabled()&&u.current>0&&c.current>0){let f=performance.now()-u.current;ma(c.current,f)}}),Sr(()=>E.subscribeToFreeze(f=>{o(f)}),[]),Sr(()=>B.subscribeToFilters(()=>{n(f=>f.filter(S=>{let C=B.getRender(String(S.id));return C?B.shouldShowRender(C):true}))}),[]),Sr(()=>(E.setSpotlightCallback(f=>{s(f)}),()=>{E.setSpotlightCallback(null)}),[]);let g=bu(f=>{let S=Date.now(),C=f.map(N=>({...N,timestamp:S}));n(N=>{let m=[...N];for(let k of C){let P=m.findIndex(D=>D.id===k.id);P>=0?m[P]=k:m.push(k)}return m})},[]);Sr(()=>(E.setHighlightCallback(g),a.current=setInterval(()=>{if(d.current)return;let f=Date.now();n(S=>S.filter(C=>f-C.timestamp<Qh))},50),()=>{E.setHighlightCallback(null),a.current&&clearInterval(a.current)}),[g]);let T=e||E.getBadgePressCallback(),b=bu(f=>{e?e(f):E.handleBadgePress(f)},[e]),v=i?B.getRender(String(i)):null;return t.length===0&&!v?.measurements?null:vu(h,{style:wt.overlay,pointerEvents:"box-none",nativeID:"highlight-updates-overlay",children:[v?.measurements&&vu(Xh,{children:[Ut(h,{pointerEvents:"none",nativeID:"__spotlight_highlight__",style:[wt.spotlightHighlight,{left:v.measurements.x-3,top:v.measurements.y-3,width:v.measurements.width+6,height:v.measurements.height+6}]}),Ut(h,{pointerEvents:"none",style:[wt.spotlightLabel,{left:v.measurements.x,top:v.measurements.y+v.measurements.height+4}],children:Ut(p,{style:wt.spotlightLabelText,children:v.componentName||v.displayName||v.viewType})})]}),t.map(f=>Ut(h,{pointerEvents:"box-none",nativeID:`__highlight_rect_${f.id}__`,style:[wt.highlight,{left:f.x,top:f.y,width:f.width,height:f.height,borderColor:f.color}],children:f.count>0&&Ut(h,{style:[wt.badge,{backgroundColor:f.color}],nativeID:`__highlight_badge_${f.id}__`,pointerEvents:T?"auto":"none",hitSlop:{top:8,bottom:8,left:8,right:8},onStartShouldSetResponder:()=>!!T,onResponderGrant:()=>b(f.id),children:Ut(p,{style:wt.badgeText,nativeID:`__highlight_text_${f.id}__`,children:f.count})})},`highlight-${f.id}`))]})}l(Cu,"HighlightUpdatesOverlay");var wt=ve.create({overlay:{position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:999999,elevation:999999,borderWidth:0},highlight:{position:"absolute",borderWidth:2,borderStyle:"solid",backgroundColor:"transparent"},badge:{position:"absolute",top:0,right:0,height:14,borderRadius:0,justifyContent:"center",alignItems:"center",paddingHorizontal:2},badgeText:{color:"#000",fontSize:9,fontWeight:"bold"},spotlightHighlight:{position:"absolute",borderWidth:2,borderStyle:"dashed",borderColor:Ir.color.accent,backgroundColor:"transparent"},spotlightLabel:{position:"absolute",backgroundColor:Ir.color.surface,borderWidth:1,borderColor:Ir.color.accent,paddingHorizontal:8,paddingVertical:3,borderRadius:4},spotlightLabelText:{color:Ir.color.accent,fontSize:11,fontWeight:"600",fontFamily:Yh}});import{setRenderCaptureProvider as Zh}from"@buoy-gg/shared-ui/web";Ve();Cn();ha();U();function Tu(e){let t={exportedAt:new Date().toISOString(),totalComponents:e.length,totalRenders:e.reduce((n,r)=>n+r.renderCount,0),components:e.map(n=>({componentName:n.componentName||n.displayName,viewType:n.viewType,nativeTag:n.nativeTag,testID:n.testID,nativeID:n.nativeID,accessibilityLabel:n.accessibilityLabel,renderCount:n.renderCount,firstRenderTime:n.firstRenderTime,lastRenderTime:n.lastRenderTime,lastRenderCause:n.lastRenderCause?{type:n.lastRenderCause.type,componentCause:n.lastRenderCause.componentCause,changedKeys:n.lastRenderCause.changedKeys,hookChanges:n.lastRenderCause.hookChanges?.map(r=>({type:r.type,index:r.index,description:r.description}))}:null,renderHistory:n.renderHistory?.map(r=>({renderNumber:r.renderNumber,timestamp:r.timestamp,cause:{type:r.cause.type,componentCause:r.cause.componentCause,changedKeys:r.cause.changedKeys}}))}))};return JSON.stringify(t,null,2)}l(Tu,"generateRendersJson");try{Zh({isSupported:Tt.isSupported,start:Tt.startCapture,stop:Tt.stopCapture,startLiveHighlights:l(()=>{try{let e=E.isEnabled(),t=E.getHighlightsSuppressed();return E.enable(),()=>{try{e?t&&E.setHighlightsSuppressed(true):E.disable()}catch{}}}catch{return null}},"startLiveHighlights")})}catch{}var ep=l(e=>{let{RenderTracker:t}=(Ve(),Hu(va));return t.onRenderEvent(e)},"onRenderEvent");export{Ge as CAUSE_CONFIG,ln as COMPONENT_CAUSE_CONFIG,Tt as CommitProfiler,fi as HighlightFilterView,Rc as HighlightToolView,E as HighlightUpdatesController,ur as HighlightUpdatesModal,Cu as HighlightUpdatesOverlay,Qe as PerformanceLogger,qo as RenderCauseBadge,oi as RenderDetailView,Ti as RenderHistoryFooter,Ci as RenderHistoryViewer,Zs as RenderListItem,B as RenderTracker,xs as TwoLevelCauseBadge,Xe as VIEW_TYPE_MAP,Bl as capturePropsSnapshot,Vl as captureStateSnapshot,To as clearRenderCauseState,Pc as createHighlightUpdatesModalTool,kc as createHighlightUpdatesTool,$n as detectRenderCause,ci as detectedItemTestID,La as disableProfilerLogging,za as enableProfilerLogging,Tu as generateRendersJson,ga as getAllComponentNames,da as getAllNativeViewTypes,vn as getComponentDisplayName,ca as getNativeViewType,zl as getRenderCauseStats,Vh as highlightUpdatesModalPreset,Bh as highlightUpdatesPreset,qh as highlightUpdatesSyncAdapter,ht as identifierSlug,Or as installProfilerInterceptor,Io as isCapturingBuoyToolRenders,Na as isInterceptorInstalled,ua as isKnownViewType,Ba as isLoggingEnabled,ep as onRenderEvent,ui as patternChipTestID,Nl as removeRenderCauseState,si as renderRowTestID,Ee as safeCloneForHistory,Fl as setCaptureBuoyToolRenders,$r as setComparisonCallback,pt as settingTestID,_r as uninstallProfilerInterceptor};
|