@buoy-gg/shared-ui 7.0.63 → 7.0.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/lib/commonjs/JsModal.web.js +1 -1
- package/lib/commonjs/clipboard/copyToClipboard.js +1 -1
- package/lib/commonjs/dataViewer/VirtualizedDataExplorer.js +1 -1
- package/lib/commonjs/hooks/useDeviceInfo.js +1 -1
- package/lib/commonjs/license/AccountSetup.web.js +2 -2
- package/lib/commonjs/settings/components/BubbleSettingsSection.js +1 -1
- package/lib/commonjs/storage/buoyOwnership.js +1 -0
- package/lib/commonjs/storage/buoyOwnership.test.js +1 -0
- package/lib/commonjs/storage/devToolsStorageKeys.js +1 -1
- package/lib/commonjs/storage/index.js +1 -1
- package/lib/commonjs/ui/components/ChangeRow.js +1 -1
- package/lib/commonjs/ui/components/CompactRow.js +1 -1
- package/lib/commonjs/ui/components/DataInspector.js +1 -1
- package/lib/commonjs/ui/components/DraggableHeader.js +1 -1
- package/lib/commonjs/ui/floating/FloatingTool.web.js +1 -1
- package/lib/commonjs/ui/floating/index.web.js +1 -1
- package/lib/commonjs/ui/floating/portalHost.test.js +1 -0
- package/lib/commonjs/ui/floating/portalHost.web.js +1 -0
- package/lib/commonjs/ui/fonts.js +1 -1
- package/lib/commonjs/ui/index.js +1 -1
- package/lib/commonjs/ui/systemFont.js +1 -0
- package/lib/commonjs/utils/loadOptionalModule.js +1 -1
- package/lib/commonjs/utils/minimalSuperJSON.js +1 -1
- package/lib/commonjs/utils/nativeWeb.js +1 -1
- package/lib/commonjs/utils/persistentStorage.js +1 -1
- package/lib/module/JsModal.web.js +1 -1
- package/lib/module/clipboard/copyToClipboard.js +1 -1
- package/lib/module/dataViewer/VirtualizedDataExplorer.js +1 -1
- package/lib/module/hooks/useDeviceInfo.js +1 -1
- package/lib/module/license/AccountSetup.web.js +2 -2
- package/lib/module/settings/components/BubbleSettingsSection.js +1 -1
- package/lib/module/storage/buoyOwnership.js +1 -0
- package/lib/module/storage/buoyOwnership.test.js +1 -0
- package/lib/module/storage/devToolsStorageKeys.js +1 -1
- package/lib/module/storage/index.js +1 -1
- package/lib/module/ui/components/ChangeRow.js +1 -1
- package/lib/module/ui/components/CompactRow.js +1 -1
- package/lib/module/ui/components/DataInspector.js +1 -1
- package/lib/module/ui/components/DraggableHeader.js +1 -1
- package/lib/module/ui/floating/FloatingTool.web.js +1 -1
- package/lib/module/ui/floating/index.web.js +1 -1
- package/lib/module/ui/floating/portalHost.test.js +1 -0
- package/lib/module/ui/floating/portalHost.web.js +1 -0
- package/lib/module/ui/fonts.js +1 -1
- package/lib/module/ui/index.js +1 -1
- package/lib/module/ui/systemFont.js +1 -0
- package/lib/module/utils/loadOptionalModule.js +1 -1
- package/lib/module/utils/minimalSuperJSON.js +1 -1
- package/lib/module/utils/nativeWeb.js +1 -1
- package/lib/module/utils/persistentStorage.js +1 -1
- package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/commonjs/license/AccountSetup.web.d.ts +1 -1
- package/lib/typescript/commonjs/storage/buoyOwnership.d.ts +15 -0
- package/lib/typescript/commonjs/storage/buoyOwnership.test.d.ts +2 -0
- package/lib/typescript/commonjs/storage/index.d.ts +1 -0
- package/lib/typescript/commonjs/ui/floating/FloatingTool.web.d.ts +2 -2
- package/lib/typescript/commonjs/ui/floating/index.web.d.ts +1 -0
- package/lib/typescript/commonjs/ui/floating/portalHost.test.d.ts +2 -0
- package/lib/typescript/commonjs/ui/floating/portalHost.web.d.ts +8 -0
- package/lib/typescript/commonjs/ui/fonts.d.ts +1 -0
- package/lib/typescript/commonjs/ui/index.d.ts +1 -1
- package/lib/typescript/commonjs/ui/systemFont.d.ts +2 -0
- package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/module/license/AccountSetup.web.d.ts +1 -1
- package/lib/typescript/module/storage/buoyOwnership.d.ts +15 -0
- package/lib/typescript/module/storage/buoyOwnership.test.d.ts +2 -0
- package/lib/typescript/module/storage/index.d.ts +1 -0
- package/lib/typescript/module/ui/floating/FloatingTool.web.d.ts +2 -2
- package/lib/typescript/module/ui/floating/index.web.d.ts +1 -0
- package/lib/typescript/module/ui/floating/portalHost.test.d.ts +2 -0
- package/lib/typescript/module/ui/floating/portalHost.web.d.ts +8 -0
- package/lib/typescript/module/ui/fonts.d.ts +1 -0
- package/lib/typescript/module/ui/index.d.ts +1 -1
- package/lib/typescript/module/ui/systemFont.d.ts +2 -0
- package/lib/web/asyncStorage.mjs +1 -1
- package/lib/web/chunks/chunk-3HELV44Y.mjs +1 -0
- package/lib/web/chunks/chunk-4HIK66DZ.mjs +1 -0
- package/lib/web/chunks/chunk-4YLP5MMN.mjs +1 -0
- package/lib/web/chunks/chunk-5G6RSRP4.mjs +1 -0
- package/lib/web/chunks/chunk-7JJHWSTD.mjs +1 -0
- package/lib/web/chunks/chunk-AHVO74UQ.mjs +1 -0
- package/lib/web/chunks/chunk-CJTGUGMQ.mjs +1 -0
- package/lib/web/chunks/chunk-FA6WAQUA.mjs +6 -0
- package/lib/web/chunks/chunk-GMM6TGFO.mjs +1 -0
- package/lib/web/chunks/chunk-HIAN3HBD.mjs +1 -0
- package/lib/web/chunks/chunk-HPZXETRA.mjs +1 -0
- package/lib/web/chunks/chunk-NOSWH3E2.mjs +1 -0
- package/lib/web/chunks/chunk-OGAHL36T.mjs +15 -0
- package/lib/web/chunks/chunk-P32XO2YS.mjs +1 -0
- package/lib/web/chunks/chunk-SBYYOE2T.mjs +1 -0
- package/lib/web/chunks/chunk-T6T3FEMU.mjs +1 -0
- package/lib/web/chunks/chunk-VAR5UK6J.mjs +1 -0
- package/lib/web/chunks/persistentStorage.web-NOUYFUMM.mjs +1 -0
- package/lib/web/colors.mjs +1 -1
- package/lib/web/dataViewer.mjs +2 -2
- package/lib/web/floating.mjs +1 -1
- package/lib/web/history.mjs +1 -1
- package/lib/web/hooks.mjs +1 -1
- package/lib/web/index.mjs +3 -3
- package/lib/web/native.mjs +1 -1
- package/lib/web/ui.mjs +1 -1
- package/lib/web/utils.mjs +1 -1
- package/package.json +5 -5
- package/lib/web/chunks/chunk-3UTMGIUG.mjs +0 -1
- package/lib/web/chunks/chunk-4IM4VIMP.mjs +0 -1
- package/lib/web/chunks/chunk-53J2FMUD.mjs +0 -1
- package/lib/web/chunks/chunk-ASHW3TI7.mjs +0 -1
- package/lib/web/chunks/chunk-BZTGYXMT.mjs +0 -1
- package/lib/web/chunks/chunk-CE5U3CSQ.mjs +0 -1
- package/lib/web/chunks/chunk-E2MI3FII.mjs +0 -15
- package/lib/web/chunks/chunk-FP44YK4E.mjs +0 -1
- package/lib/web/chunks/chunk-GF364FIK.mjs +0 -1
- package/lib/web/chunks/chunk-L63X3LPR.mjs +0 -1
- package/lib/web/chunks/chunk-L7OYS724.mjs +0 -1
- package/lib/web/chunks/chunk-LZ7FZZ7R.mjs +0 -1
- package/lib/web/chunks/chunk-NVD5LLXD.mjs +0 -1
- package/lib/web/chunks/chunk-QNLAFQET.mjs +0 -1
- package/lib/web/chunks/chunk-SYU4BFQR.mjs +0 -6
- package/lib/web/chunks/chunk-UYWHGSA7.mjs +0 -1
- package/lib/web/chunks/persistentStorage.web-3QA77BIL.mjs +0 -1
package/lib/web/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use client";import{a as Vr,b as Yr,c as qr,d as Jr,e as Kr,f as Qr,g as Xr,h as Zr,i as es}from"./chunks/chunk-BZTGYXMT.mjs";import{a as ts,b as as,c as rs,d as ss,e as ns,f as os,g as is,h as ls}from"./chunks/chunk-E2MI3FII.mjs";import{$ as cs,A as us,B as ds,C as hs,D as gs,E as ps,F as fs,G as bs,J as ms,K as ys,L as vs,M as Ss,N as Cs,O as ws,P as xs,Q as Ts,R as ks,S as Is,Z as _s,_ as Es,a as Ia,b as Os,c as As,d as $e,e as Rs,f as Ls,g as _a,h as Ps,i as $s,j as Ms,k as Bs,l as Ns,m as It,n as Ds,o as zs,p as Ws,q as js,r as Fs,s as Hs,t as Us,u as Gs,v as Vs,w as Ys,x as qs,y as Js,z as Ks}from"./chunks/chunk-ASHW3TI7.mjs";import"./chunks/chunk-LZ7FZZ7R.mjs";import{a as Qs,d as Xs,f as _t}from"./chunks/chunk-53J2FMUD.mjs";import{$ as Zs,$a as en,$b as tn,A as an,Aa as rn,Ab as sn,Ac as nn,B as on,Ba as ln,Bb as cn,Bc as un,C as dn,Ca as hn,Cb as Ea,Cc as gn,D as pn,Da as fn,Db as bn,Dc as Oa,E as mn,Ea as yn,Eb as vn,Ec as Sn,F as Cn,Fa as wn,Fb as xn,Fc as Tn,G as kn,Ga as In,Gb as _n,Gc as En,H as On,Ha as An,Hb as Rn,I as Ln,Ia as Pn,Ib as $n,J as Aa,Ja as Mn,Jb as Bn,K as Nn,Ka as Dn,Kb as zn,L as Wn,La as jn,Lb as Fn,M as Hn,Ma as Un,Mb as Gn,N as Vn,Na as Yn,Nb as qn,O as Jn,Oa as Kn,Ob as Qn,P as Xn,Pa as Zn,Pb as eo,Q as to,Qa as ao,Qb as ro,R as so,Ra as no,Rb as oo,S as io,Sa as lo,Sb as co,T as uo,Ta as ho,Tb as go,U as po,Ua as fo,Ub as bo,V as mo,Va as yo,Vb as vo,W as So,Wa as Co,Wb as wo,X as xo,Xa as To,Xb as ko,Y as Io,Ya as _o,Yb as Eo,Z as Oo,Za as Ao,Zb as Ro,_ as Lo,_a as Po,_b as $o,a as Mo,aa as Bo,ab as No,ac as Do,b as zo,ba as Wo,bb as jo,bc as Fo,c as Ho,ca as Uo,cb as Go,cc as Vo,d as Yo,da as qo,db as Jo,dc as Ko,e as Qo,ea as Xo,eb as Zo,ec as ei,f as ti,fa as ai,fb as ri,fc as si,g as ni,ga as oi,gb as ii,gc as li,h as ci,ha as ui,hb as di,hc as hi,i as Ra,ia as gi,ib as pi,ic as fi,j as bi,ja as mi,jb as yi,jc as vi,k as Si,ka as Ci,kb as wi,kc as xi,l as Ti,la as ki,lb as Ii,lc as _i,m as Ei,ma as Oi,mb as Ai,mc as Ri,n as Li,na as Pi,nb as $i,nc as Mi,o as Bi,oa as Ni,ob as Di,oc as zi,p as ie,pa as Wi,pb as ji,pc as Fi,q as Y,qa as Hi,qb as Ui,qc as Gi,r as Ce,ra as Vi,rb as Yi,rc as qi,s as Me,sa as Ji,sb as Ki,sc as Qi,t as La,ta as Xi,tb as Zi,tc as el,u as tl,ua as al,ub as rl,uc as sl,v as nl,va as ol,vb as il,vc as ll,w as cl,wa as ul,wb as dl,wc as hl,x as gl,xa as pl,xb as fl,xc as bl,y as ml,ya as yl,yb as vl,yc as Et,z as Sl,za as Cl,zb as Pa,zc as wl}from"./chunks/chunk-SYU4BFQR.mjs";import{a as xl}from"./chunks/chunk-GF364FIK.mjs";import{a as Tl,b as kl,c as Il,d as _l,e as El,f as Ol,g as Al,h as Rl,i as Ll,j as Pl,k as $l,l as Ml,m as Bl,n as Nl,o as Dl,p as zl}from"./chunks/chunk-4IM4VIMP.mjs";import{a as c,b as $a}from"./chunks/chunk-GF5C5DVX.mjs";import{a as Wl,b as jl}from"./chunks/chunk-NVD5LLXD.mjs";import{a as Fl,b as Hl,c as Ul,d as Gl,e as Vl,f as Yl,g as ql,h as Jl,i as Kl,j as Ql,k as Xl,l as Zl}from"./chunks/chunk-UYWHGSA7.mjs";import{$ as ec,$a as tc,$b as Ma,$c as ac,Aa as rc,Ab as sc,Ac as nc,B as oc,Ba as ic,Bb as lc,Bc as cc,C as uc,Ca as dc,Cb as hc,Cc as gc,D as pc,Da as fc,Db as bc,Dc as mc,E as yc,Ea as vc,Eb as Sc,Ec as Cc,Fa as wc,Fb as xc,Fc as Tc,Ga as kc,Gb as Ic,Gc as Ot,H as _c,Ha as Ec,Hb as Oc,Hc as Ac,Ia as Rc,Ib as Lc,Ic as Pc,J as $c,Ja as Mc,Jb as Bc,Jc as Nc,Ka as Dc,Kb as zc,Kc as Wc,La as jc,Lb as Fc,Lc as Hc,Ma as Uc,Mb as Gc,Mc as Vc,N as Yc,Na as qc,Nb as Jc,Nc as Kc,O as Qc,Oa as Xc,Ob as Zc,Oc as eu,P as tu,Pa as au,Pb as ru,Pc as su,Q as nu,Qa as ou,Qb as iu,Qc as lu,R as cu,Ra as uu,Rb as du,Rc as hu,S as gu,Sa as pu,Sb as fu,Sc as bu,T as mu,Ta as yu,Tb as vu,Tc as Su,U as Cu,Ua as wu,Ub as Ba,Uc as xu,V as Tu,Va as ku,Vb as Iu,Vc as _u,W as Eu,Wa as Ou,Wb as Au,Wc as Ru,X as Lu,Xa as Pu,Xb as $u,Xc as Mu,Y as Bu,Ya as Nu,Yb as Du,Yc as zu,Z as Wu,Za as ju,Zb as Fu,Zc as Hu,_ as Uu,_a as Gu,_b as Vu,_c as Yu,a as qu,aa as Ju,ab as Ku,ac as Qu,ad as Xu,b as Zu,ba as ed,bb as td,bc as ad,bd as rd,c as sd,ca as nd,cb as od,cc as id,cd as ld,d as cd,da as ud,db as dd,dc as Na,dd as hd,e as gd,ea as pd,eb as fd,ec as bd,ed as md,f as yd,fa as vd,fb as Sd,fc as Cd,fd as wd,g as xd,ga as Td,gb as kd,gc as Id,gd as _d,h as Ed,ha as Od,hb as Ad,hc as Rd,hd as Ld,i as Pd,ia as $d,ib as Md,ic as Bd,id as Nd,j as Dd,ja as zd,jb as Wd,jc as jd,jd as Fd,k as Hd,ka as Ud,kb as Gd,kc as Vd,kd as Yd,l as qd,la as Jd,lb as Kd,lc as Qd,ld as Xd,m as Zd,ma as eh,mb as th,mc as ah,md as rh,n as sh,na as nh,nb as oh,nc as ih,nd as lh,o as ch,oa as uh,ob as dh,oc as hh,od as gh,p as ph,pa as fh,pb as bh,pc as mh,pd as yh,q as vh,qa as Sh,qb as Ch,qc as wh,qd as xh,r as Th,ra as kh,rb as Ih,rc as _h,rd as Eh,s as Oh,sa as Ah,sb as Rh,sc as Lh,sd as Ph,t as $h,ta as Mh,tb as Bh,tc as Nh,u as Dh,ua as zh,ub as Wh,uc as jh,va as Fh,vb as Hh,vc as Uh,wa as Gh,wb as Vh,wc as Yh,xa as qh,xb as Jh,xc as Kh,ya as Qh,yb as Xh,yc as Zh,za as eg,zb as tg,zc as ag}from"./chunks/chunk-L7OYS724.mjs";import{a as tt,d as w,e as rg,f as G,g as sg}from"./chunks/chunk-CE5U3CSQ.mjs";import{a as ng,b as og,c as ig,d as lg,e as cg}from"./chunks/chunk-QNLAFQET.mjs";import{a as me,b as ug,c as dg,d as W,e as hg,f as gg}from"./chunks/chunk-FP44YK4E.mjs";import{H as pg,J as Be,a as T,b as z,d as at,g as fg,h as bg,j as mg,r as At}from"./chunks/chunk-3UTMGIUG.mjs";import"./chunks/chunk-L63X3LPR.mjs";var yg=class extends Ia{constructor(e){super();this.events=[];this.arrayListeners=new Set;this.captureSuppressed=false;this.clearListeners=new Set;this.maxEvents=e.maxEvents??500,this.storeName=e.storeName,Promise.resolve().then(()=>{let t=()=>{ie().status==="locked"?(this.stopCapturing(),this.events=[],this.notifyArrayListeners()):this.getTotalSubscriberCount()>0&&!this.captureSuppressed&&!this.isCapturing()&&this.startCapturing()};Me(t),t()})}onSubscribe(){this.getTotalSubscriberCount()===1&&!this.captureSuppressed&&ie().status!=="locked"&&this.startCapturing(),$e(this.storeName)}onUnsubscribe(){this.getTotalSubscriberCount()===0&&this.stopCapturing(),$e(this.storeName)}getTotalSubscriberCount(){return this.listeners.size+this.arrayListeners.size}subscribeToEvents(e){let t=this.getTotalSubscriberCount()===0;return this.arrayListeners.add(e),t&&!this.captureSuppressed&&ie().status!=="locked"&&this.startCapturing(),$e(this.storeName),e(this.getEvents()),()=>{this.arrayListeners.delete(e),this.getTotalSubscriberCount()===0&&this.stopCapturing(),$e(this.storeName)}}onEvent(e){return this.subscribe(e)}addEvent(e){ie().status!=="locked"&&(this.events=[e,...this.events].slice(0,this.maxEvents),Y()&&this.notify(e),this.notifyArrayListeners())}notifyArrayListeners(){let e=this.getEvents();this.arrayListeners.forEach(t=>{try{t(e)}catch{}})}getEvents(){return Y()?this.events:[]}getEventCount(){return Y()?this.events.length:0}clearEvents(){this.events=[],this.notifyArrayListeners(),this.clearListeners.forEach(e=>{try{e()}catch{}})}onClear(e){return this.clearListeners.add(e),()=>{this.clearListeners.delete(e)}}disableCapture(){this.captureSuppressed=true,this.isCapturing()&&this.stopCapturing()}replaceEvents(e){this.events=this.dedupeById(e).slice(0,this.maxEvents),this.notifyArrayListeners()}dedupeById(e){let t=new Set,a=[];for(let r of e){let n=r?.id;if(n==null){a.push(r);continue}t.has(n)||(t.add(n),a.push(r))}return a}setMaxEvents(e){this.maxEvents=e,this.events.length>e&&(this.events=this.events.slice(0,e),this.notifyArrayListeners())}getSubscriberCounts(){return{eventCallbacks:this.listeners.size,arrayListeners:this.arrayListeners.size,total:this.getTotalSubscriberCount()}}};import{useEffect as vg,useMemo as Sg,useState as Cg}from"react";var wg=[{value:"buoy.gg/api/license",mode:"contains"},{value:"api.keygen.sh",mode:"contains"}];function Da(e,t){let a=e.toLowerCase(),r=t.value.toLowerCase();if(t.mode==="contains")return a.includes(r);try{let n=new URL(e);return r.startsWith("/")?n.pathname.toLowerCase()===r:r.startsWith("http://")||r.startsWith("https://")?`${n.origin}${n.pathname}`.toLowerCase()===r:n.host.toLowerCase()===r}catch{return a===r}}function xg(e,t){return!e||t.length===0?false:t.some(a=>Da(e,a))}var za=wg;function Wa(e){if(!Array.isArray(e))return[];let t=[];for(let a of e)if(typeof a=="string"&&a.trim())t.push({value:a,mode:"contains"});else if(a&&typeof a=="object"&&typeof a.value=="string"){let r=a;t.push({value:r.value,mode:r.mode==="exact"?"exact":"contains"})}return t}function ja(e){let t=[...e];for(let a of za)t.some(r=>r.value===a.value)||t.push({...a});return t}var Tg=class{constructor(){this.patterns=ja(za.map(e=>({...e})));this.teamPatterns=[];this.merged=this.patterns;this.listeners=new Set;this.loaded=false;this.loadPromise=null;this.dirty=false}getPatterns(){return this.merged}isTeamOnly(e){return!this.patterns.some(t=>t.value===e)&&this.teamPatterns.some(t=>t.value===e)}setTeamPatterns(e){this.teamPatterns=Wa(e),this.remerge(),this.emit()}reload(){return this.loaded=false,this.loadPromise=null,this.dirty=false,this.ensureLoaded()}remerge(){let e=this.teamPatterns.filter(t=>!this.patterns.some(a=>a.value===t.value));this.merged=e.length>0?[...this.patterns,...e]:this.patterns}subscribe(e){return this.listeners.add(e),this.ensureLoaded(),()=>{this.listeners.delete(e)}}emit(){this.listeners.forEach(e=>e())}ensureLoaded(){return this.loaded?Promise.resolve():this.loadPromise?this.loadPromise:(this.loadPromise=(async()=>{try{let e=await W.getItem(me.network.ignoredDomains());if(e&&!this.dirty){let t=ja(Wa(JSON.parse(e)));this.patterns=t,this.remerge()}}catch{}finally{this.loaded=true,this.emit()}})(),this.loadPromise)}persist(){W.setItem(me.network.ignoredDomains(),JSON.stringify(this.patterns)).catch(()=>{})}commit(e){this.dirty=true,this.patterns=e,this.remerge(),this.emit(),this.persist()}add(e){let t=e.value.trim();t&&(this.patterns.some(a=>a.value===t)||this.commit([...this.patterns,{value:t,mode:e.mode}]))}remove(e){this.patterns.some(t=>t.value===e)&&this.commit(this.patterns.filter(t=>t.value!==e))}toggle(e){let t=e.trim();t&&this.commit(this.patterns.some(a=>a.value===t)?this.patterns.filter(a=>a.value!==t):[...this.patterns,{value:t,mode:"contains"}])}toggleMode(e){this.patterns.some(t=>t.value===e)&&this.commit(this.patterns.map(t=>t.value===e?{...t,mode:t.mode==="contains"?"exact":"contains"}:t))}},K=new Tg,kg=e=>K.add(e),Ig=e=>K.remove(e),_g=e=>K.toggle(e),Eg=e=>K.toggleMode(e),Og=e=>K.isTeamOnly(e);function Ag(){let[e,t]=Cg(()=>K.getPatterns());vg(()=>K.subscribe(()=>{t(K.getPatterns())}),[]);let a=Sg(()=>new Set(e.map(r=>r.value)),[e]);return{patterns:e,values:a,add:kg,remove:Ig,toggle:_g,toggleMode:Eg,isTeamOnly:Og}}import{useSyncExternalStore as Rg}from"react";var rt={},Rt=new Map,Lt=new Set,Ne=[];function Lg(e){if(!e)return Ne;try{let t=JSON.parse(e);if(!Array.isArray(t))return Ne;let a=t.map(r=>typeof r=="string"?r:r&&typeof r.value=="string"?r.value:"").map(r=>r.trim()).filter(Boolean);return a.length?[...new Set(a)]:Ne}catch{return Ne}}var st={set(e){Object.keys({...rt,...e}).some(t=>rt[t]!==e[t])&&(rt=e,Rt.clear(),Lt.forEach(t=>t()))},getList(e){let t=Rt.get(e);return t||(t=Lg(rt[e]),Rt.set(e,t)),t},subscribe(e){return Lt.add(e),()=>Lt.delete(e)}};function Pg(e){return Rg(st.subscribe,()=>st.getList(e),()=>Ne)}function $g(e){typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>e()):setTimeout(e,0)}function Mg(e){let t=e.id,a=e.order??"append",r=e.coalesce??"sync",n=e.flushMinIntervalMs??150,s=e.max,o=[],i=false,l=e.firstId??1,d=0,b=false,y=[],p=false;function m(){p||(p=true,Me(()=>{ie().status==="locked"&&(o=[]),V()}))}let S=new Set,_=new Set;function F(){for(let v of S)try{v()}catch{}}function V(){if(r==="sync"){F();return}b||(b=true,$g(()=>{b=false,F()}))}function M(v){return v.length<=s?v:a==="append"?v.slice(v.length-s):v.slice(0,s)}return{id:t,subscribe(v){return m(),S.add(v),()=>{S.delete(v)}},getSnapshot(){return m(),Y()?o:y},size(){return Y()?o.length:0},add(v){m(),!(i||ie().status==="locked")&&(a==="append"?o=o.length>=s?[...o.slice(o.length-s+1),v]:[...o,v]:o=o.length>=s?[v,...o.slice(0,s-1)]:[v,...o],V())},set(v){m(),Y()&&(o=M(v),V())},update(v){m(),ie().status!=="locked"&&(o=M(v(o)),V())},clear(){for(let v of _)try{v()}catch{}o.length!==0&&(o=[],V())},onClear(v){return _.add(v),()=>{_.delete(v)}},notify(){V()},flushSync(v=false){let ae=Date.now();if(!(!v&&ae-d<n)){d=ae;try{let P=globalThis.__buoyFlushToolSync;if(!P)return;for(let Ge of P)Ge(t)}catch{}}},setPaused(v){i=v},isPaused(){return i},setMax(v){s=v;let ae=M(o);ae!==o&&(o=ae,V())},getMax(){return s},allocId(){return l++},bumpIdAbove(v){v+1>l&&(l=v+1)},listenerCount(){return S.size}}}var Bg=class{constructor(e={}){this.items=[];this.itemListeners=new Set;this.clearListeners=new Set;this.idCounter=0;this.enabled=true;this.captureSuppressed=false;this.max=e.max??200}canRecord(){return this.enabled&&!this.captureSuppressed}nextId(){return`${Date.now()}-${++this.idCounter}`}push(e){this.items=[e,...this.items].slice(0,this.max)}record(e){this.push(e),this.notifyListeners()}setItems(e){this.items=e.slice(0,this.max),this.notifyListeners()}getAll(){return[...this.items]}getById(e){return this.items.find(t=>t.id===e)}get size(){return this.items.length}clear(){this.items=[],this.notifyListeners(),this.clearListeners.forEach(e=>{try{e()}catch{}})}onClear(e){return this.clearListeners.add(e),()=>{this.clearListeners.delete(e)}}disableCapture(){this.captureSuppressed=true}isCaptureSuppressed(){return this.captureSuppressed}replaceAll(e){return this.enabled?(this.setItems(e),true):false}hydrateById(e,t){let a=this.items.findIndex(r=>r.id===e);a!==-1&&(this.items=[...this.items.slice(0,a),{...this.items[a],...t},...this.items.slice(a+1)],this.notifyListeners())}setEnabled(e){this.enabled=e}getEnabled(){return this.enabled}setMax(e){this.max=e,this.items.length>e&&(this.items=this.items.slice(0,e),this.notifyListeners())}getMax(){return this.max}subscribe(e){return this.itemListeners.add(e),()=>{this.itemListeners.delete(e)}}notifyListeners(){let e=this.getAll();this.itemListeners.forEach(t=>t(e))}get listenerCount(){return this.itemListeners.size}};var ye=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Ng=["id","lineId","key","uuid","_id","slug","name"];function Pt(e){if(!e.length||!e.every(ye))return;let t=e[0];for(let a of Ng){if(!(a in t))continue;let r=e.map(n=>n[a]);if(r.every(n=>typeof n=="string"||typeof n=="number")&&new Set(r.map(String)).size===r.length)return a}}function Dg(e,t,a,r){let n=r[t];return typeof n=="string"||typeof n=="number"?String(n)!==a?{ok:false,error:`The new item is addressed as \`${a}\` but carries \`${t}\`: ${JSON.stringify(n)}. Use the same value for both \u2014 address it by the id it carries.`}:{ok:true,value:n}:e.every(s=>typeof s[t]=="number")&&a.trim()!==""&&String(Number(a))===a?{ok:true,value:Number(a)}:{ok:true,value:a}}function $t(e,t,a="",r=[]){if(Array.isArray(e)&&ye(t)){let n=Pt(e);if(!n)return{patch:t,notes:r};let s=new Map(e.map(b=>[String(b[n]),b])),o=e.slice(),i=0,l=0,d=0;for(let[b,y]of Object.entries(t)){let p=o.findIndex(m=>String(m[n])===b);if(y===null){if(p===-1)return{patch:t,notes:r};o.splice(p,1),i++}else if(p===-1){if(!ye(y))return{patch:t,notes:r};let m=Dg(e,n,b,y);if(!m.ok)return{patch:t,notes:r,error:m.error};o.push({...y,[n]:m.value}),d++}else{let m=$t(s.get(b),y,`${a}[${b}]`,r);if(m.error)return{patch:t,notes:r,error:m.error};let S=o[p];o[p]=ye(S)&&ye(m.patch)?{...S,...m.patch}:m.patch,l++}}return r.push(`${a||"(root)"}: addressed by \`${n}\` \u2014 ${l} changed, ${d} added, ${i} removed, ${o.length} item(s) remain`),{patch:o,notes:r}}if(ye(e)&&ye(t)){let n={};for(let[s,o]of Object.entries(t)){let i=a?`${a}.${s}`:s;if(!(s in e)){n[s]=o;continue}let l=$t(e[s],o,i,r);if(l.error)return{patch:t,notes:r,error:l.error};n[s]=l.patch}return{patch:n,notes:r}}return{patch:t,notes:r}}var nt=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);function De(e,t=0){if(e===null)return"null";if(Array.isArray(e)){if(!e.length)return"unknown[]";if(t>=3)return"\u2026[]";let r=De(e[0],t+1);return r.includes(" ")||r.endsWith("]")?`(${r})[]`:`${r}[]`}if(nt(e)){if(t>=3)return"{\u2026}";let r=Object.keys(e),n=r.slice(0,24),s=n.map(i=>`${i}: ${De(e[i],t+1)}`).join(", "),o=r.length>n.length?`, +${r.length-n.length} more`:"";return`{${s}${o}}`}let a=typeof e;return a==="undefined"?"undefined":a==="function"?"function":a}function we(e,t="",a=[],r=0,n={visited:0}){if(r>3||a.length>=40||n.visited>=600)return a;if(Array.isArray(e)){let s=e[0];if(a.push({path:t||"(root)",length:e.length,...e.length?{item:De(s)}:{}}),e.length&&nt(s))for(let[o,i]of Object.entries(s)){if(++n.visited>=600)break;we(i,t?`${t}[].${o}`:`[].${o}`,a,r+1,n)}return a}if(nt(e))for(let[s,o]of Object.entries(e)){if(++n.visited>=600)break;we(o,t?`${t}.${s}`:s,a,r+1,n)}return a}function zg(e){let t={visited:0};return we(e,"",[],0,t).length>=40||t.visited>=600}function Wg(e){return we(e).filter(t=>t.item===void 0).map(t=>t.path)}function jg(e){if(e===void 0)return;let t=we(e),a=De(e);if(!(!t.length&&!nt(e)&&!Array.isArray(e)))return t.length?{shape:a,lists:t}:{shape:a}}var ee=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);function Fg(e,t,a=2e3){let r=[{node:e,path:""}],n=0;for(;r.length&&n<a;){let{node:s,path:o}=r.shift();if(n++,Array.isArray(s))s.slice(0,20).forEach((i,l)=>r.push({node:i,path:`${o}[${l}]`}));else if(ee(s))for(let[i,l]of Object.entries(s)){let d=o?`${o}.${i}`:i;if(i===t)return d;(ee(l)||Array.isArray(l))&&r.push({node:l,path:d})}}}function Fa(e,t,a,r,n){let s=Fg(e,n??a),o=r.slice(0,12).join(", ")||"(no fields)";return s?`No field "${a}" at "${t}" \u2014 did you mean path "${s}"? "${t}" has: ${o}.`:`No field "${a}" at "${t}". It has: ${o}.`}function Ha(e,t){let a=e;for(let r of t.split(".")){if(!ee(a))return;a=a[r]}return a}function Mt(e){if(!e.trim())return;let t=[],a=0;for(;a<e.length;){if(e[a]==="."){a++;continue}if(e[a]==="["){let s=e.indexOf("]",a);if(s===-1)return;let o=e.slice(a+1,s);if(/^\d+$/.test(o))t.push({kind:"index",index:Number(o)});else{let i=o.indexOf("=");if(i<=0)return;t.push({kind:"match",field:o.slice(0,i).trim(),value:o.slice(i+1).trim()})}a=s+1;continue}let r=a;for(;r<e.length&&e[r]!=="."&&e[r]!=="[";)r++;let n=e.slice(a,r);if(!n)return;t.push({kind:"key",key:n}),a=r}return t.length?t:void 0}function Hg(e,t){let a=Mt(t);if(!a)return{ok:false,error:`Could not read the path "${t}". Use dotted keys with optional [0] or [field=value], like "item.name" or "lines[lineId=seed-1].qty".`};let r=e,n=[];for(let s of a){if(r==null)return{ok:false,error:`"${n.join(".")||"(root)"}" is ${r===null?"null":"not set"}, so there is nothing at "${t}".`};if(s.kind==="key"){if(!ee(r))return{ok:false,error:`"${n.join(".")||"(root)"}" is not an object, so it has no field "${s.key}".`};if(!(s.key in r)){let o=a[a.length-1];return{ok:false,error:Fa(e,n.join(".")||"(root)",s.key,Object.keys(r),o?.kind==="key"?o.key:void 0)}}r=r[s.key],n.push(s.key)}else if(s.kind==="index"){if(!Array.isArray(r))return{ok:false,error:`"${n.join(".")||"(root)"}" is not a list, so [${s.index}] means nothing.`};r=r[s.index],n.push(`[${s.index}]`)}else{if(!Array.isArray(r))return{ok:false,error:`"${n.join(".")||"(root)"}" is not a list, so [${s.field}=${s.value}] means nothing.`};let o=r.find(i=>ee(i)&&String(Ha(i,s.field))===s.value);if(o===void 0)return{ok:false,error:`No item with ${s.field}="${s.value}" in "${n.join(".")||"(root)"}".`};r=o,n.push(`[${s.field}=${s.value}]`)}}return{ok:true,value:r}}function Ug(e,t,a){let r=Mt(t);if(!r)return{ok:false,error:`Could not read the path "${t}". Use dotted keys with optional [0] or [field=value], like "item.name" or "lines[lineId=seed-1].qty".`};if(r[0]?.kind!=="key")return{ok:false,error:`A path must start with a field name, not a list index \u2014 "${t}" does not say which list.`};let n=(o,i)=>{if(i>=r.length)return{ok:true,patch:a};let l=r[i];if(l.kind==="key"){if(ee(o)&&!(l.key in o)&&i+1<r.length){let F=r[r.length-1];return{ok:false,error:Fa(e,ze(r,i),l.key,Object.keys(o),F?.kind==="key"?F.key:void 0)}}let S=ee(o)?o[l.key]:void 0,_=n(S,i+1);return _.ok?{ok:true,patch:{[l.key]:_.patch}}:_}if(!Array.isArray(o))return{ok:false,error:`"${ze(r,i)}" is not a list, so "${t}" cannot be resolved. Read it first \u2014 \`shape\` on the read says what each field holds.`};let d=l.kind==="index"?l.index:o.findIndex(S=>ee(S)&&String(Ha(S,l.field))===l.value),b=d>=0?o[d]:void 0;if(l.kind==="index"?d<0||d>=o.length:d<0)return{ok:false,error:l.kind==="index"?`"${ze(r,i)}" has ${o.length} item(s), so there is nothing at [${l.index}].`:`No item with ${l.field}="${l.value}" in "${ze(r,i)}".`};if(!ee(b)){if(i<r.length-1)return{ok:false,error:`"${ze(r,i)}[${l.kind==="index"?l.index:`${l.field}=${l.value}`}]" holds ${b===null?"null":typeof b}, not an object, so "${t}" cannot go any deeper. Set the item itself.`};let S=o.slice();return S[d]=a,{ok:true,patch:S}}let y=n(b,i+1);if(!y.ok)return y;let p=Pt(o);if(p)return{ok:true,patch:{[String(b[p])]:y.patch}};let m=o.slice();return m[d]=ee(y.patch)?{...b,...y.patch}:y.patch,{ok:true,patch:m}},s=n(e,0);return s.ok?{ok:true,patch:s.patch}:s}function ze(e,t){return e.slice(0,t).map(a=>a.kind==="key"?a.key:a.kind==="index"?`[${a.index}]`:`[${a.field}=${a.value}]`).join(".").replace(/\.\[/g,"[")||"(root)"}var le=e=>!!e&&typeof e=="object"&&!Array.isArray(e);function We(e){return Array.isArray(e)?"array":e===null?"null":typeof e=="object"?"object":typeof e}var Ua=["string","number","boolean"];function Ga(e,t,a=2e3){let r=[{node:e,path:""}],n=0;for(;r.length&&n<a;){let{node:s,path:o}=r.shift();if(n++,Array.isArray(s))s.slice(0,20).forEach((i,l)=>r.push({node:i,path:`${o}[${l}]`}));else if(le(s))for(let[i,l]of Object.entries(s)){let d=o?`${o}.${i}`:i;if(i===t&&o)return d;(le(l)||Array.isArray(l))&&r.push({node:l,path:d})}}}function Bt(e,t,a={},r=e,n="",s=[]){let o=a.noun??"data",i=n||"(root)";if(Array.isArray(t)){if(!Array.isArray(e))return s.push({path:i,kind:"type-change",detail:`${We(e)} \u2192 array`}),s;let p=e.length?e[0]:void 0;return p!==void 0&&(le(p)||Array.isArray(p))&&t.forEach((m,S)=>{let _=`${n}[${S}]`;if(le(p)&&le(m))for(let F of Object.keys(p))F in m||s.push({path:`${_}.${F}`,kind:"missing-key",detail:`list items need \`${F}\` \u2014 the items already in the list have it`});Bt(p,m,a,r,_,s)}),s}if(le(t)){if(!le(e))return s.push({path:i,kind:"type-change",detail:`${We(e)} \u2192 object`}),s;for(let[p,m]of Object.entries(t)){let S=n?`${n}.${p}`:p;if(p in e)Bt(e[p],m,a,r,S,s);else{let _=Ga(r,p);s.push({path:S,kind:"add-key",detail:_?`no such field here \u2014 did you mean \`${_}\`?`:`no field named \`${p}\` exists in this ${o}`,..._?{movedTo:_}:{}})}}return s}let l=We(e),d=We(t),b=l==="null"&&Ua.includes(d),y=d==="null"&&Ua.includes(l);return l!==d&&!b&&!y&&s.push({path:i,kind:"type-change",detail:`${l} \u2192 ${d}`}),s}function Gg(e,t){if(!t.length||!t.every(r=>r.kind==="add-key"&&r.movedTo))return;let a={};for(let r of t){let n=Vg(e,r.path);if(n===void 0||r.movedTo.includes("["))return;let s=a,o=r.movedTo.split(".");o.slice(0,-1).forEach(i=>{s[i]??(s[i]={}),s=s[i]}),s[o[o.length-1]]=n}return a}function Vg(e,t){let a=e;for(let r of t.split(".")){if(!le(a))return;a=a[r]}return a}function Yg(e,t,a){let r=e.slice(0,6).map(s=>`\`${s.path}\`: ${s.detail}`).join("; "),n=e.length>6?`; +${e.length-6} more`:"";return`Refused: this isn't a same-type edit of existing fields (the rule the React Query devtools enforces). ${r}${n}. You can only change the VALUE of a field that already exists, to the same type \u2014 you can't add fields, change a field's type, or null a list/object the screen renders. Clearing a scalar to null is fine. Send just the field(s) you're changing, nested to match the current shape of this ${t}. Use force:true only to deliberately break that.`+(a?` This is the same edit at the right depth \u2014 send it as the patch: ${JSON.stringify(a)}`:"")}function ot(e,t){let a=0,r=false,n=false,s=[e],o=new Set;for(;s.length>0;){if(a>t)return{bytes:a,sawRepeat:r,sawBigInt:n};let i=s.pop();if(i==null)a+=4;else if(typeof i=="string")a+=i.length+2;else if(typeof i=="number")a+=8;else if(typeof i=="boolean")a+=5;else if(typeof i=="object"){if(o.has(i)){r=true;continue}if(o.add(i),Array.isArray(i)){a+=2+i.length;for(let l=0;l<i.length;l++)s.push(i[l])}else{a+=2;for(let l in i)a+=l.length+4,s.push(i[l])}}else typeof i=="bigint"&&(n=true),a+=4}return{bytes:a,sawRepeat:r,sawBigInt:n}}function Nt(e,t){let a=ot(e,t);return a.bytes>t?true:!a.sawRepeat&&!a.sawBigInt?false:!_a(e)}var Va=16*1024,it=8*1024*1024;function qg(e,t){return Object.freeze({[`__buoy${e}OnDevice`]:true,note:t})}function Jg(e,t){return typeof e=="object"&&e!==null&&e[`__buoy${t}OnDevice`]===true}function Ya(e=it){return{__buoyTruncated:true,note:`Exceeds the ${e/1048576}MB detail limit \u2014 inspect it on-device.`}}function Kg(e,t,a=Va){return e===void 0?e:Nt(e,a)?t:e}function qa(e,t=it){return Nt(e,t)?Ya(t):e}function Qg(e){let t=new WeakMap;return a=>{let r=t.get(a);if(r!==void 0)return r;let n=e(a);return t.set(a,n),n}}function Xg(e,t){let a=[],r=t.baseBytes??16;for(let n=e.length-1;n>=0;n--){let s=t.toWire(e[n]);if(r+s.bytes>t.budget&&a.length>0)break;a.push(s.value),r+=s.bytes}return a.reverse(),a}function Zg(e,t,a){let r=ot(e,t);if(r.bytes<=t)return{value:e,bytes:r.bytes};let n=a();return{value:n,bytes:ot(n,t).bytes}}function Ja(e){return e??{}}function ep(e,t,a=it){let r=n=>qa(n,a);return n=>{let{id:s}=Ja(n);if(!s)return{found:false,reason:"missing id"};let o=e(s);return o?{found:true,id:s,...t(o,r)}:{found:false,reason:"unknown id"}}}function Ka(e){return e.length===1?e[0]:t=>{let a=e.map(r=>r(t));return()=>{for(let r of a)r()}}}function tp(e){let t=Array.isArray(e.subscribe)?Ka(e.subscribe):e.subscribe;return{version:e.version,getSnapshot:e.getSnapshot,subscribe:t,...e.actions?{actions:e.actions}:{}}}var lt=new Set(["@react_buoy_settings_theme","@react_buoy_settings_preferences","@react_buoy_settings_global","@react_buoy_dev_tools_settings","@react_buoy_settings_tooltip_shown","@react_buoy_modal_hint_acknowledged","@react_buoy_clipboard_hint_acknowledged","@react_buoy_network_filters","@react_buoy_network_preferences","@react_buoy_network_copy_options","@react_buoy_storage_filters","@react_buoy_storage_event_filters","@react_buoy_storage_key_filters","@react_buoy_storage_pinned_keys","@react_buoy_storage_preferences","@react_buoy_storage_diff_viewer_mode","@react_buoy_rq_filters","@react_buoy_rq_preferences","@react_buoy_route_events_event_filters","@react_buoy_route_events_detail_view","@react_buoy_route_events_diff_viewer_mode","@react_buoy_sentry_filters","@react_buoy_sentry_preferences","@react_buoy_highlight_updates_filters","@react_buoy_highlight_updates_settings","@react_buoy_highlight_updates_copy_settings","@react_buoy_events_enabled_sources","@react_buoy_events_copy_settings","@react_buoy_time_machine_diff_viewer_mode","@react_buoy_network_ignored_domains","@react_buoy_network_ignored_urls","@react_buoy_rq_ignored_patterns","@react_buoy_rq_included_patterns"]),Qa=new Set(["@react_buoy_network_ignored_domains","@react_buoy_network_ignored_urls","@react_buoy_rq_ignored_patterns","@react_buoy_rq_included_patterns"]),Xa="@react_buoy_settings_sync_meta",Za="@react_buoy_network_ignored_domains",er=2e3,ce=3e4,Dt=15*6e4,ap=15e3,zt=new Set;function rp(e){return zt.add(e),()=>zt.delete(e)}function sp(e){e.includes(Za)&&K.reload(),zt.forEach(t=>{try{t(e)}catch{}})}function np(){return{storage:W,credential:cl,fetch:(e,t)=>fetch(e,t),subscribeWrites:dg,setTimer:(e,t)=>setTimeout(e,t),clearTimer:e=>clearTimeout(e),onTeam:e=>{K.setTeamPatterns(op(e[Za])),st.set(e)},onApplied:sp}}function op(e){if(!e)return[];try{return JSON.parse(e)}catch{return[]}}var tr=class{constructor(e={}){this.started=false;this.pending=new Map;this.applying=new Set;this.pushTimer=null;this.pullTimer=null;this.unsubscribe=null;this.refusedToken=null;this.deps={...np(),...e}}start(){this.started||(this.started=true,this.unsubscribe=this.deps.subscribeWrites((e,t)=>this.onWrite(e,t)),this.pull())}stop(){this.started=false,this.unsubscribe?.(),this.unsubscribe=null,this.pushTimer!==null&&this.deps.clearTimer(this.pushTimer),this.pullTimer!==null&&this.deps.clearTimer(this.pullTimer),this.pushTimer=this.pullTimer=null}credential(){let e=this.deps.credential();return e&&e.token!==this.refusedToken?e:null}call(e,t,a){return new Promise((r,n)=>{let s=this.deps.setTimer(()=>n(new Error("timeout")),ap);this.deps.fetch(`${t.origin.replace(/\/$/,"")}${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({access_token:t.token,...a})}).then(o=>{this.deps.clearTimer(s),r(o)},o=>{this.deps.clearTimer(s),n(o)})})}schedulePull(e){this.started&&(this.pullTimer!==null&&this.deps.clearTimer(this.pullTimer),this.pullTimer=this.deps.setTimer(()=>{this.pullTimer=null,this.pull()},e))}async readMeta(){try{let e=await this.deps.storage.getItem(Xa),t=e?JSON.parse(e):{};return t&&typeof t=="object"?t:{}}catch{return{}}}async writeMeta(e){await this.deps.storage.setItem(Xa,JSON.stringify(e)).catch(()=>{})}async pull(){let e=this.credential();if(!e)return this.schedulePull(ce);let t,a;try{let i=await this.call("/api/settings/pull",e,{});t=i.status,a=await i.json().catch(()=>null)}catch{return this.schedulePull(ce)}if(t===401||t===403)return this.refusedToken=e.token,this.schedulePull(ce);if(t===404)return this.schedulePull(Dt);if(t!==200||!a)return this.schedulePull(ce);let r=a.personal??{},n=await this.readMeta(),s=[];for(let[i,l]of Object.entries(r))if(!(!lt.has(i)||this.pending.has(i))&&!(typeof l?.value!="string"||!(l.updatedAt>(n[i]??0)))){this.applying.add(i);try{await this.deps.storage.setItem(i,l.value)}finally{this.applying.delete(i)}n[i]=l.updatedAt,s.push(i)}for(let i of lt){if(i in r||i in n||this.pending.has(i))continue;let l=await this.deps.storage.getItem(i).catch(()=>null);l!==null&&this.pending.set(i,l)}await this.writeMeta(n),s.length>0&&this.deps.onApplied(s);let o={};for(let[i,l]of Object.entries(a.team??{}))Qa.has(i)&&typeof l?.value=="string"&&(o[i]=l.value);this.deps.onTeam(o),this.pending.size>0&&this.schedulePush(0),this.schedulePull(Dt)}onWrite(e,t){!this.started||this.applying.has(e)||!lt.has(e)||(this.pending.set(e,t),this.schedulePush(er))}schedulePush(e){this.pushTimer!==null&&this.deps.clearTimer(this.pushTimer),this.pushTimer=this.deps.setTimer(()=>{this.pushTimer=null,this.push()},e)}async push(){if(this.pending.size===0)return;let e=this.credential();if(!e)return this.schedulePush(ce);let t=new Map(this.pending),a,r;try{let s=await this.call("/api/settings/push",e,{changes:Object.fromEntries(t)});a=s.status,r=await s.json().catch(()=>null)}catch{return this.schedulePush(ce)}if(a===401||a===403)return this.refusedToken=e.token,this.schedulePush(ce);if(a===404)return this.schedulePush(Dt);if(a!==200||!r||typeof r.updatedAt!="number")return this.schedulePush(ce);let n=await this.readMeta();for(let[s,o]of t)this.pending.get(s)===o&&this.pending.delete(s),n[s]=r.updatedAt;await this.writeMeta(n),this.pending.size>0&&this.schedulePush(er)}},je=null;function ip(e={}){je??(je=new tr(e)),je.start()}function lp(){je&&je.pull()}function cp(e){return e}function up(e,t,a){return r=>{let n=r??{},s=e.props===void 0&&!t?void 0:{...e.props??{},...t?t(n):{}};return{...e,id:n.id||e.id,name:n.name||e.name,description:n.description||e.description,...s!==void 0?{props:s}:{},...a?a(n,e):{}}}}var Wt="__buoyToolActionRegistry";function jt(){let e=globalThis;return e[Wt]||(e[Wt]=new Set),e[Wt]}function dp(e){let t=jt();t.add(e);let a=false,r=()=>{if(a)return;a=true;let s=e(),o=async(i,l,d)=>{if(!(i==="network"&&l==="deleteOverrideRule"||i==="impersonate"&&l==="stopImpersonation"))throw new Error("Unsupported account-lock cleanup operation");if(i==="impersonate")return s[i]?.dispose?.(o);let b=s[i]?.actions?.[l];if(!b)throw new Error(`Cleanup unavailable for ${i}`);return b(d)};for(let i of Object.values(s))try{Promise.resolve(i.dispose?.(o)).catch(l=>console.warn("[Buoy] Tool cleanup failed",l))}catch(l){console.warn("[Buoy] Tool cleanup failed",l)}},n=Me(()=>{Y()?a=false:r()});return()=>{n(),t.delete(e),Promise.resolve().then(()=>{t.size===0&&r()})}}function xe(){if(!Y())return{};let e={};for(let t of jt())try{Object.assign(e,t())}catch{}return Object.fromEntries(Object.entries(e).map(([t,a])=>[t,ar(a)]))}function hp(){return Object.keys(xe())}function gp(){let e={};for(let[t,a]of Object.entries(xe()))e[t]=Object.keys(a.actions??{});return e}function pp(){return Object.entries(xe()).filter(([,e])=>typeof e.getSnapshot=="function").map(([e])=>e)}async function fp(e){Ce();let t=xe()[e];if(!t)throw new Error(`Unknown tool "${e}"`);if(typeof t.getSnapshot!="function")throw new Error(`Tool "${e}" has no snapshot to read`);return await t.getSnapshot()}function Ft(){return Y()&&jt().size>0}async function bp(e,t,a){Ce();let r=xe()[e],n=r?.actions?.[t];if(!n)throw new Error(r?`Unknown action "${t}" on tool "${e}"`:`Unknown tool "${e}"`);return await n(a)}async function mp(e=2e3){if(Ft())return true;let t=It()+e;for(;It()<t;)if(await new Promise(a=>setTimeout(a,50)),Ft())return true;return false}function ar(e){let t=a=>(...r)=>{Ce();let n=false,s=Me(()=>{Y()||(n=true)}),o=()=>{if(n)throw new Error("Buoy account access ended while the operation was pending.");Ce()};try{let i=a.apply(e,r);return i&&typeof i.then=="function"?Promise.resolve(i).then(l=>(o(),l)).finally(s):(o(),s(),i)}catch(i){throw s(),i}};return{...e,...e.getSnapshot?{getSnapshot:t(e.getSnapshot)}:{},...e.actions?{actions:Object.fromEntries(Object.entries(e.actions).map(([a,r])=>[a,t(r)]))}:{},...e.subscribe?{subscribe:a=>(Ce(),e.subscribe(()=>{Y()&&a()}))}:{}}}var Ht="__buoyToolUiBridge";function Ut(){let e=globalThis;return e[Ht]||(e[Ht]=new Set),e[Ht]}function yp(e){let t=Ut();return t.add(e),()=>{t.delete(e)}}function vp(e){for(let t of Ut())try{if(t(e))return true}catch{}return false}function Sp(){return Ut().size>0}var Gt="__buoyToolAttention";function Vt(){let e=globalThis;return e[Gt]||(e[Gt]={byTool:new Map,listeners:new Set}),e[Gt]}function Cp(e,t){let a=Vt(),r=a.byTool.get(e)??null;if(!(r===t||r&&t&&r.kind===t.kind&&r.label===t.label)){t?a.byTool.set(e,t):a.byTool.delete(e);for(let n of a.listeners)try{n()}catch{}}}function wp(e){return Vt().byTool.get(e)??null}function xp(e){let t=Vt();return t.listeners.add(e),()=>{t.listeners.delete(e)}}import{createContext as Tp,useContext as kp,useEffect as Ip}from"react";var rr=Tp(null);function _p(e,t){let a=kp(rr);return Ip(()=>{if(a)return a(e),()=>a(null)},[a,...t]),a!==null}var sr=256*1024;function Ep(e){let t=new Set(e?.excludeKeys??[]),a=e?.includeKeys?new Set(e.includeKeys):null,r=0,n=s=>!t.has(s)&&(!a||a.has(s));return{touch:n,allows(s){return n(s)?true:(r+=1,false)},countExcluded(s){r+=s},get excludedHits(){return r},excludedWarning(s){return r>0?`${r} ${s} excluded by you`:null}}}function Op(){return{ok:true,applied:0,skipped:[],warnings:[]}}function Ap(e){return{ok:false,applied:0,skipped:[],warnings:[e]}}function Rp(e,t){return{ok:false,applied:0,skipped:[{id:e,reason:t}],warnings:[]}}function Lp(e,t={}){let{key:a,label:r,oldValue:n,newValue:s,inOld:o,inNew:i}=e;if(!i)return{key:a,label:r,verdict:"removed",oldValue:n};if(!o)return{key:a,label:r,verdict:"added",newValue:s};if((t.equal??Qs)(n,s))return{key:a,label:r,verdict:"unchanged"};let l=t.tooLarge??(d=>Xs(d,sr));return l(n)||l(s)?{key:a,label:r,verdict:"too-large",reason:t.tooLargeReason??"value too large to render a diff \u2014 restore still applies it"}:{key:a,label:r,verdict:"changed",oldValue:n,newValue:s}}function Pp(e,t){return e.verdict==="unchanged"?e:{...e,verdict:"wont-apply",reason:t}}function $p(e,t){let a=r=>r===void 0?[]:r instanceof Map?Array.from(r.keys()):Object.keys(r);return new Set([...a(e),...a(t)])}function Mp(e,t={}){let a=e.toLowerCase();if(t[a])return t[a];for(let[m,S]of Object.entries(t))if(a.includes(m))return S;let r=e.split("").reduce((m,S)=>m+S.charCodeAt(0),0)*137%360,n=.7,s=.6,o=(1-Math.abs(2*s-1))*n,i=o*(1-Math.abs(r/60%2-1)),l=s-o/2,d=0,b=0,y=0;r<60?(d=o,b=i):r<120?(d=i,b=o):r<180?(b=o,y=i):r<240?(b=i,y=o):r<300?(d=i,y=o):(d=o,y=i);let p=m=>Math.round((m+l)*255).toString(16).padStart(2,"0");return`#${p(d)}${p(b)}${p(y)}`}function Bp(e,t={}){let a=t.maxLength??40;if(e===void 0)return t.undefinedLabel??"undefined";if(e===null)return"null";try{if(typeof e=="function")return t.functionLabel??"(fn)";if(typeof e=="string")return e.length>a?`"${e.slice(0,a-3)}..."`:`"${e}"`;if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e)){if(e.length===0)return"[]";let r=JSON.stringify(e);return r.length>a?`[${e.length} items]`:r}if(typeof e=="object"){let r=Object.keys(e);if(r.length===0)return"{}";let n=JSON.stringify(e);return n.length<=a?n:`{ ${r.length} keys }`}return String(e).slice(0,a)}catch{return"[complex]"}}function Np(e,t){if(e===t)return{summary:"no change",changedKeys:[],changedCount:0};if(typeof e!="object"||typeof t!="object"||e===null||t===null)return{summary:"changed",changedKeys:[],changedCount:0};let a=e,r=t,n=Object.keys(a),s=Object.keys(r),o=s.filter(p=>!n.includes(p)),i=n.filter(p=>!s.includes(p)),l=[];for(let p of n)s.includes(p)&&a[p]!==r[p]&&l.push(p);let d=[...o,...i,...l],b=[];if(o.length>0&&b.push(`+${o.length}`),i.length>0&&b.push(`-${i.length}`),l.length>0&&b.push(`~${l.length}`),b.length===0)return{summary:"nested change",changedKeys:[],changedCount:0};let y=d.length;return{summary:`${b.join(" ")} ${y===1?"key":"keys"}`,changedKeys:d,changedCount:y}}function nr(e){if(e==null)return"N/A";if(e===0)return"0 B";let t=1024,a=["B","KB","MB","GB","TB"],r=Math.floor(Math.log(e)/Math.log(t));return`${(e/Math.pow(t,r)).toFixed(1)} ${a[r]}`}function Dp(e){if(e==null)return"N/A";if(e<1e3)return`${e}ms`;if(e<6e4)return`${(e/1e3).toFixed(1)}s`;if(e<36e5){let r=Math.floor(e/6e4),n=Math.floor(e%6e4/1e3);return n>0?`${r}m ${n}s`:`${r}m`}let t=Math.floor(e/36e5),a=Math.floor(e%36e5/6e4);return a>0?`${t}h ${a}m`:`${t}h`}function zp(e){return e.toLocaleString()}var or=5e4;function Wp(e,t=or){try{let a=JSON.stringify(e);return a.length>t?`[omitted: ${nr(a.length)} \u2014 too large to copy]`:e}catch{return"[omitted: could not serialize]"}}function jp(e,t=50,a=20,r=20){if(e.length<=t)return e;let n=e.slice(0,a),s=e.slice(-r);return`${n}...${s}`}function Fp(e){if(e>=100&&e<200)return{text:String(e),color:w.info,meaning:"Informational"};if(e>=200&&e<300){let t={200:"OK",201:"Created",202:"Accepted",204:"No Content",206:"Partial Content"};return{text:String(e),color:w.success,meaning:t[e]||"Success"}}if(e>=300&&e<400){let t={301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",307:"Temporary Redirect",308:"Permanent Redirect"};return{text:String(e),color:w.warning,meaning:t[e]||"Redirect"}}if(e>=400&&e<500){let t={400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",408:"Request Timeout",409:"Conflict",410:"Gone",422:"Unprocessable Entity",429:"Too Many Requests"};return{text:String(e),color:w.error,meaning:t[e]||"Client Error"}}if(e>=500){let t={500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported"};return{text:String(e),color:w.error,meaning:t[e]||"Server Error"}}return{text:String(e),color:w.muted,meaning:"Unknown"}}function Hp(e){return{GET:w.success,POST:w.info,PUT:w.warning,DELETE:w.error,PATCH:w.network,HEAD:w.muted,OPTIONS:w.secondary,CONNECT:w.critical,TRACE:w.env}[e.toUpperCase()]||w.muted}function Up(e){try{let t=new URL(e);return{protocol:t.protocol.replace(":",""),host:t.hostname,port:t.port||void 0,pathname:t.pathname,search:t.search||void 0,hash:t.hash||void 0}}catch{return null}}var Fe=[];function ir(e){Fe.unshift(e),Fe=Fe.slice(0,500)}function Gp(){return Fe}function Vp(){Fe=[]}var Yt=(e=>(e.Debug="debug",e.Info="info",e.Log="log",e.Warn="warn",e.Error="error",e))(Yt||{}),qt=(e=>(e.Auth="Auth",e.Custom="Custom",e.Debug="Debug",e.Error="Error",e.Generic="Generic",e.HTTPRequest="HTTP Request",e.Navigation="Navigation",e.Replay="Replay",e.State="State",e.System="System",e.Touch="Touch",e.UserAction="User Action",e))(qt||{});var Yp=()=>`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,lr=class{constructor(){this.captureTransaction=e=>(this.logSentryEvent("transaction",e),e);this.captureSpan=e=>(this.logSentryEvent("span",e),e);this.captureEvent=e=>(this.logSentryEvent("event",e),e);this.captureLog=e=>(this.logSentryEvent("console",{message:e.message||"Log entry",level:e.level,category:"console",timestamp:e.timestamp,...e.attributes}),e);this.captureBreadcrumb=e=>{let t="unknown";try{let r=globalThis.getCurrentPathname;r&&(t=r())}catch{}let a=e.category;if(e.message?.toLowerCase().includes("ignore"))return null;if(e.message?.includes("Touch event within element:")&&(e.message=e.message.replace("Touch event within element:","")),a==="navigation"&&e.data?.from&&e.data?.to&&(e.message=`From ${e.data.from} To ${e.data.to}`),a==="touch"&&e.data?.path){e.message&&(e.message=e.message.trim());let r={...e.data,category:a,message:e.message,route:t,timestamp:new Date().toISOString(),path:e.message?[{label:e.message}]:e.data?.path};e.data=r}return this.logSentryEvent("breadcrumb",e),e}}logSentryEvent(e,t){let a="Generic",r=t.category;if(r)switch(r){case"touch":a="Touch";break;case"xhr":case"fetch":case"http":a="HTTP Request";break;case"navigation":a="Navigation";break;case"auth":a="Auth";break;case"console":a="System";break;case"debug":a="Debug";break;default:r.startsWith("ui.")?a="User Action":r.startsWith("replay.")?a="Replay":r.includes("redux")||r.includes("state")?a="State":a="Custom"}let n={id:Yp(),timestamp:Date.now(),level:this.getSentryLevel(t),message:this.getSentryMessage(t),metadata:this.getSentryMetadata(t),type:a};ir(n)}getSentryLevel(e){switch(e.level){case"fatal":case"error":return"error";case"warning":return"warn";case"info":return"info";case"debug":return"debug";default:return"log"}}getSentryMessage(e){let t=e.message;return typeof t=="string"?t:`${e.type||"Unknown"} Event`}getSentryMetadata(e){let{message:t,level:a,type:r,...n}=e;return n}},qp=new lr;import{useState as Jt,useEffect as cr}from"react";import{jsx as A,jsxs as Te}from"react/jsx-runtime";var ct=me.bubble.settings(),ur=me.bubble.userPreferences(),Kt={showEnvironment:true,showQueryButton:true,showWifiToggle:true,showEnvButton:false,showSentryButton:false,showStorageButton:false};function Jp({onPress:e}){let[t,a]=Jt(Kt);cr(()=>{r()},[]);let r=async()=>{try{let n=await W.getItem(ct);n&&a(JSON.parse(n))}catch(n){console.error("Failed to load bubble settings:",n)}};return A(Oa,{id:"bubble-settings",title:"SETTINGS",subtitle:`${Object.values(t).filter(Boolean).length}/6 visible`,icon:Ot,iconColor:"#10B981",iconBackgroundColor:"rgba(16, 185, 129, 0.1)",onPress:e||(()=>{}),index:5})}function Kp({onSettingsChange:e}){let[t,a]=Jt(Kt),[r,n]=Jt(true);cr(()=>{s()},[]);let s=async()=>{try{let d=await W.getItem(ct);d&&a(JSON.parse(d))}catch(d){console.error("Failed to load bubble settings:",d)}finally{n(false)}},o=async d=>{try{await W.setItem(ct,JSON.stringify(d)),a(d),e?.(d)}catch(b){console.error("Failed to save bubble settings:",b)}},i=async d=>{let b={...t,[d]:!t[d]};try{let y=await W.getItem(ur),p=y?JSON.parse(y):{},m=d.replace("show","hasSet"),S={...p,[m]:true};await W.setItem(ur,JSON.stringify(S))}catch(y){console.error("Failed to save user preference marker:",y)}o(b)};if(r)return A(T,{style:I.detailContainer,children:A(z,{style:I.loadingText,children:"Loading settings..."})});let l=[{key:"showEnvironment",label:"Environment Indicator",description:"Shows current environment (dev, staging, prod)",icon:A(T,{style:[I.indicator,{backgroundColor:"#10B981"}]})},{key:"showQueryButton",label:"React Query Button",description:"Opens React Query dev tools",icon:A(T,{style:[I.indicator,{backgroundColor:"#F59E0B"}]})},{key:"showWifiToggle",label:"WiFi",description:"Toggle WiFi for testing offline scenarios",icon:A(T,{style:[I.indicator,{backgroundColor:"#8B5CF6"}]})},{key:"showEnvButton",label:"Environment Variables",description:"View and check environment variables",icon:A(Ot,{size:16,color:"#10B981"})},{key:"showSentryButton",label:"Sentry Events",description:"View captured Sentry events and errors",icon:A(T,{style:[I.indicator,{backgroundColor:"#a855f7"}]})},{key:"showStorageButton",label:"Storage Browser",description:"Browse and inspect AsyncStorage data",icon:A(Ma,{size:16,color:"#3B82F6"})}];return A(T,{style:I.detailContainer,children:Te(bg,{showsVerticalScrollIndicator:false,contentContainerStyle:I.scrollContent,"sentry-label":"ignore bubble settings scroll",children:[Te(T,{style:I.header,children:[A(z,{style:I.headerTitle,children:"Developer Tools Settings"}),A(z,{style:I.headerDescription,children:"Configure bubble button visibility"})]}),A(T,{style:I.sectionDivider,children:A(z,{style:I.sectionTitle,children:"Bubble Button Visibility"})}),A(T,{style:I.settingsList,children:l.map(d=>Te(T,{style:I.settingItem,children:[A(T,{style:I.settingIconContainer,children:d.icon}),Te(T,{style:I.settingContent,children:[A(z,{style:I.settingLabel,children:d.label}),A(z,{style:I.settingDescription,children:d.description})]}),A(mg,{"sentry-label":"ignore bubble settings section",value:t[d.key],onValueChange:()=>i(d.key),trackColor:{false:"#4B5563",true:"#10B981"},thumbColor:t[d.key]?"#fff":G.textSecondary})]},d.key))}),Te(T,{style:I.footer,children:[Te(T,{style:I.noteContainer,children:[A(Na,{size:16,color:G.textSecondary}),A(z,{style:I.noteText,children:"User status indicator is always visible and cannot be disabled"})]}),A(z,{style:I.restartNote,children:"Changes are saved automatically and will persist across app restarts"})]})]})})}async function Qp(){try{let e=await W.getItem(ct);if(e)return JSON.parse(e)}catch(e){console.error("Failed to load bubble settings:",e)}return Kt}var I=Be.create({scrollContent:{flexGrow:1},sectionCard:{backgroundColor:G.input,borderRadius:8,padding:16,flexDirection:"row",alignItems:"center",marginBottom:12},iconContainer:{width:36,height:36,borderRadius:8,backgroundColor:"rgba(16, 185, 129, 0.1)",justifyContent:"center",alignItems:"center",marginRight:12},textContainer:{flex:1},title:{color:G.text,fontSize:14,fontWeight:"600",marginBottom:2},subtitle:{color:G.textSecondary,fontSize:12},chevron:{color:tt.text.icon,fontSize:20},detailContainer:{flex:1,backgroundColor:G.card},loadingText:{color:G.textSecondary,fontSize:14,textAlign:"center",marginTop:20},header:{padding:16,borderBottomWidth:1,borderBottomColor:"rgba(128, 128, 128, 0.2)"},headerTitle:{color:G.text,fontSize:16,fontWeight:"600",marginBottom:4},headerDescription:{color:G.textSecondary,fontSize:12},settingsList:{padding:16},settingItem:{flexDirection:"row",alignItems:"center",paddingVertical:12,borderBottomWidth:1,borderBottomColor:"rgba(128, 128, 128, 0.1)"},settingIconContainer:{width:32,height:32,justifyContent:"center",alignItems:"center",marginRight:12},settingContent:{flex:1,marginRight:12},settingLabel:{color:G.text,fontSize:14,fontWeight:"500",marginBottom:2},settingDescription:{color:tt.text.icon,fontSize:11},indicator:{width:8,height:8,borderRadius:4},footer:{padding:16,borderTopWidth:1,borderTopColor:"rgba(128, 128, 128, 0.2)"},noteContainer:{flexDirection:"row",alignItems:"center",gap:8,marginBottom:8},noteText:{color:G.textSecondary,fontSize:12,flex:1},restartNote:{color:tt.text.icon,fontSize:11,fontStyle:"italic"},sectionDivider:{paddingHorizontal:16,paddingVertical:8,marginTop:8,borderTopWidth:1,borderTopColor:"rgba(128, 128, 128, 0.12)"},sectionTitle:{color:G.textSecondary,fontSize:12,fontWeight:"600",letterSpacing:.5,textTransform:"uppercase"}});function dr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Xp(e,t,a={}){let r=a.storage??W,n=a.parse??(l=>JSON.parse(l)),s=a.serialize??(l=>JSON.stringify(l));function o(l){let d=dr(t)&&dr(l)?{...t,...l}:l;return a.sanitize?a.sanitize(d,l):d}async function i(){try{let l=await r.getItem(e);return l==null||l===""?null:o(n(l))}catch{return null}}return{key:e,defaults:t,loadOrNull:i,async load(){return await i()??t},async save(l){try{await r.setItem(e,s(l))}catch{}},async clear(){try{await r.removeItem(e)}catch{}}}}import{callCapacitorNative as hr,hasCapacitorPlugin as Zp,isCapacitorNative as ef}from"@buoy-gg/license/web";function tf(){return!ef()||!Zp("Preferences")?null:{async getAllKeys(){let{keys:e}=await hr("Preferences","keys");return Array.isArray(e)?e:[]},async multiRemove(e){await Promise.all(e.map(t=>hr("Preferences","remove",{key:t})))}}}import{callCapacitorNative as af,hasCapacitorPlugin as rf,isCapacitorNative as sf}from"@buoy-gg/license/web";import{useEffect as nf,useId as of,useRef as gr,useState as lf}from"react";import{createPortal as cf}from"react-dom";import{jsx as He,jsxs as uf}from"react/jsx-runtime";function pr(){let[e,t]=lf(false),a=gr(null),r=gr(null),n=of(),s=(o=true)=>{t(false),o&&a.current?.querySelector('[data-account-launcher] [role="button"]')?.focus({preventScroll:true})};return nf(()=>{if(!e)return;r.current?.focus({preventScroll:true});let o=l=>{l.target instanceof Node&&!a.current?.contains(l.target)&&t(false)},i=l=>{l.key==="Escape"&&(l.preventDefault(),l.stopPropagation(),t(false),a.current?.querySelector('[data-account-launcher] [role="button"]')?.focus({preventScroll:true}))};return document.addEventListener("pointerdown",o),document.addEventListener("keydown",i),()=>{document.removeEventListener("pointerdown",o),document.removeEventListener("keydown",i)}},[e]),typeof document>"u"?null:cf(uf("div",{ref:a,"data-buoy-account":"",style:{position:"fixed",right:"max(16px, env(safe-area-inset-right))",bottom:"max(20px, env(safe-area-inset-bottom))",zIndex:99999,colorScheme:"dark",fontFamily:"system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"},children:[He("style",{children:`
|
|
1
|
+
"use client";import{a as Yo,b as qo,c as Ko,d as Jo,e as Xo,f as Qo,g as Zo,h as en,i as tn}from"./chunks/chunk-3HELV44Y.mjs";import{a as an,b as sn,c as rn,d as on,e as nn,f as ln,g as cn,h as un}from"./chunks/chunk-OGAHL36T.mjs";import{$ as dn,A as hn,B as gn,C as pn,D as fn,E as bn,F as yn,G as mn,J as Sn,K as vn,L as Cn,M as Tn,N as wn,O as xn,P as kn,Q as In,R as _n,S as An,Z as On,_ as En,a as Ja,b as Pn,c as Rn,d as ze,e as Ln,f as $n,g as Xa,h as Bn,i as Mn,j as Nn,k as Dn,l as zn,m as Ft,n as Fn,o as Wn,p as jn,q as Hn,r as Un,s as Gn,t as Vn,u as Yn,v as qn,w as Kn,x as Jn,y as Xn,z as Qn}from"./chunks/chunk-GMM6TGFO.mjs";import"./chunks/chunk-VAR5UK6J.mjs";import{a as Zn,d as ei,f as Wt}from"./chunks/chunk-NOSWH3E2.mjs";import{$ as ti,$a as ai,$b as si,A as ri,Aa as oi,Ab as ni,Ac as ii,B as li,Ba as ci,Bb as ui,Bc as di,C as hi,Ca as gi,Cb as Qa,Cc as pi,D as fi,Da as bi,Db as yi,Dc as Za,E as mi,Ea as Si,Eb as vi,Ec as Ci,F as Ti,Fa as wi,Fb as xi,Fc as ki,G as Ii,Ga as _i,Gb as Ai,Gc as Oi,H as Ei,Ha as Pi,Hb as Ri,I as Li,Ia as $i,Ib as Bi,J as es,Ja as Mi,Jb as Ni,K as Di,Ka as zi,Kb as Fi,L as Wi,La as ji,Lb as Hi,M as Ui,Ma as Gi,Mb as Vi,N as Yi,Na as qi,Nb as Ki,O as Ji,Oa as Xi,Ob as Qi,P as Zi,Pa as el,Pb as tl,Q as al,Qa as sl,Qb as rl,R as ol,Ra as nl,Rb as il,S as ll,Sa as cl,Sb as ul,T as dl,Ta as hl,Tb as gl,U as pl,Ua as fl,Ub as bl,V as yl,Va as ml,Vb as Sl,W as vl,Wa as Cl,Wb as Tl,X as wl,Xa as xl,Xb as kl,Y as Il,Ya as _l,Yb as Al,Z as Ol,Za as El,Zb as Pl,_ as Rl,_a as Ll,_b as $l,a as Bl,aa as Ml,ab as Nl,ac as Dl,b as zl,ba as Fl,bb as Wl,bc as jl,c as Hl,ca as Ul,cb as Gl,cc as Vl,d as Yl,da as ql,db as Kl,dc as Jl,e as Xl,ea as Ql,eb as Zl,ec,f as tc,fa as ac,fb as sc,fc as rc,g as oc,ga as nc,gb as ic,gc as lc,h as cc,ha as uc,hb as dc,hc,i as ts,ia as gc,ib as pc,ic as fc,j as bc,ja as yc,jb as mc,jc as Sc,k as vc,ka as Cc,kb as Tc,kc as wc,l as xc,la as kc,lb as Ic,lc as _c,m as Ac,ma as Oc,mb as Ec,mc as Pc,n as Rc,na as Lc,nb as $c,nc as Bc,o as Mc,oa as Nc,ob as Dc,oc as zc,p as le,pa as Fc,pb as Wc,pc as jc,q,qa as Hc,qb as Uc,qc as Gc,r as xe,ra as Vc,rb as Yc,rc as qc,s as Fe,sa as Kc,sb as Jc,sc as Xc,t as as,ta as Qc,tb as Zc,tc as eu,u as tu,ua as au,ub as su,uc as ru,v as ou,va as nu,vb as iu,vc as lu,w as cu,wa as uu,wb as du,wc as hu,x as gu,xa as pu,xb as fu,xc as bu,y as yu,ya as mu,yb as Su,yc as jt,z as vu,za as Cu,zb as ss,zc as Tu}from"./chunks/chunk-FA6WAQUA.mjs";import{a as wu}from"./chunks/chunk-HIAN3HBD.mjs";import{a as xu,b as ku,c as Iu,d as _u,e as Au,f as Ou,g as Eu,h as Pu,i as Ru,j as Lu,k as $u,l as Bu,m as Mu,n as Nu,o as Du,p as zu}from"./chunks/chunk-4YLP5MMN.mjs";import{a as d,b as rs}from"./chunks/chunk-GF5C5DVX.mjs";import{a as Fu,b as Wu}from"./chunks/chunk-HPZXETRA.mjs";import{a as ju,b as Hu,c as Uu,d as Gu,e as Vu,f as Yu,g as qu,h as Ku,i as Ju,j as Xu,k as Qu,l as Zu}from"./chunks/chunk-4HIK66DZ.mjs";import{$ as ed,$a as td,$b as os,$c as ad,Aa as sd,Ab as rd,Ac as od,B as nd,Ba as id,Bb as ld,Bc as cd,C as ud,Ca as dd,Cb as hd,Cc as gd,D as pd,Da as fd,Db as bd,Dc as yd,E as md,Ea as Sd,Eb as vd,Ec as Cd,Fa as Td,Fb as wd,Fc as xd,Ga as kd,Gb as Id,Gc as Ht,H as _d,Ha as Ad,Hb as Od,Hc as Ed,Ia as Pd,Ib as Rd,Ic as Ld,J as $d,Ja as Bd,Jb as Md,Jc as Nd,Ka as Dd,Kb as zd,Kc as Fd,La as Wd,Lb as jd,Lc as Hd,Ma as Ud,Mb as Gd,Mc as Vd,N as Yd,Na as qd,Nb as Kd,Nc as Jd,O as Xd,Oa as Qd,Ob as Zd,Oc as eh,P as th,Pa as ah,Pb as sh,Pc as rh,Q as oh,Qa as nh,Qb as ih,Qc as lh,R as ch,Ra as uh,Rb as dh,Rc as hh,S as gh,Sa as ph,Sb as fh,Sc as bh,T as yh,Ta as mh,Tb as Sh,Tc as vh,U as Ch,Ua as Th,Ub as ns,Uc as wh,V as xh,Va as kh,Vb as Ih,Vc as _h,W as Ah,Wa as Oh,Wb as Eh,Wc as Ph,X as Rh,Xa as Lh,Xb as $h,Xc as Bh,Y as Mh,Ya as Nh,Yb as Dh,Yc as zh,Z as Fh,Za as Wh,Zb as jh,Zc as Hh,_ as Uh,_a as Gh,_b as Vh,_c as Yh,a as qh,aa as Kh,ab as Jh,ac as Xh,ad as Qh,b as Zh,ba as eg,bb as tg,bc as ag,bd as sg,c as rg,ca as og,cb as ng,cc as ig,cd as lg,d as cg,da as ug,db as dg,dc as is,dd as hg,e as gg,ea as pg,eb as fg,ec as bg,ed as yg,f as mg,fa as Sg,fb as vg,fc as Cg,fd as Tg,g as wg,ga as xg,gb as kg,gc as Ig,gd as _g,h as Ag,ha as Og,hb as Eg,hc as Pg,hd as Rg,i as Lg,ia as $g,ib as Bg,ic as Mg,id as Ng,j as Dg,ja as zg,jb as Fg,jc as Wg,jd as jg,k as Hg,ka as Ug,kb as Gg,kc as Vg,kd as Yg,l as qg,la as Kg,lb as Jg,lc as Xg,ld as Qg,m as Zg,ma as ep,mb as tp,mc as ap,md as sp,n as rp,na as op,nb as np,nc as ip,nd as lp,o as cp,oa as up,ob as dp,oc as hp,od as gp,p as pp,pa as fp,pb as bp,pc as yp,pd as mp,q as Sp,qa as vp,qb as Cp,qc as Tp,qd as wp,r as xp,ra as kp,rb as Ip,rc as _p,rd as Ap,s as Op,sa as Ep,sb as Pp,sc as Rp,sd as Lp,t as $p,ta as Bp,tb as Mp,tc as Np,u as Dp,ua as zp,ub as Fp,uc as Wp,va as jp,vb as Hp,vc as Up,wa as Gp,wb as Vp,wc as Yp,xa as qp,xb as Kp,xc as Jp,ya as Xp,yb as Qp,yc as Zp,za as ef,zb as tf,zc as af}from"./chunks/chunk-CJTGUGMQ.mjs";import{a as st,d as w,e as sf,f as Y,g as rf}from"./chunks/chunk-AHVO74UQ.mjs";import{a as of,b as nf,c as lf,d as cf,e as uf}from"./chunks/chunk-P32XO2YS.mjs";import{a as Se,b as rt,c as df,d as j,e as hf,f as gf}from"./chunks/chunk-7JJHWSTD.mjs";import{H as pf,J as We,a as k,b as F,d as ot,g as ff,h as bf,j as yf,r as Ut}from"./chunks/chunk-5G6RSRP4.mjs";import{a as Gt,c as mf}from"./chunks/chunk-SBYYOE2T.mjs";import{a as n}from"./chunks/chunk-T6T3FEMU.mjs";var ls=class Mb extends Ja{constructor(t){super();this.events=[];this.arrayListeners=new Set;this.captureSuppressed=false;this.clearListeners=new Set;this.maxEvents=t.maxEvents??500,this.storeName=t.storeName,Promise.resolve().then(()=>{let a=n(()=>{le().status==="locked"?(this.stopCapturing(),this.events=[],this.notifyArrayListeners()):this.getTotalSubscriberCount()>0&&!this.captureSuppressed&&!this.isCapturing()&&this.startCapturing()},"reconcile");Fe(a),a()})}onSubscribe(){this.getTotalSubscriberCount()===1&&!this.captureSuppressed&&le().status!=="locked"&&this.startCapturing(),ze(this.storeName)}onUnsubscribe(){this.getTotalSubscriberCount()===0&&this.stopCapturing(),ze(this.storeName)}getTotalSubscriberCount(){return this.listeners.size+this.arrayListeners.size}subscribeToEvents(t){let a=this.getTotalSubscriberCount()===0;return this.arrayListeners.add(t),a&&!this.captureSuppressed&&le().status!=="locked"&&this.startCapturing(),ze(this.storeName),t(this.getEvents()),()=>{this.arrayListeners.delete(t),this.getTotalSubscriberCount()===0&&this.stopCapturing(),ze(this.storeName)}}onEvent(t){return this.subscribe(t)}addEvent(t){le().status!=="locked"&&(this.events=[t,...this.events].slice(0,this.maxEvents),q()&&this.notify(t),this.notifyArrayListeners())}notifyArrayListeners(){let t=this.getEvents();this.arrayListeners.forEach(a=>{try{a(t)}catch{}})}getEvents(){return q()?this.events:[]}getEventCount(){return q()?this.events.length:0}clearEvents(){this.events=[],this.notifyArrayListeners(),this.clearListeners.forEach(t=>{try{t()}catch{}})}onClear(t){return this.clearListeners.add(t),()=>{this.clearListeners.delete(t)}}disableCapture(){this.captureSuppressed=true,this.isCapturing()&&this.stopCapturing()}replaceEvents(t){this.events=this.dedupeById(t).slice(0,this.maxEvents),this.notifyArrayListeners()}dedupeById(t){let a=new Set,s=[];for(let r of t){let o=r?.id;if(o==null){s.push(r);continue}a.has(o)||(a.add(o),s.push(r))}return s}setMaxEvents(t){this.maxEvents=t,this.events.length>t&&(this.events=this.events.slice(0,t),this.notifyArrayListeners())}getSubscriberCounts(){return{eventCallbacks:this.listeners.size,arrayListeners:this.arrayListeners.size,total:this.getTotalSubscriberCount()}}};n(ls,"BaseEventStore");var Sf=ls;import{useEffect as vf,useMemo as Cf,useState as Tf}from"react";var wf=[{value:"buoy.gg/api/license",mode:"contains"},{value:"api.keygen.sh",mode:"contains"}];function Vt(e,t){let a=e.toLowerCase(),s=t.value.toLowerCase();if(t.mode==="contains")return a.includes(s);try{let r=new URL(e);return s.startsWith("/")?r.pathname.toLowerCase()===s:s.startsWith("http://")||s.startsWith("https://")?`${r.origin}${r.pathname}`.toLowerCase()===s:r.host.toLowerCase()===s}catch{return a===s}}n(Vt,"urlMatchesIgnoredPattern");function cs(e,t){return!e||t.length===0?false:t.some(a=>Vt(e,a))}n(cs,"isUrlIgnored");var us=wf;function Yt(e){if(!Array.isArray(e))return[];let t=[];for(let a of e)if(typeof a=="string"&&a.trim())t.push({value:a,mode:"contains"});else if(a&&typeof a=="object"&&typeof a.value=="string"){let s=a;t.push({value:s.value,mode:s.mode==="exact"?"exact":"contains"})}return t}n(Yt,"migratePatterns");function qt(e){let t=[...e];for(let a of us)t.some(s=>s.value===a.value)||t.push({...a});return t}n(qt,"ensureDefaults");var ds=class Db{constructor(){this.patterns=qt(us.map(t=>({...t})));this.teamPatterns=[];this.merged=this.patterns;this.listeners=new Set;this.loaded=false;this.loadPromise=null;this.dirty=false}getPatterns(){return this.merged}isTeamOnly(t){return!this.patterns.some(a=>a.value===t)&&this.teamPatterns.some(a=>a.value===t)}setTeamPatterns(t){this.teamPatterns=Yt(t),this.remerge(),this.emit()}reload(){return this.loaded=false,this.loadPromise=null,this.dirty=false,this.ensureLoaded()}remerge(){let t=this.teamPatterns.filter(a=>!this.patterns.some(s=>s.value===a.value));this.merged=t.length>0?[...this.patterns,...t]:this.patterns}subscribe(t){return this.listeners.add(t),this.ensureLoaded(),()=>{this.listeners.delete(t)}}emit(){this.listeners.forEach(t=>t())}ensureLoaded(){return this.loaded?Promise.resolve():this.loadPromise?this.loadPromise:(this.loadPromise=(async()=>{try{let t=await j.getItem(Se.network.ignoredDomains());if(t&&!this.dirty){let a=qt(Yt(JSON.parse(t)));this.patterns=a,this.remerge()}}catch{}finally{this.loaded=true,this.emit()}})(),this.loadPromise)}persist(){j.setItem(Se.network.ignoredDomains(),JSON.stringify(this.patterns)).catch(()=>{})}commit(t){this.dirty=true,this.patterns=t,this.remerge(),this.emit(),this.persist()}add(t){let a=t.value.trim();a&&(this.patterns.some(s=>s.value===a)||this.commit([...this.patterns,{value:a,mode:t.mode}]))}remove(t){this.patterns.some(a=>a.value===t)&&this.commit(this.patterns.filter(a=>a.value!==t))}toggle(t){let a=t.trim();a&&this.commit(this.patterns.some(s=>s.value===a)?this.patterns.filter(s=>s.value!==a):[...this.patterns,{value:a,mode:"contains"}])}toggleMode(t){this.patterns.some(a=>a.value===t)&&this.commit(this.patterns.map(a=>a.value===t?{...a,mode:a.mode==="contains"?"exact":"contains"}:a))}};n(ds,"IgnoredPatternsStore");var xf=ds,X=new xf,kf=n(e=>X.add(e),"addPattern"),If=n(e=>X.remove(e),"removePattern"),_f=n(e=>X.toggle(e),"togglePattern"),Af=n(e=>X.toggleMode(e),"togglePatternMode"),Of=n(e=>X.isTeamOnly(e),"isTeamOnlyPattern");function hs(){let[e,t]=Tf(()=>X.getPatterns());vf(()=>X.subscribe(()=>{t(X.getPatterns())}),[]);let a=Cf(()=>new Set(e.map(s=>s.value)),[e]);return{patterns:e,values:a,add:kf,remove:If,toggle:_f,toggleMode:Af,isTeamOnly:Of}}n(hs,"useIgnoredPatterns");import{useSyncExternalStore as Ef}from"react";var nt={},Kt=new Map,Jt=new Set,je=[];function gs(e){if(!e)return je;try{let t=JSON.parse(e);if(!Array.isArray(t))return je;let a=t.map(s=>typeof s=="string"?s:s&&typeof s.value=="string"?s.value:"").map(s=>s.trim()).filter(Boolean);return a.length?[...new Set(a)]:je}catch{return je}}n(gs,"parseList");var it={set(e){Object.keys({...nt,...e}).some(t=>nt[t]!==e[t])&&(nt=e,Kt.clear(),Jt.forEach(t=>t()))},getList(e){let t=Kt.get(e);return t||(t=gs(nt[e]),Kt.set(e,t)),t},subscribe(e){return Jt.add(e),()=>Jt.delete(e)}};function ps(e){return Ef(it.subscribe,()=>it.getList(e),()=>je)}n(ps,"useTeamList");function fs(e){typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>e()):setTimeout(e,0)}n(fs,"scheduleFrame");function bs(e){let t=e.id,a=e.order??"append",s=e.coalesce??"sync",r=e.flushMinIntervalMs??150,o=e.max,i=[],l=false,c=e.firstId??1,u=0,y=false,S=[],f=false;function m(){f||(f=true,Fe(()=>{le().status==="locked"&&(i=[]),V()}))}n(m,"observe");let C=new Set,A=new Set;function W(){for(let v of C)try{v()}catch{}}n(W,"fire");function V(){if(s==="sync"){W();return}y||(y=true,fs(()=>{y=false,W()}))}n(V,"emit");function M(v){return v.length<=o?v:a==="append"?v.slice(v.length-o):v.slice(0,o)}return n(M,"trim"),{id:t,subscribe(v){return m(),C.add(v),()=>{C.delete(v)}},getSnapshot(){return m(),q()?i:S},size(){return q()?i.length:0},add(v){m(),!(l||le().status==="locked")&&(a==="append"?i=i.length>=o?[...i.slice(i.length-o+1),v]:[...i,v]:i=i.length>=o?[v,...i.slice(0,o-1)]:[v,...i],V())},set(v){m(),q()&&(i=M(v),V())},update(v){m(),le().status!=="locked"&&(i=M(v(i)),V())},clear(){for(let v of A)try{v()}catch{}i.length!==0&&(i=[],V())},onClear(v){return A.add(v),()=>{A.delete(v)}},notify(){V()},flushSync(v=false){let se=Date.now();if(!(!v&&se-u<r)){u=se;try{let $=globalThis.__buoyFlushToolSync;if(!$)return;for(let Ye of $)Ye(t)}catch{}}},setPaused(v){l=v},isPaused(){return l},setMax(v){o=v;let se=M(i);se!==i&&(i=se,V())},getMax(){return o},allocId(){return c++},bumpIdAbove(v){v+1>c&&(c=v+1)},listenerCount(){return C.size}}}n(bs,"createToolStore");var ys=class Fb{constructor(t={}){this.items=[];this.itemListeners=new Set;this.clearListeners=new Set;this.idCounter=0;this.enabled=true;this.captureSuppressed=false;this.max=t.max??200}canRecord(){return this.enabled&&!this.captureSuppressed}nextId(){return`${Date.now()}-${++this.idCounter}`}push(t){this.items=[t,...this.items].slice(0,this.max)}record(t){this.push(t),this.notifyListeners()}setItems(t){this.items=t.slice(0,this.max),this.notifyListeners()}getAll(){return[...this.items]}getById(t){return this.items.find(a=>a.id===t)}get size(){return this.items.length}clear(){this.items=[],this.notifyListeners(),this.clearListeners.forEach(t=>{try{t()}catch{}})}onClear(t){return this.clearListeners.add(t),()=>{this.clearListeners.delete(t)}}disableCapture(){this.captureSuppressed=true}isCaptureSuppressed(){return this.captureSuppressed}replaceAll(t){return this.enabled?(this.setItems(t),true):false}hydrateById(t,a){let s=this.items.findIndex(r=>r.id===t);s!==-1&&(this.items=[...this.items.slice(0,s),{...this.items[s],...a},...this.items.slice(s+1)],this.notifyListeners())}setEnabled(t){this.enabled=t}getEnabled(){return this.enabled}setMax(t){this.max=t,this.items.length>t&&(this.items=this.items.slice(0,t),this.notifyListeners())}getMax(){return this.max}subscribe(t){return this.itemListeners.add(t),()=>{this.itemListeners.delete(t)}}notifyListeners(){let t=this.getAll();this.itemListeners.forEach(a=>a(t))}get listenerCount(){return this.itemListeners.size}};n(ys,"ChangeLog");var Pf=ys;var ve=n(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"isPlainObject"),Rf=["id","lineId","key","uuid","_id","slug","name"];function lt(e){if(!e.length||!e.every(ve))return;let t=e[0];for(let a of Rf){if(!(a in t))continue;let s=e.map(r=>r[a]);if(s.every(r=>typeof r=="string"||typeof r=="number")&&new Set(s.map(String)).size===s.length)return a}}n(lt,"identityField");function ms(e,t,a,s){let r=s[t];return typeof r=="string"||typeof r=="number"?String(r)!==a?{ok:false,error:`The new item is addressed as \`${a}\` but carries \`${t}\`: ${JSON.stringify(r)}. Use the same value for both \u2014 address it by the id it carries.`}:{ok:true,value:r}:e.every(o=>typeof o[t]=="number")&&a.trim()!==""&&String(Number(a))===a?{ok:true,value:Number(a)}:{ok:true,value:a}}n(ms,"identityForAdd");function ct(e,t,a="",s=[]){if(Array.isArray(e)&&ve(t)){let r=lt(e);if(!r)return{patch:t,notes:s};let o=new Map(e.map(y=>[String(y[r]),y])),i=e.slice(),l=0,c=0,u=0;for(let[y,S]of Object.entries(t)){let f=i.findIndex(m=>String(m[r])===y);if(S===null){if(f===-1)return{patch:t,notes:s};i.splice(f,1),l++}else if(f===-1){if(!ve(S))return{patch:t,notes:s};let m=ms(e,r,y,S);if(!m.ok)return{patch:t,notes:s,error:m.error};i.push({...S,[r]:m.value}),u++}else{let m=ct(o.get(y),S,`${a}[${y}]`,s);if(m.error)return{patch:t,notes:s,error:m.error};let C=i[f];i[f]=ve(C)&&ve(m.patch)?{...C,...m.patch}:m.patch,c++}}return s.push(`${a||"(root)"}: addressed by \`${r}\` \u2014 ${c} changed, ${u} added, ${l} removed, ${i.length} item(s) remain`),{patch:i,notes:s}}if(ve(e)&&ve(t)){let r={};for(let[o,i]of Object.entries(t)){let l=a?`${a}.${o}`:o;if(!(o in e)){r[o]=i;continue}let c=ct(e[o],i,l,s);if(c.error)return{patch:t,notes:s,error:c.error};r[o]=c.patch}return{patch:r,notes:s}}return{patch:t,notes:s}}n(ct,"expandKeyedArrays");var ut=n(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"isPlainObject"),Xt=3,Lf=24,Ss=40,dt=600;function ke(e,t=0){if(e===null)return"null";if(Array.isArray(e)){if(!e.length)return"unknown[]";if(t>=Xt)return"\u2026[]";let s=ke(e[0],t+1);return s.includes(" ")||s.endsWith("]")?`(${s})[]`:`${s}[]`}if(ut(e)){if(t>=Xt)return"{\u2026}";let s=Object.keys(e),r=s.slice(0,Lf),o=r.map(l=>`${l}: ${ke(e[l],t+1)}`).join(", "),i=s.length>r.length?`, +${s.length-r.length} more`:"";return`{${o}${i}}`}let a=typeof e;return a==="undefined"?"undefined":a==="function"?"function":a}n(ke,"shapeOf");function Ce(e,t="",a=[],s=0,r={visited:0}){if(s>Xt||a.length>=Ss||r.visited>=dt)return a;if(Array.isArray(e)){let o=e[0];if(a.push({path:t||"(root)",length:e.length,...e.length?{item:ke(o)}:{}}),e.length&&ut(o))for(let[i,l]of Object.entries(o)){if(++r.visited>=dt)break;Ce(l,t?`${t}[].${i}`:`[].${i}`,a,s+1,r)}return a}if(ut(e))for(let[o,i]of Object.entries(e)){if(++r.visited>=dt)break;Ce(i,t?`${t}.${o}`:o,a,s+1,r)}return a}n(Ce,"listShapes");function vs(e){let t={visited:0};return Ce(e,"",[],0,t).length>=Ss||t.visited>=dt}n(vs,"shapesWereTruncated");function Cs(e){return Ce(e).filter(t=>t.item===void 0).map(t=>t.path)}n(Cs,"unshapedLists");function Ts(e){if(e===void 0)return;let t=Ce(e),a=ke(e);if(!(!t.length&&!ut(e)&&!Array.isArray(e)))return t.length?{shape:a,lists:t}:{shape:a}}n(Ts,"shapeSummary");var te=n(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"isPlainObject");function ws(e,t,a=2e3){let s=[{node:e,path:""}],r=0;for(;s.length&&r<a;){let{node:o,path:i}=s.shift();if(r++,Array.isArray(o))o.slice(0,20).forEach((l,c)=>s.push({node:l,path:`${i}[${c}]`}));else if(te(o))for(let[l,c]of Object.entries(o)){let u=i?`${i}.${l}`:l;if(l===t)return u;(te(c)||Array.isArray(c))&&s.push({node:c,path:u})}}}n(ws,"findFieldPath");function Qt(e,t,a,s,r){let o=ws(e,r??a),i=s.slice(0,12).join(", ")||"(no fields)";return o?`No field "${a}" at "${t}" \u2014 did you mean path "${o}"? "${t}" has: ${i}.`:`No field "${a}" at "${t}". It has: ${i}.`}n(Qt,"missingFieldError");function Zt(e,t){let a=e;for(let s of t.split(".")){if(!te(a))return;a=a[s]}return a}n(Zt,"fieldOf");function ht(e){if(!e.trim())return;let t=[],a=0;for(;a<e.length;){if(e[a]==="."){a++;continue}if(e[a]==="["){let o=e.indexOf("]",a);if(o===-1)return;let i=e.slice(a+1,o);if(/^\d+$/.test(i))t.push({kind:"index",index:Number(i)});else{let l=i.indexOf("=");if(l<=0)return;t.push({kind:"match",field:i.slice(0,l).trim(),value:i.slice(l+1).trim()})}a=o+1;continue}let s=a;for(;s<e.length&&e[s]!=="."&&e[s]!=="[";)s++;let r=e.slice(a,s);if(!r)return;t.push({kind:"key",key:r}),a=s}return t.length?t:void 0}n(ht,"parsePath");function xs(e,t){let a=ht(t);if(!a)return{ok:false,error:`Could not read the path "${t}". Use dotted keys with optional [0] or [field=value], like "item.name" or "lines[lineId=seed-1].qty".`};let s=e,r=[];for(let o of a){if(s==null)return{ok:false,error:`"${r.join(".")||"(root)"}" is ${s===null?"null":"not set"}, so there is nothing at "${t}".`};if(o.kind==="key"){if(!te(s))return{ok:false,error:`"${r.join(".")||"(root)"}" is not an object, so it has no field "${o.key}".`};if(!(o.key in s)){let i=a[a.length-1];return{ok:false,error:Qt(e,r.join(".")||"(root)",o.key,Object.keys(s),i?.kind==="key"?i.key:void 0)}}s=s[o.key],r.push(o.key)}else if(o.kind==="index"){if(!Array.isArray(s))return{ok:false,error:`"${r.join(".")||"(root)"}" is not a list, so [${o.index}] means nothing.`};s=s[o.index],r.push(`[${o.index}]`)}else{if(!Array.isArray(s))return{ok:false,error:`"${r.join(".")||"(root)"}" is not a list, so [${o.field}=${o.value}] means nothing.`};let i=s.find(l=>te(l)&&String(Zt(l,o.field))===o.value);if(i===void 0)return{ok:false,error:`No item with ${o.field}="${o.value}" in "${r.join(".")||"(root)"}".`};s=i,r.push(`[${o.field}=${o.value}]`)}}return{ok:true,value:s}}n(xs,"readPath");function ks(e,t,a){let s=ht(t);if(!s)return{ok:false,error:`Could not read the path "${t}". Use dotted keys with optional [0] or [field=value], like "item.name" or "lines[lineId=seed-1].qty".`};if(s[0]?.kind!=="key")return{ok:false,error:`A path must start with a field name, not a list index \u2014 "${t}" does not say which list.`};let r=n((i,l)=>{if(l>=s.length)return{ok:true,patch:a};let c=s[l];if(c.kind==="key"){if(te(i)&&!(c.key in i)&&l+1<s.length){let W=s[s.length-1];return{ok:false,error:Qt(e,Ie(s,l),c.key,Object.keys(i),W?.kind==="key"?W.key:void 0)}}let C=te(i)?i[c.key]:void 0,A=r(C,l+1);return A.ok?{ok:true,patch:{[c.key]:A.patch}}:A}if(!Array.isArray(i))return{ok:false,error:`"${Ie(s,l)}" is not a list, so "${t}" cannot be resolved. Read it first \u2014 \`shape\` on the read says what each field holds.`};let u=c.kind==="index"?c.index:i.findIndex(C=>te(C)&&String(Zt(C,c.field))===c.value),y=u>=0?i[u]:void 0;if(c.kind==="index"?u<0||u>=i.length:u<0)return{ok:false,error:c.kind==="index"?`"${Ie(s,l)}" has ${i.length} item(s), so there is nothing at [${c.index}].`:`No item with ${c.field}="${c.value}" in "${Ie(s,l)}".`};if(!te(y)){if(l<s.length-1)return{ok:false,error:`"${Ie(s,l)}[${c.kind==="index"?c.index:`${c.field}=${c.value}`}]" holds ${y===null?"null":typeof y}, not an object, so "${t}" cannot go any deeper. Set the item itself.`};let C=i.slice();return C[u]=a,{ok:true,patch:C}}let S=r(y,l+1);if(!S.ok)return S;let f=lt(i);if(f)return{ok:true,patch:{[String(y[f])]:S.patch}};let m=i.slice();return m[u]=te(S.patch)?{...y,...S.patch}:S.patch,{ok:true,patch:m}},"build"),o=r(e,0);return o.ok?{ok:true,patch:o.patch}:o}n(ks,"patchFromPath");function Ie(e,t){return e.slice(0,t).map(a=>a.kind==="key"?a.key:a.kind==="index"?`[${a.index}]`:`[${a.field}=${a.value}]`).join(".").replace(/\.\[/g,"[")||"(root)"}n(Ie,"pathUpTo");var ce=n(e=>!!e&&typeof e=="object"&&!Array.isArray(e),"isPlainObject");function _e(e){return Array.isArray(e)?"array":e===null?"null":typeof e=="object"?"object":typeof e}n(_e,"shapeKind");var Is=["string","number","boolean"];function ea(e,t,a=2e3){let s=[{node:e,path:""}],r=0;for(;s.length&&r<a;){let{node:o,path:i}=s.shift();if(r++,Array.isArray(o))o.slice(0,20).forEach((l,c)=>s.push({node:l,path:`${i}[${c}]`}));else if(ce(o))for(let[l,c]of Object.entries(o)){let u=i?`${i}.${l}`:l;if(l===t&&i)return u;(ce(c)||Array.isArray(c))&&s.push({node:c,path:u})}}}n(ea,"findKeyPath");function gt(e,t,a={},s=e,r="",o=[]){let i=a.noun??"data",l=r||"(root)";if(Array.isArray(t)){if(!Array.isArray(e))return o.push({path:l,kind:"type-change",detail:`${_e(e)} \u2192 array`}),o;let f=e.length?e[0]:void 0;return f!==void 0&&(ce(f)||Array.isArray(f))&&t.forEach((m,C)=>{let A=`${r}[${C}]`;if(ce(f)&&ce(m))for(let W of Object.keys(f))W in m||o.push({path:`${A}.${W}`,kind:"missing-key",detail:`list items need \`${W}\` \u2014 the items already in the list have it`});gt(f,m,a,s,A,o)}),o}if(ce(t)){if(!ce(e))return o.push({path:l,kind:"type-change",detail:`${_e(e)} \u2192 object`}),o;for(let[f,m]of Object.entries(t)){let C=r?`${r}.${f}`:f;if(f in e)gt(e[f],m,a,s,C,o);else{let A=ea(s,f);o.push({path:C,kind:"add-key",detail:A?`no such field here \u2014 did you mean \`${A}\`?`:`no field named \`${f}\` exists in this ${i}`,...A?{movedTo:A}:{}})}}return o}let c=_e(e),u=_e(t),y=c==="null"&&Is.includes(u),S=u==="null"&&Is.includes(c);return c!==u&&!y&&!S&&o.push({path:l,kind:"type-change",detail:`${c} \u2192 ${u}`}),o}n(gt,"typedEditViolations");function _s(e,t){if(!t.length||!t.every(s=>s.kind==="add-key"&&s.movedTo))return;let a={};for(let s of t){let r=As(e,s.path);if(r===void 0||s.movedTo.includes("["))return;let o=a,i=s.movedTo.split(".");i.slice(0,-1).forEach(l=>{o[l]??(o[l]={}),o=o[l]}),o[i[i.length-1]]=r}return a}n(_s,"suggestedPatch");function As(e,t){let a=e;for(let s of t.split(".")){if(!ce(a))return;a=a[s]}return a}n(As,"getAtDotted");function Os(e,t,a){let s=e.slice(0,6).map(o=>`\`${o.path}\`: ${o.detail}`).join("; "),r=e.length>6?`; +${e.length-6} more`:"";return`Refused: this isn't a same-type edit of existing fields (the rule the React Query devtools enforces). ${s}${r}. You can only change the VALUE of a field that already exists, to the same type \u2014 you can't add fields, change a field's type, or null a list/object the screen renders. Clearing a scalar to null is fine. Send just the field(s) you're changing, nested to match the current shape of this ${t}. Use force:true only to deliberately break that.`+(a?` This is the same edit at the right depth \u2014 send it as the patch: ${JSON.stringify(a)}`:"")}n(Os,"refusalText");function He(e,t){let a=0,s=false,r=false,o=[e],i=new Set;for(;o.length>0;){if(a>t)return{bytes:a,sawRepeat:s,sawBigInt:r};let l=o.pop();if(l==null)a+=4;else if(typeof l=="string")a+=l.length+2;else if(typeof l=="number")a+=8;else if(typeof l=="boolean")a+=5;else if(typeof l=="object"){if(i.has(l)){s=true;continue}if(i.add(l),Array.isArray(l)){a+=2+l.length;for(let c=0;c<l.length;c++)o.push(l[c])}else{a+=2;for(let c in l)a+=c.length+4,o.push(l[c])}}else typeof l=="bigint"&&(r=true),a+=4}return{bytes:a,sawRepeat:s,sawBigInt:r}}n(He,"approxJsonSize");function pt(e,t){let a=He(e,t);return a.bytes>t?true:!a.sawRepeat&&!a.sawBigInt?false:!Xa(e)}n(pt,"isOverWireBudget");var Es=16*1024,ft=8*1024*1024;function Ps(e,t){return Object.freeze({[`__buoy${e}OnDevice`]:true,note:t})}n(Ps,"onDeviceMarker");function Rs(e,t){return typeof e=="object"&&e!==null&&e[`__buoy${t}OnDevice`]===true}n(Rs,"isOnDeviceMarker");function ta(e=ft){return{__buoyTruncated:true,note:`Exceeds the ${e/1048576}MB detail limit \u2014 inspect it on-device.`}}n(ta,"truncatedNote");function Ls(e,t,a=Es){return e===void 0?e:pt(e,a)?t:e}n(Ls,"toWire");function aa(e,t=ft){return pt(e,t)?ta(t):e}n(aa,"capDetail");function $s(e){let t=new WeakMap;return a=>{let s=t.get(a);if(s!==void 0)return s;let r=e(a);return t.set(a,r),r}}n($s,"memoByIdentity");function Bs(e,t){let a=[],s=t.baseBytes??16;for(let r=e.length-1;r>=0;r--){let o=t.toWire(e[r]);if(s+o.bytes>t.budget&&a.length>0)break;a.push(o.value),s+=o.bytes}return a.reverse(),a}n(Bs,"newestFitting");function Ms(e,t,a){let s=He(e,t);if(s.bytes<=t)return{value:e,bytes:s.bytes};let r=a();return{value:r,bytes:He(r,t).bytes}}n(Ms,"sizeOrStub");function sa(e){return e??{}}n(sa,"readParams");function Ns(e,t,a=ft){let s=n(r=>aa(r,a),"cap");return r=>{let{id:o}=sa(r);if(!o)return{found:false,reason:"missing id"};let i=e(o);return i?{found:true,id:o,...t(i,s)}:{found:false,reason:"unknown id"}}}n(Ns,"detailByIdAction");function ra(e){return e.length===1?e[0]:t=>{let a=e.map(s=>s(t));return()=>{for(let s of a)s()}}}n(ra,"mergeChangeSources");function Ds(e){let t=Array.isArray(e.subscribe)?ra(e.subscribe):e.subscribe;return{version:e.version,getSnapshot:e.getSnapshot,subscribe:t,...e.actions?{actions:e.actions}:{}}}n(Ds,"createSyncAdapter");var bt=new Set(["@react_buoy_settings_theme","@react_buoy_settings_preferences","@react_buoy_settings_global","@react_buoy_dev_tools_settings","@react_buoy_settings_tooltip_shown","@react_buoy_modal_hint_acknowledged","@react_buoy_clipboard_hint_acknowledged","@react_buoy_network_filters","@react_buoy_network_preferences","@react_buoy_network_copy_options","@react_buoy_storage_filters","@react_buoy_storage_event_filters","@react_buoy_storage_key_filters","@react_buoy_storage_pinned_keys","@react_buoy_storage_preferences","@react_buoy_storage_diff_viewer_mode","@react_buoy_rq_filters","@react_buoy_rq_preferences","@react_buoy_route_events_event_filters","@react_buoy_route_events_detail_view","@react_buoy_route_events_diff_viewer_mode","@react_buoy_sentry_filters","@react_buoy_sentry_preferences","@react_buoy_highlight_updates_filters","@react_buoy_highlight_updates_settings","@react_buoy_highlight_updates_copy_settings","@react_buoy_events_enabled_sources","@react_buoy_events_copy_settings","@react_buoy_time_machine_diff_viewer_mode","@react_buoy_network_ignored_domains","@react_buoy_network_ignored_urls","@react_buoy_rq_ignored_patterns","@react_buoy_rq_included_patterns"]),zs=new Set(["@react_buoy_network_ignored_domains","@react_buoy_network_ignored_urls","@react_buoy_rq_ignored_patterns","@react_buoy_rq_included_patterns"]),Fs="@react_buoy_settings_sync_meta",Ws="@react_buoy_network_ignored_domains",js=2e3,ue=3e4,oa=15*6e4,$f=15e3,na=new Set;function Hs(e){return na.add(e),()=>na.delete(e)}n(Hs,"onSettingsApplied");function Us(e){e.includes(Ws)&&X.reload(),na.forEach(t=>{try{t(e)}catch{}})}n(Us,"applyPulledSettings");function Gs(){return{storage:j,credential:cu,fetch:n((e,t)=>fetch(e,t),"fetch"),subscribeWrites:df,setTimer:n((e,t)=>setTimeout(e,t),"setTimer"),clearTimer:n(e=>clearTimeout(e),"clearTimer"),onTeam:n(e=>{X.setTeamPatterns(Vs(e[Ws])),it.set(e)},"onTeam"),onApplied:Us}}n(Gs,"defaultDeps");function Vs(e){if(!e)return[];try{return JSON.parse(e)}catch{return[]}}n(Vs,"parseList");var Ys=class Wb{constructor(t={}){this.started=false;this.pending=new Map;this.applying=new Set;this.pushTimer=null;this.pullTimer=null;this.unsubscribe=null;this.refusedToken=null;this.deps={...Gs(),...t}}start(){this.started||(this.started=true,this.unsubscribe=this.deps.subscribeWrites((t,a)=>this.onWrite(t,a)),this.pull())}stop(){this.started=false,this.unsubscribe?.(),this.unsubscribe=null,this.pushTimer!==null&&this.deps.clearTimer(this.pushTimer),this.pullTimer!==null&&this.deps.clearTimer(this.pullTimer),this.pushTimer=this.pullTimer=null}credential(){let t=this.deps.credential();return t&&t.token!==this.refusedToken?t:null}call(t,a,s){return new Promise((r,o)=>{let i=this.deps.setTimer(()=>o(new Error("timeout")),$f);this.deps.fetch(`${a.origin.replace(/\/$/,"")}${t}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({access_token:a.token,...s})}).then(l=>{this.deps.clearTimer(i),r(l)},l=>{this.deps.clearTimer(i),o(l)})})}schedulePull(t){this.started&&(this.pullTimer!==null&&this.deps.clearTimer(this.pullTimer),this.pullTimer=this.deps.setTimer(()=>{this.pullTimer=null,this.pull()},t))}async readMeta(){try{let t=await this.deps.storage.getItem(Fs),a=t?JSON.parse(t):{};return a&&typeof a=="object"?a:{}}catch{return{}}}async writeMeta(t){await this.deps.storage.setItem(Fs,JSON.stringify(t)).catch(()=>{})}async pull(){let t=this.credential();if(!t)return this.schedulePull(ue);let a,s;try{let c=await this.call("/api/settings/pull",t,{});a=c.status,s=await c.json().catch(()=>null)}catch{return this.schedulePull(ue)}if(a===401||a===403)return this.refusedToken=t.token,this.schedulePull(ue);if(a===404)return this.schedulePull(oa);if(a!==200||!s)return this.schedulePull(ue);let r=s.personal??{},o=await this.readMeta(),i=[];for(let[c,u]of Object.entries(r))if(!(!bt.has(c)||this.pending.has(c))&&!(typeof u?.value!="string"||!(u.updatedAt>(o[c]??0)))){this.applying.add(c);try{await this.deps.storage.setItem(c,u.value)}finally{this.applying.delete(c)}o[c]=u.updatedAt,i.push(c)}for(let c of bt){if(c in r||c in o||this.pending.has(c))continue;let u=await this.deps.storage.getItem(c).catch(()=>null);u!==null&&this.pending.set(c,u)}await this.writeMeta(o),i.length>0&&this.deps.onApplied(i);let l={};for(let[c,u]of Object.entries(s.team??{}))zs.has(c)&&typeof u?.value=="string"&&(l[c]=u.value);this.deps.onTeam(l),this.pending.size>0&&this.schedulePush(0),this.schedulePull(oa)}onWrite(t,a){!this.started||this.applying.has(t)||!bt.has(t)||(this.pending.set(t,a),this.schedulePush(js))}schedulePush(t){this.pushTimer!==null&&this.deps.clearTimer(this.pushTimer),this.pushTimer=this.deps.setTimer(()=>{this.pushTimer=null,this.push()},t)}async push(){if(this.pending.size===0)return;let t=this.credential();if(!t)return this.schedulePush(ue);let a=new Map(this.pending),s,r;try{let i=await this.call("/api/settings/push",t,{changes:Object.fromEntries(a)});s=i.status,r=await i.json().catch(()=>null)}catch{return this.schedulePush(ue)}if(s===401||s===403)return this.refusedToken=t.token,this.schedulePush(ue);if(s===404)return this.schedulePush(oa);if(s!==200||!r||typeof r.updatedAt!="number")return this.schedulePush(ue);let o=await this.readMeta();for(let[i,l]of a)this.pending.get(i)===l&&this.pending.delete(i),o[i]=r.updatedAt;await this.writeMeta(o),this.pending.size>0&&this.schedulePush(js)}};n(Ys,"SettingsSync");var qs=Ys,Ue=null;function Ks(e={}){Ue??(Ue=new qs(e)),Ue.start()}n(Ks,"startSettingsSync");function Js(){Ue&&Ue.pull()}n(Js,"syncSettingsNow");function Xs(e){return e}n(Xs,"defineToolPreset");function Qs(e,t,a){return s=>{let r=s??{},o=e.props===void 0&&!t?void 0:{...e.props??{},...t?t(r):{}};return{...e,id:r.id||e.id,name:r.name||e.name,description:r.description||e.description,...o!==void 0?{props:o}:{},...a?a(r,e):{}}}}n(Qs,"createToolFactory");var ia="__buoyToolActionRegistry";function yt(){let e=globalThis;return e[ia]||(e[ia]=new Set),e[ia]}n(yt,"sources");function Zs(e){let t=yt();t.add(e);let a=false,s=n(()=>{if(a)return;a=true;let o=e(),i=n(async(l,c,u)=>{if(!(l==="network"&&c==="deleteOverrideRule"||l==="impersonate"&&c==="stopImpersonation"))throw new Error("Unsupported account-lock cleanup operation");if(l==="impersonate")return o[l]?.dispose?.(i);let y=o[l]?.actions?.[c];if(!y)throw new Error(`Cleanup unavailable for ${l}`);return y(u)},"cleanup");for(let l of Object.values(o))try{Promise.resolve(l.dispose?.(i)).catch(c=>console.warn("[Buoy] Tool cleanup failed",c))}catch(c){console.warn("[Buoy] Tool cleanup failed",c)}},"dispose"),r=Fe(()=>{q()?a=false:s()});return()=>{r(),t.delete(e),Promise.resolve().then(()=>{t.size===0&&s()})}}n(Zs,"registerToolAdapters");function Te(){if(!q())return{};let e={};for(let t of yt())try{Object.assign(e,t())}catch{}return Object.fromEntries(Object.entries(e).map(([t,a])=>[t,la(a)]))}n(Te,"getToolAdapters");function er(){return Object.keys(Te())}n(er,"listToolIds");function tr(){let e={};for(let[t,a]of Object.entries(Te()))e[t]=Object.keys(a.actions??{});return e}n(tr,"listToolActions");function ar(){return Object.entries(Te()).filter(([,e])=>typeof e.getSnapshot=="function").map(([e])=>e)}n(ar,"listSnapshotToolIds");async function sr(e){xe();let t=Te()[e];if(!t)throw new Error(`Unknown tool "${e}"`);if(typeof t.getSnapshot!="function")throw new Error(`Tool "${e}" has no snapshot to read`);return await t.getSnapshot()}n(sr,"readToolSnapshot");function mt(){return q()&&yt().size>0}n(mt,"isToolRegistryReady");async function rr(e,t,a){xe();let s=Te()[e],r=s?.actions?.[t];if(!r)throw new Error(s?`Unknown action "${t}" on tool "${e}"`:`Unknown tool "${e}"`);return await r(a)}n(rr,"dispatchToolAction");async function or(e=2e3){if(mt())return true;let t=Ft()+e;for(;Ft()<t;)if(await new Promise(a=>setTimeout(a,50)),mt())return true;return false}n(or,"waitForToolRegistry");function la(e){let t=n(a=>(...s)=>{xe();let r=false,o=Fe(()=>{q()||(r=true)}),i=n(()=>{if(r)throw new Error("Buoy account access ended while the operation was pending.");xe()},"check");try{let l=a.apply(e,s);return l&&typeof l.then=="function"?Promise.resolve(l).then(c=>(i(),c)).finally(o):(i(),o(),l)}catch(l){throw o(),l}},"guard");return{...e,...e.getSnapshot?{getSnapshot:t(e.getSnapshot)}:{},...e.actions?{actions:Object.fromEntries(Object.entries(e.actions).map(([a,s])=>[a,t(s)]))}:{},...e.subscribe?{subscribe:n(a=>(xe(),e.subscribe(()=>{q()&&a()})),"subscribe")}:{}}}n(la,"guardToolAdapter");var ca="__buoyToolUiBridge";function St(){let e=globalThis;return e[ca]||(e[ca]=new Set),e[ca]}n(St,"openers");function nr(e){let t=St();return t.add(e),()=>{t.delete(e)}}n(nr,"registerToolOpener");function ir(e){for(let t of St())try{if(t(e))return true}catch{}return false}n(ir,"openBuoyTool");function lr(){return St().size>0}n(lr,"canOpenBuoyTools");var ua="__buoyToolAttention";function vt(){let e=globalThis;return e[ua]||(e[ua]={byTool:new Map,listeners:new Set}),e[ua]}n(vt,"attention");function cr(e,t){let a=vt(),s=a.byTool.get(e)??null;if(!(s===t||s&&t&&s.kind===t.kind&&s.label===t.label)){t?a.byTool.set(e,t):a.byTool.delete(e);for(let r of a.listeners)try{r()}catch{}}}n(cr,"setToolAttention");function ur(e){return vt().byTool.get(e)??null}n(ur,"getToolAttention");function dr(e){let t=vt();return t.listeners.add(e),()=>{t.listeners.delete(e)}}n(dr,"subscribeToolAttention");import{createContext as Bf,useContext as Mf,useEffect as Nf}from"react";var hr=Bf(null);function gr(e,t){let a=Mf(hr);return Nf(()=>{if(a)return a(e),()=>a(null)},[a,...t]),a!==null}n(gr,"useToolScreenHeader");var pr=256*1024;function fr(e){let t=new Set(e?.excludeKeys??[]),a=e?.includeKeys?new Set(e.includeKeys):null,s=0,r=n(o=>!t.has(o)&&(!a||a.has(o)),"touch");return{touch:r,allows(o){return r(o)?true:(s+=1,false)},countExcluded(o){s+=o},get excludedHits(){return s},excludedWarning(o){return s>0?`${s} ${o} excluded by you`:null}}}n(fr,"createRestoreScope");function br(){return{ok:true,applied:0,skipped:[],warnings:[]}}n(br,"emptyRestoreResult");function yr(e){return{ok:false,applied:0,skipped:[],warnings:[e]}}n(yr,"failedRestore");function mr(e,t){return{ok:false,applied:0,skipped:[{id:e,reason:t}],warnings:[]}}n(mr,"skippedRestore");function Sr(e,t={}){let{key:a,label:s,oldValue:r,newValue:o,inOld:i,inNew:l}=e;if(!l)return{key:a,label:s,verdict:"removed",oldValue:r};if(!i)return{key:a,label:s,verdict:"added",newValue:o};if((t.equal??Zn)(r,o))return{key:a,label:s,verdict:"unchanged"};let c=t.tooLarge??(u=>ei(u,pr));return c(r)||c(o)?{key:a,label:s,verdict:"too-large",reason:t.tooLargeReason??"value too large to render a diff \u2014 restore still applies it"}:{key:a,label:s,verdict:"changed",oldValue:r,newValue:o}}n(Sr,"classifyPreviewItem");function vr(e,t){return e.verdict==="unchanged"?e:{...e,verdict:"wont-apply",reason:t}}n(vr,"wontApply");function Cr(e,t){let a=n(s=>s===void 0?[]:s instanceof Map?Array.from(s.keys()):Object.keys(s),"keysOf");return new Set([...a(e),...a(t)])}n(Cr,"unionKeys");function Tr(e,t={}){let a=e.toLowerCase();if(t[a])return t[a];for(let[m,C]of Object.entries(t))if(a.includes(m))return C;let s=e.split("").reduce((m,C)=>m+C.charCodeAt(0),0)*137%360,r=.7,o=.6,i=(1-Math.abs(2*o-1))*r,l=i*(1-Math.abs(s/60%2-1)),c=o-i/2,u=0,y=0,S=0;s<60?(u=i,y=l):s<120?(u=l,y=i):s<180?(y=i,S=l):s<240?(y=l,S=i):s<300?(u=l,S=i):(u=i,S=l);let f=n(m=>Math.round((m+c)*255).toString(16).padStart(2,"0"),"toHex");return`#${f(u)}${f(y)}${f(S)}`}n(Tr,"entityColor");function wr(e,t={}){let a=t.maxLength??40;if(e===void 0)return t.undefinedLabel??"undefined";if(e===null)return"null";try{if(typeof e=="function")return t.functionLabel??"(fn)";if(typeof e=="string")return e.length>a?`"${e.slice(0,a-3)}..."`:`"${e}"`;if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e)){if(e.length===0)return"[]";let s=JSON.stringify(e);return s.length>a?`[${e.length} items]`:s}if(typeof e=="object"){let s=Object.keys(e);if(s.length===0)return"{}";let r=JSON.stringify(e);return r.length<=a?r:`{ ${s.length} keys }`}return String(e).slice(0,a)}catch{return"[complex]"}}n(wr,"formatValuePreview");function xr(e,t){if(e===t)return{summary:"no change",changedKeys:[],changedCount:0};if(typeof e!="object"||typeof t!="object"||e===null||t===null)return{summary:"changed",changedKeys:[],changedCount:0};let a=e,s=t,r=Object.keys(a),o=Object.keys(s),i=o.filter(f=>!r.includes(f)),l=r.filter(f=>!o.includes(f)),c=[];for(let f of r)o.includes(f)&&a[f]!==s[f]&&c.push(f);let u=[...i,...l,...c],y=[];if(i.length>0&&y.push(`+${i.length}`),l.length>0&&y.push(`-${l.length}`),c.length>0&&y.push(`~${c.length}`),y.length===0)return{summary:"nested change",changedKeys:[],changedCount:0};let S=u.length;return{summary:`${y.join(" ")} ${S===1?"key":"keys"}`,changedKeys:u,changedCount:S}}n(xr,"shallowDiffSummary");function da(e){if(e==null)return"N/A";if(e===0)return"0 B";let t=1024,a=["B","KB","MB","GB","TB"],s=Math.floor(Math.log(e)/Math.log(t));return`${(e/Math.pow(t,s)).toFixed(1)} ${a[s]}`}n(da,"formatBytes");function kr(e){if(e==null)return"N/A";if(e<1e3)return`${e}ms`;if(e<6e4)return`${(e/1e3).toFixed(1)}s`;if(e<36e5){let s=Math.floor(e/6e4),r=Math.floor(e%6e4/1e3);return r>0?`${s}m ${r}s`:`${s}m`}let t=Math.floor(e/36e5),a=Math.floor(e%36e5/6e4);return a>0?`${t}h ${a}m`:`${t}h`}n(kr,"formatDuration");function Ir(e){return e.toLocaleString()}n(Ir,"formatNumber");var _r=5e4;function Ar(e,t=_r){try{let a=JSON.stringify(e);return a.length>t?`[omitted: ${da(a.length)} \u2014 too large to copy]`:e}catch{return"[omitted: could not serialize]"}}n(Ar,"truncatePayload");function Or(e,t=50,a=20,s=20){if(e.length<=t)return e;let r=e.slice(0,a),o=e.slice(-s);return`${r}...${o}`}n(Or,"truncateMiddle");function Er(e){if(e>=100&&e<200)return{text:String(e),color:w.info,meaning:"Informational"};if(e>=200&&e<300){let t={200:"OK",201:"Created",202:"Accepted",204:"No Content",206:"Partial Content"};return{text:String(e),color:w.success,meaning:t[e]||"Success"}}if(e>=300&&e<400){let t={301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",307:"Temporary Redirect",308:"Permanent Redirect"};return{text:String(e),color:w.warning,meaning:t[e]||"Redirect"}}if(e>=400&&e<500){let t={400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",408:"Request Timeout",409:"Conflict",410:"Gone",422:"Unprocessable Entity",429:"Too Many Requests"};return{text:String(e),color:w.error,meaning:t[e]||"Client Error"}}if(e>=500){let t={500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported"};return{text:String(e),color:w.error,meaning:t[e]||"Server Error"}}return{text:String(e),color:w.muted,meaning:"Unknown"}}n(Er,"formatHttpStatus");function Pr(e){return{GET:w.success,POST:w.info,PUT:w.warning,DELETE:w.error,PATCH:w.network,HEAD:w.muted,OPTIONS:w.secondary,CONNECT:w.critical,TRACE:w.env}[e.toUpperCase()]||w.muted}n(Pr,"getMethodColor");function Rr(e){try{let t=new URL(e);return{protocol:t.protocol.replace(":",""),host:t.hostname,port:t.port||void 0,pathname:t.pathname,search:t.search||void 0,hash:t.hash||void 0}}catch{return null}}n(Rr,"parseUrl");var Ge=[];function ha(e){Ge.unshift(e),Ge=Ge.slice(0,500)}n(ha,"add");function Lr(){return Ge}n(Lr,"getEntries");function $r(){Ge=[]}n($r,"clearEntries");var ga=(e=>(e.Debug="debug",e.Info="info",e.Log="log",e.Warn="warn",e.Error="error",e))(ga||{}),pa=(e=>(e.Auth="Auth",e.Custom="Custom",e.Debug="Debug",e.Error="Error",e.Generic="Generic",e.HTTPRequest="HTTP Request",e.Navigation="Navigation",e.Replay="Replay",e.State="State",e.System="System",e.Touch="Touch",e.UserAction="User Action",e))(pa||{});var Df=n(()=>`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,"generateId"),Br=class Hb{constructor(){this.captureTransaction=n(t=>(this.logSentryEvent("transaction",t),t),"captureTransaction");this.captureSpan=n(t=>(this.logSentryEvent("span",t),t),"captureSpan");this.captureEvent=n(t=>(this.logSentryEvent("event",t),t),"captureEvent");this.captureLog=n(t=>(this.logSentryEvent("console",{message:t.message||"Log entry",level:t.level,category:"console",timestamp:t.timestamp,...t.attributes}),t),"captureLog");this.captureBreadcrumb=n(t=>{let a="unknown";try{let r=globalThis.getCurrentPathname;r&&(a=r())}catch{}let s=t.category;if(t.message?.toLowerCase().includes("ignore"))return null;if(t.message?.includes("Touch event within element:")&&(t.message=t.message.replace("Touch event within element:","")),s==="navigation"&&t.data?.from&&t.data?.to&&(t.message=`From ${t.data.from} To ${t.data.to}`),s==="touch"&&t.data?.path){t.message&&(t.message=t.message.trim());let r={...t.data,category:s,message:t.message,route:a,timestamp:new Date().toISOString(),path:t.message?[{label:t.message}]:t.data?.path};t.data=r}return this.logSentryEvent("breadcrumb",t),t},"captureBreadcrumb")}logSentryEvent(t,a){let s="Generic",r=a.category;if(r)switch(r){case"touch":s="Touch";break;case"xhr":case"fetch":case"http":s="HTTP Request";break;case"navigation":s="Navigation";break;case"auth":s="Auth";break;case"console":s="System";break;case"debug":s="Debug";break;default:r.startsWith("ui.")?s="User Action":r.startsWith("replay.")?s="Replay":r.includes("redux")||r.includes("state")?s="State":s="Custom"}let o={id:Df(),timestamp:Date.now(),level:this.getSentryLevel(a),message:this.getSentryMessage(a),metadata:this.getSentryMetadata(a),type:s};ha(o)}getSentryLevel(t){switch(t.level){case"fatal":case"error":return"error";case"warning":return"warn";case"info":return"info";case"debug":return"debug";default:return"log"}}getSentryMessage(t){let a=t.message;return typeof a=="string"?a:`${t.type||"Unknown"} Event`}getSentryMetadata(t){let{message:a,level:s,type:r,...o}=t;return o}};n(Br,"SentryLogger");var Mr=Br,zf=new Mr;import{useState as fa,useEffect as Nr}from"react";import{jsx as P,jsxs as Ae}from"react/jsx-runtime";var Ct=Se.bubble.settings(),Dr=Se.bubble.userPreferences(),ba={showEnvironment:true,showQueryButton:true,showWifiToggle:true,showEnvButton:false,showSentryButton:false,showStorageButton:false};function zr({onPress:e}){let[t,a]=fa(ba);Nr(()=>{s()},[]);let s=n(async()=>{try{let r=await j.getItem(Ct);r&&a(JSON.parse(r))}catch(r){console.error("[Buoy]","Failed to load bubble settings:",r)}},"loadSettings");return P(Za,{id:"bubble-settings",title:"SETTINGS",subtitle:`${n(()=>Object.values(t).filter(Boolean).length,"getVisibleCount")()}/6 visible`,icon:Ht,iconColor:"#10B981",iconBackgroundColor:"rgba(16, 185, 129, 0.1)",onPress:e||(()=>{}),index:5})}n(zr,"BubbleSettingsSection");function Fr({onSettingsChange:e}){let[t,a]=fa(ba),[s,r]=fa(true);Nr(()=>{o()},[]);let o=n(async()=>{try{let u=await j.getItem(Ct);u&&a(JSON.parse(u))}catch(u){console.error("[Buoy]","Failed to load bubble settings:",u)}finally{r(false)}},"loadSettings"),i=n(async u=>{try{await j.setItem(Ct,JSON.stringify(u)),a(u),e?.(u)}catch(y){console.error("[Buoy]","Failed to save bubble settings:",y)}},"saveSettings"),l=n(async u=>{let y={...t,[u]:!t[u]};try{let S=await j.getItem(Dr),f=S?JSON.parse(S):{},m=u.replace("show","hasSet"),C={...f,[m]:true};await j.setItem(Dr,JSON.stringify(C))}catch(S){console.error("[Buoy]","Failed to save user preference marker:",S)}i(y)},"handleToggle");if(s)return P(k,{style:_.detailContainer,children:P(F,{style:_.loadingText,children:"Loading settings..."})});let c=[{key:"showEnvironment",label:"Environment Indicator",description:"Shows current environment (dev, staging, prod)",icon:P(k,{style:[_.indicator,{backgroundColor:"#10B981"}]})},{key:"showQueryButton",label:"React Query Button",description:"Opens React Query dev tools",icon:P(k,{style:[_.indicator,{backgroundColor:"#F59E0B"}]})},{key:"showWifiToggle",label:"WiFi",description:"Toggle WiFi for testing offline scenarios",icon:P(k,{style:[_.indicator,{backgroundColor:"#8B5CF6"}]})},{key:"showEnvButton",label:"Environment Variables",description:"View and check environment variables",icon:P(Ht,{size:16,color:"#10B981"})},{key:"showSentryButton",label:"Sentry Events",description:"View captured Sentry events and errors",icon:P(k,{style:[_.indicator,{backgroundColor:"#a855f7"}]})},{key:"showStorageButton",label:"Storage Browser",description:"Browse and inspect AsyncStorage data",icon:P(os,{size:16,color:"#3B82F6"})}];return P(k,{style:_.detailContainer,children:Ae(bf,{showsVerticalScrollIndicator:false,contentContainerStyle:_.scrollContent,"sentry-label":"ignore bubble settings scroll",children:[Ae(k,{style:_.header,children:[P(F,{style:_.headerTitle,children:"Developer Tools Settings"}),P(F,{style:_.headerDescription,children:"Configure bubble button visibility"})]}),P(k,{style:_.sectionDivider,children:P(F,{style:_.sectionTitle,children:"Bubble Button Visibility"})}),P(k,{style:_.settingsList,children:c.map(u=>Ae(k,{style:_.settingItem,children:[P(k,{style:_.settingIconContainer,children:u.icon}),Ae(k,{style:_.settingContent,children:[P(F,{style:_.settingLabel,children:u.label}),P(F,{style:_.settingDescription,children:u.description})]}),P(yf,{"sentry-label":"ignore bubble settings section",value:t[u.key],onValueChange:()=>l(u.key),trackColor:{false:"#4B5563",true:"#10B981"},thumbColor:t[u.key]?"#fff":Y.textSecondary})]},u.key))}),Ae(k,{style:_.footer,children:[Ae(k,{style:_.noteContainer,children:[P(is,{size:16,color:Y.textSecondary}),P(F,{style:_.noteText,children:"User status indicator is always visible and cannot be disabled"})]}),P(F,{style:_.restartNote,children:"Changes are saved automatically and will persist across app restarts"})]})]})})}n(Fr,"BubbleSettingsDetail");async function Wr(){try{let e=await j.getItem(Ct);if(e)return JSON.parse(e)}catch(e){console.error("[Buoy]","Failed to load bubble settings:",e)}return ba}n(Wr,"getBubbleVisibilitySettings");var _=We.create({scrollContent:{flexGrow:1},sectionCard:{backgroundColor:Y.input,borderRadius:8,padding:16,flexDirection:"row",alignItems:"center",marginBottom:12},iconContainer:{width:36,height:36,borderRadius:8,backgroundColor:"rgba(16, 185, 129, 0.1)",justifyContent:"center",alignItems:"center",marginRight:12},textContainer:{flex:1},title:{color:Y.text,fontSize:14,fontWeight:"600",marginBottom:2},subtitle:{color:Y.textSecondary,fontSize:12},chevron:{color:st.text.icon,fontSize:20},detailContainer:{flex:1,backgroundColor:Y.card},loadingText:{color:Y.textSecondary,fontSize:14,textAlign:"center",marginTop:20},header:{padding:16,borderBottomWidth:1,borderBottomColor:"rgba(128, 128, 128, 0.2)"},headerTitle:{color:Y.text,fontSize:16,fontWeight:"600",marginBottom:4},headerDescription:{color:Y.textSecondary,fontSize:12},settingsList:{padding:16},settingItem:{flexDirection:"row",alignItems:"center",paddingVertical:12,borderBottomWidth:1,borderBottomColor:"rgba(128, 128, 128, 0.1)"},settingIconContainer:{width:32,height:32,justifyContent:"center",alignItems:"center",marginRight:12},settingContent:{flex:1,marginRight:12},settingLabel:{color:Y.text,fontSize:14,fontWeight:"500",marginBottom:2},settingDescription:{color:st.text.icon,fontSize:11},indicator:{width:8,height:8,borderRadius:4},footer:{padding:16,borderTopWidth:1,borderTopColor:"rgba(128, 128, 128, 0.2)"},noteContainer:{flexDirection:"row",alignItems:"center",gap:8,marginBottom:8},noteText:{color:Y.textSecondary,fontSize:12,flex:1},restartNote:{color:st.text.icon,fontSize:11,fontStyle:"italic"},sectionDivider:{paddingHorizontal:16,paddingVertical:8,marginTop:8,borderTopWidth:1,borderTopColor:"rgba(128, 128, 128, 0.12)"},sectionTitle:{color:Y.textSecondary,fontSize:12,fontWeight:"600",letterSpacing:.5,textTransform:"uppercase"}});function ya(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}n(ya,"isPlainObject");function jr(e,t,a={}){let s=a.storage??j,r=a.parse??(c=>JSON.parse(c)),o=a.serialize??(c=>JSON.stringify(c));function i(c){let u=ya(t)&&ya(c)?{...t,...c}:c;return a.sanitize?a.sanitize(u,c):u}n(i,"resolve");async function l(){try{let c=await s.getItem(e);return c==null||c===""?null:i(r(c))}catch{return null}}return n(l,"loadOrNull"),{key:e,defaults:t,loadOrNull:l,async load(){return await l()??t},async save(c){try{await s.setItem(e,o(c))}catch{}},async clear(){try{await s.removeItem(e)}catch{}}}}n(jr,"definePersistedSetting");import{callCapacitorNative as Hr,hasCapacitorPlugin as Ff,isCapacitorNative as Wf}from"@buoy-gg/license/web";function Ur(){return!Wf()||!Ff("Preferences")?null:{async getAllKeys(){let{keys:e}=await Hr("Preferences","keys");return Array.isArray(e)?e:[]},async multiRemove(e){await Promise.all(e.map(t=>Hr("Preferences","remove",{key:t})))}}}n(Ur,"getCapacitorAppStorage");import{callCapacitorNative as jf,hasCapacitorPlugin as Hf,isCapacitorNative as Uf}from"@buoy-gg/license/web";function Gr(e){if(e.instanceId&&rt(e.instanceId))return null;let t=e.data;if(!t)return e;if(typeof t.key=="string"&&rt(t.key))return null;let a={...t},s=false,r=false,o=false;for(let i of["keys","pairs","prevPairs"])Array.isArray(t[i])&&(r||(r=t[i].length>0),a[i]=t[i].filter(l=>!rt(i==="keys"?l:l[0])),o||(o=a[i].length>0),s||(s=a[i].length!==t[i].length));return r&&!o?null:s?{...e,data:a}:e}n(Gr,"appStorageEvent");function ma(e){try{let t=new URL(e,typeof location>"u"?"http://localhost":location.href),a=t.hostname.toLowerCase();if(["api.buoy.gg","ai.buoy.gg","gateway.buoy.gg"].includes(a)||a==="keygen.sh"||a.endsWith(".keygen.sh")||["buoy.gg","www.buoy.gg"].includes(a)&&/^\/api\/(license|settings|auth|session|install|t)(?:\/|$)/.test(t.pathname)||t.pathname==="/buoy-assets.json")return true;let s=globalThis.__BUOY_INTERNAL_HOSTS__;return s instanceof Set&&[...s].some(r=>typeof r=="string"&&r.toLowerCase()===t.host.toLowerCase())}catch{return false}}n(ma,"isBuoyRequest");function Vr(e,t){return fetch(e,{...t,__buoyInternal:true})}n(Vr,"buoyFetch");function Yr(e){return typeof e[0]=="string"&&/^\[(?:buoy(?:[^\]]*)?|@buoy-gg\/[^\]]+|RnBetterDevTools|React ?Buoy|RN-BUOY DEBUG|js-top|perf-monitor|impersonate|RenderCause|HighlightUpdates|RenderTracker|ProfilerInterceptor|HighlightPerf|DebugBorders|optional-module|route-events|RouteObserver)\]/i.test(e[0])}n(Yr,"isBuoyLog");function qr(e){if(!e)return false;if(ma(e))return true;let t=e;try{t=decodeURIComponent(t)}catch{}return t=t.replace(/\\/g,"/"),/(?:^|\/)node_modules\/@buoy-gg\/[^/]+(?:\/|$)/.test(t)||/(?:^|\/)buoy-packages\/packages\/[^/]+(?:\/|$)/.test(t)||/(?:^|\/)packages\/floating-tools-core\/(?:src|lib\/(?:module|commonjs))\/icons\/assets(?:\/|$)/.test(t)}n(qr,"isBuoyAssetPath");function Kr(e){let t=e;for(;t;){if(t.closest("[data-buoy-root], [data-buoy-portal-host]"))return true;let a=t.getRootNode?.();t=a&&"host"in a?a.host:null}return false}n(Kr,"isBuoyElement");import{useEffect as Gf,useId as Vf,useRef as Jr,useState as Yf}from"react";import{jsx as Oe,jsxs as qf}from"react/jsx-runtime";function Sa(){let[e,t]=Yf(false),a=Jr(null),s=Jr(null),r=Vf(),o=n((i=true)=>{t(false),i&&a.current?.querySelector('[data-account-launcher] [role="button"]')?.focus({preventScroll:true})},"close");return Gf(()=>{if(!e)return;s.current?.focus({preventScroll:true});let i=n(c=>{c.target instanceof Node&&!a.current?.contains(c.target)&&t(false)},"onPointerDown"),l=n(c=>{c.key==="Escape"&&(c.preventDefault(),c.stopPropagation(),t(false),a.current?.querySelector('[data-account-launcher] [role="button"]')?.focus({preventScroll:true}))},"onKeyDown");return document.addEventListener("pointerdown",i),document.addEventListener("keydown",l),()=>{document.removeEventListener("pointerdown",i),document.removeEventListener("keydown",l)}},[e]),typeof document>"u"?null:Oe(mf,{children:qf("div",{ref:a,"data-buoy-account":"",style:{position:"fixed",right:"max(16px, env(safe-area-inset-right))",bottom:"max(20px, env(safe-area-inset-bottom))",zIndex:99999,colorScheme:"dark",fontFamily:"system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"},children:[Oe("style",{children:`
|
|
2
2
|
[data-buoy-account] { font-size: 14px; line-height: 1.5; text-align: left; }
|
|
3
3
|
[data-buoy-account] [role="button"], [data-buoy-account] [role="link"] { cursor: pointer; }
|
|
4
|
-
[data-buoy-account] [role="button"]:focus-visible, [data-buoy-account] [role="link"]:focus-visible { outline: 2px solid ${
|
|
4
|
+
[data-buoy-account] [role="button"]:focus-visible, [data-buoy-account] [role="link"]:focus-visible { outline: 2px solid ${d.color.accent}; outline-offset: 3px; }
|
|
5
5
|
[data-buoy-account] [role="link"]:hover { background: rgba(255,255,255,.06); }
|
|
6
6
|
[data-buoy-account] [aria-disabled="true"] { cursor: wait; }
|
|
7
7
|
[data-buoy-account] .buoy-account-panel {
|
|
@@ -11,4 +11,4 @@
|
|
|
11
11
|
box-shadow: 0 18px 60px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.2);
|
|
12
12
|
outline: none;
|
|
13
13
|
}
|
|
14
|
-
`}),He("div",{"data-account-launcher":"",children:He(Aa,{expanded:e,onPress:()=>t(o=>!o)})}),e&&He("section",{ref:r,className:"buoy-account-panel",role:"dialog","aria-labelledby":n,tabIndex:-1,onBlur:o=>{o.relatedTarget instanceof Node&&!a.current?.contains(o.relatedTarget)&&s(false)},children:He(Nn,{titleId:n,onClose:()=>s()})})]}),document.body)}import{useState as Q,useRef as B,useEffect as te,useLayoutEffect as df,useCallback as $,memo as Qt,isValidElement as hf,cloneElement as gf}from"react";var ut=class{static async save(e,t){this.cache.set(e,t);try{await W.setItem(e,JSON.stringify(t))}catch{}}static async load(e){if(this.cache.has(e))return this.cache.get(e);try{let t=await W.getItem(e);if(t){let a=JSON.parse(t);return this.cache.set(e,a),a}}catch{}return null}static saveMinimized(e,t){return this.save(e,{mode:t.mode,panelHeight:t.panelHeight,dimensions:t.floatingDimensions&&t.floatingPosition?{...t.floatingDimensions,top:t.floatingPosition.y,left:t.floatingPosition.x}:void 0,isVisible:false})}};ut.cache=new Map;import{Fragment as pf,jsx as g,jsxs as N}from"react/jsx-runtime";var L={base:"#121212",card:"#1A1A1A",border:"#333333",textMuted:"#888888",primary:"#20C997"},D={primary:"#F5F5F7",primaryLight:"#F5F5F7",secondary:"#A1A1A6",muted:"#8E8E93",success:"#34C759",info:"#00B8E6"},ff=100,bf=400,fr=500,ke=80,dt=()=>typeof window<"u"?window.innerWidth:0,ue=()=>typeof window<"u"?window.innerHeight:0,br=e=>1-Math.pow(1-e,3),Ue=e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2;function ve(e,t,a,r){let n=0,s=false,o=performance.now(),i=l=>{if(s)return;let d=Math.min((l-o)/e,1);a(t(d)),d<1?n=requestAnimationFrame(i):r?.()};return n=requestAnimationFrame(i),()=>{s=true,cancelAnimationFrame(n)}}function mf(){if(typeof document>"u")return{top:0,left:0,right:0,bottom:0};let e=document.createElement("div");e.style.cssText="position:fixed;top:env(safe-area-inset-top);left:env(safe-area-inset-left);right:env(safe-area-inset-right);bottom:env(safe-area-inset-bottom);visibility:hidden;pointer-events:none",document.body.appendChild(e);let t=e.getBoundingClientRect();return document.body.removeChild(e),{top:Math.max(0,t.top),left:Math.max(0,t.left),right:Math.max(0,window.innerWidth-t.right),bottom:Math.max(0,window.innerHeight-t.bottom)}}function Xt(e,t,a=false){let r=Math.max(ke,window.innerWidth-t.left-t.right),n=Math.max(ke,window.innerHeight-t.top-t.bottom),s=Math.min(e.width,r),o=Math.min(e.height,n);return{width:s,height:o,left:Math.max(t.left,Math.min(e.left,window.innerWidth-t.right-s)),top:Math.max(t.top,Math.min(e.top,window.innerHeight-t.bottom-(a?ke:o)))}}var Zt=({size:e=24,color:t="currentColor",strokeWidth:a=2})=>N("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:[g("line",{x1:18,y1:6,x2:6,y2:18,stroke:t,strokeWidth:a,strokeLinecap:"round"}),g("line",{x1:6,y1:6,x2:18,y2:18,stroke:t,strokeWidth:a,strokeLinecap:"round"})]}),ea=({size:e=24,color:t="currentColor",strokeWidth:a=2})=>g("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:g("line",{x1:5,y1:12,x2:19,y2:12,stroke:t,strokeWidth:a,strokeLinecap:"round"})}),mr=({size:e=24,color:t="currentColor",strokeWidth:a=2})=>N("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:[g("rect",{x:3,y:3,width:18,height:18,rx:2,stroke:t,strokeWidth:a}),g("rect",{x:3,y:14,width:18,height:7,fill:t})]}),yr=({size:e=24,color:t="currentColor",strokeWidth:a=2})=>N("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:[g("rect",{x:3,y:3,width:14,height:14,rx:2,stroke:t,strokeWidth:a}),g("line",{x1:7,y1:17,x2:7,y2:21,stroke:t,strokeWidth:a}),g("line",{x1:7,y1:21,x2:21,y2:21,stroke:t,strokeWidth:a}),g("line",{x1:21,y1:21,x2:21,y2:7,stroke:t,strokeWidth:a}),g("line",{x1:17,y1:7,x2:21,y2:7,stroke:t,strokeWidth:a})]}),ne={close:"#FF5F57",minimize:"#FEBC2E",toggleMode:"#28C840"},ta=24,yf=2,Ie=8,aa=e=>({width:ta,height:ta,borderRadius:ta/2,display:"flex",alignItems:"center",justifyContent:"center",background:`radial-gradient(circle, ${e} 6px, transparent 6px)`,border:"none",padding:0,cursor:"pointer",flexShrink:0});function vf(e){return vl()&&Pa(true)?g(Tf,{...e}):g(Sf,{...e})}function Sf({onClose:e,onMinimize:t,onToggleMode:a,mode:r}){let n=r==="floating"?mr:yr,s=r==="floating"?"Dock to bottom sheet":"Make floating window";return N("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:yf},children:[t&&g("button",{type:"button",onClick:t,style:aa(ne.minimize),"aria-label":"Minimize modal",children:g(ea,{size:Ie,color:"#7A5A00",strokeWidth:1.5})}),a&&g("button",{type:"button",onClick:a,style:aa(ne.toggleMode),"aria-label":s,children:g(n,{size:Ie,color:"#004A1A",strokeWidth:1.5})}),g("button",{type:"button",onClick:e,style:aa(ne.close),"aria-label":"Close modal",children:g(Zt,{size:Ie,color:"#4A0000",strokeWidth:1.5})})]})}var ra=12,Cf=8,ht=36,wf=12,sa=16,gt=8,xf=3e3,na=150,oa=e=>({width:ra,height:ra,borderRadius:ra/2,backgroundColor:e,display:"flex",alignItems:"center",justifyContent:"center"}),ia=(e,t,a,r)=>({width:ht,height:ht,borderRadius:ht/2,display:"flex",alignItems:"center",justifyContent:"center",padding:0,cursor:"pointer",flexShrink:0,backgroundColor:e?a:t,border:e?`1px solid ${r}`:"none"});function Tf({onClose:e,onMinimize:t,onToggleMode:a,mode:r,variant:n="night"}){let s=n==="night",[o,i]=Q(false),[l,d]=Q(false),b=B(null),y=B(null),p=r==="floating"?mr:yr,m=r==="floating"?"Dock to bottom sheet":"Make floating window",S=$(()=>{b.current&&clearTimeout(b.current),y.current&&clearTimeout(y.current),b.current=null,y.current=null},[]),_=$(()=>{S(),d(false),y.current=setTimeout(()=>i(false),na)},[S]),F=$(()=>{S(),i(true),requestAnimationFrame(()=>requestAnimationFrame(()=>d(true))),b.current=setTimeout(_,xf)},[S,_]);te(()=>S,[S]);let V=M=>{_(),M()};return N(pf,{children:[N("button",{type:"button",onClick:F,"aria-label":"Open window controls","data-testid":"tool-window-controls",style:{padding:10,margin:-8,border:"none",background:"transparent",cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",gap:Cf},children:[t&&g("span",{style:oa(ne.minimize),children:g(ea,{size:Ie,color:"#7A5A00",strokeWidth:1.5})}),a&&g("span",{style:oa(ne.toggleMode),children:g(p,{size:Ie,color:"#004A1A",strokeWidth:1.5})}),g("span",{style:oa(ne.close),children:g(Zt,{size:Ie,color:"#4A0000",strokeWidth:1.5})})]}),o&&g("div",{style:{position:"absolute",top:-gt,right:-gt,zIndex:9999,transform:`scale(${l?1:.3})`,opacity:l?1:0,transition:`transform ${na}ms ease-out, opacity ${na}ms ease-out`},children:N("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:wf,padding:gt,borderRadius:(ht+gt*2)/2,backgroundColor:s?c.color.surface:L.card,border:`1px solid ${s?c.color.border:L.border}`,boxShadow:"0 4px 12px rgba(0,0,0,0.4)"},children:[t&&g("button",{type:"button",onClick:()=>V(t),"aria-label":"Minimize modal","data-testid":"tool-window-minimize",style:ia(s,ne.minimize,c.color.warningSoft,c.color.warning+"59"),children:g(ea,{size:sa,color:s?c.color.warning:"#7A5A00",strokeWidth:2})}),a&&g("button",{type:"button",onClick:()=>V(a),"aria-label":m,"data-testid":"tool-window-mode",style:ia(s,ne.toggleMode,c.color.accentSoft,c.color.accentBorderStrong),children:g(p,{size:sa,color:s?c.color.accent:"#004A1A",strokeWidth:2})}),g("button",{type:"button",onClick:()=>V(e),"aria-label":"Close modal","data-testid":"tool-window-close",style:ia(s,ne.close,c.color.dangerSoft,c.color.danger+"59"),children:g(Zt,{size:sa,color:s?c.color.danger:"#4A0000",strokeWidth:2})})]})})]})}var vr=Qt(function({isResizing:e,mode:t,hasCustomContent:a=false,variant:r="default"}){let n=t==="floating",s=r==="night";return N("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",position:"relative",justifyContent:a?"center":void 0,minHeight:a?32:void 0,paddingTop:a?0:8,paddingBottom:a?0:8,backgroundColor:"transparent"},children:[g("div",{style:{width:s?36:e?40:n?50:40,height:s||n?5:3,backgroundColor:s?c.color.placeholder:e?L.primary:n?L.textMuted:L.primary,borderRadius:s?2.5:2,boxShadow:s?"none":`0 0 4px ${L.primary}99`}}),e&&t==="bottomSheet"&&g("div",{style:{position:"absolute",display:"flex",flexDirection:"row",gap:2,marginTop:12},children:[0,1,2].map(o=>g("div",{style:{width:12,height:1,backgroundColor:D.success,opacity:.6}},o))})]})}),kf=Qt(function({onAcknowledge:e}){return g("div",{style:{backgroundColor:`${D.info}15`,borderLeft:`3px solid ${D.info}`,borderRadius:8,margin:"8px 12px 4px",overflow:"hidden",boxShadow:`0 0 8px ${D.info}4D`,flexShrink:0},children:N("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",padding:12,gap:12},children:[N("div",{style:{width:32,height:32,position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:[g("div",{style:{position:"absolute",width:20,height:20,borderRadius:10,border:`2px solid ${D.info}`,opacity:.6,transform:"scale(0.8)",boxSizing:"border-box"}}),g("div",{style:{position:"absolute",width:20,height:20,borderRadius:10,border:`2px solid ${D.info}`,boxSizing:"border-box"}})]}),N("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:2},children:[g("span",{style:{fontSize:13,fontWeight:600,color:D.info,letterSpacing:.3},children:"\u{1F4A1} Pro Tip"}),g("span",{style:{fontSize:12,color:D.primaryLight,lineHeight:"16px"},children:"Double-tap the header to transform this into a floating modal"})]}),g("button",{type:"button",onClick:e,style:{backgroundColor:`${D.info}30`,padding:"6px 12px",borderRadius:6,border:`1px solid ${D.info}50`,fontSize:12,fontWeight:600,color:D.info,cursor:"pointer",fontFamily:"inherit",flexShrink:0},children:"Got it!"})]})})});function Sr({header:e,isResizing:t,mode:a,onMinimize:r,variant:n="default"}){if(e?.customContent){let s=e.customContent;return hf(e.customContent)&&r&&(s=gf(e.customContent,{onMinimize:r})),N("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",minWidth:0},children:[g(vr,{isResizing:t,mode:a,hasCustomContent:true,variant:n}),s]})}return N("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",position:"relative",minWidth:0},children:[g(vr,{isResizing:t,mode:a,variant:n}),N("div",{style:{padding:"0 16px",display:"flex",flexDirection:"column",alignItems:"center"},children:[e?.title&&g("span",{style:{fontSize:16,fontWeight:600,color:D.primary},children:e.title}),e?.subtitle&&g("span",{style:{fontSize:12,color:D.secondary,paddingTop:4},children:e.subtitle})]}),g("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"},children:g("span",{style:{fontSize:10,color:D.muted,fontStyle:"italic"},children:"Double tap: Toggle \u2022 Triple tap: Close"})})]})}var If=({visible:e,onClose:t,children:a,header:r,styles:n={},minHeight:s=ff,maxHeight:o,initialHeight:i=bf,animatedHeight:l,benchMotion:d,initialMode:b="bottomSheet",onModeChange:y,persistenceKey:p,enablePersistence:m=true,initialFloatingPosition:S,footer:_,footerHeight:F=0,onBack:V,onMinimize:M,minimizeRequest:v=0,minimizeTargetPosition:ae,initialModalState:P,zIndex:Ge,disableScrollWrapper:Er=false,background:da=true,variant:Ve="night"})=>{let[q]=Q(mf),[ha,ga]=Q(!m),[R,mt]=Q(b),Ye=B(y);Ye.current=y;let[Ee,de]=Q(false),[yt,Oe]=Q(false),[Or,vt]=Q(i),[re,Ae]=Q(()=>Xt({width:dt(),height:fr,top:S?.y??(ue()-fr)/2,left:S?.x??0},q)),[Ar,qe]=Q(false),[Rr,pa]=Q(false),Lr=Ra(),he=B(i),J=B(re),H=B({x:re.left,y:re.top}),Je=B(null),St=B(null),se=B(null),ge=B([]),Z=$(()=>{ge.current.forEach(u=>u()),ge.current=[]},[]);te(()=>{J.current=re},[re]),te(()=>Z,[Z]);let fa=o||ue()-q.top;te(()=>{if(!m||!p){ga(true);return}let u=true;return(async()=>{let h=await ut.load(p);if(u&&h&&(h.mode&&(mt(h.mode),Ye.current?.(h.mode)),h.panelHeight&&(vt(h.panelHeight),he.current=h.panelHeight),h.dimensions)){let C=Xt(h.dimensions,q,true);Ae(C),H.current={x:C.left,y:C.top}}u&&ga(true)})(),()=>{u=false}},[p,m]),te(()=>{if(!m||!p||!ha)return;let u=setTimeout(()=>{ut.save(p,{mode:R,panelHeight:he.current,dimensions:re,isVisible:e})},500);return()=>clearTimeout(u)},[R,Or,re,e,p,m,ha]),te(()=>{let u=true;return(async()=>{try{let h=me.modal.hintAcknowledged(),C=await W.getItem(h);u&&(qe(C!=="true"),pa(true))}catch{u&&(qe(true),pa(true))}})(),()=>{u=false}},[]);let Pr=$(async()=>{try{let u=me.modal.hintAcknowledged();await W.setItem(u,"true"),qe(false)}catch{qe(false)}},[]),Ct=$(()=>{Oe(false),de(false);let u=R==="bottomSheet"?"floating":"bottomSheet";mt(u),Ye.current?.(u)},[R]);te(()=>{Oe(false),de(false)},[R]);let pe=$(()=>{if(!M)return;let u={mode:R,panelHeight:he.current,floatingPosition:{x:J.current.left,y:J.current.top},floatingDimensions:{width:J.current.width,height:J.current.height}};m&&p&&ut.saveMinimized(p,u);let h=ae?.x??dt()-50,C=ae?.y??ue()-150;if(Z(),R==="bottomSheet"){let k=Je.current;if(!k){M(u);return}let x=ue();ge.current.push(ve(300,Ue,O=>{k.style.opacity=String(1-O),k.style.transform=`translateY(${O*x}px)`},()=>M(u)))}else{let k=se.current;if(!k){M(u);return}let x={...H.current};ge.current.push(ve(300,Ue,O=>{k.style.opacity=String(1-O);let fe=x.x+(h-x.x)*O,be=x.y+(C-x.y)*O;k.style.transform=`translate(${fe}px, ${be}px)`},()=>M(u)))}},[R,M,ae,Z,m,p]),ba=B(v);te(()=>{ba.current!==v&&(ba.current=v,pe())},[v,pe]),te(()=>{if(P&&(P.mode&&(mt(P.mode),Ye.current?.(P.mode)),P.panelHeight&&(vt(P.panelHeight),he.current=P.panelHeight),P.floatingDimensions&&P.floatingPosition)){let u={width:P.floatingDimensions.width,height:P.floatingDimensions.height,top:P.floatingPosition.y,left:P.floatingPosition.x};Ae(u),H.current={x:P.floatingPosition.x,y:P.floatingPosition.y}}},[P]),df(()=>{if(e)if(Z(),R==="bottomSheet"){let u=Je.current;if(!u)return;let h=ue();u.style.transform=`translateY(${h}px)`,u.style.opacity="0",ge.current.push(ve(300,br,C=>{u.style.transform=`translateY(${(1-C)*h}px)`}),ve(200,Ue,C=>{u.style.opacity=String(C)}))}else{let u=se.current;if(!u)return;H.current={x:J.current.left,y:J.current.top},u.style.transform=`translate(${H.current.x}px, ${H.current.y}px)`,u.style.opacity="0",ge.current.push(ve(200,Ue,h=>{u.style.opacity=String(h)}))}},[e,R,Z]);let ma=B(0),Re=B(0),Le=B(null),Ke=$(()=>{let u=Date.now();u-ma.current>500&&(Re.current=0),Re.current++,ma.current=u,Le.current&&clearTimeout(Le.current),Le.current=setTimeout(()=>{Re.current===2?Ct():Re.current>=3&&M&&pe(),Re.current=0},300)},[Ct,M,pe]);te(()=>()=>{Le.current&&clearTimeout(Le.current)},[]);let Qe=B({active:false,resizing:false,startY:0,headerOffsetY:0,samples:[]}),$r=$(u=>{if(R!=="bottomSheet"||u.button!==0||u.target.closest('button, a, input, textarea, select, [role="button"], [role="tab"], [role="switch"], [contenteditable="true"], [tabindex]'))return;let h=Qe.current;h.active=true,h.resizing=false,h.startY=u.clientY;let C=u.currentTarget.getBoundingClientRect();h.headerOffsetY=u.clientY-C.top,h.samples=[{t:performance.now(),y:u.clientY}],u.currentTarget.setPointerCapture(u.pointerId)},[R]),Mr=$(u=>{let h=Qe.current;if(!h.active)return;let C=u.clientY-h.startY;if(!h.resizing&&Math.abs(C)>3&&(h.resizing=true,Z(),de(true)),!h.resizing)return;let k=u.clientY-h.headerOffsetY,x=ue()-k;x=Math.max(s,Math.min(x,fa)),he.current=x,St.current&&(St.current.style.height=`${x}px`);let O=performance.now();for(h.samples.push({t:O,y:u.clientY});h.samples.length>2&&O-h.samples[0].t>100;)h.samples.shift()},[s,fa,Z]),Br=$(u=>{let h=Qe.current;if(!h.active)return;if(h.active=false,!h.resizing){Ke();return}de(false);let C=he.current,k=u.clientY-h.startY,x=h.samples[0],O=h.samples[h.samples.length-1];if((O&&x&&O.t>x.t?(O.y-x.y)/(O.t-x.t):0)>.8&&k>50||k>150&&C<=s){let fe=Je.current;if(Z(),fe){let be=ue();ge.current.push(ve(200,Ue,U=>{fe.style.opacity=String(1-U)}),ve(300,br,U=>{fe.style.transform=`translateY(${U*be}px)`},()=>t()))}else t();return}vt(C)},[s,t,Ke,Z]),Nr=$(()=>{let u=Qe.current;u.active&&(u.active=false,u.resizing=false,de(false))},[]),Xe=B({active:false,dragging:false,startX:0,startY:0,startPos:{x:0,y:0}}),Dr=$(u=>{if(R!=="floating"||Ee||u.button!==0||u.target.closest('button, a, input, textarea, select, [role="button"], [role="tab"], [role="switch"], [contenteditable="true"], [tabindex]'))return;let h=Xe.current;h.active=true,h.dragging=false,h.startX=u.clientX,h.startY=u.clientY,h.startPos={...H.current},u.currentTarget.setPointerCapture(u.pointerId)},[R,Ee]),zr=$(u=>{let h=Xe.current;if(!h.active)return;let C=u.clientX-h.startX,k=u.clientY-h.startY;if(!h.dragging&&Math.abs(C)+Math.abs(k)>5&&(h.dragging=true,Oe(true)),!h.dragging)return;let x=h.startPos.x+C,O=h.startPos.y+k;H.current={x,y:O},se.current&&(se.current.style.transform=`translate(${x}px, ${O}px)`)},[]),Wr=$(()=>{let u=Xe.current;if(!u.active)return;if(u.active=false,!u.dragging){Ke();return}Oe(false);let h=J.current,C=Xt({...h,left:H.current.x,top:H.current.y},q),k=C.left,x=C.top;H.current={x:k,y:x},se.current&&(se.current.style.transform=`translate(${k}px, ${x}px)`),Ae(O=>({...O,left:k,top:x}))},[q,Ke]),jr=$(()=>{let u=Xe.current;u.active&&(u.active=false,u.dragging=false,Oe(false))},[]),wt=B({active:false,corner:"bottomRight",startX:0,startY:0,start:{width:0,height:0,top:0,left:0}}),Fr=$(u=>h=>{if(R!=="floating")return;h.stopPropagation();let C=wt.current;C.active=true,C.corner=u,C.startX=h.clientX,C.startY=h.clientY,C.start={...J.current},de(true),h.currentTarget.setPointerCapture(h.pointerId)},[R]),Hr=$(u=>{let h=wt.current;if(!h.active)return;let C=u.clientX-h.startX,k=u.clientY-h.startY;if(Math.abs(C)<.5&&Math.abs(k)<.5)return;let x=Math.max(0,q.left),O=ue()-Math.max(0,q.bottom),fe=dt()-Math.max(0,q.right),be=dt()*.25,U=h.start,xt=U.left+U.width,Tt=U.top+U.height,Pe=U.left,et=U.top,Ta=xt,kt=Tt;h.corner==="bottomLeft"?(Pe=Math.max(x,Math.min(U.left+C,xt-be)),kt=Math.min(O,Math.max(Tt+k,U.top+ke))):(Ta=Math.min(fe,Math.max(xt+C,U.left+be)),kt=Math.min(O,Math.max(Tt+k,U.top+ke)));let Ur=Math.max(be,Ta-Pe),Gr=Math.max(ke,kt-et),ka={width:Ur,height:Gr,left:Pe,top:et};J.current=ka,H.current={x:Pe,y:et},Ae(ka),se.current&&(se.current.style.transform=`translate(${Pe}px, ${et}px)`)},[q.left,q.right,q.bottom]),ya=$(()=>{let u=wt.current;u.active&&(u.active=false,de(false),Ae(J.current))},[]),Ze=!e,va=Ze?{left:-9999,top:-9999,opacity:0,visibility:"hidden",pointerEvents:"none"}:{},Sa=r?.title||"Dev tool panel",E=Ve==="night",Ca=da&&E?g("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},"aria-hidden":true,children:g(Et,{})}):null,wa=N("div",{style:{flex:1,minHeight:0,position:"relative",display:"flex",flexDirection:"column",backgroundColor:E?"transparent":L.base,borderBottomLeftRadius:16,borderBottomRightRadius:16,overflow:"hidden",...n.content},children:[da&&!E?g(Et,{}):null,Er?g("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",paddingBottom:F},children:a}):g("div",{style:{flex:1,minHeight:0,overflowY:"auto",paddingBottom:F},children:a}),_?g("div",{style:{position:"absolute",left:0,right:0,bottom:0,backgroundColor:L.base,borderBottomLeftRadius:16,borderBottomRightRadius:16},children:_}):null]}),xa=g("div",{style:{position:"absolute",top:4,right:4,zIndex:10},children:g(vf,{onClose:t,onMinimize:M?pe:void 0,onToggleMode:Ct,mode:R,variant:Ve})});if(R==="floating"){let u=yt||Ee;return N("div",{ref:se,role:"dialog","aria-label":Sa,"aria-hidden":Ze||void 0,style:{position:"fixed",pointerEvents:"auto",left:0,top:0,width:re.width,height:re.height,transform:`translate(${H.current.x}px, ${H.current.y}px)`,display:"flex",flexDirection:"column",backgroundColor:E?c.color.bg:L.card,borderRadius:E?c.radius.sheet:6,border:E?`1px solid ${c.color.accent}55`:u?`2px solid ${L.primary}`:`1px solid ${L.border}`,boxShadow:E?`0 0 14px ${c.color.accent}38`:u?`0 0 12px ${L.primary}7A`:`0 0 20px ${L.primary}4D`,...E?{overflow:"hidden"}:null,boxSizing:"border-box",zIndex:Ge??1e3,...n.container,...va},children:[Ca,g("div",{onPointerDown:Dr,onPointerMove:zr,onPointerUp:Wr,onPointerCancel:jr,style:{borderTopLeftRadius:E?c.radius.sheet:6,borderTopRightRadius:E?c.radius.sheet:6,backgroundColor:E?"transparent":L.card,minHeight:56,border:E?"none":`1px solid ${L.border}`,boxSizing:"border-box",display:"flex",flexDirection:"column",justifyContent:"center",flexShrink:0,touchAction:"none",userSelect:"none",cursor:yt?"grabbing":"grab",position:"relative"},children:g(Sr,{header:r,isResizing:yt||Ee,mode:R,onMinimize:M?pe:void 0,variant:Ve})}),xa,wa,["bottomLeft","bottomRight"].map(h=>g("div",{onPointerDown:Fr(h),onPointerMove:Hr,onPointerUp:ya,onPointerCancel:ya,style:{position:"absolute",width:30,height:30,bottom:4,...h==="bottomLeft"?{left:4}:{right:4},zIndex:1e3,touchAction:"none",cursor:h==="bottomLeft"?"nesw-resize":"nwse-resize"},children:g("div",{style:{width:20,height:20,borderRadius:10,boxSizing:"border-box",backgroundColor:u?`${D.success}1A`:"transparent",border:u?`2px solid ${D.success}`:"none",boxShadow:u?`0 0 8px ${D.success}99`:"none"}})},h))]},"floating")}return g("div",{"aria-hidden":Ze||void 0,style:{position:"fixed",inset:0,zIndex:Ge??1e3,pointerEvents:"none",...Ze?{...va,inset:"auto",width:"100vw",height:"100vh"}:null},children:g("div",{ref:Je,style:{position:"absolute",bottom:0,left:0,right:0,pointerEvents:"auto"},children:N("div",{ref:St,role:"dialog","aria-label":Sa,style:{height:he.current,display:"flex",flexDirection:"column",backgroundColor:E?c.color.bg:L.card,borderTopLeftRadius:E?c.radius.sheet:6,borderTopRightRadius:E?c.radius.sheet:6,border:E?`1px solid ${c.color.accent}55`:`1px solid ${L.border}`,boxShadow:E?`0 -4px 10px ${c.color.accent}38`:`0 -4px 12px ${L.primary}33`,...E?{overflow:"hidden"}:null,boxSizing:"border-box",position:"relative",...n.container},children:[Ca,g("div",{onPointerDown:$r,onPointerMove:Mr,onPointerUp:Br,onPointerCancel:Nr,style:{borderTopLeftRadius:E?c.radius.sheet:6,borderTopRightRadius:E?c.radius.sheet:6,backgroundColor:E?"transparent":L.card,minHeight:56,border:E?"none":`1px solid ${L.border}`,boxSizing:"border-box",display:"flex",flexDirection:"column",justifyContent:"center",flexShrink:0,touchAction:"none",userSelect:"none",cursor:"ns-resize",position:"relative"},children:g(Sr,{header:r,isResizing:Ee,mode:R,onMinimize:M?pe:void 0,variant:Ve})}),xa,Rr&&Ar&&!Lr&&g(kf,{onAcknowledge:Pr}),wa]})})},"bottomSheet")},_f=Qt(e=>La()().status!=="admitted"?e.visible?g(pr,{}):null:g(If,{...e}));import{Children as Ef,useEffect as Of,useRef as Af}from"react";import{Fragment as Rf,jsx as j,jsxs as pt}from"react/jsx-runtime";function Lf({children:e,style:t}){return j(z,{style:[f.sectionLabel,t],children:e})}function Pf({children:e,centered:t,tone:a="tertiary",style:r}){let n=Be.flatten(r),s=!!n&&(n.marginHorizontal!=null||n.margin!=null);return j(z,{style:[f.footnote,s?null:f.footnoteInset,a==="secondary"?f.footnoteSecondary:null,a==="warning"?f.footnoteWarning:null,a==="danger"?f.footnoteDanger:null,t?f.footnoteCentered:null,r],children:e})}function $f({children:e,padded:t,glass:a,style:r}){return j(T,{style:[f.card,a?f.cardGlass:null,t?f.cardPadded:null,r],children:e})}function Cr({inset:e=c.rowPadH}){return j(T,{style:[f.separator,{marginLeft:e}]})}function Mf({children:e,inset:t=c.rowPadH}){let a=Ef.toArray(e);return j(Rf,{children:a.map((r,n)=>pt(T,{children:[n>0?j(Cr,{inset:t}):null,r]},r.key??n))})}var wr=56,xr=32,ft=22,Tr=5,Bf=wr-ft-Tr*2;function Nf({value:e,onValueChange:t,disabled:a,testID:r,accessibilityLabel:n}){let s=Af(new At.Value(e?1:0)).current;return Of(()=>{At.timing(s,{toValue:e?1:0,duration:200,useNativeDriver:pg.OS!=="web"}).start()},[e,s]),j(at,{activeOpacity:.8,disabled:a,onPress:()=>t(!e),testID:r,accessibilityLabel:n,accessibilityRole:"switch",accessibilityState:{checked:e,disabled:a},hitSlop:{top:8,bottom:8,left:8,right:8},style:[f.switchTrack,e?f.switchTrackOn:null,a?f.switchDisabled:null],children:j(At.View,{style:[f.switchThumb,e?f.switchThumbOn:null,{transform:[{translateX:s.interpolate({inputRange:[0,1],outputRange:[0,Bf]})}]}]})})}function Df({label:e,selected:t,onPress:a,disabled:r,icon:n,testID:s}){return pt(at,{activeOpacity:.7,disabled:r||!a,onPress:a,testID:s,style:[f.chip,t?f.chipSelected:null,r?f.chipDisabled:null],children:[n,j(z,{style:[f.chipText,t?f.chipTextSelected:null],children:e})]})}function zf({label:e,onPress:t,variant:a="secondary",size:r="lg",icon:n,disabled:s,fullWidth:o=true,testID:i,accessibilityLabel:l}){let d=a==="primary"?c.color.onAccent:a==="tertiary"?c.color.text:a==="destructive"?c.color.danger:c.color.accent;return pt(at,{activeOpacity:.7,disabled:s,onPress:t,testID:i,accessibilityRole:"button",accessibilityLabel:l??e,accessibilityState:{disabled:!!s},style:[f.button,r==="md"?f.buttonMd:f.buttonLg,a==="primary"?f.buttonPrimary:a==="ghost"?f.buttonGhost:f.buttonPlate,o?f.buttonFullWidth:null,s?f.buttonDisabled:null],children:[n,j(z,{style:[r==="md"?f.buttonTextMd:f.buttonTextLg,{color:d}],children:e})]})}function Wf({tabs:e,activeKey:t,onChange:a,size:r="md",glass:n,testIDPrefix:s}){let o=r==="sm";return j(T,{style:[f.segmentTrack,n?f.segmentTrackGlass:null],children:e.map(i=>{let l=i.key===t;return pt(at,{activeOpacity:.7,testID:s?`${s}-${i.key}`:void 0,accessibilityRole:"tab",accessibilityState:{selected:l},accessibilityLabel:i.label,onPress:()=>a(i.key),style:[f.segment,o?f.segmentSm:null,l?n?f.segmentActiveGlass:f.segmentActive:null],children:[j(z,{style:[f.segmentText,o?f.segmentTextSm:null,l?f.segmentTextActive:null],children:i.label}),l?j(T,{style:[f.segmentUnderline,o?f.segmentUnderlineSm:null]}):null]},i.key)})})}function jf({label:e,tone:t="neutral"}){let a=t==="accent"?f.badgeAccent:t==="warning"?f.badgeWarning:t==="danger"?f.badgeDanger:t==="info"?f.badgeInfo:f.badgeNeutral,r=t==="accent"?f.badgeTextAccent:t==="warning"?f.badgeTextWarning:t==="danger"?f.badgeTextDanger:t==="info"?f.badgeTextInfo:f.badgeTextNeutral;return j(T,{style:[f.badge,a],children:j(z,{style:[f.badgeText,r],children:e})})}var f=Be.create({sectionLabel:{color:c.color.textSecondary,fontSize:c.font.label,fontWeight:"600",letterSpacing:$a,textTransform:"uppercase",marginBottom:8,marginLeft:c.labelInset},footnote:{color:c.color.textTertiary,fontSize:c.font.caption,fontWeight:"500",lineHeight:c.font.caption*1.4,marginTop:8},footnoteInset:{marginLeft:c.labelInset},footnoteSecondary:{color:c.color.textSecondary},footnoteWarning:{color:c.color.warning},footnoteDanger:{color:c.color.danger},footnoteCentered:{textAlign:"center",marginLeft:0},card:{backgroundColor:c.color.surface,borderRadius:c.radius.card,borderWidth:1,borderColor:c.color.border,overflow:"hidden"},cardGlass:{backgroundColor:c.color.glass,borderColor:c.color.glassBorder},cardPadded:{padding:c.cardPad,gap:10},separator:{height:Be.hairlineWidth,backgroundColor:c.color.separator},switchTrack:{width:wr,height:xr,borderRadius:xr/2,borderWidth:1,borderColor:c.color.fillTertiary,backgroundColor:c.color.surfaceElevated,paddingHorizontal:Tr,justifyContent:"center",overflow:"hidden"},switchTrackOn:{backgroundColor:c.color.accentFill,borderColor:c.color.accentBorderStrong},switchDisabled:{opacity:.4},switchThumb:{width:ft,height:ft,borderRadius:ft/2,backgroundColor:c.color.knob},switchThumbOn:{backgroundColor:c.color.accent},chip:{flexDirection:"row",alignItems:"center",gap:6,paddingHorizontal:14,paddingVertical:9,borderRadius:c.radius.chip,borderWidth:1.5,backgroundColor:c.color.buttonSurface,borderColor:c.color.fillTertiary},chipSelected:{borderColor:c.color.accentBorderStrong},chipDisabled:{opacity:.4},chipText:{fontSize:c.font.body,fontWeight:"500",color:c.color.textSecondary},chipTextSelected:{color:c.color.accent},button:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:8},buttonMd:{height:34,paddingHorizontal:16,borderRadius:17},buttonLg:{height:50,paddingHorizontal:20,borderRadius:25},buttonPrimary:{backgroundColor:c.color.accent},buttonPlate:{backgroundColor:c.color.button},buttonGhost:{backgroundColor:"transparent"},buttonFullWidth:{alignSelf:"stretch"},buttonDisabled:{opacity:.4},buttonTextMd:{fontSize:15,fontWeight:"600"},buttonTextLg:{fontSize:17,fontWeight:"600"},segmentTrack:{flex:1,flexDirection:"row",backgroundColor:c.color.bg,borderRadius:c.radius.row,borderWidth:1,borderColor:c.color.border,padding:3},segment:{flex:1,paddingVertical:8,alignItems:"center",justifyContent:"center",borderRadius:c.radius.segment},segmentTrackGlass:{backgroundColor:c.color.glass,borderColor:c.color.glassBorder},segmentActive:{backgroundColor:c.color.surfaceElevated},segmentActiveGlass:{backgroundColor:c.color.glassElevated},segmentText:{fontSize:c.font.caption,fontWeight:"500",color:c.color.textSecondary},segmentTextActive:{fontWeight:"600",color:c.color.text},segmentUnderline:{position:"absolute",bottom:2,width:24,height:2.5,borderRadius:1.25,backgroundColor:c.color.accent,shadowColor:c.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.6,shadowRadius:6},segmentSm:{paddingVertical:5},segmentTextSm:{fontSize:12},segmentUnderlineSm:{bottom:1.5,width:20,height:2,borderRadius:1},badge:{paddingHorizontal:8,paddingVertical:4,borderRadius:c.radius.badge,alignSelf:"flex-start"},badgeText:{fontSize:c.font.micro,fontWeight:"600",letterSpacing:.5,textTransform:"uppercase"},badgeAccent:{backgroundColor:c.color.accentSoft},badgeTextAccent:{color:c.color.accent},badgeWarning:{backgroundColor:c.color.warningSoft},badgeTextWarning:{color:c.color.warning},badgeDanger:{backgroundColor:c.color.dangerSoft},badgeTextDanger:{color:c.color.danger},badgeInfo:{backgroundColor:c.color.infoSoft},badgeTextInfo:{color:c.color.info},badgeNeutral:{backgroundColor:c.color.fillSecondary},badgeTextNeutral:{color:c.color.textSecondary}});import{jsx as _e,jsxs as Ff}from"react/jsx-runtime";function la(e){switch(_t(String(e))){case"dev":return{label:"DEV",backgroundColor:w.warning};case"qa":return{label:"QA",backgroundColor:w.optional};case"staging":return{label:"STAGING",backgroundColor:w.success};case"prod":return{label:"PROD",backgroundColor:w.error};case"local":default:return{label:"LOCAL",backgroundColor:w.info}}}function Hf({color:e}){return _e("svg",{width:12,height:12,viewBox:"0 0 24 24","aria-hidden":"true",children:_e("path",{d:"M6 9l6 6 6-6",fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function Uf({environment:e,interactive:t=false,onPress:a}){let r=la(e);return Ff("button",{onClick:t?a:void 0,"aria-label":`Environment: ${r.label}`,style:{display:"flex",flexDirection:"row",alignItems:"center",padding:`6px ${t?4:8}px 6px 8px`,flexShrink:0,background:"none",border:"none",cursor:t?"pointer":"default"},children:[_e("div",{style:{width:8,height:8,borderRadius:4,backgroundColor:r.backgroundColor,marginRight:6,boxShadow:`0 0 4px ${r.backgroundColor}99`}}),_e("span",{style:{fontSize:11,fontWeight:600,color:w.primaryLight,letterSpacing:.5},children:r.label}),t&&_e("span",{style:{marginLeft:2,display:"flex"},children:_e(Hf,{color:"#7A8599"})})]})}import{jsx as Se,jsxs as ca}from"react/jsx-runtime";var Gf=140,Vf=28,kr=44,Yf=8,qf=24;function ua(e){switch(_t(e)){case"local":return{label:"LOCAL",backgroundColor:w.info};case"dev":return{label:"DEV",backgroundColor:w.warning};case"qa":return{label:"QA",backgroundColor:w.optional};case"staging":return{label:"STAGING",backgroundColor:w.success};case"prod":return{label:"PROD",backgroundColor:w.error};default:return{label:"LOCAL",backgroundColor:w.info}}}function Jf({environment:e,isSelected:t,onPress:a}){let r=ua(e);return ca(fg,{onPress:a,style:({pressed:n})=>[oe.optionContainer,t&&oe.optionContainerSelected,n&&oe.optionContainerPressed],children:[ca(T,{style:oe.optionLeft,children:[Se(T,{style:[oe.optionDot,{backgroundColor:r.backgroundColor},{shadowColor:r.backgroundColor,shadowOffset:{width:0,height:0},shadowOpacity:.6,shadowRadius:4,elevation:2}]}),Se(z,{style:oe.optionLabel,children:r.label})]}),t&&Se(Ba,{size:14,color:w.success,strokeWidth:3})]})}function Kf({hasItems:e,currentEnvironment:t,availableEnvironments:a,onSelect:r,width:n=Gf,collapsedContent:s}){let o=Yf+a.length*kr+qf+4,i=ca(T,{style:oe.collapsedEnvBadge,children:[Se(T,{style:[oe.collapsedDot,{backgroundColor:ua(t).backgroundColor}]}),Se(z,{style:oe.collapsedLabel,children:ua(t).label})]});return Se(Ea,{hasItems:e,width:n,expandedHeight:o,peekHeight:Vf,showCount:false,collapsedContent:s||i,collapsedLabel:`Switch environment from ${t}`,children:a.map(l=>Se(Jf,{environment:l,isSelected:l===t,onPress:()=>r(l)},l))})}var oe=Be.create({collapsedEnvBadge:{flexDirection:"row",alignItems:"center",gap:6},collapsedDot:{width:8,height:8,borderRadius:4},collapsedLabel:{fontSize:11,fontWeight:"600",color:w.primaryLight,letterSpacing:.5},optionContainer:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,height:kr,width:"100%"},optionContainerSelected:{backgroundColor:"rgba(128, 128, 128, 0.1)"},optionContainerPressed:{backgroundColor:"rgba(128, 128, 128, 0.2)"},optionLeft:{flexDirection:"row",alignItems:"center",flex:1},optionDot:{width:8,height:8,borderRadius:4,marginRight:10},optionLabel:{fontSize:12,fontWeight:"600",color:w.primaryLight,letterSpacing:.5}});import{useState as Ir}from"react";import{jsx as X,jsxs as bt}from"react/jsx-runtime";var _r=36;function Qf({color:e,flipped:t}){return X("svg",{width:10,height:10,viewBox:"0 0 24 24","aria-hidden":"true",style:{transform:t?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms ease"},children:X("path",{d:"M18 15l-6-6-6 6",fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function Xf(){return X("svg",{width:12,height:12,viewBox:"0 0 24 24","aria-hidden":"true",children:X("path",{d:"M20 6L9 17l-5-5",fill:"none",stroke:"#4AFF9F",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"})})}function Zf({currentEnvironment:e,availableEnvironments:t,onSelect:a}){let[r,n]=Ir(false),[s,o]=Ir(null),i=la(e),l=t.length*_r;return bt("div",{style:{position:"relative",zIndex:1e3,flexShrink:0},children:[X("div",{style:{position:"absolute",bottom:"100%",left:0,right:0,height:r?l:0,opacity:r?1:0,overflow:"hidden",transition:"height 200ms ease, opacity 200ms ease",backgroundColor:"rgba(8,12,21,0.95)",border:"1px solid #00B8E666",borderBottomWidth:0,borderTopLeftRadius:6,borderTopRightRadius:6,boxShadow:"0 -4px 8px rgba(0,0,0,0.3)"},children:t.map(d=>{let b=la(d),y=String(d).toLowerCase()===String(e).toLowerCase();return bt("button",{onClick:()=>{n(false),a(d)},onPointerEnter:p=>p.pointerType==="mouse"&&o(String(d)),onPointerLeave:()=>o(null),style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",height:_r,padding:"0 10px",background:y?"rgba(128,128,128,0.1)":s===String(d)?"rgba(128,128,128,0.2)":"none",border:"none",cursor:"pointer"},children:[bt("span",{style:{display:"flex",alignItems:"center"},children:[X("span",{style:{width:6,height:6,borderRadius:3,backgroundColor:b.backgroundColor,marginRight:8}}),X("span",{style:{fontSize:10,fontWeight:600,color:w.primaryLight,letterSpacing:.5},children:b.label})]}),y&&X(Xf,{})]},String(d))})}),bt("button",{onClick:()=>n(d=>!d),"aria-expanded":r,"aria-label":`Environment: ${i.label}. Click to switch.`,style:{display:"flex",alignItems:"center",gap:6,padding:"6px 6px 6px 8px",borderRadius:6,borderTopLeftRadius:r?0:6,borderTopRightRadius:r?0:6,backgroundColor:r?"rgba(8,12,21,0.95)":"transparent",border:"none",cursor:"pointer"},children:[X("span",{style:{width:8,height:8,borderRadius:4,backgroundColor:i.backgroundColor,boxShadow:`0 0 4px ${i.backgroundColor}99`}}),X("span",{style:{fontSize:11,fontWeight:600,color:w.primaryLight,letterSpacing:.5},children:i.label}),X(Qf,{color:"#7A8599",flipped:r})]})]})}export{Tl as ARROW_BOTTOM_OFFSET,kl as ARROW_HEIGHT,Sc as ASSETS_ICON_COLOR,pr as AccountSetup,Aa as AccountSetupButton,io as ActionCopyButton,Jc as Activity,gu as ActivityIcon,Wo as AddFilterButton,Bo as AddFilterInput,Zc as AlertCircle,Sd as AlertCircleIcon,nu as AlertOctagon,ru as AlertTriangle,mu as AlertTriangleIcon,rd as AskBuoyIcon,bc as AssetsIcon,Gi as BACKGROUND_PRESETS,ll as BACKGROUND_STORAGE_KEY,Ld as BENCHMARK_ICON_COLOR,og as BUOY_SYNTHETIC_MARK,Mo as BackButton,wl as BackgroundSwitcher,Xo as Badge,Dc as BarChart3,jc as BarChart3Icon,yg as BaseEventStore,_d as BenchmarkIcon,Dh as BenchmarkLegacyIcon,iu as Bookmark,du as Box,Cu as BoxIcon,Kp as BubbleSettingsDetail,Jp as BubbleSettingsSection,fu as Bug,td as BugIcon,Sl as BuoyNeedsPlanCard,ml as BuoySignInCard,an as BuoyUpgradeSheet,yn as CELLS,Sn as CLIP_OFFSCREEN_CELLS,Xd as CLOCK_TOOL_ICON_COLOR,Xh as CONSOLE_ICON_COLOR,or as COPY_PAYLOAD_MAX_BYTES,Hu as CameraIcon,Bg as ChangeLog,co as ChangeRow,Ba as Check,vu as CheckCircle,kc as CheckCircle2,kd as CheckCircle2Icon,Eu as CheckCircleIcon,Tu as CheckIcon,Qc as CheckSquare,vc as CheckSquareIcon,Iu as ChevronDown,Lu as ChevronDownIcon,Au as ChevronLeft,Bu as ChevronLeftIcon,$u as ChevronRight,Wu as ChevronRightIcon,Du as ChevronUp,Uu as ChevronUpIcon,Do as ChipStrip,ni as ClipboardHintBanner,Fu as Clock,ec as ClockIcon,Yd as ClockToolIcon,Uc as Cloud,qc as CloudIcon,Zi as CollapsibleSection,qo as CompactFilterChips,xl as CompactRow,$n as CompareBar,Jh as ConsoleIcon,Vu as Copy,Xn as CopyButton,Ju as CopyIcon,oi as CountBadge,Oa as CyberpunkSectionButton,qi as DEFAULT_BACKGROUND,Pi as DEVTOOLS_CARD_CONSTANTS,rl as DataInspector,Ma as Database,od as DatabaseIcon,un as DaylightTunable,xi as DeepFieldTunable,Ui as DetailView,Gn as DetailViewToggle,Ni as DevToolsCard,Rn as DiffModeTabs,Qu as DockBottom,ad as Download,Gd as DownloadIcon,Yi as DraggableHeader,dl as DynamicFilterView,Vh as ENV_ICON_COLOR,Tn as EVENT_LIST_PRESET,id as Edit3,ed as Edit3Icon,pi as EmptyState,Ro as EntityFilterView,Hh as EnvIcon,Ed as EnvLaptopIcon,Uf as EnvironmentIndicator,Kf as EnvironmentSelector,Zf as EnvironmentSelectorInline,Bn as EventHistoryViewer,ki as EventListItem,zn as EventPickerModal,cn as EventStepperFooter,Su as EventsIcon,Ea as ExpandablePopover,vn as ExpandedInfoRow,Vo as ExportPreview,bd as Eye,nd as EyeIcon,Na as EyeOff,ud as EyeOffIcon,mn as FeatureGate,uc as FileCode,pd as FileCodeIcon,Cd as FileJson,oh as FileJsonIcon,Id as FileText,vd as FileTextIcon,Rd as Film,Xc as FilmIcon,Bd as Filter,Zs as FilterBadge,Td as FilterIcon,Uo as FilterList,Lo as FilterSection,jd as FlaskConical,Od as FlaskConicalIcon,Vd as FloatWindow,Pl as FloatingTool,Al as FloatingToolDivider,zl as FloatingToolHost,Rl as FloatingToolUserStatus,Eo as FooterButton,wo as FooterCaption,ko as FooterMessage,vo as FooterRow,Wn as FreeAccountPrompt,Xl as GAME_UI_ALERT_STATES,Yl as GameUICollapsibleSection,Kl as GameUICompactStats,Ql as GameUIIssuesList,Jl as GameUIStatusHeader,Qd as GitBranch,$d as GitBranchIcon,ah as Globe,dd as GlobeIcon,Ki as GripVerticalIcon,Ec as Hand,bh as HandIcon,pc as HardDrive,zd as HardDriveIcon,ih as Hash,Ud as HashIcon,Wi as HeaderSearchButton,cu as HelpCircle,Yu as HighlightIcon,Oh as HighlightUpdatesIcon,ld as HighlighterIcon,ci as HintsProvider,Xr as HistoryEntryRow,Zr as HistoryList,Vr as HistoryProvider,hh as Home,_c as HomeIcon,hc as IMAGES_ICON_COLOR,Lc as IMAGE_OVERLAY_ICON_COLOR,Ic as IMPERSONATE_ICON_COLOR,xd as IconBackground,Zu as IconCircle,qu as IconContainer,cd as IconLine,sd as IconRect,mh as Image,au as ImageIcon,Oc as ImageOverlayIcon,lc as ImagesIcon,xc as ImpersonateIcon,wh as Info,Jd as InfoIcon,Fn as InfoRow,to as InlineCopyButton,Gc as JOTAI_ICON_COLOR,Fc as JotaiIcon,_f as JsModal,_h as Key,eh as KeyIcon,yh as LIFECYCLE_TOOL_ICON_COLOR,Eh as LOCATION_TOOL_ICON_COLOR,Ln as LOGIN_COMMAND,En as LOG_LIST_PRESET,Pd as LaptopIcon,Lh as Layers,nh as LayersIcon,gh as LifecycleToolIcon,vi as LinearFade,Nh as Link,dh as LinkIcon,Oo as ListItem,Fi as LiveSkyTunable,xh as LocationToolIcon,jh as Lock,Kd as LockIcon,Yt as LogLevel,Yt as LogLevelEnum,qt as LogType,qt as LogTypeEnum,Dn as MAX_PERIOD,yc as Maximize2,uh as Maximize2Icon,gi as MethodBadge,Uh as Minus,fh as MinusIcon,So as ModalHeader,xo as ModalHintBanner,nn as MoonlightTunable,Yh as Music,ou as MusicIcon,Wh as NETWORK_ICON_COLOR,$a as NIGHT_LABEL_TRACKING,Fd as NOTIFICATIONS_ICON_COLOR,Kh as Navigation,ph as NavigationIcon,yd as NetworkGlobeIcon,Bh as NetworkIcon,jf as NightBadge,zf as NightButton,$f as NightCard,Df as NightChip,Pf as NightFootnote,Mf as NightRows,Lf as NightSectionLabel,Wf as NightSegmented,Cr as NightSeparator,Nf as NightSwitch,yi as NoDataEmptyState,wi as NoResultsEmptyState,Ii as NoSearchResultsEmptyState,Nd as NotificationsIcon,al as OTTO_ANCHORS,ol as OTTO_ANCHOR_SIZE,Hi as OTTO_GRID,yl as OTTO_GROUPS,ul as OTTO_NOTES,Vi as OTTO_PALETTE,rn as OTTO_REEL,Jo as OTTO_SCENES,Zo as OTTO_SCENE_BY_ID,ri as OTTO_SCENE_CROP_H,Po as OTTO_SCENE_H,en as OTTO_SCENE_OTTO,_o as OTTO_SCENE_PALETTE,Ao as OTTO_SCENE_W,Xi as OTTO_STATES,pl as OTTO_STATE_NAMES,Cl as OTTO_USES,To as Otto,yo as OttoMotionView,lo as OttoPixels,ii as OttoSceneFrame,di as OttoSceneStill,ho as OttoStill,lh as PERMISSIONS_ICON_COLOR,lt as PERSONAL_SETTING_KEYS,sr as PREVIEW_ITEM_RENDER_BYTE_LIMIT,Zh as Palette,Sh as PaletteIcon,ag as Pause,kh as PauseIcon,rh as PermissionsIcon,uu as Phone,pu as PhoneIcon,go as Pill,xn as PillBadge,oc as Pin,nc as Play,Ah as PlayIcon,cc as Plus,Mh as PlusIcon,gc as Power,Md as PowerIcon,bn as PowerToggleButton,gd as PrimitiveGlobeIcon,on as ProBadge,kn as ProFeatureBanner,dn as ProUpgradeModal,Si as QrCodeView,hd as QueryIcon,gs as REMOTE_RELOAD_DELAY_MS,fi as RadialGlow,hi as RasterLayer,Dd as ReactQueryIcon,ac as ReduxIcon,mc as RefreshCw,zh as RefreshCwIcon,oo as RelativeTime,$h as RenderCountIcon,Th as RenderPulseIcon,Rc as Route,Mu as RouteDotIcon,ch as RouteIcon,sh as RouteMapIcon,Ru as RoutePathIcon,_u as RoutePinIcon,zu as RouteTwoPinsIcon,xu as RoutesIcon,Il as SPACING_GAP,md as ScenariosIcon,Cc as Search,il as SearchBar,Fh as SearchIcon,Io as SectionHeader,Hd as SentryBugIcon,bu as SentryIcon,lr as SentryLogger,Tc as Server,Ad as ServerIcon,Ot as Settings,Gh as SettingsIcon,Ac as SettingsSolid,tr as SettingsSync,Pc as Shield,qh as ShieldIcon,yu as Smartphone,wu as SmartphoneIcon,Yc as Square,tu as SquareDashed,wc as SquareDashedIcon,fc as SquareIcon,vh as StackPulseIcon,es as StandaloneHistoryList,Oi as StatsCard,ai as StatusBadge,Di as StatusIndicator,Xu as StorageIcon,qd as StorageStackIcon,Ho as StorageTypeBadge,Ia as Subscribable,Qa as TEAM_SETTING_KEYS,Hn as TIER_LIMITS,sc as TIME_MACHINE_ICON_COLOR,Mn as TRANSPARENT,mi as TabSelector,$c as TestTube2,Qh as TestTube2Icon,Qn as TickProvider,ji as TimeDisplay,tg as TimeMachineIcon,ku as Timer,Ou as TimerIcon,$o as ToggleRow,Et as ToolBackground,Ci as ToolButton,Ai as ToolEmptyState,bo as ToolFooter,rr as ToolScreenHeaderContext,uo as ToolbarClearButton,so as ToolbarCopyButton,Pu as Touchpad,Nu as TouchpadIcon,Wc as Trash,Nc as Trash2,eg as Trash2Icon,Ch as TrashIcon,Mc as TriangleAlert,Ih as TriangleAlertIcon,ui as TypeBadge,Hc as Unlock,th as UnlockIcon,On as UpgradeModal,pn as UpgradePrompt,Vc as Upload,Wd as UploadIcon,Kc as User,Rh as UserIcon,ju as Users,Gu as UsersIcon,zo as ValueTypeBadge,_n as ViewToggleCards,tc as Volume,Ku as VolumeIcon,An as WATER_CELLS,Pn as WATER_FRAMES,wn as WATER_ROW0,In as WATER_ROWS,it as WIRE_DETAIL_LIMIT_BYTES,Va as WIRE_INLINE_LIMIT_BYTES,eu as Wifi,wd as WifiBifIcon,Zd as WifiCircuitIcon,fd as WifiIcon,sn as WindowControls,_i as Wormhole,lu as X,su as XCircle,ic as XCircleIcon,rc as XIcon,zc as ZUSTAND_ICON_COLOR,hu as Zap,dc as ZapIcon,Bc as ZustandIcon,ql as absoluteFill,ir as add,ot as approxJsonSize,Ce as assertAccountAccess,hl as backgroundStore,ys as browserRouter,G as buoyColors,Ol as calculateTargetPosition,El as calculateTooltipPosition,af as callCapacitorNative,Sp as canOpenBuoyTools,qa as capDetail,Lp as classifyPreviewItem,Vp as clearEntries,ti as copyToClipboard,ig as countBuoyListener,Yo as createAutoDetectedClipboard,Ep as createRestoreScope,tp as createSyncAdapter,up as createToolFactory,Mg as createToolStore,Kn as cycleIndexes,Xp as definePersistedSetting,cp as defineToolPreset,ep as detailByIdAction,me as devToolsStorageKeys,sg as dialColors,Nl as dismissFloatingTool,bp as dispatchToolAction,Gl as displayValue,Op as emptyRestoreResult,Mp as entityColor,$t as expandKeyedArrays,Pa as expandableWindowControlsSupported,Ap as failedRestore,Ga as findKeyPath,Un as flatColors,Fs as flattenObject,nr as formatBytes,Dp as formatDuration,Fp as formatHttpStatus,zp as formatNumber,Hs as formatPath,qn as formatRelativeTime,zs as formatValue,Bp as formatValuePreview,w as gameUIColors,ie as getAccountAccess,Qo as getAutoDetectedClipboard,Ll as getBubbleAnchorPosition,Qp as getBubbleVisibilitySettings,Gs as getCachedOptionalModule,tf as getCapacitorAppStorage,$s as getConstructorName,fs as getDevServerOrigin,is as getDeviceInfo,Gp as getEntries,$l as getFloatingTools,Hp as getMethodColor,sl as getPreset,lg as getRealAppState,Es as getRegisteredToolModule,Ys as getRenderCaptureProvider,ng as getSafeAreaInsets,Ts as getSafeCurrentPathname,ks as getSafeCurrentRoute,xs as getSafeRouter,_l as getScreenCenterY,Ri as getSkyScrub,Ks as getStateSnapshotProvider,Js as getStateSnapshotProviders,gg as getStorageBackendType,xe as getToolAdapters,wp as getToolAttention,cs as getToolModuleVersion,Ws as getTypeColor,La as getUseAccountAccess,Ti as getUseIsPro,Ei as getUseLicense,Li as getUseTier,Bs as getValueSize,Rs as getValueType,jn as gridKey,ar as guardToolAdapter,Y as hasAccountAccess,rf as hasCapacitorPlugin,Pt as identityField,K as ignoredPatternsStore,sf as isCapacitorNative,ug as isDevToolsStorageKey,Ms as isEmpty,Is as isExpoRouterAvailable,_a as isJsonSerializable,Jg as isOnDeviceMarker,Nt as isOverWireBudget,Ns as isPlainObjectUtil,Ls as isPrimitive,Bi as isProNow,Ft as isToolRegistryReady,xg as isUrlIgnored,hg as isUsingPersistentStorage,Ps as isValidJson,we as listShapes,pp as listSnapshotToolIds,gp as listToolActions,hp as listToolIds,Us as loadOptionalModule,ls as logDeviceInfo,tt as macOSColors,Qg as memoByIdentity,Ka as mergeChangeSources,Ph as monoFont,no as motionUnits,Xg as newestFitting,c as night,mo as noWindowDragProps,_t as normalizeEnvironment,$e as notifySubscriberCountChange,qg as onDeviceMarker,rp as onSettingsApplied,vp as openBuoyTool,Bl as openFloatingTool,Yn as ottoCycle,ln as ottoReel,fn as ottoRuns,Go as ottoSceneBounds,jo as ottoSceneRuns,ao as ottoSheets,Ji as ottoWaterRows,Vl as parseDisplayValue,Mt as parsePath,Up as parseUrl,Ds as parseValue,Ug as patchFromPath,W as persistentStorage,el as presetAt,Qi as presetIndex,Ja as readParams,Hg as readPath,fp as readToolSnapshot,It as realNow,Zn as rectsOf,rg as refreshGameUIColors,Yg as refusalText,bs as registerBrowserRouter,Dl as registerPersistentFloatingTool,qs as registerStateSnapshotProvider,dp as registerToolAdapters,_s as registerToolModules,yp as registerToolOpener,hs as reloadApp,hn as renderOttoFrame,No as renderOttoScene,as as resetPersistedStateCache,Vn as resolveEffectiveTier,$i as resolveListEmptyState,ds as resolveReloadStrategy,tl as retryAccountAccess,Fl as safeStringify,Ko as scatter,ps as scheduleReloadApp,qp as sentryLogger,fl as setExpandableWindowControls,Vs as setRenderCaptureProvider,Mi as setSkyScrub,Cp as setToolAttention,Np as shallowDiffSummary,We as shapeKind,De as shapeOf,jg as shapeSummary,zg as shapesWereTruncated,nl as signOutOfBuoy,Zg as sizeOrStub,Fo as sizeWarningLevel,Rp as skippedRestore,ip as startSettingsSync,Me as subscribeAccountAccess,ms as subscribeBrowserNavigation,Ml as subscribeFloatingTools,cg as subscribeRealAppState,us as subscribeToStateSnapshotProviders,As as subscribeToSubscriberCountChanges,xp as subscribeToolAttention,Os as subscriberCountNotifier,Gg as suggestedPatch,Ul as superJsonDeserialize,Hl as superJsonSerialize,lp as syncSettingsNow,st as teamSettingsStore,Kg as toWire,gn as toolTheme,jp as truncateMiddle,Wp as truncatePayload,js as truncateText,Ya as truncatedNote,Bt as typedEditViolations,$p as unionKeys,Wg as unshapedLists,Da as urlMatchesIgnoredPattern,Kr as useAllHistoryEntries,rs as useChangeLog,tn as useChipTap,os as useDeviceInfo,ns as useEventStoreEvents,Cn as useFeatureGate,Wl as useFilterManager,Zl as useGameUIAlertState,bi as useHintsContext,Ra as useHintsDisabled,Jr as useHistoryAdapter,qr as useHistoryAdapters,Yr as useHistoryContext,Qr as useHistoryEntryCounts,Ag as useIgnoredPatterns,Jn as useLimit,si as useLoop,Co as useOttoAnchorMotion,fo as useOttoReel,ts as usePersistedState,li as usePulse,ro as useRelativeTime,jl as useSafeAreaInsets,ws as useSafeGlobalSearchParams,Ss as useSafePathname,vs as useSafeRouter,Cs as useSafeSegments,gl as useSignInState,zi as useSkyScrub,ss as useSubscribedValue,Pg as useTeamList,eo as useTick,bl as useToolBackground,_p as useToolScreenHeader,mp as waitForToolRegistry,po as windowDragProps,ei as withBgAlpha,Pp as wontApply};
|
|
14
|
+
`}),Oe("div",{"data-account-launcher":"",children:Oe(es,{expanded:e,onPress:()=>t(i=>!i)})}),e&&Oe("section",{ref:s,className:"buoy-account-panel",role:"dialog","aria-labelledby":r,tabIndex:-1,onBlur:i=>{i.relatedTarget instanceof Node&&!a.current?.contains(i.relatedTarget)&&o(false)},children:Oe(Di,{titleId:r,onClose:()=>o()})})]})})}n(Sa,"AccountSetup");import{useState as Q,useRef as N,useEffect as ae,useLayoutEffect as Kf,useCallback as B,memo as va,isValidElement as Jf,cloneElement as Xf}from"react";var Ca=class Xb{static async save(t,a){this.cache.set(t,a);try{await j.setItem(t,JSON.stringify(a))}catch{}}static async load(t){if(this.cache.has(t))return this.cache.get(t);try{let a=await j.getItem(t);if(a){let s=JSON.parse(a);return this.cache.set(t,s),s}}catch{}return null}static saveMinimized(t,a){return this.save(t,{mode:a.mode,panelHeight:a.panelHeight,dimensions:a.floatingDimensions&&a.floatingPosition?{...a.floatingDimensions,top:a.floatingPosition.y,left:a.floatingPosition.x}:void 0,isVisible:false})}};n(Ca,"ModalStorage"),Ca.cache=new Map;var Ta=Ca;import{Fragment as Qf,jsx as p,jsxs as D}from"react/jsx-runtime";var L={base:"#121212",card:"#1A1A1A",border:"#333333",textMuted:"#888888",primary:"#20C997"},z={primary:"#F5F5F7",primaryLight:"#F5F5F7",secondary:"#A1A1A6",muted:"#8E8E93",success:"#34C759",info:"#00B8E6"},Zf=100,eb=400,Xr=500,Ee=80,Tt=n(()=>typeof window<"u"?window.innerWidth:0,"screenW"),de=n(()=>typeof window<"u"?window.innerHeight:0,"screenH"),Qr=n(e=>1-Math.pow(1-e,3),"easeOutCubic"),Ve=n(e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,"easeInOut");function he(e,t,a,s){let r=0,o=false,i=performance.now(),l=n(c=>{if(o)return;let u=Math.min((c-i)/e,1);a(t(u)),u<1?r=requestAnimationFrame(l):s?.()},"tick");return r=requestAnimationFrame(l),()=>{o=true,cancelAnimationFrame(r)}}n(he,"runAnim");function Zr(){if(typeof document>"u")return{top:0,left:0,right:0,bottom:0};let e=document.createElement("div");e.style.cssText="position:fixed;top:env(safe-area-inset-top);left:env(safe-area-inset-left);right:env(safe-area-inset-right);bottom:env(safe-area-inset-bottom);visibility:hidden;pointer-events:none",document.body.appendChild(e);let t=e.getBoundingClientRect();return document.body.removeChild(e),{top:Math.max(0,t.top),left:Math.max(0,t.left),right:Math.max(0,window.innerWidth-t.right),bottom:Math.max(0,window.innerHeight-t.bottom)}}n(Zr,"readSafeAreaInsets");function wt(e,t,a=false){let s=Math.max(Ee,window.innerWidth-t.left-t.right),r=Math.max(Ee,window.innerHeight-t.top-t.bottom),o=Math.min(e.width,s),i=Math.min(e.height,r);return{width:o,height:i,left:Math.max(t.left,Math.min(e.left,window.innerWidth-t.right-o)),top:Math.max(t.top,Math.min(e.top,window.innerHeight-t.bottom-(a?Ee:i)))}}n(wt,"clampRectToSafeArea");var wa=n(({size:e=24,color:t="currentColor",strokeWidth:a=2})=>D("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:[p("line",{x1:18,y1:6,x2:6,y2:18,stroke:t,strokeWidth:a,strokeLinecap:"round"}),p("line",{x1:6,y1:6,x2:18,y2:18,stroke:t,strokeWidth:a,strokeLinecap:"round"})]}),"XIcon"),xa=n(({size:e=24,color:t="currentColor",strokeWidth:a=2})=>p("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:p("line",{x1:5,y1:12,x2:19,y2:12,stroke:t,strokeWidth:a,strokeLinecap:"round"})}),"MinusIcon"),eo=n(({size:e=24,color:t="currentColor",strokeWidth:a=2})=>D("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:[p("rect",{x:3,y:3,width:18,height:18,rx:2,stroke:t,strokeWidth:a}),p("rect",{x:3,y:14,width:18,height:7,fill:t})]}),"DockBottomIcon"),to=n(({size:e=24,color:t="currentColor",strokeWidth:a=2})=>D("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:[p("rect",{x:3,y:3,width:14,height:14,rx:2,stroke:t,strokeWidth:a}),p("line",{x1:7,y1:17,x2:7,y2:21,stroke:t,strokeWidth:a}),p("line",{x1:7,y1:21,x2:21,y2:21,stroke:t,strokeWidth:a}),p("line",{x1:21,y1:21,x2:21,y2:7,stroke:t,strokeWidth:a}),p("line",{x1:17,y1:7,x2:21,y2:7,stroke:t,strokeWidth:a})]}),"FloatWindowIcon"),ne={close:"#FF5F57",minimize:"#FEBC2E",toggleMode:"#28C840"},ka=24,tb=2,Pe=8,Ia=n(e=>({width:ka,height:ka,borderRadius:ka/2,display:"flex",alignItems:"center",justifyContent:"center",background:`radial-gradient(circle, ${e} 6px, transparent 6px)`,border:"none",padding:0,cursor:"pointer",flexShrink:0}),"wcDotStyle");function ao(e){return Su()&&ss(true)?p(ro,{...e}):p(so,{...e})}n(ao,"WindowControls");function so({onClose:e,onMinimize:t,onToggleMode:a,mode:s}){let r=s==="floating"?eo:to,o=s==="floating"?"Dock to bottom sheet":"Make floating window";return D("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:tb},children:[t&&p("button",{type:"button",onClick:t,style:Ia(ne.minimize),"aria-label":"Minimize modal",children:p(xa,{size:Pe,color:"#7A5A00",strokeWidth:1.5})}),a&&p("button",{type:"button",onClick:a,style:Ia(ne.toggleMode),"aria-label":o,children:p(r,{size:Pe,color:"#004A1A",strokeWidth:1.5})}),p("button",{type:"button",onClick:e,style:Ia(ne.close),"aria-label":"Close modal",children:p(wa,{size:Pe,color:"#4A0000",strokeWidth:1.5})})]})}n(so,"PlainWindowControls");var _a=12,ab=8,xt=36,sb=12,Aa=16,kt=8,rb=3e3,Oa=150,Ea=n(e=>({width:_a,height:_a,borderRadius:_a/2,backgroundColor:e,display:"flex",alignItems:"center",justifyContent:"center"}),"wcCollapsedDot"),Pa=n((e,t,a,s)=>({width:xt,height:xt,borderRadius:xt/2,display:"flex",alignItems:"center",justifyContent:"center",padding:0,cursor:"pointer",flexShrink:0,backgroundColor:e?a:t,border:e?`1px solid ${s}`:"none"}),"wcExpandedButton");function ro({onClose:e,onMinimize:t,onToggleMode:a,mode:s,variant:r="night"}){let o=r==="night",[i,l]=Q(false),[c,u]=Q(false),y=N(null),S=N(null),f=s==="floating"?eo:to,m=s==="floating"?"Dock to bottom sheet":"Make floating window",C=B(()=>{y.current&&clearTimeout(y.current),S.current&&clearTimeout(S.current),y.current=null,S.current=null},[]),A=B(()=>{C(),u(false),S.current=setTimeout(()=>l(false),Oa)},[C]),W=B(()=>{C(),l(true),requestAnimationFrame(()=>requestAnimationFrame(()=>u(true))),y.current=setTimeout(A,rb)},[C,A]);ae(()=>C,[C]);let V=n(M=>{A(),M()},"handleAction");return D(Qf,{children:[D("button",{type:"button",onClick:W,"aria-label":"Open window controls","data-testid":"tool-window-controls",style:{padding:10,margin:-8,border:"none",background:"transparent",cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",gap:ab},children:[t&&p("span",{style:Ea(ne.minimize),children:p(xa,{size:Pe,color:"#7A5A00",strokeWidth:1.5})}),a&&p("span",{style:Ea(ne.toggleMode),children:p(f,{size:Pe,color:"#004A1A",strokeWidth:1.5})}),p("span",{style:Ea(ne.close),children:p(wa,{size:Pe,color:"#4A0000",strokeWidth:1.5})})]}),i&&p("div",{style:{position:"absolute",top:-kt,right:-kt,zIndex:9999,transform:`scale(${c?1:.3})`,opacity:c?1:0,transition:`transform ${Oa}ms ease-out, opacity ${Oa}ms ease-out`},children:D("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:sb,padding:kt,borderRadius:(xt+kt*2)/2,backgroundColor:o?d.color.surface:L.card,border:`1px solid ${o?d.color.border:L.border}`,boxShadow:"0 4px 12px rgba(0,0,0,0.4)"},children:[t&&p("button",{type:"button",onClick:()=>V(t),"aria-label":"Minimize modal","data-testid":"tool-window-minimize",style:Pa(o,ne.minimize,d.color.warningSoft,d.color.warning+"59"),children:p(xa,{size:Aa,color:o?d.color.warning:"#7A5A00",strokeWidth:2})}),a&&p("button",{type:"button",onClick:()=>V(a),"aria-label":m,"data-testid":"tool-window-mode",style:Pa(o,ne.toggleMode,d.color.accentSoft,d.color.accentBorderStrong),children:p(f,{size:Aa,color:o?d.color.accent:"#004A1A",strokeWidth:2})}),p("button",{type:"button",onClick:()=>V(e),"aria-label":"Close modal","data-testid":"tool-window-close",style:Pa(o,ne.close,d.color.dangerSoft,d.color.danger+"59"),children:p(wa,{size:Aa,color:o?d.color.danger:"#4A0000",strokeWidth:2})})]})})]})}n(ro,"ExpandableWindowControls");var oo=va(n(function({isResizing:e,mode:t,hasCustomContent:a=false,variant:s="default"}){let r=t==="floating",o=s==="night";return D("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",position:"relative",justifyContent:a?"center":void 0,minHeight:a?32:void 0,paddingTop:a?0:8,paddingBottom:a?0:8,backgroundColor:"transparent"},children:[p("div",{style:{width:o?36:e?40:r?50:40,height:o||r?5:3,backgroundColor:o?d.color.placeholder:e?L.primary:r?L.textMuted:L.primary,borderRadius:o?2.5:2,boxShadow:o?"none":`0 0 4px ${L.primary}99`}}),e&&t==="bottomSheet"&&p("div",{style:{position:"absolute",display:"flex",flexDirection:"row",gap:2,marginTop:12},children:[0,1,2].map(i=>p("div",{style:{width:12,height:1,backgroundColor:z.success,opacity:.6}},i))})]})},"DragIndicator")),ob=va(n(function({onAcknowledge:e}){return p("div",{style:{backgroundColor:`${z.info}15`,borderLeft:`3px solid ${z.info}`,borderRadius:8,margin:"8px 12px 4px",overflow:"hidden",boxShadow:`0 0 8px ${z.info}4D`,flexShrink:0},children:D("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",padding:12,gap:12},children:[D("div",{style:{width:32,height:32,position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:[p("div",{style:{position:"absolute",width:20,height:20,borderRadius:10,border:`2px solid ${z.info}`,opacity:.6,transform:"scale(0.8)",boxSizing:"border-box"}}),p("div",{style:{position:"absolute",width:20,height:20,borderRadius:10,border:`2px solid ${z.info}`,boxSizing:"border-box"}})]}),D("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:2},children:[p("span",{style:{fontSize:13,fontWeight:600,color:z.info,letterSpacing:.3},children:"\u{1F4A1} Pro Tip"}),p("span",{style:{fontSize:12,color:z.primaryLight,lineHeight:"16px"},children:"Double-tap the header to transform this into a floating modal"})]}),p("button",{type:"button",onClick:e,style:{backgroundColor:`${z.info}30`,padding:"6px 12px",borderRadius:6,border:`1px solid ${z.info}50`,fontSize:12,fontWeight:600,color:z.info,cursor:"pointer",fontFamily:"inherit",flexShrink:0},children:"Got it!"})]})})},"ModalHintBanner"));function Ra({header:e,isResizing:t,mode:a,onMinimize:s,variant:r="default"}){if(e?.customContent){let o=e.customContent;return Jf(e.customContent)&&s&&(o=Xf(e.customContent,{onMinimize:s})),D("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",minWidth:0},children:[p(oo,{isResizing:t,mode:a,hasCustomContent:true,variant:r}),o]})}return D("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",position:"relative",minWidth:0},children:[p(oo,{isResizing:t,mode:a,variant:r}),D("div",{style:{padding:"0 16px",display:"flex",flexDirection:"column",alignItems:"center"},children:[e?.title&&p("span",{style:{fontSize:16,fontWeight:600,color:z.primary},children:e.title}),e?.subtitle&&p("span",{style:{fontSize:12,color:z.secondary,paddingTop:4},children:e.subtitle})]}),p("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"},children:p("span",{style:{fontSize:10,color:z.muted,fontStyle:"italic"},children:"Double tap: Toggle \u2022 Triple tap: Close"})})]})}n(Ra,"ModalHeaderContent");var nb=n(({visible:e,onClose:t,children:a,header:s,styles:r={},minHeight:o=Zf,maxHeight:i,initialHeight:l=eb,animatedHeight:c,benchMotion:u,initialMode:y="bottomSheet",onModeChange:S,persistenceKey:f,enablePersistence:m=true,initialFloatingPosition:C,footer:A,footerHeight:W=0,onBack:V,onMinimize:M,minimizeRequest:v=0,minimizeTargetPosition:se,initialModalState:$,zIndex:Ye,disableScrollWrapper:Oo=false,background:Ba=true,variant:qe="night"})=>{let[K]=Q(Zr),[Ma,Na]=Q(!m),[R,Pt]=Q(y),Ke=N(S);Ke.current=S;let[Le,ge]=Q(false),[Rt,$e]=Q(false),[Eo,Lt]=Q(l),[re,Be]=Q(()=>wt({width:Tt(),height:Xr,top:C?.y??(de()-Xr)/2,left:C?.x??0},K)),[Po,Je]=Q(false),[Ro,Da]=Q(false),Lo=ts(),pe=N(l),J=N(re),U=N({x:re.left,y:re.top}),Xe=N(null),$t=N(null),oe=N(null),fe=N([]),ee=B(()=>{fe.current.forEach(h=>h()),fe.current=[]},[]);ae(()=>{J.current=re},[re]),ae(()=>ee,[ee]);let za=i||de()-K.top;ae(()=>{if(!m||!f){Na(true);return}let h=true;return n(async()=>{let g=await Ta.load(f);if(h&&g&&(g.mode&&(Pt(g.mode),Ke.current?.(g.mode)),g.panelHeight&&(Lt(g.panelHeight),pe.current=g.panelHeight),g.dimensions)){let T=wt(g.dimensions,K,true);Be(T),U.current={x:T.left,y:T.top}}h&&Na(true)},"loadState")(),()=>{h=false}},[f,m]),ae(()=>{if(!m||!f||!Ma)return;let h=setTimeout(()=>{Ta.save(f,{mode:R,panelHeight:pe.current,dimensions:re,isVisible:e})},500);return()=>clearTimeout(h)},[R,Eo,re,e,f,m,Ma]),ae(()=>{let h=true;return n(async()=>{try{let g=Se.modal.hintAcknowledged(),T=await j.getItem(g);h&&(Je(T!=="true"),Da(true))}catch{h&&(Je(true),Da(true))}},"loadHintStatus")(),()=>{h=false}},[]);let $o=B(async()=>{try{let h=Se.modal.hintAcknowledged();await j.setItem(h,"true"),Je(false)}catch{Je(false)}},[]),Bt=B(()=>{$e(false),ge(false);let h=R==="bottomSheet"?"floating":"bottomSheet";Pt(h),Ke.current?.(h)},[R]);ae(()=>{$e(false),ge(false)},[R]);let be=B(()=>{if(!M)return;let h={mode:R,panelHeight:pe.current,floatingPosition:{x:J.current.left,y:J.current.top},floatingDimensions:{width:J.current.width,height:J.current.height}};m&&f&&Ta.saveMinimized(f,h);let g=se?.x??Tt()-50,T=se?.y??de()-150;if(ee(),R==="bottomSheet"){let I=Xe.current;if(!I){M(h);return}let x=de();fe.current.push(he(300,Ve,E=>{I.style.opacity=String(1-E),I.style.transform=`translateY(${E*x}px)`},()=>M(h)))}else{let I=oe.current;if(!I){M(h);return}let x={...U.current};fe.current.push(he(300,Ve,E=>{I.style.opacity=String(1-E);let ye=x.x+(g-x.x)*E,me=x.y+(T-x.y)*E;I.style.transform=`translate(${ye}px, ${me}px)`},()=>M(h)))}},[R,M,se,ee,m,f]),Fa=N(v);ae(()=>{Fa.current!==v&&(Fa.current=v,be())},[v,be]),ae(()=>{if($&&($.mode&&(Pt($.mode),Ke.current?.($.mode)),$.panelHeight&&(Lt($.panelHeight),pe.current=$.panelHeight),$.floatingDimensions&&$.floatingPosition)){let h={width:$.floatingDimensions.width,height:$.floatingDimensions.height,top:$.floatingPosition.y,left:$.floatingPosition.x};Be(h),U.current={x:$.floatingPosition.x,y:$.floatingPosition.y}}},[$]),Kf(()=>{if(e)if(ee(),R==="bottomSheet"){let h=Xe.current;if(!h)return;let g=de();h.style.transform=`translateY(${g}px)`,h.style.opacity="0",fe.current.push(he(300,Qr,T=>{h.style.transform=`translateY(${(1-T)*g}px)`}),he(200,Ve,T=>{h.style.opacity=String(T)}))}else{let h=oe.current;if(!h)return;U.current={x:J.current.left,y:J.current.top},h.style.transform=`translate(${U.current.x}px, ${U.current.y}px)`,h.style.opacity="0",fe.current.push(he(200,Ve,g=>{h.style.opacity=String(g)}))}},[e,R,ee]);let Wa=N(0),Me=N(0),Ne=N(null),Qe=B(()=>{let h=Date.now();h-Wa.current>500&&(Me.current=0),Me.current++,Wa.current=h,Ne.current&&clearTimeout(Ne.current),Ne.current=setTimeout(()=>{Me.current===2?Bt():Me.current>=3&&M&&be(),Me.current=0},300)},[Bt,M,be]);ae(()=>()=>{Ne.current&&clearTimeout(Ne.current)},[]);let Ze=N({active:false,resizing:false,startY:0,headerOffsetY:0,samples:[]}),Bo=B(h=>{if(R!=="bottomSheet"||h.button!==0||h.target.closest('button, a, input, textarea, select, [role="button"], [role="tab"], [role="switch"], [contenteditable="true"], [tabindex]'))return;let g=Ze.current;g.active=true,g.resizing=false,g.startY=h.clientY;let T=h.currentTarget.getBoundingClientRect();g.headerOffsetY=h.clientY-T.top,g.samples=[{t:performance.now(),y:h.clientY}],h.currentTarget.setPointerCapture(h.pointerId)},[R]),Mo=B(h=>{let g=Ze.current;if(!g.active)return;let T=h.clientY-g.startY;if(!g.resizing&&Math.abs(T)>3&&(g.resizing=true,ee(),ge(true)),!g.resizing)return;let I=h.clientY-g.headerOffsetY,x=de()-I;x=Math.max(o,Math.min(x,za)),pe.current=x,$t.current&&($t.current.style.height=`${x}px`);let E=performance.now();for(g.samples.push({t:E,y:h.clientY});g.samples.length>2&&E-g.samples[0].t>100;)g.samples.shift()},[o,za,ee]),No=B(h=>{let g=Ze.current;if(!g.active)return;if(g.active=false,!g.resizing){Qe();return}ge(false);let T=pe.current,I=h.clientY-g.startY,x=g.samples[0],E=g.samples[g.samples.length-1];if((E&&x&&E.t>x.t?(E.y-x.y)/(E.t-x.t):0)>.8&&I>50||I>150&&T<=o){let ye=Xe.current;if(ee(),ye){let me=de();fe.current.push(he(200,Ve,G=>{ye.style.opacity=String(1-G)}),he(300,Qr,G=>{ye.style.transform=`translateY(${G*me}px)`},()=>t()))}else t();return}Lt(T)},[o,t,Qe,ee]),Do=B(()=>{let h=Ze.current;h.active&&(h.active=false,h.resizing=false,ge(false))},[]),et=N({active:false,dragging:false,startX:0,startY:0,startPos:{x:0,y:0}}),zo=B(h=>{if(R!=="floating"||Le||h.button!==0||h.target.closest('button, a, input, textarea, select, [role="button"], [role="tab"], [role="switch"], [contenteditable="true"], [tabindex]'))return;let g=et.current;g.active=true,g.dragging=false,g.startX=h.clientX,g.startY=h.clientY,g.startPos={...U.current},h.currentTarget.setPointerCapture(h.pointerId)},[R,Le]),Fo=B(h=>{let g=et.current;if(!g.active)return;let T=h.clientX-g.startX,I=h.clientY-g.startY;if(!g.dragging&&Math.abs(T)+Math.abs(I)>5&&(g.dragging=true,$e(true)),!g.dragging)return;let x=g.startPos.x+T,E=g.startPos.y+I;U.current={x,y:E},oe.current&&(oe.current.style.transform=`translate(${x}px, ${E}px)`)},[]),Wo=B(()=>{let h=et.current;if(!h.active)return;if(h.active=false,!h.dragging){Qe();return}$e(false);let g=J.current,T=wt({...g,left:U.current.x,top:U.current.y},K),I=T.left,x=T.top;U.current={x:I,y:x},oe.current&&(oe.current.style.transform=`translate(${I}px, ${x}px)`),Be(E=>({...E,left:I,top:x}))},[K,Qe]),jo=B(()=>{let h=et.current;h.active&&(h.active=false,h.dragging=false,$e(false))},[]),Mt=N({active:false,corner:"bottomRight",startX:0,startY:0,start:{width:0,height:0,top:0,left:0}}),Ho=B(h=>g=>{if(R!=="floating")return;g.stopPropagation();let T=Mt.current;T.active=true,T.corner=h,T.startX=g.clientX,T.startY=g.clientY,T.start={...J.current},ge(true),g.currentTarget.setPointerCapture(g.pointerId)},[R]),Uo=B(h=>{let g=Mt.current;if(!g.active)return;let T=h.clientX-g.startX,I=h.clientY-g.startY;if(Math.abs(T)<.5&&Math.abs(I)<.5)return;let x=Math.max(0,K.left),E=de()-Math.max(0,K.bottom),ye=Tt()-Math.max(0,K.right),me=Tt()*.25,G=g.start,Nt=G.left+G.width,Dt=G.top+G.height,De=G.left,at=G.top,qa=Nt,zt=Dt;g.corner==="bottomLeft"?(De=Math.max(x,Math.min(G.left+T,Nt-me)),zt=Math.min(E,Math.max(Dt+I,G.top+Ee))):(qa=Math.min(ye,Math.max(Nt+T,G.left+me)),zt=Math.min(E,Math.max(Dt+I,G.top+Ee)));let Go=Math.max(me,qa-De),Vo=Math.max(Ee,zt-at),Ka={width:Go,height:Vo,left:De,top:at};J.current=Ka,U.current={x:De,y:at},Be(Ka),oe.current&&(oe.current.style.transform=`translate(${De}px, ${at}px)`)},[K.left,K.right,K.bottom]),ja=B(()=>{let h=Mt.current;h.active&&(h.active=false,ge(false),Be(J.current))},[]),tt=!e,Ha=tt?{left:-9999,top:-9999,opacity:0,visibility:"hidden",pointerEvents:"none"}:{},Ua=s?.title||"Dev tool panel",O=qe==="night",Ga=Ba&&O?p("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},"aria-hidden":true,children:p(jt,{})}):null,Va=D("div",{style:{flex:1,minHeight:0,position:"relative",display:"flex",flexDirection:"column",backgroundColor:O?"transparent":L.base,borderBottomLeftRadius:16,borderBottomRightRadius:16,overflow:"hidden",...r.content},children:[Ba&&!O?p(jt,{}):null,Oo?p("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",paddingBottom:W},children:a}):p("div",{style:{flex:1,minHeight:0,overflowY:"auto",paddingBottom:W},children:a}),A?p("div",{style:{position:"absolute",left:0,right:0,bottom:0,backgroundColor:L.base,borderBottomLeftRadius:16,borderBottomRightRadius:16},children:A}):null]}),Ya=p("div",{style:{position:"absolute",top:4,right:4,zIndex:10},children:p(ao,{onClose:t,onMinimize:M?be:void 0,onToggleMode:Bt,mode:R,variant:qe})});if(R==="floating"){let h=Rt||Le;return D("div",{ref:oe,role:"dialog","aria-label":Ua,"aria-hidden":tt||void 0,style:{fontFamily:Gt,position:"fixed",pointerEvents:"auto",left:0,top:0,width:re.width,height:re.height,transform:`translate(${U.current.x}px, ${U.current.y}px)`,display:"flex",flexDirection:"column",backgroundColor:O?d.color.bg:L.card,borderRadius:O?d.radius.sheet:6,border:O?`1px solid ${d.color.accent}55`:h?`2px solid ${L.primary}`:`1px solid ${L.border}`,boxShadow:O?`0 0 14px ${d.color.accent}38`:h?`0 0 12px ${L.primary}7A`:`0 0 20px ${L.primary}4D`,...O?{overflow:"hidden"}:null,boxSizing:"border-box",zIndex:Ye??1e3,...r.container,...Ha},children:[Ga,p("div",{onPointerDown:zo,onPointerMove:Fo,onPointerUp:Wo,onPointerCancel:jo,style:{borderTopLeftRadius:O?d.radius.sheet:6,borderTopRightRadius:O?d.radius.sheet:6,backgroundColor:O?"transparent":L.card,minHeight:56,border:O?"none":`1px solid ${L.border}`,boxSizing:"border-box",display:"flex",flexDirection:"column",justifyContent:"center",flexShrink:0,touchAction:"none",userSelect:"none",cursor:Rt?"grabbing":"grab",position:"relative"},children:p(Ra,{header:s,isResizing:Rt||Le,mode:R,onMinimize:M?be:void 0,variant:qe})}),Ya,Va,["bottomLeft","bottomRight"].map(g=>p("div",{onPointerDown:Ho(g),onPointerMove:Uo,onPointerUp:ja,onPointerCancel:ja,style:{position:"absolute",width:30,height:30,bottom:4,...g==="bottomLeft"?{left:4}:{right:4},zIndex:1e3,touchAction:"none",cursor:g==="bottomLeft"?"nesw-resize":"nwse-resize"},children:p("div",{style:{width:20,height:20,borderRadius:10,boxSizing:"border-box",backgroundColor:h?`${z.success}1A`:"transparent",border:h?`2px solid ${z.success}`:"none",boxShadow:h?`0 0 8px ${z.success}99`:"none"}})},g))]},"floating")}return p("div",{"aria-hidden":tt||void 0,style:{fontFamily:Gt,position:"fixed",inset:0,zIndex:Ye??1e3,pointerEvents:"none",...tt?{...Ha,inset:"auto",width:"100vw",height:"100vh"}:null},children:p("div",{ref:Xe,style:{position:"absolute",bottom:0,left:0,right:0,pointerEvents:"auto"},children:D("div",{ref:$t,role:"dialog","aria-label":Ua,style:{height:pe.current,display:"flex",flexDirection:"column",backgroundColor:O?d.color.bg:L.card,borderTopLeftRadius:O?d.radius.sheet:6,borderTopRightRadius:O?d.radius.sheet:6,border:O?`1px solid ${d.color.accent}55`:`1px solid ${L.border}`,boxShadow:O?`0 -4px 10px ${d.color.accent}38`:`0 -4px 12px ${L.primary}33`,...O?{overflow:"hidden"}:null,boxSizing:"border-box",position:"relative",...r.container},children:[Ga,p("div",{onPointerDown:Bo,onPointerMove:Mo,onPointerUp:No,onPointerCancel:Do,style:{borderTopLeftRadius:O?d.radius.sheet:6,borderTopRightRadius:O?d.radius.sheet:6,backgroundColor:O?"transparent":L.card,minHeight:56,border:O?"none":`1px solid ${L.border}`,boxSizing:"border-box",display:"flex",flexDirection:"column",justifyContent:"center",flexShrink:0,touchAction:"none",userSelect:"none",cursor:"ns-resize",position:"relative"},children:p(Ra,{header:s,isResizing:Le,mode:R,onMinimize:M?be:void 0,variant:qe})}),Ya,Ro&&Po&&!Lo&&p(ob,{onAcknowledge:$o}),Va]})})},"bottomSheet")},"JsModalComponent"),ib=va(e=>as()().status!=="admitted"?e.visible?p(Sa,{}):null:p(nb,{...e}));import{Children as lb,useEffect as cb,useRef as ub}from"react";import{Fragment as db,jsx as H,jsxs as It}from"react/jsx-runtime";function no({children:e,style:t}){return H(F,{style:[b.sectionLabel,t],children:e})}n(no,"NightSectionLabel");function io({children:e,centered:t,tone:a="tertiary",style:s}){let r=We.flatten(s),o=!!r&&(r.marginHorizontal!=null||r.margin!=null);return H(F,{style:[b.footnote,o?null:b.footnoteInset,a==="secondary"?b.footnoteSecondary:null,a==="warning"?b.footnoteWarning:null,a==="danger"?b.footnoteDanger:null,t?b.footnoteCentered:null,s],children:e})}n(io,"NightFootnote");function lo({children:e,padded:t,glass:a,style:s}){return H(k,{style:[b.card,a?b.cardGlass:null,t?b.cardPadded:null,s],children:e})}n(lo,"NightCard");function La({inset:e=d.rowPadH}){return H(k,{style:[b.separator,{marginLeft:e}]})}n(La,"NightSeparator");function co({children:e,inset:t=d.rowPadH}){let a=lb.toArray(e);return H(db,{children:a.map((s,r)=>It(k,{children:[r>0?H(La,{inset:t}):null,s]},s.key??r))})}n(co,"NightRows");var uo=56,ho=32,_t=22,go=5,hb=uo-_t-go*2;function po({value:e,onValueChange:t,disabled:a,testID:s,accessibilityLabel:r}){let o=ub(new Ut.Value(e?1:0)).current;return cb(()=>{Ut.timing(o,{toValue:e?1:0,duration:200,useNativeDriver:pf.OS!=="web"}).start()},[e,o]),H(ot,{activeOpacity:.8,disabled:a,onPress:()=>t(!e),testID:s,accessibilityLabel:r,accessibilityRole:"switch",accessibilityState:{checked:e,disabled:a},hitSlop:{top:8,bottom:8,left:8,right:8},style:[b.switchTrack,e?b.switchTrackOn:null,a?b.switchDisabled:null],children:H(Ut.View,{style:[b.switchThumb,e?b.switchThumbOn:null,{transform:[{translateX:o.interpolate({inputRange:[0,1],outputRange:[0,hb]})}]}]})})}n(po,"NightSwitch");function fo({label:e,selected:t,onPress:a,disabled:s,icon:r,testID:o}){return It(ot,{activeOpacity:.7,disabled:s||!a,onPress:a,testID:o,style:[b.chip,t?b.chipSelected:null,s?b.chipDisabled:null],children:[r,H(F,{style:[b.chipText,t?b.chipTextSelected:null],children:e})]})}n(fo,"NightChip");function bo({label:e,onPress:t,variant:a="secondary",size:s="lg",icon:r,disabled:o,fullWidth:i=true,testID:l,accessibilityLabel:c}){let u=a==="primary"?d.color.onAccent:a==="tertiary"?d.color.text:a==="destructive"?d.color.danger:d.color.accent;return It(ot,{activeOpacity:.7,disabled:o,onPress:t,testID:l,accessibilityRole:"button",accessibilityLabel:c??e,accessibilityState:{disabled:!!o},style:[b.button,s==="md"?b.buttonMd:b.buttonLg,a==="primary"?b.buttonPrimary:a==="ghost"?b.buttonGhost:b.buttonPlate,i?b.buttonFullWidth:null,o?b.buttonDisabled:null],children:[r,H(F,{style:[s==="md"?b.buttonTextMd:b.buttonTextLg,{color:u}],children:e})]})}n(bo,"NightButton");function yo({tabs:e,activeKey:t,onChange:a,size:s="md",glass:r,testIDPrefix:o}){let i=s==="sm";return H(k,{style:[b.segmentTrack,r?b.segmentTrackGlass:null],children:e.map(l=>{let c=l.key===t;return It(ot,{activeOpacity:.7,testID:o?`${o}-${l.key}`:void 0,accessibilityRole:"tab",accessibilityState:{selected:c},accessibilityLabel:l.label,onPress:()=>a(l.key),style:[b.segment,i?b.segmentSm:null,c?r?b.segmentActiveGlass:b.segmentActive:null],children:[H(F,{style:[b.segmentText,i?b.segmentTextSm:null,c?b.segmentTextActive:null],children:l.label}),c?H(k,{style:[b.segmentUnderline,i?b.segmentUnderlineSm:null]}):null]},l.key)})})}n(yo,"NightSegmented");function mo({label:e,tone:t="neutral"}){let a=t==="accent"?b.badgeAccent:t==="warning"?b.badgeWarning:t==="danger"?b.badgeDanger:t==="info"?b.badgeInfo:b.badgeNeutral,s=t==="accent"?b.badgeTextAccent:t==="warning"?b.badgeTextWarning:t==="danger"?b.badgeTextDanger:t==="info"?b.badgeTextInfo:b.badgeTextNeutral;return H(k,{style:[b.badge,a],children:H(F,{style:[b.badgeText,s],children:e})})}n(mo,"NightBadge");var b=We.create({sectionLabel:{color:d.color.textSecondary,fontSize:d.font.label,fontWeight:"600",letterSpacing:rs,textTransform:"uppercase",marginBottom:8,marginLeft:d.labelInset},footnote:{color:d.color.textTertiary,fontSize:d.font.caption,fontWeight:"500",lineHeight:d.font.caption*1.4,marginTop:8},footnoteInset:{marginLeft:d.labelInset},footnoteSecondary:{color:d.color.textSecondary},footnoteWarning:{color:d.color.warning},footnoteDanger:{color:d.color.danger},footnoteCentered:{textAlign:"center",marginLeft:0},card:{backgroundColor:d.color.surface,borderRadius:d.radius.card,borderWidth:1,borderColor:d.color.border,overflow:"hidden"},cardGlass:{backgroundColor:d.color.glass,borderColor:d.color.glassBorder},cardPadded:{padding:d.cardPad,gap:10},separator:{height:We.hairlineWidth,backgroundColor:d.color.separator},switchTrack:{width:uo,height:ho,borderRadius:ho/2,borderWidth:1,borderColor:d.color.fillTertiary,backgroundColor:d.color.surfaceElevated,paddingHorizontal:go,justifyContent:"center",overflow:"hidden"},switchTrackOn:{backgroundColor:d.color.accentFill,borderColor:d.color.accentBorderStrong},switchDisabled:{opacity:.4},switchThumb:{width:_t,height:_t,borderRadius:_t/2,backgroundColor:d.color.knob},switchThumbOn:{backgroundColor:d.color.accent},chip:{flexDirection:"row",alignItems:"center",gap:6,paddingHorizontal:14,paddingVertical:9,borderRadius:d.radius.chip,borderWidth:1.5,backgroundColor:d.color.buttonSurface,borderColor:d.color.fillTertiary},chipSelected:{borderColor:d.color.accentBorderStrong},chipDisabled:{opacity:.4},chipText:{fontSize:d.font.body,fontWeight:"500",color:d.color.textSecondary},chipTextSelected:{color:d.color.accent},button:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:8},buttonMd:{height:34,paddingHorizontal:16,borderRadius:17},buttonLg:{height:50,paddingHorizontal:20,borderRadius:25},buttonPrimary:{backgroundColor:d.color.accent},buttonPlate:{backgroundColor:d.color.button},buttonGhost:{backgroundColor:"transparent"},buttonFullWidth:{alignSelf:"stretch"},buttonDisabled:{opacity:.4},buttonTextMd:{fontSize:15,fontWeight:"600"},buttonTextLg:{fontSize:17,fontWeight:"600"},segmentTrack:{flex:1,flexDirection:"row",backgroundColor:d.color.bg,borderRadius:d.radius.row,borderWidth:1,borderColor:d.color.border,padding:3},segment:{flex:1,paddingVertical:8,alignItems:"center",justifyContent:"center",borderRadius:d.radius.segment},segmentTrackGlass:{backgroundColor:d.color.glass,borderColor:d.color.glassBorder},segmentActive:{backgroundColor:d.color.surfaceElevated},segmentActiveGlass:{backgroundColor:d.color.glassElevated},segmentText:{fontSize:d.font.caption,fontWeight:"500",color:d.color.textSecondary},segmentTextActive:{fontWeight:"600",color:d.color.text},segmentUnderline:{position:"absolute",bottom:2,width:24,height:2.5,borderRadius:1.25,backgroundColor:d.color.accent,shadowColor:d.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.6,shadowRadius:6},segmentSm:{paddingVertical:5},segmentTextSm:{fontSize:12},segmentUnderlineSm:{bottom:1.5,width:20,height:2,borderRadius:1},badge:{paddingHorizontal:8,paddingVertical:4,borderRadius:d.radius.badge,alignSelf:"flex-start"},badgeText:{fontSize:d.font.micro,fontWeight:"600",letterSpacing:.5,textTransform:"uppercase"},badgeAccent:{backgroundColor:d.color.accentSoft},badgeTextAccent:{color:d.color.accent},badgeWarning:{backgroundColor:d.color.warningSoft},badgeTextWarning:{color:d.color.warning},badgeDanger:{backgroundColor:d.color.dangerSoft},badgeTextDanger:{color:d.color.danger},badgeInfo:{backgroundColor:d.color.infoSoft},badgeTextInfo:{color:d.color.info},badgeNeutral:{backgroundColor:d.color.fillSecondary},badgeTextNeutral:{color:d.color.textSecondary}});import{jsx as Re,jsxs as gb}from"react/jsx-runtime";function At(e){switch(Wt(String(e))){case"dev":return{label:"DEV",backgroundColor:w.warning};case"qa":return{label:"QA",backgroundColor:w.optional};case"staging":return{label:"STAGING",backgroundColor:w.success};case"prod":return{label:"PROD",backgroundColor:w.error};case"local":default:return{label:"LOCAL",backgroundColor:w.info}}}n(At,"getEnvironmentConfig");function So({color:e}){return Re("svg",{width:12,height:12,viewBox:"0 0 24 24","aria-hidden":"true",children:Re("path",{d:"M6 9l6 6 6-6",fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}n(So,"ChevronDownGlyph");function vo({environment:e,interactive:t=false,onPress:a}){let s=At(e);return gb("button",{onClick:t?a:void 0,"aria-label":`Environment: ${s.label}`,style:{display:"flex",flexDirection:"row",alignItems:"center",padding:`6px ${t?4:8}px 6px 8px`,flexShrink:0,background:"none",border:"none",cursor:t?"pointer":"default"},children:[Re("div",{style:{width:8,height:8,borderRadius:4,backgroundColor:s.backgroundColor,marginRight:6,boxShadow:`0 0 4px ${s.backgroundColor}99`}}),Re("span",{style:{fontSize:11,fontWeight:600,color:w.primaryLight,letterSpacing:.5},children:s.label}),t&&Re("span",{style:{marginLeft:2,display:"flex"},children:Re(So,{color:"#7A8599"})})]})}n(vo,"EnvironmentIndicator");import{jsx as we,jsxs as $a}from"react/jsx-runtime";var pb=140,fb=28,Co=44,bb=8,yb=24;function Ot(e){switch(Wt(e)){case"local":return{label:"LOCAL",backgroundColor:w.info};case"dev":return{label:"DEV",backgroundColor:w.warning};case"qa":return{label:"QA",backgroundColor:w.optional};case"staging":return{label:"STAGING",backgroundColor:w.success};case"prod":return{label:"PROD",backgroundColor:w.error};default:return{label:"LOCAL",backgroundColor:w.info}}}n(Ot,"getEnvironmentConfig");function To({environment:e,isSelected:t,onPress:a}){let s=Ot(e);return $a(ff,{onPress:a,style:({pressed:r})=>[ie.optionContainer,t&&ie.optionContainerSelected,r&&ie.optionContainerPressed],children:[$a(k,{style:ie.optionLeft,children:[we(k,{style:[ie.optionDot,{backgroundColor:s.backgroundColor},{shadowColor:s.backgroundColor,shadowOffset:{width:0,height:0},shadowOpacity:.6,shadowRadius:4,elevation:2}]}),we(F,{style:ie.optionLabel,children:s.label})]}),t&&we(ns,{size:14,color:w.success,strokeWidth:3})]})}n(To,"EnvironmentOption");function wo({hasItems:e,currentEnvironment:t,availableEnvironments:a,onSelect:s,width:r=pb,collapsedContent:o}){let i=bb+a.length*Co+yb+4,l=$a(k,{style:ie.collapsedEnvBadge,children:[we(k,{style:[ie.collapsedDot,{backgroundColor:Ot(t).backgroundColor}]}),we(F,{style:ie.collapsedLabel,children:Ot(t).label})]});return we(Qa,{hasItems:e,width:r,expandedHeight:i,peekHeight:fb,showCount:false,collapsedContent:o||l,collapsedLabel:`Switch environment from ${t}`,children:a.map(c=>we(To,{environment:c,isSelected:c===t,onPress:()=>s(c)},c))})}n(wo,"EnvironmentSelector");var ie=We.create({collapsedEnvBadge:{flexDirection:"row",alignItems:"center",gap:6},collapsedDot:{width:8,height:8,borderRadius:4},collapsedLabel:{fontSize:11,fontWeight:"600",color:w.primaryLight,letterSpacing:.5},optionContainer:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,height:Co,width:"100%"},optionContainerSelected:{backgroundColor:"rgba(128, 128, 128, 0.1)"},optionContainerPressed:{backgroundColor:"rgba(128, 128, 128, 0.2)"},optionLeft:{flexDirection:"row",alignItems:"center",flex:1},optionDot:{width:8,height:8,borderRadius:4,marginRight:10},optionLabel:{fontSize:12,fontWeight:"600",color:w.primaryLight,letterSpacing:.5}});import{useState as xo}from"react";import{jsx as Z,jsxs as Et}from"react/jsx-runtime";var ko=36;function Io({color:e,flipped:t}){return Z("svg",{width:10,height:10,viewBox:"0 0 24 24","aria-hidden":"true",style:{transform:t?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms ease"},children:Z("path",{d:"M18 15l-6-6-6 6",fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}n(Io,"ChevronUpGlyph");function _o(){return Z("svg",{width:12,height:12,viewBox:"0 0 24 24","aria-hidden":"true",children:Z("path",{d:"M20 6L9 17l-5-5",fill:"none",stroke:"#4AFF9F",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"})})}n(_o,"CheckGlyph");function Ao({currentEnvironment:e,availableEnvironments:t,onSelect:a}){let[s,r]=xo(false),[o,i]=xo(null),l=At(e),c=t.length*ko;return Et("div",{style:{position:"relative",zIndex:1e3,flexShrink:0},children:[Z("div",{style:{position:"absolute",bottom:"100%",left:0,right:0,height:s?c:0,opacity:s?1:0,overflow:"hidden",transition:"height 200ms ease, opacity 200ms ease",backgroundColor:"rgba(8,12,21,0.95)",border:"1px solid #00B8E666",borderBottomWidth:0,borderTopLeftRadius:6,borderTopRightRadius:6,boxShadow:"0 -4px 8px rgba(0,0,0,0.3)"},children:t.map(u=>{let y=At(u),S=String(u).toLowerCase()===String(e).toLowerCase();return Et("button",{onClick:()=>{r(false),a(u)},onPointerEnter:f=>f.pointerType==="mouse"&&i(String(u)),onPointerLeave:()=>i(null),style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",height:ko,padding:"0 10px",background:S?"rgba(128,128,128,0.1)":o===String(u)?"rgba(128,128,128,0.2)":"none",border:"none",cursor:"pointer"},children:[Et("span",{style:{display:"flex",alignItems:"center"},children:[Z("span",{style:{width:6,height:6,borderRadius:3,backgroundColor:y.backgroundColor,marginRight:8}}),Z("span",{style:{fontSize:10,fontWeight:600,color:w.primaryLight,letterSpacing:.5},children:y.label})]}),S&&Z(_o,{})]},String(u))})}),Et("button",{onClick:()=>r(u=>!u),"aria-expanded":s,"aria-label":`Environment: ${l.label}. Click to switch.`,style:{display:"flex",alignItems:"center",gap:6,padding:"6px 6px 6px 8px",borderRadius:6,borderTopLeftRadius:s?0:6,borderTopRightRadius:s?0:6,backgroundColor:s?"rgba(8,12,21,0.95)":"transparent",border:"none",cursor:"pointer"},children:[Z("span",{style:{width:8,height:8,borderRadius:4,backgroundColor:l.backgroundColor,boxShadow:`0 0 4px ${l.backgroundColor}99`}}),Z("span",{style:{fontSize:11,fontWeight:600,color:w.primaryLight,letterSpacing:.5},children:l.label}),Z(Io,{color:"#7A8599",flipped:s})]})]})}n(Ao,"EnvironmentSelectorInline");export{xu as ARROW_BOTTOM_OFFSET,ku as ARROW_HEIGHT,vd as ASSETS_ICON_COLOR,Sa as AccountSetup,es as AccountSetupButton,ll as ActionCopyButton,Kd as Activity,gh as ActivityIcon,Fl as AddFilterButton,Ml as AddFilterInput,Zd as AlertCircle,vg as AlertCircleIcon,oh as AlertOctagon,sh as AlertTriangle,yh as AlertTriangleIcon,sg as AskBuoyIcon,bd as AssetsIcon,Gc as BACKGROUND_PRESETS,lu as BACKGROUND_STORAGE_KEY,Rg as BENCHMARK_ICON_COLOR,nf as BUOY_SYNTHETIC_MARK,Bl as BackButton,Tu as BackgroundSwitcher,Ql as Badge,Dd as BarChart3,Wd as BarChart3Icon,Sf as BaseEventStore,_g as BenchmarkIcon,Dp as BenchmarkLegacyIcon,ih as Bookmark,dh as Box,Ch as BoxIcon,Fr as BubbleSettingsDetail,zr as BubbleSettingsSection,fh as Bug,tg as BugIcon,vu as BuoyNeedsPlanCard,yu as BuoySignInCard,ri as BuoyUpgradeSheet,Si as CELLS,Ci as CLIP_OFFSCREEN_CELLS,Qg as CLOCK_TOOL_ICON_COLOR,Qp as CONSOLE_ICON_COLOR,_r as COPY_PAYLOAD_MAX_BYTES,Hh as CameraIcon,Pf as ChangeLog,ul as ChangeRow,ns as Check,Sh as CheckCircle,kd as CheckCircle2,kg as CheckCircle2Icon,Ah as CheckCircleIcon,xh as CheckIcon,Xd as CheckSquare,Sd as CheckSquareIcon,Ih as ChevronDown,Rh as ChevronDownIcon,Eh as ChevronLeft,Mh as ChevronLeftIcon,$h as ChevronRight,Fh as ChevronRightIcon,Dh as ChevronUp,Uh as ChevronUpIcon,Dl as ChipStrip,oc as ClipboardHintBanner,jh as Clock,ed as ClockIcon,Yg as ClockToolIcon,Ud as Cloud,qd as CloudIcon,Zc as CollapsibleSection,ql as CompactFilterChips,wu as CompactRow,Bi as CompareBar,Kp as ConsoleIcon,Vh as Copy,Zi as CopyButton,Kh as CopyIcon,nc as CountBadge,Za as CyberpunkSectionButton,qc as DEFAULT_BACKGROUND,Lc as DEVTOOLS_CARD_CONSTANTS,su as DataInspector,os as Database,ng as DatabaseIcon,di as DaylightTunable,wc as DeepFieldTunable,Uc as DetailView,Vi as DetailViewToggle,Nc as DevToolsCard,Ri as DiffModeTabs,Xh as DockBottom,ag as Download,Gg as DownloadIcon,Yc as DraggableHeader,du as DynamicFilterView,Vp as ENV_ICON_COLOR,ki as EVENT_LIST_PRESET,ig as Edit3,eg as Edit3Icon,pc as EmptyState,Pl as EntityFilterView,Hp as EnvIcon,Ag as EnvLaptopIcon,vo as EnvironmentIndicator,wo as EnvironmentSelector,Ao as EnvironmentSelectorInline,Ni as EventHistoryViewer,kc as EventListItem,Fi as EventPickerModal,ui as EventStepperFooter,vh as EventsIcon,Qa as ExpandablePopover,vi as ExpandedInfoRow,Vl as ExportPreview,bg as Eye,og as EyeIcon,is as EyeOff,ug as EyeOffIcon,mi as FeatureGate,ud as FileCode,pg as FileCodeIcon,Cg as FileJson,np as FileJsonIcon,Ig as FileText,Sg as FileTextIcon,Pg as Film,Qd as FilmIcon,Mg as Filter,ti as FilterBadge,xg as FilterIcon,Ul as FilterList,Rl as FilterSection,Wg as FlaskConical,Og as FlaskConicalIcon,Vg as FloatWindow,Lu as FloatingTool,Eu as FloatingToolDivider,zu as FloatingToolHost,Pu as FloatingToolUserStatus,Al as FooterButton,Tl as FooterCaption,kl as FooterMessage,Sl as FooterRow,Wi as FreeAccountPrompt,Qu as GAME_UI_ALERT_STATES,Yu as GameUICollapsibleSection,Ju as GameUICompactStats,Xu as GameUIIssuesList,Ku as GameUIStatusHeader,Xg as GitBranch,$g as GitBranchIcon,ap as Globe,dg as GlobeIcon,Jc as GripVerticalIcon,Ad as Hand,bp as HandIcon,pd as HardDrive,zg as HardDriveIcon,ip as Hash,Ug as HashIcon,Fc as HeaderSearchButton,ch as HelpCircle,Yh as HighlightIcon,Op as HighlightUpdatesIcon,lg as HighlighterIcon,cc as HintsProvider,Zo as HistoryEntryRow,en as HistoryList,Yo as HistoryProvider,hp as Home,_d as HomeIcon,hd as IMAGES_ICON_COLOR,Rd as IMAGE_OVERLAY_ICON_COLOR,Id as IMPERSONATE_ICON_COLOR,wg as IconBackground,Zh as IconCircle,qh as IconContainer,cg as IconLine,rg as IconRect,yp as Image,ah as ImageIcon,Od as ImageOverlayIcon,ld as ImagesIcon,wd as ImpersonateIcon,Tp as Info,Kg as InfoIcon,Hi as InfoRow,al as InlineCopyButton,Gd as JOTAI_ICON_COLOR,jd as JotaiIcon,ib as JsModal,_p as Key,ep as KeyIcon,mp as LIFECYCLE_TOOL_ICON_COLOR,Ap as LOCATION_TOOL_ICON_COLOR,Li as LOGIN_COMMAND,Oi as LOG_LIST_PRESET,Lg as LaptopIcon,Rp as Layers,op as LayersIcon,gp as LifecycleToolIcon,Sc as LinearFade,Np as Link,dp as LinkIcon,Ol as ListItem,jc as LiveSkyTunable,wp as LocationToolIcon,Wp as Lock,Jg as LockIcon,ga as LogLevel,ga as LogLevelEnum,pa as LogType,pa as LogTypeEnum,zi as MAX_PERIOD,md as Maximize2,up as Maximize2Icon,gc as MethodBadge,Up as Minus,fp as MinusIcon,vl as ModalHeader,wl as ModalHintBanner,ii as MoonlightTunable,Yp as Music,nh as MusicIcon,Fp as NETWORK_ICON_COLOR,rs as NIGHT_LABEL_TRACKING,jg as NOTIFICATIONS_ICON_COLOR,Jp as Navigation,pp as NavigationIcon,mg as NetworkGlobeIcon,Mp as NetworkIcon,mo as NightBadge,bo as NightButton,lo as NightCard,fo as NightChip,io as NightFootnote,co as NightRows,no as NightSectionLabel,yo as NightSegmented,La as NightSeparator,po as NightSwitch,mc as NoDataEmptyState,Tc as NoResultsEmptyState,Ic as NoSearchResultsEmptyState,Ng as NotificationsIcon,au as OTTO_ANCHORS,nu as OTTO_ANCHOR_SIZE,Hc as OTTO_GRID,mu as OTTO_GROUPS,uu as OTTO_NOTES,Vc as OTTO_PALETTE,oi as OTTO_REEL,Kl as OTTO_SCENES,Zl as OTTO_SCENE_BY_ID,sc as OTTO_SCENE_CROP_H,Ll as OTTO_SCENE_H,ai as OTTO_SCENE_OTTO,_l as OTTO_SCENE_PALETTE,El as OTTO_SCENE_W,Qc as OTTO_STATES,pu as OTTO_STATE_NAMES,Cu as OTTO_USES,xl as Otto,ml as OttoMotionView,cl as OttoPixels,ic as OttoSceneFrame,dc as OttoSceneStill,hl as OttoStill,lp as PERMISSIONS_ICON_COLOR,bt as PERSONAL_SETTING_KEYS,pr as PREVIEW_ITEM_RENDER_BYTE_LIMIT,Zp as Palette,vp as PaletteIcon,af as Pause,kp as PauseIcon,sp as PermissionsIcon,uh as Phone,ph as PhoneIcon,gl as Pill,xi as PillBadge,nd as Pin,od as Play,Ep as PlayIcon,cd as Plus,Bp as PlusIcon,gd as Power,Bg as PowerIcon,yi as PowerToggleButton,gg as PrimitiveGlobeIcon,li as ProBadge,Ii as ProFeatureBanner,hi as ProUpgradeModal,vc as QrCodeView,hg as QueryIcon,fn as REMOTE_RELOAD_DELAY_MS,fc as RadialGlow,hc as RasterLayer,Dg as ReactQueryIcon,ad as ReduxIcon,yd as RefreshCw,zp as RefreshCwIcon,il as RelativeTime,$p as RenderCountIcon,xp as RenderPulseIcon,Pd as Route,Bh as RouteDotIcon,cp as RouteIcon,rp as RouteMapIcon,Ph as RoutePathIcon,_h as RoutePinIcon,zh as RouteTwoPinsIcon,wh as RoutesIcon,Iu as SPACING_GAP,yg as ScenariosIcon,Cd as Search,iu as SearchBar,jp as SearchIcon,Il as SectionHeader,Hg as SentryBugIcon,bh as SentryIcon,Mr as SentryLogger,xd as Server,Eg as ServerIcon,Ht as Settings,Gp as SettingsIcon,Ed as SettingsSolid,qs as SettingsSync,Ld as Shield,qp as ShieldIcon,mh as Smartphone,Th as SmartphoneIcon,Yd as Square,th as SquareDashed,Td as SquareDashedIcon,fd as SquareIcon,Sp as StackPulseIcon,tn as StandaloneHistoryList,Oc as StatsCard,ac as StatusBadge,Dc as StatusIndicator,Qh as StorageIcon,qg as StorageStackIcon,Hl as StorageTypeBadge,Ja as Subscribable,zs as TEAM_SETTING_KEYS,Ui as TIER_LIMITS,rd as TIME_MACHINE_ICON_COLOR,Mi as TRANSPARENT,yc as TabSelector,$d as TestTube2,Xp as TestTube2Icon,Qi as TickProvider,Wc as TimeDisplay,tf as TimeMachineIcon,kh as Timer,Oh as TimerIcon,$l as ToggleRow,jt as ToolBackground,Cc as ToolButton,Ec as ToolEmptyState,bl as ToolFooter,hr as ToolScreenHeaderContext,dl as ToolbarClearButton,ol as ToolbarCopyButton,Lh as Touchpad,Nh as TouchpadIcon,Fd as Trash,Nd as Trash2,ef as Trash2Icon,Cp as TrashIcon,Bd as TriangleAlert,Ip as TriangleAlertIcon,uc as TypeBadge,Hd as Unlock,tp as UnlockIcon,Ei as UpgradeModal,fi as UpgradePrompt,Vd as Upload,Fg as UploadIcon,Jd as User,Pp as UserIcon,Wh as Users,Gh as UsersIcon,zl as ValueTypeBadge,Ai as ViewToggleCards,td as Volume,Jh as VolumeIcon,Pi as WATER_CELLS,$i as WATER_FRAMES,wi as WATER_ROW0,_i as WATER_ROWS,ft as WIRE_DETAIL_LIMIT_BYTES,Es as WIRE_INLINE_LIMIT_BYTES,eh as Wifi,Tg as WifiBifIcon,Zg as WifiCircuitIcon,fg as WifiIcon,ni as WindowControls,_c as Wormhole,lh as X,rh as XCircle,id as XCircleIcon,sd as XIcon,zd as ZUSTAND_ICON_COLOR,hh as Zap,dd as ZapIcon,Md as ZustandIcon,qu as absoluteFill,ha as add,Gr as appStorageEvent,He as approxJsonSize,xe as assertAccountAccess,hu as backgroundStore,vn as browserRouter,Y as buoyColors,Vr as buoyFetch,Ou as calculateTargetPosition,Au as calculateTooltipPosition,jf as callCapacitorNative,lr as canOpenBuoyTools,aa as capDetail,Sr as classifyPreviewItem,$r as clearEntries,tc as copyToClipboard,lf as countBuoyListener,Yl as createAutoDetectedClipboard,fr as createRestoreScope,Ds as createSyncAdapter,Qs as createToolFactory,bs as createToolStore,Xi as cycleIndexes,jr as definePersistedSetting,Xs as defineToolPreset,Ns as detailByIdAction,Se as devToolsStorageKeys,rf as dialColors,Nu as dismissFloatingTool,rr as dispatchToolAction,Gu as displayValue,br as emptyRestoreResult,Tr as entityColor,ct as expandKeyedArrays,ss as expandableWindowControlsSupported,yr as failedRestore,ea as findKeyPath,Gi as flatColors,Un as flattenObject,da as formatBytes,kr as formatDuration,Er as formatHttpStatus,Ir as formatNumber,Gn as formatPath,Ki as formatRelativeTime,Wn as formatValue,wr as formatValuePreview,w as gameUIColors,le as getAccountAccess,Xl as getAutoDetectedClipboard,Ru as getBubbleAnchorPosition,Wr as getBubbleVisibilitySettings,Yn as getCachedOptionalModule,Ur as getCapacitorAppStorage,Mn as getConstructorName,yn as getDevServerOrigin,cn as getDeviceInfo,Lr as getEntries,$u as getFloatingTools,Pr as getMethodColor,ru as getPreset,cf as getRealAppState,En as getRegisteredToolModule,Kn as getRenderCaptureProvider,of as getSafeAreaInsets,In as getSafeCurrentPathname,_n as getSafeCurrentRoute,kn as getSafeRouter,_u as getScreenCenterY,Pc as getSkyScrub,Qn as getStateSnapshotProvider,Xn as getStateSnapshotProviders,gf as getStorageBackendType,Te as getToolAdapters,ur as getToolAttention,dn as getToolModuleVersion,jn as getTypeColor,as as getUseAccountAccess,xc as getUseIsPro,Ac as getUseLicense,Rc as getUseTier,Dn as getValueSize,Ln as getValueType,ji as gridKey,la as guardToolAdapter,q as hasAccountAccess,Hf as hasCapacitorPlugin,lt as identityField,X as ignoredPatternsStore,qr as isBuoyAssetPath,Kr as isBuoyElement,Yr as isBuoyLog,ma as isBuoyRequest,Uf as isCapacitorNative,rt as isDevToolsStorageKey,Nn as isEmpty,An as isExpoRouterAvailable,Xa as isJsonSerializable,Rs as isOnDeviceMarker,pt as isOverWireBudget,zn as isPlainObjectUtil,$n as isPrimitive,Mc as isProNow,mt as isToolRegistryReady,cs as isUrlIgnored,hf as isUsingPersistentStorage,Bn as isValidJson,Ce as listShapes,ar as listSnapshotToolIds,tr as listToolActions,er as listToolIds,Vn as loadOptionalModule,un as logDeviceInfo,st as macOSColors,$s as memoByIdentity,ra as mergeChangeSources,Lp as monoFont,nl as motionUnits,Bs as newestFitting,d as night,yl as noWindowDragProps,Wt as normalizeEnvironment,ze as notifySubscriberCountChange,Ps as onDeviceMarker,Hs as onSettingsApplied,ir as openBuoyTool,Mu as openFloatingTool,qi as ottoCycle,ci as ottoReel,bi as ottoRuns,Gl as ottoSceneBounds,Wl as ottoSceneRuns,sl as ottoSheets,Kc as ottoWaterRows,Vu as parseDisplayValue,ht as parsePath,Rr as parseUrl,Fn as parseValue,ks as patchFromPath,j as persistentStorage,eu as presetAt,Xc as presetIndex,sa as readParams,xs as readPath,sr as readToolSnapshot,Ft as realNow,el as rectsOf,sf as refreshGameUIColors,Os as refusalText,mn as registerBrowserRouter,Du as registerPersistentFloatingTool,Jn as registerStateSnapshotProvider,Zs as registerToolAdapters,On as registerToolModules,nr as registerToolOpener,pn as reloadApp,gi as renderOttoFrame,Nl as renderOttoScene,sn as resetPersistedStateCache,Yi as resolveEffectiveTier,$c as resolveListEmptyState,gn as resolveReloadStrategy,tu as retryAccountAccess,ju as safeStringify,Jl as scatter,bn as scheduleReloadApp,zf as sentryLogger,fu as setExpandableWindowControls,qn as setRenderCaptureProvider,Bc as setSkyScrub,cr as setToolAttention,xr as shallowDiffSummary,_e as shapeKind,ke as shapeOf,Ts as shapeSummary,vs as shapesWereTruncated,ou as signOutOfBuoy,Ms as sizeOrStub,jl as sizeWarningLevel,mr as skippedRestore,Ks as startSettingsSync,Fe as subscribeAccountAccess,Sn as subscribeBrowserNavigation,Bu as subscribeFloatingTools,uf as subscribeRealAppState,hn as subscribeToStateSnapshotProviders,Rn as subscribeToSubscriberCountChanges,dr as subscribeToolAttention,Pn as subscriberCountNotifier,_s as suggestedPatch,Uu as superJsonDeserialize,Hu as superJsonSerialize,Js as syncSettingsNow,Gt as systemFont,it as teamSettingsStore,Ls as toWire,pi as toolTheme,Or as truncateMiddle,Ar as truncatePayload,Hn as truncateText,ta as truncatedNote,gt as typedEditViolations,Cr as unionKeys,Cs as unshapedLists,Vt as urlMatchesIgnoredPattern,Xo as useAllHistoryEntries,rn as useChangeLog,si as useChipTap,ln as useDeviceInfo,nn as useEventStoreEvents,Ti as useFeatureGate,Fu as useFilterManager,Zu as useGameUIAlertState,bc as useHintsContext,ts as useHintsDisabled,Jo as useHistoryAdapter,Ko as useHistoryAdapters,qo as useHistoryContext,Qo as useHistoryEntryCounts,hs as useIgnoredPatterns,Ji as useLimit,rc as useLoop,Cl as useOttoAnchorMotion,fl as useOttoReel,an as usePersistedState,lc as usePulse,rl as useRelativeTime,Wu as useSafeAreaInsets,xn as useSafeGlobalSearchParams,Tn as useSafePathname,Cn as useSafeRouter,wn as useSafeSegments,gu as useSignInState,zc as useSkyScrub,on as useSubscribedValue,ps as useTeamList,tl as useTick,bu as useToolBackground,gr as useToolScreenHeader,or as waitForToolRegistry,pl as windowDragProps,ec as withBgAlpha,vr as wontApply};
|
package/lib/web/native.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{$ as a,A as s,B as e,C as t,D as i,E as o,F as n,G as r,H as l,I as c,J as d,K as u,L as b,M as
|
|
1
|
+
"use client";import{$ as a,A as s,B as e,C as t,D as i,E as o,F as n,G as r,H as l,I as c,J as d,K as u,L as b,M as m,N as g,O as h,P as p,Q as A,R as S,S as v,T as x,U as y,V as B,W as I,X as k,Y as w,Z as L,_ as T,a as f,aa as E,b as P,ba as V,c as C,ca as M,d as N,da as R,e as D,f as F,g as H,h as K,i as W,j as z,k as O,l as U,m as Y,n as _,o as j,p as q,q as G,r as J,s as Q,t as X,u as Z,v as $,w as aa,x as sa,y as ea,z as ta}from"./chunks/chunk-5G6RSRP4.mjs";import"./chunks/chunk-SBYYOE2T.mjs";import"./chunks/chunk-T6T3FEMU.mjs";export{G as AccessibilityInfo,O as ActivityIndicator,_ as Alert,J as Animated,X as AppRegistry,Z as AppState,Q as Appearance,$ as BackHandler,U as Button,m as CheckBox,aa as Clipboard,E as DeviceEventEmitter,sa as Dimensions,ea as Easing,g as FlatList,ta as I18nManager,h as Image,p as ImageBackground,e as InteractionManager,s as Keyboard,A as KeyboardAvoidingView,t as LayoutAnimation,i as Linking,a as LogBox,W as Modal,o as NativeEventEmitter,q as NativeModules,n as PanResponder,S as Picker,r as PixelRatio,l as Platform,H as Pressable,v as ProgressBar,x as RefreshControl,y as SafeAreaView,K as ScrollView,B as SectionList,c as Share,I as StatusBar,d as StyleSheet,z as Switch,P as Text,C as TextInput,k as Touchable,D as TouchableHighlight,w as TouchableNativeFeedback,N as TouchableOpacity,F as TouchableWithoutFeedback,u as UIManager,b as Vibration,f as View,L as VirtualizedList,T as YellowBox,Y as findNodeHandle,j as unstable_createElement,V as useColorScheme,M as useLocaleContext,R as useWindowDimensions};
|
package/lib/web/ui.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{$ as a,$a as s,$b as o,Aa as t,Ab as e,Ac as b,Ba as r,Bb as i,Bc as l,Ca as n,Cb as T,Cc as c,Da as S,Db as E,Dc as O,Ea as p,Eb as d,Ec as g,Fa as u,Fb as C,Fc as
|
|
1
|
+
"use client";import{$ as a,$a as s,$b as o,Aa as t,Ab as e,Ac as b,Ba as r,Bb as i,Bc as l,Ca as n,Cb as T,Cc as c,Da as S,Db as E,Dc as O,Ea as p,Eb as d,Ec as g,Fa as u,Fb as C,Fc as m,Ga as _,Gb as R,Gc as A,Ha as B,Hb as F,Ia as y,Ib as I,Ja as P,Jb as w,Ka as L,Kb as D,La as N,Lb as h,Ma as G,Mb as f,Na as W,Oa as U,P as k,Pa as H,Q as M,Qa as v,R as V,Ra as x,S as K,Sa as j,Sb as Y,T as q,Ta as z,Tb as X,U as Z,Ua as $,Ub as J,V as Q,Va as aa,Vb as sa,W as oa,Wa as ta,Wb as ea,X as ba,Xa as ra,Xb as ia,Y as la,Ya as na,Yb as Ta,Z as ca,Za as Sa,Zb as Ea,_ as Oa,_a as pa,_b as da,a as ga,aa as ua,ab as Ca,ac as ma,b as _a,ba as Ra,bb as Aa,bc as Ba,c as Fa,ca as ya,cb as Ia,cc as Pa,da as wa,db as La,dc as Da,ea as Na,eb as ha,ec as Ga,fa,fb as Wa,fc as Ua,g as ka,ga as Ha,gb as Ma,gc as va,ha as Va,hb as xa,hc as Ka,ia as ja,ib as Ya,ic as qa,ja as za,jb as Xa,jc as Za,ka as $a,kb as Ja,kc as Qa,la as as,lb as ss,lc as os,ma as ts,mb as es,mc as bs,na as rs,nb as is,nc as ls,oa as ns,ob as Ts,oc as cs,pa as Ss,pb as Es,pc as Os,qa as ps,qb as ds,qc as gs,ra as us,rb as Cs,rc as ms,sa as _s,sb as Rs,sc as As,ta as Bs,tb as Fs,tc as ys,ua as Is,ub as Ps,uc as ws,va as Ls,vb as Ds,vc as Ns,wa as hs,wb as Gs,wc as fs,xa as Ws,xb as Us,xc as ks,ya as Hs,yc as Ms,za as vs,zb as Vs,zc as xs}from"./chunks/chunk-FA6WAQUA.mjs";import{a as Ks}from"./chunks/chunk-HIAN3HBD.mjs";import{a as js,b as Ys,c as qs,d as zs,e as Xs,f as Zs,g as $s,h as Js,i as Qs,j as ao,k as so,l as oo,m as to,n as eo,o as bo,p as ro}from"./chunks/chunk-4YLP5MMN.mjs";import"./chunks/chunk-GF5C5DVX.mjs";import"./chunks/chunk-HPZXETRA.mjs";import{f as io,h as lo,i as no,j as To,k as co,l as So}from"./chunks/chunk-4HIK66DZ.mjs";import{sd as Eo}from"./chunks/chunk-CJTGUGMQ.mjs";import{a as Oo,d as po,f as go,g as uo}from"./chunks/chunk-AHVO74UQ.mjs";import"./chunks/chunk-P32XO2YS.mjs";import"./chunks/chunk-7JJHWSTD.mjs";import"./chunks/chunk-5G6RSRP4.mjs";import{a as Co}from"./chunks/chunk-SBYYOE2T.mjs";import"./chunks/chunk-T6T3FEMU.mjs";export{js as ARROW_BOTTOM_OFFSET,Ys as ARROW_HEIGHT,K as ActionCopyButton,Ra as AddFilterButton,ua as AddFilterInput,gs as BACKGROUND_PRESETS,Ns as BACKGROUND_STORAGE_KEY,ga as BackButton,xs as BackgroundSwitcher,Na as Badge,p as CELLS,g as CLIP_OFFSCREEN_CELLS,Y as ChangeRow,ma as ChipStrip,ka as ClipboardHintBanner,Fs as CollapsibleSection,wa as CompactFilterChips,Ks as CompactRow,I as CompareBar,k as CopyButton,Ha as CountBadge,O as CyberpunkSectionButton,ms as DEFAULT_BACKGROUND,rs as DEVTOOLS_CARD_CONSTANTS,Ps as DataInspector,l as DaylightTunable,Qa as DeepFieldTunable,ds as DetailView,f as DetailViewToggle,ns as DevToolsCard,F as DiffModeTabs,Cs as DraggableHeader,Gs as DynamicFilterView,m as EVENT_LIST_PRESET,Ya as EmptyState,Ea as EntityFilterView,w as EventHistoryViewer,as as EventListItem,D as EventPickerModal,i as EventStepperFooter,T as ExpandablePopover,d as ExpandedInfoRow,Pa as ExportPreview,a as FilterBadge,ya as FilterList,Oa as FilterSection,ao as FloatingTool,$s as FloatingToolDivider,ro as FloatingToolHost,Js as FloatingToolUserStatus,Ta as FooterButton,ea as FooterCaption,ia as FooterMessage,sa as FooterRow,co as GAME_UI_ALERT_STATES,io as GameUICollapsibleSection,no as GameUICompactStats,To as GameUIIssuesList,lo as GameUIStatusHeader,Rs as GripVerticalIcon,Ss as HeaderSearchButton,h as InfoRow,M as InlineCopyButton,A as LOG_LIST_PRESET,Za as LinearFade,ca as ListItem,Os as LiveSkyTunable,L as MAX_PERIOD,ja as MethodBadge,oa as ModalHeader,ba as ModalHintBanner,b as MoonlightTunable,Xa as NoDataEmptyState,Ja as NoResultsEmptyState,ss as NoSearchResultsEmptyState,Is as OTTO_ANCHORS,Ls as OTTO_ANCHOR_SIZE,ps as OTTO_GRID,Hs as OTTO_GROUPS,hs as OTTO_NOTES,us as OTTO_PALETTE,t as OTTO_REEL,La as OTTO_SCENES,ha as OTTO_SCENE_BY_ID,Wa as OTTO_SCENE_CROP_H,pa as OTTO_SCENE_H,s as OTTO_SCENE_OTTO,na as OTTO_SCENE_PALETTE,Sa as OTTO_SCENE_W,Bs as OTTO_STATES,Ws as OTTO_STATE_NAMES,vs as OTTO_USES,ra as Otto,aa as OttoMotionView,j as OttoPixels,Ma as OttoSceneFrame,xa as OttoSceneStill,z as OttoStill,X as Pill,C as PillBadge,E as PowerToggleButton,qa as RadialGlow,Ka as RasterLayer,qs as SPACING_GAP,Ds as SearchBar,la as SectionHeader,ts as StatsCard,fa as StatusBadge,Ts as StatusIndicator,Fa as StorageTypeBadge,P as TRANSPARENT,za as TabSelector,Es as TimeDisplay,da as ToggleRow,Ms as ToolBackground,$a as ToolButton,es as ToolEmptyState,J as ToolFooter,q as ToolbarClearButton,V as ToolbarCopyButton,Va as TypeBadge,_a as ValueTypeBadge,R as ViewToggleCards,B as WATER_CELLS,y as WATER_FRAMES,u as WATER_ROW0,_ as WATER_ROWS,e as WindowControls,os as Wormhole,fs as backgroundStore,go as buoyColors,Zs as calculateTargetPosition,Xs as calculateTooltipPosition,U as cycleIndexes,uo as dialColors,eo as dismissFloatingTool,Vs as expandableWindowControlsSupported,G as flatColors,po as gameUIColors,Qs as getBubbleAnchorPosition,so as getFloatingTools,ws as getPreset,zs as getScreenCenterY,bs as getSkyScrub,N as gridKey,Oo as macOSColors,Eo as monoFont,x as motionUnits,Q as noWindowDragProps,to as openFloatingTool,W as ottoCycle,r as ottoReel,S as ottoRuns,Ia as ottoSceneBounds,Aa as ottoSceneRuns,v as ottoSheets,_s as ottoWaterRows,ys as presetAt,As as presetIndex,H as rectsOf,bo as registerPersistentFloatingTool,n as renderOttoFrame,Ca as renderOttoScene,is as resolveListEmptyState,Da as scatter,Us as setExpandableWindowControls,ls as setSkyScrub,Ba as sizeWarningLevel,oo as subscribeFloatingTools,Co as systemFont,c as toolTheme,o as useChipTap,So as useGameUIAlertState,Ua as useLoop,ta as useOttoAnchorMotion,$ as useOttoReel,va as usePulse,cs as useSkyScrub,ks as useToolBackground,Z as windowDragProps,Ga as withBgAlpha};
|