@buoy-gg/core 7.0.63 → 7.0.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/bin/buoy.js +11 -8
- package/lib/commonjs/browserRegister.js +1 -1
- package/lib/commonjs/browserRegister.server.js +1 -1
- package/lib/commonjs/browserRegisterNetwork.js +1 -0
- package/lib/commonjs/browserRegisterNetwork.server.js +1 -0
- package/lib/commonjs/browserRegisterNetwork.test.js +1 -0
- package/lib/commonjs/earlyNetwork.js +1 -1
- package/lib/commonjs/floatingMenu/AppHost.web.js +1 -1
- package/lib/commonjs/floatingMenu/BrowserToolRuntime.js +1 -1
- package/lib/commonjs/floatingMenu/BuoySignIn.web.js +1 -1
- package/lib/commonjs/floatingMenu/DevToolsSettingsModal.shared.js +1 -1
- package/lib/commonjs/floatingMenu/FloatingDevTools.js +1 -1
- package/lib/commonjs/floatingMenu/FloatingDevTools.web.js +1 -1
- package/lib/commonjs/floatingMenu/FloatingMenu.js +1 -1
- package/lib/commonjs/floatingMenu/dial/DialDevTools.js +1 -1
- package/lib/commonjs/index.web.js +1 -1
- package/lib/commonjs/mountBuoy.js +1 -0
- package/lib/commonjs/mountBuoy.test.js +1 -0
- package/lib/commonjs/threeBootHook.js +1 -0
- package/lib/commonjs/threeBootHook.test.js +1 -0
- package/lib/commonjs/version.js +1 -1
- package/lib/module/browserRegister.js +1 -1
- package/lib/module/browserRegister.server.js +1 -1
- package/lib/module/browserRegisterNetwork.js +1 -0
- package/lib/module/browserRegisterNetwork.server.js +1 -0
- package/lib/module/browserRegisterNetwork.test.js +1 -0
- package/lib/module/earlyNetwork.js +1 -1
- package/lib/module/floatingMenu/AppHost.web.js +1 -1
- package/lib/module/floatingMenu/BrowserToolRuntime.js +1 -1
- package/lib/module/floatingMenu/BuoySignIn.web.js +1 -1
- package/lib/module/floatingMenu/DevToolsSettingsModal.shared.js +1 -1
- package/lib/module/floatingMenu/FloatingDevTools.js +1 -1
- package/lib/module/floatingMenu/FloatingDevTools.web.js +1 -1
- package/lib/module/floatingMenu/FloatingMenu.js +1 -1
- package/lib/module/floatingMenu/dial/DialDevTools.js +1 -1
- package/lib/module/index.web.js +1 -1
- package/lib/module/mountBuoy.js +1 -0
- package/lib/module/mountBuoy.test.js +1 -0
- package/lib/module/threeBootHook.js +1 -0
- package/lib/module/threeBootHook.test.js +1 -0
- package/lib/module/version.js +1 -1
- package/lib/typescript/commonjs/browserRegister.d.ts +1 -0
- package/lib/typescript/commonjs/browserRegister.server.d.ts +2 -0
- package/lib/typescript/commonjs/browserRegisterNetwork.d.ts +5 -0
- package/lib/typescript/commonjs/browserRegisterNetwork.server.d.ts +5 -0
- package/lib/typescript/commonjs/floatingMenu/BuoySignIn.web.d.ts +1 -1
- package/lib/typescript/commonjs/floatingMenu/FloatingDevTools.web.d.ts +1 -1
- package/lib/typescript/commonjs/index.web.d.ts +1 -0
- package/lib/typescript/commonjs/mountBuoy.d.ts +16 -0
- package/lib/typescript/commonjs/threeBootHook.d.ts +9 -0
- package/lib/typescript/commonjs/version.d.ts +1 -1
- package/lib/typescript/module/browserRegister.d.ts +1 -0
- package/lib/typescript/module/browserRegister.server.d.ts +2 -0
- package/lib/typescript/module/browserRegisterNetwork.d.ts +5 -0
- package/lib/typescript/module/browserRegisterNetwork.server.d.ts +5 -0
- package/lib/typescript/module/floatingMenu/BuoySignIn.web.d.ts +1 -1
- package/lib/typescript/module/floatingMenu/FloatingDevTools.web.d.ts +1 -1
- package/lib/typescript/module/index.web.d.ts +1 -0
- package/lib/typescript/module/mountBuoy.d.ts +16 -0
- package/lib/typescript/module/threeBootHook.d.ts +9 -0
- package/lib/typescript/module/version.d.ts +1 -1
- package/lib/web/auto.mjs +1 -1
- package/lib/web/chunks/FloatingDevTools.web-P3PAM3FD.mjs +1 -0
- package/lib/web/chunks/chunk-5EUMNDI5.mjs +1 -0
- package/lib/web/chunks/chunk-D2FYORGY.mjs +1 -0
- package/lib/web/chunks/chunk-LOPXJLVB.mjs +1 -0
- package/lib/web/chunks/chunk-NEDMFPZ4.mjs +1 -0
- package/lib/web/chunks/chunk-NKUQECQ2.mjs +10 -0
- package/lib/web/chunks/chunk-RBPDZUHO.mjs +1 -0
- package/lib/web/chunks/chunk-Z6I7ZD34.mjs +1 -0
- package/lib/web/index.mjs +1 -1
- package/lib/web/installed-tools.mjs +1 -1
- package/lib/web/register-network-server.mjs +1 -0
- package/lib/web/register-network.mjs +1 -0
- package/lib/web/register-server.mjs +1 -1
- package/lib/web/register.mjs +1 -1
- package/lib/web/three.mjs +1 -0
- package/lib/web/toolkit.mjs +1 -1
- package/package.json +21 -6
- package/lib/web/chunks/FloatingDevTools.web-M3ASH5EV.mjs +0 -1
- package/lib/web/chunks/chunk-3YORPV22.mjs +0 -10
- package/lib/web/chunks/chunk-5SGL6QL4.mjs +0 -1
- package/lib/web/chunks/chunk-7G3P7Z7K.mjs +0 -1
- package/lib/web/chunks/chunk-CLXYMJTS.mjs +0 -1
- package/lib/web/chunks/chunk-ZD6O2YPD.mjs +0 -1
package/lib/web/toolkit.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{$ as a,A as s,Aa as e,B as o,Ba as t,C as r,Ca as i,D as l,Da as n,E as C,Ea as c,F as h,Fa as p,G as S,Ga as m,H as u,Ha as d,I as f,Ia as y,J as g,Ja as v,K as k,Ka as B,L as w,La as T,M as D,Ma as P,N as b,Na as E,O as F,Oa as H,P as R,Pa as A,Q as I,R as L,S as M,T as U,U as x,V as q,W as G,X as J,Y as K,Z as z,_ as N,a as O,aa as V,b as X,ba as j,c as W,ca as Z,d as Q,da as Y,e as _,ea as $,f as aa,fa as sa,g as ea,ga as oa,h as ta,ha as ra,i as ia,ia as la,j as na,ja as Ca,k as ca,ka as ha,l as pa,la as Sa,m as ma,ma as ua,n as da,na as fa,o as ya,oa as ga,p as va,pa as ka,q as Ba,qa as wa,r as Ta,ra as Da,s as Pa,sa as ba,t as Ea,ta as Fa,u as Ha,ua as Ra,v as Aa,va as Ia,w as La,wa as Ma,x as Ua,xa,y as qa,ya as Ga,z as Ja,za as Ka}from"./chunks/chunk-
|
|
1
|
+
"use client";import{$ as a,A as s,Aa as e,B as o,Ba as t,C as r,Ca as i,D as l,Da as n,E as C,Ea as c,F as h,Fa as p,G as S,Ga as m,H as u,Ha as d,I as f,Ia as y,J as g,Ja as v,K as k,Ka as B,L as w,La as T,M as D,Ma as P,N as b,Na as E,O as F,Oa as H,P as R,Pa as A,Q as I,R as L,S as M,T as U,U as x,V as q,W as G,X as J,Y as K,Z as z,_ as N,a as O,aa as V,b as X,ba as j,c as W,ca as Z,d as Q,da as Y,e as _,ea as $,f as aa,fa as sa,g as ea,ga as oa,h as ta,ha as ra,i as ia,ia as la,j as na,ja as Ca,k as ca,ka as ha,l as pa,la as Sa,m as ma,ma as ua,n as da,na as fa,o as ya,oa as ga,p as va,pa as ka,q as Ba,qa as wa,r as Ta,ra as Da,s as Pa,sa as ba,t as Ea,ta as Fa,u as Ha,ua as Ra,v as Aa,va as Ia,w as La,wa as Ma,x as Ua,xa,y as qa,ya as Ga,z as Ja,za as Ka}from"./chunks/chunk-RBPDZUHO.mjs";import"./chunks/chunk-Z6I7ZD34.mjs";import"./chunks/chunk-LOPXJLVB.mjs";export{u as Activity,wa as AlertCircle,f as AlertTriangle,Q as Badge,Da as BarChart3,Ha as BaseEventStore,ba as Bookmark,g as Bug,ia as Button,ma as Card,k as Check,w as CheckCircle,B as CheckSquare,D as ChevronDown,b as ChevronLeft,F as ChevronRight,R as ChevronUp,I as Clock,Fa as Cloud,ya as CollapsibleSection,L as Copy,na as CopyButton,Ea as DataViewer,M as Database,ea as DiffViewer,Ra as Download,Ia as Edit3,Ba as EmptyState,Pa as EventStepperFooter,U as Eye,x as EyeOff,q as FileJson,G as FileText,J as Filter,K as FlaskConical,Ma as GitBranch,z as Globe,xa as HardDrive,N as Hash,Ga as HelpCircle,Ka as Home,e as Image,a as Info,aa as InfoRow,S as JsModal,V as Key,j as Layers,t as Link,Z as Lock,i as Maximize2,n as Minus,c as Palette,Y as Pause,p as Pin,$ as Play,sa as Plus,oa as Power,ca as PowerToggle,ra as RefreshCw,Aa as RelativeTime,m as Route,pa as Row,la as Search,Ta as SearchBar,da as SectionHeader,d as Server,Ca as Settings,ha as Shield,y as Smartphone,v as Square,_ as StatusDot,va as TabSelector,T as Timer,Sa as Trash2,P as Unlock,E as Upload,ua as User,H as Users,fa as Wifi,ga as X,A as XCircle,ka as Zap,h as copyToClipboard,l as devToolsStorageKeys,La as formatBytes,Ua as formatDuration,qa as formatNumber,X as methodColor,r as persistentStorage,s as safeStringify,O as statusColor,ta as toolTheme,Ja as truncateMiddle,W as typeColor,o as usePersistedState,C as useSafeAreaInsets};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buoy-gg/core",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.65",
|
|
4
4
|
"description": "Floating developer menu and account setup for React Native. Add tool packages and configure Desktop or MCP connections separately.",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -44,6 +44,20 @@
|
|
|
44
44
|
"browser": "./lib/web/register.mjs",
|
|
45
45
|
"default": "./lib/web/register-server.mjs"
|
|
46
46
|
},
|
|
47
|
+
"./three": {
|
|
48
|
+
"types": "./lib/typescript/module/threeBootHook.d.ts",
|
|
49
|
+
"import": "./lib/module/threeBootHook.js",
|
|
50
|
+
"require": "./lib/commonjs/threeBootHook.js"
|
|
51
|
+
},
|
|
52
|
+
"./web/three": {
|
|
53
|
+
"types": "./lib/typescript/module/threeBootHook.d.ts",
|
|
54
|
+
"default": "./lib/web/three.mjs"
|
|
55
|
+
},
|
|
56
|
+
"./web/register-network": {
|
|
57
|
+
"types": "./lib/typescript/module/browserRegisterNetwork.d.ts",
|
|
58
|
+
"browser": "./lib/web/register-network.mjs",
|
|
59
|
+
"default": "./lib/web/register-network-server.mjs"
|
|
60
|
+
},
|
|
47
61
|
"./web/auto": {
|
|
48
62
|
"types": "./lib/typescript/module/auto.web.d.ts",
|
|
49
63
|
"default": "./lib/web/auto.mjs"
|
|
@@ -70,14 +84,15 @@
|
|
|
70
84
|
"bundlers"
|
|
71
85
|
],
|
|
72
86
|
"sideEffects": [
|
|
73
|
-
"./lib/web/register.mjs"
|
|
87
|
+
"./lib/web/register.mjs",
|
|
88
|
+
"./lib/web/register-network.mjs"
|
|
74
89
|
],
|
|
75
90
|
"dependencies": {
|
|
76
91
|
"react-devtools-core": "6.1.5",
|
|
77
|
-
"@buoy-gg/floating-tools-core": "^7.0.
|
|
78
|
-
"@buoy-gg/
|
|
79
|
-
"@buoy-gg/
|
|
80
|
-
"@buoy-gg/
|
|
92
|
+
"@buoy-gg/floating-tools-core": "^7.0.65",
|
|
93
|
+
"@buoy-gg/floating-tools-react": "^7.0.65",
|
|
94
|
+
"@buoy-gg/license": "^7.0.65",
|
|
95
|
+
"@buoy-gg/shared-ui": "^7.0.65"
|
|
81
96
|
},
|
|
82
97
|
"peerDependencies": {
|
|
83
98
|
"react": "*"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{v as o}from"./chunk-3YORPV22.mjs";import"./chunk-7G3P7Z7K.mjs";import"./chunk-5SGL6QL4.mjs";import"./chunk-CLXYMJTS.mjs";export{o as FloatingDevTools};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use client";import{a as N,b as H,c as lt,d as Xo,e as Jt,f as Qo,g as bl,h as Ee,i as Yt,j as Ne,k as ct}from"./chunk-7G3P7Z7K.mjs";import{b as Zo,c as ei}from"./chunk-5SGL6QL4.mjs";import{a as Xt,d as _e}from"./chunk-CLXYMJTS.mjs";import{FloatingToolHost as ti}from"@buoy-gg/shared-ui/web/floating";import*as ni from"@buoy-gg/license/web";import{LicenseManager as oi,useLicense as ii,sameLicenseKey as ri,resolveDevBuild as ai,capacitorDebug as si,isCapacitorNative as li,loadCapacitorAppHost as ci}from"@buoy-gg/license/web";import{AccountSetup as di,HintsProvider as ui,normalizeEnvironment as pi,registerToolOpener as mi,startSettingsSync as gi}from"@buoy-gg/shared-ui/web";import{useState as Bt,useMemo as ge,useCallback as We,useEffect as ee,useRef as fi}from"react";import{useSettings as hi,getToolLabel as dt,getToolDescription as yi,getToolColor as Qt}from"@buoy-gg/floating-tools-react/web";import{persistentStorage as Ae,devToolsStorageKeys as ut,EnvironmentIndicator as bi,EnvironmentSelectorInline as vi}from"@buoy-gg/shared-ui/web";var Si=[];function wi(){return[]}function Zt(e=[]){return[...new Map(e.map(t=>[t.id,t])).values()]}function Rt(e,t){return e.filter(n=>{let i=n.slot||"both";return i==="both"||i===t})}function xi(e,t){let n=t instanceof Set?t:new Set(t);return e.filter(i=>n.has(i.id))}import{FloatingTool as en,FloatingToolDivider as Ci,FloatingToolUserStatus as tn,getBubbleAnchorPosition as Ii}from"@buoy-gg/shared-ui/web/floating";import{useState as Q,useEffect as Oe,useMemo as pt,useRef as mt,useCallback as gt}from"react";var nn={network:"Network",images:"Images","image-overlay":"Image Overlay",assets:"Assets",query:"React Query",storage:"Storage",env:"Env",console:"Console",events:"Events",redux:"Redux",zustand:"Zustand",jotai:"Jotai","route-events":"Routes","time-machine":"Time Machine",clock:"Clock",permissions:"Permissions","highlight-updates":"Highlight Updates","debug-borders":"Debug Borders","perf-monitor":"Bench HUD","js-top":"JS Top","js-top-modal":"JS Top",impersonate:"Impersonate","perf-monitor-modal":"Bench"};function Ti(e,t){return e&&nn[e]?nn[e]:t}import{getDialLayout as ki,getAllIconPositions as zi,getGridLineRotations as Mi,getIconStaggerInputRange as Bi,MAX_DIAL_SLOTS as Ge,DIAL_ICON_SIZE as Ri,dialAnimationConfig as on,getDialCSSKeyframesString as Ei,getDialCSSAnimationStyles as Ai,dialColors as L,dialStyles as S,withAlpha as rn,floatingToolsColors as Oi}from"@buoy-gg/floating-tools-react/web";import{persistentStorage as an,monoFont as sn,ToolBackground as Di,useToolBackground as Pi}from"@buoy-gg/shared-ui/web";import{memo as Li}from"react";import{RasterLayer as Fi,scatter as $i,useLoop as ji,withBgAlpha as Ni}from"@buoy-gg/shared-ui/web";import{Fragment as _i,jsx as Je}from"react/jsx-runtime";var Wi=.94,Hi=6,Ui=2400,ft=3,ln=16,Ki=Array.from({length:ft},(e,t)=>$i(22343^t*40503,ln*4)),cn=["#FFFFFF","#B3D9FF","#8CB3FF"],dn=Math.PI/3,un=14*Math.PI/180;function Vi(e){let t=Math.min(5,Math.floor(e*6)),n=e*6-t;return t*dn+un/2+n*(dn-un)}function qi(e){return Math.min(Hi,1/(1-e*Wi))}function Gi(e){let t=.15+.85*e*e;return e<.06?t*=e/.06:e>.94&&(t*=(1-e)/.06),Math.min(.7,t)}function Ji(e){let t=e/ft,n=[],i=12;for(let s=0;s<=i;s++)n.push(s/i);let o=(1-t)%1;o>.001&&o<1-.001&&n.push(o-1e-4,o+1e-4),n.sort((s,u)=>s-u);let r=[],a=[],l=[];for(let s of n){let u=t===0&&s===1?1:(s+t)%1;r.push(s),a.push(qi(u)),l.push(Gi(u))}return{input:r,scale:a,opacity:l}}var Yi=Array.from({length:ft},(e,t)=>Ji(t)),Xi=Li(function({size:e}){let t=ji(Ui),n=e/2,i=[];for(let o=0;o<ft;o++){let r=Ki[o],a=Yi[o],l=[];for(let s=0;s<ln;s++){let u=Vi(r[s*4]),m=(.15+.85*Math.sqrt(r[s*4+1]))*.5*n,C=cn[Math.floor(r[s*4+3]*cn.length)%3],g=n+Math.cos(u)*m,B=n+Math.sin(u)*m,w=.6,R=w*2.4;l.push(Je(N,{style:{position:"absolute",left:g-R/2,top:B-R/2,width:R,height:R,borderRadius:R/2,backgroundColor:Ni(C,.3)}},`${s}-h`),Je(N,{style:{position:"absolute",left:g-w/2,top:B-w/2,width:w,height:w,borderRadius:w/2,backgroundColor:C}},s))}i.push(Je(Ee.View,{style:{position:"absolute",left:0,top:0,width:e,height:e,opacity:t.interpolate({inputRange:a.input,outputRange:a.opacity}),transform:[{scale:t.interpolate({inputRange:a.input,outputRange:a.scale})}]},pointerEvents:"none",children:Je(Fi,{style:{width:e,height:e},raster:false,children:l})},o))}return Je(_i,{children:i})});import{useEffect as Qi,useState as pn}from"react";import{dialColors as He,withAlpha as mn}from"@buoy-gg/floating-tools-react/web";import{ARROW_BOTTOM_OFFSET as Zi,ARROW_HEIGHT as er,SPACING_GAP as Fl,getScreenCenterY as $l,calculateTooltipPosition as tr,calculateTargetPosition as jl}from"@buoy-gg/shared-ui/web/floating";import{monoFont as gn}from"@buoy-gg/shared-ui/web";import{jsx as Ue,jsxs as fn}from"react/jsx-runtime";var hn=false;function nr(){if(hn||typeof document>"u")return;let e=document.createElement("style");e.textContent=`
|
|
2
|
-
@keyframes buoyOnboardPulse {
|
|
3
|
-
0%, 100% { transform: scale(1); }
|
|
4
|
-
50% { transform: scale(1.02); }
|
|
5
|
-
}
|
|
6
|
-
@keyframes buoyOnboardArrowBounce {
|
|
7
|
-
0%, 100% { transform: translateY(0); }
|
|
8
|
-
50% { transform: translateY(-8px); }
|
|
9
|
-
}
|
|
10
|
-
`,document.head.appendChild(e),hn=true}var Et=He.accent;function yn({title:e,message:t,onDismiss:n,showArrow:i=true}){let[o,r]=pn(false),[a,l]=pn(false);Qi(()=>{nr();let u=requestAnimationFrame(()=>r(true));return()=>cancelAnimationFrame(u)},[]);let s={fontFamily:gn,textTransform:"uppercase"};return Ue("div",{style:{position:"fixed",left:"50%",bottom:tr(),transform:`translateX(-50%) scale(${o?1:.8})`,opacity:o?1:0,transition:"transform 300ms cubic-bezier(0.34, 1.3, 0.64, 1), opacity 300ms ease",zIndex:10002,pointerEvents:"auto"},children:fn("div",{style:{position:"relative",animation:o?"buoyOnboardPulse 3s ease-in-out infinite":"none"},children:[Ue("div",{style:{position:"absolute",inset:-4,borderRadius:18,backgroundColor:"#FFFFFF",opacity:.06}}),fn("div",{style:{position:"relative",maxWidth:280,backgroundColor:He.dialBackground,borderRadius:16,border:`1px solid ${He.dialBorder}`,padding:20,boxShadow:`0 0 20px ${mn(He.dialShadow,.6)}`,display:"flex",flexDirection:"column",alignItems:"center",gap:8},children:[Ue("span",{style:{...s,fontSize:16,fontWeight:900,letterSpacing:1,color:Et,textAlign:"center"},children:e}),Ue("span",{style:{fontFamily:gn,fontSize:13,lineHeight:"20px",color:He.centerText,textAlign:"center"},children:t}),Ue("button",{onClick:n,onPointerDown:()=>l(true),onPointerUp:()=>l(false),onPointerLeave:()=>l(false),onPointerCancel:()=>l(false),style:{...s,marginTop:8,borderRadius:8,border:"none",backgroundColor:Et,padding:"10px 24px",fontSize:14,fontWeight:900,letterSpacing:1.5,color:"#000000",cursor:"pointer",opacity:a?.7:1,transform:a?"scale(0.96)":"scale(1)",transition:"transform 100ms ease, opacity 100ms ease"},children:"Got it!"})]}),i&&Ue("div",{style:{position:"absolute",left:"50%",bottom:Zi,marginLeft:-12,width:0,height:0,borderLeft:"12px solid transparent",borderRight:"12px solid transparent",borderTop:`${er}px solid ${Et}`,filter:`drop-shadow(0 0 10px ${mn(He.dialShadow,.5)})`,animation:o?"buoyOnboardArrowBounce 1.6s ease-in-out infinite":"none"}})]})})}import{Fragment as or,jsx as D,jsxs as be}from"react/jsx-runtime";var ir={x:.5,y:.5},bn="@react_buoy_settings_tooltip_shown",vn=false;function rr(){if(vn||typeof document>"u")return;let e=document.createElement("style");e.textContent=Ei(),document.head.appendChild(e),vn=true}var Ke=e=>1-Math.pow(1-e,3),At=e=>e*e*e;function ar({icon:e,index:t,totalIcons:n,position:i,progress:o,onPress:r}){let[a,l]=Q(false),[s,u]=Q(false),m=!e.icon&&e.id.startsWith("empty-"),C=!m&&e.unavailable===true,g=!m&&!C,{icons:B}=on,w=Bi(t,n),R=0;o<=w[1]?R=0:o<=w[2]?R=(o-w[1])/(w[2]-w[1]):R=1,R=Math.max(0,Math.min(1,R));let z=Ri,A=B.pressIn.scale,M=R*(s?A:a?1.1:1),k=0;R<=0?k=0:R<=.3?k=R:k=.3+(R-.3)*(.7/.7);let v=i.x*R,T=i.y*R;return D("button",{role:"menuitem","aria-label":m?"Empty slot":Ti(e.id,e.name),"data-testid":e.id?`buoy-dial-${e.id}`:void 0,"aria-disabled":!g,tabIndex:g?0:-1,onClick:g?r:void 0,onPointerEnter:P=>g&&P.pointerType==="mouse"&&l(true),onPointerLeave:()=>{l(false),u(false)},onPointerDown:()=>g&&u(true),onPointerUp:()=>u(false),onPointerCancel:()=>u(false),style:{position:"absolute",left:"50%",top:"50%",width:z,height:z,marginLeft:-z/2,marginTop:-z/2,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",cursor:g?"pointer":"default",transform:`translate(${v}px, ${T}px) scale(${M})`,opacity:k,transition:a||s?"transform 100ms ease":"none",background:"none",border:"none",padding:0},children:m?D("div",{style:{width:S.emptySlot.dotSize,height:S.emptySlot.dotSize,borderRadius:S.emptySlot.dotSize/2,backgroundColor:L.emptyDotBackground,border:`${S.emptySlot.borderWidth}px solid ${L.emptyDotBorder}`}}):be(or,{children:[D("div",{style:{position:"absolute",width:`${S.icon.gradientBgSizePercent}%`,height:`${S.icon.gradientBgSizePercent}%`,borderRadius:S.icon.gradientBgBorderRadius,backgroundColor:"rgba(0, 0, 0, 0.2)",opacity:S.icon.gradientBgOpacity}}),D("div",{style:{position:"absolute",width:`${S.icon.innerGlowSizePercent}%`,height:`${S.icon.innerGlowSizePercent}%`,borderRadius:S.icon.innerGlowBorderRadius,backgroundColor:"rgba(255, 255, 255, 0.02)",opacity:S.icon.innerGlowOpacity}}),D("div",{style:{marginBottom:S.icon.wrapperMarginBottom,display:"flex",alignItems:"center",justifyContent:"center",fontSize:32,filter:a?"brightness(1.2)":"none"},children:e.icon}),D("span",{style:{fontSize:e.name.length>8?Math.max(S.icon.label.fontSize*.7,S.icon.label.fontSize*8/e.name.length):S.icon.label.fontSize,fontWeight:S.icon.label.fontWeight,fontFamily:S.icon.label.fontFamily,color:L.iconLabel,letterSpacing:S.icon.label.letterSpacing,marginTop:S.icon.label.marginTop,textTransform:"uppercase",whiteSpace:"nowrap"},children:e.name}),C&&D("span",{style:{fontSize:S.icon.label.fontSize-1,fontWeight:S.icon.label.fontWeight,fontFamily:S.icon.label.fontFamily,letterSpacing:S.icon.label.letterSpacing,color:Oi.muted,textTransform:"uppercase",whiteSpace:"nowrap"},children:"Unavailable"})]})})}function Sn({side:e,color:t}){return D("svg",{width:18,height:18,viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:(e==="prev"?[[15,18,9,12],[9,12,15,6]]:[[9,18,15,12],[15,12,9,6]]).map(([n,i,o,r],a)=>D("line",{x1:n,y1:i,x2:o,y2:r,stroke:t,strokeWidth:2},a))})}function wn({side:e,disabled:t,onClick:n}){let[i,o]=Q(false),r=t?L.emptyDotBorder:L.accent;return be("button",{type:"button","aria-label":`${e==="prev"?"Previous":"Next"} dial page`,"data-testid":`buoy-dial-${e}`,disabled:t,onClick:n,onPointerDown:()=>!t&&o(true),onPointerUp:()=>o(false),onPointerLeave:()=>o(false),onPointerCancel:()=>o(false),style:{display:"flex",alignItems:"center",gap:4,padding:"10px 16px",borderRadius:10,border:`1px solid ${L.dialBorder}`,backgroundColor:L.dialBackground,color:t?L.iconLabelMuted:L.centerText,fontSize:12,fontWeight:900,fontFamily:sn,letterSpacing:1.5,textTransform:"uppercase",cursor:t?"default":"pointer",opacity:t?.4:1,boxShadow:t?"none":`0 0 8px ${rn(L.dialShadow,.4)}`,transform:i?"scale(0.92)":"scale(1)",transition:"transform 100ms ease"},children:[e==="prev"&&D(Sn,{side:"prev",color:r}),e==="prev"?"PREV":"NEXT",e==="next"&&D(Sn,{side:"next",color:r})]})}function xn({icons:e,onClose:t,centerLabel:n="MENU",onCenterPress:i,settingsOpen:o=false,hintsDisabled:r=false}){let{id:a}=Pi(),[l,s]=Q(0),[u,m]=Q(0),[C,g]=Q(0),[B,w]=Q(0),[R,z]=Q(0),[A,M]=Q(1),[k,v]=Q(false),[T,P]=Q(false),[I,E]=Q(false),Z=mt(null),W=mt(null),q=mt(null),te=mt(false),{entrance:K,exit:re,interaction:ne}=on,ve=Ai(),[ae,Te]=Q(()=>({width:window.innerWidth,height:window.innerHeight}));Oe(()=>{let b=()=>Te({width:window.innerWidth,height:window.innerHeight});return window.addEventListener("resize",b),()=>window.removeEventListener("resize",b)},[]);let $=pt(()=>ki({screenWidth:ae.width,maxCircleSize:Math.max(120,Math.min(320,ae.height-96))}),[ae]),qe=pt(()=>Mi(),[]),ke=pt(()=>zi(Ge,$.iconRadius),[$.iconRadius]),[Fe,ze]=Q(0),se=Math.max(1,Math.ceil(e.length/Ge)),J=Math.min(Fe,se-1),Se=pt(()=>{let b=J*Ge,x=[...e.slice(b,b+Ge)];for(;x.length<Ge;)x.push({id:`empty-${x.length}`,name:"",icon:null,onPress:()=>{}});return x},[e,J]);Oe(()=>{rr()},[]),Oe(()=>{let b=K.backdrop.duration,x=K.dial.rotation.duration,Y=K.centerButton.delay,U=K.icons.delay,G=K.icons.duration,V=performance.now(),oe=me=>{let c=me-V;s(Math.min(1,c/b));let f=Math.min(1,c/400),O=Ke(f)*1.1;f>.7&&(O-=(f-.7)*.33),f>=1&&(O=1),m(Math.max(0,Math.min(1.05,O)));let X=Math.min(1,c/x);if(g(Ke(X)*360),c>=Y){let xe=Math.min(1,(c-Y)/300),je=Ke(xe)*1.15;xe>.6&&(je-=(xe-.6)*.375),xe>=1&&(je=1),w(Math.max(0,Math.min(1.05,je)))}if(c>=U){let xe=Math.min(1,(c-U)/G);z(Ke(xe))}let we=U+G;c<we?q.current=requestAnimationFrame(oe):(s(1),m(1),g(360),w(1),z(1),E(true))};return q.current=requestAnimationFrame(oe),()=>{q.current&&cancelAnimationFrame(q.current)}},[]);let pe=gt(()=>{if(te.current)return;te.current=true,P(true),q.current&&cancelAnimationFrame(q.current);let b=performance.now(),x=re.icons.duration,Y=re.centerButton.duration,U=re.dialScale.duration,G=Math.max(Y,U),V=re.backdrop.duration,oe=me=>{let c=me-b;if(c<x){let X=At(c/x);z(1-X),q.current=requestAnimationFrame(oe);return}let f=x;if(c<f+G){z(0);let X=Math.min(1,(c-f)/Y),we=Math.min(1,(c-f)/U);w(1-At(X)),m(1-At(we)),q.current=requestAnimationFrame(oe);return}let O=f+G;if(c<O+V){m(0),w(0);let X=(c-O)/V;s(1-X),q.current=requestAnimationFrame(oe);return}s(0),t()};q.current=requestAnimationFrame(oe)},[re,t]);Oe(()=>{let b=document.activeElement,x=Z.current;return()=>{b?.isConnected&&(document.activeElement===document.body||x?.contains(document.activeElement))&&b.focus()}},[]),Oe(()=>{if(o)return;W.current?.focus();let b=x=>{let Y=Z.current;if(Y){if(x.key==="Escape")x.preventDefault(),pe();else if(x.key==="Tab"){let U=Array.from(Y.querySelectorAll('button:not(:disabled):not([aria-disabled="true"]), [tabindex="0"]')).filter(oe=>oe.getClientRects().length>0),G=U[0],V=U[U.length-1];(!Y.contains(document.activeElement)||(x.shiftKey?document.activeElement===G:document.activeElement===V))&&(x.preventDefault(),(x.shiftKey?V:G)?.focus())}else if(["ArrowRight","ArrowDown","ArrowLeft","ArrowUp","Home","End"].includes(x.key)){let U=Array.from(Y.querySelectorAll('[role="menuitem"]:not([aria-disabled="true"])')),G=U.indexOf(document.activeElement);if(G<0||!U.length)return;x.preventDefault();let V=x.key==="Home"?0:x.key==="End"?U.length-1:(G+(x.key==="ArrowRight"||x.key==="ArrowDown"?1:-1)+U.length)%U.length;U[V].focus()}}};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[pe,o]);let[Me,$e]=Q(false);Oe(()=>{if(r)return;let b=false,x=setTimeout(async()=>{let Y=await an.getItem(bn);!b&&!Y&&$e(true)},1200);return()=>{b=true,clearTimeout(x)}},[r]);let he=gt(()=>{$e(false),an.setItem(bn,"true")},[]);Oe(()=>{o&&Me&&he()},[o,Me,he]);let Be=gt(b=>{if(b.id.startsWith("empty-")||te.current)return;let[x,Y]=ne.iconSelect.pulse,U=performance.now(),G=150,V=oe=>{let me=oe-U;if(me<G){let c=Ke(me/G);M(1-(1-x.scale)*c),requestAnimationFrame(V)}else if(me<G*2){let c=Ke((me-G)/G);M(x.scale+(Y.scale-x.scale)*c),requestAnimationFrame(V)}else M(1)};requestAnimationFrame(V),setTimeout(()=>{b.onPress(),pe()},ne.iconSelect.actionDelay)},[ne.iconSelect,pe]),ue=gt(b=>{if(te.current)return;let x=Math.max(0,Math.min(b,se-1));x!==J&&ze(x)},[se,J]),ye=$.buttonSize*S.centerButton.containerRatio,Re=$.buttonSize*S.centerButton.borderRatio,d=$.buttonSize*S.centerButton.containerRatio/2+6,_=I&&!T;return be("div",{ref:Z,role:"dialog","aria-label":"Dial Menu","aria-modal":"true",style:{position:"fixed",inset:0,zIndex:1e4},children:[D("button",{type:"button","aria-label":"Close dial menu",tabIndex:0,onClick:pe,style:{position:"absolute",inset:0,border:0,padding:0,backgroundColor:L.dialBackdrop,opacity:l}}),be("div",{style:{position:"absolute",left:"50%",marginLeft:-$.circleSize/2,bottom:80,width:$.circleSize,height:$.circleSize,borderRadius:"50%",backgroundColor:L.dialBackground,border:`${S.circle.borderWidth}px solid ${L.dialBorder}`,boxShadow:`0 0 ${S.circle.shadowRadius}px ${rn(L.dialShadow,S.circle.shadowOpacity)}`,transform:`scale(${u}) rotate(${C}deg)`,opacity:u>.01?1:0,overflow:"hidden"},children:[D("div",{style:{position:"absolute",inset:0,borderRadius:"50%",backgroundColor:L.dialGradient1,opacity:S.gradientLayers[0].opacity}}),D("div",{style:{position:"absolute",inset:0,top:"30%",left:"30%",borderRadius:"50%",backgroundColor:L.dialGradient2,opacity:S.gradientLayers[1].opacity}}),D("div",{style:{position:"absolute",inset:0,top:"50%",left:"50%",borderRadius:"50%",backgroundColor:L.dialGradient3,opacity:S.gradientLayers[2].opacity}}),qe.map(b=>D("div",{style:{position:"absolute",top:"50%",left:0,right:0,height:S.grid.lineHeight,transform:`rotate(${b}deg)`,transformOrigin:"center"},children:["left","right"].map(x=>D("div",{style:{position:"absolute",top:0,[x]:0,width:`calc(50% - ${d}px)`,height:S.grid.lineHeight,backgroundColor:L.dialGridLine}},x))},b)),D("div",{"data-testid":"dial-background","data-background":a,style:{position:"absolute",inset:0,pointerEvents:"none"},children:a==="hyperspace"?D(Xi,{size:$.circleSize}):D(Di,{focus:ir})}),Se.map((b,x)=>D(ar,{icon:b,index:x,totalIcons:Se.length,position:ke[x],progress:R,onPress:()=>Be(b)},x)),be("div",{style:{position:"absolute",left:"50%",top:"50%",width:ye,height:ye,marginLeft:-ye/2,marginTop:-ye/2,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:L.hubHalo,borderRadius:$.buttonSize,overflow:"hidden",transform:`scale(${B*A})`,opacity:B>.01?1:0},children:[D("div",{style:{position:"absolute",inset:0,backgroundColor:L.dialGradient1,opacity:.5,borderRadius:$.buttonSize}}),D("div",{style:{position:"absolute",inset:0,top:"20%",left:"20%",backgroundColor:L.dialGradient2,opacity:.3,borderRadius:$.buttonSize}}),D("div",{style:{position:"absolute",inset:0,top:"40%",left:"40%",backgroundColor:L.dialGradient3,opacity:.2,borderRadius:$.buttonSize}}),D("div",{style:{width:Re,height:Re,borderRadius:$.buttonSize*S.centerButton.borderRadiusRatio,backgroundColor:L.hubFill,display:"flex",alignItems:"center",justifyContent:"center"},children:D("button",{ref:W,type:"button","aria-label":o?"Close Settings":"Open Dev Tools Settings",disabled:!i,onClick:i,onPointerEnter:b=>b.pointerType==="mouse"&&v(true),onPointerLeave:()=>v(false),style:{border:0,padding:0,background:"transparent",width:$.buttonSize,height:$.buttonSize,borderRadius:$.buttonSize/2,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",cursor:i?"pointer":"default",transform:k?`scale(${ne.centerHover.scale})`:"scale(1)",transition:`transform ${ne.centerHover.duration}ms ease`,animation:_&&!k?ve.pulse:"none"},children:o?be("span",{style:{display:"flex",flexDirection:"column",alignItems:"center",fontSize:S.centerButton.text.fontSize-2,fontWeight:S.centerButton.text.fontWeight,fontFamily:S.centerButton.text.fontFamily,color:L.centerText,letterSpacing:S.centerButton.text.letterSpacing,textAlign:"center",textShadow:`0 0 4px ${L.centerTextGlow}`,textTransform:"uppercase",lineHeight:1.2},children:[D("span",{style:{marginBottom:-2},children:"CLOSE"}),D("span",{style:{marginTop:-2},children:"SETTINGS"})]}):D("span",{style:{fontSize:S.centerButton.text.fontSize,fontWeight:S.centerButton.text.fontWeight,fontFamily:S.centerButton.text.fontFamily,color:L.centerText,letterSpacing:S.centerButton.text.letterSpacing,textAlign:"center",textShadow:`0 0 4px ${L.centerTextGlow}`,textTransform:"uppercase"},children:n})})})]})]}),se>1&&be("div",{style:{position:"absolute",left:"50%",marginLeft:-$.circleSize/2,top:"calc(100% - 64px)",width:$.circleSize,display:"flex",alignItems:"center",justifyContent:"space-between",opacity:Math.min(1,u),transform:`scale(${Math.min(1,u)})`},children:[D(wn,{side:"prev",disabled:J<=0,onClick:()=>ue(J-1)}),be("span",{"data-testid":"buoy-dial-page",style:{padding:"6px 12px",fontSize:13,fontWeight:900,fontFamily:sn,letterSpacing:2,color:L.centerText,textShadow:`0 0 6px ${L.centerTextGlow}`},children:[String(J+1).padStart(2,"0"),be("span",{style:{color:L.iconLabelMuted,textShadow:"none"},children:[" / ",String(se).padStart(2,"0")]})]}),D(wn,{side:"next",disabled:J>=se-1,onClick:()=>ue(J+1)})]}),Me&&!o&&D(yn,{title:"Welcome to Buoy!",message:"Tap the center button to configure and add tools to your dial menu.",onDismiss:he,showArrow:false})]})}import{persistentStorage as Cn,devToolsStorageKeys as sr}from"@buoy-gg/shared-ui/web";import{recordUsage as lr,pruneUsage as cr}from"@buoy-gg/floating-tools-core/web";var In=sr.dial.usage(),Ve={},Tn=false,Ot=null;function kn(){return Ot||(Ot=(async()=>{try{let e=await Cn.getItem(In);if(e){let t=JSON.parse(e);t&&typeof t=="object"&&(Ve=t)}}catch{}finally{Tn=true}})(),Ot)}kn();function dr(e){return e.map((t,n)=>({id:t,index:n,lastUsed:Ve[t]?.lastUsed??0})).sort((t,n)=>n.lastUsed-t.lastUsed||t.index-n.index).map(({id:t})=>t)}async function ur(e){if(!e)return;Tn||await kn();let t=Math.max(Date.now(),...Object.values(Ve).map(n=>n.lastUsed+1));Ve=cr(lr(Ve,e,t),t);try{await Cn.setItem(In,JSON.stringify(Ve))}catch{}}import{useCallback as pr,useMemo as zn}from"react";import{persistentStorage as mr}from"@buoy-gg/shared-ui/web";import{useState as ie,useEffect as Ce,useCallback as ht,useMemo as yt}from"react";import{settingsEventBus as bt}from"@buoy-gg/floating-tools-core/web";import{useSyncExternalStore as gr}from"react";import{getRegisteredToolModule as fr}from"@buoy-gg/shared-ui/web";var hr=()=>()=>{},yr=()=>null;function br(){let e=fr("@buoy-gg/external-sync");return gr(e?.subscribeSyncStatus??hr,()=>e?.getSyncStatus?.()??null,yr)}import{SentryIcon as vr,WifiCircuitIcon as Sr,ImageOverlayIcon as wr,RenderCountIcon as xr,Info as Dt,Layers as Cr,ChevronRightIcon as Mn,ChevronDown as Bn,getStorageBackendType as Ir,getUseLicense as Tr,signOutOfBuoy as kr,persistentStorage as De,Trash2 as zr,CheckCircle2 as Rn,BuoyUpgradeSheet as Mr,BackgroundSwitcher as Br,night as h,NightCard as Pe,NightRows as Pt,NightSectionLabel as Rr,NightFootnote as En,NightSwitch as An,NightButton as Lt,NightSegmented as Er,NightBadge as fe,NightSeparator as Ar,monoFont as On}from"@buoy-gg/shared-ui/web";import{EnvIcon as Dn,StorageIcon as Or,RoutesIcon as Dr,NetworkIcon as Pr,QueryIcon as Lr,HighlighterIcon as Fr,ReduxIcon as $r,EventsIcon as jr}from"@buoy-gg/floating-tools-core/web";import Nr,{createContext as _r,useContext as Wr}from"react";import{jsx as Hr}from"react/jsx-runtime";var Pn=_r({});function Ln({children:e,defaultFloatingTools:t,defaultDialTools:n}){let i=Nr.useMemo(()=>({defaultFloatingTools:t,defaultDialTools:n}),[t,n]);return Hr(Pn.Provider,{value:i,children:e})}function Fn(){return Wr(Pn)}import Ur from"react";import{toolTheme as Kr}from"@buoy-gg/shared-ui/web";import{jsx as $n}from"react/jsx-runtime";function Vr({label:e,size:t,color:n=Kr.colors.text}){let i=Math.max(Array.from(e.replace(/[\uFE00-\uFE0F\u200D]/g,"")).length,1),o=i<=2?t:t*1.6,r=Math.max(7,Math.min(t*(i===1?.7:.62),o/(.62*i)));return $n("span",{style:{display:"inline-flex",minWidth:t,maxWidth:o,height:t,alignItems:"center",justifyContent:"center",color:n,fontSize:r,fontWeight:800,letterSpacing:.5,whiteSpace:"nowrap",overflow:"hidden"},children:e})}function jn(e,t){return e==null?e:typeof e=="function"?Ur.createElement(e,{slot:t.slot,size:t.size,state:t.state,actions:t.actions}):typeof e=="string"||typeof e=="number"?$n(Vr,{label:String(e),size:t.size,color:t.color}):e}import{JsModal as qr,devToolsStorageKeys as Ft,onSettingsApplied as Gr,expandableWindowControlsSupported as Jr}from"@buoy-gg/shared-ui/web";import{useSafeAreaInsets as Yr}from"@buoy-gg/shared-ui/web";import{Fragment as Ye,jsx as p,jsxs as j}from"react/jsx-runtime";var Xe="@react_buoy_dev_tools_settings",Xr=6,vt=e=>{let t=Xr,n={};for(let[i,o]of Object.entries(e))o&&t>0?(n[i]=true,t-=1):n[i]=false;return n},Qr=(e,t)=>{let{userStatus:n,environment:i,...o}=e,r=t?Object.entries(o).filter(([a])=>t.includes(a)):Object.entries(o);return{...Object.fromEntries(r),environment:i??false}},Nn=(e,t,n)=>{if(!t)return e;let i={...e.dialTools,...t.dialTools??{}},o=n?.allowedDialKeys?Object.entries(i).filter(([r])=>n.allowedDialKeys?.includes(r)):Object.entries(i);return{dialTools:vt(Object.fromEntries(o)),floatingTools:Qr({...e.floatingTools,...t.floatingTools??{}},n?.allowedFloatingKeys),globalSettings:{enableSharedModalDimensions:false,expandableWindowControls:true,...t.globalSettings??{}}}},Zr=(e=[],t,n)=>{let i={},o={},r=new Set(t??[]),a=new Set(n??[]),l=!n||n.length===0;for(let s of e){let{id:u,slot:m="both"}=s;(m==="dial"||m==="both")&&(i[u]=l?true:a.has(u)),(m==="row"||m==="both")&&(o[u]=r.has(u))}return{dialTools:vt(i),floatingTools:{...o,environment:r.has("environment")},globalSettings:{enableSharedModalDimensions:false,expandableWindowControls:true}}},ea=({visible:e,onClose:t,onSettingsChange:n,initialSettings:i,availableApps:o=[],storage:r=De,zIndex:a})=>{let{defaultFloatingTools:l,defaultDialTools:s}=Fn(),u=yt(()=>Zr(o,l,s),[o,l,s]),m=yt(()=>Object.keys(u.dialTools),[u]),C=yt(()=>Object.keys(u.floatingTools).filter(c=>c!=="environment"),[u]),[g,B]=ie(i||Qe||u),[w,R]=ie($t??"floating"),[z,A]=ie($t!==null),[M,k]=ie(new Set),[v,T]=ie(false),[P,I]=ie(false);Ce(()=>{let c=requestAnimationFrame(()=>I(true));return()=>cancelAnimationFrame(c)},[]);let E=br();Ce(()=>{(async()=>{try{let c=await De.getItem(Ft.settings.activeTab());if(c&&["floating","settings","pro"].includes(c)){let f=c;$t=f,R(O=>O===f?O:f)}}catch{}finally{A(true)}})()},[]),Ce(()=>{z&&De.setItem(Ft.settings.activeTab(),w).catch(c=>{console.warn("Failed to save settings active tab:",c)})},[w,z]);let Z=Tr()?.(),W=Z?.isPro??false,q=!W&&Z?.licenseKey?Z.error:null,te=Z?.errorKind==="transport",[K,re]=ie(_n),[ne,ve]=ie(false),[ae,Te]=ie(false),[$,qe]=ie(false),[ke,Fe]=ie([]),[ze,se]=ie(false),J=Yr(),Se=Yt.get("window").height,pe=Yt.get("window").width,Me=Math.floor(Se*.33),$e=Math.min(pe-32,400),he=ht(async()=>{try{let c=await r.getItem(Xe);if(c){let f=JSON.parse(c),O=Nn(u,f,{allowedDialKeys:m,allowedFloatingKeys:C});Qe=O,B(X=>Wn(X,O)?X:O);return}Qe=u,B(f=>Wn(f,u)?f:u)}catch(c){console.error("Failed to load dev tools settings:",c),B(u)}},[u,m,C,r]);Ce(()=>{he()},[he]),Ce(()=>{Ir().then(c=>{_n=c,re(f=>f===c?f:c)})},[]),Ce(()=>{$&&(se(true),De.getAllKeys().then(c=>{Fe(c.sort())}).catch(()=>{Fe([])}).finally(()=>{se(false)}))},[$]);let Be=async c=>{try{let f={...c,dialTools:vt(c.dialTools)};await r.setItem(Xe,JSON.stringify(f)),Qe=f,B(f),n?.(f),bt.emit(f)}catch(f){console.error("Failed to save dev tools settings:",f)}},ue=c=>{let f={...g,floatingTools:{...g.floatingTools,[c]:!g.floatingTools[c]}};Be(f)},ye=c=>{let f={...g,globalSettings:{...g.globalSettings,[c]:!g.globalSettings?.[c]}};Be(f)},Re=async()=>{ve(true),Te(false);try{await De.clear(),Te(true),B(u),r!==De&&await r.setItem(Xe,JSON.stringify(u)),n?.(u),bt.emit(u),setTimeout(()=>Te(false),2e3)}catch(c){console.error("Failed to clear storage:",c)}finally{ve(false)}},d=ht(c=>{},[]),_=c=>{let f=o.find(O=>O.id===c);return f?.description?f.description:c==="environment"?"Environment badge.":""},b=c=>c==="environment"?"Env Badge":o.find(f=>f.id===c)?.name??c.toUpperCase().replace(/_/g," "),x=c=>{if(!P)return null;switch(c){case"query":return p(Lr,{size:18});case"env":return p(Dn,{size:18});case"sentry":return p(vr,{size:18,color:"#9945FF"});case"storage":return p(Or,{size:18,bgColor:h.color.surface});case"wifi":case"query-wifi-toggle":return p(Sr,{size:18,colorPreset:"green",strength:4,noBackground:true});case"route-events":return p(Dr,{size:18,bgColor:h.color.surface});case"network":return p(Pr,{size:18});case"environment":return p(Dn,{size:18});case"debug-borders":return p(Cr,{size:18,color:h.color.accent});case"highlight-updates":return p(xr,{size:18,color:h.color.accent});case"highlight-updates-modal":return p(Fr,{size:18});case"redux":return p($r,{size:18});case"image-overlay":return p(wr,{size:18});case"events":return p(jr,{size:18});case"zustand":try{let{ZustandIcon:f}=Xt("@buoy-gg/zustand/web");return p(f,{size:18})}catch{return p(Dt,{size:18,color:h.color.textSecondary})}case"jotai":try{let{JotaiIcon:f}=Xt("@buoy-gg/jotai/web");return p(f,{size:18})}catch{return p(Dt,{size:18,color:h.color.textSecondary})}default:{let f=o.find(O=>O.id===c);return f?.icon!=null?jn(f.icon,{slot:"row",size:18,color:f.color}):p(Dt,{size:18,color:h.color.textSecondary})}}},Y=(c,f,O,X)=>{let we=_(c);return j(lt,{activeOpacity:O?1:.7,onPress:()=>!O&&X(),accessibilityLabel:b(c),accessibilityRole:"button",style:[y.toolRow,O&&y.rowDisabled],children:[p(N,{style:y.toolIconSlot,children:x(c)}),j(N,{style:y.rowInfo,children:[j(H,{style:y.rowLabel,children:[b(c),O?" \xB7 max 6":""]}),we?p(H,{style:y.rowCaption,numberOfLines:1,children:we}):null]}),p(An,{value:f,disabled:O,onValueChange:()=>X()})]},c)},U=c=>{k(f=>{let O=new Set(f);return O.has(c)?O.delete(c):O.add(c),O})},G=(c,f,O,X,we)=>{let xe=g.globalSettings?.[c]??false,je=M.has(c);return j(N,{children:[j(lt,{activeOpacity:.7,onPress:()=>U(c),accessibilityLabel:f,style:y.settingRow,children:[j(N,{style:y.rowInfo,children:[p(H,{style:y.rowLabel,children:f}),p(H,{style:y.rowCaption,numberOfLines:je?0:1,children:O})]}),p(An,{value:xe,onValueChange:()=>ye(c)})]}),je&&j(N,{style:y.settingRowBody,children:[p(H,{style:y.settingRowBodyText,children:X}),p(H,{style:y.settingRowBodyHint,children:we})]})]},c)},V=(c,f,O)=>j(N,{children:[p(Rr,{children:c}),f,O]}),oe=K==="filesystem"?p(fe,{label:"File System",tone:"accent"}):K==="asyncstorage"?p(fe,{label:"Async Storage",tone:"warning"}):K==="localstorage"?p(fe,{label:"Local Storage",tone:"accent"}):K==="memory"?p(fe,{label:"Memory",tone:"danger"}):p(fe,{label:"Loading\u2026",tone:"neutral"}),me=()=>j(N,{style:y.container,children:[j(Jt,{style:y.scrollContent,showsVerticalScrollIndicator:false,contentContainerStyle:y.scrollContainer,children:[w==="floating"&&p(Ye,{children:V("Floating Tools",p(Pe,{glass:true,children:p(Pt,{children:Object.entries(g.floatingTools).map(([c,f])=>Y(c,f,false,()=>ue(c)))})}),p(En,{children:"Tools switched on here appear in the floating bubble row."}))}),w==="settings"&&j(Ye,{children:[V("Background",p(Pe,{glass:true,padded:true,children:p(Br,{embedded:true})})),V("Storage",j(Pe,{glass:true,children:[j(lt,{activeOpacity:.7,onPress:()=>qe(!$),accessibilityLabel:"Storage Type",style:y.settingRow,children:[p(N,{style:y.rowInfo,children:p(H,{style:y.rowLabel,children:"Storage Type"})}),oe,$?p(Bn,{size:16,color:h.color.textTertiary}):p(Mn,{size:16,color:h.color.textTertiary})]}),$&&j(Ye,{children:[j(N,{style:y.settingRowBody,children:[p(H,{style:y.settingRowBodyText,children:K==="filesystem"?"Settings persist independently and survive AsyncStorage.clear() calls during logout.":K==="asyncstorage"?"Settings may be lost if AsyncStorage is cleared during logout.":K==="localstorage"?"Settings are saved in this browser. Clearing site data removes them.":K==="memory"?"Settings are stored in memory only and will be lost on app restart.":"Checking storage backend\u2026"}),K==="asyncstorage"&&p(H,{style:[y.settingRowBodyText,y.bodyWarning],children:"Install expo-file-system to persist settings through logout flows."}),K==="memory"&&p(H,{style:[y.settingRowBodyText,y.bodyDanger],children:"No persistent storage available \u2014 install expo-file-system (best) or @react-native-async-storage/async-storage."})]}),p(Ar,{}),j(N,{style:y.storageExpanded,children:[j(N,{style:y.storageExpandedHeader,children:[p(H,{style:y.storageExpandedTitle,children:"SAVED SETTINGS"}),p(H,{style:y.storageExpandedCount,children:ze?"\u2026":`${ke.length} keys`})]}),ze?p(H,{style:y.storageKeyEmpty,children:"Loading\u2026"}):ke.length===0?p(H,{style:y.storageKeyEmpty,children:"No settings saved yet"}):p(Jt,{style:y.storageKeysList,nestedScrollEnabled:true,showsVerticalScrollIndicator:true,children:ke.map(c=>p(N,{style:y.storageKeyItem,children:p(H,{style:y.storageKeyText,numberOfLines:1,children:c.replace("@react_buoy_","")})},c))})]}),p(N,{style:y.cardButtonWrap,children:p(Lt,{label:ae?"Cleared":ne?"Clearing\u2026":"Clear All Settings",variant:ae?"secondary":"destructive",size:"md",disabled:ne,onPress:Re,icon:ae?p(Rn,{size:15,color:h.color.accent}):p(zr,{size:15,color:ne?h.color.textTertiary:h.color.danger})})})]})]})),E&&E.state!=="idle"&&V("Desktop Sync",j(Pe,{glass:true,children:[j(lt,{activeOpacity:.7,onPress:()=>U("desktopSync"),accessibilityLabel:"Buoy Desktop",style:y.settingRow,children:[p(N,{style:y.rowInfo,children:p(H,{style:y.rowLabel,children:"Buoy Desktop"})}),E.state==="connected"?p(fe,{label:"Connected",tone:"accent"}):E.state==="connecting"?p(fe,{label:"Connecting\u2026",tone:"neutral"}):p(fe,{label:"Retrying",tone:"warning"}),M.has("desktopSync")?p(Bn,{size:16,color:h.color.textTertiary}):p(Mn,{size:16,color:h.color.textTertiary})]}),M.has("desktopSync")&&j(N,{style:y.settingRowBody,children:[j(H,{style:y.settingRowBodyText,children:[E.state==="connected"?"Streaming tool data to Buoy Desktop at ":"Trying to reach Buoy Desktop at ",p(H,{style:y.footnoteMono,children:E.targetURL??"(unknown URL)"}),E.state!=="connected"&&" \u2014 is the desktop app running? Override with the externalSync socketURL option if it runs elsewhere."]}),E.state==="retrying"&&E.lastError&&j(H,{style:[y.settingRowBodyText,y.bodyWarning],children:["Last error: ",E.lastError]})]})]})),V("Modal Behavior",p(Pe,{glass:true,children:j(Pt,{children:[G("enableSharedModalDimensions","Shared Modal Size","Sync dimensions across all tools","When enabled, all tool modals will share the same size and position. Resizing one modal will affect all others. When disabled, each tool remembers its own size and position independently.","Keep OFF for the best experience. This allows you to customize each tool's modal size separately."),Jr(Ne.OS==="web")?G("expandableWindowControls","Expand Controls","iPad-style expandable window buttons","When enabled, the window control buttons (minimize, toggle mode, close) start as small dots and expand into larger, easy-to-tap buttons when pressed. When disabled, buttons are directly tappable at their small size.","Keep ON for touch devices where the small buttons are hard to press. Turn OFF if you prefer direct single-tap access."):null]})}))]}),w==="pro"&&j(Ye,{children:[V("License",j(Pe,{glass:true,children:[j(N,{style:y.settingRow,children:[p(N,{style:y.rowInfo,children:p(H,{style:y.rowLabel,children:"License Status"})}),p(N,{testID:"buoy-settings-license-status",accessibilityLabel:W?"License: Active":"License: Free",children:W?p(fe,{label:"Active",tone:"accent"}):p(fe,{label:"Free",tone:"neutral"})})]}),Z?.tierSource==="session"?j(N,{style:y.settingRow,children:[p(N,{style:y.rowInfo,children:p(H,{style:y.rowLabel,children:"Signed in with Buoy"})}),p(Lt,{label:"Sign out",variant:"secondary",size:"md",onPress:()=>void kr(),testID:"buoy-settings-signout"})]}):null]}),p(En,{children:W?"You have full access to all Buoy DevTools features.":q?te?`Couldn't reach the license server (${q}). A VPN or corporate proxy can block buoy.gg \u2014 turn it off and reload. Your key hasn't been rejected.`:`License check failed: ${q}.`:"Upgrade to Pro to unlock all features and support development."})),!W&&j(Ye,{children:[V("Pro Features",p(Pe,{glass:true,children:p(Pt,{children:["Advanced Settings","Priority Support"].map(c=>j(N,{style:y.featureRow,children:[p(Rn,{size:16,color:h.color.accent}),p(H,{style:y.rowLabel,children:c})]},c))})})),p(Lt,{label:"Upgrade to Pro",variant:"primary",size:"lg",onPress:()=>T(true)})]})]})]}),p(Mr,{visible:v,onClose:()=>T(false)})]});return p(qr,{visible:e,onClose:t,zIndex:a,variant:"night",header:{showToggleButton:false,customContent:p(N,{style:y.headerRow,children:p(Er,{glass:true,tabs:[{key:"floating",label:"Floating"},{key:"settings",label:"Settings"},{key:"pro",label:"Pro"}],activeKey:w,onChange:c=>R(c)})})},initialMode:"bottomSheet",onModeChange:d,persistenceKey:Ft.settings.root(),enablePersistence:true,maxHeight:Se-J.top,initialHeight:Me,initialFloatingPosition:{x:(pe-$e)/2,y:J.top+20},enableGlitchEffects:true,children:me()})},ta={dialTools:{},floatingTools:{environment:false},globalSettings:{enableSharedModalDimensions:false}},na=(e,t)=>{let n=new Set(e??[]),i=new Set(t??[]),o={};for(let a of i)o[a]=true;let r={environment:n.has("environment")};for(let a of n)a!=="environment"&&(r[a]=true);return{dialTools:vt(o),floatingTools:r,globalSettings:{enableSharedModalDimensions:false}}},Qe=null,$t=null,_n=null,Wn=(e,t)=>JSON.stringify(e)===JSON.stringify(t);bt.addListener(e=>{e&&(Qe=e)});var Hn=()=>{let{defaultFloatingTools:e,defaultDialTools:t}=Fn(),n=yt(()=>!e&&!t?ta:na(e,t),[e,t]),[i,o]=ie(n),r=ht(async()=>{try{let l=await De.getItem(Xe);if(l){let s=JSON.parse(l),u=Nn(n,s);o(u);return}o(n)}catch(l){console.error("Failed to load dev tools settings:",l),o(n)}},[n]);Ce(()=>Gr(l=>{l.includes(Xe)&&r()}),[r]),Ce(()=>{r();let l=bt.addListener(s=>{try{s&&o(s)}catch{}});return()=>{l()}},[r]);let a=ht(()=>{r()},[r]);return{settings:i,refreshSettings:a}},y=ct.create({container:{flex:1,backgroundColor:"transparent"},headerRow:{flexDirection:"row",alignItems:"center",paddingLeft:h.gutter,paddingRight:h.gutter,paddingBottom:8},scrollContent:{flex:1},scrollContainer:{paddingHorizontal:h.gutter,paddingTop:8,paddingBottom:24,gap:h.groupGap},toolRow:{flexDirection:"row",alignItems:"center",gap:12,paddingHorizontal:h.rowPadH,paddingVertical:12},settingRow:{flexDirection:"row",alignItems:"center",gap:10,paddingHorizontal:h.rowPadH,paddingVertical:h.rowPadV,minHeight:52},featureRow:{flexDirection:"row",alignItems:"center",gap:10,paddingHorizontal:h.rowPadH,paddingVertical:12},rowDisabled:{opacity:.4},toolIconSlot:{width:24,alignItems:"center"},rowInfo:{flex:1,gap:2},rowLabel:{color:h.color.text,fontSize:h.font.row,fontWeight:"500"},rowCaption:{color:h.color.textTertiary,fontSize:h.font.label},settingRowBody:{paddingHorizontal:h.rowPadH,paddingBottom:h.rowPadV,gap:6},settingRowBodyText:{color:h.color.textSecondary,fontSize:h.font.caption,lineHeight:h.font.caption*1.45},settingRowBodyHint:{color:h.color.textTertiary,fontSize:h.font.caption,lineHeight:h.font.caption*1.45},bodyWarning:{color:h.color.warning},bodyDanger:{color:h.color.danger},cardButtonWrap:{paddingHorizontal:h.cardPad,paddingTop:10,paddingBottom:h.cardPad},storageExpanded:{paddingHorizontal:h.rowPadH,paddingVertical:12,gap:8},storageExpandedHeader:{flexDirection:"row",alignItems:"center"},storageExpandedTitle:{flex:1,color:h.color.textSecondary,fontSize:h.font.micro,fontWeight:"600",letterSpacing:.5},storageExpandedCount:{color:h.color.textTertiary,fontSize:h.font.micro},storageKeysList:{maxHeight:150},storageKeyItem:{backgroundColor:h.color.glassElevated,borderRadius:h.radius.segment,paddingHorizontal:10,paddingVertical:7,marginBottom:4},storageKeyText:{color:h.color.textSecondary,fontSize:h.font.micro,fontFamily:On},storageKeyEmpty:{color:h.color.textTertiary,fontSize:h.font.caption,fontStyle:"italic"},footnoteMono:{fontFamily:On,fontSize:h.font.label,color:h.color.textSecondary}});import{jsx as Un}from"react/jsx-runtime";var oa=[];function Kn({visible:e,onClose:t,availableTools:n=oa,defaultFloatingTools:i,defaultDialTools:o,storage:r=mr,onSettingsChange:a}){let l=zn(()=>({getItem:async m=>r.getItem(m),setItem:async(m,C)=>r.setItem(m,C)}),[r]),s=zn(()=>n.map(m=>({...m,name:m.name??m.id,icon:typeof m.icon=="function"?C=>m.icon(C.size):m.icon})),[n]),u=pr(m=>{a?.(m)},[a]);return Un(Ln,{defaultFloatingTools:i,defaultDialTools:o,children:Un(ea,{visible:e,onClose:t,zIndex:11e3,availableApps:s,storage:l,onSettingsChange:u})})}import{persistentStorage as Vn,setExpandableWindowControls as ia}from"@buoy-gg/shared-ui/web";import{createContext as ra,useCallback as Ie,useContext as aa,useEffect as St,useMemo as sa,useRef as Ze,useState as qn}from"react";var la=(e,t,n)=>{if(t.singleton){let o=e.find(r=>r.id===t.id);if(o){let r=o.minimized??false;return{instanceId:o.instanceId,wasMinimized:r,apps:[...e.filter(a=>a.instanceId!==o.instanceId),{...o,minimized:false}]}}}let i=n();return{instanceId:i,wasMinimized:false,apps:[...e,{...t,instanceId:i}]}};import{createContext as ca,useCallback as Gn,useContext as da,useEffect as wt,useMemo as ua,useRef as Jn,useState as xt}from"react";import{JsModal as pa,ModalHeader as et,HeaderSearchButton as ma,TickProvider as ga,ToolScreenHeaderContext as fa,devToolsStorageKeys as Yn,buoyColors as Xn,gameUIColors as jt}from"@buoy-gg/shared-ui/web";import{jsx as le,jsxs as Ct}from"react/jsx-runtime";var tt=()=>{},ha={search:"",isSearchActive:false,clearSearch:tt,close:tt,minimize:tt,showToast:tt,setHeaderOverride:tt},Qn=ca(null);function Zn(){return da(Qn)??ha}function ya(e,t){let{setHeaderOverride:n}=Zn();wt(()=>(n(e),()=>n(null)),t)}var eo=2200,ba={success:jt.success,error:jt.error,info:jt.info};function va({message:e,type:t,nonce:n}){let i=Jn(new Ee.Value(0)).current;wt(()=>{i.setValue(0),Ee.sequence([Ee.timing(i,{toValue:1,duration:150,useNativeDriver:true}),Ee.delay(eo-450),Ee.timing(i,{toValue:0,duration:300,useNativeDriver:true})]).start()},[n,i]);let o=ba[t];return Ct(Ee.View,{pointerEvents:"none",style:[It.toast,{opacity:i,borderColor:o+"60"}],children:[le(N,{style:[It.toastDot,{backgroundColor:o}]}),le(H,{style:It.toastText,numberOfLines:2,children:e})]})}function Sa({app:e,config:t,visible:n,zIndex:i,onClose:o,onMinimize:r,initialModalState:a,enableSharedModalDimensions:l,bodyProps:s}){let u=e.component,[m,C]=xt(false),[g,B]=xt(""),[w,R]=xt(null),[z,A]=xt(null),M=Jn(null),k=Gn(()=>{C(false),B("")},[]),v=Gn((K,re="info")=>{M.current&&clearTimeout(M.current),A(ne=>({message:K,type:re,nonce:(ne?.nonce??0)+1})),M.current=setTimeout(()=>A(null),eo)},[]);wt(()=>()=>{M.current&&clearTimeout(M.current)},[]);let T=ua(()=>({search:m?g:"",isSearchActive:m,clearSearch:k,close:o,minimize:()=>r(),showToast:v,setHeaderOverride:R,instanceId:e.instanceId}),[g,m,k,o,r,v,e.instanceId]),P=w?.title??t.title??e.title??e.id,I=w?.subtitle??t.subtitle,E=w?.onBack,Z=w?.actions??t.headerActions,W=w?.searchable??t.searchable;wt(()=>{!W&&m&&k()},[W,m,k]);let q=l?Yn.modal.root():Yn.custom(e.id).modal(),te=Ct(et,{children:[E&&!m&&le(et.Navigation,{onBack:E}),m?le(et.Search,{value:g,onChangeText:B,onCancel:k,placeholder:t.searchPlaceholder,testID:`tool-search-field-${e.id}`}):le(et.Content,{title:P,subtitle:I}),Ct(et.Actions,{children:[!m&&Z,W&&!m&&le(ma,{variant:"chip",testID:`tool-search-${e.id}`,onPress:()=>C(true)})]})]});return le(Qn.Provider,{value:T,children:le(pa,{visible:n,onClose:o,onBack:E,onMinimize:r,initialModalState:a,zIndex:i,persistenceKey:q,enablePersistence:true,initialMode:t.initialMode??"bottomSheet",header:{customContent:te,showToggleButton:true},disableScrollWrapper:true,styles:{},children:Ct(N,{style:It.bodyRoot,children:[le(ga,{children:le(fa.Provider,{value:R,children:le(u,{...s})})}),z&&le(va,{message:z.message,type:z.type,nonce:z.nonce})]})})})}var It=ct.create({bodyRoot:{flex:1,minHeight:0,backgroundColor:"transparent"},toast:{position:"absolute",bottom:16,alignSelf:"center",flexDirection:"row",alignItems:"center",gap:8,maxWidth:"86%",backgroundColor:Xn.card,borderWidth:1,borderRadius:8,paddingHorizontal:12,paddingVertical:8,shadowColor:"#000",shadowOpacity:.4,shadowRadius:8,shadowOffset:{width:0,height:2},elevation:6},toastDot:{width:6,height:6,borderRadius:3},toastText:{flex:1,fontSize:12,color:Xn.text}});import{useEffect as wa,useRef as xa}from"react";import{capacitorPlatform as Ca,capacitorPlugin as Ia}from"@buoy-gg/license/web";function Ta(){return globalThis.__BUOY_HOLDS_BACK__===true}var ka=99.5;function za(){if(typeof document>"u")return false;let e=globalThis.Ionic;if(!e&&!document.querySelector("ion-app"))return false;try{return e?.config?.get?.("hardwareBackButton",true)!==false}catch{return true}}function Ma(e,t){let n=xa(t);n.current=t,wa(()=>{if(!e||Ca()!=="android")return;let i=globalThis;i.__BUOY_HOLDS_BACK__=true;let o;if(za()){let r=a=>{a.detail?.register?.(ka,()=>{n.current()})};document.addEventListener("ionBackButton",r),o=()=>document.removeEventListener("ionBackButton",r)}else{let r=Ia("App");if(!r?.addListener){i.__BUOY_HOLDS_BACK__=false;return}let a=false,l=null;Promise.resolve(r.addListener("backButton",()=>n.current())).then(s=>{a?s.remove():l=s}).catch(()=>{}),o=()=>{a=true,l&&l.remove()}}return()=>{o(),i.__BUOY_HOLDS_BACK__=false}},[e])}import{Fragment as Ba,jsx as ce}from"react/jsx-runtime";var to=ra(null),no="@react_buoy_open_apps",Nt=44,Ra=12,Ea=100,Aa=16,Oa=e=>({x:window.innerWidth-Nt-Aa,y:window.innerHeight-Ea-Nt-e*(Nt+Ra)}),oo=({children:e})=>{let[t,n]=qn([]),[i,o]=qn(false),r=Ze([]),a=Ze(null),l=Ze(false),s=Ze(false),u=Ze(false),m=Ie(v=>{let T="";return n(P=>{let{apps:I,instanceId:E}=la(P,v,()=>`${v.id}-${Date.now()}-${Math.random().toString(36).slice(2)}`);return T=E,I}),T},[]),C=Ie(()=>{if(l.current||!s.current||!u.current)return;l.current=true;let v=a.current;if(!v||v.length===0){o(true);return}a.current=null,v.forEach(({id:T,minimized:P})=>{let I=r.current.find(E=>E.id===T);if(I&&I.component){let E=jn(I.icon,{slot:"dial",size:20,color:I.color});m({id:I.id,title:I.name,component:I.component,props:I.props,modal:I.modal,launchMode:I.launchMode||"self-modal",singleton:I.singleton??true,icon:E,color:I.color,minimized:P})}}),o(true)},[m]);St(()=>{let v=false;return(async()=>{try{let T=await Vn.getItem(no);if(v)return;if(T){let P=JSON.parse(T),I;Array.isArray(P)&&P.length>0&&(typeof P[0]=="string"?I=P.map(E=>({id:E,minimized:false})):I=P.filter(E=>typeof E=="object"&&E!==null&&typeof E.id=="string"),I.length&&(a.current=I))}}catch{}v||(s.current=true,C())})(),()=>{v=true}},[C]),St(()=>{if(!i)return;let v=t.map(T=>({id:T.id,minimized:T.minimized??false}));Vn.setItem(no,JSON.stringify(v))},[t,i]);let g=Ie(v=>{r.current=v,u.current=true,C()},[C]),B=Ie(v=>{n(T=>T.length?v?T.filter(P=>P.instanceId!==v):T.slice(0,-1):T)},[]),w=Ie(()=>n([]),[]),R=Ie((v,T)=>{n(P=>P.map(I=>I.instanceId===v?{...I,minimized:true,restoreState:T}:I))},[]),z=Ie((v,T)=>{n(P=>P.map(I=>I.instanceId===v?{...I,minimized:false,restoreState:T??I.restoreState}:I))},[]),A=Ie(v=>t.find(T=>T.instanceId===v)?.minimized??false,[t]),M=t.some(v=>v.launchMode!=="toggle-only"&&!v.minimized);St(()=>{if(!M)return;let v=T=>{if(T.key!=="Escape"||T.defaultPrevented)return;let P=[...t].reverse().find(I=>I.launchMode!=="toggle-only"&&!I.minimized);P&&B(P.instanceId)};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[M,B,t]),Ma(t.length>0,()=>B());let k=sa(()=>({openApps:t,isAnyOpen:M,open:m,close:B,closeAll:w,registerApps:g,minimize:R,restore:z,isMinimized:A}),[t,M,m,B,w,g,R,z,A]);return ce(to.Provider,{value:k,children:e})},nt=()=>{let e=aa(to);return e||{openApps:[],isAnyOpen:false,open:()=>"",close:()=>{},closeAll:()=>{},registerApps:()=>{},minimize:()=>{},restore:()=>{},isMinimized:()=>false}},Da=9e3,Pa={position:"fixed",inset:0,backgroundColor:"rgba(0,0,0,0.28)",display:"flex",alignItems:"center",justifyContent:"center"},La={maxHeight:"90%",width:"94%",borderRadius:12,backgroundColor:"white",overflow:"hidden"},Fa=({app:e,zIndex:t,onClose:n,onMinimize:i,minimizeTargetPosition:o,enableSharedModalDimensions:r})=>{let a=e.component,l=!e.minimized,s={...e.props??{},...r?{enableSharedModalDimensions:true}:{}};return e.modal&&(!e.launchMode||e.launchMode==="self-modal")?ce("div",{"data-testid":`buoy-tool-instance-${e.id}`,style:{position:"fixed",inset:0,zIndex:t,pointerEvents:"none"},children:ce(Sa,{app:e,config:e.modal,visible:l,zIndex:t,onClose:n,onMinimize:i,initialModalState:e.restoreState,enableSharedModalDimensions:r,bodyProps:s})}):e.launchMode==="self-modal"?ce("div",{"data-testid":`buoy-tool-instance-${e.id}`,style:{position:"fixed",inset:0,zIndex:t,pointerEvents:"none"},children:ce(a,{...s,visible:l,onClose:n,onRequestClose:n,onMinimize:i,minimizeTargetPosition:o,instanceId:e.instanceId,zIndex:t,initialModalState:e.restoreState})}):e.launchMode==="inline"?l?ce("div",{"data-testid":`buoy-tool-instance-${e.id}`,style:{position:"fixed",inset:0,zIndex:t,pointerEvents:"none"},children:ce(a,{...s,onClose:n,onMinimize:i,minimizeTargetPosition:o,initialModalState:e.restoreState,instanceId:e.instanceId})}):null:ce("div",{"data-testid":`buoy-tool-instance-${e.id}`,style:{...Pa,zIndex:t,display:l?"flex":"none"},children:ce("div",{style:La,children:ce(a,{...s,onClose:n,onMinimize:i,minimizeTargetPosition:o,initialModalState:e.restoreState,instanceId:e.instanceId})})})},io=()=>{let{openApps:e,close:t,minimize:n}=nt(),{settings:i}=Hn();St(()=>{ia(i.globalSettings?.expandableWindowControls!==false)},[i.globalSettings?.expandableWindowControls]);let o=e.filter(l=>l.launchMode!=="toggle-only");if(o.length===0)return null;let r=o.filter(l=>l.minimized).length,a=Ii()??Oa(r);return ce(Ba,{children:o.map((l,s)=>ce(Fa,{app:l,zIndex:Da+s,onClose:()=>t(l.instanceId),onMinimize:u=>n(l.instanceId,u),enableSharedModalDimensions:i.globalSettings?.enableSharedModalDimensions===true,minimizeTargetPosition:a},l.instanceId))})};import{useCallback as $a,useEffect as _t,useRef as ja,useState as ro,useSyncExternalStore as ao}from"react";import{persistentStorage as so,getToolAttention as Wt,subscribeToolAttention as lo}from"@buoy-gg/shared-ui/web";import{jsx as de,jsxs as Tt}from"react/jsx-runtime";function Na(e){return ao(lo,()=>Wt(e),()=>Wt(e))}var co={needsInput:"#FF8329",done:"#20C997",failed:"#FF3B30"},uo={needsInput:3,failed:2,done:1},po=new Map;function mo(e){let t=null;for(let i of e?e.split("|"):[]){let o=Wt(i);o&&(!t||uo[o.kind]>uo[t.kind])&&(t=o)}let n=po.get(e);return n&&t&&n.kind===t.kind&&n.label===t.label?n:!n&&!t?null:(po.set(e,t),t)}function _a(e){let t=e.join("|");return ao(lo,()=>mo(t),()=>mo(t))}var go=28,Ht=32,Ut=6,fo=8,ho=24,yo="@react_buoy_minimized_stack_expanded",Wa=80,bo=2e3,Ha=6e3,Ua="#1A1A1A",ot="#888888";function vo({down:e=false}){return de("svg",{width:12,height:12,viewBox:"0 0 24 24","aria-hidden":"true",style:{transform:e?"rotate(180deg)":void 0},children:de("path",{d:"M18 15l-6-6-6 6",fill:"none",stroke:ot,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function Ka({id:e,title:t,icon:n,index:i,onPress:o}){let r=Na(e),a=ja(null);return _t(()=>{let l=true,s,u=()=>{a.current?.animate([{transform:"translateX(0) scale(1)",opacity:1,offset:0},{transform:"translateX(3px) scale(1.05)",opacity:.4,offset:.2},{transform:"translateX(-3px) scale(1.1)",opacity:1,offset:.4},{transform:"translateX(2px) scale(1.0)",opacity:.6,offset:.6},{transform:"translateX(-1px) scale(0.95)",opacity:1,offset:.8},{transform:"translateX(0) scale(1)",opacity:1,offset:1}],{duration:Wa,easing:"linear"})},m=C=>{let g=C?500+Math.random()*1500+i*200:bo+Math.random()*(Ha-bo)+i*300;s=setTimeout(()=>{l&&(u(),m(false))},g)};return m(true),()=>{l=false,clearTimeout(s)}},[i]),Tt("button",{type:"button","aria-label":r?`${t} \u2014 ${r.label}. Restore`:`Restore ${t}`,"data-testid":`buoy-dock-restore-${e}`,onClick:o,style:{width:Ht,height:Ht,display:"flex",alignItems:"center",justifyContent:"center",background:"none",border:"none",padding:0,cursor:"pointer",position:"relative"},children:[de("div",{ref:a,style:{display:"flex",alignItems:"center",justifyContent:"center"},children:n}),r?de("span",{"aria-hidden":true,"data-testid":`buoy-dock-badge-${e}-${r.kind}`,style:{position:"absolute",top:0,right:0,minWidth:12,height:12,borderRadius:6,padding:"0 2px",boxSizing:"border-box",background:co[r.kind],border:"1.5px solid #0C0C0C",color:"#000",fontSize:8,fontWeight:800,lineHeight:"9px",display:"flex",alignItems:"center",justifyContent:"center"},children:r.kind==="needsInput"?"!":""}):null]})}function Va({containerWidth:e=32}){let{openApps:t,restore:n}=nt(),i=t.filter(g=>g.minimized&&g.launchMode!=="toggle-only"),[o,r]=ro(false),[a,l]=ro(false),s=_a(i.map(g=>g.id));_t(()=>{let g=false;return(async()=>{let B=await so.getItem(yo);!g&&B==="true"&&r(true),g||l(true)})(),()=>{g=true}},[]),_t(()=>{a&&so.setItem(yo,o?"true":"false")},[o,a]);let u=$a(g=>{n(g)},[n]);if(i.length===0)return null;let m=fo+i.length*Ht+(i.length-1)*Ut+Ut+ho+4,C={backgroundColor:Ua,borderTopLeftRadius:6,borderTopRightRadius:6,borderTop:`1px solid ${ot}66`,borderLeft:`1px solid ${ot}66`,borderRight:`1px solid ${ot}66`,borderBottom:"none",boxSizing:"border-box"};return Tt("div",{style:{height:go,overflow:"visible",position:"relative"},children:[de("div",{style:{position:"absolute",bottom:"var(--buoy-stack-bottom, 0px)",top:"var(--buoy-stack-top, auto)",left:0,width:e,maxHeight:"var(--buoy-stack-space, calc(100vh - 48px))",visibility:o?"visible":"hidden",height:o?m:0,opacity:o?1:0,overflowY:"auto",overflowX:"hidden",transition:"height 200ms ease, opacity 200ms ease",pointerEvents:o?"auto":"none",...C},children:Tt("div",{style:{height:m,display:"flex",flexDirection:"column",alignItems:"center",paddingTop:fo,gap:Ut,boxSizing:"border-box"},children:[o&&[...i].reverse().map((g,B)=>de(Ka,{id:g.id,title:g.title||g.id,icon:g.icon??de("span",{style:{color:"#fff",fontSize:13},children:(g.title||g.id).slice(0,1).toUpperCase()}),index:B,onPress:()=>u(g.instanceId)},g.instanceId)),de("button",{type:"button","aria-label":"Collapse","data-testid":"buoy-dock-collapse",onClick:()=>r(false),style:{width:"100%",height:ho,marginTop:3,display:"flex",alignItems:"center",justifyContent:"center",background:"none",border:"none",cursor:"pointer",padding:0},children:de(vo,{down:true})})]})}),Tt("button",{type:"button","aria-label":`Show ${i.length} minimized tools`,"data-testid":"buoy-dock-peek",tabIndex:o?-1:0,"aria-hidden":o,onClick:()=>r(true),style:{position:"absolute",bottom:0,left:0,width:e,height:go,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",gap:2,cursor:"pointer",padding:0,opacity:o?0:1,transform:o?"scale(0.9)":"scale(1)",transition:"opacity 200ms ease, transform 200ms ease",pointerEvents:o?"none":"auto",...C},children:[de(vo,{}),s?de("span",{"aria-hidden":true,"data-testid":"buoy-dock-peek-attention",style:{position:"absolute",top:2,right:2,minWidth:11,height:11,borderRadius:6,padding:"0 2px",boxSizing:"border-box",background:co[s.kind],border:"1.5px solid #0C0C0C",color:"#000",fontSize:8,fontWeight:800,lineHeight:"9px",display:"flex",alignItems:"center",justifyContent:"center"},children:s.kind==="needsInput"?"!":""}):null,i.length>1&&de("span",{style:{fontSize:9,fontWeight:600,color:ot,marginLeft:1},children:i.length})]})]})}import{registerToolModules as qa}from"@buoy-gg/shared-ui/web";import{createElement as Ga}from"react";function it(e){let t=e.icon;return{...e,icon:typeof t=="function"?n=>Ga(t,{size:n,slot:e.slot??"both",color:e.color}):()=>t}}import{createContext as Ja,useContext as Ya,useState as So,useMemo as wo}from"react";import{jsx as Xa}from"react/jsx-runtime";var xo=Ja(null);function Co({children:e}){let[t,n]=So(false),[i,o]=So(false),r=wo(()=>t||i,[t,i]),a=wo(()=>({isDialOpen:t,isToolOpen:i,isDevToolsActive:r,setDialOpen:n,setToolOpen:o}),[t,i,r]);return Xa(xo.Provider,{value:a,children:e})}function Kt(){let e=Ya(xo);return e||{isDialOpen:false,isToolOpen:false,isDevToolsActive:false,setDialOpen:()=>{},setToolOpen:()=>{}}}import*as Qa from"@buoy-gg/license/web";import*as Za from"@buoy-gg/shared-ui/web";import*as es from"@buoy-gg/shared-ui/web/dataViewer";function Io(e){qa({core:{useDevToolsVisibility:Kt},license:Qa,"shared-ui":Za,"shared-ui/dataViewer":es,...e});let t=new Set;return Object.values(e).flatMap(n=>Object.entries(n).flatMap(([i,o])=>!i.endsWith("Preset")||!o||typeof o.id!="string"||!o.component||t.has(o.id)?[]:(t.add(o.id),[it(o)])))}import{useEffect as kt,useMemo as zt,useRef as ts}from"react";import{LicenseManager as ns,installCapacitorBridge as os,resolveDevBuild as To,useLicense as is}from"@buoy-gg/license/web";import{registerToolAdapters as rs}from"@buoy-gg/shared-ui/web";function ko(e){return typeof e=="object"&&e!==null?e:void 0}function as({isDevelopment:e,isLicensed:t,externalSync:n,isAvailable:i}){if(n===false||!i)return false;if(e)return true;let o=ko(n);return t&&o?.enableInRelease===true&&Mo(o.socketURL,o)===null}var zo="http://localhost:42831";function ss(e){return e==="localhost"||e.endsWith(".localhost")||/^127\.\d+\.\d+\.\d+$/.test(e)||e==="[::1]"||e==="::1"||e==="10.0.2.2"}function Mo(e,t){let n=e??zo;if(t?.allowInsecureNetwork===true)return null;let i;try{i=new URL(n)}catch{return`[Buoy] externalSync.socketURL "${n}" isn't a valid URL, so this release build won't connect to Buoy Desktop.`}return i.protocol==="https:"||i.protocol==="wss:"||ss(i.hostname)?null:`[Buoy] This release build won't connect to ${n}: release sync carries real user data, and plain http to another machine is readable by anyone on the same network. Use a simulator, an emulator or adb reverse (localhost), an https:// broker, or set externalSync.allowInsecureNetwork: true for a network you trust.`}var ls={impersonate:["searchUsers","startImpersonation","resumeImpersonation","updateSettings","removeFromHistory","clearHistory"]};function cs(e,t,n){if(t)return e;let i=null;for(let[o,r]of Object.entries(ls)){if(n?.includes(o))continue;let a=e[o];if(!a?.actions)continue;let l={...a.actions};for(let s of r)s in l&&(l[s]=()=>{throw new Error(`${o}.${s} is off in release builds. To allow it from Buoy Desktop and the MCP, pass externalSync={{ enableInRelease: true, releaseActions: ["${o}"] }}.`)});i??(i={...e}),i[o]={...a,actions:l}}return i??e}import{useEffect as ds,useMemo as us,useState as ps}from"react";import{devToolsStorageKeys as ms,persistentStorage as gs}from"@buoy-gg/shared-ui/web";import{isCapacitorNative as fs}from"@buoy-gg/license/web";var hs=8;function ys(){let e="";for(;e.length<hs;)e+=(Math.random()*16|0).toString(16);return e}function bs(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}function vs({appName:e,hardwareName:t,platform:n,installId:i,deviceId:o}){let r=bs(e??"buoy")||"buoy",a=e??"Buoy Device",l=t?.trim()||n;return o?{deviceId:o,deviceName:`${a} (${l})`}:{deviceId:`${r}-${n}-${i}`,deviceName:`${a} (${l} \xB7 ${i.slice(-4)})`}}function Ss(){let e=globalThis;try{return e.sessionStorage??null}catch{return null}}function ws(){let e=globalThis;try{return e.localStorage??null}catch{return null}}async function xs({platform:e=Ne.OS,store:t,mint:n=ys}={}){let i=ms.sync.deviceId(),o=t===void 0?fs()?ws():e==="web"?Ss():gs:t;if(!o)return n();try{let r=await o.getItem(i);if(r&&r.length>0)return r;let a=n();return await o.setItem(i,a),a}catch{return n()}}var Vt=null;function Cs(){return Vt||(Vt=xs()),Vt}function Is(e,t){let n=e?.deviceId,i=e?.deviceName,o=t.loadId??Cs,r=t.platform??Ne.OS,[a,l]=ps(null);return ds(()=>{if(n)return;let s=false;return o().then(u=>{s||l(u)}),()=>{s=true}},[n,o]),us(()=>{if(!n&&!a)return null;let s=vs({appName:t.appName,hardwareName:t.hardwareName,platform:r,installId:a??"",deviceId:n});return i?{...s,deviceName:i}:s},[n,i,a,t.appName,t.hardwareName,r])}import{useEffect as Ts,useState as ks}from"react";import{capacitorPlatform as zs,capacitorPlugin as Mt,isCapacitorNative as Ms}from"@buoy-gg/license/web";function Bs(e,t){if(t==="ios")return/iPad/.test(e)?"iPad":/iPhone/.test(e)?"iPhone":null;let n=/Android [\d.]+;\s*([^;)]+?)(?:\s+Build\/|\))/.exec(e)?.[1]?.trim();return!n||n==="K"?null:n}function Rs(e){return/sdk_gphone|Android SDK built for|google_sdk|Emulator|generic_/i.test(e)}function Bo(){return typeof navigator>"u"?"":navigator.userAgent??""}function qt(){return typeof document>"u"?null:document.title||(typeof location>"u"?null:location.hostname)||null}var Ro="@react_buoy_capacitor_app_name";function Es(e){try{let t=globalThis.localStorage;if(!t)return e;let n=t.getItem(Ro);if(n)return n;e&&t.setItem(Ro,e)}catch{}return e}function As(){let e=zs();if(!e)return{platform:"web",appName:qt(),hardwareName:"Browser",ready:true};let t=!!Mt("App");return{platform:e,appName:t?qt():Es(qt()),hardwareName:Bs(Bo(),e)??e,extraDeviceInfo:{runtime:"capacitor"},ready:!t&&!Mt("Device")}}function Os(){let[e,t]=ks(As);return Ts(()=>{if(!Ms())return;let n=false,i=Mt("App"),o=Mt("Device");return Promise.all([i?.getInfo?.().catch(()=>null)??null,o?.getInfo?.().catch(()=>null)??null]).then(([r,a])=>{if(n)return;let l=r?.name?.trim(),s=a?.name?.trim()||a?.model?.trim();t(u=>({...u,appName:l||u.appName,hardwareName:s||u.hardwareName,ready:true}))}),()=>{n=true}},[]),e}function Eo(){if(typeof location>"u")return null;let e=globalThis.WEBVIEW_SERVER_URL;return{protocol:location.protocol,hostname:location.hostname,origin:`${location.protocol}//${location.host}`,userAgent:Bo(),serverUrl:typeof e=="string"?e:null}}function Ao(e){if(!e)return null;try{let t=new URL(e);return`${t.protocol}//${t.host}`}catch{return null}}function Ds(e,t){if(e==="ios"){let n=Ao(t.serverUrl);return n?n===Ao(t.origin):t.protocol==="capacitor:"}return Oo.has(t.hostname)}var Oo=new Set(["localhost","127.0.0.1","[::1]","::1"]);function Ps(e,t,n,i=Eo()){if(n==="web"||!i)return e;let o;try{o=new URL(e)}catch{return e}let r=Ds(n,i);return!t&&r&&o.hostname===i.hostname&&(o.hostname="localhost"),n==="android"&&Oo.has(o.hostname)&&Rs(i.userAgent)&&(o.hostname="10.0.2.2"),o.toString().replace(/\/$/,"")}function Ls(e,t,n=Eo()){return t!=="android"||!n||n.protocol!=="https:"||!/^(http|ws):/i.test(e)?null:`[Buoy] Can't reach Buoy Desktop at ${e}. This Android WebView serves the app from https://${n.hostname} and blocks plain http/ws by default. For debug builds, set android.allowMixedContent: true and server.cleartext: true in capacitor.config, then run cap sync.`}import{getDevServerOrigin as Fs,resolveReloadStrategy as $s,scheduleReloadApp as js}from"@buoy-gg/shared-ui/web";var Do=Date.now(),Po=Fs(),Ns={platform:Ne.OS,isTV:Ne.isTV===true,isTVOS:Ne.isTVOS===true},Lo={version:3,getSnapshot:()=>{let e=$s("auto");return{startedAt:Do,devServerOrigin:Po,device:Ns,reload:{available:e!==null,strategy:e}}},subscribe:e=>()=>{},actions:{ping:()=>({ok:true,startedAt:Do,devServerOrigin:Po}),reloadApp:e=>{let t=e??{},{strategy:n,delayMs:i}=js({strategy:t.strategy,delayMs:t.delayMs});return{scheduled:true,strategy:n,delayMs:i}}}};import{Fragment as _s,jsx as Le,jsxs as Ws}from"react/jsx-runtime";var Hs=["ConsoleRoot","RouteTracker","ReactQueryTracker","ReduxAutoInstrument","PerfMonitorRoot","AutomationResumer","ImagesRoot"],Us=["DebugBordersStandaloneOverlay","HighlightUpdatesOverlay","ImageOverlayStandalone","PerfMonitorOverlay","JsTopHudOverlay","ImpersonateOverlay","ScenariosOverlay"];function Ks(e){let t=zt(()=>Object.fromEntries(Object.entries(e.modules).map(([i,o])=>[i.replace(/^@buoy-gg\//,"").replace(/\/web$/,""),o])),[e.modules]),n=t["react-query"];return n?.useReactQuerySyncAdapter?Le(Vs,{...e,modules:t,query:n}):Le(Fo,{...e,modules:t})}function Vs(e){let t=e.query.useReactQuerySyncAdapter();return Le(Fo,{...e,queryAdapter:t})}function Fo({modules:e,apps:t,requiredEnvVars:n,externalSync:i,headless:o,sentryGetClient:r,queryAdapter:a}){let{isPro:l,tier:s}=is(),u=zt(()=>{let z={app:Lo};for(let[A,M]of Object.entries(e))for(let[k,v]of Object.entries(M))k.endsWith("SyncAdapter")&&v&&typeof v=="object"&&(z[A]=v);a&&(z.query=a),e.env?.createEnvSyncAdapter&&(z.env=e.env.createEnvSyncAdapter(n??[]));for(let A of t??[])A.sync&&(z[`custom:${A.id}`]=A.sync);return z},[e,t,n,a]),m=ts(u);m.current=u,kt(()=>rs(()=>m.current),[]),kt(()=>{let z=[],A=M=>{let k=M?.();typeof k=="function"&&z.push(k)};return A(e.network?.startNetworkCapture),A(e.storage?.startBrowserStorageCapture),A(e.assets?.startBrowserAssetCapture),To(typeof _e<"u"?_e:process.env.NODE_ENV!=="production")&&A(e["time-machine"]?.startTimeMachineFloatingToolPersistence),e.storage?.storageSyncAdapter?.subscribe&&A(()=>e.storage.storageSyncAdapter.subscribe(()=>{})),e["focus-inspector"]?.focusInspectorSyncAdapter?.subscribe&&A(()=>e["focus-inspector"].focusInspectorSyncAdapter.subscribe(()=>{})),()=>{for(let M of z.reverse())M()}},[e]);let C=e["external-sync"],g=To(typeof _e<"u"?_e:process.env.NODE_ENV!=="production"),B=as({isDevelopment:g,isLicensed:l,externalSync:i,isAvailable:!!C}),w=ko(i);os({release:!g&&!!w?.enableInRelease}),!g&&w?.enableInRelease&&jo(Mo(w.socketURL,w));let R=e.sentry?.SentryRoot;return Ws(_s,{children:[Object.entries(e).flatMap(([z,A])=>Hs.map(M=>{let k=A[M];return k?Le(k,{},`${z}:${M}`):null})),R&&Le(R,{getClient:r}),Object.entries(e).flatMap(([z,A])=>Us.map(M=>{let k=A[M];return k&&(!o||M==="ScenariosOverlay"||M==="ImpersonateOverlay")?Le(k,{},`${z}:${M}`):null})),B&&Le(qs,{module:C,tools:u,options:w,isPro:l,tier:s,dev:g})]})}var $o=null;function jo(e){!e||e===$o||($o=e,console.warn(e))}function qs({module:e,tools:t,options:n,isPro:i,tier:o,dev:r}){let a=Os(),l=Is(n,{appName:a.appName,hardwareName:a.hardwareName,platform:a.platform}),s=zt(()=>Ps(n?.socketURL??(r?e.getDefaultSocketURL():zo),!!n?.socketURL,a.platform),[n?.socketURL,r,e,a.platform]),{socket:u}=e.useExternalSyncSocket({deviceName:l?.deviceName??"Buoy Browser",socketURL:s,persistentDeviceId:a.ready?l?.deviceId??null:null,platform:a.platform,extraDeviceInfo:a.extraDeviceInfo,enableLogs:n?.enableLogs});kt(()=>{let g=Ls(s,a.platform);if(!u||!g)return;let B=()=>jo(g);return u.on("connect_error",B),()=>{u.off("connect_error",B)}},[u,s,a.platform]),kt(()=>{if(!u)return;let g=()=>{u.connected&&ns.hasAccountAccess()&&u.emit("device-license",{isPro:i?"1":"0",tier:o})};return g(),u.on("connect",g),()=>{u.off("connect",g)}},[u,i,o]);let m=n?.releaseActions?.join(",")??"",C=zt(()=>cs(t,r,m?m.split(","):void 0),[t,r,m]);return e.useExternalSync({tools:C,socket:u,deviceId:a.ready?l?.deviceId??null:null,enableLogs:n?.enableLogs}),null}import{useState as No}from"react";import{createPortal as Gs}from"react-dom";import{useBuoySession as Js}from"@buoy-gg/license/web";import{Fragment as _o,jsx as rt,jsxs as Wo}from"react/jsx-runtime";var Ho="#20C997";function Ys(){let{status:e,signIn:t,signOut:n}=Js(),[i,o]=No(false),[r,a]=No(null);if(typeof document>"u")return null;let l=()=>{a(null),o(true),t().catch(u=>a(u instanceof Error?u.message:"Sign-in did not work. Try again.")).finally(()=>o(false))},s=e.state==="active";return Gs(rt("div",{"data-buoy-signin":"",style:{position:"fixed",right:"max(16px, env(safe-area-inset-right))",bottom:"max(20px, env(safe-area-inset-bottom))",zIndex:99999,maxWidth:"min(320px, calc(100vw - 32px))",padding:s||r?"12px 14px":0,borderRadius:16,background:s||r?"#0f1419":"transparent",color:"#e6edf3",boxShadow:s||r?"0 10px 30px rgba(0,0,0,.35)":"none",fontFamily:"system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",fontSize:14,lineHeight:1.45},children:s?Wo(_o,{children:[rt("div",{"data-testid":"buoy-signin-needs-plan",children:"Buoy on a live site needs a Pro or Business plan."}),rt("button",{type:"button",onClick:()=>void n(),style:Xs,"data-testid":"buoy-signout",children:"Sign out"})]}):Wo(_o,{children:[r?rt("div",{role:"alert",style:{marginBottom:10},"data-testid":"buoy-signin-error",children:r}):null,rt("button",{type:"button",onClick:l,disabled:i,"data-testid":"buoy-signin",style:{display:"inline-flex",alignItems:"center",gap:8,padding:"10px 16px",border:"none",borderRadius:999,background:Ho,color:"#04130d",fontWeight:600,fontSize:14,cursor:i?"wait":"pointer",boxShadow:"0 8px 24px rgba(0,0,0,.3)"},children:i?"Signing in\u2026":"Sign in to Buoy"})]})}),document.body)}var Xs={marginTop:8,padding:0,border:"none",background:"none",color:Ho,fontSize:14,cursor:"pointer",textDecoration:"underline"};import{useState as Qs}from"react";import{AccountSetupButton as Zs,BuoyNeedsPlanCard as el,BuoySignInCard as tl,useSignInState as nl}from"@buoy-gg/shared-ui/web";import{jsx as at,jsxs as Uo}from"react/jsx-runtime";function Ko({needsPlan:e=false}){let[t,n]=Qs(false),i=nl();return Uo(N,{pointerEvents:"box-none",style:Vo.root,children:[at(Zs,{expanded:t,onPress:()=>n(true)}),t?at(Qo,{visible:true,transparent:true,animationType:"fade",onRequestClose:()=>n(false),children:Uo(N,{style:Vo.overlay,accessibilityViewIsModal:true,children:[at(Xo,{style:ct.absoluteFill,onPress:()=>n(false),accessible:false}),e&&i==="active"?at(el,{onClose:()=>n(false)}):at(tl,{onClose:()=>n(false)})]})}):null]})}var Vo=ct.create({root:{position:"absolute",bottom:30,right:16,zIndex:99999},overlay:{flex:1,backgroundColor:"rgba(0, 0, 0, 0.65)",alignItems:"center",justifyContent:"center",padding:20}});function qo(e){if(e.length>6){let t=e.map(n=>`"${n}"`).join(", ");return e.slice(0,6)}return e}import{installedTools as ol,installedToolsFound as il}from"@buoy-gg/core/web/installed-tools";import{Fragment as Gt,jsx as F,jsxs as st}from"react/jsx-runtime";var Go={},Jo="@react_buoy_floating_menu_tooltip_shown",rl=Ae;function al({size:e=14,color:t="#20C997"}){let n=Math.max(2,e/4),i=Math.max(1,e/16);return F("div",{style:{display:"grid",gridTemplateColumns:`repeat(3, ${n}px)`,gap:i,width:e,height:e,alignContent:"center",justifyContent:"center"},children:Array.from({length:9}).map((o,r)=>F("div",{style:{width:n,height:n,borderRadius:n/2,backgroundColor:t}},r))})}function sl(e){let{defaultFloatingTools:t,defaultDialTools:n,disableHints:i=false,children:o}=e,r=ge(()=>n&&qo(n),[n]);return F(Ln,{defaultFloatingTools:t,defaultDialTools:r,children:F(ui,{disableHints:i,children:st(Co,{children:[F(oo,{children:F(ml,{...e})}),o]})})})}var ll=["ReduxAutoInstrument","ConsoleRoot","RouteTracker","ReactQueryTracker"];function cl({modules:e=Go}){return F(Gt,{children:Object.entries(e).flatMap(([t,n])=>ll.map(i=>{let o=n[i];return o?F(o,{},`${t}:${i}`):null}))})}function dl(){let{openApps:e,restore:t}=nt();return ee(()=>mi(n=>{let i=e.find(o=>o.id===n);return i?(t(i.instanceId),true):false}),[e,t]),null}function ul(){let e=si();return pi((e===null?process.env.NODE_ENV:e?"development":"production")??"dev")}function pl(e,t,n,i){let o=m=>Object.entries(e).find(([C])=>C.replace(/^@buoy-gg\//,"").replace(/\/web$/,"")===m)?.[1],r=[],a=o("env");t?.length&&a?.createEnvTool&&a.createEnvVarConfig&&r.push(it(a.createEnvTool({requiredEnvVars:a.createEnvVarConfig(t)})));let l=o("storage");n?.length&&l?.createStorageTool&&r.push(it(l.createStorageTool({requiredStorageKeys:n})));let s=o("ask-buoy"),u=i==="hosted"?s?.hostedAskBuoy?.():i;return u&&s?.createAskBuoyTool&&r.push(it(s.createAskBuoyTool(u))),r}function ml({environment:e,userRole:t="admin",availableEnvironments:n,onEnvironmentSwitch:i,apps:o,modules:r=Go,externalSync:a,requiredEnvVars:l,sentryGetClient:s,disableHints:u=false,headless:m=false,hidden:C=false,defaultFloatingTools:g,defaultDialTools:B,zustandStores:w,requiredStorageKeys:R,askBuoy:z}){let A=e??ul(),M=ge(()=>B?qo(B):void 0,[B]),[k,v]=Bt(false),[T,P]=Bt(false),I=fi(false),E=nt(),Z=ge(()=>pl(r,l,R,z),[r,l,R,z]),W=ge(()=>Zt([...Io(r),...o??[],...Z]),[o,r,Z]),q=ge(()=>Object.entries(r).find(([d])=>d.replace(/^@buoy-gg\//,"").replace(/\/web$/,"")==="zustand")?.[1],[r]);ee(()=>{if(!w||typeof q?.watchStores!="function")return;let d=q.watchStores(w);return typeof d=="function"?d:void 0},[w,q]);let te=Kt(),K=E.openApps.some(d=>!d.minimized);ee(()=>{te.setDialOpen(k)},[k,te.setDialOpen]),ee(()=>{te.setToolOpen(K||T)},[K,T,te.setToolOpen]);let{registerApps:re}=E;ee(()=>{re(W.map(d=>{let _=d.icon;return{...d,icon:typeof _=="function"?({size:b})=>_(b):_}}))},[re,W]);let ne=ge(()=>W.map(d=>({id:d.id,name:d.name,description:d.description,slot:d.slot})),[W]);hi({availableTools:ne,storage:rl}),ee(()=>{let d=false;return(async()=>{let[_,b]=await Promise.all([Ae.getItem(ut.dial.isOpen()),Ae.getItem(ut.settings.modalOpen())]);d||(_==="true"&&v(true),b==="true"&&(v(true),P(true)),I.current=true)})(),()=>{d=true}},[]),ee(()=>{I.current&&Ae.setItem(ut.dial.isOpen(),k?"true":"false")},[k]),ee(()=>{I.current&&Ae.setItem(ut.settings.modalOpen(),T?"true":"false")},[T]);let ve=We(d=>{if(ur(d.id),d.launchMode==="toggle-only"){d.onPress?.();return}if(d.component){let _=typeof d.icon=="function"?d.icon(20):d.icon;E.open({id:d.id,title:d.name||dt(d.id),component:d.component,props:d.props,modal:d.modal,launchMode:d.launchMode||"self-modal",singleton:d.singleton??true,icon:_,color:d.color||Qt(d.id)})}else d.onPress?.()},[E]),ae=ge(()=>Rt(W,"dial").map(d=>{let _=d.color||Qt(d.id),b;return typeof d.icon=="string"?b=d.icon:typeof d.icon=="function"?b=d.icon(32):b=null,{id:d.id,name:d.name||dt(d.id),icon:b,unavailable:!d.component&&!d.onPress,color:_,onPress:()=>{ve(d),v(false)}}}),[W,ve]),Te=ge(()=>{if(!k)return ae;let d=new Map(ae.map(_=>[_.id,_]));return dr(ae.map(_=>_.id)).map(_=>d.get(_)).filter(_=>!!_)},[k,ae]),{settings:$}=Hn(),qe=ge(()=>Rt(W,"row").filter(d=>($.floatingTools[d.id]??false)===true&&(d.component||d.onPress)),[W,$.floatingTools]),ke=ge(()=>W.map(d=>({id:d.id,name:d.name||dt(d.id),description:d.description||yi(d.id),slot:d.slot,icon:d.icon,color:d.color})),[W]),[Fe,ze]=Bt(false),se=E.openApps.some(d=>!d.minimized);ee(()=>{if(u)return;let d=false,_=setTimeout(async()=>{let b=await Ae.getItem(Jo);!d&&!b&&ze(true)},1e3);return()=>{d=true,clearTimeout(_)}},[u]);let J=We(()=>{ze(false),Ae.setItem(Jo,"true")},[]),Se=We(()=>{J(),v(true)},[J]),pe=We(()=>{v(false),P(false)},[]),Me=We(()=>{P(d=>!d)},[]),$e=We(()=>P(false),[]),he=!!(n?.length&&i),Be=$.floatingTools.environment!==false,ue=Fe&&!k&&!se&&!C;ee(()=>{if(!ue)return;let d=b=>{(!(b.target instanceof Element)||!b.target.closest("[data-buoy-root]"))&&J()},_=b=>{b.key==="Escape"&&J()};return document.addEventListener("pointerdown",d,true),document.addEventListener("keydown",_),()=>{document.removeEventListener("pointerdown",d,true),document.removeEventListener("keydown",_)}},[ue,J]);let ye=E.openApps.some(d=>d.minimized&&d.launchMode!=="toggle-only"),Re=F(Ks,{modules:r,apps:o,requiredEnvVars:l,externalSync:a,headless:m,sentryGetClient:s});return m?Re:st("div",{"data-buoy-root":"",style:{display:"contents"},children:[Re,F(dl,{}),ue&&F("div",{style:{position:"fixed",inset:0,backgroundColor:"rgba(0,0,0,0.85)",zIndex:1e4,pointerEvents:"none"}}),F("div",{style:C?{visibility:"hidden"}:{display:"contents"},"aria-hidden":C||void 0,children:st(en,{enablePositionPersistence:!ue,pushToSide:k||se,suspendPointerEvents:k,centerOnboarding:ue,minimizedStack:ye?F(Va,{}):void 0,hasMinimizedStack:ye,children:[A&&Be&&!he&&F(bi,{environment:A}),he&&Be&&F(vi,{currentEnvironment:A??"local",availableEnvironments:n,onSelect:i}),t?F(tn,{userRole:t,onPress:Se}):F("button",{"aria-label":"Open dev tools",onClick:Se,style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"6px 8px",background:"none",border:"none",cursor:"pointer"},children:F(al,{})}),qe.map(d=>F("button",{"aria-label":d.name||dt(d.id),title:d.description,onClick:()=>ve(d),style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"4px 6px",borderRadius:6,background:"none",border:"none",cursor:"pointer"},children:typeof d.icon=="function"?d.icon(16):d.icon},d.id))]})}),ue&&F(yn,{title:"Welcome to Buoy!",message:"Grab and position this menu wherever you want, then tap the icon to open your tools.",onDismiss:J}),k&&!C&&F(xn,{icons:Te,onClose:pe,centerLabel:"BUOY",onCenterPress:Me,settingsOpen:T,hintsDisabled:u}),T&&!C&&F(Kn,{visible:true,onClose:$e,availableTools:ke,defaultFloatingTools:g,defaultDialTools:M,onSettingsChange:d=>{}}),!C&&st(Gt,{children:[F(io,{}),F(ti,{})]})]})}function gl(e){let t=e&&typeof e=="object"?e.appId:void 0,n=!!e;ee(()=>{if(!n)return;let i=false,o=ni.SessionManager;if(!o)return;let r=a=>{i||!a||(o.configure({audience:`app:${a}`}),o.load().catch(()=>{}))};return t?r(t):ci().then(a=>r(a?.bundleId)).catch(()=>{}),()=>{i=true}},[n,t])}var Yo=false;function fl(e){return e.modules?e:(!il&&!Yo&&typeof console<"u"&&(Yo=true,console.info("[Buoy] No tools loaded. Add buoy() from '@buoy-gg/core/vite' to your Vite plugins, or pass modules to FloatingDevTools.")),{...e,modules:ol})}function hl(e){let t=fl(e),{access:n,isPro:i,licenseKey:o}=ii();ee(()=>{oi.configure(t.licenseKey)},[t.licenseKey]);let r=t.licenseKey===void 0||ri(t.licenseKey,o),a=ai(typeof _e<"u"?_e:process.env.NODE_ENV!=="production"),l=r&&n.status==="admitted";ee(()=>{l&&gi()},[l]),ee(()=>{a||n.status==="initializing"||(i&&l?Zo():ei())},[a,i,l,n.status]);let s=li();return gl(s?t.signIn:void 0),!a&&!i?!t.signIn||t.headless?null:s?F(Ko,{needsPlan:true}):F(Ys,{}):l?F(sl,{...t}):st(Gt,{children:[n.status==="initializing"&&F(cl,{modules:t.modules}),t.headless?null:t.signIn&&s?F(Ko,{}):F(di,{})]})}export{Si as a,wi as b,Zt as c,Rt as d,xi as e,en as f,Ci as g,tn as h,xn as i,Kn as j,Zn as k,ya as l,Ta as m,oo as n,nt as o,io as p,it as q,Co as r,Kt as s,Io as t,Lo as u,hl as v};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";var t="@react_buoy_web_register_until";function r(){try{let e=Number(globalThis.localStorage?.getItem(t));return Number.isFinite(e)&&e>Date.now()}catch{return false}}function a(){try{globalThis.localStorage?.setItem(t,String(Date.now()+6048e5))}catch{}}function o(){try{globalThis.localStorage?.removeItem(t)}catch{}}export{r as a,a as b,o as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{b as k,c as E}from"./chunk-CLXYMJTS.mjs";var m={};k(m,{AccessibilityInfo:()=>I,ActivityIndicator:()=>ye,Alert:()=>Se,Animated:()=>b,AppRegistry:()=>V,AppState:()=>P,Appearance:()=>L,BackHandler:()=>M,Button:()=>ve,CheckBox:()=>_,Clipboard:()=>N,DeviceEventEmitter:()=>ce,Dimensions:()=>x,Easing:()=>R,FlatList:()=>q,I18nManager:()=>D,Image:()=>G,ImageBackground:()=>J,InteractionManager:()=>H,Keyboard:()=>F,KeyboardAvoidingView:()=>Q,LayoutAnimation:()=>K,Linking:()=>O,LogBox:()=>le,Modal:()=>A,NativeEventEmitter:()=>W,NativeModules:()=>B,PanResponder:()=>$,Picker:()=>X,PixelRatio:()=>j,Platform:()=>h,Pressable:()=>w,ProgressBar:()=>Z,RefreshControl:()=>ee,SafeAreaView:()=>ae,ScrollView:()=>S,SectionList:()=>te,Share:()=>z,StatusBar:()=>ie,StyleSheet:()=>f,Switch:()=>ge,Text:()=>y,TextInput:()=>xe,Touchable:()=>oe,TouchableHighlight:()=>he,TouchableNativeFeedback:()=>se,TouchableOpacity:()=>v,TouchableWithoutFeedback:()=>fe,UIManager:()=>U,Vibration:()=>Y,View:()=>g,VirtualizedList:()=>ne,YellowBox:()=>re,findNodeHandle:()=>we,unstable_createElement:()=>C,useColorScheme:()=>de,useLocaleContext:()=>pe,useWindowDimensions:()=>ue});E(m,T);import*as T from"react-native-web";import{unstable_createElement as C,NativeModules as B,AccessibilityInfo as I,Animated as b,Appearance as L,AppRegistry as V,AppState as P,BackHandler as M,Clipboard as N,Dimensions as x,Easing as R,I18nManager as D,Keyboard as F,InteractionManager as H,LayoutAnimation as K,Linking as O,NativeEventEmitter as W,PanResponder as $,PixelRatio as j,Platform as h,Share as z,StyleSheet as f,UIManager as U,Vibration as Y,CheckBox as _,FlatList as q,Image as G,ImageBackground as J,KeyboardAvoidingView as Q,Picker as X,ProgressBar as Z,RefreshControl as ee,SafeAreaView as ae,SectionList as te,StatusBar as ie,Touchable as oe,TouchableNativeFeedback as se,VirtualizedList as ne,YellowBox as re,LogBox as le,DeviceEventEmitter as ce,useColorScheme as de,useLocaleContext as pe,useWindowDimensions as ue}from"react-native-web";import*as a from"react-native-web";import{createElement as me,forwardRef as be}from"react";function i(s){let r=be((u,e)=>{let{accessibilityState:l,accessibilityValue:c,...n}=u;for(let o of["busy","checked","disabled","expanded","selected"])l?.[o]!==void 0&&n[`aria-${o}`]===void 0&&(n[`aria-${o}`]=l[o]);for(let[o,t]of Object.entries({min:"valuemin",max:"valuemax",now:"valuenow",text:"valuetext"}))c?.[o]!==void 0&&n[`aria-${t}`]===void 0&&(n[`aria-${t}`]=c[o]);return me(s,{...n,ref:e})}),d=s.State;return d&&Object.assign(r,{State:d}),r.displayName=s.displayName??s.name??"NativeWebView",r}var g=i(a.View),y=i(a.Text),xe=i(a.TextInput),v=i(a.TouchableOpacity),he=i(a.TouchableHighlight),fe=i(a.TouchableWithoutFeedback),w=i(a.Pressable),S=i(a.ScrollView),A=i(a.Modal),ge=i(a.Switch),ye=i(a.ActivityIndicator),ve=i(a.Button),we=a.findNodeHandle,Se={alert(s,r,d,u){if(typeof document>"u")return;let e=document.createElement("dialog");e.dataset.buoyRoot="",e.setAttribute("aria-label",s),e.style.cssText="position:fixed;inset:0;margin:auto;width:min(440px,90vw);padding:24px;border:1px solid #475569;border-radius:14px;background:#17212e;color:#f1f5f9;font:14px system-ui;box-shadow:0 20px 80px #0008;z-index:2147483647";let l=document.createElement("h2");if(l.textContent=s,l.style.cssText="font-size:18px;margin:0 0 12px",e.appendChild(l),r){let t=document.createElement("p");t.textContent=r,t.style.cssText="line-height:1.5;white-space:pre-wrap;margin:0 0 20px",e.appendChild(t)}let c=document.createElement("div");c.style.cssText="display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px";let n=d?.length?d:[{text:"OK"}],o=()=>{e.close?.(),e.remove()};for(let t of n){let p=document.createElement("button");p.type="button",p.textContent=t.text??"OK",p.style.cssText=`padding:9px 14px;border:1px solid #64748b;border-radius:7px;color:white;background:${t.style==="destructive"?"#a52b38":"#283a4d"};cursor:pointer;font:inherit`,p.onclick=()=>{o(),t.onPress?.()},c.appendChild(p)}e.addEventListener("cancel",t=>{t.preventDefault(),u?.cancelable!==false&&(o(),u?.onDismiss?.())}),e.appendChild(c),document.body.appendChild(e),e.showModal?e.showModal():e.setAttribute("open","")}};export{g as a,y as b,v as c,w as d,S as e,A as f,m as g,b as h,x as i,h as j,f as k};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";var u=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var p=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(r,t)=>(typeof require<"u"?require:r)[t]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var s=(e,r)=>{for(var t in r)u(e,t,{get:r[t],enumerable:true})},i=(e,r,t,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of l(r))!f.call(e,o)&&o!==t&&u(e,o,{get:()=>r[o],enumerable:!(a=n(r,o))||a.enumerable});return e},c=(e,r,t)=>(i(e,r,"default"),t&&i(t,r,"default"));var y=(()=>{try{let e=globalThis.Capacitor;if(e&&typeof e.isNativePlatform=="function"&&e.isNativePlatform())return e.DEBUG===true}catch{}return process.env.NODE_ENV!=="production"})();typeof window<"u"&&typeof globalThis.global>"u"&&(globalThis.global=globalThis);export{p as a,s as b,c,y as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{a as n,b as d,g as de,k as m}from"./chunk-7G3P7Z7K.mjs";import{toolTheme as y}from"@buoy-gg/shared-ui/web";import{CopyButton as x,toolTheme as a}from"@buoy-gg/shared-ui/web";import{TreeDiffViewer as b,SplitDiffViewer as C}from"@buoy-gg/shared-ui/web/dataViewer";import{jsx as t,jsxs as f}from"react/jsx-runtime";var S={success:a.colors.success,active:a.colors.success,connected:a.colors.success,error:a.colors.error,failed:a.colors.error,warning:a.colors.warning,stale:a.colors.warning,pending:a.colors.info,loading:a.colors.info,fetching:a.colors.info,info:a.colors.info,inactive:a.colors.textMuted,idle:a.colors.textMuted};function p(e){return S[e.toLowerCase()]??a.colors.textMuted}var w={GET:a.colors.info,POST:a.colors.success,PUT:a.colors.warning,PATCH:a.colors.warning,DELETE:a.colors.error};function v(e){return w[e.toUpperCase()]??a.colors.textSecondary}var T={string:a.colors.success,number:a.colors.info,boolean:a.colors.warning,object:a.colors.accent,array:a.colors.accent,function:a.colors.error,null:a.colors.textMuted,undefined:a.colors.textMuted};function M(e){return T[e.toLowerCase()]??a.colors.textSecondary}function D({children:e,color:s=a.colors.textSecondary,icon:o,size:r="small",pill:l=false,mono:u=false,style:g}){let h=typeof e=="string"||typeof e=="number";return f(n,{style:[i.base,r==="medium"&&i.medium,l&&i.pill,{backgroundColor:s+"1A",borderColor:s+"40"},g],children:[o,h?t(d,{style:[i.text,r==="medium"&&i.textMedium,u&&i.textMono,{color:s}],numberOfLines:1,children:e}):e]})}var i=m.create({base:{flexDirection:"row",alignItems:"center",alignSelf:"flex-start",gap:4,borderWidth:1,borderRadius:a.radius.sm,paddingHorizontal:6,paddingVertical:2},medium:{paddingHorizontal:8,paddingVertical:3},pill:{borderRadius:a.radius.pill,minWidth:20,justifyContent:"center"},text:{fontSize:10,fontWeight:"600",letterSpacing:.3},textMedium:{fontSize:12},textMono:{fontFamily:a.text.mono.fontFamily}});function k({status:e,color:s,size:o=8,style:r}){let l=s??(e?p(e):a.colors.textMuted);return t(n,{style:[{width:o,height:o,borderRadius:o/2,backgroundColor:l},r]})}function B({label:e,value:s,copyable:o=false,style:r}){let l=typeof s=="string"||typeof s=="number";return f(n,{style:[c.row,r],children:[t(d,{style:c.label,numberOfLines:1,children:e}),t(n,{style:c.value,children:l?t(d,{style:c.valueText,numberOfLines:2,children:String(s)}):s}),o&&s!=null&&t(x,{value:s,size:12})]})}var c=m.create({row:{flexDirection:"row",alignItems:"center",gap:a.spacing.sm,paddingVertical:3},label:{...a.text.label,color:a.colors.textMuted,minWidth:72},value:{flex:1,flexDirection:"row",alignItems:"center"},valueText:{...a.text.mono,color:a.colors.text}});function E({oldValue:e,newValue:s,mode:o="tree",showUnchanged:r=true,scrollEnabled:l=false,height:u=220}){return o==="text"?t(C,{oldValue:e,newValue:s,height:u}):t(b,{oldValue:e,newValue:s,showUnchanged:r,scrollEnabled:l})}import{ToolButton as P,CopyButton as V,PowerToggleButton as L}from"@buoy-gg/shared-ui/web";import{CompactRow as z,DevToolsCard as H}from"@buoy-gg/shared-ui/web";import{SectionHeader as R,CollapsibleSection as U,TabSelector as F,EmptyState as I,SearchBar as A,EventStepperFooter as O}from"@buoy-gg/shared-ui/web";import{DataViewer as j}from"@buoy-gg/shared-ui/web/dataViewer";import{BaseEventStore as G}from"@buoy-gg/shared-ui/web";import{RelativeTime as W}from"@buoy-gg/shared-ui/web";import{formatBytes as J,formatDuration as K,formatNumber as q,truncateMiddle as X,safeStringify as N}from"@buoy-gg/shared-ui/web";import{usePersistedState as Z,persistentStorage as Q,devToolsStorageKeys as _}from"@buoy-gg/shared-ui/web";import{useSafeAreaInsets as $,copyToClipboard as Y}from"@buoy-gg/shared-ui/web";import{JsModal as aa}from"@buoy-gg/shared-ui/web";import{Activity as ea,AlertTriangle as sa,Bug as oa,Check as ra,CheckCircle as ta,ChevronDown as la,ChevronLeft as ia,ChevronRight as na,ChevronUp as ca,Clock as ua,Copy as da,Database as ma,Eye as fa,EyeOff as pa,FileJson as ga,FileText as ha,Filter as ya,FlaskConical as xa,Globe as ba,Hash as Ca,Info as Sa,Key as wa,Layers as va,Lock as Ta,Pause as Ma,Play as Da,Plus as ka,Power as Ba,RefreshCw as Ea,Search as Pa,Settings as Va,Shield as La,Trash2 as za,User as Ha,Wifi as Ra,X as Ua,Zap as Fa,AlertCircle as Ia,BarChart3 as Aa,Bookmark as Oa,Cloud as ja,Download as Ga,Edit3 as Wa,GitBranch as Ja,HardDrive as Ka,HelpCircle as qa,Home as Xa,Image as Na,Link as Za,Maximize2 as Qa,Minus as _a,Palette as $a,Pin as Ya,Route as ae,Server as ee,Smartphone as se,Square as oe,CheckSquare as re,Timer as te,Unlock as le,Upload as ie,Users as ne,XCircle as ce}from"@buoy-gg/shared-ui/web";export{p as a,v as b,M as c,D as d,k as e,B as f,E as g,y as h,P as i,V as j,L as k,z as l,H as m,R as n,U as o,F as p,I as q,A as r,O as s,j as t,G as u,W as v,J as w,K as x,q as y,X as z,N as A,Z as B,Q as C,_ as D,$ as E,Y as F,aa as G,ea as H,sa as I,oa as J,ra as K,ta as L,la as M,ia as N,na as O,ca as P,ua as Q,da as R,ma as S,fa as T,pa as U,ga as V,ha as W,ya as X,xa as Y,ba as Z,Ca as _,Sa as $,wa as aa,va as ba,Ta as ca,Ma as da,Da as ea,ka as fa,Ba as ga,Ea as ha,Pa as ia,Va as ja,La as ka,za as la,Ha as ma,Ra as na,Ua as oa,Fa as pa,Ia as qa,Aa as ra,Oa as sa,ja as ta,Ga as ua,Wa as va,Ja as wa,Ka as xa,qa as ya,Xa as za,Na as Aa,Za as Ba,Qa as Ca,_a as Da,$a as Ea,Ya as Fa,ae as Ga,ee as Ha,se as Ia,oe as Ja,re as Ka,te as La,le as Ma,ie as Na,ne as Oa,ce as Pa};
|