@buoy-gg/shared-ui 7.0.77 → 7.0.79
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/lib/commonjs/JsModal.js +1 -1
- package/lib/commonjs/bugCase/capture.js +1 -1
- package/lib/commonjs/bugCase/format.js +1 -1
- package/lib/commonjs/bugCase/index.js +1 -1
- package/lib/commonjs/bugCase/lock.js +1 -1
- package/lib/commonjs/bugCase/recorder.js +1 -1
- package/lib/commonjs/bugCase/scrub.js +1 -1
- package/lib/commonjs/bugCase/steps.js +1 -1
- package/lib/commonjs/bugCase/validate.js +1 -0
- package/lib/commonjs/dataViewer/LiveExplorer.js +1 -1
- package/lib/commonjs/dataViewer/SplitDiffViewer.js +1 -1
- package/lib/commonjs/dataViewer/ThemedSplitView.js +1 -1
- package/lib/commonjs/dataViewer/VirtualizedDataExplorer.js +1 -1
- package/lib/commonjs/dataViewer/flattenTree.js +1 -0
- package/lib/commonjs/dataViewer/liveEntries.js +1 -0
- package/lib/commonjs/history/components/HistoryList.js +1 -1
- package/lib/commonjs/icons/index.js +1 -1
- package/lib/commonjs/index.js +1 -1
- package/lib/commonjs/license/BuoyUpgradeSheet.js +1 -1
- package/lib/commonjs/license/FreeAccountPrompt.js +1 -1
- package/lib/commonjs/license/index.js +1 -1
- package/lib/commonjs/settings/components/BubbleSettingsSection.js +1 -1
- package/lib/commonjs/sync/keyedArrays.js +1 -1
- package/lib/commonjs/sync/valuePath.js +1 -1
- package/lib/commonjs/ui/components/ChipStrip.js +1 -1
- package/lib/commonjs/ui/components/DataInspector.js +1 -1
- package/lib/commonjs/ui/components/DetailView.js +1 -1
- package/lib/commonjs/ui/components/DynamicFilterView.js +1 -1
- package/lib/commonjs/ui/components/EntityFilterView.js +1 -1
- package/lib/commonjs/ui/components/EventHistoryViewer/EventHistoryViewer.js +1 -1
- package/lib/commonjs/ui/components/EventHistoryViewer/EventPickerModal.js +1 -1
- package/lib/commonjs/ui/components/WindowControls.js +1 -1
- package/lib/commonjs/ui/floating/FloatingTool.js +1 -1
- package/lib/commonjs/ui/listPresets.js +1 -1
- package/lib/commonjs/utils/index.js +1 -1
- package/lib/commonjs/utils/loadOptionalModule.js +1 -1
- package/lib/commonjs/utils/loadToolModule.js +1 -1
- package/lib/commonjs/utils/minimalSuperJSON.js +1 -1
- package/lib/commonjs/utils/persistentStorage.js +1 -1
- package/lib/commonjs/utils/reloadPlatform.js +1 -1
- package/lib/commonjs/utils/snapshotProviderKit.js +1 -1
- package/lib/module/JsModal.js +1 -1
- package/lib/module/bugCase/capture.js +1 -1
- package/lib/module/bugCase/format.js +2 -2
- package/lib/module/bugCase/index.js +1 -1
- package/lib/module/bugCase/lock.js +1 -1
- package/lib/module/bugCase/recorder.js +1 -1
- package/lib/module/bugCase/scrub.js +1 -1
- package/lib/module/bugCase/steps.js +1 -1
- package/lib/module/bugCase/validate.js +1 -0
- package/lib/module/dataViewer/LiveExplorer.js +1 -1
- package/lib/module/dataViewer/SplitDiffViewer.js +1 -1
- package/lib/module/dataViewer/ThemedSplitView.js +1 -1
- package/lib/module/dataViewer/VirtualizedDataExplorer.js +1 -1
- package/lib/module/dataViewer/flattenTree.js +1 -0
- package/lib/module/dataViewer/liveEntries.js +1 -0
- package/lib/module/history/components/HistoryList.js +1 -1
- package/lib/module/icons/index.js +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/license/BuoyUpgradeSheet.js +1 -1
- package/lib/module/license/FreeAccountPrompt.js +1 -1
- package/lib/module/license/index.js +1 -1
- package/lib/module/settings/components/BubbleSettingsSection.js +1 -1
- package/lib/module/sync/keyedArrays.js +1 -1
- package/lib/module/sync/valuePath.js +1 -1
- package/lib/module/ui/components/ChipStrip.js +1 -1
- package/lib/module/ui/components/DataInspector.js +1 -1
- package/lib/module/ui/components/DetailView.js +1 -1
- package/lib/module/ui/components/DynamicFilterView.js +1 -1
- package/lib/module/ui/components/EntityFilterView.js +1 -1
- package/lib/module/ui/components/EventHistoryViewer/EventHistoryViewer.js +1 -1
- package/lib/module/ui/components/EventHistoryViewer/EventPickerModal.js +1 -1
- package/lib/module/ui/components/WindowControls.js +1 -1
- package/lib/module/ui/floating/FloatingTool.js +1 -1
- package/lib/module/ui/listPresets.js +1 -1
- package/lib/module/utils/index.js +1 -1
- package/lib/module/utils/loadOptionalModule.js +1 -1
- package/lib/module/utils/loadToolModule.js +1 -1
- package/lib/module/utils/minimalSuperJSON.js +1 -1
- package/lib/module/utils/persistentStorage.js +1 -1
- package/lib/module/utils/reloadPlatform.js +1 -1
- package/lib/module/utils/snapshotProviderKit.js +1 -1
- package/lib/typescript/commonjs/JsModal.d.ts +6 -0
- package/lib/typescript/commonjs/JsModal.web.d.ts +2 -0
- package/lib/typescript/commonjs/bugCase/index.d.ts +1 -0
- package/lib/typescript/commonjs/bugCase/recorder.d.ts +1 -0
- package/lib/typescript/commonjs/bugCase/steps.d.ts +6 -0
- package/lib/typescript/commonjs/bugCase/validate.d.ts +14 -0
- package/lib/typescript/commonjs/dataViewer/flattenTree.d.ts +35 -0
- package/lib/typescript/commonjs/dataViewer/liveEntries.d.ts +19 -0
- package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/commonjs/icons/index.d.ts +1 -0
- package/lib/typescript/commonjs/index.d.ts +2 -2
- package/lib/typescript/commonjs/license/BuoyUpgradeSheet.d.ts +8 -0
- package/lib/typescript/commonjs/license/index.d.ts +1 -1
- package/lib/typescript/commonjs/sync/keyedArrays.d.ts +6 -1
- package/lib/typescript/commonjs/ui/floating/FloatingTool.d.ts +6 -1
- package/lib/typescript/commonjs/ui/listPresets.d.ts +2 -2
- package/lib/typescript/commonjs/utils/index.d.ts +1 -1
- package/lib/typescript/commonjs/utils/minimalSuperJSON.d.ts +4 -2
- package/lib/typescript/commonjs/utils/persistentStorage.d.ts +6 -0
- package/lib/typescript/module/JsModal.d.ts +6 -0
- package/lib/typescript/module/JsModal.web.d.ts +2 -0
- package/lib/typescript/module/bugCase/index.d.ts +1 -0
- package/lib/typescript/module/bugCase/recorder.d.ts +1 -0
- package/lib/typescript/module/bugCase/steps.d.ts +6 -0
- package/lib/typescript/module/bugCase/validate.d.ts +14 -0
- package/lib/typescript/module/dataViewer/flattenTree.d.ts +35 -0
- package/lib/typescript/module/dataViewer/liveEntries.d.ts +19 -0
- package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/module/icons/index.d.ts +1 -0
- package/lib/typescript/module/index.d.ts +2 -2
- package/lib/typescript/module/license/BuoyUpgradeSheet.d.ts +8 -0
- package/lib/typescript/module/license/index.d.ts +1 -1
- package/lib/typescript/module/sync/keyedArrays.d.ts +6 -1
- package/lib/typescript/module/ui/floating/FloatingTool.d.ts +6 -1
- package/lib/typescript/module/ui/listPresets.d.ts +2 -2
- package/lib/typescript/module/utils/index.d.ts +1 -1
- package/lib/typescript/module/utils/minimalSuperJSON.d.ts +4 -2
- package/lib/typescript/module/utils/persistentStorage.d.ts +6 -0
- package/lib/web/chunks/chunk-36A4T5PL.mjs +1 -0
- package/lib/web/chunks/{chunk-XUYN4NOF.mjs → chunk-5UII72AQ.mjs} +1 -1
- package/lib/web/chunks/chunk-A3N3WVKC.mjs +1 -0
- package/lib/web/chunks/chunk-AVRGPBZK.mjs +6 -0
- package/lib/web/chunks/chunk-JTNYUDJZ.mjs +1 -0
- package/lib/web/chunks/{chunk-BMITMQVB.mjs → chunk-LADTE6U4.mjs} +3 -3
- package/lib/web/chunks/chunk-N5Z7Z2GY.mjs +1 -0
- package/lib/web/chunks/chunk-SAWSKX4E.mjs +6 -0
- package/lib/web/chunks/{chunk-OVTASJUJ.mjs → chunk-SUG6TLF5.mjs} +1 -1
- package/lib/web/chunks/{chunk-GTRVOJUH.mjs → chunk-UVVRCZX5.mjs} +1 -1
- package/lib/web/chunks/chunk-Y7FM4WZ7.mjs +6 -0
- package/lib/web/chunks/chunk-ZRZQZF2T.mjs +15 -0
- package/lib/web/chunks/persistentStorage.web-IBLIV62L.mjs +1 -0
- package/lib/web/dataViewer.mjs +2 -2
- package/lib/web/history.mjs +1 -1
- package/lib/web/index.mjs +6 -6
- package/lib/web/ui.mjs +1 -1
- package/lib/web/utils.mjs +1 -1
- package/package.json +5 -5
- package/lib/web/chunks/chunk-DJD42EPL.mjs +0 -1
- package/lib/web/chunks/chunk-GN75GBYZ.mjs +0 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";import{e as fe}from"./chunk-FPMEM2QO.mjs";import{d as j}from"./chunk-N5Z7Z2GY.mjs";import{A as N,B as q,H as U,I as r,W as ge,r as T,s as m,t as w,v as A,y as V}from"./chunk-QXVVA64P.mjs";import{a as l}from"./chunk-T6T3FEMU.mjs";import{useCallback as he,useEffect as Se,useRef as z,useState as K}from"react";var B=new Map;function X(e){try{return JSON.parse(e)}catch{return}}l(X,"defaultParse");function _(e,t,s={}){let[n,o]=K(()=>B.has(e)?B.get(e):t),[v,h]=K(()=>B.has(e)),u=z(e);u.current=e;let d=z(s);d.current=s,Se(()=>{if(B.has(e)){o(B.get(e)),h(true);return}let c=false,y=d.current.storage??j,p=d.current.parse??X;return y.getItem(e).then(S=>{if(!c){if(S!=null){let f;try{f=p(S)}catch{}f!==void 0&&(B.set(e,f),o(f))}h(true)}}).catch(()=>{c||h(true)}),()=>{c=true}},[e]);let I=he(c=>{o(y=>{let p=typeof c=="function"?c(y):c;B.set(u.current,p);let S=d.current.storage??j,f=d.current.serialize??JSON.stringify;try{S.setItem(u.current,f(p)).catch(()=>{})}catch{}return p})},[]);return[n,I,v]}l(_,"usePersistedState");function Q(){B.clear()}l(Q,"resetPersistedStateCache");import{useCallback as F,useEffect as Z,useMemo as me,useState as D}from"react";function ee(e,t={}){let[s,n]=D(()=>e.getAll()),[o,v]=D(()=>t.initialFilter??{}),[h,u]=D(()=>e.getEnabled());Z(()=>e.subscribe(n),[e]);let d=t.filterItems,I=me(()=>d?d(s,o):s,[s,o,d]),c=F(()=>{e.clear()},[e]),y=F(()=>{let S=!h;e.setEnabled(S),u(S)},[e,h]),p=F(S=>e.getById(S),[e]);return{items:s,filteredItems:I,filter:o,setFilter:v,isEnabled:h,toggleCapture:y,clear:c,getById:p}}l(ee,"useChangeLog");function te(e,t){let[s,n]=D(e);return Z(()=>t(n),[t]),s}l(te,"useSubscribedValue");import{useCallback as ye,useEffect as pe,useState as se}from"react";function ae(e,t={}){let{enabled:s=true,maxEvents:n=500,select:o}=t,[v,h]=se([]),[u,d]=se(s);pe(()=>{if(!s){d(false);return}let c=null,y=null,p=e.subscribeToEvents(S=>{y=S,c==null&&(c=requestAnimationFrame(()=>{if(c=null,!y)return;let f=y;y=null,o&&(f=o(f)),f.length>n&&(f=f.slice(0,n)),h(f)}))});return d(true),()=>{p(),c!=null&&cancelAnimationFrame(c)}},[e,s,n,o]);let I=ye(()=>{e.clearEvents()},[e]);return{events:v,clearEvents:I,isActive:u}}l(ae,"useEventStoreEvents");import{useState as b,useEffect as C,useCallback as be}from"react";async function J(){let[e,t,s]=await Promise.all([m.isScreenReaderEnabled(),m.isReduceMotionEnabled(),m.isReduceTransparencyEnabled()]),n={isScreenReaderEnabled:e,isReduceMotionEnabled:t,isReduceTransparencyEnabled:s};if(r.OS==="ios"){let[o,v,h,u,d]=await Promise.all([m.isBoldTextEnabled?.()??Promise.resolve(false),m.isGrayscaleEnabled?.()??Promise.resolve(false),m.isInvertColorsEnabled?.()??Promise.resolve(false),m.isDarkerSystemColorsEnabled?.()??Promise.resolve(false),m.prefersCrossFadeTransitions?.()??Promise.resolve(false)]);n.isBoldTextEnabled=o,n.isGrayscaleEnabled=v,n.isInvertColorsEnabled=h,n.isDarkerSystemColorsEnabled=u,n.prefersCrossFadeTransitions=d}if(r.OS==="android"){let o=await m.isHighTextContrastEnabled?.()??false;n.isHighTextContrastEnabled=o}return n}l(J,"getAccessibilitySettings");function O(){let e=r.constants,t={os:r.OS,version:r.Version,reactNativeVersion:e.reactNativeVersion,isTesting:r.isTesting??false,isDisableAnimations:e.isDisableAnimations??false};return r.OS==="ios"?{...t,osVersion:e.osVersion,systemName:e.systemName,interfaceIdiom:e.interfaceIdiom,isPad:r.isPad,isTV:r.isTV,isVision:r.isVision??false,isMacCatalyst:r.isMacCatalyst??false,forceTouchAvailable:e.forceTouchAvailable}:r.OS==="android"?{...t,apiLevel:e.Version,release:e.Release,brand:e.Brand,manufacturer:e.Manufacturer,model:e.Model,fingerprint:e.Fingerprint,serial:e.Serial,uiMode:e.uiMode}:t}l(O,"getPlatformInfo");function L(){let e=V.get("window"),t=V.get("screen"),s={window:{width:e.width,height:e.height,scale:e.scale,fontScale:e.fontScale},screen:{width:t.width,height:t.height,scale:t.scale,fontScale:t.fontScale},pixelRatio:U.get(),fontScale:U.getFontScale(),isLandscape:e.width>e.height,isPortrait:e.height>e.width};if(r.OS==="ios")try{let n=T.DeviceInfo?.getConstants?.();s.isIPhoneNotched=n?.isIPhoneX_deprecated??false}catch{s.isIPhoneNotched=false}if(r.OS==="android")try{let n=T.DeviceInfo?.getConstants?.();s.isEdgeToEdge=n?.isEdgeToEdge??false,s.densityDpi=Math.round(e.scale*160)}catch{}return s}l(L,"getDisplayInfo");async function x(){return new Promise(e=>{let t=false;r.OS==="ios"?T.StatusBarManager?.getHeight?.(s=>{t||(t=true,e(s?.height??null))})??e(null):r.OS==="android"?(t=true,e(ge.currentHeight??null)):(t=true,e(null)),setTimeout(()=>{t||(t=true,e(null))},100)})}l(x,"getStatusBarHeight");function P(){let e={isRTL:N.isRTL,doLeftAndRightSwapInRTL:N.doLeftAndRightSwapInRTL};return r.OS==="android"&&(e.localeIdentifier=N.localeIdentifier),e}l(P,"getLocaleInfo");function R(){if(r.OS==="ios")try{return{userDefaults:T.SettingsManager?.getConstants?.()?.settings??{}}}catch{return{}}return{}}l(R,"getSettingsInfo");function k(){let e={};if(r.OS==="android"){let t=r.constants;e.serial=t.Serial,e.fingerprint=t.Fingerprint;try{let s=T.PlatformConstants;s?.getAndroidID&&(e.androidId=s.getAndroidID())}catch{}}return e}l(k,"getUniqueIdentifiers");function ie(e){let t=[e.platform.os,e.platform.version,e.display.window.width,e.display.window.height,e.display.pixelRatio,e.platform.interfaceIdiom??"",e.platform.forceTouchAvailable??false,e.display.isIPhoneNotched??false,e.platform.model??"",e.platform.brand??"",e.platform.manufacturer??"",e.platform.uiMode??""].join("|"),s=0;for(let n=0;n<t.length;n++){let o=t.charCodeAt(n);s=(s<<5)-s+o,s=s&s}return Math.abs(s).toString(16).padStart(8,"0")}l(ie,"generateFingerprint");function ne(){let[e,t]=b(true),[s,n]=b(O()),[o,v]=b(L()),[h,u]=b({isScreenReaderEnabled:false,isReduceMotionEnabled:false,isReduceTransparencyEnabled:false}),[d,I]=b(()=>{let g=w.getColorScheme()??null;return{colorScheme:g,prefersDarkMode:g==="dark"}}),[c,y]=b(P()),[p,S]=b({height:null,isVisible:true}),[f,H]=b({isVisible:false,height:0,animationDuration:0}),[G,le]=b({currentState:A.currentState,isActive:A.currentState==="active"}),[W,ce]=b(k()),[Y,ue]=b(R()),[$,de]=b(Date.now()),M=be(async()=>{t(true);let[g,a]=await Promise.all([J(),x()]);n(O()),v(L()),u(g);let i=w.getColorScheme()??null;I({colorScheme:i,prefersDarkMode:i==="dark"}),y(P()),S(E=>({...E,height:a})),ce(k()),ue(R()),de(Date.now()),t(false)},[]);return C(()=>{M()},[M]),C(()=>{let g=V.addEventListener("change",({window:a,screen:i})=>{v(E=>({...E,window:{width:a.width,height:a.height,scale:a.scale,fontScale:a.fontScale},screen:{width:i.width,height:i.height,scale:i.scale,fontScale:i.fontScale},isLandscape:a.width>a.height,isPortrait:a.height>a.width}))});return()=>g.remove()},[]),C(()=>{let g=w.addChangeListener(({colorScheme:a})=>{let i=a??null;I({colorScheme:i,prefersDarkMode:i==="dark"})});return()=>g.remove()},[]),C(()=>{let g=q.addListener(r.OS==="ios"?"keyboardWillShow":"keyboardDidShow",i=>{H({isVisible:true,height:i.endCoordinates.height,animationDuration:i.duration??0})}),a=q.addListener(r.OS==="ios"?"keyboardWillHide":"keyboardDidHide",i=>{H({isVisible:false,height:0,animationDuration:i.duration??0})});return()=>{g.remove(),a.remove()}},[]),C(()=>{let g=fe(a=>{le({currentState:a,isActive:a==="active"})});return()=>g.remove()},[]),C(()=>{let g=[m.addEventListener("screenReaderChanged",a=>{u(i=>({...i,isScreenReaderEnabled:a}))}),m.addEventListener("reduceMotionChanged",a=>{u(i=>({...i,isReduceMotionEnabled:a}))}),m.addEventListener("reduceTransparencyChanged",a=>{u(i=>({...i,isReduceTransparencyEnabled:a}))})];if(r.OS==="ios"){let a=l((i,E)=>m.addEventListener(i,E),"addIOSListener");g.push(a("boldTextChanged",i=>{u(E=>({...E,isBoldTextEnabled:i}))}),a("grayscaleChanged",i=>{u(E=>({...E,isGrayscaleEnabled:i}))}),a("invertColorsChanged",i=>{u(E=>({...E,isInvertColorsEnabled:i}))}))}return()=>{g.forEach(a=>a.remove())}},[]),{platform:s,display:o,accessibility:h,appearance:d,locale:c,statusBar:p,keyboard:f,appState:G,identifiers:W,settings:Y,timestamp:$,isLoading:e,refresh:M,generateFingerprint:l(()=>ie({platform:s,display:o,accessibility:h,appearance:d,locale:c,statusBar:p,keyboard:f,appState:G,identifiers:W,settings:Y,timestamp:$,isLoading:e}),"generateFingerprint")}}l(ne,"useDeviceInfo");async function re(){let[e,t]=await Promise.all([J(),x()]),s=w.getColorScheme()??null;return{platform:O(),display:L(),accessibility:e,appearance:{colorScheme:s,prefersDarkMode:s==="dark"},locale:P(),statusBar:{height:t,isVisible:true},keyboard:{isVisible:false,height:0,animationDuration:0},appState:{currentState:A.currentState,isActive:A.currentState==="active"},identifiers:k(),settings:R(),timestamp:Date.now(),isLoading:false}}l(re,"getDeviceInfo");function oe(e){console.log("[Buoy]",`
|
|
2
|
+
========================================`),console.log("[Buoy]"," DEVICE INFO REPORT"),console.log("[Buoy]",`========================================
|
|
3
|
+
`),console.log("[Buoy]","--- PLATFORM ---"),console.log("[Buoy]",JSON.stringify(e.platform,null,2)),console.log("[Buoy]",`
|
|
4
|
+
--- DISPLAY ---`),console.log("[Buoy]",JSON.stringify(e.display,null,2)),console.log("[Buoy]",`
|
|
5
|
+
--- ACCESSIBILITY ---`),console.log("[Buoy]",JSON.stringify(e.accessibility,null,2)),console.log("[Buoy]",`
|
|
6
|
+
--- APPEARANCE ---`),console.log("[Buoy]",JSON.stringify(e.appearance,null,2)),console.log("[Buoy]",`
|
|
7
|
+
--- LOCALE ---`),console.log("[Buoy]",JSON.stringify(e.locale,null,2)),console.log("[Buoy]",`
|
|
8
|
+
--- STATUS BAR ---`),console.log("[Buoy]",JSON.stringify(e.statusBar,null,2)),console.log("[Buoy]",`
|
|
9
|
+
--- KEYBOARD ---`),console.log("[Buoy]",JSON.stringify(e.keyboard,null,2)),console.log("[Buoy]",`
|
|
10
|
+
--- APP STATE ---`),console.log("[Buoy]",JSON.stringify(e.appState,null,2)),console.log("[Buoy]",`
|
|
11
|
+
--- IDENTIFIERS ---`),console.log("[Buoy]",JSON.stringify(e.identifiers,null,2)),console.log("[Buoy]",`
|
|
12
|
+
--- SETTINGS ---`);let t=Object.keys(e.settings.userDefaults??{});console.log("[Buoy]",`userDefaults: ${t.length} keys`),t.length>0&&t.length<=20&&console.log("[Buoy]",JSON.stringify(e.settings,null,2)),console.log("[Buoy]",`
|
|
13
|
+
--- METADATA ---`),console.log("[Buoy]",`timestamp: ${e.timestamp}`),console.log("[Buoy]",`isLoading: ${e.isLoading}`),console.log("[Buoy]",`
|
|
14
|
+
========================================
|
|
15
|
+
`)}l(oe,"logDeviceInfo");export{_ as a,Q as b,ee as c,te as d,ae as e,ne as f,re as g,oe as h};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{d as e,e as s,f as t}from"./chunk-N5Z7Z2GY.mjs";import"./chunk-T6T3FEMU.mjs";export{t as getStorageBackendType,s as isUsingPersistentStorage,e as persistentStorage};
|
package/lib/web/dataViewer.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{a as Un,b as Gn,c as Jn,d as qn,e as Kn}from"./chunks/chunk-NOSWH3E2.mjs";import{Q as Sr}from"./chunks/chunk-BMITMQVB.mjs";import"./chunks/chunk-XUYN4NOF.mjs";import"./chunks/chunk-4YLP5MMN.mjs";import{a as y}from"./chunks/chunk-GF5C5DVX.mjs";import"./chunks/chunk-4QFANR3K.mjs";import{e as Dr,h as Br}from"./chunks/chunk-DJD42EPL.mjs";import{Bc as Ir,Kc as Lt,Vb as ut,Xb as Ar,Yb as jt,_b as Rr,cc as Fr,sd as S,vc as Er}from"./chunks/chunk-OVTASJUJ.mjs";import{a as A,d as U,f as ae}from"./chunks/chunk-AHVO74UQ.mjs";import"./chunks/chunk-FPMEM2QO.mjs";import"./chunks/chunk-EY7GXWGI.mjs";import{N as Mt,a as le,b as h,c as f,d as N,e as Ot,f as Y,j as Pt}from"./chunks/chunk-QXVVA64P.mjs";import"./chunks/chunk-SBYYOE2T.mjs";import{a as u}from"./chunks/chunk-T6T3FEMU.mjs";import{useState as Qn,useMemo as Nr}from"react";import{useState as Re,useMemo as Ht,useCallback as Ee,useRef as ke,useEffect as ht,memo as $t}from"react";import{memo as _n,useMemo as Xn}from"react";import{jsx as Vr}from"react/jsx-runtime";var Zn="4D",Yn="80",gt=_n(({items:e,visibleRange:r,itemHeight:t,indentWidth:n,activeDepth:o=-1})=>{let s=Xn(()=>{let i=Math.max(0,r.start),a=Math.min(e.length-1,r.end);if(i>a||e.length===0)return[];let l=0;for(let d=i;d<=a;d++){let p=e[d]?.depth??0;p>l&&(l=p)}let c=[];for(let d=1;d<=l;d++){let p=(d-.5)*n,b=Math.round(p)+.5,m=[],D=-1,B=-1;for(let R=i;R<=a;R++)(e[R]?.depth??0)>=d?(D===-1&&(D=R),B=R):D!==-1&&(m.push({startIndex:D,endIndex:B}),D=-1,B=-1);D!==-1&&m.push({startIndex:D,endIndex:B}),m.length>0&&c.push({depth:d,left:b,segments:m})}return c},[e,r,t,n]);return Vr(h,{pointerEvents:"none",style:Wr.overlay,children:s.map(i=>i.segments.map((a,l)=>{let c=(a.startIndex-r.start)*t,d=(a.endIndex-a.startIndex+1)*t,p=i.depth===o;return Vr(h,{style:[Wr.line,{left:i.left,top:c,height:d,backgroundColor:`${U.primary}${p?Yn:Zn}`}]},`${i.depth}-${l}`)}))})});gt.displayName="IndentGuidesOverlay";var Wr=le.create({overlay:{position:"absolute",left:0,right:0,top:0,bottom:0,zIndex:1},line:{position:"absolute",width:1}});import{Fragment as eo,jsx as H,jsxs as ge}from"react/jsx-runtime";var zr={top:10,bottom:10,left:10,right:10},Ie=24,to=24,et=50,ft=15,ro=500;var no=300,Ut=16,Lr=Array.from({length:ft+1},(e,r)=>le.create({container:{marginLeft:r*Ut}}).container),oo=new Map([["string",U.dataTypes.string],["number",U.dataTypes.number],["bigint",U.optional],["boolean",U.dataTypes.boolean],["null",U.dataTypes.null],["undefined",U.dataTypes.undefined],["function",U.dataTypes.function],["symbol",U.critical],["date",U.critical],["error",U.error],["array",U.dataTypes.array],["object",U.dataTypes.object],["map",U.info],["set",U.success],["circular",U.warning]]),M=le.create({container:{backgroundColor:y.color.bg,borderRadius:8,borderWidth:1,borderColor:y.color.border},header:{flexDirection:"column",paddingHorizontal:16,paddingVertical:12},headerRow:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:6},title:{color:U.primary,fontSize:14,fontWeight:"500"},description:{color:U.secondary,fontSize:12,marginTop:2},typeLegend:{flexDirection:"row",flexWrap:"wrap",gap:6,marginTop:8,paddingTop:8,borderTopWidth:1,borderTopColor:U.primary+"14"},typeBadge:{flexDirection:"row",alignItems:"center",paddingHorizontal:6,paddingVertical:2,borderRadius:4,borderWidth:1},typeColor:{width:8,height:8,borderRadius:4,marginRight:4},typeName:{fontSize:10,fontWeight:"500",color:U.secondary},itemContainer:{minHeight:Ie,backgroundColor:"transparent",position:"relative",flexDirection:"row",alignItems:"flex-start"},itemTouchable:{flex:1,flexDirection:"row",alignItems:"flex-start",paddingLeft:0,paddingRight:16,paddingVertical:2,minHeight:24},itemTouchablePressed:{backgroundColor:U.primary+"0A"},itemSelected:{backgroundColor:U.primary+"14"},expanderContainer:{width:16,alignItems:"center",justifyContent:"center",marginTop:4},expanderIcon:{width:12,height:12},labelContainer:{flex:1,flexDirection:"row",alignItems:"flex-start",paddingLeft:2},labelContainerVertical:{flex:1,flexDirection:"column",paddingLeft:2,paddingVertical:2},labelContainerVerticalRow:{flexDirection:"row",alignItems:"center",marginBottom:2},labelText:{color:U.primary,fontSize:12,fontWeight:"500",fontFamily:S,marginRight:8,flexShrink:1},labelTextTruncated:{color:U.primary,fontSize:12,fontWeight:"500",fontFamily:S,flexShrink:1},valueText:{fontSize:12,fontFamily:S,flex:1,color:U.primaryLight},loadingContainer:{padding:16,alignItems:"center"},loadingText:{color:U.secondary,fontSize:12},noDataContainer:{padding:16,alignItems:"center"},noDataText:{color:U.secondary,fontSize:12},listContent:{paddingBottom:8},headerTouchable:{flex:1,flexDirection:"row",alignItems:"center"},expanderMargin:{marginLeft:8}});function pt(e){return{path:e.path.slice(1),value:e.value,label:e.key}}u(pt,"selectionOf");function mt(e,r,t=0){if(t>=r)return t;let n=t+1;if(Array.isArray(e))for(let o of e){if(n>=r)return n;n=mt(o,r,n)}else if(e!==null&&typeof e=="object")for(let o of Object.values(e)){if(n>=r)return n;n=mt(o,r,n)}return n}u(mt,"countNodesUpTo");var io=u(e=>e===null?"null":e===void 0?"undefined":Array.isArray(e)?"array":e instanceof Date?"date":e instanceof Error?"error":e instanceof Map?"map":e instanceof Set?"set":e instanceof RegExp?"regexp":typeof e=="function"?"function":typeof e=="symbol"?"symbol":typeof e=="bigint"?"bigint":typeof e=="object"?"object":typeof e,"getValueType"),ao=u((e,r)=>{if(e===null)return 0;switch(r){case"array":return Array.isArray(e)?e.length:0;case"object":return typeof e=="object"&&!(e instanceof Date)&&!(e instanceof Error)&&!(e instanceof RegExp)&&!(e instanceof Map)&&!(e instanceof Set)?Object.keys(e).length:0;case"map":return e instanceof Map?e.size:0;case"set":return e instanceof Set?e.size:0;default:return 0}},"getValueCount"),lo=u((e,r)=>{if(e===null)return"null";if(e===void 0)return"undefined";switch(r){case"string":return`"${String(e)}"`;case"boolean":return e===true?"true":"false";case"function":return typeof e=="function"?e.toString().slice(0,50)+"...":"undefined";case"symbol":return typeof e=="symbol"?String(e):"undefined";case"date":return e instanceof Date?e.toISOString():"undefined";case"regexp":return e instanceof RegExp?e.toString():"undefined";case"bigint":return typeof e=="bigint"?e.toString()+"n":"undefined";case"error":return e instanceof Error?`${e.name}: ${e.message}`:"undefined";default:return Dr(e)}},"formatValue"),jr=u(e=>oo.get(e)||U.dataTypes.array,"getTypeColor"),Mr=u(({expanded:e,onPress:r})=>H(Y,{"sentry-label":"ignore devtools data explorer expander",style:M.expanderContainer,onPress:r,hitSlop:zr,children:H(h,{style:M.expanderIcon,children:H(Ar,{size:12,color:U.secondary,strokeWidth:2,style:{transform:[{rotate:e?"90deg":"0deg"}]}})})}),"ExpanderComponent");Mr.displayName="Expander";var Or=$t(Mr),Pr=u(({visibleTypes:e})=>{let r=Array.from(new Set(e)).slice(0,8);return H(h,{style:M.typeLegend,children:r.map(t=>{let n=jr(t);return ge(h,{style:[M.typeBadge,{backgroundColor:`${n}10`,borderColor:`${n}30`}],children:[H(h,{style:[M.typeColor,{backgroundColor:n}]}),H(f,{style:M.typeName,children:t})]},t)})})},"TypeLegendComponent");Pr.displayName="TypeLegend";var so=$t(Pr),co=u((e,r=10,t=false)=>{let[n,o]=Re([]),s=ke(new Map),i=Ee(()=>{let g=new Set(["root"]);return t&&e&&typeof e=="object"&&(Array.isArray(e)?e.forEach((v,T)=>{g.add(`root.${T}`)}):Object.keys(e).forEach(v=>{g.add(`root.${v}`)})),g},[t,e]),[a,l]=Re(()=>i()),[c,d]=Re(false),p=ke(new WeakSet),b=ke(false),m=ke(0),D=ke(0),B=ke(void 0),R=Ee((g,v,T,k="root",w=0,W,$=[],se=0,ne=1,ie=[])=>{if(w>Math.min(r,ft))return[];let X=[...$,k],Z=X.join("."),re=io(g),L=["object","array","map","set"].includes(re)&&g!==null,z=L?ao(g,re):0,_=Math.min(z,ro);if(g&&typeof g=="object"){if(T.has(g))return[{id:Z,key:k,value:"[Circular Reference]",valueType:"circular",depth:w,isExpandable:false,isExpanded:false,parentId:W,hasChildren:false,childCount:0,path:X,type:"circular",isLastChild:se===ne-1,parentHasMoreSiblings:[...ie],siblingIndex:se,totalSiblings:ne}];T.add(g)}let j={id:Z,key:k,value:g,valueType:re,depth:w,isExpandable:L,isExpanded:v.has(Z),parentId:W,hasChildren:_>0,childCount:_,path:X,type:L?"expandable":re,isLastChild:se===ne-1,parentHasMoreSiblings:[...ie],siblingIndex:se,totalSiblings:ne},he=[j];if(L&&v.has(Z)&&w<Math.min(r,ft))try{let Te=[];switch(re){case"array":Te=Array.isArray(g)?g.map((ye,Fe)=>[Fe.toString(),ye]):[];break;case"object":Te=typeof g=="object"&&g!==null&&!(g instanceof Date)&&!(g instanceof Error)&&!(g instanceof RegExp)&&!(g instanceof Map)&&!(g instanceof Set)?Object.entries(g):[];break;case"map":Te=g instanceof Map?Array.from(g.entries()).map(([ye,Fe])=>[String(ye),Fe]):[];break;case"set":Te=g instanceof Set?Array.from(g.values()).map((ye,Fe)=>[Fe.toString(),ye]):[];break}let zt=Te.slice(0,_),Pn=zt.length,Tr=[...ie];w>0&&(Tr[w-1]=!j.isLastChild);for(let ye=0;ye<zt.length;ye+=et){let Fe=zt.slice(ye,ye+et),kr=ye;for(let[Hn,$n]of Fe)he.push(...R($n,v,T,Hn,w+1,Z,X,kr,Pn,Tr)),kr++;if(ye>0&&ye%(et*2)===0)break}}catch(Te){console.error("[Buoy]",Te)}return he},[r]);ht(()=>{if(B.current&&(B.current.type==="expand"||B.current.type==="collapse")){c&&(d(false),b.current=false),B.current=void 0;return}if(b.current)return;let g,v=++m.current,T=u(()=>m.current===v,"isCurrent");return b.current=true,d(true),u(async()=>{if(g=setTimeout(()=>{b.current&&T()&&(d(false),b.current=false)},5e3),await new Promise(k=>setTimeout(()=>k(),10)),!!T())try{p.current=new WeakSet,D.current=Date.now();let k=R(e,a,p.current,"root",0,void 0,[],0,1,[]),w=new Map;k.forEach((W,$)=>{w.set(W.id,{item:W,index:$})}),s.current=w,g&&clearTimeout(g),T()&&(o(k),d(false),b.current=false)}catch(k){console.error("[Buoy]",k),g&&clearTimeout(g),T()&&(o([]),s.current=new Map,d(false),b.current=false)}},"processData")(),()=>{b.current=false,g&&clearTimeout(g)}},[e,a,R,r]);let oe=Ee((g,v)=>{d(false),b.current=false,o(T=>{let k=s.current.get(g);if(!k)return T;let{item:w,index:W}=k;if(v&&w.isExpandable&&w.hasChildren){let $=[...T],se=new WeakSet;w.value&&typeof w.value=="object"&&se.add(w.value);let ne=[];try{let Z=[];switch(w.valueType){case"array":Z=Array.isArray(w.value)?w.value.map((z,_)=>[_.toString(),z]):[];break;case"object":Z=typeof w.value=="object"&&w.value!==null&&!(w.value instanceof Date)&&!(w.value instanceof Error)&&!(w.value instanceof RegExp)&&!(w.value instanceof Map)&&!(w.value instanceof Set)?Object.entries(w.value):[];break;case"map":Z=w.value instanceof Map?Array.from(w.value.entries()).map(([z,_])=>[String(z),_]):[];break;case"set":Z=w.value instanceof Set?Array.from(w.value.values()).map((z,_)=>[_.toString(),z]):[];break}let re=Z.length,L=[...w.parentHasMoreSiblings||[]];w.depth>0&&(L[w.depth-1]=!w.isLastChild),Z.forEach(([z,_],j)=>{let he=R(_,new Set,se,z,w.depth+1,g,w.path,j,re,L);ne.push(...he)})}catch(Z){console.error("[Buoy]",Z)}let ie=ne;ie.length>0,$[W]={...w,isExpanded:true},$.splice(W+1,0,...ie);let X=new Map;return $.forEach((Z,re)=>{X.set(Z.id,{item:Z,index:re})}),s.current=X,$}else if(!v){let $=new Set,se=u((X,Z)=>{T.forEach(re=>{(re.parentId===X||re.id.startsWith(X+".")&&re.depth>Z)&&($.add(re.id),re.hasChildren&&se(re.id,re.depth))})},"findDescendants");se(g,w.depth);let ne=T.map(X=>X.id===g?{...X,isExpanded:false}:X).filter(X=>!$.has(X.id)),ie=new Map;return ne.forEach((X,Z)=>{ie.set(X.id,{item:X,index:Z})}),s.current=ie,ne}return T})},[R]),J=Ee(g=>{l(v=>{let T=new Set(v),k=!T.has(g);return k?T.add(g):T.delete(g),B.current={type:k?"expand":"collapse",itemId:g},oe(g,k),T})},[oe]),x=mt(e,et,0)<et,C=Ht(()=>x?R(e,a,new WeakSet,"root",0,void 0,[],0,1,[]):null,[x,e,a,R]),I=Ee(g=>{g.length!==0&&l(v=>{if(g.every(k=>v.has(k)))return v;let T=new Set(v);for(let k of g)T.add(k);return T})},[]);return{flatData:C??n,isProcessing:C?false:c,toggleExpanded:J,revealPath:I}},"useDataFlattening"),Hr=u(({item:e,onToggleExpanded:r,index:t,onSelect:n,isSelected:o,selectable:s,onRequestInlineEdit:i,isInlineEditing:a,inlineEditor:l,testIDPrefix:c})=>{let[d,p]=Re(false),[b,m]=Re(false),D=s===true,B=ke(0),R=e.path.slice(1),oe=Lr[Math.min(e.depth,ft)]||Lr[0],J=jr(e.valueType),x=false,C=u(()=>{if(D){let T=Date.now(),k=T-B.current<no;if(B.current=T,k&&!e.isExpandable&&i){i(e);return}n(e);return}e.isExpandable&&r(e.id),n(e)},"handlePress"),I=u(()=>{e.isExpandable&&r(e.id),n(e)},"handleExpanderPress"),g=u(()=>{},"handleKeyPress"),v=e.key;return ge(h,{style:[M.itemContainer,oe],children:[ge(Y,{"sentry-label":"ignore devtools data explorer item",testID:`${c}-${e.id}`,accessibilityLabel:`${e.key}: ${e.valueType}`,style:[M.itemTouchable,d&&M.itemTouchablePressed,D&&o&&M.itemSelected,x&&{minHeight:to,paddingVertical:2}],onPress:C,onPressIn:()=>p(true),onPressOut:()=>p(false),activeOpacity:e.isExpandable||D?.7:1,disabled:!e.isExpandable&&!D,children:[e.isExpandable?H(Or,{expanded:e.isExpanded,onPress:I}):H(h,{style:M.expanderContainer}),ge(h,{style:M.labelContainer,children:[ge(f,{style:M.labelText,numberOfLines:1,children:[e.key,":"]}),a&&l?l:e.isExpandable?ge(f,{style:[M.valueText,{color:U.secondary}],numberOfLines:1,children:[e.valueType," (",e.childCount," ",e.childCount===1?"item":"items",")"]}):H(f,{style:[M.valueText,{color:J}],numberOfLines:1,children:lo(e.value,e.valueType)})]})]}),e.value!==void 0?H(Sr,{value:e.value,size:14,buttonStyle:{marginLeft:8,marginRight:8}}):null]})},"VirtualizedItemComponent");Hr.displayName="VirtualizedItem";var uo=$t(Hr),Gt=u(({title:e,description:r,data:t,maxDepth:n=10,rawMode:o=false,initialExpanded:s=false,disableCopy:i=false,onSelectionChange:a,onRequestInlineEdit:l,inlineEditPath:c,renderInlineEditor:d,selectPath:p,testIDPrefix:b="buoy-tree-row"})=>{let[m,D]=Re(o),{flatData:B,isProcessing:R,toggleExpanded:oe,revealPath:J}=co(t,n,s),x=ke(null),[C,I]=Re({start:0,end:Math.min(B.length-1,Math.max(0,Math.ceil(400/Ie)-1))}),g=ke({itemVisiblePercentThreshold:1}),v=ke(({viewableItems:j})=>{let he=j.map(Te=>Te.index).filter(Te=>typeof Te=="number");he.length&&I({start:Math.min(...he),end:Math.max(...he)})}).current;ht(()=>{I({start:0,end:Math.min(B.length-1,Math.max(0,Math.ceil(400/Ie)-1))})},[B.length]);let T=Ht(()=>{let j=new Set;for(let he of B)if(j.add(he.valueType),j.size>=8)break;return Array.from(j)},[B]),k=u(()=>{D(!m)},"toggleMainExpanded"),[w,W]=Re(null),$=Ht(()=>w==null?void 0:B.find(j=>j.id===w),[B,w]),se=$?.depth;ht(()=>{a&&a($?pt($):null)},[$,a]);let ne=Ee(j=>{W(he=>he===j.id?null:j.id)},[]),ie=p===void 0?void 0:p===null?"\0null":p.join("."),X=ke(ie);ht(()=>{if(ie===X.current||(X.current=ie,ie===void 0))return;if(p==null){W(null);return}let j=["root"];for(let he of p.slice(0,-1))j.push(`${j[j.length-1]}.${he}`);J(j),W(["root",...p].join("."))},[ie,p,J]);let Z=Ee(j=>{W(j.id),l?.(pt(j))},[l]),re=u(({item:j,index:he})=>H(uo,{item:j,index:he,onToggleExpanded:oe,onSelect:ne,isSelected:$?.id===j.id,selectable:a!=null,onRequestInlineEdit:Z,isInlineEditing:c!=null&&c.join(".")===j.path.slice(1).join("."),inlineEditor:d?d(pt(j)):null,testIDPrefix:b}),"renderItem"),L=Ie,z=u(j=>j.id,"keyExtractor"),_=t!=null&&(typeof t=="string"?t.length>0:typeof t=="number"||typeof t=="boolean"?true:Array.isArray(t)?t.length>0:typeof t=="object"?Object.keys(t).length>0:false);return o?_?H(h,{style:{minHeight:R?40:B.length*Ie},children:R?H(h,{style:{flex:1,justifyContent:"center",alignItems:"center"},children:ge(f,{style:M.loadingText,children:["Processing data... (raw mode, isProcessing=",String(R),")"]})}):ge(h,{style:{position:"relative",height:B.length*Ie},children:[H(gt,{items:B,visibleRange:{start:0,end:Math.max(0,B.length-1)},itemHeight:Ie,indentWidth:Ut,activeDepth:se}),H(Mt,{ref:x,"sentry-label":"ignore devtools data explorer list",data:B,renderItem:re,keyExtractor:z,showsVerticalScrollIndicator:true,contentContainerStyle:M.listContent,initialNumToRender:15,maxToRenderPerBatch:10,windowSize:10,scrollEnabled:false})]})}):H(h,{style:{flex:1,justifyContent:"center",alignItems:"center",padding:20},children:H(f,{style:M.noDataText,children:"No data available"})}):_?ge(h,{style:M.container,children:[ge(h,{style:M.header,children:[H(h,{style:M.headerRow,children:ge(Y,{"sentry-label":"ignore devtools data explorer header toggle",onPress:k,hitSlop:zr,style:M.headerTouchable,children:[ge(h,{style:{flex:1},children:[H(f,{style:M.title,children:e}),r&&H(f,{style:M.description,children:r})]}),H(h,{style:M.expanderMargin,children:H(Or,{expanded:m,onPress:k})})]})}),m&&T.length>0&&!o&&H(so,{visibleTypes:T})]}),m&&H(eo,{children:R?H(h,{style:M.loadingContainer,children:ge(f,{style:M.loadingText,children:["Processing data... (isProcessing=",String(R),")"]})}):ge(h,{style:{height:B.length*Ie,position:"relative"},children:[H(gt,{items:B,visibleRange:C,itemHeight:Ie,indentWidth:Ut,activeDepth:se}),H(Mt,{ref:x,"sentry-label":"ignore devtools data explorer collapsed list",data:B,renderItem:re,keyExtractor:z,showsVerticalScrollIndicator:true,contentContainerStyle:M.listContent,initialNumToRender:15,maxToRenderPerBatch:10,windowSize:10,scrollEnabled:false,onViewableItemsChanged:v,viewabilityConfig:g.current})]})})]}):ge(h,{style:M.container,children:[H(h,{style:M.header,children:H(h,{style:M.headerRow,children:ge(h,{style:{flex:1},children:[H(f,{style:M.title,children:e}),r&&H(f,{style:M.description,children:r})]})})}),H(h,{style:M.noDataContainer,children:H(f,{style:M.noDataText,children:"No data available"})})]})},"VirtualizedDataExplorer");import{jsx as Jt,jsxs as ho}from"react/jsx-runtime";var go=u(e=>({string:A.dataTypes.string,number:A.dataTypes.number,bigint:A.semantic.debug,boolean:A.dataTypes.boolean,null:A.dataTypes.null,undefined:A.dataTypes.undefined,function:A.dataTypes.function,symbol:A.semantic.error,date:A.semantic.error,error:A.semantic.error,array:A.dataTypes.array,object:A.dataTypes.object})[e]||A.text.secondary,"getTypeColor"),$r=u(({types:e,activeFilter:r,onFilterChange:t})=>{if(e.length===0)return null;let n=u(o=>{t(r===o?null:o)},"handleTypeFilter");return Jt(h,{style:tt.typeLegend,children:e.map(o=>{let s=go(o),i=r===o;return ho(Y,{"sentry-label":"ignore devtools type legend filter",style:[tt.typeBadge,i&&tt.typeBadgeActive,{borderColor:i?s:A.text.primary+"1A"}],onPress:()=>n(o),accessibilityLabel:`Filter by ${o} values`,children:[Jt(h,{style:[tt.typeColor,{backgroundColor:s}]}),Jt(f,{style:[tt.typeName,i&&{color:s}],children:o})]},o)})})},"TypeLegend"),tt=le.create({typeLegend:{flexDirection:"row",flexWrap:"wrap",paddingVertical:3,gap:6,width:"100%",padding:8},typeBadge:{flexDirection:"row",alignItems:"center",backgroundColor:A.background.hover,paddingHorizontal:8,paddingVertical:4,borderRadius:12,borderWidth:1},typeBadgeActive:{backgroundColor:A.background.input},typeColor:{width:8,height:8,borderRadius:4,marginRight:6},typeName:{color:A.text.secondary,fontSize:11,fontWeight:"500"}});import{jsx as yt,jsxs as fo}from"react/jsx-runtime";var po=u(({title:e,data:r,maxDepth:t=10,rawMode:n=true,showTypeFilter:o=true,initialExpanded:s=false,disableCopy:i=false,onSelectionChange:a,onRequestInlineEdit:l,inlineEditPath:c,renderInlineEditor:d,selectPath:p,testIDPrefix:b})=>{let[m,D]=Qn(null),B=Nr(()=>{if(!r||!o)return[];let J=[],x=u((C,I=0)=>{if(I>3)return;let g=Array.isArray(C)?"array":C===null?"null":typeof C;J.push(g),g==="object"&&Kn(C)?Object.values(C).forEach(v=>x(v,I+1)):Array.isArray(C)&&C.forEach(v=>x(v,I+1))},"processValue");return x(r),Array.from(new Set(J)).slice(0,8)},[r,o]),R=Nr(()=>{if(!m||!r)return null;let J={},x=0,C=u((I,g,v="",T=0)=>{T>10||x>100||(Array.isArray(I)?I.forEach((k,w)=>{let W=v?`${v}[${w}]`:`[${w}]`,$=k===null?"null":typeof k;$===g&&(J[W]=k,x++),($==="object"&&k!==null||Array.isArray(k))&&C(k,g,W,T+1)}):I&&typeof I=="object"&&Object.entries(I).forEach(([k,w])=>{let W=v?`${v}.${k}`:k,$=Array.isArray(w)?"array":w===null?"null":typeof w;$===g&&(J[W]=w,x++),($==="object"&&w!==null||$==="array")&&C(w,g,W,T+1)}))},"flattenByType");return C(r,m),{filteredObject:J,itemCount:x}},[m,r]),oe=u(()=>m&&R?yt(Gt,{title:`${m} values`,data:R.filteredObject,maxDepth:t,rawMode:n,initialExpanded:s,disableCopy:i,testIDPrefix:b}):yt(Gt,{title:e,data:r,maxDepth:t,rawMode:n,initialExpanded:s,disableCopy:i,onSelectionChange:a,onRequestInlineEdit:l,inlineEditPath:c,renderInlineEditor:d,selectPath:p,testIDPrefix:b}),"renderContent");return fo(h,{style:Ur.container,children:[o&&yt(h,{style:Ur.header,children:yt($r,{types:B,activeFilter:m,onFilterChange:D})}),oe()]})},"DataViewer"),Ur=le.create({container:{},header:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"}});import{useState as mo,useEffect as yo,useRef as rt}from"react";import{jsx as fe,jsxs as qt}from"react/jsx-runtime";function Kt({label:e,containerStyle:r,showNumberControls:t=false,onIncrement:n,onDecrement:o,showDeleteButton:s=false,onDelete:i,...a}){let[l,c]=mo(false),d=rt(new N.Value(0)).current,p=rt(new N.Value(0)).current,b=rt(new N.Value(0)).current,m=rt(new N.Value(1)).current,D=rt(new N.Value(.6)).current;yo(()=>{l?(N.timing(D,{toValue:1,duration:200,useNativeDriver:true}).start(),N.loop(N.sequence([N.timing(d,{toValue:0,duration:2e3,useNativeDriver:true}),N.timing(d,{toValue:.8,duration:30,useNativeDriver:true}),N.timing(d,{toValue:0,duration:20,useNativeDriver:true}),N.timing(d,{toValue:.6,duration:40,useNativeDriver:true}),N.timing(d,{toValue:0,duration:30,useNativeDriver:true}),N.timing(d,{toValue:.4,duration:20,useNativeDriver:true}),N.timing(d,{toValue:0,duration:50,useNativeDriver:true})])).start(),N.loop(N.sequence([N.timing(p,{toValue:0,duration:2500,useNativeDriver:true}),N.timing(p,{toValue:3,duration:20,useNativeDriver:true}),N.timing(p,{toValue:-3,duration:20,useNativeDriver:true}),N.timing(p,{toValue:2,duration:20,useNativeDriver:true}),N.timing(p,{toValue:0,duration:20,useNativeDriver:true})])).start(),N.loop(N.sequence([N.timing(b,{toValue:0,duration:2200,useNativeDriver:true}),N.timing(b,{toValue:-2,duration:30,useNativeDriver:true}),N.timing(b,{toValue:1,duration:20,useNativeDriver:true}),N.timing(b,{toValue:0,duration:30,useNativeDriver:true})])).start(),N.loop(N.sequence([N.timing(m,{toValue:1,duration:3e3,useNativeDriver:true}),N.timing(m,{toValue:1.01,duration:20,useNativeDriver:true}),N.timing(m,{toValue:.99,duration:20,useNativeDriver:true}),N.timing(m,{toValue:1,duration:20,useNativeDriver:true})])).start()):(N.timing(D,{toValue:.6,duration:200,useNativeDriver:true}).start(),N.timing(d,{toValue:0,duration:100,useNativeDriver:true}).start(),N.timing(p,{toValue:0,duration:100,useNativeDriver:true}).start(),N.timing(b,{toValue:0,duration:100,useNativeDriver:true}).start(),N.timing(m,{toValue:1,duration:100,useNativeDriver:true}).start())},[l,D,d,p,b,m]);let B=u(x=>{c(true),a.onFocus?.(x)},"handleFocus"),R=u(x=>{c(false),a.onBlur?.(x)},"handleBlur"),oe={opacity:D,borderColor:l?ae.primary:ae.textMuted+"4D"},J={opacity:d,transform:[{translateX:p},{translateY:b},{scale:m}]};return fe(h,{style:[q.container,r],children:qt(h,{style:q.rowContainer,children:[e&&fe(f,{style:[q.label,l&&q.labelFocused],children:e.toUpperCase()}),qt(N.View,{style:[q.inputContainer,oe],children:[fe(N.View,{style:[q.glitchOverlay,J],pointerEvents:"none"}),fe(Ot,{...a,style:[q.input,a.style,t&&q.inputWithControls,s&&q.inputWithDelete],onFocus:B,onBlur:R,placeholderTextColor:ae.textMuted+"99",autoComplete:"off",autoCorrect:false,autoCapitalize:"none",spellCheck:false}),t&&qt(h,{style:q.numberControls,children:[fe(Y,{style:[q.controlButton,l&&q.controlButtonFocused],onPress:n,activeOpacity:.7,children:fe(jt,{size:14,strokeWidth:2.5,color:l?ae.primary:ae.textMuted})}),fe(Y,{style:[q.controlButton,l&&q.controlButtonFocused],onPress:o,activeOpacity:.7,children:fe(ut,{size:14,strokeWidth:2.5,color:l?ae.primary:ae.textMuted})})]}),s&&fe(Y,{style:[q.deleteButton,l&&q.deleteButtonFocused],onPress:i,activeOpacity:.7,testID:typeof a.testID=="string"&&a.testID.endsWith("-input")?`${a.testID.slice(0,-6)}-delete`:void 0,accessibilityLabel:"Delete item",children:fe(Lt,{size:14,strokeWidth:2,color:l?ae.error:ae.error+"CC"})}),fe(h,{style:[q.cornerAccent,q.cornerTL,l&&q.cornerAccentFocused]}),fe(h,{style:[q.cornerAccent,q.cornerTR,l&&q.cornerAccentFocused]}),fe(h,{style:[q.cornerAccent,q.cornerBL,l&&q.cornerAccentFocused]}),fe(h,{style:[q.cornerAccent,q.cornerBR,l&&q.cornerAccentFocused]})]})]})})}u(Kt,"CyberpunkInput");var q=le.create({container:{width:"100%",marginVertical:3},rowContainer:{flexDirection:"row",alignItems:"center",gap:8},label:{fontSize:10,fontWeight:"600",fontFamily:S,color:ae.textMuted,letterSpacing:.5,minWidth:60},labelFocused:{color:ae.primary},inputContainer:{flex:1,borderWidth:1,borderRadius:6,position:"relative",minHeight:34,justifyContent:"center",flexDirection:"row",alignItems:"center"},glitchOverlay:{position:"absolute",top:-1,left:-1,right:-1,bottom:-1,borderRadius:6,borderWidth:1,borderColor:ae.primary,zIndex:10},input:{flex:1,paddingHorizontal:10,paddingVertical:6,color:ae.text,fontSize:12,fontFamily:S,backgroundColor:"transparent",zIndex:1},inputWithControls:{paddingRight:4},inputWithDelete:{paddingRight:4},numberControls:{flexDirection:"row",gap:2,paddingRight:4,zIndex:2},controlButton:{width:28,height:28,borderRadius:6,borderWidth:1,borderColor:ae.textMuted+"33",alignItems:"center",justifyContent:"center",shadowColor:"#000",shadowOffset:{width:0,height:1},shadowOpacity:.2,shadowRadius:2},controlButtonFocused:{borderColor:ae.primary+"CC",shadowColor:ae.primary,shadowOpacity:.3,shadowRadius:4},deleteButton:{width:28,height:28,borderRadius:6,borderWidth:1,borderColor:ae.error+"4D",alignItems:"center",justifyContent:"center",shadowColor:ae.error,shadowOffset:{width:0,height:0},shadowOpacity:.15,shadowRadius:3,marginRight:4,zIndex:2},deleteButtonFocused:{borderColor:ae.error+"CC",shadowOpacity:.3,shadowRadius:5},cornerAccent:{position:"absolute",width:6,height:1.2,backgroundColor:ae.textMuted+"CC",zIndex:0},cornerAccentFocused:{backgroundColor:ae.primary},cornerTL:{top:-1,left:5},cornerTR:{top:-1,right:5},cornerBL:{bottom:-1,left:5},cornerBR:{bottom:-1,right:5}});import{memo as bo,useMemo as xo}from"react";import{jsx as Pe}from"react/jsx-runtime";var Ne=10,nt=U.primary+"40",ot=U.primary+"66",Gr=bo(({depth:e,isLastChild:r,isExpanded:t,hasChildren:n,parentHasMoreSiblings:o=[],activeDepth:s=-1,itemHeight:i})=>{let a=xo(()=>{let l=[];for(let c=1;c<e;c++){let d=c===s;o[c-1]&&l.push(Pe(h,{style:[He.verticalLine,{left:(c-1)*Ne-.5,backgroundColor:d?ot:nt,height:i}]},`v-${c}`))}if(e>0){let c=r&&!t?i/2-1:i;l.push(Pe(h,{style:[He.verticalLine,{left:(e-1)*Ne-.5,backgroundColor:s===e-1?ot:nt,height:c}]},"v-current")),r&&!t&&l.push(Pe(h,{style:[He.horizontalLine,{left:(e-1)*Ne,top:i/2-1,width:Ne/2,backgroundColor:s===e-1?ot:nt}]},"h-corner")),t&&n&&l.push(Pe(h,{style:[He.horizontalLine,{left:(e-1)*Ne,top:i/2-1,width:Ne/2,backgroundColor:s===e-1?ot:nt}]},"h-expand-connector"))}return n&&t&&l.push(Pe(h,{style:[He.verticalLine,{left:e*Ne-.5,top:i/2,height:i/2+1,backgroundColor:s===e?ot:nt}]},"v-children")),l},[e,r,t,n,o,s,i]);return e===0?null:Pe(h,{style:He.container,pointerEvents:"none",children:a})});Gr.displayName="IndentGuides";var He=le.create({container:{position:"absolute",left:0,top:0,bottom:0,right:0},verticalLine:{position:"absolute",width:1.5,top:0},horizontalLine:{position:"absolute",height:1.5}});import{useMemo as Qt,useState as vo,useEffect as Co,useRef as wo}from"react";import{gameUIColors as K,night as $e}from"@buoy-gg/shared-ui/web";var Jr=(e=>(e.DEFAULT="unchanged",e.ADDED="added",e.REMOVED="removed",e.MODIFIED="modified",e))(Jr||{}),qr=Symbol.for("buoy.diff.absent");function Ue(e){return e===qr}u(Ue,"isAbsent");function Kr(e,r,t){let n,o;switch(t){case"chars":n=e.split(""),o=r.split("");break;case"words":n=e.match(/\S+|\s+/g)||[],o=r.match(/\S+|\s+/g)||[];break;case"trimmedLines":{let c=e.trim(),d=r.trim();n=c.match(/\S+|\s+/g)||[],o=d.match(/\S+|\s+/g)||[];break}case"lines":default:return{left:[{value:e,type:"removed"}],right:[{value:r,type:"added"}]}}let s=[],i=[],a=0,l=0;for(;a<n.length&&l<o.length;)if(n[a]===o[l])s.push({value:n[a],type:"unchanged"}),i.push({value:o[l],type:"unchanged"}),a++,l++;else{let c=false;for(let d=a+1;d<Math.min(a+5,n.length);d++)if(n[d]===o[l]){for(let p=a;p<d;p++)s.push({value:n[p],type:"removed"});a=d,c=true;break}if(!c){for(let d=l+1;d<Math.min(l+5,o.length);d++)if(o[d]===n[a]){for(let p=l;p<d;p++)i.push({value:o[p],type:"added"});l=d,c=true;break}}c||(s.push({value:n[a],type:"removed"}),i.push({value:o[l],type:"added"}),a++,l++)}for(;a<n.length;)s.push({value:n[a],type:"removed"}),a++;for(;l<o.length;)i.push({value:o[l],type:"added"}),l++;return{left:s,right:i}}u(Kr,"computeDiffByMethod");function _t(e){if(Ue(e))return[];if(e==null)return[String(e)];try{let r=JSON.stringify(e,null,2).split(`
|
|
2
|
-
`),t=[];for(let n=0;n<r.length;n++){let o=r[n];(o.trim()!==""||n===0||n===r.length-1)&&t.push(o)}return t}catch{return[String(e)]}}u(_t,"objectToLines");function Qr(e,r){if(r<0)return e;let t=[],n=[];if(e.forEach((a,l)=>{a.type!=="unchanged"&&n.push(l)}),n.length===0)return[];let o=[],s=Math.max(0,n[0]-r),i=Math.min(e.length-1,n[0]+r);for(let a=1;a<n.length;a++){let l=n[a],c=Math.max(0,l-r),d=Math.min(e.length-1,l+r);c<=i+1?i=Math.max(i,d):(o.push([s,i]),s=c,i=d)}return o.push([s,i]),o.forEach(([a,l])=>{for(let c=a;c<=l;c++)t.push(e[c])}),t}u(Qr,"filterDiffWithContext");function Xt(e,r,t){let n=r==="trimmedLines"?e.trim():e;return t?n.replace(/,\s*$/,""):n}u(Xt,"normalizeCompareKey");function _r(e,r){let t=e.trim(),n=r.trim();return!!t&&!!n&&(t.startsWith(n.substring(0,3))||n.startsWith(t.substring(0,3)))}u(_r,"looksLikeModification");var To=8e3,ko=1024;function Xr(e,r){let t=e.length,n=r.length;if(t+n>To)return null;if(t===0&&n===0)return[];let o=t+n,s=o+1,i=new Int32Array(2*o+3),a=Math.min(o,ko),l=[];for(let c=0;c<=a;c++){l.push(i.slice(s-(c+1),s+c+2));for(let d=-c;d<=c;d+=2){let p;d===-c||d!==c&&i[d-1+s]<i[d+1+s]?p=i[d+1+s]:p=i[d-1+s]+1;let b=p-d;for(;p<t&&b<n&&e[p]===r[b];)p++,b++;if(i[d+s]=p,p>=t&&b>=n)return Zr(l,t,n)}}return null}u(Xr,"myersLineOps");function Zr(e,r,t){let n=[],o=r,s=t;for(let i=e.length-1;i>=0;i--){let a=e[i],l=i+1,c=o-s,d;c===-i||c!==i&&a[c-1+l]<a[c+1+l]?d=c+1:d=c-1;let p=a[d+l],b=p-d;for(;o>p&&s>b;)n.push({kind:"eq",i:o-1,j:s-1}),o--,s--;i>0&&(o===p?n.push({kind:"ins",j:s-1}):n.push({kind:"del",i:o-1})),o=p,s=b}return n.reverse(),n}u(Zr,"backtrackOps");function Zt(e,r,t,n,o,s,i){let a=Math.min(r.length,t.length);for(let l=0;l<a;l++){let c=r[l],d=t[l];if(!_r(n[c],o[d])){e.push({leftLineNumber:c+1,type:"removed",leftContent:n[c],leftRaw:n[c]}),e.push({rightLineNumber:d+1,type:"added",rightContent:o[d],rightRaw:o[d]});continue}if(!i&&s!=="lines"){let p=Kr(n[c],o[d],s);e.push({leftLineNumber:c+1,rightLineNumber:d+1,type:"modified",leftContent:p.left,rightContent:p.right,leftRaw:n[c],rightRaw:o[d]})}else e.push({leftLineNumber:c+1,rightLineNumber:d+1,type:"modified",leftContent:n[c],rightContent:o[d],leftRaw:n[c],rightRaw:o[d]})}for(let l=a;l<r.length;l++){let c=r[l];e.push({leftLineNumber:c+1,type:"removed",leftContent:n[c],leftRaw:n[c]})}for(let l=a;l<t.length;l++){let c=t[l];e.push({rightLineNumber:c+1,type:"added",rightContent:o[c],rightRaw:o[c]})}}u(Zt,"emitHunk");function Yr(e,r,t,n,o){let s=[],i=0;for(;i<e.length;){let a=e[i];if(a.kind==="eq"){s.push({leftLineNumber:a.i+1,rightLineNumber:a.j+1,type:"unchanged",leftContent:r[a.i],rightContent:t[a.j],leftRaw:r[a.i],rightRaw:t[a.j]}),i++;continue}let l=[],c=[];for(;i<e.length&&e[i].kind!=="eq";){let d=e[i];d.kind==="del"?l.push(d.i):d.kind==="ins"&&c.push(d.j),i++}Zt(s,l,c,r,t,n,o)}return s}u(Yr,"buildRowsFromOps");function en(e,r,t,n,o,s){let i=[],a=0,l=0;for(;a<e.length||l<r.length;)a>=e.length?(i.push({rightLineNumber:l+1,type:"added",rightContent:r[l],rightRaw:r[l]}),l++):l>=r.length?(i.push({leftLineNumber:a+1,type:"removed",leftContent:e[a],leftRaw:e[a]}),a++):t[a]===n[l]?(i.push({leftLineNumber:a+1,rightLineNumber:l+1,type:"unchanged",leftContent:e[a],rightContent:r[l],leftRaw:e[a],rightRaw:r[l]}),a++,l++):(Zt(i,[a],[l],e,r,o,s),a++,l++);return i}u(en,"pairwiseLineWalk");function bt(e,r,t={}){let{compareMethod:n="words",disableWordDiff:o=false,showDiffOnly:s=false,contextLines:i=3,ignoreTrailingComma:a=true}=t,l=_t(e),c=_t(r),d=l.map(D=>Xt(D,n,a)),p=c.map(D=>Xt(D,n,a)),b=Xr(d,p),m=b?Yr(b,l,c,n,o):en(l,c,d,p,n,o);return s?Qr(m,i):m}u(bt,"computeLineDiff");import{Fragment as Yt,jsx as O,jsxs as ve}from"react/jsx-runtime";var So={background:$e.color.bg,text:$e.color.textSecondary,addedBg:K.diff.addedBackground,removedBg:K.diff.removedBackground,changedBg:K.diff.modifiedBackground,addedText:K.diff.addedText,removedText:K.diff.removedText,changedText:K.diff.modifiedText,addedWordBg:K.diff.addedWordHighlight,removedWordBg:K.diff.removedWordHighlight,arrowText:K.diff.modifiedText,keyText:K.diff.modifiedText,expandIcon:$e.color.textTertiary,bracketText:$e.color.textSecondary,nullText:K.diff.modifiedText,undefinedText:K.diff.modifiedText,stringText:$e.color.textSecondary,numberText:$e.color.textSecondary,booleanText:K.diff.modifiedText},Do={background:"#ffffff",text:"#333333",addedBg:"rgba(40, 167, 69, 0.1)",addedText:"#28A745",removedBg:"rgba(220, 53, 69, 0.1)",removedText:"#DC3545",changedBg:"rgba(255, 193, 7, 0.1)",changedText:"#FFC107",arrowText:"#007BFF",keyText:"#0451A5",expandIcon:"#6A737D",bracketText:"#6A737D",nullText:"#0000FF",undefinedText:"#0000FF",stringText:"#A31515",numberText:"#098658",booleanText:"#0000FF"};function ce(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}u(ce,"isObject");function Ge(e,r){if(e===r)return true;if(e===null||r===null||e===void 0||r===void 0||typeof e!=typeof r)return false;if(typeof e=="object"){if(Array.isArray(e)&&Array.isArray(r))return e.length!==r.length?false:e.every((t,n)=>Ge(t,r[n]));if(ce(e)&&ce(r)){let t=Object.keys(e),n=Object.keys(r);return t.length!==n.length?false:t.every(o=>Ge(e[o],r[o]))}}return false}u(Ge,"isEqual");function Se(e,r,t=[]){let n=[];if(Ue(e)&&(e=void 0),Ue(r)&&(r=void 0),!ce(e)&&!ce(r)&&!Array.isArray(e)&&!Array.isArray(r))return Ge(e,r)?[{key:t.length>0?t[t.length-1]:"root",path:t,type:"unchanged",oldValue:e,newValue:r}]:[{key:t.length>0?t[t.length-1]:"root",path:t,type:e===void 0?"added":r===void 0?"removed":"changed",oldValue:e,newValue:r}];if(Array.isArray(e)||Array.isArray(r)){let a=Array.isArray(e)?e:[],l=Array.isArray(r)?r:[],c=Math.max(a.length,l.length);for(let d=0;d<c;d++){let p=[...t,`[${d}]`],b=d<a.length?a[d]:void 0,m=d<l.length?l[d]:void 0;if(b===void 0){let D=Array.isArray(m)||ce(m);n.push({key:`[${d}]`,path:p,type:"added",newValue:m,...D?{children:Se(Array.isArray(m)?[]:{},m,p),expanded:false}:{}})}else if(m===void 0){let D=Array.isArray(b)||ce(b);n.push({key:`[${d}]`,path:p,type:"removed",oldValue:b,...D?{children:Se(b,Array.isArray(b)?[]:{},p),expanded:false}:{}})}else if(!Ge(b,m))ce(b)||ce(m)||Array.isArray(b)||Array.isArray(m)?n.push({key:`[${d}]`,path:p,type:"changed",oldValue:b,newValue:m,children:Se(b,m,p),expanded:false}):n.push({key:`[${d}]`,path:p,type:"changed",oldValue:b,newValue:m});else{let D=Array.isArray(b)||ce(b);n.push({key:`[${d}]`,path:p,type:"unchanged",oldValue:b,newValue:m,...D?{children:Se(b,m,p),expanded:false}:{}})}}return n}let o=ce(e)?e:{},s=ce(r)?r:{},i=new Set([...Object.keys(o),...Object.keys(s)]);for(let a of i){let l=[...t,a],c=o[a],d=s[a];if(a in o)if(a in s)if(!Ge(c,d))ce(c)||ce(d)||Array.isArray(c)||Array.isArray(d)?n.push({key:a,path:l,type:"changed",oldValue:c,newValue:d,children:Se(c,d,l),expanded:false}):n.push({key:a,path:l,type:"changed",oldValue:c,newValue:d});else{let p=Array.isArray(c)||ce(c);n.push({key:a,path:l,type:"unchanged",oldValue:c,newValue:d,...p?{children:Se(c,d,l),expanded:false}:{}})}else{let p=Array.isArray(c)||ce(c);n.push({key:a,path:l,type:"removed",oldValue:c,...p?{children:Se(c,Array.isArray(c)?[]:{},l),expanded:false}:{}})}else{let p=Array.isArray(d)||ce(d);n.push({key:a,path:l,type:"added",newValue:d,...p?{children:Se(Array.isArray(d)?[]:{},d,l),expanded:false}:{}})}}return n}u(Se,"computeDiff");function De(e,r=true){if(e===null)return"null";if(e===void 0)return"undefined";if(typeof e=="string")return r&&e.length>30?`"${e.substring(0,27)}..."`:`"${e}"`;if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e)){if(r){let t=e.length;return t===0?"[ ]":`[ ${t} item${t!==1?"s":""} ]`}return JSON.stringify(e,null,2)}if(ce(e)){if(r){let t=Object.keys(e).length;return t===0?"{ }":`{ ${t} key${t!==1?"s":""} }`}return JSON.stringify(e,null,2)}return String(e)}u(De,"stringifyValue");function tn({oldValue:e,newValue:r,theme:t="dark",expandAll:n=false,showUnchanged:o=true,scrollEnabled:s=true}){let i=t==="dark"?So:Do,[a,l]=vo(()=>{let x=new Set;return Se(e,r).forEach(C=>{C.children&&C.children.length>0&&x.add(C.path.join("."))}),x}),c=Qt(()=>Se(e,r),[e,r]),d=Qt(()=>c.map(x=>`${x.path.join(".")}:${x.type}`).join("|"),[c]),p=wo(false);Co(()=>{if(!p.current){p.current=true;return}let x=new Set;c.forEach(C=>{C.children&&C.children.length>0&&x.add(C.path.join("."))}),l(x)},[d]);let b=u(x=>{let C=x.join(".");l(I=>{let g=new Set(I);return g.has(C)?g.delete(C):g.add(C),g})},"toggleExpanded"),m=0,D=u((x,C=0)=>{if(!o&&x.type==="unchanged")return null;m++;let I=m,g=C*20,v=n||a.has(x.path.join(".")),T=x.children&&x.children.length>0,k=u(()=>{switch(x.type){case"added":return{backgroundColor:i.addedBg};case"removed":return{backgroundColor:i.removedBg};case"changed":return{backgroundColor:i.changedBg};default:return{backgroundColor:"transparent"}}},"getNodeStyle"),w=u(()=>{switch(x.type){case"added":return"+";case"removed":return"\u2212";case"changed":return"\u2248";default:return" "}},"getMarker"),W=u(()=>{switch(x.type){case"added":return{backgroundColor:K.diff.markerAddedBackground,color:K.diff.addedText};case"removed":return{backgroundColor:K.diff.markerRemovedBackground,color:K.diff.removedText};case"changed":return{backgroundColor:K.diff.markerModifiedBackground,color:K.diff.modifiedText};default:return{backgroundColor:"transparent",color:K.diff.markerText}}},"getMarkerStyle");return ve(h,{children:[ve(Y,{activeOpacity:T?.7:1,onPress:T?()=>b(x.path):void 0,style:[E.row,k()],children:[O(h,{style:E.lineNumber,children:O(f,{style:[E.lineNumberText,{color:K.diff.lineNumberText}],children:String(I).padStart(2," ")})}),O(h,{style:[E.marker,W()],children:O(f,{style:[E.markerText,{color:W().color}],children:w()})}),ve(h,{style:[E.content,{paddingLeft:g}],children:[T&&O(h,{style:E.expandIconContainer,children:O(f,{style:[E.expandIcon,{color:i.expandIcon}],children:v?"\u2212":"+"})}),O(f,{style:[E.key,{color:i.keyText}],children:x.key}),O(f,{style:[E.colon,{color:i.expandIcon}],children:":"}),x.type==="changed"&&!T&&ve(Yt,{children:[O(f,{style:[E.value,{color:i.removedText,backgroundColor:i.removedWordBg,paddingHorizontal:3,paddingVertical:2,borderRadius:3,textDecorationLine:"line-through",textDecorationColor:i.removedText}],children:De(x.oldValue)}),O(f,{style:[E.arrow,{color:i.arrowText,paddingHorizontal:4}],children:" => "}),O(f,{style:[E.value,{color:i.addedText,backgroundColor:i.addedWordBg,paddingHorizontal:3,paddingVertical:2,borderRadius:3}],children:De(x.newValue)})]}),x.type==="added"&&!T&&O(f,{style:[E.value,{color:i.addedText,backgroundColor:i.addedWordBg,paddingHorizontal:3,paddingVertical:2,borderRadius:3}],children:De(x.newValue)}),x.type==="removed"&&!T&&O(f,{style:[E.value,{color:i.removedText,backgroundColor:i.removedWordBg,paddingHorizontal:3,paddingVertical:2,borderRadius:3,textDecorationLine:"line-through",textDecorationColor:i.removedText}],children:De(x.oldValue)}),x.type==="unchanged"&&!T&&O(f,{style:[E.value,{color:i.text}],children:De(x.oldValue)}),T&&!v&&ve(Yt,{children:[x.type==="changed"&&ve(Yt,{children:[O(f,{style:[E.value,{color:i.removedText,backgroundColor:i.removedWordBg,paddingHorizontal:3,paddingVertical:2,borderRadius:3,textDecorationLine:"line-through",textDecorationColor:i.removedText}],children:De(x.oldValue,true)}),O(f,{style:[E.arrow,{color:i.arrowText,paddingHorizontal:4}],children:" => "}),O(f,{style:[E.value,{color:i.addedText,backgroundColor:i.addedWordBg,paddingHorizontal:3,paddingVertical:2,borderRadius:3}],children:De(x.newValue,true)})]}),x.type==="added"&&O(f,{style:[E.value,{color:i.addedText,backgroundColor:i.addedWordBg,paddingHorizontal:3,paddingVertical:2,borderRadius:3}],children:De(x.newValue,true)}),x.type==="removed"&&O(f,{style:[E.value,{color:i.removedText,backgroundColor:i.removedWordBg,paddingHorizontal:3,paddingVertical:2,borderRadius:3,textDecorationLine:"line-through",textDecorationColor:i.removedText}],children:De(x.oldValue,true)})]})]})]}),T&&v&&O(h,{children:x.children.map($=>D($,C+1))})]},x.path.join("."))},"renderDiffNode"),B=u(x=>{let C=0,I=0,g=0,v=u(T=>{for(let k of T)k.type==="added"?C++:k.type==="removed"?I++:k.type==="changed"&&g++,k.children&&v(k.children)},"count");return v(x),{added:C,removed:I,changed:g}},"countChanges"),R=Qt(()=>B(c),[c]),oe=R.added>0||R.removed>0||R.changed>0,J=s?Pt:h;return ve(h,{style:[s?E.container:E.containerInline,{backgroundColor:i.background}],children:[oe&&O(h,{style:[E.header,{backgroundColor:i.background}],children:ve(h,{style:E.summaryContainer,children:[R.added>0&&ve(h,{style:[E.summaryItem,E.summaryAdded],children:[O(f,{style:[E.summaryIcon,{color:i.addedText}],children:"+"}),O(f,{style:[E.summaryCount,{color:i.addedText}],children:R.added}),O(f,{style:[E.summaryLabel,{color:i.addedText}],children:"new"})]}),R.removed>0&&ve(h,{style:[E.summaryItem,E.summaryRemoved],children:[O(f,{style:[E.summaryIcon,{color:i.removedText}],children:"\u2212"}),O(f,{style:[E.summaryCount,{color:i.removedText}],children:R.removed}),O(f,{style:[E.summaryLabel,{color:i.removedText}],children:"gone"})]}),R.changed>0&&ve(h,{style:[E.summaryItem,E.summaryChanged],children:[O(f,{style:[E.summaryIcon,{color:i.changedText}],children:"\u2248"}),O(f,{style:[E.summaryCount,{color:i.changedText}],children:R.changed}),O(f,{style:[E.summaryLabel,{color:i.changedText}],children:"modified"})]})]})}),O(J,{style:s?E.scrollView:void 0,showsVerticalScrollIndicator:false,children:c.length===0?ve(h,{style:E.emptyState,children:[O(f,{style:[E.emptyIcon,{color:i.text}],children:"\u2261"}),O(f,{style:[E.emptyTitle,{color:i.text}],children:"No changes detected"}),O(f,{style:[E.emptySubtitle,{color:i.expandIcon}],children:"The data is identical"})]}):O(h,{children:(m=0,c.map(x=>D(x,0)))})})]})}u(tn,"TreeDiffViewer");var E=le.create({container:{flex:1,borderRadius:8,overflow:"hidden"},containerInline:{borderRadius:8,overflow:"hidden"},header:{paddingHorizontal:12,paddingVertical:8,borderBottomWidth:1,borderBottomColor:K.diff.lineNumberBorder},summaryContainer:{flexDirection:"row",gap:16,alignItems:"center"},summaryItem:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:8,paddingVertical:4,borderRadius:12},summaryAdded:{backgroundColor:K.diff.addedBackground},summaryRemoved:{backgroundColor:K.diff.removedBackground},summaryChanged:{backgroundColor:K.diff.modifiedBackground},summaryIcon:{fontSize:14,fontWeight:"700",fontFamily:S},summaryCount:{fontSize:13,fontWeight:"600",fontFamily:S},summaryLabel:{fontSize:11,fontFamily:S,opacity:.9},scrollView:{flex:1},row:{minHeight:26,justifyContent:"center",flexDirection:"row",borderBottomWidth:le.hairlineWidth,borderBottomColor:"rgba(128, 128, 128, 0.04)"},lineNumber:{width:32,paddingHorizontal:6,paddingVertical:4,backgroundColor:K.diff.lineNumberBackground,justifyContent:"center",borderRightWidth:1,borderRightColor:K.diff.lineNumberBorder},lineNumberText:{fontSize:11,fontFamily:S,textAlign:"right"},marker:{width:20,paddingHorizontal:2,paddingVertical:4,justifyContent:"center",alignItems:"center"},markerText:{fontSize:12,fontFamily:S,fontWeight:"600"},content:{flex:1,flexDirection:"row",alignItems:"center",paddingHorizontal:12,paddingVertical:4},expandIconContainer:{width:16,height:16,borderRadius:3,backgroundColor:K.diff.lineNumberBorder,alignItems:"center",justifyContent:"center",marginRight:6},expandIcon:{fontSize:11,fontFamily:S,fontWeight:"600"},colon:{fontSize:12,fontFamily:S,marginHorizontal:4},key:{fontSize:11,fontFamily:S,fontWeight:"500",opacity:.9},value:{fontSize:11,fontFamily:S,maxWidth:"80%"},arrow:{fontSize:12,fontFamily:S,fontWeight:"600"},badge:{fontSize:11,fontFamily:S,fontWeight:"600",marginLeft:8},emptyState:{flex:1,alignItems:"center",justifyContent:"center",paddingVertical:60},emptyIcon:{fontSize:48,fontFamily:S,opacity:.2,marginBottom:12},emptyTitle:{fontSize:14,fontFamily:S,fontWeight:"600",marginBottom:4},emptySubtitle:{fontSize:12,fontFamily:S,opacity:.6}});function pe(e){if(e===null||typeof e!="object"||Array.isArray(e))return false;let r=Object.getPrototypeOf(e);return r===Object.prototype||r===null}u(pe,"isRebuildableObject");function er(e){switch(e.kind){case"move":return[...e.path.slice(0,-1),String(e.toIndex)];case"duplicate":{let r=e.path[e.path.length-1],t=Number(r);return Number.isInteger(t)?[...e.path.slice(0,-1),String(t+1)]:void 0}case"remove":return null;default:return}}u(er,"selectionPathAfterOp");function tr(e){return Array.isArray(e)||pe(e)}u(tr,"isEditableContainer");function xt(e,r){let t=e;for(let n of r)if(Array.isArray(t))t=t[Number(n)];else if(pe(t))t=t[n];else return;return t}u(xt,"getAtPath");function Ce(e,r,t){if(r.length===0)return t(e);let[n,...o]=r;if(Array.isArray(e)){let s=Number(n);if(!Number.isInteger(s)||s<0||s>=e.length)return e;let i=[...e];return i[s]=Ce(i[s],o,t),i}return pe(e)&&n in e?{...e,[n]:Ce(e[n],o,t)}:e}u(Ce,"updateContainer");function it(e){return e.length===0?null:{parent:e.slice(0,-1),last:e[e.length-1]}}u(it,"splitPath");function rr(e,r){switch(r.kind){case"replace":return Ce(e,r.path,()=>r.value);case"clear":return Ce(e,r.path,t=>Array.isArray(t)?[]:pe(t)?{}:t);case"append":return Ce(e,r.path,t=>Array.isArray(t)?[...t,r.value]:t);case"insert":return Ce(e,r.path,t=>{if(!Array.isArray(t))return t;let n=nr(r.index,0,t.length);return[...t.slice(0,n),r.value,...t.slice(n)]});case"addKey":return Ce(e,r.path,t=>!pe(t)||r.key in t?t:{...t,[r.key]:r.value});case"remove":{let t=it(r.path);return t?Ce(e,t.parent,n=>rn(n,t.last)):e}case"duplicate":{let t=it(r.path);return t?Ce(e,t.parent,n=>nn(n,t.last)):e}case"move":{let t=it(r.path);return t?Ce(e,t.parent,n=>{if(!Array.isArray(n))return n;let o=Number(t.last);if(!Number.isInteger(o)||o<0||o>=n.length)return n;let s=nr(r.toIndex,0,n.length-1);if(s===o)return n;let i=[...n],[a]=i.splice(o,1);return i.splice(s,0,a),i}):e}case"renameKey":{let t=it(r.path);return t?Ce(e,t.parent,n=>on(n,t.last,r.key)):e}default:return e}}u(rr,"applyJsonOp");function rn(e,r){if(Array.isArray(e)){let t=Number(r);return!Number.isInteger(t)||t<0||t>=e.length?e:e.filter((n,o)=>o!==t)}if(pe(e)){if(!(r in e))return e;let t={};for(let n of Object.keys(e))n!==r&&(t[n]=e[n]);return t}return e}u(rn,"removeEntry");function nn(e,r){if(Array.isArray(e)){let t=Number(r);return!Number.isInteger(t)||t<0||t>=e.length?e:[...e.slice(0,t+1),at(e[t]),...e.slice(t+1)]}if(pe(e)){if(!(r in e))return e;let t=an(e,`${r} copy`),n={};for(let o of Object.keys(e))n[o]=e[o],o===r&&(n[t]=at(e[o]));return n}return e}u(nn,"duplicateEntry");function on(e,r,t){if(!pe(e)||!(r in e)||t===r||t in e)return e;let n={};for(let o of Object.keys(e))o===r?n[t]=e[o]:n[o]=e[o];return n}u(on,"renameEntry");function an(e,r){if(!(r in e))return r;let t=2;for(;`${r} ${t}`in e;)t++;return`${r} ${t}`}u(an,"uniqueKey");function at(e){if(Array.isArray(e))return e.map(at);if(pe(e)){let r={};for(let t of Object.keys(e))r[t]=at(e[t]);return r}return e}u(at,"clone");function nr(e,r,t){return Number.isFinite(e)?Math.min(Math.max(Math.trunc(e),r),t):r}u(nr,"clamp");function vt(e){let r=Array.isArray(e)?e:pe(e)?Object.values(e):[],t=r[r.length-1];return typeof t=="number"?0:typeof t=="boolean"?false:Array.isArray(t)?[]:pe(t)?{}:""}u(vt,"suggestedNewValue");function Ve(e){return e===null?"null":Array.isArray(e)?"array":pe(e)?"object":typeof e}u(Ve,"typeLabel");function lt(e){return e.length===0?"root":e.join(" \u203A ")}u(lt,"breadcrumb");function or(e){let r={};for(let t of e)r[t.id]=t;return r}u(or,"treeActionMap");function ln(e){if(!("newKey"in e))return"newKey";let r=2;for(;`newKey ${r}`in e;)r++;return`newKey ${r}`}u(ln,"newKeyFor");function Ct(e,r,t={}){let n=r?.path??[],o=r?.value,s=r!=null,i=n.length===0,a=t.rootEntriesLocked===true&&n.length===1,l=s&&!i?xt(e,n.slice(0,-1)):void 0,c=Array.isArray(l),d=c?Number(n[n.length-1]):-1,p=Array.isArray(o),b=pe(o),m=tr(o),D=s&&(t.containersEditable===true||!m),B=b?ln(o):"",R=b?{id:"add",label:"Add key",enabled:true,op:{kind:"addKey",path:n,key:B,value:vt(o)},selectAfter:[...n,B]}:{id:"add",label:"Append",enabled:p,op:p?{kind:"append",path:n,value:vt(o)}:null,selectAfter:p?[...n,String(o.length)]:void 0};return[typeof o=="boolean"?{id:"editValue",label:"Toggle",enabled:true,op:{kind:"replace",path:n,value:!o}}:{id:"editValue",label:"Edit value",enabled:D,op:null},R,{id:"duplicate",label:"Duplicate",enabled:s&&!i,op:s&&!i?{kind:"duplicate",path:n}:null},{id:"moveUp",label:"Move up",enabled:s&&c&&d>0,op:s&&c&&d>0?{kind:"move",path:n,toIndex:d-1}:null},{id:"moveDown",label:"Move down",enabled:s&&c&&d>-1&&d<l.length-1,op:s&&c&&d>-1&&d<l.length-1?{kind:"move",path:n,toIndex:d+1}:null},{id:"remove",label:"Remove",danger:true,enabled:s&&!i&&!a,op:s&&!i&&!a?{kind:"remove",path:n}:null}]}u(Ct,"treeActionsFor");import{useState as Bo}from"react";import{jsx as ee,jsxs as dt}from"react/jsx-runtime";var de={barBg:A.background.card,barBorder:A.border.default,label:A.text.primary,badgeBg:A.background.hover,badgeText:A.text.secondary,hint:A.text.muted,btnBg:A.background.hover,btnBorder:A.border.default,btnText:A.text.primary,btnIcon:A.text.secondary,dangerBorder:A.semantic.error+"55",dangerText:A.semantic.error},wt=13;function We({label:e,onPress:r,icon:t,danger:n,iconOnly:o,disabled:s,style:i}){return dt(Y,{"sentry-label":"ignore devtools tree action",accessibilityLabel:e,accessibilityState:{disabled:!!s},onPress:s?void 0:r,disabled:s,hitSlop:{top:8,bottom:8,left:6,right:6},style:[te.button,o&&te.buttonIconOnly,n&&{borderColor:de.dangerBorder},s&&te.buttonDisabled,i],children:[t,o?null:ee(f,{style:[te.buttonText,n&&{color:de.dangerText}],children:e})]})}u(We,"Button");function dn({root:e,selection:r,onEdit:t,onRequestInlineEdit:n,chipStyle:o}){let s=r!=null,i=or(Ct(e,r)),a=u(l=>l&&t(l),"apply");return dt(h,{style:te.bar,children:[ee(f,{style:[te.selectionLabel,!s&&te.selectionLabelEmpty],numberOfLines:1,children:s?lt(r.path):"Select a row to edit"}),ee(h,{style:te.badge,children:ee(f,{style:te.badgeText,children:s?Ve(r.value):"\u2014"})}),dt(h,{style:te.actions,children:[ee(We,{label:i.editValue.label,disabled:!i.editValue.enabled,style:o,icon:ee(Fr,{size:wt,color:de.btnIcon}),onPress:()=>i.editValue.op?t(i.editValue.op):n()}),ee(We,{label:i.add.label,disabled:!i.add.enabled,style:o,icon:ee(Ir,{size:wt,color:de.btnIcon}),onPress:()=>a(i.add.op)}),ee(We,{label:i.moveUp.label,iconOnly:true,disabled:!i.moveUp.enabled,style:o,icon:ee(jt,{size:14,color:de.btnIcon}),onPress:()=>a(i.moveUp.op)}),ee(We,{label:i.moveDown.label,iconOnly:true,disabled:!i.moveDown.enabled,style:o,icon:ee(ut,{size:14,color:de.btnIcon}),onPress:()=>a(i.moveDown.op)}),ee(We,{label:i.duplicate.label,disabled:!i.duplicate.enabled,style:o,icon:ee(Rr,{size:wt,color:de.btnIcon}),onPress:()=>a(i.duplicate.op)}),ee(We,{label:i.remove.label,danger:true,disabled:!i.remove.enabled,style:o,icon:ee(Er,{size:wt,color:de.dangerText}),onPress:()=>a(i.remove.op)})]})]})}u(dn,"DataTreeActionBar");function sn({value:e,onCommit:r,onCancel:t}){let[n,o]=Bo(()=>e==null?"":String(e));if(typeof e=="boolean")return dt(h,{style:te.inlineRow,children:[[true,false].map(l=>ee(Y,{accessibilityLabel:`Set ${l}`,onPress:()=>r(l),hitSlop:{top:8,bottom:8,left:6,right:6},style:[te.button,e===l&&te.buttonActive],children:ee(f,{style:te.buttonText,children:String(l)})},String(l))),ee(Y,{accessibilityLabel:"Cancel edit",onPress:t,hitSlop:{top:8,bottom:8,left:6,right:6},style:te.button,children:ee(f,{style:te.buttonText,children:"Cancel"})})]});let s=typeof e=="number",i=s&&(n.trim()===""||Number.isNaN(Number(n))),a=u(()=>{i||r(s?Number(n):n)},"commit");return dt(h,{style:te.inlineRow,children:[ee(Ot,{value:n,onChangeText:o,onSubmitEditing:a,autoFocus:true,autoCapitalize:"none",autoCorrect:false,spellCheck:false,keyboardType:s?"numeric":"default",style:[te.input,i&&te.inputInvalid],placeholderTextColor:de.hint}),ee(Y,{accessibilityLabel:"Save value",onPress:a,hitSlop:{top:8,bottom:8,left:6,right:6},style:[te.saveButton,i&&te.saveButtonDisabled],children:ee(f,{style:te.saveText,children:"Save"})}),ee(Y,{accessibilityLabel:"Cancel edit",onPress:t,hitSlop:{top:8,bottom:8,left:6,right:6},style:te.button,children:ee(f,{style:te.buttonText,children:"Cancel"})})]})}u(sn,"DataTreeInlineEditor");var te=le.create({inlineRow:{flex:1,flexDirection:"row",alignItems:"center",gap:6},input:{flex:1,minWidth:0,height:28,color:de.label,backgroundColor:A.background.input,borderWidth:1,borderColor:A.border.input,borderRadius:7,paddingHorizontal:9,paddingVertical:0,fontSize:12,fontFamily:S},inputInvalid:{borderColor:A.semantic.error},saveButton:{height:28,justifyContent:"center",paddingHorizontal:10,borderRadius:7,backgroundColor:A.semantic.success},saveButtonDisabled:{opacity:.4},saveText:{color:A.background.base,fontSize:12,fontWeight:"600"},buttonActive:{borderColor:A.semantic.success},bar:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:8,paddingHorizontal:12,paddingVertical:9,borderTopWidth:1,borderTopColor:de.barBorder,backgroundColor:de.barBg},actions:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:6,marginLeft:"auto"},selectionLabelEmpty:{color:de.hint,fontWeight:"400"},selectionLabel:{color:de.label,fontSize:12,fontWeight:"600",fontFamily:S,flexShrink:1},badge:{paddingHorizontal:7,paddingVertical:1,borderRadius:5,backgroundColor:de.badgeBg},badgeText:{color:de.badgeText,fontSize:11,fontWeight:"600"},button:{flexDirection:"row",alignItems:"center",gap:6,minHeight:32,paddingHorizontal:11,borderRadius:8,borderWidth:1,borderColor:de.btnBorder,backgroundColor:de.btnBg},buttonDisabled:{opacity:.35},buttonIconOnly:{paddingHorizontal:0,width:32,justifyContent:"center"},buttonText:{color:de.btnText,fontSize:12,fontWeight:"600"},hint:{color:de.hint,fontSize:12,flexShrink:1}});import{jsx as we,jsxs as ir}from"react/jsx-runtime";var be={dockBg:A.background.card,dockBorder:A.border.default,tileBg:A.background.hover,tileBorder:A.border.default,tileText:A.text.primary,tileIcon:A.text.secondary,hint:A.text.muted,label:A.text.primary,badgeBg:A.background.hover,badgeText:A.text.secondary,dangerBorder:A.semantic.error+"55",dangerText:A.semantic.error},Je=16;function cn(e,r){switch(e){case"editValue":return we(Fr,{size:Je,color:r});case"add":return we(Ir,{size:Je,color:r});case"duplicate":return we(Rr,{size:Je,color:r});case"moveUp":return we(jt,{size:Je+2,color:r});case"moveDown":return we(ut,{size:Je+2,color:r});case"remove":return we(Er,{size:Je,color:r})}}u(cn,"iconFor");function un({action:e,onPress:r}){let{enabled:t,danger:n,label:o,id:s}=e,i=n&&t?be.dangerText:be.tileIcon;return ir(Y,{"sentry-label":"ignore devtools tree action",testID:`buoy-tree-action-${s}`,accessibilityLabel:o,accessibilityState:{disabled:!t},disabled:!t,onPress:t?r:void 0,style:[Be.tile,n&&t&&{borderColor:be.dangerBorder},!t&&Be.tileDisabled],children:[cn(s,i),we(f,{style:[Be.tileText,n&&t&&{color:be.dangerText}],numberOfLines:1,children:o})]})}u(un,"Tile");function hn({root:e,selection:r,onEdit:t,onSelectPath:n,onEditValue:o,containersEditable:s=true,rootEntriesLocked:i=false}){let a=Ct(e,r,{containersEditable:s,rootEntriesLocked:i}),l=r!=null,c=u(d=>{if(!d.op){o();return}t(d.op),d.selectAfter&&n(d.selectAfter)},"run");return ir(h,{style:Be.dock,children:[ir(h,{style:Be.header,children:[we(f,{style:[Be.selectionLabel,!l&&Be.selectionLabelEmpty],numberOfLines:1,children:l?lt(r.path):"Tap a row to select it"}),we(h,{style:Be.badge,children:we(f,{style:Be.badgeText,children:l?Ve(r.value):"\u2014"})})]}),we(h,{style:Be.grid,children:a.map(d=>we(un,{action:d,onPress:()=>c(d)},d.id))})]})}u(hn,"DataTreeActionDock");var Be=le.create({dock:{borderTopWidth:1,borderTopColor:be.dockBorder,backgroundColor:be.dockBg,paddingHorizontal:10,paddingTop:8,paddingBottom:10,gap:8},header:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:2},selectionLabel:{flex:1,color:be.label,fontSize:12,fontWeight:"600",fontFamily:S},selectionLabelEmpty:{color:be.hint,fontWeight:"400"},badge:{paddingHorizontal:7,paddingVertical:1,borderRadius:5,backgroundColor:be.badgeBg},badgeText:{color:be.badgeText,fontSize:11,fontWeight:"600"},grid:{flexDirection:"row",flexWrap:"wrap",gap:8},tile:{flexBasis:"31%",flexGrow:1,minHeight:54,alignItems:"center",justifyContent:"center",gap:3,paddingHorizontal:6,borderRadius:10,borderWidth:1,borderColor:be.tileBorder,backgroundColor:be.tileBg},tileDisabled:{opacity:.35},tileText:{color:be.tileText,fontSize:11,fontWeight:"600"}});import{Fragment as Io,useMemo as gn,memo as Ao}from"react";import{memo as Ro}from"react";import{jsx as Ae,jsxs as Tt}from"react/jsx-runtime";var ar=Ro(u(function({added:e,removed:r,modified:t,theme:n,style:o}){return e>0||r>0||t>0?Tt(h,{style:[xe.container,{backgroundColor:n.summaryBackground,borderTopColor:n.borderColor},o],children:[e>0&&Tt(h,{style:[xe.badge,{backgroundColor:n.addedBackground}],children:[Ae(f,{style:[xe.icon,{color:n.summaryAddedText}],children:"+"}),Ae(f,{style:[xe.count,{color:n.summaryAddedText}],children:e}),Ae(f,{style:[xe.label,{color:n.summaryAddedText}],children:"new"})]}),r>0&&Tt(h,{style:[xe.badge,{backgroundColor:n.removedBackground}],children:[Ae(f,{style:[xe.icon,{color:n.summaryRemovedText}],children:"\u2212"}),Ae(f,{style:[xe.count,{color:n.summaryRemovedText}],children:r}),Ae(f,{style:[xe.label,{color:n.summaryRemovedText}],children:"gone"})]}),t>0&&Tt(h,{style:[xe.badge,{backgroundColor:n.modifiedBackground}],children:[Ae(f,{style:[xe.icon,{color:n.summaryModifiedText}],children:"\u2248"}),Ae(f,{style:[xe.count,{color:n.summaryModifiedText}],children:t}),Ae(f,{style:[xe.label,{color:n.summaryModifiedText}],children:"modified"})]})]}):null},"DiffSummary")),xe=le.create({container:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:12,paddingVertical:6,paddingHorizontal:12,borderTopWidth:1},badge:{flexDirection:"row",alignItems:"center",gap:3,paddingHorizontal:6,paddingVertical:2,borderRadius:10},icon:{fontSize:11,fontFamily:S,fontWeight:"700"},count:{fontSize:10,fontFamily:S,fontWeight:"600"},label:{fontSize:9,fontFamily:S,opacity:.9}});var fn={name:"Git Classic",description:"Traditional Git diff colors - simple and familiar",background:"#FFFFFF",panelBackground:"#F8F8F8",headerBackground:"#F0F0F0",addedBackground:"#E6FFED",removedBackground:"#FFEEF0",modifiedBackground:"#FFF5DD",unchangedBackground:"transparent",contextBackground:"#FAFAFA",addedText:"#22863A",removedText:"#CB2431",modifiedText:"#B08800",unchangedText:"#24292E",addedWordHighlight:"#ACF2BD",removedWordHighlight:"#FDB8C0",lineNumberBackground:"#F6F8FA",lineNumberText:"#959DA5",lineNumberBorder:"#E1E4E8",markerAddedBackground:"#CDFFD8",markerRemovedBackground:"#FFDCE0",markerModifiedBackground:"#FFF5B1",markerText:"#666666",borderColor:"#E1E4E8",dividerColor:"#E1E4E8",summaryBackground:"#F6F8FA",summaryAddedText:"#28A745",summaryRemovedText:"#D73A49",summaryModifiedText:"#0366D6",emptyStateText:"#586069",separatorBackground:"#F6F8FA",separatorText:"#586069"},lr={name:"Dev Tools Default",description:"The Buoy night theme",background:"#050505",panelBackground:"#0C0C0C",headerBackground:"#0C0C0C",addedBackground:"rgba(32, 201, 151, 0.12)",removedBackground:"rgba(239, 68, 68, 0.12)",modifiedBackground:"rgba(155, 112, 224, 0.12)",unchangedBackground:"transparent",contextBackground:"rgba(255, 255, 255, 0.02)",addedText:"#20C997",removedText:"#EF4444",modifiedText:"#9B70E0",unchangedText:"#ECEDEE",addedWordHighlight:"rgba(32, 201, 151, 0.3)",removedWordHighlight:"rgba(239, 68, 68, 0.3)",lineNumberBackground:"#050505",lineNumberText:"#9BA1A6",lineNumberBorder:"#1A1A1C",markerAddedBackground:"rgba(32, 201, 151, 0.2)",markerRemovedBackground:"rgba(239, 68, 68, 0.2)",markerModifiedBackground:"rgba(155, 112, 224, 0.2)",markerText:"#9BA1A6",borderColor:"#1A1A1C",dividerColor:"#1A1A1C",summaryBackground:"#0C0C0C",summaryAddedText:"#20C997",summaryRemovedText:"#EF4444",summaryModifiedText:"#9B70E0",emptyStateText:"#636366",separatorBackground:"#0C0C0C",separatorText:"#9BA1A6"},Fo={gitClassic:fn,devToolsDefault:lr};import{Fragment as pn,jsx as G,jsxs as ze}from"react/jsx-runtime";var Eo=Ao(u(function({oldValue:e,newValue:r,theme:t=lr,options:n={},showThemeName:o=false,height:s=400}){let{hideLineNumbers:i=false,disableWordDiff:a=false,showDiffOnly:l=false,compareMethod:c="words",contextLines:d=3}=n,p={compareMethod:c,disableWordDiff:a,showDiffOnly:l,contextLines:d},b=gn(()=>bt(e,r,p),[e,r,c,a,l,d]),m=gn(()=>mn(t,s),[t,s]),D=u(g=>g.map((v,T)=>{let k="transparent";return v.type==="added"?k=t.addedWordHighlight:v.type==="removed"&&(k=t.removedWordHighlight),G(f,{style:[m.wordDiff,{backgroundColor:k}],children:v.value},T)}),"renderWordDiff"),B=u((g,v=false)=>{if(v)return{background:t.modifiedBackground,text:t.modifiedText,markerBg:t.markerModifiedBackground};switch(g){case"added":return{background:t.addedBackground,text:t.addedText,markerBg:t.markerAddedBackground};case"removed":return{background:t.removedBackground,text:t.removedText,markerBg:t.markerRemovedBackground};case"unchanged":return{background:t.unchangedBackground,text:t.unchangedText,markerBg:"transparent"};default:return{background:t.unchangedBackground,text:t.unchangedText,markerBg:"transparent"}}},"getDiffColors"),R=u((g,v,T,k,w=false)=>{if(w)return ze(pn,{children:[!i&&G(h,{style:[m.gutter,m.emptyGutter],children:G(f,{style:m.lineNumber,children:" "})}),G(h,{style:[m.marker,m.emptyMarker],children:G(f,{style:m.markerText,children:" "})}),G(h,{style:[m.contentCell,m.emptyContent],children:G(f,{style:m.content,children:" "})})]});let W=B(T);return ze(pn,{children:[!i&&G(h,{style:[m.gutter,{backgroundColor:t.lineNumberBackground}],children:G(f,{style:m.lineNumber,children:g||" "})}),G(h,{style:[m.marker,{backgroundColor:W.markerBg}],children:G(f,{style:[m.markerText,{color:t.markerText}],children:k})}),G(h,{style:[m.contentCell,{backgroundColor:W.background}],children:G(f,{style:[m.content,{color:W.text}],children:Array.isArray(v)?D(v):v||" "})})]})},"renderLineSide"),oe=u((g,v)=>{if(!l||g===0)return false;let T=v[g-1],k=v[g],w=k.leftLineNumber&&T.leftLineNumber&&k.leftLineNumber-T.leftLineNumber>1,W=k.rightLineNumber&&T.rightLineNumber&&k.rightLineNumber-T.rightLineNumber>1;return w||W},"shouldShowSeparator"),J=u((g,v,T)=>{let k=g.type==="removed",w=g.type==="added",W=g.type==="modified",$=g.type==="unchanged";return ze(Io,{children:[oe(v,T)&&G(h,{style:m.separator,children:G(f,{style:m.separatorText,children:"\u2022 \u2022 \u2022"})}),ze(h,{style:m.row,children:[G(h,{style:m.leftSide,children:k||W||$?R(g.leftLineNumber,g.leftContent,W?"removed":g.type,k||W?"-":" "):R(void 0,void 0,"unchanged"," ",true)}),G(h,{style:m.centerDivider}),G(h,{style:m.rightSide,children:w||W||$?R(g.rightLineNumber,g.rightContent,W?"added":g.type,w||W?"+":" "):R(void 0,void 0,"unchanged"," ",true)})]})]},v)},"renderDiffRow"),x=b.filter(g=>g.type==="added").length,C=b.filter(g=>g.type==="removed").length,I=b.filter(g=>g.type==="modified").length;return ze(h,{style:[m.container,t.glowColor&&{shadowColor:t.glowColor,shadowOffset:{width:0,height:0},shadowOpacity:t.neonIntensity&&t.neonIntensity>.7?.5:t.neonIntensity&&t.neonIntensity>.3?.3:.1,shadowRadius:t.neonIntensity&&t.neonIntensity>.7?10:t.neonIntensity&&t.neonIntensity>.3?5:2}],children:[o&&ze(h,{style:m.themeBadge,children:[G(f,{style:m.themeName,children:t.name}),G(f,{style:m.themeDescription,children:t.description})]}),ze(h,{style:m.header,children:[G(h,{style:m.headerLeft,children:G(f,{style:m.headerTitle,children:"PREV"})}),G(h,{style:m.divider}),G(h,{style:m.headerRight,children:G(f,{style:m.headerTitle,children:"CUR"})})]}),G(ar,{added:x,removed:C,modified:I,theme:t}),G(Pt,{style:m.scrollView,showsVerticalScrollIndicator:false,contentContainerStyle:m.scrollContent,children:b.length===0?G(h,{style:m.emptyState,children:G(f,{style:m.emptyText,children:l?"No differences found":"No content to display"})}):b.map((g,v)=>J(g,v,b))})]})},"SplitDiffViewer"));function mn(e,r){return le.create({container:{height:r,backgroundColor:e.background,borderRadius:8,overflow:"hidden",borderWidth:1,borderColor:e.borderColor},themeBadge:{backgroundColor:e.panelBackground,paddingHorizontal:12,paddingVertical:8,borderBottomWidth:1,borderBottomColor:e.borderColor},themeName:{fontSize:12,fontWeight:"700",color:e.accentColor||e.unchangedText,fontFamily:S,letterSpacing:.5},themeDescription:{fontSize:10,color:e.unchangedText,fontFamily:S,marginTop:2,opacity:.8},header:{flexDirection:"row",backgroundColor:e.headerBackground,borderBottomWidth:1,borderBottomColor:e.borderColor},headerLeft:{flex:1,paddingVertical:8,paddingHorizontal:12},headerRight:{flex:1,paddingVertical:8,paddingHorizontal:12},headerTitle:{fontSize:10,fontWeight:"700",color:e.accentColor||e.unchangedText,fontFamily:S,letterSpacing:.5,textTransform:"uppercase"},divider:{width:1,backgroundColor:e.dividerColor},scrollView:{flex:1},scrollContent:{paddingBottom:10},row:{flexDirection:"row",minHeight:20},leftSide:{flex:1,flexDirection:"row"},rightSide:{flex:1,flexDirection:"row"},centerDivider:{width:1,backgroundColor:e.dividerColor},gutter:{width:35,paddingHorizontal:4,justifyContent:"center",alignItems:"flex-end",backgroundColor:e.lineNumberBackground,borderRightWidth:1,borderRightColor:e.lineNumberBorder},emptyGutter:{backgroundColor:e.contextBackground},lineNumber:{fontSize:9,fontFamily:S,color:e.lineNumberText},marker:{width:20,justifyContent:"center",alignItems:"center"},emptyMarker:{backgroundColor:e.contextBackground},markerText:{fontSize:10,fontFamily:S,fontWeight:"600"},contentCell:{flex:1,paddingHorizontal:8,paddingVertical:2},emptyContent:{backgroundColor:e.contextBackground},content:{fontSize:10,fontFamily:S,lineHeight:16},wordDiff:{fontSize:10,fontFamily:S},separator:{height:20,justifyContent:"center",alignItems:"center",backgroundColor:e.separatorBackground},separatorText:{fontSize:8,color:e.separatorText,fontFamily:S,letterSpacing:2},emptyState:{padding:40,alignItems:"center",justifyContent:"center"},emptyText:{fontSize:11,color:e.emptyStateText,fontStyle:"italic",fontFamily:S}})}u(mn,"createDynamicStyles");import{memo as No}from"react";import{jsx as dr,jsxs as st}from"react/jsx-runtime";var yn=No(u(function({deltas:e,theme:r}){return e.length===0?null:dr(h,{style:[Le.container,{backgroundColor:r.summaryBackground,borderTopColor:r.borderColor}],children:e.map(t=>st(h,{style:Le.row,children:[dr(f,{style:[Le.glyph,{color:r.summaryModifiedText}],children:"\u25F7"}),st(h,{style:Le.text,children:[st(f,{style:Le.headline,children:[t.path?st(f,{style:[Le.path,{color:r.lineNumberText}],children:[t.path," "]}):null,dr(f,{style:{color:r.summaryModifiedText},children:t.deltaLabel})]}),st(f,{style:[Le.instants,{color:r.lineNumberText}],children:[t.fromLabel," \u2192 ",t.toLabel]})]})]},t.path??"__value__"))})},"TimestampDeltaBar")),Le=le.create({container:{borderTopWidth:le.hairlineWidth,paddingHorizontal:10,paddingVertical:7,gap:6},row:{flexDirection:"row",alignItems:"flex-start",gap:7},glyph:{fontSize:12,lineHeight:15},text:{flex:1,minWidth:0},headline:{fontSize:12,fontWeight:"600",lineHeight:15},path:{fontWeight:"400"},instants:{fontSize:11,marginTop:1,fontVariant:["tabular-nums"]}});import{memo as Vo}from"react";import{jsx as bn,jsxs as Wo}from"react/jsx-runtime";var xn=Vo(u(function({visible:e,theme:r}){return e?Wo(h,{style:[sr.container,{backgroundColor:r.summaryBackground,borderTopColor:r.borderColor}],children:[bn(f,{style:[sr.glyph,{color:r.lineNumberText}],children:"{ }"}),bn(f,{style:[sr.text,{color:r.lineNumberText}],children:"Stored as a JSON string \u2014 decoded below so the change is readable."})]}):null},"JsonStringNotice")),sr=le.create({container:{flexDirection:"row",alignItems:"center",gap:7,borderTopWidth:le.hairlineWidth,paddingHorizontal:10,paddingVertical:6},glyph:{fontSize:11,fontWeight:"700"},text:{flex:1,fontSize:11,lineHeight:14}});function kt(e){if(typeof e!="string")return null;let r=e.trim();if(!r.startsWith("{")&&!r.startsWith("["))return null;try{let t=JSON.parse(r);return typeof t!="object"||t===null?null:{value:t}}catch{return null}}u(kt,"parseJsonContainer");function cr(e){return Ue(e)||e===void 0||e===null}u(cr,"isMissing");function ur(e,r){let t=kt(e),n=kt(r);return t&&n?{left:t.value,right:n.value,decoded:true}:t&&cr(r)?{left:t.value,right:r,decoded:true}:n&&cr(e)?{left:e,right:n.value,decoded:true}:{left:e,right:r,decoded:false}}u(ur,"decodeJsonStringPair");var zo=/^\d{4}-\d{2}-\d{2}(?:[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d{1,9})?)?(?:Z|[+-]\d{2}:?\d{2})?)?$/;function hr(e){return Number.isInteger(e)?e>=1e12&&e<41024448e5?{kind:"epoch-ms",epochMs:e}:e>=1e9&&e<4102444800?{kind:"epoch-s",epochMs:e*1e3}:null:null}u(hr,"fromNumber");function St(e){if(e instanceof Date){let n=e.getTime();return Number.isFinite(n)?{kind:"iso",epochMs:n}:null}if(typeof e=="number")return hr(e);if(typeof e!="string")return null;let r=e.trim();if(r==="")return null;if(/^\d+$/.test(r))return hr(Number(r));if(!zo.test(r))return null;let t=Date.parse(r);return Number.isFinite(t)?{kind:"iso",epochMs:t}:null}u(St,"detectTimestamp");function qe(e){return e<10?`0${e}`:String(e)}u(qe,"two");function Dt(e){let r=new Date(e);return`${r.getFullYear()}-${qe(r.getMonth()+1)}-${qe(r.getDate())} ${qe(r.getHours())}:${qe(r.getMinutes())}:${qe(r.getSeconds())}`}u(Dt,"formatInstant");function gr(e){let r=Math.abs(e);if(r<1e3)return`${r}ms`;let t=Math.floor(r/1e3);if(t<60)return`${t}s`;let n=Math.floor(t/60),o=t%60;if(n<60)return o?`${n}m ${o}s`:`${n}m`;let s=Math.floor(n/60),i=n%60;if(s<24)return i?`${s}h ${i}m`:`${s}h`;let a=Math.floor(s/24),l=s%24;return l?`${a}d ${l}h`:`${a}d`}u(gr,"formatDuration");function fr(e,r,t){let n=St(e),o=St(r);if(!n||!o||n.kind!==o.kind)return null;let s=o.epochMs-n.epochMs;return{path:t,kind:n.kind,deltaMs:s,deltaLabel:s===0?"same instant":`${gr(s)} ${s<0?"earlier":"later"}`,fromLabel:Dt(n.epochMs),toLabel:Dt(o.epochMs)}}u(fr,"pair");function pr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&!(e instanceof Date)}u(pr,"isPlainObject");var Lo=6;function mr(e,r){let t=fr(e,r);if(t)return[t];if(!pr(e)||!pr(r))return[];let n=[];for(let o of Object.keys(e)){if(n.length>=Lo)break;if(!(o in r)||Object.is(e[o],r[o]))continue;let s=fr(e[o],r[o],o);s&&n.push(s)}return n}u(mr,"describeTimestampDeltas");import{Fragment as Bt,memo as vn,useCallback as It,useEffect as jo,useMemo as je,useRef as Mo,useState as Oo}from"react";import{jsx as V,jsxs as Me}from"react/jsx-runtime";var Po={hideLineNumbers:false,disableWordDiff:false,showDiffOnly:false,compareMethod:"words",contextLines:3,lineOffset:0};function Cn({oldValue:e,newValue:r,theme:t,options:n=Po,showThemeName:o=false,scrollEnabled:s=true}){let i=je(()=>Sn(t,s),[t,s]),a=je(()=>({compareMethod:n.compareMethod,disableWordDiff:n.disableWordDiff,showDiffOnly:n.showDiffOnly,contextLines:n.contextLines}),[n.compareMethod,n.disableWordDiff,n.showDiffOnly,n.contextLines]),l=je(()=>ur(e,r),[e,r]),c=je(()=>bt(l.left,l.right,a),[l,a]),d=je(()=>{let C=0,I=0,g=0;for(let v of c)v.type==="added"?C++:v.type==="removed"?I++:v.type==="modified"&&g++;return{added:C,removed:I,modified:g}},[c]),p=je(()=>mr(l.left,l.right),[l]),[b,m]=Oo(()=>new Set),D=Mo(false);jo(()=>{if(!D.current){D.current=true;return}m(new Set)},[e,r]);let B=je(()=>Tn(c,b),[c,b]),R=It(C=>{m(I=>{let g=new Set(I);return g.has(C)?g.delete(C):g.add(C),g})},[]),oe=It(C=>C.kind==="row"?`r:${C.diffIndex}`:`f:${C.foldId}`,[]),J=It(C=>C.kind==="fold"?V($o,{foldId:C.foldId,count:C.count,expanded:C.expanded,theme:t,styles:i,onToggle:R}):V(Uo,{diff:C.diff,showSeparator:false,theme:t,options:n,styles:i}),[t,n,i,R]),x=It(({item:C})=>J(C),[J]);return Me(h,{style:[i.container,t.glowColor&&{shadowColor:t.glowColor,shadowOffset:{width:0,height:0},shadowOpacity:t.neonIntensity&&t.neonIntensity>.7?.5:t.neonIntensity&&t.neonIntensity>.3?.3:.1,shadowRadius:t.neonIntensity&&t.neonIntensity>.7?10:t.neonIntensity&&t.neonIntensity>.3?5:2}],children:[o&&Me(h,{style:i.themeBadge,children:[V(f,{style:i.themeName,children:t.name}),V(f,{style:i.themeDescription,children:t.description})]}),Me(h,{style:i.header,children:[V(h,{style:i.headerLeft,children:V(f,{style:i.headerTitle,children:"PREV"})}),V(h,{style:i.divider}),V(h,{style:i.headerRight,children:V(f,{style:i.headerTitle,children:"CUR"})})]}),V(ar,{added:d.added,removed:d.removed,modified:d.modified,theme:t}),V(xn,{visible:l.decoded,theme:t}),V(yn,{deltas:p,theme:t}),c.length===0?V(h,{style:i.emptyState,children:V(f,{style:i.emptyText,children:n.showDiffOnly?"No differences found":"No content to display"})}):s?V(Mt,{style:i.scrollView,contentContainerStyle:i.scrollContent,data:B,renderItem:x,keyExtractor:oe,showsVerticalScrollIndicator:false,initialNumToRender:20,maxToRenderPerBatch:20,windowSize:7,removeClippedSubviews:true}):V(h,{style:i.scrollContent,children:B.map(C=>V(Bt,{children:J(C)},oe(C)))})]})}u(Cn,"ThemedSplitView");var wn=3,Ho=4;function Tn(e,r){let t=e.length;if(t===0)return[];let n=new Array(t).fill(false);for(let a=0;a<t;a++)if(e[a].type!=="unchanged"){let l=Math.max(0,a-wn),c=Math.min(t-1,a+wn);for(let d=l;d<=c;d++)n[d]=true}let o=[],s=0,i=0;for(;i<t;){if(n[i]){o.push({kind:"row",diff:e[i],diffIndex:i}),i++;continue}let a=i;for(;a<t&&!n[a];)a++;let l=a-i;if(l<Ho)for(let c=i;c<a;c++)o.push({kind:"row",diff:e[c],diffIndex:c});else{let c=s++,d=r.has(c);if(o.push({kind:"fold",foldId:c,count:l,expanded:d}),d)for(let p=i;p<a;p++)o.push({kind:"row",diff:e[p],diffIndex:p})}i=a}return o}u(Tn,"buildSplitItems");var $o=vn(u(function({foldId:e,count:r,expanded:t,theme:n,styles:o,onToggle:s}){return V(Y,{style:[o.foldHeader,{backgroundColor:n.separatorBackground}],onPress:()=>s(e),activeOpacity:.7,children:V(f,{style:[o.foldHeaderText,{color:n.separatorText}],children:t?`\u25BC ${r} unchanged line${r===1?"":"s"} \u2014 tap to hide`:`\u25B6 ${r} unchanged line${r===1?"":"s"} \u2014 tap to expand`})})},"FoldHeader")),Uo=vn(u(function({diff:e,showSeparator:r,theme:t,options:n,styles:o}){let s=e.type==="removed",i=e.type==="added",a=e.type==="modified",l=e.type==="unchanged";return Me(Bt,{children:[r&&V(h,{style:o.separator,children:V(f,{style:o.separatorText,children:"\u2022 \u2022 \u2022"})}),Me(h,{style:o.row,children:[V(h,{style:o.leftSide,children:s||a||l?V(yr,{lineNumber:e.leftLineNumber,content:e.leftContent,type:a?"removed":e.type,marker:s||a?"-":" ",theme:t,options:n,styles:o}):V(br,{options:n,styles:o})}),V(h,{style:o.centerDivider}),V(h,{style:o.rightSide,children:i||a||l?V(yr,{lineNumber:e.rightLineNumber,content:e.rightContent,type:a?"added":e.type,marker:i||a?"+":" ",theme:t,options:n,styles:o}):V(br,{options:n,styles:o})})]})]})},"DiffRow"));function yr({lineNumber:e,content:r,type:t,marker:n,theme:o,options:s,styles:i}){let a=kn(t,o);return Me(Bt,{children:[!s.hideLineNumbers&&V(h,{style:[i.gutter,{backgroundColor:o.lineNumberBackground}],children:V(f,{style:i.lineNumber,children:e||" "})}),V(h,{style:[i.marker,{backgroundColor:a.markerBg}],children:V(f,{style:[i.markerText,{color:o.markerText}],children:n})}),V(h,{style:[i.contentCell,{backgroundColor:a.background}],children:V(f,{style:[i.content,{color:a.text}],children:Array.isArray(r)?r.map((l,c)=>{let d="transparent";return l.type==="added"?d=o.addedWordHighlight:l.type==="removed"&&(d=o.removedWordHighlight),V(f,{style:[i.wordDiff,{backgroundColor:d}],children:l.value},c)}):r||" "})})]})}u(yr,"LineSide");function br({options:e,styles:r}){return Me(Bt,{children:[!e.hideLineNumbers&&V(h,{style:[r.gutter,r.emptyGutter],children:V(f,{style:r.lineNumber,children:" "})}),V(h,{style:[r.marker,r.emptyMarker],children:V(f,{style:r.markerText,children:" "})}),V(h,{style:[r.contentCell,r.emptyContent],children:V(f,{style:r.content,children:" "})})]})}u(br,"EmptyLineSide");function kn(e,r){switch(e){case"added":return{background:r.addedBackground,text:r.addedText,markerBg:r.markerAddedBackground};case"removed":return{background:r.removedBackground,text:r.removedText,markerBg:r.markerRemovedBackground};case"unchanged":default:return{background:r.unchangedBackground,text:r.unchangedText,markerBg:"transparent"}}}u(kn,"getDiffColors");function Sn(e,r){return le.create({container:{...r?{height:400}:null,backgroundColor:e.background,borderRadius:8,overflow:"hidden",borderWidth:1,borderColor:e.borderColor},themeBadge:{backgroundColor:e.panelBackground,paddingHorizontal:12,paddingVertical:8,borderBottomWidth:1,borderBottomColor:e.borderColor},themeName:{fontSize:12,fontWeight:"700",color:e.accentColor||e.unchangedText,fontFamily:S,letterSpacing:.5},themeDescription:{fontSize:10,color:e.unchangedText,fontFamily:S,marginTop:2,opacity:.8},header:{flexDirection:"row",backgroundColor:e.headerBackground,borderBottomWidth:1,borderBottomColor:e.borderColor},headerLeft:{flex:1,paddingVertical:8,paddingHorizontal:12},headerRight:{flex:1,paddingVertical:8,paddingHorizontal:12},headerTitle:{fontSize:10,fontWeight:"700",color:e.accentColor||e.unchangedText,fontFamily:S,letterSpacing:.5,textTransform:"uppercase"},divider:{width:1,backgroundColor:e.dividerColor},scrollView:{flex:1},scrollContent:{paddingBottom:10},row:{flexDirection:"row",minHeight:20},leftSide:{flex:1,flexDirection:"row"},rightSide:{flex:1,flexDirection:"row"},centerDivider:{width:1,backgroundColor:e.dividerColor},gutter:{width:35,paddingHorizontal:4,justifyContent:"center",alignItems:"flex-end",backgroundColor:e.lineNumberBackground,borderRightWidth:1,borderRightColor:e.lineNumberBorder},emptyGutter:{backgroundColor:e.contextBackground},lineNumber:{fontSize:9,fontFamily:S,color:e.lineNumberText},marker:{width:20,justifyContent:"center",alignItems:"center"},emptyMarker:{backgroundColor:e.contextBackground},markerText:{fontSize:10,fontFamily:S,fontWeight:"600"},contentCell:{flex:1,paddingHorizontal:8,paddingVertical:2},emptyContent:{backgroundColor:e.contextBackground},content:{fontSize:10,fontFamily:S,lineHeight:16},wordDiff:{fontSize:10,fontFamily:S},summaryBar:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:16,paddingVertical:6,backgroundColor:e.summaryBackground,borderTopWidth:1,borderTopColor:e.borderColor},summaryItem:{flexDirection:"row",alignItems:"center"},summaryText:{fontSize:10,fontFamily:S,fontWeight:"700"},separator:{height:20,justifyContent:"center",alignItems:"center",backgroundColor:e.separatorBackground},separatorText:{fontSize:8,color:e.separatorText,fontFamily:S,letterSpacing:2},foldHeader:{paddingVertical:6,paddingHorizontal:12,alignItems:"center",justifyContent:"center",borderTopWidth:1,borderBottomWidth:1,borderColor:e.borderColor},foldHeaderText:{fontSize:10,fontFamily:S,letterSpacing:.5},emptyState:{padding:40,alignItems:"center",justifyContent:"center"},emptyText:{fontSize:11,color:e.emptyStateText,fontStyle:"italic",fontFamily:S}})}u(Sn,"createDynamicStyles");import{useCallback as Ke,useState as Qe}from"react";function xr(e,r){let[t,n]=Qe(void 0),[o,s]=Qe(false),[i,a]=Qe(false),[l,c]=Qe(null),[d,p]=Qe(),[b,m]=Qe(""),D=o&&t!==void 0?t:e,B=o&&JSON.stringify(t)!==b,R=Ke(()=>{n(e),m(JSON.stringify(e)),p(void 0),c(null),s(true)},[e]),oe=Ke(g=>{n(T=>rr(T,g));let v=er(g);v!==void 0&&p(v)},[]),J=Ke(g=>{p(g)},[]),x=Ke(()=>{s(false),n(void 0),p(void 0),c(null)},[]),C=Ke(()=>{n(e),m(JSON.stringify(e)),p(void 0),c(null),s(true)},[e]),I=Ke(async()=>{if(!B||!r)return x(),true;a(true),c(null);try{return await r(t),x(),true}catch(g){return c(g instanceof Error?g.message:String(g)),false}finally{a(false)}},[t,B,x,r]);return{isEditing:o,value:D,isDirty:B,isSaving:i,error:l,selectPath:d,begin:R,apply:oe,selectAt:J,commit:I,discard:C}}u(xr,"useTreeDraft");import{useCallback as At,useEffect as Go,useState as Dn}from"react";function Bn({value:e,save:r,onClose:t,confirmDiscard:n}){let o=xr(e,r),[s,i]=Dn(null),[a,l]=Dn(null),{begin:c}=o;Go(()=>{c()},[]);let d=At(D=>{let B=xt(o.value,D);if(typeof B=="boolean"){o.apply({kind:"replace",path:D,value:!B});return}l(D)},[o]),p=At(D=>{o.apply({kind:"replace",path:a??[],value:D}),l(null)},[o,a]),b=At(()=>{o.commit().then(D=>D&&t())},[o,t]),m=At(()=>{if(!o.isDirty){t();return}n({save:b,discard:u(()=>{o.discard(),t()},"discard")})},[n,o,t,b]);return{draft:o,selection:s,setSelection:i,valuePath:a,openValueEditor:d,closeValueEditor:u(()=>l(null),"closeValueEditor"),applyValue:p,openRawEditor:u(()=>l([]),"openRawEditor"),requestClose:m,saveAndClose:b}}u(Bn,"useTreeEditor");import{useState as Jo}from"react";import{jsx as ue,jsxs as Rt}from"react/jsx-runtime";function In(e){return typeof e=="boolean"?"boolean":typeof e=="number"?"number":e!==null&&typeof e=="object"?"raw":"text"}u(In,"modeFor");function An(e,r){return r==="raw"?JSON.stringify(e,null,2):e==null?"":String(e)}u(An,"initialText");function Rn(e,r){switch(e){case"number":return"Numeric only \u2014 anything else is refused, so this stays a number.";case"raw":return`Raw JSON. Must stay ${r==="array"?"an array":"an object"} \u2014 a different shape is refused.`;default:return"Saves as a string. The type never changes here."}}u(Rn,"hintFor");function Fn({path:e,value:r,onSave:t,onCancel:n,saveLabel:o="Save",busy:s=false,testIDPrefix:i="buoy-data-value"}){let a=In(r),l=Ve(r),[c,d]=Jo(()=>An(r,a)),p=vr(c,a,l),b=s||p!=null,m=u(()=>{s||vr(c,a,l)!=null||t(Nn(c,a,r))},"commit");return Rt(h,{style:Q.overlay,children:[ue(Y,{style:Q.scrim,activeOpacity:1,onPress:s?void 0:n,testID:`${i}-scrim`,accessibilityRole:"button",accessibilityLabel:"Dismiss editor"}),ue(h,{style:Q.panel,pointerEvents:"box-none",children:Rt(h,{style:Q.card,children:[Rt(h,{style:Q.headerRow,children:[ue(f,{style:Q.title,children:"Edit value"}),ue(h,{style:Q.typeBadge,children:ue(f,{style:Q.typeBadgeText,children:l})})]}),ue(f,{style:Q.path,numberOfLines:1,children:lt(e)}),a==="boolean"?ue(En,{current:r===true,onPick:t,testIDPrefix:i}):ue(Pt,{style:Q.fieldScroll,keyboardShouldPersistTaps:"handled",children:ue(Ot,{testID:`${i}-input`,accessibilityLabel:"Value",value:c,onChangeText:d,autoFocus:true,autoCapitalize:"none",autoCorrect:false,spellCheck:false,editable:!s,multiline:a!=="number",keyboardType:a==="number"?"numeric":a==="raw"?"ascii-capable":"default",onSubmitEditing:a==="number"?m:void 0,placeholder:a==="raw"?"{ }":"value",placeholderTextColor:y.color.placeholder,style:[Q.input,a==="raw"&&Q.inputRaw,a!=="number"&&Q.inputMultiline,p!=null&&Q.inputInvalid]})}),ue(f,{style:p!=null?Q.error:Q.hint,children:p??Rn(a,l)}),Rt(h,{style:Q.actions,children:[ue(Y,{onPress:n,disabled:s,testID:`${i}-cancel`,accessibilityRole:"button",accessibilityLabel:"Cancel edit",style:Q.cancelButton,children:ue(f,{style:Q.cancelText,children:"Cancel"})}),a==="boolean"?null:ue(Y,{onPress:m,disabled:b,testID:`${i}-save`,accessibilityRole:"button",accessibilityLabel:o,style:[Q.saveButton,b&&Q.saveDisabled],children:ue(f,{style:Q.saveText,children:s?"Saving\u2026":o})})]})]})})]})}u(Fn,"ValueEditModal");function En({current:e,onPick:r,testIDPrefix:t}){return ue(h,{style:Q.boolRow,children:[true,false].map(n=>ue(Y,{onPress:()=>r(n),testID:`${t}-${n}`,accessibilityRole:"button",accessibilityLabel:`Set ${n}`,style:[Q.boolButton,e===n&&Q.boolActive],children:ue(f,{style:[Q.boolText,e===n&&Q.boolTextActive],children:String(n)})},String(n)))})}u(En,"BooleanChoice");function vr(e,r,t){if(r==="number")return e.trim()===""?"Enter a number.":Number.isNaN(Number(e))?`"${e}" isn't a number.`:null;if(r==="raw"){let n;try{n=JSON.parse(e)}catch(o){return o instanceof Error?o.message:"Invalid JSON."}return Ve(n)!==t?`Must stay ${t} \u2014 that parses as ${Ve(n)}.`:null}return null}u(vr,"validate");function Nn(e,r,t){return r==="number"?Number(e):r==="raw"?JSON.parse(e):t===null&&e===""?null:e}u(Nn,"parse");var Q=le.create({overlay:{...Br,zIndex:20},scrim:{...Br,backgroundColor:"rgba(0,0,0,0.55)"},panel:{padding:12},card:{backgroundColor:y.color.surface,borderRadius:14,borderWidth:1,borderColor:y.color.border,padding:14,gap:8},headerRow:{flexDirection:"row",alignItems:"center",gap:8},title:{flex:1,color:y.color.text,fontSize:14,fontWeight:"700"},typeBadge:{paddingHorizontal:8,paddingVertical:2,borderRadius:6,backgroundColor:y.color.surfaceElevated},typeBadgeText:{color:A.semantic.warning,fontSize:10,fontWeight:"700",fontFamily:S},path:{color:y.color.textTertiary,fontSize:11,fontFamily:S},fieldScroll:{maxHeight:240},input:{color:y.color.text,backgroundColor:y.color.surfaceElevated,borderWidth:1,borderColor:y.color.border,borderRadius:10,paddingHorizontal:12,paddingVertical:10,fontSize:14,fontFamily:S},inputMultiline:{minHeight:110,lineHeight:20,textAlignVertical:"top"},inputRaw:{minHeight:180,fontSize:12,lineHeight:18},inputInvalid:{borderColor:y.color.danger},hint:{color:y.color.textTertiary,fontSize:11,lineHeight:16},error:{color:y.color.danger,fontSize:11,lineHeight:16,fontFamily:S},actions:{flexDirection:"row",gap:8,paddingTop:2},cancelButton:{flex:1,minHeight:44,alignItems:"center",justifyContent:"center",borderRadius:10,borderWidth:1,borderColor:y.color.border},cancelText:{color:y.color.textSecondary,fontSize:14,fontWeight:"600"},saveButton:{flex:1.4,minHeight:44,alignItems:"center",justifyContent:"center",borderRadius:10,backgroundColor:y.color.accent},saveDisabled:{opacity:.35},saveText:{color:y.color.onAccent,fontSize:15,fontWeight:"700"},boolRow:{flexDirection:"row",gap:10},boolButton:{flex:1,minHeight:64,alignItems:"center",justifyContent:"center",borderRadius:12,borderWidth:1,borderColor:y.color.border,backgroundColor:y.color.surfaceElevated},boolActive:{borderColor:A.semantic.warning,backgroundColor:A.semantic.warning+"18"},boolText:{color:y.color.textTertiary,fontSize:16,fontWeight:"700",fontFamily:S},boolTextActive:{color:A.semantic.warning}});import{useState as Ft,useMemo as Et,useCallback as Oe,useRef as _e,useEffect as Vn,memo as Nt}from"react";var Xe=u((e,r,t)=>{if(r.length===0)return t;if(e instanceof Map){let n=new Map(e);if(r.length===1)return n.set(r[0],t),n;let[o,...s]=r,i=n.get(o);return n.set(o,Xe(i??null,s,t)),n}if(e instanceof Set){let n=Xe(Array.from(e),r,t);return new Set(Array.isArray(n)?n:[])}if(Array.isArray(e)){let n=[...e];if(r.length===1)return n[r[0]]=t,n;let[o,...s]=r;return n[o]=Xe(n[o],s,t),n}if(e instanceof Object){let n={...e};if(r.length===1)return n[r[0]]=t,n;let[o,...s]=r;return n[o]=Xe(n[o],s,t),n}return e},"updateNestedDataByPath"),Ze=u((e,r)=>{if(e instanceof Map){let t=new Map(e);if(r.length===1)return t.delete(r[0]),t;let[n,...o]=r;return t.set(n,Ze(t.get(n),o)),t}if(e instanceof Set){let t=Ze(Array.from(e),r);return new Set(t)}if(Array.isArray(e)){let t=[...e];if(r.length===1)return t.filter((s,i)=>i.toString()!==r[0]);let[n,...o]=r;return t[n]=Ze(t[n],o),t}if(e instanceof Object){let t={...e};if(r.length===1)return delete t[r[0]],t;let[n,...o]=r;return t[n]=Ze(t[n],o),t}return e},"deleteNestedDataByPath");import{Fragment as Vt,jsx as P,jsxs as me}from"react/jsx-runtime";var ct=100,Ye={top:8,bottom:8,left:8,right:8},Wn=12,qo=["DATA","STATE","VALUE","QUERY","QUERYKEY","TYPES","STATS","OPTIONS","OBSERVERS"],Ko=u(e=>e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,""),"slugPart");function zn(e){return e.length===0?"buoy-live-explorer-root":`buoy-live-explorer-${e.map(Ko).filter(Boolean).join("-")}`}u(zn,"defaultTestIDForPath");var Qo=u((e,r=ct)=>{if(r<1||e.length===0)return[];let t=[];for(let n=0;n<e.length;n+=r)t.push(e.slice(n,n+r));return t},"chunkArray"),Cr=Nt(({expanded:e,isFocused:r=false,isMain:t=false})=>P(h,{style:[F.expanderIcon,t&&F.expanderIconMain,e?F.expanded:F.collapsed],children:e?P(ut,{size:t?14:Wn,color:r?y.color.accent:t?y.color.text:y.color.textSecondary,strokeWidth:2.5}):P(Ar,{size:t?14:Wn,color:r?y.color.accent:t?y.color.text:y.color.textSecondary,strokeWidth:2.5})}));Cr.displayName="Expander";var Ln=Nt(({value:e,isFocused:r=false})=>P(Sr,{value:e,isFocused:r,buttonStyle:r?{...F.buttonStyle,...F.buttonStyleFocused}:F.buttonStyle}));Ln.displayName="CopyButton";var wr=Nt(({dataPath:e,writer:r,testID:t,isFocused:n=false})=>{let o=Oe(()=>{r?.remove?.(e)},[r,e]);return r?.remove?P(Y,{"sentry-label":"ignore devtools explorer delete button",testID:`${t}-delete`,accessibilityRole:"button",onPress:o,style:[F.deleteButton,n&&F.deleteButtonFocused],accessibilityLabel:"Delete item",hitSlop:Ye,activeOpacity:.7,children:P(Lt,{size:14,strokeWidth:2,color:n?y.color.danger:y.color.danger+"CC"})}):null});wr.displayName="DeleteItemButton";var jn=Nt(({dataPath:e,writer:r,testID:t,isFocused:n=false})=>{let o=Oe(()=>{r?.update(e,[])},[r,e]);return r?P(Y,{"sentry-label":"ignore devtools explorer clear button",testID:`${t}-clear`,style:[F.clearButton,n&&F.clearButtonFocused],accessibilityRole:"button",accessibilityLabel:"Remove all items","aria-label":"Remove all items",onPress:o,hitSlop:Ye,activeOpacity:.7,children:P(f,{style:[F.clearButtonText,{color:n?y.color.warning:y.color.warning+"CC"}],children:"[]"})}):null});jn.displayName="ClearArrayButton";function Mn({dataPath:e,writer:r,testID:t,value:n,removable:o}){let s=Oe(()=>{if(!r)return;let c=typeof n=="boolean"?n:false;r.update(e,!c)},[r,e,n]),i=Oe(()=>{r?.remove?.(e)},[r,e]);if(!r)return null;let a=n?F.toggleBadgeTrue:F.toggleBadgeFalse,l=n?F.toggleTextTrue:F.toggleTextFalse;return me(h,{style:F.toggleRow,children:[P(Y,{"sentry-label":"ignore devtools explorer toggle button",testID:`${t}-toggle`,accessibilityRole:"button",accessibilityLabel:`${e[e.length-1]??"value"}, ${n?"true":"false"}`,style:F.modernToggleButton,onPress:s,hitSlop:Ye,activeOpacity:.8,children:P(h,{style:[F.toggleBadge,a],children:P(f,{style:[F.toggleBadgeText,l],children:n?"TRUE":"FALSE"})})}),o&&r.remove?P(Y,{"sentry-label":"ignore devtools explorer delete button in toggle",testID:`${t}-delete`,accessibilityRole:"button",onPress:i,style:F.deleteButtonInToggle,accessibilityLabel:"Delete item",hitSlop:Ye,activeOpacity:.7,children:P(Lt,{size:14,strokeWidth:2,color:y.color.danger+"CC"})}):null]})}u(Mn,"ToggleValueButton");function Wt({editable:e,label:r,value:t,defaultExpanded:n,writer:o,dataPath:s,itemsDeletable:i,dataVersion:a=0,testIDForPath:l=zn,debounceMs:c=0}){let[d,p]=Ft(false),[b,m]=Ft("");Vn(()=>{if(t!=null&&(typeof t=="string"||typeof t=="number")){let L=t.toString();m(L)}},[t,r,a]);let D=Et(()=>qo.includes(r.toUpperCase()),[r]),[B,R]=Ft((n||[]).includes(r)),oe=u(()=>R(L=>!L),"toggleExpanded"),[J,x]=Ft([]),C=Et(()=>t==null||typeof t!="object"?[]:Array.isArray(t)?(t.length>1e3?t.slice(0,1e3):t).map((L,z)=>({label:z.toString(),value:L})):t instanceof Map?Array.from(t.entries()).slice(0,1e3).map(([L,z])=>({label:L.toString(),value:z})):t instanceof Set?Array.from(t).slice(0,1e3).map((L,z)=>({label:z.toString(),value:L})):Object.entries(t).slice(0,1e3).map(([L,z])=>({label:L,value:z})),[t]),I=Et(()=>Array.isArray(t)?"array":t===null||typeof t!="object"?typeof t:t instanceof Map||t instanceof Set?"Iterable":"object",[t]),g=Et(()=>Qo(C,ct),[C]),v=s??[],T=l(v),k=e===true&&i===true&&o?.remove!=null&&(o.canRemove?.(v)??true),w=_e(o),W=_e(v),$=_e(I);w.current=o,W.current=v,$.current=I;let se=_e(null),ne=_e(null),ie=Oe(()=>{ne.current&&(clearTimeout(ne.current),ne.current=null);let L=se.current;se.current=null,L&&w.current?.update(L.path,L.value)},[]);Vn(()=>()=>ie(),[ie]);let X=_e(c);X.current=c;let Z=Oe((L,z)=>{if(m(z),!w.current||L&&isNaN(Number(z)))return;let _=$.current==="number"?Number(z):z,j=X.current;j>0?(se.current={path:W.current,value:_},ne.current&&clearTimeout(ne.current),ne.current=setTimeout(ie,j)):w.current.update(W.current,_)},[ie,m]),re=Oe(L=>{let z=(Number(b)||0)+L;m(String(z)),se.current=null,ne.current&&(clearTimeout(ne.current),ne.current=null),w.current?.update(W.current,z)},[b]);return P(h,{style:F.minWidthWrapper,children:me(h,{style:F.fullWidthMarginRight,children:[g.length>0&&me(Vt,{children:[me(h,{style:[F.flexRowItemsCenterGap,D&&F.flexRowItemsCenterGapMain],children:[me(Y,{"sentry-label":"ignore devtools explorer expander button",style:F.expanderButton,testID:T,accessibilityRole:"button",accessibilityLabel:`${r}, ${C.length} ${C.length===1?"item":"items"}`,accessibilityState:{expanded:B},onPress:oe,hitSlop:Ye,activeOpacity:.6,children:[P(Cr,{expanded:B,isFocused:d,isMain:D}),P(f,{style:[F.labelText,d&&F.labelTextFocused,D&&F.labelTextMain],children:r}),P(f,{style:F.textGray500,children:`${String(I).toLowerCase()==="iterable"?"(Iterable) ":""}${C.length} ${C.length>1?"items":"item"}`})]}),e&&me(h,{style:F.flexRowGapItemsCenter,children:[P(Ln,{value:t,isFocused:d}),k&&P(wr,{writer:o,dataPath:v,testID:T,isFocused:d}),I==="array"&&o!==void 0&&P(jn,{writer:o,dataPath:v,testID:T,isFocused:d})]})]}),B&&me(Vt,{children:[g.length===1&&P(h,{style:[F.singleEntryContainer,D&&F.singleEntryContainerMain],children:C.map((L,z)=>P(Wt,{defaultExpanded:n,label:L.label,value:L.value,editable:e,dataPath:[...v,L.label],writer:o,itemsDeletable:I==="array"||I==="Iterable"||I==="object",dataVersion:a,testIDForPath:l,debounceMs:c},L.label+z))}),g.length>1&&P(h,{style:F.multiEntryContainer,children:g.map((L,z)=>P(h,{children:me(h,{style:F.relativeOutlineNone,children:[me(Y,{"sentry-label":"ignore devtools explorer page toggle",onPress:()=>x(_=>_.includes(z)?_.filter(j=>j!==z):[..._,z]),style:F.pageExpanderButton,hitSlop:Ye,children:[P(Cr,{expanded:J.includes(z)}),me(f,{style:F.pageRangeText,children:["[",z*ct,"...",z*ct+ct-1,"]"]})]}),J.includes(z)&&P(h,{style:F.entriesContainer,children:L.map(_=>P(Wt,{defaultExpanded:n,label:_.label,value:_.value,editable:e,dataPath:[...v,_.label],writer:o,dataVersion:a,testIDForPath:l,debounceMs:c},_.label))})]})},z))})]})]}),g.length===0&&me(h,{style:F.flexRowGapFullWidth,children:[e&&o!==void 0&&(I==="string"||I==="number"||I==="boolean")?me(Vt,{children:[e&&o&&(I==="string"||I==="number")&&P(h,{style:F.nebulaInputWrapper,children:P(Kt,{label:r,testID:`${T}-input`,accessibilityLabel:`${r}, editable value`,style:[I==="number"?F.textNumber:F.textString],keyboardType:I==="number"?"numeric":"default",value:b,onChangeText:L=>Z(I==="number",L),onFocus:()=>p(true),onBlur:()=>{ie(),p(false)},showNumberControls:I==="number",onIncrement:()=>re(1),onDecrement:()=>re(-1),showDeleteButton:k,onDelete:()=>{o?.remove?.(v)}})}),I==="boolean"&&me(h,{style:F.booleanRowContainer,children:[P(f,{style:F.booleanLabel,children:r}),P(h,{style:F.booleanToggleWrapper,children:P(Mn,{writer:o,dataPath:v,testID:T,value:t,removable:k})})]})]}):me(Vt,{children:[P(f,{style:F.text344054,children:r}),P(f,{testID:`${T}-value`,style:F.displayValueText,children:Dr(t)})]}),e&&k&&I!=="string"&&I!=="number"&&I!=="boolean"&&P(wr,{writer:o,dataPath:v,testID:T,isFocused:d})]})]})})}u(Wt,"LiveExplorer");function On(e){return{update:u((r,t)=>{e.setRoot(Xe(e.getRoot(),r,t))},"update"),remove:u(r=>{e.setRoot(Ze(e.getRoot(),r))},"remove"),canRemove:e.canRemove}}u(On,"makeRootWriter");var F=le.create({buttonStyle:{backgroundColor:y.color.surface+"E6",borderWidth:1,borderColor:y.color.textSecondary+"33",borderRadius:6,flexDirection:"row",alignItems:"center",justifyContent:"center",width:28,height:28,position:"relative",shadowColor:"#000",shadowOffset:{width:0,height:1},shadowOpacity:.2,shadowRadius:2},buttonStyleFocused:{borderColor:y.color.accent+"CC",backgroundColor:y.color.accent+"26",shadowColor:y.color.accent,shadowOpacity:.3,shadowRadius:4},deleteButton:{backgroundColor:y.color.danger+"1A",borderColor:y.color.danger+"4D",borderWidth:1,borderRadius:6,padding:0,alignItems:"center",justifyContent:"center",width:28,height:28,position:"relative",shadowColor:y.color.danger,shadowOffset:{width:0,height:0},shadowOpacity:.15,shadowRadius:3},deleteButtonFocused:{borderColor:y.color.danger+"CC",backgroundColor:y.color.danger+"33",shadowOpacity:.3,shadowRadius:5},deleteButtonInToggle:{backgroundColor:y.color.danger+"1A",borderColor:y.color.danger+"4D",borderWidth:1,borderRadius:6,padding:0,alignItems:"center",justifyContent:"center",width:28,height:28,shadowColor:y.color.danger,shadowOffset:{width:0,height:0},shadowOpacity:.15,shadowRadius:3},clearButton:{backgroundColor:y.color.warning+"1A",borderWidth:1,borderColor:y.color.warning+"4D",borderRadius:6,flexDirection:"row",padding:0,alignItems:"center",justifyContent:"center",width:28,height:28,position:"relative",zIndex:10,shadowColor:y.color.warning,shadowOffset:{width:0,height:0},shadowOpacity:.15,shadowRadius:3},clearButtonFocused:{borderColor:y.color.warning+"CC",backgroundColor:y.color.warning+"33",shadowOpacity:.3,shadowRadius:5},clearButtonText:{fontSize:12,fontWeight:"700",fontFamily:S},expanderIcon:{width:18,height:18,alignItems:"center",justifyContent:"center",marginRight:1,backgroundColor:y.color.textSecondary+"14",borderRadius:3},expanderIconMain:{backgroundColor:y.color.textSecondary+"1A",width:20,height:20,borderRadius:4,borderWidth:.5,borderColor:y.color.textSecondary+"33"},expanded:{transform:[{rotate:"0deg"}]},collapsed:{transform:[{rotate:"0deg"}]},minWidthWrapper:{minWidth:180,fontSize:11,flexDirection:"row",flexWrap:"wrap",width:"100%",marginVertical:.5},fullWidthMarginRight:{position:"relative",width:"100%",marginRight:1},flexRowItemsCenterGap:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingVertical:3,paddingHorizontal:6,marginVertical:1,borderRadius:4,backgroundColor:y.color.surface+"66",borderWidth:.5,borderColor:y.color.textSecondary+"1A"},flexRowItemsCenterGapMain:{backgroundColor:y.color.surface+"E6",borderLeftWidth:2.5,borderLeftColor:y.color.textSecondary+"80",borderColor:y.color.textSecondary+"26",paddingVertical:5,paddingHorizontal:8,marginBottom:3,borderWidth:1,shadowColor:"#000",shadowOffset:{width:0,height:0},shadowOpacity:.08,shadowRadius:3},expanderButton:{flexDirection:"row",alignItems:"center",backgroundColor:"transparent",paddingVertical:1,paddingHorizontal:2,gap:6,borderWidth:0,minHeight:24,flex:1},labelText:{color:y.color.textSecondary,fontSize:10,fontWeight:"600",marginRight:4,fontFamily:S,letterSpacing:.4},labelTextFocused:{color:y.color.text},labelTextMain:{color:y.color.text,fontSize:11,fontWeight:"700",letterSpacing:.6},textGray500:{color:y.color.textTertiary,fontSize:10,fontWeight:"400",fontFamily:S,opacity:.7},pageRangeText:{color:y.color.textSecondary,fontSize:10,fontWeight:"600",fontFamily:S},flexRowGapItemsCenter:{flexDirection:"row",alignItems:"center",gap:4,paddingLeft:2},singleEntryContainer:{marginLeft:2,marginTop:2,paddingLeft:8,borderLeftWidth:1.5,borderLeftColor:y.color.textSecondary+"40"},singleEntryContainerMain:{borderLeftColor:y.color.textSecondary+"4D",marginLeft:4,paddingLeft:10},multiEntryContainer:{marginLeft:2,marginTop:2,paddingLeft:8,borderLeftWidth:1.5,borderLeftColor:y.color.textSecondary+"40"},relativeOutlineNone:{position:"relative"},pageExpanderButton:{flexDirection:"row",alignItems:"center",backgroundColor:y.color.surface+"66",paddingVertical:3,paddingHorizontal:6,gap:6,borderRadius:4,borderWidth:.5,borderColor:y.color.textSecondary+"1A",marginBottom:2,minHeight:24},entriesContainer:{marginLeft:2,paddingLeft:8,marginTop:2,borderLeftWidth:1.5,borderLeftColor:y.color.textSecondary+"40"},textNumber:{color:y.color.text,fontWeight:"600",fontFamily:S},textString:{color:y.color.text,fontFamily:S},flexRowGapFullWidth:{flexDirection:"row",width:"100%",alignItems:"center",marginVertical:1,gap:6,paddingHorizontal:4,paddingVertical:2,borderRadius:3},text344054:{color:y.color.textSecondary,fontWeight:"600",fontSize:9,minWidth:50,fontFamily:S,letterSpacing:.4,opacity:.8},nebulaInputWrapper:{flex:1,width:"100%",position:"relative"},displayValueText:{flex:1,color:y.color.text,fontWeight:"400",fontFamily:S,fontSize:12,paddingVertical:6,paddingHorizontal:10,borderRadius:6,borderWidth:1,borderColor:y.color.textTertiary+"66",minHeight:34},toggleRow:{flexDirection:"row",alignItems:"center",gap:6},modernToggleButton:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderRadius:6,borderWidth:1,borderColor:y.color.textTertiary+"99",paddingHorizontal:8,paddingVertical:6,marginVertical:2,minHeight:34,gap:8},toggleBadge:{marginLeft:6,paddingHorizontal:6,paddingVertical:3,borderRadius:4,borderWidth:1},toggleBadgeText:{fontSize:9,fontWeight:"700",textTransform:"uppercase",letterSpacing:.8,fontFamily:S},toggleBadgeTrue:{backgroundColor:y.color.accent+"1A",borderColor:y.color.accent+"4D"},toggleBadgeFalse:{backgroundColor:y.color.textTertiary+"1A",borderColor:y.color.textTertiary+"4D"},toggleTextTrue:{color:y.color.accent,fontWeight:"600"},toggleTextFalse:{color:y.color.textSecondary,fontWeight:"500"},booleanRowContainer:{flexDirection:"row",alignItems:"center",width:"100%",gap:8,paddingVertical:2},booleanLabel:{color:y.color.textSecondary,fontSize:10,fontWeight:"600",fontFamily:S,letterSpacing:.4,minWidth:60,flexShrink:0},booleanToggleWrapper:{flex:1}});export{qr as ABSENT_VALUE,Kt as CyberpunkInput,dn as DataTreeActionBar,hn as DataTreeActionDock,sn as DataTreeInlineEditor,po as DataViewer,ar as DiffSummary,Jr as DiffType,Gr as IndentGuides,gt as IndentGuidesOverlay,xn as JsonStringNotice,Wt as LiveExplorer,Eo as SplitDiffViewer,Cn as ThemedSplitView,yn as TimestampDeltaBar,tn as TreeDiffViewer,$r as TypeLegend,Fn as ValueEditModal,Gt as VirtualizedDataExplorer,rr as applyJsonOp,Un as boundedDeepEqual,lt as breadcrumb,bt as computeLineDiff,ur as decodeJsonStringPair,Ze as deleteNestedDataByPath,mr as describeTimestampDeltas,St as detectTimestamp,lr as devToolsDefaultTheme,Fo as diffThemes,gr as formatDuration,Dt as formatInstant,xt as getAtPath,fn as gitClassicTheme,Ue as isAbsent,tr as isEditableContainer,qn as jsonLikelyLargerThan,On as makeRootWriter,Gn as objectDiff,kt as parseJsonContainer,er as selectionPathAfterOp,vt as suggestedNewValue,Jn as toDiffable,or as treeActionMap,Ct as treeActionsFor,Ve as typeLabel,Xe as updateNestedDataByPath,xr as useTreeDraft,Bn as useTreeEditor};
|
|
1
|
+
"use client";import{a as Pn,b as $n,c as Gn,d as Jn,e as Un}from"./chunks/chunk-NOSWH3E2.mjs";import{R as vr}from"./chunks/chunk-Y7FM4WZ7.mjs";import"./chunks/chunk-5UII72AQ.mjs";import"./chunks/chunk-4YLP5MMN.mjs";import{a as b}from"./chunks/chunk-GF5C5DVX.mjs";import"./chunks/chunk-4QFANR3K.mjs";import{e as Cr,h as wr}from"./chunks/chunk-36A4T5PL.mjs";import{Bc as kr,Kc as Vt,Vb as at,Xb as Tr,Yb as Ft,_b as Sr,cc as Dr,ud as S,vc as Br}from"./chunks/chunk-SUG6TLF5.mjs";import{a as A,d as $,f as ee}from"./chunks/chunk-AHVO74UQ.mjs";import"./chunks/chunk-FPMEM2QO.mjs";import"./chunks/chunk-EY7GXWGI.mjs";import{N as Nt,a as re,b as h,c as p,d as F,e as Wt,f as K,j as zt}from"./chunks/chunk-QXVVA64P.mjs";import"./chunks/chunk-SBYYOE2T.mjs";import{a as u}from"./chunks/chunk-T6T3FEMU.mjs";import{useState as qn,useMemo as Ir}from"react";import{useState as Ie,useMemo as Lt,useCallback as Ae,useRef as we,useEffect as lt,memo as jt}from"react";import{memo as Kn,useMemo as Yn}from"react";import{jsx as Ar}from"react/jsx-runtime";var _n="4D",Qn="80",dt=Kn(({items:e,visibleRange:r,itemHeight:t,indentWidth:n,activeDepth:o=-1})=>{let d=Yn(()=>{let i=Math.max(0,r.start),a=Math.min(e.length-1,r.end);if(i>a||e.length===0)return[];let l=0;for(let s=i;s<=a;s++){let g=e[s]?.depth??0;g>l&&(l=g)}let c=[];for(let s=1;s<=l;s++){let g=(s-.5)*n,y=Math.round(g)+.5,f=[],k=-1,D=-1;for(let I=i;I<=a;I++)(e[I]?.depth??0)>=s?(k===-1&&(k=I),D=I):k!==-1&&(f.push({startIndex:k,endIndex:D}),k=-1,D=-1);k!==-1&&f.push({startIndex:k,endIndex:D}),f.length>0&&c.push({depth:s,left:y,segments:f})}return c},[e,r,t,n]);return Ar(h,{pointerEvents:"none",style:Rr.overlay,children:d.map(i=>i.segments.map((a,l)=>{let c=(a.startIndex-r.start)*t,s=(a.endIndex-a.startIndex+1)*t,g=i.depth===o;return Ar(h,{style:[Rr.line,{left:i.left,top:c,height:s,backgroundColor:`${$.primary}${g?Qn:_n}`}]},`${i.depth}-${l}`)}))})});dt.displayName="IndentGuidesOverlay";var Rr=re.create({overlay:{position:"absolute",left:0,right:0,top:0,bottom:0,zIndex:1},line:{position:"absolute",width:1}});var st=15,Er=u(e=>typeof e=="object"&&e!==null&&!(e instanceof Date)&&!(e instanceof Error)&&!(e instanceof RegExp)&&!(e instanceof Map)&&!(e instanceof Set),"isPlainObjectLike"),Xn=u(e=>e===null?"null":e===void 0?"undefined":Array.isArray(e)?"array":e instanceof Date?"date":e instanceof Error?"error":e instanceof Map?"map":e instanceof Set?"set":e instanceof RegExp?"regexp":typeof e=="function"?"function":typeof e=="symbol"?"symbol":typeof e=="bigint"?"bigint":typeof e=="object"?"object":typeof e,"getValueType"),Zn=u((e,r)=>{if(e===null)return 0;switch(r){case"array":return Array.isArray(e)?e.length:0;case"object":return Er(e)?Object.keys(e).length:0;case"map":return e instanceof Map?e.size:0;case"set":return e instanceof Set?e.size:0;default:return 0}},"getValueCount"),Vr=u((e,r)=>{switch(r){case"array":return Array.isArray(e)?e.map((t,n)=>[n.toString(),t]):[];case"object":return Er(e)?Object.entries(e):[];case"map":return e instanceof Map?Array.from(e.entries()).map(([t,n])=>[String(t),n]):[];case"set":return e instanceof Set?Array.from(e.values()).map((t,n)=>[n.toString(),t]):[];default:return[]}},"getChildEntries");function Mt(e,r,t,n,o="root",d=0,i,a=[],l=0,c=1,s=[]){if(d>Math.min(n,st))return[];let g=[...a,o],y=g.join("."),f=Xn(e),k=["object","array","map","set"].includes(f)&&e!==null,D=k?Zn(e,f):0;if(e&&typeof e=="object"){if(t.has(e))return[{id:y,key:o,value:"[Circular Reference]",valueType:"circular",depth:d,isExpandable:false,isExpanded:false,parentId:i,hasChildren:false,childCount:0,path:g,type:"circular",isLastChild:l===c-1,parentHasMoreSiblings:[...s],siblingIndex:l,totalSiblings:c}];t.add(e)}let I={id:y,key:o,value:e,valueType:f,depth:d,isExpandable:k,isExpanded:r.has(y),parentId:i,hasChildren:D>0,childCount:D,path:g,type:k?"expandable":f,isLastChild:l===c-1,parentHasMoreSiblings:[...s],siblingIndex:l,totalSiblings:c},_=[I];if(k&&r.has(y)&&d<Math.min(n,st))try{let M=Vr(e,f),x=M.length,v=[...s];d>0&&(v[d-1]=!I.isLastChild),M.forEach(([B,m],C)=>{let w=Mt(m,r,t,n,B,d+1,y,g,C,x,v);for(let T of w)_.push(T)})}catch(M){console.error("[Buoy]",M)}return _}u(Mt,"flattenTree");import{Fragment as eo,jsx as O,jsxs as ce}from"react/jsx-runtime";var Fr={top:10,bottom:10,left:10,right:10},De=24,to=24,Nr=50;var ro=300,Ot=16,Wr=Array.from({length:st+1},(e,r)=>re.create({container:{marginLeft:r*Ot}}).container),no=new Map([["string",$.dataTypes.string],["number",$.dataTypes.number],["bigint",$.optional],["boolean",$.dataTypes.boolean],["null",$.dataTypes.null],["undefined",$.dataTypes.undefined],["function",$.dataTypes.function],["symbol",$.critical],["date",$.critical],["error",$.error],["array",$.dataTypes.array],["object",$.dataTypes.object],["map",$.info],["set",$.success],["circular",$.warning]]),L=re.create({container:{backgroundColor:b.color.bg,borderRadius:8,borderWidth:1,borderColor:b.color.border},header:{flexDirection:"column",paddingHorizontal:16,paddingVertical:12},headerRow:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:6},title:{color:$.primary,fontSize:14,fontWeight:"500"},description:{color:$.secondary,fontSize:12,marginTop:2},typeLegend:{flexDirection:"row",flexWrap:"wrap",gap:6,marginTop:8,paddingTop:8,borderTopWidth:1,borderTopColor:$.primary+"14"},typeBadge:{flexDirection:"row",alignItems:"center",paddingHorizontal:6,paddingVertical:2,borderRadius:4,borderWidth:1},typeColor:{width:8,height:8,borderRadius:4,marginRight:4},typeName:{fontSize:10,fontWeight:"500",color:$.secondary},itemContainer:{minHeight:De,backgroundColor:"transparent",position:"relative",flexDirection:"row",alignItems:"flex-start"},itemTouchable:{flex:1,flexDirection:"row",alignItems:"flex-start",paddingLeft:0,paddingRight:16,paddingVertical:2,minHeight:24},itemTouchablePressed:{backgroundColor:$.primary+"0A"},itemSelected:{backgroundColor:$.primary+"14"},expanderContainer:{width:16,alignItems:"center",justifyContent:"center",marginTop:4},expanderIcon:{width:12,height:12},labelContainer:{flex:1,flexDirection:"row",alignItems:"flex-start",paddingLeft:2},labelContainerVertical:{flex:1,flexDirection:"column",paddingLeft:2,paddingVertical:2},labelContainerVerticalRow:{flexDirection:"row",alignItems:"center",marginBottom:2},labelText:{color:$.primary,fontSize:12,fontWeight:"500",fontFamily:S,marginRight:8,flexShrink:1},labelTextTruncated:{color:$.primary,fontSize:12,fontWeight:"500",fontFamily:S,flexShrink:1},valueText:{fontSize:12,fontFamily:S,flex:1,color:$.primaryLight},loadingContainer:{padding:16,alignItems:"center"},loadingText:{color:$.secondary,fontSize:12},noDataContainer:{padding:16,alignItems:"center"},noDataText:{color:$.secondary,fontSize:12},listContent:{paddingBottom:8},headerTouchable:{flex:1,flexDirection:"row",alignItems:"center"},expanderMargin:{marginLeft:8}});function ct(e){return{path:e.path.slice(1),value:e.value,label:e.key}}u(ct,"selectionOf");function ut(e,r,t=0){if(t>=r)return t;let n=t+1;if(Array.isArray(e))for(let o of e){if(n>=r)return n;n=ut(o,r,n)}else if(e!==null&&typeof e=="object")for(let o of Object.values(e)){if(n>=r)return n;n=ut(o,r,n)}return n}u(ut,"countNodesUpTo");var oo=u((e,r)=>{if(e===null)return"null";if(e===void 0)return"undefined";switch(r){case"string":return`"${String(e)}"`;case"boolean":return e===true?"true":"false";case"function":return typeof e=="function"?e.toString().slice(0,50)+"...":"undefined";case"symbol":return typeof e=="symbol"?String(e):"undefined";case"date":return e instanceof Date?e.toISOString():"undefined";case"regexp":return e instanceof RegExp?e.toString():"undefined";case"bigint":return typeof e=="bigint"?e.toString()+"n":"undefined";case"error":return e instanceof Error?`${e.name}: ${e.message}`:"undefined";default:return Cr(e)}},"formatValue"),zr=u(e=>no.get(e)||$.dataTypes.array,"getTypeColor"),Lr=u(({expanded:e,onPress:r})=>O(K,{"sentry-label":"ignore devtools data explorer expander",style:L.expanderContainer,onPress:r,hitSlop:Fr,children:O(h,{style:L.expanderIcon,children:O(Tr,{size:12,color:$.secondary,strokeWidth:2,style:{transform:[{rotate:e?"90deg":"0deg"}]}})})}),"ExpanderComponent");Lr.displayName="Expander";var jr=jt(Lr),Mr=u(({visibleTypes:e})=>{let r=Array.from(new Set(e)).slice(0,8);return O(h,{style:L.typeLegend,children:r.map(t=>{let n=zr(t);return ce(h,{style:[L.typeBadge,{backgroundColor:`${n}10`,borderColor:`${n}30`}],children:[O(h,{style:[L.typeColor,{backgroundColor:n}]}),O(p,{style:L.typeName,children:t})]},t)})})},"TypeLegendComponent");Mr.displayName="TypeLegend";var io=jt(Mr),ao=u((e,r=10,t=false)=>{let[n,o]=Ie([]),d=we(new Map),i=Ae(()=>{let m=new Set(["root"]);return t&&e&&typeof e=="object"&&(Array.isArray(e)?e.forEach((C,w)=>{m.add(`root.${w}`)}):Object.keys(e).forEach(C=>{m.add(`root.${C}`)})),m},[t,e]),[a,l]=Ie(()=>i()),[c,s]=Ie(false),g=we(new WeakSet),y=we(false),f=we(0),k=we(0),D=we(void 0),I=Ae((m,C,w,T="root",R=0,W,H=[],ue=0,oe=1,ie=[])=>Mt(m,C,w,r,T,R,W,H,ue,oe,ie),[r]);lt(()=>{if(D.current&&(D.current.type==="expand"||D.current.type==="collapse")){c&&(s(false),y.current=false),D.current=void 0;return}if(y.current)return;let m,C=++f.current,w=u(()=>f.current===C,"isCurrent");return y.current=true,s(true),u(async()=>{if(m=setTimeout(()=>{y.current&&w()&&(s(false),y.current=false)},5e3),await new Promise(T=>setTimeout(()=>T(),10)),!!w())try{g.current=new WeakSet,k.current=Date.now();let T=I(e,a,g.current,"root",0,void 0,[],0,1,[]),R=new Map;T.forEach((W,H)=>{R.set(W.id,{item:W,index:H})}),d.current=R,m&&clearTimeout(m),w()&&(o(T),s(false),y.current=false)}catch(T){console.error("[Buoy]",T),m&&clearTimeout(m),w()&&(o([]),d.current=new Map,s(false),y.current=false)}},"processData")(),()=>{y.current=false,m&&clearTimeout(m)}},[e,a,I,r]);let _=Ae((m,C)=>{s(false),y.current=false,o(w=>{let T=d.current.get(m);if(!T)return w;let{item:R,index:W}=T;if(C&&R.isExpandable&&R.hasChildren){let H=[...w],ue=new WeakSet;R.value&&typeof R.value=="object"&&ue.add(R.value);let oe=[];try{let he=Vr(R.value,R.valueType),le=he.length,Q=[...R.parentHasMoreSiblings||[]];R.depth>0&&(Q[R.depth-1]=!R.isLastChild),he.forEach(([Z,se],P)=>{let pe=I(se,new Set,ue,Z,R.depth+1,m,R.path,P,le,Q);oe.push(...pe)})}catch(he){console.error("[Buoy]",he)}let ie=oe;ie.length>0,H[W]={...R,isExpanded:true},H.splice(W+1,0,...ie);let te=new Map;return H.forEach((he,le)=>{te.set(he.id,{item:he,index:le})}),d.current=te,H}else if(!C){let H=new Set,ue=u((te,he)=>{w.forEach(le=>{(le.parentId===te||le.id.startsWith(te+".")&&le.depth>he)&&(H.add(le.id),le.hasChildren&&ue(le.id,le.depth))})},"findDescendants");ue(m,R.depth);let oe=w.map(te=>te.id===m?{...te,isExpanded:false}:te).filter(te=>!H.has(te.id)),ie=new Map;return oe.forEach((te,he)=>{ie.set(te.id,{item:te,index:he})}),d.current=ie,oe}return w})},[I]),M=Ae(m=>{l(C=>{let w=new Set(C),T=!w.has(m);return T?w.add(m):w.delete(m),D.current={type:T?"expand":"collapse",itemId:m},_(m,T),w})},[_]),x=ut(e,Nr,0)<Nr,v=Lt(()=>x?I(e,a,new WeakSet,"root",0,void 0,[],0,1,[]):null,[x,e,a,I]),B=Ae(m=>{m.length!==0&&l(C=>{if(m.every(T=>C.has(T)))return C;let w=new Set(C);for(let T of m)w.add(T);return w})},[]);return{flatData:v??n,isProcessing:v?false:c,toggleExpanded:M,revealPath:B}},"useDataFlattening"),Or=u(({item:e,onToggleExpanded:r,index:t,onSelect:n,isSelected:o,selectable:d,onRequestInlineEdit:i,isInlineEditing:a,inlineEditor:l,testIDPrefix:c})=>{let[s,g]=Ie(false),[y,f]=Ie(false),k=d===true,D=we(0),I=e.path.slice(1),_=Wr[Math.min(e.depth,st)]||Wr[0],M=zr(e.valueType),x=false,v=u(()=>{if(k){let w=Date.now(),T=w-D.current<ro;if(D.current=w,T&&!e.isExpandable&&i){i(e);return}n(e);return}e.isExpandable&&r(e.id),n(e)},"handlePress"),B=u(()=>{e.isExpandable&&r(e.id),n(e)},"handleExpanderPress"),m=u(()=>{},"handleKeyPress"),C=e.key;return ce(h,{style:[L.itemContainer,_],children:[ce(K,{"sentry-label":"ignore devtools data explorer item",testID:`${c}-${e.id}`,accessibilityLabel:`${e.key}: ${e.valueType}`,style:[L.itemTouchable,s&&L.itemTouchablePressed,k&&o&&L.itemSelected,x&&{minHeight:to,paddingVertical:2}],onPress:v,onPressIn:()=>g(true),onPressOut:()=>g(false),activeOpacity:e.isExpandable||k?.7:1,disabled:!e.isExpandable&&!k,children:[e.isExpandable?O(jr,{expanded:e.isExpanded,onPress:B}):O(h,{style:L.expanderContainer}),ce(h,{style:L.labelContainer,children:[ce(p,{style:L.labelText,numberOfLines:1,children:[e.key,":"]}),a&&l?l:e.isExpandable?ce(p,{style:[L.valueText,{color:$.secondary}],numberOfLines:1,children:[e.valueType," (",e.childCount," ",e.childCount===1?"item":"items",")"]}):O(p,{style:[L.valueText,{color:M}],numberOfLines:1,children:oo(e.value,e.valueType)})]})]}),e.value!==void 0?O(vr,{value:e.value,size:14,buttonStyle:{marginLeft:8,marginRight:8}}):null]})},"VirtualizedItemComponent");Or.displayName="VirtualizedItem";var lo=jt(Or),Ht=u(({title:e,description:r,data:t,maxDepth:n=10,rawMode:o=false,initialExpanded:d=false,disableCopy:i=false,onSelectionChange:a,onRequestInlineEdit:l,inlineEditPath:c,renderInlineEditor:s,selectPath:g,testIDPrefix:y="buoy-tree-row"})=>{let[f,k]=Ie(o),{flatData:D,isProcessing:I,toggleExpanded:_,revealPath:M}=ao(t,n,d),x=we(null),[v,B]=Ie({start:0,end:Math.min(D.length-1,Math.max(0,Math.ceil(400/De)-1))}),m=we({itemVisiblePercentThreshold:1}),C=we(({viewableItems:P})=>{let pe=P.map(Et=>Et.index).filter(Et=>typeof Et=="number");pe.length&&B({start:Math.min(...pe),end:Math.max(...pe)})}).current;lt(()=>{B({start:0,end:Math.min(D.length-1,Math.max(0,Math.ceil(400/De)-1))})},[D.length]);let w=Lt(()=>{let P=new Set;for(let pe of D)if(P.add(pe.valueType),P.size>=8)break;return Array.from(P)},[D]),T=u(()=>{k(!f)},"toggleMainExpanded"),[R,W]=Ie(null),H=Lt(()=>R==null?void 0:D.find(P=>P.id===R),[D,R]),ue=H?.depth;lt(()=>{a&&a(H?ct(H):null)},[H,a]);let oe=Ae(P=>{W(pe=>pe===P.id?null:P.id)},[]),ie=g===void 0?void 0:g===null?"\0null":g.join("."),te=we(ie);lt(()=>{if(ie===te.current||(te.current=ie,ie===void 0))return;if(g==null){W(null);return}let P=["root"];for(let pe of g.slice(0,-1))P.push(`${P[P.length-1]}.${pe}`);M(P),W(["root",...g].join("."))},[ie,g,M]);let he=Ae(P=>{W(P.id),l?.(ct(P))},[l]),le=u(({item:P,index:pe})=>O(lo,{item:P,index:pe,onToggleExpanded:_,onSelect:oe,isSelected:H?.id===P.id,selectable:a!=null,onRequestInlineEdit:he,isInlineEditing:c!=null&&c.join(".")===P.path.slice(1).join("."),inlineEditor:s?s(ct(P)):null,testIDPrefix:y}),"renderItem"),Q=De,Z=u(P=>P.id,"keyExtractor"),se=t!=null&&(typeof t=="string"?t.length>0:typeof t=="number"||typeof t=="boolean"?true:Array.isArray(t)?t.length>0:typeof t=="object"?Object.keys(t).length>0:false);return o?se?O(h,{style:{minHeight:I?40:D.length*De},children:I?O(h,{style:{flex:1,justifyContent:"center",alignItems:"center"},children:ce(p,{style:L.loadingText,children:["Processing data... (raw mode, isProcessing=",String(I),")"]})}):ce(h,{style:{position:"relative",height:D.length*De},children:[O(dt,{items:D,visibleRange:{start:0,end:Math.max(0,D.length-1)},itemHeight:De,indentWidth:Ot,activeDepth:ue}),O(Nt,{keyboardShouldPersistTaps:"handled",ref:x,"sentry-label":"ignore devtools data explorer list",data:D,renderItem:le,keyExtractor:Z,showsVerticalScrollIndicator:true,contentContainerStyle:L.listContent,initialNumToRender:15,maxToRenderPerBatch:10,windowSize:10,scrollEnabled:false})]})}):O(h,{style:{flex:1,justifyContent:"center",alignItems:"center",padding:20},children:O(p,{style:L.noDataText,children:"No data available"})}):se?ce(h,{style:L.container,children:[ce(h,{style:L.header,children:[O(h,{style:L.headerRow,children:ce(K,{"sentry-label":"ignore devtools data explorer header toggle",onPress:T,hitSlop:Fr,style:L.headerTouchable,children:[ce(h,{style:{flex:1},children:[O(p,{style:L.title,children:e}),r&&O(p,{style:L.description,children:r})]}),O(h,{style:L.expanderMargin,children:O(jr,{expanded:f,onPress:T})})]})}),f&&w.length>0&&!o&&O(io,{visibleTypes:w})]}),f&&O(eo,{children:I?O(h,{style:L.loadingContainer,children:ce(p,{style:L.loadingText,children:["Processing data... (isProcessing=",String(I),")"]})}):ce(h,{style:{height:D.length*De,position:"relative"},children:[O(dt,{items:D,visibleRange:v,itemHeight:De,indentWidth:Ot,activeDepth:ue}),O(Nt,{keyboardShouldPersistTaps:"handled",ref:x,"sentry-label":"ignore devtools data explorer collapsed list",data:D,renderItem:le,keyExtractor:Z,showsVerticalScrollIndicator:true,contentContainerStyle:L.listContent,initialNumToRender:15,maxToRenderPerBatch:10,windowSize:10,scrollEnabled:false,onViewableItemsChanged:C,viewabilityConfig:m.current})]})})]}):ce(h,{style:L.container,children:[O(h,{style:L.header,children:O(h,{style:L.headerRow,children:ce(h,{style:{flex:1},children:[O(p,{style:L.title,children:e}),r&&O(p,{style:L.description,children:r})]})})}),O(h,{style:L.noDataContainer,children:O(p,{style:L.noDataText,children:"No data available"})})]})},"VirtualizedDataExplorer");import{jsx as Pt,jsxs as so}from"react/jsx-runtime";var co=u(e=>({string:A.dataTypes.string,number:A.dataTypes.number,bigint:A.semantic.debug,boolean:A.dataTypes.boolean,null:A.dataTypes.null,undefined:A.dataTypes.undefined,function:A.dataTypes.function,symbol:A.semantic.error,date:A.semantic.error,error:A.semantic.error,array:A.dataTypes.array,object:A.dataTypes.object})[e]||A.text.secondary,"getTypeColor"),Hr=u(({types:e,activeFilter:r,onFilterChange:t})=>{if(e.length===0)return null;let n=u(o=>{t(r===o?null:o)},"handleTypeFilter");return Pt(h,{style:Qe.typeLegend,children:e.map(o=>{let d=co(o),i=r===o;return so(K,{"sentry-label":"ignore devtools type legend filter",style:[Qe.typeBadge,i&&Qe.typeBadgeActive,{borderColor:i?d:A.text.primary+"1A"}],onPress:()=>n(o),accessibilityLabel:`Filter by ${o} values`,children:[Pt(h,{style:[Qe.typeColor,{backgroundColor:d}]}),Pt(p,{style:[Qe.typeName,i&&{color:d}],children:o})]},o)})})},"TypeLegend"),Qe=re.create({typeLegend:{flexDirection:"row",flexWrap:"wrap",paddingVertical:3,gap:6,width:"100%",padding:8},typeBadge:{flexDirection:"row",alignItems:"center",backgroundColor:A.background.hover,paddingHorizontal:8,paddingVertical:4,borderRadius:12,borderWidth:1},typeBadgeActive:{backgroundColor:A.background.input},typeColor:{width:8,height:8,borderRadius:4,marginRight:6},typeName:{color:A.text.secondary,fontSize:11,fontWeight:"500"}});import{jsx as ht,jsxs as uo}from"react/jsx-runtime";var ho=u(({title:e,data:r,maxDepth:t=10,rawMode:n=true,showTypeFilter:o=true,initialExpanded:d=false,disableCopy:i=false,onSelectionChange:a,onRequestInlineEdit:l,inlineEditPath:c,renderInlineEditor:s,selectPath:g,testIDPrefix:y})=>{let[f,k]=qn(null),D=Ir(()=>{if(!r||!o)return[];let M=[],x=u((v,B=0)=>{if(B>3)return;let m=Array.isArray(v)?"array":v===null?"null":typeof v;M.push(m),m==="object"&&Un(v)?Object.values(v).forEach(C=>x(C,B+1)):Array.isArray(v)&&v.forEach(C=>x(C,B+1))},"processValue");return x(r),Array.from(new Set(M)).slice(0,8)},[r,o]),I=Ir(()=>{if(!f||!r)return null;let M={},x=0,v=u((B,m,C="",w=0)=>{w>10||x>100||(Array.isArray(B)?B.forEach((T,R)=>{let W=C?`${C}[${R}]`:`[${R}]`,H=T===null?"null":typeof T;H===m&&(M[W]=T,x++),(H==="object"&&T!==null||Array.isArray(T))&&v(T,m,W,w+1)}):B&&typeof B=="object"&&Object.entries(B).forEach(([T,R])=>{let W=C?`${C}.${T}`:T,H=Array.isArray(R)?"array":R===null?"null":typeof R;H===m&&(M[W]=R,x++),(H==="object"&&R!==null||H==="array")&&v(R,m,W,w+1)}))},"flattenByType");return v(r,f),{filteredObject:M,itemCount:x}},[f,r]),_=u(()=>f&&I?ht(Ht,{title:`${f} values`,data:I.filteredObject,maxDepth:t,rawMode:n,initialExpanded:d,disableCopy:i,testIDPrefix:y}):ht(Ht,{title:e,data:r,maxDepth:t,rawMode:n,initialExpanded:d,disableCopy:i,onSelectionChange:a,onRequestInlineEdit:l,inlineEditPath:c,renderInlineEditor:s,selectPath:g,testIDPrefix:y}),"renderContent");return uo(h,{style:Pr.container,children:[o&&ht(h,{style:Pr.header,children:ht(Hr,{types:D,activeFilter:f,onFilterChange:k})}),_()]})},"DataViewer"),Pr=re.create({container:{},header:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"}});import{useState as go,useEffect as fo,useRef as Xe}from"react";import{jsx as ge,jsxs as $t}from"react/jsx-runtime";function Gt({label:e,containerStyle:r,showNumberControls:t=false,onIncrement:n,onDecrement:o,showDeleteButton:d=false,onDelete:i,...a}){let[l,c]=go(false),s=Xe(new F.Value(0)).current,g=Xe(new F.Value(0)).current,y=Xe(new F.Value(0)).current,f=Xe(new F.Value(1)).current,k=Xe(new F.Value(.6)).current;fo(()=>{l?(F.timing(k,{toValue:1,duration:200,useNativeDriver:true}).start(),F.loop(F.sequence([F.timing(s,{toValue:0,duration:2e3,useNativeDriver:true}),F.timing(s,{toValue:.8,duration:30,useNativeDriver:true}),F.timing(s,{toValue:0,duration:20,useNativeDriver:true}),F.timing(s,{toValue:.6,duration:40,useNativeDriver:true}),F.timing(s,{toValue:0,duration:30,useNativeDriver:true}),F.timing(s,{toValue:.4,duration:20,useNativeDriver:true}),F.timing(s,{toValue:0,duration:50,useNativeDriver:true})])).start(),F.loop(F.sequence([F.timing(g,{toValue:0,duration:2500,useNativeDriver:true}),F.timing(g,{toValue:3,duration:20,useNativeDriver:true}),F.timing(g,{toValue:-3,duration:20,useNativeDriver:true}),F.timing(g,{toValue:2,duration:20,useNativeDriver:true}),F.timing(g,{toValue:0,duration:20,useNativeDriver:true})])).start(),F.loop(F.sequence([F.timing(y,{toValue:0,duration:2200,useNativeDriver:true}),F.timing(y,{toValue:-2,duration:30,useNativeDriver:true}),F.timing(y,{toValue:1,duration:20,useNativeDriver:true}),F.timing(y,{toValue:0,duration:30,useNativeDriver:true})])).start(),F.loop(F.sequence([F.timing(f,{toValue:1,duration:3e3,useNativeDriver:true}),F.timing(f,{toValue:1.01,duration:20,useNativeDriver:true}),F.timing(f,{toValue:.99,duration:20,useNativeDriver:true}),F.timing(f,{toValue:1,duration:20,useNativeDriver:true})])).start()):(F.timing(k,{toValue:.6,duration:200,useNativeDriver:true}).start(),F.timing(s,{toValue:0,duration:100,useNativeDriver:true}).start(),F.timing(g,{toValue:0,duration:100,useNativeDriver:true}).start(),F.timing(y,{toValue:0,duration:100,useNativeDriver:true}).start(),F.timing(f,{toValue:1,duration:100,useNativeDriver:true}).start())},[l,k,s,g,y,f]);let D=u(x=>{c(true),a.onFocus?.(x)},"handleFocus"),I=u(x=>{c(false),a.onBlur?.(x)},"handleBlur"),_={opacity:k,borderColor:l?ee.primary:ee.textMuted+"4D"},M={opacity:s,transform:[{translateX:g},{translateY:y},{scale:f}]};return ge(h,{style:[J.container,r],children:$t(h,{style:J.rowContainer,children:[e&&ge(p,{style:[J.label,l&&J.labelFocused],children:e.toUpperCase()}),$t(F.View,{style:[J.inputContainer,_],children:[ge(F.View,{style:[J.glitchOverlay,M],pointerEvents:"none"}),ge(Wt,{...a,style:[J.input,a.style,t&&J.inputWithControls,d&&J.inputWithDelete],onFocus:D,onBlur:I,placeholderTextColor:ee.textMuted+"99",autoComplete:"off",autoCorrect:false,autoCapitalize:"none",spellCheck:false}),t&&$t(h,{style:J.numberControls,children:[ge(K,{style:[J.controlButton,l&&J.controlButtonFocused],onPress:n,activeOpacity:.7,children:ge(Ft,{size:14,strokeWidth:2.5,color:l?ee.primary:ee.textMuted})}),ge(K,{style:[J.controlButton,l&&J.controlButtonFocused],onPress:o,activeOpacity:.7,children:ge(at,{size:14,strokeWidth:2.5,color:l?ee.primary:ee.textMuted})})]}),d&&ge(K,{style:[J.deleteButton,l&&J.deleteButtonFocused],onPress:i,activeOpacity:.7,testID:typeof a.testID=="string"&&a.testID.endsWith("-input")?`${a.testID.slice(0,-6)}-delete`:void 0,accessibilityLabel:"Delete item",children:ge(Vt,{size:14,strokeWidth:2,color:l?ee.error:ee.error+"CC"})}),ge(h,{style:[J.cornerAccent,J.cornerTL,l&&J.cornerAccentFocused]}),ge(h,{style:[J.cornerAccent,J.cornerTR,l&&J.cornerAccentFocused]}),ge(h,{style:[J.cornerAccent,J.cornerBL,l&&J.cornerAccentFocused]}),ge(h,{style:[J.cornerAccent,J.cornerBR,l&&J.cornerAccentFocused]})]})]})})}u(Gt,"CyberpunkInput");var J=re.create({container:{width:"100%",marginVertical:3},rowContainer:{flexDirection:"row",alignItems:"center",gap:8},label:{fontSize:10,fontWeight:"600",fontFamily:S,color:ee.textMuted,letterSpacing:.5,minWidth:60},labelFocused:{color:ee.primary},inputContainer:{flex:1,borderWidth:1,borderRadius:6,position:"relative",minHeight:34,justifyContent:"center",flexDirection:"row",alignItems:"center"},glitchOverlay:{position:"absolute",top:-1,left:-1,right:-1,bottom:-1,borderRadius:6,borderWidth:1,borderColor:ee.primary,zIndex:10},input:{flex:1,paddingHorizontal:10,paddingVertical:6,color:ee.text,fontSize:12,fontFamily:S,backgroundColor:"transparent",zIndex:1},inputWithControls:{paddingRight:4},inputWithDelete:{paddingRight:4},numberControls:{flexDirection:"row",gap:2,paddingRight:4,zIndex:2},controlButton:{width:28,height:28,borderRadius:6,borderWidth:1,borderColor:ee.textMuted+"33",alignItems:"center",justifyContent:"center",shadowColor:"#000",shadowOffset:{width:0,height:1},shadowOpacity:.2,shadowRadius:2},controlButtonFocused:{borderColor:ee.primary+"CC",shadowColor:ee.primary,shadowOpacity:.3,shadowRadius:4},deleteButton:{width:28,height:28,borderRadius:6,borderWidth:1,borderColor:ee.error+"4D",alignItems:"center",justifyContent:"center",shadowColor:ee.error,shadowOffset:{width:0,height:0},shadowOpacity:.15,shadowRadius:3,marginRight:4,zIndex:2},deleteButtonFocused:{borderColor:ee.error+"CC",shadowOpacity:.3,shadowRadius:5},cornerAccent:{position:"absolute",width:6,height:1.2,backgroundColor:ee.textMuted+"CC",zIndex:0},cornerAccentFocused:{backgroundColor:ee.primary},cornerTL:{top:-1,left:5},cornerTR:{top:-1,right:5},cornerBL:{bottom:-1,left:5},cornerBR:{bottom:-1,right:5}});import{memo as po,useMemo as mo}from"react";import{jsx as je}from"react/jsx-runtime";var Re=10,Ze=$.primary+"40",et=$.primary+"66",$r=po(({depth:e,isLastChild:r,isExpanded:t,hasChildren:n,parentHasMoreSiblings:o=[],activeDepth:d=-1,itemHeight:i})=>{let a=mo(()=>{let l=[];for(let c=1;c<e;c++){let s=c===d;o[c-1]&&l.push(je(h,{style:[Me.verticalLine,{left:(c-1)*Re-.5,backgroundColor:s?et:Ze,height:i}]},`v-${c}`))}if(e>0){let c=r&&!t?i/2-1:i;l.push(je(h,{style:[Me.verticalLine,{left:(e-1)*Re-.5,backgroundColor:d===e-1?et:Ze,height:c}]},"v-current")),r&&!t&&l.push(je(h,{style:[Me.horizontalLine,{left:(e-1)*Re,top:i/2-1,width:Re/2,backgroundColor:d===e-1?et:Ze}]},"h-corner")),t&&n&&l.push(je(h,{style:[Me.horizontalLine,{left:(e-1)*Re,top:i/2-1,width:Re/2,backgroundColor:d===e-1?et:Ze}]},"h-expand-connector"))}return n&&t&&l.push(je(h,{style:[Me.verticalLine,{left:e*Re-.5,top:i/2,height:i/2+1,backgroundColor:d===e?et:Ze}]},"v-children")),l},[e,r,t,n,o,d,i]);return e===0?null:je(h,{style:Me.container,pointerEvents:"none",children:a})});$r.displayName="IndentGuides";var Me=re.create({container:{position:"absolute",left:0,top:0,bottom:0,right:0},verticalLine:{position:"absolute",width:1.5,top:0},horizontalLine:{position:"absolute",height:1.5}});import{useMemo as Jt,useState as yo,useEffect as bo,useRef as xo}from"react";import{gameUIColors as U,night as Oe}from"@buoy-gg/shared-ui/web";var Gr=(e=>(e.DEFAULT="unchanged",e.ADDED="added",e.REMOVED="removed",e.MODIFIED="modified",e))(Gr||{}),Jr=Symbol.for("buoy.diff.absent");function He(e){return e===Jr}u(He,"isAbsent");function Ur(e,r,t){let n,o;switch(t){case"chars":n=e.split(""),o=r.split("");break;case"words":n=e.match(/\S+|\s+/g)||[],o=r.match(/\S+|\s+/g)||[];break;case"trimmedLines":{let c=e.trim(),s=r.trim();n=c.match(/\S+|\s+/g)||[],o=s.match(/\S+|\s+/g)||[];break}case"lines":default:return{left:[{value:e,type:"removed"}],right:[{value:r,type:"added"}]}}let d=[],i=[],a=0,l=0;for(;a<n.length&&l<o.length;)if(n[a]===o[l])d.push({value:n[a],type:"unchanged"}),i.push({value:o[l],type:"unchanged"}),a++,l++;else{let c=false;for(let s=a+1;s<Math.min(a+5,n.length);s++)if(n[s]===o[l]){for(let g=a;g<s;g++)d.push({value:n[g],type:"removed"});a=s,c=true;break}if(!c){for(let s=l+1;s<Math.min(l+5,o.length);s++)if(o[s]===n[a]){for(let g=l;g<s;g++)i.push({value:o[g],type:"added"});l=s,c=true;break}}c||(d.push({value:n[a],type:"removed"}),i.push({value:o[l],type:"added"}),a++,l++)}for(;a<n.length;)d.push({value:n[a],type:"removed"}),a++;for(;l<o.length;)i.push({value:o[l],type:"added"}),l++;return{left:d,right:i}}u(Ur,"computeDiffByMethod");function Ut(e){if(He(e))return[];if(e==null)return[String(e)];try{let r=JSON.stringify(e,null,2).split(`
|
|
2
|
+
`),t=[];for(let n=0;n<r.length;n++){let o=r[n];(o.trim()!==""||n===0||n===r.length-1)&&t.push(o)}return t}catch{return[String(e)]}}u(Ut,"objectToLines");function qr(e,r){if(r<0)return e;let t=[],n=[];if(e.forEach((a,l)=>{a.type!=="unchanged"&&n.push(l)}),n.length===0)return[];let o=[],d=Math.max(0,n[0]-r),i=Math.min(e.length-1,n[0]+r);for(let a=1;a<n.length;a++){let l=n[a],c=Math.max(0,l-r),s=Math.min(e.length-1,l+r);c<=i+1?i=Math.max(i,s):(o.push([d,i]),d=c,i=s)}return o.push([d,i]),o.forEach(([a,l])=>{for(let c=a;c<=l;c++)t.push(e[c])}),t}u(qr,"filterDiffWithContext");function qt(e,r,t){let n=r==="trimmedLines"?e.trim():e;return t?n.replace(/,\s*$/,""):n}u(qt,"normalizeCompareKey");function Kr(e,r){let t=e.trim(),n=r.trim();return!!t&&!!n&&(t.startsWith(n.substring(0,3))||n.startsWith(t.substring(0,3)))}u(Kr,"looksLikeModification");var vo=8e3,Co=1024;function Yr(e,r){let t=e.length,n=r.length;if(t+n>vo)return null;if(t===0&&n===0)return[];let o=t+n,d=o+1,i=new Int32Array(2*o+3),a=Math.min(o,Co),l=[];for(let c=0;c<=a;c++){l.push(i.slice(d-(c+1),d+c+2));for(let s=-c;s<=c;s+=2){let g;s===-c||s!==c&&i[s-1+d]<i[s+1+d]?g=i[s+1+d]:g=i[s-1+d]+1;let y=g-s;for(;g<t&&y<n&&e[g]===r[y];)g++,y++;if(i[s+d]=g,g>=t&&y>=n)return _r(l,t,n)}}return null}u(Yr,"myersLineOps");function _r(e,r,t){let n=[],o=r,d=t;for(let i=e.length-1;i>=0;i--){let a=e[i],l=i+1,c=o-d,s;c===-i||c!==i&&a[c-1+l]<a[c+1+l]?s=c+1:s=c-1;let g=a[s+l],y=g-s;for(;o>g&&d>y;)n.push({kind:"eq",i:o-1,j:d-1}),o--,d--;i>0&&(o===g?n.push({kind:"ins",j:d-1}):n.push({kind:"del",i:o-1})),o=g,d=y}return n.reverse(),n}u(_r,"backtrackOps");function Kt(e,r,t,n,o,d,i){let a=Math.min(r.length,t.length);for(let l=0;l<a;l++){let c=r[l],s=t[l];if(!Kr(n[c],o[s])){e.push({leftLineNumber:c+1,type:"removed",leftContent:n[c],leftRaw:n[c]}),e.push({rightLineNumber:s+1,type:"added",rightContent:o[s],rightRaw:o[s]});continue}if(!i&&d!=="lines"){let g=Ur(n[c],o[s],d);e.push({leftLineNumber:c+1,rightLineNumber:s+1,type:"modified",leftContent:g.left,rightContent:g.right,leftRaw:n[c],rightRaw:o[s]})}else e.push({leftLineNumber:c+1,rightLineNumber:s+1,type:"modified",leftContent:n[c],rightContent:o[s],leftRaw:n[c],rightRaw:o[s]})}for(let l=a;l<r.length;l++){let c=r[l];e.push({leftLineNumber:c+1,type:"removed",leftContent:n[c],leftRaw:n[c]})}for(let l=a;l<t.length;l++){let c=t[l];e.push({rightLineNumber:c+1,type:"added",rightContent:o[c],rightRaw:o[c]})}}u(Kt,"emitHunk");function Qr(e,r,t,n,o){let d=[],i=0;for(;i<e.length;){let a=e[i];if(a.kind==="eq"){d.push({leftLineNumber:a.i+1,rightLineNumber:a.j+1,type:"unchanged",leftContent:r[a.i],rightContent:t[a.j],leftRaw:r[a.i],rightRaw:t[a.j]}),i++;continue}let l=[],c=[];for(;i<e.length&&e[i].kind!=="eq";){let s=e[i];s.kind==="del"?l.push(s.i):s.kind==="ins"&&c.push(s.j),i++}Kt(d,l,c,r,t,n,o)}return d}u(Qr,"buildRowsFromOps");function Xr(e,r,t,n,o,d){let i=[],a=0,l=0;for(;a<e.length||l<r.length;)a>=e.length?(i.push({rightLineNumber:l+1,type:"added",rightContent:r[l],rightRaw:r[l]}),l++):l>=r.length?(i.push({leftLineNumber:a+1,type:"removed",leftContent:e[a],leftRaw:e[a]}),a++):t[a]===n[l]?(i.push({leftLineNumber:a+1,rightLineNumber:l+1,type:"unchanged",leftContent:e[a],rightContent:r[l],leftRaw:e[a],rightRaw:r[l]}),a++,l++):(Kt(i,[a],[l],e,r,o,d),a++,l++);return i}u(Xr,"pairwiseLineWalk");function gt(e,r,t={}){let{compareMethod:n="words",disableWordDiff:o=false,showDiffOnly:d=false,contextLines:i=3,ignoreTrailingComma:a=true}=t,l=Ut(e),c=Ut(r),s=l.map(k=>qt(k,n,a)),g=c.map(k=>qt(k,n,a)),y=Yr(s,g),f=y?Qr(y,l,c,n,o):Xr(l,c,s,g,n,o);return d?qr(f,i):f}u(gt,"computeLineDiff");import{Fragment as Yt,jsx as j,jsxs as xe}from"react/jsx-runtime";var wo={background:Oe.color.bg,text:Oe.color.textSecondary,addedBg:U.diff.addedBackground,removedBg:U.diff.removedBackground,changedBg:U.diff.modifiedBackground,addedText:U.diff.addedText,removedText:U.diff.removedText,changedText:U.diff.modifiedText,addedWordBg:U.diff.addedWordHighlight,removedWordBg:U.diff.removedWordHighlight,arrowText:U.diff.modifiedText,keyText:U.diff.modifiedText,expandIcon:Oe.color.textTertiary,bracketText:Oe.color.textSecondary,nullText:U.diff.modifiedText,undefinedText:U.diff.modifiedText,stringText:Oe.color.textSecondary,numberText:Oe.color.textSecondary,booleanText:U.diff.modifiedText},ko={background:"#ffffff",text:"#333333",addedBg:"rgba(40, 167, 69, 0.1)",addedText:"#28A745",removedBg:"rgba(220, 53, 69, 0.1)",removedText:"#DC3545",changedBg:"rgba(255, 193, 7, 0.1)",changedText:"#FFC107",arrowText:"#007BFF",keyText:"#0451A5",expandIcon:"#6A737D",bracketText:"#6A737D",nullText:"#0000FF",undefinedText:"#0000FF",stringText:"#A31515",numberText:"#098658",booleanText:"#0000FF"};function ae(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}u(ae,"isObject");function Pe(e,r){if(e===r)return true;if(e===null||r===null||e===void 0||r===void 0||typeof e!=typeof r)return false;if(typeof e=="object"){if(Array.isArray(e)&&Array.isArray(r))return e.length!==r.length?false:e.every((t,n)=>Pe(t,r[n]));if(ae(e)&&ae(r)){let t=Object.keys(e),n=Object.keys(r);return t.length!==n.length?false:t.every(o=>Pe(e[o],r[o]))}}return false}u(Pe,"isEqual");function ke(e,r,t=[]){let n=[];if(He(e)&&(e=void 0),He(r)&&(r=void 0),!ae(e)&&!ae(r)&&!Array.isArray(e)&&!Array.isArray(r))return Pe(e,r)?[{key:t.length>0?t[t.length-1]:"root",path:t,type:"unchanged",oldValue:e,newValue:r}]:[{key:t.length>0?t[t.length-1]:"root",path:t,type:e===void 0?"added":r===void 0?"removed":"changed",oldValue:e,newValue:r}];if(Array.isArray(e)||Array.isArray(r)){let a=Array.isArray(e)?e:[],l=Array.isArray(r)?r:[],c=Math.max(a.length,l.length);for(let s=0;s<c;s++){let g=[...t,`[${s}]`],y=s<a.length?a[s]:void 0,f=s<l.length?l[s]:void 0;if(y===void 0){let k=Array.isArray(f)||ae(f);n.push({key:`[${s}]`,path:g,type:"added",newValue:f,...k?{children:ke(Array.isArray(f)?[]:{},f,g),expanded:false}:{}})}else if(f===void 0){let k=Array.isArray(y)||ae(y);n.push({key:`[${s}]`,path:g,type:"removed",oldValue:y,...k?{children:ke(y,Array.isArray(y)?[]:{},g),expanded:false}:{}})}else if(!Pe(y,f))ae(y)||ae(f)||Array.isArray(y)||Array.isArray(f)?n.push({key:`[${s}]`,path:g,type:"changed",oldValue:y,newValue:f,children:ke(y,f,g),expanded:false}):n.push({key:`[${s}]`,path:g,type:"changed",oldValue:y,newValue:f});else{let k=Array.isArray(y)||ae(y);n.push({key:`[${s}]`,path:g,type:"unchanged",oldValue:y,newValue:f,...k?{children:ke(y,f,g),expanded:false}:{}})}}return n}let o=ae(e)?e:{},d=ae(r)?r:{},i=new Set([...Object.keys(o),...Object.keys(d)]);for(let a of i){let l=[...t,a],c=o[a],s=d[a];if(a in o)if(a in d)if(!Pe(c,s))ae(c)||ae(s)||Array.isArray(c)||Array.isArray(s)?n.push({key:a,path:l,type:"changed",oldValue:c,newValue:s,children:ke(c,s,l),expanded:false}):n.push({key:a,path:l,type:"changed",oldValue:c,newValue:s});else{let g=Array.isArray(c)||ae(c);n.push({key:a,path:l,type:"unchanged",oldValue:c,newValue:s,...g?{children:ke(c,s,l),expanded:false}:{}})}else{let g=Array.isArray(c)||ae(c);n.push({key:a,path:l,type:"removed",oldValue:c,...g?{children:ke(c,Array.isArray(c)?[]:{},l),expanded:false}:{}})}else{let g=Array.isArray(s)||ae(s);n.push({key:a,path:l,type:"added",newValue:s,...g?{children:ke(Array.isArray(s)?[]:{},s,l),expanded:false}:{}})}}return n}u(ke,"computeDiff");function Te(e,r=true){if(e===null)return"null";if(e===void 0)return"undefined";if(typeof e=="string")return r&&e.length>30?`"${e.substring(0,27)}..."`:`"${e}"`;if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e)){if(r){let t=e.length;return t===0?"[ ]":`[ ${t} item${t!==1?"s":""} ]`}return JSON.stringify(e,null,2)}if(ae(e)){if(r){let t=Object.keys(e).length;return t===0?"{ }":`{ ${t} key${t!==1?"s":""} }`}return JSON.stringify(e,null,2)}return String(e)}u(Te,"stringifyValue");function Zr({oldValue:e,newValue:r,theme:t="dark",expandAll:n=false,showUnchanged:o=true,scrollEnabled:d=true}){let i=t==="dark"?wo:ko,[a,l]=yo(()=>{let x=new Set;return ke(e,r).forEach(v=>{v.children&&v.children.length>0&&x.add(v.path.join("."))}),x}),c=Jt(()=>ke(e,r),[e,r]),s=Jt(()=>c.map(x=>`${x.path.join(".")}:${x.type}`).join("|"),[c]),g=xo(false);bo(()=>{if(!g.current){g.current=true;return}let x=new Set;c.forEach(v=>{v.children&&v.children.length>0&&x.add(v.path.join("."))}),l(x)},[s]);let y=u(x=>{let v=x.join(".");l(B=>{let m=new Set(B);return m.has(v)?m.delete(v):m.add(v),m})},"toggleExpanded"),f=0,k=u((x,v=0)=>{if(!o&&x.type==="unchanged")return null;f++;let B=f,m=v*20,C=n||a.has(x.path.join(".")),w=x.children&&x.children.length>0,T=u(()=>{switch(x.type){case"added":return{backgroundColor:i.addedBg};case"removed":return{backgroundColor:i.removedBg};case"changed":return{backgroundColor:i.changedBg};default:return{backgroundColor:"transparent"}}},"getNodeStyle"),R=u(()=>{switch(x.type){case"added":return"+";case"removed":return"\u2212";case"changed":return"\u2248";default:return" "}},"getMarker"),W=u(()=>{switch(x.type){case"added":return{backgroundColor:U.diff.markerAddedBackground,color:U.diff.addedText};case"removed":return{backgroundColor:U.diff.markerRemovedBackground,color:U.diff.removedText};case"changed":return{backgroundColor:U.diff.markerModifiedBackground,color:U.diff.modifiedText};default:return{backgroundColor:"transparent",color:U.diff.markerText}}},"getMarkerStyle");return xe(h,{children:[xe(K,{activeOpacity:w?.7:1,onPress:w?()=>y(x.path):void 0,style:[V.row,T()],children:[j(h,{style:V.lineNumber,children:j(p,{style:[V.lineNumberText,{color:U.diff.lineNumberText}],children:String(B).padStart(2," ")})}),j(h,{style:[V.marker,W()],children:j(p,{style:[V.markerText,{color:W().color}],children:R()})}),xe(h,{style:[V.content,{paddingLeft:m}],children:[w&&j(h,{style:V.expandIconContainer,children:j(p,{style:[V.expandIcon,{color:i.expandIcon}],children:C?"\u2212":"+"})}),j(p,{style:[V.key,{color:i.keyText}],children:x.key}),j(p,{style:[V.colon,{color:i.expandIcon}],children:":"}),x.type==="changed"&&!w&&xe(Yt,{children:[j(p,{style:[V.value,{color:i.removedText,backgroundColor:i.removedWordBg,paddingHorizontal:3,paddingVertical:2,borderRadius:3,textDecorationLine:"line-through",textDecorationColor:i.removedText}],children:Te(x.oldValue)}),j(p,{style:[V.arrow,{color:i.arrowText,paddingHorizontal:4}],children:" => "}),j(p,{style:[V.value,{color:i.addedText,backgroundColor:i.addedWordBg,paddingHorizontal:3,paddingVertical:2,borderRadius:3}],children:Te(x.newValue)})]}),x.type==="added"&&!w&&j(p,{style:[V.value,{color:i.addedText,backgroundColor:i.addedWordBg,paddingHorizontal:3,paddingVertical:2,borderRadius:3}],children:Te(x.newValue)}),x.type==="removed"&&!w&&j(p,{style:[V.value,{color:i.removedText,backgroundColor:i.removedWordBg,paddingHorizontal:3,paddingVertical:2,borderRadius:3,textDecorationLine:"line-through",textDecorationColor:i.removedText}],children:Te(x.oldValue)}),x.type==="unchanged"&&!w&&j(p,{style:[V.value,{color:i.text}],children:Te(x.oldValue)}),w&&!C&&xe(Yt,{children:[x.type==="changed"&&xe(Yt,{children:[j(p,{style:[V.value,{color:i.removedText,backgroundColor:i.removedWordBg,paddingHorizontal:3,paddingVertical:2,borderRadius:3,textDecorationLine:"line-through",textDecorationColor:i.removedText}],children:Te(x.oldValue,true)}),j(p,{style:[V.arrow,{color:i.arrowText,paddingHorizontal:4}],children:" => "}),j(p,{style:[V.value,{color:i.addedText,backgroundColor:i.addedWordBg,paddingHorizontal:3,paddingVertical:2,borderRadius:3}],children:Te(x.newValue,true)})]}),x.type==="added"&&j(p,{style:[V.value,{color:i.addedText,backgroundColor:i.addedWordBg,paddingHorizontal:3,paddingVertical:2,borderRadius:3}],children:Te(x.newValue,true)}),x.type==="removed"&&j(p,{style:[V.value,{color:i.removedText,backgroundColor:i.removedWordBg,paddingHorizontal:3,paddingVertical:2,borderRadius:3,textDecorationLine:"line-through",textDecorationColor:i.removedText}],children:Te(x.oldValue,true)})]})]})]}),w&&C&&j(h,{children:x.children.map(H=>k(H,v+1))})]},x.path.join("."))},"renderDiffNode"),D=u(x=>{let v=0,B=0,m=0,C=u(w=>{for(let T of w)T.type==="added"?v++:T.type==="removed"?B++:T.type==="changed"&&m++,T.children&&C(T.children)},"count");return C(x),{added:v,removed:B,changed:m}},"countChanges"),I=Jt(()=>D(c),[c]),_=I.added>0||I.removed>0||I.changed>0,M=d?zt:h;return xe(h,{style:[d?V.container:V.containerInline,{backgroundColor:i.background}],children:[_&&j(h,{style:[V.header,{backgroundColor:i.background}],children:xe(h,{style:V.summaryContainer,children:[I.added>0&&xe(h,{style:[V.summaryItem,V.summaryAdded],children:[j(p,{style:[V.summaryIcon,{color:i.addedText}],children:"+"}),j(p,{style:[V.summaryCount,{color:i.addedText}],children:I.added}),j(p,{style:[V.summaryLabel,{color:i.addedText}],children:"new"})]}),I.removed>0&&xe(h,{style:[V.summaryItem,V.summaryRemoved],children:[j(p,{style:[V.summaryIcon,{color:i.removedText}],children:"\u2212"}),j(p,{style:[V.summaryCount,{color:i.removedText}],children:I.removed}),j(p,{style:[V.summaryLabel,{color:i.removedText}],children:"gone"})]}),I.changed>0&&xe(h,{style:[V.summaryItem,V.summaryChanged],children:[j(p,{style:[V.summaryIcon,{color:i.changedText}],children:"\u2248"}),j(p,{style:[V.summaryCount,{color:i.changedText}],children:I.changed}),j(p,{style:[V.summaryLabel,{color:i.changedText}],children:"modified"})]})]})}),j(M,{style:d?V.scrollView:void 0,showsVerticalScrollIndicator:false,children:c.length===0?xe(h,{style:V.emptyState,children:[j(p,{style:[V.emptyIcon,{color:i.text}],children:"\u2261"}),j(p,{style:[V.emptyTitle,{color:i.text}],children:"No changes detected"}),j(p,{style:[V.emptySubtitle,{color:i.expandIcon}],children:"The data is identical"})]}):j(h,{children:(f=0,c.map(x=>k(x,0)))})})]})}u(Zr,"TreeDiffViewer");var V=re.create({container:{flex:1,borderRadius:8,overflow:"hidden"},containerInline:{borderRadius:8,overflow:"hidden"},header:{paddingHorizontal:12,paddingVertical:8,borderBottomWidth:1,borderBottomColor:U.diff.lineNumberBorder},summaryContainer:{flexDirection:"row",gap:16,alignItems:"center"},summaryItem:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:8,paddingVertical:4,borderRadius:12},summaryAdded:{backgroundColor:U.diff.addedBackground},summaryRemoved:{backgroundColor:U.diff.removedBackground},summaryChanged:{backgroundColor:U.diff.modifiedBackground},summaryIcon:{fontSize:14,fontWeight:"700",fontFamily:S},summaryCount:{fontSize:13,fontWeight:"600",fontFamily:S},summaryLabel:{fontSize:11,fontFamily:S,opacity:.9},scrollView:{flex:1},row:{minHeight:26,justifyContent:"center",flexDirection:"row",borderBottomWidth:re.hairlineWidth,borderBottomColor:"rgba(128, 128, 128, 0.04)"},lineNumber:{width:32,paddingHorizontal:6,paddingVertical:4,backgroundColor:U.diff.lineNumberBackground,justifyContent:"center",borderRightWidth:1,borderRightColor:U.diff.lineNumberBorder},lineNumberText:{fontSize:11,fontFamily:S,textAlign:"right"},marker:{width:20,paddingHorizontal:2,paddingVertical:4,justifyContent:"center",alignItems:"center"},markerText:{fontSize:12,fontFamily:S,fontWeight:"600"},content:{flex:1,flexDirection:"row",alignItems:"center",paddingHorizontal:12,paddingVertical:4},expandIconContainer:{width:16,height:16,borderRadius:3,backgroundColor:U.diff.lineNumberBorder,alignItems:"center",justifyContent:"center",marginRight:6},expandIcon:{fontSize:11,fontFamily:S,fontWeight:"600"},colon:{fontSize:12,fontFamily:S,marginHorizontal:4},key:{fontSize:11,fontFamily:S,fontWeight:"500",opacity:.9},value:{fontSize:11,fontFamily:S,maxWidth:"80%"},arrow:{fontSize:12,fontFamily:S,fontWeight:"600"},badge:{fontSize:11,fontFamily:S,fontWeight:"600",marginLeft:8},emptyState:{flex:1,alignItems:"center",justifyContent:"center",paddingVertical:60},emptyIcon:{fontSize:48,fontFamily:S,opacity:.2,marginBottom:12},emptyTitle:{fontSize:14,fontFamily:S,fontWeight:"600",marginBottom:4},emptySubtitle:{fontSize:12,fontFamily:S,opacity:.6}});function fe(e){if(e===null||typeof e!="object"||Array.isArray(e))return false;let r=Object.getPrototypeOf(e);return r===Object.prototype||r===null}u(fe,"isRebuildableObject");function _t(e){switch(e.kind){case"move":return[...e.path.slice(0,-1),String(e.toIndex)];case"duplicate":{let r=e.path[e.path.length-1],t=Number(r);return Number.isInteger(t)?[...e.path.slice(0,-1),String(t+1)]:void 0}case"remove":return null;default:return}}u(_t,"selectionPathAfterOp");function Qt(e){return Array.isArray(e)||fe(e)}u(Qt,"isEditableContainer");function ft(e,r){let t=e;for(let n of r)if(Array.isArray(t))t=t[Number(n)];else if(fe(t))t=t[n];else return;return t}u(ft,"getAtPath");function ve(e,r,t){if(r.length===0)return t(e);let[n,...o]=r;if(Array.isArray(e)){let d=Number(n);if(!Number.isInteger(d)||d<0||d>=e.length)return e;let i=[...e];return i[d]=ve(i[d],o,t),i}return fe(e)&&n in e?{...e,[n]:ve(e[n],o,t)}:e}u(ve,"updateContainer");function tt(e){return e.length===0?null:{parent:e.slice(0,-1),last:e[e.length-1]}}u(tt,"splitPath");function Xt(e,r){switch(r.kind){case"replace":return ve(e,r.path,()=>r.value);case"clear":return ve(e,r.path,t=>Array.isArray(t)?[]:fe(t)?{}:t);case"append":return ve(e,r.path,t=>Array.isArray(t)?[...t,r.value]:t);case"insert":return ve(e,r.path,t=>{if(!Array.isArray(t))return t;let n=Zt(r.index,0,t.length);return[...t.slice(0,n),r.value,...t.slice(n)]});case"addKey":return ve(e,r.path,t=>!fe(t)||r.key in t?t:{...t,[r.key]:r.value});case"remove":{let t=tt(r.path);return t?ve(e,t.parent,n=>en(n,t.last)):e}case"duplicate":{let t=tt(r.path);return t?ve(e,t.parent,n=>tn(n,t.last)):e}case"move":{let t=tt(r.path);return t?ve(e,t.parent,n=>{if(!Array.isArray(n))return n;let o=Number(t.last);if(!Number.isInteger(o)||o<0||o>=n.length)return n;let d=Zt(r.toIndex,0,n.length-1);if(d===o)return n;let i=[...n],[a]=i.splice(o,1);return i.splice(d,0,a),i}):e}case"renameKey":{let t=tt(r.path);return t?ve(e,t.parent,n=>rn(n,t.last,r.key)):e}default:return e}}u(Xt,"applyJsonOp");function en(e,r){if(Array.isArray(e)){let t=Number(r);return!Number.isInteger(t)||t<0||t>=e.length?e:e.filter((n,o)=>o!==t)}if(fe(e)){if(!(r in e))return e;let t={};for(let n of Object.keys(e))n!==r&&(t[n]=e[n]);return t}return e}u(en,"removeEntry");function tn(e,r){if(Array.isArray(e)){let t=Number(r);return!Number.isInteger(t)||t<0||t>=e.length?e:[...e.slice(0,t+1),rt(e[t]),...e.slice(t+1)]}if(fe(e)){if(!(r in e))return e;let t=nn(e,`${r} copy`),n={};for(let o of Object.keys(e))n[o]=e[o],o===r&&(n[t]=rt(e[o]));return n}return e}u(tn,"duplicateEntry");function rn(e,r,t){if(!fe(e)||!(r in e)||t===r||t in e)return e;let n={};for(let o of Object.keys(e))o===r?n[t]=e[o]:n[o]=e[o];return n}u(rn,"renameEntry");function nn(e,r){if(!(r in e))return r;let t=2;for(;`${r} ${t}`in e;)t++;return`${r} ${t}`}u(nn,"uniqueKey");function rt(e){if(Array.isArray(e))return e.map(rt);if(fe(e)){let r={};for(let t of Object.keys(e))r[t]=rt(e[t]);return r}return e}u(rt,"clone");function Zt(e,r,t){return Number.isFinite(e)?Math.min(Math.max(Math.trunc(e),r),t):r}u(Zt,"clamp");function pt(e){let r=Array.isArray(e)?e:fe(e)?Object.values(e):[],t=r[r.length-1];return typeof t=="number"?0:typeof t=="boolean"?false:Array.isArray(t)?[]:fe(t)?{}:""}u(pt,"suggestedNewValue");function Ee(e){return e===null?"null":Array.isArray(e)?"array":fe(e)?"object":typeof e}u(Ee,"typeLabel");function nt(e){return e.length===0?"root":e.join(" \u203A ")}u(nt,"breadcrumb");function er(e){let r={};for(let t of e)r[t.id]=t;return r}u(er,"treeActionMap");function on(e){if(!("newKey"in e))return"newKey";let r=2;for(;`newKey ${r}`in e;)r++;return`newKey ${r}`}u(on,"newKeyFor");function mt(e,r,t={}){let n=r?.path??[],o=r?.value,d=r!=null,i=n.length===0,a=t.rootEntriesLocked===true&&n.length===1,l=d&&!i?ft(e,n.slice(0,-1)):void 0,c=Array.isArray(l),s=c?Number(n[n.length-1]):-1,g=Array.isArray(o),y=fe(o),f=Qt(o),k=d&&(t.containersEditable===true||!f),D=y?on(o):"",I=y?{id:"add",label:"Add key",enabled:true,op:{kind:"addKey",path:n,key:D,value:pt(o)},selectAfter:[...n,D]}:{id:"add",label:"Append",enabled:g,op:g?{kind:"append",path:n,value:pt(o)}:null,selectAfter:g?[...n,String(o.length)]:void 0};return[typeof o=="boolean"?{id:"editValue",label:"Toggle",enabled:true,op:{kind:"replace",path:n,value:!o}}:{id:"editValue",label:"Edit value",enabled:k,op:null},I,{id:"duplicate",label:"Duplicate",enabled:d&&!i,op:d&&!i?{kind:"duplicate",path:n}:null},{id:"moveUp",label:"Move up",enabled:d&&c&&s>0,op:d&&c&&s>0?{kind:"move",path:n,toIndex:s-1}:null},{id:"moveDown",label:"Move down",enabled:d&&c&&s>-1&&s<l.length-1,op:d&&c&&s>-1&&s<l.length-1?{kind:"move",path:n,toIndex:s+1}:null},{id:"remove",label:"Remove",danger:true,enabled:d&&!i&&!a,op:d&&!i&&!a?{kind:"remove",path:n}:null}]}u(mt,"treeActionsFor");import{useState as To}from"react";import{jsx as Y,jsxs as ot}from"react/jsx-runtime";var ne={barBg:A.background.card,barBorder:A.border.default,label:A.text.primary,badgeBg:A.background.hover,badgeText:A.text.secondary,hint:A.text.muted,btnBg:A.background.hover,btnBorder:A.border.default,btnText:A.text.primary,btnIcon:A.text.secondary,dangerBorder:A.semantic.error+"55",dangerText:A.semantic.error},yt=13;function Ve({label:e,onPress:r,icon:t,danger:n,iconOnly:o,disabled:d,style:i}){return ot(K,{"sentry-label":"ignore devtools tree action",accessibilityLabel:e,accessibilityState:{disabled:!!d},onPress:d?void 0:r,disabled:d,hitSlop:{top:8,bottom:8,left:6,right:6},style:[X.button,o&&X.buttonIconOnly,n&&{borderColor:ne.dangerBorder},d&&X.buttonDisabled,i],children:[t,o?null:Y(p,{style:[X.buttonText,n&&{color:ne.dangerText}],children:e})]})}u(Ve,"Button");function an({root:e,selection:r,onEdit:t,onRequestInlineEdit:n,chipStyle:o}){let d=r!=null,i=er(mt(e,r)),a=u(l=>l&&t(l),"apply");return ot(h,{style:X.bar,children:[Y(p,{style:[X.selectionLabel,!d&&X.selectionLabelEmpty],numberOfLines:1,children:d?nt(r.path):"Select a row to edit"}),Y(h,{style:X.badge,children:Y(p,{style:X.badgeText,children:d?Ee(r.value):"\u2014"})}),ot(h,{style:X.actions,children:[Y(Ve,{label:i.editValue.label,disabled:!i.editValue.enabled,style:o,icon:Y(Dr,{size:yt,color:ne.btnIcon}),onPress:()=>i.editValue.op?t(i.editValue.op):n()}),Y(Ve,{label:i.add.label,disabled:!i.add.enabled,style:o,icon:Y(kr,{size:yt,color:ne.btnIcon}),onPress:()=>a(i.add.op)}),Y(Ve,{label:i.moveUp.label,iconOnly:true,disabled:!i.moveUp.enabled,style:o,icon:Y(Ft,{size:14,color:ne.btnIcon}),onPress:()=>a(i.moveUp.op)}),Y(Ve,{label:i.moveDown.label,iconOnly:true,disabled:!i.moveDown.enabled,style:o,icon:Y(at,{size:14,color:ne.btnIcon}),onPress:()=>a(i.moveDown.op)}),Y(Ve,{label:i.duplicate.label,disabled:!i.duplicate.enabled,style:o,icon:Y(Sr,{size:yt,color:ne.btnIcon}),onPress:()=>a(i.duplicate.op)}),Y(Ve,{label:i.remove.label,danger:true,disabled:!i.remove.enabled,style:o,icon:Y(Br,{size:yt,color:ne.dangerText}),onPress:()=>a(i.remove.op)})]})]})}u(an,"DataTreeActionBar");function ln({value:e,onCommit:r,onCancel:t}){let[n,o]=To(()=>e==null?"":String(e));if(typeof e=="boolean")return ot(h,{style:X.inlineRow,children:[[true,false].map(l=>Y(K,{accessibilityLabel:`Set ${l}`,onPress:()=>r(l),hitSlop:{top:8,bottom:8,left:6,right:6},style:[X.button,e===l&&X.buttonActive],children:Y(p,{style:X.buttonText,children:String(l)})},String(l))),Y(K,{accessibilityLabel:"Cancel edit",onPress:t,hitSlop:{top:8,bottom:8,left:6,right:6},style:X.button,children:Y(p,{style:X.buttonText,children:"Cancel"})})]});let d=typeof e=="number",i=d&&(n.trim()===""||Number.isNaN(Number(n))),a=u(()=>{i||r(d?Number(n):n)},"commit");return ot(h,{style:X.inlineRow,children:[Y(Wt,{value:n,onChangeText:o,onSubmitEditing:a,autoFocus:true,autoCapitalize:"none",autoCorrect:false,spellCheck:false,keyboardType:d?"numeric":"default",style:[X.input,i&&X.inputInvalid],placeholderTextColor:ne.hint}),Y(K,{accessibilityLabel:"Save value",onPress:a,hitSlop:{top:8,bottom:8,left:6,right:6},style:[X.saveButton,i&&X.saveButtonDisabled],children:Y(p,{style:X.saveText,children:"Save"})}),Y(K,{accessibilityLabel:"Cancel edit",onPress:t,hitSlop:{top:8,bottom:8,left:6,right:6},style:X.button,children:Y(p,{style:X.buttonText,children:"Cancel"})})]})}u(ln,"DataTreeInlineEditor");var X=re.create({inlineRow:{flex:1,flexDirection:"row",alignItems:"center",gap:6},input:{flex:1,minWidth:0,height:28,color:ne.label,backgroundColor:A.background.input,borderWidth:1,borderColor:A.border.input,borderRadius:7,paddingHorizontal:9,paddingVertical:0,fontSize:12,fontFamily:S},inputInvalid:{borderColor:A.semantic.error},saveButton:{height:28,justifyContent:"center",paddingHorizontal:10,borderRadius:7,backgroundColor:A.semantic.success},saveButtonDisabled:{opacity:.4},saveText:{color:A.background.base,fontSize:12,fontWeight:"600"},buttonActive:{borderColor:A.semantic.success},bar:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:8,paddingHorizontal:12,paddingVertical:9,borderTopWidth:1,borderTopColor:ne.barBorder,backgroundColor:ne.barBg},actions:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:6,marginLeft:"auto"},selectionLabelEmpty:{color:ne.hint,fontWeight:"400"},selectionLabel:{color:ne.label,fontSize:12,fontWeight:"600",fontFamily:S,flexShrink:1},badge:{paddingHorizontal:7,paddingVertical:1,borderRadius:5,backgroundColor:ne.badgeBg},badgeText:{color:ne.badgeText,fontSize:11,fontWeight:"600"},button:{flexDirection:"row",alignItems:"center",gap:6,minHeight:32,paddingHorizontal:11,borderRadius:8,borderWidth:1,borderColor:ne.btnBorder,backgroundColor:ne.btnBg},buttonDisabled:{opacity:.35},buttonIconOnly:{paddingHorizontal:0,width:32,justifyContent:"center"},buttonText:{color:ne.btnText,fontSize:12,fontWeight:"600"},hint:{color:ne.hint,fontSize:12,flexShrink:1}});import{jsx as Ce,jsxs as tr}from"react/jsx-runtime";var me={dockBg:A.background.card,dockBorder:A.border.default,tileBg:A.background.hover,tileBorder:A.border.default,tileText:A.text.primary,tileIcon:A.text.secondary,hint:A.text.muted,label:A.text.primary,badgeBg:A.background.hover,badgeText:A.text.secondary,dangerBorder:A.semantic.error+"55",dangerText:A.semantic.error},$e=16;function dn(e,r){switch(e){case"editValue":return Ce(Dr,{size:$e,color:r});case"add":return Ce(kr,{size:$e,color:r});case"duplicate":return Ce(Sr,{size:$e,color:r});case"moveUp":return Ce(Ft,{size:$e+2,color:r});case"moveDown":return Ce(at,{size:$e+2,color:r});case"remove":return Ce(Br,{size:$e,color:r})}}u(dn,"iconFor");function sn({action:e,onPress:r}){let{enabled:t,danger:n,label:o,id:d}=e,i=n&&t?me.dangerText:me.tileIcon;return tr(K,{"sentry-label":"ignore devtools tree action",testID:`buoy-tree-action-${d}`,accessibilityLabel:o,accessibilityState:{disabled:!t},disabled:!t,onPress:t?r:void 0,style:[Se.tile,n&&t&&{borderColor:me.dangerBorder},!t&&Se.tileDisabled],children:[dn(d,i),Ce(p,{style:[Se.tileText,n&&t&&{color:me.dangerText}],numberOfLines:1,children:o})]})}u(sn,"Tile");function cn({root:e,selection:r,onEdit:t,onSelectPath:n,onEditValue:o,containersEditable:d=true,rootEntriesLocked:i=false}){let a=mt(e,r,{containersEditable:d,rootEntriesLocked:i}),l=r!=null,c=u(s=>{if(!s.op){o();return}t(s.op),s.selectAfter&&n(s.selectAfter)},"run");return tr(h,{style:Se.dock,children:[tr(h,{style:Se.header,children:[Ce(p,{style:[Se.selectionLabel,!l&&Se.selectionLabelEmpty],numberOfLines:1,children:l?nt(r.path):"Tap a row to select it"}),Ce(h,{style:Se.badge,children:Ce(p,{style:Se.badgeText,children:l?Ee(r.value):"\u2014"})})]}),Ce(h,{style:Se.grid,children:a.map(s=>Ce(sn,{action:s,onPress:()=>c(s)},s.id))})]})}u(cn,"DataTreeActionDock");var Se=re.create({dock:{borderTopWidth:1,borderTopColor:me.dockBorder,backgroundColor:me.dockBg,paddingHorizontal:10,paddingTop:8,paddingBottom:10,gap:8},header:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:2},selectionLabel:{flex:1,color:me.label,fontSize:12,fontWeight:"600",fontFamily:S},selectionLabelEmpty:{color:me.hint,fontWeight:"400"},badge:{paddingHorizontal:7,paddingVertical:1,borderRadius:5,backgroundColor:me.badgeBg},badgeText:{color:me.badgeText,fontSize:11,fontWeight:"600"},grid:{flexDirection:"row",flexWrap:"wrap",gap:8},tile:{flexBasis:"31%",flexGrow:1,minHeight:54,alignItems:"center",justifyContent:"center",gap:3,paddingHorizontal:6,borderRadius:10,borderWidth:1,borderColor:me.tileBorder,backgroundColor:me.tileBg},tileDisabled:{opacity:.35},tileText:{color:me.tileText,fontSize:11,fontWeight:"600"}});import{Fragment as So,useMemo as un,memo as Do}from"react";import{memo as Bo}from"react";import{jsx as Be,jsxs as bt}from"react/jsx-runtime";var rr=Bo(u(function({added:e,removed:r,modified:t,theme:n,style:o}){return e>0||r>0||t>0?bt(h,{style:[ye.container,{backgroundColor:n.summaryBackground,borderTopColor:n.borderColor},o],children:[e>0&&bt(h,{style:[ye.badge,{backgroundColor:n.addedBackground}],children:[Be(p,{style:[ye.icon,{color:n.summaryAddedText}],children:"+"}),Be(p,{style:[ye.count,{color:n.summaryAddedText}],children:e}),Be(p,{style:[ye.label,{color:n.summaryAddedText}],children:"new"})]}),r>0&&bt(h,{style:[ye.badge,{backgroundColor:n.removedBackground}],children:[Be(p,{style:[ye.icon,{color:n.summaryRemovedText}],children:"\u2212"}),Be(p,{style:[ye.count,{color:n.summaryRemovedText}],children:r}),Be(p,{style:[ye.label,{color:n.summaryRemovedText}],children:"gone"})]}),t>0&&bt(h,{style:[ye.badge,{backgroundColor:n.modifiedBackground}],children:[Be(p,{style:[ye.icon,{color:n.summaryModifiedText}],children:"\u2248"}),Be(p,{style:[ye.count,{color:n.summaryModifiedText}],children:t}),Be(p,{style:[ye.label,{color:n.summaryModifiedText}],children:"modified"})]})]}):null},"DiffSummary")),ye=re.create({container:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:12,paddingVertical:6,paddingHorizontal:12,borderTopWidth:1},badge:{flexDirection:"row",alignItems:"center",gap:3,paddingHorizontal:6,paddingVertical:2,borderRadius:10},icon:{fontSize:11,fontFamily:S,fontWeight:"700"},count:{fontSize:10,fontFamily:S,fontWeight:"600"},label:{fontSize:9,fontFamily:S,opacity:.9}});var hn={name:"Git Classic",description:"Traditional Git diff colors - simple and familiar",background:"#FFFFFF",panelBackground:"#F8F8F8",headerBackground:"#F0F0F0",addedBackground:"#E6FFED",removedBackground:"#FFEEF0",modifiedBackground:"#FFF5DD",unchangedBackground:"transparent",contextBackground:"#FAFAFA",addedText:"#22863A",removedText:"#CB2431",modifiedText:"#B08800",unchangedText:"#24292E",addedWordHighlight:"#ACF2BD",removedWordHighlight:"#FDB8C0",lineNumberBackground:"#F6F8FA",lineNumberText:"#959DA5",lineNumberBorder:"#E1E4E8",markerAddedBackground:"#CDFFD8",markerRemovedBackground:"#FFDCE0",markerModifiedBackground:"#FFF5B1",markerText:"#666666",borderColor:"#E1E4E8",dividerColor:"#E1E4E8",summaryBackground:"#F6F8FA",summaryAddedText:"#28A745",summaryRemovedText:"#D73A49",summaryModifiedText:"#0366D6",emptyStateText:"#586069",separatorBackground:"#F6F8FA",separatorText:"#586069"},nr={name:"Dev Tools Default",description:"The Buoy night theme",background:"#050505",panelBackground:"#0C0C0C",headerBackground:"#0C0C0C",addedBackground:"rgba(32, 201, 151, 0.12)",removedBackground:"rgba(239, 68, 68, 0.12)",modifiedBackground:"rgba(155, 112, 224, 0.12)",unchangedBackground:"transparent",contextBackground:"rgba(255, 255, 255, 0.02)",addedText:"#20C997",removedText:"#EF4444",modifiedText:"#9B70E0",unchangedText:"#ECEDEE",addedWordHighlight:"rgba(32, 201, 151, 0.3)",removedWordHighlight:"rgba(239, 68, 68, 0.3)",lineNumberBackground:"#050505",lineNumberText:"#9BA1A6",lineNumberBorder:"#1A1A1C",markerAddedBackground:"rgba(32, 201, 151, 0.2)",markerRemovedBackground:"rgba(239, 68, 68, 0.2)",markerModifiedBackground:"rgba(155, 112, 224, 0.2)",markerText:"#9BA1A6",borderColor:"#1A1A1C",dividerColor:"#1A1A1C",summaryBackground:"#0C0C0C",summaryAddedText:"#20C997",summaryRemovedText:"#EF4444",summaryModifiedText:"#9B70E0",emptyStateText:"#636366",separatorBackground:"#0C0C0C",separatorText:"#9BA1A6"},Io={gitClassic:hn,devToolsDefault:nr};import{Fragment as gn,jsx as G,jsxs as Fe}from"react/jsx-runtime";var Ao=Do(u(function({oldValue:e,newValue:r,theme:t=nr,options:n={},showThemeName:o=false,height:d=400}){let{hideLineNumbers:i=false,disableWordDiff:a=false,showDiffOnly:l=false,compareMethod:c="words",contextLines:s=3}=n,g={compareMethod:c,disableWordDiff:a,showDiffOnly:l,contextLines:s},y=un(()=>gt(e,r,g),[e,r,c,a,l,s]),f=un(()=>fn(t,d),[t,d]),k=u(m=>m.map((C,w)=>{let T="transparent";return C.type==="added"?T=t.addedWordHighlight:C.type==="removed"&&(T=t.removedWordHighlight),G(p,{style:[f.wordDiff,{backgroundColor:T}],children:C.value},w)}),"renderWordDiff"),D=u((m,C=false)=>{if(C)return{background:t.modifiedBackground,text:t.modifiedText,markerBg:t.markerModifiedBackground};switch(m){case"added":return{background:t.addedBackground,text:t.addedText,markerBg:t.markerAddedBackground};case"removed":return{background:t.removedBackground,text:t.removedText,markerBg:t.markerRemovedBackground};case"unchanged":return{background:t.unchangedBackground,text:t.unchangedText,markerBg:"transparent"};default:return{background:t.unchangedBackground,text:t.unchangedText,markerBg:"transparent"}}},"getDiffColors"),I=u((m,C,w,T,R=false)=>{if(R)return Fe(gn,{children:[!i&&G(h,{style:[f.gutter,f.emptyGutter],children:G(p,{style:f.lineNumber,children:" "})}),G(h,{style:[f.marker,f.emptyMarker],children:G(p,{style:f.markerText,children:" "})}),G(h,{style:[f.contentCell,f.emptyContent],children:G(p,{style:f.content,children:" "})})]});let W=D(w);return Fe(gn,{children:[!i&&G(h,{style:[f.gutter,{backgroundColor:t.lineNumberBackground}],children:G(p,{style:f.lineNumber,children:m||" "})}),G(h,{style:[f.marker,{backgroundColor:W.markerBg}],children:G(p,{style:[f.markerText,{color:t.markerText}],children:T})}),G(h,{style:[f.contentCell,{backgroundColor:W.background}],children:G(p,{style:[f.content,{color:W.text}],children:Array.isArray(C)?k(C):C||" "})})]})},"renderLineSide"),_=u((m,C)=>{if(!l||m===0)return false;let w=C[m-1],T=C[m],R=T.leftLineNumber&&w.leftLineNumber&&T.leftLineNumber-w.leftLineNumber>1,W=T.rightLineNumber&&w.rightLineNumber&&T.rightLineNumber-w.rightLineNumber>1;return R||W},"shouldShowSeparator"),M=u((m,C,w)=>{let T=m.type==="removed",R=m.type==="added",W=m.type==="modified",H=m.type==="unchanged";return Fe(So,{children:[_(C,w)&&G(h,{style:f.separator,children:G(p,{style:f.separatorText,children:"\u2022 \u2022 \u2022"})}),Fe(h,{style:f.row,children:[G(h,{style:f.leftSide,children:T||W||H?I(m.leftLineNumber,m.leftContent,W?"removed":m.type,T||W?"-":" "):I(void 0,void 0,"unchanged"," ",true)}),G(h,{style:f.centerDivider}),G(h,{style:f.rightSide,children:R||W||H?I(m.rightLineNumber,m.rightContent,W?"added":m.type,R||W?"+":" "):I(void 0,void 0,"unchanged"," ",true)})]})]},C)},"renderDiffRow"),x=y.filter(m=>m.type==="added").length,v=y.filter(m=>m.type==="removed").length,B=y.filter(m=>m.type==="modified").length;return Fe(h,{style:[f.container,t.glowColor&&{shadowColor:t.glowColor,shadowOffset:{width:0,height:0},shadowOpacity:t.neonIntensity&&t.neonIntensity>.7?.5:t.neonIntensity&&t.neonIntensity>.3?.3:.1,shadowRadius:t.neonIntensity&&t.neonIntensity>.7?10:t.neonIntensity&&t.neonIntensity>.3?5:2}],children:[o&&Fe(h,{style:f.themeBadge,children:[G(p,{style:f.themeName,children:t.name}),G(p,{style:f.themeDescription,children:t.description})]}),Fe(h,{style:f.header,children:[G(h,{style:f.headerLeft,children:G(p,{style:f.headerTitle,children:"PREV"})}),G(h,{style:f.divider}),G(h,{style:f.headerRight,children:G(p,{style:f.headerTitle,children:"CUR"})})]}),G(rr,{added:x,removed:v,modified:B,theme:t}),G(zt,{keyboardShouldPersistTaps:"handled",style:f.scrollView,showsVerticalScrollIndicator:false,contentContainerStyle:f.scrollContent,children:y.length===0?G(h,{style:f.emptyState,children:G(p,{style:f.emptyText,children:l?"No differences found":"No content to display"})}):y.map((m,C)=>M(m,C,y))})]})},"SplitDiffViewer"));function fn(e,r){return re.create({container:{height:r,backgroundColor:e.background,borderRadius:8,overflow:"hidden",borderWidth:1,borderColor:e.borderColor},themeBadge:{backgroundColor:e.panelBackground,paddingHorizontal:12,paddingVertical:8,borderBottomWidth:1,borderBottomColor:e.borderColor},themeName:{fontSize:12,fontWeight:"700",color:e.accentColor||e.unchangedText,fontFamily:S,letterSpacing:.5},themeDescription:{fontSize:10,color:e.unchangedText,fontFamily:S,marginTop:2,opacity:.8},header:{flexDirection:"row",backgroundColor:e.headerBackground,borderBottomWidth:1,borderBottomColor:e.borderColor},headerLeft:{flex:1,paddingVertical:8,paddingHorizontal:12},headerRight:{flex:1,paddingVertical:8,paddingHorizontal:12},headerTitle:{fontSize:10,fontWeight:"700",color:e.accentColor||e.unchangedText,fontFamily:S,letterSpacing:.5,textTransform:"uppercase"},divider:{width:1,backgroundColor:e.dividerColor},scrollView:{flex:1},scrollContent:{paddingBottom:10},row:{flexDirection:"row",minHeight:20},leftSide:{flex:1,flexDirection:"row"},rightSide:{flex:1,flexDirection:"row"},centerDivider:{width:1,backgroundColor:e.dividerColor},gutter:{width:35,paddingHorizontal:4,justifyContent:"center",alignItems:"flex-end",backgroundColor:e.lineNumberBackground,borderRightWidth:1,borderRightColor:e.lineNumberBorder},emptyGutter:{backgroundColor:e.contextBackground},lineNumber:{fontSize:9,fontFamily:S,color:e.lineNumberText},marker:{width:20,justifyContent:"center",alignItems:"center"},emptyMarker:{backgroundColor:e.contextBackground},markerText:{fontSize:10,fontFamily:S,fontWeight:"600"},contentCell:{flex:1,paddingHorizontal:8,paddingVertical:2},emptyContent:{backgroundColor:e.contextBackground},content:{fontSize:10,fontFamily:S,lineHeight:16},wordDiff:{fontSize:10,fontFamily:S},separator:{height:20,justifyContent:"center",alignItems:"center",backgroundColor:e.separatorBackground},separatorText:{fontSize:8,color:e.separatorText,fontFamily:S,letterSpacing:2},emptyState:{padding:40,alignItems:"center",justifyContent:"center"},emptyText:{fontSize:11,color:e.emptyStateText,fontStyle:"italic",fontFamily:S}})}u(fn,"createDynamicStyles");import{memo as Ro}from"react";import{jsx as or,jsxs as it}from"react/jsx-runtime";var pn=Ro(u(function({deltas:e,theme:r}){return e.length===0?null:or(h,{style:[Ne.container,{backgroundColor:r.summaryBackground,borderTopColor:r.borderColor}],children:e.map(t=>it(h,{style:Ne.row,children:[or(p,{style:[Ne.glyph,{color:r.summaryModifiedText}],children:"\u25F7"}),it(h,{style:Ne.text,children:[it(p,{style:Ne.headline,children:[t.path?it(p,{style:[Ne.path,{color:r.lineNumberText}],children:[t.path," "]}):null,or(p,{style:{color:r.summaryModifiedText},children:t.deltaLabel})]}),it(p,{style:[Ne.instants,{color:r.lineNumberText}],children:[t.fromLabel," \u2192 ",t.toLabel]})]})]},t.path??"__value__"))})},"TimestampDeltaBar")),Ne=re.create({container:{borderTopWidth:re.hairlineWidth,paddingHorizontal:10,paddingVertical:7,gap:6},row:{flexDirection:"row",alignItems:"flex-start",gap:7},glyph:{fontSize:12,lineHeight:15},text:{flex:1,minWidth:0},headline:{fontSize:12,fontWeight:"600",lineHeight:15},path:{fontWeight:"400"},instants:{fontSize:11,marginTop:1,fontVariant:["tabular-nums"]}});import{memo as Eo}from"react";import{jsx as mn,jsxs as Vo}from"react/jsx-runtime";var yn=Eo(u(function({visible:e,theme:r}){return e?Vo(h,{style:[ir.container,{backgroundColor:r.summaryBackground,borderTopColor:r.borderColor}],children:[mn(p,{style:[ir.glyph,{color:r.lineNumberText}],children:"{ }"}),mn(p,{style:[ir.text,{color:r.lineNumberText}],children:"Stored as a JSON string \u2014 decoded below so the change is readable."})]}):null},"JsonStringNotice")),ir=re.create({container:{flexDirection:"row",alignItems:"center",gap:7,borderTopWidth:re.hairlineWidth,paddingHorizontal:10,paddingVertical:6},glyph:{fontSize:11,fontWeight:"700"},text:{flex:1,fontSize:11,lineHeight:14}});function xt(e){if(typeof e!="string")return null;let r=e.trim();if(!r.startsWith("{")&&!r.startsWith("["))return null;try{let t=JSON.parse(r);return typeof t!="object"||t===null?null:{value:t}}catch{return null}}u(xt,"parseJsonContainer");function ar(e){return He(e)||e===void 0||e===null}u(ar,"isMissing");function lr(e,r){let t=xt(e),n=xt(r);return t&&n?{left:t.value,right:n.value,decoded:true}:t&&ar(r)?{left:t.value,right:r,decoded:true}:n&&ar(e)?{left:e,right:n.value,decoded:true}:{left:e,right:r,decoded:false}}u(lr,"decodeJsonStringPair");var Fo=/^\d{4}-\d{2}-\d{2}(?:[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d{1,9})?)?(?:Z|[+-]\d{2}:?\d{2})?)?$/;function dr(e){return Number.isInteger(e)?e>=1e12&&e<41024448e5?{kind:"epoch-ms",epochMs:e}:e>=1e9&&e<4102444800?{kind:"epoch-s",epochMs:e*1e3}:null:null}u(dr,"fromNumber");function vt(e){if(e instanceof Date){let n=e.getTime();return Number.isFinite(n)?{kind:"iso",epochMs:n}:null}if(typeof e=="number")return dr(e);if(typeof e!="string")return null;let r=e.trim();if(r==="")return null;if(/^\d+$/.test(r))return dr(Number(r));if(!Fo.test(r))return null;let t=Date.parse(r);return Number.isFinite(t)?{kind:"iso",epochMs:t}:null}u(vt,"detectTimestamp");function Ge(e){return e<10?`0${e}`:String(e)}u(Ge,"two");function Ct(e){let r=new Date(e);return`${r.getFullYear()}-${Ge(r.getMonth()+1)}-${Ge(r.getDate())} ${Ge(r.getHours())}:${Ge(r.getMinutes())}:${Ge(r.getSeconds())}`}u(Ct,"formatInstant");function sr(e){let r=Math.abs(e);if(r<1e3)return`${r}ms`;let t=Math.floor(r/1e3);if(t<60)return`${t}s`;let n=Math.floor(t/60),o=t%60;if(n<60)return o?`${n}m ${o}s`:`${n}m`;let d=Math.floor(n/60),i=n%60;if(d<24)return i?`${d}h ${i}m`:`${d}h`;let a=Math.floor(d/24),l=d%24;return l?`${a}d ${l}h`:`${a}d`}u(sr,"formatDuration");function cr(e,r,t){let n=vt(e),o=vt(r);if(!n||!o||n.kind!==o.kind)return null;let d=o.epochMs-n.epochMs;return{path:t,kind:n.kind,deltaMs:d,deltaLabel:d===0?"same instant":`${sr(d)} ${d<0?"earlier":"later"}`,fromLabel:Ct(n.epochMs),toLabel:Ct(o.epochMs)}}u(cr,"pair");function ur(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&!(e instanceof Date)}u(ur,"isPlainObject");var No=6;function hr(e,r){let t=cr(e,r);if(t)return[t];if(!ur(e)||!ur(r))return[];let n=[];for(let o of Object.keys(e)){if(n.length>=No)break;if(!(o in r)||Object.is(e[o],r[o]))continue;let d=cr(e[o],r[o],o);d&&n.push(d)}return n}u(hr,"describeTimestampDeltas");import{Fragment as wt,memo as bn,useCallback as kt,useEffect as Wo,useMemo as We,useRef as zo,useState as Lo}from"react";import{jsx as N,jsxs as ze}from"react/jsx-runtime";var jo={hideLineNumbers:false,disableWordDiff:false,showDiffOnly:false,compareMethod:"words",contextLines:3,lineOffset:0};function xn({oldValue:e,newValue:r,theme:t,options:n=jo,showThemeName:o=false,scrollEnabled:d=true}){let i=We(()=>kn(t,d),[t,d]),a=We(()=>({compareMethod:n.compareMethod,disableWordDiff:n.disableWordDiff,showDiffOnly:n.showDiffOnly,contextLines:n.contextLines}),[n.compareMethod,n.disableWordDiff,n.showDiffOnly,n.contextLines]),l=We(()=>lr(e,r),[e,r]),c=We(()=>gt(l.left,l.right,a),[l,a]),s=We(()=>{let v=0,B=0,m=0;for(let C of c)C.type==="added"?v++:C.type==="removed"?B++:C.type==="modified"&&m++;return{added:v,removed:B,modified:m}},[c]),g=We(()=>hr(l.left,l.right),[l]),[y,f]=Lo(()=>new Set),k=zo(false);Wo(()=>{if(!k.current){k.current=true;return}f(new Set)},[e,r]);let D=We(()=>Cn(c,y),[c,y]),I=kt(v=>{f(B=>{let m=new Set(B);return m.has(v)?m.delete(v):m.add(v),m})},[]),_=kt(v=>v.kind==="row"?`r:${v.diffIndex}`:`f:${v.foldId}`,[]),M=kt(v=>v.kind==="fold"?N(Oo,{foldId:v.foldId,count:v.count,expanded:v.expanded,theme:t,styles:i,onToggle:I}):N(Ho,{diff:v.diff,showSeparator:false,theme:t,options:n,styles:i}),[t,n,i,I]),x=kt(({item:v})=>M(v),[M]);return ze(h,{style:[i.container,t.glowColor&&{shadowColor:t.glowColor,shadowOffset:{width:0,height:0},shadowOpacity:t.neonIntensity&&t.neonIntensity>.7?.5:t.neonIntensity&&t.neonIntensity>.3?.3:.1,shadowRadius:t.neonIntensity&&t.neonIntensity>.7?10:t.neonIntensity&&t.neonIntensity>.3?5:2}],children:[o&&ze(h,{style:i.themeBadge,children:[N(p,{style:i.themeName,children:t.name}),N(p,{style:i.themeDescription,children:t.description})]}),ze(h,{style:i.header,children:[N(h,{style:i.headerLeft,children:N(p,{style:i.headerTitle,children:"PREV"})}),N(h,{style:i.divider}),N(h,{style:i.headerRight,children:N(p,{style:i.headerTitle,children:"CUR"})})]}),N(rr,{added:s.added,removed:s.removed,modified:s.modified,theme:t}),N(yn,{visible:l.decoded,theme:t}),N(pn,{deltas:g,theme:t}),c.length===0?N(h,{style:i.emptyState,children:N(p,{style:i.emptyText,children:n.showDiffOnly?"No differences found":"No content to display"})}):d?N(Nt,{keyboardShouldPersistTaps:"handled",style:i.scrollView,contentContainerStyle:i.scrollContent,data:D,renderItem:x,keyExtractor:_,showsVerticalScrollIndicator:false,initialNumToRender:20,maxToRenderPerBatch:20,windowSize:7,removeClippedSubviews:true}):N(h,{style:i.scrollContent,children:D.map(v=>N(wt,{children:M(v)},_(v)))})]})}u(xn,"ThemedSplitView");var vn=3,Mo=4;function Cn(e,r){let t=e.length;if(t===0)return[];let n=new Array(t).fill(false);for(let a=0;a<t;a++)if(e[a].type!=="unchanged"){let l=Math.max(0,a-vn),c=Math.min(t-1,a+vn);for(let s=l;s<=c;s++)n[s]=true}let o=[],d=0,i=0;for(;i<t;){if(n[i]){o.push({kind:"row",diff:e[i],diffIndex:i}),i++;continue}let a=i;for(;a<t&&!n[a];)a++;let l=a-i;if(l<Mo)for(let c=i;c<a;c++)o.push({kind:"row",diff:e[c],diffIndex:c});else{let c=d++,s=r.has(c);if(o.push({kind:"fold",foldId:c,count:l,expanded:s}),s)for(let g=i;g<a;g++)o.push({kind:"row",diff:e[g],diffIndex:g})}i=a}return o}u(Cn,"buildSplitItems");var Oo=bn(u(function({foldId:e,count:r,expanded:t,theme:n,styles:o,onToggle:d}){return N(K,{style:[o.foldHeader,{backgroundColor:n.separatorBackground}],onPress:()=>d(e),activeOpacity:.7,children:N(p,{style:[o.foldHeaderText,{color:n.separatorText}],children:t?`\u25BC ${r} unchanged line${r===1?"":"s"} \u2014 tap to hide`:`\u25B6 ${r} unchanged line${r===1?"":"s"} \u2014 tap to expand`})})},"FoldHeader")),Ho=bn(u(function({diff:e,showSeparator:r,theme:t,options:n,styles:o}){let d=e.type==="removed",i=e.type==="added",a=e.type==="modified",l=e.type==="unchanged";return ze(wt,{children:[r&&N(h,{style:o.separator,children:N(p,{style:o.separatorText,children:"\u2022 \u2022 \u2022"})}),ze(h,{style:o.row,children:[N(h,{style:o.leftSide,children:d||a||l?N(gr,{lineNumber:e.leftLineNumber,content:e.leftContent,type:a?"removed":e.type,marker:d||a?"-":" ",theme:t,options:n,styles:o}):N(fr,{options:n,styles:o})}),N(h,{style:o.centerDivider}),N(h,{style:o.rightSide,children:i||a||l?N(gr,{lineNumber:e.rightLineNumber,content:e.rightContent,type:a?"added":e.type,marker:i||a?"+":" ",theme:t,options:n,styles:o}):N(fr,{options:n,styles:o})})]})]})},"DiffRow"));function gr({lineNumber:e,content:r,type:t,marker:n,theme:o,options:d,styles:i}){let a=wn(t,o);return ze(wt,{children:[!d.hideLineNumbers&&N(h,{style:[i.gutter,{backgroundColor:o.lineNumberBackground}],children:N(p,{style:i.lineNumber,children:e||" "})}),N(h,{style:[i.marker,{backgroundColor:a.markerBg}],children:N(p,{style:[i.markerText,{color:o.markerText}],children:n})}),N(h,{style:[i.contentCell,{backgroundColor:a.background}],children:N(p,{style:[i.content,{color:a.text}],children:Array.isArray(r)?r.map((l,c)=>{let s="transparent";return l.type==="added"?s=o.addedWordHighlight:l.type==="removed"&&(s=o.removedWordHighlight),N(p,{style:[i.wordDiff,{backgroundColor:s}],children:l.value},c)}):r||" "})})]})}u(gr,"LineSide");function fr({options:e,styles:r}){return ze(wt,{children:[!e.hideLineNumbers&&N(h,{style:[r.gutter,r.emptyGutter],children:N(p,{style:r.lineNumber,children:" "})}),N(h,{style:[r.marker,r.emptyMarker],children:N(p,{style:r.markerText,children:" "})}),N(h,{style:[r.contentCell,r.emptyContent],children:N(p,{style:r.content,children:" "})})]})}u(fr,"EmptyLineSide");function wn(e,r){switch(e){case"added":return{background:r.addedBackground,text:r.addedText,markerBg:r.markerAddedBackground};case"removed":return{background:r.removedBackground,text:r.removedText,markerBg:r.markerRemovedBackground};case"unchanged":default:return{background:r.unchangedBackground,text:r.unchangedText,markerBg:"transparent"}}}u(wn,"getDiffColors");function kn(e,r){return re.create({container:{...r?{height:400}:null,backgroundColor:e.background,borderRadius:8,overflow:"hidden",borderWidth:1,borderColor:e.borderColor},themeBadge:{backgroundColor:e.panelBackground,paddingHorizontal:12,paddingVertical:8,borderBottomWidth:1,borderBottomColor:e.borderColor},themeName:{fontSize:12,fontWeight:"700",color:e.accentColor||e.unchangedText,fontFamily:S,letterSpacing:.5},themeDescription:{fontSize:10,color:e.unchangedText,fontFamily:S,marginTop:2,opacity:.8},header:{flexDirection:"row",backgroundColor:e.headerBackground,borderBottomWidth:1,borderBottomColor:e.borderColor},headerLeft:{flex:1,paddingVertical:8,paddingHorizontal:12},headerRight:{flex:1,paddingVertical:8,paddingHorizontal:12},headerTitle:{fontSize:10,fontWeight:"700",color:e.accentColor||e.unchangedText,fontFamily:S,letterSpacing:.5,textTransform:"uppercase"},divider:{width:1,backgroundColor:e.dividerColor},scrollView:{flex:1},scrollContent:{paddingBottom:10},row:{flexDirection:"row",minHeight:20},leftSide:{flex:1,flexDirection:"row"},rightSide:{flex:1,flexDirection:"row"},centerDivider:{width:1,backgroundColor:e.dividerColor},gutter:{width:35,paddingHorizontal:4,justifyContent:"center",alignItems:"flex-end",backgroundColor:e.lineNumberBackground,borderRightWidth:1,borderRightColor:e.lineNumberBorder},emptyGutter:{backgroundColor:e.contextBackground},lineNumber:{fontSize:9,fontFamily:S,color:e.lineNumberText},marker:{width:20,justifyContent:"center",alignItems:"center"},emptyMarker:{backgroundColor:e.contextBackground},markerText:{fontSize:10,fontFamily:S,fontWeight:"600"},contentCell:{flex:1,paddingHorizontal:8,paddingVertical:2},emptyContent:{backgroundColor:e.contextBackground},content:{fontSize:10,fontFamily:S,lineHeight:16},wordDiff:{fontSize:10,fontFamily:S},summaryBar:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:16,paddingVertical:6,backgroundColor:e.summaryBackground,borderTopWidth:1,borderTopColor:e.borderColor},summaryItem:{flexDirection:"row",alignItems:"center"},summaryText:{fontSize:10,fontFamily:S,fontWeight:"700"},separator:{height:20,justifyContent:"center",alignItems:"center",backgroundColor:e.separatorBackground},separatorText:{fontSize:8,color:e.separatorText,fontFamily:S,letterSpacing:2},foldHeader:{paddingVertical:6,paddingHorizontal:12,alignItems:"center",justifyContent:"center",borderTopWidth:1,borderBottomWidth:1,borderColor:e.borderColor},foldHeaderText:{fontSize:10,fontFamily:S,letterSpacing:.5},emptyState:{padding:40,alignItems:"center",justifyContent:"center"},emptyText:{fontSize:11,color:e.emptyStateText,fontStyle:"italic",fontFamily:S}})}u(kn,"createDynamicStyles");import{useCallback as Je,useState as Ue}from"react";function pr(e,r){let[t,n]=Ue(void 0),[o,d]=Ue(false),[i,a]=Ue(false),[l,c]=Ue(null),[s,g]=Ue(),[y,f]=Ue(""),k=o&&t!==void 0?t:e,D=o&&JSON.stringify(t)!==y,I=Je(()=>{n(e),f(JSON.stringify(e)),g(void 0),c(null),d(true)},[e]),_=Je(m=>{n(w=>Xt(w,m));let C=_t(m);C!==void 0&&g(C)},[]),M=Je(m=>{g(m)},[]),x=Je(()=>{d(false),n(void 0),g(void 0),c(null)},[]),v=Je(()=>{n(e),f(JSON.stringify(e)),g(void 0),c(null),d(true)},[e]),B=Je(async()=>{if(!D||!r)return x(),true;a(true),c(null);try{return await r(t),x(),true}catch(m){return c(m instanceof Error?m.message:String(m)),false}finally{a(false)}},[t,D,x,r]);return{isEditing:o,value:k,isDirty:D,isSaving:i,error:l,selectPath:s,begin:I,apply:_,selectAt:M,commit:B,discard:v}}u(pr,"useTreeDraft");import{useCallback as Tt,useEffect as Po,useState as Tn}from"react";function Sn({value:e,save:r,onClose:t,confirmDiscard:n}){let o=pr(e,r),[d,i]=Tn(null),[a,l]=Tn(null),{begin:c}=o;Po(()=>{c()},[]);let s=Tt(k=>{let D=ft(o.value,k);if(typeof D=="boolean"){o.apply({kind:"replace",path:k,value:!D});return}l(k)},[o]),g=Tt(k=>{o.apply({kind:"replace",path:a??[],value:k}),l(null)},[o,a]),y=Tt(()=>{o.commit().then(k=>k&&t())},[o,t]),f=Tt(()=>{if(!o.isDirty){t();return}n({save:y,discard:u(()=>{o.discard(),t()},"discard")})},[n,o,t,y]);return{draft:o,selection:d,setSelection:i,valuePath:a,openValueEditor:s,closeValueEditor:u(()=>l(null),"closeValueEditor"),applyValue:g,openRawEditor:u(()=>l([]),"openRawEditor"),requestClose:f,saveAndClose:y}}u(Sn,"useTreeEditor");import{useState as $o}from"react";import{jsx as de,jsxs as St}from"react/jsx-runtime";function Dn(e){return typeof e=="boolean"?"boolean":typeof e=="number"?"number":e!==null&&typeof e=="object"?"raw":"text"}u(Dn,"modeFor");function Bn(e,r){return r==="raw"?JSON.stringify(e,null,2):e==null?"":String(e)}u(Bn,"initialText");function In(e,r){switch(e){case"number":return"Numeric only \u2014 anything else is refused, so this stays a number.";case"raw":return`Raw JSON. Must stay ${r==="array"?"an array":"an object"} \u2014 a different shape is refused.`;default:return"Saves as a string. The type never changes here."}}u(In,"hintFor");function An({path:e,value:r,onSave:t,onCancel:n,saveLabel:o="Save",busy:d=false,testIDPrefix:i="buoy-data-value"}){let a=Dn(r),l=Ee(r),[c,s]=$o(()=>Bn(r,a)),g=mr(c,a,l),y=d||g!=null,f=u(()=>{d||mr(c,a,l)!=null||t(En(c,a,r))},"commit");return St(h,{style:q.overlay,children:[de(K,{style:q.scrim,activeOpacity:1,onPress:d?void 0:n,testID:`${i}-scrim`,accessibilityRole:"button",accessibilityLabel:"Dismiss editor"}),de(h,{style:q.panel,pointerEvents:"box-none",children:St(h,{style:q.card,children:[St(h,{style:q.headerRow,children:[de(p,{style:q.title,children:"Edit value"}),de(h,{style:q.typeBadge,children:de(p,{style:q.typeBadgeText,children:l})})]}),de(p,{style:q.path,numberOfLines:1,children:nt(e)}),a==="boolean"?de(Rn,{current:r===true,onPick:t,testIDPrefix:i}):de(zt,{style:q.fieldScroll,keyboardShouldPersistTaps:"handled",children:de(Wt,{testID:`${i}-input`,accessibilityLabel:"Value",value:c,onChangeText:s,autoFocus:true,autoCapitalize:"none",autoCorrect:false,spellCheck:false,editable:!d,multiline:a!=="number",keyboardType:a==="number"?"numeric":a==="raw"?"ascii-capable":"default",onSubmitEditing:a==="number"?f:void 0,placeholder:a==="raw"?"{ }":"value",placeholderTextColor:b.color.placeholder,style:[q.input,a==="raw"&&q.inputRaw,a!=="number"&&q.inputMultiline,g!=null&&q.inputInvalid]})}),de(p,{style:g!=null?q.error:q.hint,children:g??In(a,l)}),St(h,{style:q.actions,children:[de(K,{onPress:n,disabled:d,testID:`${i}-cancel`,accessibilityRole:"button",accessibilityLabel:"Cancel edit",style:q.cancelButton,children:de(p,{style:q.cancelText,children:"Cancel"})}),a==="boolean"?null:de(K,{onPress:f,disabled:y,testID:`${i}-save`,accessibilityRole:"button",accessibilityLabel:o,style:[q.saveButton,y&&q.saveDisabled],children:de(p,{style:q.saveText,children:d?"Saving\u2026":o})})]})]})})]})}u(An,"ValueEditModal");function Rn({current:e,onPick:r,testIDPrefix:t}){return de(h,{style:q.boolRow,children:[true,false].map(n=>de(K,{onPress:()=>r(n),testID:`${t}-${n}`,accessibilityRole:"button",accessibilityLabel:`Set ${n}`,style:[q.boolButton,e===n&&q.boolActive],children:de(p,{style:[q.boolText,e===n&&q.boolTextActive],children:String(n)})},String(n)))})}u(Rn,"BooleanChoice");function mr(e,r,t){if(r==="number")return e.trim()===""?"Enter a number.":Number.isNaN(Number(e))?`"${e}" isn't a number.`:null;if(r==="raw"){let n;try{n=JSON.parse(e)}catch(o){return o instanceof Error?o.message:"Invalid JSON."}return Ee(n)!==t?`Must stay ${t} \u2014 that parses as ${Ee(n)}.`:null}return null}u(mr,"validate");function En(e,r,t){return r==="number"?Number(e):r==="raw"?JSON.parse(e):t===null&&e===""?null:e}u(En,"parse");var q=re.create({overlay:{...wr,zIndex:20},scrim:{...wr,backgroundColor:"rgba(0,0,0,0.55)"},panel:{padding:12},card:{backgroundColor:b.color.surface,borderRadius:14,borderWidth:1,borderColor:b.color.border,padding:14,gap:8},headerRow:{flexDirection:"row",alignItems:"center",gap:8},title:{flex:1,color:b.color.text,fontSize:14,fontWeight:"700"},typeBadge:{paddingHorizontal:8,paddingVertical:2,borderRadius:6,backgroundColor:b.color.surfaceElevated},typeBadgeText:{color:A.semantic.warning,fontSize:10,fontWeight:"700",fontFamily:S},path:{color:b.color.textTertiary,fontSize:11,fontFamily:S},fieldScroll:{maxHeight:240},input:{color:b.color.text,backgroundColor:b.color.surfaceElevated,borderWidth:1,borderColor:b.color.border,borderRadius:10,paddingHorizontal:12,paddingVertical:10,fontSize:14,fontFamily:S},inputMultiline:{minHeight:110,lineHeight:20,textAlignVertical:"top"},inputRaw:{minHeight:180,fontSize:12,lineHeight:18},inputInvalid:{borderColor:b.color.danger},hint:{color:b.color.textTertiary,fontSize:11,lineHeight:16},error:{color:b.color.danger,fontSize:11,lineHeight:16,fontFamily:S},actions:{flexDirection:"row",gap:8,paddingTop:2},cancelButton:{flex:1,minHeight:44,alignItems:"center",justifyContent:"center",borderRadius:10,borderWidth:1,borderColor:b.color.border},cancelText:{color:b.color.textSecondary,fontSize:14,fontWeight:"600"},saveButton:{flex:1.4,minHeight:44,alignItems:"center",justifyContent:"center",borderRadius:10,backgroundColor:b.color.accent},saveDisabled:{opacity:.35},saveText:{color:b.color.onAccent,fontSize:15,fontWeight:"700"},boolRow:{flexDirection:"row",gap:10},boolButton:{flex:1,minHeight:64,alignItems:"center",justifyContent:"center",borderRadius:12,borderWidth:1,borderColor:b.color.border,backgroundColor:b.color.surfaceElevated},boolActive:{borderColor:A.semantic.warning,backgroundColor:A.semantic.warning+"18"},boolText:{color:b.color.textTertiary,fontSize:16,fontWeight:"700",fontFamily:S},boolTextActive:{color:A.semantic.warning}});import{useState as Dt,useMemo as Bt,useCallback as Le,useRef as qe,useEffect as Vn,memo as It}from"react";var Ke=u((e,r,t)=>{if(r.length===0)return t;if(e instanceof Map){let n=new Map(e);if(r.length===1)return n.set(r[0],t),n;let[o,...d]=r,i=n.get(o);return n.set(o,Ke(i??null,d,t)),n}if(e instanceof Set){let n=Ke(Array.from(e),r,t);return new Set(Array.isArray(n)?n:[])}if(Array.isArray(e)){let n=[...e];if(r.length===1)return n[r[0]]=t,n;let[o,...d]=r;return n[o]=Ke(n[o],d,t),n}if(e instanceof Object){let n={...e};if(r.length===1)return n[r[0]]=t,n;let[o,...d]=r;return n[o]=Ke(n[o],d,t),n}return e},"updateNestedDataByPath"),Ye=u((e,r)=>{if(e instanceof Map){let t=new Map(e);if(r.length===1)return t.delete(r[0]),t;let[n,...o]=r;return t.set(n,Ye(t.get(n),o)),t}if(e instanceof Set){let t=Ye(Array.from(e),r);return new Set(t)}if(Array.isArray(e)){let t=[...e];if(r.length===1)return t.filter((d,i)=>i.toString()!==r[0]);let[n,...o]=r;return t[n]=Ye(t[n],o),t}if(e instanceof Object){let t={...e};if(r.length===1)return delete t[r[0]],t;let[n,...o]=r;return t[n]=Ye(t[n],o),t}return e},"deleteNestedDataByPath");var Fn=100;function Nn(e){return e==null||typeof e!="object"?[]:Array.isArray(e)?e.map((r,t)=>({label:t.toString(),value:r})):e instanceof Map?Array.from(e.entries()).map(([r,t])=>({label:String(r),value:t})):e instanceof Set?Array.from(e).map((r,t)=>({label:t.toString(),value:r})):Object.entries(e).map(([r,t])=>({label:r,value:t}))}u(Nn,"getLiveSubEntries");function Wn(e,r,t=Fn){let n=e*t,o=Math.min(r,n+t)-1;return`[${n}...${o}]`}u(Wn,"livePageRange");import{Fragment as At,jsx as z,jsxs as be}from"react/jsx-runtime";var yr=Fn,_e={top:8,bottom:8,left:8,right:8},zn=12,Go=["DATA","STATE","VALUE","QUERY","QUERYKEY","TYPES","STATS","OPTIONS","OBSERVERS"],Jo=u(e=>e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,""),"slugPart");function Ln(e){return e.length===0?"buoy-live-explorer-root":`buoy-live-explorer-${e.map(Jo).filter(Boolean).join("-")}`}u(Ln,"defaultTestIDForPath");var Uo=u((e,r=yr)=>{if(r<1||e.length===0)return[];let t=[];for(let n=0;n<e.length;n+=r)t.push(e.slice(n,n+r));return t},"chunkArray"),br=It(({expanded:e,isFocused:r=false,isMain:t=false})=>z(h,{style:[E.expanderIcon,t&&E.expanderIconMain,e?E.expanded:E.collapsed],children:e?z(at,{size:t?14:zn,color:r?b.color.accent:t?b.color.text:b.color.textSecondary,strokeWidth:2.5}):z(Tr,{size:t?14:zn,color:r?b.color.accent:t?b.color.text:b.color.textSecondary,strokeWidth:2.5})}));br.displayName="Expander";var jn=It(({value:e,isFocused:r=false})=>z(vr,{value:e,isFocused:r,buttonStyle:r?{...E.buttonStyle,...E.buttonStyleFocused}:E.buttonStyle}));jn.displayName="CopyButton";var xr=It(({dataPath:e,writer:r,testID:t,isFocused:n=false})=>{let o=Le(()=>{r?.remove?.(e)},[r,e]);return r?.remove?z(K,{"sentry-label":"ignore devtools explorer delete button",testID:`${t}-delete`,accessibilityRole:"button",onPress:o,style:[E.deleteButton,n&&E.deleteButtonFocused],accessibilityLabel:"Delete item",hitSlop:_e,activeOpacity:.7,children:z(Vt,{size:14,strokeWidth:2,color:n?b.color.danger:b.color.danger+"CC"})}):null});xr.displayName="DeleteItemButton";var Mn=It(({dataPath:e,writer:r,testID:t,isFocused:n=false})=>{let o=Le(()=>{r?.update(e,[])},[r,e]);return r?z(K,{"sentry-label":"ignore devtools explorer clear button",testID:`${t}-clear`,style:[E.clearButton,n&&E.clearButtonFocused],accessibilityRole:"button",accessibilityLabel:"Remove all items","aria-label":"Remove all items",onPress:o,hitSlop:_e,activeOpacity:.7,children:z(p,{style:[E.clearButtonText,{color:n?b.color.warning:b.color.warning+"CC"}],children:"[]"})}):null});Mn.displayName="ClearArrayButton";function On({dataPath:e,writer:r,testID:t,value:n,removable:o}){let d=Le(()=>{if(!r)return;let c=typeof n=="boolean"?n:false;r.update(e,!c)},[r,e,n]),i=Le(()=>{r?.remove?.(e)},[r,e]);if(!r)return null;let a=n?E.toggleBadgeTrue:E.toggleBadgeFalse,l=n?E.toggleTextTrue:E.toggleTextFalse;return be(h,{style:E.toggleRow,children:[z(K,{"sentry-label":"ignore devtools explorer toggle button",testID:`${t}-toggle`,accessibilityRole:"button",accessibilityLabel:`${e[e.length-1]??"value"}, ${n?"true":"false"}`,style:E.modernToggleButton,onPress:d,hitSlop:_e,activeOpacity:.8,children:z(h,{style:[E.toggleBadge,a],children:z(p,{style:[E.toggleBadgeText,l],children:n?"TRUE":"FALSE"})})}),o&&r.remove?z(K,{"sentry-label":"ignore devtools explorer delete button in toggle",testID:`${t}-delete`,accessibilityRole:"button",onPress:i,style:E.deleteButtonInToggle,accessibilityLabel:"Delete item",hitSlop:_e,activeOpacity:.7,children:z(Vt,{size:14,strokeWidth:2,color:b.color.danger+"CC"})}):null]})}u(On,"ToggleValueButton");function Rt({editable:e,label:r,value:t,defaultExpanded:n,writer:o,dataPath:d,itemsDeletable:i,dataVersion:a=0,testIDForPath:l=Ln,debounceMs:c=0}){let[s,g]=Dt(false),[y,f]=Dt("");Vn(()=>{if(t!=null&&(typeof t=="string"||typeof t=="number")){let Q=t.toString();f(Q)}},[t,r,a]);let k=Bt(()=>Go.includes(r.toUpperCase()),[r]),[D,I]=Dt((n||[]).includes(r)),_=u(()=>I(Q=>!Q),"toggleExpanded"),[M,x]=Dt([]),v=Bt(()=>Nn(t),[t]),B=Bt(()=>Array.isArray(t)?"array":t===null||typeof t!="object"?typeof t:t instanceof Map||t instanceof Set?"Iterable":"object",[t]),m=Bt(()=>Uo(v,yr),[v]),C=d??[],w=l(C),T=e===true&&i===true&&o?.remove!=null&&(o.canRemove?.(C)??true),R=qe(o),W=qe(C),H=qe(B);R.current=o,W.current=C,H.current=B;let ue=qe(null),oe=qe(null),ie=Le(()=>{oe.current&&(clearTimeout(oe.current),oe.current=null);let Q=ue.current;ue.current=null,Q&&R.current?.update(Q.path,Q.value)},[]);Vn(()=>()=>ie(),[ie]);let te=qe(c);te.current=c;let he=Le((Q,Z)=>{if(f(Z),!R.current||Q&&isNaN(Number(Z)))return;let se=H.current==="number"?Number(Z):Z,P=te.current;P>0?(ue.current={path:W.current,value:se},oe.current&&clearTimeout(oe.current),oe.current=setTimeout(ie,P)):R.current.update(W.current,se)},[ie,f]),le=Le(Q=>{let Z=(Number(y)||0)+Q;f(String(Z)),ue.current=null,oe.current&&(clearTimeout(oe.current),oe.current=null),R.current?.update(W.current,Z)},[y]);return z(h,{style:E.minWidthWrapper,children:be(h,{style:E.fullWidthMarginRight,children:[m.length>0&&be(At,{children:[be(h,{style:[E.flexRowItemsCenterGap,k&&E.flexRowItemsCenterGapMain],children:[be(K,{"sentry-label":"ignore devtools explorer expander button",style:E.expanderButton,testID:w,accessibilityRole:"button",accessibilityLabel:`${r}, ${v.length} ${v.length===1?"item":"items"}`,accessibilityState:{expanded:D},onPress:_,hitSlop:_e,activeOpacity:.6,children:[z(br,{expanded:D,isFocused:s,isMain:k}),z(p,{style:[E.labelText,s&&E.labelTextFocused,k&&E.labelTextMain],children:r}),z(p,{style:E.textGray500,children:`${String(B).toLowerCase()==="iterable"?"(Iterable) ":""}${v.length} ${v.length>1?"items":"item"}`})]}),e&&be(h,{style:E.flexRowGapItemsCenter,children:[z(jn,{value:t,isFocused:s}),T&&z(xr,{writer:o,dataPath:C,testID:w,isFocused:s}),B==="array"&&o!==void 0&&z(Mn,{writer:o,dataPath:C,testID:w,isFocused:s})]})]}),D&&be(At,{children:[m.length===1&&z(h,{style:[E.singleEntryContainer,k&&E.singleEntryContainerMain],children:v.map((Q,Z)=>z(Rt,{defaultExpanded:n,label:Q.label,value:Q.value,editable:e,dataPath:[...C,Q.label],writer:o,itemsDeletable:B==="array"||B==="Iterable"||B==="object",dataVersion:a,testIDForPath:l,debounceMs:c},Q.label+Z))}),m.length>1&&z(h,{style:E.multiEntryContainer,children:m.map((Q,Z)=>z(h,{children:be(h,{style:E.relativeOutlineNone,children:[be(K,{"sentry-label":"ignore devtools explorer page toggle",onPress:()=>x(se=>se.includes(Z)?se.filter(P=>P!==Z):[...se,Z]),style:E.pageExpanderButton,hitSlop:_e,children:[z(br,{expanded:M.includes(Z)}),z(p,{style:E.pageRangeText,children:Wn(Z,v.length,yr)})]}),M.includes(Z)&&z(h,{style:E.entriesContainer,children:Q.map(se=>z(Rt,{defaultExpanded:n,label:se.label,value:se.value,editable:e,dataPath:[...C,se.label],writer:o,dataVersion:a,testIDForPath:l,debounceMs:c},se.label))})]})},Z))})]})]}),m.length===0&&be(h,{style:E.flexRowGapFullWidth,children:[e&&o!==void 0&&(B==="string"||B==="number"||B==="boolean")?be(At,{children:[e&&o&&(B==="string"||B==="number")&&z(h,{style:E.nebulaInputWrapper,children:z(Gt,{label:r,testID:`${w}-input`,accessibilityLabel:`${r}, editable value`,style:[B==="number"?E.textNumber:E.textString],keyboardType:B==="number"?"numeric":"default",value:y,onChangeText:Q=>he(B==="number",Q),onFocus:()=>g(true),onBlur:()=>{ie(),g(false)},showNumberControls:B==="number",onIncrement:()=>le(1),onDecrement:()=>le(-1),showDeleteButton:T,onDelete:()=>{o?.remove?.(C)}})}),B==="boolean"&&be(h,{style:E.booleanRowContainer,children:[z(p,{style:E.booleanLabel,children:r}),z(h,{style:E.booleanToggleWrapper,children:z(On,{writer:o,dataPath:C,testID:w,value:t,removable:T})})]})]}):be(At,{children:[z(p,{style:E.text344054,children:r}),z(p,{testID:`${w}-value`,style:E.displayValueText,children:Cr(t)})]}),e&&T&&B!=="string"&&B!=="number"&&B!=="boolean"&&z(xr,{writer:o,dataPath:C,testID:w,isFocused:s})]})]})})}u(Rt,"LiveExplorer");function Hn(e){return{update:u((r,t)=>{e.setRoot(Ke(e.getRoot(),r,t))},"update"),remove:u(r=>{e.setRoot(Ye(e.getRoot(),r))},"remove"),canRemove:e.canRemove}}u(Hn,"makeRootWriter");var E=re.create({buttonStyle:{backgroundColor:b.color.surface+"E6",borderWidth:1,borderColor:b.color.textSecondary+"33",borderRadius:6,flexDirection:"row",alignItems:"center",justifyContent:"center",width:28,height:28,position:"relative",shadowColor:"#000",shadowOffset:{width:0,height:1},shadowOpacity:.2,shadowRadius:2},buttonStyleFocused:{borderColor:b.color.accent+"CC",backgroundColor:b.color.accent+"26",shadowColor:b.color.accent,shadowOpacity:.3,shadowRadius:4},deleteButton:{backgroundColor:b.color.danger+"1A",borderColor:b.color.danger+"4D",borderWidth:1,borderRadius:6,padding:0,alignItems:"center",justifyContent:"center",width:28,height:28,position:"relative",shadowColor:b.color.danger,shadowOffset:{width:0,height:0},shadowOpacity:.15,shadowRadius:3},deleteButtonFocused:{borderColor:b.color.danger+"CC",backgroundColor:b.color.danger+"33",shadowOpacity:.3,shadowRadius:5},deleteButtonInToggle:{backgroundColor:b.color.danger+"1A",borderColor:b.color.danger+"4D",borderWidth:1,borderRadius:6,padding:0,alignItems:"center",justifyContent:"center",width:28,height:28,shadowColor:b.color.danger,shadowOffset:{width:0,height:0},shadowOpacity:.15,shadowRadius:3},clearButton:{backgroundColor:b.color.warning+"1A",borderWidth:1,borderColor:b.color.warning+"4D",borderRadius:6,flexDirection:"row",padding:0,alignItems:"center",justifyContent:"center",width:28,height:28,position:"relative",zIndex:10,shadowColor:b.color.warning,shadowOffset:{width:0,height:0},shadowOpacity:.15,shadowRadius:3},clearButtonFocused:{borderColor:b.color.warning+"CC",backgroundColor:b.color.warning+"33",shadowOpacity:.3,shadowRadius:5},clearButtonText:{fontSize:12,fontWeight:"700",fontFamily:S},expanderIcon:{width:18,height:18,alignItems:"center",justifyContent:"center",marginRight:1,backgroundColor:b.color.textSecondary+"14",borderRadius:3},expanderIconMain:{backgroundColor:b.color.textSecondary+"1A",width:20,height:20,borderRadius:4,borderWidth:.5,borderColor:b.color.textSecondary+"33"},expanded:{transform:[{rotate:"0deg"}]},collapsed:{transform:[{rotate:"0deg"}]},minWidthWrapper:{minWidth:180,fontSize:11,flexDirection:"row",flexWrap:"wrap",width:"100%",marginVertical:.5},fullWidthMarginRight:{position:"relative",width:"100%",marginRight:1},flexRowItemsCenterGap:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingVertical:3,paddingHorizontal:6,marginVertical:1,borderRadius:4,backgroundColor:b.color.surface+"66",borderWidth:.5,borderColor:b.color.textSecondary+"1A"},flexRowItemsCenterGapMain:{backgroundColor:b.color.surface+"E6",borderLeftWidth:2.5,borderLeftColor:b.color.textSecondary+"80",borderColor:b.color.textSecondary+"26",paddingVertical:5,paddingHorizontal:8,marginBottom:3,borderWidth:1,shadowColor:"#000",shadowOffset:{width:0,height:0},shadowOpacity:.08,shadowRadius:3},expanderButton:{flexDirection:"row",alignItems:"center",backgroundColor:"transparent",paddingVertical:1,paddingHorizontal:2,gap:6,borderWidth:0,minHeight:24,flex:1},labelText:{color:b.color.textSecondary,fontSize:10,fontWeight:"600",marginRight:4,fontFamily:S,letterSpacing:.4},labelTextFocused:{color:b.color.text},labelTextMain:{color:b.color.text,fontSize:11,fontWeight:"700",letterSpacing:.6},textGray500:{color:b.color.textTertiary,fontSize:10,fontWeight:"400",fontFamily:S,opacity:.7},pageRangeText:{color:b.color.textSecondary,fontSize:10,fontWeight:"600",fontFamily:S},flexRowGapItemsCenter:{flexDirection:"row",alignItems:"center",gap:4,paddingLeft:2},singleEntryContainer:{marginLeft:2,marginTop:2,paddingLeft:8,borderLeftWidth:1.5,borderLeftColor:b.color.textSecondary+"40"},singleEntryContainerMain:{borderLeftColor:b.color.textSecondary+"4D",marginLeft:4,paddingLeft:10},multiEntryContainer:{marginLeft:2,marginTop:2,paddingLeft:8,borderLeftWidth:1.5,borderLeftColor:b.color.textSecondary+"40"},relativeOutlineNone:{position:"relative"},pageExpanderButton:{flexDirection:"row",alignItems:"center",backgroundColor:b.color.surface+"66",paddingVertical:3,paddingHorizontal:6,gap:6,borderRadius:4,borderWidth:.5,borderColor:b.color.textSecondary+"1A",marginBottom:2,minHeight:24},entriesContainer:{marginLeft:2,paddingLeft:8,marginTop:2,borderLeftWidth:1.5,borderLeftColor:b.color.textSecondary+"40"},textNumber:{color:b.color.text,fontWeight:"600",fontFamily:S},textString:{color:b.color.text,fontFamily:S},flexRowGapFullWidth:{flexDirection:"row",width:"100%",alignItems:"center",marginVertical:1,gap:6,paddingHorizontal:4,paddingVertical:2,borderRadius:3},text344054:{color:b.color.textSecondary,fontWeight:"600",fontSize:9,minWidth:50,fontFamily:S,letterSpacing:.4,opacity:.8},nebulaInputWrapper:{flex:1,width:"100%",position:"relative"},displayValueText:{flex:1,color:b.color.text,fontWeight:"400",fontFamily:S,fontSize:12,paddingVertical:6,paddingHorizontal:10,borderRadius:6,borderWidth:1,borderColor:b.color.textTertiary+"66",minHeight:34},toggleRow:{flexDirection:"row",alignItems:"center",gap:6},modernToggleButton:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderRadius:6,borderWidth:1,borderColor:b.color.textTertiary+"99",paddingHorizontal:8,paddingVertical:6,marginVertical:2,minHeight:34,gap:8},toggleBadge:{marginLeft:6,paddingHorizontal:6,paddingVertical:3,borderRadius:4,borderWidth:1},toggleBadgeText:{fontSize:9,fontWeight:"700",textTransform:"uppercase",letterSpacing:.8,fontFamily:S},toggleBadgeTrue:{backgroundColor:b.color.accent+"1A",borderColor:b.color.accent+"4D"},toggleBadgeFalse:{backgroundColor:b.color.textTertiary+"1A",borderColor:b.color.textTertiary+"4D"},toggleTextTrue:{color:b.color.accent,fontWeight:"600"},toggleTextFalse:{color:b.color.textSecondary,fontWeight:"500"},booleanRowContainer:{flexDirection:"row",alignItems:"center",width:"100%",gap:8,paddingVertical:2},booleanLabel:{color:b.color.textSecondary,fontSize:10,fontWeight:"600",fontFamily:S,letterSpacing:.4,minWidth:60,flexShrink:0},booleanToggleWrapper:{flex:1}});export{Jr as ABSENT_VALUE,Gt as CyberpunkInput,an as DataTreeActionBar,cn as DataTreeActionDock,ln as DataTreeInlineEditor,ho as DataViewer,rr as DiffSummary,Gr as DiffType,$r as IndentGuides,dt as IndentGuidesOverlay,yn as JsonStringNotice,Rt as LiveExplorer,Ao as SplitDiffViewer,xn as ThemedSplitView,pn as TimestampDeltaBar,Zr as TreeDiffViewer,Hr as TypeLegend,An as ValueEditModal,Ht as VirtualizedDataExplorer,Xt as applyJsonOp,Pn as boundedDeepEqual,nt as breadcrumb,gt as computeLineDiff,lr as decodeJsonStringPair,Ye as deleteNestedDataByPath,hr as describeTimestampDeltas,vt as detectTimestamp,nr as devToolsDefaultTheme,Io as diffThemes,sr as formatDuration,Ct as formatInstant,ft as getAtPath,hn as gitClassicTheme,He as isAbsent,Qt as isEditableContainer,Jn as jsonLikelyLargerThan,Hn as makeRootWriter,$n as objectDiff,xt as parseJsonContainer,_t as selectionPathAfterOp,pt as suggestedNewValue,Gn as toDiffable,er as treeActionMap,mt as treeActionsFor,Ee as typeLabel,Ke as updateNestedDataByPath,pr as useTreeDraft,Sn as useTreeEditor};
|
package/lib/web/history.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{a as t,b as s,c as r,d as o,e as i,f as e,g as a,h as p,i as y}from"./chunks/chunk-
|
|
1
|
+
"use client";import{a as t,b as s,c as r,d as o,e as i,f as e,g as a,h as p,i as y}from"./chunks/chunk-UVVRCZX5.mjs";import"./chunks/chunk-5UII72AQ.mjs";import"./chunks/chunk-GF5C5DVX.mjs";import"./chunks/chunk-SUG6TLF5.mjs";import"./chunks/chunk-AHVO74UQ.mjs";import"./chunks/chunk-QXVVA64P.mjs";import"./chunks/chunk-SBYYOE2T.mjs";import"./chunks/chunk-T6T3FEMU.mjs";export{a as HistoryEntryRow,p as HistoryList,t as HistoryProvider,y as StandaloneHistoryList,i as useAllHistoryEntries,o as useHistoryAdapter,r as useHistoryAdapters,s as useHistoryContext,e as useHistoryEntryCounts};
|