@buoy-gg/shared-ui 7.0.63 → 7.0.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/lib/commonjs/JsModal.web.js +1 -1
- package/lib/commonjs/clipboard/copyToClipboard.js +1 -1
- package/lib/commonjs/dataViewer/VirtualizedDataExplorer.js +1 -1
- package/lib/commonjs/hooks/useDeviceInfo.js +1 -1
- package/lib/commonjs/license/AccountSetup.web.js +2 -2
- package/lib/commonjs/settings/components/BubbleSettingsSection.js +1 -1
- package/lib/commonjs/storage/buoyOwnership.js +1 -0
- package/lib/commonjs/storage/buoyOwnership.test.js +1 -0
- package/lib/commonjs/storage/devToolsStorageKeys.js +1 -1
- package/lib/commonjs/storage/index.js +1 -1
- package/lib/commonjs/ui/components/ChangeRow.js +1 -1
- package/lib/commonjs/ui/components/CompactRow.js +1 -1
- package/lib/commonjs/ui/components/DataInspector.js +1 -1
- package/lib/commonjs/ui/components/DraggableHeader.js +1 -1
- package/lib/commonjs/ui/floating/FloatingTool.web.js +1 -1
- package/lib/commonjs/ui/floating/index.web.js +1 -1
- package/lib/commonjs/ui/floating/portalHost.test.js +1 -0
- package/lib/commonjs/ui/floating/portalHost.web.js +1 -0
- package/lib/commonjs/ui/fonts.js +1 -1
- package/lib/commonjs/ui/index.js +1 -1
- package/lib/commonjs/ui/systemFont.js +1 -0
- package/lib/commonjs/utils/loadOptionalModule.js +1 -1
- package/lib/commonjs/utils/minimalSuperJSON.js +1 -1
- package/lib/commonjs/utils/nativeWeb.js +1 -1
- package/lib/commonjs/utils/persistentStorage.js +1 -1
- package/lib/module/JsModal.web.js +1 -1
- package/lib/module/clipboard/copyToClipboard.js +1 -1
- package/lib/module/dataViewer/VirtualizedDataExplorer.js +1 -1
- package/lib/module/hooks/useDeviceInfo.js +1 -1
- package/lib/module/license/AccountSetup.web.js +2 -2
- package/lib/module/settings/components/BubbleSettingsSection.js +1 -1
- package/lib/module/storage/buoyOwnership.js +1 -0
- package/lib/module/storage/buoyOwnership.test.js +1 -0
- package/lib/module/storage/devToolsStorageKeys.js +1 -1
- package/lib/module/storage/index.js +1 -1
- package/lib/module/ui/components/ChangeRow.js +1 -1
- package/lib/module/ui/components/CompactRow.js +1 -1
- package/lib/module/ui/components/DataInspector.js +1 -1
- package/lib/module/ui/components/DraggableHeader.js +1 -1
- package/lib/module/ui/floating/FloatingTool.web.js +1 -1
- package/lib/module/ui/floating/index.web.js +1 -1
- package/lib/module/ui/floating/portalHost.test.js +1 -0
- package/lib/module/ui/floating/portalHost.web.js +1 -0
- package/lib/module/ui/fonts.js +1 -1
- package/lib/module/ui/index.js +1 -1
- package/lib/module/ui/systemFont.js +1 -0
- package/lib/module/utils/loadOptionalModule.js +1 -1
- package/lib/module/utils/minimalSuperJSON.js +1 -1
- package/lib/module/utils/nativeWeb.js +1 -1
- package/lib/module/utils/persistentStorage.js +1 -1
- package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/commonjs/license/AccountSetup.web.d.ts +1 -1
- package/lib/typescript/commonjs/storage/buoyOwnership.d.ts +15 -0
- package/lib/typescript/commonjs/storage/buoyOwnership.test.d.ts +2 -0
- package/lib/typescript/commonjs/storage/index.d.ts +1 -0
- package/lib/typescript/commonjs/ui/floating/FloatingTool.web.d.ts +2 -2
- package/lib/typescript/commonjs/ui/floating/index.web.d.ts +1 -0
- package/lib/typescript/commonjs/ui/floating/portalHost.test.d.ts +2 -0
- package/lib/typescript/commonjs/ui/floating/portalHost.web.d.ts +8 -0
- package/lib/typescript/commonjs/ui/fonts.d.ts +1 -0
- package/lib/typescript/commonjs/ui/index.d.ts +1 -1
- package/lib/typescript/commonjs/ui/systemFont.d.ts +2 -0
- package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/module/license/AccountSetup.web.d.ts +1 -1
- package/lib/typescript/module/storage/buoyOwnership.d.ts +15 -0
- package/lib/typescript/module/storage/buoyOwnership.test.d.ts +2 -0
- package/lib/typescript/module/storage/index.d.ts +1 -0
- package/lib/typescript/module/ui/floating/FloatingTool.web.d.ts +2 -2
- package/lib/typescript/module/ui/floating/index.web.d.ts +1 -0
- package/lib/typescript/module/ui/floating/portalHost.test.d.ts +2 -0
- package/lib/typescript/module/ui/floating/portalHost.web.d.ts +8 -0
- package/lib/typescript/module/ui/fonts.d.ts +1 -0
- package/lib/typescript/module/ui/index.d.ts +1 -1
- package/lib/typescript/module/ui/systemFont.d.ts +2 -0
- package/lib/web/asyncStorage.mjs +1 -1
- package/lib/web/chunks/chunk-3HELV44Y.mjs +1 -0
- package/lib/web/chunks/chunk-4HIK66DZ.mjs +1 -0
- package/lib/web/chunks/chunk-4YLP5MMN.mjs +1 -0
- package/lib/web/chunks/chunk-5G6RSRP4.mjs +1 -0
- package/lib/web/chunks/chunk-7JJHWSTD.mjs +1 -0
- package/lib/web/chunks/chunk-AHVO74UQ.mjs +1 -0
- package/lib/web/chunks/chunk-CJTGUGMQ.mjs +1 -0
- package/lib/web/chunks/chunk-FA6WAQUA.mjs +6 -0
- package/lib/web/chunks/chunk-GMM6TGFO.mjs +1 -0
- package/lib/web/chunks/chunk-HIAN3HBD.mjs +1 -0
- package/lib/web/chunks/chunk-HPZXETRA.mjs +1 -0
- package/lib/web/chunks/chunk-NOSWH3E2.mjs +1 -0
- package/lib/web/chunks/chunk-OGAHL36T.mjs +15 -0
- package/lib/web/chunks/chunk-P32XO2YS.mjs +1 -0
- package/lib/web/chunks/chunk-SBYYOE2T.mjs +1 -0
- package/lib/web/chunks/chunk-T6T3FEMU.mjs +1 -0
- package/lib/web/chunks/chunk-VAR5UK6J.mjs +1 -0
- package/lib/web/chunks/persistentStorage.web-NOUYFUMM.mjs +1 -0
- package/lib/web/colors.mjs +1 -1
- package/lib/web/dataViewer.mjs +2 -2
- package/lib/web/floating.mjs +1 -1
- package/lib/web/history.mjs +1 -1
- package/lib/web/hooks.mjs +1 -1
- package/lib/web/index.mjs +3 -3
- package/lib/web/native.mjs +1 -1
- package/lib/web/ui.mjs +1 -1
- package/lib/web/utils.mjs +1 -1
- package/package.json +5 -5
- package/lib/web/chunks/chunk-3UTMGIUG.mjs +0 -1
- package/lib/web/chunks/chunk-4IM4VIMP.mjs +0 -1
- package/lib/web/chunks/chunk-53J2FMUD.mjs +0 -1
- package/lib/web/chunks/chunk-ASHW3TI7.mjs +0 -1
- package/lib/web/chunks/chunk-BZTGYXMT.mjs +0 -1
- package/lib/web/chunks/chunk-CE5U3CSQ.mjs +0 -1
- package/lib/web/chunks/chunk-E2MI3FII.mjs +0 -15
- package/lib/web/chunks/chunk-FP44YK4E.mjs +0 -1
- package/lib/web/chunks/chunk-GF364FIK.mjs +0 -1
- package/lib/web/chunks/chunk-L63X3LPR.mjs +0 -1
- package/lib/web/chunks/chunk-L7OYS724.mjs +0 -1
- package/lib/web/chunks/chunk-LZ7FZZ7R.mjs +0 -1
- package/lib/web/chunks/chunk-NVD5LLXD.mjs +0 -1
- package/lib/web/chunks/chunk-QNLAFQET.mjs +0 -1
- package/lib/web/chunks/chunk-SYU4BFQR.mjs +0 -6
- package/lib/web/chunks/chunk-UYWHGSA7.mjs +0 -1
- package/lib/web/chunks/persistentStorage.web-3QA77BIL.mjs +0 -1
package/lib/web/dataViewer.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{a as sn,b as un,c as hn,d as gn,e as fn}from"./chunks/chunk-53J2FMUD.mjs";import{P as or}from"./chunks/chunk-SYU4BFQR.mjs";import"./chunks/chunk-GF364FIK.mjs";import"./chunks/chunk-4IM4VIMP.mjs";import{a as m}from"./chunks/chunk-GF5C5DVX.mjs";import"./chunks/chunk-NVD5LLXD.mjs";import{d as ir,g as ar}from"./chunks/chunk-UYWHGSA7.mjs";import{Bc as lr,Kc as Dt,Vb as lt,Xb as dr,Yb as Bt,_b as cr,cc as sr,sd as T,vc as ur}from"./chunks/chunk-L7OYS724.mjs";import{a as I,d as P,f as ie}from"./chunks/chunk-CE5U3CSQ.mjs";import"./chunks/chunk-QNLAFQET.mjs";import"./chunks/chunk-FP44YK4E.mjs";import{J as ae,N as It,a as u,b as g,c as At,d as Q,h as Rt,r as W}from"./chunks/chunk-3UTMGIUG.mjs";import"./chunks/chunk-L63X3LPR.mjs";import{useState as pn,useMemo as hr}from"react";import{useState as Ae,useMemo as Vt,useCallback as Ve,useRef as ke,useEffect as dt,memo as Wt}from"react";import{memo as mn,useMemo as yn}from"react";import{jsx as gr}from"react/jsx-runtime";var bn="4D",xn="80",ct=mn(({items:e,visibleRange:r,itemHeight:t,indentWidth:n,activeDepth:o=-1})=>{let c=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 d=i;d<=a;d++){let f=e[d]?.depth??0;f>l&&(l=f)}let s=[];for(let d=1;d<=l;d++){let f=(d-.5)*n,y=Math.round(f)+.5,p=[],S=-1,D=-1;for(let A=i;A<=a;A++)(e[A]?.depth??0)>=d?(S===-1&&(S=A),D=A):S!==-1&&(p.push({startIndex:S,endIndex:D}),S=-1,D=-1);S!==-1&&p.push({startIndex:S,endIndex:D}),p.length>0&&s.push({depth:d,left:y,segments:p})}return s},[e,r,t,n]);return gr(u,{pointerEvents:"none",style:fr.overlay,children:c.map(i=>i.segments.map((a,l)=>{let s=(a.startIndex-r.start)*t,d=(a.endIndex-a.startIndex+1)*t,f=i.depth===o;return gr(u,{style:[fr.line,{left:i.left,top:s,height:d,backgroundColor:`${P.primary}${f?xn:bn}`}]},`${i.depth}-${l}`)}))})});ct.displayName="IndentGuidesOverlay";var fr=ae.create({overlay:{position:"absolute",left:0,right:0,top:0,bottom:0,zIndex:1},line:{position:"absolute",width:1}});import{Fragment as vn,jsx as H,jsxs as he}from"react/jsx-runtime";var pr={top:10,bottom:10,left:10,right:10},De=24,Cn=24,Ze=50,st=15,kn=500;var wn=300,zt=16,mr=Array.from({length:st+1},(e,r)=>ae.create({container:{marginLeft:r*zt}}).container),Tn=new Map([["string",P.dataTypes.string],["number",P.dataTypes.number],["bigint",P.optional],["boolean",P.dataTypes.boolean],["null",P.dataTypes.null],["undefined",P.dataTypes.undefined],["function",P.dataTypes.function],["symbol",P.critical],["date",P.critical],["error",P.error],["array",P.dataTypes.array],["object",P.dataTypes.object],["map",P.info],["set",P.success],["circular",P.warning]]),j=ae.create({container:{backgroundColor:m.color.bg,borderRadius:8,borderWidth:1,borderColor:m.color.border},header:{flexDirection:"column",paddingHorizontal:16,paddingVertical:12},headerRow:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:6},title:{color:P.primary,fontSize:14,fontWeight:"500"},description:{color:P.secondary,fontSize:12,marginTop:2},typeLegend:{flexDirection:"row",flexWrap:"wrap",gap:6,marginTop:8,paddingTop:8,borderTopWidth:1,borderTopColor:P.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:P.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:P.primary+"0A"},itemSelected:{backgroundColor:P.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:P.primary,fontSize:12,fontWeight:"500",fontFamily:T,marginRight:8,flexShrink:1},labelTextTruncated:{color:P.primary,fontSize:12,fontWeight:"500",fontFamily:T,flexShrink:1},valueText:{fontSize:12,fontFamily:T,flex:1,color:P.primaryLight},loadingContainer:{padding:16,alignItems:"center"},loadingText:{color:P.secondary,fontSize:12},noDataContainer:{padding:16,alignItems:"center"},noDataText:{color:P.secondary,fontSize:12},listContent:{paddingBottom:8},headerTouchable:{flex:1,flexDirection:"row",alignItems:"center"},expanderMargin:{marginLeft:8}});function Nt(e){return{path:e.path.slice(1),value:e.value,label:e.key}}function Ft(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=Ft(o,r,n)}else if(e!==null&&typeof e=="object")for(let o of Object.values(e)){if(n>=r)return n;n=Ft(o,r,n)}return n}var Sn=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,Dn=(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}},Bn=(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 ir(e)}},yr=e=>Tn.get(e)||P.dataTypes.array,br=({expanded:e,onPress:r})=>H(Q,{"sentry-label":"ignore devtools data explorer expander",style:j.expanderContainer,onPress:r,hitSlop:pr,children:H(u,{style:j.expanderIcon,children:H(dr,{size:12,color:P.secondary,strokeWidth:2,style:{transform:[{rotate:e?"90deg":"0deg"}]}})})});br.displayName="Expander";var xr=Wt(br),vr=({visibleTypes:e})=>{let r=Array.from(new Set(e)).slice(0,8);return H(u,{style:j.typeLegend,children:r.map(t=>{let n=yr(t);return he(u,{style:[j.typeBadge,{backgroundColor:`${n}10`,borderColor:`${n}30`}],children:[H(u,{style:[j.typeColor,{backgroundColor:n}]}),H(g,{style:j.typeName,children:t})]},t)})})};vr.displayName="TypeLegend";var In=Wt(vr),An=(e,r=10,t=false)=>{let[n,o]=Ae([]),c=ke(new Map),i=Ve(()=>{let h=new Set(["root"]);return t&&e&&typeof e=="object"&&(Array.isArray(e)?e.forEach((x,k)=>{h.add(`root.${k}`)}):Object.keys(e).forEach(x=>{h.add(`root.${x}`)})),h},[t,e]),[a,l]=Ae(()=>i()),[s,d]=Ae(false),f=ke(new WeakSet),y=ke(false),p=ke(0),S=ke(0),D=ke(void 0),A=Ve((h,x,k,w="root",C=0,N,$=[],de=0,re=1,oe=[])=>{if(C>Math.min(r,st))return[];let Z=[...$,w],Y=Z.join("."),te=Sn(h),E=["object","array","map","set"].includes(te)&&h!==null,F=E?Dn(h,te):0,K=Math.min(F,kn);if(h&&typeof h=="object"){if(k.has(h))return[{id:Y,key:w,value:"[Circular Reference]",valueType:"circular",depth:C,isExpandable:false,isExpanded:false,parentId:N,hasChildren:false,childCount:0,path:Z,type:"circular",isLastChild:de===re-1,parentHasMoreSiblings:[...oe],siblingIndex:de,totalSiblings:re}];k.add(h)}let L={id:Y,key:w,value:h,valueType:te,depth:C,isExpandable:E,isExpanded:x.has(Y),parentId:N,hasChildren:K>0,childCount:K,path:Z,type:E?"expandable":te,isLastChild:de===re-1,parentHasMoreSiblings:[...oe],siblingIndex:de,totalSiblings:re},ue=[L];if(E&&x.has(Y)&&C<Math.min(r,st))try{let Ce=[];switch(te){case"array":Ce=Array.isArray(h)?h.map((pe,Re)=>[Re.toString(),pe]):[];break;case"object":Ce=typeof h=="object"&&h!==null&&!(h instanceof Date)&&!(h instanceof Error)&&!(h instanceof RegExp)&&!(h instanceof Map)&&!(h instanceof Set)?Object.entries(h):[];break;case"map":Ce=h instanceof Map?Array.from(h.entries()).map(([pe,Re])=>[String(pe),Re]):[];break;case"set":Ce=h instanceof Set?Array.from(h.values()).map((pe,Re)=>[Re.toString(),pe]):[];break}let St=Ce.slice(0,K),ln=St.length,rr=[...oe];C>0&&(rr[C-1]=!L.isLastChild);for(let pe=0;pe<St.length;pe+=Ze){let Re=St.slice(pe,pe+Ze),nr=pe;for(let[dn,cn]of Re)ue.push(...A(cn,x,k,dn,C+1,Y,Z,nr,ln,rr)),nr++;if(pe>0&&pe%(Ze*2)===0)break}}catch(Ce){console.error(Ce)}return ue},[r]);dt(()=>{if(D.current&&(D.current.type==="expand"||D.current.type==="collapse")){s&&(d(false),y.current=false),D.current=void 0;return}if(y.current)return;let h,x=++p.current,k=()=>p.current===x;return y.current=true,d(true),(async()=>{if(h=setTimeout(()=>{y.current&&k()&&(d(false),y.current=false)},5e3),await new Promise(w=>setTimeout(()=>w(),10)),!!k())try{f.current=new WeakSet,S.current=Date.now();let w=A(e,a,f.current,"root",0,void 0,[],0,1,[]),C=new Map;w.forEach((N,$)=>{C.set(N.id,{item:N,index:$})}),c.current=C,h&&clearTimeout(h),k()&&(o(w),d(false),y.current=false)}catch(w){console.error(w),h&&clearTimeout(h),k()&&(o([]),c.current=new Map,d(false),y.current=false)}})(),()=>{y.current=false,h&&clearTimeout(h)}},[e,a,A,r]);let ne=Ve((h,x)=>{d(false),y.current=false,o(k=>{let w=c.current.get(h);if(!w)return k;let{item:C,index:N}=w;if(x&&C.isExpandable&&C.hasChildren){let $=[...k],de=new WeakSet;C.value&&typeof C.value=="object"&&de.add(C.value);let re=[];try{let Y=[];switch(C.valueType){case"array":Y=Array.isArray(C.value)?C.value.map((F,K)=>[K.toString(),F]):[];break;case"object":Y=typeof C.value=="object"&&C.value!==null&&!(C.value instanceof Date)&&!(C.value instanceof Error)&&!(C.value instanceof RegExp)&&!(C.value instanceof Map)&&!(C.value instanceof Set)?Object.entries(C.value):[];break;case"map":Y=C.value instanceof Map?Array.from(C.value.entries()).map(([F,K])=>[String(F),K]):[];break;case"set":Y=C.value instanceof Set?Array.from(C.value.values()).map((F,K)=>[K.toString(),F]):[];break}let te=Y.length,E=[...C.parentHasMoreSiblings||[]];C.depth>0&&(E[C.depth-1]=!C.isLastChild),Y.forEach(([F,K],L)=>{let ue=A(K,new Set,de,F,C.depth+1,h,C.path,L,te,E);re.push(...ue)})}catch(Y){console.error(Y)}let oe=re;oe.length>0,$[N]={...C,isExpanded:true},$.splice(N+1,0,...oe);let Z=new Map;return $.forEach((Y,te)=>{Z.set(Y.id,{item:Y,index:te})}),c.current=Z,$}else if(!x){let $=new Set,de=(Z,Y)=>{k.forEach(te=>{(te.parentId===Z||te.id.startsWith(Z+".")&&te.depth>Y)&&($.add(te.id),te.hasChildren&&de(te.id,te.depth))})};de(h,C.depth);let re=k.map(Z=>Z.id===h?{...Z,isExpanded:false}:Z).filter(Z=>!$.has(Z.id)),oe=new Map;return re.forEach((Z,Y)=>{oe.set(Z.id,{item:Z,index:Y})}),c.current=oe,re}return k})},[A]),U=Ve(h=>{l(x=>{let k=new Set(x),w=!k.has(h);return w?k.add(h):k.delete(h),D.current={type:w?"expand":"collapse",itemId:h},ne(h,w),k})},[ne]),b=Ft(e,Ze,0)<Ze,v=Vt(()=>b?A(e,a,new WeakSet,"root",0,void 0,[],0,1,[]):null,[b,e,a,A]),B=Ve(h=>{h.length!==0&&l(x=>{if(h.every(w=>x.has(w)))return x;let k=new Set(x);for(let w of h)k.add(w);return k})},[]);return{flatData:v??n,isProcessing:v?false:s,toggleExpanded:U,revealPath:B}},Cr=({item:e,onToggleExpanded:r,index:t,onSelect:n,isSelected:o,selectable:c,onRequestInlineEdit:i,isInlineEditing:a,inlineEditor:l,testIDPrefix:s})=>{let[d,f]=Ae(false),[y,p]=Ae(false),S=c===true,D=ke(0),A=e.path.slice(1),ne=mr[Math.min(e.depth,st)]||mr[0],U=yr(e.valueType),b=false,v=()=>{if(S){let k=Date.now(),w=k-D.current<wn;if(D.current=k,w&&!e.isExpandable&&i){i(e);return}n(e);return}e.isExpandable&&r(e.id),n(e)},B=()=>{e.isExpandable&&r(e.id),n(e)},h=()=>{},x=e.key;return he(u,{style:[j.itemContainer,ne],children:[he(Q,{"sentry-label":"ignore devtools data explorer item",testID:`${s}-${e.id}`,accessibilityLabel:`${e.key}: ${e.valueType}`,style:[j.itemTouchable,d&&j.itemTouchablePressed,S&&o&&j.itemSelected,b&&{minHeight:Cn,paddingVertical:2}],onPress:v,onPressIn:()=>f(true),onPressOut:()=>f(false),activeOpacity:e.isExpandable||S?.7:1,disabled:!e.isExpandable&&!S,children:[e.isExpandable?H(xr,{expanded:e.isExpanded,onPress:B}):H(u,{style:j.expanderContainer}),he(u,{style:j.labelContainer,children:[he(g,{style:j.labelText,numberOfLines:1,children:[e.key,":"]}),a&&l?l:e.isExpandable?he(g,{style:[j.valueText,{color:P.secondary}],numberOfLines:1,children:[e.valueType," (",e.childCount," ",e.childCount===1?"item":"items",")"]}):H(g,{style:[j.valueText,{color:U}],numberOfLines:1,children:Bn(e.value,e.valueType)})]})]}),e.value!==void 0?H(or,{value:e.value,size:14,buttonStyle:{marginLeft:8,marginRight:8}}):null]})};Cr.displayName="VirtualizedItem";var Rn=Wt(Cr),Et=({title:e,description:r,data:t,maxDepth:n=10,rawMode:o=false,initialExpanded:c=false,disableCopy:i=false,onSelectionChange:a,onRequestInlineEdit:l,inlineEditPath:s,renderInlineEditor:d,selectPath:f,testIDPrefix:y="buoy-tree-row"})=>{let[p,S]=Ae(o),{flatData:D,isProcessing:A,toggleExpanded:ne,revealPath:U}=An(t,n,c),b=ke(null),[v,B]=Ae({start:0,end:Math.min(D.length-1,Math.max(0,Math.ceil(400/De)-1))}),h=ke({itemVisiblePercentThreshold:1}),x=ke(({viewableItems:L})=>{let ue=L.map(Ce=>Ce.index).filter(Ce=>typeof Ce=="number");ue.length&&B({start:Math.min(...ue),end:Math.max(...ue)})}).current;dt(()=>{B({start:0,end:Math.min(D.length-1,Math.max(0,Math.ceil(400/De)-1))})},[D.length]);let k=Vt(()=>{let L=new Set;for(let ue of D)if(L.add(ue.valueType),L.size>=8)break;return Array.from(L)},[D]),w=()=>{S(!p)},[C,N]=Ae(null),$=Vt(()=>C==null?void 0:D.find(L=>L.id===C),[D,C]),de=$?.depth;dt(()=>{a&&a($?Nt($):null)},[$,a]);let re=Ve(L=>{N(ue=>ue===L.id?null:L.id)},[]),oe=f===void 0?void 0:f===null?"\0null":f.join("."),Z=ke(oe);dt(()=>{if(oe===Z.current||(Z.current=oe,oe===void 0))return;if(f==null){N(null);return}let L=["root"];for(let ue of f.slice(0,-1))L.push(`${L[L.length-1]}.${ue}`);U(L),N(["root",...f].join("."))},[oe,f,U]);let Y=Ve(L=>{N(L.id),l?.(Nt(L))},[l]),te=({item:L,index:ue})=>H(Rn,{item:L,index:ue,onToggleExpanded:ne,onSelect:re,isSelected:$?.id===L.id,selectable:a!=null,onRequestInlineEdit:Y,isInlineEditing:s!=null&&s.join(".")===L.path.slice(1).join("."),inlineEditor:d?d(Nt(L)):null,testIDPrefix:y}),E=De,F=L=>L.id,K=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?K?H(u,{style:{minHeight:A?40:D.length*De},children:A?H(u,{style:{flex:1,justifyContent:"center",alignItems:"center"},children:he(g,{style:j.loadingText,children:["Processing data... (raw mode, isProcessing=",String(A),")"]})}):he(u,{style:{position:"relative",height:D.length*De},children:[H(ct,{items:D,visibleRange:{start:0,end:Math.max(0,D.length-1)},itemHeight:De,indentWidth:zt,activeDepth:de}),H(It,{ref:b,"sentry-label":"ignore devtools data explorer list",data:D,renderItem:te,keyExtractor:F,showsVerticalScrollIndicator:true,contentContainerStyle:j.listContent,initialNumToRender:15,maxToRenderPerBatch:10,windowSize:10,scrollEnabled:false})]})}):H(u,{style:{flex:1,justifyContent:"center",alignItems:"center",padding:20},children:H(g,{style:j.noDataText,children:"No data available"})}):K?he(u,{style:j.container,children:[he(u,{style:j.header,children:[H(u,{style:j.headerRow,children:he(Q,{"sentry-label":"ignore devtools data explorer header toggle",onPress:w,hitSlop:pr,style:j.headerTouchable,children:[he(u,{style:{flex:1},children:[H(g,{style:j.title,children:e}),r&&H(g,{style:j.description,children:r})]}),H(u,{style:j.expanderMargin,children:H(xr,{expanded:p,onPress:w})})]})}),p&&k.length>0&&!o&&H(In,{visibleTypes:k})]}),p&&H(vn,{children:A?H(u,{style:j.loadingContainer,children:he(g,{style:j.loadingText,children:["Processing data... (isProcessing=",String(A),")"]})}):he(u,{style:{height:D.length*De,position:"relative"},children:[H(ct,{items:D,visibleRange:v,itemHeight:De,indentWidth:zt,activeDepth:de}),H(It,{ref:b,"sentry-label":"ignore devtools data explorer collapsed list",data:D,renderItem:te,keyExtractor:F,showsVerticalScrollIndicator:true,contentContainerStyle:j.listContent,initialNumToRender:15,maxToRenderPerBatch:10,windowSize:10,scrollEnabled:false,onViewableItemsChanged:x,viewabilityConfig:h.current})]})})]}):he(u,{style:j.container,children:[H(u,{style:j.header,children:H(u,{style:j.headerRow,children:he(u,{style:{flex:1},children:[H(g,{style:j.title,children:e}),r&&H(g,{style:j.description,children:r})]})})}),H(u,{style:j.noDataContainer,children:H(g,{style:j.noDataText,children:"No data available"})})]})};import{jsx as Lt,jsxs as Vn}from"react/jsx-runtime";var Wn=e=>({string:I.dataTypes.string,number:I.dataTypes.number,bigint:I.semantic.debug,boolean:I.dataTypes.boolean,null:I.dataTypes.null,undefined:I.dataTypes.undefined,function:I.dataTypes.function,symbol:I.semantic.error,date:I.semantic.error,error:I.semantic.error,array:I.dataTypes.array,object:I.dataTypes.object})[e]||I.text.secondary,kr=({types:e,activeFilter:r,onFilterChange:t})=>{if(e.length===0)return null;let n=o=>{t(r===o?null:o)};return Lt(u,{style:Ye.typeLegend,children:e.map(o=>{let c=Wn(o),i=r===o;return Vn(Q,{"sentry-label":"ignore devtools type legend filter",style:[Ye.typeBadge,i&&Ye.typeBadgeActive,{borderColor:i?c:I.text.primary+"1A"}],onPress:()=>n(o),accessibilityLabel:`Filter by ${o} values`,children:[Lt(u,{style:[Ye.typeColor,{backgroundColor:c}]}),Lt(g,{style:[Ye.typeName,i&&{color:c}],children:o})]},o)})})},Ye=ae.create({typeLegend:{flexDirection:"row",flexWrap:"wrap",paddingVertical:3,gap:6,width:"100%",padding:8},typeBadge:{flexDirection:"row",alignItems:"center",backgroundColor:I.background.hover,paddingHorizontal:8,paddingVertical:4,borderRadius:12,borderWidth:1},typeBadgeActive:{backgroundColor:I.background.input},typeColor:{width:8,height:8,borderRadius:4,marginRight:6},typeName:{color:I.text.secondary,fontSize:11,fontWeight:"500"}});import{jsx as ut,jsxs as zn}from"react/jsx-runtime";var Nn=({title:e,data:r,maxDepth:t=10,rawMode:n=true,showTypeFilter:o=true,initialExpanded:c=false,disableCopy:i=false,onSelectionChange:a,onRequestInlineEdit:l,inlineEditPath:s,renderInlineEditor:d,selectPath:f,testIDPrefix:y})=>{let[p,S]=pn(null),D=hr(()=>{if(!r||!o)return[];let U=[],b=(v,B=0)=>{if(B>3)return;let h=Array.isArray(v)?"array":v===null?"null":typeof v;U.push(h),h==="object"&&fn(v)?Object.values(v).forEach(x=>b(x,B+1)):Array.isArray(v)&&v.forEach(x=>b(x,B+1))};return b(r),Array.from(new Set(U)).slice(0,8)},[r,o]),A=hr(()=>{if(!p||!r)return null;let U={},b=0,v=(B,h,x="",k=0)=>{k>10||b>100||(Array.isArray(B)?B.forEach((w,C)=>{let N=x?`${x}[${C}]`:`[${C}]`,$=w===null?"null":typeof w;$===h&&(U[N]=w,b++),($==="object"&&w!==null||Array.isArray(w))&&v(w,h,N,k+1)}):B&&typeof B=="object"&&Object.entries(B).forEach(([w,C])=>{let N=x?`${x}.${w}`:w,$=Array.isArray(C)?"array":C===null?"null":typeof C;$===h&&(U[N]=C,b++),($==="object"&&C!==null||$==="array")&&v(C,h,N,k+1)}))};return v(r,p),{filteredObject:U,itemCount:b}},[p,r]),ne=()=>p&&A?ut(Et,{title:`${p} values`,data:A.filteredObject,maxDepth:t,rawMode:n,initialExpanded:c,disableCopy:i,testIDPrefix:y}):ut(Et,{title:e,data:r,maxDepth:t,rawMode:n,initialExpanded:c,disableCopy:i,onSelectionChange:a,onRequestInlineEdit:l,inlineEditPath:s,renderInlineEditor:d,selectPath:f,testIDPrefix:y});return zn(u,{style:wr.container,children:[o&&ut(u,{style:wr.header,children:ut(kr,{types:D,activeFilter:p,onFilterChange:S})}),ne()]})},wr=ae.create({container:{},header:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"}});import{useState as Fn,useEffect as En,useRef as Qe}from"react";import{jsx as ge,jsxs as jt}from"react/jsx-runtime";function Tr({label:e,containerStyle:r,showNumberControls:t=false,onIncrement:n,onDecrement:o,showDeleteButton:c=false,onDelete:i,...a}){let[l,s]=Fn(false),d=Qe(new W.Value(0)).current,f=Qe(new W.Value(0)).current,y=Qe(new W.Value(0)).current,p=Qe(new W.Value(1)).current,S=Qe(new W.Value(.6)).current;En(()=>{l?(W.timing(S,{toValue:1,duration:200,useNativeDriver:true}).start(),W.loop(W.sequence([W.timing(d,{toValue:0,duration:2e3,useNativeDriver:true}),W.timing(d,{toValue:.8,duration:30,useNativeDriver:true}),W.timing(d,{toValue:0,duration:20,useNativeDriver:true}),W.timing(d,{toValue:.6,duration:40,useNativeDriver:true}),W.timing(d,{toValue:0,duration:30,useNativeDriver:true}),W.timing(d,{toValue:.4,duration:20,useNativeDriver:true}),W.timing(d,{toValue:0,duration:50,useNativeDriver:true})])).start(),W.loop(W.sequence([W.timing(f,{toValue:0,duration:2500,useNativeDriver:true}),W.timing(f,{toValue:3,duration:20,useNativeDriver:true}),W.timing(f,{toValue:-3,duration:20,useNativeDriver:true}),W.timing(f,{toValue:2,duration:20,useNativeDriver:true}),W.timing(f,{toValue:0,duration:20,useNativeDriver:true})])).start(),W.loop(W.sequence([W.timing(y,{toValue:0,duration:2200,useNativeDriver:true}),W.timing(y,{toValue:-2,duration:30,useNativeDriver:true}),W.timing(y,{toValue:1,duration:20,useNativeDriver:true}),W.timing(y,{toValue:0,duration:30,useNativeDriver:true})])).start(),W.loop(W.sequence([W.timing(p,{toValue:1,duration:3e3,useNativeDriver:true}),W.timing(p,{toValue:1.01,duration:20,useNativeDriver:true}),W.timing(p,{toValue:.99,duration:20,useNativeDriver:true}),W.timing(p,{toValue:1,duration:20,useNativeDriver:true})])).start()):(W.timing(S,{toValue:.6,duration:200,useNativeDriver:true}).start(),W.timing(d,{toValue:0,duration:100,useNativeDriver:true}).start(),W.timing(f,{toValue:0,duration:100,useNativeDriver:true}).start(),W.timing(y,{toValue:0,duration:100,useNativeDriver:true}).start(),W.timing(p,{toValue:1,duration:100,useNativeDriver:true}).start())},[l,S,d,f,y,p]);let D=b=>{s(true),a.onFocus?.(b)},A=b=>{s(false),a.onBlur?.(b)},ne={opacity:S,borderColor:l?ie.primary:ie.textMuted+"4D"},U={opacity:d,transform:[{translateX:f},{translateY:y},{scale:p}]};return ge(u,{style:[J.container,r],children:jt(u,{style:J.rowContainer,children:[e&&ge(g,{style:[J.label,l&&J.labelFocused],children:e.toUpperCase()}),jt(W.View,{style:[J.inputContainer,ne],children:[ge(W.View,{style:[J.glitchOverlay,U],pointerEvents:"none"}),ge(At,{...a,style:[J.input,a.style,t&&J.inputWithControls,c&&J.inputWithDelete],onFocus:D,onBlur:A,placeholderTextColor:ie.textMuted+"99",autoComplete:"off",autoCorrect:false,autoCapitalize:"none",spellCheck:false}),t&&jt(u,{style:J.numberControls,children:[ge(Q,{style:[J.controlButton,l&&J.controlButtonFocused],onPress:n,activeOpacity:.7,children:ge(Bt,{size:14,strokeWidth:2.5,color:l?ie.primary:ie.textMuted})}),ge(Q,{style:[J.controlButton,l&&J.controlButtonFocused],onPress:o,activeOpacity:.7,children:ge(lt,{size:14,strokeWidth:2.5,color:l?ie.primary:ie.textMuted})})]}),c&&ge(Q,{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(Dt,{size:14,strokeWidth:2,color:l?ie.error:ie.error+"CC"})}),ge(u,{style:[J.cornerAccent,J.cornerTL,l&&J.cornerAccentFocused]}),ge(u,{style:[J.cornerAccent,J.cornerTR,l&&J.cornerAccentFocused]}),ge(u,{style:[J.cornerAccent,J.cornerBL,l&&J.cornerAccentFocused]}),ge(u,{style:[J.cornerAccent,J.cornerBR,l&&J.cornerAccentFocused]})]})]})})}var J=ae.create({container:{width:"100%",marginVertical:3},rowContainer:{flexDirection:"row",alignItems:"center",gap:8},label:{fontSize:10,fontWeight:"600",fontFamily:T,color:ie.textMuted,letterSpacing:.5,minWidth:60},labelFocused:{color:ie.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:ie.primary,zIndex:10},input:{flex:1,paddingHorizontal:10,paddingVertical:6,color:ie.text,fontSize:12,fontFamily:T,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:ie.textMuted+"33",alignItems:"center",justifyContent:"center",shadowColor:"#000",shadowOffset:{width:0,height:1},shadowOpacity:.2,shadowRadius:2},controlButtonFocused:{borderColor:ie.primary+"CC",shadowColor:ie.primary,shadowOpacity:.3,shadowRadius:4},deleteButton:{width:28,height:28,borderRadius:6,borderWidth:1,borderColor:ie.error+"4D",alignItems:"center",justifyContent:"center",shadowColor:ie.error,shadowOffset:{width:0,height:0},shadowOpacity:.15,shadowRadius:3,marginRight:4,zIndex:2},deleteButtonFocused:{borderColor:ie.error+"CC",shadowOpacity:.3,shadowRadius:5},cornerAccent:{position:"absolute",width:6,height:1.2,backgroundColor:ie.textMuted+"CC",zIndex:0},cornerAccentFocused:{backgroundColor:ie.primary},cornerTL:{top:-1,left:5},cornerTR:{top:-1,right:5},cornerBL:{bottom:-1,left:5},cornerBR:{bottom:-1,right:5}});import{memo as Ln,useMemo as jn}from"react";import{jsx as je}from"react/jsx-runtime";var We=10,Xe=P.primary+"40",et=P.primary+"66",Sr=Ln(({depth:e,isLastChild:r,isExpanded:t,hasChildren:n,parentHasMoreSiblings:o=[],activeDepth:c=-1,itemHeight:i})=>{let a=jn(()=>{let l=[];for(let s=1;s<e;s++){let d=s===c;o[s-1]&&l.push(je(u,{style:[Me.verticalLine,{left:(s-1)*We-.5,backgroundColor:d?et:Xe,height:i}]},`v-${s}`))}if(e>0){let s=r&&!t?i/2-1:i;l.push(je(u,{style:[Me.verticalLine,{left:(e-1)*We-.5,backgroundColor:c===e-1?et:Xe,height:s}]},"v-current")),r&&!t&&l.push(je(u,{style:[Me.horizontalLine,{left:(e-1)*We,top:i/2-1,width:We/2,backgroundColor:c===e-1?et:Xe}]},"h-corner")),t&&n&&l.push(je(u,{style:[Me.horizontalLine,{left:(e-1)*We,top:i/2-1,width:We/2,backgroundColor:c===e-1?et:Xe}]},"h-expand-connector"))}return n&&t&&l.push(je(u,{style:[Me.verticalLine,{left:e*We-.5,top:i/2,height:i/2+1,backgroundColor:c===e?et:Xe}]},"v-children")),l},[e,r,t,n,o,c,i]);return e===0?null:je(u,{style:Me.container,pointerEvents:"none",children:a})});Sr.displayName="IndentGuides";var Me=ae.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 Mt,useState as Mn,useEffect as On,useRef as Hn}from"react";import{gameUIColors as _,night as Oe}from"@buoy-gg/shared-ui/web";var Dr=(e=>(e.DEFAULT="unchanged",e.ADDED="added",e.REMOVED="removed",e.MODIFIED="modified",e))(Dr||{}),Br=Symbol.for("buoy.diff.absent");function tt(e){return e===Br}function $n(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 s=e.trim(),d=r.trim();n=s.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 c=[],i=[],a=0,l=0;for(;a<n.length&&l<o.length;)if(n[a]===o[l])c.push({value:n[a],type:"unchanged"}),i.push({value:o[l],type:"unchanged"}),a++,l++;else{let s=false;for(let d=a+1;d<Math.min(a+5,n.length);d++)if(n[d]===o[l]){for(let f=a;f<d;f++)c.push({value:n[f],type:"removed"});a=d,s=true;break}if(!s){for(let d=l+1;d<Math.min(l+5,o.length);d++)if(o[d]===n[a]){for(let f=l;f<d;f++)i.push({value:o[f],type:"added"});l=d,s=true;break}}s||(c.push({value:n[a],type:"removed"}),i.push({value:o[l],type:"added"}),a++,l++)}for(;a<n.length;)c.push({value:n[a],type:"removed"}),a++;for(;l<o.length;)i.push({value:o[l],type:"added"}),l++;return{left:c,right:i}}function Ir(e){if(tt(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)]}}function Pn(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=[],c=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],s=Math.max(0,l-r),d=Math.min(e.length-1,l+r);s<=i+1?i=Math.max(i,d):(o.push([c,i]),c=s,i=d)}return o.push([c,i]),o.forEach(([a,l])=>{for(let s=a;s<=l;s++)t.push(e[s])}),t}function Ar(e,r,t){let n=r==="trimmedLines"?e.trim():e;return t?n.replace(/,\s*$/,""):n}function Gn(e,r){let t=e.trim(),n=r.trim();return!!t&&!!n&&(t.startsWith(n.substring(0,3))||n.startsWith(t.substring(0,3)))}var Un=8e3,Jn=1024;function _n(e,r){let t=e.length,n=r.length;if(t+n>Un)return null;if(t===0&&n===0)return[];let o=t+n,c=o+1,i=new Int32Array(2*o+3),a=Math.min(o,Jn),l=[];for(let s=0;s<=a;s++){l.push(i.slice(c-(s+1),c+s+2));for(let d=-s;d<=s;d+=2){let f;d===-s||d!==s&&i[d-1+c]<i[d+1+c]?f=i[d+1+c]:f=i[d-1+c]+1;let y=f-d;for(;f<t&&y<n&&e[f]===r[y];)f++,y++;if(i[d+c]=f,f>=t&&y>=n)return qn(l,t,n)}}return null}function qn(e,r,t){let n=[],o=r,c=t;for(let i=e.length-1;i>=0;i--){let a=e[i],l=i+1,s=o-c,d;s===-i||s!==i&&a[s-1+l]<a[s+1+l]?d=s+1:d=s-1;let f=a[d+l],y=f-d;for(;o>f&&c>y;)n.push({kind:"eq",i:o-1,j:c-1}),o--,c--;i>0&&(o===f?n.push({kind:"ins",j:c-1}):n.push({kind:"del",i:o-1})),o=f,c=y}return n.reverse(),n}function Rr(e,r,t,n,o,c,i){let a=Math.min(r.length,t.length);for(let l=0;l<a;l++){let s=r[l],d=t[l];if(!Gn(n[s],o[d])){e.push({leftLineNumber:s+1,type:"removed",leftContent:n[s],leftRaw:n[s]}),e.push({rightLineNumber:d+1,type:"added",rightContent:o[d],rightRaw:o[d]});continue}if(!i&&c!=="lines"){let f=$n(n[s],o[d],c);e.push({leftLineNumber:s+1,rightLineNumber:d+1,type:"modified",leftContent:f.left,rightContent:f.right,leftRaw:n[s],rightRaw:o[d]})}else e.push({leftLineNumber:s+1,rightLineNumber:d+1,type:"modified",leftContent:n[s],rightContent:o[d],leftRaw:n[s],rightRaw:o[d]})}for(let l=a;l<r.length;l++){let s=r[l];e.push({leftLineNumber:s+1,type:"removed",leftContent:n[s],leftRaw:n[s]})}for(let l=a;l<t.length;l++){let s=t[l];e.push({rightLineNumber:s+1,type:"added",rightContent:o[s],rightRaw:o[s]})}}function Kn(e,r,t,n,o){let c=[],i=0;for(;i<e.length;){let a=e[i];if(a.kind==="eq"){c.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=[],s=[];for(;i<e.length&&e[i].kind!=="eq";){let d=e[i];d.kind==="del"?l.push(d.i):d.kind==="ins"&&s.push(d.j),i++}Rr(c,l,s,r,t,n,o)}return c}function Zn(e,r,t,n,o,c){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++):(Rr(i,[a],[l],e,r,o,c),a++,l++);return i}function Ot(e,r,t={}){let{compareMethod:n="words",disableWordDiff:o=false,showDiffOnly:c=false,contextLines:i=3,ignoreTrailingComma:a=true}=t,l=Ir(e),s=Ir(r),d=l.map(S=>Ar(S,n,a)),f=s.map(S=>Ar(S,n,a)),y=_n(d,f),p=y?Kn(y,l,s,n,o):Zn(l,s,d,f,n,o);return c?Pn(p,i):p}import{Fragment as Ht,jsx as M,jsxs as xe}from"react/jsx-runtime";var Yn={background:Oe.color.bg,text:Oe.color.textSecondary,addedBg:_.diff.addedBackground,removedBg:_.diff.removedBackground,changedBg:_.diff.modifiedBackground,addedText:_.diff.addedText,removedText:_.diff.removedText,changedText:_.diff.modifiedText,addedWordBg:_.diff.addedWordHighlight,removedWordBg:_.diff.removedWordHighlight,arrowText:_.diff.modifiedText,keyText:_.diff.modifiedText,expandIcon:Oe.color.textTertiary,bracketText:Oe.color.textSecondary,nullText:_.diff.modifiedText,undefinedText:_.diff.modifiedText,stringText:Oe.color.textSecondary,numberText:Oe.color.textSecondary,booleanText:_.diff.modifiedText},Qn={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)}function rt(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)=>rt(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=>rt(e[o],r[o]))}}return false}function Te(e,r,t=[]){let n=[];if(tt(e)&&(e=void 0),tt(r)&&(r=void 0),!ce(e)&&!ce(r)&&!Array.isArray(e)&&!Array.isArray(r))return rt(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:[],s=Math.max(a.length,l.length);for(let d=0;d<s;d++){let f=[...t,`[${d}]`],y=d<a.length?a[d]:void 0,p=d<l.length?l[d]:void 0;if(y===void 0){let S=Array.isArray(p)||ce(p);n.push({key:`[${d}]`,path:f,type:"added",newValue:p,...S?{children:Te(Array.isArray(p)?[]:{},p,f),expanded:false}:{}})}else if(p===void 0){let S=Array.isArray(y)||ce(y);n.push({key:`[${d}]`,path:f,type:"removed",oldValue:y,...S?{children:Te(y,Array.isArray(y)?[]:{},f),expanded:false}:{}})}else if(!rt(y,p))ce(y)||ce(p)||Array.isArray(y)||Array.isArray(p)?n.push({key:`[${d}]`,path:f,type:"changed",oldValue:y,newValue:p,children:Te(y,p,f),expanded:false}):n.push({key:`[${d}]`,path:f,type:"changed",oldValue:y,newValue:p});else{let S=Array.isArray(y)||ce(y);n.push({key:`[${d}]`,path:f,type:"unchanged",oldValue:y,newValue:p,...S?{children:Te(y,p,f),expanded:false}:{}})}}return n}let o=ce(e)?e:{},c=ce(r)?r:{},i=new Set([...Object.keys(o),...Object.keys(c)]);for(let a of i){let l=[...t,a],s=o[a],d=c[a];if(a in o)if(a in c)if(!rt(s,d))ce(s)||ce(d)||Array.isArray(s)||Array.isArray(d)?n.push({key:a,path:l,type:"changed",oldValue:s,newValue:d,children:Te(s,d,l),expanded:false}):n.push({key:a,path:l,type:"changed",oldValue:s,newValue:d});else{let f=Array.isArray(s)||ce(s);n.push({key:a,path:l,type:"unchanged",oldValue:s,newValue:d,...f?{children:Te(s,d,l),expanded:false}:{}})}else{let f=Array.isArray(s)||ce(s);n.push({key:a,path:l,type:"removed",oldValue:s,...f?{children:Te(s,Array.isArray(s)?[]:{},l),expanded:false}:{}})}else{let f=Array.isArray(d)||ce(d);n.push({key:a,path:l,type:"added",newValue:d,...f?{children:Te(Array.isArray(d)?[]:{},d,l),expanded:false}:{}})}}return n}function Be(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)}function Xn({oldValue:e,newValue:r,theme:t="dark",expandAll:n=false,showUnchanged:o=true,scrollEnabled:c=true}){let i=t==="dark"?Yn:Qn,[a,l]=Mn(()=>{let b=new Set;return Te(e,r).forEach(v=>{v.children&&v.children.length>0&&b.add(v.path.join("."))}),b}),s=Mt(()=>Te(e,r),[e,r]),d=Mt(()=>s.map(b=>`${b.path.join(".")}:${b.type}`).join("|"),[s]),f=Hn(false);On(()=>{if(!f.current){f.current=true;return}let b=new Set;s.forEach(v=>{v.children&&v.children.length>0&&b.add(v.path.join("."))}),l(b)},[d]);let y=b=>{let v=b.join(".");l(B=>{let h=new Set(B);return h.has(v)?h.delete(v):h.add(v),h})},p=0,S=(b,v=0)=>{if(!o&&b.type==="unchanged")return null;p++;let B=p,h=v*20,x=n||a.has(b.path.join(".")),k=b.children&&b.children.length>0,w=()=>{switch(b.type){case"added":return{backgroundColor:i.addedBg};case"removed":return{backgroundColor:i.removedBg};case"changed":return{backgroundColor:i.changedBg};default:return{backgroundColor:"transparent"}}},C=()=>{switch(b.type){case"added":return"+";case"removed":return"\u2212";case"changed":return"\u2248";default:return" "}},N=()=>{switch(b.type){case"added":return{backgroundColor:_.diff.markerAddedBackground,color:_.diff.addedText};case"removed":return{backgroundColor:_.diff.markerRemovedBackground,color:_.diff.removedText};case"changed":return{backgroundColor:_.diff.markerModifiedBackground,color:_.diff.modifiedText};default:return{backgroundColor:"transparent",color:_.diff.markerText}}};return xe(u,{children:[xe(Q,{activeOpacity:k?.7:1,onPress:k?()=>y(b.path):void 0,style:[V.row,w()],children:[M(u,{style:V.lineNumber,children:M(g,{style:[V.lineNumberText,{color:_.diff.lineNumberText}],children:String(B).padStart(2," ")})}),M(u,{style:[V.marker,N()],children:M(g,{style:[V.markerText,{color:N().color}],children:C()})}),xe(u,{style:[V.content,{paddingLeft:h}],children:[k&&M(u,{style:V.expandIconContainer,children:M(g,{style:[V.expandIcon,{color:i.expandIcon}],children:x?"\u2212":"+"})}),M(g,{style:[V.key,{color:i.keyText}],children:b.key}),M(g,{style:[V.colon,{color:i.expandIcon}],children:":"}),b.type==="changed"&&!k&&xe(Ht,{children:[M(g,{style:[V.value,{color:i.removedText,backgroundColor:i.removedWordBg,paddingHorizontal:3,paddingVertical:2,borderRadius:3,textDecorationLine:"line-through",textDecorationColor:i.removedText}],children:Be(b.oldValue)}),M(g,{style:[V.arrow,{color:i.arrowText,paddingHorizontal:4}],children:" => "}),M(g,{style:[V.value,{color:i.addedText,backgroundColor:i.addedWordBg,paddingHorizontal:3,paddingVertical:2,borderRadius:3}],children:Be(b.newValue)})]}),b.type==="added"&&!k&&M(g,{style:[V.value,{color:i.addedText,backgroundColor:i.addedWordBg,paddingHorizontal:3,paddingVertical:2,borderRadius:3}],children:Be(b.newValue)}),b.type==="removed"&&!k&&M(g,{style:[V.value,{color:i.removedText,backgroundColor:i.removedWordBg,paddingHorizontal:3,paddingVertical:2,borderRadius:3,textDecorationLine:"line-through",textDecorationColor:i.removedText}],children:Be(b.oldValue)}),b.type==="unchanged"&&!k&&M(g,{style:[V.value,{color:i.text}],children:Be(b.oldValue)}),k&&!x&&xe(Ht,{children:[b.type==="changed"&&xe(Ht,{children:[M(g,{style:[V.value,{color:i.removedText,backgroundColor:i.removedWordBg,paddingHorizontal:3,paddingVertical:2,borderRadius:3,textDecorationLine:"line-through",textDecorationColor:i.removedText}],children:Be(b.oldValue,true)}),M(g,{style:[V.arrow,{color:i.arrowText,paddingHorizontal:4}],children:" => "}),M(g,{style:[V.value,{color:i.addedText,backgroundColor:i.addedWordBg,paddingHorizontal:3,paddingVertical:2,borderRadius:3}],children:Be(b.newValue,true)})]}),b.type==="added"&&M(g,{style:[V.value,{color:i.addedText,backgroundColor:i.addedWordBg,paddingHorizontal:3,paddingVertical:2,borderRadius:3}],children:Be(b.newValue,true)}),b.type==="removed"&&M(g,{style:[V.value,{color:i.removedText,backgroundColor:i.removedWordBg,paddingHorizontal:3,paddingVertical:2,borderRadius:3,textDecorationLine:"line-through",textDecorationColor:i.removedText}],children:Be(b.oldValue,true)})]})]})]}),k&&x&&M(u,{children:b.children.map($=>S($,v+1))})]},b.path.join("."))},D=b=>{let v=0,B=0,h=0,x=k=>{for(let w of k)w.type==="added"?v++:w.type==="removed"?B++:w.type==="changed"&&h++,w.children&&x(w.children)};return x(b),{added:v,removed:B,changed:h}},A=Mt(()=>D(s),[s]),ne=A.added>0||A.removed>0||A.changed>0,U=c?Rt:u;return xe(u,{style:[c?V.container:V.containerInline,{backgroundColor:i.background}],children:[ne&&M(u,{style:[V.header,{backgroundColor:i.background}],children:xe(u,{style:V.summaryContainer,children:[A.added>0&&xe(u,{style:[V.summaryItem,V.summaryAdded],children:[M(g,{style:[V.summaryIcon,{color:i.addedText}],children:"+"}),M(g,{style:[V.summaryCount,{color:i.addedText}],children:A.added}),M(g,{style:[V.summaryLabel,{color:i.addedText}],children:"new"})]}),A.removed>0&&xe(u,{style:[V.summaryItem,V.summaryRemoved],children:[M(g,{style:[V.summaryIcon,{color:i.removedText}],children:"\u2212"}),M(g,{style:[V.summaryCount,{color:i.removedText}],children:A.removed}),M(g,{style:[V.summaryLabel,{color:i.removedText}],children:"gone"})]}),A.changed>0&&xe(u,{style:[V.summaryItem,V.summaryChanged],children:[M(g,{style:[V.summaryIcon,{color:i.changedText}],children:"\u2248"}),M(g,{style:[V.summaryCount,{color:i.changedText}],children:A.changed}),M(g,{style:[V.summaryLabel,{color:i.changedText}],children:"modified"})]})]})}),M(U,{style:c?V.scrollView:void 0,showsVerticalScrollIndicator:false,children:s.length===0?xe(u,{style:V.emptyState,children:[M(g,{style:[V.emptyIcon,{color:i.text}],children:"\u2261"}),M(g,{style:[V.emptyTitle,{color:i.text}],children:"No changes detected"}),M(g,{style:[V.emptySubtitle,{color:i.expandIcon}],children:"The data is identical"})]}):M(u,{children:(p=0,s.map(b=>S(b,0)))})})]})}var V=ae.create({container:{flex:1,borderRadius:8,overflow:"hidden"},containerInline:{borderRadius:8,overflow:"hidden"},header:{paddingHorizontal:12,paddingVertical:8,borderBottomWidth:1,borderBottomColor:_.diff.lineNumberBorder},summaryContainer:{flexDirection:"row",gap:16,alignItems:"center"},summaryItem:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:8,paddingVertical:4,borderRadius:12},summaryAdded:{backgroundColor:_.diff.addedBackground},summaryRemoved:{backgroundColor:_.diff.removedBackground},summaryChanged:{backgroundColor:_.diff.modifiedBackground},summaryIcon:{fontSize:14,fontWeight:"700",fontFamily:T},summaryCount:{fontSize:13,fontWeight:"600",fontFamily:T},summaryLabel:{fontSize:11,fontFamily:T,opacity:.9},scrollView:{flex:1},row:{minHeight:26,justifyContent:"center",flexDirection:"row",borderBottomWidth:ae.hairlineWidth,borderBottomColor:"rgba(128, 128, 128, 0.04)"},lineNumber:{width:32,paddingHorizontal:6,paddingVertical:4,backgroundColor:_.diff.lineNumberBackground,justifyContent:"center",borderRightWidth:1,borderRightColor:_.diff.lineNumberBorder},lineNumberText:{fontSize:11,fontFamily:T,textAlign:"right"},marker:{width:20,paddingHorizontal:2,paddingVertical:4,justifyContent:"center",alignItems:"center"},markerText:{fontSize:12,fontFamily:T,fontWeight:"600"},content:{flex:1,flexDirection:"row",alignItems:"center",paddingHorizontal:12,paddingVertical:4},expandIconContainer:{width:16,height:16,borderRadius:3,backgroundColor:_.diff.lineNumberBorder,alignItems:"center",justifyContent:"center",marginRight:6},expandIcon:{fontSize:11,fontFamily:T,fontWeight:"600"},colon:{fontSize:12,fontFamily:T,marginHorizontal:4},key:{fontSize:11,fontFamily:T,fontWeight:"500",opacity:.9},value:{fontSize:11,fontFamily:T,maxWidth:"80%"},arrow:{fontSize:12,fontFamily:T,fontWeight:"600"},badge:{fontSize:11,fontFamily:T,fontWeight:"600",marginLeft:8},emptyState:{flex:1,alignItems:"center",justifyContent:"center",paddingVertical:60},emptyIcon:{fontSize:48,fontFamily:T,opacity:.2,marginBottom:12},emptyTitle:{fontSize:14,fontFamily:T,fontWeight:"600",marginBottom:4},emptySubtitle:{fontSize:12,fontFamily:T,opacity:.6}});function me(e){if(e===null||typeof e!="object"||Array.isArray(e))return false;let r=Object.getPrototypeOf(e);return r===Object.prototype||r===null}function Vr(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}}function Wr(e){return Array.isArray(e)||me(e)}function $t(e,r){let t=e;for(let n of r)if(Array.isArray(t))t=t[Number(n)];else if(me(t))t=t[n];else return;return t}function we(e,r,t){if(r.length===0)return t(e);let[n,...o]=r;if(Array.isArray(e)){let c=Number(n);if(!Number.isInteger(c)||c<0||c>=e.length)return e;let i=[...e];return i[c]=we(i[c],o,t),i}return me(e)&&n in e?{...e,[n]:we(e[n],o,t)}:e}function ht(e){return e.length===0?null:{parent:e.slice(0,-1),last:e[e.length-1]}}function zr(e,r){switch(r.kind){case"replace":return we(e,r.path,()=>r.value);case"clear":return we(e,r.path,t=>Array.isArray(t)?[]:me(t)?{}:t);case"append":return we(e,r.path,t=>Array.isArray(t)?[...t,r.value]:t);case"insert":return we(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 we(e,r.path,t=>!me(t)||r.key in t?t:{...t,[r.key]:r.value});case"remove":{let t=ht(r.path);return t?we(e,t.parent,n=>eo(n,t.last)):e}case"duplicate":{let t=ht(r.path);return t?we(e,t.parent,n=>to(n,t.last)):e}case"move":{let t=ht(r.path);return t?we(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 c=Nr(r.toIndex,0,n.length-1);if(c===o)return n;let i=[...n],[a]=i.splice(o,1);return i.splice(c,0,a),i}):e}case"renameKey":{let t=ht(r.path);return t?we(e,t.parent,n=>ro(n,t.last,r.key)):e}default:return e}}function eo(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(me(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}function to(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),gt(e[t]),...e.slice(t+1)]}if(me(e)){if(!(r in e))return e;let t=no(e,`${r} copy`),n={};for(let o of Object.keys(e))n[o]=e[o],o===r&&(n[t]=gt(e[o]));return n}return e}function ro(e,r,t){if(!me(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}function no(e,r){if(!(r in e))return r;let t=2;for(;`${r} ${t}`in e;)t++;return`${r} ${t}`}function gt(e){if(Array.isArray(e))return e.map(gt);if(me(e)){let r={};for(let t of Object.keys(e))r[t]=gt(e[t]);return r}return e}function Nr(e,r,t){return Number.isFinite(e)?Math.min(Math.max(Math.trunc(e),r),t):r}function Pt(e){let r=Array.isArray(e)?e:me(e)?Object.values(e):[],t=r[r.length-1];return typeof t=="number"?0:typeof t=="boolean"?false:Array.isArray(t)?[]:me(t)?{}:""}function He(e){return e===null?"null":Array.isArray(e)?"array":me(e)?"object":typeof e}function ft(e){return e.length===0?"root":e.join(" \u203A ")}function Fr(e){let r={};for(let t of e)r[t.id]=t;return r}function oo(e){if(!("newKey"in e))return"newKey";let r=2;for(;`newKey ${r}`in e;)r++;return`newKey ${r}`}function Gt(e,r,t={}){let n=r?.path??[],o=r?.value,c=r!=null,i=n.length===0,a=t.rootEntriesLocked===true&&n.length===1,l=c&&!i?$t(e,n.slice(0,-1)):void 0,s=Array.isArray(l),d=s?Number(n[n.length-1]):-1,f=Array.isArray(o),y=me(o),p=Wr(o),S=c&&(t.containersEditable===true||!p),D=y?oo(o):"",A=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:f,op:f?{kind:"append",path:n,value:Pt(o)}:null,selectAfter:f?[...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:S,op:null},A,{id:"duplicate",label:"Duplicate",enabled:c&&!i,op:c&&!i?{kind:"duplicate",path:n}:null},{id:"moveUp",label:"Move up",enabled:c&&s&&d>0,op:c&&s&&d>0?{kind:"move",path:n,toIndex:d-1}:null},{id:"moveDown",label:"Move down",enabled:c&&s&&d>-1&&d<l.length-1,op:c&&s&&d>-1&&d<l.length-1?{kind:"move",path:n,toIndex:d+1}:null},{id:"remove",label:"Remove",danger:true,enabled:c&&!i&&!a,op:c&&!i&&!a?{kind:"remove",path:n}:null}]}import{useState as io}from"react";import{jsx as X,jsxs as nt}from"react/jsx-runtime";var le={barBg:I.background.card,barBorder:I.border.default,label:I.text.primary,badgeBg:I.background.hover,badgeText:I.text.secondary,hint:I.text.muted,btnBg:I.background.hover,btnBorder:I.border.default,btnText:I.text.primary,btnIcon:I.text.secondary,dangerBorder:I.semantic.error+"55",dangerText:I.semantic.error},pt=13;function $e({label:e,onPress:r,icon:t,danger:n,iconOnly:o,disabled:c,style:i}){return nt(Q,{"sentry-label":"ignore devtools tree action",accessibilityLabel:e,accessibilityState:{disabled:!!c},onPress:c?void 0:r,disabled:c,hitSlop:{top:8,bottom:8,left:6,right:6},style:[ee.button,o&&ee.buttonIconOnly,n&&{borderColor:le.dangerBorder},c&&ee.buttonDisabled,i],children:[t,o?null:X(g,{style:[ee.buttonText,n&&{color:le.dangerText}],children:e})]})}function ao({root:e,selection:r,onEdit:t,onRequestInlineEdit:n,chipStyle:o}){let c=r!=null,i=Fr(Gt(e,r)),a=l=>l&&t(l);return nt(u,{style:ee.bar,children:[X(g,{style:[ee.selectionLabel,!c&&ee.selectionLabelEmpty],numberOfLines:1,children:c?ft(r.path):"Select a row to edit"}),X(u,{style:ee.badge,children:X(g,{style:ee.badgeText,children:c?He(r.value):"\u2014"})}),nt(u,{style:ee.actions,children:[X($e,{label:i.editValue.label,disabled:!i.editValue.enabled,style:o,icon:X(sr,{size:pt,color:le.btnIcon}),onPress:()=>i.editValue.op?t(i.editValue.op):n()}),X($e,{label:i.add.label,disabled:!i.add.enabled,style:o,icon:X(lr,{size:pt,color:le.btnIcon}),onPress:()=>a(i.add.op)}),X($e,{label:i.moveUp.label,iconOnly:true,disabled:!i.moveUp.enabled,style:o,icon:X(Bt,{size:14,color:le.btnIcon}),onPress:()=>a(i.moveUp.op)}),X($e,{label:i.moveDown.label,iconOnly:true,disabled:!i.moveDown.enabled,style:o,icon:X(lt,{size:14,color:le.btnIcon}),onPress:()=>a(i.moveDown.op)}),X($e,{label:i.duplicate.label,disabled:!i.duplicate.enabled,style:o,icon:X(cr,{size:pt,color:le.btnIcon}),onPress:()=>a(i.duplicate.op)}),X($e,{label:i.remove.label,danger:true,disabled:!i.remove.enabled,style:o,icon:X(ur,{size:pt,color:le.dangerText}),onPress:()=>a(i.remove.op)})]})]})}function lo({value:e,onCommit:r,onCancel:t}){let[n,o]=io(()=>e==null?"":String(e));if(typeof e=="boolean")return nt(u,{style:ee.inlineRow,children:[[true,false].map(l=>X(Q,{accessibilityLabel:`Set ${l}`,onPress:()=>r(l),hitSlop:{top:8,bottom:8,left:6,right:6},style:[ee.button,e===l&&ee.buttonActive],children:X(g,{style:ee.buttonText,children:String(l)})},String(l))),X(Q,{accessibilityLabel:"Cancel edit",onPress:t,hitSlop:{top:8,bottom:8,left:6,right:6},style:ee.button,children:X(g,{style:ee.buttonText,children:"Cancel"})})]});let c=typeof e=="number",i=c&&(n.trim()===""||Number.isNaN(Number(n))),a=()=>{i||r(c?Number(n):n)};return nt(u,{style:ee.inlineRow,children:[X(At,{value:n,onChangeText:o,onSubmitEditing:a,autoFocus:true,autoCapitalize:"none",autoCorrect:false,spellCheck:false,keyboardType:c?"numeric":"default",style:[ee.input,i&&ee.inputInvalid],placeholderTextColor:le.hint}),X(Q,{accessibilityLabel:"Save value",onPress:a,hitSlop:{top:8,bottom:8,left:6,right:6},style:[ee.saveButton,i&&ee.saveButtonDisabled],children:X(g,{style:ee.saveText,children:"Save"})}),X(Q,{accessibilityLabel:"Cancel edit",onPress:t,hitSlop:{top:8,bottom:8,left:6,right:6},style:ee.button,children:X(g,{style:ee.buttonText,children:"Cancel"})})]})}var ee=ae.create({inlineRow:{flex:1,flexDirection:"row",alignItems:"center",gap:6},input:{flex:1,minWidth:0,height:28,color:le.label,backgroundColor:I.background.input,borderWidth:1,borderColor:I.border.input,borderRadius:7,paddingHorizontal:9,paddingVertical:0,fontSize:12,fontFamily:T},inputInvalid:{borderColor:I.semantic.error},saveButton:{height:28,justifyContent:"center",paddingHorizontal:10,borderRadius:7,backgroundColor:I.semantic.success},saveButtonDisabled:{opacity:.4},saveText:{color:I.background.base,fontSize:12,fontWeight:"600"},buttonActive:{borderColor:I.semantic.success},bar:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:8,paddingHorizontal:12,paddingVertical:9,borderTopWidth:1,borderTopColor:le.barBorder,backgroundColor:le.barBg},actions:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:6,marginLeft:"auto"},selectionLabelEmpty:{color:le.hint,fontWeight:"400"},selectionLabel:{color:le.label,fontSize:12,fontWeight:"600",fontFamily:T,flexShrink:1},badge:{paddingHorizontal:7,paddingVertical:1,borderRadius:5,backgroundColor:le.badgeBg},badgeText:{color:le.badgeText,fontSize:11,fontWeight:"600"},button:{flexDirection:"row",alignItems:"center",gap:6,minHeight:32,paddingHorizontal:11,borderRadius:8,borderWidth:1,borderColor:le.btnBorder,backgroundColor:le.btnBg},buttonDisabled:{opacity:.35},buttonIconOnly:{paddingHorizontal:0,width:32,justifyContent:"center"},buttonText:{color:le.btnText,fontSize:12,fontWeight:"600"},hint:{color:le.hint,fontSize:12,flexShrink:1}});import{jsx as ve,jsxs as Ut}from"react/jsx-runtime";var ye={dockBg:I.background.card,dockBorder:I.border.default,tileBg:I.background.hover,tileBorder:I.border.default,tileText:I.text.primary,tileIcon:I.text.secondary,hint:I.text.muted,label:I.text.primary,badgeBg:I.background.hover,badgeText:I.text.secondary,dangerBorder:I.semantic.error+"55",dangerText:I.semantic.error},Pe=16;function co(e,r){switch(e){case"editValue":return ve(sr,{size:Pe,color:r});case"add":return ve(lr,{size:Pe,color:r});case"duplicate":return ve(cr,{size:Pe,color:r});case"moveUp":return ve(Bt,{size:Pe+2,color:r});case"moveDown":return ve(lt,{size:Pe+2,color:r});case"remove":return ve(ur,{size:Pe,color:r})}}function so({action:e,onPress:r}){let{enabled:t,danger:n,label:o,id:c}=e,i=n&&t?ye.dangerText:ye.tileIcon;return Ut(Q,{"sentry-label":"ignore devtools tree action",testID:`buoy-tree-action-${c}`,accessibilityLabel:o,accessibilityState:{disabled:!t},disabled:!t,onPress:t?r:void 0,style:[Se.tile,n&&t&&{borderColor:ye.dangerBorder},!t&&Se.tileDisabled],children:[co(c,i),ve(g,{style:[Se.tileText,n&&t&&{color:ye.dangerText}],numberOfLines:1,children:o})]})}function uo({root:e,selection:r,onEdit:t,onSelectPath:n,onEditValue:o,containersEditable:c=true,rootEntriesLocked:i=false}){let a=Gt(e,r,{containersEditable:c,rootEntriesLocked:i}),l=r!=null,s=d=>{if(!d.op){o();return}t(d.op),d.selectAfter&&n(d.selectAfter)};return Ut(u,{style:Se.dock,children:[Ut(u,{style:Se.header,children:[ve(g,{style:[Se.selectionLabel,!l&&Se.selectionLabelEmpty],numberOfLines:1,children:l?ft(r.path):"Tap a row to select it"}),ve(u,{style:Se.badge,children:ve(g,{style:Se.badgeText,children:l?He(r.value):"\u2014"})})]}),ve(u,{style:Se.grid,children:a.map(d=>ve(so,{action:d,onPress:()=>s(d)},d.id))})]})}var Se=ae.create({dock:{borderTopWidth:1,borderTopColor:ye.dockBorder,backgroundColor:ye.dockBg,paddingHorizontal:10,paddingTop:8,paddingBottom:10,gap:8},header:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:2},selectionLabel:{flex:1,color:ye.label,fontSize:12,fontWeight:"600",fontFamily:T},selectionLabelEmpty:{color:ye.hint,fontWeight:"400"},badge:{paddingHorizontal:7,paddingVertical:1,borderRadius:5,backgroundColor:ye.badgeBg},badgeText:{color:ye.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:ye.tileBorder,backgroundColor:ye.tileBg},tileDisabled:{opacity:.35},tileText:{color:ye.tileText,fontSize:11,fontWeight:"600"}});import{Fragment as ho,useMemo as Er,memo as go}from"react";import{memo as fo}from"react";import{jsx as Ie,jsxs as mt}from"react/jsx-runtime";var Jt=fo(function({added:e,removed:r,modified:t,theme:n,style:o}){return e>0||r>0||t>0?mt(u,{style:[be.container,{backgroundColor:n.summaryBackground,borderTopColor:n.borderColor},o],children:[e>0&&mt(u,{style:[be.badge,{backgroundColor:n.addedBackground}],children:[Ie(g,{style:[be.icon,{color:n.summaryAddedText}],children:"+"}),Ie(g,{style:[be.count,{color:n.summaryAddedText}],children:e}),Ie(g,{style:[be.label,{color:n.summaryAddedText}],children:"new"})]}),r>0&&mt(u,{style:[be.badge,{backgroundColor:n.removedBackground}],children:[Ie(g,{style:[be.icon,{color:n.summaryRemovedText}],children:"\u2212"}),Ie(g,{style:[be.count,{color:n.summaryRemovedText}],children:r}),Ie(g,{style:[be.label,{color:n.summaryRemovedText}],children:"gone"})]}),t>0&&mt(u,{style:[be.badge,{backgroundColor:n.modifiedBackground}],children:[Ie(g,{style:[be.icon,{color:n.summaryModifiedText}],children:"\u2248"}),Ie(g,{style:[be.count,{color:n.summaryModifiedText}],children:t}),Ie(g,{style:[be.label,{color:n.summaryModifiedText}],children:"modified"})]})]}):null}),be=ae.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:T,fontWeight:"700"},count:{fontSize:10,fontFamily:T,fontWeight:"600"},label:{fontSize:9,fontFamily:T,opacity:.9}});var Lr={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"},_t={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"},po={gitClassic:Lr,devToolsDefault:_t};import{Fragment as jr,jsx as G,jsxs as ze}from"react/jsx-runtime";var mo=go(function({oldValue:e,newValue:r,theme:t=_t,options:n={},showThemeName:o=false,height:c=400}){let{hideLineNumbers:i=false,disableWordDiff:a=false,showDiffOnly:l=false,compareMethod:s="words",contextLines:d=3}=n,f={compareMethod:s,disableWordDiff:a,showDiffOnly:l,contextLines:d},y=Er(()=>Ot(e,r,f),[e,r,s,a,l,d]),p=Er(()=>yo(t,c),[t,c]),S=h=>h.map((x,k)=>{let w="transparent";return x.type==="added"?w=t.addedWordHighlight:x.type==="removed"&&(w=t.removedWordHighlight),G(g,{style:[p.wordDiff,{backgroundColor:w}],children:x.value},k)}),D=(h,x=false)=>{if(x)return{background:t.modifiedBackground,text:t.modifiedText,markerBg:t.markerModifiedBackground};switch(h){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"}}},A=(h,x,k,w,C=false)=>{if(C)return ze(jr,{children:[!i&&G(u,{style:[p.gutter,p.emptyGutter],children:G(g,{style:p.lineNumber,children:" "})}),G(u,{style:[p.marker,p.emptyMarker],children:G(g,{style:p.markerText,children:" "})}),G(u,{style:[p.contentCell,p.emptyContent],children:G(g,{style:p.content,children:" "})})]});let N=D(k);return ze(jr,{children:[!i&&G(u,{style:[p.gutter,{backgroundColor:t.lineNumberBackground}],children:G(g,{style:p.lineNumber,children:h||" "})}),G(u,{style:[p.marker,{backgroundColor:N.markerBg}],children:G(g,{style:[p.markerText,{color:t.markerText}],children:w})}),G(u,{style:[p.contentCell,{backgroundColor:N.background}],children:G(g,{style:[p.content,{color:N.text}],children:Array.isArray(x)?S(x):x||" "})})]})},ne=(h,x)=>{if(!l||h===0)return false;let k=x[h-1],w=x[h],C=w.leftLineNumber&&k.leftLineNumber&&w.leftLineNumber-k.leftLineNumber>1,N=w.rightLineNumber&&k.rightLineNumber&&w.rightLineNumber-k.rightLineNumber>1;return C||N},U=(h,x,k)=>{let w=h.type==="removed",C=h.type==="added",N=h.type==="modified",$=h.type==="unchanged";return ze(ho,{children:[ne(x,k)&&G(u,{style:p.separator,children:G(g,{style:p.separatorText,children:"\u2022 \u2022 \u2022"})}),ze(u,{style:p.row,children:[G(u,{style:p.leftSide,children:w||N||$?A(h.leftLineNumber,h.leftContent,N?"removed":h.type,w||N?"-":" "):A(void 0,void 0,"unchanged"," ",true)}),G(u,{style:p.centerDivider}),G(u,{style:p.rightSide,children:C||N||$?A(h.rightLineNumber,h.rightContent,N?"added":h.type,C||N?"+":" "):A(void 0,void 0,"unchanged"," ",true)})]})]},x)},b=y.filter(h=>h.type==="added").length,v=y.filter(h=>h.type==="removed").length,B=y.filter(h=>h.type==="modified").length;return ze(u,{style:[p.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(u,{style:p.themeBadge,children:[G(g,{style:p.themeName,children:t.name}),G(g,{style:p.themeDescription,children:t.description})]}),ze(u,{style:p.header,children:[G(u,{style:p.headerLeft,children:G(g,{style:p.headerTitle,children:"PREV"})}),G(u,{style:p.divider}),G(u,{style:p.headerRight,children:G(g,{style:p.headerTitle,children:"CUR"})})]}),G(Jt,{added:b,removed:v,modified:B,theme:t}),G(Rt,{style:p.scrollView,showsVerticalScrollIndicator:false,contentContainerStyle:p.scrollContent,children:y.length===0?G(u,{style:p.emptyState,children:G(g,{style:p.emptyText,children:l?"No differences found":"No content to display"})}):y.map((h,x)=>U(h,x,y))})]})});function yo(e,r){return ae.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:T,letterSpacing:.5},themeDescription:{fontSize:10,color:e.unchangedText,fontFamily:T,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:T,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:T,color:e.lineNumberText},marker:{width:20,justifyContent:"center",alignItems:"center"},emptyMarker:{backgroundColor:e.contextBackground},markerText:{fontSize:10,fontFamily:T,fontWeight:"600"},contentCell:{flex:1,paddingHorizontal:8,paddingVertical:2},emptyContent:{backgroundColor:e.contextBackground},content:{fontSize:10,fontFamily:T,lineHeight:16},wordDiff:{fontSize:10,fontFamily:T},separator:{height:20,justifyContent:"center",alignItems:"center",backgroundColor:e.separatorBackground},separatorText:{fontSize:8,color:e.separatorText,fontFamily:T,letterSpacing:2},emptyState:{padding:40,alignItems:"center",justifyContent:"center"},emptyText:{fontSize:11,color:e.emptyStateText,fontStyle:"italic",fontFamily:T}})}import{memo as bo}from"react";import{jsx as qt,jsxs as ot}from"react/jsx-runtime";var Mr=bo(function({deltas:e,theme:r}){return e.length===0?null:qt(u,{style:[Ne.container,{backgroundColor:r.summaryBackground,borderTopColor:r.borderColor}],children:e.map(t=>ot(u,{style:Ne.row,children:[qt(g,{style:[Ne.glyph,{color:r.summaryModifiedText}],children:"\u25F7"}),ot(u,{style:Ne.text,children:[ot(g,{style:Ne.headline,children:[t.path?ot(g,{style:[Ne.path,{color:r.lineNumberText}],children:[t.path," "]}):null,qt(g,{style:{color:r.summaryModifiedText},children:t.deltaLabel})]}),ot(g,{style:[Ne.instants,{color:r.lineNumberText}],children:[t.fromLabel," \u2192 ",t.toLabel]})]})]},t.path??"__value__"))})}),Ne=ae.create({container:{borderTopWidth:ae.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 xo}from"react";import{jsx as Or,jsxs as vo}from"react/jsx-runtime";var Hr=xo(function({visible:e,theme:r}){return e?vo(u,{style:[Kt.container,{backgroundColor:r.summaryBackground,borderTopColor:r.borderColor}],children:[Or(g,{style:[Kt.glyph,{color:r.lineNumberText}],children:"{ }"}),Or(g,{style:[Kt.text,{color:r.lineNumberText}],children:"Stored as a JSON string \u2014 decoded below so the change is readable."})]}):null}),Kt=ae.create({container:{flexDirection:"row",alignItems:"center",gap:7,borderTopWidth:ae.hairlineWidth,paddingHorizontal:10,paddingVertical:6},glyph:{fontSize:11,fontWeight:"700"},text:{flex:1,fontSize:11,lineHeight:14}});function Zt(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}}function $r(e){return tt(e)||e===void 0||e===null}function Pr(e,r){let t=Zt(e),n=Zt(r);return t&&n?{left:t.value,right:n.value,decoded:true}:t&&$r(r)?{left:t.value,right:r,decoded:true}:n&&$r(e)?{left:e,right:n.value,decoded:true}:{left:e,right:r,decoded:false}}var Co=/^\d{4}-\d{2}-\d{2}(?:[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d{1,9})?)?(?:Z|[+-]\d{2}:?\d{2})?)?$/;function Gr(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}function Yt(e){if(e instanceof Date){let n=e.getTime();return Number.isFinite(n)?{kind:"iso",epochMs:n}:null}if(typeof e=="number")return Gr(e);if(typeof e!="string")return null;let r=e.trim();if(r==="")return null;if(/^\d+$/.test(r))return Gr(Number(r));if(!Co.test(r))return null;let t=Date.parse(r);return Number.isFinite(t)?{kind:"iso",epochMs:t}:null}function it(e){return e<10?`0${e}`:String(e)}function Qt(e){let r=new Date(e);return`${r.getFullYear()}-${it(r.getMonth()+1)}-${it(r.getDate())} ${it(r.getHours())}:${it(r.getMinutes())}:${it(r.getSeconds())}`}function Ur(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 c=Math.floor(n/60),i=n%60;if(c<24)return i?`${c}h ${i}m`:`${c}h`;let a=Math.floor(c/24),l=c%24;return l?`${a}d ${l}h`:`${a}d`}function Jr(e,r,t){let n=Yt(e),o=Yt(r);if(!n||!o||n.kind!==o.kind)return null;let c=o.epochMs-n.epochMs;return{path:t,kind:n.kind,deltaMs:c,deltaLabel:c===0?"same instant":`${Ur(c)} ${c<0?"earlier":"later"}`,fromLabel:Qt(n.epochMs),toLabel:Qt(o.epochMs)}}function _r(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&!(e instanceof Date)}var ko=6;function qr(e,r){let t=Jr(e,r);if(t)return[t];if(!_r(e)||!_r(r))return[];let n=[];for(let o of Object.keys(e)){if(n.length>=ko)break;if(!(o in r)||Object.is(e[o],r[o]))continue;let c=Jr(e[o],r[o],o);c&&n.push(c)}return n}import{Fragment as yt,memo as Kr,useCallback as bt,useEffect as wo,useMemo as Fe,useRef as To,useState as So}from"react";import{jsx as z,jsxs as Ee}from"react/jsx-runtime";var Do={hideLineNumbers:false,disableWordDiff:false,showDiffOnly:false,compareMethod:"words",contextLines:3,lineOffset:0};function Bo({oldValue:e,newValue:r,theme:t,options:n=Do,showThemeName:o=false,scrollEnabled:c=true}){let i=Fe(()=>zo(t,c),[t,c]),a=Fe(()=>({compareMethod:n.compareMethod,disableWordDiff:n.disableWordDiff,showDiffOnly:n.showDiffOnly,contextLines:n.contextLines}),[n.compareMethod,n.disableWordDiff,n.showDiffOnly,n.contextLines]),l=Fe(()=>Pr(e,r),[e,r]),s=Fe(()=>Ot(l.left,l.right,a),[l,a]),d=Fe(()=>{let v=0,B=0,h=0;for(let x of s)x.type==="added"?v++:x.type==="removed"?B++:x.type==="modified"&&h++;return{added:v,removed:B,modified:h}},[s]),f=Fe(()=>qr(l.left,l.right),[l]),[y,p]=So(()=>new Set),S=To(false);wo(()=>{if(!S.current){S.current=true;return}p(new Set)},[e,r]);let D=Fe(()=>Ao(s,y),[s,y]),A=bt(v=>{p(B=>{let h=new Set(B);return h.has(v)?h.delete(v):h.add(v),h})},[]),ne=bt(v=>v.kind==="row"?`r:${v.diffIndex}`:`f:${v.foldId}`,[]),U=bt(v=>v.kind==="fold"?z(Ro,{foldId:v.foldId,count:v.count,expanded:v.expanded,theme:t,styles:i,onToggle:A}):z(Vo,{diff:v.diff,showSeparator:false,theme:t,options:n,styles:i}),[t,n,i,A]),b=bt(({item:v})=>U(v),[U]);return Ee(u,{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&&Ee(u,{style:i.themeBadge,children:[z(g,{style:i.themeName,children:t.name}),z(g,{style:i.themeDescription,children:t.description})]}),Ee(u,{style:i.header,children:[z(u,{style:i.headerLeft,children:z(g,{style:i.headerTitle,children:"PREV"})}),z(u,{style:i.divider}),z(u,{style:i.headerRight,children:z(g,{style:i.headerTitle,children:"CUR"})})]}),z(Jt,{added:d.added,removed:d.removed,modified:d.modified,theme:t}),z(Hr,{visible:l.decoded,theme:t}),z(Mr,{deltas:f,theme:t}),s.length===0?z(u,{style:i.emptyState,children:z(g,{style:i.emptyText,children:n.showDiffOnly?"No differences found":"No content to display"})}):c?z(It,{style:i.scrollView,contentContainerStyle:i.scrollContent,data:D,renderItem:b,keyExtractor:ne,showsVerticalScrollIndicator:false,initialNumToRender:20,maxToRenderPerBatch:20,windowSize:7,removeClippedSubviews:true}):z(u,{style:i.scrollContent,children:D.map(v=>z(yt,{children:U(v)},ne(v)))})]})}var Zr=3,Io=4;function Ao(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-Zr),s=Math.min(t-1,a+Zr);for(let d=l;d<=s;d++)n[d]=true}let o=[],c=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<Io)for(let s=i;s<a;s++)o.push({kind:"row",diff:e[s],diffIndex:s});else{let s=c++,d=r.has(s);if(o.push({kind:"fold",foldId:s,count:l,expanded:d}),d)for(let f=i;f<a;f++)o.push({kind:"row",diff:e[f],diffIndex:f})}i=a}return o}var Ro=Kr(function({foldId:e,count:r,expanded:t,theme:n,styles:o,onToggle:c}){return z(Q,{style:[o.foldHeader,{backgroundColor:n.separatorBackground}],onPress:()=>c(e),activeOpacity:.7,children:z(g,{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`})})}),Vo=Kr(function({diff:e,showSeparator:r,theme:t,options:n,styles:o}){let c=e.type==="removed",i=e.type==="added",a=e.type==="modified",l=e.type==="unchanged";return Ee(yt,{children:[r&&z(u,{style:o.separator,children:z(g,{style:o.separatorText,children:"\u2022 \u2022 \u2022"})}),Ee(u,{style:o.row,children:[z(u,{style:o.leftSide,children:c||a||l?z(Yr,{lineNumber:e.leftLineNumber,content:e.leftContent,type:a?"removed":e.type,marker:c||a?"-":" ",theme:t,options:n,styles:o}):z(Qr,{options:n,styles:o})}),z(u,{style:o.centerDivider}),z(u,{style:o.rightSide,children:i||a||l?z(Yr,{lineNumber:e.rightLineNumber,content:e.rightContent,type:a?"added":e.type,marker:i||a?"+":" ",theme:t,options:n,styles:o}):z(Qr,{options:n,styles:o})})]})]})});function Yr({lineNumber:e,content:r,type:t,marker:n,theme:o,options:c,styles:i}){let a=Wo(t,o);return Ee(yt,{children:[!c.hideLineNumbers&&z(u,{style:[i.gutter,{backgroundColor:o.lineNumberBackground}],children:z(g,{style:i.lineNumber,children:e||" "})}),z(u,{style:[i.marker,{backgroundColor:a.markerBg}],children:z(g,{style:[i.markerText,{color:o.markerText}],children:n})}),z(u,{style:[i.contentCell,{backgroundColor:a.background}],children:z(g,{style:[i.content,{color:a.text}],children:Array.isArray(r)?r.map((l,s)=>{let d="transparent";return l.type==="added"?d=o.addedWordHighlight:l.type==="removed"&&(d=o.removedWordHighlight),z(g,{style:[i.wordDiff,{backgroundColor:d}],children:l.value},s)}):r||" "})})]})}function Qr({options:e,styles:r}){return Ee(yt,{children:[!e.hideLineNumbers&&z(u,{style:[r.gutter,r.emptyGutter],children:z(g,{style:r.lineNumber,children:" "})}),z(u,{style:[r.marker,r.emptyMarker],children:z(g,{style:r.markerText,children:" "})}),z(u,{style:[r.contentCell,r.emptyContent],children:z(g,{style:r.content,children:" "})})]})}function Wo(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"}}}function zo(e,r){return ae.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:T,letterSpacing:.5},themeDescription:{fontSize:10,color:e.unchangedText,fontFamily:T,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:T,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:T,color:e.lineNumberText},marker:{width:20,justifyContent:"center",alignItems:"center"},emptyMarker:{backgroundColor:e.contextBackground},markerText:{fontSize:10,fontFamily:T,fontWeight:"600"},contentCell:{flex:1,paddingHorizontal:8,paddingVertical:2},emptyContent:{backgroundColor:e.contextBackground},content:{fontSize:10,fontFamily:T,lineHeight:16},wordDiff:{fontSize:10,fontFamily:T},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:T,fontWeight:"700"},separator:{height:20,justifyContent:"center",alignItems:"center",backgroundColor:e.separatorBackground},separatorText:{fontSize:8,color:e.separatorText,fontFamily:T,letterSpacing:2},foldHeader:{paddingVertical:6,paddingHorizontal:12,alignItems:"center",justifyContent:"center",borderTopWidth:1,borderBottomWidth:1,borderColor:e.borderColor},foldHeaderText:{fontSize:10,fontFamily:T,letterSpacing:.5},emptyState:{padding:40,alignItems:"center",justifyContent:"center"},emptyText:{fontSize:11,color:e.emptyStateText,fontStyle:"italic",fontFamily:T}})}import{useCallback as Ge,useState as Ue}from"react";function Xr(e,r){let[t,n]=Ue(void 0),[o,c]=Ue(false),[i,a]=Ue(false),[l,s]=Ue(null),[d,f]=Ue(),[y,p]=Ue(""),S=o&&t!==void 0?t:e,D=o&&JSON.stringify(t)!==y,A=Ge(()=>{n(e),p(JSON.stringify(e)),f(void 0),s(null),c(true)},[e]),ne=Ge(h=>{n(k=>zr(k,h));let x=Vr(h);x!==void 0&&f(x)},[]),U=Ge(h=>{f(h)},[]),b=Ge(()=>{c(false),n(void 0),f(void 0),s(null)},[]),v=Ge(()=>{n(e),p(JSON.stringify(e)),f(void 0),s(null),c(true)},[e]),B=Ge(async()=>{if(!D||!r)return b(),true;a(true),s(null);try{return await r(t),b(),true}catch(h){return s(h instanceof Error?h.message:String(h)),false}finally{a(false)}},[t,D,b,r]);return{isEditing:o,value:S,isDirty:D,isSaving:i,error:l,selectPath:d,begin:A,apply:ne,selectAt:U,commit:B,discard:v}}import{useCallback as xt,useEffect as No,useState as en}from"react";function Fo({value:e,save:r,onClose:t,confirmDiscard:n}){let o=Xr(e,r),[c,i]=en(null),[a,l]=en(null),{begin:s}=o;No(()=>{s()},[]);let d=xt(S=>{let D=$t(o.value,S);if(typeof D=="boolean"){o.apply({kind:"replace",path:S,value:!D});return}l(S)},[o]),f=xt(S=>{o.apply({kind:"replace",path:a??[],value:S}),l(null)},[o,a]),y=xt(()=>{o.commit().then(S=>S&&t())},[o,t]),p=xt(()=>{if(!o.isDirty){t();return}n({save:y,discard:()=>{o.discard(),t()}})},[n,o,t,y]);return{draft:o,selection:c,setSelection:i,valuePath:a,openValueEditor:d,closeValueEditor:()=>l(null),applyValue:f,openRawEditor:()=>l([]),requestClose:p,saveAndClose:y}}import{useState as Eo}from"react";import{jsx as se,jsxs as vt}from"react/jsx-runtime";function Lo(e){return typeof e=="boolean"?"boolean":typeof e=="number"?"number":e!==null&&typeof e=="object"?"raw":"text"}function jo(e,r){return r==="raw"?JSON.stringify(e,null,2):e==null?"":String(e)}function Mo(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."}}function Oo({path:e,value:r,onSave:t,onCancel:n,saveLabel:o="Save",busy:c=false,testIDPrefix:i="buoy-data-value"}){let a=Lo(r),l=He(r),[s,d]=Eo(()=>jo(r,a)),f=tn(s,a,l),y=c||f!=null,p=()=>{c||tn(s,a,l)!=null||t($o(s,a,r))};return vt(u,{style:q.overlay,children:[se(Q,{style:q.scrim,activeOpacity:1,onPress:c?void 0:n,testID:`${i}-scrim`,accessibilityRole:"button",accessibilityLabel:"Dismiss editor"}),se(u,{style:q.panel,pointerEvents:"box-none",children:vt(u,{style:q.card,children:[vt(u,{style:q.headerRow,children:[se(g,{style:q.title,children:"Edit value"}),se(u,{style:q.typeBadge,children:se(g,{style:q.typeBadgeText,children:l})})]}),se(g,{style:q.path,numberOfLines:1,children:ft(e)}),a==="boolean"?se(Ho,{current:r===true,onPick:t,testIDPrefix:i}):se(Rt,{style:q.fieldScroll,keyboardShouldPersistTaps:"handled",children:se(At,{testID:`${i}-input`,accessibilityLabel:"Value",value:s,onChangeText:d,autoFocus:true,autoCapitalize:"none",autoCorrect:false,spellCheck:false,editable:!c,multiline:a!=="number",keyboardType:a==="number"?"numeric":a==="raw"?"ascii-capable":"default",onSubmitEditing:a==="number"?p:void 0,placeholder:a==="raw"?"{ }":"value",placeholderTextColor:m.color.placeholder,style:[q.input,a==="raw"&&q.inputRaw,a!=="number"&&q.inputMultiline,f!=null&&q.inputInvalid]})}),se(g,{style:f!=null?q.error:q.hint,children:f??Mo(a,l)}),vt(u,{style:q.actions,children:[se(Q,{onPress:n,disabled:c,testID:`${i}-cancel`,accessibilityRole:"button",accessibilityLabel:"Cancel edit",style:q.cancelButton,children:se(g,{style:q.cancelText,children:"Cancel"})}),a==="boolean"?null:se(Q,{onPress:p,disabled:y,testID:`${i}-save`,accessibilityRole:"button",accessibilityLabel:o,style:[q.saveButton,y&&q.saveDisabled],children:se(g,{style:q.saveText,children:c?"Saving\u2026":o})})]})]})})]})}function Ho({current:e,onPick:r,testIDPrefix:t}){return se(u,{style:q.boolRow,children:[true,false].map(n=>se(Q,{onPress:()=>r(n),testID:`${t}-${n}`,accessibilityRole:"button",accessibilityLabel:`Set ${n}`,style:[q.boolButton,e===n&&q.boolActive],children:se(g,{style:[q.boolText,e===n&&q.boolTextActive],children:String(n)})},String(n)))})}function tn(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 He(n)!==t?`Must stay ${t} \u2014 that parses as ${He(n)}.`:null}return null}function $o(e,r,t){return r==="number"?Number(e):r==="raw"?JSON.parse(e):t===null&&e===""?null:e}var q=ae.create({overlay:{...ar,zIndex:20},scrim:{...ar,backgroundColor:"rgba(0,0,0,0.55)"},panel:{padding:12},card:{backgroundColor:m.color.surface,borderRadius:14,borderWidth:1,borderColor:m.color.border,padding:14,gap:8},headerRow:{flexDirection:"row",alignItems:"center",gap:8},title:{flex:1,color:m.color.text,fontSize:14,fontWeight:"700"},typeBadge:{paddingHorizontal:8,paddingVertical:2,borderRadius:6,backgroundColor:m.color.surfaceElevated},typeBadgeText:{color:I.semantic.warning,fontSize:10,fontWeight:"700",fontFamily:T},path:{color:m.color.textTertiary,fontSize:11,fontFamily:T},fieldScroll:{maxHeight:240},input:{color:m.color.text,backgroundColor:m.color.surfaceElevated,borderWidth:1,borderColor:m.color.border,borderRadius:10,paddingHorizontal:12,paddingVertical:10,fontSize:14,fontFamily:T},inputMultiline:{minHeight:110,lineHeight:20,textAlignVertical:"top"},inputRaw:{minHeight:180,fontSize:12,lineHeight:18},inputInvalid:{borderColor:m.color.danger},hint:{color:m.color.textTertiary,fontSize:11,lineHeight:16},error:{color:m.color.danger,fontSize:11,lineHeight:16,fontFamily:T},actions:{flexDirection:"row",gap:8,paddingTop:2},cancelButton:{flex:1,minHeight:44,alignItems:"center",justifyContent:"center",borderRadius:10,borderWidth:1,borderColor:m.color.border},cancelText:{color:m.color.textSecondary,fontSize:14,fontWeight:"600"},saveButton:{flex:1.4,minHeight:44,alignItems:"center",justifyContent:"center",borderRadius:10,backgroundColor:m.color.accent},saveDisabled:{opacity:.35},saveText:{color:m.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:m.color.border,backgroundColor:m.color.surfaceElevated},boolActive:{borderColor:I.semantic.warning,backgroundColor:I.semantic.warning+"18"},boolText:{color:m.color.textTertiary,fontSize:16,fontWeight:"700",fontFamily:T},boolTextActive:{color:I.semantic.warning}});import{useState as Ct,useMemo as kt,useCallback as Le,useRef as Je,useEffect as rn,memo as wt}from"react";var _e=(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,...c]=r,i=n.get(o);return n.set(o,_e(i??null,c,t)),n}if(e instanceof Set){let n=_e(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,...c]=r;return n[o]=_e(n[o],c,t),n}if(e instanceof Object){let n={...e};if(r.length===1)return n[r[0]]=t,n;let[o,...c]=r;return n[o]=_e(n[o],c,t),n}return e},qe=(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,qe(t.get(n),o)),t}if(e instanceof Set){let t=qe(Array.from(e),r);return new Set(t)}if(Array.isArray(e)){let t=[...e];if(r.length===1)return t.filter((c,i)=>i.toString()!==r[0]);let[n,...o]=r;return t[n]=qe(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]=qe(t[n],o),t}return e};import{Fragment as Tt,jsx as O,jsxs as fe}from"react/jsx-runtime";var at=100,Ke={top:8,bottom:8,left:8,right:8},nn=12,Po=["DATA","STATE","VALUE","QUERY","QUERYKEY","TYPES","STATS","OPTIONS","OBSERVERS"],Go=e=>e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");function Uo(e){return e.length===0?"buoy-live-explorer-root":`buoy-live-explorer-${e.map(Go).filter(Boolean).join("-")}`}var Jo=(e,r=at)=>{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},Xt=wt(({expanded:e,isFocused:r=false,isMain:t=false})=>O(u,{style:[R.expanderIcon,t&&R.expanderIconMain,e?R.expanded:R.collapsed],children:e?O(lt,{size:t?14:nn,color:r?m.color.accent:t?m.color.text:m.color.textSecondary,strokeWidth:2.5}):O(dr,{size:t?14:nn,color:r?m.color.accent:t?m.color.text:m.color.textSecondary,strokeWidth:2.5})}));Xt.displayName="Expander";var on=wt(({value:e,isFocused:r=false})=>O(or,{value:e,isFocused:r,buttonStyle:r?{...R.buttonStyle,...R.buttonStyleFocused}:R.buttonStyle}));on.displayName="CopyButton";var er=wt(({dataPath:e,writer:r,testID:t,isFocused:n=false})=>{let o=Le(()=>{r?.remove?.(e)},[r,e]);return r?.remove?O(Q,{"sentry-label":"ignore devtools explorer delete button",testID:`${t}-delete`,accessibilityRole:"button",onPress:o,style:[R.deleteButton,n&&R.deleteButtonFocused],accessibilityLabel:"Delete item",hitSlop:Ke,activeOpacity:.7,children:O(Dt,{size:14,strokeWidth:2,color:n?m.color.danger:m.color.danger+"CC"})}):null});er.displayName="DeleteItemButton";var an=wt(({dataPath:e,writer:r,testID:t,isFocused:n=false})=>{let o=Le(()=>{r?.update(e,[])},[r,e]);return r?O(Q,{"sentry-label":"ignore devtools explorer clear button",testID:`${t}-clear`,style:[R.clearButton,n&&R.clearButtonFocused],accessibilityRole:"button",accessibilityLabel:"Remove all items","aria-label":"Remove all items",onPress:o,hitSlop:Ke,activeOpacity:.7,children:O(g,{style:[R.clearButtonText,{color:n?m.color.warning:m.color.warning+"CC"}],children:"[]"})}):null});an.displayName="ClearArrayButton";function _o({dataPath:e,writer:r,testID:t,value:n,removable:o}){let c=Le(()=>{if(!r)return;let s=typeof n=="boolean"?n:false;r.update(e,!s)},[r,e,n]),i=Le(()=>{r?.remove?.(e)},[r,e]);if(!r)return null;let a=n?R.toggleBadgeTrue:R.toggleBadgeFalse,l=n?R.toggleTextTrue:R.toggleTextFalse;return fe(u,{style:R.toggleRow,children:[O(Q,{"sentry-label":"ignore devtools explorer toggle button",testID:`${t}-toggle`,accessibilityRole:"button",accessibilityLabel:`${e[e.length-1]??"value"}, ${n?"true":"false"}`,style:R.modernToggleButton,onPress:c,hitSlop:Ke,activeOpacity:.8,children:O(u,{style:[R.toggleBadge,a],children:O(g,{style:[R.toggleBadgeText,l],children:n?"TRUE":"FALSE"})})}),o&&r.remove?O(Q,{"sentry-label":"ignore devtools explorer delete button in toggle",testID:`${t}-delete`,accessibilityRole:"button",onPress:i,style:R.deleteButtonInToggle,accessibilityLabel:"Delete item",hitSlop:Ke,activeOpacity:.7,children:O(Dt,{size:14,strokeWidth:2,color:m.color.danger+"CC"})}):null]})}function tr({editable:e,label:r,value:t,defaultExpanded:n,writer:o,dataPath:c,itemsDeletable:i,dataVersion:a=0,testIDForPath:l=Uo,debounceMs:s=0}){let[d,f]=Ct(false),[y,p]=Ct("");rn(()=>{if(t!=null&&(typeof t=="string"||typeof t=="number")){let E=t.toString();p(E)}},[t,r,a]);let S=kt(()=>Po.includes(r.toUpperCase()),[r]),[D,A]=Ct((n||[]).includes(r)),ne=()=>A(E=>!E),[U,b]=Ct([]),v=kt(()=>t==null||typeof t!="object"?[]:Array.isArray(t)?(t.length>1e3?t.slice(0,1e3):t).map((E,F)=>({label:F.toString(),value:E})):t instanceof Map?Array.from(t.entries()).slice(0,1e3).map(([E,F])=>({label:E.toString(),value:F})):t instanceof Set?Array.from(t).slice(0,1e3).map((E,F)=>({label:F.toString(),value:E})):Object.entries(t).slice(0,1e3).map(([E,F])=>({label:E,value:F})),[t]),B=kt(()=>Array.isArray(t)?"array":t===null||typeof t!="object"?typeof t:t instanceof Map||t instanceof Set?"Iterable":"object",[t]),h=kt(()=>Jo(v,at),[v]),x=c??[],k=l(x),w=e===true&&i===true&&o?.remove!=null&&(o.canRemove?.(x)??true),C=Je(o),N=Je(x),$=Je(B);C.current=o,N.current=x,$.current=B;let de=Je(null),re=Je(null),oe=Le(()=>{re.current&&(clearTimeout(re.current),re.current=null);let E=de.current;de.current=null,E&&C.current?.update(E.path,E.value)},[]);rn(()=>()=>oe(),[oe]);let Z=Je(s);Z.current=s;let Y=Le((E,F)=>{if(p(F),!C.current||E&&isNaN(Number(F)))return;let K=$.current==="number"?Number(F):F,L=Z.current;L>0?(de.current={path:N.current,value:K},re.current&&clearTimeout(re.current),re.current=setTimeout(oe,L)):C.current.update(N.current,K)},[oe,p]),te=Le(E=>{let F=(Number(y)||0)+E;p(String(F)),de.current=null,re.current&&(clearTimeout(re.current),re.current=null),C.current?.update(N.current,F)},[y]);return O(u,{style:R.minWidthWrapper,children:fe(u,{style:R.fullWidthMarginRight,children:[h.length>0&&fe(Tt,{children:[fe(u,{style:[R.flexRowItemsCenterGap,S&&R.flexRowItemsCenterGapMain],children:[fe(Q,{"sentry-label":"ignore devtools explorer expander button",style:R.expanderButton,testID:k,accessibilityRole:"button",accessibilityLabel:`${r}, ${v.length} ${v.length===1?"item":"items"}`,accessibilityState:{expanded:D},onPress:ne,hitSlop:Ke,activeOpacity:.6,children:[O(Xt,{expanded:D,isFocused:d,isMain:S}),O(g,{style:[R.labelText,d&&R.labelTextFocused,S&&R.labelTextMain],children:r}),O(g,{style:R.textGray500,children:`${String(B).toLowerCase()==="iterable"?"(Iterable) ":""}${v.length} ${v.length>1?"items":"item"}`})]}),e&&fe(u,{style:R.flexRowGapItemsCenter,children:[O(on,{value:t,isFocused:d}),w&&O(er,{writer:o,dataPath:x,testID:k,isFocused:d}),B==="array"&&o!==void 0&&O(an,{writer:o,dataPath:x,testID:k,isFocused:d})]})]}),D&&fe(Tt,{children:[h.length===1&&O(u,{style:[R.singleEntryContainer,S&&R.singleEntryContainerMain],children:v.map((E,F)=>O(tr,{defaultExpanded:n,label:E.label,value:E.value,editable:e,dataPath:[...x,E.label],writer:o,itemsDeletable:B==="array"||B==="Iterable"||B==="object",dataVersion:a,testIDForPath:l,debounceMs:s},E.label+F))}),h.length>1&&O(u,{style:R.multiEntryContainer,children:h.map((E,F)=>O(u,{children:fe(u,{style:R.relativeOutlineNone,children:[fe(Q,{"sentry-label":"ignore devtools explorer page toggle",onPress:()=>b(K=>K.includes(F)?K.filter(L=>L!==F):[...K,F]),style:R.pageExpanderButton,hitSlop:Ke,children:[O(Xt,{expanded:U.includes(F)}),fe(g,{style:R.pageRangeText,children:["[",F*at,"...",F*at+at-1,"]"]})]}),U.includes(F)&&O(u,{style:R.entriesContainer,children:E.map(K=>O(tr,{defaultExpanded:n,label:K.label,value:K.value,editable:e,dataPath:[...x,K.label],writer:o,dataVersion:a,testIDForPath:l,debounceMs:s},K.label))})]})},F))})]})]}),h.length===0&&fe(u,{style:R.flexRowGapFullWidth,children:[e&&o!==void 0&&(B==="string"||B==="number"||B==="boolean")?fe(Tt,{children:[e&&o&&(B==="string"||B==="number")&&O(u,{style:R.nebulaInputWrapper,children:O(Tr,{label:r,testID:`${k}-input`,accessibilityLabel:`${r}, editable value`,style:[B==="number"?R.textNumber:R.textString],keyboardType:B==="number"?"numeric":"default",value:y,onChangeText:E=>Y(B==="number",E),onFocus:()=>f(true),onBlur:()=>{oe(),f(false)},showNumberControls:B==="number",onIncrement:()=>te(1),onDecrement:()=>te(-1),showDeleteButton:w,onDelete:()=>{o?.remove?.(x)}})}),B==="boolean"&&fe(u,{style:R.booleanRowContainer,children:[O(g,{style:R.booleanLabel,children:r}),O(u,{style:R.booleanToggleWrapper,children:O(_o,{writer:o,dataPath:x,testID:k,value:t,removable:w})})]})]}):fe(Tt,{children:[O(g,{style:R.text344054,children:r}),O(g,{testID:`${k}-value`,style:R.displayValueText,children:ir(t)})]}),e&&w&&B!=="string"&&B!=="number"&&B!=="boolean"&&O(er,{writer:o,dataPath:x,testID:k,isFocused:d})]})]})})}function qo(e){return{update:(r,t)=>{e.setRoot(_e(e.getRoot(),r,t))},remove:r=>{e.setRoot(qe(e.getRoot(),r))},canRemove:e.canRemove}}var R=ae.create({buttonStyle:{backgroundColor:m.color.surface+"E6",borderWidth:1,borderColor:m.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:m.color.accent+"CC",backgroundColor:m.color.accent+"26",shadowColor:m.color.accent,shadowOpacity:.3,shadowRadius:4},deleteButton:{backgroundColor:m.color.danger+"1A",borderColor:m.color.danger+"4D",borderWidth:1,borderRadius:6,padding:0,alignItems:"center",justifyContent:"center",width:28,height:28,position:"relative",shadowColor:m.color.danger,shadowOffset:{width:0,height:0},shadowOpacity:.15,shadowRadius:3},deleteButtonFocused:{borderColor:m.color.danger+"CC",backgroundColor:m.color.danger+"33",shadowOpacity:.3,shadowRadius:5},deleteButtonInToggle:{backgroundColor:m.color.danger+"1A",borderColor:m.color.danger+"4D",borderWidth:1,borderRadius:6,padding:0,alignItems:"center",justifyContent:"center",width:28,height:28,shadowColor:m.color.danger,shadowOffset:{width:0,height:0},shadowOpacity:.15,shadowRadius:3},clearButton:{backgroundColor:m.color.warning+"1A",borderWidth:1,borderColor:m.color.warning+"4D",borderRadius:6,flexDirection:"row",padding:0,alignItems:"center",justifyContent:"center",width:28,height:28,position:"relative",zIndex:10,shadowColor:m.color.warning,shadowOffset:{width:0,height:0},shadowOpacity:.15,shadowRadius:3},clearButtonFocused:{borderColor:m.color.warning+"CC",backgroundColor:m.color.warning+"33",shadowOpacity:.3,shadowRadius:5},clearButtonText:{fontSize:12,fontWeight:"700",fontFamily:T},expanderIcon:{width:18,height:18,alignItems:"center",justifyContent:"center",marginRight:1,backgroundColor:m.color.textSecondary+"14",borderRadius:3},expanderIconMain:{backgroundColor:m.color.textSecondary+"1A",width:20,height:20,borderRadius:4,borderWidth:.5,borderColor:m.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:m.color.surface+"66",borderWidth:.5,borderColor:m.color.textSecondary+"1A"},flexRowItemsCenterGapMain:{backgroundColor:m.color.surface+"E6",borderLeftWidth:2.5,borderLeftColor:m.color.textSecondary+"80",borderColor:m.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:m.color.textSecondary,fontSize:10,fontWeight:"600",marginRight:4,fontFamily:T,letterSpacing:.4},labelTextFocused:{color:m.color.text},labelTextMain:{color:m.color.text,fontSize:11,fontWeight:"700",letterSpacing:.6},textGray500:{color:m.color.textTertiary,fontSize:10,fontWeight:"400",fontFamily:T,opacity:.7},pageRangeText:{color:m.color.textSecondary,fontSize:10,fontWeight:"600",fontFamily:T},flexRowGapItemsCenter:{flexDirection:"row",alignItems:"center",gap:4,paddingLeft:2},singleEntryContainer:{marginLeft:2,marginTop:2,paddingLeft:8,borderLeftWidth:1.5,borderLeftColor:m.color.textSecondary+"40"},singleEntryContainerMain:{borderLeftColor:m.color.textSecondary+"4D",marginLeft:4,paddingLeft:10},multiEntryContainer:{marginLeft:2,marginTop:2,paddingLeft:8,borderLeftWidth:1.5,borderLeftColor:m.color.textSecondary+"40"},relativeOutlineNone:{position:"relative"},pageExpanderButton:{flexDirection:"row",alignItems:"center",backgroundColor:m.color.surface+"66",paddingVertical:3,paddingHorizontal:6,gap:6,borderRadius:4,borderWidth:.5,borderColor:m.color.textSecondary+"1A",marginBottom:2,minHeight:24},entriesContainer:{marginLeft:2,paddingLeft:8,marginTop:2,borderLeftWidth:1.5,borderLeftColor:m.color.textSecondary+"40"},textNumber:{color:m.color.text,fontWeight:"600",fontFamily:T},textString:{color:m.color.text,fontFamily:T},flexRowGapFullWidth:{flexDirection:"row",width:"100%",alignItems:"center",marginVertical:1,gap:6,paddingHorizontal:4,paddingVertical:2,borderRadius:3},text344054:{color:m.color.textSecondary,fontWeight:"600",fontSize:9,minWidth:50,fontFamily:T,letterSpacing:.4,opacity:.8},nebulaInputWrapper:{flex:1,width:"100%",position:"relative"},displayValueText:{flex:1,color:m.color.text,fontWeight:"400",fontFamily:T,fontSize:12,paddingVertical:6,paddingHorizontal:10,borderRadius:6,borderWidth:1,borderColor:m.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:m.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:T},toggleBadgeTrue:{backgroundColor:m.color.accent+"1A",borderColor:m.color.accent+"4D"},toggleBadgeFalse:{backgroundColor:m.color.textTertiary+"1A",borderColor:m.color.textTertiary+"4D"},toggleTextTrue:{color:m.color.accent,fontWeight:"600"},toggleTextFalse:{color:m.color.textSecondary,fontWeight:"500"},booleanRowContainer:{flexDirection:"row",alignItems:"center",width:"100%",gap:8,paddingVertical:2},booleanLabel:{color:m.color.textSecondary,fontSize:10,fontWeight:"600",fontFamily:T,letterSpacing:.4,minWidth:60,flexShrink:0},booleanToggleWrapper:{flex:1}});export{Br as ABSENT_VALUE,Tr as CyberpunkInput,ao as DataTreeActionBar,uo as DataTreeActionDock,lo as DataTreeInlineEditor,Nn as DataViewer,Jt as DiffSummary,Dr as DiffType,Sr as IndentGuides,ct as IndentGuidesOverlay,Hr as JsonStringNotice,tr as LiveExplorer,mo as SplitDiffViewer,Bo as ThemedSplitView,Mr as TimestampDeltaBar,Xn as TreeDiffViewer,kr as TypeLegend,Oo as ValueEditModal,Et as VirtualizedDataExplorer,zr as applyJsonOp,sn as boundedDeepEqual,ft as breadcrumb,Ot as computeLineDiff,Pr as decodeJsonStringPair,qe as deleteNestedDataByPath,qr as describeTimestampDeltas,Yt as detectTimestamp,_t as devToolsDefaultTheme,po as diffThemes,Ur as formatDuration,Qt as formatInstant,$t as getAtPath,Lr as gitClassicTheme,tt as isAbsent,Wr as isEditableContainer,gn as jsonLikelyLargerThan,qo as makeRootWriter,un as objectDiff,Zt as parseJsonContainer,Vr as selectionPathAfterOp,Pt as suggestedNewValue,hn as toDiffable,Fr as treeActionMap,Gt as treeActionsFor,He as typeLabel,_e as updateNestedDataByPath,Xr as useTreeDraft,Fo as useTreeEditor};
|
|
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{P as Sr}from"./chunks/chunk-FA6WAQUA.mjs";import"./chunks/chunk-HIAN3HBD.mjs";import"./chunks/chunk-4YLP5MMN.mjs";import{a as y}from"./chunks/chunk-GF5C5DVX.mjs";import"./chunks/chunk-HPZXETRA.mjs";import{d as Dr,g as Br}from"./chunks/chunk-4HIK66DZ.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-CJTGUGMQ.mjs";import{a as A,d as U,f as ae}from"./chunks/chunk-AHVO74UQ.mjs";import"./chunks/chunk-P32XO2YS.mjs";import"./chunks/chunk-7JJHWSTD.mjs";import{J as le,N as Mt,a as h,b as f,c as Ot,d as Y,h as Pt,r as N}from"./chunks/chunk-5G6RSRP4.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};
|
package/lib/web/floating.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{a as s,b as a,c as o,d as t,e as i,f as l,g as e,h as n,i as
|
|
1
|
+
"use client";import{a as s,b as a,c as o,d as t,e as i,f as l,g as e,h as n,i as r,j as g,k as T,l as F,m as c,n as u,o as m,p}from"./chunks/chunk-4YLP5MMN.mjs";import"./chunks/chunk-GF5C5DVX.mjs";import{b as P,c as b,d}from"./chunks/chunk-SBYYOE2T.mjs";import"./chunks/chunk-T6T3FEMU.mjs";export{s as ARROW_BOTTOM_OFFSET,a as ARROW_HEIGHT,b as BuoyPortal,g as FloatingTool,e as FloatingToolDivider,p as FloatingToolHost,n as FloatingToolUserStatus,o as SPACING_GAP,l as calculateTargetPosition,i as calculateTooltipPosition,u as dismissFloatingTool,r as getBubbleAnchorPosition,P as getBuoyPortalHost,T as getFloatingTools,t as getScreenCenterY,d as listenBuoyKeydown,c as openFloatingTool,m as registerPersistentFloatingTool,F as subscribeFloatingTools};
|
package/lib/web/history.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{a as
|
|
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-3HELV44Y.mjs";import"./chunks/chunk-HIAN3HBD.mjs";import"./chunks/chunk-GF5C5DVX.mjs";import"./chunks/chunk-CJTGUGMQ.mjs";import"./chunks/chunk-AHVO74UQ.mjs";import"./chunks/chunk-5G6RSRP4.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};
|
package/lib/web/hooks.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{a as e,b as s,c as a,d as t,e as r,f as o,g as i,h as f}from"./chunks/chunk-
|
|
1
|
+
"use client";import{a as e,b as s,c as a,d as t,e as r,f as o,g as i,h as f}from"./chunks/chunk-OGAHL36T.mjs";import{a as m,b as n}from"./chunks/chunk-HPZXETRA.mjs";import{a as u}from"./chunks/chunk-P32XO2YS.mjs";import"./chunks/chunk-7JJHWSTD.mjs";import"./chunks/chunk-5G6RSRP4.mjs";import"./chunks/chunk-SBYYOE2T.mjs";import"./chunks/chunk-T6T3FEMU.mjs";export{i as getDeviceInfo,u as getSafeAreaInsets,f as logDeviceInfo,s as resetPersistedStateCache,a as useChangeLog,o as useDeviceInfo,r as useEventStoreEvents,m as useFilterManager,e as usePersistedState,n as useSafeAreaInsets,t as useSubscribedValue};
|