@buoy-gg/shared-ui 7.0.79 → 7.0.80

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.
Files changed (101) hide show
  1. package/lib/commonjs/bugCase/appInfo.js +1 -0
  2. package/lib/commonjs/bugCase/appInfo.web.js +1 -0
  3. package/lib/commonjs/bugCase/capture.js +1 -1
  4. package/lib/commonjs/bugCase/format.js +2 -2
  5. package/lib/commonjs/bugCase/index.js +1 -1
  6. package/lib/commonjs/bugCase/lock.js +1 -1
  7. package/lib/commonjs/bugCase/media.js +1 -0
  8. package/lib/commonjs/bugCase/steps.js +1 -1
  9. package/lib/commonjs/bugCase/teamKey.js +1 -0
  10. package/lib/commonjs/bugCase/validate.js +1 -1
  11. package/lib/commonjs/clipboard/autoDetectClipboard.js +1 -1
  12. package/lib/commonjs/clipboard/clipboard-impl.js +1 -1
  13. package/lib/commonjs/clipboard/clipboard-impl.web.js +1 -1
  14. package/lib/commonjs/clipboard/index.js +1 -1
  15. package/lib/commonjs/index.js +1 -1
  16. package/lib/commonjs/utils/fiberRootAnchor.js +1 -0
  17. package/lib/commonjs/utils/index.js +1 -1
  18. package/lib/commonjs/utils/persistentStorage.js +1 -1
  19. package/lib/commonjs/utils/persistentStorage.web.js +1 -1
  20. package/lib/module/bugCase/appInfo.js +1 -0
  21. package/lib/module/bugCase/appInfo.web.js +1 -0
  22. package/lib/module/bugCase/capture.js +1 -1
  23. package/lib/module/bugCase/format.js +2 -2
  24. package/lib/module/bugCase/index.js +1 -1
  25. package/lib/module/bugCase/lock.js +1 -1
  26. package/lib/module/bugCase/media.js +1 -0
  27. package/lib/module/bugCase/steps.js +1 -1
  28. package/lib/module/bugCase/teamKey.js +1 -0
  29. package/lib/module/bugCase/validate.js +1 -1
  30. package/lib/module/clipboard/autoDetectClipboard.js +1 -1
  31. package/lib/module/clipboard/clipboard-impl.js +1 -1
  32. package/lib/module/clipboard/clipboard-impl.web.js +1 -1
  33. package/lib/module/clipboard/index.js +1 -1
  34. package/lib/module/index.js +1 -1
  35. package/lib/module/utils/fiberRootAnchor.js +1 -0
  36. package/lib/module/utils/index.js +1 -1
  37. package/lib/module/utils/persistentStorage.js +1 -1
  38. package/lib/module/utils/persistentStorage.web.js +1 -1
  39. package/lib/typescript/commonjs/bugCase/appInfo.d.ts +17 -0
  40. package/lib/typescript/commonjs/bugCase/appInfo.web.d.ts +14 -0
  41. package/lib/typescript/commonjs/bugCase/format.d.ts +2 -1
  42. package/lib/typescript/commonjs/bugCase/index.d.ts +6 -0
  43. package/lib/typescript/commonjs/bugCase/lock.d.ts +13 -0
  44. package/lib/typescript/commonjs/bugCase/media.d.ts +90 -0
  45. package/lib/typescript/commonjs/bugCase/scrub.d.ts +2 -2
  46. package/lib/typescript/commonjs/bugCase/steps.d.ts +4 -0
  47. package/lib/typescript/commonjs/bugCase/teamKey.d.ts +185 -0
  48. package/lib/typescript/commonjs/bugCase/types.d.ts +10 -0
  49. package/lib/typescript/commonjs/clipboard/autoDetectClipboard.d.ts +1 -1
  50. package/lib/typescript/commonjs/clipboard/clipboard-impl.d.ts +6 -0
  51. package/lib/typescript/commonjs/clipboard/clipboard-impl.web.d.ts +2 -0
  52. package/lib/typescript/commonjs/clipboard/index.d.ts +1 -1
  53. package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
  54. package/lib/typescript/commonjs/index.d.ts +2 -1
  55. package/lib/typescript/commonjs/utils/fiberRootAnchor.d.ts +19 -0
  56. package/lib/typescript/commonjs/utils/index.d.ts +2 -1
  57. package/lib/typescript/commonjs/utils/persistentStorage.d.ts +14 -1
  58. package/lib/typescript/commonjs/utils/persistentStorage.web.d.ts +17 -0
  59. package/lib/typescript/module/bugCase/appInfo.d.ts +17 -0
  60. package/lib/typescript/module/bugCase/appInfo.web.d.ts +14 -0
  61. package/lib/typescript/module/bugCase/format.d.ts +2 -1
  62. package/lib/typescript/module/bugCase/index.d.ts +6 -0
  63. package/lib/typescript/module/bugCase/lock.d.ts +13 -0
  64. package/lib/typescript/module/bugCase/media.d.ts +90 -0
  65. package/lib/typescript/module/bugCase/scrub.d.ts +2 -2
  66. package/lib/typescript/module/bugCase/steps.d.ts +4 -0
  67. package/lib/typescript/module/bugCase/teamKey.d.ts +185 -0
  68. package/lib/typescript/module/bugCase/types.d.ts +10 -0
  69. package/lib/typescript/module/clipboard/autoDetectClipboard.d.ts +1 -1
  70. package/lib/typescript/module/clipboard/clipboard-impl.d.ts +6 -0
  71. package/lib/typescript/module/clipboard/clipboard-impl.web.d.ts +2 -0
  72. package/lib/typescript/module/clipboard/index.d.ts +1 -1
  73. package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
  74. package/lib/typescript/module/index.d.ts +2 -1
  75. package/lib/typescript/module/utils/fiberRootAnchor.d.ts +19 -0
  76. package/lib/typescript/module/utils/index.d.ts +2 -1
  77. package/lib/typescript/module/utils/persistentStorage.d.ts +14 -1
  78. package/lib/typescript/module/utils/persistentStorage.web.d.ts +17 -0
  79. package/lib/web/chunks/chunk-BPL65J3F.mjs +1 -0
  80. package/lib/web/chunks/chunk-EY7GXWGI.mjs +1 -1
  81. package/lib/web/chunks/chunk-IE2U5SN2.mjs +15 -0
  82. package/lib/web/chunks/chunk-IEAXJZCR.mjs +6 -0
  83. package/lib/web/chunks/chunk-OF3VWR6K.mjs +2 -2
  84. package/lib/web/chunks/chunk-SXWOOYFL.mjs +1 -0
  85. package/lib/web/chunks/chunk-T44OT3CI.mjs +6 -0
  86. package/lib/web/chunks/chunk-Y7FM4WZ7.mjs +4 -4
  87. package/lib/web/chunks/persistentStorage.web-BFPYMY5C.mjs +1 -0
  88. package/lib/web/dataViewer.mjs +1 -1
  89. package/lib/web/hooks.mjs +1 -1
  90. package/lib/web/index.mjs +12 -6
  91. package/lib/web/ui.mjs +1 -1
  92. package/lib/web/utils.mjs +1 -1
  93. package/package.json +5 -5
  94. package/scripts/detect-clipboard.js +18 -2
  95. package/lib/web/chunks/chunk-AVRGPBZK.mjs +0 -6
  96. package/lib/web/chunks/chunk-JTNYUDJZ.mjs +0 -1
  97. package/lib/web/chunks/chunk-LADTE6U4.mjs +0 -6
  98. package/lib/web/chunks/chunk-N5Z7Z2GY.mjs +0 -1
  99. package/lib/web/chunks/chunk-SAWSKX4E.mjs +0 -6
  100. package/lib/web/chunks/chunk-ZRZQZF2T.mjs +0 -15
  101. package/lib/web/chunks/persistentStorage.web-IBLIV62L.mjs +0 -1
@@ -0,0 +1,90 @@
1
+ /**
2
+ * Frames in a bug case: pictures and video
3
+ * (research/bug-links-2026-10/media/SPEC.md, rules C1 to C5).
4
+ *
5
+ * A frame is a boxed JPEG from the phone. The boxes went on in native code
6
+ * before the frame was kept (H1), so nothing here looks inside the pixels.
7
+ * The text scrubber never sees `jpeg` either (C4): capture adds media after
8
+ * the scrub.
9
+ */
10
+ export type BugCaseFrameKind = "last" | "tap" | "video";
11
+ export interface BugCaseFrame {
12
+ /** Steady clock, ms (F10). Frames, taps, errors and calls share it. */
13
+ t: number;
14
+ /** Wall time, ms since 1970, for people. */
15
+ wall?: number;
16
+ /** "last" is the app just before Buoy opened (F8). */
17
+ kind: BugCaseFrameKind;
18
+ /** The touch's seq, for kind "tap". */
19
+ tap?: number;
20
+ /** Size in points. */
21
+ w: number;
22
+ h: number;
23
+ /** Base64 JPEG. */
24
+ jpeg: string;
25
+ /** How many parts were boxed. */
26
+ boxes: number;
27
+ }
28
+ export interface BugCaseMediaSettings {
29
+ maskAllText: boolean;
30
+ maskAllImages: boolean;
31
+ maskAllInputs: boolean;
32
+ }
33
+ export interface BugCaseMedia {
34
+ frames: BugCaseFrame[];
35
+ /** "Bug here" marks on the steady clock (C2a). */
36
+ marks: number[];
37
+ settings: BugCaseMediaSettings;
38
+ /** How many frames C2 left out, so the viewer can say so. */
39
+ dropped: number;
40
+ /** Why they were left out, as short reasons with a count each (C5). Old cases have none. */
41
+ droppedWhy?: Record<string, number>;
42
+ }
43
+ export interface BugCaseMediaBudget {
44
+ frames: number;
45
+ bytes: number;
46
+ }
47
+ /** C2. */
48
+ export declare const DEFAULT_MEDIA_BUDGET: BugCaseMediaBudget;
49
+ /** Bytes a base64 string decodes to. */
50
+ export declare function base64Bytes(b64: string): number;
51
+ /**
52
+ * C2: keep the frames that matter most, inside the budget. In order: the
53
+ * "last" frame, tap frames (newest first), video frames near a mark (closest
54
+ * first), then the other video frames spread across the clip.
55
+ */
56
+ export declare function fitBugCaseMedia(frames: BugCaseFrame[], marks: number[], budget?: BugCaseMediaBudget): {
57
+ frames: BugCaseFrame[];
58
+ dropped: number;
59
+ };
60
+ /** Reasons the case itself adds when it leaves frames out. */
61
+ export declare const DROPPED_TO_FIT = "left out to fit the case";
62
+ export declare const DROPPED_NOT_JPEG = "not a picture Buoy can show";
63
+ /** Adds `n` to one reason, keeping the list short and every reason plain. */
64
+ export declare function addDroppedWhy(why: Record<string, number>, reason: string, n: number): Record<string, number>;
65
+ /** The phone's reasons, kept only when each is plain words with a whole count. */
66
+ export declare function cleanDroppedWhy(raw: unknown): Record<string, number>;
67
+ /**
68
+ * Which step each frame belongs to (V1): a tap frame goes with the step its
69
+ * tap made. A frame with no tap link has no step.
70
+ */
71
+ export declare function frameSteps(frames: readonly BugCaseFrame[], touches: readonly {
72
+ seq?: number;
73
+ t: number;
74
+ }[], steps: readonly {
75
+ t: number;
76
+ taps?: number[];
77
+ }[]): (number | null)[];
78
+ /** "4 the screen was moving, 1 left out to fit the case", biggest first. */
79
+ export declare function describeDroppedWhy(why: Record<string, number> | undefined): string;
80
+ /**
81
+ * 0..n-1 in an order where every start of the list is spread across the
82
+ * range: the two ends, then the middle, then the quarters, and so on.
83
+ */
84
+ export declare function spreadOrder(n: number): number[];
85
+ /**
86
+ * C3: keep `media` only with frames that are JPEGs. A bad frame is dropped,
87
+ * not the case. Then C2 again, since a hand-made case can hold anything.
88
+ */
89
+ export declare function validateBugCaseMedia(raw: unknown): BugCaseMedia | undefined;
90
+ //# sourceMappingURL=media.d.ts.map
@@ -22,8 +22,8 @@
22
22
  * NO "LOOKS RANDOM" RULE. Entropy caught nothing the rules above missed and
