@buoy-gg/redux 7.0.45 → 7.0.47

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.reduxSyncAdapter=void 0;var _reduxActionStore=require("../utils/reduxActionStore");var _sharedUi=require("@buoy-gg/shared-ui");var _autoInstrument=require("../utils/autoInstrument");const toWireValue=e=>(0,_sharedUi.toWire)(e,_reduxActionStore.PAYLOAD_ON_DEVICE);const toWireAction=(0,_sharedUi.memoByIdentity)(e=>{const t=(0,_reduxActionStore.isEvictedState)(e.prevState)?{...e}:{...e,prevState:_reduxActionStore.STATE_ON_DEVICE,nextState:_reduxActionStore.STATE_ON_DEVICE};t.payload=toWireValue(t.payload);t.action=toWireValue(t.action);t.error=toWireValue(t.error);if(t.meta){const r=toWireValue(t.meta.arg);if(r!==t.meta.arg)t.meta={...t.meta,arg:r}}return t});function topLevelKeys(e){return e&&typeof e==="object"&&!Array.isArray(e)?Object.keys(e):[]}function unavailable(){const e=(0,_autoInstrument.getInstrumentationStatus)();const t=e.diagnostic??"not-instrumented";return{available:false,slices:[],reason:t}}const reduxSyncAdapter=exports.reduxSyncAdapter=(0,_sharedUi.createSyncAdapter)({version:2,getSnapshot:()=>_reduxActionStore.reduxActionStore.getActions().map(toWireAction),subscribe:e=>_reduxActionStore.reduxActionStore.subscribe(e),actions:{clearEvents:()=>{_reduxActionStore.reduxActionStore.clearActions()},getActionDetail:e=>{const{id:t}=(0,_sharedUi.readParams)(e);if(!t)return{found:false,reason:"missing id"};const r=_reduxActionStore.reduxActionStore.getActionById(t);if(!r)return{found:false,reason:"unknown id"};if((0,_reduxActionStore.isEvictedState)(r.prevState)){return{found:true,id:t,evicted:true,reason:`Raw state was evicted (retained for recent actions only).`}}const a=n=>(0,_sharedUi.capDetail)(n,_sharedUi.WIRE_DETAIL_LIMIT_BYTES);const o=n=>{if(!n)return n;const i=a(n.arg);return i===n.arg?n:{...n,arg:i}};return{found:true,id:t,prevState:a(r.prevState),nextState:a(r.nextState),payload:a(r.payload),action:a(r.action),meta:o(r.meta),error:a(r.error)}},getState:e=>{const{includeValues:t=false}=(0,_sharedUi.readParams)(e);const r=(0,_autoInstrument.getActiveStore)();if(!r){return unavailable()}const a=r.getState();const o=(0,_autoInstrument.getInstrumentationStatus)();return{available:true,slices:topLevelKeys(a),capture:o.capture,mechanism:o.mechanism,...t?{state:a}:{}}},dispatch:e=>{const{action:t}=(0,_sharedUi.readParams)(e);const r=(0,_autoInstrument.getActiveStore)();if(!r){return{dispatched:false,...unavailable()}}if(!t)throw new Error("dispatch requires an `action`");r.dispatch(t);return{dispatched:true,type:t.type}}}});
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.reduxSyncAdapter=void 0;var _reduxActionStore=require("../utils/reduxActionStore");var _sharedUi=require("@buoy-gg/shared-ui");var _autoInstrument=require("../utils/autoInstrument");var _buoyReduxMiddleware=require("../utils/buoyReduxMiddleware");const toWireValue=t=>(0,_sharedUi.toWire)(t,_reduxActionStore.PAYLOAD_ON_DEVICE);const toWireAction=(0,_sharedUi.memoByIdentity)(t=>{const e=(0,_reduxActionStore.isEvictedState)(t.prevState)?{...t}:{...t,prevState:_reduxActionStore.STATE_ON_DEVICE,nextState:_reduxActionStore.STATE_ON_DEVICE};e.payload=toWireValue(e.payload);e.action=toWireValue(e.action);e.error=toWireValue(e.error);if(e.meta){const r=toWireValue(e.meta.arg);if(r!==e.meta.arg)e.meta={...e.meta,arg:r}}return e});function topLevelKeys(t){return t&&typeof t==="object"&&!Array.isArray(t)?Object.keys(t):[]}function setStateAtPath(t,e){const{path:r,value:a,remove:i}=e;if(!r)return{ok:false,error:'setState needs a `path`, like "offers.added.<id>".'};if(!i&&a===void 0)return{ok:false,error:`Sent \`path\` without \`value\`. Send value (null is fine) or remove:true.`};const o=r.split(".").filter(Boolean);const c=s=>Array.isArray(s)?[...s]:{...s};const l=c(t);let n=l;for(let s=0;s<o.length-1;s++){const f=o[s];const d=n[f];if(!d||typeof d!=="object"){return{ok:false,error:`No object at "${o.slice(0,s+1).join(".")}" \u2014 read getState for the real shape.`}}const p=c(d);n[f]=p;n=p}const u=o[o.length-1];const y=n[u];if(i){if(!(u in n))return{ok:false,error:`Nothing at "${r}" to remove.`};if(Array.isArray(n))n.splice(Number(u),1);else delete n[u]}else{n[u]=a}return{ok:true,next:l,prev:y}}function sliceFieldNames(t){const e={};if(!t||typeof t!=="object"||Array.isArray(t))return e;for(const[r,a]of Object.entries(t).slice(0,40)){if(a&&typeof a==="object"&&!Array.isArray(a))e[r]=Object.keys(a).slice(0,12)}return e}function unavailable(){const t=(0,_autoInstrument.getInstrumentationStatus)();const e=t.diagnostic??"not-instrumented";return{available:false,slices:[],reason:e}}const reduxSyncAdapter=exports.reduxSyncAdapter=(0,_sharedUi.createSyncAdapter)({version:2,getSnapshot:()=>_reduxActionStore.reduxActionStore.getActions().map(toWireAction),subscribe:t=>_reduxActionStore.reduxActionStore.subscribe(t),actions:{clearEvents:()=>{_reduxActionStore.reduxActionStore.clearActions()},getActionDetail:t=>{const{id:e}=(0,_sharedUi.readParams)(t);if(!e)return{found:false,reason:"missing id"};const r=_reduxActionStore.reduxActionStore.getActionById(e);if(!r)return{found:false,reason:"unknown id"};if((0,_reduxActionStore.isEvictedState)(r.prevState)){return{found:true,id:e,evicted:true,reason:`Raw state was evicted (retained for recent actions only).`}}const a=o=>(0,_sharedUi.capDetail)(o,_sharedUi.WIRE_DETAIL_LIMIT_BYTES);const i=o=>{if(!o)return o;const c=a(o.arg);return c===o.arg?o:{...o,arg:c}};return{found:true,id:e,prevState:a(r.prevState),nextState:a(r.nextState),payload:a(r.payload),action:a(r.action),meta:i(r.meta),error:a(r.error)}},getState:t=>{const{includeValues:e=false}=(0,_sharedUi.readParams)(t);const r=(0,_autoInstrument.getActiveStore)();if(!r){return unavailable()}const a=r.getState();const i=(0,_autoInstrument.getInstrumentationStatus)();return{available:true,slices:topLevelKeys(a),sliceFields:sliceFieldNames(a),capture:i.capture,mechanism:i.mechanism,...e?{state:a}:{}}},dispatch:t=>{const{action:e}=(0,_sharedUi.readParams)(t);const r=(0,_autoInstrument.getActiveStore)();if(!r){return{dispatched:false,...unavailable()}}if(!e)throw new Error("dispatch requires an `action`");r.dispatch(e);return{dispatched:true,type:e.type}},setState:t=>{const e=(0,_autoInstrument.getActiveStore)();if(!e)return{ok:false,...unavailable()};if(!(0,_autoInstrument.isTimeTravelAvailable)()){return{ok:false,error:"This store has no Buoy time-travel reducer, so its state can't be edited directly. Dispatch one of the app's own actions instead."}}const r=setStateAtPath(e.getState(),(0,_sharedUi.readParams)(t));if(!r.ok)return r;e.dispatch({type:_buoyReduxMiddleware.BUOY_JUMP_TO_STATE,payload:r.next});return{ok:true,path:(0,_sharedUi.readParams)(t).path,previous:r.prev}}}});
@@ -1 +1 @@
1
- "use strict";import{reduxActionStore as i,STATE_ON_DEVICE as d,PAYLOAD_ON_DEVICE as S,isEvictedState as p}from"../utils/reduxActionStore";import{WIRE_DETAIL_LIMIT_BYTES as y,capDetail as g,createSyncAdapter as v,memoByIdentity as A,readParams as c,toWire as E}from"@buoy-gg/shared-ui";import{getActiveStore as l,getInstrumentationStatus as f}from"../utils/autoInstrument";const s=e=>E(e,S);const b=A(e=>{const t=p(e.prevState)?{...e}:{...e,prevState:d,nextState:d};t.payload=s(t.payload);t.action=s(t.action);t.error=s(t.error);if(t.meta){const r=s(t.meta.arg);if(r!==t.meta.arg)t.meta={...t.meta,arg:r}}return t});function h(e){return e&&typeof e==="object"&&!Array.isArray(e)?Object.keys(e):[]}function m(){const e=f();const t=e.diagnostic??"not-instrumented";return{available:false,slices:[],reason:t}}export const reduxSyncAdapter=v({version:2,getSnapshot:()=>i.getActions().map(b),subscribe:e=>i.subscribe(e),actions:{clearEvents:()=>{i.clearActions()},getActionDetail:e=>{const{id:t}=c(e);if(!t)return{found:false,reason:"missing id"};const r=i.getActionById(t);if(!r)return{found:false,reason:"unknown id"};if(p(r.prevState)){return{found:true,id:t,evicted:true,reason:`Raw state was evicted (retained for recent actions only).`}}const a=n=>g(n,y);const o=n=>{if(!n)return n;const u=a(n.arg);return u===n.arg?n:{...n,arg:u}};return{found:true,id:t,prevState:a(r.prevState),nextState:a(r.nextState),payload:a(r.payload),action:a(r.action),meta:o(r.meta),error:a(r.error)}},getState:e=>{const{includeValues:t=false}=c(e);const r=l();if(!r){return m()}const a=r.getState();const o=f();return{available:true,slices:h(a),capture:o.capture,mechanism:o.mechanism,...t?{state:a}:{}}},dispatch:e=>{const{action:t}=c(e);const r=l();if(!r){return{dispatched:false,...m()}}if(!t)throw new Error("dispatch requires an `action`");r.dispatch(t);return{dispatched:true,type:t.type}}}});
1
+ "use strict";import{reduxActionStore as f,STATE_ON_DEVICE as A,PAYLOAD_ON_DEVICE as E,isEvictedState as g}from"../utils/reduxActionStore";import{WIRE_DETAIL_LIMIT_BYTES as T,capDetail as _,createSyncAdapter as j,memoByIdentity as x,readParams as l,toWire as I}from"@buoy-gg/shared-ui";import{getActiveStore as y,getInstrumentationStatus as b,isTimeTravelAvailable as w}from"../utils/autoInstrument";import{BUOY_JUMP_TO_STATE as O}from"../utils/buoyReduxMiddleware";const p=t=>I(t,E);const D=x(t=>{const e=g(t.prevState)?{...t}:{...t,prevState:A,nextState:A};e.payload=p(e.payload);e.action=p(e.action);e.error=p(e.error);if(e.meta){const r=p(e.meta.arg);if(r!==e.meta.arg)e.meta={...e.meta,arg:r}}return e});function B(t){return t&&typeof t==="object"&&!Array.isArray(t)?Object.keys(t):[]}function N(t,e){const{path:r,value:o,remove:i}=e;if(!r)return{ok:false,error:'setState needs a `path`, like "offers.added.<id>".'};if(!i&&o===void 0)return{ok:false,error:`Sent \`path\` without \`value\`. Send value (null is fine) or remove:true.`};const a=r.split(".").filter(Boolean);const c=s=>Array.isArray(s)?[...s]:{...s};const h=c(t);let n=h;for(let s=0;s<a.length-1;s++){const m=a[s];const d=n[m];if(!d||typeof d!=="object"){return{ok:false,error:`No object at "${a.slice(0,s+1).join(".")}" \u2014 read getState for the real shape.`}}const S=c(d);n[m]=S;n=S}const u=a[a.length-1];const k=n[u];if(i){if(!(u in n))return{ok:false,error:`Nothing at "${r}" to remove.`};if(Array.isArray(n))n.splice(Number(u),1);else delete n[u]}else{n[u]=o}return{ok:true,next:h,prev:k}}function L(t){const e={};if(!t||typeof t!=="object"||Array.isArray(t))return e;for(const[r,o]of Object.entries(t).slice(0,40)){if(o&&typeof o==="object"&&!Array.isArray(o))e[r]=Object.keys(o).slice(0,12)}return e}function v(){const t=b();const e=t.diagnostic??"not-instrumented";return{available:false,slices:[],reason:e}}export const reduxSyncAdapter=j({version:2,getSnapshot:()=>f.getActions().map(D),subscribe:t=>f.subscribe(t),actions:{clearEvents:()=>{f.clearActions()},getActionDetail:t=>{const{id:e}=l(t);if(!e)return{found:false,reason:"missing id"};const r=f.getActionById(e);if(!r)return{found:false,reason:"unknown id"};if(g(r.prevState)){return{found:true,id:e,evicted:true,reason:`Raw state was evicted (retained for recent actions only).`}}const o=a=>_(a,T);const i=a=>{if(!a)return a;const c=o(a.arg);return c===a.arg?a:{...a,arg:c}};return{found:true,id:e,prevState:o(r.prevState),nextState:o(r.nextState),payload:o(r.payload),action:o(r.action),meta:i(r.meta),error:o(r.error)}},getState:t=>{const{includeValues:e=false}=l(t);const r=y();if(!r){return v()}const o=r.getState();const i=b();return{available:true,slices:B(o),sliceFields:L(o),capture:i.capture,mechanism:i.mechanism,...e?{state:o}:{}}},dispatch:t=>{const{action:e}=l(t);const r=y();if(!r){return{dispatched:false,...v()}}if(!e)throw new Error("dispatch requires an `action`");r.dispatch(e);return{dispatched:true,type:e.type}},setState:t=>{const e=y();if(!e)return{ok:false,...v()};if(!w()){return{ok:false,error:"This store has no Buoy time-travel reducer, so its state can't be edited directly. Dispatch one of the app's own actions instead."}}const r=N(e.getState(),l(t));if(!r.ok)return r;e.dispatch({type:O,payload:r.next});return{ok:true,path:l(t).path,previous:r.prev}}}});
@@ -69,6 +69,7 @@ export declare const reduxSyncAdapter: import("@buoy-gg/shared-ui").SyncAdapter<
69
69
  state?: unknown;
70
70
  available: boolean;
71
71
  slices: string[];
72
+ sliceFields: Record<string, string[]>;
72
73
  /** 'full' | 'top-level-only' — what the live capture mechanism sees. */
73
74
  capture: "full" | "top-level-only" | "none";
74
75
  mechanism: import("../..").CaptureMechanism | null;
@@ -85,5 +86,26 @@ export declare const reduxSyncAdapter: import("@buoy-gg/shared-ui").SyncAdapter<
85
86
  dispatched: boolean;
86
87
  type: string;
87
88
  };
89
+ /** Set or remove one value by path, through the time-travel reducer. */
90
+ setState: (params?: unknown) => {
91
+ available: false;
92
+ slices: string[];
93
+ /** 'no-react-redux' | 'no-provider' | 'not-instrumented' */
94
+ reason: string;
95
+ ok: boolean;
96
+ error?: undefined;
97
+ path?: undefined;
98
+ previous?: undefined;
99
+ } | {
100
+ ok: boolean;
101
+ error: string;
102
+ path?: undefined;
103
+ previous?: undefined;
104
+ } | {
105
+ ok: boolean;
106
+ path: string | undefined;
107
+ previous: unknown;
108
+ error?: undefined;
109
+ };
88
110
  }>;
89
111
  //# sourceMappingURL=reduxSyncAdapter.d.ts.map
