@buoy-gg/shared-ui 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.
Files changed (160) hide show
  1. package/lib/commonjs/index.js +1 -1
  2. package/lib/commonjs/license/licenseModule.js +1 -1
  3. package/lib/commonjs/stores/ignoredPatternsStore.shared.js +1 -1
  4. package/lib/commonjs/sync/settingsSync.js +1 -0
  5. package/lib/commonjs/utils/persistentStorage.js +1 -1
  6. package/lib/commonjs/utils/persistentStorage.web.js +1 -1
  7. package/lib/commonjs/utils/storageWrites.js +1 -0
  8. package/lib/module/index.js +1 -1
  9. package/lib/module/license/licenseModule.js +1 -1
  10. package/lib/module/stores/ignoredPatternsStore.shared.js +1 -1
  11. package/lib/module/sync/settingsSync.js +1 -0
  12. package/lib/module/utils/persistentStorage.js +1 -1
  13. package/lib/module/utils/persistentStorage.web.js +1 -1
  14. package/lib/module/utils/storageWrites.js +1 -0
  15. package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
  16. package/lib/typescript/commonjs/index.d.ts +2 -0
  17. package/lib/typescript/commonjs/license/licenseModule.d.ts +5 -0
  18. package/lib/typescript/commonjs/stores/ignoredPatternsStore.shared.d.ts +18 -1
  19. package/lib/typescript/commonjs/sync/settingsSync.d.ts +78 -0
  20. package/lib/typescript/commonjs/utils/storageWrites.d.ts +10 -0
  21. package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
  22. package/lib/typescript/module/index.d.ts +2 -0
  23. package/lib/typescript/module/license/licenseModule.d.ts +5 -0
  24. package/lib/typescript/module/stores/ignoredPatternsStore.shared.d.ts +18 -1
  25. package/lib/typescript/module/sync/settingsSync.d.ts +78 -0
  26. package/lib/typescript/module/utils/storageWrites.d.ts +10 -0
  27. package/lib/web/chunks/{chunk-DEJNSL6V.mjs → chunk-DEEKIG2L.mjs} +1 -1
  28. package/lib/web/chunks/{chunk-XD2BEYMM.mjs → chunk-T7RZZG4A.mjs} +1 -1
  29. package/lib/web/chunks/{chunk-ASEPWYDC.mjs → chunk-U2BTZZID.mjs} +7 -7
  30. package/lib/web/chunks/{persistentStorage.web-6OAJAVRK.mjs → persistentStorage.web-56ENKXFJ.mjs} +1 -1
  31. package/lib/web/dataViewer.mjs +1 -1
  32. package/lib/web/hooks.mjs +1 -1
  33. package/lib/web/index.mjs +3 -3
  34. package/lib/web/ui.mjs +1 -1
  35. package/lib/web/utils.mjs +1 -1
  36. package/package.json +5 -5
  37. package/lib/web/chunks/chunk-26OV3QDY.mjs +0 -1
  38. package/lib/web/chunks/chunk-2MHKRRQW.mjs +0 -1
  39. package/lib/web/chunks/chunk-2Q3SDPH2.mjs +0 -13
  40. package/lib/web/chunks/chunk-34YQ42KI.mjs +0 -1
  41. package/lib/web/chunks/chunk-3NNNCQYP.mjs +0 -13
  42. package/lib/web/chunks/chunk-46CXXOQB.mjs +0 -1
  43. package/lib/web/chunks/chunk-475BSDCB.mjs +0 -1
  44. package/lib/web/chunks/chunk-552W4COI.mjs +0 -1
  45. package/lib/web/chunks/chunk-55EIUPOI.mjs +0 -14
  46. package/lib/web/chunks/chunk-56TTTMX4.mjs +0 -1
  47. package/lib/web/chunks/chunk-5KWAGM5V.mjs +0 -1
  48. package/lib/web/chunks/chunk-5LOQZINQ.mjs +0 -13
  49. package/lib/web/chunks/chunk-5NOIO6ZM.mjs +0 -15
  50. package/lib/web/chunks/chunk-6CCRCSA2.mjs +0 -1
  51. package/lib/web/chunks/chunk-6Q52HRBL.mjs +0 -1
  52. package/lib/web/chunks/chunk-6TEDFSNM.mjs +0 -1
  53. package/lib/web/chunks/chunk-7BLJTQ4U.mjs +0 -1
  54. package/lib/web/chunks/chunk-7BMRSMHN.mjs +0 -1
  55. package/lib/web/chunks/chunk-7PRKERDN.mjs +0 -1
  56. package/lib/web/chunks/chunk-A2SOFE47.mjs +0 -1
  57. package/lib/web/chunks/chunk-A7KJCK4R.mjs +0 -13
  58. package/lib/web/chunks/chunk-AEXGGXS7.mjs +0 -1
  59. package/lib/web/chunks/chunk-AGD7ZT6O.mjs +0 -14
  60. package/lib/web/chunks/chunk-AIEOQWNG.mjs +0 -1
  61. package/lib/web/chunks/chunk-ASTM35HG.mjs +0 -15
  62. package/lib/web/chunks/chunk-AZBMFPMX.mjs +0 -1
  63. package/lib/web/chunks/chunk-B2V2UDCU.mjs +0 -15
  64. package/lib/web/chunks/chunk-BFGKGTAC.mjs +0 -1
  65. package/lib/web/chunks/chunk-BHW6AFO6.mjs +0 -1
  66. package/lib/web/chunks/chunk-BWRW3NJ2.mjs +0 -15
  67. package/lib/web/chunks/chunk-CBM2IZAK.mjs +0 -1
  68. package/lib/web/chunks/chunk-CDLCFF44.mjs +0 -1
  69. package/lib/web/chunks/chunk-CI5CO7FQ.mjs +0 -1
  70. package/lib/web/chunks/chunk-CIB4U2YK.mjs +0 -1
  71. package/lib/web/chunks/chunk-CLLTZQGD.mjs +0 -1
  72. package/lib/web/chunks/chunk-D4RXBAOO.mjs +0 -15
  73. package/lib/web/chunks/chunk-D5HQLRFW.mjs +0 -1
  74. package/lib/web/chunks/chunk-DZDTNXXK.mjs +0 -1
  75. package/lib/web/chunks/chunk-EMEAL3L5.mjs +0 -1
  76. package/lib/web/chunks/chunk-ER3T3IDI.mjs +0 -1
  77. package/lib/web/chunks/chunk-F6SJ5CLB.mjs +0 -1
  78. package/lib/web/chunks/chunk-FDOZ6YSS.mjs +0 -1
  79. package/lib/web/chunks/chunk-FMEWNGQO.mjs +0 -1
  80. package/lib/web/chunks/chunk-G4DH7GMT.mjs +0 -1
  81. package/lib/web/chunks/chunk-GBUZCZE4.mjs +0 -1
  82. package/lib/web/chunks/chunk-GLMS5ZLJ.mjs +0 -1
  83. package/lib/web/chunks/chunk-GNGMIA7V.mjs +0 -1
  84. package/lib/web/chunks/chunk-GTYIS7H7.mjs +0 -14
  85. package/lib/web/chunks/chunk-GZE3FIOX.mjs +0 -1
  86. package/lib/web/chunks/chunk-HGA3GJA6.mjs +0 -1
  87. package/lib/web/chunks/chunk-HJ36IONA.mjs +0 -14
  88. package/lib/web/chunks/chunk-HXPTZMAZ.mjs +0 -1
  89. package/lib/web/chunks/chunk-I27M4JCS.mjs +0 -1
  90. package/lib/web/chunks/chunk-IVCT27JB.mjs +0 -1
  91. package/lib/web/chunks/chunk-JG4QSK5B.mjs +0 -1
  92. package/lib/web/chunks/chunk-JR7BJW6B.mjs +0 -1
  93. package/lib/web/chunks/chunk-K46ZJUXJ.mjs +0 -1
  94. package/lib/web/chunks/chunk-K4EGHHD6.mjs +0 -1
  95. package/lib/web/chunks/chunk-K4LXMO4D.mjs +0 -1
  96. package/lib/web/chunks/chunk-K7CGIEFU.mjs +0 -1
  97. package/lib/web/chunks/chunk-KBTYK5YE.mjs +0 -1
  98. package/lib/web/chunks/chunk-KHP6CSSM.mjs +0 -1
  99. package/lib/web/chunks/chunk-KRDRIW7T.mjs +0 -13
  100. package/lib/web/chunks/chunk-L2DTKDER.mjs +0 -1
  101. package/lib/web/chunks/chunk-L3AFTHWX.mjs +0 -14
  102. package/lib/web/chunks/chunk-LFDFDGHY.mjs +0 -1
  103. package/lib/web/chunks/chunk-MAIUUK4E.mjs +0 -1
  104. package/lib/web/chunks/chunk-MKJKS3IG.mjs +0 -1
  105. package/lib/web/chunks/chunk-MRQKVLXG.mjs +0 -1
  106. package/lib/web/chunks/chunk-NK3OISOL.mjs +0 -13
  107. package/lib/web/chunks/chunk-NLJDDIXW.mjs +0 -1
  108. package/lib/web/chunks/chunk-OENR3XFI.mjs +0 -1
  109. package/lib/web/chunks/chunk-OZB3VKZE.mjs +0 -1
  110. package/lib/web/chunks/chunk-P64PFJT3.mjs +0 -5
  111. package/lib/web/chunks/chunk-PACPGYH7.mjs +0 -1
  112. package/lib/web/chunks/chunk-PART6HOE.mjs +0 -13
  113. package/lib/web/chunks/chunk-PMRXUQRH.mjs +0 -1
  114. package/lib/web/chunks/chunk-PTK5FO6C.mjs +0 -1
  115. package/lib/web/chunks/chunk-PZ45TQ55.mjs +0 -13
  116. package/lib/web/chunks/chunk-Q5LN7GET.mjs +0 -5
  117. package/lib/web/chunks/chunk-QCD6T6L4.mjs +0 -1
  118. package/lib/web/chunks/chunk-QD5EUANU.mjs +0 -1
  119. package/lib/web/chunks/chunk-QJTECJCO.mjs +0 -1
  120. package/lib/web/chunks/chunk-QPIZURPZ.mjs +0 -1
  121. package/lib/web/chunks/chunk-QPY45R5F.mjs +0 -1
  122. package/lib/web/chunks/chunk-QQTJ463K.mjs +0 -1
  123. package/lib/web/chunks/chunk-R2SGZIG5.mjs +0 -1
  124. package/lib/web/chunks/chunk-RJO7RXQQ.mjs +0 -1
  125. package/lib/web/chunks/chunk-S3GYQYVJ.mjs +0 -15
  126. package/lib/web/chunks/chunk-SCCXVTDM.mjs +0 -1
  127. package/lib/web/chunks/chunk-SHJHD646.mjs +0 -1
  128. package/lib/web/chunks/chunk-TCRVZ55E.mjs +0 -1
  129. package/lib/web/chunks/chunk-TJ6ZVV2L.mjs +0 -14
  130. package/lib/web/chunks/chunk-TJUBBXXK.mjs +0 -1
  131. package/lib/web/chunks/chunk-TPSY4RC3.mjs +0 -13
  132. package/lib/web/chunks/chunk-U5KNX5O6.mjs +0 -5
  133. package/lib/web/chunks/chunk-UCKELQSM.mjs +0 -1
  134. package/lib/web/chunks/chunk-UGGCYHRH.mjs +0 -1
  135. package/lib/web/chunks/chunk-UKYVRCMZ.mjs +0 -1
  136. package/lib/web/chunks/chunk-UNYQJZET.mjs +0 -15
  137. package/lib/web/chunks/chunk-VE72SWLV.mjs +0 -14
  138. package/lib/web/chunks/chunk-VKONO6MI.mjs +0 -1
  139. package/lib/web/chunks/chunk-VOS562HW.mjs +0 -14
  140. package/lib/web/chunks/chunk-W4BGMPJO.mjs +0 -1
  141. package/lib/web/chunks/chunk-WHNEEKLR.mjs +0 -1
  142. package/lib/web/chunks/chunk-WIFX6XNL.mjs +0 -15
  143. package/lib/web/chunks/chunk-WLGUP3KY.mjs +0 -15
  144. package/lib/web/chunks/chunk-WY7D4WBZ.mjs +0 -1
  145. package/lib/web/chunks/chunk-XMDNJJS5.mjs +0 -14
  146. package/lib/web/chunks/chunk-XRNB2MHO.mjs +0 -1
  147. package/lib/web/chunks/chunk-XUHVHSSG.mjs +0 -14
  148. package/lib/web/chunks/chunk-XXTIAXQY.mjs +0 -1
  149. package/lib/web/chunks/chunk-YG6DIKQD.mjs +0 -1
  150. package/lib/web/chunks/chunk-YIZFMU66.mjs +0 -1
  151. package/lib/web/chunks/chunk-YOGAPOGC.mjs +0 -1
  152. package/lib/web/chunks/chunk-Z7373DS5.mjs +0 -1
  153. package/lib/web/chunks/chunk-Z76GRN66.mjs +0 -5
  154. package/lib/web/chunks/chunk-ZFPRFFDY.mjs +0 -1
  155. package/lib/web/chunks/persistentStorage.web-4FBAOYJ4.mjs +0 -1
  156. package/lib/web/chunks/persistentStorage.web-6S5TDRE4.mjs +0 -1
  157. package/lib/web/chunks/persistentStorage.web-7W3Y6Q24.mjs +0 -1
  158. package/lib/web/chunks/persistentStorage.web-GOWNFMVT.mjs +0 -1
  159. package/lib/web/chunks/persistentStorage.web-RF47FXIK.mjs +0 -1
  160. package/lib/web/chunks/persistentStorage.web-SOPYL5VC.mjs +0 -1