23
23
  * broke order ids, hashes and commit SHAs. It was dropped on the evidence.
24
24
  *
25
- * Removed values become `[removed:secret]` / `[removed:pii]` so the loader can
26
- * graft the teammate's own value back into the same spot (see graft.ts).
25
+ * Removed values become `[removed:secret]` / `[removed:pii]`. A load writes
26
+ * the marks as they are; Restore puts the teammate's own values back.
27
27
  *
28
28
  * Pure and synchronous so it can be argued with in a unit test. Callers on a
29
29
  * phone run it after the capture has been shown as done, off the tap.
@@ -14,6 +14,8 @@ export interface BugCaseTouch {
14
14
  /** Capture order. Wins over `t`, which moves when the app clock is faked. */
15
15
  seq?: number;
16
16
  t: number;
17
+ /** Real time, which Buoy's clock tool never moves. Tap pictures are matched by it. Old cases have none. */
18
+ wall?: number;
17
19
  kind: "press" | "longPress" | "text" | "toggle" | "slider";
18
20
  target: {
19
21
  name: string;
@@ -32,6 +34,8 @@ export interface BugCaseRouteVisit {
32
34
  export interface BugCaseStep {
33
35
  t: number;
34
36
  text: string;
37
+ /** The touches (by seq) this step stands for, so a tap picture finds its step. Old cases have none. */
38
+ taps?: number[];
35
39
  }
36
40
  /**
37
41
  * A tap on React Native's own dev chrome (the LogBox warning banners and
@@ -0,0 +1,185 @@
1
+ /** A P-256 key pair: the 32-byte private scalar and the 65-byte uncompressed public point. */
2
+ export interface P256Pair {
3
+ d: Uint8Array;
4
+ pub: Uint8Array;
5
+ }
6
+ export interface TeamKeyCrypto {
7
+ randomBytes(length: number): Uint8Array;
8
+ sha256(data: Uint8Array): Promise<Uint8Array>;
9
+ hmacSha256(key: Uint8Array, data: Uint8Array): Promise<Uint8Array>;
10
+ /** AES-GCM with a 16- or 32-byte key; returns ciphertext with the tag at the end. */
11
+ seal(key: Uint8Array, nonce: Uint8Array, data: Uint8Array, aad: Uint8Array): Promise<Uint8Array>;
12
+ /** Throws when the key is wrong or a byte changed. */
13
+ open(key: Uint8Array, nonce: Uint8Array, sealed: Uint8Array, aad: Uint8Array): Promise<Uint8Array>;
14
+ p256Generate(): Promise<P256Pair>;
15
+ /** The shared x coordinate (32 bytes). Throws on a point that isn't on the curve. */
16
+ p256Ecdh(own: P256Pair, peerPub: Uint8Array): Promise<Uint8Array>;
17
+ /** ECDSA over SHA-256 of `message`; 64 bytes, r then s. */
18
+ p256Sign(own: P256Pair, message: Uint8Array): Promise<Uint8Array>;
19
+ /** Takes high-S signatures too: WebCrypto makes them. */
20
+ p256Verify(pub: Uint8Array, message: Uint8Array, signature: Uint8Array): Promise<boolean>;
21
+ }
22
+ export type TeamKeyErrorCode =
23
+ /** A kit that isn't a kit, or the wrong kind. */
24
+ "bad_kit"
25
+ /** The kit is fine but doesn't open this lock. */
26
+ | "wrong_kit"
27
+ /** A record, wrap or card that isn't the right shape. */
28
+ | "bad_shape"
29
+ /** A signature or a key id that doesn't check out. */
30
+ | "untrusted"
31
+ /** Won't open: the wrong key, or a byte changed. */
32
+ | "locked" | "too_big";
33
+ export declare class TeamKeyError extends Error {
34
+ readonly code: TeamKeyErrorCode;
35
+ constructor(code: TeamKeyErrorCode, message: string);
36
+ }
37
+ export declare function concatBytes(...parts: Uint8Array[]): Uint8Array;
38
+ export declare function hkdfExtract(c: TeamKeyCrypto, salt: Uint8Array, ikm: Uint8Array): Promise<Uint8Array>;
39
+ export declare function hkdfExpand(c: TeamKeyCrypto, prk: Uint8Array, info: Uint8Array, length: number): Promise<Uint8Array>;
40
+ export declare function hkdf(c: TeamKeyCrypto, ikm: Uint8Array, info: string, length?: number): Promise<Uint8Array>;
41
+ export declare const HPKE_AES128_GCM = 1;
42
+ export declare const HPKE_AES256_GCM = 2;
43
+ /** Exposed for the RFC vector test. */
44
+ export declare function hpkeKeySchedule(c: TeamKeyCrypto, sharedSecret: Uint8Array, info: Uint8Array, aeadId: number): Promise<{
45
+ key: Uint8Array<ArrayBufferLike>;
46
+ baseNonce: Uint8Array<ArrayBufferLike>;
47
+ }>;
48
+ /**
49
+ * One message to `pkR` (sequence 0). `ephemeral` is for test vectors only;
50
+ * a real seal always makes a fresh one.
51
+ */
52
+ export declare function hpkeSeal(c: TeamKeyCrypto, pkR: Uint8Array, info: Uint8Array, aad: Uint8Array, plaintext: Uint8Array, options?: {
53
+ aeadId?: number;
54
+ ephemeral?: P256Pair;
55
+ }): Promise<{
56
+ enc: Uint8Array;
57
+ ct: Uint8Array;
58
+ sharedSecret: Uint8Array;
59
+ }>;
60
+ export declare function hpkeOpen(c: TeamKeyCrypto, skR: P256Pair, encapped: Uint8Array, info: Uint8Array, aad: Uint8Array, ct: Uint8Array, aeadId?: number): Promise<Uint8Array>;
61
+ export type KitKind = "team" | "admin";
62
+ /** A new kit as text, like `buoy-team-7F3Q-K2M9-…`. Shown once; never sent to Buoy. */
63
+ export declare function makeKit(c: TeamKeyCrypto, kind: KitKind): string;
64
+ export declare function formatKit(kind: KitKind, bytes: Uint8Array): string;
65
+ /** Reads a pasted kit. Spaces, dashes and case don't matter; O reads as 0 and I or L as 1. */
66
+ export declare function parseKit(text: string, kind: KitKind): Uint8Array;
67
+ /** The kit's lock key. */
68
+ export declare function kitKey(c: TeamKeyCrypto, kit: Uint8Array, kind: KitKind): Promise<Uint8Array>;
69
+ /** A short id for a kit, so the server can say which kit locked a key. It can't open anything. */
70
+ export declare function kitId(c: TeamKeyCrypto, kit: Uint8Array, kind: KitKind): Promise<string>;
71
+ /** `nonce | sealed`, as base64url. */
72
+ export declare function lockSecret(c: TeamKeyCrypto, key: Uint8Array, aad: string, secret: Uint8Array): Promise<string>;
73
+ export declare function openSecret(c: TeamKeyCrypto, key: Uint8Array, aad: string, locked: string): Promise<Uint8Array>;
74
+ export declare const rootLockAad: (owner: string, teamKeyId: string) => string;
75
+ export declare const versionLockAad: (owner: string, teamKeyId: string, keyVersion: number) => string;
76
+ /** A private key and its public key, as stored inside a lock. */
77
+ export declare const pairBytes: (pair: P256Pair) => Uint8Array<ArrayBufferLike>;
78
+ export declare function pairFrom(bytes: Uint8Array, expectPub?: Uint8Array): P256Pair;
79
+ /**
80
+ * Checks a private key really belongs to its public key: a pair that doesn't
81
+ * would make wraps no one can open. ECDH with itself and with a fresh key
82
+ * from each side must agree.
83
+ */
84
+ export declare function checkPair(c: TeamKeyCrypto, pair: P256Pair): Promise<void>;
85
+ /** A root's id: the SHA-256 of its public key. Apps can pin it. */
86
+ export declare function teamKeyIdOf(c: TeamKeyCrypto, rootPub: Uint8Array): Promise<string>;
87
+ export interface TeamKeyRecord {
88
+ owner: string;
89
+ teamKeyId: string;
90
+ keyVersion: number;
91
+ /** The version's ECDH public key, base64url. */
92
+ pub: string;
93
+ /** The root's signature over `recordMessage`, base64url. */
94
+ sig: string;
95
+ }
96
+ export declare function recordMessage(owner: string, teamKeyId: string, keyVersion: number, pub: string): Uint8Array;
97
+ export declare function signRecord(c: TeamKeyCrypto, root: P256Pair, owner: string, keyVersion: number, versionPub: Uint8Array): Promise<TeamKeyRecord>;
98
+ /** Throws unless `record` is signed by `rootPub` and names that root. Returns the version's public key. */
99
+ export declare function verifyRecord(c: TeamKeyCrypto, rootPub: Uint8Array, record: TeamKeyRecord): Promise<Uint8Array>;
100
+ export interface CaseKeyParts {
101
+ /** The link's key, base64url (32 bytes). */
102
+ key: string;
103
+ /** 16 random bytes, base64url: goes in the blob's plain header. */
104
+ caseTag: string;
105
+ /** SHA-256 of the key proof, base64url: goes in the blob's plain header. */
106
+ keyProofHash: string;
107
+ }
108
+ export declare function newCaseTag(c: TeamKeyCrypto): string;
109
+ export declare const isCaseTag: (text: unknown) => text is string;
110
+ export declare const isKeyHash: (text: unknown) => text is string;
111
+ /**
112
+ * Proof that someone holds a case's key, without showing the key. The blob's
113
+ * header has its hash, so the server can check a late wrap comes from someone
114
+ * who can open the case.
115
+ */
116
+ export declare function keyProof(c: TeamKeyCrypto, caseKey: string): Promise<string>;
117
+ export declare function keyProofHash(c: TeamKeyCrypto, proof: string): Promise<string>;
118
+ /** A fresh key, a fresh tag, and the key proof's hash, for a new case. */
119
+ export declare function newCaseKeyParts(c: TeamKeyCrypto, existing?: {
120
+ key?: string;
121
+ caseTag?: string;
122
+ }): Promise<CaseKeyParts>;
123
+ export declare const WRAP_SUITE = "P256-SHA256-A256GCM";
124
+ export interface BugWrap {
125
+ v: 1;
126
+ suite: typeof WRAP_SUITE;
127
+ teamKeyId: string;
128
+ keyVersion: number;
129
+ /** The HPKE key share, base64url (65 bytes). */
130
+ enc: string;
131
+ /** The sealed case key, base64url (48 bytes). */
132
+ ct: string;
133
+ }
134
+ export declare const wrapInfo: (owner: string, teamKeyId: string, keyVersion: number, caseTag: string) => Uint8Array<ArrayBufferLike>;
135
+ export declare function wrapCaseKey(c: TeamKeyCrypto, target: {
136
+ owner: string;
137
+ teamKeyId: string;
138
+ keyVersion: number;
139
+ pub: Uint8Array;
140
+ }, caseKey: string, caseTag: string): Promise<BugWrap>;
141
+ export declare function unwrapCaseKey(c: TeamKeyCrypto, wrap: BugWrap, owner: string, versionKey: P256Pair, caseTag: string): Promise<string>;
142
+ /** Rebuilt field by field from untrusted JSON. */
143
+ export declare function parseWrap(raw: unknown): BugWrap;
144
+ export interface BugCardFields {
145
+ note?: string;
146
+ app?: string;
147
+ version?: string;
148
+ build?: string;
149
+ route?: string;
150
+ error?: string;
151
+ sender?: string;
152
+ }
153
+ export interface BugCard extends BugCardFields {
154
+ v: 1;
155
+ caseTag: string;
156
+ /** SHA-256 of the blob this card goes with, base64url. */
157
+ blobSha256: string;
158
+ }
159
+ /** The whole card as JSON stays under this, so the locked card fits in 4 KB. */
160
+ export declare const MAX_CARD_JSON_BYTES = 3800;
161
+ /** Cuts text to at most `maxBytes` of UTF-8, at a whole letter, with "…" when cut. */
162
+ export declare function cutUtf8(text: string, maxBytes: number): string;
163
+ /** Caps each field, then trims the note, the error and the route until the JSON fits. */
164
+ export declare function fitCard(card: BugCard): BugCard;
165
+ export declare function blobSha256(c: TeamKeyCrypto, blob: Uint8Array): Promise<string>;
166
+ /** `nonce | sealed`, as base64url. */
167
+ export declare function sealCard(c: TeamKeyCrypto, caseKey: string, caseTag: string, cardRevision: number, fields: BugCardFields, blob: Uint8Array): Promise<string>;
168
+ export declare function openCard(c: TeamKeyCrypto, caseKey: string, caseTag: string, cardRevision: number, sealed: string): Promise<BugCard>;
169
+ export declare const DEVICE_NONCE_BYTES = 16;
170
+ export declare function newDeviceNonce(c: TeamKeyCrypto): string;
171
+ /** What the new device sends first: a hash of its key and nonce. */
172
+ export declare function deviceCommit(c: TeamKeyCrypto, devicePub: Uint8Array, deviceNonce: string): Promise<string>;
173
+ /** The code both screens show. If they match, no one swapped the device's key. */
174
+ export declare function deviceCode(c: TeamKeyCrypto, check: {
175
+ owner: string;
176
+ requestId: string;
177
+ devicePub: Uint8Array;
178
+ deviceNonce: string;
179
+ approverNonce: string;
180
+ }): Promise<string>;
181
+ /** The approving device seals the team kit to the new device's public key. */
182
+ export declare function sealKitForDevice(c: TeamKeyCrypto, owner: string, requestId: string, devicePub: Uint8Array, kit: Uint8Array): Promise<string>;
183
+ export declare function openKitForDevice(c: TeamKeyCrypto, owner: string, requestId: string, device: P256Pair, sealed: string): Promise<Uint8Array>;
184
+ export declare function webTeamKeyCrypto(): TeamKeyCrypto;
185
+ //# sourceMappingURL=teamKey.d.ts.map
@@ -6,6 +6,7 @@
6
6
  import type { SuperJSONResult } from "../utils/minimalSuperJSON";
7
7
  import type { ScrubbedItem } from "./scrub";
8
8
  import type { BugCaseStep, BugCaseTouch } from "./steps";
9
+ import type { BugCaseMedia } from "./media";
9
10
  export declare const BUG_CASE_VERSION = 1;
10
11
  export interface BugCaseNetworkCall {
11
12
  t: number;
@@ -19,6 +20,8 @@ export interface BugCaseNetworkCall {
19
20
  requestData?: unknown;
20
21
  responseHeaders?: Record<string, string>;
21
22
  responseData?: unknown;
23
+ /** The answer was parsed from JSON text, so a string was a JSON string. Missing in older cases. */
24
+ responseJson?: boolean;
22
25
  /** True when a body was over the case budget and left out. */
23
26
  bodyOmitted?: boolean;
24
27
  }
@@ -48,6 +51,11 @@ export interface BugCase {
48
51
  app: {
49
52
  platform: string;
50
53
  os: string;
54
+ /** Bundle id or package name, when the app could say. */
55
+ id?: string;
56
+ /** The version people see ("4.2.0") and the build number ("4210"), so a load on another build can say so. */
57
+ version?: string;
58
+ build?: string;
51
59
  appearance?: string;
52
60
  locale?: string;
53
61
  timeZone?: string;
@@ -82,6 +90,8 @@ export interface BugCase {
82
90
  /** B2: newest first, with answers for replay. */
83
91
  network: BugCaseNetworkCall[];
84
92
  console: BugCaseConsoleLine[];
93
+ /** Pictures and video, boxed on the phone (media/SPEC.md C1). Old cases and old phones have none. */
94
+ media?: BugCaseMedia;
85
95
  missing: BugCaseMissing[];
86
96
  scrub: {
87
97
  removed: number;
@@ -15,7 +15,7 @@
15
15
  * - Metro sees static imports only
16
16
  * - Works with any Metro version
17
17
  */
18
- export { clipboardFunction, clipboardType, isClipboardAvailable, type ClipboardFunction, } from "./clipboard-impl";
18
+ export { clipboardFunction, clipboardType, isClipboardAvailable, readClipboardText, type ClipboardFunction, } from "./clipboard-impl";
19
19
  import { clipboardFunction } from "./clipboard-impl";
20
20
  /**
21
21
  * Attempts to auto-detect and return a clipboard implementation.
@@ -21,4 +21,10 @@ export type ClipboardFunction = (text: string) => Promise<boolean>;
21
21
  export declare const clipboardType: () => "expo" | "react-native" | "web" | null;
22
22
  export declare const isClipboardAvailable: () => boolean;
23
23
  export declare const clipboardFunction: ClipboardFunction;
24
+ /**
25
+ * The clipboard's text, for a Paste button. Only ever called from a tap: iOS
26
+ * shows its "pasted from" banner for each read, and a silent read on open
27
+ * would show it for nothing (the bug links panels ruled that out).
28
+ */
29
+ export declare const readClipboardText: () => Promise<string | null>;
24
30
  //# sourceMappingURL=clipboard-impl.d.ts.map
@@ -2,4 +2,6 @@ export type ClipboardFunction = (text: string) => Promise<boolean>;
2
2
  export declare const isClipboardAvailable: () => boolean;
3
3
  export declare const clipboardType: () => "web" | null;
4
4
  export declare const clipboardFunction: ClipboardFunction;
5
+ /** The clipboard's text, for a Paste button. Only ever called from a tap. */
6
+ export declare const readClipboardText: () => Promise<string | null>;
5
7
  //# sourceMappingURL=clipboard-impl.web.d.ts.map
@@ -1,4 +1,4 @@
1
1
  export { copyToClipboard } from "./copyToClipboard";
2
- export { createAutoDetectedClipboard, getAutoDetectedClipboard, } from "./autoDetectClipboard";
2
+ export { createAutoDetectedClipboard, getAutoDetectedClipboard, readClipboardText, } from "./autoDetectClipboard";
3
3
  export type { ClipboardFunction } from "./autoDetectClipboard";
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Auto-generated safe area implementation
3
3
  * Detected: none
4
- * Generated at: 2026-10-23T09:29:26.900Z
4
+ * Generated at: 2026-10-31T18:38:31.842Z
5
5
  *
6
6
  * DO NOT EDIT - This file is generated by scripts/detect-safe-area.js
7
7
  *
@@ -14,10 +14,11 @@ export * from "./tools/defineTool";
14
14
  export * from "./sync/toolActionRegistry";
15
15
  export * from "./sync/toolUiBridge";
16
16
  export * from "./sync/toolScreenHeader";
17
- export { absoluteFill, displayValue, parseDisplayValue, getSafeAreaInsets, persistentStorage, setItemChecked, isUsingPersistentStorage, getStorageBackendType, safeStringify, getValueType, isPrimitive, isJsonSerializable, isValidJson, getConstructorName, isEmpty, getValueSize, parseValue, formatValue, getTypeColor, truncateText, flattenObject, formatPath, loadOptionalModule, getCachedOptionalModule, setRenderCaptureProvider, getRenderCaptureProvider, type RenderCaptureProvider, type RenderCaptureSummary, type RenderCaptureTopComponent, type RenderCauseCounts, registerStateSnapshotProvider, getStateSnapshotProviders, getStateSnapshotProvider, subscribeToStateSnapshotProviders, type StateSnapshotProvider, type StateSnapshotProviderStatus, type StateSnapshotCapture, type StateSnapshotRestoreResult, type StateSnapshotPreview, type StateSnapshotPreviewItem, type StateSnapshotPreviewVerdict, superJsonSerialize, superJsonDeserialize, type SuperJSONResult, realNow, getRealAppState, subscribeRealAppState, BUOY_SYNTHETIC_MARK, countBuoyListener, type RealAppState, reloadApp, scheduleReloadApp, resolveReloadStrategy, REMOTE_RELOAD_DELAY_MS, type ReloadStrategy, type ResolvedReloadStrategy, getDevServerOrigin, Subscribable, type SubscribableListener, subscriberCountNotifier, subscribeToSubscriberCountChanges, notifySubscriberCountChange, useSafeRouter, useSafePathname, useSafeSegments, useSafeGlobalSearchParams, getSafeRouter, getSafeCurrentPathname, getSafeCurrentRoute, isExpoRouterAvailable, } from "./utils";
17
+ export { absoluteFill, displayValue, parseDisplayValue, getSafeAreaInsets, persistentStorage, setItemChecked, getItemChecked, storageIsMemoryOnly, isUsingPersistentStorage, getStorageBackendType, safeStringify, getValueType, isPrimitive, isJsonSerializable, isValidJson, getConstructorName, isEmpty, getValueSize, parseValue, formatValue, getTypeColor, truncateText, flattenObject, formatPath, loadOptionalModule, getCachedOptionalModule, setRenderCaptureProvider, getRenderCaptureProvider, type RenderCaptureProvider, type RenderCaptureSummary, type RenderCaptureTopComponent, type RenderCauseCounts, registerStateSnapshotProvider, getStateSnapshotProviders, getStateSnapshotProvider, subscribeToStateSnapshotProviders, type StateSnapshotProvider, type StateSnapshotProviderStatus, type StateSnapshotCapture, type StateSnapshotRestoreResult, type StateSnapshotPreview, type StateSnapshotPreviewItem, type StateSnapshotPreviewVerdict, superJsonSerialize, superJsonDeserialize, type SuperJSONResult, realNow, getRealAppState, subscribeRealAppState, BUOY_SYNTHETIC_MARK, countBuoyListener, type RealAppState, reloadApp, scheduleReloadApp, resolveReloadStrategy, REMOTE_RELOAD_DELAY_MS, type ReloadStrategy, type ResolvedReloadStrategy, getDevServerOrigin, Subscribable, type SubscribableListener, subscriberCountNotifier, subscribeToSubscriberCountChanges, notifySubscriberCountChange, useSafeRouter, useSafePathname, useSafeSegments, useSafeGlobalSearchParams, getSafeRouter, getSafeCurrentPathname, getSafeCurrentRoute, isExpoRouterAvailable, } from "./utils";
18
18
  export type { SafeRouteLocation } from "./utils";
19
19
  export * from "./utils/toolModules";
20
20
  export { subscribeStorageWrites } from "./utils/storageWrites";
21
+ export { FiberRootAnchor, getAnchoredFiberRoots } from "./utils/fiberRootAnchor";
21
22
  export { registerBrowserRouter, browserRouter, subscribeBrowserNavigation } from "./utils/browserNavigation";
22
23
  export { PREVIEW_ITEM_RENDER_BYTE_LIMIT, createRestoreScope, emptyRestoreResult, failedRestore, skippedRestore, classifyPreviewItem, wontApply, unionKeys, type RestoreScope, type RestoreScopeOptions, type ClassifyOptions, type ClassifyInput, } from "./utils/snapshotProviderKit";
23
24
  export { entityColor, formatValuePreview, shallowDiffSummary, type ValuePreviewOptions, type ShallowDiffSummary, } from "./utils/stateTools";
@@ -0,0 +1,19 @@
1
+ /**
2
+ * The app's React roots, found without React DevTools.
3
+ *
4
+ * Highlight Updates finds roots through `__REACT_DEVTOOLS_GLOBAL_HOOK__`. React
5
+ * Native sets that hook up only in dev builds, so in a release build Bug Links
6
+ * got no taps and no screen text. A class component's instance holds its own
7
+ * fiber (`_reactInternals`) in every React build. Walking up from it reaches
8
+ * the root it is mounted in. FloatingDevTools mounts one inside the app's tree.
9
+ */
10
+ import { Component } from "react";
11
+ /** Renders nothing. While mounted, its root shows in `getAnchoredFiberRoots()`. */
12
+ export declare class FiberRootAnchor extends Component {
13
+ componentDidMount(): void;
14
+ componentWillUnmount(): void;
15
+ render(): null;
16
+ }
17
+ /** The FiberRoot (with `.current`) of every mounted anchor, once each. */
18
+ export declare function getAnchoredFiberRoots(): any[];
19
+ //# sourceMappingURL=fiberRootAnchor.d.ts.map
@@ -1,7 +1,7 @@
1
1
  export { absoluteFill } from "./absoluteFill";
2
2
  export { displayValue, parseDisplayValue } from "./displayValue";
3
3
  export { getSafeAreaInsets } from "./getSafeAreaInsets";
4
- export { persistentStorage, setItemChecked, isUsingPersistentStorage, getStorageBackendType, type DevToolsStorage, } from "./persistentStorage";
4
+ export { persistentStorage, setItemChecked, getItemChecked, storageIsMemoryOnly, isUsingPersistentStorage, getStorageBackendType, type DevToolsStorage, } from "./persistentStorage";
5
5
  export { safeStringify } from "./safeStringify";
6
6
  export { getValueType, isPrimitive, isJsonSerializable, isValidJson, getConstructorName, isEmpty, getValueSize, } from "./typeHelpers";
7
7
  export { parseValue, formatValue, getTypeColor, truncateText, flattenObject, formatPath, } from "./valueFormatting";
@@ -21,4 +21,5 @@ export { browserRouter, getBrowserHref, getBrowserRouteURL, registerBrowserRoute
21
21
  export { isDOMElement, getDOMControlProps, getDOMFiber, getDOMNodeHandle, getDOMPublicInstance, resolveDOMEventEmitter } from "./domRuntime";
22
22
  export { registerToolModules, getRegisteredToolModule, getToolModuleVersion, type ToolModule } from "./toolModules";
23
23
  export { loadToolModule } from "./loadToolModule";
24
+ export { FiberRootAnchor, getAnchoredFiberRoots } from "./fiberRootAnchor";
24
25
  //# sourceMappingURL=index.d.ts.map
@@ -34,7 +34,16 @@ export declare const persistentStorage: DevToolsStorage;
34
34
  * false when the backend failed or kept it in memory only. For data that is
35
35
  * worthless half saved (a blob in chunks, an undo copy).
36
36
  */
37
- export declare function setItemChecked(key: string, value: string): Promise<boolean>;
37
+ export declare function setItemChecked(key: string, value: string, options?: {
38
+ strict?: boolean;
39
+ }): Promise<boolean>;
40
+ /**
41
+ * Like persistentStorage.getItem, but a read that fails throws instead of
42
+ * looking like a missing value: null means nothing is saved there. For data
43
+ * that a save would replace whole (a list), where "empty" and "couldn't
44
+ * read" must never be mixed up.
45
+ */
46
+ export declare function getItemChecked(key: string): Promise<string | null>;
38
47
  /**
39
48
  * Check if persistent storage (FileSystem) is being used
40
49
  */
@@ -42,10 +51,14 @@ export declare function isUsingPersistentStorage(): Promise<boolean>;
42
51
  /**
43
52
  * Get the current storage backend type
44
53
  */
54
+ /** True when nothing saved outlives the app (no file store, AsyncStorage or localStorage). */
55
+ export declare function storageIsMemoryOnly(): Promise<boolean>;
45
56
  export declare function getStorageBackendType(): Promise<StorageBackend>;
46
57
  /**
47
58
  * Force re-initialization of storage (useful for testing)
48
59
  */
49
60
  export declare function resetStorageInit(): void;
61
+ /** Tests only: use this file module (or none) and pick the store again. */
62
+ export declare function setFileSystemForTests(fs: unknown): void;
50
63
  export {};
51
64
  //# sourceMappingURL=persistentStorage.d.ts.map
@@ -3,4 +3,21 @@ export type { DevToolsStorage } from "./persistentStorage";
3
3
  export declare const persistentStorage: DevToolsStorage;
4
4
  export declare function isUsingPersistentStorage(): Promise<boolean>;
5
5
  export declare function getStorageBackendType(): Promise<"localstorage" | "memory">;
6
+ /**
7
+ * Write and report whether it reached the browser's storage, like the native
8
+ * setItemChecked: false when storage is blocked or full (the value is still
9
+ * kept for this session). Bug links saves a loaded case this way, so a reload
10
+ * can still restore the app.
11
+ */
12
+ export declare function setItemChecked(key: string, value: string, _options?: {
13
+ strict?: boolean;
14
+ }): Promise<boolean>;
15
+ /**
16
+ * Like getItem, but a read that fails throws instead of looking like a
17
+ * missing value (the native getItemChecked). With no browser storage at all,
18
+ * this session's own copy is all there is.
19
+ */
20
+ export declare function getItemChecked(key: string): Promise<string | null>;
21
+ /** True when nothing saved outlives the page. */
22
+ export declare function storageIsMemoryOnly(): Promise<boolean>;
6
23
  //# sourceMappingURL=persistentStorage.web.d.ts.map
@@ -0,0 +1 @@
1
+ "use client";import{d as p}from"./chunk-AHVO74UQ.mjs";import{a as n,b as Be}from"./chunk-T6T3FEMU.mjs";var Ve=n(e=>{if(e===null)return"null";if(e===void 0)return"undefined";if(Array.isArray(e))return"array";let t=typeof e;return t==="object"?e instanceof Date?"date":e instanceof RegExp?"regexp":e instanceof Map?"map":e instanceof Set?"set":e instanceof Error?"error":"object":t},"getValueType"),Fe=n(e=>{let t=typeof e;return e==null||t==="string"||t==="number"||t==="boolean"||t==="bigint"||t==="symbol"},"isPrimitive"),Ue=n(e=>{try{return JSON.stringify(e),true}catch{return false}},"isJsonSerializable"),We=n(e=>{try{return JSON.parse(e),true}catch{return false}},"isValidJson"),Ie=n(e=>{if(e===null)return"null";if(e===void 0)return"undefined";try{return e.constructor?.name||typeof e}catch{return typeof e}},"getConstructorName"),qe=n(e=>e==null?true:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:false,"isEmpty"),ze=n(e=>{if(Array.isArray(e)){let t=e.length;return t===0?"empty array":t===1?"1 item":`${t} items`}if(e&&typeof e=="object"){let t=Object.keys(e).length;return t===0?"empty object":t===1?"1 key":`${t} keys`}if(typeof e=="string"){let t=e.length;return t===0?"empty string":t===1?"1 character":`${t} characters`}return""},"getValueSize"),Je=n(e=>typeof e=="object"&&e!==null&&!Array.isArray(e)&&e.constructor===Object,"isPlainObject");var Ge=n(e=>{if(e==null)return e;if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},"parseValue"),He=n(e=>e===null?"null":e===void 0?"undefined":typeof e=="string"?`"${e}"`:typeof e=="boolean"?e?"true":"false":typeof e=="number"?String(e):typeof e=="function"?`[Function: ${e.name||"anonymous"}]`:typeof e=="object"?Array.isArray(e)?`[Array: ${e.length} items]`:`{Object: ${Object.keys(e).length} keys}`:String(e),"formatValue"),Ke=n(e=>{if(e===null)return p.dataTypes.null;if(e===void 0)return p.dataTypes.undefined;switch(typeof e){case"string":return p.dataTypes.string;case"number":return p.dataTypes.number;case"boolean":return p.dataTypes.boolean;case"function":return p.dataTypes.function;case"object":return Array.isArray(e)?p.dataTypes.array:p.dataTypes.object;default:return p.primary}},"getTypeColor"),Xe=n((e,t)=>e.length<=t?e:e.slice(0,t-3)+"...","truncateText"),N=n((e,t="")=>{let r={};return e==null?r:typeof e!="object"?(r[t||"root"]=e,r):(Array.isArray(e)?e.forEach((a,o)=>{let i=t?`${t}[${o}]`:`[${o}]`;typeof a=="object"&&a!==null?Object.assign(r,N(a,i)):r[i]=a}):Object.keys(e).forEach(a=>{let o=t?`${t}.${a}`:a,i=e[a];typeof i=="object"&&i!==null?Object.assign(r,N(i,o)):r[o]=i}),r)},"flattenObject"),Ye=n(e=>e.length===0?"root":e.map((t,r)=>typeof t=="number"?`[${t}]`:r===0?t:`.${t}`).join(""),"formatPath");var Qe={log:n(()=>{},"log"),warn:n(()=>{},"warn"),error:n((...e)=>{console.error("[Buoy]","[optional-module]",...e)},"error")},g=new Map,R=new Map,X=new Set;async function Y(e,t={}){if(g.has(e))return g.get(e);let r={...Qe,...t.logger??{}};R.has(e)||R.set(e,(async()=>{try{let o=await ee(e,t),i=o?.default??o;return g.set(e,i),r.log("Loaded optional module",e),i}catch(o){return r.log("Optional module unavailable",e,o),g.set(e,null),null}})());let a=await R.get(e);return R.delete(e),!a&&t.warnOnceKey&&!X.has(t.warnOnceKey)&&(X.add(t.warnOnceKey),r.warn(t.warningMessage??`Module '${e}' not found.`)),a}n(Y,"loadOptionalModule");var T,x;function Q(){if(T===void 0)try{T=new Function("moduleName","return import(moduleName);")}catch{T=null}return T}n(Q,"getDynamicImportLoader");function Z(){if(x===void 0)try{x=new Function("return typeof require === 'function' ? require : undefined;")()??null}catch{x=null}return x}n(Z,"getDynamicRequire");async function ee(e,t){if(t.loader)return await Promise.resolve(t.loader());let r=Q();if(r)return r(e);let a=Z();if(a)return a(e);throw new Error(`No dynamic loader available for optional module '${e}'.`)}n(ee,"loadModuleWithFallback");function te(e){return g.has(e)?g.get(e):null}n(te,"getCachedOptionalModule");var re="__buoyRenderCaptureProvider";function _(){return globalThis}n(_,"providerHost");function ne(e){_()[re]=e}n(ne,"setRenderCaptureProvider");function ae(){return _()[re]??null}n(ae,"getRenderCaptureProvider");var v=new Map,L=new Set;function B(){L.forEach(e=>{try{e()}catch{}})}n(B,"notify");function oe(e){return v.set(e.id,e),B(),()=>{v.get(e.id)===e&&(v.delete(e.id),B())}}n(oe,"registerStateSnapshotProvider");function ie(){return Array.from(v.values())}n(ie,"getStateSnapshotProviders");function se(e){return v.get(e)??null}n(se,"getStateSnapshotProvider");function ue(e){return L.add(e),()=>{L.delete(e)}}n(ue,"subscribeToStateSnapshotProviders");function C(){return null}n(C,"loadDevSettings");function O(){return null}n(O,"loadExpoUpdates");function j(){return typeof window>"u"?null:()=>window.location.reload()}n(j,"loadBrowserReload");function $(e="auto"){return e==="browser"?j()?"browser":null:e==="auto"&&j()?"browser":e==="dev-settings"?C()?"dev-settings":null:e==="expo-updates"?O()?"expo-updates":null:Be&&C()?"dev-settings":O()?"expo-updates":null}n($,"resolveReloadStrategy");function V(e){return e==="browser"?"[buoy] Browser reload requires a browser window.":e==="dev-settings"?"[buoy] DevSettings.reload() unavailable \u2014 strategy 'dev-settings' requires React Native dev mode.":e==="expo-updates"?"[buoy] expo-updates not installed \u2014 strategy 'expo-updates' requires the host app to add the dependency.":"[buoy] No reload mechanism available. Run in __DEV__ or install expo-updates."}n(V,"unavailableMessage");async function F(e="auto",t="buoy reload"){let r=$(e);if(!r)throw new Error(V(e));return r==="browser"?j()():r==="dev-settings"?C().reload(t):await O().reloadAsync(),await new Promise(()=>{})}n(F,"reloadApp");var le=250;function ce(e){let t=e?.strategy??"auto",r=$(t);if(!r)throw new Error(V(t));let a=Math.max(0,e?.delayMs??le),o=e?.reason??"buoy remote reload";return setTimeout(()=>{F(r,o).catch(()=>{})},a),{strategy:r,delayMs:a}}n(ce,"scheduleReloadApp");function de(){return null}n(de,"getDevServerOrigin");function pe(){let e=globalThis.__buoyRealNow;return typeof e=="function"?e():Date.now()}n(pe,"realNow");var fe=class ct{constructor(){this.listeners=new Set;this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}getListenerCount(){return this.listeners.size}notify(...t){this.listeners.forEach(r=>{r(...t)})}onSubscribe(){}onUnsubscribe(){}};n(fe,"Subscribable");var Ze=fe;var he=class dt{constructor(){this.listeners=new Set}subscribe(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}notify(t){this.listeners.forEach(r=>{try{r(t)}catch{}})}};n(he,"SubscriberCountNotifier");var et=he,U=new et,tt=n(e=>U.subscribe(e),"subscribeToSubscriberCountChanges"),rt=n(e=>U.notify(e),"notifySubscriberCountChange");import{useSyncExternalStore as ye}from"react";var c,S=new Set,W,be;function ge(e){return c=e,()=>{c===e&&(c=void 0)}}n(ge,"registerBrowserRouter");function h(){return typeof location>"u"?"/":location.href}n(h,"getBrowserHref");function I(e=h()){let t=new URL(e,"http://localhost"),r=t.hash.startsWith("#/")?new URL(t.hash.slice(1),t.origin):t;return r.pathname||(r.pathname="/"),r}n(I,"getBrowserRouteURL");var w;function q(e){if(!S.size&&typeof window<"u"){let t=window.history,r=n(o=>{for(let i of[...S])try{i({href:h(),kind:o})}catch{}},"emit");if(w)w.active=true;else{let o=t.pushState,i=t.replaceState,s={push:o,replace:i,active:true},f=n(function(...m){let b=Reflect.apply(o,this,m);return s.active&&r("push"),b},"wrappedPush"),l=n(function(...m){let b=Reflect.apply(i,this,m);return s.active&&r("replace"),b},"wrappedReplace");t.pushState=f,t.replaceState=l,w=s,be=n(()=>{t.pushState!==f||t.replaceState!==l||(t.pushState=o,t.replaceState=i,w=void 0)},"unwrap")}let a=n(()=>r("pop"),"pop");window.addEventListener("popstate",a),window.addEventListener("hashchange",a),W=n(()=>{w&&(w.active=false),be?.(),window.removeEventListener("popstate",a),window.removeEventListener("hashchange",a),W=void 0},"detach")}return S.add(e),()=>{S.delete(e),S.size||W?.()}}n(q,"subscribeBrowserNavigation");function z(e){let t=typeof e=="string"?e:e.pathname,r=new URL(t,h());if(r.origin!==window.location.origin)throw new Error("Tool navigation must stay on the current origin.");if(typeof e!="string")for(let[a,o]of Object.entries(e.params??{}))r.searchParams.set(a,String(o));return`${r.pathname}${r.search}${r.hash}`}n(z,"pathFor");var E={push(e){let t=z(e);if(c)return c.push(t);window.history.pushState(null,"",window.location.hash.startsWith("#/")?`#${t}`:t),window.dispatchEvent(new PopStateEvent("popstate",{state:window.history.state}))},replace(e){let t=z(e);if(c)return c.replace(t);window.history.replaceState(window.history.state,"",window.location.hash.startsWith("#/")?`#${t}`:t),window.dispatchEvent(new PopStateEvent("popstate",{state:window.history.state}))},back(){c?c.back():window.history.back()},canGoBack(){return c?.canGoBack?.()??(typeof window<"u"&&window.history.length>1)},navigate(e){E.push(e)},setParams(e){E.replace({pathname:h(),params:e})},dismiss(e=1){window.history.go(-e)},dismissAll(){throw new Error("Use the captured browser history to select a destination.")}};var we=n(e=>q(e),"subscribe"),M=I;function me(){return E}n(me,"useSafeRouter");function J(){return ye(we,h,()=>"/"),M().pathname}n(J,"useSafePathname");function ve(){return J().split("/").filter(Boolean)}n(ve,"useSafeSegments");function Se(){return ye(we,h,()=>"/"),Object.fromEntries(M().searchParams)}n(Se,"useSafeGlobalSearchParams");function Ee(){return typeof window>"u"?null:E}n(Ee,"getSafeRouter");function Re(){return M().pathname}n(Re,"getSafeCurrentPathname");function Te(){let e=M();return{pathname:e.pathname,href:`${e.pathname}${e.search}${e.hash}`,segments:e.pathname.split("/").filter(Boolean)}}n(Te,"getSafeCurrentRoute");function xe(){return false}n(xe,"isExpoRouterAvailable");var Ce=new WeakMap,nt=1;function y(e){return!!e&&typeof e=="object"&&e.nodeType===1&&typeof e.getBoundingClientRect=="function"}n(y,"isDOMElement");function D(e){if(!y(e))return null;let t=Ce.get(e);return t===void 0&&(t=nt++,Ce.set(e,t)),t}n(D,"getDOMNodeHandle");function Oe(e){if(!y(e))return null;let t=Object.keys(e).find(r=>r.startsWith("__reactFiber$"));return t?e[t]:null}n(Oe,"getDOMFiber");function je(e,t){if(!y(e)||!t)return t;let r=e,a=e.tagName.toLowerCase(),o=a==="input"&&(r.type==="checkbox"||r.type==="radio"),i=a==="input"&&r.type==="range",s=a==="textarea"||a==="select"||a==="input"&&!o&&!i&&!["button","submit","reset","file","hidden"].includes(r.type),f=e.getAttribute("contenteditable"),l=!s&&!o&&!i&&(e.isContentEditable===true||f!==null&&f!=="false"),m=n(d=>{let u=e;u.focus();let k=u.ownerDocument.getSelection?.();if(k){let K=u.ownerDocument.createRange();K.selectNodeContents(u),k.removeAllRanges(),k.addRange(K)}let A=false;try{A=typeof u.ownerDocument.execCommand=="function"&&u.ownerDocument.execCommand("insertText",false,d)}catch{A=false}A||(u.textContent=d,u.dispatchEvent(new InputEvent("input",{bubbles:true,inputType:"insertText",data:d})))},"setEditable"),b=n(d=>{if(o){r.checked!==!!d&&r.click();return}let u=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(r),"value")?.set;u?u.call(r,String(d)):r.value=String(d),r.dispatchEvent(new Event("input",{bubbles:true})),r.dispatchEvent(new Event("change",{bubbles:true}))},"setValue");return{...t,__buoyDevToolsRoot:t.__buoyDevToolsRoot||t["data-buoy-root"]!==void 0,testID:t.testID??t["data-testid"],nativeID:t.nativeID??t.id,accessibilityLabel:t.accessibilityLabel??t["aria-label"],accessibilityRole:t.accessibilityRole??t.role??(a==="button"?"button":a==="a"?"link":o?r.type:s||l?"textbox":i?"slider":void 0),onPress:t.onPress??(typeof t.onClick=="function"||a==="button"||a==="a"?()=>r.click():void 0),...o||i?{onValueChange:b,value:o?r.checked:Number(r.value),...i?{minimumValue:Number(r.min||0),maximumValue:Number(r.max||100)}:{}}:{},...s?{onChangeText:b,value:r.value}:{},...l?{onChangeText:n(d=>m(String(d)),"onChangeText"),value:e.innerText??e.textContent??""}:{}}}n(je,"getDOMControlProps");function $e(e){return y(e)?{__nativeTag:D(e),measure(t){let r=e.getBoundingClientRect();t(r.x,r.y,r.width,r.height,r.x,r.y)},measureInWindow(t){let r=e.getBoundingClientRect();t(r.x,r.y,r.width,r.height)},requestTVFocus(){e.focus()},focus(){e.focus()}}:null}n($e,"getDOMPublicInstance");var at={topFocus:"focus",topBlur:"blur",topTouchStart:"pointerdown",topTouchMove:"pointermove",topTouchEnd:"pointerup",topTouchCancel:"pointercancel",topChange:"input",topValueChange:"input",topSlidingComplete:"change"};function Me(){return typeof document>"u"?{emitter:null,reason:"DOM events are unavailable during server rendering."}:{reason:null,emitter:{addListener(e,t){let r=at[e];if(!r)throw new Error(`Unsupported DOM event: ${e}`);let a=n(o=>{let i=o.composedPath()[0]??o.target;if(!y(i))return;let s=i,f=o,l={target:D(i),pageX:f.clientX,pageY:f.clientY};(r==="input"||r==="change")&&(s.type==="checkbox"||s.type==="radio"?l.value=s.checked:s.type==="range"?l.value=Number(s.value):l.text=s.value??i.textContent??""),t({eventName:e,nativeEvent:l})},"callback");return document.addEventListener(r,a,true),{remove:n(()=>document.removeEventListener(r,a,true),"remove")}}}}}n(Me,"resolveDOMEventEmitter");var G=new Map,De=0;function Pe(e){for(let[t,r]of Object.entries(e)){let a=t.startsWith("@buoy-gg/")?t.replace(/\/web$/,""):`@buoy-gg/${t}`;G.get(a)!==r&&(G.set(a,r),De++)}}n(Pe,"registerToolModules");function H(e){return G.get(e)??null}n(H,"getRegisteredToolModule");function ke(){return De}n(ke,"getToolModuleVersion");function Ae(e){let t=H(e);if(!t)throw new Error(`Register ${e} with createWebTools before opening tools that use it.`);return t}n(Ae,"loadToolModule");import{Component as ot}from"react";var Ne="__buoyFiberRootAnchors",it=3;function P(){let e=globalThis;return e[Ne]??(e[Ne]=new Set)}n(P,"anchors");var _e=class ht extends ot{componentDidMount(){P().add(this)}componentWillUnmount(){P().delete(this)}render(){return null}};n(_e,"FiberRootAnchor");var st=_e;function Le(){let e=new Set;for(let t of P()){let r=t._reactInternals;for(let a=0;r&&a<1e4;a++){if(r.tag===it&&!r.return){r.stateNode?.current&&e.add(r.stateNode);break}r=r.return}}return[...e]}n(Le,"getAnchoredFiberRoots");export{Ze as a,U as b,tt as c,rt as d,pe as e,Ve as f,Fe as g,Ue as h,We as i,Ie as j,qe as k,ze as l,Je as m,Ge as n,He as o,Ke as p,Xe as q,N as r,Ye as s,Y as t,te as u,ne as v,ae as w,oe as x,ie as y,se as z,ue as A,$ as B,F as C,le as D,ce as E,de as F,ge as G,h as H,I,q as J,E as K,me as L,J as M,ve as N,Se as O,Ee as P,Re as Q,Te as R,xe as S,y as T,D as U,Oe as V,je as W,$e as X,Me as Y,Pe as Z,H as _,ke as $,Ae as aa,st as ba,Le as ca};
@@ -1 +1 @@
1
- "use client";import{a as e}from"./chunk-T6T3FEMU.mjs";var o={base:"@react_buoy",bubble:{root:e(()=>`${o.base}_bubble`,"root"),settings:e(()=>`${o.bubble.root()}_settings`,"settings"),userPreferences:e(()=>`${o.bubble.root()}_user_preferences`,"userPreferences"),position:e(()=>`${o.bubble.root()}_position`,"position")},modal:{root:e(()=>`${o.base}_modal`,"root"),state:e(()=>`${o.modal.root()}_state`,"state"),position:e(()=>`${o.modal.root()}_position`,"position"),dimensions:e(()=>`${o.modal.root()}_dimensions`,"dimensions"),hintAcknowledged:e(()=>`${o.modal.root()}_hint_acknowledged`,"hintAcknowledged")},custom:e(t=>{let r=`${o.base}_custom_${t}`;return{root:e(()=>r,"root"),modal:e(()=>`${r}_modal`,"modal"),settings:e(()=>`${r}_settings`,"settings"),key:e(s=>`${r}_${s}`,"key")}},"custom"),askBuoy:{root:e(()=>`${o.base}_ask_buoy`,"root"),model:e(()=>`${o.askBuoy.root()}_model`,"model")},settings:{root:e(()=>`${o.base}_settings`,"root"),theme:e(()=>`${o.settings.root()}_theme`,"theme"),preferences:e(()=>`${o.settings.root()}_preferences`,"preferences"),wifiEnabled:e(()=>`${o.settings.root()}_wifi_enabled`,"wifiEnabled"),global:e(()=>`${o.settings.root()}_global`,"global"),activeTab:e(()=>`${o.settings.root()}_active_tab`,"activeTab"),modalOpen:e(()=>`${o.settings.root()}_modal_open`,"modalOpen")},dial:{root:e(()=>`${o.base}_dial`,"root"),isOpen:e(()=>`${o.dial.root()}_is_open`,"isOpen"),usage:e(()=>`${o.dial.root()}_usage`,"usage")},clipboard:{root:e(()=>`${o.base}_clipboard`,"root"),hintAcknowledged:e(()=>`${o.clipboard.root()}_hint_acknowledged`,"hintAcknowledged")},env:{root:e(()=>`${o.base}_env`,"root"),modal:e(()=>`${o.env.root()}_modal`,"modal"),currentEnv:e(()=>`${o.env.root()}_current`,"currentEnv"),overrides:e(()=>`${o.env.root()}_overrides`,"overrides")},sentry:{root:e(()=>`${o.base}_sentry`,"root"),modal:e(()=>`${o.sentry.root()}_modal`,"modal"),filters:e(()=>`${o.sentry.root()}_filters`,"filters"),preferences:e(()=>`${o.sentry.root()}_preferences`,"preferences")},storage:{root:e(()=>`${o.base}_storage`,"root"),modal:e(()=>`${o.storage.root()}_modal`,"modal"),eventsModal:e(()=>`${o.storage.root()}_events_modal`,"eventsModal"),filters:e(()=>`${o.storage.root()}_filters`,"filters"),eventFilters:e(()=>`${o.storage.root()}_event_filters`,"eventFilters"),keyFilters:e(()=>`${o.storage.root()}_key_filters`,"keyFilters"),pinnedKeys:e(()=>`${o.storage.root()}_pinned_keys`,"pinnedKeys"),preferences:e(()=>`${o.storage.root()}_preferences`,"preferences"),activeTab:e(()=>`${o.storage.root()}_active_tab`,"activeTab"),isMonitoring:e(()=>`${o.storage.root()}_is_monitoring`,"isMonitoring"),diffViewerMode:e(()=>`${o.storage.root()}_diff_viewer_mode`,"diffViewerMode")},clock:{root:e(()=>`${o.base}_clock`,"root"),state:e(()=>`${o.clock.root()}_state`,"state")},bugLinks:{root:e(()=>`${o.base}_bug_links`,"root"),links:e(()=>`${o.bugLinks.root()}_links`,"links"),settings:e(()=>`${o.bugLinks.root()}_settings`,"settings"),loaded:e(()=>`${o.bugLinks.root()}_loaded`,"loaded")},permissions:{root:e(()=>`${o.base}_permissions`,"root"),state:e(()=>`${o.permissions.root()}_state`,"state")},lifecycle:{root:e(()=>`${o.base}_lifecycle`,"root"),state:e(()=>`${o.lifecycle.root()}_state`,"state")},location:{root:e(()=>`${o.base}_location`,"root"),state:e(()=>`${o.location.root()}_state`,"state")},timeMachine:{root:e(()=>`${o.base}_time_machine`,"root"),diffViewerMode:e(()=>`${o.timeMachine.root()}_diff_viewer_mode`,"diffViewerMode"),armedPoint:e(()=>`${o.timeMachine.root()}_armed_point`,"armedPoint"),barReloadMode:e(()=>`${o.timeMachine.root()}_bar_reload_mode`,"barReloadMode"),disabledSources:e(()=>`${o.timeMachine.root()}_disabled_sources`,"disabledSources")},scenarios:{root:e(()=>`${o.base}_scenarios`,"root"),modal:e(()=>`${o.scenarios.root()}_modal`,"modal"),library:e(()=>`${o.scenarios.root()}_library`,"library"),active:e(()=>`${o.scenarios.root()}_active`,"active"),team:e(()=>`${o.scenarios.root()}_team`,"team")},reactQuery:{root:e(()=>`${o.base}_rq`,"root"),modal:e(()=>`${o.reactQuery.root()}_modal`,"modal"),browserModal:e(()=>`${o.reactQuery.root()}_browser_modal`,"browserModal"),mutationModal:e(()=>`${o.reactQuery.root()}_mutation_modal`,"mutationModal"),filters:e(()=>`${o.reactQuery.root()}_filters`,"filters"),ignoredPatterns:e(()=>`${o.reactQuery.root()}_ignored_patterns`,"ignoredPatterns"),includedPatterns:e(()=>`${o.reactQuery.root()}_included_patterns`,"includedPatterns"),preferences:e(()=>`${o.reactQuery.root()}_preferences`,"preferences")},network:{root:e(()=>`${o.base}_network`,"root"),modal:e(()=>`${o.network.root()}_modal`,"modal"),copyModal:e(()=>`${o.network.root()}_copy_modal`,"copyModal"),filters:e(()=>`${o.network.root()}_filters`,"filters"),ignoredDomains:e(()=>`${o.network.root()}_ignored_domains`,"ignoredDomains"),ignoredUrls:e(()=>`${o.network.root()}_ignored_urls`,"ignoredUrls"),preferences:e(()=>`${o.network.root()}_preferences`,"preferences"),copyOptions:e(()=>`${o.network.root()}_copy_options`,"copyOptions"),saved:e(()=>`${o.network.root()}_saved`,"saved"),overrides:e(()=>`${o.network.root()}_overrides`,"overrides")},routeEvents:{root:e(()=>`${o.base}_route_events`,"root"),modal:e(()=>`${o.routeEvents.root()}_modal`,"modal"),eventFilters:e(()=>`${o.routeEvents.root()}_event_filters`,"eventFilters"),activeTab:e(()=>`${o.routeEvents.root()}_active_tab`,"activeTab"),isMonitoring:e(()=>`${o.routeEvents.root()}_is_monitoring`,"isMonitoring"),detailView:e(()=>`${o.routeEvents.root()}_detail_view`,"detailView"),diffViewerMode:e(()=>`${o.routeEvents.root()}_diff_viewer_mode`,"diffViewerMode")},highlightUpdates:{root:e(()=>`${o.base}_highlight_updates`,"root"),modal:e(()=>`${o.highlightUpdates.root()}_modal`,"modal"),isTracking:e(()=>`${o.highlightUpdates.root()}_is_tracking`,"isTracking"),filters:e(()=>`${o.highlightUpdates.root()}_filters`,"filters"),settings:e(()=>`${o.highlightUpdates.root()}_settings`,"settings"),copySettings:e(()=>`${o.highlightUpdates.root()}_copy_settings`,"copySettings")},benchmark:{root:e(()=>`${o.base}_benchmark`,"root"),modal:e(()=>`${o.benchmark.root()}_modal`,"modal"),isRecording:e(()=>`${o.benchmark.root()}_is_recording`,"isRecording"),activeTab:e(()=>`${o.benchmark.root()}_active_tab`,"activeTab"),settings:e(()=>`${o.benchmark.root()}_settings`,"settings"),selectedReports:e(()=>`${o.benchmark.root()}_selected_reports`,"selectedReports")},debugBorders:{root:e(()=>`${o.base}_debug_borders`,"root"),infoModal:e(()=>`${o.debugBorders.root()}_info_modal`,"infoModal")},events:{root:e(()=>`${o.base}_events`,"root"),modal:e(()=>`${o.events.root()}_modal`,"modal"),enabledSources:e(()=>`${o.events.root()}_enabled_sources`,"enabledSources"),isCapturing:e(()=>`${o.events.root()}_is_capturing`,"isCapturing"),pausedAt:e(()=>`${o.events.root()}_paused_at`,"pausedAt"),copySettings:e(()=>`${o.events.root()}_copy_settings`,"copySettings")},sync:{root:e(()=>`${o.base}_sync`,"root"),deviceId:e(()=>`${o.sync.root()}_device_id`,"deviceId")}},u=["@devtools","@dev_tools_","@modal_state_","@react_query_browser_modal","@react_query_modal","@react_query_mutation_modal","@sentry_logs_modal","@floating_rn_better_dev_tools_","@floating_tools_","@apphost_","@bubble_settings_","@env_vars_modal","@storage_modal","@floating_@devtools_","dev_last_route"];function c(t){if(!t)return false;for(let r of["@AsyncStorage:","CapacitorStorage."])t.startsWith(r)&&(t=t.slice(r.length));if(t.startsWith(o.base)||t.startsWith("buoy-")||t.startsWith("@buoy")||/^(?:buoy[._]|__buoy|react-buoy)/i.test(t))return true;for(let r of u)if(t.startsWith(r))return true;return false}e(c,"isDevToolsStorageKey");var l=new Set;function g(t){return l.add(t),()=>l.delete(t)}e(g,"subscribeStorageWrites");function d(t,r){for(let s of[...l])try{s(t,r)}catch{}}e(d,"notifyStorageWrite");var a=new Map;function i(){try{return typeof window>"u"?null:window.localStorage}catch{return null}}e(i,"storage");var n={async getItem(t){if(a.has(t))return a.get(t)??null;try{return i()?.getItem(t)??null}catch{return null}},async setItem(t,r){a.set(t,r);try{let s=i();s&&(s.setItem(t,r),a.delete(t))}catch{}d(t,r)},async removeItem(t){a.set(t,null);try{let r=i();r&&(r.removeItem(t),a.delete(t))}catch{}d(t,null)},async getAllKeys(){let t=new Set;try{let r=i();if(r)for(let s=0;s<r.length;s++){let _=r.key(s);_?.startsWith(o.base)&&t.add(_)}}catch{}for(let[r,s]of a)r.startsWith(o.base)&&(s===null?t.delete(r):t.add(r));return[...t]},async multiGet(t){return Promise.all(t.map(async r=>[r,await n.getItem(r)]))},async multiRemove(t){await Promise.all(t.map(r=>n.removeItem(r)))},async clear(){await n.multiRemove(await n.getAllKeys())}};async function m(){return i()!==null}e(m,"isUsingPersistentStorage");async function $(){return i()?"localstorage":"memory"}e($,"getStorageBackendType");export{o as a,c as b,g as c,n as d,m as e,$ as f};
1
+ "use client";import{a as e}from"./chunk-T6T3FEMU.mjs";var o={base:"@react_buoy",bubble:{root:e(()=>`${o.base}_bubble`,"root"),settings:e(()=>`${o.bubble.root()}_settings`,"settings"),userPreferences:e(()=>`${o.bubble.root()}_user_preferences`,"userPreferences"),position:e(()=>`${o.bubble.root()}_position`,"position")},modal:{root:e(()=>`${o.base}_modal`,"root"),state:e(()=>`${o.modal.root()}_state`,"state"),position:e(()=>`${o.modal.root()}_position`,"position"),dimensions:e(()=>`${o.modal.root()}_dimensions`,"dimensions"),hintAcknowledged:e(()=>`${o.modal.root()}_hint_acknowledged`,"hintAcknowledged")},custom:e(t=>{let r=`${o.base}_custom_${t}`;return{root:e(()=>r,"root"),modal:e(()=>`${r}_modal`,"modal"),settings:e(()=>`${r}_settings`,"settings"),key:e(s=>`${r}_${s}`,"key")}},"custom"),askBuoy:{root:e(()=>`${o.base}_ask_buoy`,"root"),model:e(()=>`${o.askBuoy.root()}_model`,"model")},settings:{root:e(()=>`${o.base}_settings`,"root"),theme:e(()=>`${o.settings.root()}_theme`,"theme"),preferences:e(()=>`${o.settings.root()}_preferences`,"preferences"),wifiEnabled:e(()=>`${o.settings.root()}_wifi_enabled`,"wifiEnabled"),global:e(()=>`${o.settings.root()}_global`,"global"),activeTab:e(()=>`${o.settings.root()}_active_tab`,"activeTab"),modalOpen:e(()=>`${o.settings.root()}_modal_open`,"modalOpen")},dial:{root:e(()=>`${o.base}_dial`,"root"),isOpen:e(()=>`${o.dial.root()}_is_open`,"isOpen"),usage:e(()=>`${o.dial.root()}_usage`,"usage")},clipboard:{root:e(()=>`${o.base}_clipboard`,"root"),hintAcknowledged:e(()=>`${o.clipboard.root()}_hint_acknowledged`,"hintAcknowledged")},env:{root:e(()=>`${o.base}_env`,"root"),modal:e(()=>`${o.env.root()}_modal`,"modal"),currentEnv:e(()=>`${o.env.root()}_current`,"currentEnv"),overrides:e(()=>`${o.env.root()}_overrides`,"overrides")},sentry:{root:e(()=>`${o.base}_sentry`,"root"),modal:e(()=>`${o.sentry.root()}_modal`,"modal"),filters:e(()=>`${o.sentry.root()}_filters`,"filters"),preferences:e(()=>`${o.sentry.root()}_preferences`,"preferences")},storage:{root:e(()=>`${o.base}_storage`,"root"),modal:e(()=>`${o.storage.root()}_modal`,"modal"),eventsModal:e(()=>`${o.storage.root()}_events_modal`,"eventsModal"),filters:e(()=>`${o.storage.root()}_filters`,"filters"),eventFilters:e(()=>`${o.storage.root()}_event_filters`,"eventFilters"),keyFilters:e(()=>`${o.storage.root()}_key_filters`,"keyFilters"),pinnedKeys:e(()=>`${o.storage.root()}_pinned_keys`,"pinnedKeys"),preferences:e(()=>`${o.storage.root()}_preferences`,"preferences"),activeTab:e(()=>`${o.storage.root()}_active_tab`,"activeTab"),isMonitoring:e(()=>`${o.storage.root()}_is_monitoring`,"isMonitoring"),diffViewerMode:e(()=>`${o.storage.root()}_diff_viewer_mode`,"diffViewerMode")},clock:{root:e(()=>`${o.base}_clock`,"root"),state:e(()=>`${o.clock.root()}_state`,"state")},bugLinks:{root:e(()=>`${o.base}_bug_links`,"root"),links:e(()=>`${o.bugLinks.root()}_links`,"links"),settings:e(()=>`${o.bugLinks.root()}_settings`,"settings"),loaded:e(()=>`${o.bugLinks.root()}_loaded`,"loaded")},permissions:{root:e(()=>`${o.base}_permissions`,"root"),state:e(()=>`${o.permissions.root()}_state`,"state")},lifecycle:{root:e(()=>`${o.base}_lifecycle`,"root"),state:e(()=>`${o.lifecycle.root()}_state`,"state")},location:{root:e(()=>`${o.base}_location`,"root"),state:e(()=>`${o.location.root()}_state`,"state")},timeMachine:{root:e(()=>`${o.base}_time_machine`,"root"),diffViewerMode:e(()=>`${o.timeMachine.root()}_diff_viewer_mode`,"diffViewerMode"),armedPoint:e(()=>`${o.timeMachine.root()}_armed_point`,"armedPoint"),barReloadMode:e(()=>`${o.timeMachine.root()}_bar_reload_mode`,"barReloadMode"),disabledSources:e(()=>`${o.timeMachine.root()}_disabled_sources`,"disabledSources")},scenarios:{root:e(()=>`${o.base}_scenarios`,"root"),modal:e(()=>`${o.scenarios.root()}_modal`,"modal"),library:e(()=>`${o.scenarios.root()}_library`,"library"),active:e(()=>`${o.scenarios.root()}_active`,"active"),team:e(()=>`${o.scenarios.root()}_team`,"team")},reactQuery:{root:e(()=>`${o.base}_rq`,"root"),modal:e(()=>`${o.reactQuery.root()}_modal`,"modal"),browserModal:e(()=>`${o.reactQuery.root()}_browser_modal`,"browserModal"),mutationModal:e(()=>`${o.reactQuery.root()}_mutation_modal`,"mutationModal"),filters:e(()=>`${o.reactQuery.root()}_filters`,"filters"),ignoredPatterns:e(()=>`${o.reactQuery.root()}_ignored_patterns`,"ignoredPatterns"),includedPatterns:e(()=>`${o.reactQuery.root()}_included_patterns`,"includedPatterns"),preferences:e(()=>`${o.reactQuery.root()}_preferences`,"preferences")},network:{root:e(()=>`${o.base}_network`,"root"),modal:e(()=>`${o.network.root()}_modal`,"modal"),copyModal:e(()=>`${o.network.root()}_copy_modal`,"copyModal"),filters:e(()=>`${o.network.root()}_filters`,"filters"),ignoredDomains:e(()=>`${o.network.root()}_ignored_domains`,"ignoredDomains"),ignoredUrls:e(()=>`${o.network.root()}_ignored_urls`,"ignoredUrls"),preferences:e(()=>`${o.network.root()}_preferences`,"preferences"),copyOptions:e(()=>`${o.network.root()}_copy_options`,"copyOptions"),saved:e(()=>`${o.network.root()}_saved`,"saved"),overrides:e(()=>`${o.network.root()}_overrides`,"overrides")},routeEvents:{root:e(()=>`${o.base}_route_events`,"root"),modal:e(()=>`${o.routeEvents.root()}_modal`,"modal"),eventFilters:e(()=>`${o.routeEvents.root()}_event_filters`,"eventFilters"),activeTab:e(()=>`${o.routeEvents.root()}_active_tab`,"activeTab"),isMonitoring:e(()=>`${o.routeEvents.root()}_is_monitoring`,"isMonitoring"),detailView:e(()=>`${o.routeEvents.root()}_detail_view`,"detailView"),diffViewerMode:e(()=>`${o.routeEvents.root()}_diff_viewer_mode`,"diffViewerMode")},highlightUpdates:{root:e(()=>`${o.base}_highlight_updates`,"root"),modal:e(()=>`${o.highlightUpdates.root()}_modal`,"modal"),isTracking:e(()=>`${o.highlightUpdates.root()}_is_tracking`,"isTracking"),filters:e(()=>`${o.highlightUpdates.root()}_filters`,"filters"),settings:e(()=>`${o.highlightUpdates.root()}_settings`,"settings"),copySettings:e(()=>`${o.highlightUpdates.root()}_copy_settings`,"copySettings")},benchmark:{root:e(()=>`${o.base}_benchmark`,"root"),modal:e(()=>`${o.benchmark.root()}_modal`,"modal"),isRecording:e(()=>`${o.benchmark.root()}_is_recording`,"isRecording"),activeTab:e(()=>`${o.benchmark.root()}_active_tab`,"activeTab"),settings:e(()=>`${o.benchmark.root()}_settings`,"settings"),selectedReports:e(()=>`${o.benchmark.root()}_selected_reports`,"selectedReports")},debugBorders:{root:e(()=>`${o.base}_debug_borders`,"root"),infoModal:e(()=>`${o.debugBorders.root()}_info_modal`,"infoModal")},events:{root:e(()=>`${o.base}_events`,"root"),modal:e(()=>`${o.events.root()}_modal`,"modal"),enabledSources:e(()=>`${o.events.root()}_enabled_sources`,"enabledSources"),isCapturing:e(()=>`${o.events.root()}_is_capturing`,"isCapturing"),pausedAt:e(()=>`${o.events.root()}_paused_at`,"pausedAt"),copySettings:e(()=>`${o.events.root()}_copy_settings`,"copySettings")},sync:{root:e(()=>`${o.base}_sync`,"root"),deviceId:e(()=>`${o.sync.root()}_device_id`,"deviceId")}},u=["@devtools","@dev_tools_","@modal_state_","@react_query_browser_modal","@react_query_modal","@react_query_mutation_modal","@sentry_logs_modal","@floating_rn_better_dev_tools_","@floating_tools_","@apphost_","@bubble_settings_","@env_vars_modal","@storage_modal","@floating_@devtools_","dev_last_route"];function c(t){if(!t)return false;for(let r of["@AsyncStorage:","CapacitorStorage."])t.startsWith(r)&&(t=t.slice(r.length));if(t.startsWith(o.base)||t.startsWith("buoy-")||t.startsWith("@buoy")||/^(?:buoy[._]|__buoy|react-buoy)/i.test(t))return true;for(let r of u)if(t.startsWith(r))return true;return false}e(c,"isDevToolsStorageKey");var l=new Set;function m(t){return l.add(t),()=>l.delete(t)}e(m,"subscribeStorageWrites");function d(t,r){for(let s of[...l])try{s(t,r)}catch{}}e(d,"notifyStorageWrite");var a=new Map;function i(){try{return typeof window>"u"?null:window.localStorage}catch{return null}}e(i,"storage");var n={async getItem(t){if(a.has(t))return a.get(t)??null;try{return i()?.getItem(t)??null}catch{return null}},async setItem(t,r){a.set(t,r);try{let s=i();s&&(s.setItem(t,r),a.delete(t))}catch{}d(t,r)},async removeItem(t){a.set(t,null);try{let r=i();r&&(r.removeItem(t),a.delete(t))}catch{}d(t,null)},async getAllKeys(){let t=new Set;try{let r=i();if(r)for(let s=0;s<r.length;s++){let _=r.key(s);_?.startsWith(o.base)&&t.add(_)}}catch{}for(let[r,s]of a)r.startsWith(o.base)&&(s===null?t.delete(r):t.add(r));return[...t]},async multiGet(t){return Promise.all(t.map(async r=>[r,await n.getItem(r)]))},async multiRemove(t){await Promise.all(t.map(r=>n.removeItem(r)))},async clear(){await n.multiRemove(await n.getAllKeys())}};async function g(){return i()!==null}e(g,"isUsingPersistentStorage");async function $(){return i()?"localstorage":"memory"}e($,"getStorageBackendType");export{o as a,c as b,m as c,n as d,g as e,$ as f};