package/lib/web/index.mjs CHANGED
@@ -1 +1 @@
1
- "use client";var Dt=Object.defineProperty;var kr=Object.getOwnPropertyDescriptor;var Er=Object.getOwnPropertyNames;var Vr=Object.prototype.hasOwnProperty;var $r=(e,t)=>{for(var r in t)Dt(e,r,{get:t[r],enumerable:true})},Bt=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Er(t))!Vr.call(e,a)&&a!==r&&Dt(e,a,{get:()=>t[a],enumerable:!(o=kr(t,a))||o.enumerable});return e},zr=(e,t,r)=>(Bt(e,t,"default"),r&&Bt(r,t,"default"));var Rt=process.env.NODE_ENV!=="production";typeof window<"u"&&typeof globalThis.global>"u"&&(globalThis.global=globalThis);import{classifyPreviewItem as Or,createRestoreScope as Lr,registerStateSnapshotProvider as Pr,skippedRestore as Je,unionKeys as Nr,wontApply as jr}from"@buoy-gg/shared-ui/web";var Ge=Symbol.for("@@buoy/enhancerInstrumented"),me=null,be=null,Xe=null,kt=false;function ce(e,t){me=e,be=t,Xe=null}function Fr(e){me===e&&(me=null,be=null)}function de(){return me}function Et(){kt=true}function Qe(){return kt&&me!==null}function Wr(e){Xe=e}function ue(){return{mechanism:be,capture:be==="enhancer"||be==="middleware"?"full":be==="patch"?"top-level-only":"none",hasStore:me!==null,timeTravel:Qe(),diagnostic:Xe}}import{ChangeLog as Mr,approxJsonSize as Hr}from"@buoy-gg/shared-ui/web";var Ze=25,et=Object.freeze({__buoyStateEvicted:true,note:`Raw state retained for the ${Ze} most recent actions only.`}),Vt=Object.freeze({__buoyStateOnDevice:true,note:"State trees stay on the device \u2014 fetched on demand via getActionDetail."}),_r=Object.freeze({__buoyPayloadOnDevice:true,note:"Payload stays on the device \u2014 fetched on demand via getActionDetail."});function Be(e){return typeof e=="object"&&e!==null&&e.__buoyPayloadOnDevice===true}function ee(e){if(typeof e!="object"||e===null)return false;let t=e;return t.__buoyStateEvicted===true||t.__buoyStateOnDevice===true}function qr(e){return e.startsWith("@@")?"internal":e.includes("/pending")?"pending":e.includes("/fulfilled")?"fulfilled":e.includes("/rejected")?"rejected":e.includes("/executeQuery")?"query":e.includes("/executeMutation")?"mutation":"action"}function Ur(e){if(e.startsWith("@@")){let r=e.split("/");return{sliceName:null,actionName:r[r.length-1]||e}}let t=e.split("/");if(t.length>=2){let r=t[0],o=t[1];return t.length>=3&&["pending","fulfilled","rejected"].includes(t[t.length-1])&&(o=t.slice(1,-1).join("/")),{sliceName:r,actionName:o.toUpperCase()}}return{sliceName:null,actionName:e.toUpperCase()}}function $t(e,t){return Hr(e,t).bytes>t}function Kr(e,t=40){if(e===void 0)return"";if(e===null)return"null";try{if(typeof e=="string")return e.length>t?`"${e.slice(0,t-3)}..."`:`"${e}"`;if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e)){if(e.length===0)return"[]";if($t(e,t))return`[${e.length} items]`;let r=JSON.stringify(e);return r.length>t?`[${e.length} items]`:r}if(typeof e=="object"){let r=Object.keys(e);if(r.length===0)return"{}";if($t(e,t))return`{ ${r.length} keys }`;let o=JSON.stringify(e);return o.length<=t?o:`{ ${r.length} keys }`}return String(e).slice(0,t)}catch{return"[complex]"}}function Yr(e,t){if(e===t)return{summary:"no change",changedCount:0};if(typeof e!="object"||typeof t!="object"||e===null||t===null)return{summary:"changed",changedCount:1};let r=Object.keys(e),o=Object.keys(t),a=o.filter(p=>!r.includes(p)).length,n=r.filter(p=>!o.includes(p)).length,c=0;for(let p of r)o.includes(p)&&e[p]!==t[p]&&c++;let l=[];a>0&&l.push(`+${a}`),n>0&&l.push(`-${n}`),c>0&&l.push(`~${c}`);let u=a+n+c;return l.length===0?{summary:"nested change",changedCount:1}:{summary:`${l.join(" ")} ${u===1?"key":"keys"}`,changedCount:u}}function Jr(e){let t=e.meta;if(t)return{requestId:t.requestId,requestStatus:t.requestStatus,arg:t.arg,rejectedWithValue:t.rejectedWithValue,aborted:t.aborted,condition:t.condition}}var Gr=class extends Mr{addAction(e,t,r,o){if(!this.canRecord())return;let a=e.type||"";if(!a)return;let n=t!==r,c=qr(a),{sliceName:l,actionName:u}=Ur(a),p=Jr(e),f=Kr(e.payload),{summary:I,changedCount:S}=Yr(t,r),O=(o??0)>16,L={id:this.nextId(),type:a,payload:e.payload,action:e,timestamp:Date.now(),prevState:t,nextState:r,duration:o,hasStateChange:n,category:c,sliceName:l,actionName:u,meta:p,error:e.error,payloadPreview:f,diffSummary:I,changedKeysCount:S,isSlowAction:O};this.push(L);for(let V=Ze;V<this.items.length;V++){let $=this.items[V];if($.prevState!==et)$.prevState=et,$.nextState=et;else break}this.notifyListeners()}getActions(){return this.getAll()}getActionById(e){return this.getById(e)}clearActions(){this.clear()}replaceActions(e){if(!this.getEnabled())return;let t=new Map;for(let o of this.items)o.prevState!==void 0&&!ee(o.prevState)&&t.set(o.id,o);let r=e.slice(0,this.max).map(o=>{let a=t.get(o.id);return!a||!ee(o.prevState)?o:{...o,prevState:a.prevState,nextState:a.nextState,payload:Be(o.payload)?a.payload:o.payload,action:Be(o.action)?a.action:o.action,meta:Be(o.meta?.arg)?a.meta:o.meta,error:Be(o.error)?a.error:o.error}});this.setItems(r)}hydrateAction(e,t){this.hydrateById(e,t)}setMaxActions(e){this.setMax(e)}getStats(){let e=this.items.length,t=this.items.filter(n=>n.hasStateChange).length,r=new Set(this.items.map(n=>n.type)),o=this.items.filter(n=>n.duration!==void 0).map(n=>n.duration),a=o.length>0?o.reduce((n,c)=>n+c,0)/o.length:0;return{totalActions:e,actionsWithChanges:t,actionsWithoutChanges:e-t,uniqueActionTypes:r.size,averageDuration:Math.round(a*100)/100}}filterActions(e){let t=[...this.items];if(e.searchText){let r=e.searchText.toLowerCase();t=t.filter(o=>o.type.toLowerCase().includes(r))}return e.actionTypes&&e.actionTypes.length>0&&(t=t.filter(r=>e.actionTypes.includes(r.type))),e.onlyWithChanges&&(t=t.filter(r=>r.hasStateChange)),t}getUniqueActionTypes(){return Array.from(new Set(this.items.map(e=>e.type))).sort()}getRelatedActions(e){return this.items.filter(t=>t.meta?.requestId===e).sort((t,r)=>t.timestamp-r.timestamp)}getLinkedActions(e){return e.meta?.requestId?this.getRelatedActions(e.meta.requestId):[]}getLinkedActionsCount(e){return e.meta?.requestId?this.items.filter(t=>t.meta?.requestId===e.meta?.requestId).length:0}getAsyncOperationDuration(e){let t=this.getRelatedActions(e);if(t.length<2)return null;let r=t.find(a=>a.category==="pending"),o=t.find(a=>a.category==="fulfilled"||a.category==="rejected");return r&&o?o.timestamp-r.timestamp:null}getBaseActionType(e){let t=e.split("/");if(t.length>=2){let r=t[t.length-1];if(["pending","fulfilled","rejected"].includes(r))return t.slice(0,-1).join("/")}return e}getAsyncOperationIndex(e){let t=new Map;for(let o of this.items)o.meta?.requestId&&!t.has(o.meta.requestId)&&t.set(o.meta.requestId,o.timestamp);let r=Array.from(t.entries()).sort((o,a)=>o[1]-a[1]).map(([o])=>o).indexOf(e);return r>=0?r+1:0}},m=new Gr;var tt=false;function zt(){return tt}var Se="@@buoy/JUMP_TO_STATE",Xr="@@buoy/REPLAY_ACTION";function Ot(e){if(ee(e)){console.warn("[BuoyRedux] Cannot jump - this action's state was evicted (raw state is retained for recent actions only)");return}let t=de();if(!t){console.warn("[BuoyRedux] Cannot jump to state - no store instrumented");return}if(!Qe()){console.warn("[BuoyRedux] Cannot jump to state - the root reducer cannot serve a state jump. Capture and time travel are wired separately: either put `import '@buoy-gg/redux';` first in your app entry (so Buoy is the store enhancer), or wrap your root reducer with withBuoyDevTools().");return}t.dispatch({type:Se,payload:e})}function Lt(e){let t=de();t?t.dispatch(e):console.warn("[BuoyRedux] Cannot replay action - no store instrumented")}function Qr(e){return Et(),(t,r)=>r.type===Se?r.payload:e(t,r)}var Zr=e=>(tt=true,ce(e,"middleware"),t=>r=>{let o=r;if(o.type?.startsWith("@@buoy/"))return t(r);let a=performance.now(),n=e.getState(),c=t(r),l=e.getState(),u=performance.now()-a;return m.addAction(o,n,l,u),c});function eo(e={}){let{maxActions:t=200,ignoreActions:r=[]}=e;return m.setMaxActions(t),o=>(tt=true,ce(o,"middleware"),a=>n=>{let c=n,l=c.type||"";if(l?.startsWith("@@buoy/")||r.includes(l))return a(n);let u=performance.now(),p=o.getState(),f=a(n),I=o.getState(),S=performance.now()-u;return m.addAction(c,p,I,S),f})}var Re="enable restore by using the Buoy enhancer or wrapping your root reducer in withBuoyDevTools()";function to(){let{mechanism:e,hasStore:t,diagnostic:r}=ue();return t?e==="patch"?{canCapture:true,canRestore:false,detail:`Auto-instrumented store cannot be restored \u2014 ${Re}`}:{canCapture:true,canRestore:true,detail:e==="middleware"?"Restore requires withBuoyDevTools(rootReducer) \u2014 verified at restore time":void 0}:{canCapture:false,canRestore:false,detail:r==="no-react-redux"?"react-redux not installed":r==="no-provider"?"No Redux <Provider> found":"No Redux store instrumented"}}async function ro(){let e=de();return e?{data:{state:e.getState()},warnings:[]}:{data:null,warnings:["no Redux store instrumented"]}}async function oo(e,t){let r=e,o=de();if(!o||r===void 0||r===null)return Je("redux",o?"empty redux snapshot":"no Redux store instrumented");let{mechanism:a}=ue();if(a==="patch")return Je("redux",`restore unavailable on auto-instrumented stores \u2014 ${Re}`);let n=Lr(t),c=Object.keys(r.state??{}).filter(u=>!n.touch(u)),l=r.state;if(c.length>0){let u=o.getState(),p={...r.state};for(let f of c)p[f]=u?.[f];l=p}if(o.dispatch({type:Se,payload:l}),o.getState()===l){let u=c.length>0?[`${c.length} slice(s) excluded by you`]:[];return{ok:true,applied:1,skipped:[],warnings:u}}return Je("redux",`store ignored the state jump \u2014 ${Re}`)}async function ao(e,t){let r=e?.state,o=t===void 0,a=de(),n=o?a?.getState():t?.state,c=[],l=[],u;if(o){let{mechanism:I,hasStore:S}=ue();S?I==="patch"&&(u=`auto-instrumented store cannot be restored \u2014 ${Re}`):u="no Redux store instrumented"}let p=n??{},f=r??{};for(let I of Nr(p,f)){let S=Or({key:I,label:I,oldValue:p[I],newValue:f[I],inOld:Object.prototype.hasOwnProperty.call(p,I),inNew:Object.prototype.hasOwnProperty.call(f,I)},{tooLargeReason:"slice too large to render a diff \u2014 restore still applies it"});u&&(S=jr(S,u)),c.push(S)}return u&&l.push(`Redux restore unavailable: ${u}`),{items:c,notes:l}}Pr({id:"redux",label:"Redux",status:to,capture:ro,restore:oo,previewItems:ao});function rt(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...o)=>t(r(...o)))}function Pt(e){return Et(),(t,r)=>r&&r.type===Se?r.payload:e(t,r)}function no(e){if(typeof e!="object"||e===null)return false;let t=e.type;return typeof t!="string"?false:!t.startsWith("@@buoy/")&&!t.startsWith("@@redux/")}var ke=e=>(t,r)=>{let o=e(Pt(t),r),a={...o,dispatch:n=>{if(!no(n)||zt())return o.dispatch(n);let c=performance.now(),l=o.getState(),u=o.dispatch(n);return m.addAction(n,l,o.getState(),performance.now()-c),u},replaceReducer:n=>o.replaceReducer(Pt(n)),[Ge]:true};return ce(a,"enhancer"),a};function io(...e){return e.length===0?rt(ke):e.length===1&&typeof e[0]=="object"&&e[0]!==null?(...t)=>rt(...t,ke):rt(...e,ke)}var ot=false;function Nt(){if(!(typeof Rt<"u"&&Rt))return false;let e=globalThis;return e.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||(e.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__=io,ot=true),ot}function lo(){return ot}Nt();import{useState as Ee,useMemo as we,useRef as Ve,useCallback as te,useEffect as jt}from"react";var Ft={};$r(Ft,{AccessibilityInfo:()=>po,ActivityIndicator:()=>ia,Alert:()=>ca,Animated:()=>go,AppRegistry:()=>fo,AppState:()=>yo,Appearance:()=>ho,BackHandler:()=>mo,Button:()=>la,CheckBox:()=>$o,Clipboard:()=>bo,DeviceEventEmitter:()=>Yo,Dimensions:()=>xo,Easing:()=>Co,FlatList:()=>Wt,I18nManager:()=>So,Image:()=>zo,ImageBackground:()=>Oo,InteractionManager:()=>To,Keyboard:()=>wo,KeyboardAvoidingView:()=>Lo,LayoutAnimation:()=>vo,Linking:()=>Io,LogBox:()=>Ko,Modal:()=>aa,NativeEventEmitter:()=>Ao,NativeModules:()=>uo,PanResponder:()=>Do,Picker:()=>Po,PixelRatio:()=>Bo,Platform:()=>Ro,Pressable:()=>oa,ProgressBar:()=>No,RefreshControl:()=>jo,SafeAreaView:()=>Fo,ScrollView:()=>$e,SectionList:()=>Wo,Share:()=>ko,StatusBar:()=>Mo,StyleSheet:()=>pe,Switch:()=>na,Text:()=>h,TextInput:()=>ea,Touchable:()=>Ho,TouchableHighlight:()=>ta,TouchableNativeFeedback:()=>_o,TouchableOpacity:()=>J,TouchableWithoutFeedback:()=>ra,UIManager:()=>Eo,Vibration:()=>Vo,View:()=>i,VirtualizedList:()=>qo,YellowBox:()=>Uo,findNodeHandle:()=>sa,unstable_createElement:()=>co,useColorScheme:()=>Jo,useLocaleContext:()=>Go,useWindowDimensions:()=>Xo});zr(Ft,so);import*as so from"react-native-web";import{unstable_createElement as co,NativeModules as uo,AccessibilityInfo as po,Animated as go,Appearance as ho,AppRegistry as fo,AppState as yo,BackHandler as mo,Clipboard as bo,Dimensions as xo,Easing as Co,I18nManager as So,Keyboard as wo,InteractionManager as To,LayoutAnimation as vo,Linking as Io,NativeEventEmitter as Ao,PanResponder as Do,PixelRatio as Bo,Platform as Ro,Share as ko,StyleSheet as pe,UIManager as Eo,Vibration as Vo,CheckBox as $o,FlatList as Wt,Image as zo,ImageBackground as Oo,KeyboardAvoidingView as Lo,Picker as Po,ProgressBar as No,RefreshControl as jo,SafeAreaView as Fo,SectionList as Wo,StatusBar as Mo,Touchable as Ho,TouchableNativeFeedback as _o,VirtualizedList as qo,YellowBox as Uo,LogBox as Ko,DeviceEventEmitter as Yo,useColorScheme as Jo,useLocaleContext as Go,useWindowDimensions as Xo}from"react-native-web";import*as H from"react-native-web";import{createElement as Qo,forwardRef as Zo}from"react";function q(e){let t=Zo((o,a)=>{let{accessibilityState:n,accessibilityValue:c,...l}=o;for(let u of["busy","checked","disabled","expanded","selected"])n?.[u]!==void 0&&l[`aria-${u}`]===void 0&&(l[`aria-${u}`]=n[u]);for(let[u,p]of Object.entries({min:"valuemin",max:"valuemax",now:"valuenow",text:"valuetext"}))c?.[u]!==void 0&&l[`aria-${p}`]===void 0&&(l[`aria-${p}`]=c[u]);return Qo(e,{...l,ref:a})}),r=e.State;return r&&Object.assign(t,{State:r}),t.displayName=e.displayName??e.name??"NativeWebView",t}var i=q(H.View),h=q(H.Text),ea=q(H.TextInput),J=q(H.TouchableOpacity),ta=q(H.TouchableHighlight),ra=q(H.TouchableWithoutFeedback),oa=q(H.Pressable),$e=q(H.ScrollView),aa=q(H.Modal),na=q(H.Switch),ia=q(H.ActivityIndicator),la=q(H.Button),sa=H.findNodeHandle,ca={alert(e,t,r,o){if(typeof document>"u")return;let a=document.createElement("dialog");a.dataset.buoyRoot="",a.setAttribute("aria-label",e),a.style.cssText="position:fixed;inset:0;margin:auto;width:min(440px,90vw);padding:24px;border:1px solid #475569;border-radius:14px;background:#17212e;color:#f1f5f9;font:14px system-ui;box-shadow:0 20px 80px #0008;z-index:2147483647";let n=document.createElement("h2");if(n.textContent=e,n.style.cssText="font-size:18px;margin:0 0 12px",a.appendChild(n),t){let p=document.createElement("p");p.textContent=t,p.style.cssText="line-height:1.5;white-space:pre-wrap;margin:0 0 20px",a.appendChild(p)}let c=document.createElement("div");c.style.cssText="display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px";let l=r?.length?r:[{text:"OK"}],u=()=>{a.close?.(),a.remove()};for(let p of l){let f=document.createElement("button");f.type="button",f.textContent=p.text??"OK",f.style.cssText=`padding:9px 14px;border:1px solid #64748b;border-radius:7px;color:white;background:${p.style==="destructive"?"#a52b38":"#283a4d"};cursor:pointer;font:inherit`,f.onclick=()=>{u(),p.onPress?.()},c.appendChild(f)}a.addEventListener("cancel",p=>{p.preventDefault(),o?.cancelable!==false&&(u(),o?.onDismiss?.())}),a.appendChild(c),document.body.appendChild(a),a.showModal?a.showModal():a.setAttribute("open","")}};import{JsModal as da,ModalHeader as re,macOSColors as G,night as w,Search as ua,Trash2 as pa,Power as ga,Zap as ha,CheckCircle as fa,Copy as ya,Lock as ma,AlertTriangle as Mt,devToolsStorageKeys as ba,copyToClipboard as xa,ProUpgradeModal as Ca,PowerToggleButton as Sa,TickProvider as Ht,useLimit as wa,TIER_LIMITS as Ta,windowDragProps as va,ToolEmptyState as Ia,resolveListEmptyState as Aa,EVENT_LIST_PRESET as Da,monoFont as Ba}from"@buoy-gg/shared-ui/web";import{useIsPro as Ra}from"@buoy-gg/license/web";import{useState as ka,useMemo as _t,useCallback as qt}from"react";import{useChangeLog as Ea}from"@buoy-gg/shared-ui/web";var Va=(e,t)=>m.filterActions(t);function Ut(){let e=Ea(m,{filterItems:Va}),[t,r]=ka(null),o=_t(()=>m.getStats(),[e.items]),a=_t(()=>m.getUniqueActionTypes(),[e.items]),n=qt(()=>{m.clearActions(),r(null)},[]),c=qt(l=>m.getActionById(l),[]);return{actions:e.items,filteredActions:e.filteredItems,filter:e.filter,setFilter:e.setFilter,stats:o,clearActions:n,isEnabled:e.isEnabled,toggleCapture:e.toggleCapture,actionTypes:a,getActionById:c,selectedAction:t,setSelectedAction:r}}import{useStore as $a}from"react-redux";function Kt(){return $a}import{useEffect as za,useState as ze,useRef as Yt,useCallback as Jt}from"react";var Te=Symbol.for("@@buoy/instrumented"),at=Symbol.for("@@buoy/originalDispatch");function Oa(e){let t=e;return t[Te]===true||t[Ge]===true}function nt(e,t={}){let r=e;if(r[Ge])return ce(e,"enhancer"),()=>{};if(zt())return ce(e,"middleware"),()=>{};if(r[Te])return ce(e,"patch"),()=>{};let{maxActions:o=200,ignoreActions:a=[]}=t;m.setMaxActions(o);let n=e.dispatch.bind(e);r[at]=n;let c=(l=>{if(typeof l!="object"||l===null||typeof l.type!="string")return n(l);let u=l.type;if(u.startsWith("@@buoy/")||u.startsWith("@@redux/")||a.includes(u))return n(l);let p=performance.now(),f=e.getState(),I=n(l),S=e.getState(),O=performance.now()-p;return m.addAction(l,f,S,O),I});return e.dispatch=c,r[Te]=true,ce(e,"patch"),()=>{it(e)}}function it(e){let t=e;if(t[Te]){let r=t[at];r&&(e.dispatch=r),delete t[Te],delete t[at]}Fr(e)}function La(e,t={}){return nt(e,t)}function lt(){return de()}function Pa(){return de()!==null}function st(e={}){let{autoStart:t=true}=e,r=Yt(e);r.current=e;let[o,a]=ze(false),[n,c]=ze(true),[l,u]=ze(null),[p,f]=ze(null),I=Yt(null),S=Kt(),O=S!==null,L=null,V=null,$=null;if(S)try{L=S()}catch(P){$="no-provider",V=P instanceof Error?P.message:"Failed to access Redux store. Make sure your app is wrapped in a Redux Provider."}else $="no-react-redux",V="react-redux is not installed or not available";let F=Jt(()=>{if(!L){Wr($),u(V||"No Redux store available"),c(false);return}try{let P=nt(L,r.current);I.current=P,a(true),f(L),u(null)}catch(P){u(P instanceof Error?P.message:"Failed to instrument Redux store"),a(false)}finally{c(false)}},[L]),B=Jt(()=>{I.current&&(I.current(),I.current=null),p&&it(p),a(false),f(null)},[p]);return za(()=>(t?F():c(false),()=>{}),[t,F]),{isInstrumented:o,isLoading:n,error:l,isReactReduxAvailable:O,captureMechanism:ue().mechanism,startInstrumentation:F,stopInstrumentation:B,store:p}}function Na(){let e=Kt();if(!e)return{isAvailable:false,error:"react-redux is not installed"};try{let t=e();return{isAvailable:t!=null,error:null}}catch(t){return{isAvailable:false,error:t instanceof Error?t.message:"Not inside a Redux Provider"}}}import{memo as ja}from"react";import{ChangeRow as ve,buoyColors as oe,AlertCircle as Fa,monoFont as Wa}from"@buoy-gg/shared-ui/web";import{jsx as ae,jsxs as Gt}from"react/jsx-runtime";var Xt=[{bg:"rgba(99, 102, 241, 0.25)",text:"#818CF8"},{bg:"rgba(236, 72, 153, 0.25)",text:"#F472B6"},{bg:"rgba(14, 165, 233, 0.25)",text:"#38BDF8"},{bg:"rgba(245, 158, 11, 0.25)",text:"#FBBF24"},{bg:"rgba(16, 185, 129, 0.25)",text:"#34D399"},{bg:"rgba(168, 85, 247, 0.25)",text:"#C084FC"},{bg:"rgba(239, 68, 68, 0.25)",text:"#F87171"},{bg:"rgba(20, 184, 166, 0.25)",text:"#2DD4BF"}];function Ma(e){return e<=0?{bg:"rgba(142, 142, 147, 0.2)",text:oe.textSecondary}:Xt[(e-1)%Xt.length]}var ct={cart:"#10B981",user:"#3B82F6",auth:"#8B5CF6",app:"#6366F1",ui:"#EC4899",settings:"#F59E0B",api:"#14B8A6",data:"#06B6D4"};function Ha(e){if(!e)return"#6B7280";let t=e.toLowerCase();if(ct[t])return ct[t];for(let[r,o]of Object.entries(ct))if(t.includes(r))return o;return`hsl(${e.split("").reduce((r,o)=>r+o.charCodeAt(0),0)*137%360}, 70%, 60%)`}function _a(e,t){switch(e){case"pending":return"Pending";case"fulfilled":return"Success";case"rejected":return"Error";case"internal":return"Internal";case"query":return"Query";case"mutation":return"Mutation";default:return t?t.charAt(0).toUpperCase()+t.slice(1):"Action"}}function qa(e,t,r){switch(e){case"pending":return oe.warning;case"fulfilled":return oe.success;case"rejected":return oe.error;case"internal":return oe.textMuted;case"query":return oe.info;case"mutation":return oe.info;default:return Ha(r)}}function Ua(e){let t=[];return e.duration!==void 0&&e.duration>=.1&&t.push(`${e.duration.toFixed(1)}ms`),e.hasStateChange?e.changedKeysCount&&e.changedKeysCount>0?t.push(`${e.changedKeysCount} key${e.changedKeysCount>1?"s":""} changed`):t.push(e.diffSummary||"state changed"):t.push("no state change"),t.join(" \xB7 ")}function Ka(e){return e.actionName?.toUpperCase()||e.type.split("/").pop()?.toUpperCase()||""}function Ya(e){if(e.category==="internal")return e.type;let t=e.type.split("/");return t.length>=3&&["pending","fulfilled","rejected"].includes(t[t.length-1])?t.slice(0,-1).join("/"):e.type}var Qt=ja(function({action:e,onPress:t,linkedCount:r,testID:o}){let a=e.sliceName??void 0,n=qa(e.category,e.hasStateChange,a),c=_a(e.category,a),l=Ua(e),u=Ya(e),p=Ka(e),f=(r??0)>1,I=f?m.getLinkedActions(e):[],S=f?I.findIndex(F=>F.id===e.id)+1:0,O=f&&e.meta?.requestId?m.getAsyncOperationIndex(e.meta.requestId):0,L=Ma(O),V=f?ae(i,{style:[Oe.asyncSequenceBadge,{backgroundColor:L.bg}],children:Gt(h,{style:[Oe.asyncSequenceText,{color:L.text}],testID:o?`${o}-seq`:void 0,children:[S,"/",r," #",O]})}):void 0,$={statusColor:n,statusLabel:c,sublabel:l,primaryText:u,timestamp:e.timestamp,onPress:()=>t(e),testID:o,accessibilityLabel:`${u}, ${c}, ${l}`};return e.isSlowAction?ae(ve,{...$,badgePrefix:V,slow:true}):e.category==="rejected"?ae(ve,{...$,customBadge:Gt(i,{style:Oe.badgeContainer,children:[V,ae(i,{style:Oe.errorBadge,testID:o?`${o}-error`:void 0,children:ae(Fa,{size:12,color:oe.error})})]})}):f?ae(ve,{...$,badgePrefix:V,changed:e.hasStateChange}):e.hasStateChange?ae(ve,{...$,badgeText:p,changed:true}):ae(ve,{...$,plainBadgeText:p})}),Oe=pe.create({badgeContainer:{flexDirection:"row",alignItems:"center",gap:4},errorBadge:{paddingHorizontal:4},asyncSequenceBadge:{paddingHorizontal:6,paddingVertical:2,borderRadius:4},asyncSequenceText:{fontSize:10,fontWeight:"600",fontFamily:Wa}});import{useState as Zt,useCallback as Le,useMemo as er}from"react";import{macOSColors as Ie,night as X,EventStepperFooter as tr,formatRelativeTime as Pe,parseValue as Ne,monoFont as Ae}from"@buoy-gg/shared-ui/web";import{DataViewer as Ja,SplitDiffViewer as Ga,TreeDiffViewer as Xa,diffThemes as Qa}from"@buoy-gg/shared-ui/web/dataViewer";import{memo as Za}from"react";import{DetailViewToggle as en,FileText as tn,Database as rn,GitBranch as on}from"@buoy-gg/shared-ui/web";import{jsx as an}from"react/jsx-runtime";var nn=[{key:"action",label:"ACTION",description:"View action details",icon:tn},{key:"state",label:"STATE",description:"View current state",icon:rn},{key:"diff",label:"DIFF",description:"Compare changes",icon:on}],ln=["diff"],sn=Za(function({activeView:e,onViewChange:t,diffDisabled:r=false}){return an(en,{views:nn,activeView:e,onViewChange:t,disabledKeys:r?ln:void 0,testIDPrefix:"buoy-redux"})});import{memo as cn,useMemo as dn,useCallback as je,useState as un,useEffect as pn}from"react";import{buoyColors as A,night as x,Clock as gn,AlertTriangle as hn,Zap as fn,Hash as rr,Info as yn,Box as mn,AlertCircle as bn,FileText as xn,parseValue as Fe,ProUpgradeModal as Cn,copyToClipboard as or,InfoRow as ne,monoFont as ie}from"@buoy-gg/shared-ui/web";import{useIsPro as Sn}from"@buoy-gg/license/web";import{DataViewer as We}from"@buoy-gg/shared-ui/web/dataViewer";import{night as D,monoFont as wn}from"@buoy-gg/shared-ui/web";import{jsx as ar,jsxs as Tn}from"react/jsx-runtime";var vn={replay:{color:D.color.accent,backgroundColor:D.color.accent+"15",borderColor:D.color.accent+"40",textColor:D.color.accent},copy:{color:D.color.accent,backgroundColor:D.color.accent+"15",borderColor:D.color.accent+"40",textColor:D.color.accent},jump:{color:D.color.warning,backgroundColor:D.color.warning+"15",borderColor:D.color.warning+"40",textColor:D.color.warning},skip:{color:D.color.textSecondary,backgroundColor:D.color.textSecondary+"26",borderColor:D.color.textSecondary+"59",textColor:D.color.textSecondary},clear:{color:D.color.danger,backgroundColor:D.color.danger+"15",borderColor:D.color.danger+"40",textColor:D.color.danger},diff:{color:D.color.info,backgroundColor:D.color.info+"15",borderColor:D.color.info+"40",textColor:D.color.info}};function Me({onPress:e,text:t,type:r,disabled:o=false,testID:a}){let n=vn[r];return Tn(J,{testID:a,disabled:o,onPress:e,style:[dt.button,{backgroundColor:o?D.color.textTertiary+"1A":n.backgroundColor,borderColor:o?D.color.textTertiary+"33":n.borderColor,opacity:o?.5:1}],activeOpacity:.7,accessibilityRole:"button",accessibilityLabel:t,accessibilityState:{disabled:o},children:[ar(i,{style:[dt.dot,{backgroundColor:o?D.color.textTertiary:n.color}]}),ar(h,{style:[dt.text,{color:o?D.color.textTertiary:n.textColor}],children:t})]})}var dt=pe.create({button:{flexDirection:"row",alignItems:"center",justifyContent:"center",borderRadius:6,borderWidth:1,paddingHorizontal:12,paddingVertical:6,height:25,minWidth:80,shadowOffset:{width:0,height:1},shadowOpacity:.2,shadowRadius:2,elevation:2},dot:{width:5,height:5,borderRadius:3,marginRight:6,shadowColor:D.color.text,shadowOffset:{width:0,height:0},shadowOpacity:.6,shadowRadius:2},text:{fontSize:10,fontWeight:"600",letterSpacing:.5,textTransform:"uppercase",fontFamily:wn,height:12}});var g="buoy-redux";function nr(e){return String(e??"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"unknown"}function ir(e,t){return`${g}-row-${nr(e)}-${t}`}function lr(e){let t=new Map,r=new Map;for(let o of e){let a=(t.get(o.type)??0)+1;t.set(o.type,a),r.set(o.id,ir(o.type,a))}return r}import{jsx as d,jsxs as R}from"react/jsx-runtime";function sr(e){switch(e){case"pending":return{label:"PENDING",color:A.warning,bgColor:A.warning+"26"};case"fulfilled":return{label:"FULFILLED",color:A.success,bgColor:A.success+"26"};case"rejected":return{label:"REJECTED",color:A.error,bgColor:A.error+"26"};case"internal":return{label:"INTERNAL",color:A.textMuted,bgColor:A.textMuted+"26"};case"query":return{label:"QUERY",color:A.info,bgColor:A.info+"26"};case"mutation":return{label:"MUTATION",color:A.info,bgColor:A.info+"26"};default:return{label:"ACTION",color:A.info,bgColor:A.info+"26"}}}function In(e){return e===void 0?"N/A":e<1?"<1ms":`${e.toFixed(1)}ms`}function xe({icon:e,title:t,badge:r,testID:o}){return R(i,{style:s.sectionHeader,testID:o,children:[R(i,{style:s.sectionHeaderLeft,children:[d(e,{size:14,color:x.color.accent}),d(h,{style:s.sectionTitle,children:t})]}),r]})}function An(e){let t=new Date(e),r=t.getHours().toString().padStart(2,"0"),o=t.getMinutes().toString().padStart(2,"0"),a=t.getSeconds().toString().padStart(2,"0"),n=t.getMilliseconds().toString().padStart(3,"0");return`${r}:${o}:${a}.${n}`}var Dn=cn(function({action:e,onNavigateToAction:t}){let r=Sn(),[o,a]=un(false);pn(()=>{o&&r&&a(false)},[o,r]);let n=sr(e.category),c=ee(e.nextState),l=Qe(),u=c||!l,p=e.payload!==void 0,f=e.meta&&Object.keys(e.meta).length>0,I=e.error!==void 0,S=dn(()=>m.getLinkedActions(e),[e]),O=S.length>1,L=O?m.getBaseActionType(e.type):null,V=e.meta?.requestId?m.getAsyncOperationDuration(e.meta.requestId):null,$=je(async()=>{if(!r){a(true);return}await or(e.action)},[e,r]),F=je(async()=>{if(!r){a(true);return}await or(e.payload)},[e.payload,r]),B=je(()=>{e.action&&typeof e.action=="object"&&"type"in e.action&&Lt(e.action)},[e]),P=je(()=>{e.nextState!==void 0&&Ot(e.nextState)},[e]);return R($e,{testID:`${g}-detail-scroll`,style:s.container,contentContainerStyle:s.contentContainer,showsVerticalScrollIndicator:false,children:[R(i,{style:s.card,testID:`${g}-info-card`,children:[d(xe,{icon:yn,title:"ACTION INFO"}),R(i,{style:s.cardContent,children:[d(ne,{label:"Type",value:e.type,mono:true,testID:`${g}-info-type`}),e.sliceName&&d(ne,{label:"Slice",value:e.sliceName,mono:true,testID:`${g}-info-slice`}),d(ne,{label:"Action",value:e.actionName,mono:true,testID:`${g}-info-action`}),R(i,{style:s.badgeRow,children:[d(i,{style:[s.categoryBadge,{backgroundColor:n.bgColor}],children:d(h,{style:[s.categoryText,{color:n.color}],testID:`${g}-info-category`,children:n.label})}),R(i,{style:[s.durationBadge,e.isSlowAction&&s.durationBadgeSlow],children:[d(gn,{size:10,color:e.isSlowAction?A.error:x.color.textSecondary}),d(h,{style:[s.durationText,e.isSlowAction&&s.durationTextSlow],testID:`${g}-info-duration`,children:In(e.duration)}),e.isSlowAction&&d(hn,{size:10,color:A.error})]}),e.hasStateChange?R(i,{style:s.changesBadge,children:[d(fn,{size:10,color:A.success}),d(h,{style:s.changesText,testID:`${g}-info-changes`,children:e.diffSummary||"changed"})]}):d(i,{style:s.noChangesBadge,children:d(h,{style:s.noChangesText,testID:`${g}-info-no-changes`,children:"no change"})})]})]})]}),O&&R(i,{style:s.card,testID:`${g}-async-card`,children:[d(xe,{icon:rr,title:"ASYNC FLOW",badge:d(i,{style:s.asyncBadge,children:R(h,{style:s.asyncBadgeText,testID:`${g}-async-count`,children:[S.length," ACTIONS"]})})}),R(i,{style:s.cardContent,children:[d(h,{style:s.baseActionType,testID:`${g}-async-base`,children:L}),V!==null&&R(i,{style:s.totalDurationRow,children:[d(h,{style:s.totalDurationLabel,children:"Total Duration"}),R(h,{style:s.totalDurationValue,testID:`${g}-async-total`,children:[V,"ms"]})]}),d(i,{style:s.timeline,children:S.map((M,W)=>{let Q=sr(M.category),Y=M.id===e.id;return R(J,{style:[s.timelineItem,Y&&s.timelineItemCurrent],onPress:()=>t?.(M),disabled:Y||!t,activeOpacity:.7,testID:`${g}-async-step-${W}`,children:[W<S.length-1&&d(i,{style:s.timelineConnector}),d(i,{style:[s.timelineDot,{backgroundColor:Q.color}]}),R(i,{style:s.timelineContent,children:[R(i,{style:s.timelineHeader,children:[d(i,{style:[s.timelineStatusBadge,{backgroundColor:Q.bgColor}],children:d(h,{style:[s.timelineStatusText,{color:Q.color}],testID:`${g}-async-step-${W}-status`,children:Q.label})}),Y&&d(i,{style:s.currentBadge,testID:`${g}-async-step-${W}-current`,children:d(h,{style:s.currentBadgeText,children:"CURRENT"})})]}),d(h,{style:s.timelineTime,children:An(M.timestamp)})]})]},M.id)})})]})]}),p&&R(i,{style:s.card,testID:`${g}-payload-card`,children:[d(xe,{icon:mn,title:"PAYLOAD",badge:d(i,{style:s.typeBadge,children:d(h,{style:s.typeText,children:Array.isArray(e.payload)?"ARRAY":typeof e.payload=="object"?"OBJECT":typeof e.payload?.toString().toUpperCase()})})}),d(i,{style:s.dataViewerContainer,children:d(We,{title:"",data:Fe(e.payload),showTypeFilter:true,rawMode:true,initialExpanded:true})})]}),f&&R(i,{style:s.card,testID:`${g}-meta-card`,children:[d(xe,{icon:rr,title:"ASYNC METADATA",badge:d(i,{style:[s.categoryBadge,{backgroundColor:n.bgColor}],children:d(h,{style:[s.categoryText,{color:n.color}],children:"RTK THUNK"})})}),R(i,{style:s.cardContent,children:[e.meta?.requestId&&d(ne,{label:"Request ID",value:e.meta.requestId,mono:true}),e.meta?.requestStatus&&d(ne,{label:"Status",value:e.meta.requestStatus.toUpperCase(),valueColor:n.color,testID:`${g}-meta-status`}),e.meta?.arg!==void 0&&R(i,{style:s.argSection,children:[d(h,{style:s.argLabel,children:"Original Argument"}),d(i,{style:s.argValueContainer,children:typeof e.meta.arg=="object"?d(We,{title:"",data:Fe(e.meta.arg),showTypeFilter:true,rawMode:true,initialExpanded:true}):d(h,{style:s.argValue,children:JSON.stringify(e.meta.arg)})})]}),e.meta?.rejectedWithValue&&d(ne,{label:"Rejected With Value",value:"true",valueColor:A.error}),e.meta?.aborted&&d(ne,{label:"Aborted",value:"true",valueColor:A.warning}),e.meta?.condition&&d(ne,{label:"Condition",value:"true",valueColor:x.color.textTertiary})]})]}),I&&R(i,{style:[s.card,s.errorCard],testID:`${g}-error-card`,children:[d(xe,{icon:bn,title:"ERROR",badge:d(i,{style:s.errorBadge,children:d(h,{style:s.errorBadgeText,testID:`${g}-error-badge`,children:"REJECTED"})})}),d(i,{style:s.dataViewerContainer,children:typeof e.error=="object"?d(We,{title:"",data:Fe(e.error),showTypeFilter:true,rawMode:true,initialExpanded:true}):d(h,{style:s.errorText,children:String(e.error)})})]}),R(i,{style:s.card,testID:`${g}-full-action-card`,children:[d(xe,{icon:xn,title:"FULL ACTION OBJECT"}),d(i,{style:s.dataViewerContainer,children:d(We,{title:"",data:Fe(e.action),showTypeFilter:true,rawMode:true,initialExpanded:true})})]}),d(i,{style:s.actionFooter,children:R(i,{style:s.actionsGrid,children:[R(i,{style:s.actionButtonWrapper,children:[d(Me,{type:"replay",text:"REPLAY",onPress:B,testID:`${g}-replay`}),d(h,{style:s.actionDescription,children:"Dispatch again"})]}),R(i,{style:s.actionButtonWrapper,children:[d(Me,{type:"jump",text:"JUMP",onPress:P,disabled:u,testID:`${g}-jump`}),d(h,{style:s.actionDescription,testID:`${g}-jump-description`,children:c?"State not retained":l?"Restore this state":"Time travel not wired"})]}),R(i,{style:s.actionButtonWrapper,children:[d(Me,{type:"copy",text:"COPY ACTION",onPress:$,testID:`${g}-copy-action`}),d(h,{style:s.actionDescription,children:r?"Copy to clipboard":"Pro feature"})]}),p&&R(i,{style:s.actionButtonWrapper,children:[d(Me,{type:"copy",text:"COPY PAYLOAD",onPress:F,testID:`${g}-copy-payload`}),d(h,{style:s.actionDescription,children:r?"Copy payload only":"Pro feature"})]})]})}),d(Cn,{visible:o,onClose:()=>a(false),featureName:"Copy"})]})}),s=pe.create({container:{flex:1},contentContainer:{padding:8,paddingBottom:100,gap:16},card:{backgroundColor:x.color.surface,borderRadius:6,borderWidth:1,borderColor:x.color.accent+"4D",overflow:"hidden",shadowColor:x.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6},errorCard:{borderColor:A.error+"4D",shadowColor:A.error},sectionHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,paddingVertical:10,borderBottomWidth:1,borderBottomColor:x.color.accent+"33",backgroundColor:x.color.accent+"15"},sectionHeaderLeft:{flexDirection:"row",alignItems:"center",gap:6},sectionTitle:{fontSize:12,fontWeight:"600",letterSpacing:.5,color:x.color.accent,fontFamily:ie},cardContent:{padding:14,gap:10},badgeRow:{flexDirection:"row",flexWrap:"wrap",gap:8,marginTop:6},categoryBadge:{paddingHorizontal:8,paddingVertical:3,borderRadius:4},categoryText:{fontSize:9,fontWeight:"700",letterSpacing:.3},durationBadge:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:8,paddingVertical:3,borderRadius:4,backgroundColor:x.color.surfaceElevated},durationBadgeSlow:{backgroundColor:A.error+"26"},durationText:{fontSize:9,fontWeight:"600",color:x.color.textSecondary,fontFamily:ie},durationTextSlow:{color:A.error},changesBadge:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:8,paddingVertical:3,borderRadius:4,backgroundColor:A.success+"26"},changesText:{fontSize:9,fontWeight:"600",color:A.success},noChangesBadge:{paddingHorizontal:8,paddingVertical:3,borderRadius:4,backgroundColor:x.color.surfaceElevated},noChangesText:{fontSize:9,fontWeight:"600",color:x.color.textTertiary},typeBadge:{paddingHorizontal:6,paddingVertical:2,borderRadius:3,backgroundColor:x.color.surfaceElevated},typeText:{fontSize:8,fontWeight:"600",color:x.color.textTertiary,fontFamily:ie},dataViewerContainer:{backgroundColor:x.color.bg,minHeight:60},argSection:{marginTop:4},argLabel:{fontSize:11,color:x.color.textTertiary,fontWeight:"500",marginBottom:6},argValueContainer:{backgroundColor:x.color.bg,borderRadius:6,borderWidth:1,borderColor:x.color.border,overflow:"hidden"},argValue:{fontSize:11,color:x.color.text,fontFamily:ie,padding:10},errorBadge:{paddingHorizontal:8,paddingVertical:3,borderRadius:4,backgroundColor:A.error+"26"},errorBadgeText:{fontSize:9,fontWeight:"700",color:A.error,letterSpacing:.3},errorText:{fontSize:12,color:A.error,fontFamily:ie,padding:14},asyncBadge:{paddingHorizontal:8,paddingVertical:3,borderRadius:4,backgroundColor:x.color.accent+"26"},asyncBadgeText:{fontSize:9,fontWeight:"700",color:x.color.accent,letterSpacing:.3},baseActionType:{fontSize:12,fontWeight:"600",color:x.color.text,fontFamily:ie,marginBottom:8},totalDurationRow:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:12,paddingBottom:12,borderBottomWidth:1,borderBottomColor:x.color.border},totalDurationLabel:{fontSize:11,color:x.color.textTertiary,fontWeight:"500"},totalDurationValue:{fontSize:14,fontWeight:"700",color:A.success,fontFamily:ie},timeline:{gap:0},timelineItem:{flexDirection:"row",alignItems:"flex-start",paddingVertical:8,paddingHorizontal:8,borderRadius:8,position:"relative"},timelineItemCurrent:{backgroundColor:x.color.accentSoft},timelineConnector:{position:"absolute",left:13,top:24,bottom:-8,width:2,backgroundColor:x.color.border},timelineDot:{width:12,height:12,borderRadius:6,marginRight:10,marginTop:2},timelineContent:{flex:1},timelineHeader:{flexDirection:"row",alignItems:"center",gap:8,marginBottom:2},timelineStatusBadge:{paddingHorizontal:6,paddingVertical:2,borderRadius:4},timelineStatusText:{fontSize:9,fontWeight:"700",letterSpacing:.3},currentBadge:{paddingHorizontal:6,paddingVertical:2,borderRadius:4,backgroundColor:x.color.accent},currentBadgeText:{fontSize:8,fontWeight:"700",color:x.color.onAccent,letterSpacing:.3},timelineTime:{fontSize:10,color:x.color.textTertiary,fontFamily:ie},actionFooter:{backgroundColor:x.color.surface,borderRadius:6,borderWidth:1,borderColor:x.color.accent+"4D",paddingVertical:12,paddingHorizontal:12,shadowColor:x.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6},actionsGrid:{flexDirection:"row",flexWrap:"wrap",gap:12,justifyContent:"flex-start"},actionButtonWrapper:{alignItems:"center",gap:4},actionDescription:{fontSize:9,color:x.color.textTertiary,textAlign:"center"}});import{DiffModeTabs as Bn,CompareBar as Rn}from"@buoy-gg/shared-ui/web";import{jsx as k,jsxs as ge}from"react/jsx-runtime";function ut(e){return e.includes("/pending")?Ie.semantic.warning:e.includes("/fulfilled")?Ie.semantic.success:e.includes("/rejected")?Ie.semantic.error:e.startsWith("@@")?Ie.text.muted:Ie.semantic.info}function cr(e){if(e.includes("/pending"))return"PENDING";if(e.includes("/fulfilled"))return"FULFILLED";if(e.includes("/rejected"))return"REJECTED";if(e.startsWith("@@"))return"INTERNAL";let t=e.split("/");return t[t.length-1]?.toUpperCase()||"ACTION"}function kn(e){return e===null?"null":e===void 0?"undefined":Array.isArray(e)?"array":typeof e}function dr(e){return new Date(e).toLocaleTimeString("en-US",{hour12:false,hour:"2-digit",minute:"2-digit",second:"2-digit"})}var En=[{key:"tree",label:"TREE VIEW"},{key:"split",label:"SPLIT VIEW"}];function ur({action:e,actions:t,selectedIndex:r,onIndexChange:o,disableInternalFooter:a=false,initialView:n="action"}){let[c,l]=Zt(n),[u,p]=Zt("tree"),f=t.length,I=ee(e.nextState),S=ut(e.type),O=cr(e.type),L=kn(Ne(e.nextState)),V=f-r,$=V-1,F=r<f-1?r+1:null,B=F!==null?t[F]:null,P=er(()=>({index:F??0,label:$>0?`#${$}`:"Initial",timestamp:B?dr(B.timestamp):"",relativeTime:B?Pe(new Date(B.timestamp)):"state",badge:B?k(i,{style:[E.actionBadgeSmall,{backgroundColor:`${ut(B.type)}20`}],children:k(h,{style:[E.actionTextSmall,{color:ut(B.type)}],children:cr(B.type)})}):void 0}),[F,B,$]),M=er(()=>({index:r,label:`#${V}`,timestamp:dr(e.timestamp),relativeTime:Pe(new Date(e.timestamp)),badge:k(i,{style:[E.actionBadgeSmall,{backgroundColor:`${S}20`}],children:k(h,{style:[E.actionTextSmall,{color:S}],children:O})})}),[r,e.timestamp,S,O,V]),W=Le(()=>{if(I)return ge(i,{style:E.contentCard,testID:`${g}-state-evicted`,children:[k(i,{style:E.valueHeader,children:k(h,{style:E.valueLabel,children:"STATE AFTER ACTION"})}),k(h,{style:E.evictedText,children:`Not retained. Raw state is kept for the ${Ze} most recent actions, so this action's before/after trees have been released.`})]});let he=Ne(e.nextState);return ge(i,{style:E.contentCard,testID:`${g}-state-card`,children:[ge(i,{style:E.valueHeader,children:[k(h,{style:E.valueLabel,children:"STATE AFTER ACTION"}),ge(i,{style:E.valueHeaderBadges,children:[k(i,{style:[E.actionBadge,{backgroundColor:`${S}20`}],children:k(h,{style:[E.actionText,{color:S}],children:O})}),k(i,{style:E.typeBadge,children:k(h,{style:E.typeText,testID:`${g}-state-type`,children:L.toUpperCase()})})]})]}),k(i,{style:E.dataViewerContainer,children:k(Ja,{title:"",data:he,showTypeFilter:true,rawMode:true,initialExpanded:true})})]})},[e.nextState,S,O,L,I]),Q=Le(()=>{let he=Ne(e.prevState),fe=Ne(e.nextState);return u==="split"?k($e,{style:{flex:1},showsVerticalScrollIndicator:true,children:k(Ga,{oldValue:he,newValue:fe,theme:Qa.devToolsDefault,options:{hideLineNumbers:false,disableWordDiff:false,showDiffOnly:false,compareMethod:"words",contextLines:3},showThemeName:false})}):k(Xa,{oldValue:he,newValue:fe})},[e.prevState,e.nextState,u]),Y=Le(()=>{o(Math.min(f-1,r+1))},[r,f,o]),Ue=Le(()=>{o(Math.max(0,r-1))},[r,o]),N=I||ee(e.prevState)||e.prevState===void 0,Z=!a&&f>1;return ge(i,{style:E.container,children:[k(sn,{activeView:c,onViewChange:l,diffDisabled:N}),ge(i,{style:[E.contentArea,Z&&E.contentAreaFooterPad],children:[c==="action"&&k(Dn,{action:e}),c==="state"&&k(i,{style:E.stateContainer,children:W()}),c==="diff"&&ge(i,{style:E.diffContainer,testID:`${g}-diff`,children:[k(Bn,{tabs:En,activeTab:u,onTabChange:p,testIDPrefix:`${g}-diff-tab`}),k(Rn,{leftEvent:P,rightEvent:M}),k(i,{style:E.diffContent,testID:`${g}-diff-content`,children:Q()})]})]}),Z&&k(tr,{currentIndex:V-1,totalItems:f,onPrevious:Y,onNext:Ue,itemLabel:"Action",subtitle:Pe(new Date(e.timestamp)),absolute:true})]})}function pr({action:e,actions:t,selectedIndex:r,onIndexChange:o}){let a=t.length;if(a<=1)return null;let n=a-r;return k(tr,{currentIndex:n-1,totalItems:a,onPrevious:()=>o(Math.min(a-1,r+1)),onNext:()=>o(Math.max(0,r-1)),itemLabel:"Action",subtitle:Pe(new Date(e.timestamp))})}var E=pe.create({container:{flex:1,backgroundColor:"transparent"},contentArea:{flex:1},contentAreaFooterPad:{paddingBottom:96},stateContainer:{flex:1,padding:14},contentCard:{backgroundColor:X.color.surface,borderRadius:14,padding:14,borderWidth:1,borderColor:X.color.border},valueHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:8},valueLabel:{fontSize:10,color:X.color.textSecondary,fontFamily:Ae,letterSpacing:.5,fontWeight:"600"},valueHeaderBadges:{flexDirection:"row",alignItems:"center",gap:6},actionBadge:{paddingHorizontal:8,paddingVertical:2,borderRadius:4},actionText:{fontSize:9,fontWeight:"700",fontFamily:Ae,letterSpacing:.3},typeBadge:{paddingHorizontal:8,paddingVertical:2,borderRadius:4,backgroundColor:X.color.surfaceElevated},typeText:{fontSize:9,fontWeight:"600",color:X.color.textTertiary,fontFamily:Ae},valueBox:{backgroundColor:X.color.bg,borderRadius:6,borderWidth:1,borderColor:X.color.border,padding:8},evictedText:{fontSize:12,color:X.color.textSecondary,lineHeight:18},valueText:{fontSize:12,color:X.color.text,fontFamily:Ae,lineHeight:18},diffContainer:{flex:1},diffContent:{flex:1,paddingHorizontal:14},actionBadgeSmall:{paddingHorizontal:6,paddingVertical:1,borderRadius:3},actionTextSmall:{fontSize:8,fontWeight:"700",fontFamily:Ae},dataViewerContainer:{marginTop:-12,marginHorizontal:-12,marginBottom:-12}});import{Fragment as Vn,jsx as y,jsxs as j}from"react/jsx-runtime";var $n=Ta["redux.actions"].free;function zn({isEnabled:e,query:t,totalActions:r}){let o=Aa({subject:"actions",search:t,total:r,capturing:e,waiting:{otto:"waiting",title:"No Redux actions",message:"Actions will appear here as they are dispatched"},paused:{title:"No Redux actions",message:"Enable capture to start recording actions"}});return y(Ia,{...o,testID:`${g}-empty`})}function pt({visible:e,onClose:t,onBack:r,onMinimize:o,enableSharedModalDimensions:a=false,inline:n=false,onActionSelect:c,initialSelectedActionId:l,initialDetailView:u}){let p=Ra(),f=wa("redux.actions"),[I,S]=Ee(false),{isInstrumented:O,isLoading:L,error:V,isReactReduxAvailable:$,captureMechanism:F}=st(),{filteredActions:B,filter:P,setFilter:M,stats:W,clearActions:Q,isEnabled:Y,toggleCapture:Ue}=Ut(),N=we(()=>B.slice(0,f),[B,f]),Z=we(()=>Math.max(0,B.length-f),[B.length,f]),he=Z>0,[fe,De]=Ee(null),ye=we(()=>{if(fe===null)return null;let b=N.findIndex(z=>z.id===fe);return b>=0?b:null},[fe,N]),K=ye!==null?N[ye]:null,ft=Ve(null);jt(()=>{if(!c)return;let b=K?.id??null;b===null||b===ft.current||(ft.current=b,c(K))},[K,c]);let yt=Ve(null);jt(()=>{!l||yt.current===l||N.findIndex(b=>b.id===l)<0||(yt.current=l,De(l))},[l,N]);let[Ce,mt]=Ee(""),[bt,Ke]=Ee(false),ri=Ve(null),br=Ve(null),xr=te(b=>{},[]),Cr=b=>{mt(b),M(z=>({...z,searchText:b}))},Sr=te(()=>{mt(""),M(b=>({...b,searchText:""})),Ke(false)},[M]),xt=te(b=>{De(b.id)},[]),wr=te(()=>{S(true)},[]),Tr=te(()=>{De(null)},[]),Ct=te(b=>{let z=N[b];z&&De(z.id)},[N]),vr=async()=>{if(!p){S(true);return}let b=B.map(z=>({id:z.id,type:z.type,...z.payload!==void 0&&{payload:z.payload},timestamp:z.timestamp,prevState:z.prevState,nextState:z.nextState,hasStateChange:z.hasStateChange}));await xa(b)},Ir=te(b=>b.id,[]),St=we(()=>lr(N),[N]),wt=we(()=>{let b=new Map;for(let z of m.getActions()){let Ye=z.meta?.requestId;Ye&&b.set(Ye,(b.get(Ye)??0)+1)}return b},[B]),Ar=te(({item:b})=>{let z=b.meta?.requestId;return y(Qt,{action:b,onPress:xt,linkedCount:z?wt.get(z)??0:0,testID:St.get(b.id)})},[xt,St,wt]),Tt=()=>K?j(re,{children:[y(re.Navigation,{onBack:Tr}),y(re.Content,{title:K.type,centered:true,testID:`${g}-detail-title`})]}):j(re,{children:[r&&y(re.Navigation,{onBack:r}),y(re.Content,{title:"",children:bt?y(re.Search,{value:Ce,onChangeText:Cr,onCancel:Sr,placeholder:"Search action types...",accessibilityLabel:"Search action types",iconSize:14,testID:`${g}-search-field`,containerTestID:`${g}-search`,clearTestID:`${g}-search-clear`,onBlur:()=>{Ce.length===0&&Ke(false)}}):j(i,{style:v.headerChipRow,children:[j(J,{style:[v.headerChip,!P.onlyWithChanges&&v.headerChipActive],onPress:()=>M(b=>({...b,onlyWithChanges:false})),testID:`${g}-chip-all`,accessibilityRole:"button",accessibilityLabel:`Show all actions, ${W.totalActions} captured`,accessibilityState:{selected:!P.onlyWithChanges},children:[y(h,{style:v.headerChipLabel,children:"ALL"}),y(h,{style:[v.headerChipValue,{color:w.color.text}],testID:`${g}-chip-all-value`,children:W.totalActions})]}),j(J,{style:[v.headerChip,P.onlyWithChanges&&v.headerChipActive],onPress:()=>M(b=>({...b,onlyWithChanges:true})),testID:`${g}-chip-changed`,accessibilityRole:"button",accessibilityLabel:`Show only actions that changed state, ${W.actionsWithChanges} of them`,accessibilityState:{selected:!!P.onlyWithChanges},children:[y(ha,{size:12,color:G.semantic.warning}),y(h,{style:[v.headerChipValue,{color:G.semantic.warning}],testID:`${g}-chip-changed-value`,children:W.actionsWithChanges})]}),j(i,{style:v.headerChip,testID:`${g}-chip-types`,accessibilityLabel:`${W.uniqueActionTypes} distinct action types`,children:[y(fa,{size:12,color:G.semantic.success}),y(h,{style:[v.headerChipValue,{color:G.semantic.success}],testID:`${g}-chip-types-value`,children:W.uniqueActionTypes})]})]})}),j(re.Actions,{children:[!bt&&y(J,{onPress:()=>Ke(true),style:[v.headerActionButton,Ce.length>0&&v.headerActionButtonActive],testID:`${g}-search-open`,accessibilityRole:"button",accessibilityLabel:"Search action types",children:y(ua,{size:14,color:Ce.length>0?w.color.accent:w.color.textSecondary})}),y(J,{onPress:vr,style:[v.headerActionButton,B.length===0&&v.headerActionButtonDisabled],disabled:B.length===0,testID:`${g}-copy`,accessibilityRole:"button",accessibilityLabel:"Copy all actions",accessibilityState:{disabled:B.length===0},children:y(ya,{size:14,color:B.length>0?w.color.textSecondary:w.color.textTertiary})}),y(Sa,{isEnabled:Y,onToggle:Ue,accessibilityLabel:"Toggle Redux action capture",testID:`${g}-power`}),y(J,{onPress:Q,style:[v.headerActionButton,B.length===0&&v.headerActionButtonDisabled],disabled:B.length===0,testID:`${g}-clear`,accessibilityRole:"button",accessibilityLabel:"Clear actions",accessibilityState:{disabled:B.length===0},children:y(pa,{size:14,color:B.length>0?w.color.textTertiary:w.color.textTertiary})})]})]}),Dr=a?ba.modal.root():"buoy-redux-modal";if(!e)return null;let vt=K&&ye!==null?y(pr,{action:K,actions:N,selectedIndex:ye,onIndexChange:Ct}):null,Br=K&&N.length>1?68:0,Rr=K==null,It=y(i,{style:v.container,children:K&&ye!==null?y(ur,{action:K,actions:N,selectedIndex:ye,onIndexChange:Ct,disableInternalFooter:true,initialView:u}):j(Vn,{children:[V&&!O&&!m.isCaptureSuppressed()&&j(i,{style:v.errorBanner,testID:`${g}-banner-error`,children:[y(Mt,{size:14,color:w.color.danger}),y(h,{style:v.errorText,children:$?"Not inside a Redux Provider. Wrap your app with <Provider store={store}>.":"react-redux not installed. Run: npm install react-redux"})]}),!Y&&O&&j(i,{style:v.disabledBanner,testID:`${g}-banner-disabled`,children:[y(ga,{size:14,color:w.color.warning}),y(h,{style:v.disabledText,children:"Action capture is disabled"})]}),F==="patch"&&!m.isCaptureSuppressed()&&j(i,{style:v.disabledBanner,testID:`${g}-banner-patch`,children:[y(Mt,{size:14,color:w.color.warning}),y(h,{style:v.disabledText,children:"Top-level capture only \u2014 thunk/RTK Query internals aren't visible. Put import '@buoy-gg/redux' first in your app entry (or add buoyReduxMiddleware) for full capture."})]}),he&&j(J,{style:v.lockedBanner,onPress:wr,activeOpacity:.8,testID:`${g}-locked`,accessibilityRole:"button",accessibilityLabel:`${Z} older ${Z===1?"action":"actions"} locked. Upgrade to see them.`,children:[y(ma,{size:14,color:w.color.accent}),j(h,{style:v.lockedText,testID:`${g}-locked-text`,children:[Z," older ",Z===1?"action":"actions"," locked"]}),y(i,{style:v.upgradeBadge,children:y(h,{style:v.upgradeBadgeText,children:"UPGRADE"})})]}),N.length>0?y(Wt,{ref:br,testID:`${g}-list`,data:N,renderItem:Ar,keyExtractor:Ir,contentContainerStyle:v.listContent,showsVerticalScrollIndicator:true,...Da}):y(zn,{isEnabled:Y,query:Ce,totalActions:W.totalActions})]})}),At=y(Ca,{visible:I,onClose:()=>S(false),featureName:"Full Action History"});return n?j(Ht,{children:[j(i,{style:v.inlineRoot,children:[y(i,{style:v.inlineHeader,...va,children:Tt()}),It,vt]}),At]}):j(Ht,{children:[y(da,{visible:e,onClose:t,onMinimize:o,persistenceKey:Dr,header:{showToggleButton:true,customContent:Tt()},onModeChange:xr,enablePersistence:true,initialMode:"bottomSheet",enableGlitchEffects:true,disableScrollWrapper:Rr,styles:{},footer:vt,footerHeight:Br,children:It}),At]})}function On(e={}){return y(pt,{...e,inline:true,visible:true,onClose:()=>{}})}var v=pe.create({inlineRoot:{flex:1,minHeight:0,backgroundColor:"transparent"},inlineHeader:{paddingHorizontal:12,paddingVertical:8,borderBottomWidth:1,borderBottomColor:G.border.default,backgroundColor:"transparent"},container:{flex:1,backgroundColor:"transparent"},headerChipRow:{flexDirection:"row",alignItems:"center",gap:8},headerChip:{flexDirection:"row",alignItems:"center",gap:4,backgroundColor:w.color.surfaceElevated,paddingHorizontal:10,paddingVertical:5,borderRadius:12,borderWidth:1,borderColor:w.color.border},headerChipActive:{backgroundColor:w.color.accentSoft,borderColor:w.color.accentBorderStrong},headerChipLabel:{fontSize:10,fontWeight:"700",color:w.color.textTertiary},headerChipValue:{fontSize:12,fontWeight:"600",fontFamily:Ba},headerActionButton:{width:32,height:32,borderRadius:8,backgroundColor:w.color.surfaceElevated,borderWidth:1,borderColor:w.color.border,alignItems:"center",justifyContent:"center"},headerActionButtonDisabled:{opacity:.55},headerActionButtonActive:{backgroundColor:w.color.accentSoft,borderColor:w.color.accentBorderStrong},startButton:{backgroundColor:G.semantic.successBackground,borderColor:G.semantic.success+"40"},stopButton:{backgroundColor:G.semantic.errorBackground,borderColor:G.semantic.error+"40"},errorBanner:{flexDirection:"row",alignItems:"center",gap:8,padding:10,marginHorizontal:12,marginTop:8,backgroundColor:w.color.dangerSoft,borderRadius:8,borderWidth:1,borderColor:w.color.danger+"20"},errorText:{color:w.color.danger,fontSize:11,flex:1},disabledBanner:{flexDirection:"row",alignItems:"center",gap:8,padding:10,marginHorizontal:12,marginTop:8,backgroundColor:w.color.warningSoft,borderRadius:8,borderWidth:1,borderColor:w.color.warning+"20"},disabledText:{color:w.color.warning,fontSize:11,flex:1},listContent:{paddingTop:8,paddingBottom:20},lockedBanner:{flexDirection:"row",alignItems:"center",gap:8,padding:10,marginHorizontal:12,marginTop:8,backgroundColor:w.color.accentSoft,borderRadius:8,borderWidth:1,borderColor:w.color.accentBorder},lockedText:{color:w.color.accent,fontSize:11,fontWeight:"500",flex:1},upgradeBadge:{backgroundColor:w.color.accent,paddingHorizontal:8,paddingVertical:3,borderRadius:4},upgradeBadgeText:{color:w.color.onAccent,fontSize:9,fontWeight:"700",letterSpacing:.5}});import{ReduxIcon as He,REDUX_ICON_COLOR as zi}from"@buoy-gg/floating-tools-core/web";import{createToolFactory as Ln,defineToolPreset as Pn}from"@buoy-gg/shared-ui/web";import{jsx as gr}from"react/jsx-runtime";var hr=Pn({id:"redux",name:"REDUX",description:"Redux action & state inspector",slot:"both",icon:({size:e})=>gr(He,{size:e}),component:pt,props:{enableSharedModalDimensions:false}}),Nn=Ln(hr,e=>({enableSharedModalDimensions:e.enableSharedModalDimensions??false}),e=>({icon:({size:t})=>gr(He,{size:t,color:e.iconColor})}));var jn={timeTravel:false,toggle:false,edit:false,diff:true,export:true,import:false,reset:true,recording:true};function Fn(e,t,r){return{id:e.id,label:e.type,timestamp:e.timestamp,data:e.payload??e.action,prevState:e.prevState,nextState:e.nextState,hasStateChange:e.hasStateChange,duration:e.duration,source:"redux",isCurrent:t===0,isInFuture:false,isSkipped:false,meta:{fullAction:e.action}}}function fr(e){let{icon:t=He,color:r="#764ABC",name:o="Redux"}=e??{},a=0;return{id:"redux",name:o,icon:t,color:r,capabilities:jn,subscribe:n=>m.subscribe(()=>{n()}),getEntries:()=>{let n=m.getActions();return n.map((c,l)=>Fn(c,l,n.length))},getEntryCount:()=>m.getActions().length,getCurrentState:()=>{let n=m.getActions();if(n.length!==0)return n[0].nextState},getStateAtEntry:n=>m.getActionById(String(n))?.nextState,get currentIndex(){return a},jumpTo:n=>{let c=m.getActions().findIndex(l=>l.id===String(n));c!==-1&&(a=c)},get isRecording(){return m.getEnabled()},setRecording:n=>{m.setEnabled(n)},reset:()=>{m.clearActions(),a=0},exportHistory:()=>{let n=m.getActions();return JSON.stringify(n,null,2)}}}var Wn=fr();import{WIRE_DETAIL_LIMIT_BYTES as Mn,capDetail as Hn,createSyncAdapter as _n,memoByIdentity as qn,readParams as gt,toWire as Un}from"@buoy-gg/shared-ui/web";var _e=e=>Un(e,_r),Kn=qn(e=>{let t=ee(e.prevState)?{...e}:{...e,prevState:Vt,nextState:Vt};if(t.payload=_e(t.payload),t.action=_e(t.action),t.error=_e(t.error),t.meta){let r=_e(t.meta.arg);r!==t.meta.arg&&(t.meta={...t.meta,arg:r})}return t});function Yn(e){return e&&typeof e=="object"&&!Array.isArray(e)?Object.keys(e):[]}function yr(){let e=ue().diagnostic??"not-instrumented";return{available:false,slices:[],reason:e}}var Jn=_n({version:2,getSnapshot:()=>m.getActions().map(Kn),subscribe:e=>m.subscribe(e),actions:{clearEvents:()=>{m.clearActions()},getActionDetail:e=>{let{id:t}=gt(e);if(!t)return{found:false,reason:"missing id"};let r=m.getActionById(t);if(!r)return{found:false,reason:"unknown id"};if(ee(r.prevState))return{found:true,id:t,evicted:true,reason:"Raw state was evicted (retained for recent actions only)."};let o=n=>Hn(n,Mn),a=n=>{if(!n)return n;let c=o(n.arg);return c===n.arg?n:{...n,arg:c}};return{found:true,id:t,prevState:o(r.prevState),nextState:o(r.nextState),payload:o(r.payload),action:o(r.action),meta:a(r.meta),error:o(r.error)}},getState:e=>{let{includeValues:t=false}=gt(e),r=lt();if(!r)return yr();let o=r.getState(),a=ue();return{available:true,slices:Yn(o),capture:a.capture,mechanism:a.mechanism,...t?{state:o}:{}}},dispatch:e=>{let{action:t}=gt(e),r=lt();if(!r)return{dispatched:false,...yr()};if(!t)throw new Error("dispatch requires an `action`");return r.dispatch(t),{dispatched:true,type:t.type}}}});import{useState as Gn}from"react";import{macOSColors as le,night as U,TabSelector as Xn,DataInspector as se,CollapsibleSection as qe,CopyButton as Qn,monoFont as ht}from"@buoy-gg/shared-ui/web";import{jsx as C,jsxs as _}from"react/jsx-runtime";function Zn({action:e}){let[t,r]=Gn("action"),o=[{key:"action",label:"Action"},{key:"state",label:"State"},{key:"diff",label:"Diff"}],a=new Date(e.timestamp).toLocaleTimeString(),n=()=>JSON.stringify({type:e.type,payload:e.payload,timestamp:e.timestamp,duration:e.duration,hasStateChange:e.hasStateChange},null,2);return _(i,{style:T.container,children:[_(i,{style:T.header,children:[_(i,{style:T.headerContent,children:[C(h,{style:T.actionType,numberOfLines:2,children:e.type}),_(i,{style:T.headerMeta,children:[C(h,{style:T.metaText,children:a}),e.duration!==void 0&&_(h,{style:T.durationText,children:[e.duration.toFixed(2),"ms"]}),e.hasStateChange&&C(i,{style:T.changeBadge,children:C(h,{style:T.changeBadgeText,children:"State Changed"})})]})]}),C(Qn,{value:n(),size:16})]}),C(i,{style:T.tabContainer,children:C(Xn,{tabs:o,activeTab:t,onTabChange:c=>r(c)})}),_($e,{style:T.content,showsVerticalScrollIndicator:true,children:[t==="action"&&_(i,{style:T.section,children:[C(qe,{title:"Payload",defaultOpen:true,children:e.payload!==void 0?C(se,{data:e.payload}):C(h,{style:T.emptyText,children:"No payload"})}),C(qe,{title:"Full Action",defaultOpen:false,children:C(se,{data:e.action})})]}),t==="state"&&_(i,{style:T.section,children:[C(qe,{title:"Previous State",defaultOpen:false,children:C(se,{data:e.prevState})}),C(qe,{title:"Next State",defaultOpen:true,children:C(se,{data:e.nextState})})]}),t==="diff"&&C(i,{style:T.section,children:e.hasStateChange?C(ei,{prevState:e.prevState,nextState:e.nextState}):C(i,{style:T.noChangeContainer,children:C(h,{style:T.noChangeText,children:"No state changes from this action"})})})]})]})}function ei({prevState:e,nextState:t}){let r=mr(e,t);return r.length===0?C(i,{style:T.noChangeContainer,children:C(h,{style:T.noChangeText,children:"No differences detected"})}):C(i,{children:r.map((o,a)=>_(i,{style:T.diffItem,children:[_(i,{style:T.diffHeader,children:[C(i,{style:[T.diffTypeBadge,{backgroundColor:o.type==="added"?le.semantic.successBackground:o.type==="removed"?le.semantic.errorBackground:le.semantic.warningBackground}],children:C(h,{style:[T.diffTypeText,{color:o.type==="added"?le.semantic.success:o.type==="removed"?le.semantic.error:le.semantic.warning}],children:o.type.toUpperCase()})}),C(h,{style:T.diffPath,children:o.path})]}),o.type==="modified"&&_(i,{style:T.diffValues,children:[_(i,{style:T.diffValue,children:[C(h,{style:T.diffLabel,children:"Before:"}),C(se,{data:o.oldValue})]}),_(i,{style:T.diffValue,children:[C(h,{style:T.diffLabel,children:"After:"}),C(se,{data:o.newValue})]})]}),o.type==="added"&&C(i,{style:T.diffValue,children:C(se,{data:o.newValue})}),o.type==="removed"&&C(i,{style:T.diffValue,children:C(se,{data:o.oldValue})})]},a))})}function mr(e,t,r=""){let o=[];if(typeof e!="object"||typeof t!="object")return e!==t&&o.push({type:"modified",path:r||"root",oldValue:e,newValue:t}),o;if(e===null||t===null)return e!==t&&o.push({type:"modified",path:r||"root",oldValue:e,newValue:t}),o;let a=e,n=t,c=new Set([...Object.keys(a),...Object.keys(n)]);for(let l of c){let u=r?`${r}.${l}`:l,p=a[l],f=n[l];l in a?l in n?p!==f&&(typeof p=="object"&&typeof f=="object"&&p!==null&&f!==null&&!Array.isArray(p)&&!Array.isArray(f)?u.split(".").length<3?o.push(...mr(p,f,u)):o.push({type:"modified",path:u,oldValue:p,newValue:f}):o.push({type:"modified",path:u,oldValue:p,newValue:f})):o.push({type:"removed",path:u,oldValue:p}):o.push({type:"added",path:u,newValue:f})}return o}var T=pe.create({container:{flex:1},header:{flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between",paddingHorizontal:12,paddingVertical:12,backgroundColor:U.color.surface,borderBottomWidth:1,borderBottomColor:U.color.border},headerContent:{flex:1,marginRight:12},actionType:{fontSize:14,fontWeight:"600",color:U.color.text,fontFamily:ht,marginBottom:6},headerMeta:{flexDirection:"row",alignItems:"center",gap:12},metaText:{fontSize:11,color:U.color.textTertiary},durationText:{fontSize:11,color:U.color.textTertiary,fontFamily:ht},changeBadge:{backgroundColor:le.semantic.warningBackground,paddingHorizontal:6,paddingVertical:2,borderRadius:4},changeBadgeText:{fontSize:10,color:le.semantic.warning,fontWeight:"600"},tabContainer:{paddingHorizontal:12,paddingVertical:8},content:{flex:1},section:{paddingHorizontal:12,paddingBottom:20},emptyText:{fontSize:12,color:U.color.textTertiary,fontStyle:"italic",padding:8},noChangeContainer:{padding:20,alignItems:"center"},noChangeText:{fontSize:13,color:U.color.textTertiary},diffItem:{marginBottom:12,backgroundColor:U.color.surface,borderRadius:8,borderWidth:1,borderColor:U.color.border,overflow:"hidden"},diffHeader:{flexDirection:"row",alignItems:"center",gap:8,padding:8,borderBottomWidth:1,borderBottomColor:U.color.border},diffTypeBadge:{paddingHorizontal:6,paddingVertical:2,borderRadius:4},diffTypeText:{fontSize:10,fontWeight:"700"},diffPath:{fontSize:12,color:U.color.text,fontFamily:ht},diffValues:{padding:8,gap:8},diffValue:{padding:8},diffLabel:{fontSize:11,color:U.color.textTertiary,marginBottom:4,fontWeight:"600"}});function ti(){return st(),null}export{Se as BUOY_JUMP_TO_STATE,Xr as BUOY_REPLAY_ACTION,$n as FREE_TIER_ACTION_LIMIT,g as REDUX_TEST_ID,ur as ReduxActionDetailContent,pr as ReduxActionDetailFooter,Zn as ReduxActionDetailView,Qt as ReduxActionItem,ti as ReduxAutoInstrument,He as ReduxIcon,pt as ReduxModal,On as ReduxToolView,ir as actionRowTestID,lr as buildActionRowTestIDs,ke as buoyDevtoolsEnhancer,Zr as buoyReduxMiddleware,Nt as claimDevtoolsHook,eo as createBuoyReduxMiddleware,fr as createReduxHistoryAdapter,Nn as createReduxTool,lt as getActiveStore,ue as getInstrumentationStatus,nt as instrumentStore,Pa as isAutoInstrumentActive,lo as isDevtoolsHookClaimed,Oa as isStoreInstrumented,Ot as jumpToState,m as reduxActionStore,Wn as reduxHistoryAdapter,Jn as reduxSyncAdapter,hr as reduxToolPreset,La as registerReduxStore,Lt as replayAction,nr as slugForTestID,it as uninstrumentStore,st as useAutoInstrumentRedux,Ut as useReduxActions,Na as useReduxAvailability,Qr as withBuoyDevTools};
1
+ "use client";var Bt=Object.defineProperty;var kr=Object.getOwnPropertyDescriptor;var Er=Object.getOwnPropertyNames;var $r=Object.prototype.hasOwnProperty;var Vr=(e,t)=>{for(var r in t)Bt(e,r,{get:t[r],enumerable:true})},Rt=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Er(t))!$r.call(e,a)&&a!==r&&Bt(e,a,{get:()=>t[a],enumerable:!(o=kr(t,a))||o.enumerable});return e},zr=(e,t,r)=>(Rt(e,t,"default"),r&&Rt(r,t,"default"));var kt=process.env.NODE_ENV!=="production";typeof window<"u"&&typeof globalThis.global>"u"&&(globalThis.global=globalThis);import{classifyPreviewItem as Or,createRestoreScope as jr,registerStateSnapshotProvider as Lr,skippedRestore as Qe,unionKeys as Nr,wontApply as Pr}from"@buoy-gg/shared-ui/web";var Ze=Symbol.for("@@buoy/enhancerInstrumented"),me=null,be=null,et=null,Et=false;function ce(e,t){me=e,be=t,et=null}function Fr(e){me===e&&(me=null,be=null)}function de(){return me}function $t(){Et=true}function Re(){return Et&&me!==null}function Wr(e){et=e}function ue(){return{mechanism:be,capture:be==="enhancer"||be==="middleware"?"full":be==="patch"?"top-level-only":"none",hasStore:me!==null,timeTravel:Re(),diagnostic:et}}import{ChangeLog as Mr,approxJsonSize as Hr}from"@buoy-gg/shared-ui/web";var tt=25,rt=Object.freeze({__buoyStateEvicted:true,note:`Raw state retained for the ${tt} most recent actions only.`}),Vt=Object.freeze({__buoyStateOnDevice:true,note:"State trees stay on the device \u2014 fetched on demand via getActionDetail."}),_r=Object.freeze({__buoyPayloadOnDevice:true,note:"Payload stays on the device \u2014 fetched on demand via getActionDetail."});function ke(e){return typeof e=="object"&&e!==null&&e.__buoyPayloadOnDevice===true}function ee(e){if(typeof e!="object"||e===null)return false;let t=e;return t.__buoyStateEvicted===true||t.__buoyStateOnDevice===true}function qr(e){return e.startsWith("@@")?"internal":e.includes("/pending")?"pending":e.includes("/fulfilled")?"fulfilled":e.includes("/rejected")?"rejected":e.includes("/executeQuery")?"query":e.includes("/executeMutation")?"mutation":"action"}function Ur(e){if(e.startsWith("@@")){let r=e.split("/");return{sliceName:null,actionName:r[r.length-1]||e}}let t=e.split("/");if(t.length>=2){let r=t[0],o=t[1];return t.length>=3&&["pending","fulfilled","rejected"].includes(t[t.length-1])&&(o=t.slice(1,-1).join("/")),{sliceName:r,actionName:o.toUpperCase()}}return{sliceName:null,actionName:e.toUpperCase()}}function zt(e,t){return Hr(e,t).bytes>t}function Kr(e,t=40){if(e===void 0)return"";if(e===null)return"null";try{if(typeof e=="string")return e.length>t?`"${e.slice(0,t-3)}..."`:`"${e}"`;if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e)){if(e.length===0)return"[]";if(zt(e,t))return`[${e.length} items]`;let r=JSON.stringify(e);return r.length>t?`[${e.length} items]`:r}if(typeof e=="object"){let r=Object.keys(e);if(r.length===0)return"{}";if(zt(e,t))return`{ ${r.length} keys }`;let o=JSON.stringify(e);return o.length<=t?o:`{ ${r.length} keys }`}return String(e).slice(0,t)}catch{return"[complex]"}}function Yr(e,t){if(e===t)return{summary:"no change",changedCount:0};if(typeof e!="object"||typeof t!="object"||e===null||t===null)return{summary:"changed",changedCount:1};let r=Object.keys(e),o=Object.keys(t),a=o.filter(u=>!r.includes(u)).length,n=r.filter(u=>!o.includes(u)).length,c=0;for(let u of r)o.includes(u)&&e[u]!==t[u]&&c++;let l=[];a>0&&l.push(`+${a}`),n>0&&l.push(`-${n}`),c>0&&l.push(`~${c}`);let s=a+n+c;return l.length===0?{summary:"nested change",changedCount:1}:{summary:`${l.join(" ")} ${s===1?"key":"keys"}`,changedCount:s}}function Jr(e){let t=e.meta;if(t)return{requestId:t.requestId,requestStatus:t.requestStatus,arg:t.arg,rejectedWithValue:t.rejectedWithValue,aborted:t.aborted,condition:t.condition}}var Gr=class extends Mr{addAction(e,t,r,o){if(!this.canRecord())return;let a=e.type||"";if(!a)return;let n=t!==r,c=qr(a),{sliceName:l,actionName:s}=Ur(a),u=Jr(e),h=Kr(e.payload),{summary:y,changedCount:b}=Yr(t,r),E=(o??0)>16,j={id:this.nextId(),type:a,payload:e.payload,action:e,timestamp:Date.now(),prevState:t,nextState:r,duration:o,hasStateChange:n,category:c,sliceName:l,actionName:s,meta:u,error:e.error,payloadPreview:h,diffSummary:y,changedKeysCount:b,isSlowAction:E};this.push(j);for(let V=tt;V<this.items.length;V++){let z=this.items[V];if(z.prevState!==rt)z.prevState=rt,z.nextState=rt;else break}this.notifyListeners()}getActions(){return this.getAll()}getActionById(e){return this.getById(e)}clearActions(){this.clear()}replaceActions(e){if(!this.getEnabled())return;let t=new Map;for(let o of this.items)o.prevState!==void 0&&!ee(o.prevState)&&t.set(o.id,o);let r=e.slice(0,this.max).map(o=>{let a=t.get(o.id);return!a||!ee(o.prevState)?o:{...o,prevState:a.prevState,nextState:a.nextState,payload:ke(o.payload)?a.payload:o.payload,action:ke(o.action)?a.action:o.action,meta:ke(o.meta?.arg)?a.meta:o.meta,error:ke(o.error)?a.error:o.error}});this.setItems(r)}hydrateAction(e,t){this.hydrateById(e,t)}setMaxActions(e){this.setMax(e)}getStats(){let e=this.items.length,t=this.items.filter(n=>n.hasStateChange).length,r=new Set(this.items.map(n=>n.type)),o=this.items.filter(n=>n.duration!==void 0).map(n=>n.duration),a=o.length>0?o.reduce((n,c)=>n+c,0)/o.length:0;return{totalActions:e,actionsWithChanges:t,actionsWithoutChanges:e-t,uniqueActionTypes:r.size,averageDuration:Math.round(a*100)/100}}filterActions(e){let t=[...this.items];if(e.searchText){let r=e.searchText.toLowerCase();t=t.filter(o=>o.type.toLowerCase().includes(r))}return e.actionTypes&&e.actionTypes.length>0&&(t=t.filter(r=>e.actionTypes.includes(r.type))),e.onlyWithChanges&&(t=t.filter(r=>r.hasStateChange)),t}getUniqueActionTypes(){return Array.from(new Set(this.items.map(e=>e.type))).sort()}getRelatedActions(e){return this.items.filter(t=>t.meta?.requestId===e).sort((t,r)=>t.timestamp-r.timestamp)}getLinkedActions(e){return e.meta?.requestId?this.getRelatedActions(e.meta.requestId):[]}getLinkedActionsCount(e){return e.meta?.requestId?this.items.filter(t=>t.meta?.requestId===e.meta?.requestId).length:0}getAsyncOperationDuration(e){let t=this.getRelatedActions(e);if(t.length<2)return null;let r=t.find(a=>a.category==="pending"),o=t.find(a=>a.category==="fulfilled"||a.category==="rejected");return r&&o?o.timestamp-r.timestamp:null}getBaseActionType(e){let t=e.split("/");if(t.length>=2){let r=t[t.length-1];if(["pending","fulfilled","rejected"].includes(r))return t.slice(0,-1).join("/")}return e}getAsyncOperationIndex(e){let t=new Map;for(let o of this.items)o.meta?.requestId&&!t.has(o.meta.requestId)&&t.set(o.meta.requestId,o.timestamp);let r=Array.from(t.entries()).sort((o,a)=>o[1]-a[1]).map(([o])=>o).indexOf(e);return r>=0?r+1:0}},x=new Gr;var ot=false;function Ot(){return ot}var xe="@@buoy/JUMP_TO_STATE",Xr="@@buoy/REPLAY_ACTION";function jt(e){if(ee(e)){console.warn("[BuoyRedux] Cannot jump - this action's state was evicted (raw state is retained for recent actions only)");return}let t=de();if(!t){console.warn("[BuoyRedux] Cannot jump to state - no store instrumented");return}if(!Re()){console.warn("[BuoyRedux] Cannot jump to state - the root reducer cannot serve a state jump. Capture and time travel are wired separately: either put `import '@buoy-gg/redux';` first in your app entry (so Buoy is the store enhancer), or wrap your root reducer with withBuoyDevTools().");return}t.dispatch({type:xe,payload:e})}function Lt(e){let t=de();t?t.dispatch(e):console.warn("[BuoyRedux] Cannot replay action - no store instrumented")}function Qr(e){return $t(),(t,r)=>r.type===xe?r.payload:e(t,r)}var Zr=e=>(ot=true,ce(e,"middleware"),t=>r=>{let o=r;if(o.type?.startsWith("@@buoy/"))return t(r);let a=performance.now(),n=e.getState(),c=t(r),l=e.getState(),s=performance.now()-a;return x.addAction(o,n,l,s),c});function eo(e={}){let{maxActions:t=200,ignoreActions:r=[]}=e;return x.setMaxActions(t),o=>(ot=true,ce(o,"middleware"),a=>n=>{let c=n,l=c.type||"";if(l?.startsWith("@@buoy/")||r.includes(l))return a(n);let s=performance.now(),u=o.getState(),h=a(n),y=o.getState(),b=performance.now()-s;return x.addAction(c,u,y,b),h})}var Ee="enable restore by using the Buoy enhancer or wrapping your root reducer in withBuoyDevTools()";function to(){let{mechanism:e,hasStore:t,diagnostic:r}=ue();return t?e==="patch"?{canCapture:true,canRestore:false,detail:`Auto-instrumented store cannot be restored \u2014 ${Ee}`}:{canCapture:true,canRestore:true,detail:e==="middleware"?"Restore requires withBuoyDevTools(rootReducer) \u2014 verified at restore time":void 0}:{canCapture:false,canRestore:false,detail:r==="no-react-redux"?"react-redux not installed":r==="no-provider"?"No Redux <Provider> found":"No Redux store instrumented"}}async function ro(){let e=de();return e?{data:{state:e.getState()},warnings:[]}:{data:null,warnings:["no Redux store instrumented"]}}async function oo(e,t){let r=e,o=de();if(!o||r===void 0||r===null)return Qe("redux",o?"empty redux snapshot":"no Redux store instrumented");let{mechanism:a}=ue();if(a==="patch")return Qe("redux",`restore unavailable on auto-instrumented stores \u2014 ${Ee}`);let n=jr(t),c=Object.keys(r.state??{}).filter(s=>!n.touch(s)),l=r.state;if(c.length>0){let s=o.getState(),u={...r.state};for(let h of c)u[h]=s?.[h];l=u}if(o.dispatch({type:xe,payload:l}),o.getState()===l){let s=c.length>0?[`${c.length} slice(s) excluded by you`]:[];return{ok:true,applied:1,skipped:[],warnings:s}}return Qe("redux",`store ignored the state jump \u2014 ${Ee}`)}async function ao(e,t){let r=e?.state,o=t===void 0,a=de(),n=o?a?.getState():t?.state,c=[],l=[],s;if(o){let{mechanism:y,hasStore:b}=ue();b?y==="patch"&&(s=`auto-instrumented store cannot be restored \u2014 ${Ee}`):s="no Redux store instrumented"}let u=n??{},h=r??{};for(let y of Nr(u,h)){let b=Or({key:y,label:y,oldValue:u[y],newValue:h[y],inOld:Object.prototype.hasOwnProperty.call(u,y),inNew:Object.prototype.hasOwnProperty.call(h,y)},{tooLargeReason:"slice too large to render a diff \u2014 restore still applies it"});s&&(b=Pr(b,s)),c.push(b)}return s&&l.push(`Redux restore unavailable: ${s}`),{items:c,notes:l}}Lr({id:"redux",label:"Redux",status:to,capture:ro,restore:oo,previewItems:ao});function at(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...o)=>t(r(...o)))}function Nt(e){return $t(),(t,r)=>r&&r.type===xe?r.payload:e(t,r)}function no(e){if(typeof e!="object"||e===null)return false;let t=e.type;return typeof t!="string"?false:!t.startsWith("@@buoy/")&&!t.startsWith("@@redux/")}var $e=e=>(t,r)=>{let o=e(Nt(t),r),a={...o,dispatch:n=>{if(!no(n)||Ot())return o.dispatch(n);let c=performance.now(),l=o.getState(),s=o.dispatch(n);return x.addAction(n,l,o.getState(),performance.now()-c),s},replaceReducer:n=>o.replaceReducer(Nt(n)),[Ze]:true};return ce(a,"enhancer"),a};function io(...e){return e.length===0?at($e):e.length===1&&typeof e[0]=="object"&&e[0]!==null?(...t)=>at(...t,$e):at(...e,$e)}var nt=false;function Pt(){if(!(typeof kt<"u"&&kt))return false;let e=globalThis;return e.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||(e.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__=io,nt=true),nt}function lo(){return nt}Pt();import{useState as Ve,useMemo as we,useRef as ze,useCallback as te,useEffect as Ft}from"react";var Wt={};Vr(Wt,{AccessibilityInfo:()=>po,ActivityIndicator:()=>ia,Alert:()=>ca,Animated:()=>go,AppRegistry:()=>fo,AppState:()=>yo,Appearance:()=>ho,BackHandler:()=>mo,Button:()=>la,CheckBox:()=>Vo,Clipboard:()=>bo,DeviceEventEmitter:()=>Yo,Dimensions:()=>xo,Easing:()=>Co,FlatList:()=>Mt,I18nManager:()=>So,Image:()=>zo,ImageBackground:()=>Oo,InteractionManager:()=>vo,Keyboard:()=>wo,KeyboardAvoidingView:()=>jo,LayoutAnimation:()=>To,Linking:()=>Ao,LogBox:()=>Ko,Modal:()=>aa,NativeEventEmitter:()=>Io,NativeModules:()=>uo,PanResponder:()=>Do,Picker:()=>Lo,PixelRatio:()=>Bo,Platform:()=>Ro,Pressable:()=>oa,ProgressBar:()=>No,RefreshControl:()=>Po,SafeAreaView:()=>Fo,ScrollView:()=>Oe,SectionList:()=>Wo,Share:()=>ko,StatusBar:()=>Mo,StyleSheet:()=>pe,Switch:()=>na,Text:()=>f,TextInput:()=>ea,Touchable:()=>Ho,TouchableHighlight:()=>ta,TouchableNativeFeedback:()=>_o,TouchableOpacity:()=>J,TouchableWithoutFeedback:()=>ra,UIManager:()=>Eo,Vibration:()=>$o,View:()=>i,VirtualizedList:()=>qo,YellowBox:()=>Uo,findNodeHandle:()=>sa,unstable_createElement:()=>co,useColorScheme:()=>Jo,useLocaleContext:()=>Go,useWindowDimensions:()=>Xo});zr(Wt,so);import*as so from"react-native-web";import{unstable_createElement as co,NativeModules as uo,AccessibilityInfo as po,Animated as go,Appearance as ho,AppRegistry as fo,AppState as yo,BackHandler as mo,Clipboard as bo,Dimensions as xo,Easing as Co,I18nManager as So,Keyboard as wo,InteractionManager as vo,LayoutAnimation as To,Linking as Ao,NativeEventEmitter as Io,PanResponder as Do,PixelRatio as Bo,Platform as Ro,Share as ko,StyleSheet as pe,UIManager as Eo,Vibration as $o,CheckBox as Vo,FlatList as Mt,Image as zo,ImageBackground as Oo,KeyboardAvoidingView as jo,Picker as Lo,ProgressBar as No,RefreshControl as Po,SafeAreaView as Fo,SectionList as Wo,StatusBar as Mo,Touchable as Ho,TouchableNativeFeedback as _o,VirtualizedList as qo,YellowBox as Uo,LogBox as Ko,DeviceEventEmitter as Yo,useColorScheme as Jo,useLocaleContext as Go,useWindowDimensions as Xo}from"react-native-web";import*as H from"react-native-web";import{createElement as Qo,forwardRef as Zo}from"react";function q(e){let t=Zo((o,a)=>{let{accessibilityState:n,accessibilityValue:c,...l}=o;for(let s of["busy","checked","disabled","expanded","selected"])n?.[s]!==void 0&&l[`aria-${s}`]===void 0&&(l[`aria-${s}`]=n[s]);for(let[s,u]of Object.entries({min:"valuemin",max:"valuemax",now:"valuenow",text:"valuetext"}))c?.[s]!==void 0&&l[`aria-${u}`]===void 0&&(l[`aria-${u}`]=c[s]);return Qo(e,{...l,ref:a})}),r=e.State;return r&&Object.assign(t,{State:r}),t.displayName=e.displayName??e.name??"NativeWebView",t}var i=q(H.View),f=q(H.Text),ea=q(H.TextInput),J=q(H.TouchableOpacity),ta=q(H.TouchableHighlight),ra=q(H.TouchableWithoutFeedback),oa=q(H.Pressable),Oe=q(H.ScrollView),aa=q(H.Modal),na=q(H.Switch),ia=q(H.ActivityIndicator),la=q(H.Button),sa=H.findNodeHandle,ca={alert(e,t,r,o){if(typeof document>"u")return;let a=document.createElement("dialog");a.dataset.buoyRoot="",a.setAttribute("aria-label",e),a.style.cssText="position:fixed;inset:0;margin:auto;width:min(440px,90vw);padding:24px;border:1px solid #475569;border-radius:14px;background:#17212e;color:#f1f5f9;font:14px system-ui;box-shadow:0 20px 80px #0008;z-index:2147483647";let n=document.createElement("h2");if(n.textContent=e,n.style.cssText="font-size:18px;margin:0 0 12px",a.appendChild(n),t){let u=document.createElement("p");u.textContent=t,u.style.cssText="line-height:1.5;white-space:pre-wrap;margin:0 0 20px",a.appendChild(u)}let c=document.createElement("div");c.style.cssText="display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px";let l=r?.length?r:[{text:"OK"}],s=()=>{a.close?.(),a.remove()};for(let u of l){let h=document.createElement("button");h.type="button",h.textContent=u.text??"OK",h.style.cssText=`padding:9px 14px;border:1px solid #64748b;border-radius:7px;color:white;background:${u.style==="destructive"?"#a52b38":"#283a4d"};cursor:pointer;font:inherit`,h.onclick=()=>{s(),u.onPress?.()},c.appendChild(h)}a.addEventListener("cancel",u=>{u.preventDefault(),o?.cancelable!==false&&(s(),o?.onDismiss?.())}),a.appendChild(c),document.body.appendChild(a),a.showModal?a.showModal():a.setAttribute("open","")}};import{JsModal as da,ModalHeader as re,macOSColors as G,night as v,Search as ua,Trash2 as pa,Power as ga,Zap as ha,CheckCircle as fa,Copy as ya,Lock as ma,AlertTriangle as Ht,devToolsStorageKeys as ba,copyToClipboard as xa,ProUpgradeModal as Ca,PowerToggleButton as Sa,TickProvider as _t,useLimit as wa,TIER_LIMITS as va,windowDragProps as Ta,ToolEmptyState as Aa,resolveListEmptyState as Ia,EVENT_LIST_PRESET as Da,monoFont as Ba}from"@buoy-gg/shared-ui/web";import{useIsPro as Ra}from"@buoy-gg/license/web";import{useState as ka,useMemo as qt,useCallback as Ut}from"react";import{useChangeLog as Ea}from"@buoy-gg/shared-ui/web";var $a=(e,t)=>x.filterActions(t);function Kt(){let e=Ea(x,{filterItems:$a}),[t,r]=ka(null),o=qt(()=>x.getStats(),[e.items]),a=qt(()=>x.getUniqueActionTypes(),[e.items]),n=Ut(()=>{x.clearActions(),r(null)},[]),c=Ut(l=>x.getActionById(l),[]);return{actions:e.items,filteredActions:e.filteredItems,filter:e.filter,setFilter:e.setFilter,stats:o,clearActions:n,isEnabled:e.isEnabled,toggleCapture:e.toggleCapture,actionTypes:a,getActionById:c,selectedAction:t,setSelectedAction:r}}import{useStore as Va}from"react-redux";function Yt(){return Va}import{useEffect as za,useState as je,useRef as Jt,useCallback as Gt}from"react";var ve=Symbol.for("@@buoy/instrumented"),it=Symbol.for("@@buoy/originalDispatch");function Oa(e){let t=e;return t[ve]===true||t[Ze]===true}function lt(e,t={}){let r=e;if(r[Ze])return ce(e,"enhancer"),()=>{};if(Ot())return ce(e,"middleware"),()=>{};if(r[ve])return ce(e,"patch"),()=>{};let{maxActions:o=200,ignoreActions:a=[]}=t;x.setMaxActions(o);let n=e.dispatch.bind(e);r[it]=n;let c=(l=>{if(typeof l!="object"||l===null||typeof l.type!="string")return n(l);let s=l.type;if(s.startsWith("@@buoy/")||s.startsWith("@@redux/")||a.includes(s))return n(l);let u=performance.now(),h=e.getState(),y=n(l),b=e.getState(),E=performance.now()-u;return x.addAction(l,h,b,E),y});return e.dispatch=c,r[ve]=true,ce(e,"patch"),()=>{st(e)}}function st(e){let t=e;if(t[ve]){let r=t[it];r&&(e.dispatch=r),delete t[ve],delete t[it]}Fr(e)}function ja(e,t={}){return lt(e,t)}function Le(){return de()}function La(){return de()!==null}function ct(e={}){let{autoStart:t=true}=e,r=Jt(e);r.current=e;let[o,a]=je(false),[n,c]=je(true),[l,s]=je(null),[u,h]=je(null),y=Jt(null),b=Yt(),E=b!==null,j=null,V=null,z=null;if(b)try{j=b()}catch(L){z="no-provider",V=L instanceof Error?L.message:"Failed to access Redux store. Make sure your app is wrapped in a Redux Provider."}else z="no-react-redux",V="react-redux is not installed or not available";let F=Gt(()=>{if(!j){Wr(z),s(V||"No Redux store available"),c(false);return}try{let L=lt(j,r.current);y.current=L,a(true),h(j),s(null)}catch(L){s(L instanceof Error?L.message:"Failed to instrument Redux store"),a(false)}finally{c(false)}},[j]),B=Gt(()=>{y.current&&(y.current(),y.current=null),u&&st(u),a(false),h(null)},[u]);return za(()=>(t?F():c(false),()=>{}),[t,F]),{isInstrumented:o,isLoading:n,error:l,isReactReduxAvailable:E,captureMechanism:ue().mechanism,startInstrumentation:F,stopInstrumentation:B,store:u}}function Na(){let e=Yt();if(!e)return{isAvailable:false,error:"react-redux is not installed"};try{let t=e();return{isAvailable:t!=null,error:null}}catch(t){return{isAvailable:false,error:t instanceof Error?t.message:"Not inside a Redux Provider"}}}import{memo as Pa}from"react";import{ChangeRow as Te,buoyColors as oe,AlertCircle as Fa,monoFont as Wa}from"@buoy-gg/shared-ui/web";import{jsx as ae,jsxs as Xt}from"react/jsx-runtime";var Qt=[{bg:"rgba(99, 102, 241, 0.25)",text:"#818CF8"},{bg:"rgba(236, 72, 153, 0.25)",text:"#F472B6"},{bg:"rgba(14, 165, 233, 0.25)",text:"#38BDF8"},{bg:"rgba(245, 158, 11, 0.25)",text:"#FBBF24"},{bg:"rgba(16, 185, 129, 0.25)",text:"#34D399"},{bg:"rgba(168, 85, 247, 0.25)",text:"#C084FC"},{bg:"rgba(239, 68, 68, 0.25)",text:"#F87171"},{bg:"rgba(20, 184, 166, 0.25)",text:"#2DD4BF"}];function Ma(e){return e<=0?{bg:"rgba(142, 142, 147, 0.2)",text:oe.textSecondary}:Qt[(e-1)%Qt.length]}var dt={cart:"#10B981",user:"#3B82F6",auth:"#8B5CF6",app:"#6366F1",ui:"#EC4899",settings:"#F59E0B",api:"#14B8A6",data:"#06B6D4"};function Ha(e){if(!e)return"#6B7280";let t=e.toLowerCase();if(dt[t])return dt[t];for(let[r,o]of Object.entries(dt))if(t.includes(r))return o;return`hsl(${e.split("").reduce((r,o)=>r+o.charCodeAt(0),0)*137%360}, 70%, 60%)`}function _a(e,t){switch(e){case"pending":return"Pending";case"fulfilled":return"Success";case"rejected":return"Error";case"internal":return"Internal";case"query":return"Query";case"mutation":return"Mutation";default:return t?t.charAt(0).toUpperCase()+t.slice(1):"Action"}}function qa(e,t,r){switch(e){case"pending":return oe.warning;case"fulfilled":return oe.success;case"rejected":return oe.error;case"internal":return oe.textMuted;case"query":return oe.info;case"mutation":return oe.info;default:return Ha(r)}}function Ua(e){let t=[];return e.duration!==void 0&&e.duration>=.1&&t.push(`${e.duration.toFixed(1)}ms`),e.hasStateChange?e.changedKeysCount&&e.changedKeysCount>0?t.push(`${e.changedKeysCount} key${e.changedKeysCount>1?"s":""} changed`):t.push(e.diffSummary||"state changed"):t.push("no state change"),t.join(" \xB7 ")}function Ka(e){return e.actionName?.toUpperCase()||e.type.split("/").pop()?.toUpperCase()||""}function Ya(e){if(e.category==="internal")return e.type;let t=e.type.split("/");return t.length>=3&&["pending","fulfilled","rejected"].includes(t[t.length-1])?t.slice(0,-1).join("/"):e.type}var Zt=Pa(function({action:e,onPress:t,linkedCount:r,testID:o}){let a=e.sliceName??void 0,n=qa(e.category,e.hasStateChange,a),c=_a(e.category,a),l=Ua(e),s=Ya(e),u=Ka(e),h=(r??0)>1,y=h?x.getLinkedActions(e):[],b=h?y.findIndex(F=>F.id===e.id)+1:0,E=h&&e.meta?.requestId?x.getAsyncOperationIndex(e.meta.requestId):0,j=Ma(E),V=h?ae(i,{style:[Ne.asyncSequenceBadge,{backgroundColor:j.bg}],children:Xt(f,{style:[Ne.asyncSequenceText,{color:j.text}],testID:o?`${o}-seq`:void 0,children:[b,"/",r," #",E]})}):void 0,z={statusColor:n,statusLabel:c,sublabel:l,primaryText:s,timestamp:e.timestamp,onPress:()=>t(e),testID:o,accessibilityLabel:`${s}, ${c}, ${l}`};return e.isSlowAction?ae(Te,{...z,badgePrefix:V,slow:true}):e.category==="rejected"?ae(Te,{...z,customBadge:Xt(i,{style:Ne.badgeContainer,children:[V,ae(i,{style:Ne.errorBadge,testID:o?`${o}-error`:void 0,children:ae(Fa,{size:12,color:oe.error})})]})}):h?ae(Te,{...z,badgePrefix:V,changed:e.hasStateChange}):e.hasStateChange?ae(Te,{...z,badgeText:u,changed:true}):ae(Te,{...z,plainBadgeText:u})}),Ne=pe.create({badgeContainer:{flexDirection:"row",alignItems:"center",gap:4},errorBadge:{paddingHorizontal:4},asyncSequenceBadge:{paddingHorizontal:6,paddingVertical:2,borderRadius:4},asyncSequenceText:{fontSize:10,fontWeight:"600",fontFamily:Wa}});import{useState as er,useCallback as Pe,useMemo as tr}from"react";import{macOSColors as Ae,night as X,EventStepperFooter as rr,formatRelativeTime as Fe,parseValue as We,monoFont as Ie}from"@buoy-gg/shared-ui/web";import{DataViewer as Ja,SplitDiffViewer as Ga,TreeDiffViewer as Xa,diffThemes as Qa}from"@buoy-gg/shared-ui/web/dataViewer";import{memo as Za}from"react";import{DetailViewToggle as en,FileText as tn,Database as rn,GitBranch as on}from"@buoy-gg/shared-ui/web";import{jsx as an}from"react/jsx-runtime";var nn=[{key:"action",label:"ACTION",description:"View action details",icon:tn},{key:"state",label:"STATE",description:"View current state",icon:rn},{key:"diff",label:"DIFF",description:"Compare changes",icon:on}],ln=["diff"],sn=Za(function({activeView:e,onViewChange:t,diffDisabled:r=false}){return an(en,{views:nn,activeView:e,onViewChange:t,disabledKeys:r?ln:void 0,testIDPrefix:"buoy-redux"})});import{memo as cn,useMemo as dn,useCallback as Me,useState as un,useEffect as pn}from"react";import{buoyColors as I,night as S,Clock as gn,AlertTriangle as hn,Zap as fn,Hash as or,Info as yn,Box as mn,AlertCircle as bn,FileText as xn,parseValue as He,ProUpgradeModal as Cn,copyToClipboard as ar,InfoRow as ne,monoFont as ie}from"@buoy-gg/shared-ui/web";import{useIsPro as Sn}from"@buoy-gg/license/web";import{DataViewer as _e}from"@buoy-gg/shared-ui/web/dataViewer";import{night as D,monoFont as wn}from"@buoy-gg/shared-ui/web";import{jsx as nr,jsxs as vn}from"react/jsx-runtime";var Tn={replay:{color:D.color.accent,backgroundColor:D.color.accent+"15",borderColor:D.color.accent+"40",textColor:D.color.accent},copy:{color:D.color.accent,backgroundColor:D.color.accent+"15",borderColor:D.color.accent+"40",textColor:D.color.accent},jump:{color:D.color.warning,backgroundColor:D.color.warning+"15",borderColor:D.color.warning+"40",textColor:D.color.warning},skip:{color:D.color.textSecondary,backgroundColor:D.color.textSecondary+"26",borderColor:D.color.textSecondary+"59",textColor:D.color.textSecondary},clear:{color:D.color.danger,backgroundColor:D.color.danger+"15",borderColor:D.color.danger+"40",textColor:D.color.danger},diff:{color:D.color.info,backgroundColor:D.color.info+"15",borderColor:D.color.info+"40",textColor:D.color.info}};function qe({onPress:e,text:t,type:r,disabled:o=false,testID:a}){let n=Tn[r];return vn(J,{testID:a,disabled:o,onPress:e,style:[ut.button,{backgroundColor:o?D.color.textTertiary+"1A":n.backgroundColor,borderColor:o?D.color.textTertiary+"33":n.borderColor,opacity:o?.5:1}],activeOpacity:.7,accessibilityRole:"button",accessibilityLabel:t,accessibilityState:{disabled:o},children:[nr(i,{style:[ut.dot,{backgroundColor:o?D.color.textTertiary:n.color}]}),nr(f,{style:[ut.text,{color:o?D.color.textTertiary:n.textColor}],children:t})]})}var ut=pe.create({button:{flexDirection:"row",alignItems:"center",justifyContent:"center",borderRadius:6,borderWidth:1,paddingHorizontal:12,paddingVertical:6,height:25,minWidth:80,shadowOffset:{width:0,height:1},shadowOpacity:.2,shadowRadius:2,elevation:2},dot:{width:5,height:5,borderRadius:3,marginRight:6,shadowColor:D.color.text,shadowOffset:{width:0,height:0},shadowOpacity:.6,shadowRadius:2},text:{fontSize:10,fontWeight:"600",letterSpacing:.5,textTransform:"uppercase",fontFamily:wn,height:12}});var g="buoy-redux";function ir(e){return String(e??"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"unknown"}function lr(e,t){return`${g}-row-${ir(e)}-${t}`}function sr(e){let t=new Map,r=new Map;for(let o of e){let a=(t.get(o.type)??0)+1;t.set(o.type,a),r.set(o.id,lr(o.type,a))}return r}import{jsx as p,jsxs as R}from"react/jsx-runtime";function cr(e){switch(e){case"pending":return{label:"PENDING",color:I.warning,bgColor:I.warning+"26"};case"fulfilled":return{label:"FULFILLED",color:I.success,bgColor:I.success+"26"};case"rejected":return{label:"REJECTED",color:I.error,bgColor:I.error+"26"};case"internal":return{label:"INTERNAL",color:I.textMuted,bgColor:I.textMuted+"26"};case"query":return{label:"QUERY",color:I.info,bgColor:I.info+"26"};case"mutation":return{label:"MUTATION",color:I.info,bgColor:I.info+"26"};default:return{label:"ACTION",color:I.info,bgColor:I.info+"26"}}}function An(e){return e===void 0?"N/A":e<1?"<1ms":`${e.toFixed(1)}ms`}function Ce({icon:e,title:t,badge:r,testID:o}){return R(i,{style:d.sectionHeader,testID:o,children:[R(i,{style:d.sectionHeaderLeft,children:[p(e,{size:14,color:S.color.accent}),p(f,{style:d.sectionTitle,children:t})]}),r]})}function In(e){let t=new Date(e),r=t.getHours().toString().padStart(2,"0"),o=t.getMinutes().toString().padStart(2,"0"),a=t.getSeconds().toString().padStart(2,"0"),n=t.getMilliseconds().toString().padStart(3,"0");return`${r}:${o}:${a}.${n}`}var Dn=cn(function({action:e,onNavigateToAction:t}){let r=Sn(),[o,a]=un(false);pn(()=>{o&&r&&a(false)},[o,r]);let n=cr(e.category),c=ee(e.nextState),l=Re(),s=c||!l,u=e.payload!==void 0,h=e.meta&&Object.keys(e.meta).length>0,y=e.error!==void 0,b=dn(()=>x.getLinkedActions(e),[e]),E=b.length>1,j=E?x.getBaseActionType(e.type):null,V=e.meta?.requestId?x.getAsyncOperationDuration(e.meta.requestId):null,z=Me(async()=>{if(!r){a(true);return}await ar(e.action)},[e,r]),F=Me(async()=>{if(!r){a(true);return}await ar(e.payload)},[e.payload,r]),B=Me(()=>{e.action&&typeof e.action=="object"&&"type"in e.action&&Lt(e.action)},[e]),L=Me(()=>{e.nextState!==void 0&&jt(e.nextState)},[e]);return R(Oe,{testID:`${g}-detail-scroll`,style:d.container,contentContainerStyle:d.contentContainer,showsVerticalScrollIndicator:false,children:[R(i,{style:d.card,testID:`${g}-info-card`,children:[p(Ce,{icon:yn,title:"ACTION INFO"}),R(i,{style:d.cardContent,children:[p(ne,{label:"Type",value:e.type,mono:true,testID:`${g}-info-type`}),e.sliceName&&p(ne,{label:"Slice",value:e.sliceName,mono:true,testID:`${g}-info-slice`}),p(ne,{label:"Action",value:e.actionName,mono:true,testID:`${g}-info-action`}),R(i,{style:d.badgeRow,children:[p(i,{style:[d.categoryBadge,{backgroundColor:n.bgColor}],children:p(f,{style:[d.categoryText,{color:n.color}],testID:`${g}-info-category`,children:n.label})}),R(i,{style:[d.durationBadge,e.isSlowAction&&d.durationBadgeSlow],children:[p(gn,{size:10,color:e.isSlowAction?I.error:S.color.textSecondary}),p(f,{style:[d.durationText,e.isSlowAction&&d.durationTextSlow],testID:`${g}-info-duration`,children:An(e.duration)}),e.isSlowAction&&p(hn,{size:10,color:I.error})]}),e.hasStateChange?R(i,{style:d.changesBadge,children:[p(fn,{size:10,color:I.success}),p(f,{style:d.changesText,testID:`${g}-info-changes`,children:e.diffSummary||"changed"})]}):p(i,{style:d.noChangesBadge,children:p(f,{style:d.noChangesText,testID:`${g}-info-no-changes`,children:"no change"})})]})]})]}),E&&R(i,{style:d.card,testID:`${g}-async-card`,children:[p(Ce,{icon:or,title:"ASYNC FLOW",badge:p(i,{style:d.asyncBadge,children:R(f,{style:d.asyncBadgeText,testID:`${g}-async-count`,children:[b.length," ACTIONS"]})})}),R(i,{style:d.cardContent,children:[p(f,{style:d.baseActionType,testID:`${g}-async-base`,children:j}),V!==null&&R(i,{style:d.totalDurationRow,children:[p(f,{style:d.totalDurationLabel,children:"Total Duration"}),R(f,{style:d.totalDurationValue,testID:`${g}-async-total`,children:[V,"ms"]})]}),p(i,{style:d.timeline,children:b.map((M,W)=>{let Q=cr(M.category),Y=M.id===e.id;return R(J,{style:[d.timelineItem,Y&&d.timelineItemCurrent],onPress:()=>t?.(M),disabled:Y||!t,activeOpacity:.7,testID:`${g}-async-step-${W}`,children:[W<b.length-1&&p(i,{style:d.timelineConnector}),p(i,{style:[d.timelineDot,{backgroundColor:Q.color}]}),R(i,{style:d.timelineContent,children:[R(i,{style:d.timelineHeader,children:[p(i,{style:[d.timelineStatusBadge,{backgroundColor:Q.bgColor}],children:p(f,{style:[d.timelineStatusText,{color:Q.color}],testID:`${g}-async-step-${W}-status`,children:Q.label})}),Y&&p(i,{style:d.currentBadge,testID:`${g}-async-step-${W}-current`,children:p(f,{style:d.currentBadgeText,children:"CURRENT"})})]}),p(f,{style:d.timelineTime,children:In(M.timestamp)})]})]},M.id)})})]})]}),u&&R(i,{style:d.card,testID:`${g}-payload-card`,children:[p(Ce,{icon:mn,title:"PAYLOAD",badge:p(i,{style:d.typeBadge,children:p(f,{style:d.typeText,children:Array.isArray(e.payload)?"ARRAY":typeof e.payload=="object"?"OBJECT":typeof e.payload?.toString().toUpperCase()})})}),p(i,{style:d.dataViewerContainer,children:p(_e,{title:"",data:He(e.payload),showTypeFilter:true,rawMode:true,initialExpanded:true})})]}),h&&R(i,{style:d.card,testID:`${g}-meta-card`,children:[p(Ce,{icon:or,title:"ASYNC METADATA",badge:p(i,{style:[d.categoryBadge,{backgroundColor:n.bgColor}],children:p(f,{style:[d.categoryText,{color:n.color}],children:"RTK THUNK"})})}),R(i,{style:d.cardContent,children:[e.meta?.requestId&&p(ne,{label:"Request ID",value:e.meta.requestId,mono:true}),e.meta?.requestStatus&&p(ne,{label:"Status",value:e.meta.requestStatus.toUpperCase(),valueColor:n.color,testID:`${g}-meta-status`}),e.meta?.arg!==void 0&&R(i,{style:d.argSection,children:[p(f,{style:d.argLabel,children:"Original Argument"}),p(i,{style:d.argValueContainer,children:typeof e.meta.arg=="object"?p(_e,{title:"",data:He(e.meta.arg),showTypeFilter:true,rawMode:true,initialExpanded:true}):p(f,{style:d.argValue,children:JSON.stringify(e.meta.arg)})})]}),e.meta?.rejectedWithValue&&p(ne,{label:"Rejected With Value",value:"true",valueColor:I.error}),e.meta?.aborted&&p(ne,{label:"Aborted",value:"true",valueColor:I.warning}),e.meta?.condition&&p(ne,{label:"Condition",value:"true",valueColor:S.color.textTertiary})]})]}),y&&R(i,{style:[d.card,d.errorCard],testID:`${g}-error-card`,children:[p(Ce,{icon:bn,title:"ERROR",badge:p(i,{style:d.errorBadge,children:p(f,{style:d.errorBadgeText,testID:`${g}-error-badge`,children:"REJECTED"})})}),p(i,{style:d.dataViewerContainer,children:typeof e.error=="object"?p(_e,{title:"",data:He(e.error),showTypeFilter:true,rawMode:true,initialExpanded:true}):p(f,{style:d.errorText,children:String(e.error)})})]}),R(i,{style:d.card,testID:`${g}-full-action-card`,children:[p(Ce,{icon:xn,title:"FULL ACTION OBJECT"}),p(i,{style:d.dataViewerContainer,children:p(_e,{title:"",data:He(e.action),showTypeFilter:true,rawMode:true,initialExpanded:true})})]}),p(i,{style:d.actionFooter,children:R(i,{style:d.actionsGrid,children:[R(i,{style:d.actionButtonWrapper,children:[p(qe,{type:"replay",text:"REPLAY",onPress:B,testID:`${g}-replay`}),p(f,{style:d.actionDescription,children:"Dispatch again"})]}),R(i,{style:d.actionButtonWrapper,children:[p(qe,{type:"jump",text:"JUMP",onPress:L,disabled:s,testID:`${g}-jump`}),p(f,{style:d.actionDescription,testID:`${g}-jump-description`,children:c?"State not retained":l?"Restore this state":"Time travel not wired"})]}),R(i,{style:d.actionButtonWrapper,children:[p(qe,{type:"copy",text:"COPY ACTION",onPress:z,testID:`${g}-copy-action`}),p(f,{style:d.actionDescription,children:r?"Copy to clipboard":"Pro feature"})]}),u&&R(i,{style:d.actionButtonWrapper,children:[p(qe,{type:"copy",text:"COPY PAYLOAD",onPress:F,testID:`${g}-copy-payload`}),p(f,{style:d.actionDescription,children:r?"Copy payload only":"Pro feature"})]})]})}),p(Cn,{visible:o,onClose:()=>a(false),featureName:"Copy"})]})}),d=pe.create({container:{flex:1},contentContainer:{padding:8,paddingBottom:100,gap:16},card:{backgroundColor:S.color.surface,borderRadius:6,borderWidth:1,borderColor:S.color.accent+"4D",overflow:"hidden",shadowColor:S.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6},errorCard:{borderColor:I.error+"4D",shadowColor:I.error},sectionHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,paddingVertical:10,borderBottomWidth:1,borderBottomColor:S.color.accent+"33",backgroundColor:S.color.accent+"15"},sectionHeaderLeft:{flexDirection:"row",alignItems:"center",gap:6},sectionTitle:{fontSize:12,fontWeight:"600",letterSpacing:.5,color:S.color.accent,fontFamily:ie},cardContent:{padding:14,gap:10},badgeRow:{flexDirection:"row",flexWrap:"wrap",gap:8,marginTop:6},categoryBadge:{paddingHorizontal:8,paddingVertical:3,borderRadius:4},categoryText:{fontSize:9,fontWeight:"700",letterSpacing:.3},durationBadge:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:8,paddingVertical:3,borderRadius:4,backgroundColor:S.color.surfaceElevated},durationBadgeSlow:{backgroundColor:I.error+"26"},durationText:{fontSize:9,fontWeight:"600",color:S.color.textSecondary,fontFamily:ie},durationTextSlow:{color:I.error},changesBadge:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:8,paddingVertical:3,borderRadius:4,backgroundColor:I.success+"26"},changesText:{fontSize:9,fontWeight:"600",color:I.success},noChangesBadge:{paddingHorizontal:8,paddingVertical:3,borderRadius:4,backgroundColor:S.color.surfaceElevated},noChangesText:{fontSize:9,fontWeight:"600",color:S.color.textTertiary},typeBadge:{paddingHorizontal:6,paddingVertical:2,borderRadius:3,backgroundColor:S.color.surfaceElevated},typeText:{fontSize:8,fontWeight:"600",color:S.color.textTertiary,fontFamily:ie},dataViewerContainer:{backgroundColor:S.color.bg,minHeight:60},argSection:{marginTop:4},argLabel:{fontSize:11,color:S.color.textTertiary,fontWeight:"500",marginBottom:6},argValueContainer:{backgroundColor:S.color.bg,borderRadius:6,borderWidth:1,borderColor:S.color.border,overflow:"hidden"},argValue:{fontSize:11,color:S.color.text,fontFamily:ie,padding:10},errorBadge:{paddingHorizontal:8,paddingVertical:3,borderRadius:4,backgroundColor:I.error+"26"},errorBadgeText:{fontSize:9,fontWeight:"700",color:I.error,letterSpacing:.3},errorText:{fontSize:12,color:I.error,fontFamily:ie,padding:14},asyncBadge:{paddingHorizontal:8,paddingVertical:3,borderRadius:4,backgroundColor:S.color.accent+"26"},asyncBadgeText:{fontSize:9,fontWeight:"700",color:S.color.accent,letterSpacing:.3},baseActionType:{fontSize:12,fontWeight:"600",color:S.color.text,fontFamily:ie,marginBottom:8},totalDurationRow:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:12,paddingBottom:12,borderBottomWidth:1,borderBottomColor:S.color.border},totalDurationLabel:{fontSize:11,color:S.color.textTertiary,fontWeight:"500"},totalDurationValue:{fontSize:14,fontWeight:"700",color:I.success,fontFamily:ie},timeline:{gap:0},timelineItem:{flexDirection:"row",alignItems:"flex-start",paddingVertical:8,paddingHorizontal:8,borderRadius:8,position:"relative"},timelineItemCurrent:{backgroundColor:S.color.accentSoft},timelineConnector:{position:"absolute",left:13,top:24,bottom:-8,width:2,backgroundColor:S.color.border},timelineDot:{width:12,height:12,borderRadius:6,marginRight:10,marginTop:2},timelineContent:{flex:1},timelineHeader:{flexDirection:"row",alignItems:"center",gap:8,marginBottom:2},timelineStatusBadge:{paddingHorizontal:6,paddingVertical:2,borderRadius:4},timelineStatusText:{fontSize:9,fontWeight:"700",letterSpacing:.3},currentBadge:{paddingHorizontal:6,paddingVertical:2,borderRadius:4,backgroundColor:S.color.accent},currentBadgeText:{fontSize:8,fontWeight:"700",color:S.color.onAccent,letterSpacing:.3},timelineTime:{fontSize:10,color:S.color.textTertiary,fontFamily:ie},actionFooter:{backgroundColor:S.color.surface,borderRadius:6,borderWidth:1,borderColor:S.color.accent+"4D",paddingVertical:12,paddingHorizontal:12,shadowColor:S.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6},actionsGrid:{flexDirection:"row",flexWrap:"wrap",gap:12,justifyContent:"flex-start"},actionButtonWrapper:{alignItems:"center",gap:4},actionDescription:{fontSize:9,color:S.color.textTertiary,textAlign:"center"}});import{DiffModeTabs as Bn,CompareBar as Rn}from"@buoy-gg/shared-ui/web";import{jsx as k,jsxs as ge}from"react/jsx-runtime";function pt(e){return e.includes("/pending")?Ae.semantic.warning:e.includes("/fulfilled")?Ae.semantic.success:e.includes("/rejected")?Ae.semantic.error:e.startsWith("@@")?Ae.text.muted:Ae.semantic.info}function dr(e){if(e.includes("/pending"))return"PENDING";if(e.includes("/fulfilled"))return"FULFILLED";if(e.includes("/rejected"))return"REJECTED";if(e.startsWith("@@"))return"INTERNAL";let t=e.split("/");return t[t.length-1]?.toUpperCase()||"ACTION"}function kn(e){return e===null?"null":e===void 0?"undefined":Array.isArray(e)?"array":typeof e}function ur(e){return new Date(e).toLocaleTimeString("en-US",{hour12:false,hour:"2-digit",minute:"2-digit",second:"2-digit"})}var En=[{key:"tree",label:"TREE VIEW"},{key:"split",label:"SPLIT VIEW"}];function pr({action:e,actions:t,selectedIndex:r,onIndexChange:o,disableInternalFooter:a=false,initialView:n="action"}){let[c,l]=er(n),[s,u]=er("tree"),h=t.length,y=ee(e.nextState),b=pt(e.type),E=dr(e.type),j=kn(We(e.nextState)),V=h-r,z=V-1,F=r<h-1?r+1:null,B=F!==null?t[F]:null,L=tr(()=>({index:F??0,label:z>0?`#${z}`:"Initial",timestamp:B?ur(B.timestamp):"",relativeTime:B?Fe(new Date(B.timestamp)):"state",badge:B?k(i,{style:[$.actionBadgeSmall,{backgroundColor:`${pt(B.type)}20`}],children:k(f,{style:[$.actionTextSmall,{color:pt(B.type)}],children:dr(B.type)})}):void 0}),[F,B,z]),M=tr(()=>({index:r,label:`#${V}`,timestamp:ur(e.timestamp),relativeTime:Fe(new Date(e.timestamp)),badge:k(i,{style:[$.actionBadgeSmall,{backgroundColor:`${b}20`}],children:k(f,{style:[$.actionTextSmall,{color:b}],children:E})})}),[r,e.timestamp,b,E,V]),W=Pe(()=>{if(y)return ge(i,{style:$.contentCard,testID:`${g}-state-evicted`,children:[k(i,{style:$.valueHeader,children:k(f,{style:$.valueLabel,children:"STATE AFTER ACTION"})}),k(f,{style:$.evictedText,children:`Not retained. Raw state is kept for the ${tt} most recent actions, so this action's before/after trees have been released.`})]});let he=We(e.nextState);return ge(i,{style:$.contentCard,testID:`${g}-state-card`,children:[ge(i,{style:$.valueHeader,children:[k(f,{style:$.valueLabel,children:"STATE AFTER ACTION"}),ge(i,{style:$.valueHeaderBadges,children:[k(i,{style:[$.actionBadge,{backgroundColor:`${b}20`}],children:k(f,{style:[$.actionText,{color:b}],children:E})}),k(i,{style:$.typeBadge,children:k(f,{style:$.typeText,testID:`${g}-state-type`,children:j.toUpperCase()})})]})]}),k(i,{style:$.dataViewerContainer,children:k(Ja,{title:"",data:he,showTypeFilter:true,rawMode:true,initialExpanded:true})})]})},[e.nextState,b,E,j,y]),Q=Pe(()=>{let he=We(e.prevState),fe=We(e.nextState);return s==="split"?k(Oe,{style:{flex:1},showsVerticalScrollIndicator:true,children:k(Ga,{oldValue:he,newValue:fe,theme:Qa.devToolsDefault,options:{hideLineNumbers:false,disableWordDiff:false,showDiffOnly:false,compareMethod:"words",contextLines:3},showThemeName:false})}):k(Xa,{oldValue:he,newValue:fe})},[e.prevState,e.nextState,s]),Y=Pe(()=>{o(Math.min(h-1,r+1))},[r,h,o]),Je=Pe(()=>{o(Math.max(0,r-1))},[r,o]),N=y||ee(e.prevState)||e.prevState===void 0,Z=!a&&h>1;return ge(i,{style:$.container,children:[k(sn,{activeView:c,onViewChange:l,diffDisabled:N}),ge(i,{style:[$.contentArea,Z&&$.contentAreaFooterPad],children:[c==="action"&&k(Dn,{action:e}),c==="state"&&k(i,{style:$.stateContainer,children:W()}),c==="diff"&&ge(i,{style:$.diffContainer,testID:`${g}-diff`,children:[k(Bn,{tabs:En,activeTab:s,onTabChange:u,testIDPrefix:`${g}-diff-tab`}),k(Rn,{leftEvent:L,rightEvent:M}),k(i,{style:$.diffContent,testID:`${g}-diff-content`,children:Q()})]})]}),Z&&k(rr,{currentIndex:V-1,totalItems:h,onPrevious:Y,onNext:Je,itemLabel:"Action",subtitle:Fe(new Date(e.timestamp)),absolute:true})]})}function gr({action:e,actions:t,selectedIndex:r,onIndexChange:o}){let a=t.length;if(a<=1)return null;let n=a-r;return k(rr,{currentIndex:n-1,totalItems:a,onPrevious:()=>o(Math.min(a-1,r+1)),onNext:()=>o(Math.max(0,r-1)),itemLabel:"Action",subtitle:Fe(new Date(e.timestamp))})}var $=pe.create({container:{flex:1,backgroundColor:"transparent"},contentArea:{flex:1},contentAreaFooterPad:{paddingBottom:96},stateContainer:{flex:1,padding:14},contentCard:{backgroundColor:X.color.surface,borderRadius:14,padding:14,borderWidth:1,borderColor:X.color.border},valueHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:8},valueLabel:{fontSize:10,color:X.color.textSecondary,fontFamily:Ie,letterSpacing:.5,fontWeight:"600"},valueHeaderBadges:{flexDirection:"row",alignItems:"center",gap:6},actionBadge:{paddingHorizontal:8,paddingVertical:2,borderRadius:4},actionText:{fontSize:9,fontWeight:"700",fontFamily:Ie,letterSpacing:.3},typeBadge:{paddingHorizontal:8,paddingVertical:2,borderRadius:4,backgroundColor:X.color.surfaceElevated},typeText:{fontSize:9,fontWeight:"600",color:X.color.textTertiary,fontFamily:Ie},valueBox:{backgroundColor:X.color.bg,borderRadius:6,borderWidth:1,borderColor:X.color.border,padding:8},evictedText:{fontSize:12,color:X.color.textSecondary,lineHeight:18},valueText:{fontSize:12,color:X.color.text,fontFamily:Ie,lineHeight:18},diffContainer:{flex:1},diffContent:{flex:1,paddingHorizontal:14},actionBadgeSmall:{paddingHorizontal:6,paddingVertical:1,borderRadius:3},actionTextSmall:{fontSize:8,fontWeight:"700",fontFamily:Ie},dataViewerContainer:{marginTop:-12,marginHorizontal:-12,marginBottom:-12}});import{Fragment as $n,jsx as m,jsxs as P}from"react/jsx-runtime";var Vn=va["redux.actions"].free;function zn({isEnabled:e,query:t,totalActions:r}){let o=Ia({subject:"actions",search:t,total:r,capturing:e,waiting:{otto:"waiting",title:"No Redux actions",message:"Actions will appear here as they are dispatched"},paused:{title:"No Redux actions",message:"Enable capture to start recording actions"}});return m(Aa,{...o,testID:`${g}-empty`})}function gt({visible:e,onClose:t,onBack:r,onMinimize:o,enableSharedModalDimensions:a=false,inline:n=false,onActionSelect:c,initialSelectedActionId:l,initialDetailView:s}){let u=Ra(),h=wa("redux.actions"),[y,b]=Ve(false),{isInstrumented:E,isLoading:j,error:V,isReactReduxAvailable:z,captureMechanism:F}=ct(),{filteredActions:B,filter:L,setFilter:M,stats:W,clearActions:Q,isEnabled:Y,toggleCapture:Je}=Kt(),N=we(()=>B.slice(0,h),[B,h]),Z=we(()=>Math.max(0,B.length-h),[B.length,h]),he=Z>0,[fe,Be]=Ve(null),ye=we(()=>{if(fe===null)return null;let C=N.findIndex(O=>O.id===fe);return C>=0?C:null},[fe,N]),K=ye!==null?N[ye]:null,yt=ze(null);Ft(()=>{if(!c)return;let C=K?.id??null;C===null||C===yt.current||(yt.current=C,c(K))},[K,c]);let mt=ze(null);Ft(()=>{!l||mt.current===l||N.findIndex(C=>C.id===l)<0||(mt.current=l,Be(l))},[l,N]);let[Se,bt]=Ve(""),[xt,Ge]=Ve(false),ai=ze(null),br=ze(null),xr=te(C=>{},[]),Cr=C=>{bt(C),M(O=>({...O,searchText:C}))},Sr=te(()=>{bt(""),M(C=>({...C,searchText:""})),Ge(false)},[M]),Ct=te(C=>{Be(C.id)},[]),wr=te(()=>{b(true)},[]),vr=te(()=>{Be(null)},[]),St=te(C=>{let O=N[C];O&&Be(O.id)},[N]),Tr=async()=>{if(!u){b(true);return}let C=B.map(O=>({id:O.id,type:O.type,...O.payload!==void 0&&{payload:O.payload},timestamp:O.timestamp,prevState:O.prevState,nextState:O.nextState,hasStateChange:O.hasStateChange}));await xa(C)},Ar=te(C=>C.id,[]),wt=we(()=>sr(N),[N]),vt=we(()=>{let C=new Map;for(let O of x.getActions()){let Xe=O.meta?.requestId;Xe&&C.set(Xe,(C.get(Xe)??0)+1)}return C},[B]),Ir=te(({item:C})=>{let O=C.meta?.requestId;return m(Zt,{action:C,onPress:Ct,linkedCount:O?vt.get(O)??0:0,testID:wt.get(C.id)})},[Ct,wt,vt]),Tt=()=>K?P(re,{children:[m(re.Navigation,{onBack:vr}),m(re.Content,{title:K.type,centered:true,testID:`${g}-detail-title`})]}):P(re,{children:[r&&m(re.Navigation,{onBack:r}),m(re.Content,{title:"",children:xt?m(re.Search,{value:Se,onChangeText:Cr,onCancel:Sr,placeholder:"Search action types...",accessibilityLabel:"Search action types",iconSize:14,testID:`${g}-search-field`,containerTestID:`${g}-search`,clearTestID:`${g}-search-clear`,onBlur:()=>{Se.length===0&&Ge(false)}}):P(i,{style:A.headerChipRow,children:[P(J,{style:[A.headerChip,!L.onlyWithChanges&&A.headerChipActive],onPress:()=>M(C=>({...C,onlyWithChanges:false})),testID:`${g}-chip-all`,accessibilityRole:"button",accessibilityLabel:`Show all actions, ${W.totalActions} captured`,accessibilityState:{selected:!L.onlyWithChanges},children:[m(f,{style:A.headerChipLabel,children:"ALL"}),m(f,{style:[A.headerChipValue,{color:v.color.text}],testID:`${g}-chip-all-value`,children:W.totalActions})]}),P(J,{style:[A.headerChip,L.onlyWithChanges&&A.headerChipActive],onPress:()=>M(C=>({...C,onlyWithChanges:true})),testID:`${g}-chip-changed`,accessibilityRole:"button",accessibilityLabel:`Show only actions that changed state, ${W.actionsWithChanges} of them`,accessibilityState:{selected:!!L.onlyWithChanges},children:[m(ha,{size:12,color:G.semantic.warning}),m(f,{style:[A.headerChipValue,{color:G.semantic.warning}],testID:`${g}-chip-changed-value`,children:W.actionsWithChanges})]}),P(i,{style:A.headerChip,testID:`${g}-chip-types`,accessibilityLabel:`${W.uniqueActionTypes} distinct action types`,children:[m(fa,{size:12,color:G.semantic.success}),m(f,{style:[A.headerChipValue,{color:G.semantic.success}],testID:`${g}-chip-types-value`,children:W.uniqueActionTypes})]})]})}),P(re.Actions,{children:[!xt&&m(J,{onPress:()=>Ge(true),style:[A.headerActionButton,Se.length>0&&A.headerActionButtonActive],testID:`${g}-search-open`,accessibilityRole:"button",accessibilityLabel:"Search action types",children:m(ua,{size:14,color:Se.length>0?v.color.accent:v.color.textSecondary})}),m(J,{onPress:Tr,style:[A.headerActionButton,B.length===0&&A.headerActionButtonDisabled],disabled:B.length===0,testID:`${g}-copy`,accessibilityRole:"button",accessibilityLabel:"Copy all actions",accessibilityState:{disabled:B.length===0},children:m(ya,{size:14,color:B.length>0?v.color.textSecondary:v.color.textTertiary})}),m(Sa,{isEnabled:Y,onToggle:Je,accessibilityLabel:"Toggle Redux action capture",testID:`${g}-power`}),m(J,{onPress:Q,style:[A.headerActionButton,B.length===0&&A.headerActionButtonDisabled],disabled:B.length===0,testID:`${g}-clear`,accessibilityRole:"button",accessibilityLabel:"Clear actions",accessibilityState:{disabled:B.length===0},children:m(pa,{size:14,color:B.length>0?v.color.textTertiary:v.color.textTertiary})})]})]}),Dr=a?ba.modal.root():"buoy-redux-modal";if(!e)return null;let At=K&&ye!==null?m(gr,{action:K,actions:N,selectedIndex:ye,onIndexChange:St}):null,Br=K&&N.length>1?68:0,Rr=K==null,It=m(i,{style:A.container,children:K&&ye!==null?m(pr,{action:K,actions:N,selectedIndex:ye,onIndexChange:St,disableInternalFooter:true,initialView:s}):P($n,{children:[V&&!E&&!x.isCaptureSuppressed()&&P(i,{style:A.errorBanner,testID:`${g}-banner-error`,children:[m(Ht,{size:14,color:v.color.danger}),m(f,{style:A.errorText,children:z?"Not inside a Redux Provider. Wrap your app with <Provider store={store}>.":"react-redux not installed. Run: npm install react-redux"})]}),!Y&&E&&P(i,{style:A.disabledBanner,testID:`${g}-banner-disabled`,children:[m(ga,{size:14,color:v.color.warning}),m(f,{style:A.disabledText,children:"Action capture is disabled"})]}),F==="patch"&&!x.isCaptureSuppressed()&&P(i,{style:A.disabledBanner,testID:`${g}-banner-patch`,children:[m(Ht,{size:14,color:v.color.warning}),m(f,{style:A.disabledText,children:"Top-level capture only \u2014 thunk/RTK Query internals aren't visible. Put import '@buoy-gg/redux' first in your app entry (or add buoyReduxMiddleware) for full capture."})]}),he&&P(J,{style:A.lockedBanner,onPress:wr,activeOpacity:.8,testID:`${g}-locked`,accessibilityRole:"button",accessibilityLabel:`${Z} older ${Z===1?"action":"actions"} locked. Upgrade to see them.`,children:[m(ma,{size:14,color:v.color.accent}),P(f,{style:A.lockedText,testID:`${g}-locked-text`,children:[Z," older ",Z===1?"action":"actions"," locked"]}),m(i,{style:A.upgradeBadge,children:m(f,{style:A.upgradeBadgeText,children:"UPGRADE"})})]}),N.length>0?m(Mt,{ref:br,testID:`${g}-list`,data:N,renderItem:Ir,keyExtractor:Ar,contentContainerStyle:A.listContent,showsVerticalScrollIndicator:true,...Da}):m(zn,{isEnabled:Y,query:Se,totalActions:W.totalActions})]})}),Dt=m(Ca,{visible:y,onClose:()=>b(false),featureName:"Full Action History"});return n?P(_t,{children:[P(i,{style:A.inlineRoot,children:[m(i,{style:A.inlineHeader,...Ta,children:Tt()}),It,At]}),Dt]}):P(_t,{children:[m(da,{visible:e,onClose:t,onMinimize:o,persistenceKey:Dr,header:{showToggleButton:true,customContent:Tt()},onModeChange:xr,enablePersistence:true,initialMode:"bottomSheet",enableGlitchEffects:true,disableScrollWrapper:Rr,styles:{},footer:At,footerHeight:Br,children:It}),Dt]})}function On(e={}){return m(gt,{...e,inline:true,visible:true,onClose:()=>{}})}var A=pe.create({inlineRoot:{flex:1,minHeight:0,backgroundColor:"transparent"},inlineHeader:{paddingHorizontal:12,paddingVertical:8,borderBottomWidth:1,borderBottomColor:G.border.default,backgroundColor:"transparent"},container:{flex:1,backgroundColor:"transparent"},headerChipRow:{flexDirection:"row",alignItems:"center",gap:8},headerChip:{flexDirection:"row",alignItems:"center",gap:4,backgroundColor:v.color.surfaceElevated,paddingHorizontal:10,paddingVertical:5,borderRadius:12,borderWidth:1,borderColor:v.color.border},headerChipActive:{backgroundColor:v.color.accentSoft,borderColor:v.color.accentBorderStrong},headerChipLabel:{fontSize:10,fontWeight:"700",color:v.color.textTertiary},headerChipValue:{fontSize:12,fontWeight:"600",fontFamily:Ba},headerActionButton:{width:32,height:32,borderRadius:8,backgroundColor:v.color.surfaceElevated,borderWidth:1,borderColor:v.color.border,alignItems:"center",justifyContent:"center"},headerActionButtonDisabled:{opacity:.55},headerActionButtonActive:{backgroundColor:v.color.accentSoft,borderColor:v.color.accentBorderStrong},startButton:{backgroundColor:G.semantic.successBackground,borderColor:G.semantic.success+"40"},stopButton:{backgroundColor:G.semantic.errorBackground,borderColor:G.semantic.error+"40"},errorBanner:{flexDirection:"row",alignItems:"center",gap:8,padding:10,marginHorizontal:12,marginTop:8,backgroundColor:v.color.dangerSoft,borderRadius:8,borderWidth:1,borderColor:v.color.danger+"20"},errorText:{color:v.color.danger,fontSize:11,flex:1},disabledBanner:{flexDirection:"row",alignItems:"center",gap:8,padding:10,marginHorizontal:12,marginTop:8,backgroundColor:v.color.warningSoft,borderRadius:8,borderWidth:1,borderColor:v.color.warning+"20"},disabledText:{color:v.color.warning,fontSize:11,flex:1},listContent:{paddingTop:8,paddingBottom:20},lockedBanner:{flexDirection:"row",alignItems:"center",gap:8,padding:10,marginHorizontal:12,marginTop:8,backgroundColor:v.color.accentSoft,borderRadius:8,borderWidth:1,borderColor:v.color.accentBorder},lockedText:{color:v.color.accent,fontSize:11,fontWeight:"500",flex:1},upgradeBadge:{backgroundColor:v.color.accent,paddingHorizontal:8,paddingVertical:3,borderRadius:4},upgradeBadgeText:{color:v.color.onAccent,fontSize:9,fontWeight:"700",letterSpacing:.5}});import{ReduxIcon as Ue,REDUX_ICON_COLOR as ji}from"@buoy-gg/floating-tools-core/web";import{createToolFactory as jn,defineToolPreset as Ln}from"@buoy-gg/shared-ui/web";import{jsx as hr}from"react/jsx-runtime";var fr=Ln({id:"redux",name:"REDUX",description:"Redux action & state inspector",slot:"both",icon:({size:e})=>hr(Ue,{size:e}),component:gt,props:{enableSharedModalDimensions:false}}),Nn=jn(fr,e=>({enableSharedModalDimensions:e.enableSharedModalDimensions??false}),e=>({icon:({size:t})=>hr(Ue,{size:t,color:e.iconColor})}));var Pn={timeTravel:false,toggle:false,edit:false,diff:true,export:true,import:false,reset:true,recording:true};function Fn(e,t,r){return{id:e.id,label:e.type,timestamp:e.timestamp,data:e.payload??e.action,prevState:e.prevState,nextState:e.nextState,hasStateChange:e.hasStateChange,duration:e.duration,source:"redux",isCurrent:t===0,isInFuture:false,isSkipped:false,meta:{fullAction:e.action}}}function yr(e){let{icon:t=Ue,color:r="#764ABC",name:o="Redux"}=e??{},a=0;return{id:"redux",name:o,icon:t,color:r,capabilities:Pn,subscribe:n=>x.subscribe(()=>{n()}),getEntries:()=>{let n=x.getActions();return n.map((c,l)=>Fn(c,l,n.length))},getEntryCount:()=>x.getActions().length,getCurrentState:()=>{let n=x.getActions();if(n.length!==0)return n[0].nextState},getStateAtEntry:n=>x.getActionById(String(n))?.nextState,get currentIndex(){return a},jumpTo:n=>{let c=x.getActions().findIndex(l=>l.id===String(n));c!==-1&&(a=c)},get isRecording(){return x.getEnabled()},setRecording:n=>{x.setEnabled(n)},reset:()=>{x.clearActions(),a=0},exportHistory:()=>{let n=x.getActions();return JSON.stringify(n,null,2)}}}var Wn=yr();import{WIRE_DETAIL_LIMIT_BYTES as Mn,capDetail as Hn,createSyncAdapter as _n,memoByIdentity as qn,readParams as De,toWire as Un}from"@buoy-gg/shared-ui/web";var Ke=e=>Un(e,_r),Kn=qn(e=>{let t=ee(e.prevState)?{...e}:{...e,prevState:Vt,nextState:Vt};if(t.payload=Ke(t.payload),t.action=Ke(t.action),t.error=Ke(t.error),t.meta){let r=Ke(t.meta.arg);r!==t.meta.arg&&(t.meta={...t.meta,arg:r})}return t});function Yn(e){return e&&typeof e=="object"&&!Array.isArray(e)?Object.keys(e):[]}function Jn(e,t){let{path:r,value:o,remove:a}=t;if(!r)return{ok:false,error:'setState needs a `path`, like "offers.added.<id>".'};if(!a&&o===void 0)return{ok:false,error:"Sent `path` without `value`. Send value (null is fine) or remove:true."};let n=r.split(".").filter(Boolean),c=y=>Array.isArray(y)?[...y]:{...y},l=c(e),s=l;for(let y=0;y<n.length-1;y++){let b=n[y],E=s[b];if(!E||typeof E!="object")return{ok:false,error:`No object at "${n.slice(0,y+1).join(".")}" \u2014 read getState for the real shape.`};let j=c(E);s[b]=j,s=j}let u=n[n.length-1],h=s[u];if(a){if(!(u in s))return{ok:false,error:`Nothing at "${r}" to remove.`};Array.isArray(s)?s.splice(Number(u),1):delete s[u]}else s[u]=o;return{ok:true,next:l,prev:h}}function Gn(e){let t={};if(!e||typeof e!="object"||Array.isArray(e))return t;for(let[r,o]of Object.entries(e).slice(0,40))o&&typeof o=="object"&&!Array.isArray(o)&&(t[r]=Object.keys(o).slice(0,12));return t}function ht(){let e=ue().diagnostic??"not-instrumented";return{available:false,slices:[],reason:e}}var Xn=_n({version:2,getSnapshot:()=>x.getActions().map(Kn),subscribe:e=>x.subscribe(e),actions:{clearEvents:()=>{x.clearActions()},getActionDetail:e=>{let{id:t}=De(e);if(!t)return{found:false,reason:"missing id"};let r=x.getActionById(t);if(!r)return{found:false,reason:"unknown id"};if(ee(r.prevState))return{found:true,id:t,evicted:true,reason:"Raw state was evicted (retained for recent actions only)."};let o=n=>Hn(n,Mn),a=n=>{if(!n)return n;let c=o(n.arg);return c===n.arg?n:{...n,arg:c}};return{found:true,id:t,prevState:o(r.prevState),nextState:o(r.nextState),payload:o(r.payload),action:o(r.action),meta:a(r.meta),error:o(r.error)}},getState:e=>{let{includeValues:t=false}=De(e),r=Le();if(!r)return ht();let o=r.getState(),a=ue();return{available:true,slices:Yn(o),sliceFields:Gn(o),capture:a.capture,mechanism:a.mechanism,...t?{state:o}:{}}},dispatch:e=>{let{action:t}=De(e),r=Le();if(!r)return{dispatched:false,...ht()};if(!t)throw new Error("dispatch requires an `action`");return r.dispatch(t),{dispatched:true,type:t.type}},setState:e=>{let t=Le();if(!t)return{ok:false,...ht()};if(!Re())return{ok:false,error:"This store has no Buoy time-travel reducer, so its state can't be edited directly. Dispatch one of the app's own actions instead."};let r=Jn(t.getState(),De(e));return r.ok?(t.dispatch({type:xe,payload:r.next}),{ok:true,path:De(e).path,previous:r.prev}):r}}});import{useState as Qn}from"react";import{macOSColors as le,night as U,TabSelector as Zn,DataInspector as se,CollapsibleSection as Ye,CopyButton as ei,monoFont as ft}from"@buoy-gg/shared-ui/web";import{jsx as w,jsxs as _}from"react/jsx-runtime";function ti({action:e}){let[t,r]=Qn("action"),o=[{key:"action",label:"Action"},{key:"state",label:"State"},{key:"diff",label:"Diff"}],a=new Date(e.timestamp).toLocaleTimeString(),n=()=>JSON.stringify({type:e.type,payload:e.payload,timestamp:e.timestamp,duration:e.duration,hasStateChange:e.hasStateChange},null,2);return _(i,{style:T.container,children:[_(i,{style:T.header,children:[_(i,{style:T.headerContent,children:[w(f,{style:T.actionType,numberOfLines:2,children:e.type}),_(i,{style:T.headerMeta,children:[w(f,{style:T.metaText,children:a}),e.duration!==void 0&&_(f,{style:T.durationText,children:[e.duration.toFixed(2),"ms"]}),e.hasStateChange&&w(i,{style:T.changeBadge,children:w(f,{style:T.changeBadgeText,children:"State Changed"})})]})]}),w(ei,{value:n(),size:16})]}),w(i,{style:T.tabContainer,children:w(Zn,{tabs:o,activeTab:t,onTabChange:c=>r(c)})}),_(Oe,{style:T.content,showsVerticalScrollIndicator:true,children:[t==="action"&&_(i,{style:T.section,children:[w(Ye,{title:"Payload",defaultOpen:true,children:e.payload!==void 0?w(se,{data:e.payload}):w(f,{style:T.emptyText,children:"No payload"})}),w(Ye,{title:"Full Action",defaultOpen:false,children:w(se,{data:e.action})})]}),t==="state"&&_(i,{style:T.section,children:[w(Ye,{title:"Previous State",defaultOpen:false,children:w(se,{data:e.prevState})}),w(Ye,{title:"Next State",defaultOpen:true,children:w(se,{data:e.nextState})})]}),t==="diff"&&w(i,{style:T.section,children:e.hasStateChange?w(ri,{prevState:e.prevState,nextState:e.nextState}):w(i,{style:T.noChangeContainer,children:w(f,{style:T.noChangeText,children:"No state changes from this action"})})})]})]})}function ri({prevState:e,nextState:t}){let r=mr(e,t);return r.length===0?w(i,{style:T.noChangeContainer,children:w(f,{style:T.noChangeText,children:"No differences detected"})}):w(i,{children:r.map((o,a)=>_(i,{style:T.diffItem,children:[_(i,{style:T.diffHeader,children:[w(i,{style:[T.diffTypeBadge,{backgroundColor:o.type==="added"?le.semantic.successBackground:o.type==="removed"?le.semantic.errorBackground:le.semantic.warningBackground}],children:w(f,{style:[T.diffTypeText,{color:o.type==="added"?le.semantic.success:o.type==="removed"?le.semantic.error:le.semantic.warning}],children:o.type.toUpperCase()})}),w(f,{style:T.diffPath,children:o.path})]}),o.type==="modified"&&_(i,{style:T.diffValues,children:[_(i,{style:T.diffValue,children:[w(f,{style:T.diffLabel,children:"Before:"}),w(se,{data:o.oldValue})]}),_(i,{style:T.diffValue,children:[w(f,{style:T.diffLabel,children:"After:"}),w(se,{data:o.newValue})]})]}),o.type==="added"&&w(i,{style:T.diffValue,children:w(se,{data:o.newValue})}),o.type==="removed"&&w(i,{style:T.diffValue,children:w(se,{data:o.oldValue})})]},a))})}function mr(e,t,r=""){let o=[];if(typeof e!="object"||typeof t!="object")return e!==t&&o.push({type:"modified",path:r||"root",oldValue:e,newValue:t}),o;if(e===null||t===null)return e!==t&&o.push({type:"modified",path:r||"root",oldValue:e,newValue:t}),o;let a=e,n=t,c=new Set([...Object.keys(a),...Object.keys(n)]);for(let l of c){let s=r?`${r}.${l}`:l,u=a[l],h=n[l];l in a?l in n?u!==h&&(typeof u=="object"&&typeof h=="object"&&u!==null&&h!==null&&!Array.isArray(u)&&!Array.isArray(h)?s.split(".").length<3?o.push(...mr(u,h,s)):o.push({type:"modified",path:s,oldValue:u,newValue:h}):o.push({type:"modified",path:s,oldValue:u,newValue:h})):o.push({type:"removed",path:s,oldValue:u}):o.push({type:"added",path:s,newValue:h})}return o}var T=pe.create({container:{flex:1},header:{flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between",paddingHorizontal:12,paddingVertical:12,backgroundColor:U.color.surface,borderBottomWidth:1,borderBottomColor:U.color.border},headerContent:{flex:1,marginRight:12},actionType:{fontSize:14,fontWeight:"600",color:U.color.text,fontFamily:ft,marginBottom:6},headerMeta:{flexDirection:"row",alignItems:"center",gap:12},metaText:{fontSize:11,color:U.color.textTertiary},durationText:{fontSize:11,color:U.color.textTertiary,fontFamily:ft},changeBadge:{backgroundColor:le.semantic.warningBackground,paddingHorizontal:6,paddingVertical:2,borderRadius:4},changeBadgeText:{fontSize:10,color:le.semantic.warning,fontWeight:"600"},tabContainer:{paddingHorizontal:12,paddingVertical:8},content:{flex:1},section:{paddingHorizontal:12,paddingBottom:20},emptyText:{fontSize:12,color:U.color.textTertiary,fontStyle:"italic",padding:8},noChangeContainer:{padding:20,alignItems:"center"},noChangeText:{fontSize:13,color:U.color.textTertiary},diffItem:{marginBottom:12,backgroundColor:U.color.surface,borderRadius:8,borderWidth:1,borderColor:U.color.border,overflow:"hidden"},diffHeader:{flexDirection:"row",alignItems:"center",gap:8,padding:8,borderBottomWidth:1,borderBottomColor:U.color.border},diffTypeBadge:{paddingHorizontal:6,paddingVertical:2,borderRadius:4},diffTypeText:{fontSize:10,fontWeight:"700"},diffPath:{fontSize:12,color:U.color.text,fontFamily:ft},diffValues:{padding:8,gap:8},diffValue:{padding:8},diffLabel:{fontSize:11,color:U.color.textTertiary,marginBottom:4,fontWeight:"600"}});function oi(){return ct(),null}export{xe as BUOY_JUMP_TO_STATE,Xr as BUOY_REPLAY_ACTION,Vn as FREE_TIER_ACTION_LIMIT,g as REDUX_TEST_ID,pr as ReduxActionDetailContent,gr as ReduxActionDetailFooter,ti as ReduxActionDetailView,Zt as ReduxActionItem,oi as ReduxAutoInstrument,Ue as ReduxIcon,gt as ReduxModal,On as ReduxToolView,lr as actionRowTestID,sr as buildActionRowTestIDs,$e as buoyDevtoolsEnhancer,Zr as buoyReduxMiddleware,Pt as claimDevtoolsHook,eo as createBuoyReduxMiddleware,yr as createReduxHistoryAdapter,Nn as createReduxTool,Le as getActiveStore,ue as getInstrumentationStatus,lt as instrumentStore,La as isAutoInstrumentActive,lo as isDevtoolsHookClaimed,Oa as isStoreInstrumented,jt as jumpToState,x as reduxActionStore,Wn as reduxHistoryAdapter,Xn as reduxSyncAdapter,fr as reduxToolPreset,ja as registerReduxStore,Lt as replayAction,ir as slugForTestID,st as uninstrumentStore,ct as useAutoInstrumentRedux,Kt as useReduxActions,Na as useReduxAvailability,Qr as withBuoyDevTools};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buoy-gg/redux",
3
- "version": "7.0.45",
3
+ "version": "7.0.47",
4
4
  "description": "Inspect a connected Redux store, captured actions and state changes, and dispatch supported actions from Buoy tools.",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -40,9 +40,9 @@
40
40
  "./lib/web/**/*.mjs"
41
41
  ],
42
42
  "dependencies": {
43
- "@buoy-gg/floating-tools-core": "^7.0.45",
44
- "@buoy-gg/shared-ui": "^7.0.45",
45
- "@buoy-gg/license": "^7.0.45"
43
+ "@buoy-gg/shared-ui": "^7.0.47",
44
+ "@buoy-gg/license": "^7.0.47",
45
+ "@buoy-gg/floating-tools-core": "^7.0.47"
46
46
  },
47
47
  "peerDependencies": {
48
48
  "@reduxjs/toolkit": ">=1.9.0",