@buoy-gg/shared-ui 7.0.44 → 7.0.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/index.js +1 -1
- package/lib/commonjs/license/index.js +1 -1
- package/lib/commonjs/license/licenseModule.js +1 -1
- package/lib/commonjs/stores/ignoredPatternsStore.shared.js +1 -1
- package/lib/commonjs/sync/settingsSync.js +1 -0
- package/lib/commonjs/utils/persistentStorage.js +1 -1
- package/lib/commonjs/utils/persistentStorage.web.js +1 -1
- package/lib/commonjs/utils/storageWrites.js +1 -0
- package/lib/module/index.js +1 -1
- package/lib/module/license/index.js +1 -1
- package/lib/module/license/licenseModule.js +1 -1
- package/lib/module/stores/ignoredPatternsStore.shared.js +1 -1
- package/lib/module/sync/settingsSync.js +1 -0
- package/lib/module/utils/persistentStorage.js +1 -1
- package/lib/module/utils/persistentStorage.web.js +1 -1
- package/lib/module/utils/storageWrites.js +1 -0
- package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/commonjs/index.d.ts +3 -1
- package/lib/typescript/commonjs/license/index.d.ts +1 -1
- package/lib/typescript/commonjs/license/licenseModule.d.ts +10 -0
- package/lib/typescript/commonjs/stores/ignoredPatternsStore.shared.d.ts +16 -1
- package/lib/typescript/commonjs/sync/settingsSync.d.ts +78 -0
- package/lib/typescript/commonjs/utils/storageWrites.d.ts +10 -0
- package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/module/index.d.ts +3 -1
- package/lib/typescript/module/license/index.d.ts +1 -1
- package/lib/typescript/module/license/licenseModule.d.ts +10 -0
- package/lib/typescript/module/stores/ignoredPatternsStore.shared.d.ts +16 -1
- package/lib/typescript/module/sync/settingsSync.d.ts +78 -0
- package/lib/typescript/module/utils/storageWrites.d.ts +10 -0
- package/lib/web/chunks/chunk-2Q3SDPH2.mjs +3 -3
- package/lib/web/chunks/chunk-46CXXOQB.mjs +1 -1
- package/lib/web/chunks/chunk-552W4COI.mjs +1 -1
- package/lib/web/chunks/chunk-56TTTMX4.mjs +1 -1
- package/lib/web/chunks/chunk-5LOQZINQ.mjs +3 -3
- package/lib/web/chunks/chunk-5NOIO6ZM.mjs +1 -1
- package/lib/web/chunks/chunk-7PRKERDN.mjs +1 -1
- package/lib/web/chunks/chunk-A7KJCK4R.mjs +3 -3
- package/lib/web/chunks/chunk-AEXGGXS7.mjs +1 -1
- package/lib/web/chunks/chunk-ASEPWYDC.mjs +14 -0
- package/lib/web/chunks/chunk-ASTM35HG.mjs +1 -1
- package/lib/web/chunks/chunk-B2V2UDCU.mjs +1 -1
- package/lib/web/chunks/chunk-BFGKGTAC.mjs +1 -1
- package/lib/web/chunks/chunk-CLLTZQGD.mjs +1 -1
- package/lib/web/chunks/chunk-D4RXBAOO.mjs +1 -1
- package/lib/web/chunks/chunk-DEEKIG2L.mjs +1 -0
- package/lib/web/chunks/chunk-DZDTNXXK.mjs +1 -1
- package/lib/web/chunks/chunk-HXPTZMAZ.mjs +1 -1
- package/lib/web/chunks/chunk-K4EGHHD6.mjs +1 -1
- package/lib/web/chunks/chunk-K7CGIEFU.mjs +1 -1
- package/lib/web/chunks/chunk-KBTYK5YE.mjs +1 -1
- package/lib/web/chunks/chunk-KHP6CSSM.mjs +1 -1
- package/lib/web/chunks/chunk-MKJKS3IG.mjs +1 -1
- package/lib/web/chunks/chunk-NK3OISOL.mjs +3 -3
- package/lib/web/chunks/chunk-OZB3VKZE.mjs +1 -1
- package/lib/web/chunks/chunk-QCD6T6L4.mjs +1 -1
- package/lib/web/chunks/chunk-QQTJ463K.mjs +1 -1
- package/lib/web/chunks/chunk-T7RZZG4A.mjs +15 -0
- package/lib/web/chunks/chunk-U2BTZZID.mjs +14 -0
- package/lib/web/chunks/chunk-UCKELQSM.mjs +1 -1
- package/lib/web/chunks/chunk-UNYQJZET.mjs +1 -1
- package/lib/web/chunks/chunk-W4BGMPJO.mjs +1 -1
- package/lib/web/chunks/chunk-WIFX6XNL.mjs +1 -1
- package/lib/web/chunks/chunk-WLGUP3KY.mjs +1 -1
- package/lib/web/chunks/chunk-XD2BEYMM.mjs +2 -2
- package/lib/web/chunks/chunk-XMDNJJS5.mjs +6 -6
- package/lib/web/chunks/chunk-YG6DIKQD.mjs +1 -1
- package/lib/web/chunks/chunk-YIZFMU66.mjs +1 -1
- package/lib/web/chunks/persistentStorage.web-56ENKXFJ.mjs +1 -0
- package/lib/web/dataViewer.mjs +2 -2
- package/lib/web/hooks.mjs +1 -1
- package/lib/web/index.mjs +3 -3
- package/lib/web/ui.mjs +1 -1
- package/lib/web/utils.mjs +1 -1
- package/package.json +5 -5
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{J as or}from"./chunks/chunk-XMDNJJS5.mjs";import"./chunks/chunk-OPTY6SMO.mjs";import"./chunks/chunk-XYUAUO57.mjs";import{a as m}from"./chunks/chunk-GF5C5DVX.mjs";import"./chunks/chunk-T3WLUEET.mjs";import{d as ir,g as ar}from"./chunks/chunk-T2SPCEHP.mjs";import{Dc as lr,Mc as Dt,Xb as lt,Zb as dr,_b as Bt,ac as cr,ec as sr,ud as T,xc as ur}from"./chunks/chunk-7YVWZ4ZK.mjs";import{a as I,d as P,f as ie}from"./chunks/chunk-CE5U3CSQ.mjs";import"./chunks/chunk-46TKOKMV.mjs";import"./chunks/chunk-DEJNSL6V.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-5NZOQR6Q.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,Ke=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 K=[...$,w],Y=K.join("."),te=Sn(h),E=["object","array","map","set"].includes(te)&&h!==null,F=E?Dn(h,te):0,Z=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:K,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:Z>0,childCount:Z,path:K,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,Z),ln=St.length,rr=[...oe];C>0&&(rr[C-1]=!L.isLastChild);for(let pe=0;pe<St.length;pe+=Ke){let Re=St.slice(pe,pe+Ke),nr=pe;for(let[dn,cn]of Re)ue.push(...A(cn,x,k,dn,C+1,Y,K,nr,ln,rr)),nr++;if(pe>0&&pe%(Ke*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,Z)=>[Z.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,Z])=>[String(F),Z]):[];break;case"set":Y=C.value instanceof Set?Array.from(C.value.values()).map((F,Z)=>[Z.toString(),F]):[];break}let te=Y.length,E=[...C.parentHasMoreSiblings||[]];C.depth>0&&(E[C.depth-1]=!C.isLastChild),Y.forEach(([F,Z],L)=>{let ue=A(Z,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 K=new Map;return $.forEach((Y,te)=>{K.set(Y.id,{item:Y,index:te})}),c.current=K,$}else if(!x){let $=new Set,de=(K,Y)=>{k.forEach(te=>{(te.parentId===K||te.id.startsWith(K+".")&&te.depth>Y)&&($.add(te.id),te.hasChildren&&de(te.id,te.depth))})};de(h,C.depth);let re=k.map(K=>K.id===h?{...K,isExpanded:false}:K).filter(K=>!$.has(K.id)),oe=new Map;return re.forEach((K,Y)=>{oe.set(K.id,{item:K,index:Y})}),c.current=oe,re}return k})},[A]),J=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,Ke,0)<Ke,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:J,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],J=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:J}],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:J}=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("."),K=ke(oe);dt(()=>{if(oe===K.current||(K.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}`);J(L),N(["root",...f].join("."))},[oe,f,J]);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,Z=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?Z?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"})}):Z?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 J=[],b=(v,B=0)=>{if(B>3)return;let h=Array.isArray(v)?"array":v===null?"null":typeof v;J.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(J)).slice(0,8)},[r,o]),A=hr(()=>{if(!p||!r)return null;let J={},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&&(J[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&&(J[N]=C,b++),($==="object"&&C!==null||$==="array")&&v(C,h,N,k+1)}))};return v(r,p),{filteredObject:J,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"},J={opacity:d,transform:[{translateX:f},{translateY:y},{scale:p}]};return ge(u,{style:[U.container,r],children:jt(u,{style:U.rowContainer,children:[e&&ge(g,{style:[U.label,l&&U.labelFocused],children:e.toUpperCase()}),jt(W.View,{style:[U.inputContainer,ne],children:[ge(W.View,{style:[U.glitchOverlay,J],pointerEvents:"none"}),ge(At,{...a,style:[U.input,a.style,t&&U.inputWithControls,c&&U.inputWithDelete],onFocus:D,onBlur:A,placeholderTextColor:ie.textMuted+"99",autoComplete:"off",autoCorrect:false,autoCapitalize:"none",spellCheck:false}),t&&jt(u,{style:U.numberControls,children:[ge(Q,{style:[U.controlButton,l&&U.controlButtonFocused],onPress:n,activeOpacity:.7,children:ge(Bt,{size:14,strokeWidth:2.5,color:l?ie.primary:ie.textMuted})}),ge(Q,{style:[U.controlButton,l&&U.controlButtonFocused],onPress:o,activeOpacity:.7,children:ge(lt,{size:14,strokeWidth:2.5,color:l?ie.primary:ie.textMuted})})]}),c&&ge(Q,{style:[U.deleteButton,l&&U.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:[U.cornerAccent,U.cornerTL,l&&U.cornerAccentFocused]}),ge(u,{style:[U.cornerAccent,U.cornerTR,l&&U.cornerAccentFocused]}),ge(u,{style:[U.cornerAccent,U.cornerBL,l&&U.cornerAccentFocused]}),ge(u,{style:[U.cornerAccent,U.cornerBR,l&&U.cornerAccentFocused]})]})]})})}var U=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 Jn=8e3,Un=1024;function _n(e,r){let t=e.length,n=r.length;if(t+n>Jn)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,Un),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 Zn(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 Kn(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?Zn(y,l,s,n,o):Kn(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,J=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(J,{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 Jt}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 Jt(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 Jt(u,{style:Se.dock,children:[Jt(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 Ut=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},J=(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(Ut,{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)=>J(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:[Zt.container,{backgroundColor:r.summaryBackground,borderTopColor:r.borderColor}],children:[Or(g,{style:[Zt.glyph,{color:r.lineNumberText}],children:"{ }"}),Or(g,{style:[Zt.text,{color:r.lineNumberText}],children:"Stored as a JSON string \u2014 decoded below so the change is readable."})]}):null}),Zt=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 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}}function $r(e){return tt(e)||e===void 0||e===null}function Pr(e,r){let t=Kt(e),n=Kt(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 Jr(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 Ur(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":`${Jr(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=Ur(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=Ur(e[o],r[o],o);c&&n.push(c)}return n}import{Fragment as yt,memo as Zr,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}`,[]),J=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})=>J(v),[J]);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(Ut,{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:J(v)},ne(v)))})]})}var Kr=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-Kr),s=Math.min(t-1,a+Kr);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=Zr(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=Zr(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 Je}from"react";function Xr(e,r){let[t,n]=Je(void 0),[o,c]=Je(false),[i,a]=Je(false),[l,s]=Je(null),[d,f]=Je(),[y,p]=Je(""),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)},[]),J=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:J,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 Ue,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,Ze={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 Jo(e){return e.length===0?"buoy-live-explorer-root":`buoy-live-explorer-${e.map(Go).filter(Boolean).join("-")}`}var Uo=(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:Ze,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:Ze,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:Ze,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:Ze,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=Jo,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),[J,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(()=>Uo(v,at),[v]),x=c??[],k=l(x),w=e===true&&i===true&&o?.remove!=null&&(o.canRemove?.(x)??true),C=Ue(o),N=Ue(x),$=Ue(B);C.current=o,N.current=x,$.current=B;let de=Ue(null),re=Ue(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 K=Ue(s);K.current=s;let Y=Le((E,F)=>{if(p(F),!C.current||E&&isNaN(Number(F)))return;let Z=$.current==="number"?Number(F):F,L=K.current;L>0?(de.current={path:N.current,value:Z},re.current&&clearTimeout(re.current),re.current=setTimeout(oe,L)):C.current.update(N.current,Z)},[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:Ze,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(Z=>Z.includes(F)?Z.filter(L=>L!==F):[...Z,F]),style:R.pageExpanderButton,hitSlop:Ze,children:[O(Xt,{expanded:J.includes(F)}),fe(g,{style:R.pageRangeText,children:["[",F*at,"...",F*at+at-1,"]"]})]}),J.includes(F)&&O(u,{style:R.entriesContainer,children:E.map(Z=>O(tr,{defaultExpanded:n,label:Z.label,value:Z.value,editable:e,dataPath:[...x,Z.label],writer:o,dataVersion:a,testIDForPath:l,debounceMs:s},Z.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,Ut 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,Jr 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,Kt 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 sn,b as un,c as hn,d as gn,e as fn}from"./chunks/chunk-53J2FMUD.mjs";import{L as or}from"./chunks/chunk-U2BTZZID.mjs";import"./chunks/chunk-OPTY6SMO.mjs";import"./chunks/chunk-XYUAUO57.mjs";import{a as m}from"./chunks/chunk-GF5C5DVX.mjs";import"./chunks/chunk-T3WLUEET.mjs";import{d as ir,g as ar}from"./chunks/chunk-T2SPCEHP.mjs";import{Dc as lr,Mc as Dt,Xb as lt,Zb as dr,_b as Bt,ac as cr,ec as sr,ud as T,xc as ur}from"./chunks/chunk-7YVWZ4ZK.mjs";import{a as I,d as P,f as ie}from"./chunks/chunk-CE5U3CSQ.mjs";import"./chunks/chunk-46TKOKMV.mjs";import"./chunks/chunk-DEEKIG2L.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-5NZOQR6Q.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,Ke=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 K=[...$,w],Y=K.join("."),te=Sn(h),E=["object","array","map","set"].includes(te)&&h!==null,F=E?Dn(h,te):0,Z=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:K,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:Z>0,childCount:Z,path:K,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,Z),ln=St.length,rr=[...oe];C>0&&(rr[C-1]=!L.isLastChild);for(let pe=0;pe<St.length;pe+=Ke){let Re=St.slice(pe,pe+Ke),nr=pe;for(let[dn,cn]of Re)ue.push(...A(cn,x,k,dn,C+1,Y,K,nr,ln,rr)),nr++;if(pe>0&&pe%(Ke*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,Z)=>[Z.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,Z])=>[String(F),Z]):[];break;case"set":Y=C.value instanceof Set?Array.from(C.value.values()).map((F,Z)=>[Z.toString(),F]):[];break}let te=Y.length,E=[...C.parentHasMoreSiblings||[]];C.depth>0&&(E[C.depth-1]=!C.isLastChild),Y.forEach(([F,Z],L)=>{let ue=A(Z,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 K=new Map;return $.forEach((Y,te)=>{K.set(Y.id,{item:Y,index:te})}),c.current=K,$}else if(!x){let $=new Set,de=(K,Y)=>{k.forEach(te=>{(te.parentId===K||te.id.startsWith(K+".")&&te.depth>Y)&&($.add(te.id),te.hasChildren&&de(te.id,te.depth))})};de(h,C.depth);let re=k.map(K=>K.id===h?{...K,isExpanded:false}:K).filter(K=>!$.has(K.id)),oe=new Map;return re.forEach((K,Y)=>{oe.set(K.id,{item:K,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,Ke,0)<Ke,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("."),K=ke(oe);dt(()=>{if(oe===K.current||(K.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,Z=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?Z?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"})}):Z?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 Zn(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 Kn(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?Zn(y,l,s,n,o):Kn(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:[Zt.container,{backgroundColor:r.summaryBackground,borderTopColor:r.borderColor}],children:[Or(g,{style:[Zt.glyph,{color:r.lineNumberText}],children:"{ }"}),Or(g,{style:[Zt.text,{color:r.lineNumberText}],children:"Stored as a JSON string \u2014 decoded below so the change is readable."})]}):null}),Zt=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 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}}function $r(e){return tt(e)||e===void 0||e===null}function Pr(e,r){let t=Kt(e),n=Kt(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 Zr,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 Kr=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-Kr),s=Math.min(t-1,a+Kr);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=Zr(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=Zr(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,Ze={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:Ze,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:Ze,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:Ze,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:Ze,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 K=Je(s);K.current=s;let Y=Le((E,F)=>{if(p(F),!C.current||E&&isNaN(Number(F)))return;let Z=$.current==="number"?Number(F):F,L=K.current;L>0?(de.current={path:N.current,value:Z},re.current&&clearTimeout(re.current),re.current=setTimeout(oe,L)):C.current.update(N.current,Z)},[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:Ze,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(Z=>Z.includes(F)?Z.filter(L=>L!==F):[...Z,F]),style:R.pageExpanderButton,hitSlop:Ze,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(Z=>O(tr,{defaultExpanded:n,label:Z.label,value:Z.value,editable:e,dataPath:[...x,Z.label],writer:o,dataVersion:a,testIDForPath:l,debounceMs:s},Z.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,Kt 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};
|
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-T7RZZG4A.mjs";import{a as n,b as u}from"./chunks/chunk-T3WLUEET.mjs";import{a as m}from"./chunks/chunk-46TKOKMV.mjs";import"./chunks/chunk-DEEKIG2L.mjs";import"./chunks/chunk-3UTMGIUG.mjs";import"./chunks/chunk-5NZOQR6Q.mjs";export{i as getDeviceInfo,m as getSafeAreaInsets,f as logDeviceInfo,s as resetPersistedStateCache,a as useChangeLog,o as useDeviceInfo,r as useEventStoreEvents,n as useFilterManager,e as usePersistedState,u as useSafeAreaInsets,t as useSubscribedValue};
|