@@ -19,14 +19,29 @@ type Listener = () => void;
19
19
  * Events tool, on mobile or on the desktop dashboard) shares the same patterns.
20
20
  */
21
21
  declare class IgnoredPatternsStore {
22
+ /** This person's own patterns: the list that is saved (and synced as theirs). */
22
23
  private patterns;
24
+ /**
25
+ * The team's shared patterns (settings sync, BUOY_SIGN_IN_PLAN.md Phase 3).
26
+ * Read-only here, never saved locally; team admins edit it on buoy.gg.
27
+ */
28
+ private teamPatterns;
29
+ /** Own + team, built once per change so the reference stays stable. */
30
+ private merged;
23
31
  private readonly listeners;
24
32
  private loaded;
25
33
  private loadPromise;
26
34
  /** Set once a mutation happens so a slow initial load can't clobber it. */
27
35
  private dirty;
28
- /** Current patterns (stable reference until a mutation occurs). */
36
+ /** Own and team patterns together (stable reference until a change). */
29
37
  getPatterns(): IgnoredPattern[];
38
+ /** Whether a pattern comes only from the team list (so it can't be removed here). */
39
+ isTeamOnly(value: string): boolean;
40
+ /** Settings sync hands over the team's list. Both lists add up. */
41
+ setTeamPatterns(raw: unknown): void;
42
+ /** Re-read this person's list (settings sync just saved a newer copy). */
43
+ reload(): Promise<void>;
44
+ private remerge;
30
45
  subscribe(listener: Listener): () => void;
31
46
  private emit;
32
47
  private ensureLoaded;
@@ -51,6 +66,8 @@ export interface UseIgnoredPatternsResult {
51
66
  remove: (value: string) => void;
52
67
  toggle: (value: string) => void;
53
68
  toggleMode: (value: string) => void;
69
+ /** Whether a pattern comes only from the team list (removing it here does nothing). */
70
+ isTeamOnly: (value: string) => boolean;
54
71
  }
55
72
  /**
56
73
  * Subscribe to the shared ignored-patterns store. All consumers in a runtime
@@ -0,0 +1,78 @@
1
+ /**
2
+ * Settings that follow you (BUOY_SIGN_IN_PLAN.md Phase 3).
3
+ *
4
+ * When this app holds a Buoy sign-in or a dev token, allow-listed settings
5
+ * sync with buoy.gg:
6
+ *
7
+ * - pull on start (and every 15 minutes): a remote setting is saved here if
8
+ * it changed since this device last synced it, unless this device has an
9
+ * unsent change to the same setting (that one is newer);
10
+ * - push a moment after a change: writes to allow-listed keys are batched
11
+ * for 2 seconds, then sent;
12
+ * - first sync on a device: local settings buoy.gg doesn't have yet are
13
+ * sent, so an existing setup follows the person to their next device;
14
+ * - team lists (Business) merge into ignoredPatternsStore. They are read
15
+ * here, never written: team admins edit them on buoy.gg.
16
+ *
17
+ * buoy.gg keeps its own allow-list and drops anything else, so this list is
18
+ * only the client's half of the rule. Keep both in step (apps/website
19
+ * settingsKeys.ts; test/settingsKeys checks).
20
+ */
21
+ import { type DevToolsStorage } from "../utils/persistentStorage";
22
+ export declare const PERSONAL_SETTING_KEYS: ReadonlySet<string>;
23
+ export declare const TEAM_SETTING_KEYS: ReadonlySet<string>;
24
+ /** Which version of each setting this device last synced (server times, seconds). Never synced itself. */
25
+ export declare const SYNC_META_KEY = "@react_buoy_settings_sync_meta";
26
+ export interface SettingsSyncDeps {
27
+ storage: Pick<DevToolsStorage, "getItem" | "setItem">;
28
+ credential: () => {
29
+ token: string;
30
+ origin: string;
31
+ } | null;
32
+ fetch: (url: string, init: {
33
+ method: string;
34
+ headers: Record<string, string>;
35
+ body: string;
36
+ }) => Promise<{
37
+ status: number;
38
+ json(): Promise<unknown>;
39
+ }>;
40
+ subscribeWrites: (listener: (key: string, value: string | null) => void) => () => void;
41
+ setTimer: (fn: () => void, ms: number) => unknown;
42
+ clearTimer: (handle: unknown) => void;
43
+ /** The team's lists arrive here. */
44
+ onTeam: (team: Record<string, string>) => void;
45
+ /** Settings this device just took from buoy.gg, so live stores can re-read them. */
46
+ onApplied: (keys: string[]) => void;
47
+ }
48
+ export declare class SettingsSync {
49
+ private readonly deps;
50
+ private started;
51
+ /** Changes waiting to be sent: key → value (null = removed). */
52
+ private readonly pending;
53
+ /** Keys being saved FROM buoy.gg right now; their writes must not echo back. */
54
+ private readonly applying;
55
+ private pushTimer;
56
+ private pullTimer;
57
+ private unsubscribe;
58
+ /** The token buoy.gg last turned down; sync waits for a different one. */
59
+ private refusedToken;
60
+ constructor(deps?: SettingsSyncDeps);
61
+ /** Starts syncing. Safe to call more than once. */
62
+ start(): void;
63
+ stop(): void;
64
+ private credential;
65
+ private call;
66
+ private schedulePull;
67
+ private readMeta;
68
+ private writeMeta;
69
+ /** Reads buoy.gg's copy and saves what changed. Never throws. */
70
+ pull(): Promise<void>;
71
+ private onWrite;
72
+ private schedulePush;
73
+ /** Sends waiting changes. Keeps them for later when buoy.gg can't be reached. Never throws. */
74
+ push(): Promise<void>;
75
+ }
76
+ /** Starts settings sync for this app. Called by FloatingDevTools; safe to call often. */
77
+ export declare function startSettingsSync(): void;
78
+ //# sourceMappingURL=settingsSync.d.ts.map
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Tells listeners about every persistentStorage write (settingsSync.ts uses
3
+ * it to send allow-listed settings to buoy.gg). `null` means removed.
4
+ * Listener errors never reach the write.
5
+ */
6
+ type WriteListener = (key: string, value: string | null) => void;
7
+ export declare function subscribeStorageWrites(listener: WriteListener): () => void;
8
+ export declare function notifyStorageWrite(key: string, value: string | null): void;
9
+ export {};
10
+ //# sourceMappingURL=storageWrites.d.ts.map
@@ -1 +1 @@
1
- "use client";var e={base:"@react_buoy",bubble:{root:()=>`${e.base}_bubble`,settings:()=>`${e.bubble.root()}_settings`,userPreferences:()=>`${e.bubble.root()}_user_preferences`,position:()=>`${e.bubble.root()}_position`},modal:{root:()=>`${e.base}_modal`,state:()=>`${e.modal.root()}_state`,position:()=>`${e.modal.root()}_position`,dimensions:()=>`${e.modal.root()}_dimensions`,hintAcknowledged:()=>`${e.modal.root()}_hint_acknowledged`},custom:t=>{let o=`${e.base}_custom_${t}`;return{root:()=>o,modal:()=>`${o}_modal`,settings:()=>`${o}_settings`,key:r=>`${o}_${r}`}},settings:{root:()=>`${e.base}_settings`,theme:()=>`${e.settings.root()}_theme`,preferences:()=>`${e.settings.root()}_preferences`,wifiEnabled:()=>`${e.settings.root()}_wifi_enabled`,global:()=>`${e.settings.root()}_global`,activeTab:()=>`${e.settings.root()}_active_tab`,modalOpen:()=>`${e.settings.root()}_modal_open`},dial:{root:()=>`${e.base}_dial`,isOpen:()=>`${e.dial.root()}_is_open`,usage:()=>`${e.dial.root()}_usage`},clipboard:{root:()=>`${e.base}_clipboard`,hintAcknowledged:()=>`${e.clipboard.root()}_hint_acknowledged`},env:{root:()=>`${e.base}_env`,modal:()=>`${e.env.root()}_modal`,currentEnv:()=>`${e.env.root()}_current`,overrides:()=>`${e.env.root()}_overrides`},sentry:{root:()=>`${e.base}_sentry`,modal:()=>`${e.sentry.root()}_modal`,filters:()=>`${e.sentry.root()}_filters`,preferences:()=>`${e.sentry.root()}_preferences`},storage:{root:()=>`${e.base}_storage`,modal:()=>`${e.storage.root()}_modal`,eventsModal:()=>`${e.storage.root()}_events_modal`,filters:()=>`${e.storage.root()}_filters`,eventFilters:()=>`${e.storage.root()}_event_filters`,keyFilters:()=>`${e.storage.root()}_key_filters`,pinnedKeys:()=>`${e.storage.root()}_pinned_keys`,preferences:()=>`${e.storage.root()}_preferences`,activeTab:()=>`${e.storage.root()}_active_tab`,isMonitoring:()=>`${e.storage.root()}_is_monitoring`,diffViewerMode:()=>`${e.storage.root()}_diff_viewer_mode`},clock:{root:()=>`${e.base}_clock`,state:()=>`${e.clock.root()}_state`},permissions:{root:()=>`${e.base}_permissions`,state:()=>`${e.permissions.root()}_state`},lifecycle:{root:()=>`${e.base}_lifecycle`,state:()=>`${e.lifecycle.root()}_state`},location:{root:()=>`${e.base}_location`,state:()=>`${e.location.root()}_state`},timeMachine:{root:()=>`${e.base}_time_machine`,diffViewerMode:()=>`${e.timeMachine.root()}_diff_viewer_mode`,armedPoint:()=>`${e.timeMachine.root()}_armed_point`,barReloadMode:()=>`${e.timeMachine.root()}_bar_reload_mode`,disabledSources:()=>`${e.timeMachine.root()}_disabled_sources`},scenarios:{root:()=>`${e.base}_scenarios`,modal:()=>`${e.scenarios.root()}_modal`,library:()=>`${e.scenarios.root()}_library`,active:()=>`${e.scenarios.root()}_active`},reactQuery:{root:()=>`${e.base}_rq`,modal:()=>`${e.reactQuery.root()}_modal`,browserModal:()=>`${e.reactQuery.root()}_browser_modal`,mutationModal:()=>`${e.reactQuery.root()}_mutation_modal`,filters:()=>`${e.reactQuery.root()}_filters`,ignoredPatterns:()=>`${e.reactQuery.root()}_ignored_patterns`,includedPatterns:()=>`${e.reactQuery.root()}_included_patterns`,preferences:()=>`${e.reactQuery.root()}_preferences`},network:{root:()=>`${e.base}_network`,modal:()=>`${e.network.root()}_modal`,copyModal:()=>`${e.network.root()}_copy_modal`,filters:()=>`${e.network.root()}_filters`,ignoredDomains:()=>`${e.network.root()}_ignored_domains`,ignoredUrls:()=>`${e.network.root()}_ignored_urls`,preferences:()=>`${e.network.root()}_preferences`,copyOptions:()=>`${e.network.root()}_copy_options`,saved:()=>`${e.network.root()}_saved`,overrides:()=>`${e.network.root()}_overrides`},routeEvents:{root:()=>`${e.base}_route_events`,modal:()=>`${e.routeEvents.root()}_modal`,eventFilters:()=>`${e.routeEvents.root()}_event_filters`,activeTab:()=>`${e.routeEvents.root()}_active_tab`,isMonitoring:()=>`${e.routeEvents.root()}_is_monitoring`,detailView:()=>`${e.routeEvents.root()}_detail_view`,diffViewerMode:()=>`${e.routeEvents.root()}_diff_viewer_mode`},highlightUpdates:{root:()=>`${e.base}_highlight_updates`,modal:()=>`${e.highlightUpdates.root()}_modal`,isTracking:()=>`${e.highlightUpdates.root()}_is_tracking`,filters:()=>`${e.highlightUpdates.root()}_filters`,settings:()=>`${e.highlightUpdates.root()}_settings`,copySettings:()=>`${e.highlightUpdates.root()}_copy_settings`},benchmark:{root:()=>`${e.base}_benchmark`,modal:()=>`${e.benchmark.root()}_modal`,isRecording:()=>`${e.benchmark.root()}_is_recording`,activeTab:()=>`${e.benchmark.root()}_active_tab`,settings:()=>`${e.benchmark.root()}_settings`,selectedReports:()=>`${e.benchmark.root()}_selected_reports`},debugBorders:{root:()=>`${e.base}_debug_borders`,infoModal:()=>`${e.debugBorders.root()}_info_modal`},events:{root:()=>`${e.base}_events`,modal:()=>`${e.events.root()}_modal`,enabledSources:()=>`${e.events.root()}_enabled_sources`,isCapturing:()=>`${e.events.root()}_is_capturing`,pausedAt:()=>`${e.events.root()}_paused_at`,copySettings:()=>`${e.events.root()}_copy_settings`},sync:{root:()=>`${e.base}_sync`,deviceId:()=>`${e.sync.root()}_device_id`}},_=["@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 l(t){if(!t)return false;if(t.startsWith(e.base)||t.startsWith("buoy-")||t.startsWith("@buoy"))return true;for(let o of _)if(t.startsWith(o))return true;return false}var s=new Map;function a(){try{return typeof window>"u"?null:window.localStorage}catch{return null}}var n={async getItem(t){if(s.has(t))return s.get(t)??null;try{return a()?.getItem(t)??null}catch{return null}},async setItem(t,o){s.set(t,o);try{let r=a();r&&(r.setItem(t,o),s.delete(t))}catch{}},async removeItem(t){s.set(t,null);try{let o=a();o&&(o.removeItem(t),s.delete(t))}catch{}},async getAllKeys(){let t=new Set;try{let o=a();if(o)for(let r=0;r<o.length;r++){let i=o.key(r);i?.startsWith(e.base)&&t.add(i)}}catch{}for(let[o,r]of s)o.startsWith(e.base)&&(r===null?t.delete(o):t.add(o));return[...t]},async multiGet(t){return Promise.all(t.map(async o=>[o,await n.getItem(o)]))},async multiRemove(t){await Promise.all(t.map(o=>n.removeItem(o)))},async clear(){await n.multiRemove(await n.getAllKeys())}};async function d(){return a()!==null}async function c(){return a()?"localstorage":"memory"}export{e as a,l as b,n as c,d,c as e};
1
+ "use client";var e={base:"@react_buoy",bubble:{root:()=>`${e.base}_bubble`,settings:()=>`${e.bubble.root()}_settings`,userPreferences:()=>`${e.bubble.root()}_user_preferences`,position:()=>`${e.bubble.root()}_position`},modal:{root:()=>`${e.base}_modal`,state:()=>`${e.modal.root()}_state`,position:()=>`${e.modal.root()}_position`,dimensions:()=>`${e.modal.root()}_dimensions`,hintAcknowledged:()=>`${e.modal.root()}_hint_acknowledged`},custom:t=>{let o=`${e.base}_custom_${t}`;return{root:()=>o,modal:()=>`${o}_modal`,settings:()=>`${o}_settings`,key:r=>`${o}_${r}`}},settings:{root:()=>`${e.base}_settings`,theme:()=>`${e.settings.root()}_theme`,preferences:()=>`${e.settings.root()}_preferences`,wifiEnabled:()=>`${e.settings.root()}_wifi_enabled`,global:()=>`${e.settings.root()}_global`,activeTab:()=>`${e.settings.root()}_active_tab`,modalOpen:()=>`${e.settings.root()}_modal_open`},dial:{root:()=>`${e.base}_dial`,isOpen:()=>`${e.dial.root()}_is_open`,usage:()=>`${e.dial.root()}_usage`},clipboard:{root:()=>`${e.base}_clipboard`,hintAcknowledged:()=>`${e.clipboard.root()}_hint_acknowledged`},env:{root:()=>`${e.base}_env`,modal:()=>`${e.env.root()}_modal`,currentEnv:()=>`${e.env.root()}_current`,overrides:()=>`${e.env.root()}_overrides`},sentry:{root:()=>`${e.base}_sentry`,modal:()=>`${e.sentry.root()}_modal`,filters:()=>`${e.sentry.root()}_filters`,preferences:()=>`${e.sentry.root()}_preferences`},storage:{root:()=>`${e.base}_storage`,modal:()=>`${e.storage.root()}_modal`,eventsModal:()=>`${e.storage.root()}_events_modal`,filters:()=>`${e.storage.root()}_filters`,eventFilters:()=>`${e.storage.root()}_event_filters`,keyFilters:()=>`${e.storage.root()}_key_filters`,pinnedKeys:()=>`${e.storage.root()}_pinned_keys`,preferences:()=>`${e.storage.root()}_preferences`,activeTab:()=>`${e.storage.root()}_active_tab`,isMonitoring:()=>`${e.storage.root()}_is_monitoring`,diffViewerMode:()=>`${e.storage.root()}_diff_viewer_mode`},clock:{root:()=>`${e.base}_clock`,state:()=>`${e.clock.root()}_state`},permissions:{root:()=>`${e.base}_permissions`,state:()=>`${e.permissions.root()}_state`},lifecycle:{root:()=>`${e.base}_lifecycle`,state:()=>`${e.lifecycle.root()}_state`},location:{root:()=>`${e.base}_location`,state:()=>`${e.location.root()}_state`},timeMachine:{root:()=>`${e.base}_time_machine`,diffViewerMode:()=>`${e.timeMachine.root()}_diff_viewer_mode`,armedPoint:()=>`${e.timeMachine.root()}_armed_point`,barReloadMode:()=>`${e.timeMachine.root()}_bar_reload_mode`,disabledSources:()=>`${e.timeMachine.root()}_disabled_sources`},scenarios:{root:()=>`${e.base}_scenarios`,modal:()=>`${e.scenarios.root()}_modal`,library:()=>`${e.scenarios.root()}_library`,active:()=>`${e.scenarios.root()}_active`},reactQuery:{root:()=>`${e.base}_rq`,modal:()=>`${e.reactQuery.root()}_modal`,browserModal:()=>`${e.reactQuery.root()}_browser_modal`,mutationModal:()=>`${e.reactQuery.root()}_mutation_modal`,filters:()=>`${e.reactQuery.root()}_filters`,ignoredPatterns:()=>`${e.reactQuery.root()}_ignored_patterns`,includedPatterns:()=>`${e.reactQuery.root()}_included_patterns`,preferences:()=>`${e.reactQuery.root()}_preferences`},network:{root:()=>`${e.base}_network`,modal:()=>`${e.network.root()}_modal`,copyModal:()=>`${e.network.root()}_copy_modal`,filters:()=>`${e.network.root()}_filters`,ignoredDomains:()=>`${e.network.root()}_ignored_domains`,ignoredUrls:()=>`${e.network.root()}_ignored_urls`,preferences:()=>`${e.network.root()}_preferences`,copyOptions:()=>`${e.network.root()}_copy_options`,saved:()=>`${e.network.root()}_saved`,overrides:()=>`${e.network.root()}_overrides`},routeEvents:{root:()=>`${e.base}_route_events`,modal:()=>`${e.routeEvents.root()}_modal`,eventFilters:()=>`${e.routeEvents.root()}_event_filters`,activeTab:()=>`${e.routeEvents.root()}_active_tab`,isMonitoring:()=>`${e.routeEvents.root()}_is_monitoring`,detailView:()=>`${e.routeEvents.root()}_detail_view`,diffViewerMode:()=>`${e.routeEvents.root()}_diff_viewer_mode`},highlightUpdates:{root:()=>`${e.base}_highlight_updates`,modal:()=>`${e.highlightUpdates.root()}_modal`,isTracking:()=>`${e.highlightUpdates.root()}_is_tracking`,filters:()=>`${e.highlightUpdates.root()}_filters`,settings:()=>`${e.highlightUpdates.root()}_settings`,copySettings:()=>`${e.highlightUpdates.root()}_copy_settings`},benchmark:{root:()=>`${e.base}_benchmark`,modal:()=>`${e.benchmark.root()}_modal`,isRecording:()=>`${e.benchmark.root()}_is_recording`,activeTab:()=>`${e.benchmark.root()}_active_tab`,settings:()=>`${e.benchmark.root()}_settings`,selectedReports:()=>`${e.benchmark.root()}_selected_reports`},debugBorders:{root:()=>`${e.base}_debug_borders`,infoModal:()=>`${e.debugBorders.root()}_info_modal`},events:{root:()=>`${e.base}_events`,modal:()=>`${e.events.root()}_modal`,enabledSources:()=>`${e.events.root()}_enabled_sources`,isCapturing:()=>`${e.events.root()}_is_capturing`,pausedAt:()=>`${e.events.root()}_paused_at`,copySettings:()=>`${e.events.root()}_copy_settings`},sync:{root:()=>`${e.base}_sync`,deviceId:()=>`${e.sync.root()}_device_id`}},d=["@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;if(t.startsWith(e.base)||t.startsWith("buoy-")||t.startsWith("@buoy"))return true;for(let o of d)if(t.startsWith(o))return true;return false}var i=new Set;function $(t){return i.add(t),()=>i.delete(t)}function l(t,o){for(let r of[...i])try{r(t,o)}catch{}}var s=new Map;function a(){try{return typeof window>"u"?null:window.localStorage}catch{return null}}var n={async getItem(t){if(s.has(t))return s.get(t)??null;try{return a()?.getItem(t)??null}catch{return null}},async setItem(t,o){s.set(t,o);try{let r=a();r&&(r.setItem(t,o),s.delete(t))}catch{}l(t,o)},async removeItem(t){s.set(t,null);try{let o=a();o&&(o.removeItem(t),s.delete(t))}catch{}l(t,null)},async getAllKeys(){let t=new Set;try{let o=a();if(o)for(let r=0;r<o.length;r++){let _=o.key(r);_?.startsWith(e.base)&&t.add(_)}}catch{}for(let[o,r]of s)o.startsWith(e.base)&&(r===null?t.delete(o):t.add(o));return[...t]},async multiGet(t){return Promise.all(t.map(async o=>[o,await n.getItem(o)]))},async multiRemove(t){await Promise.all(t.map(o=>n.removeItem(o)))},async clear(){await n.multiRemove(await n.getAllKeys())}};async function m(){return a()!==null}async function u(){return a()?"localstorage":"memory"}export{e as a,c as b,$ as c,n as d,m as e,u as f};
@@ -1,4 +1,4 @@
1
- "use client";import{e as te}from"./chunk-46TKOKMV.mjs";import{c as W}from"./chunk-DEJNSL6V.mjs";import{A as Y,G as $,H as r,W as ae,p as C,q as m,s as I,u as A,x as R,z as L}from"./chunk-3UTMGIUG.mjs";import{useCallback as ne,useEffect as ie,useRef as j,useState as q}from"react";var T=new Map;function se(e){try{return JSON.parse(e)}catch{return}}function re(e,t,a={}){let[s,o]=q(()=>T.has(e)?T.get(e):t),[E,f]=q(()=>T.has(e)),c=j(e);c.current=e;let d=j(a);d.current=a,ie(()=>{if(T.has(e)){o(T.get(e)),f(true);return}let l=false,S=d.current.storage??W,p=d.current.parse??se;return S.getItem(e).then(h=>{if(!l){if(h!=null){let u;try{u=p(h)}catch{}u!==void 0&&(T.set(e,u),o(u))}f(true)}}).catch(()=>{l||f(true)}),()=>{l=true}},[e]);let v=ne(l=>{o(S=>{let p=typeof l=="function"?l(S):l;T.set(c.current,p);let h=d.current.storage??W,u=d.current.serialize??JSON.stringify;try{h.setItem(c.current,u(p)).catch(()=>{})}catch{}return p})},[]);return[s,v,E]}function oe(){T.clear()}import{useCallback as P,useEffect as z,useMemo as le,useState as O}from"react";function ce(e,t={}){let[a,s]=O(()=>e.getAll()),[o,E]=O(()=>t.initialFilter??{}),[f,c]=O(()=>e.getEnabled());z(()=>e.subscribe(s),[e]);let d=t.filterItems,v=le(()=>d?d(a,o):a,[a,o,d]),l=P(()=>{e.clear()},[e]),S=P(()=>{let h=!f;e.setEnabled(h),c(h)},[e,f]),p=P(h=>e.getById(h),[e]);return{items:a,filteredItems:v,filter:o,setFilter:E,isEnabled:f,toggleCapture:S,clear:l,getById:p}}function de(e,t){let[a,s]=O(e);return z(()=>t(s),[t]),a}import{useCallback as ue,useEffect as ge,useState as K}from"react";function fe(e,t={}){let{enabled:a=true,maxEvents:s=500,select:o}=t,[E,f]=K([]),[c,d]=K(a);ge(()=>{if(!a){d(false);return}let l=null,S=null,p=e.subscribeToEvents(h=>{S=h,l==null&&(l=requestAnimationFrame(()=>{if(l=null,!S)return;let u=S;S=null,o&&(u=o(u)),u.length>s&&(u=u.slice(0,s)),f(u)}))});return d(true),()=>{p(),l!=null&&cancelAnimationFrame(l)}},[e,a,s,o]);let v=ue(()=>{e.clearEvents()},[e]);return{events:E,clearEvents:v,isActive:c}}import{useState as b,useEffect as w,useCallback as he}from"react";async function U(){let[e,t,a]=await Promise.all([m.isScreenReaderEnabled(),m.isReduceMotionEnabled(),m.isReduceTransparencyEnabled()]),s={isScreenReaderEnabled:e,isReduceMotionEnabled:t,isReduceTransparencyEnabled:a};if(r.OS==="ios"){let[o,E,f,c,d]=await Promise.all([m.isBoldTextEnabled?.()??Promise.resolve(false),m.isGrayscaleEnabled?.()??Promise.resolve(false),m.isInvertColorsEnabled?.()??Promise.resolve(false),m.isDarkerSystemColorsEnabled?.()??Promise.resolve(false),m.prefersCrossFadeTransitions?.()??Promise.resolve(false)]);s.isBoldTextEnabled=o,s.isGrayscaleEnabled=E,s.isInvertColorsEnabled=f,s.isDarkerSystemColorsEnabled=c,s.prefersCrossFadeTransitions=d}if(r.OS==="android"){let o=await m.isHighTextContrastEnabled?.()??false;s.isHighTextContrastEnabled=o}return s}function k(){let e=r.constants,t={os:r.OS,version:r.Version,reactNativeVersion:e.reactNativeVersion,isTesting:r.isTesting??false,isDisableAnimations:e.isDisableAnimations??false};return r.OS==="ios"?{...t,osVersion:e.osVersion,systemName:e.systemName,interfaceIdiom:e.interfaceIdiom,isPad:r.isPad,isTV:r.isTV,isVision:r.isVision??false,isMacCatalyst:r.isMacCatalyst??false,forceTouchAvailable:e.forceTouchAvailable}:r.OS==="android"?{...t,apiLevel:e.Version,release:e.Release,brand:e.Brand,manufacturer:e.Manufacturer,model:e.Model,fingerprint:e.Fingerprint,serial:e.Serial,uiMode:e.uiMode}:t}function M(){let e=R.get("window"),t=R.get("screen"),a={window:{width:e.width,height:e.height,scale:e.scale,fontScale:e.fontScale},screen:{width:t.width,height:t.height,scale:t.scale,fontScale:t.fontScale},pixelRatio:$.get(),fontScale:$.getFontScale(),isLandscape:e.width>e.height,isPortrait:e.height>e.width};if(r.OS==="ios")try{let s=C.DeviceInfo?.getConstants?.();a.isIPhoneNotched=s?.isIPhoneX_deprecated??false}catch{a.isIPhoneNotched=false}if(r.OS==="android")try{let s=C.DeviceInfo?.getConstants?.();a.isEdgeToEdge=s?.isEdgeToEdge??false,a.densityDpi=Math.round(e.scale*160)}catch{}return a}async function X(){return new Promise(e=>{let t=false;r.OS==="ios"?C.StatusBarManager?.getHeight?.(a=>{t||(t=true,e(a?.height??null))})??e(null):r.OS==="android"?(t=true,e(ae.currentHeight??null)):(t=true,e(null)),setTimeout(()=>{t||(t=true,e(null))},100)})}function N(){let e={isRTL:L.isRTL,doLeftAndRightSwapInRTL:L.doLeftAndRightSwapInRTL};return r.OS==="android"&&(e.localeIdentifier=L.localeIdentifier),e}function V(){if(r.OS==="ios")try{return{userDefaults:C.SettingsManager?.getConstants?.()?.settings??{}}}catch{return{}}return{}}function B(){let e={};if(r.OS==="android"){let t=r.constants;e.serial=t.Serial,e.fingerprint=t.Fingerprint;try{let a=C.PlatformConstants;a?.getAndroidID&&(e.androidId=a.getAndroidID())}catch{}}return e}function me(e){let t=[e.platform.os,e.platform.version,e.display.window.width,e.display.window.height,e.display.pixelRatio,e.platform.interfaceIdiom??"",e.platform.forceTouchAvailable??false,e.display.isIPhoneNotched??false,e.platform.model??"",e.platform.brand??"",e.platform.manufacturer??"",e.platform.uiMode??""].join("|"),a=0;for(let s=0;s<t.length;s++){let o=t.charCodeAt(s);a=(a<<5)-a+o,a=a&a}return Math.abs(a).toString(16).padStart(8,"0")}function Se(){let[e,t]=b(true),[a,s]=b(k()),[o,E]=b(M()),[f,c]=b({isScreenReaderEnabled:false,isReduceMotionEnabled:false,isReduceTransparencyEnabled:false}),[d,v]=b(()=>{let g=I.getColorScheme()??null;return{colorScheme:g,prefersDarkMode:g==="dark"}}),[l,S]=b(N()),[p,h]=b({height:null,isVisible:true}),[u,F]=b({isVisible:false,height:0,animationDuration:0}),[J,_]=b({currentState:A.currentState,isActive:A.currentState==="active"}),[x,Q]=b(B()),[H,Z]=b(V()),[G,ee]=b(Date.now()),D=he(async()=>{t(true);let[g,n]=await Promise.all([U(),X()]);s(k()),E(M()),c(g);let i=I.getColorScheme()??null;v({colorScheme:i,prefersDarkMode:i==="dark"}),S(N()),h(y=>({...y,height:n})),Q(B()),Z(V()),ee(Date.now()),t(false)},[]);return w(()=>{D()},[D]),w(()=>{let g=R.addEventListener("change",({window:n,screen:i})=>{E(y=>({...y,window:{width:n.width,height:n.height,scale:n.scale,fontScale:n.fontScale},screen:{width:i.width,height:i.height,scale:i.scale,fontScale:i.fontScale},isLandscape:n.width>n.height,isPortrait:n.height>n.width}))});return()=>g.remove()},[]),w(()=>{let g=I.addChangeListener(({colorScheme:n})=>{let i=n??null;v({colorScheme:i,prefersDarkMode:i==="dark"})});return()=>g.remove()},[]),w(()=>{let g=Y.addListener(r.OS==="ios"?"keyboardWillShow":"keyboardDidShow",i=>{F({isVisible:true,height:i.endCoordinates.height,animationDuration:i.duration??0})}),n=Y.addListener(r.OS==="ios"?"keyboardWillHide":"keyboardDidHide",i=>{F({isVisible:false,height:0,animationDuration:i.duration??0})});return()=>{g.remove(),n.remove()}},[]),w(()=>{let g=te(n=>{_({currentState:n,isActive:n==="active"})});return()=>g.remove()},[]),w(()=>{let g=[m.addEventListener("screenReaderChanged",n=>{c(i=>({...i,isScreenReaderEnabled:n}))}),m.addEventListener("reduceMotionChanged",n=>{c(i=>({...i,isReduceMotionEnabled:n}))}),m.addEventListener("reduceTransparencyChanged",n=>{c(i=>({...i,isReduceTransparencyEnabled:n}))})];if(r.OS==="ios"){let n=(i,y)=>m.addEventListener(i,y);g.push(n("boldTextChanged",i=>{c(y=>({...y,isBoldTextEnabled:i}))}),n("grayscaleChanged",i=>{c(y=>({...y,isGrayscaleEnabled:i}))}),n("invertColorsChanged",i=>{c(y=>({...y,isInvertColorsEnabled:i}))}))}return()=>{g.forEach(n=>n.remove())}},[]),{platform:a,display:o,accessibility:f,appearance:d,locale:l,statusBar:p,keyboard:u,appState:J,identifiers:x,settings:H,timestamp:G,isLoading:e,refresh:D,generateFingerprint:()=>me({platform:a,display:o,accessibility:f,appearance:d,locale:l,statusBar:p,keyboard:u,appState:J,identifiers:x,settings:H,timestamp:G,isLoading:e})}}async function pe(){let[e,t]=await Promise.all([U(),X()]),a=I.getColorScheme()??null;return{platform:k(),display:M(),accessibility:e,appearance:{colorScheme:a,prefersDarkMode:a==="dark"},locale:N(),statusBar:{height:t,isVisible:true},keyboard:{isVisible:false,height:0,animationDuration:0},appState:{currentState:A.currentState,isActive:A.currentState==="active"},identifiers:B(),settings:V(),timestamp:Date.now(),isLoading:false}}function be(e){console.log(`
1
+ "use client";import{e as te}from"./chunk-46TKOKMV.mjs";import{d as W}from"./chunk-DEEKIG2L.mjs";import{A as Y,G as $,H as r,W as ae,p as C,q as m,s as I,u as A,x as R,z as L}from"./chunk-3UTMGIUG.mjs";import{useCallback as ne,useEffect as ie,useRef as j,useState as q}from"react";var T=new Map;function se(e){try{return JSON.parse(e)}catch{return}}function re(e,t,a={}){let[s,o]=q(()=>T.has(e)?T.get(e):t),[E,f]=q(()=>T.has(e)),c=j(e);c.current=e;let d=j(a);d.current=a,ie(()=>{if(T.has(e)){o(T.get(e)),f(true);return}let l=false,S=d.current.storage??W,p=d.current.parse??se;return S.getItem(e).then(h=>{if(!l){if(h!=null){let u;try{u=p(h)}catch{}u!==void 0&&(T.set(e,u),o(u))}f(true)}}).catch(()=>{l||f(true)}),()=>{l=true}},[e]);let v=ne(l=>{o(S=>{let p=typeof l=="function"?l(S):l;T.set(c.current,p);let h=d.current.storage??W,u=d.current.serialize??JSON.stringify;try{h.setItem(c.current,u(p)).catch(()=>{})}catch{}return p})},[]);return[s,v,E]}function oe(){T.clear()}import{useCallback as P,useEffect as z,useMemo as le,useState as O}from"react";function ce(e,t={}){let[a,s]=O(()=>e.getAll()),[o,E]=O(()=>t.initialFilter??{}),[f,c]=O(()=>e.getEnabled());z(()=>e.subscribe(s),[e]);let d=t.filterItems,v=le(()=>d?d(a,o):a,[a,o,d]),l=P(()=>{e.clear()},[e]),S=P(()=>{let h=!f;e.setEnabled(h),c(h)},[e,f]),p=P(h=>e.getById(h),[e]);return{items:a,filteredItems:v,filter:o,setFilter:E,isEnabled:f,toggleCapture:S,clear:l,getById:p}}function de(e,t){let[a,s]=O(e);return z(()=>t(s),[t]),a}import{useCallback as ue,useEffect as ge,useState as K}from"react";function fe(e,t={}){let{enabled:a=true,maxEvents:s=500,select:o}=t,[E,f]=K([]),[c,d]=K(a);ge(()=>{if(!a){d(false);return}let l=null,S=null,p=e.subscribeToEvents(h=>{S=h,l==null&&(l=requestAnimationFrame(()=>{if(l=null,!S)return;let u=S;S=null,o&&(u=o(u)),u.length>s&&(u=u.slice(0,s)),f(u)}))});return d(true),()=>{p(),l!=null&&cancelAnimationFrame(l)}},[e,a,s,o]);let v=ue(()=>{e.clearEvents()},[e]);return{events:E,clearEvents:v,isActive:c}}import{useState as b,useEffect as w,useCallback as he}from"react";async function U(){let[e,t,a]=await Promise.all([m.isScreenReaderEnabled(),m.isReduceMotionEnabled(),m.isReduceTransparencyEnabled()]),s={isScreenReaderEnabled:e,isReduceMotionEnabled:t,isReduceTransparencyEnabled:a};if(r.OS==="ios"){let[o,E,f,c,d]=await Promise.all([m.isBoldTextEnabled?.()??Promise.resolve(false),m.isGrayscaleEnabled?.()??Promise.resolve(false),m.isInvertColorsEnabled?.()??Promise.resolve(false),m.isDarkerSystemColorsEnabled?.()??Promise.resolve(false),m.prefersCrossFadeTransitions?.()??Promise.resolve(false)]);s.isBoldTextEnabled=o,s.isGrayscaleEnabled=E,s.isInvertColorsEnabled=f,s.isDarkerSystemColorsEnabled=c,s.prefersCrossFadeTransitions=d}if(r.OS==="android"){let o=await m.isHighTextContrastEnabled?.()??false;s.isHighTextContrastEnabled=o}return s}function k(){let e=r.constants,t={os:r.OS,version:r.Version,reactNativeVersion:e.reactNativeVersion,isTesting:r.isTesting??false,isDisableAnimations:e.isDisableAnimations??false};return r.OS==="ios"?{...t,osVersion:e.osVersion,systemName:e.systemName,interfaceIdiom:e.interfaceIdiom,isPad:r.isPad,isTV:r.isTV,isVision:r.isVision??false,isMacCatalyst:r.isMacCatalyst??false,forceTouchAvailable:e.forceTouchAvailable}:r.OS==="android"?{...t,apiLevel:e.Version,release:e.Release,brand:e.Brand,manufacturer:e.Manufacturer,model:e.Model,fingerprint:e.Fingerprint,serial:e.Serial,uiMode:e.uiMode}:t}function M(){let e=R.get("window"),t=R.get("screen"),a={window:{width:e.width,height:e.height,scale:e.scale,fontScale:e.fontScale},screen:{width:t.width,height:t.height,scale:t.scale,fontScale:t.fontScale},pixelRatio:$.get(),fontScale:$.getFontScale(),isLandscape:e.width>e.height,isPortrait:e.height>e.width};if(r.OS==="ios")try{let s=C.DeviceInfo?.getConstants?.();a.isIPhoneNotched=s?.isIPhoneX_deprecated??false}catch{a.isIPhoneNotched=false}if(r.OS==="android")try{let s=C.DeviceInfo?.getConstants?.();a.isEdgeToEdge=s?.isEdgeToEdge??false,a.densityDpi=Math.round(e.scale*160)}catch{}return a}async function X(){return new Promise(e=>{let t=false;r.OS==="ios"?C.StatusBarManager?.getHeight?.(a=>{t||(t=true,e(a?.height??null))})??e(null):r.OS==="android"?(t=true,e(ae.currentHeight??null)):(t=true,e(null)),setTimeout(()=>{t||(t=true,e(null))},100)})}function N(){let e={isRTL:L.isRTL,doLeftAndRightSwapInRTL:L.doLeftAndRightSwapInRTL};return r.OS==="android"&&(e.localeIdentifier=L.localeIdentifier),e}function V(){if(r.OS==="ios")try{return{userDefaults:C.SettingsManager?.getConstants?.()?.settings??{}}}catch{return{}}return{}}function B(){let e={};if(r.OS==="android"){let t=r.constants;e.serial=t.Serial,e.fingerprint=t.Fingerprint;try{let a=C.PlatformConstants;a?.getAndroidID&&(e.androidId=a.getAndroidID())}catch{}}return e}function me(e){let t=[e.platform.os,e.platform.version,e.display.window.width,e.display.window.height,e.display.pixelRatio,e.platform.interfaceIdiom??"",e.platform.forceTouchAvailable??false,e.display.isIPhoneNotched??false,e.platform.model??"",e.platform.brand??"",e.platform.manufacturer??"",e.platform.uiMode??""].join("|"),a=0;for(let s=0;s<t.length;s++){let o=t.charCodeAt(s);a=(a<<5)-a+o,a=a&a}return Math.abs(a).toString(16).padStart(8,"0")}function Se(){let[e,t]=b(true),[a,s]=b(k()),[o,E]=b(M()),[f,c]=b({isScreenReaderEnabled:false,isReduceMotionEnabled:false,isReduceTransparencyEnabled:false}),[d,v]=b(()=>{let g=I.getColorScheme()??null;return{colorScheme:g,prefersDarkMode:g==="dark"}}),[l,S]=b(N()),[p,h]=b({height:null,isVisible:true}),[u,F]=b({isVisible:false,height:0,animationDuration:0}),[J,_]=b({currentState:A.currentState,isActive:A.currentState==="active"}),[x,Q]=b(B()),[H,Z]=b(V()),[G,ee]=b(Date.now()),D=he(async()=>{t(true);let[g,n]=await Promise.all([U(),X()]);s(k()),E(M()),c(g);let i=I.getColorScheme()??null;v({colorScheme:i,prefersDarkMode:i==="dark"}),S(N()),h(y=>({...y,height:n})),Q(B()),Z(V()),ee(Date.now()),t(false)},[]);return w(()=>{D()},[D]),w(()=>{let g=R.addEventListener("change",({window:n,screen:i})=>{E(y=>({...y,window:{width:n.width,height:n.height,scale:n.scale,fontScale:n.fontScale},screen:{width:i.width,height:i.height,scale:i.scale,fontScale:i.fontScale},isLandscape:n.width>n.height,isPortrait:n.height>n.width}))});return()=>g.remove()},[]),w(()=>{let g=I.addChangeListener(({colorScheme:n})=>{let i=n??null;v({colorScheme:i,prefersDarkMode:i==="dark"})});return()=>g.remove()},[]),w(()=>{let g=Y.addListener(r.OS==="ios"?"keyboardWillShow":"keyboardDidShow",i=>{F({isVisible:true,height:i.endCoordinates.height,animationDuration:i.duration??0})}),n=Y.addListener(r.OS==="ios"?"keyboardWillHide":"keyboardDidHide",i=>{F({isVisible:false,height:0,animationDuration:i.duration??0})});return()=>{g.remove(),n.remove()}},[]),w(()=>{let g=te(n=>{_({currentState:n,isActive:n==="active"})});return()=>g.remove()},[]),w(()=>{let g=[m.addEventListener("screenReaderChanged",n=>{c(i=>({...i,isScreenReaderEnabled:n}))}),m.addEventListener("reduceMotionChanged",n=>{c(i=>({...i,isReduceMotionEnabled:n}))}),m.addEventListener("reduceTransparencyChanged",n=>{c(i=>({...i,isReduceTransparencyEnabled:n}))})];if(r.OS==="ios"){let n=(i,y)=>m.addEventListener(i,y);g.push(n("boldTextChanged",i=>{c(y=>({...y,isBoldTextEnabled:i}))}),n("grayscaleChanged",i=>{c(y=>({...y,isGrayscaleEnabled:i}))}),n("invertColorsChanged",i=>{c(y=>({...y,isInvertColorsEnabled:i}))}))}return()=>{g.forEach(n=>n.remove())}},[]),{platform:a,display:o,accessibility:f,appearance:d,locale:l,statusBar:p,keyboard:u,appState:J,identifiers:x,settings:H,timestamp:G,isLoading:e,refresh:D,generateFingerprint:()=>me({platform:a,display:o,accessibility:f,appearance:d,locale:l,statusBar:p,keyboard:u,appState:J,identifiers:x,settings:H,timestamp:G,isLoading:e})}}async function pe(){let[e,t]=await Promise.all([U(),X()]),a=I.getColorScheme()??null;return{platform:k(),display:M(),accessibility:e,appearance:{colorScheme:a,prefersDarkMode:a==="dark"},locale:N(),statusBar:{height:t,isVisible:true},keyboard:{isVisible:false,height:0,animationDuration:0},appState:{currentState:A.currentState,isActive:A.currentState==="active"},identifiers:B(),settings:V(),timestamp:Date.now(),isLoading:false}}function be(e){console.log(`
2
2
  ========================================`),console.log(" DEVICE INFO REPORT"),console.log(`========================================
3
3
  `),console.log("--- PLATFORM ---"),console.log(JSON.stringify(e.platform,null,2)),console.log(`
4
4
  --- DISPLAY ---`),console.log(JSON.stringify(e.display,null,2)),console.log(`