whale-code 6.5.11 → 6.6.0

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 (613) hide show
  1. package/dist/cli/chat/ChatApp.js +7 -11
  2. package/dist/cli/chat/ChatApp.js.map +1 -1
  3. package/dist/cli/chat/ChatInput.js +7 -3
  4. package/dist/cli/chat/ChatInput.js.map +1 -1
  5. package/dist/cli/chat/MessageList.js +5 -6
  6. package/dist/cli/chat/MessageList.js.map +1 -1
  7. package/dist/cli/chat/StatusBar.d.ts +2 -2
  8. package/dist/cli/chat/StatusBar.js +90 -160
  9. package/dist/cli/chat/StatusBar.js.map +1 -1
  10. package/dist/cli/chat/components/LiveArea.js +78 -115
  11. package/dist/cli/chat/components/LiveArea.js.map +1 -1
  12. package/dist/cli/chat/components/StaticMessages.js +60 -79
  13. package/dist/cli/chat/components/StaticMessages.js.map +1 -1
  14. package/dist/cli/chat/hooks/useAgentLoop.js +45 -37
  15. package/dist/cli/chat/hooks/useAgentLoop.js.map +1 -1
  16. package/dist/cli/chat/store.d.ts +12 -0
  17. package/dist/cli/chat/store.js +19 -0
  18. package/dist/cli/chat/store.js.map +1 -1
  19. package/dist/cli/services/agent-loop-tools.js +10 -1
  20. package/dist/cli/services/agent-loop-tools.js.map +1 -1
  21. package/dist/cli/services/cli-agent-loop.js +3 -2
  22. package/dist/cli/services/cli-agent-loop.js.map +1 -1
  23. package/dist/cli/services/config-store.js +4 -3
  24. package/dist/cli/services/config-store.js.map +1 -1
  25. package/dist/cli/services/memory-manager.js +2 -2
  26. package/dist/cli/services/memory-manager.js.map +1 -1
  27. package/dist/cli/services/permission-modes.js +14 -10
  28. package/dist/cli/services/permission-modes.js.map +1 -1
  29. package/dist/cli/services/session-client.js +2 -1
  30. package/dist/cli/services/session-client.js.map +1 -1
  31. package/dist/cli/services/session-persistence.js +14 -6
  32. package/dist/cli/services/session-persistence.js.map +1 -1
  33. package/dist/cli/shared/SpinnerSlot.js +4 -1
  34. package/dist/cli/shared/SpinnerSlot.js.map +1 -1
  35. package/dist/server/handlers/browser-lifecycle.js +10 -0
  36. package/dist/server/handlers/browser-lifecycle.js.map +1 -1
  37. package/dist/server/handlers/browser.js +16 -1
  38. package/dist/server/handlers/browser.js.map +1 -1
  39. package/dist/server/handlers/campaigns.js +11 -0
  40. package/dist/server/handlers/campaigns.js.map +1 -1
  41. package/dist/server/handlers/catalog-products.js +19 -5
  42. package/dist/server/handlers/catalog-products.js.map +1 -1
  43. package/dist/server/handlers/catalog.js +42 -8
  44. package/dist/server/handlers/catalog.js.map +1 -1
  45. package/dist/server/handlers/clickhouse.js +4 -4
  46. package/dist/server/handlers/clickhouse.js.map +1 -1
  47. package/dist/server/handlers/comms-email.js +70 -8
  48. package/dist/server/handlers/comms-email.js.map +1 -1
  49. package/dist/server/handlers/comms.js +63 -21
  50. package/dist/server/handlers/comms.js.map +1 -1
  51. package/dist/server/handlers/coupons.js +141 -77
  52. package/dist/server/handlers/coupons.js.map +1 -1
  53. package/dist/server/handlers/google-ads.js +280 -8
  54. package/dist/server/handlers/google-ads.js.map +1 -1
  55. package/dist/server/handlers/remove-bg.d.ts +33 -0
  56. package/dist/server/handlers/remove-bg.js +698 -44
  57. package/dist/server/handlers/remove-bg.js.map +1 -1
  58. package/dist/server/handlers/supply-chain.js +93 -1
  59. package/dist/server/handlers/supply-chain.js.map +1 -1
  60. package/dist/server/handlers/workflow-steps-types.d.ts +1 -1
  61. package/dist/server/handlers/workflow-steps-types.js +7 -1
  62. package/dist/server/handlers/workflow-steps-types.js.map +1 -1
  63. package/dist/server/handlers/workflow-steps.js +1 -1
  64. package/dist/server/handlers/workflow-steps.js.map +1 -1
  65. package/dist/server/index.js +122 -29
  66. package/dist/server/index.js.map +1 -1
  67. package/dist/server/lib/agent-loop-turn.js +33 -3
  68. package/dist/server/lib/agent-loop-turn.js.map +1 -1
  69. package/dist/server/lib/agent-loop-types.d.ts +6 -2
  70. package/dist/server/lib/agent-loop-types.js +14 -2
  71. package/dist/server/lib/agent-loop-types.js.map +1 -1
  72. package/dist/server/lib/clickhouse-client.js +4 -2
  73. package/dist/server/lib/clickhouse-client.js.map +1 -1
  74. package/dist/server/lib/code-worker.js +4 -1
  75. package/dist/server/lib/code-worker.js.map +1 -1
  76. package/dist/server/providers/anthropic.js +103 -33
  77. package/dist/server/providers/anthropic.js.map +1 -1
  78. package/dist/server/server-chat.js +2 -2
  79. package/dist/server/server-chat.js.map +1 -1
  80. package/dist/server/server-helpers.d.ts +8 -1
  81. package/dist/server/server-helpers.js +17 -3
  82. package/dist/server/server-helpers.js.map +1 -1
  83. package/dist/server/server-persist.js +34 -21
  84. package/dist/server/server-persist.js.map +1 -1
  85. package/dist/server/server-rate-limit.d.ts +0 -1
  86. package/dist/server/server-rate-limit.js +5 -5
  87. package/dist/server/server-rate-limit.js.map +1 -1
  88. package/dist/server/server-routes-approvals.js +2 -2
  89. package/dist/server/server-routes-approvals.js.map +1 -1
  90. package/dist/server/server-routes-auth.js +2 -2
  91. package/dist/server/server-routes-auth.js.map +1 -1
  92. package/dist/server/server-routes-events.js +2 -2
  93. package/dist/server/server-routes-events.js.map +1 -1
  94. package/dist/server/server-routes-public.js +4 -4
  95. package/dist/server/server-routes-public.js.map +1 -1
  96. package/dist/server/server-routes-webchat.js +3 -3
  97. package/dist/server/server-routes-webchat.js.map +1 -1
  98. package/dist/server/server-store-circuit-breaker.js +1 -1
  99. package/dist/server/server-store-circuit-breaker.js.map +1 -1
  100. package/dist/server/tool-router.js +7 -4
  101. package/dist/server/tool-router.js.map +1 -1
  102. package/dist/server/validation.js +11 -0
  103. package/dist/server/validation.js.map +1 -1
  104. package/dist/shared/api-client.js +38 -11
  105. package/dist/shared/api-client.js.map +1 -1
  106. package/package.json +12 -10
  107. package/vendor/ink/build/ink.js +68 -24
  108. package/vendor/ink/node_modules/react-devtools-core/README.md +152 -0
  109. package/vendor/ink/node_modules/react-devtools-core/backend.js +1 -0
  110. package/vendor/ink/node_modules/react-devtools-core/dist/648.chunk.js +2 -0
  111. package/vendor/ink/node_modules/react-devtools-core/dist/648.chunk.js.map +1 -0
  112. package/vendor/ink/node_modules/react-devtools-core/dist/backend.js +15691 -0
  113. package/vendor/ink/node_modules/react-devtools-core/dist/backend.js.map +1 -0
  114. package/vendor/ink/node_modules/react-devtools-core/dist/importFile.worker.worker.js +2 -0
  115. package/vendor/ink/node_modules/react-devtools-core/dist/importFile.worker.worker.js.map +1 -0
  116. package/vendor/ink/node_modules/react-devtools-core/dist/parseSourceAndMetadata.worker.worker.js +14 -0
  117. package/vendor/ink/node_modules/react-devtools-core/dist/parseSourceAndMetadata.worker.worker.js.map +1 -0
  118. package/vendor/ink/node_modules/react-devtools-core/dist/standalone.js +2 -0
  119. package/vendor/ink/node_modules/react-devtools-core/dist/standalone.js.map +1 -0
  120. package/vendor/ink/node_modules/react-devtools-core/node_modules/ws/LICENSE +21 -0
  121. package/vendor/ink/node_modules/react-devtools-core/node_modules/ws/README.md +495 -0
  122. package/vendor/ink/node_modules/react-devtools-core/node_modules/ws/browser.js +8 -0
  123. package/vendor/ink/node_modules/react-devtools-core/node_modules/ws/index.js +10 -0
  124. package/vendor/ink/node_modules/react-devtools-core/node_modules/ws/lib/buffer-util.js +129 -0
  125. package/vendor/ink/node_modules/react-devtools-core/node_modules/ws/lib/constants.js +10 -0
  126. package/vendor/ink/node_modules/react-devtools-core/node_modules/ws/lib/event-target.js +184 -0
  127. package/vendor/ink/node_modules/react-devtools-core/node_modules/ws/lib/extension.js +223 -0
  128. package/vendor/ink/node_modules/react-devtools-core/node_modules/ws/lib/limiter.js +55 -0
  129. package/vendor/ink/node_modules/react-devtools-core/node_modules/ws/lib/permessage-deflate.js +518 -0
  130. package/vendor/ink/node_modules/react-devtools-core/node_modules/ws/lib/receiver.js +607 -0
  131. package/vendor/ink/node_modules/react-devtools-core/node_modules/ws/lib/sender.js +409 -0
  132. package/vendor/ink/node_modules/react-devtools-core/node_modules/ws/lib/stream.js +180 -0
  133. package/vendor/ink/node_modules/react-devtools-core/node_modules/ws/lib/validation.js +104 -0
  134. package/vendor/ink/node_modules/react-devtools-core/node_modules/ws/lib/websocket-server.js +449 -0
  135. package/vendor/ink/node_modules/react-devtools-core/node_modules/ws/lib/websocket.js +1197 -0
  136. package/vendor/ink/node_modules/react-devtools-core/node_modules/ws/package.json +56 -0
  137. package/vendor/ink/node_modules/react-devtools-core/package.json +38 -0
  138. package/vendor/ink/node_modules/react-devtools-core/standalone.js +1 -0
  139. package/dist/cli/__tests__/print-mode-streaming.test.js +0 -270
  140. package/dist/cli/__tests__/print-mode.basic-output.test.js +0 -230
  141. package/dist/cli/__tests__/print-mode.session-errors.test.js +0 -252
  142. package/dist/cli/__tests__/print-mode.test.js +0 -273
  143. package/dist/cli/__tests__/serve-mode-messages.test.js +0 -338
  144. package/dist/cli/__tests__/serve-mode.messages.part2.test.js +0 -266
  145. package/dist/cli/__tests__/serve-mode.messages.test.js +0 -277
  146. package/dist/cli/__tests__/serve-mode.startup-http.test.js +0 -279
  147. package/dist/cli/__tests__/serve-mode.test.js +0 -345
  148. package/dist/cli/chat/NodeManager.d.ts +0 -30
  149. package/dist/cli/chat/NodeManager.js +0 -66
  150. package/dist/cli/chat/NodeManager.js.map +0 -1
  151. package/dist/cli/chat/chat-input-menu-handler.d.ts +0 -32
  152. package/dist/cli/chat/hooks/slash-imsg-handlers.js +0 -148
  153. package/dist/cli/chat/hooks/slash-imsg-handlers.js.map +0 -1
  154. package/dist/cli/chat/hooks/useStreamingReducer.d.ts +0 -66
  155. package/dist/cli/commands/__tests__/config-cmd.test.js +0 -270
  156. package/dist/cli/commands/__tests__/doctor.test.js +0 -257
  157. package/dist/cli/commands/__tests__/imsg-node-bridge.test.js +0 -99
  158. package/dist/cli/commands/__tests__/imsg-utils.test.js +0 -73
  159. package/dist/cli/commands/__tests__/init.test.js +0 -214
  160. package/dist/cli/commands/__tests__/mcp.test.js +0 -287
  161. package/dist/cli/commands/imsg-watcher-helpers.d.ts +0 -40
  162. package/dist/cli/commands/imsg-watcher-helpers.js +0 -184
  163. package/dist/cli/commands/imsg-watcher-helpers.js.map +0 -1
  164. package/dist/cli/commands/imsg-watcher.d.ts +0 -11
  165. package/dist/cli/commands/imsg-watcher.js +0 -230
  166. package/dist/cli/commands/imsg-watcher.js.map +0 -1
  167. package/dist/cli/services/__tests__/agent-definitions.test.js +0 -153
  168. package/dist/cli/services/__tests__/agent-events-global.test.js +0 -39
  169. package/dist/cli/services/__tests__/agent-events.part2.test.js +0 -113
  170. package/dist/cli/services/__tests__/agent-events.test.js +0 -157
  171. package/dist/cli/services/__tests__/agent-loop-auth.test.js +0 -392
  172. package/dist/cli/services/__tests__/agent-loop-budget.test.js +0 -389
  173. package/dist/cli/services/__tests__/agent-loop-tools-lifecycle.test.js +0 -430
  174. package/dist/cli/services/__tests__/agent-loop-tools-maxturns.test.js +0 -486
  175. package/dist/cli/services/__tests__/agent-loop-utils-execution.test.js +0 -528
  176. package/dist/cli/services/__tests__/agent-loop-utils-helpers.test.js +0 -466
  177. package/dist/cli/services/__tests__/agent-worker-base-execute.test.js +0 -257
  178. package/dist/cli/services/__tests__/agent-worker-base-helpers.test.js +0 -198
  179. package/dist/cli/services/__tests__/agent-worker-base.test.js +0 -278
  180. package/dist/cli/services/__tests__/auth-service-exports.test.js +0 -41
  181. package/dist/cli/services/__tests__/auth-service.part2.test.js +0 -169
  182. package/dist/cli/services/__tests__/auth-service.test.js +0 -242
  183. package/dist/cli/services/__tests__/background-processes.test.js +0 -282
  184. package/dist/cli/services/__tests__/claude-md-loader.test.js +0 -134
  185. package/dist/cli/services/__tests__/config-store.test.js +0 -247
  186. package/dist/cli/services/__tests__/debug-log.test.js +0 -199
  187. package/dist/cli/services/__tests__/edge-cases-caching.test.js +0 -174
  188. package/dist/cli/services/__tests__/edge-cases-compaction-core.test.js +0 -226
  189. package/dist/cli/services/__tests__/edge-cases-compaction-openai.test.js +0 -152
  190. package/dist/cli/services/__tests__/edge-cases-compaction-shapes.test.js +0 -53
  191. package/dist/cli/services/__tests__/edge-cases-compaction-thinking.test.js +0 -226
  192. package/dist/cli/services/__tests__/edge-cases-compaction.test.js +0 -131
  193. package/dist/cli/services/__tests__/edge-cases-paths.test.js +0 -86
  194. package/dist/cli/services/__tests__/error-logger-messages.test.js +0 -81
  195. package/dist/cli/services/__tests__/error-logger-transport.test.js +0 -119
  196. package/dist/cli/services/__tests__/error-logger.test.js +0 -264
  197. package/dist/cli/services/__tests__/file-history.test.js +0 -136
  198. package/dist/cli/services/__tests__/git-context-cache-reset.test.js +0 -223
  199. package/dist/cli/services/__tests__/git-context.test.js +0 -241
  200. package/dist/cli/services/__tests__/interactive-tools-execute.test.js +0 -166
  201. package/dist/cli/services/__tests__/interactive-tools-plan.test.js +0 -197
  202. package/dist/cli/services/__tests__/interactive-tools.part2.test.js +0 -168
  203. package/dist/cli/services/__tests__/interactive-tools.test.js +0 -179
  204. package/dist/cli/services/__tests__/keybinding-manager.test.js +0 -205
  205. package/dist/cli/services/__tests__/local-tools-dispatch.test.js +0 -404
  206. package/dist/cli/services/__tests__/local-tools.test.js +0 -238
  207. package/dist/cli/services/__tests__/lsp-manager.test.js +0 -364
  208. package/dist/cli/services/__tests__/mcp-client-connect-disconnect.test.js +0 -310
  209. package/dist/cli/services/__tests__/mcp-client.test.js +0 -93
  210. package/dist/cli/services/__tests__/memory-manager.test.js +0 -154
  211. package/dist/cli/services/__tests__/model-manager-utils.test.js +0 -154
  212. package/dist/cli/services/__tests__/model-manager.test.js +0 -175
  213. package/dist/cli/services/__tests__/permission-modes.test.js +0 -222
  214. package/dist/cli/services/__tests__/ripgrep.test.js +0 -328
  215. package/dist/cli/services/__tests__/server-tools-execute.test.js +0 -317
  216. package/dist/cli/services/__tests__/server-tools.test.js +0 -272
  217. package/dist/cli/services/__tests__/session-persistence.test.js +0 -245
  218. package/dist/cli/services/__tests__/subagent-basic.test.js +0 -489
  219. package/dist/cli/services/__tests__/subagent-edge.test.js +0 -545
  220. package/dist/cli/services/__tests__/subagent-prompts.test.js +0 -558
  221. package/dist/cli/services/__tests__/subagent-worker-errors.test.js +0 -255
  222. package/dist/cli/services/__tests__/subagent-worker.test.js +0 -242
  223. package/dist/cli/services/__tests__/system-prompt.test.js +0 -210
  224. package/dist/cli/services/__tests__/team-lead-comms-messaging.test.js +0 -250
  225. package/dist/cli/services/__tests__/team-lead-comms-result.test.js +0 -232
  226. package/dist/cli/services/__tests__/team-lead-comms-stop.test.js +0 -344
  227. package/dist/cli/services/__tests__/team-lead-comms.test.js +0 -285
  228. package/dist/cli/services/__tests__/team-lead-create.test.js +0 -327
  229. package/dist/cli/services/__tests__/team-lead-run.test.js +0 -318
  230. package/dist/cli/services/__tests__/team-lead-stop.test.js +0 -199
  231. package/dist/cli/services/__tests__/team-state-comms.test.js +0 -240
  232. package/dist/cli/services/__tests__/team-state-core.test.js +0 -230
  233. package/dist/cli/services/__tests__/team-state-tasks-complete-fail-available.test.js +0 -224
  234. package/dist/cli/services/__tests__/team-state-tasks.test.js +0 -184
  235. package/dist/cli/services/__tests__/telemetry-ai-metadata.test.js +0 -116
  236. package/dist/cli/services/__tests__/telemetry.part2.test.js +0 -195
  237. package/dist/cli/services/__tests__/telemetry.test.js +0 -176
  238. package/dist/cli/services/agent-loop-iteration.d.ts +0 -13
  239. package/dist/cli/services/agent-loop-setup.d.ts +0 -32
  240. package/dist/cli/services/agent-worker-base-api.d.ts +0 -19
  241. package/dist/cli/services/agent-worker-base-helpers.d.ts +0 -27
  242. package/dist/cli/services/agent-worker-base-tools.d.ts +0 -16
  243. package/dist/cli/services/agent-worker-base-types.d.ts +0 -81
  244. package/dist/cli/services/background-agents.d.ts +0 -26
  245. package/dist/cli/services/background-processes-ops.d.ts +0 -24
  246. package/dist/cli/services/background-tool-defs.d.ts +0 -50
  247. package/dist/cli/services/config-modules-model.test.js +0 -133
  248. package/dist/cli/services/config-modules-permission.test.js +0 -85
  249. package/dist/cli/services/config-modules-permissions.test.js +0 -85
  250. package/dist/cli/services/config-modules-session.test.js +0 -297
  251. package/dist/cli/services/format-server-response-columns.test.js +0 -265
  252. package/dist/cli/services/format-server-response-fallback.test.js +0 -65
  253. package/dist/cli/services/format-server-response-primitives-basic.test.js +0 -261
  254. package/dist/cli/services/format-server-response-primitives-nested.test.js +0 -188
  255. package/dist/cli/services/format-server-response-primitives.test.js +0 -300
  256. package/dist/cli/services/format-server-response-realworld.test.js +0 -248
  257. package/dist/cli/services/format-server-response-values.test.js +0 -247
  258. package/dist/cli/services/hooks-runners.test.js +0 -184
  259. package/dist/cli/services/hooks.glob-load.test.js +0 -233
  260. package/dist/cli/services/hooks.run-hooks.test.js +0 -184
  261. package/dist/cli/services/hooks.test.js +0 -233
  262. package/dist/cli/services/ink-incremental.d.ts +0 -19
  263. package/dist/cli/services/ink-incremental.js +0 -59
  264. package/dist/cli/services/ink-incremental.js.map +0 -1
  265. package/dist/cli/services/ink-resize-fix.d.ts +0 -18
  266. package/dist/cli/services/ink-resize-fix.js +0 -76
  267. package/dist/cli/services/ink-resize-fix.js.map +0 -1
  268. package/dist/cli/services/ink-sync-output.d.ts +0 -12
  269. package/dist/cli/services/ink-sync-output.js +0 -16
  270. package/dist/cli/services/ink-sync-output.js.map +0 -1
  271. package/dist/cli/services/interactive-tool-defs.d.ts +0 -80
  272. package/dist/cli/services/local-tools-definitions.d.ts +0 -6
  273. package/dist/cli/services/local-tools-files.test.js +0 -256
  274. package/dist/cli/services/local-tools-read-many.d.ts +0 -6
  275. package/dist/cli/services/model-router.test.js +0 -245
  276. package/dist/cli/services/rewind-rewindTo.test.js +0 -202
  277. package/dist/cli/services/rewind.test.js +0 -175
  278. package/dist/cli/services/sandbox.test.js +0 -198
  279. package/dist/cli/services/subagent-execution.d.ts +0 -12
  280. package/dist/cli/services/team-lead-auto.d.ts +0 -11
  281. package/dist/cli/services/team-lead-execution.d.ts +0 -28
  282. package/dist/cli/services/teammate-loop.js +0 -557
  283. package/dist/cli/services/teammate-loop.js.map +0 -1
  284. package/dist/cli/services/tools/__tests__/agent-tools-tasks-teams.test.js +0 -250
  285. package/dist/cli/services/tools/__tests__/agent-tools-teams.test.js +0 -200
  286. package/dist/cli/services/tools/__tests__/agent-tools.test.js +0 -340
  287. package/dist/cli/services/tools/__tests__/file-ops-cache.test.js +0 -152
  288. package/dist/cli/services/tools/__tests__/file-ops-notebook.test.js +0 -249
  289. package/dist/cli/services/tools/__tests__/file-ops-read.test.js +0 -261
  290. package/dist/cli/services/tools/__tests__/file-ops-write.test.js +0 -292
  291. package/dist/cli/services/tools/__tests__/search-tools-rg.test.js +0 -92
  292. package/dist/cli/services/tools/__tests__/search-tools.part2.test.js +0 -174
  293. package/dist/cli/services/tools/__tests__/search-tools.test.js +0 -227
  294. package/dist/cli/services/tools/__tests__/shell-exec-allowed-core.test.js +0 -163
  295. package/dist/cli/services/tools/__tests__/shell-exec-allowed-extended.test.js +0 -220
  296. package/dist/cli/services/tools/__tests__/shell-exec-allowed.part2.test.js +0 -215
  297. package/dist/cli/services/tools/__tests__/shell-exec-allowed.test.js +0 -154
  298. package/dist/cli/services/tools/__tests__/shell-exec-blocked.test.js +0 -132
  299. package/dist/cli/services/tools/__tests__/shell-exec-execution.test.js +0 -245
  300. package/dist/cli/services/tools/__tests__/task-manager-create.test.js +0 -110
  301. package/dist/cli/services/tools/__tests__/task-manager-crud.test.js +0 -339
  302. package/dist/cli/services/tools/__tests__/task-manager-list-get.test.js +0 -343
  303. package/dist/cli/services/tools/__tests__/task-manager-query.test.js +0 -346
  304. package/dist/cli/services/tools/__tests__/task-manager-routing.test.js +0 -58
  305. package/dist/cli/services/tools/__tests__/task-manager-update.test.js +0 -224
  306. package/dist/cli/services/tools/__tests__/task-manager.test.js +0 -159
  307. package/dist/cli/services/tools/__tests__/web-tools-html-search.test.js +0 -227
  308. package/dist/cli/services/tools/__tests__/web-tools.test.js +0 -285
  309. package/dist/cli/services/tools/shell-exec.test.js +0 -148
  310. package/dist/cli/shared/SharedTick.d.ts +0 -10
  311. package/dist/cli/shared/__tests__/markdown.test.js +0 -188
  312. package/dist/local-agent/__tests__/connection-disconnect.test.js +0 -201
  313. package/dist/local-agent/__tests__/connection-lifecycle.test.js +0 -289
  314. package/dist/local-agent/__tests__/connection-msghandling.test.js +0 -311
  315. package/dist/local-agent/__tests__/connection-reconnect.test.js +0 -230
  316. package/dist/local-agent/__tests__/connection-toolexec.test.js +0 -253
  317. package/dist/local-agent/__tests__/discovery.test.js +0 -328
  318. package/dist/local-agent/__tests__/executor-background.test.js +0 -219
  319. package/dist/local-agent/__tests__/executor-exec.test.js +0 -221
  320. package/dist/local-agent/__tests__/executor-jobs-sessions.test.js +0 -220
  321. package/dist/local-agent/__tests__/executor-system-info.test.js +0 -133
  322. package/dist/local-agent/__tests__/executor-systeminfo.test.js +0 -109
  323. package/dist/local-agent/__tests__/executor.test.js +0 -235
  324. package/dist/local-agent/__tests__/index.test.js +0 -139
  325. package/dist/node/__tests__/cli-channels.test.js +0 -293
  326. package/dist/node/__tests__/cli-config-edge.test.js +0 -154
  327. package/dist/node/__tests__/cli-config.test.js +0 -215
  328. package/dist/node/__tests__/config.test.js +0 -292
  329. package/dist/node/__tests__/runtime-heartbeat.test.js +0 -153
  330. package/dist/node/__tests__/runtime-lifecycle-init.test.js +0 -263
  331. package/dist/node/__tests__/runtime-lifecycle-stats.test.js +0 -180
  332. package/dist/node/__tests__/runtime-lifecycle.test.js +0 -305
  333. package/dist/node/__tests__/runtime-relay.test.js +0 -341
  334. package/dist/node/adapters/__tests__/base.test.js +0 -286
  335. package/dist/node/adapters/__tests__/discord.test.js +0 -284
  336. package/dist/node/adapters/__tests__/email-send.test.js +0 -295
  337. package/dist/node/adapters/__tests__/email.inbound-send.test.js +0 -217
  338. package/dist/node/adapters/__tests__/email.lifecycle.test.js +0 -211
  339. package/dist/node/adapters/__tests__/email.test.js +0 -290
  340. package/dist/node/adapters/__tests__/email.webhook-send.test.js +0 -251
  341. package/dist/node/adapters/__tests__/imessage-filter.test.js +0 -183
  342. package/dist/node/adapters/__tests__/imessage-lifecycle.test.js +0 -215
  343. package/dist/node/adapters/__tests__/imessage-send-restart.test.js +0 -227
  344. package/dist/node/adapters/__tests__/slack.part2.test.js +0 -135
  345. package/dist/node/adapters/__tests__/slack.test.js +0 -241
  346. package/dist/node/adapters/__tests__/sms-extras.test.js +0 -108
  347. package/dist/node/adapters/__tests__/sms-lifecycle.test.js +0 -203
  348. package/dist/node/adapters/__tests__/sms-messaging.test.js +0 -266
  349. package/dist/node/adapters/__tests__/sms.part2.test.js +0 -174
  350. package/dist/node/adapters/__tests__/sms.test.js +0 -253
  351. package/dist/node/adapters/__tests__/telegram-polling.test.js +0 -256
  352. package/dist/node/adapters/__tests__/telegram-send.test.js +0 -166
  353. package/dist/node/adapters/__tests__/webchat-inbound.test.js +0 -188
  354. package/dist/node/adapters/__tests__/webchat-outbound.test.js +0 -178
  355. package/dist/node/adapters/__tests__/whatsapp-inbound.test.js +0 -200
  356. package/dist/node/adapters/__tests__/whatsapp-send.test.js +0 -212
  357. package/dist/node/adapters/__tests__/whatsapp.test.js +0 -280
  358. package/dist/server/__tests__/gateway-fast-fail.test.js +0 -160
  359. package/dist/server/__tests__/local-agent-gateway.test.js +0 -186
  360. package/dist/server/__tests__/proxy-handlers-delegation.test.js +0 -240
  361. package/dist/server/__tests__/proxy-handlers-validation.test.js +0 -211
  362. package/dist/server/__tests__/proxy-handlers.part2.test.js +0 -240
  363. package/dist/server/__tests__/proxy-handlers.test.js +0 -213
  364. package/dist/server/__tests__/strip-base64-e2e.test.js +0 -303
  365. package/dist/server/__tests__/strip-base64.test.js +0 -256
  366. package/dist/server/__tests__/tool-router-agent-tools.test.js +0 -324
  367. package/dist/server/__tests__/tool-router-execute-core.test.js +0 -357
  368. package/dist/server/__tests__/tool-router-execute-permissions.test.js +0 -332
  369. package/dist/server/__tests__/tool-router-execute.test.js +0 -348
  370. package/dist/server/__tests__/tool-router-load.test.js +0 -432
  371. package/dist/server/__tests__/tool-router-permissions.test.js +0 -359
  372. package/dist/server/__tests__/tool-router-registry-cache.test.js +0 -383
  373. package/dist/server/__tests__/tool-router-registry-handlers.test.js +0 -272
  374. package/dist/server/__tests__/tool-router-registry.test.js +0 -331
  375. package/dist/server/__tests__/validation-inventory.test.js +0 -250
  376. package/dist/server/__tests__/validation-misc.test.js +0 -243
  377. package/dist/server/__tests__/validation-supply-chain.test.js +0 -188
  378. package/dist/server/__tests__/worker.test.js +0 -265
  379. package/dist/server/handlers/__tests__/conversation-lock.test.js +0 -117
  380. package/dist/server/handlers/__tests__/e2e/auth-cross-platform-login.e2e.test.js +0 -268
  381. package/dist/server/handlers/__tests__/e2e/auth-cross-platform-tokens.e2e.test.js +0 -264
  382. package/dist/server/handlers/__tests__/e2e/email-pipeline-send.e2e.test.js +0 -214
  383. package/dist/server/handlers/__tests__/e2e/email-pipeline-threads.e2e.test.js +0 -168
  384. package/dist/server/handlers/__tests__/e2e/error-logging-pipeline-dedup.e2e.test.js +0 -229
  385. package/dist/server/handlers/__tests__/e2e/error-logging-pipeline.e2e.test.js +0 -239
  386. package/dist/server/handlers/__tests__/e2e/error-logging-rate-limit.e2e.test.js +0 -150
  387. package/dist/server/handlers/__tests__/e2e/inventory-sync-guards.e2e.test.js +0 -177
  388. package/dist/server/handlers/__tests__/e2e/inventory-sync.e2e.test.js +0 -228
  389. package/dist/server/handlers/__tests__/e2e/inventory-sync.part2.e2e.test.js +0 -188
  390. package/dist/server/handlers/__tests__/e2e/order-lifecycle-fulfillment.e2e.test.js +0 -295
  391. package/dist/server/handlers/__tests__/e2e/order-lifecycle.e2e.test.js +0 -277
  392. package/dist/server/handlers/__tests__/e2e/order-lifecycle.fulfillment.e2e.test.js +0 -307
  393. package/dist/server/handlers/__tests__/e2e/order-lifecycle.setup.e2e.test.js +0 -177
  394. package/dist/server/handlers/__tests__/e2e/storefront-checkout-cart.e2e.test.js +0 -255
  395. package/dist/server/handlers/__tests__/e2e/storefront-checkout-webhook.e2e.test.js +0 -231
  396. package/dist/server/handlers/__tests__/e2e/workflow-execution-failures.e2e.test.js +0 -235
  397. package/dist/server/handlers/__tests__/e2e/workflow-execution.e2e.test.js +0 -294
  398. package/dist/server/handlers/__tests__/e2e/workflow-security.e2e.test.js +0 -311
  399. package/dist/server/handlers/__tests__/e2e/workflow-security.part2.e2e.test.js +0 -267
  400. package/dist/server/handlers/__tests__/workflow-cache.test.js +0 -237
  401. package/dist/server/handlers/analytics-errors-edge.test.js +0 -173
  402. package/dist/server/handlers/analytics.test.js +0 -280
  403. package/dist/server/handlers/api-docs-examples-ext.d.ts +0 -9
  404. package/dist/server/handlers/api-docs-examples-ext.js +0 -278
  405. package/dist/server/handlers/api-docs-examples-ext.js.map +0 -1
  406. package/dist/server/handlers/api-docs-examples.d.ts +0 -8
  407. package/dist/server/handlers/api-docs-examples.js +0 -221
  408. package/dist/server/handlers/api-docs-examples.js.map +0 -1
  409. package/dist/server/handlers/api-docs-sections-ext.d.ts +0 -2
  410. package/dist/server/handlers/api-docs-sections-ext.js +0 -497
  411. package/dist/server/handlers/api-docs-sections-ext.js.map +0 -1
  412. package/dist/server/handlers/api-docs-sections.d.ts +0 -21
  413. package/dist/server/handlers/api-docs-sections.js +0 -293
  414. package/dist/server/handlers/api-docs-sections.js.map +0 -1
  415. package/dist/server/handlers/api-keys.part2.test.js +0 -157
  416. package/dist/server/handlers/api-keys.test.js +0 -161
  417. package/dist/server/handlers/billing-routes.test.js +0 -123
  418. package/dist/server/handlers/billing.test.js +0 -215
  419. package/dist/server/handlers/browser-actions-errors.test.js +0 -94
  420. package/dist/server/handlers/browser-actions.part2.test.js +0 -190
  421. package/dist/server/handlers/browser-actions.test.js +0 -190
  422. package/dist/server/handlers/browser-validation.test.js +0 -257
  423. package/dist/server/handlers/catalog.test.js +0 -297
  424. package/dist/server/handlers/comms.test.js +0 -289
  425. package/dist/server/handlers/creations-advanced-collections.test.js +0 -214
  426. package/dist/server/handlers/creations-advanced-generate.test.js +0 -142
  427. package/dist/server/handlers/creations-advanced.test.js +0 -171
  428. package/dist/server/handlers/creations-collections-preview.test.js +0 -214
  429. package/dist/server/handlers/creations-crud.test.js +0 -260
  430. package/dist/server/handlers/creations-mutations.test.js +0 -197
  431. package/dist/server/handlers/crm.test.js +0 -179
  432. package/dist/server/handlers/discovery-advertise.test.js +0 -185
  433. package/dist/server/handlers/discovery-scan.test.js +0 -233
  434. package/dist/server/handlers/embeddings-embed-search.test.js +0 -196
  435. package/dist/server/handlers/embeddings-index-delete-stats.test.js +0 -140
  436. package/dist/server/handlers/embeddings-search.test.js +0 -221
  437. package/dist/server/handlers/embeddings.test.js +0 -137
  438. package/dist/server/handlers/enrichment-breach.d.ts +0 -8
  439. package/dist/server/handlers/enrichment-breach.js +0 -266
  440. package/dist/server/handlers/enrichment-breach.js.map +0 -1
  441. package/dist/server/handlers/enrichment-data.d.ts +0 -13
  442. package/dist/server/handlers/enrichment-data.js +0 -145
  443. package/dist/server/handlers/enrichment-data.js.map +0 -1
  444. package/dist/server/handlers/enrichment-mutations.test.js +0 -240
  445. package/dist/server/handlers/enrichment-queries.test.js +0 -181
  446. package/dist/server/handlers/enrichment-validation.test.js +0 -177
  447. package/dist/server/handlers/enrichment-writes.d.ts +0 -16
  448. package/dist/server/handlers/enrichment-writes.js +0 -226
  449. package/dist/server/handlers/enrichment-writes.js.map +0 -1
  450. package/dist/server/handlers/image-gen.test.js +0 -205
  451. package/dist/server/handlers/inventory.test.js +0 -380
  452. package/dist/server/handlers/kali-background.test.js +0 -222
  453. package/dist/server/handlers/kali-errors.test.js +0 -92
  454. package/dist/server/handlers/kali-validation.test.js +0 -234
  455. package/dist/server/handlers/llm-providers-actions.test.js +0 -220
  456. package/dist/server/handlers/llm-providers-anthropic.test.js +0 -239
  457. package/dist/server/handlers/llm-providers-failover.test.js +0 -232
  458. package/dist/server/handlers/llm-providers-providers.test.js +0 -300
  459. package/dist/server/handlers/llm-providers-validation.test.js +0 -239
  460. package/dist/server/handlers/local-agent-tools.test.js +0 -224
  461. package/dist/server/handlers/local-agent.test.js +0 -198
  462. package/dist/server/handlers/local-agent.tools-status.test.js +0 -204
  463. package/dist/server/handlers/local-agent.validation-exec.test.js +0 -182
  464. package/dist/server/handlers/meta-ads-audience-rules.test.js +0 -243
  465. package/dist/server/handlers/meta-ads-audience-targeting.test.js +0 -205
  466. package/dist/server/handlers/meta-ads-audiences-targeting.test.js +0 -383
  467. package/dist/server/handlers/meta-ads-crud-ads.test.js +0 -136
  468. package/dist/server/handlers/meta-ads-crud-campaigns.test.js +0 -189
  469. package/dist/server/handlers/meta-ads-crud-create.test.js +0 -303
  470. package/dist/server/handlers/meta-ads-crud-list-update.test.js +0 -259
  471. package/dist/server/handlers/meta-ads-delete-publish-sync.test.js +0 -282
  472. package/dist/server/handlers/meta-ads-insights.test.js +0 -80
  473. package/dist/server/handlers/meta-ads-list-get.test.js +0 -237
  474. package/dist/server/handlers/meta-ads-publish-delete.test.js +0 -254
  475. package/dist/server/handlers/meta-ads-publish-helpers.js +0 -117
  476. package/dist/server/handlers/meta-ads-publish-helpers.js.map +0 -1
  477. package/dist/server/handlers/meta-ads-publish-sync.test.js +0 -205
  478. package/dist/server/handlers/meta-ads-publish.test.js +0 -254
  479. package/dist/server/handlers/meta-ads-sync-insights.test.js +0 -184
  480. package/dist/server/handlers/meta-ads-update.test.js +0 -117
  481. package/dist/server/handlers/nodes-channels.test.js +0 -413
  482. package/dist/server/handlers/nodes-events.test.js +0 -131
  483. package/dist/server/handlers/nodes-list-delete.test.js +0 -171
  484. package/dist/server/handlers/nodes-messages-delivery.test.js +0 -208
  485. package/dist/server/handlers/nodes-messages.test.js +0 -211
  486. package/dist/server/handlers/nodes-register.test.js +0 -277
  487. package/dist/server/handlers/nodes.test.js +0 -353
  488. package/dist/server/handlers/operations.test.js +0 -136
  489. package/dist/server/handlers/platform-telemetry.test.js +0 -200
  490. package/dist/server/handlers/platform-websearch.test.js +0 -160
  491. package/dist/server/handlers/storefront.test.js +0 -329
  492. package/dist/server/handlers/supply-chain.test.js +0 -347
  493. package/dist/server/handlers/transcription.test.js +0 -118
  494. package/dist/server/handlers/video-gen-veo.js +0 -114
  495. package/dist/server/handlers/video-gen-veo.js.map +0 -1
  496. package/dist/server/handlers/video-gen.test.js +0 -146
  497. package/dist/server/handlers/voice.test.js +0 -153
  498. package/dist/server/handlers/workflow-steps.test.js +0 -330
  499. package/dist/server/handlers/workflows-extras.test.js +0 -65
  500. package/dist/server/handlers/workflows.part2.test.js +0 -170
  501. package/dist/server/handlers/workflows.test.js +0 -281
  502. package/dist/server/lib/__tests__/batch-client-conversion-jsonl.test.js +0 -171
  503. package/dist/server/lib/__tests__/batch-client-polling.test.js +0 -292
  504. package/dist/server/lib/__tests__/batch-client-queue.test.js +0 -270
  505. package/dist/server/lib/__tests__/clickhouse-buffer.test.js +0 -236
  506. package/dist/server/lib/__tests__/code-worker-edge-cases.test.js +0 -118
  507. package/dist/server/lib/__tests__/code-worker-pool-execute.test.js +0 -193
  508. package/dist/server/lib/__tests__/code-worker-pool-execution.test.js +0 -165
  509. package/dist/server/lib/__tests__/code-worker-pool-init.test.js +0 -131
  510. package/dist/server/lib/__tests__/code-worker-pool.test.js +0 -194
  511. package/dist/server/lib/__tests__/code-worker-sandbox-ops.test.js +0 -123
  512. package/dist/server/lib/__tests__/code-worker-sandbox.test.js +0 -217
  513. package/dist/server/lib/__tests__/code-worker.test.js +0 -179
  514. package/dist/server/lib/__tests__/compaction-service-generate.test.js +0 -229
  515. package/dist/server/lib/__tests__/compaction-service.test.js +0 -319
  516. package/dist/server/lib/__tests__/otel.test.js +0 -146
  517. package/dist/server/lib/__tests__/prompt-sanitizer-validation.test.js +0 -165
  518. package/dist/server/lib/__tests__/prompt-sanitizer.sanitize.test.js +0 -343
  519. package/dist/server/lib/__tests__/prompt-sanitizer.test.js +0 -328
  520. package/dist/server/lib/__tests__/prompt-sanitizer.validate-tool.test.js +0 -145
  521. package/dist/server/lib/__tests__/provider-capabilities.test.js +0 -263
  522. package/dist/server/lib/__tests__/provider-failover-routing.test.js +0 -145
  523. package/dist/server/lib/__tests__/provider-failover-state.test.js +0 -131
  524. package/dist/server/lib/__tests__/rate-limiter-budgets.test.js +0 -216
  525. package/dist/server/lib/__tests__/rate-limiter.budgets-tools.test.js +0 -113
  526. package/dist/server/lib/__tests__/rate-limiter.check-request.test.js +0 -141
  527. package/dist/server/lib/__tests__/rate-limiter.stats-lifecycle.test.js +0 -135
  528. package/dist/server/lib/__tests__/rate-limiter.test.js +0 -207
  529. package/dist/server/lib/__tests__/server-agent-loop-abort-conditions.test.js +0 -544
  530. package/dist/server/lib/__tests__/server-agent-loop-abort.part2.test.js +0 -504
  531. package/dist/server/lib/__tests__/server-agent-loop-abort.test.js +0 -396
  532. package/dist/server/lib/__tests__/server-agent-loop-compaction.test.js +0 -397
  533. package/dist/server/lib/__tests__/server-agent-loop-failover.test.js +0 -356
  534. package/dist/server/lib/__tests__/server-agent-loop-features-caching.test.js +0 -519
  535. package/dist/server/lib/__tests__/server-agent-loop-features-edges.test.js +0 -512
  536. package/dist/server/lib/__tests__/server-subagent-bailout.test.js +0 -194
  537. package/dist/server/lib/__tests__/server-subagent-basics.test.js +0 -348
  538. package/dist/server/lib/__tests__/server-subagent-errors-abort.test.js +0 -319
  539. package/dist/server/lib/__tests__/server-subagent-errors-progress.test.js +0 -253
  540. package/dist/server/lib/__tests__/server-subagent-errors.part2.test.js +0 -253
  541. package/dist/server/lib/__tests__/server-subagent-errors.test.js +0 -319
  542. package/dist/server/lib/__tests__/session-checkpoint-load.test.js +0 -275
  543. package/dist/server/lib/__tests__/session-checkpoint-save.test.js +0 -159
  544. package/dist/server/lib/__tests__/ssrf-guard.test.js +0 -93
  545. package/dist/server/lib/__tests__/supabase-client.test.js +0 -111
  546. package/dist/server/lib/__tests__/template-resolver.test.js +0 -317
  547. package/dist/server/lib/__tests__/utils-timeout.test.js +0 -49
  548. package/dist/server/lib/__tests__/utils.test.js +0 -322
  549. package/dist/server/providers/__tests__/anthropic-adapter.test.js +0 -228
  550. package/dist/server/providers/__tests__/anthropic-betas-toolchoice.test.js +0 -257
  551. package/dist/server/providers/__tests__/anthropic-errors.test.js +0 -262
  552. package/dist/server/providers/__tests__/anthropic-stream-core.test.js +0 -275
  553. package/dist/server/providers/__tests__/anthropic-streaming-betas.test.js +0 -247
  554. package/dist/server/providers/__tests__/anthropic-streaming-core.test.js +0 -275
  555. package/dist/server/providers/__tests__/bedrock-config.test.js +0 -177
  556. package/dist/server/providers/__tests__/bedrock-stream-behavior-streaming.test.js +0 -272
  557. package/dist/server/providers/__tests__/bedrock-stream-behavior-toolchoice.test.js +0 -214
  558. package/dist/server/providers/__tests__/bedrock-stream-behavior.part2.test.js +0 -165
  559. package/dist/server/providers/__tests__/bedrock-stream-behavior.test.js +0 -309
  560. package/dist/server/providers/__tests__/bedrock-stream-body-credentials.test.js +0 -170
  561. package/dist/server/providers/__tests__/bedrock-stream-body-extras.test.js +0 -183
  562. package/dist/server/providers/__tests__/bedrock-stream-body-request.test.js +0 -305
  563. package/dist/server/providers/__tests__/bedrock-stream-body.part2.test.js +0 -305
  564. package/dist/server/providers/__tests__/bedrock-stream-body.test.js +0 -175
  565. package/dist/server/providers/__tests__/bedrock-stream-errors.test.js +0 -165
  566. package/dist/server/providers/__tests__/gemini-config-methods.test.js +0 -182
  567. package/dist/server/providers/__tests__/gemini-config-streaming.test.js +0 -257
  568. package/dist/server/providers/__tests__/gemini-conversion-messages.test.js +0 -247
  569. package/dist/server/providers/__tests__/gemini-conversion-schema.test.js +0 -365
  570. package/dist/server/providers/__tests__/gemini-tools-choice.test.js +0 -221
  571. package/dist/server/providers/__tests__/gemini-tools-fn.test.js +0 -252
  572. package/dist/server/providers/__tests__/openai-config.test.js +0 -194
  573. package/dist/server/providers/__tests__/openai-conversion.test.js +0 -276
  574. package/dist/server/providers/__tests__/openai-messages.test.js +0 -261
  575. package/dist/server/providers/__tests__/openai-streaming.test.js +0 -394
  576. package/dist/server/providers/__tests__/openai-tools-cache.test.js +0 -227
  577. package/dist/server/providers/__tests__/registry.test.js +0 -183
  578. package/dist/server/providers/__tests__/shared.test.js +0 -297
  579. package/dist/shared/agent-core-config.test.js +0 -132
  580. package/dist/shared/agent-core-context-thinking.test.js +0 -293
  581. package/dist/shared/agent-core-loop-calls.test.js +0 -174
  582. package/dist/shared/agent-core-loop-detector-bail.test.js +0 -201
  583. package/dist/shared/agent-core-loop-detector.test.js +0 -195
  584. package/dist/shared/agent-core-loop-errors.test.js +0 -258
  585. package/dist/shared/agent-core-pricing.test.js +0 -191
  586. package/dist/shared/agent-core-sanitize-retry.test.js +0 -129
  587. package/dist/shared/api-client-build-request.test.js +0 -228
  588. package/dist/shared/api-client-build-system-caching.test.js +0 -107
  589. package/dist/shared/api-client-build.test.js +0 -223
  590. package/dist/shared/api-client-config.d.ts +0 -21
  591. package/dist/shared/api-client-helpers.d.ts +0 -57
  592. package/dist/shared/api-client-helpers.test.js +0 -261
  593. package/dist/shared/api-client-proxy-happy.test.js +0 -255
  594. package/dist/shared/api-client-proxy-retry.test.js +0 -307
  595. package/dist/shared/api-client-proxy.d.ts +0 -26
  596. package/dist/shared/api-client-proxy.test.js +0 -255
  597. package/dist/shared/api-client-retry.test.js +0 -307
  598. package/dist/shared/api-client-system-trimming.test.js +0 -261
  599. package/dist/shared/api-client-trimming.d.ts +0 -36
  600. package/dist/shared/api-client.test.js +0 -228
  601. package/dist/shared/compaction-thinking.test.js +0 -315
  602. package/dist/shared/compaction-trimming.test.js +0 -223
  603. package/dist/shared/sse-parser-callbacks.test.js +0 -422
  604. package/dist/shared/sse-parser-collect.test.js +0 -252
  605. package/dist/shared/sse-parser-e2e.test.js +0 -558
  606. package/dist/shared/sse-parser-parse.test.js +0 -253
  607. package/dist/shared/tool-dispatch-advanced-batch-build.test.js +0 -405
  608. package/dist/shared/tool-dispatch-advanced.test.js +0 -320
  609. package/dist/shared/tool-dispatch-basic.test.js +0 -278
  610. package/dist/shared/tool-dispatch-content.d.ts +0 -14
  611. package/dist/shared/tool-dispatch-parallel.test.js +0 -378
  612. package/dist/webchat/__tests__/widget-messaging.test.js +0 -323
  613. package/dist/webchat/__tests__/widget.test.js +0 -273
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backend.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;ACAa;;AAAA,SAAAA,QAAAC,CAAA,sCAAAD,OAAA,wBAAAE,MAAA,uBAAAA,MAAA,CAAAC,QAAA,aAAAF,CAAA,kBAAAA,CAAA,gBAAAA,CAAA,WAAAA,CAAA,yBAAAC,MAAA,IAAAD,CAAA,CAAAG,WAAA,KAAAF,MAAA,IAAAD,CAAA,KAAAC,MAAA,CAAAG,SAAA,qBAAAJ,CAAA,KAAAD,OAAA,CAAAC,CAAA;AACb,IAAIK,gBAAgB,GAAGC,mBAAO,CAAC,GAAoB,CAAC;EAClDC,KAAK,GAAGD,mBAAO,CAAC,GAAO,CAAC;EACxBE,MAAM,GAAGC,MAAM,CAACD,MAAM;EACtBE,oBAAoB,GAClBH,KAAK,CAACI,+DAA+D;EACvEC,kBAAkB,GAAGX,MAAM,CAACY,GAAG,CAAC,eAAe,CAAC;EAChDC,yBAAyB,GAAGb,MAAM,CAACY,GAAG,CAAC,2BAA2B,CAAC;EACnEE,cAAc,GAAGN,MAAM,CAACL,SAAS,CAACW,cAAc;EAChDC,OAAO,GAAG,EAAE;EACZC,mBAAmB,GAAG,IAAI;AAC5B,SAASC,sBAAsBA,CAAA,EAAG;EAChC,IAAI,IAAI,KAAKD,mBAAmB,EAAE;IAChC,IAAIE,KAAK,GAAG,IAAIC,GAAG,CAAC,CAAC;IACrB,IAAI;MACFC,UAAU,CAACC,UAAU,CAAC;QAAEC,aAAa,EAAE;MAAK,CAAC,CAAC;MAC9CF,UAAU,CAACG,QAAQ,CAAC,IAAI,CAAC;MACzBH,UAAU,CAACI,UAAU,CAAC,UAAUC,CAAC,EAAE;QACjC,OAAOA,CAAC;MACV,CAAC,EAAE,IAAI,CAAC;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;EAEA,IAAMv7C,KAAK,GAAG,IAAIuC,KAAK,CAACI,MAAM,EAAEwM,WAAW,EAAEhZ,kBAAkB,CAAC;EAChE,IAAI,OAAOC,4BAA4B,KAAK,UAAU,EAAE;IACtDA,4BAA4B,CAAC,CAAC;EAChC;EAEA,IAAImmD,iBAAiB,IAAI,IAAI,EAAE;IAC7Bv8C,KAAK,CAAC5mB,WAAW,CAAC,oBAAoB,EAAEmjE,iBAAiB,CAAC;EAC5D;EACAv8C,KAAK,CAAC5mB,WAAW,CAAC,UAAU,EAAE,YAAM;IAClC,IAAImjE,iBAAiB,IAAI,IAAI,EAAE;MAC7Bv8C,KAAK,CAACzmB,cAAc,CAAC,oBAAoB,EAAEgjE,iBAAiB,CAAC;IAC/D;IAIA3/E,IAAI,CAACwO,IAAI,CAAC,UAAU,CAAC;EACvB,CAAC,CAAC;EAEF,IAAM6yE,kBAAkB,GAAGtF,WAAW,CACpC/7E,IAAI,EACJojC,KAAK,EACLn1B,MAAM,EACN+tE,2BACF,CAAC;EAED,IAAMsF,mBAA8C,GAClDhC,cAAc,IAAIt/E,IAAI,CAACs/E,cAAc;EAEvC,IAAIgC,mBAAmB,IAAI,IAAI,EAAE;IAC/B,IAAM/D,eAAe,GACnBwB,gCAAgC,IAChC/+E,IAAI,CAAC++E,gCAAgC,IACrC,IAAI;IAEN1B,sBAAsB,CAACt3C,MAAM,EAAE3C,KAAK,EAAEk+C,mBAAmB,EAAE/D,eAAe,CAAC;EAC7E;EAEA,OAAO8D,kBAAkB;AAC3B,C","sources":["webpack://ReactDevToolsBackend/webpack/universalModuleDefinition","webpack://ReactDevToolsBackend/../../build/oss-experimental/react-debug-tools/cjs/react-debug-tools.production.js","webpack://ReactDevToolsBackend/../../build/oss-experimental/react-debug-tools/index.js","webpack://ReactDevToolsBackend/../../build/oss-experimental/react/cjs/react.production.js","webpack://ReactDevToolsBackend/../../build/oss-experimental/react/index.js","webpack://ReactDevToolsBackend/../../node_modules/error-stack-parser/error-stack-parser.js","webpack://ReactDevToolsBackend/../../node_modules/lru-cache/index.js","webpack://ReactDevToolsBackend/../../node_modules/process/browser.js","webpack://ReactDevToolsBackend/../../node_modules/stackframe/stackframe.js","webpack://ReactDevToolsBackend/../../node_modules/yallist/iterator.js","webpack://ReactDevToolsBackend/../../node_modules/yallist/yallist.js","webpack://ReactDevToolsBackend/webpack/bootstrap","webpack://ReactDevToolsBackend/webpack/runtime/compat get default export","webpack://ReactDevToolsBackend/webpack/runtime/define property getters","webpack://ReactDevToolsBackend/webpack/runtime/hasOwnProperty shorthand","webpack://ReactDevToolsBackend/webpack/runtime/make namespace object","webpack://ReactDevToolsBackend/../react-devtools-shared/src/events.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/constants.js","webpack://ReactDevToolsBackend/../../node_modules/compare-versions/lib/esm/index.js","webpack://ReactDevToolsBackend/../shared/ReactFeatureFlags.js","webpack://ReactDevToolsBackend/../shared/ReactSymbols.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/frontend/types.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/isArray.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/utils.js","webpack://ReactDevToolsBackend/../shared/noop.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/hydration.js","webpack://ReactDevToolsBackend/../shared/isArray.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/utils/index.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/views/utils.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/views/Highlighter/Overlay.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/views/Highlighter/Highlighter.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/views/Highlighter/index.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/views/TraceUpdates/canvas.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/views/TraceUpdates/index.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/bridge.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/storage.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/agent.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/shared/DevToolsConsolePatching.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/shared/DevToolsComponentStackFrame.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/shared/DevToolsOwnerStack.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/flight/DevToolsComponentInfoStack.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/shared/DevToolsServerComponentLogs.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/flight/renderer.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/utils/parseStackTrace.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/shared/ReactSymbols.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/config/DevToolsFeatureFlags.core-oss.js","webpack://ReactDevToolsBackend/../shared/objectIs.js","webpack://ReactDevToolsBackend/../shared/hasOwnProperty.js","webpack://ReactDevToolsBackend/../shared/ReactIODescription.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/fiber/DevToolsFiberComponentStack.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/StyleX/utils.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/devtools/constants.js","webpack://ReactDevToolsBackend/../react-devtools-timeline/src/constants.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/profilingHooks.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/fiber/renderer.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/legacy/utils.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/legacy/renderer.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/attachRenderer.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/utils/formatConsoleArguments.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/hook.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/index.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/NativeStyleEditor/resolveBoxStyle.js","webpack://ReactDevToolsBackend/../react-devtools-shared/src/backend/NativeStyleEditor/setupNativeStyleEditor.js","webpack://ReactDevToolsBackend/./src/backend.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ReactDevToolsBackend\"] = factory();\n\telse\n\t\troot[\"ReactDevToolsBackend\"] = factory();\n})(self, () => {\nreturn ","/**\n * @license React\n * react-debug-tools.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar ErrorStackParser = require(\"error-stack-parser\"),\n React = require(\"react\"),\n assign = Object.assign,\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_MEMO_CACHE_SENTINEL = Symbol.for(\"react.memo_cache_sentinel\"),\n hasOwnProperty = Object.prototype.hasOwnProperty,\n hookLog = [],\n primitiveStackCache = null;\nfunction getPrimitiveStackCache() {\n if (null === primitiveStackCache) {\n var cache = new Map();\n try {\n Dispatcher.useContext({ _currentValue: null });\n Dispatcher.useState(null);\n Dispatcher.useReducer(function (s) {\n return s;\n }, null);\n Dispatcher.useRef(null);\n \"function\" === typeof Dispatcher.useCacheRefresh &&\n Dispatcher.useCacheRefresh();\n Dispatcher.useLayoutEffect(function () {});\n Dispatcher.useInsertionEffect(function () {});\n Dispatcher.useEffect(function () {});\n Dispatcher.useImperativeHandle(void 0, function () {\n return null;\n });\n Dispatcher.useDebugValue(null);\n Dispatcher.useCallback(function () {});\n Dispatcher.useTransition();\n Dispatcher.useSyncExternalStore(\n function () {\n return function () {};\n },\n function () {\n return null;\n },\n function () {\n return null;\n }\n );\n Dispatcher.useDeferredValue(null);\n Dispatcher.useMemo(function () {\n return null;\n });\n Dispatcher.useOptimistic(null, function (s) {\n return s;\n });\n Dispatcher.useFormState(function (s) {\n return s;\n }, null);\n Dispatcher.useActionState(function (s) {\n return s;\n }, null);\n Dispatcher.useHostTransitionStatus();\n \"function\" === typeof Dispatcher.useMemoCache &&\n Dispatcher.useMemoCache(0);\n if (\"function\" === typeof Dispatcher.use) {\n Dispatcher.use({ $$typeof: REACT_CONTEXT_TYPE, _currentValue: null });\n Dispatcher.use({\n then: function () {},\n status: \"fulfilled\",\n value: null\n });\n try {\n Dispatcher.use({ then: function () {} });\n } catch (x) {}\n }\n Dispatcher.useId();\n \"function\" === typeof Dispatcher.useEffectEvent &&\n Dispatcher.useEffectEvent(function () {});\n } finally {\n var readHookLog = hookLog;\n hookLog = [];\n }\n for (var i = 0; i < readHookLog.length; i++) {\n var hook = readHookLog[i];\n cache.set(hook.primitive, ErrorStackParser.parse(hook.stackError));\n }\n primitiveStackCache = cache;\n }\n return primitiveStackCache;\n}\nvar currentFiber = null,\n currentHook = null,\n currentContextDependency = null,\n currentThenableIndex = 0,\n currentThenableState = null;\nfunction nextHook() {\n var hook = currentHook;\n null !== hook && (currentHook = hook.next);\n return hook;\n}\nfunction readContext(context) {\n if (null === currentFiber) return context._currentValue;\n if (null === currentContextDependency)\n throw Error(\n \"Context reads do not line up with context dependencies. This is a bug in React Debug Tools.\"\n );\n hasOwnProperty.call(currentContextDependency, \"memoizedValue\")\n ? ((context = currentContextDependency.memoizedValue),\n (currentContextDependency = currentContextDependency.next))\n : (context = context._currentValue);\n return context;\n}\nvar SuspenseException = Error(\n \"Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\\n\\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`.\"\n ),\n Dispatcher = {\n readContext: readContext,\n use: function (usable) {\n if (null !== usable && \"object\" === typeof usable) {\n if (\"function\" === typeof usable.then) {\n usable =\n null !== currentThenableState &&\n currentThenableIndex < currentThenableState.length\n ? currentThenableState[currentThenableIndex++]\n : usable;\n switch (usable.status) {\n case \"fulfilled\":\n var fulfilledValue = usable.value;\n hookLog.push({\n displayName: null,\n primitive: \"Promise\",\n stackError: Error(),\n value: fulfilledValue,\n debugInfo:\n void 0 === usable._debugInfo ? null : usable._debugInfo,\n dispatcherHookName: \"Use\"\n });\n return fulfilledValue;\n case \"rejected\":\n throw usable.reason;\n }\n hookLog.push({\n displayName: null,\n primitive: \"Unresolved\",\n stackError: Error(),\n value: usable,\n debugInfo: void 0 === usable._debugInfo ? null : usable._debugInfo,\n dispatcherHookName: \"Use\"\n });\n throw SuspenseException;\n }\n if (usable.$$typeof === REACT_CONTEXT_TYPE)\n return (\n (fulfilledValue = readContext(usable)),\n hookLog.push({\n displayName: usable.displayName || \"Context\",\n primitive: \"Context (use)\",\n stackError: Error(),\n value: fulfilledValue,\n debugInfo: null,\n dispatcherHookName: \"Use\"\n }),\n fulfilledValue\n );\n }\n throw Error(\"An unsupported type was passed to use(): \" + String(usable));\n },\n useCallback: function (callback) {\n var hook = nextHook();\n hookLog.push({\n displayName: null,\n primitive: \"Callback\",\n stackError: Error(),\n value: null !== hook ? hook.memoizedState[0] : callback,\n debugInfo: null,\n dispatcherHookName: \"Callback\"\n });\n return callback;\n },\n useContext: function (context) {\n var value = readContext(context);\n hookLog.push({\n displayName: context.displayName || null,\n primitive: \"Context\",\n stackError: Error(),\n value: value,\n debugInfo: null,\n dispatcherHookName: \"Context\"\n });\n return value;\n },\n useEffect: function (create) {\n nextHook();\n hookLog.push({\n displayName: null,\n primitive: \"Effect\",\n stackError: Error(),\n value: create,\n debugInfo: null,\n dispatcherHookName: \"Effect\"\n });\n },\n useImperativeHandle: function (ref) {\n nextHook();\n var instance = void 0;\n null !== ref && \"object\" === typeof ref && (instance = ref.current);\n hookLog.push({\n displayName: null,\n primitive: \"ImperativeHandle\",\n stackError: Error(),\n value: instance,\n debugInfo: null,\n dispatcherHookName: \"ImperativeHandle\"\n });\n },\n useLayoutEffect: function (create) {\n nextHook();\n hookLog.push({\n displayName: null,\n primitive: \"LayoutEffect\",\n stackError: Error(),\n value: create,\n debugInfo: null,\n dispatcherHookName: \"LayoutEffect\"\n });\n },\n useInsertionEffect: function (create) {\n nextHook();\n hookLog.push({\n displayName: null,\n primitive: \"InsertionEffect\",\n stackError: Error(),\n value: create,\n debugInfo: null,\n dispatcherHookName: \"InsertionEffect\"\n });\n },\n useMemo: function (nextCreate) {\n var hook = nextHook();\n nextCreate = null !== hook ? hook.memoizedState[0] : nextCreate();\n hookLog.push({\n displayName: null,\n primitive: \"Memo\",\n stackError: Error(),\n value: nextCreate,\n debugInfo: null,\n dispatcherHookName: \"Memo\"\n });\n return nextCreate;\n },\n useReducer: function (reducer, initialArg, init) {\n reducer = nextHook();\n initialArg =\n null !== reducer\n ? reducer.memoizedState\n : void 0 !== init\n ? init(initialArg)\n : initialArg;\n hookLog.push({\n displayName: null,\n primitive: \"Reducer\",\n stackError: Error(),\n value: initialArg,\n debugInfo: null,\n dispatcherHookName: \"Reducer\"\n });\n return [initialArg, function () {}];\n },\n useRef: function (initialValue) {\n var hook = nextHook();\n initialValue =\n null !== hook ? hook.memoizedState : { current: initialValue };\n hookLog.push({\n displayName: null,\n primitive: \"Ref\",\n stackError: Error(),\n value: initialValue.current,\n debugInfo: null,\n dispatcherHookName: \"Ref\"\n });\n return initialValue;\n },\n useState: function (initialState) {\n var hook = nextHook();\n initialState =\n null !== hook\n ? hook.memoizedState\n : \"function\" === typeof initialState\n ? initialState()\n : initialState;\n hookLog.push({\n displayName: null,\n primitive: \"State\",\n stackError: Error(),\n value: initialState,\n debugInfo: null,\n dispatcherHookName: \"State\"\n });\n return [initialState, function () {}];\n },\n useDebugValue: function (value, formatterFn) {\n hookLog.push({\n displayName: null,\n primitive: \"DebugValue\",\n stackError: Error(),\n value: \"function\" === typeof formatterFn ? formatterFn(value) : value,\n debugInfo: null,\n dispatcherHookName: \"DebugValue\"\n });\n },\n useDeferredValue: function (value) {\n var hook = nextHook();\n value = null !== hook ? hook.memoizedState : value;\n hookLog.push({\n displayName: null,\n primitive: \"DeferredValue\",\n stackError: Error(),\n value: value,\n debugInfo: null,\n dispatcherHookName: \"DeferredValue\"\n });\n return value;\n },\n useTransition: function () {\n var stateHook = nextHook();\n nextHook();\n stateHook = null !== stateHook ? stateHook.memoizedState : !1;\n hookLog.push({\n displayName: null,\n primitive: \"Transition\",\n stackError: Error(),\n value: stateHook,\n debugInfo: null,\n dispatcherHookName: \"Transition\"\n });\n return [stateHook, function () {}];\n },\n useSyncExternalStore: function (subscribe, getSnapshot) {\n nextHook();\n nextHook();\n subscribe = getSnapshot();\n hookLog.push({\n displayName: null,\n primitive: \"SyncExternalStore\",\n stackError: Error(),\n value: subscribe,\n debugInfo: null,\n dispatcherHookName: \"SyncExternalStore\"\n });\n return subscribe;\n },\n useId: function () {\n var hook = nextHook();\n hook = null !== hook ? hook.memoizedState : \"\";\n hookLog.push({\n displayName: null,\n primitive: \"Id\",\n stackError: Error(),\n value: hook,\n debugInfo: null,\n dispatcherHookName: \"Id\"\n });\n return hook;\n },\n useHostTransitionStatus: function () {\n var status = readContext({ _currentValue: null });\n hookLog.push({\n displayName: null,\n primitive: \"HostTransitionStatus\",\n stackError: Error(),\n value: status,\n debugInfo: null,\n dispatcherHookName: \"HostTransitionStatus\"\n });\n return status;\n },\n useFormState: function (action, initialState) {\n var hook = nextHook();\n nextHook();\n nextHook();\n action = Error();\n var debugInfo = null,\n error = null;\n if (null !== hook)\n if (\n ((initialState = hook.memoizedState),\n \"object\" === typeof initialState &&\n null !== initialState &&\n \"function\" === typeof initialState.then)\n )\n switch (initialState.status) {\n case \"fulfilled\":\n var value = initialState.value;\n debugInfo =\n void 0 === initialState._debugInfo\n ? null\n : initialState._debugInfo;\n break;\n case \"rejected\":\n error = initialState.reason;\n break;\n default:\n (error = SuspenseException),\n (debugInfo =\n void 0 === initialState._debugInfo\n ? null\n : initialState._debugInfo),\n (value = initialState);\n }\n else value = initialState;\n else value = initialState;\n hookLog.push({\n displayName: null,\n primitive: \"FormState\",\n stackError: action,\n value: value,\n debugInfo: debugInfo,\n dispatcherHookName: \"FormState\"\n });\n if (null !== error) throw error;\n return [value, function () {}, !1];\n },\n useActionState: function (action, initialState) {\n var hook = nextHook();\n nextHook();\n nextHook();\n action = Error();\n var debugInfo = null,\n error = null;\n if (null !== hook)\n if (\n ((initialState = hook.memoizedState),\n \"object\" === typeof initialState &&\n null !== initialState &&\n \"function\" === typeof initialState.then)\n )\n switch (initialState.status) {\n case \"fulfilled\":\n var value = initialState.value;\n debugInfo =\n void 0 === initialState._debugInfo\n ? null\n : initialState._debugInfo;\n break;\n case \"rejected\":\n error = initialState.reason;\n break;\n default:\n (error = SuspenseException),\n (debugInfo =\n void 0 === initialState._debugInfo\n ? null\n : initialState._debugInfo),\n (value = initialState);\n }\n else value = initialState;\n else value = initialState;\n hookLog.push({\n displayName: null,\n primitive: \"ActionState\",\n stackError: action,\n value: value,\n debugInfo: debugInfo,\n dispatcherHookName: \"ActionState\"\n });\n if (null !== error) throw error;\n return [value, function () {}, !1];\n },\n useOptimistic: function (passthrough) {\n var hook = nextHook();\n passthrough = null !== hook ? hook.memoizedState : passthrough;\n hookLog.push({\n displayName: null,\n primitive: \"Optimistic\",\n stackError: Error(),\n value: passthrough,\n debugInfo: null,\n dispatcherHookName: \"Optimistic\"\n });\n return [passthrough, function () {}];\n },\n useMemoCache: function (size) {\n var fiber = currentFiber;\n if (null == fiber) return [];\n fiber = null != fiber.updateQueue ? fiber.updateQueue.memoCache : null;\n if (null == fiber) return [];\n var data = fiber.data[fiber.index];\n if (void 0 === data) {\n data = fiber.data[fiber.index] = Array(size);\n for (var i = 0; i < size; i++) data[i] = REACT_MEMO_CACHE_SENTINEL;\n }\n fiber.index++;\n return data;\n },\n useCacheRefresh: function () {\n var hook = nextHook();\n hookLog.push({\n displayName: null,\n primitive: \"CacheRefresh\",\n stackError: Error(),\n value: null !== hook ? hook.memoizedState : function () {},\n debugInfo: null,\n dispatcherHookName: \"CacheRefresh\"\n });\n return function () {};\n },\n useEffectEvent: function (callback) {\n nextHook();\n hookLog.push({\n displayName: null,\n primitive: \"EffectEvent\",\n stackError: Error(),\n value: callback,\n debugInfo: null,\n dispatcherHookName: \"EffectEvent\"\n });\n return callback;\n }\n },\n DispatcherProxyHandler = {\n get: function (target, prop) {\n if (target.hasOwnProperty(prop)) return target[prop];\n target = Error(\"Missing method in Dispatcher: \" + prop);\n target.name = \"ReactDebugToolsUnsupportedHookError\";\n throw target;\n }\n },\n DispatcherProxy =\n \"undefined\" === typeof Proxy\n ? Dispatcher\n : new Proxy(Dispatcher, DispatcherProxyHandler),\n mostLikelyAncestorIndex = 0;\nfunction findSharedIndex(hookStack, rootStack, rootIndex) {\n var source = rootStack[rootIndex].source,\n i = 0;\n a: for (; i < hookStack.length; i++)\n if (hookStack[i].source === source) {\n for (\n var a = rootIndex + 1, b = i + 1;\n a < rootStack.length && b < hookStack.length;\n a++, b++\n )\n if (hookStack[b].source !== rootStack[a].source) continue a;\n return i;\n }\n return -1;\n}\nfunction isReactWrapper(functionName, wrapperName) {\n functionName = parseHookName(functionName);\n return \"HostTransitionStatus\" === wrapperName\n ? functionName === wrapperName || \"FormStatus\" === functionName\n : functionName === wrapperName;\n}\nfunction parseHookName(functionName) {\n if (!functionName) return \"\";\n var startIndex = functionName.lastIndexOf(\"[as \");\n if (-1 !== startIndex)\n return parseHookName(functionName.slice(startIndex + 4, -1));\n startIndex = functionName.lastIndexOf(\".\");\n startIndex = -1 === startIndex ? 0 : startIndex + 1;\n functionName.slice(startIndex).startsWith(\"unstable_\") && (startIndex += 9);\n functionName.slice(startIndex).startsWith(\"experimental_\") &&\n (startIndex += 13);\n if (\"use\" === functionName.slice(startIndex, startIndex + 3)) {\n if (3 === functionName.length - startIndex) return \"Use\";\n startIndex += 3;\n }\n return functionName.slice(startIndex);\n}\nfunction buildTree(rootStack$jscomp$0, readHookLog) {\n for (\n var rootChildren = [],\n prevStack = null,\n levelChildren = rootChildren,\n nativeHookID = 0,\n stackOfChildren = [],\n i = 0;\n i < readHookLog.length;\n i++\n ) {\n var hook = readHookLog[i];\n var rootStack = rootStack$jscomp$0;\n var JSCompiler_inline_result = ErrorStackParser.parse(hook.stackError);\n b: {\n var hookStack = JSCompiler_inline_result,\n rootIndex = findSharedIndex(\n hookStack,\n rootStack,\n mostLikelyAncestorIndex\n );\n if (-1 !== rootIndex) rootStack = rootIndex;\n else {\n for (\n var i$jscomp$0 = 0;\n i$jscomp$0 < rootStack.length && 5 > i$jscomp$0;\n i$jscomp$0++\n )\n if (\n ((rootIndex = findSharedIndex(hookStack, rootStack, i$jscomp$0)),\n -1 !== rootIndex)\n ) {\n mostLikelyAncestorIndex = i$jscomp$0;\n rootStack = rootIndex;\n break b;\n }\n rootStack = -1;\n }\n }\n b: {\n hookStack = JSCompiler_inline_result;\n rootIndex = getPrimitiveStackCache().get(hook.primitive);\n if (void 0 !== rootIndex)\n for (\n i$jscomp$0 = 0;\n i$jscomp$0 < rootIndex.length && i$jscomp$0 < hookStack.length;\n i$jscomp$0++\n )\n if (rootIndex[i$jscomp$0].source !== hookStack[i$jscomp$0].source) {\n i$jscomp$0 < hookStack.length - 1 &&\n isReactWrapper(\n hookStack[i$jscomp$0].functionName,\n hook.dispatcherHookName\n ) &&\n i$jscomp$0++;\n i$jscomp$0 < hookStack.length - 1 &&\n isReactWrapper(\n hookStack[i$jscomp$0].functionName,\n hook.dispatcherHookName\n ) &&\n i$jscomp$0++;\n hookStack = i$jscomp$0;\n break b;\n }\n hookStack = -1;\n }\n JSCompiler_inline_result =\n -1 === rootStack || -1 === hookStack || 2 > rootStack - hookStack\n ? -1 === hookStack\n ? [null, null]\n : [JSCompiler_inline_result[hookStack - 1], null]\n : [\n JSCompiler_inline_result[hookStack - 1],\n JSCompiler_inline_result.slice(hookStack, rootStack - 1)\n ];\n hookStack = JSCompiler_inline_result[0];\n JSCompiler_inline_result = JSCompiler_inline_result[1];\n rootStack = hook.displayName;\n null === rootStack &&\n null !== hookStack &&\n (rootStack =\n parseHookName(hookStack.functionName) ||\n parseHookName(hook.dispatcherHookName));\n if (null !== JSCompiler_inline_result) {\n hookStack = 0;\n if (null !== prevStack) {\n for (\n ;\n hookStack < JSCompiler_inline_result.length &&\n hookStack < prevStack.length &&\n JSCompiler_inline_result[\n JSCompiler_inline_result.length - hookStack - 1\n ].source === prevStack[prevStack.length - hookStack - 1].source;\n\n )\n hookStack++;\n for (\n prevStack = prevStack.length - 1;\n prevStack > hookStack;\n prevStack--\n )\n levelChildren = stackOfChildren.pop();\n }\n for (\n prevStack = JSCompiler_inline_result.length - hookStack - 1;\n 1 <= prevStack;\n prevStack--\n )\n (hookStack = []),\n (rootIndex = JSCompiler_inline_result[prevStack]),\n (rootIndex = {\n id: null,\n isStateEditable: !1,\n name: parseHookName(\n JSCompiler_inline_result[prevStack - 1].functionName\n ),\n value: void 0,\n subHooks: hookStack,\n debugInfo: null,\n hookSource: {\n lineNumber:\n void 0 === rootIndex.lineNumber ? null : rootIndex.lineNumber,\n columnNumber:\n void 0 === rootIndex.columnNumber\n ? null\n : rootIndex.columnNumber,\n functionName:\n void 0 === rootIndex.functionName\n ? null\n : rootIndex.functionName,\n fileName:\n void 0 === rootIndex.fileName ? null : rootIndex.fileName\n }\n }),\n levelChildren.push(rootIndex),\n stackOfChildren.push(levelChildren),\n (levelChildren = hookStack);\n prevStack = JSCompiler_inline_result;\n }\n hookStack = hook.primitive;\n rootIndex = hook.debugInfo;\n hook = {\n id:\n \"Context\" === hookStack ||\n \"Context (use)\" === hookStack ||\n \"DebugValue\" === hookStack ||\n \"Promise\" === hookStack ||\n \"Unresolved\" === hookStack ||\n \"HostTransitionStatus\" === hookStack\n ? null\n : nativeHookID++,\n isStateEditable: \"Reducer\" === hookStack || \"State\" === hookStack,\n name: rootStack || hookStack,\n value: hook.value,\n subHooks: [],\n debugInfo: rootIndex,\n hookSource: null\n };\n rootStack = {\n lineNumber: null,\n functionName: null,\n fileName: null,\n columnNumber: null\n };\n JSCompiler_inline_result &&\n 1 <= JSCompiler_inline_result.length &&\n ((JSCompiler_inline_result = JSCompiler_inline_result[0]),\n (rootStack.lineNumber =\n void 0 === JSCompiler_inline_result.lineNumber\n ? null\n : JSCompiler_inline_result.lineNumber),\n (rootStack.functionName =\n void 0 === JSCompiler_inline_result.functionName\n ? null\n : JSCompiler_inline_result.functionName),\n (rootStack.fileName =\n void 0 === JSCompiler_inline_result.fileName\n ? null\n : JSCompiler_inline_result.fileName),\n (rootStack.columnNumber =\n void 0 === JSCompiler_inline_result.columnNumber\n ? null\n : JSCompiler_inline_result.columnNumber));\n hook.hookSource = rootStack;\n levelChildren.push(hook);\n }\n processDebugValues(rootChildren, null);\n return rootChildren;\n}\nfunction processDebugValues(hooksTree, parentHooksNode) {\n for (var debugValueHooksNodes = [], i = 0; i < hooksTree.length; i++) {\n var hooksNode = hooksTree[i];\n \"DebugValue\" === hooksNode.name && 0 === hooksNode.subHooks.length\n ? (hooksTree.splice(i, 1), i--, debugValueHooksNodes.push(hooksNode))\n : processDebugValues(hooksNode.subHooks, hooksNode);\n }\n null !== parentHooksNode &&\n (1 === debugValueHooksNodes.length\n ? (parentHooksNode.value = debugValueHooksNodes[0].value)\n : 1 < debugValueHooksNodes.length &&\n (parentHooksNode.value = debugValueHooksNodes.map(function (_ref) {\n return _ref.value;\n })));\n}\nfunction handleRenderFunctionError(error) {\n if (error !== SuspenseException) {\n if (\n error instanceof Error &&\n \"ReactDebugToolsUnsupportedHookError\" === error.name\n )\n throw error;\n var wrapperError = Error(\"Error rendering inspected component\", {\n cause: error\n });\n wrapperError.name = \"ReactDebugToolsRenderError\";\n wrapperError.cause = error;\n throw wrapperError;\n }\n}\nfunction inspectHooks(renderFunction, props, currentDispatcher) {\n null == currentDispatcher && (currentDispatcher = ReactSharedInternals);\n var previousDispatcher = currentDispatcher.H;\n currentDispatcher.H = DispatcherProxy;\n try {\n var ancestorStackError = Error();\n renderFunction(props);\n } catch (error) {\n handleRenderFunctionError(error);\n } finally {\n (renderFunction = hookLog),\n (hookLog = []),\n (currentDispatcher.H = previousDispatcher);\n }\n currentDispatcher =\n void 0 === ancestorStackError\n ? []\n : ErrorStackParser.parse(ancestorStackError);\n return buildTree(currentDispatcher, renderFunction);\n}\nfunction restoreContexts(contextMap) {\n contextMap.forEach(function (value, context) {\n return (context._currentValue = value);\n });\n}\nexports.inspectHooks = inspectHooks;\nexports.inspectHooksOfFiber = function (fiber, currentDispatcher) {\n null == currentDispatcher && (currentDispatcher = ReactSharedInternals);\n if (0 !== fiber.tag && 15 !== fiber.tag && 11 !== fiber.tag)\n throw Error(\n \"Unknown Fiber. Needs to be a function component to inspect hooks.\"\n );\n getPrimitiveStackCache();\n currentHook = fiber.memoizedState;\n currentFiber = fiber;\n var thenableState =\n fiber.dependencies && fiber.dependencies._debugThenableState;\n thenableState = thenableState\n ? thenableState.thenables || thenableState\n : null;\n currentThenableState = Array.isArray(thenableState) ? thenableState : null;\n currentThenableIndex = 0;\n if (hasOwnProperty.call(currentFiber, \"dependencies\"))\n (thenableState = currentFiber.dependencies),\n (currentContextDependency =\n null !== thenableState ? thenableState.firstContext : null);\n else if (hasOwnProperty.call(currentFiber, \"dependencies_old\"))\n (thenableState = currentFiber.dependencies_old),\n (currentContextDependency =\n null !== thenableState ? thenableState.firstContext : null);\n else if (hasOwnProperty.call(currentFiber, \"dependencies_new\"))\n (thenableState = currentFiber.dependencies_new),\n (currentContextDependency =\n null !== thenableState ? thenableState.firstContext : null);\n else if (hasOwnProperty.call(currentFiber, \"contextDependencies\"))\n (thenableState = currentFiber.contextDependencies),\n (currentContextDependency =\n null !== thenableState ? thenableState.first : null);\n else\n throw Error(\n \"Unsupported React version. This is a bug in React Debug Tools.\"\n );\n thenableState = fiber.type;\n var props = fiber.memoizedProps;\n if (\n thenableState !== fiber.elementType &&\n thenableState &&\n thenableState.defaultProps\n ) {\n props = assign({}, props);\n var defaultProps = thenableState.defaultProps;\n for (propName in defaultProps)\n void 0 === props[propName] && (props[propName] = defaultProps[propName]);\n }\n var propName = new Map();\n try {\n if (\n null !== currentContextDependency &&\n !hasOwnProperty.call(currentContextDependency, \"memoizedValue\")\n )\n for (defaultProps = fiber; defaultProps; ) {\n if (10 === defaultProps.tag) {\n var context = defaultProps.type;\n void 0 !== context._context && (context = context._context);\n propName.has(context) ||\n (propName.set(context, context._currentValue),\n (context._currentValue = defaultProps.memoizedProps.value));\n }\n defaultProps = defaultProps.return;\n }\n if (11 === fiber.tag) {\n var renderFunction = thenableState.render;\n context = props;\n var ref = fiber.ref;\n fiber = currentDispatcher;\n var previousDispatcher = fiber.H;\n fiber.H = DispatcherProxy;\n try {\n var ancestorStackError = Error();\n renderFunction(context, ref);\n } catch (error) {\n handleRenderFunctionError(error);\n } finally {\n var readHookLog = hookLog;\n hookLog = [];\n fiber.H = previousDispatcher;\n }\n var rootStack =\n void 0 === ancestorStackError\n ? []\n : ErrorStackParser.parse(ancestorStackError);\n return buildTree(rootStack, readHookLog);\n }\n return inspectHooks(thenableState, props, currentDispatcher);\n } finally {\n (currentThenableState =\n currentContextDependency =\n currentHook =\n currentFiber =\n null),\n (currentThenableIndex = 0),\n restoreContexts(propName);\n }\n};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-debug-tools.production.js');\n} else {\n module.exports = require('./cjs/react-debug-tools.development.js');\n}\n","/**\n * @license React\n * react.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n REACT_POSTPONE_TYPE = Symbol.for(\"react.postpone\"),\n REACT_VIEW_TRANSITION_TYPE = Symbol.for(\"react.view_transition\"),\n MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nfunction getIteratorFn(maybeIterable) {\n if (null === maybeIterable || \"object\" !== typeof maybeIterable) return null;\n maybeIterable =\n (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n maybeIterable[\"@@iterator\"];\n return \"function\" === typeof maybeIterable ? maybeIterable : null;\n}\nvar ReactNoopUpdateQueue = {\n isMounted: function () {\n return !1;\n },\n enqueueForceUpdate: function () {},\n enqueueReplaceState: function () {},\n enqueueSetState: function () {}\n },\n assign = Object.assign,\n emptyObject = {};\nfunction Component(props, context, updater) {\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n}\nComponent.prototype.isReactComponent = {};\nComponent.prototype.setState = function (partialState, callback) {\n if (\n \"object\" !== typeof partialState &&\n \"function\" !== typeof partialState &&\n null != partialState\n )\n throw Error(\n \"takes an object of state variables to update or a function which returns an object of state variables.\"\n );\n this.updater.enqueueSetState(this, partialState, callback, \"setState\");\n};\nComponent.prototype.forceUpdate = function (callback) {\n this.updater.enqueueForceUpdate(this, callback, \"forceUpdate\");\n};\nfunction ComponentDummy() {}\nComponentDummy.prototype = Component.prototype;\nfunction PureComponent(props, context, updater) {\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n}\nvar pureComponentPrototype = (PureComponent.prototype = new ComponentDummy());\npureComponentPrototype.constructor = PureComponent;\nassign(pureComponentPrototype, Component.prototype);\npureComponentPrototype.isPureReactComponent = !0;\nvar isArrayImpl = Array.isArray;\nfunction noop() {}\nvar ReactSharedInternals = { H: null, A: null, T: null, S: null, G: null },\n hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction ReactElement(type, key, props) {\n var refProp = props.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== refProp ? refProp : null,\n props: props\n };\n}\nfunction cloneAndReplaceKey(oldElement, newKey) {\n return ReactElement(oldElement.type, newKey, oldElement.props);\n}\nfunction isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n}\nfunction escape(key) {\n var escaperLookup = { \"=\": \"=0\", \":\": \"=2\" };\n return (\n \"$\" +\n key.replace(/[=:]/g, function (match) {\n return escaperLookup[match];\n })\n );\n}\nvar userProvidedKeyEscapeRegex = /\\/+/g;\nfunction getElementKey(element, index) {\n return \"object\" === typeof element && null !== element && null != element.key\n ? escape(\"\" + element.key)\n : index.toString(36);\n}\nfunction resolveThenable(thenable) {\n switch (thenable.status) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw thenable.reason;\n default:\n switch (\n (\"string\" === typeof thenable.status\n ? thenable.then(noop, noop)\n : ((thenable.status = \"pending\"),\n thenable.then(\n function (fulfilledValue) {\n \"pending\" === thenable.status &&\n ((thenable.status = \"fulfilled\"),\n (thenable.value = fulfilledValue));\n },\n function (error) {\n \"pending\" === thenable.status &&\n ((thenable.status = \"rejected\"), (thenable.reason = error));\n }\n )),\n thenable.status)\n ) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw thenable.reason;\n }\n }\n throw thenable;\n}\nfunction mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n var type = typeof children;\n if (\"undefined\" === type || \"boolean\" === type) children = null;\n var invokeCallback = !1;\n if (null === children) invokeCallback = !0;\n else\n switch (type) {\n case \"bigint\":\n case \"string\":\n case \"number\":\n invokeCallback = !0;\n break;\n case \"object\":\n switch (children.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n invokeCallback = !0;\n break;\n case REACT_LAZY_TYPE:\n return (\n (invokeCallback = children._init),\n mapIntoArray(\n invokeCallback(children._payload),\n array,\n escapedPrefix,\n nameSoFar,\n callback\n )\n );\n }\n }\n if (invokeCallback)\n return (\n (callback = callback(children)),\n (invokeCallback =\n \"\" === nameSoFar ? \".\" + getElementKey(children, 0) : nameSoFar),\n isArrayImpl(callback)\n ? ((escapedPrefix = \"\"),\n null != invokeCallback &&\n (escapedPrefix =\n invokeCallback.replace(userProvidedKeyEscapeRegex, \"$&/\") + \"/\"),\n mapIntoArray(callback, array, escapedPrefix, \"\", function (c) {\n return c;\n }))\n : null != callback &&\n (isValidElement(callback) &&\n (callback = cloneAndReplaceKey(\n callback,\n escapedPrefix +\n (null == callback.key ||\n (children && children.key === callback.key)\n ? \"\"\n : (\"\" + callback.key).replace(\n userProvidedKeyEscapeRegex,\n \"$&/\"\n ) + \"/\") +\n invokeCallback\n )),\n array.push(callback)),\n 1\n );\n invokeCallback = 0;\n var nextNamePrefix = \"\" === nameSoFar ? \".\" : nameSoFar + \":\";\n if (isArrayImpl(children))\n for (var i = 0; i < children.length; i++)\n (nameSoFar = children[i]),\n (type = nextNamePrefix + getElementKey(nameSoFar, i)),\n (invokeCallback += mapIntoArray(\n nameSoFar,\n array,\n escapedPrefix,\n type,\n callback\n ));\n else if (((i = getIteratorFn(children)), \"function\" === typeof i))\n for (\n children = i.call(children), i = 0;\n !(nameSoFar = children.next()).done;\n\n )\n (nameSoFar = nameSoFar.value),\n (type = nextNamePrefix + getElementKey(nameSoFar, i++)),\n (invokeCallback += mapIntoArray(\n nameSoFar,\n array,\n escapedPrefix,\n type,\n callback\n ));\n else if (\"object\" === type) {\n if (\"function\" === typeof children.then)\n return mapIntoArray(\n resolveThenable(children),\n array,\n escapedPrefix,\n nameSoFar,\n callback\n );\n array = String(children);\n throw Error(\n \"Objects are not valid as a React child (found: \" +\n (\"[object Object]\" === array\n ? \"object with keys {\" + Object.keys(children).join(\", \") + \"}\"\n : array) +\n \"). If you meant to render a collection of children, use an array instead.\"\n );\n }\n return invokeCallback;\n}\nfunction mapChildren(children, func, context) {\n if (null == children) return children;\n var result = [],\n count = 0;\n mapIntoArray(children, result, \"\", \"\", function (child) {\n return func.call(context, child, count++);\n });\n return result;\n}\nfunction lazyInitializer(payload) {\n if (-1 === payload._status) {\n var ctor = payload._result;\n ctor = ctor();\n ctor.then(\n function (moduleObject) {\n if (0 === payload._status || -1 === payload._status)\n (payload._status = 1), (payload._result = moduleObject);\n },\n function (error) {\n if (0 === payload._status || -1 === payload._status)\n (payload._status = 2), (payload._result = error);\n }\n );\n -1 === payload._status && ((payload._status = 0), (payload._result = ctor));\n }\n if (1 === payload._status) return payload._result.default;\n throw payload._result;\n}\nfunction useOptimistic(passthrough, reducer) {\n return ReactSharedInternals.H.useOptimistic(passthrough, reducer);\n}\nvar reportGlobalError =\n \"function\" === typeof reportError\n ? reportError\n : function (error) {\n if (\n \"object\" === typeof window &&\n \"function\" === typeof window.ErrorEvent\n ) {\n var event = new window.ErrorEvent(\"error\", {\n bubbles: !0,\n cancelable: !0,\n message:\n \"object\" === typeof error &&\n null !== error &&\n \"string\" === typeof error.message\n ? String(error.message)\n : String(error),\n error: error\n });\n if (!window.dispatchEvent(event)) return;\n } else if (\n \"object\" === typeof process &&\n \"function\" === typeof process.emit\n ) {\n process.emit(\"uncaughtException\", error);\n return;\n }\n console.error(error);\n };\nfunction startTransition(scope) {\n var prevTransition = ReactSharedInternals.T,\n currentTransition = {};\n currentTransition.types =\n null !== prevTransition ? prevTransition.types : null;\n currentTransition.gesture = null;\n ReactSharedInternals.T = currentTransition;\n try {\n var returnValue = scope(),\n onStartTransitionFinish = ReactSharedInternals.S;\n null !== onStartTransitionFinish &&\n onStartTransitionFinish(currentTransition, returnValue);\n \"object\" === typeof returnValue &&\n null !== returnValue &&\n \"function\" === typeof returnValue.then &&\n returnValue.then(noop, reportGlobalError);\n } catch (error) {\n reportGlobalError(error);\n } finally {\n null !== prevTransition &&\n null !== currentTransition.types &&\n (prevTransition.types = currentTransition.types),\n (ReactSharedInternals.T = prevTransition);\n }\n}\nfunction addTransitionType(type) {\n var transition = ReactSharedInternals.T;\n if (null !== transition) {\n var transitionTypes = transition.types;\n null === transitionTypes\n ? (transition.types = [type])\n : -1 === transitionTypes.indexOf(type) && transitionTypes.push(type);\n } else startTransition(addTransitionType.bind(null, type));\n}\nvar Children = {\n map: mapChildren,\n forEach: function (children, forEachFunc, forEachContext) {\n mapChildren(\n children,\n function () {\n forEachFunc.apply(this, arguments);\n },\n forEachContext\n );\n },\n count: function (children) {\n var n = 0;\n mapChildren(children, function () {\n n++;\n });\n return n;\n },\n toArray: function (children) {\n return (\n mapChildren(children, function (child) {\n return child;\n }) || []\n );\n },\n only: function (children) {\n if (!isValidElement(children))\n throw Error(\n \"React.Children.only expected to receive a single React element child.\"\n );\n return children;\n }\n};\nexports.Activity = REACT_ACTIVITY_TYPE;\nexports.Children = Children;\nexports.Component = Component;\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.Profiler = REACT_PROFILER_TYPE;\nexports.PureComponent = PureComponent;\nexports.StrictMode = REACT_STRICT_MODE_TYPE;\nexports.Suspense = REACT_SUSPENSE_TYPE;\nexports.ViewTransition = REACT_VIEW_TRANSITION_TYPE;\nexports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\n ReactSharedInternals;\nexports.__COMPILER_RUNTIME = {\n __proto__: null,\n c: function (size) {\n return ReactSharedInternals.H.useMemoCache(size);\n }\n};\nexports.addTransitionType = addTransitionType;\nexports.cache = function (fn) {\n return function () {\n return fn.apply(null, arguments);\n };\n};\nexports.cacheSignal = function () {\n return null;\n};\nexports.cloneElement = function (element, config, children) {\n if (null === element || void 0 === element)\n throw Error(\n \"The argument must be a React element, but you passed \" + element + \".\"\n );\n var props = assign({}, element.props),\n key = element.key;\n if (null != config)\n for (propName in (void 0 !== config.key && (key = \"\" + config.key), config))\n !hasOwnProperty.call(config, propName) ||\n \"key\" === propName ||\n \"__self\" === propName ||\n \"__source\" === propName ||\n (\"ref\" === propName && void 0 === config.ref) ||\n (props[propName] = config[propName]);\n var propName = arguments.length - 2;\n if (1 === propName) props.children = children;\n else if (1 < propName) {\n for (var childArray = Array(propName), i = 0; i < propName; i++)\n childArray[i] = arguments[i + 2];\n props.children = childArray;\n }\n return ReactElement(element.type, key, props);\n};\nexports.createContext = function (defaultValue) {\n defaultValue = {\n $$typeof: REACT_CONTEXT_TYPE,\n _currentValue: defaultValue,\n _currentValue2: defaultValue,\n _threadCount: 0,\n Provider: null,\n Consumer: null\n };\n defaultValue.Provider = defaultValue;\n defaultValue.Consumer = {\n $$typeof: REACT_CONSUMER_TYPE,\n _context: defaultValue\n };\n return defaultValue;\n};\nexports.createElement = function (type, config, children) {\n var propName,\n props = {},\n key = null;\n if (null != config)\n for (propName in (void 0 !== config.key && (key = \"\" + config.key), config))\n hasOwnProperty.call(config, propName) &&\n \"key\" !== propName &&\n \"__self\" !== propName &&\n \"__source\" !== propName &&\n (props[propName] = config[propName]);\n var childrenLength = arguments.length - 2;\n if (1 === childrenLength) props.children = children;\n else if (1 < childrenLength) {\n for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++)\n childArray[i] = arguments[i + 2];\n props.children = childArray;\n }\n if (type && type.defaultProps)\n for (propName in ((childrenLength = type.defaultProps), childrenLength))\n void 0 === props[propName] &&\n (props[propName] = childrenLength[propName]);\n return ReactElement(type, key, props);\n};\nexports.createRef = function () {\n return { current: null };\n};\nexports.experimental_useOptimistic = function (passthrough, reducer) {\n return useOptimistic(passthrough, reducer);\n};\nexports.forwardRef = function (render) {\n return { $$typeof: REACT_FORWARD_REF_TYPE, render: render };\n};\nexports.isValidElement = isValidElement;\nexports.lazy = function (ctor) {\n return {\n $$typeof: REACT_LAZY_TYPE,\n _payload: { _status: -1, _result: ctor },\n _init: lazyInitializer\n };\n};\nexports.memo = function (type, compare) {\n return {\n $$typeof: REACT_MEMO_TYPE,\n type: type,\n compare: void 0 === compare ? null : compare\n };\n};\nexports.startTransition = startTransition;\nexports.unstable_Activity = REACT_ACTIVITY_TYPE;\nexports.unstable_SuspenseList = REACT_SUSPENSE_LIST_TYPE;\nexports.unstable_getCacheForType = function (resourceType) {\n var dispatcher = ReactSharedInternals.A;\n return dispatcher ? dispatcher.getCacheForType(resourceType) : resourceType();\n};\nexports.unstable_postpone = function (reason) {\n reason = Error(reason);\n reason.$$typeof = REACT_POSTPONE_TYPE;\n throw reason;\n};\nexports.unstable_startGestureTransition = function (provider, scope, options) {\n if (null == provider)\n throw Error(\n \"A Timeline is required as the first argument to startGestureTransition.\"\n );\n var prevTransition = ReactSharedInternals.T,\n currentTransition = { types: null };\n currentTransition.gesture = provider;\n ReactSharedInternals.T = currentTransition;\n try {\n scope();\n var onStartGestureTransitionFinish = ReactSharedInternals.G;\n if (null !== onStartGestureTransitionFinish)\n return onStartGestureTransitionFinish(\n currentTransition,\n provider,\n options\n );\n } catch (error) {\n reportGlobalError(error);\n } finally {\n ReactSharedInternals.T = prevTransition;\n }\n return noop;\n};\nexports.unstable_useCacheRefresh = function () {\n return ReactSharedInternals.H.useCacheRefresh();\n};\nexports.use = function (usable) {\n return ReactSharedInternals.H.use(usable);\n};\nexports.useActionState = function (action, initialState, permalink) {\n return ReactSharedInternals.H.useActionState(action, initialState, permalink);\n};\nexports.useCallback = function (callback, deps) {\n return ReactSharedInternals.H.useCallback(callback, deps);\n};\nexports.useContext = function (Context) {\n return ReactSharedInternals.H.useContext(Context);\n};\nexports.useDebugValue = function () {};\nexports.useDeferredValue = function (value, initialValue) {\n return ReactSharedInternals.H.useDeferredValue(value, initialValue);\n};\nexports.useEffect = function (create, deps) {\n return ReactSharedInternals.H.useEffect(create, deps);\n};\nexports.useEffectEvent = function (callback) {\n return ReactSharedInternals.H.useEffectEvent(callback);\n};\nexports.useId = function () {\n return ReactSharedInternals.H.useId();\n};\nexports.useImperativeHandle = function (ref, create, deps) {\n return ReactSharedInternals.H.useImperativeHandle(ref, create, deps);\n};\nexports.useInsertionEffect = function (create, deps) {\n return ReactSharedInternals.H.useInsertionEffect(create, deps);\n};\nexports.useLayoutEffect = function (create, deps) {\n return ReactSharedInternals.H.useLayoutEffect(create, deps);\n};\nexports.useMemo = function (create, deps) {\n return ReactSharedInternals.H.useMemo(create, deps);\n};\nexports.useOptimistic = useOptimistic;\nexports.useReducer = function (reducer, initialArg, init) {\n return ReactSharedInternals.H.useReducer(reducer, initialArg, init);\n};\nexports.useRef = function (initialValue) {\n return ReactSharedInternals.H.useRef(initialValue);\n};\nexports.useState = function (initialState) {\n return ReactSharedInternals.H.useState(initialState);\n};\nexports.useSyncExternalStore = function (\n subscribe,\n getSnapshot,\n getServerSnapshot\n) {\n return ReactSharedInternals.H.useSyncExternalStore(\n subscribe,\n getSnapshot,\n getServerSnapshot\n );\n};\nexports.useTransition = function () {\n return ReactSharedInternals.H.useTransition();\n};\nexports.version = \"19.3.0-experimental-3cde211b-20251020\";\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(\\),.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', '<anonymous>'].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(/<anonymous function(: (\\w+))?>/, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","'use strict'\n\n// A linked list to keep track of recently-used-ness\nconst Yallist = require('yallist')\n\nconst MAX = Symbol('max')\nconst LENGTH = Symbol('length')\nconst LENGTH_CALCULATOR = Symbol('lengthCalculator')\nconst ALLOW_STALE = Symbol('allowStale')\nconst MAX_AGE = Symbol('maxAge')\nconst DISPOSE = Symbol('dispose')\nconst NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet')\nconst LRU_LIST = Symbol('lruList')\nconst CACHE = Symbol('cache')\nconst UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet')\n\nconst naiveLength = () => 1\n\n// lruList is a yallist where the head is the youngest\n// item, and the tail is the oldest. the list contains the Hit\n// objects as the entries.\n// Each Hit object has a reference to its Yallist.Node. This\n// never changes.\n//\n// cache is a Map (or PseudoMap) that matches the keys to\n// the Yallist.Node object.\nclass LRUCache {\n constructor (options) {\n if (typeof options === 'number')\n options = { max: options }\n\n if (!options)\n options = {}\n\n if (options.max && (typeof options.max !== 'number' || options.max < 0))\n throw new TypeError('max must be a non-negative number')\n // Kind of weird to have a default max of Infinity, but oh well.\n const max = this[MAX] = options.max || Infinity\n\n const lc = options.length || naiveLength\n this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc\n this[ALLOW_STALE] = options.stale || false\n if (options.maxAge && typeof options.maxAge !== 'number')\n throw new TypeError('maxAge must be a number')\n this[MAX_AGE] = options.maxAge || 0\n this[DISPOSE] = options.dispose\n this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false\n this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false\n this.reset()\n }\n\n // resize the cache when the max changes.\n set max (mL) {\n if (typeof mL !== 'number' || mL < 0)\n throw new TypeError('max must be a non-negative number')\n\n this[MAX] = mL || Infinity\n trim(this)\n }\n get max () {\n return this[MAX]\n }\n\n set allowStale (allowStale) {\n this[ALLOW_STALE] = !!allowStale\n }\n get allowStale () {\n return this[ALLOW_STALE]\n }\n\n set maxAge (mA) {\n if (typeof mA !== 'number')\n throw new TypeError('maxAge must be a non-negative number')\n\n this[MAX_AGE] = mA\n trim(this)\n }\n get maxAge () {\n return this[MAX_AGE]\n }\n\n // resize the cache when the lengthCalculator changes.\n set lengthCalculator (lC) {\n if (typeof lC !== 'function')\n lC = naiveLength\n\n if (lC !== this[LENGTH_CALCULATOR]) {\n this[LENGTH_CALCULATOR] = lC\n this[LENGTH] = 0\n this[LRU_LIST].forEach(hit => {\n hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key)\n this[LENGTH] += hit.length\n })\n }\n trim(this)\n }\n get lengthCalculator () { return this[LENGTH_CALCULATOR] }\n\n get length () { return this[LENGTH] }\n get itemCount () { return this[LRU_LIST].length }\n\n rforEach (fn, thisp) {\n thisp = thisp || this\n for (let walker = this[LRU_LIST].tail; walker !== null;) {\n const prev = walker.prev\n forEachStep(this, fn, walker, thisp)\n walker = prev\n }\n }\n\n forEach (fn, thisp) {\n thisp = thisp || this\n for (let walker = this[LRU_LIST].head; walker !== null;) {\n const next = walker.next\n forEachStep(this, fn, walker, thisp)\n walker = next\n }\n }\n\n keys () {\n return this[LRU_LIST].toArray().map(k => k.key)\n }\n\n values () {\n return this[LRU_LIST].toArray().map(k => k.value)\n }\n\n reset () {\n if (this[DISPOSE] &&\n this[LRU_LIST] &&\n this[LRU_LIST].length) {\n this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value))\n }\n\n this[CACHE] = new Map() // hash of items by key\n this[LRU_LIST] = new Yallist() // list of items in order of use recency\n this[LENGTH] = 0 // length of items in the list\n }\n\n dump () {\n return this[LRU_LIST].map(hit =>\n isStale(this, hit) ? false : {\n k: hit.key,\n v: hit.value,\n e: hit.now + (hit.maxAge || 0)\n }).toArray().filter(h => h)\n }\n\n dumpLru () {\n return this[LRU_LIST]\n }\n\n set (key, value, maxAge) {\n maxAge = maxAge || this[MAX_AGE]\n\n if (maxAge && typeof maxAge !== 'number')\n throw new TypeError('maxAge must be a number')\n\n const now = maxAge ? Date.now() : 0\n const len = this[LENGTH_CALCULATOR](value, key)\n\n if (this[CACHE].has(key)) {\n if (len > this[MAX]) {\n del(this, this[CACHE].get(key))\n return false\n }\n\n const node = this[CACHE].get(key)\n const item = node.value\n\n // dispose of the old one before overwriting\n // split out into 2 ifs for better coverage tracking\n if (this[DISPOSE]) {\n if (!this[NO_DISPOSE_ON_SET])\n this[DISPOSE](key, item.value)\n }\n\n item.now = now\n item.maxAge = maxAge\n item.value = value\n this[LENGTH] += len - item.length\n item.length = len\n this.get(key)\n trim(this)\n return true\n }\n\n const hit = new Entry(key, value, len, now, maxAge)\n\n // oversized objects fall out of cache automatically.\n if (hit.length > this[MAX]) {\n if (this[DISPOSE])\n this[DISPOSE](key, value)\n\n return false\n }\n\n this[LENGTH] += hit.length\n this[LRU_LIST].unshift(hit)\n this[CACHE].set(key, this[LRU_LIST].head)\n trim(this)\n return true\n }\n\n has (key) {\n if (!this[CACHE].has(key)) return false\n const hit = this[CACHE].get(key).value\n return !isStale(this, hit)\n }\n\n get (key) {\n return get(this, key, true)\n }\n\n peek (key) {\n return get(this, key, false)\n }\n\n pop () {\n const node = this[LRU_LIST].tail\n if (!node)\n return null\n\n del(this, node)\n return node.value\n }\n\n del (key) {\n del(this, this[CACHE].get(key))\n }\n\n load (arr) {\n // reset the cache\n this.reset()\n\n const now = Date.now()\n // A previous serialized cache has the most recent items first\n for (let l = arr.length - 1; l >= 0; l--) {\n const hit = arr[l]\n const expiresAt = hit.e || 0\n if (expiresAt === 0)\n // the item was created without expiration in a non aged cache\n this.set(hit.k, hit.v)\n else {\n const maxAge = expiresAt - now\n // dont add already expired items\n if (maxAge > 0) {\n this.set(hit.k, hit.v, maxAge)\n }\n }\n }\n }\n\n prune () {\n this[CACHE].forEach((value, key) => get(this, key, false))\n }\n}\n\nconst get = (self, key, doUse) => {\n const node = self[CACHE].get(key)\n if (node) {\n const hit = node.value\n if (isStale(self, hit)) {\n del(self, node)\n if (!self[ALLOW_STALE])\n return undefined\n } else {\n if (doUse) {\n if (self[UPDATE_AGE_ON_GET])\n node.value.now = Date.now()\n self[LRU_LIST].unshiftNode(node)\n }\n }\n return hit.value\n }\n}\n\nconst isStale = (self, hit) => {\n if (!hit || (!hit.maxAge && !self[MAX_AGE]))\n return false\n\n const diff = Date.now() - hit.now\n return hit.maxAge ? diff > hit.maxAge\n : self[MAX_AGE] && (diff > self[MAX_AGE])\n}\n\nconst trim = self => {\n if (self[LENGTH] > self[MAX]) {\n for (let walker = self[LRU_LIST].tail;\n self[LENGTH] > self[MAX] && walker !== null;) {\n // We know that we're about to delete this one, and also\n // what the next least recently used key will be, so just\n // go ahead and set it now.\n const prev = walker.prev\n del(self, walker)\n walker = prev\n }\n }\n}\n\nconst del = (self, node) => {\n if (node) {\n const hit = node.value\n if (self[DISPOSE])\n self[DISPOSE](hit.key, hit.value)\n\n self[LENGTH] -= hit.length\n self[CACHE].delete(hit.key)\n self[LRU_LIST].removeNode(node)\n }\n}\n\nclass Entry {\n constructor (key, value, length, now, maxAge) {\n this.key = key\n this.value = value\n this.length = length\n this.now = now\n this.maxAge = maxAge || 0\n }\n}\n\nconst forEachStep = (self, fn, node, thisp) => {\n let hit = node.value\n if (isStale(self, hit)) {\n del(self, node)\n if (!self[ALLOW_STALE])\n hit = undefined\n }\n if (hit)\n fn.call(thisp, hit.value, hit.key, self)\n}\n\nmodule.exports = LRUCache\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict'\nmodule.exports = function (Yallist) {\n Yallist.prototype[Symbol.iterator] = function* () {\n for (let walker = this.head; walker; walker = walker.next) {\n yield walker.value\n }\n }\n}\n","'use strict'\nmodule.exports = Yallist\n\nYallist.Node = Node\nYallist.create = Yallist\n\nfunction Yallist (list) {\n var self = this\n if (!(self instanceof Yallist)) {\n self = new Yallist()\n }\n\n self.tail = null\n self.head = null\n self.length = 0\n\n if (list && typeof list.forEach === 'function') {\n list.forEach(function (item) {\n self.push(item)\n })\n } else if (arguments.length > 0) {\n for (var i = 0, l = arguments.length; i < l; i++) {\n self.push(arguments[i])\n }\n }\n\n return self\n}\n\nYallist.prototype.removeNode = function (node) {\n if (node.list !== this) {\n throw new Error('removing node which does not belong to this list')\n }\n\n var next = node.next\n var prev = node.prev\n\n if (next) {\n next.prev = prev\n }\n\n if (prev) {\n prev.next = next\n }\n\n if (node === this.head) {\n this.head = next\n }\n if (node === this.tail) {\n this.tail = prev\n }\n\n node.list.length--\n node.next = null\n node.prev = null\n node.list = null\n\n return next\n}\n\nYallist.prototype.unshiftNode = function (node) {\n if (node === this.head) {\n return\n }\n\n if (node.list) {\n node.list.removeNode(node)\n }\n\n var head = this.head\n node.list = this\n node.next = head\n if (head) {\n head.prev = node\n }\n\n this.head = node\n if (!this.tail) {\n this.tail = node\n }\n this.length++\n}\n\nYallist.prototype.pushNode = function (node) {\n if (node === this.tail) {\n return\n }\n\n if (node.list) {\n node.list.removeNode(node)\n }\n\n var tail = this.tail\n node.list = this\n node.prev = tail\n if (tail) {\n tail.next = node\n }\n\n this.tail = node\n if (!this.head) {\n this.head = node\n }\n this.length++\n}\n\nYallist.prototype.push = function () {\n for (var i = 0, l = arguments.length; i < l; i++) {\n push(this, arguments[i])\n }\n return this.length\n}\n\nYallist.prototype.unshift = function () {\n for (var i = 0, l = arguments.length; i < l; i++) {\n unshift(this, arguments[i])\n }\n return this.length\n}\n\nYallist.prototype.pop = function () {\n if (!this.tail) {\n return undefined\n }\n\n var res = this.tail.value\n this.tail = this.tail.prev\n if (this.tail) {\n this.tail.next = null\n } else {\n this.head = null\n }\n this.length--\n return res\n}\n\nYallist.prototype.shift = function () {\n if (!this.head) {\n return undefined\n }\n\n var res = this.head.value\n this.head = this.head.next\n if (this.head) {\n this.head.prev = null\n } else {\n this.tail = null\n }\n this.length--\n return res\n}\n\nYallist.prototype.forEach = function (fn, thisp) {\n thisp = thisp || this\n for (var walker = this.head, i = 0; walker !== null; i++) {\n fn.call(thisp, walker.value, i, this)\n walker = walker.next\n }\n}\n\nYallist.prototype.forEachReverse = function (fn, thisp) {\n thisp = thisp || this\n for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {\n fn.call(thisp, walker.value, i, this)\n walker = walker.prev\n }\n}\n\nYallist.prototype.get = function (n) {\n for (var i = 0, walker = this.head; walker !== null && i < n; i++) {\n // abort out of the list early if we hit a cycle\n walker = walker.next\n }\n if (i === n && walker !== null) {\n return walker.value\n }\n}\n\nYallist.prototype.getReverse = function (n) {\n for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {\n // abort out of the list early if we hit a cycle\n walker = walker.prev\n }\n if (i === n && walker !== null) {\n return walker.value\n }\n}\n\nYallist.prototype.map = function (fn, thisp) {\n thisp = thisp || this\n var res = new Yallist()\n for (var walker = this.head; walker !== null;) {\n res.push(fn.call(thisp, walker.value, this))\n walker = walker.next\n }\n return res\n}\n\nYallist.prototype.mapReverse = function (fn, thisp) {\n thisp = thisp || this\n var res = new Yallist()\n for (var walker = this.tail; walker !== null;) {\n res.push(fn.call(thisp, walker.value, this))\n walker = walker.prev\n }\n return res\n}\n\nYallist.prototype.reduce = function (fn, initial) {\n var acc\n var walker = this.head\n if (arguments.length > 1) {\n acc = initial\n } else if (this.head) {\n walker = this.head.next\n acc = this.head.value\n } else {\n throw new TypeError('Reduce of empty list with no initial value')\n }\n\n for (var i = 0; walker !== null; i++) {\n acc = fn(acc, walker.value, i)\n walker = walker.next\n }\n\n return acc\n}\n\nYallist.prototype.reduceReverse = function (fn, initial) {\n var acc\n var walker = this.tail\n if (arguments.length > 1) {\n acc = initial\n } else if (this.tail) {\n walker = this.tail.prev\n acc = this.tail.value\n } else {\n throw new TypeError('Reduce of empty list with no initial value')\n }\n\n for (var i = this.length - 1; walker !== null; i--) {\n acc = fn(acc, walker.value, i)\n walker = walker.prev\n }\n\n return acc\n}\n\nYallist.prototype.toArray = function () {\n var arr = new Array(this.length)\n for (var i = 0, walker = this.head; walker !== null; i++) {\n arr[i] = walker.value\n walker = walker.next\n }\n return arr\n}\n\nYallist.prototype.toArrayReverse = function () {\n var arr = new Array(this.length)\n for (var i = 0, walker = this.tail; walker !== null; i++) {\n arr[i] = walker.value\n walker = walker.prev\n }\n return arr\n}\n\nYallist.prototype.slice = function (from, to) {\n to = to || this.length\n if (to < 0) {\n to += this.length\n }\n from = from || 0\n if (from < 0) {\n from += this.length\n }\n var ret = new Yallist()\n if (to < from || to < 0) {\n return ret\n }\n if (from < 0) {\n from = 0\n }\n if (to > this.length) {\n to = this.length\n }\n for (var i = 0, walker = this.head; walker !== null && i < from; i++) {\n walker = walker.next\n }\n for (; walker !== null && i < to; i++, walker = walker.next) {\n ret.push(walker.value)\n }\n return ret\n}\n\nYallist.prototype.sliceReverse = function (from, to) {\n to = to || this.length\n if (to < 0) {\n to += this.length\n }\n from = from || 0\n if (from < 0) {\n from += this.length\n }\n var ret = new Yallist()\n if (to < from || to < 0) {\n return ret\n }\n if (from < 0) {\n from = 0\n }\n if (to > this.length) {\n to = this.length\n }\n for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {\n walker = walker.prev\n }\n for (; walker !== null && i > from; i--, walker = walker.prev) {\n ret.push(walker.value)\n }\n return ret\n}\n\nYallist.prototype.splice = function (start, deleteCount /*, ...nodes */) {\n if (start > this.length) {\n start = this.length - 1\n }\n if (start < 0) {\n start = this.length + start;\n }\n\n for (var i = 0, walker = this.head; walker !== null && i < start; i++) {\n walker = walker.next\n }\n\n var ret = []\n for (var i = 0; walker && i < deleteCount; i++) {\n ret.push(walker.value)\n walker = this.removeNode(walker)\n }\n if (walker === null) {\n walker = this.tail\n }\n\n if (walker !== this.head && walker !== this.tail) {\n walker = walker.prev\n }\n\n for (var i = 2; i < arguments.length; i++) {\n walker = insert(this, walker, arguments[i])\n }\n return ret;\n}\n\nYallist.prototype.reverse = function () {\n var head = this.head\n var tail = this.tail\n for (var walker = head; walker !== null; walker = walker.prev) {\n var p = walker.prev\n walker.prev = walker.next\n walker.next = p\n }\n this.head = tail\n this.tail = head\n return this\n}\n\nfunction insert (self, node, value) {\n var inserted = node === self.head ?\n new Node(value, null, node, self) :\n new Node(value, node, node.next, self)\n\n if (inserted.next === null) {\n self.tail = inserted\n }\n if (inserted.prev === null) {\n self.head = inserted\n }\n\n self.length++\n\n return inserted\n}\n\nfunction push (self, item) {\n self.tail = new Node(item, self.tail, null, self)\n if (!self.head) {\n self.head = self.tail\n }\n self.length++\n}\n\nfunction unshift (self, item) {\n self.head = new Node(item, null, self.head, self)\n if (!self.tail) {\n self.tail = self.head\n }\n self.length++\n}\n\nfunction Node (value, prev, next, list) {\n if (!(this instanceof Node)) {\n return new Node(value, prev, next, list)\n }\n\n this.list = list\n this.value = value\n\n if (prev) {\n prev.next = this\n this.prev = prev\n } else {\n this.prev = null\n }\n\n if (next) {\n next.prev = this\n this.next = next\n } else {\n this.next = null\n }\n}\n\ntry {\n // add if support for Symbol.iterator is present\n require('./iterator.js')(Yallist)\n} catch (er) {}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nexport default class EventEmitter<Events: Object> {\n listenersMap: Map<string, Array<Function>> = new Map();\n\n addListener<Event: $Keys<Events>>(\n event: Event,\n listener: (...Events[Event]) => any,\n ): void {\n const listeners = this.listenersMap.get(event);\n if (listeners === undefined) {\n this.listenersMap.set(event, [listener]);\n } else {\n const index = listeners.indexOf(listener);\n if (index < 0) {\n listeners.push(listener);\n }\n }\n }\n\n emit<Event: $Keys<Events>>(event: Event, ...args: Events[Event]): void {\n const listeners = this.listenersMap.get(event);\n if (listeners !== undefined) {\n if (listeners.length === 1) {\n // No need to clone or try/catch\n const listener = listeners[0];\n listener.apply(null, args);\n } else {\n let didThrow = false;\n let caughtError = null;\n\n const clonedListeners = Array.from(listeners);\n for (let i = 0; i < clonedListeners.length; i++) {\n const listener = clonedListeners[i];\n try {\n listener.apply(null, args);\n } catch (error) {\n if (caughtError === null) {\n didThrow = true;\n caughtError = error;\n }\n }\n }\n\n if (didThrow) {\n throw caughtError;\n }\n }\n }\n }\n\n removeAllListeners(): void {\n this.listenersMap.clear();\n }\n\n removeListener(event: $Keys<Events>, listener: Function): void {\n const listeners = this.listenersMap.get(event);\n if (listeners !== undefined) {\n const index = listeners.indexOf(listener);\n if (index >= 0) {\n listeners.splice(index, 1);\n }\n }\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nexport const CHROME_WEBSTORE_EXTENSION_ID = 'fmkadmapgofadopljbjfkapdkoienihi';\nexport const INTERNAL_EXTENSION_ID = 'dnjnjgbfilfphmojnmhliehogmojhclc';\nexport const LOCAL_EXTENSION_ID = 'ikiahnapldjmdmpkmfhjdjilojjhgcbf';\n\n// Flip this flag to true to enable verbose console debug logging.\nexport const __DEBUG__ = false;\n\n// Flip this flag to true to enable performance.mark() and performance.measure() timings.\nexport const __PERFORMANCE_PROFILE__ = false;\n\nexport const TREE_OPERATION_ADD = 1;\nexport const TREE_OPERATION_REMOVE = 2;\nexport const TREE_OPERATION_REORDER_CHILDREN = 3;\nexport const TREE_OPERATION_UPDATE_TREE_BASE_DURATION = 4;\nexport const TREE_OPERATION_UPDATE_ERRORS_OR_WARNINGS = 5;\nexport const TREE_OPERATION_REMOVE_ROOT = 6;\nexport const TREE_OPERATION_SET_SUBTREE_MODE = 7;\nexport const SUSPENSE_TREE_OPERATION_ADD = 8;\nexport const SUSPENSE_TREE_OPERATION_REMOVE = 9;\nexport const SUSPENSE_TREE_OPERATION_REORDER_CHILDREN = 10;\nexport const SUSPENSE_TREE_OPERATION_RESIZE = 11;\nexport const SUSPENSE_TREE_OPERATION_SUSPENDERS = 12;\n\nexport const PROFILING_FLAG_BASIC_SUPPORT /*. */ = 0b001;\nexport const PROFILING_FLAG_TIMELINE_SUPPORT /* */ = 0b010;\nexport const PROFILING_FLAG_PERFORMANCE_TRACKS_SUPPORT /* */ = 0b100;\n\nexport const UNKNOWN_SUSPENDERS_NONE: UnknownSuspendersReason = 0; // If we had at least one debugInfo, then that might have been the reason.\nexport const UNKNOWN_SUSPENDERS_REASON_PRODUCTION: UnknownSuspendersReason = 1; // We're running in prod. That might be why we had unknown suspenders.\nexport const UNKNOWN_SUSPENDERS_REASON_OLD_VERSION: UnknownSuspendersReason = 2; // We're running an old version of React that doesn't have full coverage. That might be the reason.\nexport const UNKNOWN_SUSPENDERS_REASON_THROWN_PROMISE: UnknownSuspendersReason = 3; // If we're in dev, didn't detect and debug info and still suspended (other than CSS/image) the only reason is thrown promise.\n\nexport opaque type UnknownSuspendersReason = 0 | 1 | 2 | 3;\n\nexport const LOCAL_STORAGE_DEFAULT_TAB_KEY = 'React::DevTools::defaultTab';\nexport const LOCAL_STORAGE_COMPONENT_FILTER_PREFERENCES_KEY =\n 'React::DevTools::componentFilters';\nexport const SESSION_STORAGE_LAST_SELECTION_KEY =\n 'React::DevTools::lastSelection';\nexport const LOCAL_STORAGE_OPEN_IN_EDITOR_URL =\n 'React::DevTools::openInEditorUrl';\nexport const LOCAL_STORAGE_OPEN_IN_EDITOR_URL_PRESET =\n 'React::DevTools::openInEditorUrlPreset';\nexport const LOCAL_STORAGE_ALWAYS_OPEN_IN_EDITOR =\n 'React::DevTools::alwaysOpenInEditor';\nexport const LOCAL_STORAGE_PARSE_HOOK_NAMES_KEY =\n 'React::DevTools::parseHookNames';\nexport const SESSION_STORAGE_RECORD_CHANGE_DESCRIPTIONS_KEY =\n 'React::DevTools::recordChangeDescriptions';\nexport const SESSION_STORAGE_RECORD_TIMELINE_KEY =\n 'React::DevTools::recordTimeline';\nexport const SESSION_STORAGE_RELOAD_AND_PROFILE_KEY =\n 'React::DevTools::reloadAndProfile';\nexport const LOCAL_STORAGE_BROWSER_THEME = 'React::DevTools::theme';\nexport const LOCAL_STORAGE_TRACE_UPDATES_ENABLED_KEY =\n 'React::DevTools::traceUpdatesEnabled';\nexport const LOCAL_STORAGE_SUPPORTS_PROFILING_KEY =\n 'React::DevTools::supportsProfiling';\n\nexport const PROFILER_EXPORT_VERSION = 5;\n\nexport const FIREFOX_CONSOLE_DIMMING_COLOR = 'color: rgba(124, 124, 124, 0.75)';\nexport const ANSI_STYLE_DIMMING_TEMPLATE = '\\x1b[2;38;2;124;124;124m%s\\x1b[0m';\nexport const ANSI_STYLE_DIMMING_TEMPLATE_WITH_COMPONENT_STACK =\n '\\x1b[2;38;2;124;124;124m%s %o\\x1b[0m';\n","/**\n * Compare [semver](https://semver.org/) version strings to find greater, equal or lesser.\n * This library supports the full semver specification, including comparing versions with different number of digits like `1.0.0`, `1.0`, `1`, and pre-release versions like `1.0.0-alpha`.\n * @param v1 - First version to compare\n * @param v2 - Second version to compare\n * @returns Numeric value compatible with the [Array.sort(fn) interface](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Parameters).\n */\nexport const compareVersions = (v1, v2) => {\n // validate input and split into segments\n const n1 = validateAndParse(v1);\n const n2 = validateAndParse(v2);\n // pop off the patch\n const p1 = n1.pop();\n const p2 = n2.pop();\n // validate numbers\n const r = compareSegments(n1, n2);\n if (r !== 0)\n return r;\n // validate pre-release\n if (p1 && p2) {\n return compareSegments(p1.split('.'), p2.split('.'));\n }\n else if (p1 || p2) {\n return p1 ? -1 : 1;\n }\n return 0;\n};\n/**\n * Validate [semver](https://semver.org/) version strings.\n *\n * @param version Version number to validate\n * @returns `true` if the version number is a valid semver version number, `false` otherwise.\n *\n * @example\n * ```\n * validate('1.0.0-rc.1'); // return true\n * validate('1.0-rc.1'); // return false\n * validate('foo'); // return false\n * ```\n */\nexport const validate = (version) => typeof version === 'string' && /^[v\\d]/.test(version) && semver.test(version);\n/**\n * Compare [semver](https://semver.org/) version strings using the specified operator.\n *\n * @param v1 First version to compare\n * @param v2 Second version to compare\n * @param operator Allowed arithmetic operator to use\n * @returns `true` if the comparison between the firstVersion and the secondVersion satisfies the operator, `false` otherwise.\n *\n * @example\n * ```\n * compare('10.1.8', '10.0.4', '>'); // return true\n * compare('10.0.1', '10.0.1', '='); // return true\n * compare('10.1.1', '10.2.2', '<'); // return true\n * compare('10.1.1', '10.2.2', '<='); // return true\n * compare('10.1.1', '10.2.2', '>='); // return false\n * ```\n */\nexport const compare = (v1, v2, operator) => {\n // validate input operator\n assertValidOperator(operator);\n // since result of compareVersions can only be -1 or 0 or 1\n // a simple map can be used to replace switch\n const res = compareVersions(v1, v2);\n return operatorResMap[operator].includes(res);\n};\n/**\n * Match [npm semver](https://docs.npmjs.com/cli/v6/using-npm/semver) version range.\n *\n * @param version Version number to match\n * @param range Range pattern for version\n * @returns `true` if the version number is within the range, `false` otherwise.\n *\n * @example\n * ```\n * satisfies('1.1.0', '^1.0.0'); // return true\n * satisfies('1.1.0', '~1.0.0'); // return false\n * ```\n */\nexport const satisfies = (version, range) => {\n // if no range operator then \"=\"\n const m = range.match(/^([<>=~^]+)/);\n const op = m ? m[1] : '=';\n // if gt/lt/eq then operator compare\n if (op !== '^' && op !== '~')\n return compare(version, range, op);\n // else range of either \"~\" or \"^\" is assumed\n const [v1, v2, v3, , vp] = validateAndParse(version);\n const [r1, r2, r3, , rp] = validateAndParse(range);\n const v = [v1, v2, v3];\n const r = [r1, r2 !== null && r2 !== void 0 ? r2 : 'x', r3 !== null && r3 !== void 0 ? r3 : 'x'];\n // validate pre-release\n if (rp) {\n if (!vp)\n return false;\n if (compareSegments(v, r) !== 0)\n return false;\n if (compareSegments(vp.split('.'), rp.split('.')) === -1)\n return false;\n }\n // first non-zero number\n const nonZero = r.findIndex((v) => v !== '0') + 1;\n // pointer to where segments can be >=\n const i = op === '~' ? 2 : nonZero > 1 ? nonZero : 1;\n // before pointer must be equal\n if (compareSegments(v.slice(0, i), r.slice(0, i)) !== 0)\n return false;\n // after pointer must be >=\n if (compareSegments(v.slice(i), r.slice(i)) === -1)\n return false;\n return true;\n};\nconst semver = /^[v^~<>=]*?(\\d+)(?:\\.([x*]|\\d+)(?:\\.([x*]|\\d+)(?:\\.([x*]|\\d+))?(?:-([\\da-z\\-]+(?:\\.[\\da-z\\-]+)*))?(?:\\+[\\da-z\\-]+(?:\\.[\\da-z\\-]+)*)?)?)?$/i;\nconst validateAndParse = (version) => {\n if (typeof version !== 'string') {\n throw new TypeError('Invalid argument expected string');\n }\n const match = version.match(semver);\n if (!match) {\n throw new Error(`Invalid argument not valid semver ('${version}' received)`);\n }\n match.shift();\n return match;\n};\nconst isWildcard = (s) => s === '*' || s === 'x' || s === 'X';\nconst tryParse = (v) => {\n const n = parseInt(v, 10);\n return isNaN(n) ? v : n;\n};\nconst forceType = (a, b) => typeof a !== typeof b ? [String(a), String(b)] : [a, b];\nconst compareStrings = (a, b) => {\n if (isWildcard(a) || isWildcard(b))\n return 0;\n const [ap, bp] = forceType(tryParse(a), tryParse(b));\n if (ap > bp)\n return 1;\n if (ap < bp)\n return -1;\n return 0;\n};\nconst compareSegments = (a, b) => {\n for (let i = 0; i < Math.max(a.length, b.length); i++) {\n const r = compareStrings(a[i] || '0', b[i] || '0');\n if (r !== 0)\n return r;\n }\n return 0;\n};\nconst operatorResMap = {\n '>': [1],\n '>=': [0, 1],\n '=': [0],\n '<=': [-1, 0],\n '<': [-1],\n};\nconst allowedOperators = Object.keys(operatorResMap);\nconst assertValidOperator = (op) => {\n if (typeof op !== 'string') {\n throw new TypeError(`Invalid operator type, expected string but got ${typeof op}`);\n }\n if (allowedOperators.indexOf(op) === -1) {\n throw new Error(`Invalid operator, expected one of ${allowedOperators.join('|')}`);\n }\n};\n//# sourceMappingURL=index.js.map","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n */\n\n// -----------------------------------------------------------------------------\n// Land or remove (zero effort)\n//\n// Flags that can likely be deleted or landed without consequences\n// -----------------------------------------------------------------------------\n\n// None\n\n// -----------------------------------------------------------------------------\n// Killswitch\n//\n// Flags that exist solely to turn off a change in case it causes a regression\n// when it rolls out to prod. We should remove these as soon as possible.\n// -----------------------------------------------------------------------------\n\nexport const enableHydrationLaneScheduling: boolean = true;\n\n// -----------------------------------------------------------------------------\n// Land or remove (moderate effort)\n//\n// Flags that can be probably deleted or landed, but might require extra effort\n// like migrating internal callers or performance testing.\n// -----------------------------------------------------------------------------\n\n// Need to remove didTimeout argument from Scheduler before landing\nexport const disableSchedulerTimeoutInWorkLoop: boolean = false;\n\n// -----------------------------------------------------------------------------\n// Slated for removal in the future (significant effort)\n//\n// These are experiments that didn't work out, and never shipped, but we can't\n// delete from the codebase until we migrate internal callers.\n// -----------------------------------------------------------------------------\n\n// Add a callback property to suspense to notify which promises are currently\n// in the update queue. This allows reporting and tracing of what is causing\n// the user to see a loading state.\n//\n// Also allows hydration callbacks to fire when a dehydrated boundary gets\n// hydrated or deleted.\n//\n// This will eventually be replaced by the Transition Tracing proposal.\nexport const enableSuspenseCallback: boolean = false;\n\n// Experimental Scope support.\nexport const enableScopeAPI: boolean = false;\n\n// Experimental Create Event Handle API.\nexport const enableCreateEventHandleAPI: boolean = false;\n\n// Support legacy Primer support on internal FB www\nexport const enableLegacyFBSupport: boolean = false;\n\n// -----------------------------------------------------------------------------\n// Ongoing experiments\n//\n// These are features that we're either actively exploring or are reasonably\n// likely to include in an upcoming release.\n// -----------------------------------------------------------------------------\n\n// Yield to the browser event loop and not just the scheduler event loop before passive effects.\n// Fix gated tests that fail with this flag enabled before turning it back on.\nexport const enableYieldingBeforePassive: boolean = false;\n\n// Experiment to intentionally yield less to block high framerate animations.\nexport const enableThrottledScheduling: boolean = false;\n\nexport const enableLegacyCache = __EXPERIMENTAL__;\n\nexport const enableAsyncIterableChildren = __EXPERIMENTAL__;\n\nexport const enableTaint = __EXPERIMENTAL__;\n\nexport const enablePostpone = __EXPERIMENTAL__;\n\nexport const enableHalt: boolean = true;\n\nexport const enableViewTransition: boolean = true;\n\nexport const enableGestureTransition = __EXPERIMENTAL__;\n\nexport const enableScrollEndPolyfill = __EXPERIMENTAL__;\n\nexport const enableSuspenseyImages: boolean = false;\n\nexport const enableFizzBlockingRender = __EXPERIMENTAL__; // rel=\"expect\"\n\nexport const enableSrcObject = __EXPERIMENTAL__;\n\nexport const enableHydrationChangeEvent = __EXPERIMENTAL__;\n\nexport const enableDefaultTransitionIndicator = __EXPERIMENTAL__;\n\n/**\n * Switches Fiber creation to a simple object instead of a constructor.\n */\nexport const enableObjectFiber: boolean = false;\n\nexport const enableTransitionTracing: boolean = false;\n\n// FB-only usage. The new API has different semantics.\nexport const enableLegacyHidden: boolean = false;\n\n// Enables unstable_avoidThisFallback feature in Fiber\nexport const enableSuspenseAvoidThisFallback: boolean = false;\n\nexport const enableCPUSuspense = __EXPERIMENTAL__;\n\n// Test this at Meta before enabling.\nexport const enableNoCloningMemoCache: boolean = false;\n\nexport const enableUseEffectEventHook: boolean = true;\n\n// Test in www before enabling in open source.\n// Enables DOM-server to stream its instruction set as data-attributes\n// (handled with an MutationObserver) instead of inline-scripts\nexport const enableFizzExternalRuntime = __EXPERIMENTAL__;\n\nexport const alwaysThrottleRetries: boolean = true;\n\nexport const passChildrenWhenCloningPersistedNodes: boolean = false;\n\nexport const enableEagerAlternateStateNodeCleanup: boolean = true;\n\n/**\n * Enables an expiration time for retry lanes to avoid starvation.\n */\nexport const enableRetryLaneExpiration: boolean = false;\nexport const retryLaneExpirationMs = 5000;\nexport const syncLaneExpirationMs = 250;\nexport const transitionLaneExpirationMs = 5000;\n\n/**\n * Enables a new error detection for infinite render loops from updates caused\n * by setState or similar outside of the component owning the state.\n */\nexport const enableInfiniteRenderLoopDetection: boolean = false;\n\nexport const enableFragmentRefs: boolean = true;\nexport const enableFragmentRefsScrollIntoView: boolean = true;\n\n// -----------------------------------------------------------------------------\n// Ready for next major.\n//\n// Alias __NEXT_MAJOR__ to __EXPERIMENTAL__ for easier skimming.\n// -----------------------------------------------------------------------------\n\n// TODO: Anything that's set to `true` in this section should either be cleaned\n// up (if it's on everywhere, including Meta and RN builds) or moved to a\n// different section of this file.\n\n// const __NEXT_MAJOR__ = __EXPERIMENTAL__;\n\n// Renames the internal symbol for elements since they have changed signature/constructor\nexport const renameElementSymbol: boolean = true;\n\n/**\n * Enables a fix to run insertion effect cleanup on hidden subtrees.\n */\nexport const enableHiddenSubtreeInsertionEffectCleanup: boolean = true;\n\n/**\n * Removes legacy style context defined using static `contextTypes` and consumed with static `childContextTypes`.\n */\nexport const disableLegacyContext: boolean = true;\n/**\n * Removes legacy style context just from function components.\n */\nexport const disableLegacyContextForFunctionComponents: boolean = true;\n\n// Enable the moveBefore() alternative to insertBefore(). This preserves states of moves.\nexport const enableMoveBefore: boolean = false;\n\n// Disabled caching behavior of `react/cache` in client runtimes.\nexport const disableClientCache: boolean = true;\n\n// Warn on any usage of ReactTestRenderer\nexport const enableReactTestRendererWarning: boolean = true;\n\n// Disables legacy mode\n// This allows us to land breaking changes to remove legacy mode APIs in experimental builds\n// before removing them in stable in the next Major\nexport const disableLegacyMode: boolean = true;\n\n// -----------------------------------------------------------------------------\n// Chopping Block\n//\n// Planned feature deprecations and breaking changes. Sorted roughly in order of\n// when we plan to enable them.\n// -----------------------------------------------------------------------------\n\n// -----------------------------------------------------------------------------\n// React DOM Chopping Block\n//\n// Similar to main Chopping Block but only flags related to React DOM. These are\n// grouped because we will likely batch all of them into a single major release.\n// -----------------------------------------------------------------------------\n\n// Disable support for comment nodes as React DOM containers. Already disabled\n// in open source, but www codebase still relies on it. Need to remove.\nexport const disableCommentsAsDOMContainers: boolean = true;\n\nexport const enableTrustedTypesIntegration: boolean = false;\n\n// Prevent the value and checked attributes from syncing with their related\n// DOM properties\nexport const disableInputAttributeSyncing: boolean = false;\n\n// Disables children for <textarea> elements\nexport const disableTextareaChildren: boolean = false;\n\n// -----------------------------------------------------------------------------\n// Debugging and DevTools\n// -----------------------------------------------------------------------------\n\n// Gather advanced timing metrics for Profiler subtrees.\nexport const enableProfilerTimer = __PROFILE__;\n\n// Adds performance.measure() marks using Chrome extensions to allow formatted\n// Component rendering tracks to show up in the Performance tab.\n// This flag will be used for both Server Component and Client Component tracks.\n// All calls should also be gated on enableProfilerTimer.\nexport const enableComponentPerformanceTrack: boolean = true;\n\n// Adds user timing marks for e.g. state updates, suspense, and work loop stuff,\n// for an experimental timeline tool.\nexport const enableSchedulingProfiler: boolean =\n !enableComponentPerformanceTrack && __PROFILE__;\n\n// Record durations for commit and passive effects phases.\nexport const enableProfilerCommitHooks = __PROFILE__;\n\n// Phase param passed to onRender callback differentiates between an \"update\" and a \"cascading-update\".\nexport const enableProfilerNestedUpdatePhase = __PROFILE__;\n\nexport const enableAsyncDebugInfo: boolean = true;\n\n// Track which Fiber(s) schedule render work.\nexport const enableUpdaterTracking = __PROFILE__;\n\nexport const ownerStackLimit = 1e4;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport {renameElementSymbol} from 'shared/ReactFeatureFlags';\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n\n// The Symbol used to tag the ReactElement-like types.\nexport const REACT_LEGACY_ELEMENT_TYPE: symbol = Symbol.for('react.element');\nexport const REACT_ELEMENT_TYPE: symbol = renameElementSymbol\n ? Symbol.for('react.transitional.element')\n : REACT_LEGACY_ELEMENT_TYPE;\nexport const REACT_PORTAL_TYPE: symbol = Symbol.for('react.portal');\nexport const REACT_FRAGMENT_TYPE: symbol = Symbol.for('react.fragment');\nexport const REACT_STRICT_MODE_TYPE: symbol = Symbol.for('react.strict_mode');\nexport const REACT_PROFILER_TYPE: symbol = Symbol.for('react.profiler');\nexport const REACT_CONSUMER_TYPE: symbol = Symbol.for('react.consumer');\nexport const REACT_CONTEXT_TYPE: symbol = Symbol.for('react.context');\nexport const REACT_FORWARD_REF_TYPE: symbol = Symbol.for('react.forward_ref');\nexport const REACT_SUSPENSE_TYPE: symbol = Symbol.for('react.suspense');\nexport const REACT_SUSPENSE_LIST_TYPE: symbol = Symbol.for(\n 'react.suspense_list',\n);\nexport const REACT_MEMO_TYPE: symbol = Symbol.for('react.memo');\nexport const REACT_LAZY_TYPE: symbol = Symbol.for('react.lazy');\nexport const REACT_SCOPE_TYPE: symbol = Symbol.for('react.scope');\nexport const REACT_ACTIVITY_TYPE: symbol = Symbol.for('react.activity');\nexport const REACT_LEGACY_HIDDEN_TYPE: symbol = Symbol.for(\n 'react.legacy_hidden',\n);\nexport const REACT_TRACING_MARKER_TYPE: symbol = Symbol.for(\n 'react.tracing_marker',\n);\n\nexport const REACT_MEMO_CACHE_SENTINEL: symbol = Symbol.for(\n 'react.memo_cache_sentinel',\n);\n\nexport const REACT_POSTPONE_TYPE: symbol = Symbol.for('react.postpone');\n\nexport const REACT_VIEW_TRANSITION_TYPE: symbol = Symbol.for(\n 'react.view_transition',\n);\n\nconst MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nconst FAUX_ITERATOR_SYMBOL = '@@iterator';\n\nexport function getIteratorFn(maybeIterable: ?any): ?() => ?Iterator<any> {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n const maybeIterator =\n (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n maybeIterable[FAUX_ITERATOR_SYMBOL];\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n return null;\n}\n\nexport const ASYNC_ITERATOR = Symbol.asyncIterator;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\n/**\n * WARNING:\n * This file contains types that are designed for React DevTools UI and how it interacts with the backend.\n * They might be used in different versions of DevTools backends.\n * Be mindful of backwards compatibility when making changes.\n */\n\nimport type {\n Dehydrated,\n Unserializable,\n} from 'react-devtools-shared/src/hydration';\nimport type {ReactFunctionLocation, ReactStackTrace} from 'shared/ReactTypes';\nimport type {UnknownSuspendersReason} from '../constants';\n\nexport type BrowserTheme = 'dark' | 'light';\n\nexport type Wall = {\n // `listen` returns the \"unlisten\" function.\n listen: (fn: Function) => Function,\n send: (event: string, payload: any, transferable?: Array<any>) => void,\n};\n\n// WARNING\n// The values below are referenced by ComponentFilters (which are saved via localStorage).\n// Do not change them or it will break previously saved user customizations.\n// If new element types are added, use new numbers rather than re-ordering existing ones.\n//\n// Changing these types is also a backwards breaking change for the standalone shell,\n// since the frontend and backend must share the same values-\n// and the backend is embedded in certain environments (like React Native).\nexport const ElementTypeClass = 1;\nexport const ElementTypeContext = 2;\nexport const ElementTypeFunction = 5;\nexport const ElementTypeForwardRef = 6;\nexport const ElementTypeHostComponent = 7;\nexport const ElementTypeMemo = 8;\nexport const ElementTypeOtherOrUnknown = 9;\nexport const ElementTypeProfiler = 10;\nexport const ElementTypeRoot = 11;\nexport const ElementTypeSuspense = 12;\nexport const ElementTypeSuspenseList = 13;\nexport const ElementTypeTracingMarker = 14;\nexport const ElementTypeVirtual = 15;\nexport const ElementTypeViewTransition = 16;\nexport const ElementTypeActivity = 17;\n\n// Different types of elements displayed in the Elements tree.\n// These types may be used to visually distinguish types,\n// or to enable/disable certain functionality.\nexport type ElementType =\n | 1\n | 2\n | 5\n | 6\n | 7\n | 8\n | 9\n | 10\n | 11\n | 12\n | 13\n | 14\n | 15\n | 16\n | 17;\n\n// WARNING\n// The values below are referenced by ComponentFilters (which are saved via localStorage).\n// Do not change them or it will break previously saved user customizations.\n// If new filter types are added, use new numbers rather than re-ordering existing ones.\nexport const ComponentFilterElementType = 1;\nexport const ComponentFilterDisplayName = 2;\nexport const ComponentFilterLocation = 3;\nexport const ComponentFilterHOC = 4;\nexport const ComponentFilterEnvironmentName = 5;\n\nexport type ComponentFilterType = 1 | 2 | 3 | 4 | 5;\n\n// Hide all elements of types in this Set.\n// We hide host components only by default.\nexport type ElementTypeComponentFilter = {\n isEnabled: boolean,\n type: 1,\n value: ElementType,\n};\n\n// Hide all elements with displayNames or paths matching one or more of the RegExps in this Set.\n// Path filters are only used when elements include debug source location.\nexport type RegExpComponentFilter = {\n isEnabled: boolean,\n isValid: boolean,\n type: 2 | 3,\n value: string,\n};\n\nexport type BooleanComponentFilter = {\n isEnabled: boolean,\n isValid: boolean,\n type: 4,\n};\n\nexport type EnvironmentNameComponentFilter = {\n isEnabled: boolean,\n isValid: boolean,\n type: 5,\n value: string,\n};\n\nexport type ComponentFilter =\n | BooleanComponentFilter\n | ElementTypeComponentFilter\n | RegExpComponentFilter\n | EnvironmentNameComponentFilter;\n\nexport type HookName = string | null;\n// Map of hook source (\"<filename>:<line-number>:<column-number>\") to name.\n// Hook source is used instead of the hook itself because the latter is not stable between element inspections.\n// We use a Map rather than an Array because of nested hooks and traversal ordering.\nexport type HookSourceLocationKey = string;\nexport type HookNames = Map<HookSourceLocationKey, HookName>;\n\nexport type LRUCache<K, V> = {\n del: (key: K) => void,\n get: (key: K) => V,\n has: (key: K) => boolean,\n reset: () => void,\n set: (key: K, value: V) => void,\n};\n\nexport type StyleXPlugin = {\n sources: Array<string>,\n resolvedStyles: Object,\n};\n\nexport type Plugins = {\n stylex: StyleXPlugin | null,\n};\n\nexport const StrictMode = 1;\n\n// Each element on the frontend corresponds to an ElementID (e.g. a Fiber) on the backend.\n// Some of its information (e.g. id, type, displayName) come from the backend.\n// Other bits (e.g. weight and depth) are computed on the frontend for windowing and display purposes.\n// Elements are updated on a push basis– meaning the backend pushes updates to the frontend when needed.\nexport type Element = {\n id: number,\n parentID: number,\n children: Array<number>,\n type: ElementType,\n displayName: string | null,\n key: number | string | null,\n nameProp: null | string,\n\n hocDisplayNames: null | Array<string>,\n\n // Should the elements children be visible in the tree?\n isCollapsed: boolean,\n\n // Owner (if available)\n ownerID: number,\n\n // How many levels deep within the tree is this element?\n // This determines how much indentation (left padding) should be used in the Elements tree.\n depth: number,\n\n // How many nodes (including itself) are below this Element within the tree.\n // This property is used to quickly determine the total number of Elements,\n // and the Element at any given index (for windowing purposes).\n weight: number,\n\n // This element is not in a StrictMode compliant subtree.\n // Only true for React versions supporting StrictMode.\n isStrictModeNonCompliant: boolean,\n\n // If component is compiled with Forget, the backend will send its name as Forget(...)\n // Later, on the frontend side, we will strip HOC names and Forget prefix.\n compiledWithForget: boolean,\n};\n\nexport type Rect = {\n x: number,\n y: number,\n width: number,\n height: number,\n};\n\nexport type SuspenseTimelineStep = {\n id: SuspenseNode['id'], // TODO: Will become a group.\n environment: null | string,\n};\n\nexport type SuspenseNode = {\n id: Element['id'],\n parentID: SuspenseNode['id'] | 0,\n children: Array<SuspenseNode['id']>,\n name: string | null,\n rects: null | Array<Rect>,\n hasUniqueSuspenders: boolean,\n isSuspended: boolean,\n environments: Array<string>,\n};\n\n// Serialized version of ReactIOInfo\nexport type SerializedIOInfo = {\n name: string,\n description: string,\n start: number,\n end: number,\n byteSize: null | number,\n value: null | Promise<mixed>,\n env: null | string,\n owner: null | SerializedElement,\n stack: null | ReactStackTrace,\n};\n\n// Serialized version of ReactAsyncInfo\nexport type SerializedAsyncInfo = {\n awaited: SerializedIOInfo,\n env: null | string,\n owner: null | SerializedElement,\n stack: null | ReactStackTrace,\n};\n\nexport type SerializedElement = {\n displayName: string | null,\n id: number,\n key: number | string | null,\n env: null | string,\n stack: null | ReactStackTrace,\n hocDisplayNames: Array<string> | null,\n compiledWithForget: boolean,\n type: ElementType,\n};\n\nexport type OwnersList = {\n id: number,\n owners: Array<SerializedElement> | null,\n};\n\nexport type InspectedElementResponseType =\n | 'error'\n | 'full-data'\n | 'hydrated-path'\n | 'no-change'\n | 'not-found';\n\nexport type InspectedElementPath = Array<string | number>;\n\nexport type InspectedElement = {\n id: number,\n\n // Does the current renderer support editable hooks and function props?\n canEditHooks: boolean,\n canEditFunctionProps: boolean,\n\n // Does the current renderer support advanced editing interface?\n canEditHooksAndDeletePaths: boolean,\n canEditHooksAndRenamePaths: boolean,\n canEditFunctionPropsDeletePaths: boolean,\n canEditFunctionPropsRenamePaths: boolean,\n\n // Is this Error, and can its value be overridden now?\n isErrored: boolean,\n canToggleError: boolean,\n\n // Is this Suspense, and can its value be overridden now?\n canToggleSuspense: boolean,\n // If this Element is suspended. Currently only set on Suspense boundaries.\n isSuspended: boolean | null,\n\n // Does the component have legacy context attached to it.\n hasLegacyContext: boolean,\n\n // Inspectable properties.\n context: Object | null,\n hooks: Object | null,\n props: Object | null,\n state: Object | null,\n key: number | string | null,\n errors: Array<[string, number]>,\n warnings: Array<[string, number]>,\n\n // Things that suspended this Instances\n suspendedBy: Object,\n // Minimum start time to maximum end time + a potential (not actual) throttle, within the nearest boundary.\n suspendedByRange: null | [number, number],\n unknownSuspenders: UnknownSuspendersReason,\n\n // List of owners\n owners: Array<SerializedElement> | null,\n\n // Environment name that this component executed in or null for the client\n env: string | null,\n\n // Location of component in source code.\n source: ReactFunctionLocation | null,\n\n // The location of the JSX creation.\n stack: ReactStackTrace | null,\n\n type: ElementType,\n\n // Meta information about the root this element belongs to.\n rootType: string | null,\n\n // Meta information about the renderer that created this element.\n rendererPackageName: string | null,\n rendererVersion: string | null,\n\n // UI plugins/visualizations for the inspected element.\n plugins: Plugins,\n\n // React Native only.\n nativeTag: number | null,\n};\n\n// TODO: Add profiling type\n\ntype Data =\n | string\n | Dehydrated\n | Unserializable\n | Array<Dehydrated>\n | Array<Unserializable>\n | {[string]: Data};\n\nexport type DehydratedData = {\n cleaned: Array<Array<string | number>>,\n data: Data,\n unserializable: Array<Array<string | number>>,\n};\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nconst isArray = Array.isArray;\n\nexport default isArray;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport LRU from 'lru-cache';\nimport {\n REACT_CONSUMER_TYPE,\n REACT_CONTEXT_TYPE,\n REACT_FORWARD_REF_TYPE,\n REACT_FRAGMENT_TYPE,\n REACT_LAZY_TYPE,\n REACT_ELEMENT_TYPE,\n REACT_LEGACY_ELEMENT_TYPE,\n REACT_MEMO_TYPE,\n REACT_PORTAL_TYPE,\n REACT_PROFILER_TYPE,\n REACT_STRICT_MODE_TYPE,\n REACT_SUSPENSE_LIST_TYPE,\n REACT_SUSPENSE_TYPE,\n REACT_TRACING_MARKER_TYPE,\n REACT_VIEW_TRANSITION_TYPE,\n} from 'shared/ReactSymbols';\nimport {\n TREE_OPERATION_ADD,\n TREE_OPERATION_REMOVE,\n TREE_OPERATION_REMOVE_ROOT,\n TREE_OPERATION_REORDER_CHILDREN,\n TREE_OPERATION_SET_SUBTREE_MODE,\n TREE_OPERATION_UPDATE_ERRORS_OR_WARNINGS,\n TREE_OPERATION_UPDATE_TREE_BASE_DURATION,\n LOCAL_STORAGE_COMPONENT_FILTER_PREFERENCES_KEY,\n LOCAL_STORAGE_OPEN_IN_EDITOR_URL,\n LOCAL_STORAGE_OPEN_IN_EDITOR_URL_PRESET,\n LOCAL_STORAGE_ALWAYS_OPEN_IN_EDITOR,\n SESSION_STORAGE_RELOAD_AND_PROFILE_KEY,\n SESSION_STORAGE_RECORD_CHANGE_DESCRIPTIONS_KEY,\n SESSION_STORAGE_RECORD_TIMELINE_KEY,\n SUSPENSE_TREE_OPERATION_ADD,\n SUSPENSE_TREE_OPERATION_REMOVE,\n SUSPENSE_TREE_OPERATION_REORDER_CHILDREN,\n SUSPENSE_TREE_OPERATION_RESIZE,\n SUSPENSE_TREE_OPERATION_SUSPENDERS,\n} from './constants';\nimport {\n ComponentFilterElementType,\n ComponentFilterLocation,\n ElementTypeHostComponent,\n} from './frontend/types';\nimport {\n ElementTypeRoot,\n ElementTypeClass,\n ElementTypeForwardRef,\n ElementTypeFunction,\n ElementTypeMemo,\n ElementTypeVirtual,\n} from 'react-devtools-shared/src/frontend/types';\nimport {\n localStorageGetItem,\n localStorageSetItem,\n sessionStorageGetItem,\n sessionStorageRemoveItem,\n sessionStorageSetItem,\n} from 'react-devtools-shared/src/storage';\nimport {meta} from './hydration';\nimport isArray from './isArray';\n\nimport type {\n ComponentFilter,\n ElementType,\n SerializedElement as SerializedElementFrontend,\n LRUCache,\n} from 'react-devtools-shared/src/frontend/types';\nimport type {\n ProfilingSettings,\n SerializedElement as SerializedElementBackend,\n} from 'react-devtools-shared/src/backend/types';\nimport {isSynchronousXHRSupported} from './backend/utils';\n\n// $FlowFixMe[method-unbinding]\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\n\nconst cachedDisplayNames: WeakMap<Function, string> = new WeakMap();\n\n// On large trees, encoding takes significant time.\n// Try to reuse the already encoded strings.\nconst encodedStringCache: LRUCache<string, Array<number>> = new LRU({\n max: 1000,\n});\n\n// Previously, the type of `Context.Provider`.\nconst LEGACY_REACT_PROVIDER_TYPE: symbol = Symbol.for('react.provider');\n\nexport function alphaSortKeys(\n a: string | number | symbol,\n b: string | number | symbol,\n): number {\n if (a.toString() > b.toString()) {\n return 1;\n } else if (b.toString() > a.toString()) {\n return -1;\n } else {\n return 0;\n }\n}\n\nexport function getAllEnumerableKeys(\n obj: Object,\n): Set<string | number | symbol> {\n const keys = new Set<string | number | symbol>();\n let current = obj;\n while (current != null) {\n const currentKeys = [\n ...Object.keys(current),\n ...Object.getOwnPropertySymbols(current),\n ];\n const descriptors = Object.getOwnPropertyDescriptors(current);\n currentKeys.forEach(key => {\n // $FlowFixMe[incompatible-type]: key can be a Symbol https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptor\n if (descriptors[key].enumerable) {\n keys.add(key);\n }\n });\n current = Object.getPrototypeOf(current);\n }\n return keys;\n}\n\n// Mirror https://github.com/facebook/react/blob/7c21bf72ace77094fd1910cc350a548287ef8350/packages/shared/getComponentName.js#L27-L37\nexport function getWrappedDisplayName(\n outerType: mixed,\n innerType: any,\n wrapperName: string,\n fallbackName?: string,\n): string {\n const displayName = (outerType: any)?.displayName;\n return (\n displayName || `${wrapperName}(${getDisplayName(innerType, fallbackName)})`\n );\n}\n\nexport function getDisplayName(\n type: Function,\n fallbackName: string = 'Anonymous',\n): string {\n const nameFromCache = cachedDisplayNames.get(type);\n if (nameFromCache != null) {\n return nameFromCache;\n }\n\n let displayName = fallbackName;\n\n // The displayName property is not guaranteed to be a string.\n // It's only safe to use for our purposes if it's a string.\n // github.com/facebook/react-devtools/issues/803\n if (typeof type.displayName === 'string') {\n displayName = type.displayName;\n } else if (typeof type.name === 'string' && type.name !== '') {\n displayName = type.name;\n }\n\n cachedDisplayNames.set(type, displayName);\n return displayName;\n}\n\nlet uidCounter: number = 0;\n\nexport function getUID(): number {\n return ++uidCounter;\n}\n\nexport function utfDecodeStringWithRanges(\n array: Array<number>,\n left: number,\n right: number,\n): string {\n let string = '';\n for (let i = left; i <= right; i++) {\n string += String.fromCodePoint(array[i]);\n }\n return string;\n}\n\nfunction surrogatePairToCodePoint(\n charCode1: number,\n charCode2: number,\n): number {\n return ((charCode1 & 0x3ff) << 10) + (charCode2 & 0x3ff) + 0x10000;\n}\n\n// Credit for this encoding approach goes to Tim Down:\n// https://stackoverflow.com/questions/4877326/how-can-i-tell-if-a-string-contains-multibyte-characters-in-javascript\nexport function utfEncodeString(string: string): Array<number> {\n const cached = encodedStringCache.get(string);\n if (cached !== undefined) {\n return cached;\n }\n\n const encoded = [];\n let i = 0;\n let charCode;\n while (i < string.length) {\n charCode = string.charCodeAt(i);\n // Handle multibyte unicode characters (like emoji).\n if ((charCode & 0xf800) === 0xd800) {\n encoded.push(surrogatePairToCodePoint(charCode, string.charCodeAt(++i)));\n } else {\n encoded.push(charCode);\n }\n ++i;\n }\n\n encodedStringCache.set(string, encoded);\n\n return encoded;\n}\n\nexport function printOperationsArray(operations: Array<number>) {\n // The first two values are always rendererID and rootID\n const rendererID = operations[0];\n const rootID = operations[1];\n\n const logs = [`operations for renderer:${rendererID} and root:${rootID}`];\n\n let i = 2;\n\n // Reassemble the string table.\n const stringTable: Array<null | string> = [\n null, // ID = 0 corresponds to the null string.\n ];\n const stringTableSize = operations[i++];\n const stringTableEnd = i + stringTableSize;\n while (i < stringTableEnd) {\n const nextLength = operations[i++];\n const nextString = utfDecodeStringWithRanges(\n operations,\n i,\n i + nextLength - 1,\n );\n stringTable.push(nextString);\n i += nextLength;\n }\n\n while (i < operations.length) {\n const operation = operations[i];\n\n switch (operation) {\n case TREE_OPERATION_ADD: {\n const id = ((operations[i + 1]: any): number);\n const type = ((operations[i + 2]: any): ElementType);\n\n i += 3;\n\n if (type === ElementTypeRoot) {\n logs.push(`Add new root node ${id}`);\n\n i++; // isStrictModeCompliant\n i++; // supportsProfiling\n i++; // supportsStrictMode\n i++; // hasOwnerMetadata\n } else {\n const parentID = ((operations[i]: any): number);\n i++;\n\n i++; // ownerID\n\n const displayNameStringID = operations[i];\n const displayName = stringTable[displayNameStringID];\n i++;\n\n i++; // key\n i++; // name\n\n logs.push(\n `Add node ${id} (${displayName || 'null'}) as child of ${parentID}`,\n );\n }\n break;\n }\n case TREE_OPERATION_REMOVE: {\n const removeLength = ((operations[i + 1]: any): number);\n i += 2;\n\n for (let removeIndex = 0; removeIndex < removeLength; removeIndex++) {\n const id = ((operations[i]: any): number);\n i += 1;\n\n logs.push(`Remove node ${id}`);\n }\n break;\n }\n case TREE_OPERATION_REMOVE_ROOT: {\n i += 1;\n\n logs.push(`Remove root ${rootID}`);\n break;\n }\n case TREE_OPERATION_SET_SUBTREE_MODE: {\n const id = operations[i + 1];\n const mode = operations[i + 2];\n\n i += 3;\n\n logs.push(`Mode ${mode} set for subtree with root ${id}`);\n break;\n }\n case TREE_OPERATION_REORDER_CHILDREN: {\n const id = ((operations[i + 1]: any): number);\n const numChildren = ((operations[i + 2]: any): number);\n i += 3;\n const children = operations.slice(i, i + numChildren);\n i += numChildren;\n\n logs.push(`Re-order node ${id} children ${children.join(',')}`);\n break;\n }\n case TREE_OPERATION_UPDATE_TREE_BASE_DURATION:\n // Base duration updates are only sent while profiling is in progress.\n // We can ignore them at this point.\n // The profiler UI uses them lazily in order to generate the tree.\n i += 3;\n break;\n case TREE_OPERATION_UPDATE_ERRORS_OR_WARNINGS: {\n const id = operations[i + 1];\n const numErrors = operations[i + 2];\n const numWarnings = operations[i + 3];\n\n i += 4;\n\n logs.push(\n `Node ${id} has ${numErrors} errors and ${numWarnings} warnings`,\n );\n break;\n }\n case SUSPENSE_TREE_OPERATION_ADD: {\n const fiberID = operations[i + 1];\n const parentID = operations[i + 2];\n const nameStringID = operations[i + 3];\n const isSuspended = operations[i + 4];\n const numRects = operations[i + 5];\n\n i += 6;\n\n const name = stringTable[nameStringID];\n let rects: string;\n if (numRects === -1) {\n rects = 'null';\n } else {\n rects = '[';\n for (let rectIndex = 0; rectIndex < numRects; rectIndex++) {\n const offset = i + rectIndex * 4;\n const x = operations[offset + 0];\n const y = operations[offset + 1];\n const width = operations[offset + 2];\n const height = operations[offset + 3];\n\n if (rectIndex > 0) {\n rects += ', ';\n }\n rects += `(${x}, ${y}, ${width}, ${height})`;\n\n i += 4;\n }\n rects += ']';\n }\n\n logs.push(\n `Add suspense node ${fiberID} (${String(name)},rects={${rects}}) under ${parentID} suspended ${isSuspended}`,\n );\n break;\n }\n case SUSPENSE_TREE_OPERATION_REMOVE: {\n const removeLength = ((operations[i + 1]: any): number);\n i += 2;\n\n for (let removeIndex = 0; removeIndex < removeLength; removeIndex++) {\n const id = ((operations[i]: any): number);\n i += 1;\n\n logs.push(`Remove suspense node ${id}`);\n }\n\n break;\n }\n case SUSPENSE_TREE_OPERATION_REORDER_CHILDREN: {\n const id = ((operations[i + 1]: any): number);\n const numChildren = ((operations[i + 2]: any): number);\n i += 3;\n const children = operations.slice(i, i + numChildren);\n i += numChildren;\n\n logs.push(\n `Re-order suspense node ${id} children ${children.join(',')}`,\n );\n break;\n }\n case SUSPENSE_TREE_OPERATION_RESIZE: {\n const id = ((operations[i + 1]: any): number);\n const numRects = ((operations[i + 2]: any): number);\n i += 3;\n\n if (numRects === -1) {\n logs.push(`Resize suspense node ${id} to null`);\n } else {\n let line = `Resize suspense node ${id} to [`;\n for (let rectIndex = 0; rectIndex < numRects; rectIndex++) {\n const x = operations[i + 0];\n const y = operations[i + 1];\n const width = operations[i + 2];\n const height = operations[i + 3];\n\n if (rectIndex > 0) {\n line += ', ';\n }\n line += `(${x}, ${y}, ${width}, ${height})`;\n\n i += 4;\n }\n logs.push(line + ']');\n }\n\n break;\n }\n case SUSPENSE_TREE_OPERATION_SUSPENDERS: {\n i++;\n const changeLength = ((operations[i++]: any): number);\n\n for (let changeIndex = 0; changeIndex < changeLength; changeIndex++) {\n const id = operations[i++];\n const hasUniqueSuspenders = operations[i++] === 1;\n const isSuspended = operations[i++] === 1;\n const environmentNamesLength = operations[i++];\n i += environmentNamesLength;\n logs.push(\n `Suspense node ${id} unique suspenders set to ${String(hasUniqueSuspenders)} is suspended set to ${String(isSuspended)} with ${String(environmentNamesLength)} environments`,\n );\n }\n\n break;\n }\n default:\n throw Error(`Unsupported Bridge operation \"${operation}\"`);\n }\n }\n\n console.log(logs.join('\\n '));\n}\n\nexport function getDefaultComponentFilters(): Array<ComponentFilter> {\n return [\n {\n type: ComponentFilterElementType,\n value: ElementTypeHostComponent,\n isEnabled: true,\n },\n ];\n}\n\nexport function getSavedComponentFilters(): Array<ComponentFilter> {\n try {\n const raw = localStorageGetItem(\n LOCAL_STORAGE_COMPONENT_FILTER_PREFERENCES_KEY,\n );\n if (raw != null) {\n const parsedFilters: Array<ComponentFilter> = JSON.parse(raw);\n return filterOutLocationComponentFilters(parsedFilters);\n }\n } catch (error) {}\n return getDefaultComponentFilters();\n}\n\nexport function setSavedComponentFilters(\n componentFilters: Array<ComponentFilter>,\n): void {\n localStorageSetItem(\n LOCAL_STORAGE_COMPONENT_FILTER_PREFERENCES_KEY,\n JSON.stringify(filterOutLocationComponentFilters(componentFilters)),\n );\n}\n\n// Following __debugSource removal from Fiber, the new approach for finding the source location\n// of a component, represented by the Fiber, is based on lazily generating and parsing component stack frames\n// To find the original location, React DevTools will perform symbolication, source maps are required for that.\n// In order to start filtering Fibers, we need to find location for all of them, which can't be done lazily.\n// Eager symbolication can become quite expensive for large applications.\nexport function filterOutLocationComponentFilters(\n componentFilters: Array<ComponentFilter>,\n): Array<ComponentFilter> {\n // This is just an additional check to preserve the previous state\n // Filters can be stored on the backend side or in user land (in a window object)\n if (!Array.isArray(componentFilters)) {\n return componentFilters;\n }\n\n return componentFilters.filter(f => f.type !== ComponentFilterLocation);\n}\n\nconst vscodeFilepath = 'vscode://file/{path}:{line}:{column}';\n\nexport function getDefaultPreset(): 'custom' | 'vscode' {\n return typeof process.env.EDITOR_URL === 'string' ? 'custom' : 'vscode';\n}\n\nexport function getDefaultOpenInEditorURL(): string {\n return typeof process.env.EDITOR_URL === 'string'\n ? process.env.EDITOR_URL\n : vscodeFilepath;\n}\n\nexport function getOpenInEditorURL(): string {\n try {\n const rawPreset = localStorageGetItem(\n LOCAL_STORAGE_OPEN_IN_EDITOR_URL_PRESET,\n );\n switch (rawPreset) {\n case '\"vscode\"':\n return vscodeFilepath;\n }\n const raw = localStorageGetItem(LOCAL_STORAGE_OPEN_IN_EDITOR_URL);\n if (raw != null) {\n return JSON.parse(raw);\n }\n } catch (error) {}\n return getDefaultOpenInEditorURL();\n}\n\nexport function getAlwaysOpenInEditor(): boolean {\n try {\n const raw = localStorageGetItem(LOCAL_STORAGE_ALWAYS_OPEN_IN_EDITOR);\n return raw === 'true';\n } catch (error) {}\n return false;\n}\n\ntype ParseElementDisplayNameFromBackendReturn = {\n formattedDisplayName: string | null,\n hocDisplayNames: Array<string> | null,\n compiledWithForget: boolean,\n};\nexport function parseElementDisplayNameFromBackend(\n displayName: string | null,\n type: ElementType,\n): ParseElementDisplayNameFromBackendReturn {\n if (displayName === null) {\n return {\n formattedDisplayName: null,\n hocDisplayNames: null,\n compiledWithForget: false,\n };\n }\n\n if (displayName.startsWith('Forget(')) {\n const displayNameWithoutForgetWrapper = displayName.slice(\n 7,\n displayName.length - 1,\n );\n\n const {formattedDisplayName, hocDisplayNames} =\n parseElementDisplayNameFromBackend(displayNameWithoutForgetWrapper, type);\n return {formattedDisplayName, hocDisplayNames, compiledWithForget: true};\n }\n\n let hocDisplayNames = null;\n switch (type) {\n case ElementTypeClass:\n case ElementTypeForwardRef:\n case ElementTypeFunction:\n case ElementTypeMemo:\n case ElementTypeVirtual:\n if (displayName.indexOf('(') >= 0) {\n const matches = displayName.match(/[^()]+/g);\n if (matches != null) {\n // $FlowFixMe[incompatible-type]\n displayName = matches.pop();\n hocDisplayNames = matches;\n }\n }\n break;\n default:\n break;\n }\n\n return {\n // $FlowFixMe[incompatible-return]\n formattedDisplayName: displayName,\n hocDisplayNames,\n compiledWithForget: false,\n };\n}\n\n// Pulled from react-compat\n// https://github.com/developit/preact-compat/blob/7c5de00e7c85e2ffd011bf3af02899b63f699d3a/src/index.js#L349\nexport function shallowDiffers(prev: Object, next: Object): boolean {\n for (const attribute in prev) {\n if (!(attribute in next)) {\n return true;\n }\n }\n for (const attribute in next) {\n if (prev[attribute] !== next[attribute]) {\n return true;\n }\n }\n return false;\n}\n\nexport function getInObject(object: Object, path: Array<string | number>): any {\n return path.reduce((reduced: Object, attr: any): any => {\n if (reduced) {\n if (hasOwnProperty.call(reduced, attr)) {\n return reduced[attr];\n }\n if (typeof reduced[Symbol.iterator] === 'function') {\n // Convert iterable to array and return array[index]\n //\n // TRICKY\n // Don't use [...spread] syntax for this purpose.\n // This project uses @babel/plugin-transform-spread in \"loose\" mode which only works with Array values.\n // Other types (e.g. typed arrays, Sets) will not spread correctly.\n return Array.from(reduced)[attr];\n }\n }\n\n return null;\n }, object);\n}\n\nexport function deletePathInObject(\n object: Object,\n path: Array<string | number>,\n) {\n const length = path.length;\n const last = path[length - 1];\n if (object != null) {\n const parent = getInObject(object, path.slice(0, length - 1));\n if (parent) {\n if (isArray(parent)) {\n parent.splice(((last: any): number), 1);\n } else {\n delete parent[last];\n }\n }\n }\n}\n\nexport function renamePathInObject(\n object: Object,\n oldPath: Array<string | number>,\n newPath: Array<string | number>,\n) {\n const length = oldPath.length;\n if (object != null) {\n const parent = getInObject(object, oldPath.slice(0, length - 1));\n if (parent) {\n const lastOld = oldPath[length - 1];\n const lastNew = newPath[length - 1];\n parent[lastNew] = parent[lastOld];\n if (isArray(parent)) {\n parent.splice(((lastOld: any): number), 1);\n } else {\n delete parent[lastOld];\n }\n }\n }\n}\n\nexport function setInObject(\n object: Object,\n path: Array<string | number>,\n value: any,\n) {\n const length = path.length;\n const last = path[length - 1];\n if (object != null) {\n const parent = getInObject(object, path.slice(0, length - 1));\n if (parent) {\n parent[last] = value;\n }\n }\n}\n\nexport type DataType =\n | 'array'\n | 'array_buffer'\n | 'bigint'\n | 'boolean'\n | 'class_instance'\n | 'data_view'\n | 'date'\n | 'error'\n | 'function'\n | 'html_all_collection'\n | 'html_element'\n | 'infinity'\n | 'iterator'\n | 'opaque_iterator'\n | 'nan'\n | 'null'\n | 'number'\n | 'thenable'\n | 'object'\n | 'react_element'\n | 'react_lazy'\n | 'regexp'\n | 'string'\n | 'symbol'\n | 'typed_array'\n | 'undefined'\n | 'unknown';\n\nfunction isError(data: Object): boolean {\n // If it doesn't event look like an error, it won't be an actual error.\n if ('name' in data && 'message' in data) {\n while (data) {\n // $FlowFixMe[method-unbinding]\n if (Object.prototype.toString.call(data) === '[object Error]') {\n return true;\n }\n data = Object.getPrototypeOf(data);\n }\n }\n\n return false;\n}\n\n/**\n * Get a enhanced/artificial type string based on the object instance\n */\nexport function getDataType(data: Object): DataType {\n if (data === null) {\n return 'null';\n } else if (data === undefined) {\n return 'undefined';\n }\n\n if (typeof HTMLElement !== 'undefined' && data instanceof HTMLElement) {\n return 'html_element';\n }\n\n const type = typeof data;\n switch (type) {\n case 'bigint':\n return 'bigint';\n case 'boolean':\n return 'boolean';\n case 'function':\n return 'function';\n case 'number':\n if (Number.isNaN(data)) {\n return 'nan';\n } else if (!Number.isFinite(data)) {\n return 'infinity';\n } else {\n return 'number';\n }\n case 'object':\n switch (data.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_LEGACY_ELEMENT_TYPE:\n return 'react_element';\n case REACT_LAZY_TYPE:\n return 'react_lazy';\n }\n if (isArray(data)) {\n return 'array';\n } else if (ArrayBuffer.isView(data)) {\n return hasOwnProperty.call(data.constructor, 'BYTES_PER_ELEMENT')\n ? 'typed_array'\n : 'data_view';\n } else if (data.constructor && data.constructor.name === 'ArrayBuffer') {\n // HACK This ArrayBuffer check is gross; is there a better way?\n // We could try to create a new DataView with the value.\n // If it doesn't error, we know it's an ArrayBuffer,\n // but this seems kind of awkward and expensive.\n return 'array_buffer';\n } else if (typeof data[Symbol.iterator] === 'function') {\n const iterator = data[Symbol.iterator]();\n if (!iterator) {\n // Proxies might break assumptoins about iterators.\n // See github.com/facebook/react/issues/21654\n } else {\n return iterator === data ? 'opaque_iterator' : 'iterator';\n }\n } else if (data.constructor && data.constructor.name === 'RegExp') {\n return 'regexp';\n } else if (typeof data.then === 'function') {\n return 'thenable';\n } else if (isError(data)) {\n return 'error';\n } else {\n // $FlowFixMe[method-unbinding]\n const toStringValue = Object.prototype.toString.call(data);\n if (toStringValue === '[object Date]') {\n return 'date';\n } else if (toStringValue === '[object HTMLAllCollection]') {\n return 'html_all_collection';\n }\n }\n\n if (!isPlainObject(data)) {\n return 'class_instance';\n }\n\n return 'object';\n case 'string':\n return 'string';\n case 'symbol':\n return 'symbol';\n case 'undefined':\n if (\n // $FlowFixMe[method-unbinding]\n Object.prototype.toString.call(data) === '[object HTMLAllCollection]'\n ) {\n return 'html_all_collection';\n }\n return 'undefined';\n default:\n return 'unknown';\n }\n}\n\n// Fork of packages/react-is/src/ReactIs.js:30, but with legacy element type\n// Which has been changed in https://github.com/facebook/react/pull/28813\nfunction typeOfWithLegacyElementSymbol(object: any): mixed {\n if (typeof object === 'object' && object !== null) {\n const $$typeof = object.$$typeof;\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_LEGACY_ELEMENT_TYPE:\n const type = object.type;\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n case REACT_SUSPENSE_LIST_TYPE:\n case REACT_VIEW_TRANSITION_TYPE:\n return type;\n default:\n const $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n return $$typeofType;\n case REACT_CONSUMER_TYPE:\n return $$typeofType;\n // Fall through\n default:\n return $$typeof;\n }\n }\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n}\n\nexport function getDisplayNameForReactElement(\n element: React$Element<any>,\n): string | null {\n const elementType = typeOfWithLegacyElementSymbol(element);\n switch (elementType) {\n case REACT_CONSUMER_TYPE:\n return 'ContextConsumer';\n case LEGACY_REACT_PROVIDER_TYPE:\n return 'ContextProvider';\n case REACT_CONTEXT_TYPE:\n return 'Context';\n case REACT_FORWARD_REF_TYPE:\n return 'ForwardRef';\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n case REACT_LAZY_TYPE:\n return 'Lazy';\n case REACT_MEMO_TYPE:\n return 'Memo';\n case REACT_PORTAL_TYPE:\n return 'Portal';\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n case REACT_VIEW_TRANSITION_TYPE:\n return 'ViewTransition';\n case REACT_TRACING_MARKER_TYPE:\n return 'TracingMarker';\n default:\n const {type} = element;\n if (typeof type === 'string') {\n return type;\n } else if (typeof type === 'function') {\n return getDisplayName(type, 'Anonymous');\n } else if (type != null) {\n return 'NotImplementedInDevtools';\n } else {\n return 'Element';\n }\n }\n}\n\nconst MAX_PREVIEW_STRING_LENGTH = 50;\n\nfunction truncateForDisplay(\n string: string,\n length: number = MAX_PREVIEW_STRING_LENGTH,\n) {\n if (string.length > length) {\n return string.slice(0, length) + '…';\n } else {\n return string;\n }\n}\n\n// Attempts to mimic Chrome's inline preview for values.\n// For example, the following value...\n// {\n// foo: 123,\n// bar: \"abc\",\n// baz: [true, false],\n// qux: { ab: 1, cd: 2 }\n// };\n//\n// Would show a preview of...\n// {foo: 123, bar: \"abc\", baz: Array(2), qux: {…}}\n//\n// And the following value...\n// [\n// 123,\n// \"abc\",\n// [true, false],\n// { foo: 123, bar: \"abc\" }\n// ];\n//\n// Would show a preview of...\n// [123, \"abc\", Array(2), {…}]\nexport function formatDataForPreview(\n data: any,\n showFormattedValue: boolean,\n): string {\n if (data != null && hasOwnProperty.call(data, meta.type)) {\n return showFormattedValue\n ? data[meta.preview_long]\n : data[meta.preview_short];\n }\n\n const type = getDataType(data);\n\n switch (type) {\n case 'html_element':\n return `<${truncateForDisplay(data.tagName.toLowerCase())} />`;\n case 'function':\n if (typeof data.name === 'function' || data.name === '') {\n return '() => {}';\n }\n return `${truncateForDisplay(data.name)}() {}`;\n case 'string':\n return `\"${data}\"`;\n case 'bigint':\n return truncateForDisplay(data.toString() + 'n');\n case 'regexp':\n return truncateForDisplay(data.toString());\n case 'symbol':\n return truncateForDisplay(data.toString());\n case 'react_element':\n return `<${truncateForDisplay(\n getDisplayNameForReactElement(data) || 'Unknown',\n )} />`;\n case 'react_lazy':\n // To avoid actually initialize a lazy to cause a side-effect we make some assumptions\n // about the structure of the payload even though that's not really part of the contract.\n // In practice, this is really just coming from React.lazy helper or Flight.\n const payload = data._payload;\n if (payload !== null && typeof payload === 'object') {\n if (payload._status === 0) {\n // React.lazy constructor pending\n return `pending lazy()`;\n }\n if (payload._status === 1 && payload._result != null) {\n // React.lazy constructor fulfilled\n if (showFormattedValue) {\n const formatted = formatDataForPreview(\n payload._result.default,\n false,\n );\n return `fulfilled lazy() {${truncateForDisplay(formatted)}}`;\n } else {\n return `fulfilled lazy() {…}`;\n }\n }\n if (payload._status === 2) {\n // React.lazy constructor rejected\n if (showFormattedValue) {\n const formatted = formatDataForPreview(payload._result, false);\n return `rejected lazy() {${truncateForDisplay(formatted)}}`;\n } else {\n return `rejected lazy() {…}`;\n }\n }\n if (payload.status === 'pending' || payload.status === 'blocked') {\n // React Flight pending\n return `pending lazy()`;\n }\n if (payload.status === 'fulfilled') {\n // React Flight fulfilled\n if (showFormattedValue) {\n const formatted = formatDataForPreview(payload.value, false);\n return `fulfilled lazy() {${truncateForDisplay(formatted)}}`;\n } else {\n return `fulfilled lazy() {…}`;\n }\n }\n if (payload.status === 'rejected') {\n // React Flight rejected\n if (showFormattedValue) {\n const formatted = formatDataForPreview(payload.reason, false);\n return `rejected lazy() {${truncateForDisplay(formatted)}}`;\n } else {\n return `rejected lazy() {…}`;\n }\n }\n }\n // Some form of uninitialized\n return 'lazy()';\n case 'array_buffer':\n return `ArrayBuffer(${data.byteLength})`;\n case 'data_view':\n return `DataView(${data.buffer.byteLength})`;\n case 'array':\n if (showFormattedValue) {\n let formatted = '';\n for (let i = 0; i < data.length; i++) {\n if (i > 0) {\n formatted += ', ';\n }\n formatted += formatDataForPreview(data[i], false);\n if (formatted.length > MAX_PREVIEW_STRING_LENGTH) {\n // Prevent doing a lot of unnecessary iteration...\n break;\n }\n }\n return `[${truncateForDisplay(formatted)}]`;\n } else {\n const length = hasOwnProperty.call(data, meta.size)\n ? data[meta.size]\n : data.length;\n return `Array(${length})`;\n }\n case 'typed_array':\n const shortName = `${data.constructor.name}(${data.length})`;\n if (showFormattedValue) {\n let formatted = '';\n for (let i = 0; i < data.length; i++) {\n if (i > 0) {\n formatted += ', ';\n }\n formatted += data[i];\n if (formatted.length > MAX_PREVIEW_STRING_LENGTH) {\n // Prevent doing a lot of unnecessary iteration...\n break;\n }\n }\n return `${shortName} [${truncateForDisplay(formatted)}]`;\n } else {\n return shortName;\n }\n case 'iterator':\n const name = data.constructor.name;\n\n if (showFormattedValue) {\n // TRICKY\n // Don't use [...spread] syntax for this purpose.\n // This project uses @babel/plugin-transform-spread in \"loose\" mode which only works with Array values.\n // Other types (e.g. typed arrays, Sets) will not spread correctly.\n const array = Array.from(data);\n\n let formatted = '';\n for (let i = 0; i < array.length; i++) {\n const entryOrEntries = array[i];\n\n if (i > 0) {\n formatted += ', ';\n }\n\n // TRICKY\n // Browsers display Maps and Sets differently.\n // To mimic their behavior, detect if we've been given an entries tuple.\n // Map(2) {\"abc\" => 123, \"def\" => 123}\n // Set(2) {\"abc\", 123}\n if (isArray(entryOrEntries)) {\n const key = formatDataForPreview(entryOrEntries[0], true);\n const value = formatDataForPreview(entryOrEntries[1], false);\n formatted += `${key} => ${value}`;\n } else {\n formatted += formatDataForPreview(entryOrEntries, false);\n }\n\n if (formatted.length > MAX_PREVIEW_STRING_LENGTH) {\n // Prevent doing a lot of unnecessary iteration...\n break;\n }\n }\n\n return `${name}(${data.size}) {${truncateForDisplay(formatted)}}`;\n } else {\n return `${name}(${data.size})`;\n }\n case 'opaque_iterator': {\n return data[Symbol.toStringTag];\n }\n case 'date':\n return data.toString();\n case 'class_instance':\n try {\n let resolvedConstructorName = data.constructor.name;\n if (typeof resolvedConstructorName === 'string') {\n return resolvedConstructorName;\n }\n\n resolvedConstructorName = Object.getPrototypeOf(data).constructor.name;\n if (typeof resolvedConstructorName === 'string') {\n return resolvedConstructorName;\n }\n\n try {\n return truncateForDisplay(String(data));\n } catch (error) {\n return 'unserializable';\n }\n } catch (error) {\n return 'unserializable';\n }\n case 'thenable':\n let displayName: string;\n if (isPlainObject(data)) {\n displayName = 'Thenable';\n } else {\n let resolvedConstructorName = data.constructor.name;\n if (typeof resolvedConstructorName !== 'string') {\n resolvedConstructorName =\n Object.getPrototypeOf(data).constructor.name;\n }\n if (typeof resolvedConstructorName === 'string') {\n displayName = resolvedConstructorName;\n } else {\n displayName = 'Thenable';\n }\n }\n switch (data.status) {\n case 'pending':\n return `pending ${displayName}`;\n case 'fulfilled':\n if (showFormattedValue) {\n const formatted = formatDataForPreview(data.value, false);\n return `fulfilled ${displayName} {${truncateForDisplay(formatted)}}`;\n } else {\n return `fulfilled ${displayName} {…}`;\n }\n case 'rejected':\n if (showFormattedValue) {\n const formatted = formatDataForPreview(data.reason, false);\n return `rejected ${displayName} {${truncateForDisplay(formatted)}}`;\n } else {\n return `rejected ${displayName} {…}`;\n }\n default:\n return displayName;\n }\n case 'object':\n if (showFormattedValue) {\n const keys = Array.from(getAllEnumerableKeys(data)).sort(alphaSortKeys);\n\n let formatted = '';\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n if (i > 0) {\n formatted += ', ';\n }\n formatted += `${key.toString()}: ${formatDataForPreview(\n data[key],\n false,\n )}`;\n if (formatted.length > MAX_PREVIEW_STRING_LENGTH) {\n // Prevent doing a lot of unnecessary iteration...\n break;\n }\n }\n return `{${truncateForDisplay(formatted)}}`;\n } else {\n return '{…}';\n }\n case 'error':\n return truncateForDisplay(String(data));\n case 'boolean':\n case 'number':\n case 'infinity':\n case 'nan':\n case 'null':\n case 'undefined':\n return String(data);\n default:\n try {\n return truncateForDisplay(String(data));\n } catch (error) {\n return 'unserializable';\n }\n }\n}\n\n// Basically checking that the object only has Object in its prototype chain\nexport const isPlainObject = (object: Object): boolean => {\n const objectPrototype = Object.getPrototypeOf(object);\n if (!objectPrototype) return true;\n\n const objectParentPrototype = Object.getPrototypeOf(objectPrototype);\n return !objectParentPrototype;\n};\n\nexport function backendToFrontendSerializedElementMapper(\n element: SerializedElementBackend,\n): SerializedElementFrontend {\n const {formattedDisplayName, hocDisplayNames, compiledWithForget} =\n parseElementDisplayNameFromBackend(element.displayName, element.type);\n\n return {\n ...element,\n displayName: formattedDisplayName,\n hocDisplayNames,\n compiledWithForget,\n };\n}\n\n/**\n * Should be used when treating url as a Chrome Resource URL.\n */\nexport function normalizeUrlIfValid(url: string): string {\n try {\n // TODO: Chrome will use the basepath to create a Resource URL.\n return new URL(url).toString();\n } catch {\n // Giving up if it's not a valid URL without basepath\n return url;\n }\n}\n\nexport function getIsReloadAndProfileSupported(): boolean {\n // Notify the frontend if the backend supports the Storage API (e.g. localStorage).\n // If not, features like reload-and-profile will not work correctly and must be disabled.\n let isBackendStorageAPISupported = false;\n try {\n localStorage.getItem('test');\n isBackendStorageAPISupported = true;\n } catch (error) {}\n\n return isBackendStorageAPISupported && isSynchronousXHRSupported();\n}\n\n// Expected to be used only by browser extension and react-devtools-inline\nexport function getIfReloadedAndProfiling(): boolean {\n return (\n sessionStorageGetItem(SESSION_STORAGE_RELOAD_AND_PROFILE_KEY) === 'true'\n );\n}\n\nexport function getProfilingSettings(): ProfilingSettings {\n return {\n recordChangeDescriptions:\n sessionStorageGetItem(SESSION_STORAGE_RECORD_CHANGE_DESCRIPTIONS_KEY) ===\n 'true',\n recordTimeline:\n sessionStorageGetItem(SESSION_STORAGE_RECORD_TIMELINE_KEY) === 'true',\n };\n}\n\nexport function onReloadAndProfile(\n recordChangeDescriptions: boolean,\n recordTimeline: boolean,\n): void {\n sessionStorageSetItem(SESSION_STORAGE_RELOAD_AND_PROFILE_KEY, 'true');\n sessionStorageSetItem(\n SESSION_STORAGE_RECORD_CHANGE_DESCRIPTIONS_KEY,\n recordChangeDescriptions ? 'true' : 'false',\n );\n sessionStorageSetItem(\n SESSION_STORAGE_RECORD_TIMELINE_KEY,\n recordTimeline ? 'true' : 'false',\n );\n}\n\nexport function onReloadAndProfileFlagsReset(): void {\n sessionStorageRemoveItem(SESSION_STORAGE_RELOAD_AND_PROFILE_KEY);\n sessionStorageRemoveItem(SESSION_STORAGE_RECORD_CHANGE_DESCRIPTIONS_KEY);\n sessionStorageRemoveItem(SESSION_STORAGE_RECORD_TIMELINE_KEY);\n}\n\nexport function unionOfTwoArrays<T>(a: Array<T>, b: Array<T>): Array<T> {\n let result = a;\n for (let i = 0; i < b.length; i++) {\n const value = b[i];\n if (a.indexOf(value) === -1) {\n if (result === a) {\n // Lazily copy\n result = a.slice(0);\n }\n result.push(value);\n }\n }\n return result;\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nexport default function noop() {}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport {\n getDataType,\n getDisplayNameForReactElement,\n getAllEnumerableKeys,\n getInObject,\n formatDataForPreview,\n setInObject,\n} from 'react-devtools-shared/src/utils';\n\nimport {REACT_LEGACY_ELEMENT_TYPE} from 'shared/ReactSymbols';\n\nimport type {\n DehydratedData,\n InspectedElementPath,\n} from 'react-devtools-shared/src/frontend/types';\n\nimport noop from 'shared/noop';\n\nexport const meta = {\n inspectable: (Symbol('inspectable'): symbol),\n inspected: (Symbol('inspected'): symbol),\n name: (Symbol('name'): symbol),\n preview_long: (Symbol('preview_long'): symbol),\n preview_short: (Symbol('preview_short'): symbol),\n readonly: (Symbol('readonly'): symbol),\n size: (Symbol('size'): symbol),\n type: (Symbol('type'): symbol),\n unserializable: (Symbol('unserializable'): symbol),\n};\n\nexport type Dehydrated = {\n inspectable: boolean,\n name: string | null,\n preview_long: string | null,\n preview_short: string | null,\n readonly?: boolean,\n size?: number,\n type: string,\n};\n\n// Typed arrays, other complex iteratable objects (e.g. Map, Set, ImmutableJS) or Promises need special handling.\n// These objects can't be serialized without losing type information,\n// so a \"Unserializable\" type wrapper is used (with meta-data keys) to send nested values-\n// while preserving the original type and name.\nexport type Unserializable = {\n name: string | null,\n preview_long: string | null,\n preview_short: string | null,\n readonly?: boolean,\n size?: number,\n type: string,\n unserializable: boolean,\n [string | number]: any,\n};\n\n// This threshold determines the depth at which the bridge \"dehydrates\" nested data.\n// Dehydration means that we don't serialize the data for e.g. postMessage or stringify,\n// unless the frontend explicitly requests it (e.g. a user clicks to expand a props object).\n//\n// Reducing this threshold will improve the speed of initial component inspection,\n// but may decrease the responsiveness of expanding objects/arrays to inspect further.\nconst LEVEL_THRESHOLD = 2;\n\n/**\n * Generate the dehydrated metadata for complex object instances\n */\nfunction createDehydrated(\n type: string,\n inspectable: boolean,\n data: Object,\n cleaned: Array<Array<string | number>>,\n path: Array<string | number>,\n): Dehydrated {\n cleaned.push(path);\n\n const dehydrated: Dehydrated = {\n inspectable,\n type,\n preview_long: formatDataForPreview(data, true),\n preview_short: formatDataForPreview(data, false),\n name:\n typeof data.constructor !== 'function' ||\n typeof data.constructor.name !== 'string' ||\n data.constructor.name === 'Object'\n ? ''\n : data.constructor.name,\n };\n\n if (type === 'array' || type === 'typed_array') {\n dehydrated.size = data.length;\n } else if (type === 'object') {\n dehydrated.size = Object.keys(data).length;\n }\n\n if (type === 'iterator' || type === 'typed_array') {\n dehydrated.readonly = true;\n }\n\n return dehydrated;\n}\n\n/**\n * Strip out complex data (instances, functions, and data nested > LEVEL_THRESHOLD levels deep).\n * The paths of the stripped out objects are appended to the `cleaned` list.\n * On the other side of the barrier, the cleaned list is used to \"re-hydrate\" the cleaned representation into\n * an object with symbols as attributes, so that a sanitized object can be distinguished from a normal object.\n *\n * Input: {\"some\": {\"attr\": fn()}, \"other\": AnInstance}\n * Output: {\n * \"some\": {\n * \"attr\": {\"name\": the fn.name, type: \"function\"}\n * },\n * \"other\": {\n * \"name\": \"AnInstance\",\n * \"type\": \"object\",\n * },\n * }\n * and cleaned = [[\"some\", \"attr\"], [\"other\"]]\n */\nexport function dehydrate(\n data: Object,\n cleaned: Array<Array<string | number>>,\n unserializable: Array<Array<string | number>>,\n path: Array<string | number>,\n isPathAllowed: (path: Array<string | number>) => boolean,\n level: number = 0,\n): DehydratedData['data'] {\n const type = getDataType(data);\n\n let isPathAllowedCheck;\n\n switch (type) {\n case 'html_element':\n cleaned.push(path);\n return {\n inspectable: false,\n preview_short: formatDataForPreview(data, false),\n preview_long: formatDataForPreview(data, true),\n name: data.tagName,\n type,\n };\n\n case 'function':\n cleaned.push(path);\n return {\n inspectable: false,\n preview_short: formatDataForPreview(data, false),\n preview_long: formatDataForPreview(data, true),\n name:\n typeof data.name === 'function' || !data.name\n ? 'function'\n : data.name,\n type,\n };\n\n case 'string':\n isPathAllowedCheck = isPathAllowed(path);\n if (isPathAllowedCheck) {\n return data;\n } else {\n return data.length <= 500 ? data : data.slice(0, 500) + '...';\n }\n\n case 'bigint':\n cleaned.push(path);\n return {\n inspectable: false,\n preview_short: formatDataForPreview(data, false),\n preview_long: formatDataForPreview(data, true),\n name: data.toString(),\n type,\n };\n\n case 'symbol':\n cleaned.push(path);\n return {\n inspectable: false,\n preview_short: formatDataForPreview(data, false),\n preview_long: formatDataForPreview(data, true),\n name: data.toString(),\n type,\n };\n\n case 'react_element': {\n isPathAllowedCheck = isPathAllowed(path);\n\n if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {\n cleaned.push(path);\n return {\n inspectable: true,\n preview_short: formatDataForPreview(data, false),\n preview_long: formatDataForPreview(data, true),\n name: getDisplayNameForReactElement(data) || 'Unknown',\n type,\n };\n }\n\n const unserializableValue: Unserializable = {\n unserializable: true,\n type,\n readonly: true,\n preview_short: formatDataForPreview(data, false),\n preview_long: formatDataForPreview(data, true),\n name: getDisplayNameForReactElement(data) || 'Unknown',\n };\n // TODO: We can't expose type because that name is already taken on Unserializable.\n unserializableValue.key = dehydrate(\n data.key,\n cleaned,\n unserializable,\n path.concat(['key']),\n isPathAllowed,\n isPathAllowedCheck ? 1 : level + 1,\n );\n if (data.$$typeof === REACT_LEGACY_ELEMENT_TYPE) {\n unserializableValue.ref = dehydrate(\n data.ref,\n cleaned,\n unserializable,\n path.concat(['ref']),\n isPathAllowed,\n isPathAllowedCheck ? 1 : level + 1,\n );\n }\n unserializableValue.props = dehydrate(\n data.props,\n cleaned,\n unserializable,\n path.concat(['props']),\n isPathAllowed,\n isPathAllowedCheck ? 1 : level + 1,\n );\n\n unserializable.push(path);\n return unserializableValue;\n }\n case 'react_lazy': {\n isPathAllowedCheck = isPathAllowed(path);\n\n const payload = data._payload;\n\n if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {\n cleaned.push(path);\n const inspectable =\n payload !== null &&\n typeof payload === 'object' &&\n (payload._status === 1 ||\n payload._status === 2 ||\n payload.status === 'fulfilled' ||\n payload.status === 'rejected');\n return {\n inspectable,\n preview_short: formatDataForPreview(data, false),\n preview_long: formatDataForPreview(data, true),\n name: 'lazy()',\n type,\n };\n }\n\n const unserializableValue: Unserializable = {\n unserializable: true,\n type: type,\n preview_short: formatDataForPreview(data, false),\n preview_long: formatDataForPreview(data, true),\n name: 'lazy()',\n };\n // Ideally we should alias these properties to something more readable but\n // unfortunately because of how the hydration algorithm uses a single concept of\n // \"path\" we can't alias the path.\n unserializableValue._payload = dehydrate(\n payload,\n cleaned,\n unserializable,\n path.concat(['_payload']),\n isPathAllowed,\n isPathAllowedCheck ? 1 : level + 1,\n );\n unserializable.push(path);\n return unserializableValue;\n }\n // ArrayBuffers error if you try to inspect them.\n case 'array_buffer':\n case 'data_view':\n cleaned.push(path);\n return {\n inspectable: false,\n preview_short: formatDataForPreview(data, false),\n preview_long: formatDataForPreview(data, true),\n name: type === 'data_view' ? 'DataView' : 'ArrayBuffer',\n size: data.byteLength,\n type,\n };\n\n case 'array':\n isPathAllowedCheck = isPathAllowed(path);\n if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {\n return createDehydrated(type, true, data, cleaned, path);\n }\n const arr: Array<Object> = [];\n for (let i = 0; i < data.length; i++) {\n arr[i] = dehydrateKey(\n data,\n i,\n cleaned,\n unserializable,\n path.concat([i]),\n isPathAllowed,\n isPathAllowedCheck ? 1 : level + 1,\n );\n }\n return arr;\n\n case 'html_all_collection':\n case 'typed_array':\n case 'iterator':\n isPathAllowedCheck = isPathAllowed(path);\n if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {\n return createDehydrated(type, true, data, cleaned, path);\n } else {\n const unserializableValue: Unserializable = {\n unserializable: true,\n type: type,\n readonly: true,\n size: type === 'typed_array' ? data.length : undefined,\n preview_short: formatDataForPreview(data, false),\n preview_long: formatDataForPreview(data, true),\n name:\n typeof data.constructor !== 'function' ||\n typeof data.constructor.name !== 'string' ||\n data.constructor.name === 'Object'\n ? ''\n : data.constructor.name,\n };\n\n // TRICKY\n // Don't use [...spread] syntax for this purpose.\n // This project uses @babel/plugin-transform-spread in \"loose\" mode which only works with Array values.\n // Other types (e.g. typed arrays, Sets) will not spread correctly.\n Array.from(data).forEach(\n (item, i) =>\n (unserializableValue[i] = dehydrate(\n item,\n cleaned,\n unserializable,\n path.concat([i]),\n isPathAllowed,\n isPathAllowedCheck ? 1 : level + 1,\n )),\n );\n\n unserializable.push(path);\n\n return unserializableValue;\n }\n\n case 'opaque_iterator':\n cleaned.push(path);\n return {\n inspectable: false,\n preview_short: formatDataForPreview(data, false),\n preview_long: formatDataForPreview(data, true),\n name: data[Symbol.toStringTag],\n type,\n };\n\n case 'date':\n cleaned.push(path);\n return {\n inspectable: false,\n preview_short: formatDataForPreview(data, false),\n preview_long: formatDataForPreview(data, true),\n name: data.toString(),\n type,\n };\n\n case 'regexp':\n cleaned.push(path);\n return {\n inspectable: false,\n preview_short: formatDataForPreview(data, false),\n preview_long: formatDataForPreview(data, true),\n name: data.toString(),\n type,\n };\n\n case 'thenable':\n isPathAllowedCheck = isPathAllowed(path);\n\n if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {\n cleaned.push(path);\n return {\n inspectable:\n data.status === 'fulfilled' || data.status === 'rejected',\n preview_short: formatDataForPreview(data, false),\n preview_long: formatDataForPreview(data, true),\n name: data.toString(),\n type,\n };\n }\n\n if (\n data.status === 'resolved_model' ||\n data.status === 'resolve_module'\n ) {\n // This looks it's a lazy initialization pattern such in Flight.\n // Since we're about to inspect it. Let's eagerly initialize it.\n data.then(noop);\n }\n\n switch (data.status) {\n case 'fulfilled': {\n const unserializableValue: Unserializable = {\n unserializable: true,\n type: type,\n preview_short: formatDataForPreview(data, false),\n preview_long: formatDataForPreview(data, true),\n name: 'fulfilled Thenable',\n };\n\n unserializableValue.value = dehydrate(\n data.value,\n cleaned,\n unserializable,\n path.concat(['value']),\n isPathAllowed,\n isPathAllowedCheck ? 1 : level + 1,\n );\n\n unserializable.push(path);\n\n return unserializableValue;\n }\n case 'rejected': {\n const unserializableValue: Unserializable = {\n unserializable: true,\n type: type,\n preview_short: formatDataForPreview(data, false),\n preview_long: formatDataForPreview(data, true),\n name: 'rejected Thenable',\n };\n\n unserializableValue.reason = dehydrate(\n data.reason,\n cleaned,\n unserializable,\n path.concat(['reason']),\n isPathAllowed,\n isPathAllowedCheck ? 1 : level + 1,\n );\n\n unserializable.push(path);\n\n return unserializableValue;\n }\n default:\n cleaned.push(path);\n return {\n inspectable: false,\n preview_short: formatDataForPreview(data, false),\n preview_long: formatDataForPreview(data, true),\n name: data.toString(),\n type,\n };\n }\n\n case 'object':\n isPathAllowedCheck = isPathAllowed(path);\n\n if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {\n return createDehydrated(type, true, data, cleaned, path);\n } else {\n const object: {\n [string]: DehydratedData['data'],\n } = {};\n getAllEnumerableKeys(data).forEach(key => {\n const name = key.toString();\n object[name] = dehydrateKey(\n data,\n key,\n cleaned,\n unserializable,\n path.concat([name]),\n isPathAllowed,\n isPathAllowedCheck ? 1 : level + 1,\n );\n });\n return object;\n }\n\n case 'class_instance': {\n isPathAllowedCheck = isPathAllowed(path);\n\n if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {\n return createDehydrated(type, true, data, cleaned, path);\n }\n\n const value: Unserializable = {\n unserializable: true,\n type,\n readonly: true,\n preview_short: formatDataForPreview(data, false),\n preview_long: formatDataForPreview(data, true),\n name:\n typeof data.constructor !== 'function' ||\n typeof data.constructor.name !== 'string'\n ? ''\n : data.constructor.name,\n };\n\n getAllEnumerableKeys(data).forEach(key => {\n const keyAsString = key.toString();\n\n value[keyAsString] = dehydrate(\n data[key],\n cleaned,\n unserializable,\n path.concat([keyAsString]),\n isPathAllowed,\n isPathAllowedCheck ? 1 : level + 1,\n );\n });\n\n unserializable.push(path);\n\n return value;\n }\n case 'error': {\n isPathAllowedCheck = isPathAllowed(path);\n\n if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {\n return createDehydrated(type, true, data, cleaned, path);\n }\n\n const value: Unserializable = {\n unserializable: true,\n type,\n readonly: true,\n preview_short: formatDataForPreview(data, false),\n preview_long: formatDataForPreview(data, true),\n name: data.name,\n };\n\n // name, message, stack and cause are not enumerable yet still interesting.\n value.message = dehydrate(\n data.message,\n cleaned,\n unserializable,\n path.concat(['message']),\n isPathAllowed,\n isPathAllowedCheck ? 1 : level + 1,\n );\n value.stack = dehydrate(\n data.stack,\n cleaned,\n unserializable,\n path.concat(['stack']),\n isPathAllowed,\n isPathAllowedCheck ? 1 : level + 1,\n );\n\n if ('cause' in data) {\n value.cause = dehydrate(\n data.cause,\n cleaned,\n unserializable,\n path.concat(['cause']),\n isPathAllowed,\n isPathAllowedCheck ? 1 : level + 1,\n );\n }\n\n getAllEnumerableKeys(data).forEach(key => {\n const keyAsString = key.toString();\n\n value[keyAsString] = dehydrate(\n data[key],\n cleaned,\n unserializable,\n path.concat([keyAsString]),\n isPathAllowed,\n isPathAllowedCheck ? 1 : level + 1,\n );\n });\n\n unserializable.push(path);\n\n return value;\n }\n case 'infinity':\n case 'nan':\n case 'undefined':\n // Some values are lossy when sent through a WebSocket.\n // We dehydrate+rehydrate them to preserve their type.\n cleaned.push(path);\n return {type};\n\n default:\n return data;\n }\n}\n\nfunction dehydrateKey(\n parent: Object,\n key: number | string | symbol,\n cleaned: Array<Array<string | number>>,\n unserializable: Array<Array<string | number>>,\n path: Array<string | number>,\n isPathAllowed: (path: Array<string | number>) => boolean,\n level: number = 0,\n): DehydratedData['data'] {\n try {\n return dehydrate(\n parent[key],\n cleaned,\n unserializable,\n path,\n isPathAllowed,\n level,\n );\n } catch (error) {\n let preview = '';\n if (\n typeof error === 'object' &&\n error !== null &&\n typeof error.stack === 'string'\n ) {\n preview = error.stack;\n } else if (typeof error === 'string') {\n preview = error;\n }\n cleaned.push(path);\n return {\n inspectable: false,\n preview_short: '[Exception]',\n preview_long: preview ? '[Exception: ' + preview + ']' : '[Exception]',\n name: preview,\n type: 'unknown',\n };\n }\n}\n\nexport function fillInPath(\n object: Object,\n data: DehydratedData,\n path: InspectedElementPath,\n value: any,\n) {\n const target = getInObject(object, path);\n if (target != null) {\n if (!target[meta.unserializable]) {\n delete target[meta.inspectable];\n delete target[meta.inspected];\n delete target[meta.name];\n delete target[meta.preview_long];\n delete target[meta.preview_short];\n delete target[meta.readonly];\n delete target[meta.size];\n delete target[meta.type];\n }\n }\n\n if (value !== null && data.unserializable.length > 0) {\n const unserializablePath = data.unserializable[0];\n let isMatch = unserializablePath.length === path.length;\n for (let i = 0; i < path.length; i++) {\n if (path[i] !== unserializablePath[i]) {\n isMatch = false;\n break;\n }\n }\n if (isMatch) {\n upgradeUnserializable(value, value);\n }\n }\n\n setInObject(object, path, value);\n}\n\nexport function hydrate(\n object: any,\n cleaned: Array<Array<string | number>>,\n unserializable: Array<Array<string | number>>,\n): Object {\n cleaned.forEach((path: Array<string | number>) => {\n const length = path.length;\n const last = path[length - 1];\n const parent = getInObject(object, path.slice(0, length - 1));\n if (!parent || !parent.hasOwnProperty(last)) {\n return;\n }\n\n const value = parent[last];\n\n if (!value) {\n return;\n } else if (value.type === 'infinity') {\n parent[last] = Infinity;\n } else if (value.type === 'nan') {\n parent[last] = NaN;\n } else if (value.type === 'undefined') {\n parent[last] = undefined;\n } else {\n // Replace the string keys with Symbols so they're non-enumerable.\n const replaced: {[key: symbol]: boolean | string} = {};\n replaced[meta.inspectable] = !!value.inspectable;\n replaced[meta.inspected] = false;\n replaced[meta.name] = value.name;\n replaced[meta.preview_long] = value.preview_long;\n replaced[meta.preview_short] = value.preview_short;\n replaced[meta.size] = value.size;\n replaced[meta.readonly] = !!value.readonly;\n replaced[meta.type] = value.type;\n\n parent[last] = replaced;\n }\n });\n unserializable.forEach((path: Array<string | number>) => {\n const length = path.length;\n const last = path[length - 1];\n const parent = getInObject(object, path.slice(0, length - 1));\n if (!parent || !parent.hasOwnProperty(last)) {\n return;\n }\n\n const node = parent[last];\n\n const replacement = {\n ...node,\n };\n\n upgradeUnserializable(replacement, node);\n\n parent[last] = replacement;\n });\n return object;\n}\n\nfunction upgradeUnserializable(destination: Object, source: Object) {\n Object.defineProperties(destination, {\n // $FlowFixMe[invalid-computed-prop]\n [meta.inspected]: {\n configurable: true,\n enumerable: false,\n value: !!source.inspected,\n },\n // $FlowFixMe[invalid-computed-prop]\n [meta.name]: {\n configurable: true,\n enumerable: false,\n value: source.name,\n },\n // $FlowFixMe[invalid-computed-prop]\n [meta.preview_long]: {\n configurable: true,\n enumerable: false,\n value: source.preview_long,\n },\n // $FlowFixMe[invalid-computed-prop]\n [meta.preview_short]: {\n configurable: true,\n enumerable: false,\n value: source.preview_short,\n },\n // $FlowFixMe[invalid-computed-prop]\n [meta.size]: {\n configurable: true,\n enumerable: false,\n value: source.size,\n },\n // $FlowFixMe[invalid-computed-prop]\n [meta.readonly]: {\n configurable: true,\n enumerable: false,\n value: !!source.readonly,\n },\n // $FlowFixMe[invalid-computed-prop]\n [meta.type]: {\n configurable: true,\n enumerable: false,\n value: source.type,\n },\n // $FlowFixMe[invalid-computed-prop]\n [meta.unserializable]: {\n configurable: true,\n enumerable: false,\n value: !!source.unserializable,\n },\n });\n\n delete destination.inspected;\n delete destination.name;\n delete destination.preview_long;\n delete destination.preview_short;\n delete destination.size;\n delete destination.readonly;\n delete destination.type;\n delete destination.unserializable;\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\ndeclare function isArray<T>(\n v: T,\n // eslint-disable-next-line\n): v is T extends $ReadOnlyArray<mixed> ? T : empty;\n\nconst isArrayImpl = Array.isArray;\n\nfunction isArray(a: mixed): boolean {\n return isArrayImpl(a);\n}\n\nexport default isArray;\n","/**\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport {compareVersions} from 'compare-versions';\nimport {dehydrate} from 'react-devtools-shared/src/hydration';\nimport isArray from 'shared/isArray';\n\nimport type {DehydratedData} from 'react-devtools-shared/src/frontend/types';\n\nexport {default as formatWithStyles} from './formatWithStyles';\nexport {default as formatConsoleArguments} from './formatConsoleArguments';\n\n// TODO: update this to the first React version that has a corresponding DevTools backend\nconst FIRST_DEVTOOLS_BACKEND_LOCKSTEP_VER = '999.9.9';\nexport function hasAssignedBackend(version?: string): boolean {\n if (version == null || version === '') {\n return false;\n }\n return gte(version, FIRST_DEVTOOLS_BACKEND_LOCKSTEP_VER);\n}\n\nexport function cleanForBridge(\n data: Object | null,\n isPathAllowed: (path: Array<string | number>) => boolean,\n path: Array<string | number> = [],\n): DehydratedData | null {\n if (data !== null) {\n const cleanedPaths: Array<Array<string | number>> = [];\n const unserializablePaths: Array<Array<string | number>> = [];\n const cleanedData = dehydrate(\n data,\n cleanedPaths,\n unserializablePaths,\n path,\n isPathAllowed,\n );\n\n return {\n data: cleanedData,\n cleaned: cleanedPaths,\n unserializable: unserializablePaths,\n };\n } else {\n return null;\n }\n}\n\nexport function copyWithDelete(\n obj: Object | Array<any>,\n path: Array<string | number>,\n index: number = 0,\n): Object | Array<any> {\n const key = path[index];\n const updated = isArray(obj) ? obj.slice() : {...obj};\n if (index + 1 === path.length) {\n if (isArray(updated)) {\n updated.splice(((key: any): number), 1);\n } else {\n delete updated[key];\n }\n } else {\n // $FlowFixMe[incompatible-use] number or string is fine here\n updated[key] = copyWithDelete(obj[key], path, index + 1);\n }\n return updated;\n}\n\n// This function expects paths to be the same except for the final value.\n// e.g. ['path', 'to', 'foo'] and ['path', 'to', 'bar']\nexport function copyWithRename(\n obj: Object | Array<any>,\n oldPath: Array<string | number>,\n newPath: Array<string | number>,\n index: number = 0,\n): Object | Array<any> {\n const oldKey = oldPath[index];\n const updated = isArray(obj) ? obj.slice() : {...obj};\n if (index + 1 === oldPath.length) {\n const newKey = newPath[index];\n // $FlowFixMe[incompatible-use] number or string is fine here\n updated[newKey] = updated[oldKey];\n if (isArray(updated)) {\n updated.splice(((oldKey: any): number), 1);\n } else {\n delete updated[oldKey];\n }\n } else {\n // $FlowFixMe[incompatible-use] number or string is fine here\n updated[oldKey] = copyWithRename(obj[oldKey], oldPath, newPath, index + 1);\n }\n return updated;\n}\n\nexport function copyWithSet(\n obj: Object | Array<any>,\n path: Array<string | number>,\n value: any,\n index: number = 0,\n): Object | Array<any> {\n if (index >= path.length) {\n return value;\n }\n const key = path[index];\n const updated = isArray(obj) ? obj.slice() : {...obj};\n // $FlowFixMe[incompatible-use] number or string is fine here\n updated[key] = copyWithSet(obj[key], path, value, index + 1);\n return updated;\n}\n\nexport function getEffectDurations(root: Object): {\n effectDuration: any | null,\n passiveEffectDuration: any | null,\n} {\n // Profiling durations are only available for certain builds.\n // If available, they'll be stored on the HostRoot.\n let effectDuration = null;\n let passiveEffectDuration = null;\n const hostRoot = root.current;\n if (hostRoot != null) {\n const stateNode = hostRoot.stateNode;\n if (stateNode != null) {\n effectDuration =\n stateNode.effectDuration != null ? stateNode.effectDuration : null;\n passiveEffectDuration =\n stateNode.passiveEffectDuration != null\n ? stateNode.passiveEffectDuration\n : null;\n }\n }\n return {effectDuration, passiveEffectDuration};\n}\n\nexport function serializeToString(data: any): string {\n if (data === undefined) {\n return 'undefined';\n }\n\n if (typeof data === 'function') {\n return data.toString();\n }\n\n const cache = new Set<mixed>();\n // Use a custom replacer function to protect against circular references.\n return JSON.stringify(\n data,\n (key: string, value: any) => {\n if (typeof value === 'object' && value !== null) {\n if (cache.has(value)) {\n return;\n }\n cache.add(value);\n }\n if (typeof value === 'bigint') {\n return value.toString() + 'n';\n }\n return value;\n },\n 2,\n );\n}\n\nfunction safeToString(val: any): string {\n try {\n return String(val);\n } catch (err) {\n if (typeof val === 'object') {\n // An object with no prototype and no `[Symbol.toPrimitive]()`, `toString()`, and `valueOf()` methods would throw.\n // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion\n return '[object Object]';\n }\n throw err;\n }\n}\n\n// based on https://github.com/tmpfs/format-util/blob/0e62d430efb0a1c51448709abd3e2406c14d8401/format.js#L1\n// based on https://developer.mozilla.org/en-US/docs/Web/API/console#Using_string_substitutions\n// Implements s, d, i and f placeholders\nexport function formatConsoleArgumentsToSingleString(\n maybeMessage: any,\n ...inputArgs: $ReadOnlyArray<any>\n): string {\n const args = inputArgs.slice();\n\n let formatted: string = safeToString(maybeMessage);\n\n // If the first argument is a string, check for substitutions.\n if (typeof maybeMessage === 'string') {\n if (args.length) {\n const REGEXP = /(%?)(%([jds]))/g;\n\n // $FlowFixMe[incompatible-call]\n formatted = formatted.replace(REGEXP, (match, escaped, ptn, flag) => {\n let arg = args.shift();\n switch (flag) {\n case 's':\n // $FlowFixMe[unsafe-addition]\n arg += '';\n break;\n case 'd':\n case 'i':\n arg = parseInt(arg, 10).toString();\n break;\n case 'f':\n arg = parseFloat(arg).toString();\n break;\n }\n if (!escaped) {\n return arg;\n }\n args.unshift(arg);\n return match;\n });\n }\n }\n\n // Arguments that remain after formatting.\n if (args.length) {\n for (let i = 0; i < args.length; i++) {\n formatted += ' ' + safeToString(args[i]);\n }\n }\n\n // Update escaped %% values.\n formatted = formatted.replace(/%{2,2}/g, '%');\n\n return String(formatted);\n}\n\nexport function isSynchronousXHRSupported(): boolean {\n return !!(\n window.document &&\n window.document.featurePolicy &&\n window.document.featurePolicy.allowsFeature('sync-xhr')\n );\n}\n\nexport function gt(a: string = '', b: string = ''): boolean {\n return compareVersions(a, b) === 1;\n}\n\nexport function gte(a: string = '', b: string = ''): boolean {\n return compareVersions(a, b) > -1;\n}\n\nexport const isReactNativeEnvironment = (): boolean => {\n // We've been relying on this for such a long time\n // We should probably define the client for DevTools on the backend side and share it with the frontend\n return window.document == null;\n};\n\n// 0.123456789 => 0.123\n// Expects high-resolution timestamp in milliseconds, like from performance.now()\n// Mainly used for optimizing the size of serialized profiling payload\nexport function formatDurationToMicrosecondsGranularity(\n duration: number,\n): number {\n return Math.round(duration * 1000) / 1000;\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nexport interface Rect {\n bottom: number;\n height: number;\n left: number;\n right: number;\n top: number;\n width: number;\n}\n\n// Get the window object for the document that a node belongs to,\n// or return null if it cannot be found (node not attached to DOM,\n// etc).\nexport function getOwnerWindow(node: HTMLElement): typeof window | null {\n if (!node.ownerDocument) {\n return null;\n }\n return node.ownerDocument.defaultView;\n}\n\n// Get the iframe containing a node, or return null if it cannot\n// be found (node not within iframe, etc).\nexport function getOwnerIframe(node: HTMLElement): HTMLElement | null {\n const nodeWindow = getOwnerWindow(node);\n if (nodeWindow) {\n return nodeWindow.frameElement;\n }\n return null;\n}\n\n// Get a bounding client rect for a node, with an\n// offset added to compensate for its border.\nexport function getBoundingClientRectWithBorderOffset(node: HTMLElement): Rect {\n const dimensions = getElementDimensions(node);\n // $FlowFixMe[incompatible-variance]\n return mergeRectOffsets([\n node.getBoundingClientRect(),\n {\n top: dimensions.borderTop,\n left: dimensions.borderLeft,\n bottom: dimensions.borderBottom,\n right: dimensions.borderRight,\n // This width and height won't get used by mergeRectOffsets (since this\n // is not the first rect in the array), but we set them so that this\n // object type checks as a ClientRect.\n width: 0,\n height: 0,\n },\n ]);\n}\n\n// Add together the top, left, bottom, and right properties of\n// each ClientRect, but keep the width and height of the first one.\nexport function mergeRectOffsets(rects: Array<Rect>): Rect {\n return rects.reduce((previousRect, rect) => {\n if (previousRect == null) {\n return rect;\n }\n\n return {\n top: previousRect.top + rect.top,\n left: previousRect.left + rect.left,\n width: previousRect.width,\n height: previousRect.height,\n bottom: previousRect.bottom + rect.bottom,\n right: previousRect.right + rect.right,\n };\n });\n}\n\n// Calculate a boundingClientRect for a node relative to boundaryWindow,\n// taking into account any offsets caused by intermediate iframes.\nexport function getNestedBoundingClientRect(\n node: HTMLElement,\n boundaryWindow: typeof window,\n): Rect {\n const ownerIframe = getOwnerIframe(node);\n if (ownerIframe && ownerIframe !== boundaryWindow) {\n const rects: Array<Rect | ClientRect> = [node.getBoundingClientRect()];\n let currentIframe: null | HTMLElement = ownerIframe;\n let onlyOneMore = false;\n while (currentIframe) {\n const rect = getBoundingClientRectWithBorderOffset(currentIframe);\n rects.push(rect);\n currentIframe = getOwnerIframe(currentIframe);\n\n if (onlyOneMore) {\n break;\n }\n // We don't want to calculate iframe offsets upwards beyond\n // the iframe containing the boundaryWindow, but we\n // need to calculate the offset relative to the boundaryWindow.\n if (currentIframe && getOwnerWindow(currentIframe) === boundaryWindow) {\n onlyOneMore = true;\n }\n }\n\n // $FlowFixMe[incompatible-variance]\n return mergeRectOffsets(rects);\n } else {\n // $FlowFixMe[incompatible-variance]\n return node.getBoundingClientRect();\n }\n}\n\nexport function getElementDimensions(domElement: HTMLElement): {\n borderBottom: number,\n borderLeft: number,\n borderRight: number,\n borderTop: number,\n marginBottom: number,\n marginLeft: number,\n marginRight: number,\n marginTop: number,\n paddingBottom: number,\n paddingLeft: number,\n paddingRight: number,\n paddingTop: number,\n} {\n const calculatedStyle = window.getComputedStyle(domElement);\n return {\n borderLeft: parseInt(calculatedStyle.borderLeftWidth, 10),\n borderRight: parseInt(calculatedStyle.borderRightWidth, 10),\n borderTop: parseInt(calculatedStyle.borderTopWidth, 10),\n borderBottom: parseInt(calculatedStyle.borderBottomWidth, 10),\n marginLeft: parseInt(calculatedStyle.marginLeft, 10),\n marginRight: parseInt(calculatedStyle.marginRight, 10),\n marginTop: parseInt(calculatedStyle.marginTop, 10),\n marginBottom: parseInt(calculatedStyle.marginBottom, 10),\n paddingLeft: parseInt(calculatedStyle.paddingLeft, 10),\n paddingRight: parseInt(calculatedStyle.paddingRight, 10),\n paddingTop: parseInt(calculatedStyle.paddingTop, 10),\n paddingBottom: parseInt(calculatedStyle.paddingBottom, 10),\n };\n}\n\nexport function extractHOCNames(displayName: string): {\n baseComponentName: string,\n hocNames: string[],\n} {\n if (!displayName) return {baseComponentName: '', hocNames: []};\n\n const hocRegex = /([A-Z][a-zA-Z0-9]*?)\\((.*)\\)/g;\n const hocNames: string[] = [];\n let baseComponentName = displayName;\n let match;\n\n while ((match = hocRegex.exec(baseComponentName)) != null) {\n if (Array.isArray(match)) {\n const [, hocName, inner] = match;\n hocNames.push(hocName);\n baseComponentName = inner;\n }\n }\n\n return {\n baseComponentName,\n hocNames,\n };\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport {getElementDimensions, getNestedBoundingClientRect} from '../utils';\n\nimport type {Rect} from '../utils';\nimport type Agent from 'react-devtools-shared/src/backend/agent';\n\ntype Box = {top: number, left: number, width: number, height: number};\n\nconst assign = Object.assign;\n\n// Note that the Overlay components are not affected by the active Theme,\n// because they highlight elements in the main Chrome window (outside of devtools).\n// The colors below were chosen to roughly match those used by Chrome devtools.\n\nclass OverlayRect {\n node: HTMLElement;\n border: HTMLElement;\n padding: HTMLElement;\n content: HTMLElement;\n\n constructor(doc: Document, container: HTMLElement) {\n this.node = doc.createElement('div');\n this.border = doc.createElement('div');\n this.padding = doc.createElement('div');\n this.content = doc.createElement('div');\n\n this.border.style.borderColor = overlayStyles.border;\n this.padding.style.borderColor = overlayStyles.padding;\n this.content.style.backgroundColor = overlayStyles.background;\n\n assign(this.node.style, {\n borderColor: overlayStyles.margin,\n pointerEvents: 'none',\n position: 'fixed',\n });\n\n this.node.style.zIndex = '10000000';\n\n this.node.appendChild(this.border);\n this.border.appendChild(this.padding);\n this.padding.appendChild(this.content);\n container.appendChild(this.node);\n }\n\n remove() {\n if (this.node.parentNode) {\n this.node.parentNode.removeChild(this.node);\n }\n }\n\n update(box: Rect, dims: any) {\n boxWrap(dims, 'margin', this.node);\n boxWrap(dims, 'border', this.border);\n boxWrap(dims, 'padding', this.padding);\n\n assign(this.content.style, {\n height:\n box.height -\n dims.borderTop -\n dims.borderBottom -\n dims.paddingTop -\n dims.paddingBottom +\n 'px',\n width:\n box.width -\n dims.borderLeft -\n dims.borderRight -\n dims.paddingLeft -\n dims.paddingRight +\n 'px',\n });\n\n assign(this.node.style, {\n top: box.top - dims.marginTop + 'px',\n left: box.left - dims.marginLeft + 'px',\n });\n }\n}\n\nclass OverlayTip {\n tip: HTMLElement;\n nameSpan: HTMLElement;\n dimSpan: HTMLElement;\n\n constructor(doc: Document, container: HTMLElement) {\n this.tip = doc.createElement('div');\n assign(this.tip.style, {\n display: 'flex',\n flexFlow: 'row nowrap',\n backgroundColor: '#333740',\n borderRadius: '2px',\n fontFamily:\n '\"SFMono-Regular\", Consolas, \"Liberation Mono\", Menlo, Courier, monospace',\n fontWeight: 'bold',\n padding: '3px 5px',\n pointerEvents: 'none',\n position: 'fixed',\n fontSize: '12px',\n whiteSpace: 'nowrap',\n });\n\n this.nameSpan = doc.createElement('span');\n this.tip.appendChild(this.nameSpan);\n assign(this.nameSpan.style, {\n color: '#ee78e6',\n borderRight: '1px solid #aaaaaa',\n paddingRight: '0.5rem',\n marginRight: '0.5rem',\n });\n this.dimSpan = doc.createElement('span');\n this.tip.appendChild(this.dimSpan);\n assign(this.dimSpan.style, {\n color: '#d7d7d7',\n });\n\n this.tip.style.zIndex = '10000000';\n container.appendChild(this.tip);\n }\n\n remove() {\n if (this.tip.parentNode) {\n this.tip.parentNode.removeChild(this.tip);\n }\n }\n\n updateText(name: string, width: number, height: number) {\n this.nameSpan.textContent = name;\n this.dimSpan.textContent =\n Math.round(width) + 'px × ' + Math.round(height) + 'px';\n }\n\n updatePosition(dims: Box, bounds: Box) {\n const tipRect = this.tip.getBoundingClientRect();\n const tipPos = findTipPos(dims, bounds, {\n width: tipRect.width,\n height: tipRect.height,\n });\n assign(this.tip.style, tipPos.style);\n }\n}\n\nexport default class Overlay {\n window: any;\n tipBoundsWindow: any;\n container: HTMLElement;\n tip: OverlayTip;\n rects: Array<OverlayRect>;\n agent: Agent;\n\n constructor(agent: Agent) {\n // Find the root window, because overlays are positioned relative to it.\n const currentWindow = window.__REACT_DEVTOOLS_TARGET_WINDOW__ || window;\n this.window = currentWindow;\n\n // When opened in shells/dev, the tooltip should be bound by the app iframe, not by the topmost window.\n const tipBoundsWindow = window.__REACT_DEVTOOLS_TARGET_WINDOW__ || window;\n this.tipBoundsWindow = tipBoundsWindow;\n\n const doc = currentWindow.document;\n this.container = doc.createElement('div');\n this.container.style.zIndex = '10000000';\n\n this.tip = new OverlayTip(doc, this.container);\n this.rects = [];\n\n this.agent = agent;\n\n doc.body.appendChild(this.container);\n }\n\n remove() {\n this.tip.remove();\n this.rects.forEach(rect => {\n rect.remove();\n });\n this.rects.length = 0;\n if (this.container.parentNode) {\n this.container.parentNode.removeChild(this.container);\n }\n }\n\n inspect(nodes: $ReadOnlyArray<HTMLElement | Text>, name?: ?string) {\n // We can't get the size of text nodes or comment nodes. React as of v15\n // heavily uses comment nodes to delimit text.\n // TODO: We actually can measure text nodes. We should.\n const elements: $ReadOnlyArray<HTMLElement> = (nodes.filter(\n node => node.nodeType === Node.ELEMENT_NODE,\n ): any);\n\n while (this.rects.length > elements.length) {\n const rect = this.rects.pop();\n // $FlowFixMe[incompatible-use]\n rect.remove();\n }\n if (elements.length === 0) {\n return;\n }\n\n while (this.rects.length < elements.length) {\n this.rects.push(new OverlayRect(this.window.document, this.container));\n }\n\n const outerBox = {\n top: Number.POSITIVE_INFINITY,\n right: Number.NEGATIVE_INFINITY,\n bottom: Number.NEGATIVE_INFINITY,\n left: Number.POSITIVE_INFINITY,\n };\n elements.forEach((element, index) => {\n const box = getNestedBoundingClientRect(element, this.window);\n const dims = getElementDimensions(element);\n\n outerBox.top = Math.min(outerBox.top, box.top - dims.marginTop);\n outerBox.right = Math.max(\n outerBox.right,\n box.left + box.width + dims.marginRight,\n );\n outerBox.bottom = Math.max(\n outerBox.bottom,\n box.top + box.height + dims.marginBottom,\n );\n outerBox.left = Math.min(outerBox.left, box.left - dims.marginLeft);\n\n const rect = this.rects[index];\n rect.update(box, dims);\n });\n\n if (!name) {\n name = elements[0].nodeName.toLowerCase();\n\n const node = elements[0];\n const ownerName = this.agent.getComponentNameForHostInstance(node);\n if (ownerName) {\n name += ' (in ' + ownerName + ')';\n }\n }\n\n this.tip.updateText(\n name,\n outerBox.right - outerBox.left,\n outerBox.bottom - outerBox.top,\n );\n const tipBounds = getNestedBoundingClientRect(\n this.tipBoundsWindow.document.documentElement,\n this.window,\n );\n\n this.tip.updatePosition(\n {\n top: outerBox.top,\n left: outerBox.left,\n height: outerBox.bottom - outerBox.top,\n width: outerBox.right - outerBox.left,\n },\n {\n top: tipBounds.top + this.tipBoundsWindow.scrollY,\n left: tipBounds.left + this.tipBoundsWindow.scrollX,\n height: this.tipBoundsWindow.innerHeight,\n width: this.tipBoundsWindow.innerWidth,\n },\n );\n }\n}\n\nfunction findTipPos(\n dims: Box,\n bounds: Box,\n tipSize: {height: number, width: number},\n) {\n const tipHeight = Math.max(tipSize.height, 20);\n const tipWidth = Math.max(tipSize.width, 60);\n const margin = 5;\n\n let top: number | string;\n if (dims.top + dims.height + tipHeight <= bounds.top + bounds.height) {\n if (dims.top + dims.height < bounds.top + 0) {\n top = bounds.top + margin;\n } else {\n top = dims.top + dims.height + margin;\n }\n } else if (dims.top - tipHeight <= bounds.top + bounds.height) {\n if (dims.top - tipHeight - margin < bounds.top + margin) {\n top = bounds.top + margin;\n } else {\n top = dims.top - tipHeight - margin;\n }\n } else {\n top = bounds.top + bounds.height - tipHeight - margin;\n }\n\n let left: number | string = dims.left + margin;\n if (dims.left < bounds.left) {\n left = bounds.left + margin;\n }\n if (dims.left + tipWidth > bounds.left + bounds.width) {\n left = bounds.left + bounds.width - tipWidth - margin;\n }\n\n top += 'px';\n left += 'px';\n return {\n style: {top, left},\n };\n}\n\nfunction boxWrap(dims: any, what: string, node: HTMLElement) {\n assign(node.style, {\n borderTopWidth: dims[what + 'Top'] + 'px',\n borderLeftWidth: dims[what + 'Left'] + 'px',\n borderRightWidth: dims[what + 'Right'] + 'px',\n borderBottomWidth: dims[what + 'Bottom'] + 'px',\n borderStyle: 'solid',\n });\n}\n\nconst overlayStyles = {\n background: 'rgba(120, 170, 210, 0.7)',\n padding: 'rgba(77, 200, 0, 0.3)',\n margin: 'rgba(255, 155, 0, 0.3)',\n border: 'rgba(255, 200, 50, 0.3)',\n};\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport type Agent from 'react-devtools-shared/src/backend/agent';\nimport type {HostInstance} from '../../types';\n\nimport {isReactNativeEnvironment} from 'react-devtools-shared/src/backend/utils';\n\nimport Overlay from './Overlay';\n\nconst SHOW_DURATION = 2000;\n\nlet timeoutID: TimeoutID | null = null;\nlet overlay: Overlay | null = null;\n\nfunction hideOverlayNative(agent: Agent): void {\n agent.emit('hideNativeHighlight');\n}\n\nfunction hideOverlayWeb(): void {\n timeoutID = null;\n\n if (overlay !== null) {\n overlay.remove();\n overlay = null;\n }\n}\n\nexport function hideOverlay(agent: Agent): void {\n return isReactNativeEnvironment()\n ? hideOverlayNative(agent)\n : hideOverlayWeb();\n}\n\nfunction showOverlayNative(\n elements: $ReadOnlyArray<HostInstance>,\n agent: Agent,\n): void {\n agent.emit('showNativeHighlight', elements);\n}\n\nfunction showOverlayWeb(\n elements: $ReadOnlyArray<HTMLElement>,\n componentName: string | null,\n agent: Agent,\n hideAfterTimeout: boolean,\n): void {\n if (timeoutID !== null) {\n clearTimeout(timeoutID);\n }\n\n if (overlay === null) {\n overlay = new Overlay(agent);\n }\n\n overlay.inspect(elements, componentName);\n\n if (hideAfterTimeout) {\n timeoutID = setTimeout(() => hideOverlay(agent), SHOW_DURATION);\n }\n}\n\nexport function showOverlay(\n elements: $ReadOnlyArray<HostInstance>,\n componentName: string | null,\n agent: Agent,\n hideAfterTimeout: boolean,\n): void {\n return isReactNativeEnvironment()\n ? showOverlayNative(elements, agent)\n : showOverlayWeb(\n (elements: $ReadOnlyArray<any>),\n componentName,\n agent,\n hideAfterTimeout,\n );\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport Agent from 'react-devtools-shared/src/backend/agent';\nimport {hideOverlay, showOverlay} from './Highlighter';\n\nimport type {HostInstance} from 'react-devtools-shared/src/backend/types';\nimport type {BackendBridge} from 'react-devtools-shared/src/bridge';\nimport type {RendererInterface} from '../../types';\n\n// This plug-in provides in-page highlighting of the selected element.\n// It is used by the browser extension and the standalone DevTools shell (when connected to a browser).\n// It is not currently the mechanism used to highlight React Native views.\n// That is done by the React Native Inspector component.\n\nlet iframesListeningTo: Set<HTMLIFrameElement> = new Set();\nlet inspectOnlySuspenseNodes = false;\n\nexport default function setupHighlighter(\n bridge: BackendBridge,\n agent: Agent,\n): void {\n bridge.addListener('clearHostInstanceHighlight', clearHostInstanceHighlight);\n bridge.addListener('highlightHostInstance', highlightHostInstance);\n bridge.addListener('highlightHostInstances', highlightHostInstances);\n bridge.addListener('scrollToHostInstance', scrollToHostInstance);\n bridge.addListener('shutdown', stopInspectingHost);\n bridge.addListener('startInspectingHost', startInspectingHost);\n bridge.addListener('stopInspectingHost', stopInspectingHost);\n\n function startInspectingHost(onlySuspenseNodes: boolean) {\n inspectOnlySuspenseNodes = onlySuspenseNodes;\n registerListenersOnWindow(window);\n }\n\n function registerListenersOnWindow(window: any) {\n // This plug-in may run in non-DOM environments (e.g. React Native).\n if (window && typeof window.addEventListener === 'function') {\n window.addEventListener('click', onClick, true);\n window.addEventListener('mousedown', onMouseEvent, true);\n window.addEventListener('mouseover', onMouseEvent, true);\n window.addEventListener('mouseup', onMouseEvent, true);\n window.addEventListener('pointerdown', onPointerDown, true);\n window.addEventListener('pointermove', onPointerMove, true);\n window.addEventListener('pointerup', onPointerUp, true);\n } else {\n agent.emit('startInspectingNative');\n }\n }\n\n function stopInspectingHost() {\n hideOverlay(agent);\n removeListenersOnWindow(window);\n iframesListeningTo.forEach(function (frame) {\n try {\n removeListenersOnWindow(frame.contentWindow);\n } catch (error) {\n // This can error when the iframe is on a cross-origin.\n }\n });\n iframesListeningTo = new Set();\n }\n\n function removeListenersOnWindow(window: any) {\n // This plug-in may run in non-DOM environments (e.g. React Native).\n if (window && typeof window.removeEventListener === 'function') {\n window.removeEventListener('click', onClick, true);\n window.removeEventListener('mousedown', onMouseEvent, true);\n window.removeEventListener('mouseover', onMouseEvent, true);\n window.removeEventListener('mouseup', onMouseEvent, true);\n window.removeEventListener('pointerdown', onPointerDown, true);\n window.removeEventListener('pointermove', onPointerMove, true);\n window.removeEventListener('pointerup', onPointerUp, true);\n } else {\n agent.emit('stopInspectingNative');\n }\n }\n\n function clearHostInstanceHighlight() {\n hideOverlay(agent);\n }\n\n function highlightHostInstance({\n displayName,\n hideAfterTimeout,\n id,\n openBuiltinElementsPanel,\n rendererID,\n scrollIntoView,\n }: {\n displayName: string | null,\n hideAfterTimeout: boolean,\n id: number,\n openBuiltinElementsPanel: boolean,\n rendererID: number,\n scrollIntoView: boolean,\n ...\n }) {\n const renderer = agent.rendererInterfaces[rendererID];\n if (renderer == null) {\n console.warn(`Invalid renderer id \"${rendererID}\" for element \"${id}\"`);\n\n hideOverlay(agent);\n return;\n }\n\n // In some cases fiber may already be unmounted\n if (!renderer.hasElementWithId(id)) {\n hideOverlay(agent);\n return;\n }\n\n const nodes = renderer.findHostInstancesForElementID(id);\n if (nodes != null) {\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n if (node === null) {\n continue;\n }\n const nodeRects =\n // $FlowFixMe[method-unbinding]\n typeof node.getClientRects === 'function'\n ? node.getClientRects()\n : [];\n // If this is currently display: none, then try another node.\n // This can happen when one of the host instances is a hoistable.\n if (\n nodeRects.length > 0 &&\n (nodeRects.length > 2 ||\n nodeRects[0].width > 0 ||\n nodeRects[0].height > 0)\n ) {\n // $FlowFixMe[method-unbinding]\n if (scrollIntoView && typeof node.scrollIntoView === 'function') {\n if (scrollDelayTimer) {\n clearTimeout(scrollDelayTimer);\n scrollDelayTimer = null;\n }\n // If the node isn't visible show it before highlighting it.\n // We may want to reconsider this; it might be a little disruptive.\n node.scrollIntoView({block: 'nearest', inline: 'nearest'});\n }\n\n showOverlay(nodes, displayName, agent, hideAfterTimeout);\n\n if (openBuiltinElementsPanel) {\n window.__REACT_DEVTOOLS_GLOBAL_HOOK__.$0 = node;\n bridge.send('syncSelectionToBuiltinElementsPanel');\n }\n return;\n }\n }\n }\n\n hideOverlay(agent);\n }\n\n function highlightHostInstances({\n displayName,\n hideAfterTimeout,\n elements,\n scrollIntoView,\n }: {\n displayName: string | null,\n hideAfterTimeout: boolean,\n elements: Array<{rendererID: number, id: number}>,\n scrollIntoView: boolean,\n }) {\n const nodes: Array<HostInstance> = [];\n for (let i = 0; i < elements.length; i++) {\n const {id, rendererID} = elements[i];\n const renderer = agent.rendererInterfaces[rendererID];\n if (renderer == null) {\n console.warn(`Invalid renderer id \"${rendererID}\" for element \"${id}\"`);\n continue;\n }\n\n // In some cases fiber may already be unmounted\n if (!renderer.hasElementWithId(id)) {\n continue;\n }\n\n const hostInstances = renderer.findHostInstancesForElementID(id);\n if (hostInstances !== null) {\n for (let j = 0; j < hostInstances.length; j++) {\n nodes.push(hostInstances[j]);\n }\n }\n }\n\n if (nodes.length > 0) {\n const node = nodes[0];\n // $FlowFixMe[method-unbinding]\n if (scrollIntoView && typeof node.scrollIntoView === 'function') {\n // If the node isn't visible show it before highlighting it.\n // We may want to reconsider this; it might be a little disruptive.\n node.scrollIntoView({block: 'nearest', inline: 'nearest'});\n }\n }\n\n showOverlay(nodes, displayName, agent, hideAfterTimeout);\n }\n\n function attemptScrollToHostInstance(\n renderer: RendererInterface,\n id: number,\n ) {\n const nodes = renderer.findHostInstancesForElementID(id);\n if (nodes != null) {\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n if (node === null) {\n continue;\n }\n const nodeRects =\n // $FlowFixMe[method-unbinding]\n typeof node.getClientRects === 'function'\n ? node.getClientRects()\n : [];\n // If this is currently display: none, then try another node.\n // This can happen when one of the host instances is a hoistable.\n if (\n nodeRects.length > 0 &&\n (nodeRects.length > 2 ||\n nodeRects[0].width > 0 ||\n nodeRects[0].height > 0)\n ) {\n // $FlowFixMe[method-unbinding]\n if (typeof node.scrollIntoView === 'function') {\n node.scrollIntoView({\n block: 'nearest',\n inline: 'nearest',\n behavior: 'smooth',\n });\n return true;\n }\n }\n }\n }\n return false;\n }\n\n let scrollDelayTimer = null;\n function scrollToHostInstance({\n id,\n rendererID,\n }: {\n id: number,\n rendererID: number,\n }) {\n // Always hide the existing overlay so it doesn't obscure the element.\n // If you wanted to show the overlay, highlightHostInstance should be used instead\n // with the scrollIntoView option.\n hideOverlay(agent);\n\n if (scrollDelayTimer) {\n clearTimeout(scrollDelayTimer);\n scrollDelayTimer = null;\n }\n\n const renderer = agent.rendererInterfaces[rendererID];\n if (renderer == null) {\n console.warn(`Invalid renderer id \"${rendererID}\" for element \"${id}\"`);\n return;\n }\n\n // In some cases fiber may already be unmounted\n if (!renderer.hasElementWithId(id)) {\n return;\n }\n\n if (attemptScrollToHostInstance(renderer, id)) {\n return;\n }\n\n // It's possible that the current state of a Suspense boundary doesn't have a position\n // in the tree. E.g. because it's not yet mounted in the state we're moving to.\n // Such as if it's in a null tree or inside another boundary's hidden state.\n // In this case we use the last known position and try to scroll to that.\n const rects = renderer.findLastKnownRectsForID(id);\n if (rects !== null && rects.length > 0) {\n let x = Infinity;\n let y = Infinity;\n for (let i = 0; i < rects.length; i++) {\n const rect = rects[i];\n if (rect.x < x) {\n x = rect.x;\n }\n if (rect.y < y) {\n y = rect.y;\n }\n }\n const element = document.documentElement;\n if (!element) {\n return;\n }\n // Check if the target corner is already in the viewport.\n if (\n x < window.scrollX ||\n y < window.scrollY ||\n x > window.scrollX + element.clientWidth ||\n y > window.scrollY + element.clientHeight\n ) {\n window.scrollTo({\n top: y,\n left: x,\n behavior: 'smooth',\n });\n }\n // It's possible that after mount, we're able to scroll deeper once the new nodes\n // have mounted. Let's try again after mount. Ideally we'd know which commit this\n // is going to be but for now we just try after 100ms.\n scrollDelayTimer = setTimeout(() => {\n attemptScrollToHostInstance(renderer, id);\n }, 100);\n }\n }\n\n function onClick(event: MouseEvent) {\n event.preventDefault();\n event.stopPropagation();\n\n stopInspectingHost();\n\n bridge.send('stopInspectingHost', true);\n }\n\n function onMouseEvent(event: MouseEvent) {\n event.preventDefault();\n event.stopPropagation();\n }\n\n function onPointerDown(event: MouseEvent) {\n event.preventDefault();\n event.stopPropagation();\n\n selectElementForNode(getEventTarget(event));\n }\n\n let lastHoveredNode: HTMLElement | null = null;\n function onPointerMove(event: MouseEvent) {\n event.preventDefault();\n event.stopPropagation();\n\n const target: HTMLElement = getEventTarget(event);\n if (lastHoveredNode === target) return;\n lastHoveredNode = target;\n\n if (target.tagName === 'IFRAME') {\n const iframe: HTMLIFrameElement = (target: any);\n try {\n if (!iframesListeningTo.has(iframe)) {\n const window = iframe.contentWindow;\n registerListenersOnWindow(window);\n iframesListeningTo.add(iframe);\n }\n } catch (error) {\n // This can error when the iframe is on a cross-origin.\n }\n }\n\n if (inspectOnlySuspenseNodes) {\n // For Suspense nodes we want to highlight not the actual target but the nodes\n // that are the root of the Suspense node.\n // TODO: Consider if we should just do the same for other elements because the\n // hovered node might just be one child of many in the Component.\n const match = agent.getIDForHostInstance(\n target,\n inspectOnlySuspenseNodes,\n );\n if (match !== null) {\n const renderer = agent.rendererInterfaces[match.rendererID];\n if (renderer == null) {\n console.warn(\n `Invalid renderer id \"${match.rendererID}\" for element \"${match.id}\"`,\n );\n return;\n }\n highlightHostInstance({\n displayName: renderer.getDisplayNameForElementID(match.id),\n hideAfterTimeout: false,\n id: match.id,\n openBuiltinElementsPanel: false,\n rendererID: match.rendererID,\n scrollIntoView: false,\n });\n }\n } else {\n // Don't pass the name explicitly.\n // It will be inferred from DOM tag and Fiber owner.\n showOverlay([target], null, agent, false);\n }\n }\n\n function onPointerUp(event: MouseEvent) {\n event.preventDefault();\n event.stopPropagation();\n }\n\n const selectElementForNode = (node: HTMLElement) => {\n const match = agent.getIDForHostInstance(node, inspectOnlySuspenseNodes);\n if (match !== null) {\n bridge.send('selectElement', match.id);\n }\n };\n\n function getEventTarget(event: MouseEvent): HTMLElement {\n if (event.composed) {\n return (event.composedPath()[0]: any);\n }\n\n return (event.target: any);\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport type {Data} from './index';\nimport type {Rect} from '../utils';\nimport type {HostInstance} from '../../types';\nimport type Agent from '../../agent';\n\nimport {isReactNativeEnvironment} from 'react-devtools-shared/src/backend/utils';\n\n// Note these colors are in sync with DevTools Profiler chart colors.\nconst COLORS = [\n '#37afa9',\n '#63b19e',\n '#80b393',\n '#97b488',\n '#abb67d',\n '#beb771',\n '#cfb965',\n '#dfba57',\n '#efbb49',\n '#febc38',\n];\n\nlet canvas: HTMLCanvasElement | null = null;\n\nfunction drawNative(nodeToData: Map<HostInstance, Data>, agent: Agent) {\n const nodesToDraw = [];\n iterateNodes(nodeToData, ({color, node}) => {\n nodesToDraw.push({node, color});\n });\n\n agent.emit('drawTraceUpdates', nodesToDraw);\n\n const mergedNodes = groupAndSortNodes(nodeToData);\n agent.emit('drawGroupedTraceUpdatesWithNames', mergedNodes);\n}\n\nfunction drawWeb(nodeToData: Map<HostInstance, Data>) {\n if (canvas === null) {\n initialize();\n }\n\n const dpr = window.devicePixelRatio || 1;\n const canvasFlow: HTMLCanvasElement = ((canvas: any): HTMLCanvasElement);\n canvasFlow.width = window.innerWidth * dpr;\n canvasFlow.height = window.innerHeight * dpr;\n canvasFlow.style.width = `${window.innerWidth}px`;\n canvasFlow.style.height = `${window.innerHeight}px`;\n\n const context = canvasFlow.getContext('2d');\n context.scale(dpr, dpr);\n\n context.clearRect(0, 0, canvasFlow.width / dpr, canvasFlow.height / dpr);\n\n const mergedNodes = groupAndSortNodes(nodeToData);\n\n mergedNodes.forEach(group => {\n drawGroupBorders(context, group);\n drawGroupLabel(context, group);\n });\n\n if (canvas !== null) {\n if (nodeToData.size === 0 && canvas.matches(':popover-open')) {\n // $FlowFixMe[prop-missing]: Flow doesn't recognize Popover API\n // $FlowFixMe[incompatible-use]: Flow doesn't recognize Popover API\n canvas.hidePopover();\n return;\n }\n // $FlowFixMe[incompatible-use]: Flow doesn't recognize Popover API\n if (canvas.matches(':popover-open')) {\n // $FlowFixMe[prop-missing]: Flow doesn't recognize Popover API\n // $FlowFixMe[incompatible-use]: Flow doesn't recognize Popover API\n canvas.hidePopover();\n }\n // $FlowFixMe[prop-missing]: Flow doesn't recognize Popover API\n // $FlowFixMe[incompatible-use]: Flow doesn't recognize Popover API\n canvas.showPopover();\n }\n}\n\ntype GroupItem = {\n rect: Rect,\n color: string,\n displayName: string | null,\n count: number,\n};\n\nexport type {GroupItem};\n\nexport function groupAndSortNodes(\n nodeToData: Map<HostInstance, Data>,\n): Array<Array<GroupItem>> {\n const positionGroups: Map<string, Array<GroupItem>> = new Map();\n\n iterateNodes(nodeToData, ({rect, color, displayName, count}) => {\n if (!rect) return;\n const key = `${rect.left},${rect.top}`;\n if (!positionGroups.has(key)) positionGroups.set(key, []);\n positionGroups.get(key)?.push({rect, color, displayName, count});\n });\n\n return Array.from(positionGroups.values()).sort((groupA, groupB) => {\n const maxCountA = Math.max(...groupA.map(item => item.count));\n const maxCountB = Math.max(...groupB.map(item => item.count));\n return maxCountA - maxCountB;\n });\n}\n\nfunction drawGroupBorders(\n context: CanvasRenderingContext2D,\n group: Array<GroupItem>,\n) {\n group.forEach(({color, rect}) => {\n context.beginPath();\n context.strokeStyle = color;\n context.rect(rect.left, rect.top, rect.width - 1, rect.height - 1);\n context.stroke();\n });\n}\n\nfunction drawGroupLabel(\n context: CanvasRenderingContext2D,\n group: Array<GroupItem>,\n) {\n const mergedName = group\n .map(({displayName, count}) =>\n displayName ? `${displayName}${count > 1 ? ` x${count}` : ''}` : '',\n )\n .filter(Boolean)\n .join(', ');\n\n if (mergedName) {\n drawLabel(context, group[0].rect, mergedName, group[0].color);\n }\n}\n\nexport function draw(nodeToData: Map<HostInstance, Data>, agent: Agent): void {\n return isReactNativeEnvironment()\n ? drawNative(nodeToData, agent)\n : drawWeb(nodeToData);\n}\n\ntype DataWithColorAndNode = {\n ...Data,\n color: string,\n node: HostInstance,\n};\n\nfunction iterateNodes(\n nodeToData: Map<HostInstance, Data>,\n execute: (data: DataWithColorAndNode) => void,\n) {\n nodeToData.forEach((data, node) => {\n const colorIndex = Math.min(COLORS.length - 1, data.count - 1);\n const color = COLORS[colorIndex];\n execute({\n color,\n node,\n count: data.count,\n displayName: data.displayName,\n expirationTime: data.expirationTime,\n lastMeasuredAt: data.lastMeasuredAt,\n rect: data.rect,\n });\n });\n}\n\nfunction drawLabel(\n context: CanvasRenderingContext2D,\n rect: Rect,\n text: string,\n color: string,\n): void {\n const {left, top} = rect;\n context.font = '10px monospace';\n context.textBaseline = 'middle';\n context.textAlign = 'center';\n\n const padding = 2;\n const textHeight = 14;\n\n const metrics = context.measureText(text);\n const backgroundWidth = metrics.width + padding * 2;\n const backgroundHeight = textHeight;\n const labelX = left;\n const labelY = top - backgroundHeight;\n\n context.fillStyle = color;\n context.fillRect(labelX, labelY, backgroundWidth, backgroundHeight);\n\n context.fillStyle = '#000000';\n context.fillText(\n text,\n labelX + backgroundWidth / 2,\n labelY + backgroundHeight / 2,\n );\n}\n\nfunction destroyNative(agent: Agent) {\n agent.emit('disableTraceUpdates');\n}\n\nfunction destroyWeb() {\n if (canvas !== null) {\n if (canvas.matches(':popover-open')) {\n // $FlowFixMe[prop-missing]: Flow doesn't recognize Popover API\n // $FlowFixMe[incompatible-use]: Flow doesn't recognize Popover API\n canvas.hidePopover();\n }\n\n // $FlowFixMe[incompatible-use]: Flow doesn't recognize Popover API and loses canvas nullability tracking\n if (canvas.parentNode != null) {\n // $FlowFixMe[incompatible-call]: Flow doesn't track that canvas is non-null here\n canvas.parentNode.removeChild(canvas);\n }\n canvas = null;\n }\n}\n\nexport function destroy(agent: Agent): void {\n return isReactNativeEnvironment() ? destroyNative(agent) : destroyWeb();\n}\n\nfunction initialize(): void {\n canvas = window.document.createElement('canvas');\n canvas.setAttribute('popover', 'manual');\n\n // $FlowFixMe[incompatible-use]: Flow doesn't recognize Popover API\n canvas.style.cssText = `\n xx-background-color: red;\n xx-opacity: 0.5;\n bottom: 0;\n left: 0;\n pointer-events: none;\n position: fixed;\n right: 0;\n top: 0;\n background-color: transparent;\n outline: none;\n box-shadow: none;\n border: none;\n `;\n\n const root = window.document.documentElement;\n root.insertBefore(canvas, root.firstChild);\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport Agent from 'react-devtools-shared/src/backend/agent';\nimport {destroy as destroyCanvas, draw} from './canvas';\nimport {extractHOCNames, getNestedBoundingClientRect} from '../utils';\n\nimport type {HostInstance} from '../../types';\nimport type {Rect} from '../utils';\n\n// How long the rect should be shown for?\nconst DISPLAY_DURATION = 250;\n\n// What's the longest we are willing to show the overlay for?\n// This can be important if we're getting a flurry of events (e.g. scroll update).\nconst MAX_DISPLAY_DURATION = 3000;\n\n// How long should a rect be considered valid for?\nconst REMEASUREMENT_AFTER_DURATION = 250;\n\n// Markers for different types of HOCs\nconst HOC_MARKERS = new Map([\n ['Forget', '✨'],\n ['Memo', '🧠'],\n]);\n\n// Some environments (e.g. React Native / Hermes) don't support the performance API yet.\nconst getCurrentTime =\n // $FlowFixMe[method-unbinding]\n typeof performance === 'object' && typeof performance.now === 'function'\n ? () => performance.now()\n : () => Date.now();\n\nexport type Data = {\n count: number,\n expirationTime: number,\n lastMeasuredAt: number,\n rect: Rect | null,\n displayName: string | null,\n};\n\nconst nodeToData: Map<HostInstance, Data> = new Map();\n\nlet agent: Agent = ((null: any): Agent);\nlet drawAnimationFrameID: AnimationFrameID | null = null;\nlet isEnabled: boolean = false;\nlet redrawTimeoutID: TimeoutID | null = null;\n\nexport function initialize(injectedAgent: Agent): void {\n agent = injectedAgent;\n agent.addListener('traceUpdates', traceUpdates);\n}\n\nexport function toggleEnabled(value: boolean): void {\n isEnabled = value;\n\n if (!isEnabled) {\n nodeToData.clear();\n\n if (drawAnimationFrameID !== null) {\n cancelAnimationFrame(drawAnimationFrameID);\n drawAnimationFrameID = null;\n }\n\n if (redrawTimeoutID !== null) {\n clearTimeout(redrawTimeoutID);\n redrawTimeoutID = null;\n }\n\n destroyCanvas(agent);\n }\n}\n\nfunction traceUpdates(nodes: Set<HostInstance>): void {\n if (!isEnabled) return;\n\n nodes.forEach(node => {\n const data = nodeToData.get(node);\n const now = getCurrentTime();\n\n let lastMeasuredAt = data != null ? data.lastMeasuredAt : 0;\n let rect = data != null ? data.rect : null;\n\n if (rect === null || lastMeasuredAt + REMEASUREMENT_AFTER_DURATION < now) {\n lastMeasuredAt = now;\n rect = measureNode(node);\n }\n\n let displayName = agent.getComponentNameForHostInstance(node);\n if (displayName) {\n const {baseComponentName, hocNames} = extractHOCNames(displayName);\n\n const markers = hocNames.map(hoc => HOC_MARKERS.get(hoc) || '').join('');\n\n const enhancedDisplayName = markers\n ? `${markers}${baseComponentName}`\n : baseComponentName;\n\n displayName = enhancedDisplayName;\n }\n\n nodeToData.set(node, {\n count: data != null ? data.count + 1 : 1,\n expirationTime:\n data != null\n ? Math.min(\n now + MAX_DISPLAY_DURATION,\n data.expirationTime + DISPLAY_DURATION,\n )\n : now + DISPLAY_DURATION,\n lastMeasuredAt,\n rect,\n displayName,\n });\n });\n\n if (redrawTimeoutID !== null) {\n clearTimeout(redrawTimeoutID);\n redrawTimeoutID = null;\n }\n\n if (drawAnimationFrameID === null) {\n drawAnimationFrameID = requestAnimationFrame(prepareToDraw);\n }\n}\n\nfunction prepareToDraw(): void {\n drawAnimationFrameID = null;\n redrawTimeoutID = null;\n\n const now = getCurrentTime();\n let earliestExpiration = Number.MAX_VALUE;\n\n // Remove any items that have already expired.\n nodeToData.forEach((data, node) => {\n if (data.expirationTime < now) {\n nodeToData.delete(node);\n } else {\n earliestExpiration = Math.min(earliestExpiration, data.expirationTime);\n }\n });\n\n draw(nodeToData, agent);\n\n if (earliestExpiration !== Number.MAX_VALUE) {\n redrawTimeoutID = setTimeout(prepareToDraw, earliestExpiration - now);\n }\n}\n\nfunction measureNode(node: Object): Rect | null {\n if (!node || typeof node.getBoundingClientRect !== 'function') {\n return null;\n }\n\n const currentWindow = window.__REACT_DEVTOOLS_TARGET_WINDOW__ || window;\n\n return getNestedBoundingClientRect(node, currentWindow);\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport EventEmitter from './events';\n\nimport type {ComponentFilter, Wall} from './frontend/types';\nimport type {\n InspectedElementPayload,\n OwnersList,\n ProfilingDataBackend,\n RendererID,\n DevToolsHookSettings,\n ProfilingSettings,\n} from 'react-devtools-shared/src/backend/types';\nimport type {StyleAndLayout as StyleAndLayoutPayload} from 'react-devtools-shared/src/backend/NativeStyleEditor/types';\n\n// This message specifies the version of the DevTools protocol currently supported by the backend,\n// as well as the earliest NPM version (e.g. \"4.13.0\") that protocol is supported by on the frontend.\n// This enables an older frontend to display an upgrade message to users for a newer, unsupported backend.\nexport type BridgeProtocol = {\n // Version supported by the current frontend/backend.\n version: number,\n\n // NPM version range of `react-devtools-inline` that also supports this version.\n // Note that 'maxNpmVersion' is only set when the version is bumped.\n minNpmVersion: string,\n maxNpmVersion: string | null,\n};\n\n// Bump protocol version whenever a backwards breaking change is made\n// in the messages sent between BackendBridge and FrontendBridge.\n// This mapping is embedded in both frontend and backend builds.\n//\n// The backend protocol will always be the latest entry in the BRIDGE_PROTOCOL array.\n//\n// When an older frontend connects to a newer backend,\n// the backend can send the minNpmVersion and the frontend can display an NPM upgrade prompt.\n//\n// When a newer frontend connects with an older protocol version,\n// the frontend can use the embedded minNpmVersion/maxNpmVersion values to display a downgrade prompt.\nexport const BRIDGE_PROTOCOL: Array<BridgeProtocol> = [\n // This version technically never existed,\n // but a backwards breaking change was added in 4.11,\n // so the safest guess to downgrade the frontend would be to version 4.10.\n {\n version: 0,\n minNpmVersion: '\"<4.11.0\"',\n maxNpmVersion: '\"<4.11.0\"',\n },\n // Versions 4.11.x – 4.12.x contained the backwards breaking change,\n // but we didn't add the \"fix\" of checking the protocol version until 4.13,\n // so we don't recommend downgrading to 4.11 or 4.12.\n {\n version: 1,\n minNpmVersion: '4.13.0',\n maxNpmVersion: '4.21.0',\n },\n // Version 2 adds a StrictMode-enabled and supports-StrictMode bits to add-root operation.\n {\n version: 2,\n minNpmVersion: '4.22.0',\n maxNpmVersion: null,\n },\n];\n\nexport const currentBridgeProtocol: BridgeProtocol =\n BRIDGE_PROTOCOL[BRIDGE_PROTOCOL.length - 1];\n\ntype ElementAndRendererID = {id: number, rendererID: RendererID};\n\ntype Message = {\n event: string,\n payload: any,\n};\n\ntype HighlightHostInstance = {\n ...ElementAndRendererID,\n displayName: string | null,\n hideAfterTimeout: boolean,\n openBuiltinElementsPanel: boolean,\n scrollIntoView: boolean,\n};\ntype HighlightHostInstances = {\n elements: Array<ElementAndRendererID>,\n displayName: string | null,\n hideAfterTimeout: boolean,\n scrollIntoView: boolean,\n};\n\ntype ScrollToHostInstance = {\n ...ElementAndRendererID,\n};\n\ntype OverrideValue = {\n ...ElementAndRendererID,\n path: Array<string | number>,\n wasForwarded?: boolean,\n value: any,\n};\n\ntype OverrideHookState = {\n ...OverrideValue,\n hookID: number,\n};\n\ntype PathType = 'props' | 'hooks' | 'state' | 'context';\n\ntype DeletePath = {\n ...ElementAndRendererID,\n type: PathType,\n hookID?: ?number,\n path: Array<string | number>,\n};\n\ntype RenamePath = {\n ...ElementAndRendererID,\n type: PathType,\n hookID?: ?number,\n oldPath: Array<string | number>,\n newPath: Array<string | number>,\n};\n\ntype OverrideValueAtPath = {\n ...ElementAndRendererID,\n type: PathType,\n hookID?: ?number,\n path: Array<string | number>,\n value: any,\n};\n\ntype OverrideError = {\n ...ElementAndRendererID,\n forceError: boolean,\n};\n\ntype OverrideSuspense = {\n ...ElementAndRendererID,\n forceFallback: boolean,\n};\n\ntype OverrideSuspenseMilestone = {\n suspendedSet: Array<number>,\n};\n\ntype CopyElementPathParams = {\n ...ElementAndRendererID,\n path: Array<string | number>,\n};\n\ntype ViewAttributeSourceParams = {\n ...ElementAndRendererID,\n path: Array<string | number>,\n};\n\ntype InspectElementParams = {\n ...ElementAndRendererID,\n forceFullData: boolean,\n path: Array<number | string> | null,\n requestID: number,\n};\n\ntype InspectScreenParams = {\n requestID: number,\n id: number,\n forceFullData: boolean,\n path: Array<number | string> | null,\n};\n\ntype StoreAsGlobalParams = {\n ...ElementAndRendererID,\n count: number,\n path: Array<string | number>,\n};\n\ntype NativeStyleEditor_RenameAttributeParams = {\n ...ElementAndRendererID,\n oldName: string,\n newName: string,\n value: string,\n};\n\ntype NativeStyleEditor_SetValueParams = {\n ...ElementAndRendererID,\n name: string,\n value: string,\n};\n\ntype SavedPreferencesParams = {\n componentFilters: Array<ComponentFilter>,\n};\n\nexport type BackendEvents = {\n backendInitialized: [],\n backendVersion: [string],\n bridgeProtocol: [BridgeProtocol],\n enableSuspenseTab: [],\n extensionBackendInitialized: [],\n fastRefreshScheduled: [],\n getSavedPreferences: [],\n inspectedElement: [InspectedElementPayload],\n inspectedScreen: [InspectedElementPayload],\n isReloadAndProfileSupportedByBackend: [boolean],\n operations: [Array<number>],\n ownersList: [OwnersList],\n overrideComponentFilters: [Array<ComponentFilter>],\n environmentNames: [Array<string>],\n profilingData: [ProfilingDataBackend],\n profilingStatus: [boolean],\n reloadAppForProfiling: [],\n saveToClipboard: [string],\n selectElement: [number],\n shutdown: [],\n stopInspectingHost: [boolean],\n syncSelectionToBuiltinElementsPanel: [],\n unsupportedRendererVersion: [],\n\n extensionComponentsPanelShown: [],\n extensionComponentsPanelHidden: [],\n\n resumeElementPolling: [],\n pauseElementPolling: [],\n\n // React Native style editor plug-in.\n isNativeStyleEditorSupported: [\n {isSupported: boolean, validAttributes: ?$ReadOnlyArray<string>},\n ],\n NativeStyleEditor_styleAndLayout: [StyleAndLayoutPayload],\n\n hookSettings: [$ReadOnly<DevToolsHookSettings>],\n};\n\ntype StartProfilingParams = ProfilingSettings;\ntype ReloadAndProfilingParams = ProfilingSettings;\n\ntype FrontendEvents = {\n clearErrorsAndWarnings: [{rendererID: RendererID}],\n clearErrorsForElementID: [ElementAndRendererID],\n clearHostInstanceHighlight: [],\n clearWarningsForElementID: [ElementAndRendererID],\n copyElementPath: [CopyElementPathParams],\n deletePath: [DeletePath],\n getBackendVersion: [],\n getBridgeProtocol: [],\n getIfHasUnsupportedRendererVersion: [],\n getOwnersList: [ElementAndRendererID],\n getProfilingData: [{rendererID: RendererID}],\n getProfilingStatus: [],\n highlightHostInstance: [HighlightHostInstance],\n highlightHostInstances: [HighlightHostInstances],\n inspectElement: [InspectElementParams],\n inspectScreen: [InspectScreenParams],\n logElementToConsole: [ElementAndRendererID],\n overrideError: [OverrideError],\n overrideSuspense: [OverrideSuspense],\n overrideSuspenseMilestone: [OverrideSuspenseMilestone],\n overrideValueAtPath: [OverrideValueAtPath],\n profilingData: [ProfilingDataBackend],\n reloadAndProfile: [ReloadAndProfilingParams],\n renamePath: [RenamePath],\n savedPreferences: [SavedPreferencesParams],\n setTraceUpdatesEnabled: [boolean],\n shutdown: [],\n startInspectingHost: [boolean],\n startProfiling: [StartProfilingParams],\n stopInspectingHost: [],\n scrollToHostInstance: [ScrollToHostInstance],\n stopProfiling: [],\n storeAsGlobal: [StoreAsGlobalParams],\n updateComponentFilters: [Array<ComponentFilter>],\n getEnvironmentNames: [],\n updateHookSettings: [$ReadOnly<DevToolsHookSettings>],\n viewAttributeSource: [ViewAttributeSourceParams],\n viewElementSource: [ElementAndRendererID],\n\n syncSelectionFromBuiltinElementsPanel: [],\n\n // React Native style editor plug-in.\n NativeStyleEditor_measure: [ElementAndRendererID],\n NativeStyleEditor_renameAttribute: [NativeStyleEditor_RenameAttributeParams],\n NativeStyleEditor_setValue: [NativeStyleEditor_SetValueParams],\n\n // Temporarily support newer standalone front-ends sending commands to older embedded backends.\n // We do this because React Native embeds the React DevTools backend,\n // but cannot control which version of the frontend users use.\n //\n // Note that nothing in the newer backend actually listens to these events,\n // but the new frontend still dispatches them (in case older backends are listening to them instead).\n //\n // Note that this approach does no support the combination of a newer backend with an older frontend.\n // It would be more work to support both approaches (and not run handlers twice)\n // so I chose to support the more likely/common scenario (and the one more difficult for an end user to \"fix\").\n overrideContext: [OverrideValue],\n overrideHookState: [OverrideHookState],\n overrideProps: [OverrideValue],\n overrideState: [OverrideValue],\n\n getHookSettings: [],\n};\n\nclass Bridge<\n OutgoingEvents: Object,\n IncomingEvents: Object,\n> extends EventEmitter<IncomingEvents> {\n _isShutdown: boolean = false;\n _messageQueue: Array<any> = [];\n _scheduledFlush: boolean = false;\n _wall: Wall;\n _wallUnlisten: Function | null = null;\n\n constructor(wall: Wall) {\n super();\n\n this._wall = wall;\n\n this._wallUnlisten =\n wall.listen((message: Message) => {\n if (message && message.event) {\n (this: any).emit(message.event, message.payload);\n }\n }) || null;\n\n // Temporarily support older standalone front-ends sending commands to newer embedded backends.\n // We do this because React Native embeds the React DevTools backend,\n // but cannot control which version of the frontend users use.\n this.addListener('overrideValueAtPath', this.overrideValueAtPath);\n }\n\n // Listening directly to the wall isn't advised.\n // It can be used to listen for legacy (v3) messages (since they use a different format).\n get wall(): Wall {\n return this._wall;\n }\n\n send<EventName: $Keys<OutgoingEvents>>(\n event: EventName,\n ...payload: OutgoingEvents[EventName]\n ) {\n if (this._isShutdown) {\n console.warn(\n `Cannot send message \"${event}\" through a Bridge that has been shutdown.`,\n );\n return;\n }\n\n // When we receive a message:\n // - we add it to our queue of messages to be sent\n // - if there hasn't been a message recently, we set a timer for 0 ms in\n // the future, allowing all messages created in the same tick to be sent\n // together\n // - if there *has* been a message flushed in the last BATCH_DURATION ms\n // (or we're waiting for our setTimeout-0 to fire), then _timeoutID will\n // be set, and we'll simply add to the queue and wait for that\n this._messageQueue.push(event, payload);\n if (!this._scheduledFlush) {\n this._scheduledFlush = true;\n // $FlowFixMe\n if (typeof devtoolsJestTestScheduler === 'function') {\n // This exists just for our own jest tests.\n // They're written in such a way that we can neither mock queueMicrotask\n // because then we break React DOM and we can't not mock it because then\n // we can't synchronously flush it. So they need to be rewritten.\n // $FlowFixMe\n devtoolsJestTestScheduler(this._flush); // eslint-disable-line no-undef\n } else {\n queueMicrotask(this._flush);\n }\n }\n }\n\n shutdown() {\n if (this._isShutdown) {\n console.warn('Bridge was already shutdown.');\n return;\n }\n\n // Queue the shutdown outgoing message for subscribers.\n this.emit('shutdown');\n this.send('shutdown');\n\n // Mark this bridge as destroyed, i.e. disable its public API.\n this._isShutdown = true;\n\n // Disable the API inherited from EventEmitter that can add more listeners and send more messages.\n // $FlowFixMe[cannot-write] This property is not writable.\n this.addListener = function () {};\n // $FlowFixMe[cannot-write] This property is not writable.\n this.emit = function () {};\n // NOTE: There's also EventEmitter API like `on` and `prependListener` that we didn't add to our Flow type of EventEmitter.\n\n // Unsubscribe this bridge incoming message listeners to be sure, and so they don't have to do that.\n this.removeAllListeners();\n\n // Stop accepting and emitting incoming messages from the wall.\n const wallUnlisten = this._wallUnlisten;\n if (wallUnlisten) {\n wallUnlisten();\n }\n\n // Synchronously flush all queued outgoing messages.\n // At this step the subscribers' code may run in this call stack.\n do {\n this._flush();\n } while (this._messageQueue.length);\n }\n\n _flush: () => void = () => {\n // This method is used after the bridge is marked as destroyed in shutdown sequence,\n // so we do not bail out if the bridge marked as destroyed.\n // It is a private method that the bridge ensures is only called at the right times.\n try {\n if (this._messageQueue.length) {\n for (let i = 0; i < this._messageQueue.length; i += 2) {\n this._wall.send(this._messageQueue[i], ...this._messageQueue[i + 1]);\n }\n this._messageQueue.length = 0;\n }\n } finally {\n // We set this at the end in case new messages are added synchronously above.\n // They're already handled so they shouldn't queue more flushes.\n this._scheduledFlush = false;\n }\n };\n\n // Temporarily support older standalone backends by forwarding \"overrideValueAtPath\" commands\n // to the older message types they may be listening to.\n overrideValueAtPath: OverrideValueAtPath => void = ({\n id,\n path,\n rendererID,\n type,\n value,\n }: OverrideValueAtPath) => {\n switch (type) {\n case 'context':\n this.send('overrideContext', {\n id,\n path,\n rendererID,\n wasForwarded: true,\n value,\n });\n break;\n case 'hooks':\n this.send('overrideHookState', {\n id,\n path,\n rendererID,\n wasForwarded: true,\n value,\n });\n break;\n case 'props':\n this.send('overrideProps', {\n id,\n path,\n rendererID,\n wasForwarded: true,\n value,\n });\n break;\n case 'state':\n this.send('overrideState', {\n id,\n path,\n rendererID,\n wasForwarded: true,\n value,\n });\n break;\n }\n };\n}\n\nexport type BackendBridge = Bridge<BackendEvents, FrontendEvents>;\nexport type FrontendBridge = Bridge<FrontendEvents, BackendEvents>;\n\nexport default Bridge;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nexport function localStorageGetItem(key: string): any {\n try {\n return localStorage.getItem(key);\n } catch (error) {\n return null;\n }\n}\n\nexport function localStorageRemoveItem(key: string): void {\n try {\n localStorage.removeItem(key);\n } catch (error) {}\n}\n\nexport function localStorageSetItem(key: string, value: any): void {\n try {\n return localStorage.setItem(key, value);\n } catch (error) {}\n}\n\nexport function sessionStorageGetItem(key: string): any {\n try {\n return sessionStorage.getItem(key);\n } catch (error) {\n return null;\n }\n}\n\nexport function sessionStorageRemoveItem(key: string): void {\n try {\n sessionStorage.removeItem(key);\n } catch (error) {}\n}\n\nexport function sessionStorageSetItem(key: string, value: any): void {\n try {\n return sessionStorage.setItem(key, value);\n } catch (error) {}\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport EventEmitter from '../events';\nimport {\n SESSION_STORAGE_LAST_SELECTION_KEY,\n UNKNOWN_SUSPENDERS_NONE,\n __DEBUG__,\n} from '../constants';\nimport setupHighlighter from './views/Highlighter';\nimport {\n initialize as setupTraceUpdates,\n toggleEnabled as setTraceUpdatesEnabled,\n} from './views/TraceUpdates';\nimport {currentBridgeProtocol} from 'react-devtools-shared/src/bridge';\n\nimport type {BackendBridge} from 'react-devtools-shared/src/bridge';\nimport type {\n InstanceAndStyle,\n HostInstance,\n OwnersList,\n PathFrame,\n PathMatch,\n RendererID,\n RendererInterface,\n DevToolsHookSettings,\n InspectedElement,\n} from './types';\nimport type {\n ComponentFilter,\n DehydratedData,\n ElementType,\n} from 'react-devtools-shared/src/frontend/types';\nimport type {GroupItem} from './views/TraceUpdates/canvas';\nimport {gte, isReactNativeEnvironment} from './utils';\nimport {\n sessionStorageGetItem,\n sessionStorageRemoveItem,\n sessionStorageSetItem,\n} from '../storage';\n\nconst debug = (methodName: string, ...args: Array<string>) => {\n if (__DEBUG__) {\n console.log(\n `%cAgent %c${methodName}`,\n 'color: purple; font-weight: bold;',\n 'font-weight: bold;',\n ...args,\n );\n }\n};\n\ntype ElementAndRendererID = {\n id: number,\n rendererID: number,\n};\n\ntype StoreAsGlobalParams = {\n count: number,\n id: number,\n path: Array<string | number>,\n rendererID: number,\n};\n\ntype CopyElementParams = {\n id: number,\n path: Array<string | number>,\n rendererID: number,\n};\n\ntype InspectElementParams = {\n forceFullData: boolean,\n id: number,\n path: Array<string | number> | null,\n rendererID: number,\n requestID: number,\n};\n\ntype InspectScreenParams = {\n forceFullData: boolean,\n id: number,\n path: Array<string | number> | null,\n requestID: number,\n};\n\ntype OverrideHookParams = {\n id: number,\n hookID: number,\n path: Array<string | number>,\n rendererID: number,\n wasForwarded?: boolean,\n value: any,\n};\n\ntype SetInParams = {\n id: number,\n path: Array<string | number>,\n rendererID: number,\n wasForwarded?: boolean,\n value: any,\n};\n\ntype PathType = 'props' | 'hooks' | 'state' | 'context';\n\ntype DeletePathParams = {\n type: PathType,\n hookID?: ?number,\n id: number,\n path: Array<string | number>,\n rendererID: number,\n};\n\ntype RenamePathParams = {\n type: PathType,\n hookID?: ?number,\n id: number,\n oldPath: Array<string | number>,\n newPath: Array<string | number>,\n rendererID: number,\n};\n\ntype OverrideValueAtPathParams = {\n type: PathType,\n hookID?: ?number,\n id: number,\n path: Array<string | number>,\n rendererID: number,\n value: any,\n};\n\ntype OverrideErrorParams = {\n id: number,\n rendererID: number,\n forceError: boolean,\n};\n\ntype OverrideSuspenseParams = {\n id: number,\n rendererID: number,\n forceFallback: boolean,\n};\n\ntype OverrideSuspenseMilestoneParams = {\n suspendedSet: Array<number>,\n};\n\ntype PersistedSelection = {\n rendererID: number,\n path: Array<PathFrame>,\n};\n\nfunction createEmptyInspectedScreen(\n arbitraryRootID: number,\n type: ElementType,\n): InspectedElement {\n const suspendedBy: DehydratedData = {\n cleaned: [],\n data: [],\n unserializable: [],\n };\n return {\n // invariants\n id: arbitraryRootID,\n type: type,\n // Properties we merge\n isErrored: false,\n errors: [],\n warnings: [],\n suspendedBy,\n suspendedByRange: null,\n // TODO: How to merge these?\n unknownSuspenders: UNKNOWN_SUSPENDERS_NONE,\n // Properties where merging doesn't make sense so we ignore them entirely in the UI\n rootType: null,\n plugins: {stylex: null},\n nativeTag: null,\n env: null,\n source: null,\n stack: null,\n rendererPackageName: null,\n rendererVersion: null,\n // These don't make sense for a Root. They're just bottom values.\n key: null,\n canEditFunctionProps: false,\n canEditHooks: false,\n canEditFunctionPropsDeletePaths: false,\n canEditFunctionPropsRenamePaths: false,\n canEditHooksAndDeletePaths: false,\n canEditHooksAndRenamePaths: false,\n canToggleError: false,\n canToggleSuspense: false,\n isSuspended: false,\n hasLegacyContext: false,\n context: null,\n hooks: null,\n props: null,\n state: null,\n owners: null,\n };\n}\n\nfunction mergeRoots(\n left: InspectedElement,\n right: InspectedElement,\n suspendedByOffset: number,\n): void {\n const leftSuspendedByRange = left.suspendedByRange;\n const rightSuspendedByRange = right.suspendedByRange;\n\n if (right.isErrored) {\n left.isErrored = true;\n }\n for (let i = 0; i < right.errors.length; i++) {\n left.errors.push(right.errors[i]);\n }\n for (let i = 0; i < right.warnings.length; i++) {\n left.warnings.push(right.warnings[i]);\n }\n\n const leftSuspendedBy: DehydratedData = left.suspendedBy;\n const {data, cleaned, unserializable} = (right.suspendedBy: DehydratedData);\n const leftSuspendedByData = ((leftSuspendedBy.data: any): Array<mixed>);\n const rightSuspendedByData = ((data: any): Array<mixed>);\n for (let i = 0; i < rightSuspendedByData.length; i++) {\n leftSuspendedByData.push(rightSuspendedByData[i]);\n }\n for (let i = 0; i < cleaned.length; i++) {\n leftSuspendedBy.cleaned.push(\n [suspendedByOffset + cleaned[i][0]].concat(cleaned[i].slice(1)),\n );\n }\n for (let i = 0; i < unserializable.length; i++) {\n leftSuspendedBy.unserializable.push(\n [suspendedByOffset + unserializable[i][0]].concat(\n unserializable[i].slice(1),\n ),\n );\n }\n\n if (rightSuspendedByRange !== null) {\n if (leftSuspendedByRange === null) {\n left.suspendedByRange = [\n rightSuspendedByRange[0],\n rightSuspendedByRange[1],\n ];\n } else {\n if (rightSuspendedByRange[0] < leftSuspendedByRange[0]) {\n leftSuspendedByRange[0] = rightSuspendedByRange[0];\n }\n if (rightSuspendedByRange[1] > leftSuspendedByRange[1]) {\n leftSuspendedByRange[1] = rightSuspendedByRange[1];\n }\n }\n }\n}\n\nexport default class Agent extends EventEmitter<{\n hideNativeHighlight: [],\n showNativeHighlight: [HostInstance],\n startInspectingNative: [],\n stopInspectingNative: [],\n shutdown: [],\n traceUpdates: [Set<HostInstance>],\n drawTraceUpdates: [Array<HostInstance>],\n drawGroupedTraceUpdatesWithNames: [Array<Array<GroupItem>>],\n disableTraceUpdates: [],\n getIfHasUnsupportedRendererVersion: [],\n updateHookSettings: [$ReadOnly<DevToolsHookSettings>],\n getHookSettings: [],\n}> {\n _bridge: BackendBridge;\n _isProfiling: boolean = false;\n _rendererInterfaces: {[key: RendererID]: RendererInterface, ...} = {};\n _persistedSelection: PersistedSelection | null = null;\n _persistedSelectionMatch: PathMatch | null = null;\n _traceUpdatesEnabled: boolean = false;\n _onReloadAndProfile:\n | ((recordChangeDescriptions: boolean, recordTimeline: boolean) => void)\n | void;\n\n constructor(\n bridge: BackendBridge,\n isProfiling: boolean = false,\n onReloadAndProfile?: (\n recordChangeDescriptions: boolean,\n recordTimeline: boolean,\n ) => void,\n ) {\n super();\n\n this._isProfiling = isProfiling;\n this._onReloadAndProfile = onReloadAndProfile;\n\n const persistedSelectionString = sessionStorageGetItem(\n SESSION_STORAGE_LAST_SELECTION_KEY,\n );\n if (persistedSelectionString != null) {\n this._persistedSelection = JSON.parse(persistedSelectionString);\n }\n\n this._bridge = bridge;\n\n bridge.addListener('clearErrorsAndWarnings', this.clearErrorsAndWarnings);\n bridge.addListener('clearErrorsForElementID', this.clearErrorsForElementID);\n bridge.addListener(\n 'clearWarningsForElementID',\n this.clearWarningsForElementID,\n );\n bridge.addListener('copyElementPath', this.copyElementPath);\n bridge.addListener('deletePath', this.deletePath);\n bridge.addListener('getBackendVersion', this.getBackendVersion);\n bridge.addListener('getBridgeProtocol', this.getBridgeProtocol);\n bridge.addListener('getProfilingData', this.getProfilingData);\n bridge.addListener('getProfilingStatus', this.getProfilingStatus);\n bridge.addListener('getOwnersList', this.getOwnersList);\n bridge.addListener('inspectElement', this.inspectElement);\n bridge.addListener('inspectScreen', this.inspectScreen);\n bridge.addListener('logElementToConsole', this.logElementToConsole);\n bridge.addListener('overrideError', this.overrideError);\n bridge.addListener('overrideSuspense', this.overrideSuspense);\n bridge.addListener(\n 'overrideSuspenseMilestone',\n this.overrideSuspenseMilestone,\n );\n bridge.addListener('overrideValueAtPath', this.overrideValueAtPath);\n bridge.addListener('reloadAndProfile', this.reloadAndProfile);\n bridge.addListener('renamePath', this.renamePath);\n bridge.addListener('setTraceUpdatesEnabled', this.setTraceUpdatesEnabled);\n bridge.addListener('startProfiling', this.startProfiling);\n bridge.addListener('stopProfiling', this.stopProfiling);\n bridge.addListener('storeAsGlobal', this.storeAsGlobal);\n bridge.addListener(\n 'syncSelectionFromBuiltinElementsPanel',\n this.syncSelectionFromBuiltinElementsPanel,\n );\n bridge.addListener('shutdown', this.shutdown);\n\n bridge.addListener('updateHookSettings', this.updateHookSettings);\n bridge.addListener('getHookSettings', this.getHookSettings);\n\n bridge.addListener('updateComponentFilters', this.updateComponentFilters);\n bridge.addListener('getEnvironmentNames', this.getEnvironmentNames);\n bridge.addListener(\n 'getIfHasUnsupportedRendererVersion',\n this.getIfHasUnsupportedRendererVersion,\n );\n\n // Temporarily support older standalone front-ends sending commands to newer embedded backends.\n // We do this because React Native embeds the React DevTools backend,\n // but cannot control which version of the frontend users use.\n bridge.addListener('overrideContext', this.overrideContext);\n bridge.addListener('overrideHookState', this.overrideHookState);\n bridge.addListener('overrideProps', this.overrideProps);\n bridge.addListener('overrideState', this.overrideState);\n\n setupHighlighter(bridge, this);\n setupTraceUpdates(this);\n\n // By this time, Store should already be initialized and intercept events\n bridge.send('backendInitialized');\n\n if (this._isProfiling) {\n bridge.send('profilingStatus', true);\n }\n }\n\n get rendererInterfaces(): {[key: RendererID]: RendererInterface, ...} {\n return this._rendererInterfaces;\n }\n\n clearErrorsAndWarnings: ({rendererID: RendererID}) => void = ({\n rendererID,\n }) => {\n const renderer = this._rendererInterfaces[rendererID];\n if (renderer == null) {\n console.warn(`Invalid renderer id \"${rendererID}\"`);\n } else {\n renderer.clearErrorsAndWarnings();\n }\n };\n\n clearErrorsForElementID: ElementAndRendererID => void = ({\n id,\n rendererID,\n }) => {\n const renderer = this._rendererInterfaces[rendererID];\n if (renderer == null) {\n console.warn(`Invalid renderer id \"${rendererID}\"`);\n } else {\n renderer.clearErrorsForElementID(id);\n }\n };\n\n clearWarningsForElementID: ElementAndRendererID => void = ({\n id,\n rendererID,\n }) => {\n const renderer = this._rendererInterfaces[rendererID];\n if (renderer == null) {\n console.warn(`Invalid renderer id \"${rendererID}\"`);\n } else {\n renderer.clearWarningsForElementID(id);\n }\n };\n\n copyElementPath: CopyElementParams => void = ({\n id,\n path,\n rendererID,\n }: CopyElementParams) => {\n const renderer = this._rendererInterfaces[rendererID];\n if (renderer == null) {\n console.warn(`Invalid renderer id \"${rendererID}\" for element \"${id}\"`);\n } else {\n const value = renderer.getSerializedElementValueByPath(id, path);\n\n if (value != null) {\n this._bridge.send('saveToClipboard', value);\n } else {\n console.warn(`Unable to obtain serialized value for element \"${id}\"`);\n }\n }\n };\n\n deletePath: DeletePathParams => void = ({\n hookID,\n id,\n path,\n rendererID,\n type,\n }: DeletePathParams) => {\n const renderer = this._rendererInterfaces[rendererID];\n if (renderer == null) {\n console.warn(`Invalid renderer id \"${rendererID}\" for element \"${id}\"`);\n } else {\n renderer.deletePath(type, id, hookID, path);\n }\n };\n\n getInstanceAndStyle({\n id,\n rendererID,\n }: ElementAndRendererID): InstanceAndStyle | null {\n const renderer = this._rendererInterfaces[rendererID];\n if (renderer == null) {\n console.warn(`Invalid renderer id \"${rendererID}\"`);\n return null;\n }\n return renderer.getInstanceAndStyle(id);\n }\n\n getIDForHostInstance(\n target: HostInstance,\n onlySuspenseNodes?: boolean,\n ): null | {id: number, rendererID: number} {\n if (isReactNativeEnvironment() || typeof target.nodeType !== 'number') {\n // In React Native or non-DOM we simply pick any renderer that has a match.\n for (const rendererID in this._rendererInterfaces) {\n const renderer = ((this._rendererInterfaces[\n (rendererID: any)\n ]: any): RendererInterface);\n try {\n const id = onlySuspenseNodes\n ? renderer.getSuspenseNodeIDForHostInstance(target)\n : renderer.getElementIDForHostInstance(target);\n if (id !== null) {\n return {\n id: id,\n rendererID: +rendererID,\n };\n }\n } catch (error) {\n // Some old React versions might throw if they can't find a match.\n // If so we should ignore it...\n }\n }\n return null;\n } else {\n // In the DOM we use a smarter mechanism to find the deepest a DOM node\n // that is registered if there isn't an exact match.\n let bestMatch: null | Element = null;\n let bestRenderer: null | RendererInterface = null;\n let bestRendererID: number = 0;\n // Find the nearest ancestor which is mounted by a React.\n for (const rendererID in this._rendererInterfaces) {\n const renderer = ((this._rendererInterfaces[\n (rendererID: any)\n ]: any): RendererInterface);\n const nearestNode: null | Element = renderer.getNearestMountedDOMNode(\n (target: any),\n );\n if (nearestNode !== null) {\n if (nearestNode === target) {\n // Exact match we can exit early.\n bestMatch = nearestNode;\n bestRenderer = renderer;\n bestRendererID = +rendererID;\n break;\n }\n if (bestMatch === null || bestMatch.contains(nearestNode)) {\n // If this is the first match or the previous match contains the new match,\n // so the new match is a deeper and therefore better match.\n bestMatch = nearestNode;\n bestRenderer = renderer;\n bestRendererID = +rendererID;\n }\n }\n }\n if (bestRenderer != null && bestMatch != null) {\n try {\n const id = onlySuspenseNodes\n ? bestRenderer.getSuspenseNodeIDForHostInstance(bestMatch)\n : bestRenderer.getElementIDForHostInstance(bestMatch);\n if (id !== null) {\n return {\n id,\n rendererID: bestRendererID,\n };\n }\n } catch (error) {\n // Some old React versions might throw if they can't find a match.\n // If so we should ignore it...\n }\n }\n return null;\n }\n }\n\n getComponentNameForHostInstance(target: HostInstance): string | null {\n const match = this.getIDForHostInstance(target);\n if (match !== null) {\n const renderer = ((this._rendererInterfaces[\n (match.rendererID: any)\n ]: any): RendererInterface);\n return renderer.getDisplayNameForElementID(match.id);\n }\n return null;\n }\n\n getBackendVersion: () => void = () => {\n const version = process.env.DEVTOOLS_VERSION;\n if (version) {\n this._bridge.send('backendVersion', version);\n }\n };\n\n getBridgeProtocol: () => void = () => {\n this._bridge.send('bridgeProtocol', currentBridgeProtocol);\n };\n\n getProfilingData: ({rendererID: RendererID}) => void = ({rendererID}) => {\n const renderer = this._rendererInterfaces[rendererID];\n if (renderer == null) {\n console.warn(`Invalid renderer id \"${rendererID}\"`);\n }\n\n this._bridge.send('profilingData', renderer.getProfilingData());\n };\n\n getProfilingStatus: () => void = () => {\n this._bridge.send('profilingStatus', this._isProfiling);\n };\n\n getOwnersList: ElementAndRendererID => void = ({id, rendererID}) => {\n const renderer = this._rendererInterfaces[rendererID];\n if (renderer == null) {\n console.warn(`Invalid renderer id \"${rendererID}\" for element \"${id}\"`);\n } else {\n const owners = renderer.getOwnersList(id);\n this._bridge.send('ownersList', ({id, owners}: OwnersList));\n }\n };\n\n inspectElement: InspectElementParams => void = ({\n forceFullData,\n id,\n path,\n rendererID,\n requestID,\n }) => {\n const renderer = this._rendererInterfaces[rendererID];\n if (renderer == null) {\n console.warn(`Invalid renderer id \"${rendererID}\" for element \"${id}\"`);\n } else {\n this._bridge.send(\n 'inspectedElement',\n renderer.inspectElement(requestID, id, path, forceFullData),\n );\n\n // When user selects an element, stop trying to restore the selection,\n // and instead remember the current selection for the next reload.\n if (\n this._persistedSelectionMatch === null ||\n this._persistedSelectionMatch.id !== id\n ) {\n this._persistedSelection = null;\n this._persistedSelectionMatch = null;\n renderer.setTrackedPath(null);\n // Throttle persisting the selection.\n this._lastSelectedElementID = id;\n this._lastSelectedRendererID = rendererID;\n if (!this._persistSelectionTimerScheduled) {\n this._persistSelectionTimerScheduled = true;\n setTimeout(this._persistSelection, 1000);\n }\n }\n\n // TODO: If there was a way to change the selected DOM element\n // in built-in Elements tab without forcing a switch to it, we'd do it here.\n // For now, it doesn't seem like there is a way to do that:\n // https://github.com/bvaughn/react-devtools-experimental/issues/102\n // (Setting $0 doesn't work, and calling inspect() switches the tab.)\n }\n };\n\n inspectScreen: InspectScreenParams => void = ({\n requestID,\n id,\n forceFullData,\n path: screenPath,\n }) => {\n let inspectedScreen: InspectedElement | null = null;\n let found = false;\n // the suspendedBy index will be from the previously merged roots.\n // We need to keep track of how many suspendedBy we've already seen to know\n // to which renderer the index belongs.\n let suspendedByOffset = 0;\n let suspendedByPathIndex: number | null = null;\n // The path to hydrate for a specific renderer\n let rendererPath: InspectElementParams['path'] = null;\n if (screenPath !== null && screenPath.length > 1) {\n const secondaryCategory = screenPath[0];\n if (secondaryCategory !== 'suspendedBy') {\n throw new Error(\n 'Only hydrating suspendedBy paths is supported. This is a bug.',\n );\n }\n if (typeof screenPath[1] !== 'number') {\n throw new Error(\n `Expected suspendedBy index to be a number. Received '${screenPath[1]}' instead. This is a bug.`,\n );\n }\n suspendedByPathIndex = screenPath[1];\n rendererPath = screenPath.slice(2);\n }\n\n for (const rendererID in this._rendererInterfaces) {\n const renderer = ((this._rendererInterfaces[\n (rendererID: any)\n ]: any): RendererInterface);\n let path: InspectElementParams['path'] = null;\n if (suspendedByPathIndex !== null && rendererPath !== null) {\n const suspendedByPathRendererIndex =\n suspendedByPathIndex - suspendedByOffset;\n const rendererHasRequestedSuspendedByPath =\n renderer.getElementAttributeByPath(id, [\n 'suspendedBy',\n suspendedByPathRendererIndex,\n ]) !== undefined;\n if (rendererHasRequestedSuspendedByPath) {\n path = ['suspendedBy', suspendedByPathRendererIndex].concat(\n rendererPath,\n );\n }\n }\n\n const inspectedRootsPayload = renderer.inspectElement(\n requestID,\n id,\n path,\n forceFullData,\n );\n switch (inspectedRootsPayload.type) {\n case 'hydrated-path':\n // The path will be relative to the Roots of this renderer. We adjust it\n // to be relative to all Roots of this implementation.\n inspectedRootsPayload.path[1] += suspendedByOffset;\n // TODO: Hydration logic is flawed since the Frontend path is not based\n // on the original backend data but rather its own representation of it (e.g. due to reorder).\n // So we can receive null here instead when hydration fails\n if (inspectedRootsPayload.value !== null) {\n for (\n let i = 0;\n i < inspectedRootsPayload.value.cleaned.length;\n i++\n ) {\n inspectedRootsPayload.value.cleaned[i][1] += suspendedByOffset;\n }\n }\n this._bridge.send('inspectedScreen', inspectedRootsPayload);\n // If we hydrated a path, it must've been in a specific renderer so we can stop here.\n return;\n case 'full-data':\n const inspectedRoots = inspectedRootsPayload.value;\n if (inspectedScreen === null) {\n inspectedScreen = createEmptyInspectedScreen(\n inspectedRoots.id,\n inspectedRoots.type,\n );\n }\n mergeRoots(inspectedScreen, inspectedRoots, suspendedByOffset);\n const dehydratedSuspendedBy: DehydratedData =\n inspectedRoots.suspendedBy;\n const suspendedBy = ((dehydratedSuspendedBy.data: any): Array<mixed>);\n suspendedByOffset += suspendedBy.length;\n found = true;\n break;\n case 'no-change':\n found = true;\n const rootsSuspendedBy: Array<mixed> =\n (renderer.getElementAttributeByPath(id, ['suspendedBy']): any);\n suspendedByOffset += rootsSuspendedBy.length;\n break;\n case 'not-found':\n break;\n case 'error':\n // bail out and show the error\n // TODO: aggregate errors\n this._bridge.send('inspectedScreen', inspectedRootsPayload);\n return;\n }\n }\n\n if (inspectedScreen === null) {\n if (found) {\n this._bridge.send('inspectedScreen', {\n type: 'no-change',\n responseID: requestID,\n id,\n });\n } else {\n this._bridge.send('inspectedScreen', {\n type: 'not-found',\n responseID: requestID,\n id,\n });\n }\n } else {\n this._bridge.send('inspectedScreen', {\n type: 'full-data',\n responseID: requestID,\n id,\n value: inspectedScreen,\n });\n }\n };\n\n logElementToConsole: ElementAndRendererID => void = ({id, rendererID}) => {\n const renderer = this._rendererInterfaces[rendererID];\n if (renderer == null) {\n console.warn(`Invalid renderer id \"${rendererID}\" for element \"${id}\"`);\n } else {\n renderer.logElementToConsole(id);\n }\n };\n\n overrideError: OverrideErrorParams => void = ({\n id,\n rendererID,\n forceError,\n }) => {\n const renderer = this._rendererInterfaces[rendererID];\n if (renderer == null) {\n console.warn(`Invalid renderer id \"${rendererID}\" for element \"${id}\"`);\n } else {\n renderer.overrideError(id, forceError);\n }\n };\n\n overrideSuspense: OverrideSuspenseParams => void = ({\n id,\n rendererID,\n forceFallback,\n }) => {\n const renderer = this._rendererInterfaces[rendererID];\n if (renderer == null) {\n console.warn(`Invalid renderer id \"${rendererID}\" for element \"${id}\"`);\n } else {\n renderer.overrideSuspense(id, forceFallback);\n }\n };\n\n overrideSuspenseMilestone: OverrideSuspenseMilestoneParams => void = ({\n suspendedSet,\n }) => {\n for (const rendererID in this._rendererInterfaces) {\n const renderer = ((this._rendererInterfaces[\n (rendererID: any)\n ]: any): RendererInterface);\n if (renderer.supportsTogglingSuspense) {\n renderer.overrideSuspenseMilestone(suspendedSet);\n }\n }\n };\n\n overrideValueAtPath: OverrideValueAtPathParams => void = ({\n hookID,\n id,\n path,\n rendererID,\n type,\n value,\n }) => {\n const renderer = this._rendererInterfaces[rendererID];\n if (renderer == null) {\n console.warn(`Invalid renderer id \"${rendererID}\" for element \"${id}\"`);\n } else {\n renderer.overrideValueAtPath(type, id, hookID, path, value);\n }\n };\n\n // Temporarily support older standalone front-ends by forwarding the older message types\n // to the new \"overrideValueAtPath\" command the backend is now listening to.\n overrideContext: SetInParams => void = ({\n id,\n path,\n rendererID,\n wasForwarded,\n value,\n }) => {\n // Don't forward a message that's already been forwarded by the front-end Bridge.\n // We only need to process the override command once!\n if (!wasForwarded) {\n this.overrideValueAtPath({\n id,\n path,\n rendererID,\n type: 'context',\n value,\n });\n }\n };\n\n // Temporarily support older standalone front-ends by forwarding the older message types\n // to the new \"overrideValueAtPath\" command the backend is now listening to.\n overrideHookState: OverrideHookParams => void = ({\n id,\n hookID,\n path,\n rendererID,\n wasForwarded,\n value,\n }) => {\n // Don't forward a message that's already been forwarded by the front-end Bridge.\n // We only need to process the override command once!\n if (!wasForwarded) {\n this.overrideValueAtPath({\n id,\n path,\n rendererID,\n type: 'hooks',\n value,\n });\n }\n };\n\n // Temporarily support older standalone front-ends by forwarding the older message types\n // to the new \"overrideValueAtPath\" command the backend is now listening to.\n overrideProps: SetInParams => void = ({\n id,\n path,\n rendererID,\n wasForwarded,\n value,\n }) => {\n // Don't forward a message that's already been forwarded by the front-end Bridge.\n // We only need to process the override command once!\n if (!wasForwarded) {\n this.overrideValueAtPath({\n id,\n path,\n rendererID,\n type: 'props',\n value,\n });\n }\n };\n\n // Temporarily support older standalone front-ends by forwarding the older message types\n // to the new \"overrideValueAtPath\" command the backend is now listening to.\n overrideState: SetInParams => void = ({\n id,\n path,\n rendererID,\n wasForwarded,\n value,\n }) => {\n // Don't forward a message that's already been forwarded by the front-end Bridge.\n // We only need to process the override command once!\n if (!wasForwarded) {\n this.overrideValueAtPath({\n id,\n path,\n rendererID,\n type: 'state',\n value,\n });\n }\n };\n\n onReloadAndProfileSupportedByHost: () => void = () => {\n this._bridge.send('isReloadAndProfileSupportedByBackend', true);\n };\n\n reloadAndProfile: ({\n recordChangeDescriptions: boolean,\n recordTimeline: boolean,\n }) => void = ({recordChangeDescriptions, recordTimeline}) => {\n if (typeof this._onReloadAndProfile === 'function') {\n this._onReloadAndProfile(recordChangeDescriptions, recordTimeline);\n }\n\n // This code path should only be hit if the shell has explicitly told the Store that it supports profiling.\n // In that case, the shell must also listen for this specific message to know when it needs to reload the app.\n // The agent can't do this in a way that is renderer agnostic.\n this._bridge.send('reloadAppForProfiling');\n };\n\n renamePath: RenamePathParams => void = ({\n hookID,\n id,\n newPath,\n oldPath,\n rendererID,\n type,\n }) => {\n const renderer = this._rendererInterfaces[rendererID];\n if (renderer == null) {\n console.warn(`Invalid renderer id \"${rendererID}\" for element \"${id}\"`);\n } else {\n renderer.renamePath(type, id, hookID, oldPath, newPath);\n }\n };\n\n selectNode(target: HostInstance): void {\n const match = this.getIDForHostInstance(target);\n if (match !== null) {\n this._bridge.send('selectElement', match.id);\n }\n }\n\n registerRendererInterface(\n rendererID: RendererID,\n rendererInterface: RendererInterface,\n ) {\n this._rendererInterfaces[rendererID] = rendererInterface;\n\n rendererInterface.setTraceUpdatesEnabled(this._traceUpdatesEnabled);\n\n const renderer = rendererInterface.renderer;\n if (renderer !== null) {\n const devRenderer = renderer.bundleType === 1;\n const enableSuspenseTab =\n devRenderer && gte(renderer.version, '19.3.0-canary');\n if (enableSuspenseTab) {\n this._bridge.send('enableSuspenseTab');\n }\n }\n\n // When the renderer is attached, we need to tell it whether\n // we remember the previous selection that we'd like to restore.\n // It'll start tracking mounts for matches to the last selection path.\n const selection = this._persistedSelection;\n if (selection !== null && selection.rendererID === rendererID) {\n rendererInterface.setTrackedPath(selection.path);\n }\n }\n\n setTraceUpdatesEnabled: (traceUpdatesEnabled: boolean) => void =\n traceUpdatesEnabled => {\n this._traceUpdatesEnabled = traceUpdatesEnabled;\n\n setTraceUpdatesEnabled(traceUpdatesEnabled);\n\n for (const rendererID in this._rendererInterfaces) {\n const renderer = ((this._rendererInterfaces[\n (rendererID: any)\n ]: any): RendererInterface);\n renderer.setTraceUpdatesEnabled(traceUpdatesEnabled);\n }\n };\n\n syncSelectionFromBuiltinElementsPanel: () => void = () => {\n const target = window.__REACT_DEVTOOLS_GLOBAL_HOOK__.$0;\n if (target == null) {\n return;\n }\n this.selectNode(target);\n };\n\n shutdown: () => void = () => {\n // Clean up the overlay if visible, and associated events.\n this.emit('shutdown');\n\n this._bridge.removeAllListeners();\n this.removeAllListeners();\n };\n\n startProfiling: ({\n recordChangeDescriptions: boolean,\n recordTimeline: boolean,\n }) => void = ({recordChangeDescriptions, recordTimeline}) => {\n this._isProfiling = true;\n for (const rendererID in this._rendererInterfaces) {\n const renderer = ((this._rendererInterfaces[\n (rendererID: any)\n ]: any): RendererInterface);\n renderer.startProfiling(recordChangeDescriptions, recordTimeline);\n }\n this._bridge.send('profilingStatus', this._isProfiling);\n };\n\n stopProfiling: () => void = () => {\n this._isProfiling = false;\n for (const rendererID in this._rendererInterfaces) {\n const renderer = ((this._rendererInterfaces[\n (rendererID: any)\n ]: any): RendererInterface);\n renderer.stopProfiling();\n }\n this._bridge.send('profilingStatus', this._isProfiling);\n };\n\n stopInspectingNative: (selected: boolean) => void = selected => {\n this._bridge.send('stopInspectingHost', selected);\n };\n\n storeAsGlobal: StoreAsGlobalParams => void = ({\n count,\n id,\n path,\n rendererID,\n }) => {\n const renderer = this._rendererInterfaces[rendererID];\n if (renderer == null) {\n console.warn(`Invalid renderer id \"${rendererID}\" for element \"${id}\"`);\n } else {\n renderer.storeAsGlobal(id, path, count);\n }\n };\n\n updateHookSettings: (settings: $ReadOnly<DevToolsHookSettings>) => void =\n settings => {\n // Propagate the settings, so Backend can subscribe to it and modify hook\n this.emit('updateHookSettings', settings);\n };\n\n getHookSettings: () => void = () => {\n this.emit('getHookSettings');\n };\n\n onHookSettings: (settings: $ReadOnly<DevToolsHookSettings>) => void =\n settings => {\n this._bridge.send('hookSettings', settings);\n };\n\n updateComponentFilters: (componentFilters: Array<ComponentFilter>) => void =\n componentFilters => {\n for (const rendererIDString in this._rendererInterfaces) {\n const rendererID = +rendererIDString;\n const renderer = ((this._rendererInterfaces[\n (rendererID: any)\n ]: any): RendererInterface);\n if (this._lastSelectedRendererID === rendererID) {\n // Changing component filters will unmount and remount the DevTools tree.\n // Track the last selection's path so we can restore the selection.\n const path = renderer.getPathForElement(this._lastSelectedElementID);\n if (path !== null) {\n renderer.setTrackedPath(path);\n this._persistedSelection = {\n rendererID,\n path,\n };\n }\n }\n renderer.updateComponentFilters(componentFilters);\n }\n };\n\n getEnvironmentNames: () => void = () => {\n let accumulatedNames = null;\n for (const rendererID in this._rendererInterfaces) {\n const renderer = this._rendererInterfaces[+rendererID];\n const names = renderer.getEnvironmentNames();\n if (accumulatedNames === null) {\n accumulatedNames = names;\n } else {\n for (let i = 0; i < names.length; i++) {\n if (accumulatedNames.indexOf(names[i]) === -1) {\n accumulatedNames.push(names[i]);\n }\n }\n }\n }\n this._bridge.send('environmentNames', accumulatedNames || []);\n };\n\n onTraceUpdates: (nodes: Set<HostInstance>) => void = nodes => {\n this.emit('traceUpdates', nodes);\n };\n\n onFastRefreshScheduled: () => void = () => {\n if (__DEBUG__) {\n debug('onFastRefreshScheduled');\n }\n\n this._bridge.send('fastRefreshScheduled');\n };\n\n onHookOperations: (operations: Array<number>) => void = operations => {\n if (__DEBUG__) {\n debug(\n 'onHookOperations',\n `(${operations.length}) [${operations.join(', ')}]`,\n );\n }\n\n // TODO:\n // The chrome.runtime does not currently support transferables; it forces JSON serialization.\n // See bug https://bugs.chromium.org/p/chromium/issues/detail?id=927134\n //\n // Regarding transferables, the postMessage doc states:\n // If the ownership of an object is transferred, it becomes unusable (neutered)\n // in the context it was sent from and becomes available only to the worker it was sent to.\n //\n // Even though Chrome is eventually JSON serializing the array buffer,\n // using the transferable approach also sometimes causes it to throw:\n // DOMException: Failed to execute 'postMessage' on 'Window': ArrayBuffer at index 0 is already neutered.\n //\n // See bug https://github.com/bvaughn/react-devtools-experimental/issues/25\n //\n // The Store has a fallback in place that parses the message as JSON if the type isn't an array.\n // For now the simplest fix seems to be to not transfer the array.\n // This will negatively impact performance on Firefox so it's unfortunate,\n // but until we're able to fix the Chrome error mentioned above, it seems necessary.\n //\n // this._bridge.send('operations', operations, [operations.buffer]);\n this._bridge.send('operations', operations);\n\n if (this._persistedSelection !== null) {\n const rendererID = operations[0];\n if (this._persistedSelection.rendererID === rendererID) {\n // Check if we can select a deeper match for the persisted selection.\n const renderer = this._rendererInterfaces[rendererID];\n if (renderer == null) {\n console.warn(`Invalid renderer id \"${rendererID}\"`);\n } else {\n const prevMatch = this._persistedSelectionMatch;\n const nextMatch = renderer.getBestMatchForTrackedPath();\n this._persistedSelectionMatch = nextMatch;\n const prevMatchID = prevMatch !== null ? prevMatch.id : null;\n const nextMatchID = nextMatch !== null ? nextMatch.id : null;\n if (prevMatchID !== nextMatchID) {\n if (nextMatchID !== null) {\n // We moved forward, unlocking a deeper node.\n this._bridge.send('selectElement', nextMatchID);\n }\n }\n if (nextMatch !== null && nextMatch.isFullMatch) {\n // We've just unlocked the innermost selected node.\n // There's no point tracking it further.\n this._persistedSelection = null;\n this._persistedSelectionMatch = null;\n renderer.setTrackedPath(null);\n }\n }\n }\n }\n };\n\n getIfHasUnsupportedRendererVersion: () => void = () => {\n this.emit('getIfHasUnsupportedRendererVersion');\n };\n\n onUnsupportedRenderer() {\n this._bridge.send('unsupportedRendererVersion');\n }\n\n _persistSelectionTimerScheduled: boolean = false;\n _lastSelectedRendererID: number = -1;\n _lastSelectedElementID: number = -1;\n _persistSelection: any = () => {\n this._persistSelectionTimerScheduled = false;\n const rendererID = this._lastSelectedRendererID;\n const id = this._lastSelectedElementID;\n // This is throttled, so both renderer and selected ID\n // might not be available by the time we read them.\n // This is why we need the defensive checks here.\n const renderer = this._rendererInterfaces[rendererID];\n const path = renderer != null ? renderer.getPathForElement(id) : null;\n if (path !== null) {\n sessionStorageSetItem(\n SESSION_STORAGE_LAST_SELECTION_KEY,\n JSON.stringify(({rendererID, path}: PersistedSelection)),\n );\n } else {\n sessionStorageRemoveItem(SESSION_STORAGE_LAST_SELECTION_KEY);\n }\n };\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\n// This is a DevTools fork of shared/ConsolePatchingDev.\n// The shared console patching code is DEV-only.\n// We can't use it since DevTools only ships production builds.\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\n\nlet disabledDepth = 0;\nlet prevLog;\nlet prevInfo;\nlet prevWarn;\nlet prevError;\nlet prevGroup;\nlet prevGroupCollapsed;\nlet prevGroupEnd;\n\nfunction disabledLog() {}\ndisabledLog.__reactDisabledLog = true;\n\nexport function disableLogs(): void {\n if (disabledDepth === 0) {\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd;\n // https://github.com/facebook/react/issues/19099\n const props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true,\n };\n // $FlowFixMe[cannot-write] Flow thinks console is immutable.\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props,\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n disabledDepth++;\n}\n\nexport function reenableLogs(): void {\n disabledDepth--;\n if (disabledDepth === 0) {\n const props = {\n configurable: true,\n enumerable: true,\n writable: true,\n };\n // $FlowFixMe[cannot-write] Flow thinks console is immutable.\n Object.defineProperties(console, {\n log: {...props, value: prevLog},\n info: {...props, value: prevInfo},\n warn: {...props, value: prevWarn},\n error: {...props, value: prevError},\n group: {...props, value: prevGroup},\n groupCollapsed: {...props, value: prevGroupCollapsed},\n groupEnd: {...props, value: prevGroupEnd},\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n if (disabledDepth < 0) {\n console.error(\n 'disabledDepth fell below zero. ' +\n 'This is a bug in React. Please file an issue.',\n );\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\n// This is a DevTools fork of ReactComponentStackFrame.\n// This fork enables DevTools to use the same \"native\" component stack format,\n// while still maintaining support for multiple renderer versions\n// (which use different values for ReactTypeOfWork).\n\nimport type {CurrentDispatcherRef} from '../types';\n\n// The shared console patching code is DEV-only.\n// We can't use it since DevTools only ships production builds.\nimport {disableLogs, reenableLogs} from './DevToolsConsolePatching';\n\nlet prefix;\nexport function describeBuiltInComponentFrame(name: string): string {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n const match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = (match && match[1]) || '';\n }\n }\n let suffix = '';\n if (__IS_CHROME__ || __IS_EDGE__ || __IS_NATIVE__) {\n suffix = ' (<anonymous>)';\n } else if (__IS_FIREFOX__) {\n suffix = '@unknown:0:0';\n }\n // We use the prefix to ensure our stacks line up with native stack frames.\n // We use a suffix to ensure it gets parsed natively.\n return '\\n' + prefix + name + suffix;\n}\n\nexport function describeDebugInfoFrame(name: string, env: ?string): string {\n return describeBuiltInComponentFrame(name + (env ? ' [' + env + ']' : ''));\n}\n\nlet reentry = false;\nlet componentFrameCache;\nif (__DEV__) {\n const PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap<$FlowFixMe, string>();\n}\n\nexport function describeNativeComponentFrame(\n fn: Function,\n construct: boolean,\n currentDispatcherRef: CurrentDispatcherRef,\n): string {\n // If something asked for a stack inside a fake render, it should get ignored.\n if (!fn || reentry) {\n return '';\n }\n\n if (__DEV__) {\n const frame = componentFrameCache.get(fn);\n if (frame !== undefined) {\n return frame;\n }\n }\n\n const previousPrepareStackTrace = Error.prepareStackTrace;\n // $FlowFixMe[incompatible-type] It does accept undefined.\n Error.prepareStackTrace = undefined;\n\n reentry = true;\n\n // Override the dispatcher so effects scheduled by this shallow render are thrown away.\n //\n // Note that unlike the code this was forked from (in ReactComponentStackFrame)\n // DevTools should override the dispatcher even when DevTools is compiled in production mode,\n // because the app itself may be in development mode and log errors/warnings.\n const previousDispatcher = currentDispatcherRef.H;\n currentDispatcherRef.H = null;\n disableLogs();\n try {\n // NOTE: keep in sync with the implementation in ReactComponentStackFrame\n\n /**\n * Finding a common stack frame between sample and control errors can be\n * tricky given the different types and levels of stack trace truncation from\n * different JS VMs. So instead we'll attempt to control what that common\n * frame should be through this object method:\n * Having both the sample and control errors be in the function under the\n * `DescribeNativeComponentFrameRoot` property, + setting the `name` and\n * `displayName` properties of the function ensures that a stack\n * frame exists that has the method name `DescribeNativeComponentFrameRoot` in\n * it for both control and sample stacks.\n */\n const RunInRootFrame = {\n DetermineComponentFrameRoot(): [?string, ?string] {\n let control;\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n const Fake = function () {\n throw Error();\n };\n // $FlowFixMe[prop-missing]\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n },\n });\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n // $FlowFixMe[prop-missing] found when upgrading Flow\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n // TODO(luna): This will currently only throw if the function component\n // tries to access React/ReactDOM/props. We should probably make this throw\n // in simple components too\n const maybePromise = fn();\n\n // If the function component returns a promise, it's likely an async\n // component, which we don't yet support. Attach a noop catch handler to\n // silence the error.\n // TODO: Implement component stacks for async client components?\n if (maybePromise && typeof maybePromise.catch === 'function') {\n maybePromise.catch(() => {});\n }\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n return [sample.stack, control.stack];\n }\n }\n return [null, null];\n },\n };\n // $FlowFixMe[prop-missing]\n RunInRootFrame.DetermineComponentFrameRoot.displayName =\n 'DetermineComponentFrameRoot';\n const namePropDescriptor = Object.getOwnPropertyDescriptor(\n RunInRootFrame.DetermineComponentFrameRoot,\n 'name',\n );\n // Before ES6, the `name` property was not configurable.\n if (namePropDescriptor && namePropDescriptor.configurable) {\n // V8 utilizes a function's `name` property when generating a stack trace.\n Object.defineProperty(\n RunInRootFrame.DetermineComponentFrameRoot,\n // Configurable properties can be updated even if its writable descriptor\n // is set to `false`.\n // $FlowFixMe[cannot-write]\n 'name',\n {value: 'DetermineComponentFrameRoot'},\n );\n }\n\n const [sampleStack, controlStack] =\n RunInRootFrame.DetermineComponentFrameRoot();\n if (sampleStack && controlStack) {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n const sampleLines = sampleStack.split('\\n');\n const controlLines = controlStack.split('\\n');\n let s = 0;\n let c = 0;\n while (\n s < sampleLines.length &&\n !sampleLines[s].includes('DetermineComponentFrameRoot')\n ) {\n s++;\n }\n while (\n c < controlLines.length &&\n !controlLines[c].includes('DetermineComponentFrameRoot')\n ) {\n c++;\n }\n // We couldn't find our intentionally injected common root frame, attempt\n // to find another common root frame by search from the bottom of the\n // control stack...\n if (s === sampleLines.length || c === controlLines.length) {\n s = sampleLines.length - 1;\n c = controlLines.length - 1;\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n }\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--;\n // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n let frame = '\\n' + sampleLines[s].replace(' at new ', ' at ');\n\n // If our component frame is labeled \"<anonymous>\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n if (fn.displayName && frame.includes('<anonymous>')) {\n frame = frame.replace('<anonymous>', fn.displayName);\n }\n\n if (__DEV__) {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, frame);\n }\n }\n // Return the line we found.\n return frame;\n }\n } while (s >= 1 && c >= 0);\n }\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n\n currentDispatcherRef.H = previousDispatcher;\n reenableLogs();\n }\n // Fallback to just using the name if we couldn't make it throw.\n const name = fn ? fn.displayName || fn.name : '';\n const syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n if (__DEV__) {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n return syntheticFrame;\n}\n\nexport function describeClassComponentFrame(\n ctor: Function,\n currentDispatcherRef: CurrentDispatcherRef,\n): string {\n return describeNativeComponentFrame(ctor, true, currentDispatcherRef);\n}\n\nexport function describeFunctionComponentFrame(\n fn: Function,\n currentDispatcherRef: CurrentDispatcherRef,\n): string {\n return describeNativeComponentFrame(fn, false, currentDispatcherRef);\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\n// This is a DevTools fork of shared/ReactOwnerStackFrames.\n\nexport function formatOwnerStack(error: Error): string {\n const prevPrepareStackTrace = Error.prepareStackTrace;\n // $FlowFixMe[incompatible-type] It does accept undefined.\n Error.prepareStackTrace = undefined;\n let stack = error.stack;\n Error.prepareStackTrace = prevPrepareStackTrace;\n\n if (stack.startsWith('Error: react-stack-top-frame\\n')) {\n // V8's default formatting prefixes with the error message which we\n // don't want/need.\n stack = stack.slice(29);\n }\n let idx = stack.indexOf('\\n');\n if (idx !== -1) {\n // Pop the JSX frame.\n stack = stack.slice(idx + 1);\n }\n idx = stack.indexOf('react_stack_bottom_frame');\n if (idx === -1) {\n idx = stack.indexOf('react-stack-bottom-frame');\n }\n if (idx !== -1) {\n idx = stack.lastIndexOf('\\n', idx);\n }\n if (idx !== -1) {\n // Cut off everything after the bottom frame since it'll be internals.\n stack = stack.slice(0, idx);\n } else {\n // We didn't find any internal callsite out to user space.\n // This means that this was called outside an owner or the owner is fully internal.\n // To keep things light we exclude the entire trace in this case.\n return '';\n }\n return stack;\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\n// This is a DevTools fork of ReactComponentInfoStack.\n// This fork enables DevTools to use the same \"native\" component stack format,\n// while still maintaining support for multiple renderer versions\n// (which use different values for ReactTypeOfWork).\n\nimport type {ReactComponentInfo} from 'shared/ReactTypes';\n\nimport {describeBuiltInComponentFrame} from '../shared/DevToolsComponentStackFrame';\n\nimport {formatOwnerStack} from '../shared/DevToolsOwnerStack';\n\nexport function getOwnerStackByComponentInfoInDev(\n componentInfo: ReactComponentInfo,\n): string {\n try {\n let info = '';\n\n // The owner stack of the current component will be where it was created, i.e. inside its owner.\n // There's no actual name of the currently executing component. Instead, that is available\n // on the regular stack that's currently executing. However, if there is no owner at all, then\n // there's no stack frame so we add the name of the root component to the stack to know which\n // component is currently executing.\n if (!componentInfo.owner && typeof componentInfo.name === 'string') {\n return describeBuiltInComponentFrame(componentInfo.name);\n }\n\n let owner: void | null | ReactComponentInfo = componentInfo;\n\n while (owner) {\n const ownerStack: ?Error = owner.debugStack;\n if (ownerStack != null) {\n // Server Component\n owner = owner.owner;\n if (owner) {\n // TODO: Should we stash this somewhere for caching purposes?\n info += '\\n' + formatOwnerStack(ownerStack);\n }\n } else {\n break;\n }\n }\n return info;\n } catch (x) {\n return '\\nError generating stack: ' + x.message + '\\n' + x.stack;\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\n// This keeps track of Server Component logs which may come from.\n// This is in a shared module because Server Component logs don't come from a specific renderer\n// but can become associated with a Virtual Instance of any renderer.\n\nimport type {ReactComponentInfo} from 'shared/ReactTypes';\n\ntype ComponentLogs = {\n errors: Map<string, number>,\n errorsCount: number,\n warnings: Map<string, number>,\n warningsCount: number,\n};\n\n// This keeps it around as long as the ComponentInfo is alive which\n// lets the Fiber get reparented/remounted and still observe the previous errors/warnings.\n// Unless we explicitly clear the logs from a Fiber.\nexport const componentInfoToComponentLogsMap: WeakMap<\n ReactComponentInfo,\n ComponentLogs,\n> = new WeakMap();\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport type {ReactComponentInfo} from 'shared/ReactTypes';\n\nimport type {DevToolsHook, ReactRenderer, RendererInterface} from '../types';\n\nimport {getOwnerStackByComponentInfoInDev} from './DevToolsComponentInfoStack';\n\nimport {formatOwnerStack} from '../shared/DevToolsOwnerStack';\n\nimport {componentInfoToComponentLogsMap} from '../shared/DevToolsServerComponentLogs';\n\nimport {formatConsoleArgumentsToSingleString} from 'react-devtools-shared/src/backend/utils';\n\nfunction supportsConsoleTasks(componentInfo: ReactComponentInfo): boolean {\n // If this ReactComponentInfo supports native console.createTask then we are already running\n // inside a native async stack trace if it's active - meaning the DevTools is open.\n // Ideally we'd detect if this task was created while the DevTools was open or not.\n return !!componentInfo.debugTask;\n}\n\nexport function attach(\n hook: DevToolsHook,\n rendererID: number,\n renderer: ReactRenderer,\n global: Object,\n): RendererInterface {\n const {getCurrentComponentInfo} = renderer;\n\n function getComponentStack(\n topFrame: Error,\n ): null | {enableOwnerStacks: boolean, componentStack: string} {\n if (getCurrentComponentInfo === undefined) {\n // Expected this to be part of the renderer. Ignore.\n return null;\n }\n const current = getCurrentComponentInfo();\n if (current === null) {\n // Outside of our render scope.\n return null;\n }\n\n if (supportsConsoleTasks(current)) {\n // This will be handled natively by console.createTask. No need for\n // DevTools to add it.\n return null;\n }\n\n const enableOwnerStacks = current.debugStack != null;\n let componentStack = '';\n if (enableOwnerStacks) {\n // Prefix the owner stack with the current stack. I.e. what called\n // console.error. While this will also be part of the native stack,\n // it is hidden and not presented alongside this argument so we print\n // them all together.\n const topStackFrames = formatOwnerStack(topFrame);\n if (topStackFrames) {\n componentStack += '\\n' + topStackFrames;\n }\n componentStack += getOwnerStackByComponentInfoInDev(current);\n }\n return {enableOwnerStacks, componentStack};\n }\n\n // Called when an error or warning is logged during render, commit, or passive (including unmount functions).\n function onErrorOrWarning(\n type: 'error' | 'warn',\n args: $ReadOnlyArray<any>,\n ): void {\n if (getCurrentComponentInfo === undefined) {\n // Expected this to be part of the renderer. Ignore.\n return;\n }\n const componentInfo = getCurrentComponentInfo();\n if (componentInfo === null) {\n // Outside of our render scope.\n return;\n }\n\n if (\n args.length > 3 &&\n typeof args[0] === 'string' &&\n args[0].startsWith('%c%s%c ') &&\n typeof args[1] === 'string' &&\n typeof args[2] === 'string' &&\n typeof args[3] === 'string'\n ) {\n // This looks like the badge we prefixed to the log. Our UI doesn't support formatted logs.\n // We remove the formatting. If the environment of the log is the same as the environment of\n // the component (the common case) we remove the badge completely otherwise leave it plain\n const format = args[0].slice(7);\n const env = args[2].trim();\n args = args.slice(4);\n if (env !== componentInfo.env) {\n args.unshift('[' + env + '] ' + format);\n } else {\n args.unshift(format);\n }\n }\n\n // We can't really use this message as a unique key, since we can't distinguish\n // different objects in this implementation. We have to delegate displaying of the objects\n // to the environment, the browser console, for example, so this is why this should be kept\n // as an array of arguments, instead of the plain string.\n // [Warning: %o, {...}] and [Warning: %o, {...}] will be considered as the same message,\n // even if objects are different\n const message = formatConsoleArgumentsToSingleString(...args);\n\n // Track the warning/error for later.\n let componentLogsEntry = componentInfoToComponentLogsMap.get(componentInfo);\n if (componentLogsEntry === undefined) {\n componentLogsEntry = {\n errors: new Map(),\n errorsCount: 0 as number,\n warnings: new Map(),\n warningsCount: 0 as number,\n };\n componentInfoToComponentLogsMap.set(componentInfo, componentLogsEntry);\n }\n\n const messageMap =\n type === 'error'\n ? componentLogsEntry.errors\n : componentLogsEntry.warnings;\n const count = messageMap.get(message) || 0;\n messageMap.set(message, count + 1);\n if (type === 'error') {\n componentLogsEntry.errorsCount++;\n } else {\n componentLogsEntry.warningsCount++;\n }\n\n // The changes will be flushed later when we commit this tree to Fiber.\n }\n\n const supportsTogglingSuspense = false;\n\n return {\n cleanup() {},\n clearErrorsAndWarnings() {},\n clearErrorsForElementID() {},\n clearWarningsForElementID() {},\n getSerializedElementValueByPath() {},\n deletePath() {},\n findHostInstancesForElementID() {\n return null;\n },\n findLastKnownRectsForID() {\n return null;\n },\n flushInitialOperations() {},\n getBestMatchForTrackedPath() {\n return null;\n },\n getComponentStack,\n getDisplayNameForElementID() {\n return null;\n },\n getNearestMountedDOMNode() {\n return null;\n },\n getElementIDForHostInstance() {\n return null;\n },\n getSuspenseNodeIDForHostInstance() {\n return null;\n },\n getInstanceAndStyle() {\n return {\n instance: null,\n style: null,\n };\n },\n getOwnersList() {\n return null;\n },\n getPathForElement() {\n return null;\n },\n getProfilingData() {\n throw new Error('getProfilingData not supported by this renderer');\n },\n handleCommitFiberRoot() {},\n handleCommitFiberUnmount() {},\n handlePostCommitFiberRoot() {},\n hasElementWithId() {\n return false;\n },\n inspectElement(\n requestID: number,\n id: number,\n path: Array<string | number> | null,\n ) {\n return {\n id,\n responseID: requestID,\n type: 'not-found',\n };\n },\n logElementToConsole() {},\n getElementAttributeByPath() {},\n getElementSourceFunctionById() {},\n onErrorOrWarning,\n overrideError() {},\n overrideSuspense() {},\n overrideSuspenseMilestone() {},\n overrideValueAtPath() {},\n renamePath() {},\n renderer,\n setTraceUpdatesEnabled() {},\n setTrackedPath() {},\n startProfiling() {},\n stopProfiling() {},\n storeAsGlobal() {},\n supportsTogglingSuspense,\n updateComponentFilters() {},\n getEnvironmentNames() {\n return [];\n },\n };\n}\n","/**\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport type {ReactStackTrace, ReactFunctionLocation} from 'shared/ReactTypes';\n\nfunction parseStackTraceFromChromeStack(\n stack: string,\n skipFrames: number,\n): ReactStackTrace {\n if (stack.startsWith('Error: react-stack-top-frame\\n')) {\n // V8's default formatting prefixes with the error message which we\n // don't want/need.\n stack = stack.slice(29);\n }\n let idx = stack.indexOf('react_stack_bottom_frame');\n if (idx === -1) {\n idx = stack.indexOf('react-stack-bottom-frame');\n }\n if (idx !== -1) {\n idx = stack.lastIndexOf('\\n', idx);\n }\n if (idx !== -1) {\n // Cut off everything after the bottom frame since it'll be internals.\n stack = stack.slice(0, idx);\n }\n const frames = stack.split('\\n');\n const parsedFrames: ReactStackTrace = [];\n // We skip top frames here since they may or may not be parseable but we\n // want to skip the same number of frames regardless. I.e. we can't do it\n // in the caller.\n for (let i = skipFrames; i < frames.length; i++) {\n const parsed = chromeFrameRegExp.exec(frames[i]);\n if (!parsed) {\n continue;\n }\n let name = parsed[1] || '';\n let isAsync = parsed[8] === 'async ';\n if (name === '<anonymous>') {\n name = '';\n } else if (name.startsWith('async ')) {\n name = name.slice(5);\n isAsync = true;\n }\n let filename = parsed[2] || parsed[5] || '';\n if (filename === '<anonymous>') {\n filename = '';\n }\n const line = +(parsed[3] || parsed[6] || 0);\n const col = +(parsed[4] || parsed[7] || 0);\n parsedFrames.push([name, filename, line, col, 0, 0, isAsync]);\n }\n return parsedFrames;\n}\n\nconst firefoxFrameRegExp = /^((?:.*\".+\")?[^@]*)@(.+):(\\d+):(\\d+)$/;\nfunction parseStackTraceFromFirefoxStack(\n stack: string,\n skipFrames: number,\n): ReactStackTrace {\n let idx = stack.indexOf('react_stack_bottom_frame');\n if (idx === -1) {\n idx = stack.indexOf('react-stack-bottom-frame');\n }\n if (idx !== -1) {\n idx = stack.lastIndexOf('\\n', idx);\n }\n if (idx !== -1) {\n // Cut off everything after the bottom frame since it'll be internals.\n stack = stack.slice(0, idx);\n }\n const frames = stack.split('\\n');\n const parsedFrames: ReactStackTrace = [];\n // We skip top frames here since they may or may not be parseable but we\n // want to skip the same number of frames regardless. I.e. we can't do it\n // in the caller.\n for (let i = skipFrames; i < frames.length; i++) {\n const parsed = firefoxFrameRegExp.exec(frames[i]);\n if (!parsed) {\n continue;\n }\n const name = parsed[1] || '';\n const filename = parsed[2] || '';\n const line = +parsed[3];\n const col = +parsed[4];\n parsedFrames.push([name, filename, line, col, 0, 0, false]);\n }\n return parsedFrames;\n}\n\nconst CHROME_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\nexport function parseStackTraceFromString(\n stack: string,\n skipFrames: number,\n): ReactStackTrace {\n if (stack.match(CHROME_STACK_REGEXP)) {\n return parseStackTraceFromChromeStack(stack, skipFrames);\n }\n return parseStackTraceFromFirefoxStack(stack, skipFrames);\n}\n\nlet framesToSkip: number = 0;\nlet collectedStackTrace: null | ReactStackTrace = null;\n\nconst identifierRegExp = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/;\n\nfunction getMethodCallName(callSite: CallSite): string {\n const typeName = callSite.getTypeName();\n const methodName = callSite.getMethodName();\n const functionName = callSite.getFunctionName();\n let result = '';\n if (functionName) {\n if (\n typeName &&\n identifierRegExp.test(functionName) &&\n functionName !== typeName\n ) {\n result += typeName + '.';\n }\n result += functionName;\n if (\n methodName &&\n functionName !== methodName &&\n !functionName.endsWith('.' + methodName) &&\n !functionName.endsWith(' ' + methodName)\n ) {\n result += ' [as ' + methodName + ']';\n }\n } else {\n if (typeName) {\n result += typeName + '.';\n }\n if (methodName) {\n result += methodName;\n } else {\n result += '<anonymous>';\n }\n }\n return result;\n}\n\nfunction collectStackTrace(\n error: Error,\n structuredStackTrace: CallSite[],\n): string {\n const result: ReactStackTrace = [];\n // Collect structured stack traces from the callsites.\n // We mirror how V8 serializes stack frames and how we later parse them.\n for (let i = framesToSkip; i < structuredStackTrace.length; i++) {\n const callSite = structuredStackTrace[i];\n let name = callSite.getFunctionName() || '<anonymous>';\n if (\n name.includes('react_stack_bottom_frame') ||\n name.includes('react-stack-bottom-frame')\n ) {\n // Skip everything after the bottom frame since it'll be internals.\n break;\n } else if (callSite.isNative()) {\n // $FlowFixMe[prop-missing]\n const isAsync = callSite.isAsync();\n result.push([name, '', 0, 0, 0, 0, isAsync]);\n } else {\n // We encode complex function calls as if they're part of the function\n // name since we cannot simulate the complex ones and they look the same\n // as function names in UIs on the client as well as stacks.\n if (callSite.isConstructor()) {\n name = 'new ' + name;\n } else if (!callSite.isToplevel()) {\n name = getMethodCallName(callSite);\n }\n if (name === '<anonymous>') {\n name = '';\n }\n let filename = callSite.getScriptNameOrSourceURL() || '<anonymous>';\n if (filename === '<anonymous>') {\n filename = '';\n if (callSite.isEval()) {\n const origin = callSite.getEvalOrigin();\n if (origin) {\n filename = origin.toString() + ', <anonymous>';\n }\n }\n }\n const line = callSite.getLineNumber() || 0;\n const col = callSite.getColumnNumber() || 0;\n const enclosingLine: number =\n // $FlowFixMe[prop-missing]\n typeof callSite.getEnclosingLineNumber === 'function'\n ? (callSite: any).getEnclosingLineNumber() || 0\n : 0;\n const enclosingCol: number =\n // $FlowFixMe[prop-missing]\n typeof callSite.getEnclosingColumnNumber === 'function'\n ? (callSite: any).getEnclosingColumnNumber() || 0\n : 0;\n // $FlowFixMe[prop-missing]\n const isAsync = callSite.isAsync();\n result.push([\n name,\n filename,\n line,\n col,\n enclosingLine,\n enclosingCol,\n isAsync,\n ]);\n }\n }\n collectedStackTrace = result;\n\n // At the same time we generate a string stack trace just in case someone\n // else reads it. Ideally, we'd call the previous prepareStackTrace to\n // ensure it's in the expected format but it's common for that to be\n // source mapped and since we do a lot of eager parsing of errors, it\n // would be slow in those environments. We could maybe just rely on those\n // environments having to disable source mapping globally to speed things up.\n // For now, we just generate a default V8 formatted stack trace without\n // source mapping as a fallback.\n const name = error.name || 'Error';\n const message = error.message || '';\n let stack = name + ': ' + message;\n for (let i = 0; i < structuredStackTrace.length; i++) {\n stack += '\\n at ' + structuredStackTrace[i].toString();\n }\n return stack;\n}\n\n// This matches either of these V8 formats.\n// at name (filename:0:0)\n// at filename:0:0\n// at async filename:0:0\n// at Array.map (<anonymous>)\nconst chromeFrameRegExp =\n /^ *at (?:(.+) \\((?:(.+):(\\d+):(\\d+)|\\<anonymous\\>)\\)|(?:async )?(.+):(\\d+):(\\d+)|\\<anonymous\\>)$/;\n\nconst stackTraceCache: WeakMap<Error, ReactStackTrace> = new WeakMap();\n\nexport function parseStackTrace(\n error: Error,\n skipFrames: number,\n): ReactStackTrace {\n // We can only get structured data out of error objects once. So we cache the information\n // so we can get it again each time. It also helps performance when the same error is\n // referenced more than once.\n const existing = stackTraceCache.get(error);\n if (existing !== undefined) {\n return existing;\n }\n // We override Error.prepareStackTrace with our own version that collects\n // the structured data. We need more information than the raw stack gives us\n // and we need to ensure that we don't get the source mapped version.\n collectedStackTrace = null;\n framesToSkip = skipFrames;\n const previousPrepare = Error.prepareStackTrace;\n Error.prepareStackTrace = collectStackTrace;\n let stack;\n try {\n stack = String(error.stack);\n } finally {\n Error.prepareStackTrace = previousPrepare;\n }\n\n if (collectedStackTrace !== null) {\n const result = collectedStackTrace;\n collectedStackTrace = null;\n stackTraceCache.set(error, result);\n return result;\n }\n\n // If the stack has already been read, or this is not actually a V8 compatible\n // engine then we might not get a normalized stack and it might still have been\n // source mapped. Regardless we try our best to parse it.\n\n const parsedFrames = parseStackTraceFromString(stack, skipFrames);\n stackTraceCache.set(error, parsedFrames);\n return parsedFrames;\n}\n\nexport function extractLocationFromOwnerStack(\n error: Error,\n): ReactFunctionLocation | null {\n const stackTrace = parseStackTrace(error, 1);\n const stack = error.stack;\n if (\n !stack.includes('react_stack_bottom_frame') &&\n !stack.includes('react-stack-bottom-frame')\n ) {\n // This didn't have a bottom to it, we can't trust it.\n return null;\n }\n // We start from the bottom since that will have the best location for the owner itself.\n for (let i = stackTrace.length - 1; i >= 0; i--) {\n const [functionName, fileName, line, col, encLine, encCol] = stackTrace[i];\n // Take the first match with a colon in the file name.\n if (fileName.indexOf(':') !== -1) {\n return [\n functionName,\n fileName,\n // Use enclosing line if available, since that points to the start of the function.\n encLine || line,\n encCol || col,\n ];\n }\n }\n return null;\n}\n\nexport function extractLocationFromComponentStack(\n stack: string,\n): ReactFunctionLocation | null {\n const stackTrace = parseStackTraceFromString(stack, 0);\n for (let i = 0; i < stackTrace.length; i++) {\n const [functionName, fileName, line, col, encLine, encCol] = stackTrace[i];\n // Take the first match with a colon in the file name.\n if (fileName.indexOf(':') !== -1) {\n return [\n functionName,\n fileName,\n // Use enclosing line if available. (Never the case here because we parse from string.)\n encLine || line,\n encCol || col,\n ];\n }\n }\n return null;\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\n// This list should be kept updated to reflect additions to 'shared/ReactSymbols'.\n// DevTools can't import symbols from 'shared/ReactSymbols' directly for two reasons:\n// 1. DevTools requires symbols which may have been deleted in more recent versions (e.g. concurrent mode)\n// 2. DevTools must support both Symbol and numeric forms of each symbol;\n// Since e.g. standalone DevTools runs in a separate process, it can't rely on its own ES capabilities.\n\nexport const CONCURRENT_MODE_NUMBER = 0xeacf;\nexport const CONCURRENT_MODE_SYMBOL_STRING = 'Symbol(react.concurrent_mode)';\n\nexport const CONTEXT_NUMBER = 0xeace;\nexport const CONTEXT_SYMBOL_STRING = 'Symbol(react.context)';\n\nexport const SERVER_CONTEXT_SYMBOL_STRING = 'Symbol(react.server_context)';\n\nexport const DEPRECATED_ASYNC_MODE_SYMBOL_STRING = 'Symbol(react.async_mode)';\n\nexport const ELEMENT_SYMBOL_STRING = 'Symbol(react.transitional.element)';\nexport const LEGACY_ELEMENT_NUMBER = 0xeac7;\nexport const LEGACY_ELEMENT_SYMBOL_STRING = 'Symbol(react.element)';\n\nexport const DEBUG_TRACING_MODE_NUMBER = 0xeae1;\nexport const DEBUG_TRACING_MODE_SYMBOL_STRING =\n 'Symbol(react.debug_trace_mode)';\n\nexport const FORWARD_REF_NUMBER = 0xead0;\nexport const FORWARD_REF_SYMBOL_STRING = 'Symbol(react.forward_ref)';\n\nexport const FRAGMENT_NUMBER = 0xeacb;\nexport const FRAGMENT_SYMBOL_STRING = 'Symbol(react.fragment)';\n\nexport const LAZY_NUMBER = 0xead4;\nexport const LAZY_SYMBOL_STRING = 'Symbol(react.lazy)';\n\nexport const MEMO_NUMBER = 0xead3;\nexport const MEMO_SYMBOL_STRING = 'Symbol(react.memo)';\n\nexport const PORTAL_NUMBER = 0xeaca;\nexport const PORTAL_SYMBOL_STRING = 'Symbol(react.portal)';\n\nexport const PROFILER_NUMBER = 0xead2;\nexport const PROFILER_SYMBOL_STRING = 'Symbol(react.profiler)';\n\nexport const PROVIDER_NUMBER = 0xeacd;\nexport const PROVIDER_SYMBOL_STRING = 'Symbol(react.provider)';\n\nexport const CONSUMER_SYMBOL_STRING = 'Symbol(react.consumer)';\n\nexport const SCOPE_NUMBER = 0xead7;\nexport const SCOPE_SYMBOL_STRING = 'Symbol(react.scope)';\n\nexport const STRICT_MODE_NUMBER = 0xeacc;\nexport const STRICT_MODE_SYMBOL_STRING = 'Symbol(react.strict_mode)';\n\nexport const SUSPENSE_NUMBER = 0xead1;\nexport const SUSPENSE_SYMBOL_STRING = 'Symbol(react.suspense)';\n\nexport const SUSPENSE_LIST_NUMBER = 0xead8;\nexport const SUSPENSE_LIST_SYMBOL_STRING = 'Symbol(react.suspense_list)';\n\nexport const SERVER_CONTEXT_DEFAULT_VALUE_NOT_LOADED_SYMBOL_STRING =\n 'Symbol(react.server_context.defaultValue)';\n\nexport const REACT_MEMO_CACHE_SENTINEL: symbol = Symbol.for(\n 'react.memo_cache_sentinel',\n);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\n/************************************************************************\n * This file is forked between different DevTools implementations.\n * It should never be imported directly!\n * It should always be imported from \"react-devtools-feature-flags\".\n ************************************************************************/\n\nexport const enableLogger: boolean = false;\nexport const enableStyleXFeatures: boolean = false;\nexport const isInternalFacebookBuild: boolean = false;\n\n/************************************************************************\n * Do not edit the code below.\n * It ensures this fork exports the same types as the default flags file.\n ************************************************************************/\n\nimport typeof * as FeatureFlagsType from './DevToolsFeatureFlags.default';\nimport typeof * as ExportsType from './DevToolsFeatureFlags.core-oss';\n\n// Flow magic to verify the exports of this file match the original version.\n((((null: any): ExportsType): FeatureFlagsType): ExportsType);\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\nfunction is(x: any, y: any) {\n return (\n (x === y && (x !== 0 || 1 / x === 1 / y)) || (x !== x && y !== y) // eslint-disable-line no-self-compare\n );\n}\n\nconst objectIs: (x: any, y: any) => boolean =\n // $FlowFixMe[method-unbinding]\n typeof Object.is === 'function' ? Object.is : is;\n\nexport default objectIs;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\n// $FlowFixMe[method-unbinding]\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\n\nexport default hasOwnProperty;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nexport function getIODescription(value: mixed): string {\n if (!__DEV__) {\n return '';\n }\n try {\n switch (typeof value) {\n case 'function':\n return value.name || '';\n case 'object':\n // Test the object for a bunch of common property names that are useful identifiers.\n // While we only have the return value here, it should ideally be a name that\n // describes the arguments requested.\n if (value === null) {\n return '';\n } else if (value instanceof Error) {\n // eslint-disable-next-line react-internal/safe-string-coercion\n return String(value.message);\n } else if (typeof value.url === 'string') {\n return value.url;\n } else if (typeof value.href === 'string') {\n return value.href;\n } else if (typeof value.src === 'string') {\n return value.src;\n } else if (typeof value.currentSrc === 'string') {\n return value.currentSrc;\n } else if (typeof value.command === 'string') {\n return value.command;\n } else if (\n typeof value.request === 'object' &&\n value.request !== null &&\n typeof value.request.url === 'string'\n ) {\n return value.request.url;\n } else if (\n typeof value.response === 'object' &&\n value.response !== null &&\n typeof value.response.url === 'string'\n ) {\n return value.response.url;\n } else if (\n typeof value.id === 'string' ||\n typeof value.id === 'number' ||\n typeof value.id === 'bigint'\n ) {\n // eslint-disable-next-line react-internal/safe-string-coercion\n return String(value.id);\n } else if (typeof value.name === 'string') {\n return value.name;\n } else {\n const str = value.toString();\n if (\n str.startsWith('[object ') ||\n str.length < 5 ||\n str.length > 500\n ) {\n // This is probably not a useful description.\n return '';\n }\n return str;\n }\n case 'string':\n if (value.length < 5 || value.length > 500) {\n return '';\n }\n return value;\n case 'number':\n case 'bigint':\n // eslint-disable-next-line react-internal/safe-string-coercion\n return String(value);\n default:\n // Not useful descriptors.\n return '';\n }\n } catch (x) {\n return '';\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\n// This is a DevTools fork of ReactFiberComponentStack.\n// This fork enables DevTools to use the same \"native\" component stack format,\n// while still maintaining support for multiple renderer versions\n// (which use different values for ReactTypeOfWork).\n\nimport type {Fiber} from 'react-reconciler/src/ReactInternalTypes';\nimport type {CurrentDispatcherRef, WorkTagMap} from '../types';\n\nimport type {ReactComponentInfo} from 'shared/ReactTypes';\n\nimport {\n describeBuiltInComponentFrame,\n describeFunctionComponentFrame,\n describeClassComponentFrame,\n describeDebugInfoFrame,\n} from '../shared/DevToolsComponentStackFrame';\n\nimport {formatOwnerStack} from '../shared/DevToolsOwnerStack';\n\nexport function describeFiber(\n workTagMap: WorkTagMap,\n workInProgress: Fiber,\n currentDispatcherRef: CurrentDispatcherRef,\n): string {\n const {\n HostHoistable,\n HostSingleton,\n HostComponent,\n LazyComponent,\n SuspenseComponent,\n SuspenseListComponent,\n FunctionComponent,\n IndeterminateComponent,\n SimpleMemoComponent,\n ForwardRef,\n ClassComponent,\n ViewTransitionComponent,\n ActivityComponent,\n } = workTagMap;\n\n switch (workInProgress.tag) {\n case HostHoistable:\n case HostSingleton:\n case HostComponent:\n return describeBuiltInComponentFrame(workInProgress.type);\n case LazyComponent:\n // TODO: When we support Thenables as component types we should rename this.\n return describeBuiltInComponentFrame('Lazy');\n case SuspenseComponent:\n return describeBuiltInComponentFrame('Suspense');\n case SuspenseListComponent:\n return describeBuiltInComponentFrame('SuspenseList');\n case ViewTransitionComponent:\n return describeBuiltInComponentFrame('ViewTransition');\n case ActivityComponent:\n return describeBuiltInComponentFrame('Activity');\n case FunctionComponent:\n case IndeterminateComponent:\n case SimpleMemoComponent:\n return describeFunctionComponentFrame(\n workInProgress.type,\n currentDispatcherRef,\n );\n case ForwardRef:\n return describeFunctionComponentFrame(\n workInProgress.type.render,\n currentDispatcherRef,\n );\n case ClassComponent:\n return describeClassComponentFrame(\n workInProgress.type,\n currentDispatcherRef,\n );\n default:\n return '';\n }\n}\n\nexport function getStackByFiberInDevAndProd(\n workTagMap: WorkTagMap,\n workInProgress: Fiber,\n currentDispatcherRef: CurrentDispatcherRef,\n): string {\n try {\n let info = '';\n let node: Fiber = workInProgress;\n do {\n info += describeFiber(workTagMap, node, currentDispatcherRef);\n // Add any Server Component stack frames in reverse order.\n const debugInfo = node._debugInfo;\n if (debugInfo) {\n for (let i = debugInfo.length - 1; i >= 0; i--) {\n const entry = debugInfo[i];\n if (typeof entry.name === 'string') {\n info += describeDebugInfoFrame(entry.name, entry.env);\n }\n }\n }\n // $FlowFixMe[incompatible-type] we bail out when we get a null\n node = node.return;\n } while (node);\n return info;\n } catch (x) {\n return '\\nError generating stack: ' + x.message + '\\n' + x.stack;\n }\n}\n\nexport function getSourceLocationByFiber(\n workTagMap: WorkTagMap,\n fiber: Fiber,\n currentDispatcherRef: CurrentDispatcherRef,\n): null | string {\n // This is like getStackByFiberInDevAndProd but just the first stack frame.\n try {\n const info = describeFiber(workTagMap, fiber, currentDispatcherRef);\n if (info !== '') {\n return info.slice(1); // skip the leading newline\n }\n } catch (x) {\n console.error(x);\n }\n return null;\n}\n\nexport function supportsConsoleTasks(fiber: Fiber): boolean {\n // If this Fiber supports native console.createTask then we are already running\n // inside a native async stack trace if it's active - meaning the DevTools is open.\n // Ideally we'd detect if this task was created while the DevTools was open or not.\n return !!fiber._debugTask;\n}\n\nexport function supportsOwnerStacks(fiber: Fiber): boolean {\n // If this Fiber supports owner stacks then it'll have the _debugStack field.\n // It might be null but that still means we should use the owner stack logic.\n return fiber._debugStack !== undefined;\n}\n\nexport function getOwnerStackByFiberInDev(\n workTagMap: WorkTagMap,\n workInProgress: Fiber,\n currentDispatcherRef: CurrentDispatcherRef,\n): string {\n const {\n HostHoistable,\n HostSingleton,\n HostText,\n HostComponent,\n SuspenseComponent,\n SuspenseListComponent,\n ViewTransitionComponent,\n ActivityComponent,\n } = workTagMap;\n try {\n let info = '';\n\n if (workInProgress.tag === HostText) {\n // Text nodes never have an owner/stack because they're not created through JSX.\n // We use the parent since text nodes are always created through a host parent.\n workInProgress = (workInProgress.return: any);\n }\n\n // The owner stack of the current fiber will be where it was created, i.e. inside its owner.\n // There's no actual name of the currently executing component. Instead, that is available\n // on the regular stack that's currently executing. However, for built-ins there is no such\n // named stack frame and it would be ignored as being internal anyway. Therefore we add\n // add one extra frame just to describe the \"current\" built-in component by name.\n switch (workInProgress.tag) {\n case HostHoistable:\n case HostSingleton:\n case HostComponent:\n info += describeBuiltInComponentFrame(workInProgress.type);\n break;\n case SuspenseComponent:\n info += describeBuiltInComponentFrame('Suspense');\n break;\n case SuspenseListComponent:\n info += describeBuiltInComponentFrame('SuspenseList');\n break;\n case ViewTransitionComponent:\n info += describeBuiltInComponentFrame('ViewTransition');\n break;\n case ActivityComponent:\n info += describeBuiltInComponentFrame('Activity');\n break;\n }\n\n let owner: void | null | Fiber | ReactComponentInfo = workInProgress;\n\n while (owner) {\n if (typeof owner.tag === 'number') {\n const fiber: Fiber = (owner: any);\n owner = fiber._debugOwner;\n let debugStack: void | null | string | Error = fiber._debugStack;\n // If we don't actually print the stack if there is no owner of this JSX element.\n // In a real app it's typically not useful since the root app is always controlled\n // by the framework. These also tend to have noisy stacks because they're not rooted\n // in a React render but in some imperative bootstrapping code. It could be useful\n // if the element was created in module scope. E.g. hoisted. We could add a a single\n // stack frame for context for example but it doesn't say much if that's a wrapper.\n if (owner && debugStack) {\n if (typeof debugStack !== 'string') {\n debugStack = formatOwnerStack(debugStack);\n }\n if (debugStack !== '') {\n info += '\\n' + debugStack;\n }\n }\n } else if (owner.debugStack != null) {\n // Server Component\n const ownerStack: Error = owner.debugStack;\n owner = owner.owner;\n if (owner && ownerStack) {\n info += '\\n' + formatOwnerStack(ownerStack);\n }\n } else {\n break;\n }\n }\n return info;\n } catch (x) {\n return '\\nError generating stack: ' + x.message + '\\n' + x.stack;\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport type {StyleXPlugin} from 'react-devtools-shared/src/frontend/types';\nimport isArray from 'react-devtools-shared/src/isArray';\n\nconst cachedStyleNameToValueMap: Map<string, string> = new Map();\n\nexport function getStyleXData(data: any): StyleXPlugin {\n const sources = new Set<string>();\n const resolvedStyles = {};\n\n crawlData(data, sources, resolvedStyles);\n\n return {\n sources: Array.from(sources).sort(),\n resolvedStyles,\n };\n}\n\nexport function crawlData(\n data: any,\n sources: Set<string>,\n resolvedStyles: Object,\n): void {\n if (data == null) {\n return;\n }\n\n if (isArray(data)) {\n data.forEach(entry => {\n if (entry == null) {\n return;\n }\n\n if (isArray(entry)) {\n crawlData(entry, sources, resolvedStyles);\n } else {\n crawlObjectProperties(entry, sources, resolvedStyles);\n }\n });\n } else {\n crawlObjectProperties(data, sources, resolvedStyles);\n }\n\n resolvedStyles = Object.fromEntries<string, any>(\n Object.entries(resolvedStyles).sort(),\n );\n}\n\nfunction crawlObjectProperties(\n entry: Object,\n sources: Set<string>,\n resolvedStyles: Object,\n): void {\n const keys = Object.keys(entry);\n keys.forEach(key => {\n const value = entry[key];\n if (typeof value === 'string') {\n if (key === value) {\n // Special case; this key is the name of the style's source/file/module.\n sources.add(key);\n } else {\n const propertyValue = getPropertyValueForStyleName(value);\n if (propertyValue != null) {\n resolvedStyles[key] = propertyValue;\n }\n }\n } else {\n const nestedStyle = {};\n resolvedStyles[key] = nestedStyle;\n crawlData([value], sources, nestedStyle);\n }\n });\n}\n\nfunction getPropertyValueForStyleName(styleName: string): string | null {\n if (cachedStyleNameToValueMap.has(styleName)) {\n return ((cachedStyleNameToValueMap.get(styleName): any): string);\n }\n\n for (\n let styleSheetIndex = 0;\n styleSheetIndex < document.styleSheets.length;\n styleSheetIndex++\n ) {\n const styleSheet = ((document.styleSheets[\n styleSheetIndex\n ]: any): CSSStyleSheet);\n let rules: CSSRuleList | null = null;\n // this might throw if CORS rules are enforced https://www.w3.org/TR/cssom-1/#the-cssstylesheet-interface\n try {\n rules = styleSheet.cssRules;\n } catch (_e) {\n continue;\n }\n\n for (let ruleIndex = 0; ruleIndex < rules.length; ruleIndex++) {\n if (!(rules[ruleIndex] instanceof CSSStyleRule)) {\n continue;\n }\n const rule = ((rules[ruleIndex]: any): CSSStyleRule);\n const {cssText, selectorText, style} = rule;\n\n if (selectorText != null) {\n if (selectorText.startsWith(`.${styleName}`)) {\n const match = cssText.match(/{ *([a-z\\-]+):/);\n if (match !== null) {\n const property = match[1];\n const value = style.getPropertyValue(property);\n\n cachedStyleNameToValueMap.set(styleName, value);\n\n return value;\n } else {\n return null;\n }\n }\n }\n }\n }\n\n return null;\n}\n","export const CHANGE_LOG_URL =\n 'https://github.com/facebook/react/blob/main/packages/react-devtools/CHANGELOG.md';\n\nexport const UNSUPPORTED_VERSION_URL =\n 'https://reactjs.org/blog/2019/08/15/new-react-devtools.html#how-do-i-get-the-old-version-back';\n\nexport const REACT_DEVTOOLS_WORKPLACE_URL =\n 'https://fburl.com/react-devtools-workplace-group';\n\nimport type {\n Theme,\n DisplayDensity,\n} from './devtools/views/Settings/SettingsContext';\n\nexport const THEME_STYLES: {[style: Theme | DisplayDensity]: any, ...} = {\n light: {\n '--color-attribute-name': '#ef6632',\n '--color-attribute-name-not-editable': '#23272f',\n '--color-attribute-name-inverted': 'rgba(255, 255, 255, 0.7)',\n '--color-attribute-value': '#1a1aa6',\n '--color-attribute-value-inverted': '#ffffff',\n '--color-attribute-editable-value': '#1a1aa6',\n '--color-background': '#ffffff',\n '--color-background-hover': 'rgba(0, 136, 250, 0.1)',\n '--color-background-inactive': '#e5e5e5',\n '--color-background-invalid': '#fff0f0',\n '--color-background-selected': '#0088fa',\n '--color-button-background': '#ffffff',\n '--color-button-background-focus': '#ededed',\n '--color-button-background-hover': 'rgba(0, 0, 0, 0.2)',\n '--color-button': '#5f6673',\n '--color-button-disabled': '#cfd1d5',\n '--color-button-active': '#0088fa',\n '--color-button-focus': '#23272f',\n '--color-button-hover': '#23272f',\n '--color-border': '#eeeeee',\n '--color-commit-did-not-render-fill': '#cfd1d5',\n '--color-commit-did-not-render-fill-text': '#000000',\n '--color-commit-did-not-render-pattern': '#cfd1d5',\n '--color-commit-did-not-render-pattern-text': '#333333',\n '--color-commit-gradient-0': '#37afa9',\n '--color-commit-gradient-1': '#63b19e',\n '--color-commit-gradient-2': '#80b393',\n '--color-commit-gradient-3': '#97b488',\n '--color-commit-gradient-4': '#abb67d',\n '--color-commit-gradient-5': '#beb771',\n '--color-commit-gradient-6': '#cfb965',\n '--color-commit-gradient-7': '#dfba57',\n '--color-commit-gradient-8': '#efbb49',\n '--color-commit-gradient-9': '#febc38',\n '--color-commit-gradient-text': '#000000',\n '--color-component-name': '#6a51b2',\n '--color-component-name-inverted': '#ffffff',\n '--color-component-badge-background': '#e6e6e6',\n '--color-component-badge-background-inverted': 'rgba(255, 255, 255, 0.25)',\n '--color-component-badge-count': '#777d88',\n '--color-component-badge-count-inverted': 'rgba(255, 255, 255, 0.7)',\n '--color-console-error-badge-text': '#ffffff',\n '--color-console-error-background': '#fff0f0',\n '--color-console-error-border': '#ffd6d6',\n '--color-console-error-icon': '#eb3941',\n '--color-console-error-text': '#fe2e31',\n '--color-console-warning-badge-text': '#000000',\n '--color-console-warning-background': '#fffbe5',\n '--color-console-warning-border': '#fff5c1',\n '--color-console-warning-icon': '#f4bd00',\n '--color-console-warning-text': '#64460c',\n '--color-context-background': 'rgba(0,0,0,.9)',\n '--color-context-background-hover': 'rgba(255, 255, 255, 0.1)',\n '--color-context-background-selected': '#178fb9',\n '--color-context-border': '#3d424a',\n '--color-context-text': '#ffffff',\n '--color-context-text-selected': '#ffffff',\n '--color-dim': '#777d88',\n '--color-dimmer': '#cfd1d5',\n '--color-dimmest': '#eff0f1',\n '--color-error-background': 'hsl(0, 100%, 97%)',\n '--color-error-border': 'hsl(0, 100%, 92%)',\n '--color-error-text': '#ff0000',\n '--color-expand-collapse-toggle': '#777d88',\n '--color-forget-badge-background': '#2683e2',\n '--color-forget-badge-background-inverted': '#1a6bbc',\n '--color-forget-text': '#fff',\n '--color-link': '#0000ff',\n '--color-modal-background': 'rgba(255, 255, 255, 0.75)',\n '--color-bridge-version-npm-background': '#eff0f1',\n '--color-bridge-version-npm-text': '#000000',\n '--color-bridge-version-number': '#0088fa',\n '--color-primitive-hook-badge-background': '#e5e5e5',\n '--color-primitive-hook-badge-text': '#5f6673',\n '--color-record-active': '#fc3a4b',\n '--color-record-hover': '#3578e5',\n '--color-record-inactive': '#0088fa',\n '--color-resize-bar': '#eeeeee',\n '--color-resize-bar-active': '#dcdcdc',\n '--color-resize-bar-border': '#d1d1d1',\n '--color-resize-bar-dot': '#333333',\n '--color-timeline-internal-module': '#d1d1d1',\n '--color-timeline-internal-module-hover': '#c9c9c9',\n '--color-timeline-internal-module-text': '#444',\n '--color-timeline-native-event': '#ccc',\n '--color-timeline-native-event-hover': '#aaa',\n '--color-timeline-network-primary': '#fcf3dc',\n '--color-timeline-network-primary-hover': '#f0e7d1',\n '--color-timeline-network-secondary': '#efc457',\n '--color-timeline-network-secondary-hover': '#e3ba52',\n '--color-timeline-priority-background': '#f6f6f6',\n '--color-timeline-priority-border': '#eeeeee',\n '--color-timeline-user-timing': '#c9cacd',\n '--color-timeline-user-timing-hover': '#93959a',\n '--color-timeline-react-idle': '#d3e5f6',\n '--color-timeline-react-idle-hover': '#c3d9ef',\n '--color-timeline-react-render': '#9fc3f3',\n '--color-timeline-react-render-hover': '#83afe9',\n '--color-timeline-react-render-text': '#11365e',\n '--color-timeline-react-commit': '#c88ff0',\n '--color-timeline-react-commit-hover': '#b281d6',\n '--color-timeline-react-commit-text': '#3e2c4a',\n '--color-timeline-react-layout-effects': '#b281d6',\n '--color-timeline-react-layout-effects-hover': '#9d71bd',\n '--color-timeline-react-layout-effects-text': '#3e2c4a',\n '--color-timeline-react-passive-effects': '#b281d6',\n '--color-timeline-react-passive-effects-hover': '#9d71bd',\n '--color-timeline-react-passive-effects-text': '#3e2c4a',\n '--color-timeline-react-schedule': '#9fc3f3',\n '--color-timeline-react-schedule-hover': '#2683E2',\n '--color-timeline-react-suspense-rejected': '#f1cc14',\n '--color-timeline-react-suspense-rejected-hover': '#ffdf37',\n '--color-timeline-react-suspense-resolved': '#a6e59f',\n '--color-timeline-react-suspense-resolved-hover': '#89d281',\n '--color-timeline-react-suspense-unresolved': '#c9cacd',\n '--color-timeline-react-suspense-unresolved-hover': '#93959a',\n '--color-timeline-thrown-error': '#ee1638',\n '--color-timeline-thrown-error-hover': '#da1030',\n '--color-timeline-text-color': '#000000',\n '--color-timeline-text-dim-color': '#ccc',\n '--color-timeline-react-work-border': '#eeeeee',\n '--color-timebar-background': '#f6f6f6',\n '--color-search-match': 'yellow',\n '--color-search-match-current': '#f7923b',\n '--color-selected-tree-highlight-active': 'rgba(0, 136, 250, 0.1)',\n '--color-selected-tree-highlight-inactive': 'rgba(0, 0, 0, 0.05)',\n '--color-scroll-caret': 'rgba(150, 150, 150, 0.5)',\n '--color-tab-selected-border': '#0088fa',\n '--color-text': '#000000',\n '--color-text-invalid': '#ff0000',\n '--color-text-selected': '#ffffff',\n '--color-toggle-background-invalid': '#fc3a4b',\n '--color-toggle-background-on': '#0088fa',\n '--color-toggle-background-off': '#cfd1d5',\n '--color-toggle-text': '#ffffff',\n '--color-warning-background': '#fb3655',\n '--color-warning-background-hover': '#f82042',\n '--color-warning-text-color': '#ffffff',\n '--color-warning-text-color-inverted': '#fd4d69',\n\n '--color-suspense-default': '#0088fa',\n '--color-transition-default': '#6a51b2',\n '--color-suspense-server': '#62bc6a',\n '--color-transition-server': '#3f7844',\n '--color-suspense-other': '#f3ce49',\n '--color-transition-other': '#917b2c',\n '--color-suspense-errored': '#d57066',\n\n // The styles below should be kept in sync with 'root.css'\n // They are repeated there because they're used by e.g. tooltips or context menus\n // which get rendered outside of the DOM subtree (where normal theme/styles are written).\n '--color-scroll-thumb': '#c2c2c2',\n '--color-scroll-track': '#fafafa',\n '--color-tooltip-background': 'rgba(0, 0, 0, 0.9)',\n '--color-tooltip-text': '#ffffff',\n\n '--elevation-4':\n '0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)',\n },\n dark: {\n '--color-attribute-name': '#9d87d2',\n '--color-attribute-name-not-editable': '#ededed',\n '--color-attribute-name-inverted': '#282828',\n '--color-attribute-value': '#cedae0',\n '--color-attribute-value-inverted': '#ffffff',\n '--color-attribute-editable-value': 'yellow',\n '--color-background': '#282c34',\n '--color-background-hover': 'rgba(255, 255, 255, 0.1)',\n '--color-background-inactive': '#3d424a',\n '--color-background-invalid': '#5c0000',\n '--color-background-selected': '#178fb9',\n '--color-button-background': '#282c34',\n '--color-button-background-focus': '#3d424a',\n '--color-button-background-hover': 'rgba(255, 255, 255, 0.2)',\n '--color-button': '#afb3b9',\n '--color-button-active': '#61dafb',\n '--color-button-disabled': '#4f5766',\n '--color-button-focus': '#a2e9fc',\n '--color-button-hover': '#ededed',\n '--color-border': '#3d424a',\n '--color-commit-did-not-render-fill': '#777d88',\n '--color-commit-did-not-render-fill-text': '#000000',\n '--color-commit-did-not-render-pattern': '#666c77',\n '--color-commit-did-not-render-pattern-text': '#ffffff',\n '--color-commit-gradient-0': '#37afa9',\n '--color-commit-gradient-1': '#63b19e',\n '--color-commit-gradient-2': '#80b393',\n '--color-commit-gradient-3': '#97b488',\n '--color-commit-gradient-4': '#abb67d',\n '--color-commit-gradient-5': '#beb771',\n '--color-commit-gradient-6': '#cfb965',\n '--color-commit-gradient-7': '#dfba57',\n '--color-commit-gradient-8': '#efbb49',\n '--color-commit-gradient-9': '#febc38',\n '--color-commit-gradient-text': '#000000',\n '--color-component-name': '#61dafb',\n '--color-component-name-inverted': '#282828',\n '--color-component-badge-background': '#5e6167',\n '--color-component-badge-background-inverted': '#46494e',\n '--color-component-badge-count': '#8f949d',\n '--color-component-badge-count-inverted': 'rgba(255, 255, 255, 0.85)',\n '--color-console-error-badge-text': '#000000',\n '--color-console-error-background': '#290000',\n '--color-console-error-border': '#5c0000',\n '--color-console-error-icon': '#eb3941',\n '--color-console-error-text': '#fc7f7f',\n '--color-console-warning-badge-text': '#000000',\n '--color-console-warning-background': '#332b00',\n '--color-console-warning-border': '#665500',\n '--color-console-warning-icon': '#f4bd00',\n '--color-console-warning-text': '#f5f2ed',\n '--color-context-background': 'rgba(255,255,255,.95)',\n '--color-context-background-hover': 'rgba(0, 136, 250, 0.1)',\n '--color-context-background-selected': '#0088fa',\n '--color-context-border': '#eeeeee',\n '--color-context-text': '#000000',\n '--color-context-text-selected': '#ffffff',\n '--color-dim': '#8f949d',\n '--color-dimmer': '#777d88',\n '--color-dimmest': '#4f5766',\n '--color-error-background': '#200',\n '--color-error-border': '#900',\n '--color-error-text': '#f55',\n '--color-expand-collapse-toggle': '#8f949d',\n '--color-forget-badge-background': '#2683e2',\n '--color-forget-badge-background-inverted': '#1a6bbc',\n '--color-forget-text': '#fff',\n '--color-link': '#61dafb',\n '--color-modal-background': 'rgba(0, 0, 0, 0.75)',\n '--color-bridge-version-npm-background': 'rgba(0, 0, 0, 0.25)',\n '--color-bridge-version-npm-text': '#ffffff',\n '--color-bridge-version-number': 'yellow',\n '--color-primitive-hook-badge-background': 'rgba(0, 0, 0, 0.25)',\n '--color-primitive-hook-badge-text': 'rgba(255, 255, 255, 0.7)',\n '--color-record-active': '#fc3a4b',\n '--color-record-hover': '#a2e9fc',\n '--color-record-inactive': '#61dafb',\n '--color-resize-bar': '#282c34',\n '--color-resize-bar-active': '#31363f',\n '--color-resize-bar-border': '#3d424a',\n '--color-resize-bar-dot': '#cfd1d5',\n '--color-timeline-internal-module': '#303542',\n '--color-timeline-internal-module-hover': '#363b4a',\n '--color-timeline-internal-module-text': '#7f8899',\n '--color-timeline-native-event': '#b2b2b2',\n '--color-timeline-native-event-hover': '#949494',\n '--color-timeline-network-primary': '#fcf3dc',\n '--color-timeline-network-primary-hover': '#e3dbc5',\n '--color-timeline-network-secondary': '#efc457',\n '--color-timeline-network-secondary-hover': '#d6af4d',\n '--color-timeline-priority-background': '#1d2129',\n '--color-timeline-priority-border': '#282c34',\n '--color-timeline-user-timing': '#c9cacd',\n '--color-timeline-user-timing-hover': '#93959a',\n '--color-timeline-react-idle': '#3d485b',\n '--color-timeline-react-idle-hover': '#465269',\n '--color-timeline-react-render': '#2683E2',\n '--color-timeline-react-render-hover': '#1a76d4',\n '--color-timeline-react-render-text': '#11365e',\n '--color-timeline-react-commit': '#731fad',\n '--color-timeline-react-commit-hover': '#611b94',\n '--color-timeline-react-commit-text': '#e5c1ff',\n '--color-timeline-react-layout-effects': '#611b94',\n '--color-timeline-react-layout-effects-hover': '#51167a',\n '--color-timeline-react-layout-effects-text': '#e5c1ff',\n '--color-timeline-react-passive-effects': '#611b94',\n '--color-timeline-react-passive-effects-hover': '#51167a',\n '--color-timeline-react-passive-effects-text': '#e5c1ff',\n '--color-timeline-react-schedule': '#2683E2',\n '--color-timeline-react-schedule-hover': '#1a76d4',\n '--color-timeline-react-suspense-rejected': '#f1cc14',\n '--color-timeline-react-suspense-rejected-hover': '#e4c00f',\n '--color-timeline-react-suspense-resolved': '#a6e59f',\n '--color-timeline-react-suspense-resolved-hover': '#89d281',\n '--color-timeline-react-suspense-unresolved': '#c9cacd',\n '--color-timeline-react-suspense-unresolved-hover': '#93959a',\n '--color-timeline-thrown-error': '#fb3655',\n '--color-timeline-thrown-error-hover': '#f82042',\n '--color-timeline-text-color': '#282c34',\n '--color-timeline-text-dim-color': '#555b66',\n '--color-timeline-react-work-border': '#3d424a',\n '--color-timebar-background': '#1d2129',\n '--color-search-match': 'yellow',\n '--color-search-match-current': '#f7923b',\n '--color-selected-tree-highlight-active': 'rgba(23, 143, 185, 0.15)',\n '--color-selected-tree-highlight-inactive': 'rgba(255, 255, 255, 0.05)',\n '--color-scroll-caret': '#4f5766',\n '--color-shadow': 'rgba(0, 0, 0, 0.5)',\n '--color-tab-selected-border': '#178fb9',\n '--color-text': '#ffffff',\n '--color-text-invalid': '#ff8080',\n '--color-text-selected': '#ffffff',\n '--color-toggle-background-invalid': '#fc3a4b',\n '--color-toggle-background-on': '#178fb9',\n '--color-toggle-background-off': '#777d88',\n '--color-toggle-text': '#ffffff',\n '--color-warning-background': '#ee1638',\n '--color-warning-background-hover': '#da1030',\n '--color-warning-text-color': '#ffffff',\n '--color-warning-text-color-inverted': '#ee1638',\n\n '--color-suspense-default': '#61dafb',\n '--color-transition-default': '#6a51b2',\n '--color-suspense-server': '#62bc6a',\n '--color-transition-server': '#3f7844',\n '--color-suspense-other': '#f3ce49',\n '--color-transition-other': '#917b2c',\n '--color-suspense-errored': '#d57066',\n\n // The styles below should be kept in sync with 'root.css'\n // They are repeated there because they're used by e.g. tooltips or context menus\n // which get rendered outside of the DOM subtree (where normal theme/styles are written).\n '--color-scroll-thumb': '#afb3b9',\n '--color-scroll-track': '#313640',\n '--color-tooltip-background': 'rgba(255, 255, 255, 0.95)',\n '--color-tooltip-text': '#000000',\n\n '--elevation-4':\n '0 2px 8px 0 rgba(0,0,0,0.32),0 4px 12px 0 rgba(0,0,0,0.24),0 1px 10px 0 rgba(0,0,0,0.18)',\n },\n compact: {\n '--font-size-monospace-small': '9px',\n '--font-size-monospace-normal': '11px',\n '--font-size-monospace-large': '15px',\n '--font-size-sans-small': '10px',\n '--font-size-sans-normal': '12px',\n '--font-size-sans-large': '14px',\n '--line-height-data': '18px',\n },\n comfortable: {\n '--font-size-monospace-small': '10px',\n '--font-size-monospace-normal': '13px',\n '--font-size-monospace-large': '17px',\n '--font-size-sans-small': '12px',\n '--font-size-sans-normal': '14px',\n '--font-size-sans-large': '16px',\n '--line-height-data': '22px',\n },\n};\n\n// HACK\n//\n// Sometimes the inline target is rendered before root styles are applied,\n// which would result in e.g. NaN itemSize being passed to react-window list.\nconst COMFORTABLE_LINE_HEIGHT: number = parseInt(\n THEME_STYLES.comfortable['--line-height-data'],\n 10,\n);\nconst COMPACT_LINE_HEIGHT: number = parseInt(\n THEME_STYLES.compact['--line-height-data'],\n 10,\n);\n\nexport {COMFORTABLE_LINE_HEIGHT, COMPACT_LINE_HEIGHT};\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nexport {\n COMFORTABLE_LINE_HEIGHT,\n COMPACT_LINE_HEIGHT,\n} from 'react-devtools-shared/src/devtools/constants.js';\n\nexport const REACT_TOTAL_NUM_LANES = 31;\n\n// Increment this number any time a backwards breaking change is made to the profiler metadata.\nexport const SCHEDULING_PROFILER_VERSION = 1;\n\nexport const SNAPSHOT_MAX_HEIGHT = 60;\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport type {\n Lane,\n Lanes,\n DevToolsProfilingHooks,\n WorkTagMap,\n CurrentDispatcherRef,\n} from 'react-devtools-shared/src/backend/types';\nimport type {Fiber} from 'react-reconciler/src/ReactInternalTypes';\nimport type {Wakeable} from 'shared/ReactTypes';\nimport type {\n BatchUID,\n InternalModuleSourceToRanges,\n LaneToLabelMap,\n ReactComponentMeasure,\n ReactLane,\n ReactMeasure,\n ReactMeasureType,\n ReactScheduleStateUpdateEvent,\n SchedulingEvent,\n SuspenseEvent,\n TimelineData,\n} from 'react-devtools-timeline/src/types';\n\nimport isArray from 'shared/isArray';\nimport {\n REACT_TOTAL_NUM_LANES,\n SCHEDULING_PROFILER_VERSION,\n} from 'react-devtools-timeline/src/constants';\nimport {describeFiber} from './fiber/DevToolsFiberComponentStack';\n\n// Add padding to the start/stop time of the profile.\n// This makes the UI nicer to use.\nconst TIME_OFFSET = 10;\n\nlet performanceTarget: Performance | null = null;\n\n// If performance exists and supports the subset of the User Timing API that we require.\nlet supportsUserTiming =\n typeof performance !== 'undefined' &&\n // $FlowFixMe[method-unbinding]\n typeof performance.mark === 'function' &&\n // $FlowFixMe[method-unbinding]\n typeof performance.clearMarks === 'function';\n\nlet supportsUserTimingV3 = false;\nif (supportsUserTiming) {\n const CHECK_V3_MARK = '__v3';\n const markOptions: {\n detail?: mixed,\n startTime?: number,\n } = {};\n Object.defineProperty(markOptions, 'startTime', {\n get: function () {\n supportsUserTimingV3 = true;\n return 0;\n },\n set: function () {},\n });\n\n try {\n performance.mark(CHECK_V3_MARK, markOptions);\n } catch (error) {\n // Ignore\n } finally {\n performance.clearMarks(CHECK_V3_MARK);\n }\n}\n\nif (supportsUserTimingV3) {\n performanceTarget = performance;\n}\n\n// Some environments (e.g. React Native / Hermes) don't support the performance API yet.\nconst getCurrentTime =\n // $FlowFixMe[method-unbinding]\n typeof performance === 'object' && typeof performance.now === 'function'\n ? () => performance.now()\n : () => Date.now();\n\n// Mocking the Performance Object (and User Timing APIs) for testing is fragile.\n// This API allows tests to directly override the User Timing APIs.\nexport function setPerformanceMock_ONLY_FOR_TESTING(\n performanceMock: Performance | null,\n) {\n performanceTarget = performanceMock;\n supportsUserTiming = performanceMock !== null;\n supportsUserTimingV3 = performanceMock !== null;\n}\n\nexport type GetTimelineData = () => TimelineData | null;\nexport type ToggleProfilingStatus = (\n value: boolean,\n recordTimeline?: boolean,\n) => void;\n\ntype Response = {\n getTimelineData: GetTimelineData,\n profilingHooks: DevToolsProfilingHooks,\n toggleProfilingStatus: ToggleProfilingStatus,\n};\n\nexport function createProfilingHooks({\n getDisplayNameForFiber,\n getIsProfiling,\n getLaneLabelMap,\n workTagMap,\n currentDispatcherRef,\n reactVersion,\n}: {\n getDisplayNameForFiber: (fiber: Fiber) => string | null,\n getIsProfiling: () => boolean,\n getLaneLabelMap?: () => Map<Lane, string> | null,\n currentDispatcherRef?: CurrentDispatcherRef,\n workTagMap: WorkTagMap,\n reactVersion: string,\n}): Response {\n let currentBatchUID: BatchUID = 0;\n let currentReactComponentMeasure: ReactComponentMeasure | null = null;\n let currentReactMeasuresStack: Array<ReactMeasure> = [];\n let currentTimelineData: TimelineData | null = null;\n let currentFiberStacks: Map<SchedulingEvent, Array<Fiber>> = new Map();\n let isProfiling: boolean = false;\n let nextRenderShouldStartNewBatch: boolean = false;\n\n function getRelativeTime() {\n const currentTime = getCurrentTime();\n\n if (currentTimelineData) {\n if (currentTimelineData.startTime === 0) {\n currentTimelineData.startTime = currentTime - TIME_OFFSET;\n }\n\n return currentTime - currentTimelineData.startTime;\n }\n\n return 0;\n }\n\n function getInternalModuleRanges() {\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n if (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.getInternalModuleRanges ===\n 'function'\n ) {\n // Ask the DevTools hook for module ranges that may have been reported by the current renderer(s).\n // Don't do this eagerly like the laneToLabelMap,\n // because some modules might not yet have registered their boundaries when the renderer is injected.\n const ranges = __REACT_DEVTOOLS_GLOBAL_HOOK__.getInternalModuleRanges();\n\n // This check would not be required,\n // except that it's possible for things to override __REACT_DEVTOOLS_GLOBAL_HOOK__.\n if (isArray(ranges)) {\n return ranges;\n }\n }\n\n return null;\n }\n\n function getTimelineData(): TimelineData | null {\n return currentTimelineData;\n }\n\n function laneToLanesArray(lanes: Lane) {\n const lanesArray = [];\n\n let lane = 1;\n for (let index = 0; index < REACT_TOTAL_NUM_LANES; index++) {\n if (lane & lanes) {\n lanesArray.push(lane);\n }\n lane *= 2;\n }\n\n return lanesArray;\n }\n\n const laneToLabelMap: LaneToLabelMap | null =\n typeof getLaneLabelMap === 'function' ? getLaneLabelMap() : null;\n\n function markMetadata() {\n markAndClear(`--react-version-${reactVersion}`);\n markAndClear(`--profiler-version-${SCHEDULING_PROFILER_VERSION}`);\n\n const ranges = getInternalModuleRanges();\n if (ranges) {\n for (let i = 0; i < ranges.length; i++) {\n const range = ranges[i];\n if (isArray(range) && range.length === 2) {\n const [startStackFrame, stopStackFrame] = ranges[i];\n\n markAndClear(`--react-internal-module-start-${startStackFrame}`);\n markAndClear(`--react-internal-module-stop-${stopStackFrame}`);\n }\n }\n }\n\n if (laneToLabelMap != null) {\n const labels = Array.from(laneToLabelMap.values()).join(',');\n markAndClear(`--react-lane-labels-${labels}`);\n }\n }\n\n function markAndClear(markName: string) {\n // This method won't be called unless these functions are defined, so we can skip the extra typeof check.\n ((performanceTarget: any): Performance).mark(markName);\n ((performanceTarget: any): Performance).clearMarks(markName);\n }\n\n function recordReactMeasureStarted(\n type: ReactMeasureType,\n lanes: Lanes,\n ): void {\n // Decide what depth thi work should be rendered at, based on what's on the top of the stack.\n // It's okay to render over top of \"idle\" work but everything else should be on its own row.\n let depth = 0;\n if (currentReactMeasuresStack.length > 0) {\n const top =\n currentReactMeasuresStack[currentReactMeasuresStack.length - 1];\n depth = top.type === 'render-idle' ? top.depth : top.depth + 1;\n }\n\n const lanesArray = laneToLanesArray(lanes);\n\n const reactMeasure: ReactMeasure = {\n type,\n batchUID: currentBatchUID,\n depth,\n lanes: lanesArray,\n timestamp: getRelativeTime(),\n duration: 0,\n };\n\n currentReactMeasuresStack.push(reactMeasure);\n\n if (currentTimelineData) {\n const {batchUIDToMeasuresMap, laneToReactMeasureMap} =\n currentTimelineData;\n\n let reactMeasures = batchUIDToMeasuresMap.get(currentBatchUID);\n if (reactMeasures != null) {\n reactMeasures.push(reactMeasure);\n } else {\n batchUIDToMeasuresMap.set(currentBatchUID, [reactMeasure]);\n }\n\n lanesArray.forEach(lane => {\n reactMeasures = laneToReactMeasureMap.get(lane);\n if (reactMeasures) {\n reactMeasures.push(reactMeasure);\n }\n });\n }\n }\n\n function recordReactMeasureCompleted(type: ReactMeasureType): void {\n const currentTime = getRelativeTime();\n\n if (currentReactMeasuresStack.length === 0) {\n console.error(\n 'Unexpected type \"%s\" completed at %sms while currentReactMeasuresStack is empty.',\n type,\n currentTime,\n );\n // Ignore work \"completion\" user timing mark that doesn't complete anything\n return;\n }\n\n const top = currentReactMeasuresStack.pop();\n // $FlowFixMe[incompatible-type]\n // $FlowFixMe[incompatible-use]\n if (top.type !== type) {\n console.error(\n 'Unexpected type \"%s\" completed at %sms before \"%s\" completed.',\n type,\n currentTime,\n // $FlowFixMe[incompatible-use]\n top.type,\n );\n }\n\n // $FlowFixMe[cannot-write] This property should not be writable outside of this function.\n // $FlowFixMe[incompatible-use]\n top.duration = currentTime - top.timestamp;\n\n if (currentTimelineData) {\n currentTimelineData.duration = getRelativeTime() + TIME_OFFSET;\n }\n }\n\n function markCommitStarted(lanes: Lanes): void {\n if (!isProfiling) {\n return;\n }\n\n recordReactMeasureStarted('commit', lanes);\n\n // TODO (timeline) Re-think this approach to \"batching\"; I don't think it works for Suspense or pre-rendering.\n // This issue applies to the User Timing data also.\n nextRenderShouldStartNewBatch = true;\n\n if (supportsUserTimingV3) {\n markAndClear(`--commit-start-${lanes}`);\n\n // Some metadata only needs to be logged once per session,\n // but if profiling information is being recorded via the Performance tab,\n // DevTools has no way of knowing when the recording starts.\n // Because of that, we log thie type of data periodically (once per commit).\n markMetadata();\n }\n }\n\n function markCommitStopped(): void {\n if (!isProfiling) {\n return;\n }\n\n recordReactMeasureCompleted('commit');\n recordReactMeasureCompleted('render-idle');\n if (supportsUserTimingV3) {\n markAndClear('--commit-stop');\n }\n }\n\n function markComponentRenderStarted(fiber: Fiber): void {\n if (!isProfiling) {\n return;\n }\n\n const componentName = getDisplayNameForFiber(fiber) || 'Unknown';\n\n // TODO (timeline) Record and cache component stack\n currentReactComponentMeasure = {\n componentName,\n duration: 0,\n timestamp: getRelativeTime(),\n type: 'render',\n warning: null,\n };\n\n if (supportsUserTimingV3) {\n markAndClear(`--component-render-start-${componentName}`);\n }\n }\n\n function markComponentRenderStopped(): void {\n if (!isProfiling) {\n return;\n }\n\n if (currentReactComponentMeasure) {\n if (currentTimelineData) {\n currentTimelineData.componentMeasures.push(\n currentReactComponentMeasure,\n );\n }\n\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n currentReactComponentMeasure.duration =\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n getRelativeTime() - currentReactComponentMeasure.timestamp;\n currentReactComponentMeasure = null;\n }\n\n if (supportsUserTimingV3) {\n markAndClear('--component-render-stop');\n }\n }\n\n function markComponentLayoutEffectMountStarted(fiber: Fiber): void {\n if (!isProfiling) {\n return;\n }\n\n const componentName = getDisplayNameForFiber(fiber) || 'Unknown';\n\n // TODO (timeline) Record and cache component stack\n currentReactComponentMeasure = {\n componentName,\n duration: 0,\n timestamp: getRelativeTime(),\n type: 'layout-effect-mount',\n warning: null,\n };\n\n if (supportsUserTimingV3) {\n markAndClear(`--component-layout-effect-mount-start-${componentName}`);\n }\n }\n\n function markComponentLayoutEffectMountStopped(): void {\n if (!isProfiling) {\n return;\n }\n\n if (currentReactComponentMeasure) {\n if (currentTimelineData) {\n currentTimelineData.componentMeasures.push(\n currentReactComponentMeasure,\n );\n }\n\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n currentReactComponentMeasure.duration =\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n getRelativeTime() - currentReactComponentMeasure.timestamp;\n currentReactComponentMeasure = null;\n }\n\n if (supportsUserTimingV3) {\n markAndClear('--component-layout-effect-mount-stop');\n }\n }\n\n function markComponentLayoutEffectUnmountStarted(fiber: Fiber): void {\n if (!isProfiling) {\n return;\n }\n\n const componentName = getDisplayNameForFiber(fiber) || 'Unknown';\n\n // TODO (timeline) Record and cache component stack\n currentReactComponentMeasure = {\n componentName,\n duration: 0,\n timestamp: getRelativeTime(),\n type: 'layout-effect-unmount',\n warning: null,\n };\n\n if (supportsUserTimingV3) {\n markAndClear(`--component-layout-effect-unmount-start-${componentName}`);\n }\n }\n\n function markComponentLayoutEffectUnmountStopped(): void {\n if (!isProfiling) {\n return;\n }\n\n if (currentReactComponentMeasure) {\n if (currentTimelineData) {\n currentTimelineData.componentMeasures.push(\n currentReactComponentMeasure,\n );\n }\n\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n currentReactComponentMeasure.duration =\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n getRelativeTime() - currentReactComponentMeasure.timestamp;\n currentReactComponentMeasure = null;\n }\n\n if (supportsUserTimingV3) {\n markAndClear('--component-layout-effect-unmount-stop');\n }\n }\n\n function markComponentPassiveEffectMountStarted(fiber: Fiber): void {\n if (!isProfiling) {\n return;\n }\n\n const componentName = getDisplayNameForFiber(fiber) || 'Unknown';\n\n // TODO (timeline) Record and cache component stack\n currentReactComponentMeasure = {\n componentName,\n duration: 0,\n timestamp: getRelativeTime(),\n type: 'passive-effect-mount',\n warning: null,\n };\n\n if (supportsUserTimingV3) {\n markAndClear(`--component-passive-effect-mount-start-${componentName}`);\n }\n }\n\n function markComponentPassiveEffectMountStopped(): void {\n if (!isProfiling) {\n return;\n }\n\n if (currentReactComponentMeasure) {\n if (currentTimelineData) {\n currentTimelineData.componentMeasures.push(\n currentReactComponentMeasure,\n );\n }\n\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n currentReactComponentMeasure.duration =\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n getRelativeTime() - currentReactComponentMeasure.timestamp;\n currentReactComponentMeasure = null;\n }\n\n if (supportsUserTimingV3) {\n markAndClear('--component-passive-effect-mount-stop');\n }\n }\n\n function markComponentPassiveEffectUnmountStarted(fiber: Fiber): void {\n if (!isProfiling) {\n return;\n }\n\n const componentName = getDisplayNameForFiber(fiber) || 'Unknown';\n\n // TODO (timeline) Record and cache component stack\n currentReactComponentMeasure = {\n componentName,\n duration: 0,\n timestamp: getRelativeTime(),\n type: 'passive-effect-unmount',\n warning: null,\n };\n\n if (supportsUserTimingV3) {\n markAndClear(`--component-passive-effect-unmount-start-${componentName}`);\n }\n }\n\n function markComponentPassiveEffectUnmountStopped(): void {\n if (!isProfiling) {\n return;\n }\n\n if (currentReactComponentMeasure) {\n if (currentTimelineData) {\n currentTimelineData.componentMeasures.push(\n currentReactComponentMeasure,\n );\n }\n\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n currentReactComponentMeasure.duration =\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n getRelativeTime() - currentReactComponentMeasure.timestamp;\n currentReactComponentMeasure = null;\n }\n\n if (supportsUserTimingV3) {\n markAndClear('--component-passive-effect-unmount-stop');\n }\n }\n\n function markComponentErrored(\n fiber: Fiber,\n thrownValue: mixed,\n lanes: Lanes,\n ): void {\n if (!isProfiling) {\n return;\n }\n\n const componentName = getDisplayNameForFiber(fiber) || 'Unknown';\n const phase = fiber.alternate === null ? 'mount' : 'update';\n\n let message = '';\n if (\n thrownValue !== null &&\n typeof thrownValue === 'object' &&\n typeof thrownValue.message === 'string'\n ) {\n message = thrownValue.message;\n } else if (typeof thrownValue === 'string') {\n message = thrownValue;\n }\n\n // TODO (timeline) Record and cache component stack\n if (currentTimelineData) {\n currentTimelineData.thrownErrors.push({\n componentName,\n message,\n phase,\n timestamp: getRelativeTime(),\n type: 'thrown-error',\n });\n }\n\n if (supportsUserTimingV3) {\n markAndClear(`--error-${componentName}-${phase}-${message}`);\n }\n }\n\n const PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n\n // $FlowFixMe[incompatible-type]: Flow cannot handle polymorphic WeakMaps\n const wakeableIDs: WeakMap<Wakeable, number> = new PossiblyWeakMap();\n let wakeableID: number = 0;\n function getWakeableID(wakeable: Wakeable): number {\n if (!wakeableIDs.has(wakeable)) {\n wakeableIDs.set(wakeable, wakeableID++);\n }\n return ((wakeableIDs.get(wakeable): any): number);\n }\n\n function markComponentSuspended(\n fiber: Fiber,\n wakeable: Wakeable,\n lanes: Lanes,\n ): void {\n if (!isProfiling) {\n return;\n }\n\n const eventType = wakeableIDs.has(wakeable) ? 'resuspend' : 'suspend';\n const id = getWakeableID(wakeable);\n const componentName = getDisplayNameForFiber(fiber) || 'Unknown';\n const phase = fiber.alternate === null ? 'mount' : 'update';\n\n // Following the non-standard fn.displayName convention,\n // frameworks like Relay may also annotate Promises with a displayName,\n // describing what operation/data the thrown Promise is related to.\n // When this is available we should pass it along to the Timeline.\n const displayName = (wakeable: any).displayName || '';\n\n let suspenseEvent: SuspenseEvent | null = null;\n // TODO (timeline) Record and cache component stack\n suspenseEvent = {\n componentName,\n depth: 0,\n duration: 0,\n id: `${id}`,\n phase,\n promiseName: displayName,\n resolution: 'unresolved',\n timestamp: getRelativeTime(),\n type: 'suspense',\n warning: null,\n };\n\n if (currentTimelineData) {\n currentTimelineData.suspenseEvents.push(suspenseEvent);\n }\n\n if (supportsUserTimingV3) {\n markAndClear(\n `--suspense-${eventType}-${id}-${componentName}-${phase}-${lanes}-${displayName}`,\n );\n\n wakeable.then(\n () => {\n if (suspenseEvent) {\n suspenseEvent.duration =\n getRelativeTime() - suspenseEvent.timestamp;\n suspenseEvent.resolution = 'resolved';\n }\n\n if (supportsUserTimingV3) {\n markAndClear(`--suspense-resolved-${id}-${componentName}`);\n }\n },\n () => {\n if (suspenseEvent) {\n suspenseEvent.duration =\n getRelativeTime() - suspenseEvent.timestamp;\n suspenseEvent.resolution = 'rejected';\n }\n\n if (supportsUserTimingV3) {\n markAndClear(`--suspense-rejected-${id}-${componentName}`);\n }\n },\n );\n }\n }\n\n function markLayoutEffectsStarted(lanes: Lanes): void {\n if (!isProfiling) {\n return;\n }\n\n recordReactMeasureStarted('layout-effects', lanes);\n if (supportsUserTimingV3) {\n markAndClear(`--layout-effects-start-${lanes}`);\n }\n }\n\n function markLayoutEffectsStopped(): void {\n if (!isProfiling) {\n return;\n }\n\n recordReactMeasureCompleted('layout-effects');\n if (supportsUserTimingV3) {\n markAndClear('--layout-effects-stop');\n }\n }\n\n function markPassiveEffectsStarted(lanes: Lanes): void {\n if (!isProfiling) {\n return;\n }\n\n recordReactMeasureStarted('passive-effects', lanes);\n if (supportsUserTimingV3) {\n markAndClear(`--passive-effects-start-${lanes}`);\n }\n }\n\n function markPassiveEffectsStopped(): void {\n if (!isProfiling) {\n return;\n }\n\n recordReactMeasureCompleted('passive-effects');\n if (supportsUserTimingV3) {\n markAndClear('--passive-effects-stop');\n }\n }\n\n function markRenderStarted(lanes: Lanes): void {\n if (!isProfiling) {\n return;\n }\n\n if (nextRenderShouldStartNewBatch) {\n nextRenderShouldStartNewBatch = false;\n currentBatchUID++;\n }\n\n // If this is a new batch of work, wrap an \"idle\" measure around it.\n // Log it before the \"render\" measure to preserve the stack ordering.\n if (\n currentReactMeasuresStack.length === 0 ||\n currentReactMeasuresStack[currentReactMeasuresStack.length - 1].type !==\n 'render-idle'\n ) {\n recordReactMeasureStarted('render-idle', lanes);\n }\n\n recordReactMeasureStarted('render', lanes);\n if (supportsUserTimingV3) {\n markAndClear(`--render-start-${lanes}`);\n }\n }\n\n function markRenderYielded(): void {\n if (!isProfiling) {\n return;\n }\n\n recordReactMeasureCompleted('render');\n if (supportsUserTimingV3) {\n markAndClear('--render-yield');\n }\n }\n\n function markRenderStopped(): void {\n if (!isProfiling) {\n return;\n }\n\n recordReactMeasureCompleted('render');\n if (supportsUserTimingV3) {\n markAndClear('--render-stop');\n }\n }\n\n function markRenderScheduled(lane: Lane): void {\n if (!isProfiling) {\n return;\n }\n\n if (currentTimelineData) {\n currentTimelineData.schedulingEvents.push({\n lanes: laneToLanesArray(lane),\n timestamp: getRelativeTime(),\n type: 'schedule-render',\n warning: null,\n });\n }\n\n if (supportsUserTimingV3) {\n markAndClear(`--schedule-render-${lane}`);\n }\n }\n\n function markForceUpdateScheduled(fiber: Fiber, lane: Lane): void {\n if (!isProfiling) {\n return;\n }\n\n const componentName = getDisplayNameForFiber(fiber) || 'Unknown';\n\n // TODO (timeline) Record and cache component stack\n if (currentTimelineData) {\n currentTimelineData.schedulingEvents.push({\n componentName,\n lanes: laneToLanesArray(lane),\n timestamp: getRelativeTime(),\n type: 'schedule-force-update',\n warning: null,\n });\n }\n\n if (supportsUserTimingV3) {\n markAndClear(`--schedule-forced-update-${lane}-${componentName}`);\n }\n }\n\n function getParentFibers(fiber: Fiber): Array<Fiber> {\n const parents = [];\n let parent: null | Fiber = fiber;\n while (parent !== null) {\n parents.push(parent);\n parent = parent.return;\n }\n return parents;\n }\n\n function markStateUpdateScheduled(fiber: Fiber, lane: Lane): void {\n if (!isProfiling) {\n return;\n }\n\n const componentName = getDisplayNameForFiber(fiber) || 'Unknown';\n\n // TODO (timeline) Record and cache component stack\n if (currentTimelineData) {\n const event: ReactScheduleStateUpdateEvent = {\n componentName,\n // Store the parent fibers so we can post process\n // them after we finish profiling\n lanes: laneToLanesArray(lane),\n timestamp: getRelativeTime(),\n type: 'schedule-state-update',\n warning: null,\n };\n currentFiberStacks.set(event, getParentFibers(fiber));\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n currentTimelineData.schedulingEvents.push(event);\n }\n\n if (supportsUserTimingV3) {\n markAndClear(`--schedule-state-update-${lane}-${componentName}`);\n }\n }\n\n function toggleProfilingStatus(\n value: boolean,\n recordTimeline: boolean = false,\n ) {\n if (isProfiling !== value) {\n isProfiling = value;\n\n if (isProfiling) {\n const internalModuleSourceToRanges: InternalModuleSourceToRanges =\n new Map();\n\n if (supportsUserTimingV3) {\n const ranges = getInternalModuleRanges();\n if (ranges) {\n for (let i = 0; i < ranges.length; i++) {\n const range = ranges[i];\n if (isArray(range) && range.length === 2) {\n const [startStackFrame, stopStackFrame] = ranges[i];\n\n markAndClear(\n `--react-internal-module-start-${startStackFrame}`,\n );\n markAndClear(`--react-internal-module-stop-${stopStackFrame}`);\n }\n }\n }\n }\n\n const laneToReactMeasureMap = new Map<ReactLane, ReactMeasure[]>();\n let lane = 1;\n for (let index = 0; index < REACT_TOTAL_NUM_LANES; index++) {\n laneToReactMeasureMap.set(lane, []);\n lane *= 2;\n }\n\n currentBatchUID = 0;\n currentReactComponentMeasure = null;\n currentReactMeasuresStack = [];\n currentFiberStacks = new Map();\n if (recordTimeline) {\n currentTimelineData = {\n // Session wide metadata; only collected once.\n internalModuleSourceToRanges,\n laneToLabelMap: laneToLabelMap || new Map(),\n reactVersion,\n\n // Data logged by React during profiling session.\n componentMeasures: [],\n schedulingEvents: [],\n suspenseEvents: [],\n thrownErrors: [],\n\n // Data inferred based on what React logs.\n batchUIDToMeasuresMap: new Map(),\n duration: 0,\n laneToReactMeasureMap,\n startTime: 0,\n\n // Data only available in Chrome profiles.\n flamechart: [],\n nativeEvents: [],\n networkMeasures: [],\n otherUserTimingMarks: [],\n snapshots: [],\n snapshotHeight: 0,\n };\n }\n nextRenderShouldStartNewBatch = true;\n } else {\n // This is __EXPENSIVE__.\n // We could end up with hundreds of state updated, and for each one of them\n // would try to create a component stack with possibly hundreds of Fibers.\n // Creating a cache of component stacks won't help, generating a single stack is already expensive enough.\n // We should find a way to lazily generate component stacks on demand, when user inspects a specific event.\n // If we succeed with moving React DevTools Timeline Profiler to Performance panel, then Timeline Profiler would probably be removed.\n // Now that owner stacks are adopted, revisit this again and cache component stacks per Fiber,\n // but only return them when needed, sending hundreds of component stacks is beyond the Bridge's bandwidth.\n\n // Postprocess Profile data\n if (currentTimelineData !== null) {\n currentTimelineData.schedulingEvents.forEach(event => {\n if (event.type === 'schedule-state-update') {\n // TODO(luna): We can optimize this by creating a map of\n // fiber to component stack instead of generating the stack\n // for every fiber every time\n const fiberStack = currentFiberStacks.get(event);\n if (fiberStack && currentDispatcherRef != null) {\n event.componentStack = fiberStack.reduce((trace, fiber) => {\n return (\n trace +\n describeFiber(workTagMap, fiber, currentDispatcherRef)\n );\n }, '');\n }\n }\n });\n }\n\n // Clear the current fiber stacks so we don't hold onto the fibers\n // in memory after profiling finishes\n currentFiberStacks.clear();\n }\n }\n }\n\n return {\n getTimelineData,\n profilingHooks: {\n markCommitStarted,\n markCommitStopped,\n markComponentRenderStarted,\n markComponentRenderStopped,\n markComponentPassiveEffectMountStarted,\n markComponentPassiveEffectMountStopped,\n markComponentPassiveEffectUnmountStarted,\n markComponentPassiveEffectUnmountStopped,\n markComponentLayoutEffectMountStarted,\n markComponentLayoutEffectMountStopped,\n markComponentLayoutEffectUnmountStarted,\n markComponentLayoutEffectUnmountStopped,\n markComponentErrored,\n markComponentSuspended,\n markLayoutEffectsStarted,\n markLayoutEffectsStopped,\n markPassiveEffectsStarted,\n markPassiveEffectsStopped,\n markRenderStarted,\n markRenderYielded,\n markRenderStopped,\n markRenderScheduled,\n markForceUpdateScheduled,\n markStateUpdateScheduled,\n },\n toggleProfilingStatus,\n };\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport type {\n Thenable,\n ReactComponentInfo,\n ReactDebugInfo,\n ReactAsyncInfo,\n ReactIOInfo,\n ReactStackTrace,\n ReactCallSite,\n Wakeable,\n} from 'shared/ReactTypes';\n\nimport type {HooksTree} from 'react-debug-tools/src/ReactDebugHooks';\n\nimport {\n ComponentFilterDisplayName,\n ComponentFilterElementType,\n ComponentFilterHOC,\n ComponentFilterLocation,\n ComponentFilterEnvironmentName,\n ElementTypeClass,\n ElementTypeContext,\n ElementTypeFunction,\n ElementTypeForwardRef,\n ElementTypeHostComponent,\n ElementTypeMemo,\n ElementTypeOtherOrUnknown,\n ElementTypeProfiler,\n ElementTypeRoot,\n ElementTypeSuspense,\n ElementTypeSuspenseList,\n ElementTypeTracingMarker,\n ElementTypeViewTransition,\n ElementTypeActivity,\n ElementTypeVirtual,\n StrictMode,\n} from 'react-devtools-shared/src/frontend/types';\nimport {\n deletePathInObject,\n getDisplayName,\n getWrappedDisplayName,\n getDefaultComponentFilters,\n getInObject,\n getUID,\n renamePathInObject,\n setInObject,\n utfEncodeString,\n filterOutLocationComponentFilters,\n} from 'react-devtools-shared/src/utils';\nimport {\n formatConsoleArgumentsToSingleString,\n formatDurationToMicrosecondsGranularity,\n gt,\n gte,\n serializeToString,\n} from 'react-devtools-shared/src/backend/utils';\nimport {\n extractLocationFromComponentStack,\n extractLocationFromOwnerStack,\n parseStackTrace,\n} from 'react-devtools-shared/src/backend/utils/parseStackTrace';\nimport {\n cleanForBridge,\n copyWithDelete,\n copyWithRename,\n copyWithSet,\n getEffectDurations,\n} from '../utils';\nimport {\n __DEBUG__,\n PROFILING_FLAG_BASIC_SUPPORT,\n PROFILING_FLAG_TIMELINE_SUPPORT,\n PROFILING_FLAG_PERFORMANCE_TRACKS_SUPPORT,\n TREE_OPERATION_ADD,\n TREE_OPERATION_REMOVE,\n TREE_OPERATION_REORDER_CHILDREN,\n TREE_OPERATION_SET_SUBTREE_MODE,\n TREE_OPERATION_UPDATE_ERRORS_OR_WARNINGS,\n TREE_OPERATION_UPDATE_TREE_BASE_DURATION,\n SUSPENSE_TREE_OPERATION_ADD,\n SUSPENSE_TREE_OPERATION_REMOVE,\n SUSPENSE_TREE_OPERATION_REORDER_CHILDREN,\n SUSPENSE_TREE_OPERATION_RESIZE,\n SUSPENSE_TREE_OPERATION_SUSPENDERS,\n UNKNOWN_SUSPENDERS_NONE,\n UNKNOWN_SUSPENDERS_REASON_PRODUCTION,\n UNKNOWN_SUSPENDERS_REASON_OLD_VERSION,\n UNKNOWN_SUSPENDERS_REASON_THROWN_PROMISE,\n} from '../../constants';\nimport {inspectHooksOfFiber} from 'react-debug-tools';\nimport {\n CONCURRENT_MODE_NUMBER,\n CONCURRENT_MODE_SYMBOL_STRING,\n DEPRECATED_ASYNC_MODE_SYMBOL_STRING,\n PROVIDER_NUMBER,\n PROVIDER_SYMBOL_STRING,\n CONTEXT_NUMBER,\n CONTEXT_SYMBOL_STRING,\n CONSUMER_SYMBOL_STRING,\n STRICT_MODE_NUMBER,\n STRICT_MODE_SYMBOL_STRING,\n PROFILER_NUMBER,\n PROFILER_SYMBOL_STRING,\n REACT_MEMO_CACHE_SENTINEL,\n SCOPE_NUMBER,\n SCOPE_SYMBOL_STRING,\n FORWARD_REF_NUMBER,\n FORWARD_REF_SYMBOL_STRING,\n MEMO_NUMBER,\n MEMO_SYMBOL_STRING,\n SERVER_CONTEXT_SYMBOL_STRING,\n LAZY_SYMBOL_STRING,\n} from '../shared/ReactSymbols';\nimport {enableStyleXFeatures} from 'react-devtools-feature-flags';\n\nimport {componentInfoToComponentLogsMap} from '../shared/DevToolsServerComponentLogs';\n\nimport is from 'shared/objectIs';\nimport hasOwnProperty from 'shared/hasOwnProperty';\n\nimport {getIODescription} from 'shared/ReactIODescription';\n\nimport {\n getStackByFiberInDevAndProd,\n getOwnerStackByFiberInDev,\n supportsOwnerStacks,\n supportsConsoleTasks,\n} from './DevToolsFiberComponentStack';\n\n// $FlowFixMe[method-unbinding]\nconst toString = Object.prototype.toString;\n\nfunction isError(object: mixed) {\n return toString.call(object) === '[object Error]';\n}\n\nimport {getStyleXData} from '../StyleX/utils';\nimport {createProfilingHooks} from '../profilingHooks';\n\nimport type {GetTimelineData, ToggleProfilingStatus} from '../profilingHooks';\nimport type {Fiber, FiberRoot} from 'react-reconciler/src/ReactInternalTypes';\nimport type {\n ChangeDescription,\n CommitDataBackend,\n DevToolsHook,\n InspectedElement,\n InspectedElementPayload,\n InstanceAndStyle,\n HostInstance,\n PathFrame,\n PathMatch,\n ProfilingDataBackend,\n ProfilingDataForRootBackend,\n ReactRenderer,\n RendererInterface,\n SerializedElement,\n SerializedAsyncInfo,\n WorkTagMap,\n CurrentDispatcherRef,\n LegacyDispatcherRef,\n ProfilingSettings,\n} from '../types';\nimport type {\n ComponentFilter,\n ElementType,\n Plugins,\n} from 'react-devtools-shared/src/frontend/types';\nimport type {ReactFunctionLocation} from 'shared/ReactTypes';\nimport {getSourceLocationByFiber} from './DevToolsFiberComponentStack';\nimport {formatOwnerStack} from '../shared/DevToolsOwnerStack';\n\n// Kinds\nconst FIBER_INSTANCE = 0;\nconst VIRTUAL_INSTANCE = 1;\nconst FILTERED_FIBER_INSTANCE = 2;\n\n// This type represents a stateful instance of a Client Component i.e. a Fiber pair.\n// These instances also let us track stateful DevTools meta data like id and warnings.\ntype FiberInstance = {\n kind: 0,\n id: number,\n parent: null | DevToolsInstance,\n firstChild: null | DevToolsInstance,\n nextSibling: null | DevToolsInstance,\n source: null | string | Error | ReactFunctionLocation, // source location of this component function, or owned child stack\n logCount: number, // total number of errors/warnings last seen\n treeBaseDuration: number, // the profiled time of the last render of this subtree\n suspendedBy: null | Array<ReactAsyncInfo>, // things that suspended in the children position of this component\n suspenseNode: null | SuspenseNode,\n data: Fiber, // one of a Fiber pair\n};\n\nfunction createFiberInstance(fiber: Fiber): FiberInstance {\n return {\n kind: FIBER_INSTANCE,\n id: getUID(),\n parent: null,\n firstChild: null,\n nextSibling: null,\n source: null,\n logCount: 0,\n treeBaseDuration: 0,\n suspendedBy: null,\n suspenseNode: null,\n data: fiber,\n };\n}\n\ntype FilteredFiberInstance = {\n kind: 2,\n // We exclude id from the type to get errors if we try to access it.\n // However it is still in the object to preserve hidden class.\n // id: number,\n parent: null | DevToolsInstance,\n firstChild: null | DevToolsInstance,\n nextSibling: null | DevToolsInstance,\n source: null | string | Error | ReactFunctionLocation, // always null here.\n logCount: number, // total number of errors/warnings last seen\n treeBaseDuration: number, // the profiled time of the last render of this subtree\n suspendedBy: null | Array<ReactAsyncInfo>, // only used at the root\n suspenseNode: null | SuspenseNode,\n data: Fiber, // one of a Fiber pair\n};\n\n// This is used to represent a filtered Fiber but still lets us find its host instance.\nfunction createFilteredFiberInstance(fiber: Fiber): FilteredFiberInstance {\n return ({\n kind: FILTERED_FIBER_INSTANCE,\n id: 0,\n parent: null,\n firstChild: null,\n nextSibling: null,\n source: null,\n logCount: 0,\n treeBaseDuration: 0,\n suspendedBy: null,\n suspenseNode: null,\n data: fiber,\n }: any);\n}\n\n// This type represents a stateful instance of a Server Component or a Component\n// that gets optimized away - e.g. call-through without creating a Fiber.\n// It's basically a virtual Fiber. This is not a semantic concept in React.\n// It only exists as a virtual concept to let the same Element in the DevTools\n// persist. To be selectable separately from all ReactComponentInfo and overtime.\ntype VirtualInstance = {\n kind: 1,\n id: number,\n parent: null | DevToolsInstance,\n firstChild: null | DevToolsInstance,\n nextSibling: null | DevToolsInstance,\n source: null | string | Error | ReactFunctionLocation, // source location of this server component, or owned child stack\n logCount: number, // total number of errors/warnings last seen\n treeBaseDuration: number, // the profiled time of the last render of this subtree\n suspendedBy: null | Array<ReactAsyncInfo>, // things that blocked the server component's child from rendering\n suspenseNode: null,\n // The latest info for this instance. This can be updated over time and the\n // same info can appear in more than once ServerComponentInstance.\n data: ReactComponentInfo,\n};\n\nfunction createVirtualInstance(\n debugEntry: ReactComponentInfo,\n): VirtualInstance {\n return {\n kind: VIRTUAL_INSTANCE,\n id: getUID(),\n parent: null,\n firstChild: null,\n nextSibling: null,\n source: null,\n logCount: 0,\n treeBaseDuration: 0,\n suspendedBy: null,\n suspenseNode: null,\n data: debugEntry,\n };\n}\n\ntype DevToolsInstance = FiberInstance | VirtualInstance | FilteredFiberInstance;\n\n// A Generic Rect super type which can include DOMRect and other objects with similar shape like in React Native.\ntype Rect = {x: number, y: number, width: number, height: number, ...};\n\ntype SuspenseNode = {\n // The Instance can be a Suspense boundary, a SuspenseList Row, or HostRoot.\n // It can also be disconnected from the main tree if it's a Filtered Instance.\n instance: FiberInstance | FilteredFiberInstance,\n parent: null | SuspenseNode,\n firstChild: null | SuspenseNode,\n nextSibling: null | SuspenseNode,\n rects: null | Array<Rect>, // The bounding rects of content children.\n suspendedBy: Map<ReactIOInfo, Set<DevToolsInstance>>, // Tracks which data we're suspended by and the children that suspend it.\n environments: Map<string, number>, // Tracks the Flight environment names that suspended this. I.e. if the server blocked this.\n // Track whether any of the items in suspendedBy are unique this this Suspense boundaries or if they're all\n // also in the parent sets. This determine whether this could contribute in the loading sequence.\n hasUniqueSuspenders: boolean,\n // Track whether anything suspended in this boundary that we can't track either because it was using throw\n // a promise, an older version of React or because we're inspecting prod.\n hasUnknownSuspenders: boolean,\n};\n\n// Update flags need to be propagated up until the caller that put the corresponding\n// node on the stack.\n// If you push a new node, you need to handle ShouldResetChildren when you pop it.\n// If you push a new Suspense node, you need to handle ShouldResetSuspenseChildren when you pop it.\ntype UpdateFlags = number;\nconst NoUpdate = /* */ 0b000;\nconst ShouldResetChildren = /* */ 0b001;\nconst ShouldResetSuspenseChildren = /* */ 0b010;\nconst ShouldResetParentSuspenseChildren = /* */ 0b100;\n\nfunction createSuspenseNode(\n instance: FiberInstance | FilteredFiberInstance,\n): SuspenseNode {\n return (instance.suspenseNode = {\n instance: instance,\n parent: null,\n firstChild: null,\n nextSibling: null,\n rects: null,\n suspendedBy: new Map(),\n environments: new Map(),\n hasUniqueSuspenders: false,\n hasUnknownSuspenders: false,\n });\n}\n\ntype getDisplayNameForFiberType = (fiber: Fiber) => string | null;\ntype getTypeSymbolType = (type: any) => symbol | string | number;\n\ntype ReactPriorityLevelsType = {\n ImmediatePriority: number,\n UserBlockingPriority: number,\n NormalPriority: number,\n LowPriority: number,\n IdlePriority: number,\n NoPriority: number,\n};\n\nexport function getDispatcherRef(renderer: {\n +currentDispatcherRef?: LegacyDispatcherRef | CurrentDispatcherRef,\n ...\n}): void | CurrentDispatcherRef {\n if (renderer.currentDispatcherRef === undefined) {\n return undefined;\n }\n const injectedRef = renderer.currentDispatcherRef;\n if (\n typeof injectedRef.H === 'undefined' &&\n typeof injectedRef.current !== 'undefined'\n ) {\n // We got a legacy dispatcher injected, let's create a wrapper proxy to translate.\n return {\n get H() {\n return (injectedRef: any).current;\n },\n set H(value) {\n (injectedRef: any).current = value;\n },\n };\n }\n return (injectedRef: any);\n}\n\nfunction getFiberFlags(fiber: Fiber): number {\n // The name of this field changed from \"effectTag\" to \"flags\"\n return fiber.flags !== undefined ? fiber.flags : (fiber: any).effectTag;\n}\n\n// Some environments (e.g. React Native / Hermes) don't support the performance API yet.\nconst getCurrentTime =\n // $FlowFixMe[method-unbinding]\n typeof performance === 'object' && typeof performance.now === 'function'\n ? () => performance.now()\n : () => Date.now();\n\nexport function getInternalReactConstants(version: string): {\n getDisplayNameForFiber: getDisplayNameForFiberType,\n getTypeSymbol: getTypeSymbolType,\n ReactPriorityLevels: ReactPriorityLevelsType,\n ReactTypeOfWork: WorkTagMap,\n StrictModeBits: number,\n SuspenseyImagesMode: number,\n} {\n // **********************************************************\n // The section below is copied from files in React repo.\n // Keep it in sync, and add version guards if it changes.\n //\n // Technically these priority levels are invalid for versions before 16.9,\n // but 16.9 is the first version to report priority level to DevTools,\n // so we can avoid checking for earlier versions and support pre-16.9 canary releases in the process.\n let ReactPriorityLevels: ReactPriorityLevelsType = {\n ImmediatePriority: 99,\n UserBlockingPriority: 98,\n NormalPriority: 97,\n LowPriority: 96,\n IdlePriority: 95,\n NoPriority: 90,\n };\n\n if (gt(version, '17.0.2')) {\n ReactPriorityLevels = {\n ImmediatePriority: 1,\n UserBlockingPriority: 2,\n NormalPriority: 3,\n LowPriority: 4,\n IdlePriority: 5,\n NoPriority: 0,\n };\n }\n\n let StrictModeBits = 0;\n if (gte(version, '18.0.0-alpha')) {\n // 18+\n StrictModeBits = 0b011000;\n } else if (gte(version, '16.9.0')) {\n // 16.9 - 17\n StrictModeBits = 0b1;\n } else if (gte(version, '16.3.0')) {\n // 16.3 - 16.8\n StrictModeBits = 0b10;\n }\n\n const SuspenseyImagesMode = 0b0100000;\n\n let ReactTypeOfWork: WorkTagMap = ((null: any): WorkTagMap);\n\n // **********************************************************\n // The section below is copied from files in React repo.\n // Keep it in sync, and add version guards if it changes.\n //\n // TODO Update the gt() check below to be gte() whichever the next version number is.\n // Currently the version in Git is 17.0.2 (but that version has not been/may not end up being released).\n if (gt(version, '17.0.1')) {\n ReactTypeOfWork = {\n CacheComponent: 24, // Experimental\n ClassComponent: 1,\n ContextConsumer: 9,\n ContextProvider: 10,\n CoroutineComponent: -1, // Removed\n CoroutineHandlerPhase: -1, // Removed\n DehydratedSuspenseComponent: 18, // Behind a flag\n ForwardRef: 11,\n Fragment: 7,\n FunctionComponent: 0,\n HostComponent: 5,\n HostPortal: 4,\n HostRoot: 3,\n HostHoistable: 26, // In reality, 18.2+. But doesn't hurt to include it here\n HostSingleton: 27, // Same as above\n HostText: 6,\n IncompleteClassComponent: 17,\n IncompleteFunctionComponent: 28,\n IndeterminateComponent: 2, // removed in 19.0.0\n LazyComponent: 16,\n LegacyHiddenComponent: 23, // Does not exist in 18+ OSS but exists in fb builds\n MemoComponent: 14,\n Mode: 8,\n OffscreenComponent: 22, // Experimental in 17. Stable in 18+\n Profiler: 12,\n ScopeComponent: 21, // Experimental\n SimpleMemoComponent: 15,\n SuspenseComponent: 13,\n SuspenseListComponent: 19, // Experimental\n TracingMarkerComponent: 25, // Experimental - This is technically in 18 but we don't\n // want to fork again so we're adding it here instead\n YieldComponent: -1, // Removed\n Throw: 29,\n ViewTransitionComponent: 30, // Experimental\n ActivityComponent: 31,\n };\n } else if (gte(version, '17.0.0-alpha')) {\n ReactTypeOfWork = {\n CacheComponent: -1, // Doesn't exist yet\n ClassComponent: 1,\n ContextConsumer: 9,\n ContextProvider: 10,\n CoroutineComponent: -1, // Removed\n CoroutineHandlerPhase: -1, // Removed\n DehydratedSuspenseComponent: 18, // Behind a flag\n ForwardRef: 11,\n Fragment: 7,\n FunctionComponent: 0,\n HostComponent: 5,\n HostPortal: 4,\n HostRoot: 3,\n HostHoistable: -1, // Doesn't exist yet\n HostSingleton: -1, // Doesn't exist yet\n HostText: 6,\n IncompleteClassComponent: 17,\n IncompleteFunctionComponent: -1, // Doesn't exist yet\n IndeterminateComponent: 2,\n LazyComponent: 16,\n LegacyHiddenComponent: 24,\n MemoComponent: 14,\n Mode: 8,\n OffscreenComponent: 23, // Experimental\n Profiler: 12,\n ScopeComponent: 21, // Experimental\n SimpleMemoComponent: 15,\n SuspenseComponent: 13,\n SuspenseListComponent: 19, // Experimental\n TracingMarkerComponent: -1, // Doesn't exist yet\n YieldComponent: -1, // Removed\n Throw: -1, // Doesn't exist yet\n ViewTransitionComponent: -1, // Doesn't exist yet\n ActivityComponent: -1, // Doesn't exist yet\n };\n } else if (gte(version, '16.6.0-beta.0')) {\n ReactTypeOfWork = {\n CacheComponent: -1, // Doesn't exist yet\n ClassComponent: 1,\n ContextConsumer: 9,\n ContextProvider: 10,\n CoroutineComponent: -1, // Removed\n CoroutineHandlerPhase: -1, // Removed\n DehydratedSuspenseComponent: 18, // Behind a flag\n ForwardRef: 11,\n Fragment: 7,\n FunctionComponent: 0,\n HostComponent: 5,\n HostPortal: 4,\n HostRoot: 3,\n HostHoistable: -1, // Doesn't exist yet\n HostSingleton: -1, // Doesn't exist yet\n HostText: 6,\n IncompleteClassComponent: 17,\n IncompleteFunctionComponent: -1, // Doesn't exist yet\n IndeterminateComponent: 2,\n LazyComponent: 16,\n LegacyHiddenComponent: -1,\n MemoComponent: 14,\n Mode: 8,\n OffscreenComponent: -1, // Experimental\n Profiler: 12,\n ScopeComponent: -1, // Experimental\n SimpleMemoComponent: 15,\n SuspenseComponent: 13,\n SuspenseListComponent: 19, // Experimental\n TracingMarkerComponent: -1, // Doesn't exist yet\n YieldComponent: -1, // Removed\n Throw: -1, // Doesn't exist yet\n ViewTransitionComponent: -1, // Doesn't exist yet\n ActivityComponent: -1, // Doesn't exist yet\n };\n } else if (gte(version, '16.4.3-alpha')) {\n ReactTypeOfWork = {\n CacheComponent: -1, // Doesn't exist yet\n ClassComponent: 2,\n ContextConsumer: 11,\n ContextProvider: 12,\n CoroutineComponent: -1, // Removed\n CoroutineHandlerPhase: -1, // Removed\n DehydratedSuspenseComponent: -1, // Doesn't exist yet\n ForwardRef: 13,\n Fragment: 9,\n FunctionComponent: 0,\n HostComponent: 7,\n HostPortal: 6,\n HostRoot: 5,\n HostHoistable: -1, // Doesn't exist yet\n HostSingleton: -1, // Doesn't exist yet\n HostText: 8,\n IncompleteClassComponent: -1, // Doesn't exist yet\n IncompleteFunctionComponent: -1, // Doesn't exist yet\n IndeterminateComponent: 4,\n LazyComponent: -1, // Doesn't exist yet\n LegacyHiddenComponent: -1,\n MemoComponent: -1, // Doesn't exist yet\n Mode: 10,\n OffscreenComponent: -1, // Experimental\n Profiler: 15,\n ScopeComponent: -1, // Experimental\n SimpleMemoComponent: -1, // Doesn't exist yet\n SuspenseComponent: 16,\n SuspenseListComponent: -1, // Doesn't exist yet\n TracingMarkerComponent: -1, // Doesn't exist yet\n YieldComponent: -1, // Removed\n Throw: -1, // Doesn't exist yet\n ViewTransitionComponent: -1, // Doesn't exist yet\n ActivityComponent: -1, // Doesn't exist yet\n };\n } else {\n ReactTypeOfWork = {\n CacheComponent: -1, // Doesn't exist yet\n ClassComponent: 2,\n ContextConsumer: 12,\n ContextProvider: 13,\n CoroutineComponent: 7,\n CoroutineHandlerPhase: 8,\n DehydratedSuspenseComponent: -1, // Doesn't exist yet\n ForwardRef: 14,\n Fragment: 10,\n FunctionComponent: 1,\n HostComponent: 5,\n HostPortal: 4,\n HostRoot: 3,\n HostHoistable: -1, // Doesn't exist yet\n HostSingleton: -1, // Doesn't exist yet\n HostText: 6,\n IncompleteClassComponent: -1, // Doesn't exist yet\n IncompleteFunctionComponent: -1, // Doesn't exist yet\n IndeterminateComponent: 0,\n LazyComponent: -1, // Doesn't exist yet\n LegacyHiddenComponent: -1,\n MemoComponent: -1, // Doesn't exist yet\n Mode: 11,\n OffscreenComponent: -1, // Experimental\n Profiler: 15,\n ScopeComponent: -1, // Experimental\n SimpleMemoComponent: -1, // Doesn't exist yet\n SuspenseComponent: 16,\n SuspenseListComponent: -1, // Doesn't exist yet\n TracingMarkerComponent: -1, // Doesn't exist yet\n YieldComponent: 9,\n Throw: -1, // Doesn't exist yet\n ViewTransitionComponent: -1, // Doesn't exist yet\n ActivityComponent: -1, // Doesn't exist yet\n };\n }\n // **********************************************************\n // End of copied code.\n // **********************************************************\n\n function getTypeSymbol(type: any): symbol | string | number {\n const symbolOrNumber =\n typeof type === 'object' && type !== null ? type.$$typeof : type;\n\n return typeof symbolOrNumber === 'symbol'\n ? symbolOrNumber.toString()\n : symbolOrNumber;\n }\n\n const {\n CacheComponent,\n ClassComponent,\n IncompleteClassComponent,\n IncompleteFunctionComponent,\n FunctionComponent,\n IndeterminateComponent,\n ForwardRef,\n HostRoot,\n HostHoistable,\n HostSingleton,\n HostComponent,\n HostPortal,\n HostText,\n Fragment,\n LazyComponent,\n LegacyHiddenComponent,\n MemoComponent,\n OffscreenComponent,\n Profiler,\n ScopeComponent,\n SimpleMemoComponent,\n SuspenseComponent,\n SuspenseListComponent,\n TracingMarkerComponent,\n Throw,\n ViewTransitionComponent,\n ActivityComponent,\n } = ReactTypeOfWork;\n\n function resolveFiberType(type: any): $FlowFixMe {\n const typeSymbol = getTypeSymbol(type);\n switch (typeSymbol) {\n case MEMO_NUMBER:\n case MEMO_SYMBOL_STRING:\n // recursively resolving memo type in case of memo(forwardRef(Component))\n return resolveFiberType(type.type);\n case FORWARD_REF_NUMBER:\n case FORWARD_REF_SYMBOL_STRING:\n return type.render;\n default:\n return type;\n }\n }\n\n // NOTICE Keep in sync with shouldFilterFiber() and other get*ForFiber methods\n function getDisplayNameForFiber(\n fiber: Fiber,\n shouldSkipForgetCheck: boolean = false,\n ): string | null {\n const {elementType, type, tag} = fiber;\n\n let resolvedType = type;\n if (typeof type === 'object' && type !== null) {\n resolvedType = resolveFiberType(type);\n }\n\n let resolvedContext: any = null;\n if (\n !shouldSkipForgetCheck &&\n // $FlowFixMe[incompatible-type] fiber.updateQueue is mixed\n (fiber.updateQueue?.memoCache != null ||\n (Array.isArray(fiber.memoizedState?.memoizedState) &&\n fiber.memoizedState.memoizedState[0]?.[REACT_MEMO_CACHE_SENTINEL]) ||\n fiber.memoizedState?.memoizedState?.[REACT_MEMO_CACHE_SENTINEL])\n ) {\n const displayNameWithoutForgetWrapper = getDisplayNameForFiber(\n fiber,\n true,\n );\n if (displayNameWithoutForgetWrapper == null) {\n return null;\n }\n\n return `Forget(${displayNameWithoutForgetWrapper})`;\n }\n\n switch (tag) {\n case ActivityComponent:\n return 'Activity';\n case CacheComponent:\n return 'Cache';\n case ClassComponent:\n case IncompleteClassComponent:\n case IncompleteFunctionComponent:\n case FunctionComponent:\n case IndeterminateComponent:\n return getDisplayName(resolvedType);\n case ForwardRef:\n return getWrappedDisplayName(\n elementType,\n resolvedType,\n 'ForwardRef',\n 'Anonymous',\n );\n case HostRoot:\n const fiberRoot = fiber.stateNode;\n if (fiberRoot != null && fiberRoot._debugRootType !== null) {\n return fiberRoot._debugRootType;\n }\n return null;\n case HostComponent:\n case HostSingleton:\n case HostHoistable:\n return type;\n case HostPortal:\n case HostText:\n return null;\n case Fragment:\n return 'Fragment';\n case LazyComponent:\n // This display name will not be user visible.\n // Once a Lazy component loads its inner component, React replaces the tag and type.\n // This display name will only show up in console logs when DevTools DEBUG mode is on.\n return 'Lazy';\n case MemoComponent:\n case SimpleMemoComponent:\n // Display name in React does not use `Memo` as a wrapper but fallback name.\n return getWrappedDisplayName(\n elementType,\n resolvedType,\n 'Memo',\n 'Anonymous',\n );\n case SuspenseComponent:\n return 'Suspense';\n case LegacyHiddenComponent:\n return 'LegacyHidden';\n case OffscreenComponent:\n return 'Offscreen';\n case ScopeComponent:\n return 'Scope';\n case SuspenseListComponent:\n return 'SuspenseList';\n case Profiler:\n return 'Profiler';\n case TracingMarkerComponent:\n return 'TracingMarker';\n case ViewTransitionComponent:\n return 'ViewTransition';\n case Throw:\n // This should really never be visible.\n return 'Error';\n default:\n const typeSymbol = getTypeSymbol(type);\n\n switch (typeSymbol) {\n case CONCURRENT_MODE_NUMBER:\n case CONCURRENT_MODE_SYMBOL_STRING:\n case DEPRECATED_ASYNC_MODE_SYMBOL_STRING:\n return null;\n case PROVIDER_NUMBER:\n case PROVIDER_SYMBOL_STRING:\n // 16.3.0 exposed the context object as \"context\"\n // PR #12501 changed it to \"_context\" for 16.3.1+\n // NOTE Keep in sync with inspectElementRaw()\n resolvedContext = fiber.type._context || fiber.type.context;\n return `${resolvedContext.displayName || 'Context'}.Provider`;\n case CONTEXT_NUMBER:\n case CONTEXT_SYMBOL_STRING:\n case SERVER_CONTEXT_SYMBOL_STRING:\n if (\n fiber.type._context === undefined &&\n fiber.type.Provider === fiber.type\n ) {\n // In 19+, Context.Provider === Context, so this is a provider.\n resolvedContext = fiber.type;\n return `${resolvedContext.displayName || 'Context'}.Provider`;\n }\n\n // 16.3-16.5 read from \"type\" because the Consumer is the actual context object.\n // 16.6+ should read from \"type._context\" because Consumer can be different (in DEV).\n // NOTE Keep in sync with inspectElementRaw()\n resolvedContext = fiber.type._context || fiber.type;\n\n // NOTE: TraceUpdatesBackendManager depends on the name ending in '.Consumer'\n // If you change the name, figure out a more resilient way to detect it.\n return `${resolvedContext.displayName || 'Context'}.Consumer`;\n case CONSUMER_SYMBOL_STRING:\n // 19+\n resolvedContext = fiber.type._context;\n return `${resolvedContext.displayName || 'Context'}.Consumer`;\n case STRICT_MODE_NUMBER:\n case STRICT_MODE_SYMBOL_STRING:\n return null;\n case PROFILER_NUMBER:\n case PROFILER_SYMBOL_STRING:\n return `Profiler(${fiber.memoizedProps.id})`;\n case SCOPE_NUMBER:\n case SCOPE_SYMBOL_STRING:\n return 'Scope';\n default:\n // Unknown element type.\n // This may mean a new element type that has not yet been added to DevTools.\n return null;\n }\n }\n }\n\n return {\n getDisplayNameForFiber,\n getTypeSymbol,\n ReactPriorityLevels,\n ReactTypeOfWork,\n StrictModeBits,\n SuspenseyImagesMode,\n };\n}\n\n// All environment names we've seen so far. This lets us create a list of filters to apply.\n// This should ideally include env of filtered Components too so that you can add those as\n// filters at the same time as removing some other filter.\nconst knownEnvironmentNames: Set<string> = new Set();\n\n// Map of FiberRoot to their root FiberInstance.\nconst rootToFiberInstanceMap: Map<FiberRoot, FiberInstance> = new Map();\n\n// Map of id to FiberInstance or VirtualInstance.\n// This Map is used to e.g. get the display name for a Fiber or schedule an update,\n// operations that should be the same whether the current and work-in-progress Fiber is used.\nconst idToDevToolsInstanceMap: Map<\n FiberInstance['id'] | VirtualInstance['id'],\n FiberInstance | VirtualInstance,\n> = new Map();\n\nconst idToSuspenseNodeMap: Map<FiberInstance['id'], SuspenseNode> = new Map();\n\n// Map of canonical HostInstances to the nearest parent DevToolsInstance.\nconst publicInstanceToDevToolsInstanceMap: Map<HostInstance, DevToolsInstance> =\n new Map();\n// Map of resource DOM nodes to all the nearest DevToolsInstances that depend on it.\nconst hostResourceToDevToolsInstanceMap: Map<\n HostInstance,\n Set<DevToolsInstance>,\n> = new Map();\n\n// Ideally, this should be injected from Reconciler config\nfunction getPublicInstance(instance: HostInstance): HostInstance {\n // Typically the PublicInstance and HostInstance is the same thing but not in Fabric.\n // So we need to detect this and use that as the public instance.\n\n // React Native. Modern. Fabric.\n if (typeof instance === 'object' && instance !== null) {\n if (typeof instance.canonical === 'object' && instance.canonical !== null) {\n if (\n typeof instance.canonical.publicInstance === 'object' &&\n instance.canonical.publicInstance !== null\n ) {\n return instance.canonical.publicInstance;\n }\n }\n\n // React Native. Legacy. Paper.\n if (typeof instance._nativeTag === 'number') {\n return instance._nativeTag;\n }\n }\n\n // React Web. Usually a DOM element.\n return instance;\n}\n\nfunction getNativeTag(instance: HostInstance): number | null {\n if (typeof instance !== 'object' || instance === null) {\n return null;\n }\n\n // Modern. Fabric.\n if (\n instance.canonical != null &&\n typeof instance.canonical.nativeTag === 'number'\n ) {\n return instance.canonical.nativeTag;\n }\n\n // Legacy. Paper.\n if (typeof instance._nativeTag === 'number') {\n return instance._nativeTag;\n }\n\n return null;\n}\n\nfunction aquireHostInstance(\n nearestInstance: DevToolsInstance,\n hostInstance: HostInstance,\n): void {\n const publicInstance = getPublicInstance(hostInstance);\n publicInstanceToDevToolsInstanceMap.set(publicInstance, nearestInstance);\n}\n\nfunction releaseHostInstance(\n nearestInstance: DevToolsInstance,\n hostInstance: HostInstance,\n): void {\n const publicInstance = getPublicInstance(hostInstance);\n if (\n publicInstanceToDevToolsInstanceMap.get(publicInstance) === nearestInstance\n ) {\n publicInstanceToDevToolsInstanceMap.delete(publicInstance);\n }\n}\n\nfunction aquireHostResource(\n nearestInstance: DevToolsInstance,\n resource: ?{instance?: HostInstance},\n): void {\n const hostInstance = resource && resource.instance;\n if (hostInstance) {\n const publicInstance = getPublicInstance(hostInstance);\n let resourceInstances =\n hostResourceToDevToolsInstanceMap.get(publicInstance);\n if (resourceInstances === undefined) {\n resourceInstances = new Set();\n hostResourceToDevToolsInstanceMap.set(publicInstance, resourceInstances);\n // Store the first match in the main map for quick access when selecting DOM node.\n publicInstanceToDevToolsInstanceMap.set(publicInstance, nearestInstance);\n }\n resourceInstances.add(nearestInstance);\n }\n}\n\nfunction releaseHostResource(\n nearestInstance: DevToolsInstance,\n resource: ?{instance?: HostInstance},\n): void {\n const hostInstance = resource && resource.instance;\n if (hostInstance) {\n const publicInstance = getPublicInstance(hostInstance);\n const resourceInstances =\n hostResourceToDevToolsInstanceMap.get(publicInstance);\n if (resourceInstances !== undefined) {\n resourceInstances.delete(nearestInstance);\n if (resourceInstances.size === 0) {\n hostResourceToDevToolsInstanceMap.delete(publicInstance);\n publicInstanceToDevToolsInstanceMap.delete(publicInstance);\n } else if (\n publicInstanceToDevToolsInstanceMap.get(publicInstance) ===\n nearestInstance\n ) {\n // This was the first one. Store the next first one in the main map for easy access.\n // eslint-disable-next-line no-for-of-loops/no-for-of-loops\n for (const firstInstance of resourceInstances) {\n publicInstanceToDevToolsInstanceMap.set(\n firstInstance,\n nearestInstance,\n );\n break;\n }\n }\n }\n }\n}\n\nexport function attach(\n hook: DevToolsHook,\n rendererID: number,\n renderer: ReactRenderer,\n global: Object,\n shouldStartProfilingNow: boolean,\n profilingSettings: ProfilingSettings,\n): RendererInterface {\n // Newer versions of the reconciler package also specific reconciler version.\n // If that version number is present, use it.\n // Third party renderer versions may not match the reconciler version,\n // and the latter is what's important in terms of tags and symbols.\n const version = renderer.reconcilerVersion || renderer.version;\n\n const {\n getDisplayNameForFiber,\n getTypeSymbol,\n ReactPriorityLevels,\n ReactTypeOfWork,\n StrictModeBits,\n SuspenseyImagesMode,\n } = getInternalReactConstants(version);\n const {\n ActivityComponent,\n ClassComponent,\n ContextConsumer,\n DehydratedSuspenseComponent,\n ForwardRef,\n Fragment,\n FunctionComponent,\n HostRoot,\n HostHoistable,\n HostSingleton,\n HostPortal,\n HostComponent,\n HostText,\n IncompleteClassComponent,\n IncompleteFunctionComponent,\n IndeterminateComponent,\n LegacyHiddenComponent,\n MemoComponent,\n OffscreenComponent,\n SimpleMemoComponent,\n SuspenseComponent,\n SuspenseListComponent,\n TracingMarkerComponent,\n Throw,\n ViewTransitionComponent,\n } = ReactTypeOfWork;\n const {\n ImmediatePriority,\n UserBlockingPriority,\n NormalPriority,\n LowPriority,\n IdlePriority,\n NoPriority,\n } = ReactPriorityLevels;\n\n const {\n getLaneLabelMap,\n injectProfilingHooks,\n overrideHookState,\n overrideHookStateDeletePath,\n overrideHookStateRenamePath,\n overrideProps,\n overridePropsDeletePath,\n overridePropsRenamePath,\n scheduleRefresh,\n setErrorHandler,\n setSuspenseHandler,\n scheduleUpdate,\n scheduleRetry,\n getCurrentFiber,\n } = renderer;\n const supportsTogglingError =\n typeof setErrorHandler === 'function' &&\n typeof scheduleUpdate === 'function';\n const supportsTogglingSuspense =\n typeof setSuspenseHandler === 'function' &&\n typeof scheduleUpdate === 'function';\n const supportsPerformanceTracks = gte(version, '19.2.0');\n\n if (typeof scheduleRefresh === 'function') {\n // When Fast Refresh updates a component, the frontend may need to purge cached information.\n // For example, ASTs cached for the component (for named hooks) may no longer be valid.\n // Send a signal to the frontend to purge this cached information.\n // The \"fastRefreshScheduled\" dispatched is global (not Fiber or even Renderer specific).\n // This is less effecient since it means the front-end will need to purge the entire cache,\n // but this is probably an okay trade off in order to reduce coupling between the DevTools and Fast Refresh.\n renderer.scheduleRefresh = (...args) => {\n try {\n hook.emit('fastRefreshScheduled');\n } finally {\n return scheduleRefresh(...args);\n }\n };\n }\n\n let getTimelineData: null | GetTimelineData = null;\n let toggleProfilingStatus: null | ToggleProfilingStatus = null;\n if (typeof injectProfilingHooks === 'function') {\n const response = createProfilingHooks({\n getDisplayNameForFiber,\n getIsProfiling: () => isProfiling,\n getLaneLabelMap,\n currentDispatcherRef: getDispatcherRef(renderer),\n workTagMap: ReactTypeOfWork,\n reactVersion: version,\n });\n\n // Pass the Profiling hooks to the reconciler for it to call during render.\n injectProfilingHooks(response.profilingHooks);\n\n // Hang onto this toggle so we can notify the external methods of profiling status changes.\n getTimelineData = response.getTimelineData;\n toggleProfilingStatus = response.toggleProfilingStatus;\n }\n\n type ComponentLogs = {\n errors: Map<string, number>,\n errorsCount: number,\n warnings: Map<string, number>,\n warningsCount: number,\n };\n // Tracks Errors/Warnings logs added to a Fiber. They are added before the commit and get\n // picked up a FiberInstance. This keeps it around as long as the Fiber is alive which\n // lets the Fiber get reparented/remounted and still observe the previous errors/warnings.\n // Unless we explicitly clear the logs from a Fiber.\n const fiberToComponentLogsMap: WeakMap<Fiber, ComponentLogs> = new WeakMap();\n // Tracks whether we've performed a commit since the last log. This is used to know\n // whether we received any new logs between the commit and post commit phases. I.e.\n // if any passive effects called console.warn / console.error.\n let needsToFlushComponentLogs = false;\n\n function bruteForceFlushErrorsAndWarnings() {\n // Refresh error/warning count for all mounted unfiltered Fibers.\n let hasChanges = false;\n // eslint-disable-next-line no-for-of-loops/no-for-of-loops\n for (const devtoolsInstance of idToDevToolsInstanceMap.values()) {\n if (devtoolsInstance.kind === FIBER_INSTANCE) {\n const fiber = devtoolsInstance.data;\n const componentLogsEntry = fiberToComponentLogsMap.get(fiber);\n const changed = recordConsoleLogs(devtoolsInstance, componentLogsEntry);\n if (changed) {\n hasChanges = true;\n updateMostRecentlyInspectedElementIfNecessary(devtoolsInstance.id);\n }\n } else {\n // Virtual Instances cannot log in passive effects and so never appear here.\n }\n }\n if (hasChanges) {\n flushPendingEvents();\n }\n }\n\n function clearErrorsAndWarnings() {\n // Note, this only clears logs for Fibers that have instances. If they're filtered\n // and then mount, the logs are there. Ensuring we only clear what you've seen.\n // If we wanted to clear the whole set, we'd replace fiberToComponentLogsMap with a\n // new WeakMap. It's unclear whether we should clear componentInfoToComponentLogsMap\n // since it's shared by other renderers but presumably it would.\n\n // eslint-disable-next-line no-for-of-loops/no-for-of-loops\n for (const devtoolsInstance of idToDevToolsInstanceMap.values()) {\n if (devtoolsInstance.kind === FIBER_INSTANCE) {\n const fiber = devtoolsInstance.data;\n fiberToComponentLogsMap.delete(fiber);\n if (fiber.alternate) {\n fiberToComponentLogsMap.delete(fiber.alternate);\n }\n } else {\n componentInfoToComponentLogsMap.delete(devtoolsInstance.data);\n }\n const changed = recordConsoleLogs(devtoolsInstance, undefined);\n if (changed) {\n updateMostRecentlyInspectedElementIfNecessary(devtoolsInstance.id);\n }\n }\n flushPendingEvents();\n }\n\n function clearConsoleLogsHelper(instanceID: number, type: 'error' | 'warn') {\n const devtoolsInstance = idToDevToolsInstanceMap.get(instanceID);\n if (devtoolsInstance !== undefined) {\n let componentLogsEntry;\n if (devtoolsInstance.kind === FIBER_INSTANCE) {\n const fiber = devtoolsInstance.data;\n componentLogsEntry = fiberToComponentLogsMap.get(fiber);\n\n if (componentLogsEntry === undefined && fiber.alternate !== null) {\n componentLogsEntry = fiberToComponentLogsMap.get(fiber.alternate);\n }\n } else {\n const componentInfo = devtoolsInstance.data;\n componentLogsEntry = componentInfoToComponentLogsMap.get(componentInfo);\n }\n if (componentLogsEntry !== undefined) {\n if (type === 'error') {\n componentLogsEntry.errors.clear();\n componentLogsEntry.errorsCount = 0;\n } else {\n componentLogsEntry.warnings.clear();\n componentLogsEntry.warningsCount = 0;\n }\n const changed = recordConsoleLogs(devtoolsInstance, componentLogsEntry);\n if (changed) {\n flushPendingEvents();\n updateMostRecentlyInspectedElementIfNecessary(devtoolsInstance.id);\n }\n }\n }\n }\n\n function clearErrorsForElementID(instanceID: number) {\n clearConsoleLogsHelper(instanceID, 'error');\n }\n\n function clearWarningsForElementID(instanceID: number) {\n clearConsoleLogsHelper(instanceID, 'warn');\n }\n\n function updateMostRecentlyInspectedElementIfNecessary(\n fiberID: number,\n ): void {\n if (\n mostRecentlyInspectedElement !== null &&\n mostRecentlyInspectedElement.id === fiberID\n ) {\n hasElementUpdatedSinceLastInspected = true;\n }\n }\n\n function getComponentStack(\n topFrame: Error,\n ): null | {enableOwnerStacks: boolean, componentStack: string} {\n if (getCurrentFiber == null) {\n // Expected this to be part of the renderer. Ignore.\n return null;\n }\n const current = getCurrentFiber();\n if (current === null) {\n // Outside of our render scope.\n return null;\n }\n\n if (supportsConsoleTasks(current)) {\n // This will be handled natively by console.createTask. No need for\n // DevTools to add it.\n return null;\n }\n\n const dispatcherRef = getDispatcherRef(renderer);\n if (dispatcherRef === undefined) {\n return null;\n }\n\n const enableOwnerStacks = supportsOwnerStacks(current);\n let componentStack = '';\n if (enableOwnerStacks) {\n // Prefix the owner stack with the current stack. I.e. what called\n // console.error. While this will also be part of the native stack,\n // it is hidden and not presented alongside this argument so we print\n // them all together.\n const topStackFrames = formatOwnerStack(topFrame);\n if (topStackFrames) {\n componentStack += '\\n' + topStackFrames;\n }\n componentStack += getOwnerStackByFiberInDev(\n ReactTypeOfWork,\n current,\n dispatcherRef,\n );\n } else {\n componentStack = getStackByFiberInDevAndProd(\n ReactTypeOfWork,\n current,\n dispatcherRef,\n );\n }\n return {enableOwnerStacks, componentStack};\n }\n\n // Called when an error or warning is logged during render, commit, or passive (including unmount functions).\n function onErrorOrWarning(\n type: 'error' | 'warn',\n args: $ReadOnlyArray<any>,\n ): void {\n if (getCurrentFiber == null) {\n // Expected this to be part of the renderer. Ignore.\n return;\n }\n const fiber = getCurrentFiber();\n if (fiber === null) {\n // Outside of our render scope.\n return;\n }\n if (type === 'error') {\n // if this is an error simulated by us to trigger error boundary, ignore\n if (\n forceErrorForFibers.get(fiber) === true ||\n (fiber.alternate !== null &&\n forceErrorForFibers.get(fiber.alternate) === true)\n ) {\n return;\n }\n }\n\n // We can't really use this message as a unique key, since we can't distinguish\n // different objects in this implementation. We have to delegate displaying of the objects\n // to the environment, the browser console, for example, so this is why this should be kept\n // as an array of arguments, instead of the plain string.\n // [Warning: %o, {...}] and [Warning: %o, {...}] will be considered as the same message,\n // even if objects are different\n const message = formatConsoleArgumentsToSingleString(...args);\n\n // Track the warning/error for later.\n let componentLogsEntry = fiberToComponentLogsMap.get(fiber);\n if (componentLogsEntry === undefined && fiber.alternate !== null) {\n componentLogsEntry = fiberToComponentLogsMap.get(fiber.alternate);\n if (componentLogsEntry !== undefined) {\n // Use the same set for both Fibers.\n fiberToComponentLogsMap.set(fiber, componentLogsEntry);\n }\n }\n if (componentLogsEntry === undefined) {\n componentLogsEntry = {\n errors: new Map(),\n errorsCount: 0 as number,\n warnings: new Map(),\n warningsCount: 0 as number,\n };\n fiberToComponentLogsMap.set(fiber, componentLogsEntry);\n }\n\n const messageMap =\n type === 'error'\n ? componentLogsEntry.errors\n : componentLogsEntry.warnings;\n const count = messageMap.get(message) || 0;\n messageMap.set(message, count + 1);\n if (type === 'error') {\n componentLogsEntry.errorsCount++;\n } else {\n componentLogsEntry.warningsCount++;\n }\n\n // The changes will be flushed later when we commit.\n\n // If the log happened in a passive effect, then this happens after we've\n // already committed the new tree so the change won't show up until we rerender\n // that component again. We need to visit a Component with passive effects in\n // handlePostCommitFiberRoot again to ensure that we flush the changes after passive.\n needsToFlushComponentLogs = true;\n }\n\n function debug(\n name: string,\n instance: DevToolsInstance,\n parentInstance: null | DevToolsInstance,\n extraString: string = '',\n ): void {\n if (__DEBUG__) {\n const displayName =\n instance.kind === VIRTUAL_INSTANCE\n ? instance.data.name || 'null'\n : instance.data.tag +\n ':' +\n (getDisplayNameForFiber(instance.data) || 'null');\n\n const maybeID =\n instance.kind === FILTERED_FIBER_INSTANCE ? '<no id>' : instance.id;\n\n const parentDisplayName =\n parentInstance === null\n ? ''\n : parentInstance.kind === VIRTUAL_INSTANCE\n ? parentInstance.data.name || 'null'\n : parentInstance.data.tag +\n ':' +\n (getDisplayNameForFiber(parentInstance.data) || 'null');\n\n const maybeParentID =\n parentInstance === null ||\n parentInstance.kind === FILTERED_FIBER_INSTANCE\n ? '<no id>'\n : parentInstance.id;\n\n console.groupCollapsed(\n `[renderer] %c${name} %c${displayName} (${maybeID}) %c${\n parentInstance ? `${parentDisplayName} (${maybeParentID})` : ''\n } %c${extraString}`,\n 'color: red; font-weight: bold;',\n 'color: blue;',\n 'color: purple;',\n 'color: black;',\n );\n console.log(new Error().stack.split('\\n').slice(1).join('\\n'));\n console.groupEnd();\n }\n }\n\n // eslint-disable-next-line no-unused-vars\n function debugTree(instance: DevToolsInstance, indent: number = 0) {\n if (__DEBUG__) {\n const name =\n (instance.kind !== VIRTUAL_INSTANCE\n ? getDisplayNameForFiber(instance.data)\n : instance.data.name) || '';\n console.log(\n ' '.repeat(indent) +\n '- ' +\n (instance.kind === FILTERED_FIBER_INSTANCE ? 0 : instance.id) +\n ' (' +\n name +\n ')',\n 'parent',\n instance.parent === null\n ? ' '\n : instance.parent.kind === FILTERED_FIBER_INSTANCE\n ? 0\n : instance.parent.id,\n 'next',\n instance.nextSibling === null ? ' ' : instance.nextSibling.id,\n );\n let child = instance.firstChild;\n while (child !== null) {\n debugTree(child, indent + 1);\n child = child.nextSibling;\n }\n }\n }\n\n // Configurable Components tree filters.\n const hideElementsWithDisplayNames: Set<RegExp> = new Set();\n const hideElementsWithPaths: Set<RegExp> = new Set();\n const hideElementsWithTypes: Set<ElementType> = new Set();\n const hideElementsWithEnvs: Set<string> = new Set();\n\n // Highlight updates\n let traceUpdatesEnabled: boolean = false;\n const traceUpdatesForNodes: Set<HostInstance> = new Set();\n\n function applyComponentFilters(componentFilters: Array<ComponentFilter>) {\n hideElementsWithTypes.clear();\n hideElementsWithDisplayNames.clear();\n hideElementsWithPaths.clear();\n hideElementsWithEnvs.clear();\n\n componentFilters.forEach(componentFilter => {\n if (!componentFilter.isEnabled) {\n return;\n }\n\n switch (componentFilter.type) {\n case ComponentFilterDisplayName:\n if (componentFilter.isValid && componentFilter.value !== '') {\n hideElementsWithDisplayNames.add(\n new RegExp(componentFilter.value, 'i'),\n );\n }\n break;\n case ComponentFilterElementType:\n hideElementsWithTypes.add(componentFilter.value);\n break;\n case ComponentFilterLocation:\n if (componentFilter.isValid && componentFilter.value !== '') {\n hideElementsWithPaths.add(new RegExp(componentFilter.value, 'i'));\n }\n break;\n case ComponentFilterHOC:\n hideElementsWithDisplayNames.add(new RegExp('\\\\('));\n break;\n case ComponentFilterEnvironmentName:\n hideElementsWithEnvs.add(componentFilter.value);\n break;\n default:\n console.warn(\n `Invalid component filter type \"${componentFilter.type}\"`,\n );\n break;\n }\n });\n }\n\n // The renderer interface can't read saved component filters directly,\n // because they are stored in localStorage within the context of the extension.\n // Instead it relies on the extension to pass filters through.\n if (window.__REACT_DEVTOOLS_COMPONENT_FILTERS__ != null) {\n const componentFiltersWithoutLocationBasedOnes =\n filterOutLocationComponentFilters(\n window.__REACT_DEVTOOLS_COMPONENT_FILTERS__,\n );\n applyComponentFilters(componentFiltersWithoutLocationBasedOnes);\n } else {\n // Unfortunately this feature is not expected to work for React Native for now.\n // It would be annoying for us to spam YellowBox warnings with unactionable stuff,\n // so for now just skip this message...\n //console.warn('⚛ DevTools: Could not locate saved component filters');\n\n // Fallback to assuming the default filters in this case.\n applyComponentFilters(getDefaultComponentFilters());\n }\n\n // If necessary, we can revisit optimizing this operation.\n // For example, we could add a new recursive unmount tree operation.\n // The unmount operations are already significantly smaller than mount operations though.\n // This is something to keep in mind for later.\n function updateComponentFilters(componentFilters: Array<ComponentFilter>) {\n if (isProfiling) {\n // Re-mounting a tree while profiling is in progress might break a lot of assumptions.\n // If necessary, we could support this- but it doesn't seem like a necessary use case.\n throw Error('Cannot modify filter preferences while profiling');\n }\n\n // Recursively unmount all roots.\n hook.getFiberRoots(rendererID).forEach(root => {\n const rootInstance = rootToFiberInstanceMap.get(root);\n if (rootInstance === undefined) {\n throw new Error(\n 'Expected the root instance to already exist when applying filters',\n );\n }\n currentRoot = rootInstance;\n unmountInstanceRecursively(rootInstance);\n rootToFiberInstanceMap.delete(root);\n flushPendingEvents();\n currentRoot = (null: any);\n });\n\n applyComponentFilters(componentFilters);\n\n // Reset pseudo counters so that new path selections will be persisted.\n rootDisplayNameCounter.clear();\n\n // Recursively re-mount all roots with new filter criteria applied.\n hook.getFiberRoots(rendererID).forEach(root => {\n const current = root.current;\n const newRoot = createFiberInstance(current);\n rootToFiberInstanceMap.set(root, newRoot);\n idToDevToolsInstanceMap.set(newRoot.id, newRoot);\n\n // Before the traversals, remember to start tracking\n // our path in case we have selection to restore.\n if (trackedPath !== null) {\n mightBeOnTrackedPath = true;\n }\n\n currentRoot = newRoot;\n setRootPseudoKey(currentRoot.id, root.current);\n mountFiberRecursively(root.current, false);\n flushPendingEvents();\n currentRoot = (null: any);\n });\n\n flushPendingEvents();\n\n needsToFlushComponentLogs = false;\n }\n\n function getEnvironmentNames(): Array<string> {\n return Array.from(knownEnvironmentNames);\n }\n\n function isFiberHydrated(fiber: Fiber): boolean {\n if (OffscreenComponent === -1) {\n throw new Error('not implemented for legacy suspense');\n }\n switch (fiber.tag) {\n case HostRoot:\n const rootState = fiber.memoizedState;\n return !rootState.isDehydrated;\n case SuspenseComponent:\n const suspenseState = fiber.memoizedState;\n return suspenseState === null || suspenseState.dehydrated === null;\n default:\n throw new Error('not implemented for work tag ' + fiber.tag);\n }\n }\n\n function shouldFilterVirtual(\n data: ReactComponentInfo,\n secondaryEnv: null | string,\n ): boolean {\n // For purposes of filtering Server Components are always Function Components.\n // Environment will be used to filter Server vs Client.\n // Technically they can be forwardRef and memo too but those filters will go away\n // as those become just plain user space function components like any HoC.\n if (hideElementsWithTypes.has(ElementTypeFunction)) {\n return true;\n }\n\n if (hideElementsWithDisplayNames.size > 0) {\n const displayName = data.name;\n if (displayName != null) {\n // eslint-disable-next-line no-for-of-loops/no-for-of-loops\n for (const displayNameRegExp of hideElementsWithDisplayNames) {\n if (displayNameRegExp.test(displayName)) {\n return true;\n }\n }\n }\n }\n\n if (\n (data.env == null || hideElementsWithEnvs.has(data.env)) &&\n (secondaryEnv === null || hideElementsWithEnvs.has(secondaryEnv))\n ) {\n // If a Component has two environments, you have to filter both for it not to appear.\n return true;\n }\n\n return false;\n }\n\n // NOTICE Keep in sync with get*ForFiber methods\n function shouldFilterFiber(fiber: Fiber): boolean {\n const {tag, type, key} = fiber;\n\n switch (tag) {\n case DehydratedSuspenseComponent:\n // TODO: ideally we would show dehydrated Suspense immediately.\n // However, it has some special behavior (like disconnecting\n // an alternate and turning into real Suspense) which breaks DevTools.\n // For now, ignore it, and only show it once it gets hydrated.\n // https://github.com/bvaughn/react-devtools-experimental/issues/197\n return true;\n case HostPortal:\n case HostText:\n case LegacyHiddenComponent:\n case OffscreenComponent:\n case Throw:\n return true;\n case HostRoot:\n // It is never valid to filter the root element.\n return false;\n case Fragment:\n return key === null;\n default:\n const typeSymbol = getTypeSymbol(type);\n\n switch (typeSymbol) {\n case CONCURRENT_MODE_NUMBER:\n case CONCURRENT_MODE_SYMBOL_STRING:\n case DEPRECATED_ASYNC_MODE_SYMBOL_STRING:\n case STRICT_MODE_NUMBER:\n case STRICT_MODE_SYMBOL_STRING:\n return true;\n default:\n break;\n }\n }\n\n const elementType = getElementTypeForFiber(fiber);\n if (hideElementsWithTypes.has(elementType)) {\n return true;\n }\n\n if (hideElementsWithDisplayNames.size > 0) {\n const displayName = getDisplayNameForFiber(fiber);\n if (displayName != null) {\n // eslint-disable-next-line no-for-of-loops/no-for-of-loops\n for (const displayNameRegExp of hideElementsWithDisplayNames) {\n if (displayNameRegExp.test(displayName)) {\n return true;\n }\n }\n }\n }\n\n if (hideElementsWithEnvs.has('Client')) {\n // If we're filtering out the Client environment we should filter out all\n // \"Client Components\". Technically that also includes the built-ins but\n // since that doesn't actually include any additional code loading it's\n // useful to not filter out the built-ins. Those can be filtered separately.\n // There's no other way to filter out just Function components on the Client.\n // Therefore, this only filters Class and Function components.\n switch (tag) {\n case ClassComponent:\n case IncompleteClassComponent:\n case IncompleteFunctionComponent:\n case FunctionComponent:\n case IndeterminateComponent:\n case ForwardRef:\n case MemoComponent:\n case SimpleMemoComponent:\n return true;\n }\n }\n\n /* DISABLED: https://github.com/facebook/react/pull/28417\n if (hideElementsWithPaths.size > 0) {\n const source = getSourceForFiber(fiber);\n\n if (source != null) {\n const {fileName} = source;\n // eslint-disable-next-line no-for-of-loops/no-for-of-loops\n for (const pathRegExp of hideElementsWithPaths) {\n if (pathRegExp.test(fileName)) {\n return true;\n }\n }\n }\n }\n */\n\n return false;\n }\n\n // NOTICE Keep in sync with shouldFilterFiber() and other get*ForFiber methods\n function getElementTypeForFiber(fiber: Fiber): ElementType {\n const {type, tag} = fiber;\n\n switch (tag) {\n case ActivityComponent:\n return ElementTypeActivity;\n case ClassComponent:\n case IncompleteClassComponent:\n return ElementTypeClass;\n case IncompleteFunctionComponent:\n case FunctionComponent:\n case IndeterminateComponent:\n return ElementTypeFunction;\n case ForwardRef:\n return ElementTypeForwardRef;\n case HostRoot:\n return ElementTypeRoot;\n case HostComponent:\n case HostHoistable:\n case HostSingleton:\n return ElementTypeHostComponent;\n case HostPortal:\n case HostText:\n case Fragment:\n return ElementTypeOtherOrUnknown;\n case MemoComponent:\n case SimpleMemoComponent:\n return ElementTypeMemo;\n case SuspenseComponent:\n return ElementTypeSuspense;\n case SuspenseListComponent:\n return ElementTypeSuspenseList;\n case TracingMarkerComponent:\n return ElementTypeTracingMarker;\n case ViewTransitionComponent:\n return ElementTypeViewTransition;\n default:\n const typeSymbol = getTypeSymbol(type);\n\n switch (typeSymbol) {\n case CONCURRENT_MODE_NUMBER:\n case CONCURRENT_MODE_SYMBOL_STRING:\n case DEPRECATED_ASYNC_MODE_SYMBOL_STRING:\n return ElementTypeOtherOrUnknown;\n case PROVIDER_NUMBER:\n case PROVIDER_SYMBOL_STRING:\n return ElementTypeContext;\n case CONTEXT_NUMBER:\n case CONTEXT_SYMBOL_STRING:\n return ElementTypeContext;\n case STRICT_MODE_NUMBER:\n case STRICT_MODE_SYMBOL_STRING:\n return ElementTypeOtherOrUnknown;\n case PROFILER_NUMBER:\n case PROFILER_SYMBOL_STRING:\n return ElementTypeProfiler;\n default:\n return ElementTypeOtherOrUnknown;\n }\n }\n }\n\n // When a mount or update is in progress, this value tracks the root that is being operated on.\n let currentRoot: FiberInstance = (null: any);\n\n // Removes a Fiber (and its alternate) from the Maps used to track their id.\n // This method should always be called when a Fiber is unmounting.\n function untrackFiber(nearestInstance: DevToolsInstance, fiber: Fiber) {\n if (forceErrorForFibers.size > 0) {\n forceErrorForFibers.delete(fiber);\n if (fiber.alternate) {\n forceErrorForFibers.delete(fiber.alternate);\n }\n if (forceErrorForFibers.size === 0 && setErrorHandler != null) {\n setErrorHandler(shouldErrorFiberAlwaysNull);\n }\n }\n\n if (forceFallbackForFibers.size > 0) {\n forceFallbackForFibers.delete(fiber);\n if (fiber.alternate) {\n forceFallbackForFibers.delete(fiber.alternate);\n }\n if (forceFallbackForFibers.size === 0 && setSuspenseHandler != null) {\n setSuspenseHandler(shouldSuspendFiberAlwaysFalse);\n }\n }\n\n // TODO: Consider using a WeakMap instead. The only thing where that doesn't work\n // is React Native Paper which tracks tags but that support is eventually going away\n // and can use the old findFiberByHostInstance strategy.\n\n if (fiber.tag === HostHoistable) {\n releaseHostResource(nearestInstance, fiber.memoizedState);\n } else if (\n fiber.tag === HostComponent ||\n fiber.tag === HostText ||\n fiber.tag === HostSingleton\n ) {\n releaseHostInstance(nearestInstance, fiber.stateNode);\n }\n\n // Recursively clean up any filtered Fibers below this one as well since\n // we won't recordUnmount on those.\n for (let child = fiber.child; child !== null; child = child.sibling) {\n if (shouldFilterFiber(child)) {\n untrackFiber(nearestInstance, child);\n }\n }\n }\n\n function getChangeDescription(\n prevFiber: Fiber | null,\n nextFiber: Fiber,\n ): ChangeDescription | null {\n switch (nextFiber.tag) {\n case ClassComponent:\n if (prevFiber === null) {\n return {\n context: null,\n didHooksChange: false,\n isFirstMount: true,\n props: null,\n state: null,\n };\n } else {\n const data: ChangeDescription = {\n context: getContextChanged(prevFiber, nextFiber),\n didHooksChange: false,\n isFirstMount: false,\n props: getChangedKeys(\n prevFiber.memoizedProps,\n nextFiber.memoizedProps,\n ),\n state: getChangedKeys(\n prevFiber.memoizedState,\n nextFiber.memoizedState,\n ),\n };\n return data;\n }\n case IncompleteFunctionComponent:\n case FunctionComponent:\n case IndeterminateComponent:\n case ForwardRef:\n case MemoComponent:\n case SimpleMemoComponent:\n if (prevFiber === null) {\n return {\n context: null,\n didHooksChange: false,\n isFirstMount: true,\n props: null,\n state: null,\n };\n } else {\n const indices = getChangedHooksIndices(\n prevFiber.memoizedState,\n nextFiber.memoizedState,\n );\n const data: ChangeDescription = {\n context: getContextChanged(prevFiber, nextFiber),\n didHooksChange: indices !== null && indices.length > 0,\n isFirstMount: false,\n props: getChangedKeys(\n prevFiber.memoizedProps,\n nextFiber.memoizedProps,\n ),\n state: null,\n hooks: indices,\n };\n // Only traverse the hooks list once, depending on what info we're returning.\n return data;\n }\n default:\n return null;\n }\n }\n\n function getContextChanged(prevFiber: Fiber, nextFiber: Fiber): boolean {\n let prevContext =\n prevFiber.dependencies && prevFiber.dependencies.firstContext;\n let nextContext =\n nextFiber.dependencies && nextFiber.dependencies.firstContext;\n\n while (prevContext && nextContext) {\n // Note this only works for versions of React that support this key (e.v. 18+)\n // For older versions, there's no good way to read the current context value after render has completed.\n // This is because React maintains a stack of context values during render,\n // but by the time DevTools is called, render has finished and the stack is empty.\n if (prevContext.context !== nextContext.context) {\n // If the order of context has changed, then the later context values might have\n // changed too but the main reason it rerendered was earlier. Either an earlier\n // context changed value but then we would have exited already. If we end up here\n // it's because a state or props change caused the order of contexts used to change.\n // So the main cause is not the contexts themselves.\n return false;\n }\n if (!is(prevContext.memoizedValue, nextContext.memoizedValue)) {\n return true;\n }\n\n prevContext = prevContext.next;\n nextContext = nextContext.next;\n }\n return false;\n }\n\n function isHookThatCanScheduleUpdate(hookObject: any) {\n const queue = hookObject.queue;\n if (!queue) {\n return false;\n }\n\n const boundHasOwnProperty = hasOwnProperty.bind(queue);\n\n // Detect the shape of useState() / useReducer() / useTransition()\n // using the attributes that are unique to these hooks\n // but also stable (e.g. not tied to current Lanes implementation)\n // We don't check for dispatch property, because useTransition doesn't have it\n if (boundHasOwnProperty('pending')) {\n return true;\n }\n\n // Detect useSyncExternalStore()\n return (\n boundHasOwnProperty('value') &&\n boundHasOwnProperty('getSnapshot') &&\n typeof queue.getSnapshot === 'function'\n );\n }\n\n function didStatefulHookChange(prev: any, next: any): boolean {\n const prevMemoizedState = prev.memoizedState;\n const nextMemoizedState = next.memoizedState;\n\n if (isHookThatCanScheduleUpdate(prev)) {\n return prevMemoizedState !== nextMemoizedState;\n }\n\n return false;\n }\n\n function getChangedHooksIndices(prev: any, next: any): null | Array<number> {\n if (prev == null || next == null) {\n return null;\n }\n\n const indices = [];\n let index = 0;\n while (next !== null) {\n if (didStatefulHookChange(prev, next)) {\n indices.push(index);\n }\n next = next.next;\n prev = prev.next;\n index++;\n }\n\n return indices;\n }\n\n function getChangedKeys(prev: any, next: any): null | Array<string> {\n if (prev == null || next == null) {\n return null;\n }\n\n const keys = new Set([...Object.keys(prev), ...Object.keys(next)]);\n const changedKeys = [];\n // eslint-disable-next-line no-for-of-loops/no-for-of-loops\n for (const key of keys) {\n if (prev[key] !== next[key]) {\n changedKeys.push(key);\n }\n }\n\n return changedKeys;\n }\n\n function didFiberRender(prevFiber: Fiber, nextFiber: Fiber): boolean {\n switch (nextFiber.tag) {\n case ClassComponent:\n case FunctionComponent:\n case ContextConsumer:\n case MemoComponent:\n case SimpleMemoComponent:\n case ForwardRef:\n // For types that execute user code, we check PerformedWork effect.\n // We don't reflect bailouts (either referential or sCU) in DevTools.\n // TODO: This flag is a leaked implementation detail. Once we start\n // releasing DevTools in lockstep with React, we should import a\n // function from the reconciler instead.\n const PerformedWork = 0b000000000000000000000000001;\n return (getFiberFlags(nextFiber) & PerformedWork) === PerformedWork;\n // Note: ContextConsumer only gets PerformedWork effect in 16.3.3+\n // so it won't get highlighted with React 16.3.0 to 16.3.2.\n default:\n // For host components and other types, we compare inputs\n // to determine whether something is an update.\n return (\n prevFiber.memoizedProps !== nextFiber.memoizedProps ||\n prevFiber.memoizedState !== nextFiber.memoizedState ||\n prevFiber.ref !== nextFiber.ref\n );\n }\n }\n\n type OperationsArray = Array<number>;\n\n type StringTableEntry = {\n encodedString: Array<number>,\n id: number,\n };\n\n const pendingOperations: OperationsArray = [];\n const pendingRealUnmountedIDs: Array<FiberInstance['id']> = [];\n const pendingRealUnmountedSuspenseIDs: Array<FiberInstance['id']> = [];\n const pendingSuspenderChanges: Set<FiberInstance['id']> = new Set();\n let pendingOperationsQueue: Array<OperationsArray> | null = [];\n const pendingStringTable: Map<string, StringTableEntry> = new Map();\n let pendingStringTableLength: number = 0;\n let pendingUnmountedRootID: FiberInstance['id'] | null = null;\n\n function pushOperation(op: number): void {\n if (__DEV__) {\n if (!Number.isInteger(op)) {\n console.error(\n 'pushOperation() was called but the value is not an integer.',\n op,\n );\n }\n }\n pendingOperations.push(op);\n }\n\n function shouldBailoutWithPendingOperations() {\n if (isProfiling) {\n if (\n currentCommitProfilingMetadata != null &&\n currentCommitProfilingMetadata.durations.length > 0\n ) {\n return false;\n }\n }\n\n return (\n pendingOperations.length === 0 &&\n pendingRealUnmountedIDs.length === 0 &&\n pendingRealUnmountedSuspenseIDs.length === 0 &&\n pendingSuspenderChanges.size === 0 &&\n pendingUnmountedRootID === null\n );\n }\n\n function flushOrQueueOperations(operations: OperationsArray): void {\n if (shouldBailoutWithPendingOperations()) {\n return;\n }\n\n if (pendingOperationsQueue !== null) {\n pendingOperationsQueue.push(operations);\n } else {\n hook.emit('operations', operations);\n }\n }\n\n function recordConsoleLogs(\n instance: FiberInstance | VirtualInstance,\n componentLogsEntry: void | ComponentLogs,\n ): boolean {\n if (componentLogsEntry === undefined) {\n if (instance.logCount === 0) {\n // Nothing has changed.\n return false;\n }\n // Reset to zero.\n instance.logCount = 0;\n pushOperation(TREE_OPERATION_UPDATE_ERRORS_OR_WARNINGS);\n pushOperation(instance.id);\n pushOperation(0);\n pushOperation(0);\n return true;\n } else {\n const totalCount =\n componentLogsEntry.errorsCount + componentLogsEntry.warningsCount;\n if (instance.logCount === totalCount) {\n // Nothing has changed.\n return false;\n }\n // Update counts.\n instance.logCount = totalCount;\n pushOperation(TREE_OPERATION_UPDATE_ERRORS_OR_WARNINGS);\n pushOperation(instance.id);\n pushOperation(componentLogsEntry.errorsCount);\n pushOperation(componentLogsEntry.warningsCount);\n return true;\n }\n }\n\n function flushPendingEvents(): void {\n if (shouldBailoutWithPendingOperations()) {\n // If we aren't profiling, we can just bail out here.\n // No use sending an empty update over the bridge.\n //\n // The Profiler stores metadata for each commit and reconstructs the app tree per commit using:\n // (1) an initial tree snapshot and\n // (2) the operations array for each commit\n // Because of this, it's important that the operations and metadata arrays align,\n // So it's important not to omit even empty operations while profiling is active.\n return;\n }\n\n const numUnmountIDs =\n pendingRealUnmountedIDs.length +\n (pendingUnmountedRootID === null ? 0 : 1);\n const numUnmountSuspenseIDs = pendingRealUnmountedSuspenseIDs.length;\n const numSuspenderChanges = pendingSuspenderChanges.size;\n\n const operations = new Array<number>(\n // Identify which renderer this update is coming from.\n 2 + // [rendererID, rootFiberID]\n // How big is the string table?\n 1 + // [stringTableLength]\n // Then goes the actual string table.\n pendingStringTableLength +\n // All unmounts of Suspense boundaries are batched in a single message.\n // [TREE_OPERATION_REMOVE_SUSPENSE, removedSuspenseIDLength, ...ids]\n (numUnmountSuspenseIDs > 0 ? 2 + numUnmountSuspenseIDs : 0) +\n // All unmounts are batched in a single message.\n // [TREE_OPERATION_REMOVE, removedIDLength, ...ids]\n (numUnmountIDs > 0 ? 2 + numUnmountIDs : 0) +\n // Regular operations\n pendingOperations.length +\n // All suspender changes are batched in a single message.\n // [SUSPENSE_TREE_OPERATION_SUSPENDERS, suspenderChangesLength, ...[id, hasUniqueSuspenders, isSuspended]]\n (numSuspenderChanges > 0 ? 2 + numSuspenderChanges * 3 : 0),\n );\n\n // Identify which renderer this update is coming from.\n // This enables roots to be mapped to renderers,\n // Which in turn enables fiber props, states, and hooks to be inspected.\n let i = 0;\n operations[i++] = rendererID;\n if (currentRoot === null) {\n // TODO: This is not always safe so this field is probably not needed.\n operations[i++] = -1;\n } else {\n operations[i++] = currentRoot.id;\n }\n\n // Now fill in the string table.\n // [stringTableLength, str1Length, ...str1, str2Length, ...str2, ...]\n operations[i++] = pendingStringTableLength;\n pendingStringTable.forEach((entry, stringKey) => {\n const encodedString = entry.encodedString;\n\n // Don't use the string length.\n // It won't work for multibyte characters (like emoji).\n const length = encodedString.length;\n\n operations[i++] = length;\n for (let j = 0; j < length; j++) {\n operations[i + j] = encodedString[j];\n }\n\n i += length;\n });\n\n if (numUnmountSuspenseIDs > 0) {\n // All unmounts of Suspense boundaries are batched in a single message.\n operations[i++] = SUSPENSE_TREE_OPERATION_REMOVE;\n // The first number is how many unmounted IDs we're gonna send.\n operations[i++] = numUnmountSuspenseIDs;\n // Fill in the real unmounts in the reverse order.\n // They were inserted parents-first by React, but we want children-first.\n // So we traverse our array backwards.\n for (let j = 0; j < pendingRealUnmountedSuspenseIDs.length; j++) {\n operations[i++] = pendingRealUnmountedSuspenseIDs[j];\n }\n }\n\n if (numUnmountIDs > 0) {\n // All unmounts except roots are batched in a single message.\n operations[i++] = TREE_OPERATION_REMOVE;\n // The first number is how many unmounted IDs we're gonna send.\n operations[i++] = numUnmountIDs;\n // Fill in the real unmounts in the reverse order.\n // They were inserted parents-first by React, but we want children-first.\n // So we traverse our array backwards.\n for (let j = 0; j < pendingRealUnmountedIDs.length; j++) {\n operations[i++] = pendingRealUnmountedIDs[j];\n }\n // The root ID should always be unmounted last.\n if (pendingUnmountedRootID !== null) {\n operations[i] = pendingUnmountedRootID;\n i++;\n }\n }\n\n // Fill in pending operations.\n for (let j = 0; j < pendingOperations.length; j++) {\n operations[i + j] = pendingOperations[j];\n }\n i += pendingOperations.length;\n\n // Suspender changes might affect newly mounted nodes that we already recorded\n // in pending operations.\n if (numSuspenderChanges > 0) {\n operations[i++] = SUSPENSE_TREE_OPERATION_SUSPENDERS;\n operations[i++] = numSuspenderChanges;\n pendingSuspenderChanges.forEach(fiberIdWithChanges => {\n const suspense = idToSuspenseNodeMap.get(fiberIdWithChanges);\n if (suspense === undefined) {\n // Probably forgot to cleanup pendingSuspenderChanges when this node was removed.\n throw new Error(\n `Could not send suspender changes for \"${fiberIdWithChanges}\" since the Fiber no longer exists.`,\n );\n }\n operations[i++] = fiberIdWithChanges;\n operations[i++] = suspense.hasUniqueSuspenders ? 1 : 0;\n const instance = suspense.instance;\n const isSuspended =\n // TODO: Track if other SuspenseNode like SuspenseList rows are suspended.\n (instance.kind === FIBER_INSTANCE ||\n instance.kind === FILTERED_FIBER_INSTANCE) &&\n instance.data.tag === SuspenseComponent &&\n instance.data.memoizedState !== null;\n operations[i++] = isSuspended ? 1 : 0;\n operations[i++] = suspense.environments.size;\n suspense.environments.forEach((count, env) => {\n operations[i++] = getStringID(env);\n });\n });\n }\n\n // Let the frontend know about tree operations.\n flushOrQueueOperations(operations);\n\n // Reset all of the pending state now that we've told the frontend about it.\n pendingOperations.length = 0;\n pendingRealUnmountedIDs.length = 0;\n pendingRealUnmountedSuspenseIDs.length = 0;\n pendingSuspenderChanges.clear();\n pendingUnmountedRootID = null;\n pendingStringTable.clear();\n pendingStringTableLength = 0;\n }\n\n function measureHostInstance(instance: HostInstance): null | Array<Rect> {\n // Feature detect measurement capabilities of this environment.\n // TODO: Consider making this capability injected by the ReactRenderer.\n if (typeof instance !== 'object' || instance === null) {\n return null;\n }\n if (\n typeof instance.getClientRects === 'function' ||\n instance.nodeType === 3\n ) {\n // DOM\n const doc = instance.ownerDocument;\n if (instance === doc.documentElement) {\n // This is the document element. The size of this element is not actually\n // what determines the whole scrollable area of the screen. Because any\n // thing that overflows the document will also contribute to the scrollable.\n // This is unlike overflow: scroll which clips those.\n // Therefore, we use the scrollable size for this rect instead.\n return [\n {\n x: 0,\n y: 0,\n width: instance.scrollWidth,\n height: instance.scrollHeight,\n },\n ];\n }\n const result: Array<Rect> = [];\n const win = doc && doc.defaultView;\n const scrollX = win ? win.scrollX : 0;\n const scrollY = win ? win.scrollY : 0;\n let rects;\n if (instance.nodeType === 3) {\n // Text nodes cannot be measured directly but we can measure a Range.\n if (typeof doc.createRange !== 'function') {\n return null;\n }\n const range = doc.createRange();\n if (typeof range.getClientRects !== 'function') {\n return null;\n }\n range.selectNodeContents(instance);\n rects = range.getClientRects();\n } else {\n rects = instance.getClientRects();\n }\n for (let i = 0; i < rects.length; i++) {\n const rect = rects[i];\n result.push({\n x: rect.x + scrollX,\n y: rect.y + scrollY,\n width: rect.width,\n height: rect.height,\n });\n }\n return result;\n }\n if (instance.canonical) {\n // Native\n const publicInstance = instance.canonical.publicInstance;\n if (!publicInstance) {\n // The publicInstance may not have been initialized yet if there was no ref on this node.\n // We can't initialize it from any existing Hook but we could fallback to this async form:\n // renderer.extraDevToolsConfig.getInspectorDataForInstance(instance).hierarchy[last].getInspectorData().measure(callback)\n return null;\n }\n if (typeof publicInstance.getBoundingClientRect === 'function') {\n // enableAccessToHostTreeInFabric / ReadOnlyElement\n return [publicInstance.getBoundingClientRect()];\n }\n if (typeof publicInstance.unstable_getBoundingClientRect === 'function') {\n // ReactFabricHostComponent\n return [publicInstance.unstable_getBoundingClientRect()];\n }\n }\n return null;\n }\n\n function measureInstance(instance: DevToolsInstance): null | Array<Rect> {\n // Synchronously return the client rects of the Host instances directly inside this Instance.\n const hostInstances = findAllCurrentHostInstances(instance);\n let result: null | Array<Rect> = null;\n for (let i = 0; i < hostInstances.length; i++) {\n const childResult = measureHostInstance(hostInstances[i]);\n if (childResult !== null) {\n if (result === null) {\n result = childResult;\n } else {\n result = result.concat(childResult);\n }\n }\n }\n return result;\n }\n\n function getStringID(string: string | null): number {\n if (string === null) {\n return 0;\n }\n const existingEntry = pendingStringTable.get(string);\n if (existingEntry !== undefined) {\n return existingEntry.id;\n }\n\n const id = pendingStringTable.size + 1;\n const encodedString = utfEncodeString(string);\n\n pendingStringTable.set(string, {\n encodedString,\n id,\n });\n\n // The string table total length needs to account both for the string length,\n // and for the array item that contains the length itself.\n //\n // Don't use string length for this table.\n // It won't work for multibyte characters (like emoji).\n pendingStringTableLength += encodedString.length + 1;\n\n return id;\n }\n\n let isInDisconnectedSubtree = false;\n\n function recordMount(\n fiber: Fiber,\n parentInstance: DevToolsInstance | null,\n ): FiberInstance {\n const isRoot = fiber.tag === HostRoot;\n let fiberInstance;\n if (isRoot) {\n const entry = rootToFiberInstanceMap.get(fiber.stateNode);\n if (entry === undefined) {\n throw new Error('The root should have been registered at this point');\n }\n fiberInstance = entry;\n } else {\n fiberInstance = createFiberInstance(fiber);\n }\n idToDevToolsInstanceMap.set(fiberInstance.id, fiberInstance);\n\n if (__DEBUG__) {\n debug('recordMount()', fiberInstance, parentInstance);\n }\n\n recordReconnect(fiberInstance, parentInstance);\n return fiberInstance;\n }\n\n function recordReconnect(\n fiberInstance: FiberInstance,\n parentInstance: DevToolsInstance | null,\n ): void {\n if (isInDisconnectedSubtree) {\n // We're disconnected. We'll reconnect a hidden mount after the parent reappears.\n return;\n }\n const id = fiberInstance.id;\n const fiber = fiberInstance.data;\n\n const isProfilingSupported = fiber.hasOwnProperty('treeBaseDuration');\n\n const isRoot = fiber.tag === HostRoot;\n\n if (isRoot) {\n const hasOwnerMetadata = fiber.hasOwnProperty('_debugOwner');\n\n // Adding a new field here would require a bridge protocol version bump (a backwads breaking change).\n // Instead let's re-purpose a pre-existing field to carry more information.\n let profilingFlags = 0;\n if (isProfilingSupported) {\n profilingFlags = PROFILING_FLAG_BASIC_SUPPORT;\n if (typeof injectProfilingHooks === 'function') {\n profilingFlags |= PROFILING_FLAG_TIMELINE_SUPPORT;\n }\n if (supportsPerformanceTracks) {\n profilingFlags |= PROFILING_FLAG_PERFORMANCE_TRACKS_SUPPORT;\n }\n }\n\n // Set supportsStrictMode to false for production renderer builds\n const isProductionBuildOfRenderer = renderer.bundleType === 0;\n\n pushOperation(TREE_OPERATION_ADD);\n pushOperation(id);\n pushOperation(ElementTypeRoot);\n pushOperation((fiber.mode & StrictModeBits) !== 0 ? 1 : 0);\n pushOperation(profilingFlags);\n pushOperation(\n !isProductionBuildOfRenderer && StrictModeBits !== 0 ? 1 : 0,\n );\n pushOperation(hasOwnerMetadata ? 1 : 0);\n\n if (isProfiling) {\n if (displayNamesByRootID !== null) {\n displayNamesByRootID.set(id, getDisplayNameForRoot(fiber));\n }\n }\n } else {\n const {key} = fiber;\n const displayName = getDisplayNameForFiber(fiber);\n const elementType = getElementTypeForFiber(fiber);\n\n // Finding the owner instance might require traversing the whole parent path which\n // doesn't have great big O notation. Ideally we'd lazily fetch the owner when we\n // need it but we have some synchronous operations in the front end like Alt+Left\n // which selects the owner immediately. Typically most owners are only a few parents\n // away so maybe it's not so bad.\n const debugOwner = getUnfilteredOwner(fiber);\n const ownerInstance = findNearestOwnerInstance(\n parentInstance,\n debugOwner,\n );\n if (\n ownerInstance !== null &&\n debugOwner === fiber._debugOwner &&\n fiber._debugStack != null &&\n ownerInstance.source === null\n ) {\n // The new Fiber is directly owned by the ownerInstance. Therefore somewhere on\n // the debugStack will be a stack frame inside the ownerInstance's source.\n ownerInstance.source = fiber._debugStack;\n }\n\n let unfilteredParent = parentInstance;\n while (\n unfilteredParent !== null &&\n unfilteredParent.kind === FILTERED_FIBER_INSTANCE\n ) {\n unfilteredParent = unfilteredParent.parent;\n }\n\n const ownerID = ownerInstance === null ? 0 : ownerInstance.id;\n const parentID = unfilteredParent === null ? 0 : unfilteredParent.id;\n\n const displayNameStringID = getStringID(displayName);\n\n // This check is a guard to handle a React element that has been modified\n // in such a way as to bypass the default stringification of the \"key\" property.\n const keyString = key === null ? null : String(key);\n const keyStringID = getStringID(keyString);\n\n const nameProp =\n fiber.tag === SuspenseComponent\n ? fiber.memoizedProps.name\n : fiber.tag === ActivityComponent\n ? fiber.memoizedProps.name\n : null;\n const namePropString = nameProp == null ? null : String(nameProp);\n const namePropStringID = getStringID(namePropString);\n\n pushOperation(TREE_OPERATION_ADD);\n pushOperation(id);\n pushOperation(elementType);\n pushOperation(parentID);\n pushOperation(ownerID);\n pushOperation(displayNameStringID);\n pushOperation(keyStringID);\n pushOperation(namePropStringID);\n\n // If this subtree has a new mode, let the frontend know.\n if ((fiber.mode & StrictModeBits) !== 0) {\n let parentFiber = null;\n let parentFiberInstance = parentInstance;\n while (parentFiberInstance !== null) {\n if (parentFiberInstance.kind === FIBER_INSTANCE) {\n parentFiber = parentFiberInstance.data;\n break;\n }\n parentFiberInstance = parentFiberInstance.parent;\n }\n if (parentFiber === null || (parentFiber.mode & StrictModeBits) === 0) {\n pushOperation(TREE_OPERATION_SET_SUBTREE_MODE);\n pushOperation(id);\n pushOperation(StrictMode);\n }\n }\n }\n\n let componentLogsEntry = fiberToComponentLogsMap.get(fiber);\n if (componentLogsEntry === undefined && fiber.alternate !== null) {\n componentLogsEntry = fiberToComponentLogsMap.get(fiber.alternate);\n }\n recordConsoleLogs(fiberInstance, componentLogsEntry);\n\n if (isProfilingSupported) {\n recordProfilingDurations(fiberInstance, null);\n }\n }\n\n function recordVirtualMount(\n instance: VirtualInstance,\n parentInstance: DevToolsInstance | null,\n secondaryEnv: null | string,\n ): void {\n const id = instance.id;\n\n idToDevToolsInstanceMap.set(id, instance);\n\n recordVirtualReconnect(instance, parentInstance, secondaryEnv);\n }\n\n function recordVirtualReconnect(\n instance: VirtualInstance,\n parentInstance: DevToolsInstance | null,\n secondaryEnv: null | string,\n ): void {\n if (isInDisconnectedSubtree) {\n // We're disconnected. We'll reconnect a hidden mount after the parent reappears.\n return;\n }\n const componentInfo = instance.data;\n\n const key =\n typeof componentInfo.key === 'string' ? componentInfo.key : null;\n const env = componentInfo.env;\n let displayName = componentInfo.name || '';\n if (typeof env === 'string') {\n // We model environment as an HoC name for now.\n if (secondaryEnv !== null) {\n displayName = secondaryEnv + '(' + displayName + ')';\n }\n displayName = env + '(' + displayName + ')';\n }\n const elementType = ElementTypeVirtual;\n\n // Finding the owner instance might require traversing the whole parent path which\n // doesn't have great big O notation. Ideally we'd lazily fetch the owner when we\n // need it but we have some synchronous operations in the front end like Alt+Left\n // which selects the owner immediately. Typically most owners are only a few parents\n // away so maybe it's not so bad.\n const debugOwner = getUnfilteredOwner(componentInfo);\n const ownerInstance = findNearestOwnerInstance(parentInstance, debugOwner);\n if (\n ownerInstance !== null &&\n debugOwner === componentInfo.owner &&\n componentInfo.debugStack != null &&\n ownerInstance.source === null\n ) {\n // The new Fiber is directly owned by the ownerInstance. Therefore somewhere on\n // the debugStack will be a stack frame inside the ownerInstance's source.\n ownerInstance.source = componentInfo.debugStack;\n }\n\n let unfilteredParent = parentInstance;\n while (\n unfilteredParent !== null &&\n unfilteredParent.kind === FILTERED_FIBER_INSTANCE\n ) {\n unfilteredParent = unfilteredParent.parent;\n }\n\n const ownerID = ownerInstance === null ? 0 : ownerInstance.id;\n const parentID = unfilteredParent === null ? 0 : unfilteredParent.id;\n\n const displayNameStringID = getStringID(displayName);\n\n // This check is a guard to handle a React element that has been modified\n // in such a way as to bypass the default stringification of the \"key\" property.\n const keyString = key === null ? null : String(key);\n const keyStringID = getStringID(keyString);\n const namePropStringID = getStringID(null);\n\n const id = instance.id;\n\n pushOperation(TREE_OPERATION_ADD);\n pushOperation(id);\n pushOperation(elementType);\n pushOperation(parentID);\n pushOperation(ownerID);\n pushOperation(displayNameStringID);\n pushOperation(keyStringID);\n pushOperation(namePropStringID);\n\n const componentLogsEntry =\n componentInfoToComponentLogsMap.get(componentInfo);\n recordConsoleLogs(instance, componentLogsEntry);\n }\n\n function recordSuspenseMount(\n suspenseInstance: SuspenseNode,\n parentSuspenseInstance: SuspenseNode | null,\n ): void {\n const fiberInstance = suspenseInstance.instance;\n if (fiberInstance.kind === FILTERED_FIBER_INSTANCE) {\n throw new Error('Cannot record a mount for a filtered Fiber instance.');\n }\n const fiberID = fiberInstance.id;\n\n let unfilteredParent = parentSuspenseInstance;\n while (\n unfilteredParent !== null &&\n unfilteredParent.instance.kind === FILTERED_FIBER_INSTANCE\n ) {\n unfilteredParent = unfilteredParent.parent;\n }\n const unfilteredParentInstance =\n unfilteredParent !== null ? unfilteredParent.instance : null;\n if (\n unfilteredParentInstance !== null &&\n unfilteredParentInstance.kind === FILTERED_FIBER_INSTANCE\n ) {\n throw new Error(\n 'Should not have a filtered instance at this point. This is a bug.',\n );\n }\n const parentID =\n unfilteredParentInstance === null ? 0 : unfilteredParentInstance.id;\n\n const fiber = fiberInstance.data;\n const props = fiber.memoizedProps;\n // The frontend will guess a name based on heuristics (e.g. owner) if no explicit name is given.\n const name =\n fiber.tag !== SuspenseComponent || props === null\n ? null\n : props.name || null;\n const nameStringID = getStringID(name);\n\n const isSuspended =\n fiber.tag === SuspenseComponent && fiber.memoizedState !== null;\n\n if (__DEBUG__) {\n console.log('recordSuspenseMount()', suspenseInstance);\n }\n\n idToSuspenseNodeMap.set(fiberID, suspenseInstance);\n\n pushOperation(SUSPENSE_TREE_OPERATION_ADD);\n pushOperation(fiberID);\n pushOperation(parentID);\n pushOperation(nameStringID);\n pushOperation(isSuspended ? 1 : 0);\n\n const rects = suspenseInstance.rects;\n if (rects === null) {\n pushOperation(-1);\n } else {\n pushOperation(rects.length);\n for (let i = 0; i < rects.length; ++i) {\n const rect = rects[i];\n pushOperation(Math.round(rect.x * 1000));\n pushOperation(Math.round(rect.y * 1000));\n pushOperation(Math.round(rect.width * 1000));\n pushOperation(Math.round(rect.height * 1000));\n }\n }\n }\n\n function recordUnmount(fiberInstance: FiberInstance): void {\n if (__DEBUG__) {\n debug('recordUnmount()', fiberInstance, reconcilingParent);\n }\n\n recordDisconnect(fiberInstance);\n\n const suspenseNode = fiberInstance.suspenseNode;\n if (suspenseNode !== null) {\n recordSuspenseUnmount(suspenseNode);\n }\n\n idToDevToolsInstanceMap.delete(fiberInstance.id);\n\n untrackFiber(fiberInstance, fiberInstance.data);\n }\n\n function recordDisconnect(fiberInstance: FiberInstance): void {\n if (isInDisconnectedSubtree) {\n // Already disconnected.\n return;\n }\n const fiber = fiberInstance.data;\n\n if (trackedPathMatchInstance === fiberInstance) {\n // We're in the process of trying to restore previous selection.\n // If this fiber matched but is being hidden, there's no use trying.\n // Reset the state so we don't keep holding onto it.\n setTrackedPath(null);\n }\n\n const id = fiberInstance.id;\n const isRoot = fiber.tag === HostRoot;\n if (isRoot) {\n // Roots must be removed only after all children have been removed.\n // So we track it separately.\n pendingUnmountedRootID = id;\n } else {\n // To maintain child-first ordering,\n // we'll push it into one of these queues,\n // and later arrange them in the correct order.\n pendingRealUnmountedIDs.push(id);\n }\n }\n\n function recordSuspenseResize(suspenseNode: SuspenseNode): void {\n if (__DEBUG__) {\n console.log('recordSuspenseResize()', suspenseNode);\n }\n const fiberInstance = suspenseNode.instance;\n if (fiberInstance.kind !== FIBER_INSTANCE) {\n // TODO: Resizes of filtered Suspense nodes are currently dropped.\n return;\n }\n\n pushOperation(SUSPENSE_TREE_OPERATION_RESIZE);\n pushOperation(fiberInstance.id);\n const rects = suspenseNode.rects;\n if (rects === null) {\n pushOperation(-1);\n } else {\n pushOperation(rects.length);\n for (let i = 0; i < rects.length; ++i) {\n const rect = rects[i];\n pushOperation(Math.round(rect.x * 1000));\n pushOperation(Math.round(rect.y * 1000));\n pushOperation(Math.round(rect.width * 1000));\n pushOperation(Math.round(rect.height * 1000));\n }\n }\n }\n\n function recordSuspenseSuspenders(suspenseNode: SuspenseNode): void {\n if (__DEBUG__) {\n console.log('recordSuspenseSuspenders()', suspenseNode);\n }\n const fiberInstance = suspenseNode.instance;\n if (fiberInstance.kind !== FIBER_INSTANCE) {\n // TODO: Suspender updates of filtered Suspense nodes are currently dropped.\n return;\n }\n\n // TODO: Just enqueue the operations here instead of stashing by id.\n\n // Ensure each environment gets recorded in the string table since it is emitted\n // before we loop it over again later during flush.\n suspenseNode.environments.forEach((count, env) => {\n getStringID(env);\n });\n pendingSuspenderChanges.add(fiberInstance.id);\n }\n\n function recordSuspenseUnmount(suspenseInstance: SuspenseNode): void {\n if (__DEBUG__) {\n console.log(\n 'recordSuspenseUnmount()',\n suspenseInstance,\n reconcilingParentSuspenseNode,\n );\n }\n\n const devtoolsInstance = suspenseInstance.instance;\n if (devtoolsInstance.kind !== FIBER_INSTANCE) {\n throw new Error(\"Can't unmount a filtered SuspenseNode. This is a bug.\");\n }\n const fiberInstance = devtoolsInstance;\n const id = fiberInstance.id;\n\n // To maintain child-first ordering,\n // we'll push it into one of these queues,\n // and later arrange them in the correct order.\n pendingRealUnmountedSuspenseIDs.push(id);\n\n pendingSuspenderChanges.delete(id);\n idToSuspenseNodeMap.delete(id);\n }\n\n // Running state of the remaining children from the previous version of this parent that\n // we haven't yet added back. This should be reset anytime we change parent.\n // Any remaining ones at the end will be deleted.\n let remainingReconcilingChildren: null | DevToolsInstance = null;\n // The previously placed child.\n let previouslyReconciledSibling: null | DevToolsInstance = null;\n // To save on stack allocation and ensure that they are updated as a pair, we also store\n // the current parent here as well.\n let reconcilingParent: null | DevToolsInstance = null;\n\n let remainingReconcilingChildrenSuspenseNodes: null | SuspenseNode = null;\n // The previously placed child.\n let previouslyReconciledSiblingSuspenseNode: null | SuspenseNode = null;\n // To save on stack allocation and ensure that they are updated as a pair, we also store\n // the current parent here as well.\n let reconcilingParentSuspenseNode: null | SuspenseNode = null;\n\n function ioExistsInSuspenseAncestor(\n suspenseNode: SuspenseNode,\n ioInfo: ReactIOInfo,\n ): boolean {\n let ancestor = suspenseNode.parent;\n while (ancestor !== null) {\n if (ancestor.suspendedBy.has(ioInfo)) {\n return true;\n }\n ancestor = ancestor.parent;\n }\n return false;\n }\n\n function insertSuspendedBy(asyncInfo: ReactAsyncInfo): void {\n if (reconcilingParent === null || reconcilingParentSuspenseNode === null) {\n throw new Error(\n 'It should not be possible to have suspended data outside the root. ' +\n 'Even suspending at the first position is still a child of the root.',\n );\n }\n const parentSuspenseNode = reconcilingParentSuspenseNode;\n // Use the nearest unfiltered parent so that there's always some component that has\n // the entry on it even if you filter, or the root if all are filtered.\n let parentInstance = reconcilingParent;\n while (\n parentInstance.kind === FILTERED_FIBER_INSTANCE &&\n parentInstance.parent !== null &&\n // We can't move past the parent Suspense node.\n // The Suspense node holding async info must be a parent of the devtools instance (or the instance itself)\n parentInstance !== parentSuspenseNode.instance\n ) {\n parentInstance = parentInstance.parent;\n }\n\n const suspenseNodeSuspendedBy = parentSuspenseNode.suspendedBy;\n const ioInfo = asyncInfo.awaited;\n let suspendedBySet = suspenseNodeSuspendedBy.get(ioInfo);\n if (suspendedBySet === undefined) {\n suspendedBySet = new Set();\n suspenseNodeSuspendedBy.set(ioInfo, suspendedBySet);\n // We've added a dependency. We must increment the ref count of the environment.\n const env = ioInfo.env;\n if (env != null) {\n const environmentCounts = parentSuspenseNode.environments;\n const count = environmentCounts.get(env);\n if (count === undefined || count === 0) {\n environmentCounts.set(env, 1);\n // We've discovered a new environment for this SuspenseNode. We'll to update the node.\n recordSuspenseSuspenders(parentSuspenseNode);\n } else {\n environmentCounts.set(env, count + 1);\n }\n }\n }\n // The child of the Suspense boundary that was suspended on this, or null if suspended at the root.\n // This is used to keep track of how many dependents are still alive and also to get information\n // like owner instances to link down into the tree.\n if (!suspendedBySet.has(parentInstance)) {\n suspendedBySet.add(parentInstance);\n if (\n !parentSuspenseNode.hasUniqueSuspenders &&\n !ioExistsInSuspenseAncestor(parentSuspenseNode, ioInfo)\n ) {\n // This didn't exist in the parent before, so let's mark this boundary as having a unique suspender.\n parentSuspenseNode.hasUniqueSuspenders = true;\n recordSuspenseSuspenders(parentSuspenseNode);\n }\n }\n // We have observed at least one known reason this might have been suspended.\n parentSuspenseNode.hasUnknownSuspenders = false;\n // Suspending right below the root is not attributed to any particular component in UI\n // other than the SuspenseNode and the HostRoot's FiberInstance.\n const suspendedBy = parentInstance.suspendedBy;\n if (suspendedBy === null) {\n parentInstance.suspendedBy = [asyncInfo];\n } else if (suspendedBy.indexOf(asyncInfo) === -1) {\n suspendedBy.push(asyncInfo);\n }\n }\n\n function getAwaitInSuspendedByFromIO(\n suspensedBy: Array<ReactAsyncInfo>,\n ioInfo: ReactIOInfo,\n ): null | ReactAsyncInfo {\n for (let i = 0; i < suspensedBy.length; i++) {\n const asyncInfo = suspensedBy[i];\n if (asyncInfo.awaited === ioInfo) {\n return asyncInfo;\n }\n }\n return null;\n }\n\n function unblockSuspendedBy(\n parentSuspenseNode: SuspenseNode,\n ioInfo: ReactIOInfo,\n ): void {\n const firstChild = parentSuspenseNode.firstChild;\n if (firstChild === null) {\n return;\n }\n let node: SuspenseNode = firstChild;\n while (node !== null) {\n if (node.suspendedBy.has(ioInfo)) {\n // We have found a child boundary that depended on the unblocked I/O.\n // It can now be marked as having unique suspenders. We can skip its children\n // since they'll still be blocked by this one.\n if (!node.hasUniqueSuspenders) {\n recordSuspenseSuspenders(node);\n }\n node.hasUniqueSuspenders = true;\n node.hasUnknownSuspenders = false;\n } else if (node.firstChild !== null) {\n node = node.firstChild;\n continue;\n }\n while (node.nextSibling === null) {\n if (node.parent === null || node.parent === parentSuspenseNode) {\n return;\n }\n node = node.parent;\n }\n node = node.nextSibling;\n }\n }\n\n function removePreviousSuspendedBy(\n instance: DevToolsInstance,\n previousSuspendedBy: null | Array<ReactAsyncInfo>,\n parentSuspenseNode: null | SuspenseNode,\n ): void {\n // Remove any async info if they were in the previous set but\n // is no longer in the new set.\n // If we just reconciled a SuspenseNode, we need to remove from that node instead of the parent.\n // This is different from inserting because inserting is done during reconiliation\n // whereas removal is done after we're done reconciling.\n const suspenseNode =\n instance.suspenseNode === null\n ? parentSuspenseNode\n : instance.suspenseNode;\n if (previousSuspendedBy !== null && suspenseNode !== null) {\n const nextSuspendedBy = instance.suspendedBy;\n let changedEnvironment = false;\n for (let i = 0; i < previousSuspendedBy.length; i++) {\n const asyncInfo = previousSuspendedBy[i];\n if (\n nextSuspendedBy === null ||\n (nextSuspendedBy.indexOf(asyncInfo) === -1 &&\n getAwaitInSuspendedByFromIO(nextSuspendedBy, asyncInfo.awaited) ===\n null)\n ) {\n // This IO entry is no longer blocking the current tree.\n // Let's remove it from the parent SuspenseNode.\n const ioInfo = asyncInfo.awaited;\n const suspendedBySet = suspenseNode.suspendedBy.get(ioInfo);\n\n if (\n suspendedBySet === undefined ||\n !suspendedBySet.delete(instance)\n ) {\n // A boundary can await the same IO multiple times.\n // We still want to error if we're trying to remove IO that isn't present on\n // this boundary so we need to check if we've already removed it.\n // We're assuming previousSuspendedBy is a small array so this should be faster\n // than allocating and maintaining a Set.\n let alreadyRemovedIO = false;\n for (let j = 0; j < i; j++) {\n const removedIOInfo = previousSuspendedBy[j].awaited;\n if (removedIOInfo === ioInfo) {\n alreadyRemovedIO = true;\n break;\n }\n }\n if (!alreadyRemovedIO) {\n throw new Error(\n 'We are cleaning up async info that was not on the parent Suspense boundary. ' +\n 'This is a bug in React.',\n );\n }\n }\n if (suspendedBySet !== undefined && suspendedBySet.size === 0) {\n suspenseNode.suspendedBy.delete(ioInfo);\n // Successfully removed all dependencies. We can decrement the ref count of the environment.\n const env = ioInfo.env;\n if (env != null) {\n const environmentCounts = suspenseNode.environments;\n const count = environmentCounts.get(env);\n if (count === undefined || count === 0) {\n throw new Error(\n 'We are removing an environment but it was not in the set. ' +\n 'This is a bug in React.',\n );\n }\n if (count === 1) {\n environmentCounts.delete(env);\n // Last one. We've now change the set of environments. We'll need to update the node.\n changedEnvironment = true;\n } else {\n environmentCounts.set(env, count - 1);\n }\n }\n }\n if (\n suspenseNode.hasUniqueSuspenders &&\n !ioExistsInSuspenseAncestor(suspenseNode, ioInfo)\n ) {\n // This entry wasn't in any ancestor and is no longer in this suspense boundary.\n // This means that a child might now be the unique suspender for this IO.\n // Search the child boundaries to see if we can reveal any of them.\n unblockSuspendedBy(suspenseNode, ioInfo);\n }\n }\n }\n if (changedEnvironment) {\n recordSuspenseSuspenders(suspenseNode);\n }\n }\n }\n\n function insertChild(instance: DevToolsInstance): void {\n const parentInstance = reconcilingParent;\n if (parentInstance === null) {\n // This instance is at the root.\n return;\n }\n // Place it in the parent.\n instance.parent = parentInstance;\n if (previouslyReconciledSibling === null) {\n previouslyReconciledSibling = instance;\n parentInstance.firstChild = instance;\n } else {\n previouslyReconciledSibling.nextSibling = instance;\n previouslyReconciledSibling = instance;\n }\n instance.nextSibling = null;\n // Insert any SuspenseNode into its parent Node.\n const suspenseNode = instance.suspenseNode;\n if (suspenseNode !== null) {\n const parentNode = reconcilingParentSuspenseNode;\n if (parentNode !== null) {\n suspenseNode.parent = parentNode;\n if (previouslyReconciledSiblingSuspenseNode === null) {\n previouslyReconciledSiblingSuspenseNode = suspenseNode;\n parentNode.firstChild = suspenseNode;\n } else {\n previouslyReconciledSiblingSuspenseNode.nextSibling = suspenseNode;\n previouslyReconciledSiblingSuspenseNode = suspenseNode;\n }\n suspenseNode.nextSibling = null;\n }\n }\n }\n\n function moveChild(\n instance: DevToolsInstance,\n previousSibling: null | DevToolsInstance,\n ): void {\n removeChild(instance, previousSibling);\n insertChild(instance);\n }\n\n function removeChild(\n instance: DevToolsInstance,\n previousSibling: null | DevToolsInstance,\n ): void {\n if (instance.parent === null) {\n if (remainingReconcilingChildren === instance) {\n throw new Error(\n 'Remaining children should not have items with no parent',\n );\n } else if (instance.nextSibling !== null) {\n throw new Error('A deleted instance should not have next siblings');\n }\n // Already deleted.\n return;\n }\n const parentInstance = reconcilingParent;\n if (parentInstance === null) {\n throw new Error('Should not have a parent if we are at the root');\n }\n if (instance.parent !== parentInstance) {\n throw new Error(\n 'Cannot remove a node from a different parent than is being reconciled.',\n );\n }\n // Remove an existing child from its current position, which we assume is in the\n // remainingReconcilingChildren set.\n if (previousSibling === null) {\n // We're first in the remaining set. Remove us.\n if (remainingReconcilingChildren !== instance) {\n throw new Error(\n 'Expected a placed child to be moved from the remaining set.',\n );\n }\n remainingReconcilingChildren = instance.nextSibling;\n } else {\n previousSibling.nextSibling = instance.nextSibling;\n }\n instance.nextSibling = null;\n instance.parent = null;\n\n // Remove any SuspenseNode from its parent.\n const suspenseNode = instance.suspenseNode;\n if (suspenseNode !== null && suspenseNode.parent !== null) {\n const parentNode = reconcilingParentSuspenseNode;\n if (parentNode === null) {\n throw new Error('Should not have a parent if we are at the root');\n }\n if (suspenseNode.parent !== parentNode) {\n throw new Error(\n 'Cannot remove a Suspense node from a different parent than is being reconciled.',\n );\n }\n let previousSuspenseSibling = remainingReconcilingChildrenSuspenseNodes;\n if (previousSuspenseSibling === suspenseNode) {\n // We're first in the remaining set. Remove us.\n remainingReconcilingChildrenSuspenseNodes = suspenseNode.nextSibling;\n } else {\n // Search for our previous sibling and remove us.\n while (previousSuspenseSibling !== null) {\n if (previousSuspenseSibling.nextSibling === suspenseNode) {\n previousSuspenseSibling.nextSibling = suspenseNode.nextSibling;\n break;\n }\n previousSuspenseSibling = previousSuspenseSibling.nextSibling;\n }\n }\n suspenseNode.nextSibling = null;\n suspenseNode.parent = null;\n }\n }\n\n function isHiddenOffscreen(fiber: Fiber): boolean {\n switch (fiber.tag) {\n case LegacyHiddenComponent:\n // fallthrough since all published implementations currently implement the same state as Offscreen.\n case OffscreenComponent:\n return fiber.memoizedState !== null;\n default:\n return false;\n }\n }\n\n /**\n * Offscreen of suspended Suspense\n */\n function isSuspendedOffscreen(fiber: Fiber): boolean {\n switch (fiber.tag) {\n case LegacyHiddenComponent:\n // fallthrough since all published implementations currently implement the same state as Offscreen.\n case OffscreenComponent:\n return (\n fiber.memoizedState !== null &&\n fiber.return !== null &&\n fiber.return.tag === SuspenseComponent\n );\n default:\n return false;\n }\n }\n\n function unmountRemainingChildren() {\n if (\n reconcilingParent !== null &&\n (reconcilingParent.kind === FIBER_INSTANCE ||\n reconcilingParent.kind === FILTERED_FIBER_INSTANCE) &&\n isSuspendedOffscreen(reconcilingParent.data) &&\n !isInDisconnectedSubtree\n ) {\n // This is a hidden offscreen, we need to execute this in the context of a disconnected subtree.\n isInDisconnectedSubtree = true;\n try {\n let child = remainingReconcilingChildren;\n while (child !== null) {\n unmountInstanceRecursively(child);\n child = remainingReconcilingChildren;\n }\n } finally {\n isInDisconnectedSubtree = false;\n }\n } else {\n let child = remainingReconcilingChildren;\n while (child !== null) {\n unmountInstanceRecursively(child);\n child = remainingReconcilingChildren;\n }\n }\n }\n\n function unmountSuspenseChildrenRecursively(\n contentInstance: DevToolsInstance,\n stashedSuspenseParent: null | SuspenseNode,\n stashedSuspensePrevious: null | SuspenseNode,\n stashedSuspenseRemaining: null | SuspenseNode,\n ): void {\n // First unmount only the Offscreen boundary. I.e. the main content.\n unmountInstanceRecursively(contentInstance);\n\n // Next, we'll pop back out of the SuspenseNode that we added above and now we'll\n // unmount the fallback, unmounting anything in the context of the parent SuspenseNode.\n // Since the fallback conceptually blocks the parent.\n reconcilingParentSuspenseNode = stashedSuspenseParent;\n previouslyReconciledSiblingSuspenseNode = stashedSuspensePrevious;\n remainingReconcilingChildrenSuspenseNodes = stashedSuspenseRemaining;\n unmountRemainingChildren();\n }\n\n function isChildOf(\n parentInstance: DevToolsInstance,\n childInstance: DevToolsInstance,\n grandParent: DevToolsInstance,\n ): boolean {\n let instance = childInstance.parent;\n while (instance !== null) {\n if (parentInstance === instance) {\n return true;\n }\n if (instance === parentInstance.parent || instance === grandParent) {\n // This was a sibling but not inside the FiberInstance. We can bail out.\n break;\n }\n instance = instance.parent;\n }\n return false;\n }\n\n function areEqualRects(\n a: null | Array<Rect>,\n b: null | Array<Rect>,\n ): boolean {\n if (a === null) {\n return b === null;\n }\n if (b === null) {\n return false;\n }\n if (a.length !== b.length) {\n return false;\n }\n for (let i = 0; i < a.length; i++) {\n const aRect = a[i];\n const bRect = b[i];\n if (\n aRect.x !== bRect.x ||\n aRect.y !== bRect.y ||\n aRect.width !== bRect.width ||\n aRect.height !== bRect.height\n ) {\n return false;\n }\n }\n return true;\n }\n\n function measureUnchangedSuspenseNodesRecursively(\n suspenseNode: SuspenseNode,\n ): void {\n if (isInDisconnectedSubtree) {\n // We don't update rects inside disconnected subtrees.\n return;\n }\n const instance = suspenseNode.instance;\n\n const isSuspendedSuspenseComponent =\n (instance.kind === FIBER_INSTANCE ||\n instance.kind === FILTERED_FIBER_INSTANCE) &&\n instance.data.tag === SuspenseComponent &&\n instance.data.memoizedState !== null;\n if (isSuspendedSuspenseComponent) {\n // This boundary itself was suspended and we don't measure those since that would measure\n // the fallback. We want to keep a ghost of the rectangle of the content not currently shown.\n return;\n }\n\n // While this boundary wasn't suspended and the bailed out root and wasn't in a disconnected subtree,\n // it's possible that this node was in one. So we need to check if we're offscreen.\n let parent = instance.parent;\n while (parent !== null) {\n if (\n (parent.kind === FIBER_INSTANCE ||\n parent.kind === FILTERED_FIBER_INSTANCE) &&\n isHiddenOffscreen(parent.data)\n ) {\n // We're inside a hidden offscreen Fiber. We're in a disconnected tree.\n return;\n }\n if (parent.suspenseNode !== null) {\n // Found our parent SuspenseNode. We can bail out now.\n break;\n }\n parent = parent.parent;\n }\n\n const nextRects = measureInstance(suspenseNode.instance);\n const prevRects = suspenseNode.rects;\n if (areEqualRects(prevRects, nextRects)) {\n return; // Unchanged\n }\n\n // We changed inside a visible tree.\n // Since this boundary changed, it's possible it also affected its children so lets\n // measure them as well.\n for (\n let child = suspenseNode.firstChild;\n child !== null;\n child = child.nextSibling\n ) {\n measureUnchangedSuspenseNodesRecursively(child);\n }\n suspenseNode.rects = nextRects;\n recordSuspenseResize(suspenseNode);\n }\n\n function consumeSuspenseNodesOfExistingInstance(\n instance: DevToolsInstance,\n ): void {\n // We need to also consume any unchanged Suspense boundaries.\n let suspenseNode = remainingReconcilingChildrenSuspenseNodes;\n if (suspenseNode === null) {\n return;\n }\n const parentSuspenseNode = reconcilingParentSuspenseNode;\n if (parentSuspenseNode === null) {\n throw new Error(\n 'The should not be any remaining suspense node children if there is no parent.',\n );\n }\n let foundOne = false;\n let previousSkippedSibling = null;\n while (suspenseNode !== null) {\n // Check if this SuspenseNode was a child of the bailed out FiberInstance.\n if (\n isChildOf(instance, suspenseNode.instance, parentSuspenseNode.instance)\n ) {\n foundOne = true;\n // The suspenseNode was child of the bailed out Fiber.\n // First, remove it from the remaining children set.\n const nextRemainingSibling = suspenseNode.nextSibling;\n if (previousSkippedSibling === null) {\n remainingReconcilingChildrenSuspenseNodes = nextRemainingSibling;\n } else {\n previousSkippedSibling.nextSibling = nextRemainingSibling;\n }\n suspenseNode.nextSibling = null;\n // Then, re-insert it into the newly reconciled set.\n if (previouslyReconciledSiblingSuspenseNode === null) {\n parentSuspenseNode.firstChild = suspenseNode;\n } else {\n previouslyReconciledSiblingSuspenseNode.nextSibling = suspenseNode;\n }\n previouslyReconciledSiblingSuspenseNode = suspenseNode;\n // While React didn't rerender this node, it's possible that it was affected by\n // layout due to mutation of a parent or sibling. Check if it changed size.\n measureUnchangedSuspenseNodesRecursively(suspenseNode);\n // Continue\n suspenseNode = nextRemainingSibling;\n } else if (foundOne) {\n // If we found one and then hit a miss, we assume that we're passed the sequence because\n // they should've all been consecutive.\n break;\n } else {\n previousSkippedSibling = suspenseNode;\n suspenseNode = suspenseNode.nextSibling;\n }\n }\n }\n\n function mountVirtualInstanceRecursively(\n virtualInstance: VirtualInstance,\n firstChild: Fiber,\n lastChild: null | Fiber, // non-inclusive\n traceNearestHostComponentUpdate: boolean,\n virtualLevel: number, // the nth level of virtual instances\n ): void {\n // If we have the tree selection from previous reload, try to match this Instance.\n // Also remember whether to do the same for siblings.\n const mightSiblingsBeOnTrackedPath =\n updateVirtualTrackedPathStateBeforeMount(\n virtualInstance,\n reconcilingParent,\n );\n\n const stashedParent = reconcilingParent;\n const stashedPrevious = previouslyReconciledSibling;\n const stashedRemaining = remainingReconcilingChildren;\n // Push a new DevTools instance parent while reconciling this subtree.\n reconcilingParent = virtualInstance;\n previouslyReconciledSibling = null;\n remainingReconcilingChildren = null;\n try {\n mountVirtualChildrenRecursively(\n firstChild,\n lastChild,\n traceNearestHostComponentUpdate,\n virtualLevel + 1,\n );\n // Must be called after all children have been appended.\n recordVirtualProfilingDurations(virtualInstance);\n } finally {\n reconcilingParent = stashedParent;\n previouslyReconciledSibling = stashedPrevious;\n remainingReconcilingChildren = stashedRemaining;\n updateTrackedPathStateAfterMount(mightSiblingsBeOnTrackedPath);\n }\n }\n\n function recordVirtualUnmount(instance: VirtualInstance) {\n recordVirtualDisconnect(instance);\n idToDevToolsInstanceMap.delete(instance.id);\n }\n\n function recordVirtualDisconnect(instance: VirtualInstance) {\n if (isInDisconnectedSubtree) {\n return;\n }\n if (trackedPathMatchInstance === instance) {\n // We're in the process of trying to restore previous selection.\n // If this fiber matched but is being unmounted, there's no use trying.\n // Reset the state so we don't keep holding onto it.\n setTrackedPath(null);\n }\n\n const id = instance.id;\n pendingRealUnmountedIDs.push(id);\n }\n\n function getSecondaryEnvironmentName(\n debugInfo: ?ReactDebugInfo,\n index: number,\n ): null | string {\n if (debugInfo != null) {\n const componentInfo: ReactComponentInfo = (debugInfo[index]: any);\n for (let i = index + 1; i < debugInfo.length; i++) {\n const debugEntry = debugInfo[i];\n if (typeof debugEntry.env === 'string') {\n // If the next environment is different then this component was the boundary\n // and it changed before entering the next component. So we assign this\n // component a secondary environment.\n return componentInfo.env !== debugEntry.env ? debugEntry.env : null;\n }\n }\n }\n return null;\n }\n\n function trackDebugInfoFromLazyType(fiber: Fiber): void {\n // The debugInfo from a Lazy isn't propagated onto _debugInfo of the parent Fiber the way\n // it is when used in child position. So we need to pick it up explicitly.\n const type = fiber.elementType;\n const typeSymbol = getTypeSymbol(type); // The elementType might be have been a LazyComponent.\n if (typeSymbol === LAZY_SYMBOL_STRING) {\n const debugInfo: ?ReactDebugInfo = type._debugInfo;\n if (debugInfo) {\n for (let i = 0; i < debugInfo.length; i++) {\n const debugEntry = debugInfo[i];\n if (debugEntry.awaited) {\n const asyncInfo: ReactAsyncInfo = (debugEntry: any);\n insertSuspendedBy(asyncInfo);\n }\n }\n }\n }\n }\n\n function trackDebugInfoFromUsedThenables(fiber: Fiber): void {\n // If a Fiber called use() in DEV mode then we may have collected _debugThenableState on\n // the dependencies. If so, then this will contain the thenables passed to use().\n // These won't have their debug info picked up by fiber._debugInfo since that just\n // contains things suspending the children. We have to collect use() separately.\n const dependencies = fiber.dependencies;\n if (dependencies == null) {\n return;\n }\n const thenableState = dependencies._debugThenableState;\n if (thenableState == null) {\n return;\n }\n // In DEV the thenableState is an inner object.\n const usedThenables: any = thenableState.thenables || thenableState;\n if (!Array.isArray(usedThenables)) {\n return;\n }\n for (let i = 0; i < usedThenables.length; i++) {\n const thenable: Thenable<mixed> = usedThenables[i];\n const debugInfo = thenable._debugInfo;\n if (debugInfo) {\n for (let j = 0; j < debugInfo.length; j++) {\n const debugEntry = debugInfo[j];\n if (debugEntry.awaited) {\n const asyncInfo: ReactAsyncInfo = (debugEntry: any);\n insertSuspendedBy(asyncInfo);\n }\n }\n }\n }\n }\n\n const hostAsyncInfoCache: WeakMap<{...}, ReactAsyncInfo> = new WeakMap();\n\n function trackDebugInfoFromHostResource(\n devtoolsInstance: DevToolsInstance,\n fiber: Fiber,\n ): void {\n const resource: ?{\n type: 'stylesheet' | 'style' | 'script' | 'void',\n instance?: null | HostInstance,\n ...\n } = fiber.memoizedState;\n if (resource == null) {\n return;\n }\n\n // Use a cached entry based on the resource. This ensures that if we use the same\n // resource in multiple places, it gets deduped and inner boundaries don't consider it\n // as contributing to those boundaries.\n const existingEntry = hostAsyncInfoCache.get(resource);\n if (existingEntry !== undefined) {\n insertSuspendedBy(existingEntry);\n return;\n }\n\n const props: {\n href?: string,\n media?: string,\n ...\n } = fiber.memoizedProps;\n\n // Stylesheet resources may suspend. We need to track that.\n const mayResourceSuspendCommit =\n resource.type === 'stylesheet' &&\n // If it doesn't match the currently debugged media, then it doesn't count.\n (typeof props.media !== 'string' ||\n typeof matchMedia !== 'function' ||\n matchMedia(props.media));\n if (!mayResourceSuspendCommit) {\n return;\n }\n\n const instance = resource.instance;\n if (instance == null) {\n return;\n }\n\n // Unlike props.href, this href will be fully qualified which we need for comparison below.\n const href = instance.href;\n if (typeof href !== 'string') {\n return;\n }\n let start = -1;\n let end = -1;\n let byteSize = 0;\n // $FlowFixMe[method-unbinding]\n if (typeof performance.getEntriesByType === 'function') {\n // We may be able to collect the start and end time of this resource from Performance Observer.\n const resourceEntries = performance.getEntriesByType('resource');\n for (let i = 0; i < resourceEntries.length; i++) {\n const resourceEntry = resourceEntries[i];\n if (resourceEntry.name === href) {\n start = resourceEntry.startTime;\n end = start + resourceEntry.duration;\n // $FlowFixMe[prop-missing]\n byteSize = (resourceEntry.transferSize: any) || 0;\n }\n }\n }\n const value = instance.sheet;\n const promise = Promise.resolve(value);\n (promise: any).status = 'fulfilled';\n (promise: any).value = value;\n const ioInfo: ReactIOInfo = {\n name: 'stylesheet',\n start,\n end,\n value: promise,\n // $FlowFixMe: This field doesn't usually take a Fiber but we're only using inside this file.\n owner: fiber, // Allow linking to the <link> if it's not filtered.\n };\n if (byteSize > 0) {\n // $FlowFixMe[cannot-write]\n ioInfo.byteSize = byteSize;\n }\n const asyncInfo: ReactAsyncInfo = {\n awaited: ioInfo,\n // $FlowFixMe: This field doesn't usually take a Fiber but we're only using inside this file.\n owner: fiber._debugOwner == null ? null : fiber._debugOwner,\n debugStack: fiber._debugStack == null ? null : fiber._debugStack,\n debugTask: fiber._debugTask == null ? null : fiber._debugTask,\n };\n hostAsyncInfoCache.set(resource, asyncInfo);\n insertSuspendedBy(asyncInfo);\n }\n\n function trackDebugInfoFromHostComponent(\n devtoolsInstance: DevToolsInstance,\n fiber: Fiber,\n ): void {\n if (fiber.tag !== HostComponent) {\n return;\n }\n if ((fiber.mode & SuspenseyImagesMode) === 0) {\n // In any released version, Suspensey Images are only enabled inside a ViewTransition\n // subtree, which is enabled by the SuspenseyImagesMode.\n // TODO: If we ever enable the enableSuspenseyImages flag then it would be enabled for\n // all images and we'd need some other check for if the version of React has that enabled.\n return;\n }\n\n const type = fiber.type;\n const props: {\n src?: string,\n onLoad?: (event: any) => void,\n loading?: 'eager' | 'lazy',\n ...\n } = fiber.memoizedProps;\n\n const maySuspendCommit =\n type === 'img' &&\n props.src != null &&\n props.src !== '' &&\n props.onLoad == null &&\n props.loading !== 'lazy';\n\n // Note: We don't track \"maySuspendCommitOnUpdate\" separately because it doesn't matter if\n // it didn't suspend this particular update if it would've suspended if it mounted in this\n // state, since we're tracking the dependencies inside the current state.\n\n if (!maySuspendCommit) {\n return;\n }\n\n const instance = fiber.stateNode;\n if (instance == null) {\n // Should never happen.\n return;\n }\n\n // Unlike props.src, currentSrc will be fully qualified which we need for comparison below.\n // Unlike instance.src it will be resolved into the media queries currently matching which is\n // the state we're inspecting.\n const src = instance.currentSrc;\n if (typeof src !== 'string' || src === '') {\n return;\n }\n let start = -1;\n let end = -1;\n let byteSize = 0;\n let fileSize = 0;\n // $FlowFixMe[method-unbinding]\n if (typeof performance.getEntriesByType === 'function') {\n // We may be able to collect the start and end time of this resource from Performance Observer.\n const resourceEntries = performance.getEntriesByType('resource');\n for (let i = 0; i < resourceEntries.length; i++) {\n const resourceEntry = resourceEntries[i];\n if (resourceEntry.name === src) {\n start = resourceEntry.startTime;\n end = start + resourceEntry.duration;\n // $FlowFixMe[prop-missing]\n fileSize = (resourceEntry.decodedBodySize: any) || 0;\n // $FlowFixMe[prop-missing]\n byteSize = (resourceEntry.transferSize: any) || 0;\n }\n }\n }\n // A representation of the image data itself.\n // TODO: We could render a little preview in the front end from the resource API.\n const value: {\n currentSrc: string,\n naturalWidth?: number,\n naturalHeight?: number,\n fileSize?: number,\n } = {\n currentSrc: src,\n };\n if (instance.naturalWidth > 0 && instance.naturalHeight > 0) {\n // The intrinsic size of the file value itself, if it's loaded\n value.naturalWidth = instance.naturalWidth;\n value.naturalHeight = instance.naturalHeight;\n }\n if (fileSize > 0) {\n // Cross-origin images won't have a file size that we can access.\n value.fileSize = fileSize;\n }\n const promise = Promise.resolve(value);\n (promise: any).status = 'fulfilled';\n (promise: any).value = value;\n const ioInfo: ReactIOInfo = {\n name: 'img',\n start,\n end,\n value: promise,\n // $FlowFixMe: This field doesn't usually take a Fiber but we're only using inside this file.\n owner: fiber, // Allow linking to the <link> if it's not filtered.\n };\n if (byteSize > 0) {\n // $FlowFixMe[cannot-write]\n ioInfo.byteSize = byteSize;\n }\n const asyncInfo: ReactAsyncInfo = {\n awaited: ioInfo,\n // $FlowFixMe: This field doesn't usually take a Fiber but we're only using inside this file.\n owner: fiber._debugOwner == null ? null : fiber._debugOwner,\n debugStack: fiber._debugStack == null ? null : fiber._debugStack,\n debugTask: fiber._debugTask == null ? null : fiber._debugTask,\n };\n insertSuspendedBy(asyncInfo);\n }\n\n function trackThrownPromisesFromRetryCache(\n suspenseNode: SuspenseNode,\n retryCache: ?WeakSet<Wakeable>,\n ): void {\n if (retryCache != null) {\n // If a Suspense boundary ever committed in fallback state with a retryCache, that\n // suggests that something unique to that boundary was suspensey since otherwise\n // it wouldn't have thrown and so never created the retryCache.\n // Unfortunately if we don't have any DEV time debug info or debug thenables then\n // we have no meta data to show. However, we still mark this Suspense boundary as\n // participating in the loading sequence since apparently it can suspend.\n if (!suspenseNode.hasUniqueSuspenders) {\n recordSuspenseSuspenders(suspenseNode);\n }\n suspenseNode.hasUniqueSuspenders = true;\n // We have not seen any reason yet for why this suspense node might have been\n // suspended but it clearly has been at some point. If we later discover a reason\n // we'll clear this flag again.\n suspenseNode.hasUnknownSuspenders = true;\n }\n }\n\n function mountVirtualChildrenRecursively(\n firstChild: Fiber,\n lastChild: null | Fiber, // non-inclusive\n traceNearestHostComponentUpdate: boolean,\n virtualLevel: number, // the nth level of virtual instances\n ): void {\n // Iterate over siblings rather than recursing.\n // This reduces the chance of stack overflow for wide trees (e.g. lists with many items).\n let fiber: Fiber | null = firstChild;\n let previousVirtualInstance: null | VirtualInstance = null;\n let previousVirtualInstanceFirstFiber: Fiber = firstChild;\n while (fiber !== null && fiber !== lastChild) {\n let level = 0;\n if (fiber._debugInfo) {\n for (let i = 0; i < fiber._debugInfo.length; i++) {\n const debugEntry = fiber._debugInfo[i];\n if (debugEntry.awaited) {\n // Async Info\n const asyncInfo: ReactAsyncInfo = (debugEntry: any);\n if (level === virtualLevel) {\n // Track any async info between the previous virtual instance up until to this\n // instance and add it to the parent. This can add the same set multiple times\n // so we assume insertSuspendedBy dedupes.\n insertSuspendedBy(asyncInfo);\n }\n continue;\n }\n if (typeof debugEntry.name !== 'string') {\n // Not a Component. Some other Debug Info.\n continue;\n }\n // Scan up until the next Component to see if this component changed environment.\n const componentInfo: ReactComponentInfo = (debugEntry: any);\n const secondaryEnv = getSecondaryEnvironmentName(fiber._debugInfo, i);\n if (componentInfo.env != null) {\n knownEnvironmentNames.add(componentInfo.env);\n }\n if (secondaryEnv !== null) {\n knownEnvironmentNames.add(secondaryEnv);\n }\n if (shouldFilterVirtual(componentInfo, secondaryEnv)) {\n // Skip.\n continue;\n }\n if (level === virtualLevel) {\n if (\n previousVirtualInstance === null ||\n // Consecutive children with the same debug entry as a parent gets\n // treated as if they share the same virtual instance.\n previousVirtualInstance.data !== debugEntry\n ) {\n if (previousVirtualInstance !== null) {\n // Mount any previous children that should go into the previous parent.\n mountVirtualInstanceRecursively(\n previousVirtualInstance,\n previousVirtualInstanceFirstFiber,\n fiber,\n traceNearestHostComponentUpdate,\n virtualLevel,\n );\n }\n previousVirtualInstance = createVirtualInstance(componentInfo);\n recordVirtualMount(\n previousVirtualInstance,\n reconcilingParent,\n secondaryEnv,\n );\n insertChild(previousVirtualInstance);\n previousVirtualInstanceFirstFiber = fiber;\n }\n level++;\n break;\n } else {\n level++;\n }\n }\n }\n if (level === virtualLevel) {\n if (previousVirtualInstance !== null) {\n // If we were working on a virtual instance and this is not a virtual\n // instance, then we end the sequence and mount any previous children\n // that should go into the previous virtual instance.\n mountVirtualInstanceRecursively(\n previousVirtualInstance,\n previousVirtualInstanceFirstFiber,\n fiber,\n traceNearestHostComponentUpdate,\n virtualLevel,\n );\n previousVirtualInstance = null;\n }\n // We've reached the end of the virtual levels, but not beyond,\n // and now continue with the regular fiber.\n mountFiberRecursively(fiber, traceNearestHostComponentUpdate);\n }\n fiber = fiber.sibling;\n }\n if (previousVirtualInstance !== null) {\n // Mount any previous children that should go into the previous parent.\n mountVirtualInstanceRecursively(\n previousVirtualInstance,\n previousVirtualInstanceFirstFiber,\n null,\n traceNearestHostComponentUpdate,\n virtualLevel,\n );\n }\n }\n\n function mountChildrenRecursively(\n firstChild: Fiber,\n traceNearestHostComponentUpdate: boolean,\n ): void {\n mountVirtualChildrenRecursively(\n firstChild,\n null,\n traceNearestHostComponentUpdate,\n 0, // first level\n );\n }\n\n function mountSuspenseChildrenRecursively(\n contentFiber: Fiber,\n traceNearestHostComponentUpdate: boolean,\n stashedSuspenseParent: SuspenseNode | null,\n stashedSuspensePrevious: SuspenseNode | null,\n stashedSuspenseRemaining: SuspenseNode | null,\n ) {\n const fallbackFiber = contentFiber.sibling;\n\n // First update only the Offscreen boundary. I.e. the main content.\n mountVirtualChildrenRecursively(\n contentFiber,\n fallbackFiber,\n traceNearestHostComponentUpdate,\n 0, // first level\n );\n\n // Next, we'll pop back out of the SuspenseNode that we added above and now we'll\n // reconcile the fallback, reconciling anything by inserting into the parent SuspenseNode.\n // Since the fallback conceptually blocks the parent.\n reconcilingParentSuspenseNode = stashedSuspenseParent;\n previouslyReconciledSiblingSuspenseNode = stashedSuspensePrevious;\n remainingReconcilingChildrenSuspenseNodes = stashedSuspenseRemaining;\n if (fallbackFiber !== null) {\n mountVirtualChildrenRecursively(\n fallbackFiber,\n null,\n traceNearestHostComponentUpdate,\n 0, // first level\n );\n }\n }\n\n function mountFiberRecursively(\n fiber: Fiber,\n traceNearestHostComponentUpdate: boolean,\n ): void {\n const shouldIncludeInTree = !shouldFilterFiber(fiber);\n let newInstance = null;\n let newSuspenseNode = null;\n if (shouldIncludeInTree) {\n newInstance = recordMount(fiber, reconcilingParent);\n if (fiber.tag === SuspenseComponent || fiber.tag === HostRoot) {\n newSuspenseNode = createSuspenseNode(newInstance);\n // Measure this Suspense node. In general we shouldn't do this until we have\n // inserted the new children but since we know this is a FiberInstance we'll\n // just use the Fiber anyway.\n // Fallbacks get attributed to the parent so we only measure if we're\n // showing primary content.\n if (fiber.tag === SuspenseComponent) {\n if (OffscreenComponent === -1) {\n const isTimedOut = fiber.memoizedState !== null;\n if (!isTimedOut) {\n newSuspenseNode.rects = measureInstance(newInstance);\n }\n } else {\n const hydrated = isFiberHydrated(fiber);\n if (hydrated) {\n const contentFiber = fiber.child;\n if (contentFiber === null) {\n throw new Error(\n 'There should always be an Offscreen Fiber child in a hydrated Suspense boundary.',\n );\n }\n } else {\n // This Suspense Fiber is still dehydrated. It won't have any children\n // until hydration.\n }\n const isTimedOut = fiber.memoizedState !== null;\n if (!isTimedOut) {\n newSuspenseNode.rects = measureInstance(newInstance);\n }\n }\n } else {\n newSuspenseNode.rects = measureInstance(newInstance);\n }\n recordSuspenseMount(newSuspenseNode, reconcilingParentSuspenseNode);\n }\n insertChild(newInstance);\n if (__DEBUG__) {\n debug('mountFiberRecursively()', newInstance, reconcilingParent);\n }\n } else if (\n (reconcilingParent !== null &&\n reconcilingParent.kind === VIRTUAL_INSTANCE) ||\n fiber.tag === SuspenseComponent ||\n // Use to keep resuspended instances alive inside a SuspenseComponent.\n fiber.tag === OffscreenComponent ||\n fiber.tag === LegacyHiddenComponent\n ) {\n // If the parent is a Virtual Instance and we filtered this Fiber we include a\n // hidden node. We also include this if it's a Suspense boundary so we can track those\n // in the Suspense tree.\n if (\n reconcilingParent !== null &&\n reconcilingParent.kind === VIRTUAL_INSTANCE &&\n reconcilingParent.data === fiber._debugOwner &&\n fiber._debugStack != null &&\n reconcilingParent.source === null\n ) {\n // The new Fiber is directly owned by the parent. Therefore somewhere on the\n // debugStack will be a stack frame inside parent that we can use as its soruce.\n reconcilingParent.source = fiber._debugStack;\n }\n\n newInstance = createFilteredFiberInstance(fiber);\n if (fiber.tag === SuspenseComponent) {\n newSuspenseNode = createSuspenseNode(newInstance);\n // Measure this Suspense node. In general we shouldn't do this until we have\n // inserted the new children but since we know this is a FiberInstance we'll\n // just use the Fiber anyway.\n // Fallbacks get attributed to the parent so we only measure if we're\n // showing primary content.\n if (OffscreenComponent === -1) {\n const isTimedOut = fiber.memoizedState !== null;\n if (!isTimedOut) {\n newSuspenseNode.rects = measureInstance(newInstance);\n }\n } else {\n const hydrated = isFiberHydrated(fiber);\n if (hydrated) {\n const contentFiber = fiber.child;\n if (contentFiber === null) {\n throw new Error(\n 'There should always be an Offscreen Fiber child in a hydrated Suspense boundary.',\n );\n }\n } else {\n // This Suspense Fiber is still dehydrated. It won't have any children\n // until hydration.\n }\n const suspenseState = fiber.memoizedState;\n const isTimedOut = suspenseState !== null;\n if (!isTimedOut) {\n newSuspenseNode.rects = measureInstance(newInstance);\n }\n }\n }\n insertChild(newInstance);\n if (__DEBUG__) {\n debug('mountFiberRecursively()', newInstance, reconcilingParent);\n }\n }\n\n // If we have the tree selection from previous reload, try to match this Fiber.\n // Also remember whether to do the same for siblings.\n const mightSiblingsBeOnTrackedPath = updateTrackedPathStateBeforeMount(\n fiber,\n newInstance,\n );\n\n const stashedParent = reconcilingParent;\n const stashedPrevious = previouslyReconciledSibling;\n const stashedRemaining = remainingReconcilingChildren;\n const stashedSuspenseParent = reconcilingParentSuspenseNode;\n const stashedSuspensePrevious = previouslyReconciledSiblingSuspenseNode;\n const stashedSuspenseRemaining = remainingReconcilingChildrenSuspenseNodes;\n if (newInstance !== null) {\n // Push a new DevTools instance parent while reconciling this subtree.\n reconcilingParent = newInstance;\n previouslyReconciledSibling = null;\n remainingReconcilingChildren = null;\n }\n let shouldPopSuspenseNode = false;\n if (newSuspenseNode !== null) {\n reconcilingParentSuspenseNode = newSuspenseNode;\n previouslyReconciledSiblingSuspenseNode = null;\n remainingReconcilingChildrenSuspenseNodes = null;\n shouldPopSuspenseNode = true;\n }\n try {\n if (traceUpdatesEnabled) {\n if (traceNearestHostComponentUpdate) {\n const elementType = getElementTypeForFiber(fiber);\n // If an ancestor updated, we should mark the nearest host nodes for highlighting.\n if (elementType === ElementTypeHostComponent) {\n traceUpdatesForNodes.add(fiber.stateNode);\n traceNearestHostComponentUpdate = false;\n }\n }\n\n // We intentionally do not re-enable the traceNearestHostComponentUpdate flag in this branch,\n // because we don't want to highlight every host node inside of a newly mounted subtree.\n }\n\n trackDebugInfoFromLazyType(fiber);\n trackDebugInfoFromUsedThenables(fiber);\n\n if (fiber.tag === HostHoistable) {\n const nearestInstance = reconcilingParent;\n if (nearestInstance === null) {\n throw new Error('Did not expect a host hoistable to be the root');\n }\n aquireHostResource(nearestInstance, fiber.memoizedState);\n trackDebugInfoFromHostResource(nearestInstance, fiber);\n } else if (\n fiber.tag === HostComponent ||\n fiber.tag === HostText ||\n fiber.tag === HostSingleton\n ) {\n const nearestInstance = reconcilingParent;\n if (nearestInstance === null) {\n throw new Error('Did not expect a host hoistable to be the root');\n }\n aquireHostInstance(nearestInstance, fiber.stateNode);\n trackDebugInfoFromHostComponent(nearestInstance, fiber);\n }\n\n if (isSuspendedOffscreen(fiber)) {\n // If an Offscreen component is hidden, mount its children as disconnected.\n const stashedDisconnected = isInDisconnectedSubtree;\n isInDisconnectedSubtree = true;\n try {\n if (fiber.child !== null) {\n mountChildrenRecursively(fiber.child, false);\n }\n } finally {\n isInDisconnectedSubtree = stashedDisconnected;\n }\n } else if (isHiddenOffscreen(fiber)) {\n // hidden Activity is noisy.\n // Including it may show overlapping Suspense rects\n } else if (fiber.tag === SuspenseComponent && OffscreenComponent === -1) {\n // Legacy Suspense without the Offscreen wrapper. For the modern Suspense we just handle the\n // Offscreen wrapper itself specially.\n if (newSuspenseNode !== null) {\n trackThrownPromisesFromRetryCache(newSuspenseNode, fiber.stateNode);\n }\n const isTimedOut = fiber.memoizedState !== null;\n if (isTimedOut) {\n // Special case: if Suspense mounts in a timed-out state,\n // get the fallback child from the inner fragment and mount\n // it as if it was our own child. Updates handle this too.\n const primaryChildFragment = fiber.child;\n const fallbackChildFragment = primaryChildFragment\n ? primaryChildFragment.sibling\n : null;\n if (fallbackChildFragment) {\n const fallbackChild = fallbackChildFragment.child;\n if (fallbackChild !== null) {\n updateTrackedPathStateBeforeMount(fallbackChildFragment, null);\n mountChildrenRecursively(\n fallbackChild,\n traceNearestHostComponentUpdate,\n );\n }\n }\n // TODO: Track SuspenseNode in resuspended trees.\n } else {\n const primaryChild: Fiber | null = fiber.child;\n if (primaryChild !== null) {\n mountChildrenRecursively(\n primaryChild,\n traceNearestHostComponentUpdate,\n );\n }\n }\n } else if (\n fiber.tag === SuspenseComponent &&\n OffscreenComponent !== -1 &&\n newInstance !== null &&\n newSuspenseNode !== null\n ) {\n // Modern Suspense path\n const contentFiber = fiber.child;\n const hydrated = isFiberHydrated(fiber);\n if (hydrated) {\n if (contentFiber === null) {\n throw new Error(\n 'There should always be an Offscreen Fiber child in a hydrated Suspense boundary.',\n );\n }\n\n trackThrownPromisesFromRetryCache(newSuspenseNode, fiber.stateNode);\n\n mountSuspenseChildrenRecursively(\n contentFiber,\n traceNearestHostComponentUpdate,\n stashedSuspenseParent,\n stashedSuspensePrevious,\n stashedSuspenseRemaining,\n );\n // mountSuspenseChildrenRecursively popped already\n shouldPopSuspenseNode = false;\n } else {\n // This Suspense Fiber is still dehydrated. It won't have any children\n // until hydration.\n }\n } else {\n if (fiber.child !== null) {\n mountChildrenRecursively(\n fiber.child,\n traceNearestHostComponentUpdate,\n );\n }\n }\n } finally {\n if (newInstance !== null) {\n reconcilingParent = stashedParent;\n previouslyReconciledSibling = stashedPrevious;\n remainingReconcilingChildren = stashedRemaining;\n }\n if (shouldPopSuspenseNode) {\n reconcilingParentSuspenseNode = stashedSuspenseParent;\n previouslyReconciledSiblingSuspenseNode = stashedSuspensePrevious;\n remainingReconcilingChildrenSuspenseNodes = stashedSuspenseRemaining;\n }\n }\n\n // We're exiting this Fiber now, and entering its siblings.\n // If we have selection to restore, we might need to re-activate tracking.\n updateTrackedPathStateAfterMount(mightSiblingsBeOnTrackedPath);\n }\n\n // We use this to simulate unmounting for Suspense trees\n // when we switch from primary to fallback, or deleting a subtree.\n function unmountInstanceRecursively(instance: DevToolsInstance) {\n if (__DEBUG__) {\n debug('unmountInstanceRecursively()', instance, reconcilingParent);\n }\n\n let shouldPopSuspenseNode = false;\n const stashedParent = reconcilingParent;\n const stashedPrevious = previouslyReconciledSibling;\n const stashedRemaining = remainingReconcilingChildren;\n const stashedSuspenseParent = reconcilingParentSuspenseNode;\n const stashedSuspensePrevious = previouslyReconciledSiblingSuspenseNode;\n const stashedSuspenseRemaining = remainingReconcilingChildrenSuspenseNodes;\n const previousSuspendedBy = instance.suspendedBy;\n // Push a new DevTools instance parent while reconciling this subtree.\n reconcilingParent = instance;\n previouslyReconciledSibling = null;\n // Move all the children of this instance to the remaining set.\n remainingReconcilingChildren = instance.firstChild;\n instance.firstChild = null;\n instance.suspendedBy = null;\n\n if (instance.suspenseNode !== null) {\n reconcilingParentSuspenseNode = instance.suspenseNode;\n previouslyReconciledSiblingSuspenseNode = null;\n remainingReconcilingChildrenSuspenseNodes =\n instance.suspenseNode.firstChild;\n\n shouldPopSuspenseNode = true;\n }\n\n try {\n // Unmount the remaining set.\n if (\n (instance.kind === FIBER_INSTANCE ||\n instance.kind === FILTERED_FIBER_INSTANCE) &&\n instance.data.tag === SuspenseComponent &&\n OffscreenComponent !== -1\n ) {\n const fiber = instance.data;\n const contentFiberInstance = remainingReconcilingChildren;\n const hydrated = isFiberHydrated(fiber);\n if (hydrated) {\n if (contentFiberInstance === null) {\n throw new Error(\n 'There should always be an Offscreen Fiber child in a hydrated Suspense boundary.',\n );\n }\n\n unmountSuspenseChildrenRecursively(\n contentFiberInstance,\n stashedSuspenseParent,\n stashedSuspensePrevious,\n stashedSuspenseRemaining,\n );\n // unmountSuspenseChildren already popped\n shouldPopSuspenseNode = false;\n } else {\n if (contentFiberInstance !== null) {\n throw new Error(\n 'A dehydrated Suspense node should not have a content Fiber.',\n );\n }\n }\n } else {\n unmountRemainingChildren();\n }\n removePreviousSuspendedBy(\n instance,\n previousSuspendedBy,\n reconcilingParentSuspenseNode,\n );\n } finally {\n reconcilingParent = stashedParent;\n previouslyReconciledSibling = stashedPrevious;\n remainingReconcilingChildren = stashedRemaining;\n if (shouldPopSuspenseNode) {\n reconcilingParentSuspenseNode = stashedSuspenseParent;\n previouslyReconciledSiblingSuspenseNode = stashedSuspensePrevious;\n remainingReconcilingChildrenSuspenseNodes = stashedSuspenseRemaining;\n }\n }\n if (instance.kind === FIBER_INSTANCE) {\n recordUnmount(instance);\n } else if (instance.kind === VIRTUAL_INSTANCE) {\n recordVirtualUnmount(instance);\n } else {\n untrackFiber(instance, instance.data);\n }\n removeChild(instance, null);\n }\n\n function recordProfilingDurations(\n fiberInstance: FiberInstance,\n prevFiber: null | Fiber,\n ) {\n const id = fiberInstance.id;\n const fiber = fiberInstance.data;\n const {actualDuration, treeBaseDuration} = fiber;\n\n fiberInstance.treeBaseDuration = treeBaseDuration || 0;\n\n if (isProfiling) {\n // It's important to update treeBaseDuration even if the current Fiber did not render,\n // because it's possible that one of its descendants did.\n if (\n prevFiber == null ||\n treeBaseDuration !== prevFiber.treeBaseDuration\n ) {\n // Tree base duration updates are included in the operations typed array.\n // So we have to convert them from milliseconds to microseconds so we can send them as ints.\n const convertedTreeBaseDuration = Math.floor(\n (treeBaseDuration || 0) * 1000,\n );\n pushOperation(TREE_OPERATION_UPDATE_TREE_BASE_DURATION);\n pushOperation(id);\n pushOperation(convertedTreeBaseDuration);\n }\n\n if (prevFiber == null || didFiberRender(prevFiber, fiber)) {\n if (actualDuration != null) {\n // The actual duration reported by React includes time spent working on children.\n // This is useful information, but it's also useful to be able to exclude child durations.\n // The frontend can't compute this, since the immediate children may have been filtered out.\n // So we need to do this on the backend.\n // Note that this calculated self duration is not the same thing as the base duration.\n // The two are calculated differently (tree duration does not accumulate).\n let selfDuration = actualDuration;\n let child = fiber.child;\n while (child !== null) {\n selfDuration -= child.actualDuration || 0;\n child = child.sibling;\n }\n\n // If profiling is active, store durations for elements that were rendered during the commit.\n // Note that we should do this for any fiber we performed work on, regardless of its actualDuration value.\n // In some cases actualDuration might be 0 for fibers we worked on (particularly if we're using Date.now)\n // In other cases (e.g. Memo) actualDuration might be greater than 0 even if we \"bailed out\".\n const metadata =\n ((currentCommitProfilingMetadata: any): CommitProfilingData);\n metadata.durations.push(id, actualDuration, selfDuration);\n metadata.maxActualDuration = Math.max(\n metadata.maxActualDuration,\n actualDuration,\n );\n\n if (recordChangeDescriptions) {\n const changeDescription = getChangeDescription(prevFiber, fiber);\n if (changeDescription !== null) {\n if (metadata.changeDescriptions !== null) {\n metadata.changeDescriptions.set(id, changeDescription);\n }\n }\n }\n }\n }\n\n // If this Fiber was in the set of memoizedUpdaters we need to record\n // it to be included in the description of the commit.\n const fiberRoot: FiberRoot = currentRoot.data.stateNode;\n const updaters = fiberRoot.memoizedUpdaters;\n if (\n updaters != null &&\n (updaters.has(fiber) ||\n // We check the alternate here because we're matching identity and\n // prevFiber might be same as fiber.\n (fiber.alternate !== null && updaters.has(fiber.alternate)))\n ) {\n const metadata =\n ((currentCommitProfilingMetadata: any): CommitProfilingData);\n if (metadata.updaters === null) {\n metadata.updaters = [];\n }\n metadata.updaters.push(instanceToSerializedElement(fiberInstance));\n }\n }\n }\n\n function recordVirtualProfilingDurations(virtualInstance: VirtualInstance) {\n const id = virtualInstance.id;\n\n let treeBaseDuration = 0;\n // Add up the base duration of the child instances. The virtual base duration\n // will be the same as children's duration since we don't take up any render\n // time in the virtual instance.\n for (\n let child = virtualInstance.firstChild;\n child !== null;\n child = child.nextSibling\n ) {\n treeBaseDuration += child.treeBaseDuration;\n }\n\n if (isProfiling) {\n const previousTreeBaseDuration = virtualInstance.treeBaseDuration;\n if (treeBaseDuration !== previousTreeBaseDuration) {\n // Tree base duration updates are included in the operations typed array.\n // So we have to convert them from milliseconds to microseconds so we can send them as ints.\n const convertedTreeBaseDuration = Math.floor(\n (treeBaseDuration || 0) * 1000,\n );\n pushOperation(TREE_OPERATION_UPDATE_TREE_BASE_DURATION);\n pushOperation(id);\n pushOperation(convertedTreeBaseDuration);\n }\n }\n\n virtualInstance.treeBaseDuration = treeBaseDuration;\n }\n\n function addUnfilteredChildrenIDs(\n parentInstance: DevToolsInstance,\n nextChildren: Array<number>,\n ): void {\n let child: null | DevToolsInstance = parentInstance.firstChild;\n while (child !== null) {\n if (child.kind === FILTERED_FIBER_INSTANCE) {\n const fiber = child.data;\n if (isHiddenOffscreen(fiber)) {\n // The children of this Offscreen are hidden so they don't get added.\n } else {\n addUnfilteredChildrenIDs(child, nextChildren);\n }\n } else {\n nextChildren.push(child.id);\n }\n child = child.nextSibling;\n }\n }\n\n function recordResetChildren(\n parentInstance: FiberInstance | VirtualInstance,\n ) {\n if (__DEBUG__) {\n if (parentInstance.firstChild !== null) {\n debug(\n 'recordResetChildren()',\n parentInstance.firstChild,\n parentInstance,\n );\n }\n }\n // The frontend only really cares about the displayName, key, and children.\n // The first two don't really change, so we are only concerned with the order of children here.\n // This is trickier than a simple comparison though, since certain types of fibers are filtered.\n const nextChildren: Array<number> = [];\n\n addUnfilteredChildrenIDs(parentInstance, nextChildren);\n\n const numChildren = nextChildren.length;\n if (numChildren < 2) {\n // No need to reorder.\n return;\n }\n pushOperation(TREE_OPERATION_REORDER_CHILDREN);\n pushOperation(parentInstance.id);\n pushOperation(numChildren);\n for (let i = 0; i < nextChildren.length; i++) {\n pushOperation(nextChildren[i]);\n }\n }\n\n function addUnfilteredSuspenseChildrenIDs(\n parentInstance: SuspenseNode,\n nextChildren: Array<number>,\n ): void {\n let child: null | SuspenseNode = parentInstance.firstChild;\n while (child !== null) {\n if (child.instance.kind === FILTERED_FIBER_INSTANCE) {\n addUnfilteredSuspenseChildrenIDs(child, nextChildren);\n } else {\n nextChildren.push(child.instance.id);\n }\n child = child.nextSibling;\n }\n }\n\n function recordResetSuspenseChildren(parentInstance: SuspenseNode) {\n if (__DEBUG__) {\n if (parentInstance.firstChild !== null) {\n console.log(\n 'recordResetSuspenseChildren()',\n parentInstance.firstChild,\n parentInstance,\n );\n }\n }\n // The frontend only really cares about the name, and children.\n // The first two don't really change, so we are only concerned with the order of children here.\n // This is trickier than a simple comparison though, since certain types of fibers are filtered.\n const nextChildren: Array<number> = [];\n\n addUnfilteredSuspenseChildrenIDs(parentInstance, nextChildren);\n\n const numChildren = nextChildren.length;\n if (numChildren < 2) {\n // No need to reorder.\n return;\n }\n pushOperation(SUSPENSE_TREE_OPERATION_REORDER_CHILDREN);\n // $FlowFixMe[incompatible-call] TODO: Allow filtering SuspenseNode\n pushOperation(parentInstance.instance.id);\n pushOperation(numChildren);\n for (let i = 0; i < nextChildren.length; i++) {\n pushOperation(nextChildren[i]);\n }\n }\n\n function updateVirtualInstanceRecursively(\n virtualInstance: VirtualInstance,\n nextFirstChild: Fiber,\n nextLastChild: null | Fiber, // non-inclusive\n prevFirstChild: null | Fiber,\n traceNearestHostComponentUpdate: boolean,\n virtualLevel: number, // the nth level of virtual instances\n ): UpdateFlags {\n const stashedParent = reconcilingParent;\n const stashedPrevious = previouslyReconciledSibling;\n const stashedRemaining = remainingReconcilingChildren;\n const previousSuspendedBy = virtualInstance.suspendedBy;\n // Push a new DevTools instance parent while reconciling this subtree.\n reconcilingParent = virtualInstance;\n previouslyReconciledSibling = null;\n // Move all the children of this instance to the remaining set.\n // We'll move them back one by one, and anything that remains is deleted.\n remainingReconcilingChildren = virtualInstance.firstChild;\n virtualInstance.firstChild = null;\n virtualInstance.suspendedBy = null;\n try {\n let updateFlags = updateVirtualChildrenRecursively(\n nextFirstChild,\n nextLastChild,\n prevFirstChild,\n traceNearestHostComponentUpdate,\n virtualLevel + 1,\n );\n if ((updateFlags & ShouldResetChildren) !== NoUpdate) {\n if (!isInDisconnectedSubtree) {\n recordResetChildren(virtualInstance);\n }\n updateFlags &= ~ShouldResetChildren;\n }\n removePreviousSuspendedBy(\n virtualInstance,\n previousSuspendedBy,\n reconcilingParentSuspenseNode,\n );\n // Update the errors/warnings count. If this Instance has switched to a different\n // ReactComponentInfo instance, such as when refreshing Server Components, then\n // we replace all the previous logs with the ones associated with the new ones rather\n // than merging. Because deduping is expected to happen at the request level.\n const componentLogsEntry = componentInfoToComponentLogsMap.get(\n virtualInstance.data,\n );\n recordConsoleLogs(virtualInstance, componentLogsEntry);\n // Must be called after all children have been appended.\n recordVirtualProfilingDurations(virtualInstance);\n\n return updateFlags;\n } finally {\n unmountRemainingChildren();\n reconcilingParent = stashedParent;\n previouslyReconciledSibling = stashedPrevious;\n remainingReconcilingChildren = stashedRemaining;\n }\n }\n\n function updateVirtualChildrenRecursively(\n nextFirstChild: Fiber,\n nextLastChild: null | Fiber, // non-inclusive\n prevFirstChild: null | Fiber,\n traceNearestHostComponentUpdate: boolean,\n virtualLevel: number, // the nth level of virtual instances\n ): UpdateFlags {\n let updateFlags = NoUpdate;\n // If the first child is different, we need to traverse them.\n // Each next child will be either a new child (mount) or an alternate (update).\n let nextChild: null | Fiber = nextFirstChild;\n let prevChildAtSameIndex = prevFirstChild;\n let previousVirtualInstance: null | VirtualInstance = null;\n let previousVirtualInstanceWasMount: boolean = false;\n let previousVirtualInstanceNextFirstFiber: Fiber = nextFirstChild;\n let previousVirtualInstancePrevFirstFiber: null | Fiber = prevFirstChild;\n while (nextChild !== null && nextChild !== nextLastChild) {\n let level = 0;\n if (nextChild._debugInfo) {\n for (let i = 0; i < nextChild._debugInfo.length; i++) {\n const debugEntry = nextChild._debugInfo[i];\n if (debugEntry.awaited) {\n // Async Info\n const asyncInfo: ReactAsyncInfo = (debugEntry: any);\n if (level === virtualLevel) {\n // Track any async info between the previous virtual instance up until to this\n // instance and add it to the parent. This can add the same set multiple times\n // so we assume insertSuspendedBy dedupes.\n insertSuspendedBy(asyncInfo);\n }\n continue;\n }\n if (typeof debugEntry.name !== 'string') {\n // Not a Component. Some other Debug Info.\n continue;\n }\n const componentInfo: ReactComponentInfo = (debugEntry: any);\n const secondaryEnv = getSecondaryEnvironmentName(\n nextChild._debugInfo,\n i,\n );\n if (componentInfo.env != null) {\n knownEnvironmentNames.add(componentInfo.env);\n }\n if (secondaryEnv !== null) {\n knownEnvironmentNames.add(secondaryEnv);\n }\n if (shouldFilterVirtual(componentInfo, secondaryEnv)) {\n continue;\n }\n if (level === virtualLevel) {\n if (\n previousVirtualInstance === null ||\n // Consecutive children with the same debug entry as a parent gets\n // treated as if they share the same virtual instance.\n previousVirtualInstance.data !== componentInfo\n ) {\n if (previousVirtualInstance !== null) {\n // Mount any previous children that should go into the previous parent.\n if (previousVirtualInstanceWasMount) {\n mountVirtualInstanceRecursively(\n previousVirtualInstance,\n previousVirtualInstanceNextFirstFiber,\n nextChild,\n traceNearestHostComponentUpdate,\n virtualLevel,\n );\n updateFlags |=\n ShouldResetChildren | ShouldResetSuspenseChildren;\n } else {\n updateFlags |= updateVirtualInstanceRecursively(\n previousVirtualInstance,\n previousVirtualInstanceNextFirstFiber,\n nextChild,\n previousVirtualInstancePrevFirstFiber,\n traceNearestHostComponentUpdate,\n virtualLevel,\n );\n }\n }\n let previousSiblingOfBestMatch = null;\n let bestMatch = remainingReconcilingChildren;\n if (componentInfo.key != null) {\n // If there is a key try to find a matching key in the set.\n bestMatch = remainingReconcilingChildren;\n while (bestMatch !== null) {\n if (\n bestMatch.kind === VIRTUAL_INSTANCE &&\n bestMatch.data.key === componentInfo.key\n ) {\n break;\n }\n previousSiblingOfBestMatch = bestMatch;\n bestMatch = bestMatch.nextSibling;\n }\n }\n if (\n bestMatch !== null &&\n bestMatch.kind === VIRTUAL_INSTANCE &&\n bestMatch.data.name === componentInfo.name &&\n bestMatch.data.env === componentInfo.env &&\n bestMatch.data.key === componentInfo.key\n ) {\n // If the previous children had a virtual instance in the same slot\n // with the same name, then we claim it and reuse it for this update.\n // Update it with the latest entry.\n bestMatch.data = componentInfo;\n moveChild(bestMatch, previousSiblingOfBestMatch);\n previousVirtualInstance = bestMatch;\n previousVirtualInstanceWasMount = false;\n } else {\n // Otherwise we create a new instance.\n const newVirtualInstance = createVirtualInstance(componentInfo);\n recordVirtualMount(\n newVirtualInstance,\n reconcilingParent,\n secondaryEnv,\n );\n insertChild(newVirtualInstance);\n previousVirtualInstance = newVirtualInstance;\n previousVirtualInstanceWasMount = true;\n updateFlags |= ShouldResetChildren;\n }\n // Existing children might be reparented into this new virtual instance.\n // TODO: This will cause the front end to error which needs to be fixed.\n previousVirtualInstanceNextFirstFiber = nextChild;\n previousVirtualInstancePrevFirstFiber = prevChildAtSameIndex;\n }\n level++;\n break;\n } else {\n level++;\n }\n }\n }\n if (level === virtualLevel) {\n if (previousVirtualInstance !== null) {\n // If we were working on a virtual instance and this is not a virtual\n // instance, then we end the sequence and update any previous children\n // that should go into the previous virtual instance.\n if (previousVirtualInstanceWasMount) {\n mountVirtualInstanceRecursively(\n previousVirtualInstance,\n previousVirtualInstanceNextFirstFiber,\n nextChild,\n traceNearestHostComponentUpdate,\n virtualLevel,\n );\n updateFlags |= ShouldResetChildren | ShouldResetSuspenseChildren;\n } else {\n updateFlags |= updateVirtualInstanceRecursively(\n previousVirtualInstance,\n previousVirtualInstanceNextFirstFiber,\n nextChild,\n previousVirtualInstancePrevFirstFiber,\n traceNearestHostComponentUpdate,\n virtualLevel,\n );\n }\n previousVirtualInstance = null;\n }\n\n // We've reached the end of the virtual levels, but not beyond,\n // and now continue with the regular fiber.\n\n // Do a fast pass over the remaining children to find the previous instance.\n // TODO: This doesn't have the best O(n) for a large set of children that are\n // reordered. Consider using a temporary map if it's not the very next one.\n let prevChild;\n if (prevChildAtSameIndex === nextChild) {\n // This set is unchanged. We're just going through it to place all the\n // children again.\n prevChild = nextChild;\n } else {\n // We don't actually need to rely on the alternate here. We could also\n // reconcile against stateNode, key or whatever. Doesn't have to be same\n // Fiber pair.\n prevChild = nextChild.alternate;\n }\n let previousSiblingOfExistingInstance = null;\n let existingInstance = null;\n if (prevChild !== null) {\n existingInstance = remainingReconcilingChildren;\n while (existingInstance !== null) {\n if (existingInstance.data === prevChild) {\n break;\n }\n previousSiblingOfExistingInstance = existingInstance;\n existingInstance = existingInstance.nextSibling;\n }\n }\n if (existingInstance !== null) {\n // Common case. Match in the same parent.\n const fiberInstance: FiberInstance | FilteredFiberInstance =\n (existingInstance: any); // Only matches if it's a Fiber.\n\n // We keep track if the order of the children matches the previous order.\n // They are always different referentially, but if the instances line up\n // conceptually we'll want to know that.\n if (prevChild !== prevChildAtSameIndex) {\n updateFlags |= ShouldResetChildren | ShouldResetSuspenseChildren;\n }\n\n moveChild(fiberInstance, previousSiblingOfExistingInstance);\n\n // If a nested tree child order changed but it can't handle its own\n // child order invalidation (e.g. because it's filtered out like host nodes),\n // propagate the need to reset child order upwards to this Fiber.\n updateFlags |= updateFiberRecursively(\n fiberInstance,\n nextChild,\n (prevChild: any),\n traceNearestHostComponentUpdate,\n );\n } else if (prevChild !== null && shouldFilterFiber(nextChild)) {\n // The filtered instance could've reordered.\n if (prevChild !== prevChildAtSameIndex) {\n updateFlags |= ShouldResetChildren | ShouldResetSuspenseChildren;\n }\n\n // If this Fiber should be filtered, we need to still update its children.\n // This relies on an alternate since we don't have an Instance with the previous\n // child on it. Ideally, the reconciliation wouldn't need previous Fibers that\n // are filtered from the tree.\n updateFlags |= updateFiberRecursively(\n null,\n nextChild,\n prevChild,\n traceNearestHostComponentUpdate,\n );\n } else {\n // It's possible for a FiberInstance to be reparented when virtual parents\n // get their sequence split or change structure with the same render result.\n // In this case we unmount the and remount the FiberInstances.\n // This might cause us to lose the selection but it's an edge case.\n\n // We let the previous instance remain in the \"remaining queue\" it is\n // in to be deleted at the end since it'll have no match.\n\n mountFiberRecursively(nextChild, traceNearestHostComponentUpdate);\n // Need to mark the parent set to remount the new instance.\n updateFlags |= ShouldResetChildren | ShouldResetSuspenseChildren;\n }\n }\n // Try the next child.\n nextChild = nextChild.sibling;\n // Advance the pointer in the previous list so that we can\n // keep comparing if they line up.\n if (\n (updateFlags & ShouldResetChildren) === NoUpdate &&\n prevChildAtSameIndex !== null\n ) {\n prevChildAtSameIndex = prevChildAtSameIndex.sibling;\n }\n }\n if (previousVirtualInstance !== null) {\n if (previousVirtualInstanceWasMount) {\n mountVirtualInstanceRecursively(\n previousVirtualInstance,\n previousVirtualInstanceNextFirstFiber,\n null,\n traceNearestHostComponentUpdate,\n virtualLevel,\n );\n updateFlags |= ShouldResetChildren | ShouldResetSuspenseChildren;\n } else {\n updateFlags |= updateVirtualInstanceRecursively(\n previousVirtualInstance,\n previousVirtualInstanceNextFirstFiber,\n null,\n previousVirtualInstancePrevFirstFiber,\n traceNearestHostComponentUpdate,\n virtualLevel,\n );\n }\n }\n // If we have no more children, but used to, they don't line up.\n if (prevChildAtSameIndex !== null) {\n updateFlags |= ShouldResetChildren | ShouldResetSuspenseChildren;\n }\n return updateFlags;\n }\n\n // Returns whether closest unfiltered fiber parent needs to reset its child list.\n function updateChildrenRecursively(\n nextFirstChild: null | Fiber,\n prevFirstChild: null | Fiber,\n traceNearestHostComponentUpdate: boolean,\n ): UpdateFlags {\n if (nextFirstChild === null) {\n return prevFirstChild !== null ? ShouldResetChildren : NoUpdate;\n }\n return updateVirtualChildrenRecursively(\n nextFirstChild,\n null,\n prevFirstChild,\n traceNearestHostComponentUpdate,\n 0,\n );\n }\n\n function updateSuspenseChildrenRecursively(\n nextContentFiber: Fiber,\n prevContentFiber: Fiber,\n traceNearestHostComponentUpdate: boolean,\n stashedSuspenseParent: null | SuspenseNode,\n stashedSuspensePrevious: null | SuspenseNode,\n stashedSuspenseRemaining: null | SuspenseNode,\n ): UpdateFlags {\n let updateFlags = NoUpdate;\n const prevFallbackFiber = prevContentFiber.sibling;\n const nextFallbackFiber = nextContentFiber.sibling;\n\n // First update only the Offscreen boundary. I.e. the main content.\n updateFlags |= updateVirtualChildrenRecursively(\n nextContentFiber,\n nextFallbackFiber,\n prevContentFiber,\n traceNearestHostComponentUpdate,\n 0,\n );\n\n // Next, we'll pop back out of the SuspenseNode that we added above and now we'll\n // reconcile the fallback, reconciling anything in the context of the parent SuspenseNode.\n // Since the fallback conceptually blocks the parent.\n reconcilingParentSuspenseNode = stashedSuspenseParent;\n previouslyReconciledSiblingSuspenseNode = stashedSuspensePrevious;\n remainingReconcilingChildrenSuspenseNodes = stashedSuspenseRemaining;\n if (prevFallbackFiber !== null || nextFallbackFiber !== null) {\n if (nextFallbackFiber === null) {\n unmountRemainingChildren();\n } else {\n updateFlags |= updateVirtualChildrenRecursively(\n nextFallbackFiber,\n null,\n prevFallbackFiber,\n traceNearestHostComponentUpdate,\n 0,\n );\n\n if ((updateFlags & ShouldResetSuspenseChildren) !== NoUpdate) {\n updateFlags |= ShouldResetParentSuspenseChildren;\n updateFlags &= ~ShouldResetSuspenseChildren;\n }\n }\n }\n\n return updateFlags;\n }\n\n // Returns whether closest unfiltered fiber parent needs to reset its child list.\n function updateFiberRecursively(\n fiberInstance: null | FiberInstance | FilteredFiberInstance, // null if this should be filtered\n nextFiber: Fiber,\n prevFiber: Fiber,\n traceNearestHostComponentUpdate: boolean,\n ): UpdateFlags {\n if (__DEBUG__) {\n if (fiberInstance !== null) {\n debug('updateFiberRecursively()', fiberInstance, reconcilingParent);\n }\n }\n\n if (traceUpdatesEnabled) {\n const elementType = getElementTypeForFiber(nextFiber);\n if (traceNearestHostComponentUpdate) {\n // If an ancestor updated, we should mark the nearest host nodes for highlighting.\n if (elementType === ElementTypeHostComponent) {\n traceUpdatesForNodes.add(nextFiber.stateNode);\n traceNearestHostComponentUpdate = false;\n }\n } else {\n if (\n elementType === ElementTypeFunction ||\n elementType === ElementTypeClass ||\n elementType === ElementTypeContext ||\n elementType === ElementTypeMemo ||\n elementType === ElementTypeForwardRef\n ) {\n // Otherwise if this is a traced ancestor, flag for the nearest host descendant(s).\n traceNearestHostComponentUpdate = didFiberRender(\n prevFiber,\n nextFiber,\n );\n }\n }\n }\n\n const stashedParent = reconcilingParent;\n const stashedPrevious = previouslyReconciledSibling;\n const stashedRemaining = remainingReconcilingChildren;\n const stashedSuspenseParent = reconcilingParentSuspenseNode;\n const stashedSuspensePrevious = previouslyReconciledSiblingSuspenseNode;\n const stashedSuspenseRemaining = remainingReconcilingChildrenSuspenseNodes;\n let updateFlags = NoUpdate;\n let shouldMeasureSuspenseNode = false;\n let shouldPopSuspenseNode = false;\n let previousSuspendedBy = null;\n if (fiberInstance !== null) {\n previousSuspendedBy = fiberInstance.suspendedBy;\n // Update the Fiber so we that we always keep the current Fiber on the data.\n fiberInstance.data = nextFiber;\n if (\n mostRecentlyInspectedElement !== null &&\n (mostRecentlyInspectedElement.id === fiberInstance.id ||\n // If we're inspecting a Root, we inspect the Screen.\n // Invalidating any Root invalidates the Screen too.\n (mostRecentlyInspectedElement.type === ElementTypeRoot &&\n nextFiber.tag === HostRoot)) &&\n didFiberRender(prevFiber, nextFiber)\n ) {\n // If this Fiber has updated, clear cached inspected data.\n // If it is inspected again, it may need to be re-run to obtain updated hooks values.\n hasElementUpdatedSinceLastInspected = true;\n }\n // Push a new DevTools instance parent while reconciling this subtree.\n reconcilingParent = fiberInstance;\n previouslyReconciledSibling = null;\n // Move all the children of this instance to the remaining set.\n // We'll move them back one by one, and anything that remains is deleted.\n remainingReconcilingChildren = fiberInstance.firstChild;\n fiberInstance.firstChild = null;\n fiberInstance.suspendedBy = null;\n\n const suspenseNode = fiberInstance.suspenseNode;\n if (suspenseNode !== null) {\n reconcilingParentSuspenseNode = suspenseNode;\n previouslyReconciledSiblingSuspenseNode = null;\n remainingReconcilingChildrenSuspenseNodes = suspenseNode.firstChild;\n suspenseNode.firstChild = null;\n shouldMeasureSuspenseNode = true;\n shouldPopSuspenseNode = true;\n }\n }\n try {\n trackDebugInfoFromLazyType(nextFiber);\n trackDebugInfoFromUsedThenables(nextFiber);\n\n if (nextFiber.tag === HostHoistable) {\n const nearestInstance = reconcilingParent;\n if (nearestInstance === null) {\n throw new Error('Did not expect a host hoistable to be the root');\n }\n if (prevFiber.memoizedState !== nextFiber.memoizedState) {\n releaseHostResource(nearestInstance, prevFiber.memoizedState);\n aquireHostResource(nearestInstance, nextFiber.memoizedState);\n }\n trackDebugInfoFromHostResource(nearestInstance, nextFiber);\n } else if (\n nextFiber.tag === HostComponent ||\n nextFiber.tag === HostText ||\n nextFiber.tag === HostSingleton\n ) {\n const nearestInstance = reconcilingParent;\n if (nearestInstance === null) {\n throw new Error('Did not expect a host hoistable to be the root');\n }\n if (prevFiber.stateNode !== nextFiber.stateNode) {\n // In persistent mode, it's possible for the stateNode to update with\n // a new clone. In that case we need to release the old one and aquire\n // new one instead.\n releaseHostInstance(nearestInstance, prevFiber.stateNode);\n aquireHostInstance(nearestInstance, nextFiber.stateNode);\n }\n trackDebugInfoFromHostComponent(nearestInstance, nextFiber);\n }\n\n // The behavior of timed-out legacy Suspense trees is unique. Without the Offscreen wrapper.\n // Rather than unmount the timed out content (and possibly lose important state),\n // React re-parents this content within a hidden Fragment while the fallback is showing.\n // This behavior doesn't need to be observable in the DevTools though.\n // It might even result in a bad user experience for e.g. node selection in the Elements panel.\n // The easiest fix is to strip out the intermediate Fragment fibers,\n // so the Elements panel and Profiler don't need to special case them.\n // Suspense components only have a non-null memoizedState if they're timed-out.\n const isLegacySuspense =\n nextFiber.tag === SuspenseComponent && OffscreenComponent === -1;\n const prevDidTimeout =\n isLegacySuspense && prevFiber.memoizedState !== null;\n const nextDidTimeOut =\n isLegacySuspense && nextFiber.memoizedState !== null;\n\n const prevWasHidden = isHiddenOffscreen(prevFiber);\n const nextIsHidden = isHiddenOffscreen(nextFiber);\n const prevWasSuspended = isSuspendedOffscreen(prevFiber);\n const nextIsSuspended = isSuspendedOffscreen(nextFiber);\n\n if (isLegacySuspense) {\n if (fiberInstance !== null && fiberInstance.suspenseNode !== null) {\n const suspenseNode = fiberInstance.suspenseNode;\n if (\n (prevFiber.stateNode === null) !==\n (nextFiber.stateNode === null)\n ) {\n trackThrownPromisesFromRetryCache(\n suspenseNode,\n nextFiber.stateNode,\n );\n }\n if (\n (prevFiber.memoizedState === null) !==\n (nextFiber.memoizedState === null)\n ) {\n // Toggle suspended state.\n recordSuspenseSuspenders(suspenseNode);\n }\n }\n }\n // The logic below is inspired by the code paths in updateSuspenseComponent()\n // inside ReactFiberBeginWork in the React source code.\n if (prevDidTimeout && nextDidTimeOut) {\n // Fallback -> Fallback:\n // 1. Reconcile fallback set.\n const nextFiberChild = nextFiber.child;\n const nextFallbackChildSet = nextFiberChild\n ? nextFiberChild.sibling\n : null;\n // Note: We can't use nextFiber.child.sibling.alternate\n // because the set is special and alternate may not exist.\n const prevFiberChild = prevFiber.child;\n const prevFallbackChildSet = prevFiberChild\n ? prevFiberChild.sibling\n : null;\n\n if (prevFallbackChildSet == null && nextFallbackChildSet != null) {\n mountChildrenRecursively(\n nextFallbackChildSet,\n traceNearestHostComponentUpdate,\n );\n\n updateFlags |= ShouldResetChildren | ShouldResetSuspenseChildren;\n }\n\n const childrenUpdateFlags =\n nextFallbackChildSet != null && prevFallbackChildSet != null\n ? updateChildrenRecursively(\n nextFallbackChildSet,\n prevFallbackChildSet,\n traceNearestHostComponentUpdate,\n )\n : NoUpdate;\n updateFlags |= childrenUpdateFlags;\n } else if (prevDidTimeout && !nextDidTimeOut) {\n // Fallback -> Primary:\n // 1. Unmount fallback set\n // Note: don't emulate fallback unmount because React actually did it.\n // 2. Mount primary set\n const nextPrimaryChildSet = nextFiber.child;\n if (nextPrimaryChildSet !== null) {\n mountChildrenRecursively(\n nextPrimaryChildSet,\n traceNearestHostComponentUpdate,\n );\n updateFlags |= ShouldResetChildren | ShouldResetSuspenseChildren;\n }\n } else if (!prevDidTimeout && nextDidTimeOut) {\n // Primary -> Fallback:\n // 1. Hide primary set\n // We simply don't re-add the fallback children and let\n // unmountRemainingChildren() handle it.\n // 2. Mount fallback set\n const nextFiberChild = nextFiber.child;\n const nextFallbackChildSet = nextFiberChild\n ? nextFiberChild.sibling\n : null;\n if (nextFallbackChildSet != null) {\n mountChildrenRecursively(\n nextFallbackChildSet,\n traceNearestHostComponentUpdate,\n );\n updateFlags |= ShouldResetChildren | ShouldResetSuspenseChildren;\n }\n } else if (nextIsSuspended) {\n if (!prevWasSuspended) {\n // We're hiding the children. Disconnect them from the front end but keep state.\n if (fiberInstance !== null && !isInDisconnectedSubtree) {\n disconnectChildrenRecursively(remainingReconcilingChildren);\n }\n }\n // Update children inside the hidden tree if they committed with a new updates.\n const stashedDisconnected = isInDisconnectedSubtree;\n isInDisconnectedSubtree = true;\n try {\n updateFlags |= updateChildrenRecursively(\n nextFiber.child,\n prevFiber.child,\n false,\n );\n } finally {\n isInDisconnectedSubtree = stashedDisconnected;\n }\n } else if (prevWasSuspended && !nextIsSuspended) {\n // We're revealing the hidden children. We now need to update them to the latest state.\n // We do this while still in the disconnected state and then we reconnect the new ones.\n // This avoids reconnecting things that are about to be removed anyway.\n const stashedDisconnected = isInDisconnectedSubtree;\n isInDisconnectedSubtree = true;\n try {\n if (nextFiber.child !== null) {\n updateFlags |= updateChildrenRecursively(\n nextFiber.child,\n prevFiber.child,\n false,\n );\n }\n // Ensure we unmount any remaining children inside the isInDisconnectedSubtree flag\n // since they should not trigger real deletions.\n unmountRemainingChildren();\n remainingReconcilingChildren = null;\n } finally {\n isInDisconnectedSubtree = stashedDisconnected;\n }\n if (fiberInstance !== null && !isInDisconnectedSubtree) {\n reconnectChildrenRecursively(fiberInstance);\n // Children may have reordered while they were hidden.\n updateFlags |= ShouldResetChildren | ShouldResetSuspenseChildren;\n }\n } else if (nextIsHidden) {\n if (prevWasHidden) {\n // still hidden. Nothing to do.\n } else {\n // We're hiding the children. Remove them from the Frontend\n unmountRemainingChildren();\n }\n } else if (\n nextFiber.tag === SuspenseComponent &&\n OffscreenComponent !== -1 &&\n fiberInstance !== null &&\n fiberInstance.suspenseNode !== null\n ) {\n // Modern Suspense path\n const suspenseNode = fiberInstance.suspenseNode;\n const prevContentFiber = prevFiber.child;\n const nextContentFiber = nextFiber.child;\n const previousHydrated = isFiberHydrated(prevFiber);\n const nextHydrated = isFiberHydrated(nextFiber);\n if (previousHydrated && nextHydrated) {\n if (nextContentFiber === null || prevContentFiber === null) {\n throw new Error(\n 'There should always be an Offscreen Fiber child in a hydrated Suspense boundary.',\n );\n }\n\n if (\n (prevFiber.stateNode === null) !==\n (nextFiber.stateNode === null)\n ) {\n trackThrownPromisesFromRetryCache(\n suspenseNode,\n nextFiber.stateNode,\n );\n }\n\n if (\n (prevFiber.memoizedState === null) !==\n (nextFiber.memoizedState === null)\n ) {\n // Toggle suspended state.\n recordSuspenseSuspenders(suspenseNode);\n }\n\n shouldMeasureSuspenseNode = false;\n updateFlags |= updateSuspenseChildrenRecursively(\n nextContentFiber,\n prevContentFiber,\n traceNearestHostComponentUpdate,\n stashedSuspenseParent,\n stashedSuspensePrevious,\n stashedSuspenseRemaining,\n );\n // updateSuspenseChildrenRecursively popped already\n shouldPopSuspenseNode = false;\n if (nextFiber.memoizedState === null) {\n // Measure this Suspense node in case it changed. We don't update the rect while\n // we're inside a disconnected subtree nor if we are the Suspense boundary that\n // is suspended. This lets us keep the rectangle of the displayed content while\n // we're suspended to visualize the resulting state.\n shouldMeasureSuspenseNode = !isInDisconnectedSubtree;\n }\n } else if (!previousHydrated && nextHydrated) {\n if (nextContentFiber === null) {\n throw new Error(\n 'There should always be an Offscreen Fiber child in a hydrated Suspense boundary.',\n );\n }\n\n trackThrownPromisesFromRetryCache(suspenseNode, nextFiber.stateNode);\n // Toggle suspended state.\n recordSuspenseSuspenders(suspenseNode);\n\n mountSuspenseChildrenRecursively(\n nextContentFiber,\n traceNearestHostComponentUpdate,\n stashedSuspenseParent,\n stashedSuspensePrevious,\n stashedSuspenseRemaining,\n );\n // mountSuspenseChildrenRecursively popped already\n shouldPopSuspenseNode = false;\n } else if (previousHydrated && !nextHydrated) {\n throw new Error(\n 'Encountered a dehydrated Suspense boundary that was previously hydrated.',\n );\n } else {\n // This Suspense Fiber is still dehydrated. It won't have any children\n // until hydration.\n }\n } else {\n // Common case: Primary -> Primary.\n // This is the same code path as for non-Suspense fibers.\n if (nextFiber.child !== prevFiber.child) {\n updateFlags |= updateChildrenRecursively(\n nextFiber.child,\n prevFiber.child,\n traceNearestHostComponentUpdate,\n );\n } else {\n // Children are unchanged.\n if (fiberInstance !== null) {\n // All the remaining children will be children of this same fiber so we can just reuse them.\n // I.e. we just restore them by undoing what we did above.\n fiberInstance.firstChild = remainingReconcilingChildren;\n remainingReconcilingChildren = null;\n\n consumeSuspenseNodesOfExistingInstance(fiberInstance);\n\n if (traceUpdatesEnabled) {\n // If we're tracing updates and we've bailed out before reaching a host node,\n // we should fall back to recursively marking the nearest host descendants for highlight.\n if (traceNearestHostComponentUpdate) {\n const hostInstances =\n findAllCurrentHostInstances(fiberInstance);\n hostInstances.forEach(hostInstance => {\n traceUpdatesForNodes.add(hostInstance);\n });\n }\n }\n } else {\n const childrenUpdateFlags = updateChildrenRecursively(\n nextFiber.child,\n prevFiber.child,\n false,\n );\n // If this fiber is filtered there might be changes to this set elsewhere so we have\n // to visit each child to place it back in the set. We let the child bail out instead.\n if ((childrenUpdateFlags & ShouldResetChildren) !== NoUpdate) {\n throw new Error(\n 'The children should not have changed if we pass in the same set.',\n );\n }\n updateFlags |= childrenUpdateFlags;\n }\n }\n }\n\n if (fiberInstance !== null) {\n removePreviousSuspendedBy(\n fiberInstance,\n previousSuspendedBy,\n shouldPopSuspenseNode\n ? reconcilingParentSuspenseNode\n : stashedSuspenseParent,\n );\n\n if (fiberInstance.kind === FIBER_INSTANCE) {\n let componentLogsEntry = fiberToComponentLogsMap.get(\n fiberInstance.data,\n );\n if (\n componentLogsEntry === undefined &&\n fiberInstance.data.alternate\n ) {\n componentLogsEntry = fiberToComponentLogsMap.get(\n fiberInstance.data.alternate,\n );\n }\n recordConsoleLogs(fiberInstance, componentLogsEntry);\n\n const isProfilingSupported =\n nextFiber.hasOwnProperty('treeBaseDuration');\n if (isProfilingSupported) {\n recordProfilingDurations(fiberInstance, prevFiber);\n }\n }\n }\n\n if ((updateFlags & ShouldResetChildren) !== NoUpdate) {\n // We need to crawl the subtree for closest non-filtered Fibers\n // so that we can display them in a flat children set.\n if (fiberInstance !== null && fiberInstance.kind === FIBER_INSTANCE) {\n if (!nextIsSuspended && !isInDisconnectedSubtree) {\n recordResetChildren(fiberInstance);\n }\n\n // We've handled the child order change for this Fiber.\n // Since it's included, there's no need to invalidate parent child order.\n updateFlags &= ~ShouldResetChildren;\n } else {\n // Let the closest unfiltered parent Fiber reset its child order instead.\n }\n } else {\n }\n\n if ((updateFlags & ShouldResetSuspenseChildren) !== NoUpdate) {\n if (fiberInstance !== null && fiberInstance.kind === FIBER_INSTANCE) {\n const suspenseNode = fiberInstance.suspenseNode;\n if (suspenseNode !== null) {\n recordResetSuspenseChildren(suspenseNode);\n updateFlags &= ~ShouldResetSuspenseChildren;\n }\n } else {\n // Let the closest unfiltered parent Fiber reset its child order instead.\n }\n }\n if ((updateFlags & ShouldResetParentSuspenseChildren) !== NoUpdate) {\n if (fiberInstance !== null && fiberInstance.kind === FIBER_INSTANCE) {\n const suspenseNode = fiberInstance.suspenseNode;\n if (suspenseNode !== null) {\n updateFlags &= ~ShouldResetParentSuspenseChildren;\n updateFlags |= ShouldResetSuspenseChildren;\n }\n } else {\n // Let the closest unfiltered parent Fiber reset its child order instead.\n }\n }\n\n return updateFlags;\n } finally {\n if (fiberInstance !== null) {\n unmountRemainingChildren();\n reconcilingParent = stashedParent;\n previouslyReconciledSibling = stashedPrevious;\n remainingReconcilingChildren = stashedRemaining;\n if (shouldMeasureSuspenseNode) {\n if (!isInDisconnectedSubtree) {\n // Measure this Suspense node in case it changed. We don't update the rect\n // while we're inside a disconnected subtree so that we keep the outline\n // as it was before we hid the parent.\n const suspenseNode = fiberInstance.suspenseNode;\n if (suspenseNode === null) {\n throw new Error(\n 'Attempted to measure a Suspense node that does not exist.',\n );\n }\n const prevRects = suspenseNode.rects;\n const nextRects = measureInstance(fiberInstance);\n if (!areEqualRects(prevRects, nextRects)) {\n suspenseNode.rects = nextRects;\n recordSuspenseResize(suspenseNode);\n }\n }\n }\n if (shouldPopSuspenseNode) {\n reconcilingParentSuspenseNode = stashedSuspenseParent;\n previouslyReconciledSiblingSuspenseNode = stashedSuspensePrevious;\n remainingReconcilingChildrenSuspenseNodes = stashedSuspenseRemaining;\n }\n }\n }\n }\n\n function disconnectChildrenRecursively(firstChild: null | DevToolsInstance) {\n for (let child = firstChild; child !== null; child = child.nextSibling) {\n if (\n (child.kind === FIBER_INSTANCE ||\n child.kind === FILTERED_FIBER_INSTANCE) &&\n isSuspendedOffscreen(child.data)\n ) {\n // This instance's children are already disconnected.\n } else {\n disconnectChildrenRecursively(child.firstChild);\n }\n if (child.kind === FIBER_INSTANCE) {\n recordDisconnect(child);\n } else if (child.kind === VIRTUAL_INSTANCE) {\n recordVirtualDisconnect(child);\n }\n }\n }\n\n function reconnectChildrenRecursively(parentInstance: DevToolsInstance) {\n for (\n let child = parentInstance.firstChild;\n child !== null;\n child = child.nextSibling\n ) {\n if (child.kind === FIBER_INSTANCE) {\n recordReconnect(child, parentInstance);\n } else if (child.kind === VIRTUAL_INSTANCE) {\n const secondaryEnv = null; // TODO: We don't have this data anywhere. We could just stash it somewhere.\n recordVirtualReconnect(child, parentInstance, secondaryEnv);\n }\n if (\n (child.kind === FIBER_INSTANCE ||\n child.kind === FILTERED_FIBER_INSTANCE) &&\n isHiddenOffscreen(child.data)\n ) {\n // This instance's children should remain disconnected.\n } else {\n reconnectChildrenRecursively(child);\n }\n }\n }\n\n function cleanup() {\n isProfiling = false;\n }\n\n function rootSupportsProfiling(root: any) {\n if (root.memoizedInteractions != null) {\n // v16 builds include this field for the scheduler/tracing API.\n return true;\n } else if (\n root.current != null &&\n root.current.hasOwnProperty('treeBaseDuration')\n ) {\n // The scheduler/tracing API was removed in v17 though\n // so we need to check a non-root Fiber.\n return true;\n } else {\n return false;\n }\n }\n\n function flushInitialOperations() {\n const localPendingOperationsQueue = pendingOperationsQueue;\n\n pendingOperationsQueue = null;\n\n if (\n localPendingOperationsQueue !== null &&\n localPendingOperationsQueue.length > 0\n ) {\n // We may have already queued up some operations before the frontend connected\n // If so, let the frontend know about them.\n localPendingOperationsQueue.forEach(operations => {\n hook.emit('operations', operations);\n });\n } else {\n // Before the traversals, remember to start tracking\n // our path in case we have selection to restore.\n if (trackedPath !== null) {\n mightBeOnTrackedPath = true;\n }\n // If we have not been profiling, then we can just walk the tree and build up its current state as-is.\n hook.getFiberRoots(rendererID).forEach(root => {\n const current = root.current;\n const newRoot = createFiberInstance(current);\n rootToFiberInstanceMap.set(root, newRoot);\n idToDevToolsInstanceMap.set(newRoot.id, newRoot);\n currentRoot = newRoot;\n setRootPseudoKey(currentRoot.id, root.current);\n\n // Handle multi-renderer edge-case where only some v16 renderers support profiling.\n if (isProfiling && rootSupportsProfiling(root)) {\n // If profiling is active, store commit time and duration.\n // The frontend may request this information after profiling has stopped.\n currentCommitProfilingMetadata = {\n changeDescriptions: recordChangeDescriptions ? new Map() : null,\n durations: [],\n commitTime: getCurrentTime() - profilingStartTime,\n maxActualDuration: 0,\n priorityLevel: null,\n updaters: null,\n effectDuration: null,\n passiveEffectDuration: null,\n };\n }\n\n mountFiberRecursively(root.current, false);\n\n flushPendingEvents();\n\n needsToFlushComponentLogs = false;\n currentRoot = (null: any);\n });\n }\n }\n\n function handleCommitFiberUnmount(fiber: any) {\n // This Hook is no longer used. After having shipped DevTools everywhere it is\n // safe to stop calling it from Fiber.\n }\n\n function handlePostCommitFiberRoot(root: any) {\n if (isProfiling && rootSupportsProfiling(root)) {\n if (currentCommitProfilingMetadata !== null) {\n const {effectDuration, passiveEffectDuration} =\n getEffectDurations(root);\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n currentCommitProfilingMetadata.effectDuration = effectDuration;\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n currentCommitProfilingMetadata.passiveEffectDuration =\n passiveEffectDuration;\n }\n }\n\n if (needsToFlushComponentLogs) {\n // We received new logs after commit. I.e. in a passive effect. We need to\n // traverse the tree to find the affected ones. If we just moved the whole\n // tree traversal from handleCommitFiberRoot to handlePostCommitFiberRoot\n // this wouldn't be needed. For now we just brute force check all instances.\n // This is not that common of a case.\n bruteForceFlushErrorsAndWarnings();\n }\n }\n\n function handleCommitFiberRoot(\n root: FiberRoot,\n priorityLevel: void | number,\n ) {\n const nextFiber = root.current;\n\n let prevFiber: null | Fiber = null;\n let rootInstance = rootToFiberInstanceMap.get(root);\n if (!rootInstance) {\n rootInstance = createFiberInstance(nextFiber);\n rootToFiberInstanceMap.set(root, rootInstance);\n idToDevToolsInstanceMap.set(rootInstance.id, rootInstance);\n } else {\n prevFiber = rootInstance.data;\n }\n currentRoot = rootInstance;\n\n // Before the traversals, remember to start tracking\n // our path in case we have selection to restore.\n if (trackedPath !== null) {\n mightBeOnTrackedPath = true;\n }\n\n if (traceUpdatesEnabled) {\n traceUpdatesForNodes.clear();\n }\n\n // Handle multi-renderer edge-case where only some v16 renderers support profiling.\n const isProfilingSupported = rootSupportsProfiling(root);\n\n if (isProfiling && isProfilingSupported) {\n // If profiling is active, store commit time and duration.\n // The frontend may request this information after profiling has stopped.\n currentCommitProfilingMetadata = {\n changeDescriptions: recordChangeDescriptions ? new Map() : null,\n durations: [],\n commitTime: getCurrentTime() - profilingStartTime,\n maxActualDuration: 0,\n priorityLevel:\n priorityLevel == null ? null : formatPriorityLevel(priorityLevel),\n updaters: null,\n // Initialize to null; if new enough React version is running,\n // these values will be read during separate handlePostCommitFiberRoot() call.\n effectDuration: null,\n passiveEffectDuration: null,\n };\n }\n\n const nextIsMounted = nextFiber.child !== null;\n const prevWasMounted = prevFiber !== null && prevFiber.child !== null;\n if (!prevWasMounted && nextIsMounted) {\n // Mount a new root.\n setRootPseudoKey(currentRoot.id, nextFiber);\n mountFiberRecursively(nextFiber, false);\n } else if (prevWasMounted && nextIsMounted) {\n if (prevFiber === null) {\n throw new Error(\n 'Expected a previous Fiber when updating an existing root.',\n );\n }\n // Update an existing root.\n updateFiberRecursively(rootInstance, nextFiber, prevFiber, false);\n } else if (prevWasMounted && !nextIsMounted) {\n // Unmount an existing root.\n unmountInstanceRecursively(rootInstance);\n removeRootPseudoKey(currentRoot.id);\n rootToFiberInstanceMap.delete(root);\n } else if (!prevWasMounted && !nextIsMounted) {\n // We don't need this root anymore.\n rootToFiberInstanceMap.delete(root);\n }\n\n if (isProfiling && isProfilingSupported) {\n if (!shouldBailoutWithPendingOperations()) {\n const commitProfilingMetadata =\n ((rootToCommitProfilingMetadataMap: any): CommitProfilingMetadataMap).get(\n currentRoot.id,\n );\n\n if (commitProfilingMetadata != null) {\n commitProfilingMetadata.push(\n ((currentCommitProfilingMetadata: any): CommitProfilingData),\n );\n } else {\n ((rootToCommitProfilingMetadataMap: any): CommitProfilingMetadataMap).set(\n currentRoot.id,\n [((currentCommitProfilingMetadata: any): CommitProfilingData)],\n );\n }\n }\n }\n\n // We're done here.\n flushPendingEvents();\n\n needsToFlushComponentLogs = false;\n\n if (traceUpdatesEnabled) {\n hook.emit('traceUpdates', traceUpdatesForNodes);\n }\n\n currentRoot = (null: any);\n }\n\n function getResourceInstance(fiber: Fiber): HostInstance | null {\n if (fiber.tag === HostHoistable) {\n const resource = fiber.memoizedState;\n // Feature Detect a DOM Specific Instance of a Resource\n if (\n typeof resource === 'object' &&\n resource !== null &&\n resource.instance != null\n ) {\n return resource.instance;\n }\n }\n return null;\n }\n\n function appendHostInstancesByDevToolsInstance(\n devtoolsInstance: DevToolsInstance,\n hostInstances: Array<HostInstance>,\n ) {\n if (devtoolsInstance.kind !== VIRTUAL_INSTANCE) {\n const fiber = devtoolsInstance.data;\n appendHostInstancesByFiber(fiber, hostInstances);\n return;\n }\n // Search the tree for the nearest child Fiber and add all its host instances.\n // TODO: If the true nearest Fiber is filtered, we might skip it and instead include all\n // the children below it. In the extreme case, searching the whole tree.\n for (\n let child = devtoolsInstance.firstChild;\n child !== null;\n child = child.nextSibling\n ) {\n appendHostInstancesByDevToolsInstance(child, hostInstances);\n }\n }\n\n function appendHostInstancesByFiber(\n fiber: Fiber,\n hostInstances: Array<HostInstance>,\n ): void {\n // Next we'll drill down this component to find all HostComponent/Text.\n let node: Fiber = fiber;\n while (true) {\n if (\n node.tag === HostComponent ||\n node.tag === HostText ||\n node.tag === HostSingleton ||\n node.tag === HostHoistable\n ) {\n const hostInstance = node.stateNode || getResourceInstance(node);\n if (hostInstance) {\n hostInstances.push(hostInstance);\n }\n } else if (node.child) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n if (node === fiber) {\n return;\n }\n while (!node.sibling) {\n if (!node.return || node.return === fiber) {\n return;\n }\n node = node.return;\n }\n node.sibling.return = node.return;\n node = node.sibling;\n }\n }\n\n function findAllCurrentHostInstances(\n devtoolsInstance: DevToolsInstance,\n ): $ReadOnlyArray<HostInstance> {\n const hostInstances: Array<HostInstance> = [];\n appendHostInstancesByDevToolsInstance(devtoolsInstance, hostInstances);\n return hostInstances;\n }\n\n function findHostInstancesForElementID(id: number) {\n try {\n const devtoolsInstance = idToDevToolsInstanceMap.get(id);\n if (devtoolsInstance === undefined) {\n console.warn(`Could not find DevToolsInstance with id \"${id}\"`);\n return null;\n }\n return findAllCurrentHostInstances(devtoolsInstance);\n } catch (err) {\n // The fiber might have unmounted by now.\n return null;\n }\n }\n\n function findLastKnownRectsForID(id: number): null | Array<Rect> {\n try {\n const devtoolsInstance = idToDevToolsInstanceMap.get(id);\n if (devtoolsInstance === undefined) {\n console.warn(`Could not find DevToolsInstance with id \"${id}\"`);\n return null;\n }\n if (devtoolsInstance.suspenseNode === null) {\n return null;\n }\n return devtoolsInstance.suspenseNode.rects;\n } catch (err) {\n // The fiber might have unmounted by now.\n return null;\n }\n }\n\n function getDisplayNameForElementID(id: number): null | string {\n const devtoolsInstance = idToDevToolsInstanceMap.get(id);\n if (devtoolsInstance === undefined) {\n return null;\n }\n if (devtoolsInstance.kind === FIBER_INSTANCE) {\n const fiber = devtoolsInstance.data;\n if (fiber.tag === HostRoot) {\n // The only reason you'd inspect a HostRoot is to show it as a SuspenseNode.\n return 'Initial Paint';\n }\n if (fiber.tag === SuspenseComponent || fiber.tag === ActivityComponent) {\n // For Suspense and Activity components, we can show a better name\n // by using the name prop or their owner.\n const props = fiber.memoizedProps;\n if (props.name != null) {\n return props.name;\n }\n const owner = getUnfilteredOwner(fiber);\n if (owner != null) {\n if (typeof owner.tag === 'number') {\n return getDisplayNameForFiber((owner: any));\n } else {\n return owner.name || '';\n }\n }\n }\n return getDisplayNameForFiber(fiber);\n } else {\n return devtoolsInstance.data.name || '';\n }\n }\n\n function getNearestSuspenseNode(instance: DevToolsInstance): SuspenseNode {\n while (instance.suspenseNode === null) {\n if (instance.parent === null) {\n throw new Error(\n 'There should always be a SuspenseNode parent on a mounted instance.',\n );\n }\n instance = instance.parent;\n }\n return instance.suspenseNode;\n }\n\n function getNearestMountedDOMNode(publicInstance: Element): null | Element {\n let domNode: null | Element = publicInstance;\n while (domNode && !publicInstanceToDevToolsInstanceMap.has(domNode)) {\n // $FlowFixMe: In practice this is either null or Element.\n domNode = domNode.parentNode;\n }\n return domNode;\n }\n\n function getElementIDForHostInstance(\n publicInstance: HostInstance,\n ): number | null {\n const instance = publicInstanceToDevToolsInstanceMap.get(publicInstance);\n if (instance !== undefined) {\n if (instance.kind === FILTERED_FIBER_INSTANCE) {\n // A Filtered Fiber Instance will always have a Virtual Instance as a parent.\n return ((instance.parent: any): VirtualInstance).id;\n }\n return instance.id;\n }\n return null;\n }\n\n function getSuspenseNodeIDForHostInstance(\n publicInstance: HostInstance,\n ): number | null {\n const instance = publicInstanceToDevToolsInstanceMap.get(publicInstance);\n if (instance !== undefined) {\n // Pick nearest unfiltered SuspenseNode instance.\n let suspenseInstance = instance;\n while (\n suspenseInstance.suspenseNode === null ||\n suspenseInstance.kind === FILTERED_FIBER_INSTANCE\n ) {\n if (suspenseInstance.parent === null) {\n // We shouldn't get here since we'll always have a suspenseNode at the root.\n return null;\n }\n suspenseInstance = suspenseInstance.parent;\n }\n return suspenseInstance.id;\n }\n return null;\n }\n\n function getElementAttributeByPath(\n id: number,\n path: Array<string | number>,\n ): mixed {\n if (isMostRecentlyInspectedElement(id)) {\n return getInObject(\n ((mostRecentlyInspectedElement: any): InspectedElement),\n path,\n );\n }\n return undefined;\n }\n\n function getElementSourceFunctionById(id: number): null | Function {\n const devtoolsInstance = idToDevToolsInstanceMap.get(id);\n if (devtoolsInstance === undefined) {\n console.warn(`Could not find DevToolsInstance with id \"${id}\"`);\n return null;\n }\n if (devtoolsInstance.kind !== FIBER_INSTANCE) {\n // TODO: Handle VirtualInstance.\n return null;\n }\n const fiber = devtoolsInstance.data;\n\n const {elementType, tag, type} = fiber;\n\n switch (tag) {\n case ClassComponent:\n case IncompleteClassComponent:\n case IncompleteFunctionComponent:\n case IndeterminateComponent:\n case FunctionComponent:\n return type;\n case ForwardRef:\n return type.render;\n case MemoComponent:\n case SimpleMemoComponent:\n return elementType != null && elementType.type != null\n ? elementType.type\n : type;\n default:\n return null;\n }\n }\n\n function instanceToSerializedElement(\n instance: FiberInstance | VirtualInstance,\n ): SerializedElement {\n if (instance.kind === FIBER_INSTANCE) {\n const fiber = instance.data;\n return {\n displayName: getDisplayNameForFiber(fiber) || 'Anonymous',\n id: instance.id,\n key: fiber.key,\n env: null,\n stack:\n fiber._debugOwner == null || fiber._debugStack == null\n ? null\n : parseStackTrace(fiber._debugStack, 1),\n type: getElementTypeForFiber(fiber),\n };\n } else {\n const componentInfo = instance.data;\n return {\n displayName: componentInfo.name || 'Anonymous',\n id: instance.id,\n key: componentInfo.key == null ? null : componentInfo.key,\n env: componentInfo.env == null ? null : componentInfo.env,\n stack:\n componentInfo.owner == null || componentInfo.debugStack == null\n ? null\n : parseStackTrace(componentInfo.debugStack, 1),\n type: ElementTypeVirtual,\n };\n }\n }\n\n function getOwnersList(id: number): Array<SerializedElement> | null {\n const devtoolsInstance = idToDevToolsInstanceMap.get(id);\n if (devtoolsInstance === undefined) {\n console.warn(`Could not find DevToolsInstance with id \"${id}\"`);\n return null;\n }\n const self = instanceToSerializedElement(devtoolsInstance);\n const owners = getOwnersListFromInstance(devtoolsInstance);\n // This is particular API is prefixed with the current instance too for some reason.\n if (owners === null) {\n return [self];\n }\n owners.unshift(self);\n owners.reverse();\n return owners;\n }\n\n function getOwnersListFromInstance(\n instance: DevToolsInstance,\n ): Array<SerializedElement> | null {\n let owner = getUnfilteredOwner(instance.data);\n if (owner === null) {\n return null;\n }\n const owners: Array<SerializedElement> = [];\n let parentInstance: null | DevToolsInstance = instance.parent;\n while (parentInstance !== null && owner !== null) {\n const ownerInstance = findNearestOwnerInstance(parentInstance, owner);\n if (ownerInstance !== null) {\n owners.push(instanceToSerializedElement(ownerInstance));\n // Get the next owner and keep searching from the previous match.\n owner = getUnfilteredOwner(owner);\n parentInstance = ownerInstance.parent;\n } else {\n break;\n }\n }\n return owners;\n }\n\n function getUnfilteredOwner(\n owner: ReactComponentInfo | Fiber | null | void,\n ): ReactComponentInfo | Fiber | null {\n if (owner == null) {\n return null;\n }\n if (typeof owner.tag === 'number') {\n const ownerFiber: Fiber = (owner: any); // Refined\n owner = ownerFiber._debugOwner;\n } else {\n const ownerInfo: ReactComponentInfo = (owner: any); // Refined\n owner = ownerInfo.owner;\n }\n while (owner) {\n if (typeof owner.tag === 'number') {\n const ownerFiber: Fiber = (owner: any); // Refined\n if (!shouldFilterFiber(ownerFiber)) {\n return ownerFiber;\n }\n owner = ownerFiber._debugOwner;\n } else {\n const ownerInfo: ReactComponentInfo = (owner: any); // Refined\n if (!shouldFilterVirtual(ownerInfo, null)) {\n return ownerInfo;\n }\n owner = ownerInfo.owner;\n }\n }\n return null;\n }\n\n function findNearestOwnerInstance(\n parentInstance: null | DevToolsInstance,\n owner: void | null | ReactComponentInfo | Fiber,\n ): null | FiberInstance | VirtualInstance {\n if (owner == null) {\n return null;\n }\n // Search the parent path for any instance that matches this kind of owner.\n while (parentInstance !== null) {\n if (\n parentInstance.data === owner ||\n // Typically both owner and instance.data would refer to the current version of a Fiber\n // but it is possible for memoization to ignore the owner on the JSX. Then the new Fiber\n // isn't propagated down as the new owner. In that case we might match the alternate\n // instead. This is a bit hacky but the fastest check since type casting owner to a Fiber\n // needs a duck type check anyway.\n parentInstance.data === (owner: any).alternate\n ) {\n if (parentInstance.kind === FILTERED_FIBER_INSTANCE) {\n return null;\n }\n return parentInstance;\n }\n parentInstance = parentInstance.parent;\n }\n // It is technically possible to create an element and render it in a different parent\n // but this is a weird edge case and it is worth not having to scan the tree or keep\n // a register for every fiber/component info.\n return null;\n }\n\n function inspectHooks(fiber: Fiber): HooksTree {\n const originalConsoleMethods: {[string]: $FlowFixMe} = {};\n\n // Temporarily disable all console logging before re-running the hook.\n for (const method in console) {\n try {\n // $FlowFixMe[invalid-computed-prop]\n originalConsoleMethods[method] = console[method];\n // $FlowFixMe[prop-missing]\n console[method] = () => {};\n } catch (error) {}\n }\n\n try {\n return inspectHooksOfFiber(fiber, getDispatcherRef(renderer));\n } finally {\n // Restore original console functionality.\n for (const method in originalConsoleMethods) {\n try {\n // $FlowFixMe[prop-missing]\n console[method] = originalConsoleMethods[method];\n } catch (error) {}\n }\n }\n }\n\n function getSuspendedByOfSuspenseNode(\n suspenseNode: SuspenseNode,\n filterByChildInstance: null | DevToolsInstance, // only include suspended by instances in this subtree\n ): Array<SerializedAsyncInfo> {\n // Collect all ReactAsyncInfo that was suspending this SuspenseNode but\n // isn't also in any parent set.\n const result: Array<SerializedAsyncInfo> = [];\n if (!suspenseNode.hasUniqueSuspenders) {\n return result;\n }\n // Cache the inspection of Hooks in case we need it for multiple entries.\n // We don't need a full map here since it's likely that every ioInfo that's unique\n // to a specific instance will have those appear in order of when that instance was discovered.\n let hooksCacheKey: null | DevToolsInstance = null;\n let hooksCache: null | HooksTree = null;\n // Collect the stream entries with the highest byte offset and end time.\n const streamEntries: Map<\n Promise<mixed>,\n {\n asyncInfo: ReactAsyncInfo,\n instance: DevToolsInstance,\n hooks: null | HooksTree,\n },\n > = new Map();\n suspenseNode.suspendedBy.forEach((set, ioInfo) => {\n let parentNode = suspenseNode.parent;\n while (parentNode !== null) {\n if (parentNode.suspendedBy.has(ioInfo)) {\n return;\n }\n parentNode = parentNode.parent;\n }\n // We have the ioInfo but we need to find at least one corresponding await\n // to go along with it. We don't really need to show every child that awaits the same\n // thing so we just pick the first one that is still alive.\n if (set.size === 0) {\n return;\n }\n let firstInstance: null | DevToolsInstance = null;\n if (filterByChildInstance === null) {\n firstInstance = (set.values().next().value: any);\n } else {\n // eslint-disable-next-line no-for-of-loops/no-for-of-loops\n for (const childInstance of set.values()) {\n if (firstInstance === null) {\n firstInstance = childInstance;\n }\n if (\n childInstance !== filterByChildInstance &&\n !isChildOf(\n filterByChildInstance,\n childInstance,\n suspenseNode.instance,\n )\n ) {\n // Something suspended on this outside the filtered instance. That means that\n // it is not unique to just this filtered instance so we skip including it.\n return;\n }\n }\n }\n if (firstInstance !== null && firstInstance.suspendedBy !== null) {\n const asyncInfo = getAwaitInSuspendedByFromIO(\n firstInstance.suspendedBy,\n ioInfo,\n );\n if (asyncInfo !== null) {\n let hooks: null | HooksTree = null;\n if (asyncInfo.stack == null && asyncInfo.owner == null) {\n if (hooksCacheKey === firstInstance) {\n hooks = hooksCache;\n } else if (firstInstance.kind !== VIRTUAL_INSTANCE) {\n const fiber = firstInstance.data;\n if (\n fiber.dependencies &&\n fiber.dependencies._debugThenableState\n ) {\n // This entry had no stack nor owner but this Fiber used Hooks so we might\n // be able to get the stack from the Hook.\n hooksCacheKey = firstInstance;\n hooksCache = hooks = inspectHooks(fiber);\n }\n }\n }\n const newIO = asyncInfo.awaited;\n if (\n (newIO.name === 'RSC stream' || newIO.name === 'rsc stream') &&\n newIO.value != null\n ) {\n const streamPromise = newIO.value;\n // Special case RSC stream entries to pick the last entry keyed by the stream.\n const existingEntry = streamEntries.get(streamPromise);\n if (existingEntry === undefined) {\n streamEntries.set(streamPromise, {\n asyncInfo,\n instance: firstInstance,\n hooks,\n });\n } else {\n const existingIO = existingEntry.asyncInfo.awaited;\n if (\n newIO !== existingIO &&\n ((newIO.byteSize !== undefined &&\n existingIO.byteSize !== undefined &&\n newIO.byteSize > existingIO.byteSize) ||\n newIO.end > existingIO.end)\n ) {\n // The new entry is later in the stream that the old entry. Replace it.\n existingEntry.asyncInfo = asyncInfo;\n existingEntry.instance = firstInstance;\n existingEntry.hooks = hooks;\n }\n }\n } else {\n result.push(serializeAsyncInfo(asyncInfo, firstInstance, hooks));\n }\n }\n }\n });\n // Add any deduped stream entries.\n streamEntries.forEach(({asyncInfo, instance, hooks}) => {\n result.push(serializeAsyncInfo(asyncInfo, instance, hooks));\n });\n return result;\n }\n\n function getSuspendedByOfInstance(\n devtoolsInstance: DevToolsInstance,\n hooks: null | HooksTree,\n ): Array<SerializedAsyncInfo> {\n const suspendedBy = devtoolsInstance.suspendedBy;\n if (suspendedBy === null) {\n return [];\n }\n\n const foundIOEntries: Set<ReactIOInfo> = new Set();\n const streamEntries: Map<Promise<mixed>, ReactAsyncInfo> = new Map();\n const result: Array<SerializedAsyncInfo> = [];\n for (let i = 0; i < suspendedBy.length; i++) {\n const asyncInfo = suspendedBy[i];\n const ioInfo = asyncInfo.awaited;\n if (foundIOEntries.has(ioInfo)) {\n // We have already added this I/O entry to the result. We can dedupe it.\n // This can happen when an instance depends on the same data in mutliple places.\n continue;\n }\n foundIOEntries.add(ioInfo);\n if (\n (ioInfo.name === 'RSC stream' || ioInfo.name === 'rsc stream') &&\n ioInfo.value != null\n ) {\n const streamPromise = ioInfo.value;\n // Special case RSC stream entries to pick the last entry keyed by the stream.\n const existingEntry = streamEntries.get(streamPromise);\n if (existingEntry === undefined) {\n streamEntries.set(streamPromise, asyncInfo);\n } else {\n const existingIO = existingEntry.awaited;\n if (\n ioInfo !== existingIO &&\n ((ioInfo.byteSize !== undefined &&\n existingIO.byteSize !== undefined &&\n ioInfo.byteSize > existingIO.byteSize) ||\n ioInfo.end > existingIO.end)\n ) {\n // The new entry is later in the stream that the old entry. Replace it.\n streamEntries.set(streamPromise, asyncInfo);\n }\n }\n } else {\n result.push(serializeAsyncInfo(asyncInfo, devtoolsInstance, hooks));\n }\n }\n // Add any deduped stream entries.\n streamEntries.forEach(asyncInfo => {\n result.push(serializeAsyncInfo(asyncInfo, devtoolsInstance, hooks));\n });\n return result;\n }\n\n function getSuspendedByOfInstanceSubtree(\n devtoolsInstance: DevToolsInstance,\n ): Array<SerializedAsyncInfo> {\n // Get everything suspending below this instance down to the next Suspense node.\n // First find the parent Suspense boundary which will have accumulated everything\n let suspenseParentInstance = devtoolsInstance;\n while (suspenseParentInstance.suspenseNode === null) {\n if (suspenseParentInstance.parent === null) {\n // We don't expect to hit this. We should always find the root.\n return [];\n }\n suspenseParentInstance = suspenseParentInstance.parent;\n }\n const suspenseNode: SuspenseNode = suspenseParentInstance.suspenseNode;\n return getSuspendedByOfSuspenseNode(suspenseNode, devtoolsInstance);\n }\n\n const FALLBACK_THROTTLE_MS: number = 300;\n\n function getSuspendedByRange(\n suspenseNode: SuspenseNode,\n ): null | [number, number] {\n let min = Infinity;\n let max = -Infinity;\n suspenseNode.suspendedBy.forEach((_, ioInfo) => {\n if (ioInfo.end > max) {\n max = ioInfo.end;\n }\n if (ioInfo.start < min) {\n min = ioInfo.start;\n }\n });\n const parentSuspenseNode = suspenseNode.parent;\n if (parentSuspenseNode !== null) {\n let parentMax = -Infinity;\n parentSuspenseNode.suspendedBy.forEach((_, ioInfo) => {\n if (ioInfo.end > parentMax) {\n parentMax = ioInfo.end;\n }\n });\n // The parent max is theoretically the earlier the parent could've committed.\n // Therefore, the theoretical max that the child could be throttled is that plus 300ms.\n const throttleTime = parentMax + FALLBACK_THROTTLE_MS;\n if (throttleTime > max) {\n // If the theoretical throttle time is later than the earliest reveal then we extend\n // the max time to show that this is timespan could possibly get throttled.\n max = throttleTime;\n }\n\n // We use the end of the previous boundary as the start time for this boundary unless,\n // that's earlier than we'd need to expand to the full fallback throttle range. It\n // suggests that the parent was loaded earlier than this one.\n let startTime = max - FALLBACK_THROTTLE_MS;\n if (parentMax > startTime) {\n startTime = parentMax;\n }\n // If the first fetch of this boundary starts before that, then we use that as the start.\n if (startTime < min) {\n min = startTime;\n }\n }\n if (min < Infinity && max > -Infinity) {\n return [min, max];\n }\n return null;\n }\n\n function getAwaitStackFromHooks(\n hooks: HooksTree,\n asyncInfo: ReactAsyncInfo,\n ): null | ReactStackTrace {\n // TODO: We search through the hooks tree generated by inspectHooksOfFiber so that we can\n // use the information already extracted but ideally this search would be faster since we\n // could know which index to extract from the debug state.\n for (let i = 0; i < hooks.length; i++) {\n const node = hooks[i];\n const debugInfo = node.debugInfo;\n if (debugInfo != null && debugInfo.indexOf(asyncInfo) !== -1) {\n // Found a matching Hook. We'll now use its source location to construct a stack.\n const source = node.hookSource;\n if (\n source != null &&\n source.functionName !== null &&\n source.fileName !== null &&\n source.lineNumber !== null &&\n source.columnNumber !== null\n ) {\n // Unfortunately this is in a slightly different format. TODO: Unify HookNode with ReactCallSite.\n const callSite: ReactCallSite = [\n source.functionName,\n source.fileName,\n source.lineNumber,\n source.columnNumber,\n 0,\n 0,\n false,\n ];\n // As we return we'll add any custom hooks parent stacks to the array.\n return [callSite];\n } else {\n return [];\n }\n }\n // Otherwise, search the sub hooks of any custom hook.\n const matchedStack = getAwaitStackFromHooks(node.subHooks, asyncInfo);\n if (matchedStack !== null) {\n // Append this custom hook to the stack trace since it must have been called inside of it.\n const source = node.hookSource;\n if (\n source != null &&\n source.functionName !== null &&\n source.fileName !== null &&\n source.lineNumber !== null &&\n source.columnNumber !== null\n ) {\n // Unfortunately this is in a slightly different format. TODO: Unify HookNode with ReactCallSite.\n const callSite: ReactCallSite = [\n source.functionName,\n source.fileName,\n source.lineNumber,\n source.columnNumber,\n 0,\n 0,\n false,\n ];\n matchedStack.push(callSite);\n }\n return matchedStack;\n }\n }\n return null;\n }\n\n function serializeAsyncInfo(\n asyncInfo: ReactAsyncInfo,\n parentInstance: DevToolsInstance,\n hooks: null | HooksTree,\n ): SerializedAsyncInfo {\n const ioInfo = asyncInfo.awaited;\n const ioOwnerInstance = findNearestOwnerInstance(\n parentInstance,\n ioInfo.owner,\n );\n let awaitStack =\n asyncInfo.debugStack == null\n ? null\n : // While we have a ReactStackTrace on ioInfo.stack, that will point to the location on\n // the server. We need a location that points to the virtual source on the client which\n // we can then use to source map to the original location.\n parseStackTrace(asyncInfo.debugStack, 1);\n let awaitOwnerInstance: null | FiberInstance | VirtualInstance;\n if (\n asyncInfo.owner == null &&\n (awaitStack === null || awaitStack.length === 0)\n ) {\n // We had no owner nor stack for the await. This can happen if you render it as a child\n // or throw a Promise. Replace it with the parent as the await.\n awaitStack = null;\n awaitOwnerInstance =\n parentInstance.kind === FILTERED_FIBER_INSTANCE ? null : parentInstance;\n if (\n parentInstance.kind === FIBER_INSTANCE ||\n parentInstance.kind === FILTERED_FIBER_INSTANCE\n ) {\n const fiber = parentInstance.data;\n switch (fiber.tag) {\n case ClassComponent:\n case FunctionComponent:\n case IncompleteClassComponent:\n case IncompleteFunctionComponent:\n case IndeterminateComponent:\n case MemoComponent:\n case SimpleMemoComponent:\n // If we awaited in the child position of a component, then the best stack would be the\n // return callsite but we don't have that available so instead we skip. The callsite of\n // the JSX would be misleading in this case. The same thing happens with throw-a-Promise.\n if (hooks !== null) {\n // If this component used Hooks we might be able to instead infer the stack from the\n // use() callsite if this async info came from a hook. Let's search the tree to find it.\n awaitStack = getAwaitStackFromHooks(hooks, asyncInfo);\n }\n break;\n default:\n // If we awaited by passing a Promise to a built-in element, then the JSX callsite is a\n // good stack trace to use for the await.\n if (\n fiber._debugOwner != null &&\n fiber._debugStack != null &&\n typeof fiber._debugStack !== 'string'\n ) {\n awaitStack = parseStackTrace(fiber._debugStack, 1);\n awaitOwnerInstance = findNearestOwnerInstance(\n parentInstance,\n fiber._debugOwner,\n );\n }\n }\n }\n } else {\n awaitOwnerInstance = findNearestOwnerInstance(\n parentInstance,\n asyncInfo.owner,\n );\n }\n\n const value: any = ioInfo.value;\n let resolvedValue = undefined;\n if (\n typeof value === 'object' &&\n value !== null &&\n typeof value.then === 'function'\n ) {\n switch (value.status) {\n case 'fulfilled':\n resolvedValue = value.value;\n break;\n case 'rejected':\n resolvedValue = value.reason;\n break;\n }\n }\n return {\n awaited: {\n name: ioInfo.name,\n description: getIODescription(resolvedValue),\n start: ioInfo.start,\n end: ioInfo.end,\n byteSize: ioInfo.byteSize == null ? null : ioInfo.byteSize,\n value: ioInfo.value == null ? null : ioInfo.value,\n env: ioInfo.env == null ? null : ioInfo.env,\n owner:\n ioOwnerInstance === null\n ? null\n : instanceToSerializedElement(ioOwnerInstance),\n stack:\n ioInfo.debugStack == null\n ? null\n : // While we have a ReactStackTrace on ioInfo.stack, that will point to the location on\n // the server. We need a location that points to the virtual source on the client which\n // we can then use to source map to the original location.\n parseStackTrace(ioInfo.debugStack, 1),\n },\n env: asyncInfo.env == null ? null : asyncInfo.env,\n owner:\n awaitOwnerInstance === null\n ? null\n : instanceToSerializedElement(awaitOwnerInstance),\n stack: awaitStack,\n };\n }\n\n // Fast path props lookup for React Native style editor.\n // Could use inspectElementRaw() but that would require shallow rendering hooks components,\n // and could also mess with memoization.\n function getInstanceAndStyle(id: number): InstanceAndStyle {\n let instance = null;\n let style = null;\n\n const devtoolsInstance = idToDevToolsInstanceMap.get(id);\n if (devtoolsInstance === undefined) {\n console.warn(`Could not find DevToolsInstance with id \"${id}\"`);\n return {instance, style};\n }\n if (devtoolsInstance.kind !== FIBER_INSTANCE) {\n // TODO: Handle VirtualInstance.\n return {instance, style};\n }\n\n const fiber = devtoolsInstance.data;\n if (fiber !== null) {\n instance = fiber.stateNode;\n\n if (fiber.memoizedProps !== null) {\n style = fiber.memoizedProps.style;\n }\n }\n\n return {instance, style};\n }\n\n function isErrorBoundary(fiber: Fiber): boolean {\n const {tag, type} = fiber;\n\n switch (tag) {\n case ClassComponent:\n case IncompleteClassComponent:\n const instance = fiber.stateNode;\n return (\n typeof type.getDerivedStateFromError === 'function' ||\n (instance !== null &&\n typeof instance.componentDidCatch === 'function')\n );\n default:\n return false;\n }\n }\n\n function inspectElementRaw(id: number): InspectedElement | null {\n const devtoolsInstance = idToDevToolsInstanceMap.get(id);\n if (devtoolsInstance === undefined) {\n console.warn(`Could not find DevToolsInstance with id \"${id}\"`);\n return null;\n }\n if (devtoolsInstance.kind === VIRTUAL_INSTANCE) {\n return inspectVirtualInstanceRaw(devtoolsInstance);\n }\n if (devtoolsInstance.kind === FIBER_INSTANCE) {\n const isRoot = devtoolsInstance.parent === null;\n return isRoot\n ? inspectRootsRaw(devtoolsInstance.id)\n : inspectFiberInstanceRaw(devtoolsInstance);\n }\n (devtoolsInstance: FilteredFiberInstance); // assert exhaustive\n throw new Error('Unsupported instance kind');\n }\n\n function inspectFiberInstanceRaw(\n fiberInstance: FiberInstance,\n ): InspectedElement | null {\n const fiber = fiberInstance.data;\n if (fiber == null) {\n return null;\n }\n\n const {\n stateNode,\n key,\n memoizedProps,\n memoizedState,\n dependencies,\n tag,\n type,\n } = fiber;\n\n const elementType = getElementTypeForFiber(fiber);\n\n const usesHooks =\n (tag === FunctionComponent ||\n tag === SimpleMemoComponent ||\n tag === ForwardRef) &&\n (!!memoizedState || !!dependencies);\n\n // TODO Show custom UI for Cache like we do for Suspense\n // For now, just hide state data entirely since it's not meant to be inspected.\n const showState =\n tag === ClassComponent || tag === IncompleteClassComponent;\n\n const typeSymbol = getTypeSymbol(type);\n\n let canViewSource = false;\n let context = null;\n if (\n tag === ClassComponent ||\n tag === FunctionComponent ||\n tag === IncompleteClassComponent ||\n tag === IncompleteFunctionComponent ||\n tag === IndeterminateComponent ||\n tag === MemoComponent ||\n tag === ForwardRef ||\n tag === SimpleMemoComponent\n ) {\n canViewSource = true;\n if (stateNode && stateNode.context != null) {\n // Don't show an empty context object for class components that don't use the context API.\n const shouldHideContext =\n elementType === ElementTypeClass &&\n !(type.contextTypes || type.contextType);\n\n if (!shouldHideContext) {\n context = stateNode.context;\n }\n }\n } else if (\n // Detect pre-19 Context Consumers\n (typeSymbol === CONTEXT_NUMBER || typeSymbol === CONTEXT_SYMBOL_STRING) &&\n !(\n // In 19+, CONTEXT_SYMBOL_STRING means a Provider instead.\n // It will be handled in a different branch below.\n // Eventually, this entire branch can be removed.\n (type._context === undefined && type.Provider === type)\n )\n ) {\n // 16.3-16.5 read from \"type\" because the Consumer is the actual context object.\n // 16.6+ should read from \"type._context\" because Consumer can be different (in DEV).\n // NOTE Keep in sync with getDisplayNameForFiber()\n const consumerResolvedContext = type._context || type;\n\n // Global context value.\n context = consumerResolvedContext._currentValue || null;\n\n // Look for overridden value.\n let current = ((fiber: any): Fiber).return;\n while (current !== null) {\n const currentType = current.type;\n const currentTypeSymbol = getTypeSymbol(currentType);\n if (\n currentTypeSymbol === PROVIDER_NUMBER ||\n currentTypeSymbol === PROVIDER_SYMBOL_STRING\n ) {\n // 16.3.0 exposed the context object as \"context\"\n // PR #12501 changed it to \"_context\" for 16.3.1+\n // NOTE Keep in sync with getDisplayNameForFiber()\n const providerResolvedContext =\n currentType._context || currentType.context;\n if (providerResolvedContext === consumerResolvedContext) {\n context = current.memoizedProps.value;\n break;\n }\n }\n\n current = current.return;\n }\n } else if (\n // Detect 19+ Context Consumers\n typeSymbol === CONSUMER_SYMBOL_STRING\n ) {\n // This branch is 19+ only, where Context.Provider === Context.\n // NOTE Keep in sync with getDisplayNameForFiber()\n const consumerResolvedContext = type._context;\n\n // Global context value.\n context = consumerResolvedContext._currentValue || null;\n\n // Look for overridden value.\n let current = ((fiber: any): Fiber).return;\n while (current !== null) {\n const currentType = current.type;\n const currentTypeSymbol = getTypeSymbol(currentType);\n if (\n // In 19+, these are Context Providers\n currentTypeSymbol === CONTEXT_SYMBOL_STRING\n ) {\n const providerResolvedContext = currentType;\n if (providerResolvedContext === consumerResolvedContext) {\n context = current.memoizedProps.value;\n break;\n }\n }\n\n current = current.return;\n }\n }\n\n let hasLegacyContext = false;\n if (context !== null) {\n hasLegacyContext = !!type.contextTypes;\n\n // To simplify hydration and display logic for context, wrap in a value object.\n // Otherwise simple values (e.g. strings, booleans) become harder to handle.\n context = {value: context};\n }\n\n const owners: null | Array<SerializedElement> =\n getOwnersListFromInstance(fiberInstance);\n\n let hooks: null | HooksTree = null;\n if (usesHooks) {\n hooks = inspectHooks(fiber);\n }\n\n let rootType = null;\n let current = fiber;\n let hasErrorBoundary = false;\n let hasSuspenseBoundary = false;\n while (current.return !== null) {\n const temp = current;\n current = current.return;\n if (temp.tag === SuspenseComponent) {\n hasSuspenseBoundary = true;\n } else if (isErrorBoundary(temp)) {\n hasErrorBoundary = true;\n }\n }\n const fiberRoot = current.stateNode;\n if (fiberRoot != null && fiberRoot._debugRootType !== null) {\n rootType = fiberRoot._debugRootType;\n }\n\n let isErrored = false;\n if (isErrorBoundary(fiber)) {\n // if the current inspected element is an error boundary,\n // either that we want to use it to toggle off error state\n // or that we allow to force error state on it if it's within another\n // error boundary\n //\n // TODO: This flag is a leaked implementation detail. Once we start\n // releasing DevTools in lockstep with React, we should import a function\n // from the reconciler instead.\n const DidCapture = 0b000000000000000000010000000;\n isErrored =\n (fiber.flags & DidCapture) !== 0 ||\n forceErrorForFibers.get(fiber) === true ||\n (fiber.alternate !== null &&\n forceErrorForFibers.get(fiber.alternate) === true);\n }\n\n const plugins: Plugins = {\n stylex: null,\n };\n\n if (enableStyleXFeatures) {\n if (memoizedProps != null && memoizedProps.hasOwnProperty('xstyle')) {\n plugins.stylex = getStyleXData(memoizedProps.xstyle);\n }\n }\n\n let source = null;\n if (canViewSource) {\n source = getSourceForFiberInstance(fiberInstance);\n }\n\n let componentLogsEntry = fiberToComponentLogsMap.get(fiber);\n if (componentLogsEntry === undefined && fiber.alternate !== null) {\n componentLogsEntry = fiberToComponentLogsMap.get(fiber.alternate);\n }\n\n let nativeTag = null;\n if (elementType === ElementTypeHostComponent) {\n nativeTag = getNativeTag(fiber.stateNode);\n }\n\n let isSuspended: boolean | null = null;\n if (tag === SuspenseComponent) {\n isSuspended = memoizedState !== null;\n }\n\n const suspendedBy =\n fiberInstance.suspenseNode !== null\n ? // If this is a Suspense boundary, then we include everything in the subtree that might suspend\n // this boundary down to the next Suspense boundary.\n getSuspendedByOfSuspenseNode(fiberInstance.suspenseNode, null)\n : tag === ActivityComponent\n ? // For Activity components we show everything that suspends the subtree down to the next boundary\n // so that you can see what suspends a Transition at that level.\n getSuspendedByOfInstanceSubtree(fiberInstance)\n : // This set is an edge case where if you pass a promise to a Client Component into a children\n // position without a Server Component as the direct parent. E.g. <div>{promise}</div>\n // In this case, this becomes associated with the Client/Host Component where as normally\n // you'd expect these to be associated with the Server Component that awaited the data.\n // TODO: Prepend other suspense sources like css, images and use().\n getSuspendedByOfInstance(fiberInstance, hooks);\n const suspendedByRange = getSuspendedByRange(\n getNearestSuspenseNode(fiberInstance),\n );\n\n let unknownSuspenders = UNKNOWN_SUSPENDERS_NONE;\n if (\n fiberInstance.suspenseNode !== null &&\n fiberInstance.suspenseNode.hasUnknownSuspenders &&\n !isSuspended\n ) {\n // Something unknown threw to suspended this boundary. Let's figure out why that might be.\n if (renderer.bundleType === 0) {\n unknownSuspenders = UNKNOWN_SUSPENDERS_REASON_PRODUCTION;\n } else if (!('_debugInfo' in fiber)) {\n // TODO: We really should detect _debugThenable and the auto-instrumentation for lazy/thenables too.\n unknownSuspenders = UNKNOWN_SUSPENDERS_REASON_OLD_VERSION;\n } else {\n unknownSuspenders = UNKNOWN_SUSPENDERS_REASON_THROWN_PROMISE;\n }\n }\n\n return {\n id: fiberInstance.id,\n\n // Does the current renderer support editable hooks and function props?\n canEditHooks: typeof overrideHookState === 'function',\n canEditFunctionProps: typeof overrideProps === 'function',\n\n // Does the current renderer support advanced editing interface?\n canEditHooksAndDeletePaths:\n typeof overrideHookStateDeletePath === 'function',\n canEditHooksAndRenamePaths:\n typeof overrideHookStateRenamePath === 'function',\n canEditFunctionPropsDeletePaths:\n typeof overridePropsDeletePath === 'function',\n canEditFunctionPropsRenamePaths:\n typeof overridePropsRenamePath === 'function',\n\n canToggleError: supportsTogglingError && hasErrorBoundary,\n // Is this error boundary in error state.\n isErrored,\n\n canToggleSuspense:\n supportsTogglingSuspense &&\n hasSuspenseBoundary &&\n // If it's showing the real content, we can always flip fallback.\n (!isSuspended ||\n // If it's showing fallback because we previously forced it to,\n // allow toggling it back to remove the fallback override.\n forceFallbackForFibers.has(fiber) ||\n (fiber.alternate !== null &&\n forceFallbackForFibers.has(fiber.alternate))),\n isSuspended: isSuspended,\n\n source,\n\n stack:\n fiber._debugOwner == null || fiber._debugStack == null\n ? null\n : parseStackTrace(fiber._debugStack, 1),\n\n // Does the component have legacy context attached to it.\n hasLegacyContext,\n\n key: key != null ? key : null,\n\n type: elementType,\n\n // Inspectable properties.\n // TODO Review sanitization approach for the below inspectable values.\n context,\n hooks,\n props: memoizedProps,\n state: showState ? memoizedState : null,\n errors:\n componentLogsEntry === undefined\n ? []\n : Array.from(componentLogsEntry.errors.entries()),\n warnings:\n componentLogsEntry === undefined\n ? []\n : Array.from(componentLogsEntry.warnings.entries()),\n\n suspendedBy: suspendedBy,\n suspendedByRange: suspendedByRange,\n unknownSuspenders: unknownSuspenders,\n\n // List of owners\n owners,\n\n env: null,\n\n rootType,\n rendererPackageName: renderer.rendererPackageName,\n rendererVersion: renderer.version,\n\n plugins,\n\n nativeTag,\n };\n }\n\n function inspectVirtualInstanceRaw(\n virtualInstance: VirtualInstance,\n ): InspectedElement | null {\n const source = getSourceForInstance(virtualInstance);\n\n const componentInfo = virtualInstance.data;\n const key =\n typeof componentInfo.key === 'string' ? componentInfo.key : null;\n const props = componentInfo.props == null ? null : componentInfo.props;\n const owners: null | Array<SerializedElement> =\n getOwnersListFromInstance(virtualInstance);\n\n let rootType = null;\n let hasErrorBoundary = false;\n let hasSuspenseBoundary = false;\n const nearestFiber = getNearestFiber(virtualInstance);\n if (nearestFiber !== null) {\n let current = nearestFiber;\n while (current.return !== null) {\n const temp = current;\n current = current.return;\n if (temp.tag === SuspenseComponent) {\n hasSuspenseBoundary = true;\n } else if (isErrorBoundary(temp)) {\n hasErrorBoundary = true;\n }\n }\n const fiberRoot = current.stateNode;\n if (fiberRoot != null && fiberRoot._debugRootType !== null) {\n rootType = fiberRoot._debugRootType;\n }\n }\n\n const plugins: Plugins = {\n stylex: null,\n };\n\n const componentLogsEntry =\n componentInfoToComponentLogsMap.get(componentInfo);\n\n const isSuspended = null;\n // Things that Suspended this Server Component (use(), awaits and direct child promises)\n const suspendedBy = getSuspendedByOfInstance(virtualInstance, null);\n const suspendedByRange = getSuspendedByRange(\n getNearestSuspenseNode(virtualInstance),\n );\n\n return {\n id: virtualInstance.id,\n\n canEditHooks: false,\n canEditFunctionProps: false,\n\n canEditHooksAndDeletePaths: false,\n canEditHooksAndRenamePaths: false,\n canEditFunctionPropsDeletePaths: false,\n canEditFunctionPropsRenamePaths: false,\n\n canToggleError: supportsTogglingError && hasErrorBoundary,\n isErrored: false,\n\n canToggleSuspense: supportsTogglingSuspense && hasSuspenseBoundary,\n isSuspended: isSuspended,\n\n source,\n\n stack:\n componentInfo.owner == null || componentInfo.debugStack == null\n ? null\n : parseStackTrace(componentInfo.debugStack, 1),\n\n // Does the component have legacy context attached to it.\n hasLegacyContext: false,\n\n key: key,\n\n type: ElementTypeVirtual,\n\n // Inspectable properties.\n // TODO Review sanitization approach for the below inspectable values.\n context: null,\n hooks: null,\n props: props,\n state: null,\n errors:\n componentLogsEntry === undefined\n ? []\n : Array.from(componentLogsEntry.errors.entries()),\n warnings:\n componentLogsEntry === undefined\n ? []\n : Array.from(componentLogsEntry.warnings.entries()),\n\n suspendedBy: suspendedBy,\n suspendedByRange: suspendedByRange,\n unknownSuspenders: UNKNOWN_SUSPENDERS_NONE,\n\n // List of owners\n owners,\n\n env: componentInfo.env == null ? null : componentInfo.env,\n\n rootType,\n rendererPackageName: renderer.rendererPackageName,\n rendererVersion: renderer.version,\n\n plugins,\n\n nativeTag: null,\n };\n }\n\n let mostRecentlyInspectedElement: InspectedElement | null = null;\n let hasElementUpdatedSinceLastInspected: boolean = false;\n let currentlyInspectedPaths: Object = {};\n\n function isMostRecentlyInspectedElement(id: number): boolean {\n if (mostRecentlyInspectedElement === null) {\n return false;\n }\n if (mostRecentlyInspectedElement.id === id) {\n return true;\n }\n\n if (mostRecentlyInspectedElement.type === ElementTypeRoot) {\n // we inspected the screen recently. If we're inspecting another root, we're\n // still inspecting the screen.\n const instance = idToDevToolsInstanceMap.get(id);\n return (\n instance !== undefined &&\n instance.kind === FIBER_INSTANCE &&\n instance.parent === null\n );\n }\n return false;\n }\n\n function isMostRecentlyInspectedElementCurrent(id: number): boolean {\n return (\n isMostRecentlyInspectedElement(id) && !hasElementUpdatedSinceLastInspected\n );\n }\n\n // Track the intersection of currently inspected paths,\n // so that we can send their data along if the element is re-rendered.\n function mergeInspectedPaths(path: Array<string | number>) {\n let current = currentlyInspectedPaths;\n path.forEach(key => {\n if (!current[key]) {\n current[key] = {};\n }\n current = current[key];\n });\n }\n\n function createIsPathAllowed(\n key: string | null,\n secondaryCategory: 'suspendedBy' | 'hooks' | null,\n ) {\n // This function helps prevent previously-inspected paths from being dehydrated in updates.\n // This is important to avoid a bad user experience where expanded toggles collapse on update.\n return function isPathAllowed(path: Array<string | number>): boolean {\n switch (secondaryCategory) {\n case 'hooks':\n if (path.length === 1) {\n // Never dehydrate the \"hooks\" object at the top levels.\n return true;\n }\n\n if (\n path[path.length - 2] === 'hookSource' &&\n path[path.length - 1] === 'fileName'\n ) {\n // It's important to preserve the full file name (URL) for hook sources\n // in case the user has enabled the named hooks feature.\n // Otherwise the frontend may end up with a partial URL which it can't load.\n return true;\n }\n\n if (\n path[path.length - 1] === 'subHooks' ||\n path[path.length - 2] === 'subHooks'\n ) {\n // Dehydrating the 'subHooks' property makes the HooksTree UI a lot more complicated,\n // so it's easiest for now if we just don't break on this boundary.\n // We can always dehydrate a level deeper (in the value object).\n return true;\n }\n break;\n case 'suspendedBy':\n if (path.length < 5) {\n // Never dehydrate anything above suspendedBy[index].awaited.value\n // Those are part of the internal meta data. We only dehydrate inside the Promise.\n return true;\n }\n break;\n default:\n break;\n }\n\n let current =\n key === null ? currentlyInspectedPaths : currentlyInspectedPaths[key];\n if (!current) {\n return false;\n }\n for (let i = 0; i < path.length; i++) {\n current = current[path[i]];\n if (!current) {\n return false;\n }\n }\n return true;\n };\n }\n\n function updateSelectedElement(inspectedElement: InspectedElement): void {\n const {hooks, id, props} = inspectedElement;\n\n const devtoolsInstance = idToDevToolsInstanceMap.get(id);\n if (devtoolsInstance === undefined) {\n console.warn(`Could not find DevToolsInstance with id \"${id}\"`);\n return;\n }\n if (devtoolsInstance.kind !== FIBER_INSTANCE) {\n // TODO: Handle VirtualInstance.\n return;\n }\n\n const fiber = devtoolsInstance.data;\n const {elementType, stateNode, tag, type} = fiber;\n\n switch (tag) {\n case ClassComponent:\n case IncompleteClassComponent:\n case IndeterminateComponent:\n global.$r = stateNode;\n break;\n case IncompleteFunctionComponent:\n case FunctionComponent:\n global.$r = {\n hooks,\n props,\n type,\n };\n break;\n case ForwardRef:\n global.$r = {\n hooks,\n props,\n type: type.render,\n };\n break;\n case MemoComponent:\n case SimpleMemoComponent:\n global.$r = {\n hooks,\n props,\n type:\n elementType != null && elementType.type != null\n ? elementType.type\n : type,\n };\n break;\n default:\n global.$r = null;\n break;\n }\n }\n\n function storeAsGlobal(\n id: number,\n path: Array<string | number>,\n count: number,\n ): void {\n if (isMostRecentlyInspectedElement(id)) {\n const value = getInObject(\n ((mostRecentlyInspectedElement: any): InspectedElement),\n path,\n );\n const key = `$reactTemp${count}`;\n\n window[key] = value;\n\n console.log(key);\n console.log(value);\n }\n }\n\n function getSerializedElementValueByPath(\n id: number,\n path: Array<string | number>,\n ): ?string {\n if (isMostRecentlyInspectedElement(id)) {\n const valueToCopy = getInObject(\n ((mostRecentlyInspectedElement: any): InspectedElement),\n path,\n );\n\n return serializeToString(valueToCopy);\n }\n }\n\n function inspectElement(\n requestID: number,\n id: number,\n path: Array<string | number> | null,\n forceFullData: boolean,\n ): InspectedElementPayload {\n if (path !== null) {\n mergeInspectedPaths(path);\n }\n\n if (isMostRecentlyInspectedElement(id) && !forceFullData) {\n if (!hasElementUpdatedSinceLastInspected) {\n if (path !== null) {\n let secondaryCategory: 'suspendedBy' | 'hooks' | null = null;\n if (path[0] === 'hooks' || path[0] === 'suspendedBy') {\n secondaryCategory = path[0];\n }\n\n // If this element has not been updated since it was last inspected,\n // we can just return the subset of data in the newly-inspected path.\n return {\n id,\n responseID: requestID,\n type: 'hydrated-path',\n path,\n value: cleanForBridge(\n getInObject(\n ((mostRecentlyInspectedElement: any): InspectedElement),\n path,\n ),\n createIsPathAllowed(null, secondaryCategory),\n path,\n ),\n };\n } else {\n // If this element has not been updated since it was last inspected, we don't need to return it.\n // Instead we can just return the ID to indicate that it has not changed.\n return {\n id,\n responseID: requestID,\n type: 'no-change',\n };\n }\n }\n } else {\n currentlyInspectedPaths = {};\n }\n\n hasElementUpdatedSinceLastInspected = false;\n\n try {\n mostRecentlyInspectedElement = inspectElementRaw(id);\n } catch (error) {\n // the error name is synced with ReactDebugHooks\n if (error.name === 'ReactDebugToolsRenderError') {\n let message = 'Error rendering inspected element.';\n let stack;\n // Log error & cause for user to debug\n console.error(message + '\\n\\n', error);\n if (error.cause != null) {\n const componentName = getDisplayNameForElementID(id);\n console.error(\n 'React DevTools encountered an error while trying to inspect hooks. ' +\n 'This is most likely caused by an error in current inspected component' +\n (componentName != null ? `: \"${componentName}\".` : '.') +\n '\\nThe error thrown in the component is: \\n\\n',\n error.cause,\n );\n if (error.cause instanceof Error) {\n message = error.cause.message || message;\n stack = error.cause.stack;\n }\n }\n\n return {\n type: 'error',\n errorType: 'user',\n id,\n responseID: requestID,\n message,\n stack,\n };\n }\n\n // the error name is synced with ReactDebugHooks\n if (error.name === 'ReactDebugToolsUnsupportedHookError') {\n return {\n type: 'error',\n errorType: 'unknown-hook',\n id,\n responseID: requestID,\n message:\n 'Unsupported hook in the react-debug-tools package: ' +\n error.message,\n };\n }\n\n // Log Uncaught Error\n console.error('Error inspecting element.\\n\\n', error);\n\n return {\n type: 'error',\n errorType: 'uncaught',\n id,\n responseID: requestID,\n message: error.message,\n stack: error.stack,\n };\n }\n\n if (mostRecentlyInspectedElement === null) {\n return {\n id,\n responseID: requestID,\n type: 'not-found',\n };\n }\n const inspectedElement = mostRecentlyInspectedElement;\n\n // Any time an inspected element has an update,\n // we should update the selected $r value as wel.\n // Do this before dehydration (cleanForBridge).\n updateSelectedElement(inspectedElement);\n\n // Clone before cleaning so that we preserve the full data.\n // This will enable us to send patches without re-inspecting if hydrated paths are requested.\n // (Reducing how often we shallow-render is a better DX for function components that use hooks.)\n const cleanedInspectedElement = {...inspectedElement};\n // $FlowFixMe[prop-missing] found when upgrading Flow\n cleanedInspectedElement.context = cleanForBridge(\n inspectedElement.context,\n createIsPathAllowed('context', null),\n );\n // $FlowFixMe[prop-missing] found when upgrading Flow\n cleanedInspectedElement.hooks = cleanForBridge(\n inspectedElement.hooks,\n createIsPathAllowed('hooks', 'hooks'),\n );\n // $FlowFixMe[prop-missing] found when upgrading Flow\n cleanedInspectedElement.props = cleanForBridge(\n inspectedElement.props,\n createIsPathAllowed('props', null),\n );\n // $FlowFixMe[prop-missing] found when upgrading Flow\n cleanedInspectedElement.state = cleanForBridge(\n inspectedElement.state,\n createIsPathAllowed('state', null),\n );\n // $FlowFixMe[prop-missing] found when upgrading Flow\n cleanedInspectedElement.suspendedBy = cleanForBridge(\n inspectedElement.suspendedBy,\n createIsPathAllowed('suspendedBy', 'suspendedBy'),\n );\n\n return {\n id,\n responseID: requestID,\n type: 'full-data',\n // $FlowFixMe[prop-missing] found when upgrading Flow\n value: cleanedInspectedElement,\n };\n }\n\n function inspectRootsRaw(arbitraryRootID: number): InspectedElement | null {\n const roots = hook.getFiberRoots(rendererID);\n if (roots.size === 0) {\n return null;\n }\n\n const inspectedRoots: InspectedElement = {\n // invariants\n id: arbitraryRootID,\n type: ElementTypeRoot,\n // Properties we merge\n isErrored: false,\n errors: [],\n warnings: [],\n suspendedBy: [],\n suspendedByRange: null,\n // TODO: How to merge these?\n unknownSuspenders: UNKNOWN_SUSPENDERS_NONE,\n // Properties where merging doesn't make sense so we ignore them entirely in the UI\n rootType: null,\n plugins: {stylex: null},\n nativeTag: null,\n env: null,\n source: null,\n stack: null,\n rendererPackageName: null,\n rendererVersion: null,\n // These don't make sense for a Root. They're just bottom values.\n key: null,\n canEditFunctionProps: false,\n canEditHooks: false,\n canEditFunctionPropsDeletePaths: false,\n canEditFunctionPropsRenamePaths: false,\n canEditHooksAndDeletePaths: false,\n canEditHooksAndRenamePaths: false,\n canToggleError: false,\n canToggleSuspense: false,\n isSuspended: false,\n hasLegacyContext: false,\n context: null,\n hooks: null,\n props: null,\n state: null,\n owners: null,\n };\n\n let minSuspendedByRange = Infinity;\n let maxSuspendedByRange = -Infinity;\n roots.forEach(root => {\n const rootInstance = rootToFiberInstanceMap.get(root);\n if (rootInstance === undefined) {\n throw new Error(\n 'Expected a root instance to exist for this Fiber root',\n );\n }\n const inspectedRoot = inspectFiberInstanceRaw(rootInstance);\n if (inspectedRoot === null) {\n return;\n }\n\n if (inspectedRoot.isErrored) {\n inspectedRoots.isErrored = true;\n }\n for (let i = 0; i < inspectedRoot.errors.length; i++) {\n inspectedRoots.errors.push(inspectedRoot.errors[i]);\n }\n for (let i = 0; i < inspectedRoot.warnings.length; i++) {\n inspectedRoots.warnings.push(inspectedRoot.warnings[i]);\n }\n for (let i = 0; i < inspectedRoot.suspendedBy.length; i++) {\n inspectedRoots.suspendedBy.push(inspectedRoot.suspendedBy[i]);\n }\n const suspendedByRange = inspectedRoot.suspendedByRange;\n if (suspendedByRange !== null) {\n if (suspendedByRange[0] < minSuspendedByRange) {\n minSuspendedByRange = suspendedByRange[0];\n }\n if (suspendedByRange[1] > maxSuspendedByRange) {\n maxSuspendedByRange = suspendedByRange[1];\n }\n }\n });\n\n if (minSuspendedByRange !== Infinity || maxSuspendedByRange !== -Infinity) {\n inspectedRoots.suspendedByRange = [\n minSuspendedByRange,\n maxSuspendedByRange,\n ];\n }\n\n return inspectedRoots;\n }\n\n function logElementToConsole(id: number) {\n const result = isMostRecentlyInspectedElementCurrent(id)\n ? mostRecentlyInspectedElement\n : inspectElementRaw(id);\n if (result === null) {\n console.warn(`Could not find DevToolsInstance with id \"${id}\"`);\n return;\n }\n\n const displayName = getDisplayNameForElementID(id);\n\n const supportsGroup = typeof console.groupCollapsed === 'function';\n if (supportsGroup) {\n console.groupCollapsed(\n `[Click to expand] %c<${displayName || 'Component'} />`,\n // --dom-tag-name-color is the CSS variable Chrome styles HTML elements with in the console.\n 'color: var(--dom-tag-name-color); font-weight: normal;',\n );\n }\n if (result.props !== null) {\n console.log('Props:', result.props);\n }\n if (result.state !== null) {\n console.log('State:', result.state);\n }\n if (result.hooks !== null) {\n console.log('Hooks:', result.hooks);\n }\n const hostInstances = findHostInstancesForElementID(id);\n if (hostInstances !== null) {\n console.log('Nodes:', hostInstances);\n }\n if (window.chrome || /firefox/i.test(navigator.userAgent)) {\n console.log(\n 'Right-click any value to save it as a global variable for further inspection.',\n );\n }\n if (supportsGroup) {\n console.groupEnd();\n }\n }\n\n function deletePath(\n type: 'context' | 'hooks' | 'props' | 'state',\n id: number,\n hookID: ?number,\n path: Array<string | number>,\n ): void {\n const devtoolsInstance = idToDevToolsInstanceMap.get(id);\n if (devtoolsInstance === undefined) {\n console.warn(`Could not find DevToolsInstance with id \"${id}\"`);\n return;\n }\n if (devtoolsInstance.kind !== FIBER_INSTANCE) {\n // TODO: Handle VirtualInstance.\n return;\n }\n const fiber = devtoolsInstance.data;\n if (fiber !== null) {\n const instance = fiber.stateNode;\n\n switch (type) {\n case 'context':\n // To simplify hydration and display of primitive context values (e.g. number, string)\n // the inspectElement() method wraps context in a {value: ...} object.\n // We need to remove the first part of the path (the \"value\") before continuing.\n path = path.slice(1);\n\n switch (fiber.tag) {\n case ClassComponent:\n if (path.length === 0) {\n // Simple context value (noop)\n } else {\n deletePathInObject(instance.context, path);\n }\n instance.forceUpdate();\n break;\n case FunctionComponent:\n // Function components using legacy context are not editable\n // because there's no instance on which to create a cloned, mutated context.\n break;\n }\n break;\n case 'hooks':\n if (typeof overrideHookStateDeletePath === 'function') {\n overrideHookStateDeletePath(fiber, ((hookID: any): number), path);\n }\n break;\n case 'props':\n if (instance === null) {\n if (typeof overridePropsDeletePath === 'function') {\n overridePropsDeletePath(fiber, path);\n }\n } else {\n fiber.pendingProps = copyWithDelete(instance.props, path);\n instance.forceUpdate();\n }\n break;\n case 'state':\n deletePathInObject(instance.state, path);\n instance.forceUpdate();\n break;\n }\n }\n }\n\n function renamePath(\n type: 'context' | 'hooks' | 'props' | 'state',\n id: number,\n hookID: ?number,\n oldPath: Array<string | number>,\n newPath: Array<string | number>,\n ): void {\n const devtoolsInstance = idToDevToolsInstanceMap.get(id);\n if (devtoolsInstance === undefined) {\n console.warn(`Could not find DevToolsInstance with id \"${id}\"`);\n return;\n }\n if (devtoolsInstance.kind !== FIBER_INSTANCE) {\n // TODO: Handle VirtualInstance.\n return;\n }\n const fiber = devtoolsInstance.data;\n if (fiber !== null) {\n const instance = fiber.stateNode;\n\n switch (type) {\n case 'context':\n // To simplify hydration and display of primitive context values (e.g. number, string)\n // the inspectElement() method wraps context in a {value: ...} object.\n // We need to remove the first part of the path (the \"value\") before continuing.\n oldPath = oldPath.slice(1);\n newPath = newPath.slice(1);\n\n switch (fiber.tag) {\n case ClassComponent:\n if (oldPath.length === 0) {\n // Simple context value (noop)\n } else {\n renamePathInObject(instance.context, oldPath, newPath);\n }\n instance.forceUpdate();\n break;\n case FunctionComponent:\n // Function components using legacy context are not editable\n // because there's no instance on which to create a cloned, mutated context.\n break;\n }\n break;\n case 'hooks':\n if (typeof overrideHookStateRenamePath === 'function') {\n overrideHookStateRenamePath(\n fiber,\n ((hookID: any): number),\n oldPath,\n newPath,\n );\n }\n break;\n case 'props':\n if (instance === null) {\n if (typeof overridePropsRenamePath === 'function') {\n overridePropsRenamePath(fiber, oldPath, newPath);\n }\n } else {\n fiber.pendingProps = copyWithRename(\n instance.props,\n oldPath,\n newPath,\n );\n instance.forceUpdate();\n }\n break;\n case 'state':\n renamePathInObject(instance.state, oldPath, newPath);\n instance.forceUpdate();\n break;\n }\n }\n }\n\n function overrideValueAtPath(\n type: 'context' | 'hooks' | 'props' | 'state',\n id: number,\n hookID: ?number,\n path: Array<string | number>,\n value: any,\n ): void {\n const devtoolsInstance = idToDevToolsInstanceMap.get(id);\n if (devtoolsInstance === undefined) {\n console.warn(`Could not find DevToolsInstance with id \"${id}\"`);\n return;\n }\n if (devtoolsInstance.kind !== FIBER_INSTANCE) {\n // TODO: Handle VirtualInstance.\n return;\n }\n const fiber = devtoolsInstance.data;\n if (fiber !== null) {\n const instance = fiber.stateNode;\n\n switch (type) {\n case 'context':\n // To simplify hydration and display of primitive context values (e.g. number, string)\n // the inspectElement() method wraps context in a {value: ...} object.\n // We need to remove the first part of the path (the \"value\") before continuing.\n path = path.slice(1);\n\n switch (fiber.tag) {\n case ClassComponent:\n if (path.length === 0) {\n // Simple context value\n instance.context = value;\n } else {\n setInObject(instance.context, path, value);\n }\n instance.forceUpdate();\n break;\n case FunctionComponent:\n // Function components using legacy context are not editable\n // because there's no instance on which to create a cloned, mutated context.\n break;\n }\n break;\n case 'hooks':\n if (typeof overrideHookState === 'function') {\n overrideHookState(fiber, ((hookID: any): number), path, value);\n }\n break;\n case 'props':\n switch (fiber.tag) {\n case ClassComponent:\n fiber.pendingProps = copyWithSet(instance.props, path, value);\n instance.forceUpdate();\n break;\n default:\n if (typeof overrideProps === 'function') {\n overrideProps(fiber, path, value);\n }\n break;\n }\n break;\n case 'state':\n switch (fiber.tag) {\n case ClassComponent:\n setInObject(instance.state, path, value);\n instance.forceUpdate();\n break;\n }\n break;\n }\n }\n }\n\n type CommitProfilingData = {\n changeDescriptions: Map<number, ChangeDescription> | null,\n commitTime: number,\n durations: Array<number>,\n effectDuration: number | null,\n maxActualDuration: number,\n passiveEffectDuration: number | null,\n priorityLevel: string | null,\n updaters: Array<SerializedElement> | null,\n };\n\n type CommitProfilingMetadataMap = Map<number, Array<CommitProfilingData>>;\n type DisplayNamesByRootID = Map<number, string>;\n\n let currentCommitProfilingMetadata: CommitProfilingData | null = null;\n let displayNamesByRootID: DisplayNamesByRootID | null = null;\n let initialTreeBaseDurationsMap: Map<number, Array<[number, number]>> | null =\n null;\n let isProfiling: boolean = false;\n let profilingStartTime: number = 0;\n let recordChangeDescriptions: boolean = false;\n let recordTimeline: boolean = false;\n let rootToCommitProfilingMetadataMap: CommitProfilingMetadataMap | null =\n null;\n\n function getProfilingData(): ProfilingDataBackend {\n const dataForRoots: Array<ProfilingDataForRootBackend> = [];\n\n if (rootToCommitProfilingMetadataMap === null) {\n throw Error(\n 'getProfilingData() called before any profiling data was recorded',\n );\n }\n\n rootToCommitProfilingMetadataMap.forEach(\n (commitProfilingMetadata, rootID) => {\n const commitData: Array<CommitDataBackend> = [];\n\n const displayName =\n (displayNamesByRootID !== null && displayNamesByRootID.get(rootID)) ||\n 'Unknown';\n\n const initialTreeBaseDurations: Array<[number, number]> =\n (initialTreeBaseDurationsMap !== null &&\n initialTreeBaseDurationsMap.get(rootID)) ||\n [];\n\n commitProfilingMetadata.forEach((commitProfilingData, commitIndex) => {\n const {\n changeDescriptions,\n durations,\n effectDuration,\n maxActualDuration,\n passiveEffectDuration,\n priorityLevel,\n commitTime,\n updaters,\n } = commitProfilingData;\n\n const fiberActualDurations: Array<[number, number]> = [];\n const fiberSelfDurations: Array<[number, number]> = [];\n for (let i = 0; i < durations.length; i += 3) {\n const fiberID = durations[i];\n fiberActualDurations.push([\n fiberID,\n formatDurationToMicrosecondsGranularity(durations[i + 1]),\n ]);\n fiberSelfDurations.push([\n fiberID,\n formatDurationToMicrosecondsGranularity(durations[i + 2]),\n ]);\n }\n\n commitData.push({\n changeDescriptions:\n changeDescriptions !== null\n ? Array.from(changeDescriptions.entries())\n : null,\n duration:\n formatDurationToMicrosecondsGranularity(maxActualDuration),\n effectDuration:\n effectDuration !== null\n ? formatDurationToMicrosecondsGranularity(effectDuration)\n : null,\n fiberActualDurations,\n fiberSelfDurations,\n passiveEffectDuration:\n passiveEffectDuration !== null\n ? formatDurationToMicrosecondsGranularity(passiveEffectDuration)\n : null,\n priorityLevel,\n timestamp: commitTime,\n updaters,\n });\n });\n\n dataForRoots.push({\n commitData,\n displayName,\n initialTreeBaseDurations,\n rootID,\n });\n },\n );\n\n let timelineData = null;\n if (typeof getTimelineData === 'function') {\n const currentTimelineData = getTimelineData();\n if (currentTimelineData) {\n const {\n batchUIDToMeasuresMap,\n internalModuleSourceToRanges,\n laneToLabelMap,\n laneToReactMeasureMap,\n ...rest\n } = currentTimelineData;\n\n timelineData = {\n ...rest,\n\n // Most of the data is safe to parse as-is,\n // but we need to convert the nested Arrays back to Maps.\n // Most of the data is safe to serialize as-is,\n // but we need to convert the Maps to nested Arrays.\n batchUIDToMeasuresKeyValueArray: Array.from(\n batchUIDToMeasuresMap.entries(),\n ),\n internalModuleSourceToRanges: Array.from(\n internalModuleSourceToRanges.entries(),\n ),\n laneToLabelKeyValueArray: Array.from(laneToLabelMap.entries()),\n laneToReactMeasureKeyValueArray: Array.from(\n laneToReactMeasureMap.entries(),\n ),\n };\n }\n }\n\n return {\n dataForRoots,\n rendererID,\n timelineData,\n };\n }\n\n function snapshotTreeBaseDurations(\n instance: DevToolsInstance,\n target: Array<[number, number]>,\n ) {\n // We don't need to convert milliseconds to microseconds in this case,\n // because the profiling summary is JSON serialized.\n if (instance.kind !== FILTERED_FIBER_INSTANCE) {\n target.push([instance.id, instance.treeBaseDuration]);\n }\n for (\n let child = instance.firstChild;\n child !== null;\n child = child.nextSibling\n ) {\n snapshotTreeBaseDurations(child, target);\n }\n }\n\n function startProfiling(\n shouldRecordChangeDescriptions: boolean,\n shouldRecordTimeline: boolean,\n ) {\n if (isProfiling) {\n return;\n }\n\n recordChangeDescriptions = shouldRecordChangeDescriptions;\n recordTimeline = shouldRecordTimeline;\n\n // Capture initial values as of the time profiling starts.\n // It's important we snapshot both the durations and the id-to-root map,\n // since either of these may change during the profiling session\n // (e.g. when a fiber is re-rendered or when a fiber gets removed).\n displayNamesByRootID = new Map();\n initialTreeBaseDurationsMap = new Map();\n\n hook.getFiberRoots(rendererID).forEach(root => {\n const rootInstance = rootToFiberInstanceMap.get(root);\n if (rootInstance === undefined) {\n throw new Error(\n 'Expected the root instance to already exist when starting profiling',\n );\n }\n const rootID = rootInstance.id;\n ((displayNamesByRootID: any): DisplayNamesByRootID).set(\n rootID,\n getDisplayNameForRoot(root.current),\n );\n const initialTreeBaseDurations: Array<[number, number]> = [];\n snapshotTreeBaseDurations(rootInstance, initialTreeBaseDurations);\n (initialTreeBaseDurationsMap: any).set(rootID, initialTreeBaseDurations);\n });\n\n isProfiling = true;\n profilingStartTime = getCurrentTime();\n rootToCommitProfilingMetadataMap = new Map();\n\n if (toggleProfilingStatus !== null) {\n toggleProfilingStatus(true, recordTimeline);\n }\n }\n\n function stopProfiling() {\n isProfiling = false;\n recordChangeDescriptions = false;\n\n if (toggleProfilingStatus !== null) {\n toggleProfilingStatus(false, recordTimeline);\n }\n\n recordTimeline = false;\n }\n\n // Automatically start profiling so that we don't miss timing info from initial \"mount\".\n if (shouldStartProfilingNow) {\n startProfiling(\n profilingSettings.recordChangeDescriptions,\n profilingSettings.recordTimeline,\n );\n }\n\n function getNearestFiber(devtoolsInstance: DevToolsInstance): null | Fiber {\n if (devtoolsInstance.kind === VIRTUAL_INSTANCE) {\n let inst: DevToolsInstance = devtoolsInstance;\n while (inst.kind === VIRTUAL_INSTANCE) {\n // For virtual instances, we search deeper until we find a Fiber instance.\n // Then we search upwards from that Fiber. That's because Virtual Instances\n // will always have an Fiber child filtered or not. If we searched its parents\n // we might skip through a filtered Error Boundary before we hit a FiberInstance.\n if (inst.firstChild === null) {\n return null;\n }\n inst = inst.firstChild;\n }\n return inst.data.return;\n } else {\n return devtoolsInstance.data;\n }\n }\n\n // React will switch between these implementations depending on whether\n // we have any manually suspended/errored-out Fibers or not.\n function shouldErrorFiberAlwaysNull() {\n return null;\n }\n\n // Map of Fiber and its force error status: true (error), false (toggled off)\n const forceErrorForFibers = new Map<Fiber, boolean>();\n\n function shouldErrorFiberAccordingToMap(fiber: any): boolean {\n if (typeof setErrorHandler !== 'function') {\n throw new Error(\n 'Expected overrideError() to not get called for earlier React versions.',\n );\n }\n\n let status = forceErrorForFibers.get(fiber);\n if (status === false) {\n // TRICKY overrideError adds entries to this Map,\n // so ideally it would be the method that clears them too,\n // but that would break the functionality of the feature,\n // since DevTools needs to tell React to act differently than it normally would\n // (don't just re-render the failed boundary, but reset its errored state too).\n // So we can only clear it after telling React to reset the state.\n // Technically this is premature and we should schedule it for later,\n // since the render could always fail without committing the updated error boundary,\n // but since this is a DEV-only feature, the simplicity is worth the trade off.\n forceErrorForFibers.delete(fiber);\n if (forceErrorForFibers.size === 0) {\n // Last override is gone. Switch React back to fast path.\n setErrorHandler(shouldErrorFiberAlwaysNull);\n }\n return false;\n }\n if (status === undefined && fiber.alternate !== null) {\n status = forceErrorForFibers.get(fiber.alternate);\n if (status === false) {\n forceErrorForFibers.delete(fiber.alternate);\n if (forceErrorForFibers.size === 0) {\n // Last override is gone. Switch React back to fast path.\n setErrorHandler(shouldErrorFiberAlwaysNull);\n }\n }\n }\n if (status === undefined) {\n return false;\n }\n return status;\n }\n\n function overrideError(id: number, forceError: boolean) {\n if (\n typeof setErrorHandler !== 'function' ||\n typeof scheduleUpdate !== 'function'\n ) {\n throw new Error(\n 'Expected overrideError() to not get called for earlier React versions.',\n );\n }\n\n const devtoolsInstance = idToDevToolsInstanceMap.get(id);\n if (devtoolsInstance === undefined) {\n return;\n }\n const nearestFiber = getNearestFiber(devtoolsInstance);\n if (nearestFiber === null) {\n return;\n }\n let fiber = nearestFiber;\n while (!isErrorBoundary(fiber)) {\n if (fiber.return === null) {\n return;\n }\n fiber = fiber.return;\n }\n forceErrorForFibers.set(fiber, forceError);\n if (fiber.alternate !== null) {\n // We only need one of the Fibers in the set.\n forceErrorForFibers.delete(fiber.alternate);\n }\n if (forceErrorForFibers.size === 1) {\n // First override is added. Switch React to slower path.\n setErrorHandler(shouldErrorFiberAccordingToMap);\n }\n if (!forceError && typeof scheduleRetry === 'function') {\n // If we're dismissing an error and the renderer supports it, use a Retry instead of Sync\n // This would allow View Transitions to proceed as if the error was dismissed using a Transition.\n scheduleRetry(fiber);\n } else {\n scheduleUpdate(fiber);\n }\n }\n\n function shouldSuspendFiberAlwaysFalse() {\n return false;\n }\n\n const forceFallbackForFibers = new Set<Fiber>();\n\n function shouldSuspendFiberAccordingToSet(fiber: Fiber): boolean {\n return (\n forceFallbackForFibers.has(fiber) ||\n (fiber.alternate !== null && forceFallbackForFibers.has(fiber.alternate))\n );\n }\n\n function overrideSuspense(id: number, forceFallback: boolean) {\n if (\n typeof setSuspenseHandler !== 'function' ||\n typeof scheduleUpdate !== 'function'\n ) {\n throw new Error(\n 'Expected overrideSuspense() to not get called for earlier React versions.',\n );\n }\n const devtoolsInstance = idToDevToolsInstanceMap.get(id);\n if (devtoolsInstance === undefined) {\n return;\n }\n const nearestFiber = getNearestFiber(devtoolsInstance);\n if (nearestFiber === null) {\n return;\n }\n let fiber = nearestFiber;\n while (fiber.tag !== SuspenseComponent) {\n if (fiber.return === null) {\n return;\n }\n fiber = fiber.return;\n }\n\n if (fiber.alternate !== null) {\n // We only need one of the Fibers in the set.\n forceFallbackForFibers.delete(fiber.alternate);\n }\n if (forceFallback) {\n forceFallbackForFibers.add(fiber);\n if (forceFallbackForFibers.size === 1) {\n // First override is added. Switch React to slower path.\n setSuspenseHandler(shouldSuspendFiberAccordingToSet);\n }\n } else {\n forceFallbackForFibers.delete(fiber);\n if (forceFallbackForFibers.size === 0) {\n // Last override is gone. Switch React back to fast path.\n setSuspenseHandler(shouldSuspendFiberAlwaysFalse);\n }\n }\n if (!forceFallback && typeof scheduleRetry === 'function') {\n // If we're unsuspending and the renderer supports it, use a Retry instead of Sync\n // to allow for things like View Transitions to proceed the way they would for real.\n scheduleRetry(fiber);\n } else {\n scheduleUpdate(fiber);\n }\n }\n\n /**\n * Resets the all other roots of this renderer.\n * @param suspendedSet List of IDs of SuspenseComponent Fibers\n */\n function overrideSuspenseMilestone(suspendedSet: Array<FiberInstance['id']>) {\n if (\n typeof setSuspenseHandler !== 'function' ||\n typeof scheduleUpdate !== 'function'\n ) {\n throw new Error(\n 'Expected overrideSuspenseMilestone() to not get called for earlier React versions.',\n );\n }\n\n const unsuspendedSet: Set<Fiber> = new Set(forceFallbackForFibers);\n\n let resuspended = false;\n for (let i = 0; i < suspendedSet.length; ++i) {\n const instance = idToDevToolsInstanceMap.get(suspendedSet[i]);\n if (instance === undefined) {\n console.warn(\n `Could not suspend ID '${suspendedSet[i]}' since the instance can't be found.`,\n );\n continue;\n }\n\n if (instance.kind === FIBER_INSTANCE) {\n const fiber = instance.data;\n if (\n forceFallbackForFibers.has(fiber) ||\n (fiber.alternate !== null &&\n forceFallbackForFibers.has(fiber.alternate))\n ) {\n // We're already forcing fallback for this fiber. Mark it as not unsuspended.\n unsuspendedSet.delete(fiber);\n if (fiber.alternate !== null) {\n unsuspendedSet.delete(fiber.alternate);\n }\n } else {\n forceFallbackForFibers.add(fiber);\n // We could find a minimal set that covers all the Fibers in this suspended set.\n // For now we rely on React's batching of updates.\n scheduleUpdate(fiber);\n resuspended = true;\n }\n } else {\n console.warn(`Cannot not suspend ID '${suspendedSet[i]}'.`);\n }\n }\n\n // Unsuspend any existing forced fallbacks if they're not in the new set.\n unsuspendedSet.forEach(fiber => {\n forceFallbackForFibers.delete(fiber);\n if (!resuspended && typeof scheduleRetry === 'function') {\n // If nothing new resuspended we don't need this to be sync. If we're only\n // unsuspending then we can schedule this as a Retry if the renderer supports it.\n // That way we can trigger animations.\n scheduleRetry(fiber);\n } else {\n scheduleUpdate(fiber);\n }\n });\n\n if (forceFallbackForFibers.size > 0) {\n // First override is added. Switch React to slower path.\n // TODO: Semantics for suspending a timeline are different. We want a suspended\n // timeline to act like a first reveal which is relevant for SuspenseList.\n // Resuspending would not affect rows in SuspenseList\n setSuspenseHandler(shouldSuspendFiberAccordingToSet);\n } else {\n setSuspenseHandler(shouldSuspendFiberAlwaysFalse);\n }\n }\n\n // Remember if we're trying to restore the selection after reload.\n // In that case, we'll do some extra checks for matching mounts.\n let trackedPath: Array<PathFrame> | null = null;\n let trackedPathMatchFiber: Fiber | null = null; // This is the deepest unfiltered match of a Fiber.\n let trackedPathMatchInstance: FiberInstance | VirtualInstance | null = null; // This is the deepest matched filtered Instance.\n let trackedPathMatchDepth = -1;\n let mightBeOnTrackedPath = false;\n\n function setTrackedPath(path: Array<PathFrame> | null) {\n if (path === null) {\n trackedPathMatchFiber = null;\n trackedPathMatchInstance = null;\n trackedPathMatchDepth = -1;\n mightBeOnTrackedPath = false;\n }\n trackedPath = path;\n }\n\n // We call this before traversing a new mount.\n // It remembers whether this Fiber is the next best match for tracked path.\n // The return value signals whether we should keep matching siblings or not.\n function updateTrackedPathStateBeforeMount(\n fiber: Fiber,\n fiberInstance: null | FiberInstance | FilteredFiberInstance,\n ): boolean {\n if (trackedPath === null || !mightBeOnTrackedPath) {\n // Fast path: there's nothing to track so do nothing and ignore siblings.\n return false;\n }\n const returnFiber = fiber.return;\n const returnAlternate = returnFiber !== null ? returnFiber.alternate : null;\n // By now we know there's some selection to restore, and this is a new Fiber.\n // Is this newly mounted Fiber a direct child of the current best match?\n // (This will also be true for new roots if we haven't matched anything yet.)\n if (\n trackedPathMatchFiber === returnFiber ||\n (trackedPathMatchFiber === returnAlternate && returnAlternate !== null)\n ) {\n // Is this the next Fiber we should select? Let's compare the frames.\n const actualFrame = getPathFrame(fiber);\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n const expectedFrame = trackedPath[trackedPathMatchDepth + 1];\n if (expectedFrame === undefined) {\n throw new Error('Expected to see a frame at the next depth.');\n }\n if (\n actualFrame.index === expectedFrame.index &&\n actualFrame.key === expectedFrame.key &&\n actualFrame.displayName === expectedFrame.displayName\n ) {\n // We have our next match.\n trackedPathMatchFiber = fiber;\n if (fiberInstance !== null && fiberInstance.kind === FIBER_INSTANCE) {\n trackedPathMatchInstance = fiberInstance;\n }\n trackedPathMatchDepth++;\n // Are we out of frames to match?\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n if (trackedPathMatchDepth === trackedPath.length - 1) {\n // There's nothing that can possibly match afterwards.\n // Don't check the children.\n mightBeOnTrackedPath = false;\n } else {\n // Check the children, as they might reveal the next match.\n mightBeOnTrackedPath = true;\n }\n // In either case, since we have a match, we don't need\n // to check the siblings. They'll never match.\n return false;\n }\n }\n if (trackedPathMatchFiber === null && fiberInstance === null) {\n // We're now looking for a Virtual Instance. It might be inside filtered Fibers\n // so we keep looking below.\n return true;\n }\n // This Fiber's parent is on the path, but this Fiber itself isn't.\n // There's no need to check its children--they won't be on the path either.\n mightBeOnTrackedPath = false;\n // However, one of its siblings may be on the path so keep searching.\n return true;\n }\n\n function updateVirtualTrackedPathStateBeforeMount(\n virtualInstance: VirtualInstance,\n parentInstance: null | DevToolsInstance,\n ): boolean {\n if (trackedPath === null || !mightBeOnTrackedPath) {\n // Fast path: there's nothing to track so do nothing and ignore siblings.\n return false;\n }\n // Check if we've matched our nearest unfiltered parent so far.\n if (trackedPathMatchInstance === parentInstance) {\n const actualFrame = getVirtualPathFrame(virtualInstance);\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n const expectedFrame = trackedPath[trackedPathMatchDepth + 1];\n if (expectedFrame === undefined) {\n throw new Error('Expected to see a frame at the next depth.');\n }\n if (\n actualFrame.index === expectedFrame.index &&\n actualFrame.key === expectedFrame.key &&\n actualFrame.displayName === expectedFrame.displayName\n ) {\n // We have our next match.\n trackedPathMatchFiber = null; // Don't bother looking in Fibers anymore. We're deeper now.\n trackedPathMatchInstance = virtualInstance;\n trackedPathMatchDepth++;\n // Are we out of frames to match?\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n if (trackedPathMatchDepth === trackedPath.length - 1) {\n // There's nothing that can possibly match afterwards.\n // Don't check the children.\n mightBeOnTrackedPath = false;\n } else {\n // Check the children, as they might reveal the next match.\n mightBeOnTrackedPath = true;\n }\n // In either case, since we have a match, we don't need\n // to check the siblings. They'll never match.\n return false;\n }\n }\n if (trackedPathMatchFiber !== null) {\n // We're still looking for a Fiber which might be underneath this instance.\n return true;\n }\n // This Instance's parent is on the path, but this Instance itself isn't.\n // There's no need to check its children--they won't be on the path either.\n mightBeOnTrackedPath = false;\n // However, one of its siblings may be on the path so keep searching.\n return true;\n }\n\n function updateTrackedPathStateAfterMount(\n mightSiblingsBeOnTrackedPath: boolean,\n ) {\n // updateTrackedPathStateBeforeMount() told us whether to match siblings.\n // Now that we're entering siblings, let's use that information.\n mightBeOnTrackedPath = mightSiblingsBeOnTrackedPath;\n }\n\n // Roots don't have a real persistent identity.\n // A root's \"pseudo key\" is \"childDisplayName:indexWithThatName\".\n // For example, \"App:0\" or, in case of similar roots, \"Story:0\", \"Story:1\", etc.\n // We will use this to try to disambiguate roots when restoring selection between reloads.\n const rootPseudoKeys: Map<number, string> = new Map();\n const rootDisplayNameCounter: Map<string, number> = new Map();\n\n function setRootPseudoKey(id: number, fiber: Fiber) {\n const name = getDisplayNameForRoot(fiber);\n const counter = rootDisplayNameCounter.get(name) || 0;\n rootDisplayNameCounter.set(name, counter + 1);\n const pseudoKey = `${name}:${counter}`;\n rootPseudoKeys.set(id, pseudoKey);\n }\n\n function removeRootPseudoKey(id: number) {\n const pseudoKey = rootPseudoKeys.get(id);\n if (pseudoKey === undefined) {\n throw new Error('Expected root pseudo key to be known.');\n }\n const name = pseudoKey.slice(0, pseudoKey.lastIndexOf(':'));\n const counter = rootDisplayNameCounter.get(name);\n if (counter === undefined) {\n throw new Error('Expected counter to be known.');\n }\n if (counter > 1) {\n rootDisplayNameCounter.set(name, counter - 1);\n } else {\n rootDisplayNameCounter.delete(name);\n }\n rootPseudoKeys.delete(id);\n }\n\n function getDisplayNameForRoot(fiber: Fiber): string {\n let preferredDisplayName = null;\n let fallbackDisplayName = null;\n let child = fiber.child;\n // Go at most three levels deep into direct children\n // while searching for a child that has a displayName.\n for (let i = 0; i < 3; i++) {\n if (child === null) {\n break;\n }\n const displayName = getDisplayNameForFiber(child);\n if (displayName !== null) {\n // Prefer display names that we get from user-defined components.\n // We want to avoid using e.g. 'Suspense' unless we find nothing else.\n if (typeof child.type === 'function') {\n // There's a few user-defined tags, but we'll prefer the ones\n // that are usually explicitly named (function or class components).\n preferredDisplayName = displayName;\n } else if (fallbackDisplayName === null) {\n fallbackDisplayName = displayName;\n }\n }\n if (preferredDisplayName !== null) {\n break;\n }\n child = child.child;\n }\n return preferredDisplayName || fallbackDisplayName || 'Anonymous';\n }\n\n function getPathFrame(fiber: Fiber): PathFrame {\n const {key} = fiber;\n let displayName = getDisplayNameForFiber(fiber);\n const index = fiber.index;\n switch (fiber.tag) {\n case HostRoot:\n // Roots don't have a real displayName, index, or key.\n // Instead, we'll use the pseudo key (childDisplayName:indexWithThatName).\n const rootInstance = rootToFiberInstanceMap.get(fiber.stateNode);\n if (rootInstance === undefined) {\n throw new Error(\n 'Expected the root instance to exist when computing a path',\n );\n }\n const pseudoKey = rootPseudoKeys.get(rootInstance.id);\n if (pseudoKey === undefined) {\n throw new Error('Expected mounted root to have known pseudo key.');\n }\n displayName = pseudoKey;\n break;\n case HostComponent:\n displayName = fiber.type;\n break;\n default:\n break;\n }\n return {\n displayName,\n key,\n index,\n };\n }\n\n function getVirtualPathFrame(virtualInstance: VirtualInstance): PathFrame {\n return {\n displayName: virtualInstance.data.name || '',\n key: virtualInstance.data.key == null ? null : virtualInstance.data.key,\n index: -1, // We use -1 to indicate that this is a virtual path frame.\n };\n }\n\n // Produces a serializable representation that does a best effort\n // of identifying a particular Fiber between page reloads.\n // The return path will contain Fibers that are \"invisible\" to the store\n // because their keys and indexes are important to restoring the selection.\n function getPathForElement(id: number): Array<PathFrame> | null {\n const devtoolsInstance = idToDevToolsInstanceMap.get(id);\n if (devtoolsInstance === undefined) {\n return null;\n }\n\n const keyPath = [];\n\n let inst: DevToolsInstance = devtoolsInstance;\n while (inst.kind === VIRTUAL_INSTANCE) {\n keyPath.push(getVirtualPathFrame(inst));\n if (inst.parent === null) {\n // This is a bug but non-essential. We should've found a root instance.\n return null;\n }\n inst = inst.parent;\n }\n\n let fiber: null | Fiber = inst.data;\n while (fiber !== null) {\n // $FlowFixMe[incompatible-call] found when upgrading Flow\n keyPath.push(getPathFrame(fiber));\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n fiber = fiber.return;\n }\n keyPath.reverse();\n return keyPath;\n }\n\n function getBestMatchForTrackedPath(): PathMatch | null {\n if (trackedPath === null) {\n // Nothing to match.\n return null;\n }\n if (trackedPathMatchInstance === null) {\n // We didn't find anything.\n return null;\n }\n return {\n id: trackedPathMatchInstance.id,\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n isFullMatch: trackedPathMatchDepth === trackedPath.length - 1,\n };\n }\n\n const formatPriorityLevel = (priorityLevel: ?number) => {\n if (priorityLevel == null) {\n return 'Unknown';\n }\n\n switch (priorityLevel) {\n case ImmediatePriority:\n return 'Immediate';\n case UserBlockingPriority:\n return 'User-Blocking';\n case NormalPriority:\n return 'Normal';\n case LowPriority:\n return 'Low';\n case IdlePriority:\n return 'Idle';\n case NoPriority:\n default:\n return 'Unknown';\n }\n };\n\n function setTraceUpdatesEnabled(isEnabled: boolean): void {\n traceUpdatesEnabled = isEnabled;\n }\n\n function hasElementWithId(id: number): boolean {\n return idToDevToolsInstanceMap.has(id);\n }\n\n function getSourceForFiberInstance(\n fiberInstance: FiberInstance,\n ): ReactFunctionLocation | null {\n // Favor the owner source if we have one.\n const ownerSource = getSourceForInstance(fiberInstance);\n if (ownerSource !== null) {\n return ownerSource;\n }\n\n // Otherwise fallback to the throwing trick.\n const dispatcherRef = getDispatcherRef(renderer);\n const stackFrame =\n dispatcherRef == null\n ? null\n : getSourceLocationByFiber(\n ReactTypeOfWork,\n fiberInstance.data,\n dispatcherRef,\n );\n if (stackFrame === null) {\n return null;\n }\n const source = extractLocationFromComponentStack(stackFrame);\n fiberInstance.source = source;\n return source;\n }\n\n function getSourceForInstance(\n instance: DevToolsInstance,\n ): ReactFunctionLocation | null {\n let unresolvedSource = instance.source;\n if (unresolvedSource === null) {\n // We don't have any source yet. We can try again later in case an owned child mounts later.\n // TODO: We won't have any information here if the child is filtered.\n return null;\n }\n\n if (instance.kind === VIRTUAL_INSTANCE) {\n // We might have found one on the virtual instance.\n const debugLocation = instance.data.debugLocation;\n if (debugLocation != null) {\n unresolvedSource = debugLocation;\n }\n }\n\n // If we have the debug stack (the creation stack of the JSX) for any owned child of this\n // component, then at the bottom of that stack will be a stack frame that is somewhere within\n // the component's function body. Typically it would be the callsite of the JSX unless there's\n // any intermediate utility functions. This won't point to the top of the component function\n // but it's at least somewhere within it.\n if (isError(unresolvedSource)) {\n return (instance.source = extractLocationFromOwnerStack(\n (unresolvedSource: any),\n ));\n }\n if (typeof unresolvedSource === 'string') {\n const idx = unresolvedSource.lastIndexOf('\\n');\n const lastLine =\n idx === -1 ? unresolvedSource : unresolvedSource.slice(idx + 1);\n return (instance.source = extractLocationFromComponentStack(lastLine));\n }\n\n // $FlowFixMe: refined.\n return unresolvedSource;\n }\n\n type InternalMcpFunctions = {\n __internal_only_getComponentTree?: Function,\n };\n\n const internalMcpFunctions: InternalMcpFunctions = {};\n if (__IS_INTERNAL_MCP_BUILD__) {\n // eslint-disable-next-line no-inner-declarations\n function __internal_only_getComponentTree(): string {\n let treeString = '';\n\n function buildTreeString(\n instance: DevToolsInstance,\n prefix: string = '',\n isLastChild: boolean = true,\n ): void {\n if (!instance) return;\n\n const name =\n (instance.kind !== VIRTUAL_INSTANCE\n ? getDisplayNameForFiber(instance.data)\n : instance.data.name) || 'Unknown';\n\n const id = instance.id !== undefined ? instance.id : 'unknown';\n\n if (name !== 'createRoot()') {\n treeString +=\n prefix +\n (isLastChild ? '└── ' : '├── ') +\n name +\n ' (id: ' +\n id +\n ')\\n';\n }\n\n const childPrefix = prefix + (isLastChild ? ' ' : '│ ');\n\n let childCount = 0;\n let tempChild = instance.firstChild;\n while (tempChild !== null) {\n childCount++;\n tempChild = tempChild.nextSibling;\n }\n\n let child = instance.firstChild;\n let currentChildIndex = 0;\n\n while (child !== null) {\n currentChildIndex++;\n const isLastSibling = currentChildIndex === childCount;\n buildTreeString(child, childPrefix, isLastSibling);\n child = child.nextSibling;\n }\n }\n\n const rootInstances: Array<DevToolsInstance> = [];\n idToDevToolsInstanceMap.forEach(instance => {\n if (instance.parent === null || instance.parent.parent === null) {\n rootInstances.push(instance);\n }\n });\n\n if (rootInstances.length > 0) {\n for (let i = 0; i < rootInstances.length; i++) {\n const isLast = i === rootInstances.length - 1;\n buildTreeString(rootInstances[i], '', isLast);\n if (!isLast) {\n treeString += '\\n';\n }\n }\n } else {\n treeString = 'No component tree found.';\n }\n\n return treeString;\n }\n\n internalMcpFunctions.__internal_only_getComponentTree =\n __internal_only_getComponentTree;\n }\n\n return {\n cleanup,\n clearErrorsAndWarnings,\n clearErrorsForElementID,\n clearWarningsForElementID,\n getSerializedElementValueByPath,\n deletePath,\n findHostInstancesForElementID,\n findLastKnownRectsForID,\n flushInitialOperations,\n getBestMatchForTrackedPath,\n getDisplayNameForElementID,\n getNearestMountedDOMNode,\n getElementIDForHostInstance,\n getSuspenseNodeIDForHostInstance,\n getInstanceAndStyle,\n getOwnersList,\n getPathForElement,\n getProfilingData,\n handleCommitFiberRoot,\n handleCommitFiberUnmount,\n handlePostCommitFiberRoot,\n hasElementWithId,\n inspectElement,\n logElementToConsole,\n getComponentStack,\n getElementAttributeByPath,\n getElementSourceFunctionById,\n onErrorOrWarning,\n overrideError,\n overrideSuspense,\n overrideSuspenseMilestone,\n overrideValueAtPath,\n renamePath,\n renderer,\n setTraceUpdatesEnabled,\n setTrackedPath,\n startProfiling,\n stopProfiling,\n storeAsGlobal,\n supportsTogglingSuspense,\n updateComponentFilters,\n getEnvironmentNames,\n ...internalMcpFunctions,\n };\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport type {InternalInstance} from './renderer';\n\nexport function decorate(object: Object, attr: string, fn: Function): Function {\n const old = object[attr];\n // $FlowFixMe[missing-this-annot] webpack config needs to be updated to allow `this` type annotations\n object[attr] = function (instance: InternalInstance) {\n return fn.call(this, old, arguments);\n };\n return old;\n}\n\nexport function decorateMany(\n source: Object,\n fns: {[attr: string]: Function, ...},\n): Object {\n const olds: {[string]: $FlowFixMe} = {};\n for (const name in fns) {\n olds[name] = decorate(source, name, fns[name]);\n }\n return olds;\n}\n\nexport function restoreMany(source: Object, olds: Object): void {\n for (const name in olds) {\n source[name] = olds[name];\n }\n}\n\n// $FlowFixMe[missing-this-annot] webpack config needs to be updated to allow `this` type annotations\nexport function forceUpdate(instance: InternalInstance): void {\n if (typeof instance.forceUpdate === 'function') {\n instance.forceUpdate();\n } else if (\n instance.updater != null &&\n typeof instance.updater.enqueueForceUpdate === 'function'\n ) {\n instance.updater.enqueueForceUpdate(this, () => {}, 'forceUpdate');\n }\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport {\n ElementTypeClass,\n ElementTypeFunction,\n ElementTypeRoot,\n ElementTypeHostComponent,\n ElementTypeOtherOrUnknown,\n} from 'react-devtools-shared/src/frontend/types';\nimport {getUID, utfEncodeString, printOperationsArray} from '../../utils';\nimport {\n cleanForBridge,\n copyWithDelete,\n copyWithRename,\n copyWithSet,\n serializeToString,\n} from '../utils';\nimport {\n deletePathInObject,\n getDisplayName,\n getInObject,\n renamePathInObject,\n setInObject,\n} from 'react-devtools-shared/src/utils';\nimport {\n __DEBUG__,\n TREE_OPERATION_ADD,\n TREE_OPERATION_REMOVE,\n TREE_OPERATION_REORDER_CHILDREN,\n SUSPENSE_TREE_OPERATION_ADD,\n SUSPENSE_TREE_OPERATION_REMOVE,\n UNKNOWN_SUSPENDERS_NONE,\n} from '../../constants';\nimport {decorateMany, forceUpdate, restoreMany} from './utils';\n\nimport type {\n DevToolsHook,\n GetElementIDForHostInstance,\n InspectedElementPayload,\n InstanceAndStyle,\n HostInstance,\n PathFrame,\n PathMatch,\n RendererInterface,\n} from '../types';\nimport type {\n ComponentFilter,\n ElementType,\n} from 'react-devtools-shared/src/frontend/types';\nimport type {InspectedElement, SerializedElement} from '../types';\n\nexport type InternalInstance = Object;\ntype LegacyRenderer = Object;\n\nfunction getData(internalInstance: InternalInstance) {\n let displayName = null;\n let key = null;\n\n // != used deliberately here to catch undefined and null\n if (internalInstance._currentElement != null) {\n if (internalInstance._currentElement.key) {\n key = String(internalInstance._currentElement.key);\n }\n\n const elementType = internalInstance._currentElement.type;\n if (typeof elementType === 'string') {\n displayName = elementType;\n } else if (typeof elementType === 'function') {\n displayName = getDisplayName(elementType);\n }\n }\n\n return {\n displayName,\n key,\n };\n}\n\nfunction getElementType(internalInstance: InternalInstance): ElementType {\n // != used deliberately here to catch undefined and null\n if (internalInstance._currentElement != null) {\n const elementType = internalInstance._currentElement.type;\n if (typeof elementType === 'function') {\n const publicInstance = internalInstance.getPublicInstance();\n if (publicInstance !== null) {\n return ElementTypeClass;\n } else {\n return ElementTypeFunction;\n }\n } else if (typeof elementType === 'string') {\n return ElementTypeHostComponent;\n }\n }\n return ElementTypeOtherOrUnknown;\n}\n\nfunction getChildren(internalInstance: Object): Array<any> {\n const children = [];\n\n // If the parent is a native node without rendered children, but with\n // multiple string children, then the `element` that gets passed in here is\n // a plain value -- a string or number.\n if (typeof internalInstance !== 'object') {\n // No children\n } else if (\n internalInstance._currentElement === null ||\n internalInstance._currentElement === false\n ) {\n // No children\n } else if (internalInstance._renderedComponent) {\n const child = internalInstance._renderedComponent;\n if (getElementType(child) !== ElementTypeOtherOrUnknown) {\n children.push(child);\n }\n } else if (internalInstance._renderedChildren) {\n const renderedChildren = internalInstance._renderedChildren;\n for (const name in renderedChildren) {\n const child = renderedChildren[name];\n if (getElementType(child) !== ElementTypeOtherOrUnknown) {\n children.push(child);\n }\n }\n }\n // Note: we skip the case where children are just strings or numbers\n // because the new DevTools skips over host text nodes anyway.\n return children;\n}\n\nexport function attach(\n hook: DevToolsHook,\n rendererID: number,\n renderer: LegacyRenderer,\n global: Object,\n): RendererInterface {\n const idToInternalInstanceMap: Map<number, InternalInstance> = new Map();\n const internalInstanceToIDMap: WeakMap<InternalInstance, number> =\n new WeakMap();\n const internalInstanceToRootIDMap: WeakMap<InternalInstance, number> =\n new WeakMap();\n\n let getElementIDForHostInstance: GetElementIDForHostInstance =\n ((null: any): GetElementIDForHostInstance);\n let findHostInstanceForInternalID: (id: number) => ?HostInstance;\n let getNearestMountedDOMNode = (node: Element): null | Element => {\n // Not implemented.\n return null;\n };\n\n if (renderer.ComponentTree) {\n getElementIDForHostInstance = node => {\n const internalInstance =\n renderer.ComponentTree.getClosestInstanceFromNode(node);\n return internalInstanceToIDMap.get(internalInstance) || null;\n };\n findHostInstanceForInternalID = (id: number) => {\n const internalInstance = idToInternalInstanceMap.get(id);\n return renderer.ComponentTree.getNodeFromInstance(internalInstance);\n };\n getNearestMountedDOMNode = (node: Element): null | Element => {\n const internalInstance =\n renderer.ComponentTree.getClosestInstanceFromNode(node);\n if (internalInstance != null) {\n return renderer.ComponentTree.getNodeFromInstance(internalInstance);\n }\n return null;\n };\n } else if (renderer.Mount.getID && renderer.Mount.getNode) {\n getElementIDForHostInstance = node => {\n // Not implemented.\n return null;\n };\n findHostInstanceForInternalID = (id: number) => {\n // Not implemented.\n return null;\n };\n }\n\n const supportsTogglingSuspense = false;\n\n function getDisplayNameForElementID(id: number): string | null {\n const internalInstance = idToInternalInstanceMap.get(id);\n return internalInstance ? getData(internalInstance).displayName : null;\n }\n\n function getID(internalInstance: InternalInstance): number {\n if (typeof internalInstance !== 'object' || internalInstance === null) {\n throw new Error('Invalid internal instance: ' + internalInstance);\n }\n if (!internalInstanceToIDMap.has(internalInstance)) {\n const id = getUID();\n internalInstanceToIDMap.set(internalInstance, id);\n idToInternalInstanceMap.set(id, internalInstance);\n }\n return ((internalInstanceToIDMap.get(internalInstance): any): number);\n }\n\n function areEqualArrays(a: Array<any>, b: Array<any>) {\n if (a.length !== b.length) {\n return false;\n }\n for (let i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n return true;\n }\n\n // This is shared mutable state that lets us keep track of where we are.\n let parentIDStack = [];\n\n let oldReconcilerMethods = null;\n if (renderer.Reconciler) {\n // React 15\n oldReconcilerMethods = decorateMany(renderer.Reconciler, {\n mountComponent(fn, args) {\n const internalInstance = args[0];\n const hostContainerInfo = args[3];\n if (getElementType(internalInstance) === ElementTypeOtherOrUnknown) {\n // $FlowFixMe[object-this-reference] found when upgrading Flow\n return fn.apply(this, args);\n }\n if (hostContainerInfo._topLevelWrapper === undefined) {\n // SSR\n // $FlowFixMe[object-this-reference] found when upgrading Flow\n return fn.apply(this, args);\n }\n\n const id = getID(internalInstance);\n // Push the operation.\n const parentID =\n parentIDStack.length > 0\n ? parentIDStack[parentIDStack.length - 1]\n : 0;\n recordMount(internalInstance, id, parentID);\n parentIDStack.push(id);\n\n // Remember the root.\n internalInstanceToRootIDMap.set(\n internalInstance,\n getID(hostContainerInfo._topLevelWrapper),\n );\n\n try {\n // $FlowFixMe[object-this-reference] found when upgrading Flow\n const result = fn.apply(this, args);\n parentIDStack.pop();\n return result;\n } catch (err) {\n parentIDStack = [];\n throw err;\n } finally {\n if (parentIDStack.length === 0) {\n const rootID = internalInstanceToRootIDMap.get(internalInstance);\n if (rootID === undefined) {\n throw new Error('Expected to find root ID.');\n }\n flushPendingEvents(rootID);\n }\n }\n },\n performUpdateIfNecessary(fn, args) {\n const internalInstance = args[0];\n if (getElementType(internalInstance) === ElementTypeOtherOrUnknown) {\n // $FlowFixMe[object-this-reference] found when upgrading Flow\n return fn.apply(this, args);\n }\n\n const id = getID(internalInstance);\n parentIDStack.push(id);\n\n const prevChildren = getChildren(internalInstance);\n try {\n // $FlowFixMe[object-this-reference] found when upgrading Flow\n const result = fn.apply(this, args);\n\n const nextChildren = getChildren(internalInstance);\n if (!areEqualArrays(prevChildren, nextChildren)) {\n // Push the operation\n recordReorder(internalInstance, id, nextChildren);\n }\n\n parentIDStack.pop();\n return result;\n } catch (err) {\n parentIDStack = [];\n throw err;\n } finally {\n if (parentIDStack.length === 0) {\n const rootID = internalInstanceToRootIDMap.get(internalInstance);\n if (rootID === undefined) {\n throw new Error('Expected to find root ID.');\n }\n flushPendingEvents(rootID);\n }\n }\n },\n receiveComponent(fn, args) {\n const internalInstance = args[0];\n if (getElementType(internalInstance) === ElementTypeOtherOrUnknown) {\n // $FlowFixMe[object-this-reference] found when upgrading Flow\n return fn.apply(this, args);\n }\n\n const id = getID(internalInstance);\n parentIDStack.push(id);\n\n const prevChildren = getChildren(internalInstance);\n try {\n // $FlowFixMe[object-this-reference] found when upgrading Flow\n const result = fn.apply(this, args);\n\n const nextChildren = getChildren(internalInstance);\n if (!areEqualArrays(prevChildren, nextChildren)) {\n // Push the operation\n recordReorder(internalInstance, id, nextChildren);\n }\n\n parentIDStack.pop();\n return result;\n } catch (err) {\n parentIDStack = [];\n throw err;\n } finally {\n if (parentIDStack.length === 0) {\n const rootID = internalInstanceToRootIDMap.get(internalInstance);\n if (rootID === undefined) {\n throw new Error('Expected to find root ID.');\n }\n flushPendingEvents(rootID);\n }\n }\n },\n unmountComponent(fn, args) {\n const internalInstance = args[0];\n if (getElementType(internalInstance) === ElementTypeOtherOrUnknown) {\n // $FlowFixMe[object-this-reference] found when upgrading Flow\n return fn.apply(this, args);\n }\n\n const id = getID(internalInstance);\n parentIDStack.push(id);\n try {\n // $FlowFixMe[object-this-reference] found when upgrading Flow\n const result = fn.apply(this, args);\n parentIDStack.pop();\n\n // Push the operation.\n recordUnmount(internalInstance, id);\n\n return result;\n } catch (err) {\n parentIDStack = [];\n throw err;\n } finally {\n if (parentIDStack.length === 0) {\n const rootID = internalInstanceToRootIDMap.get(internalInstance);\n if (rootID === undefined) {\n throw new Error('Expected to find root ID.');\n }\n flushPendingEvents(rootID);\n }\n }\n },\n });\n }\n\n function cleanup() {\n if (oldReconcilerMethods !== null) {\n if (renderer.Component) {\n restoreMany(renderer.Component.Mixin, oldReconcilerMethods);\n } else {\n restoreMany(renderer.Reconciler, oldReconcilerMethods);\n }\n }\n oldReconcilerMethods = null;\n }\n\n function recordMount(\n internalInstance: InternalInstance,\n id: number,\n parentID: number,\n ) {\n const isRoot = parentID === 0;\n\n if (__DEBUG__) {\n console.log(\n '%crecordMount()',\n 'color: green; font-weight: bold;',\n id,\n getData(internalInstance).displayName,\n );\n }\n\n if (isRoot) {\n // TODO Is this right? For all versions?\n const hasOwnerMetadata =\n internalInstance._currentElement != null &&\n internalInstance._currentElement._owner != null;\n\n pushOperation(TREE_OPERATION_ADD);\n pushOperation(id);\n pushOperation(ElementTypeRoot);\n pushOperation(0); // StrictMode compliant?\n pushOperation(0); // Profiling flag\n pushOperation(0); // StrictMode supported?\n pushOperation(hasOwnerMetadata ? 1 : 0);\n\n pushOperation(SUSPENSE_TREE_OPERATION_ADD);\n pushOperation(id);\n pushOperation(parentID);\n pushOperation(getStringID(null)); // name\n pushOperation(0); // isSuspended\n // TODO: Measure rect of root\n pushOperation(-1);\n } else {\n const type = getElementType(internalInstance);\n const {displayName, key} = getData(internalInstance);\n\n const ownerID =\n internalInstance._currentElement != null &&\n internalInstance._currentElement._owner != null\n ? getID(internalInstance._currentElement._owner)\n : 0;\n\n const displayNameStringID = getStringID(displayName);\n const keyStringID = getStringID(key);\n pushOperation(TREE_OPERATION_ADD);\n pushOperation(id);\n pushOperation(type);\n pushOperation(parentID);\n pushOperation(ownerID);\n pushOperation(displayNameStringID);\n pushOperation(keyStringID);\n pushOperation(getStringID(null)); // name prop\n }\n }\n\n function recordReorder(\n internalInstance: InternalInstance,\n id: number,\n nextChildren: Array<InternalInstance>,\n ) {\n pushOperation(TREE_OPERATION_REORDER_CHILDREN);\n pushOperation(id);\n const nextChildIDs = nextChildren.map(getID);\n pushOperation(nextChildIDs.length);\n for (let i = 0; i < nextChildIDs.length; i++) {\n pushOperation(nextChildIDs[i]);\n }\n }\n\n function recordUnmount(internalInstance: InternalInstance, id: number) {\n const isRoot = parentIDStack.length === 0;\n if (isRoot) {\n pendingUnmountedRootID = id;\n } else {\n pendingUnmountedIDs.push(id);\n }\n idToInternalInstanceMap.delete(id);\n }\n\n function crawlAndRecordInitialMounts(\n id: number,\n parentID: number,\n rootID: number,\n ) {\n if (__DEBUG__) {\n console.group('crawlAndRecordInitialMounts() id:', id);\n }\n\n const internalInstance = idToInternalInstanceMap.get(id);\n if (internalInstance != null) {\n internalInstanceToRootIDMap.set(internalInstance, rootID);\n recordMount(internalInstance, id, parentID);\n getChildren(internalInstance).forEach(child =>\n crawlAndRecordInitialMounts(getID(child), id, rootID),\n );\n }\n\n if (__DEBUG__) {\n console.groupEnd();\n }\n }\n\n function flushInitialOperations() {\n // Crawl roots though and register any nodes that mounted before we were injected.\n\n const roots =\n renderer.Mount._instancesByReactRootID ||\n renderer.Mount._instancesByContainerID;\n\n for (const key in roots) {\n const internalInstance = roots[key];\n const id = getID(internalInstance);\n crawlAndRecordInitialMounts(id, 0, id);\n flushPendingEvents(id);\n }\n }\n\n const pendingOperations: Array<number> = [];\n const pendingStringTable: Map<string, number> = new Map();\n let pendingUnmountedIDs: Array<number> = [];\n let pendingStringTableLength: number = 0;\n let pendingUnmountedRootID: number | null = null;\n\n function flushPendingEvents(rootID: number) {\n if (\n pendingOperations.length === 0 &&\n pendingUnmountedIDs.length === 0 &&\n pendingUnmountedRootID === null\n ) {\n return;\n }\n\n const numUnmountIDs =\n pendingUnmountedIDs.length + (pendingUnmountedRootID === null ? 0 : 1);\n\n const operations = new Array<number>(\n // Identify which renderer this update is coming from.\n 2 + // [rendererID, rootFiberID]\n // How big is the string table?\n 1 + // [stringTableLength]\n // Then goes the actual string table.\n pendingStringTableLength +\n // All unmounts are batched in a single message.\n // [TREE_OPERATION_REMOVE, removedIDLength, ...ids]\n (numUnmountIDs > 0 ? 2 + numUnmountIDs : 0) +\n // [SUSPENSE_TREE_OPERATION_REMOVE, 1, pendingUnmountedRootID]\n (pendingUnmountedRootID === null ? 0 : 3) +\n // Mount operations\n pendingOperations.length,\n );\n\n // Identify which renderer this update is coming from.\n // This enables roots to be mapped to renderers,\n // Which in turn enables fiber properations, states, and hooks to be inspected.\n let i = 0;\n operations[i++] = rendererID;\n operations[i++] = rootID;\n\n // Now fill in the string table.\n // [stringTableLength, str1Length, ...str1, str2Length, ...str2, ...]\n operations[i++] = pendingStringTableLength;\n pendingStringTable.forEach((value, key) => {\n operations[i++] = key.length;\n const encodedKey = utfEncodeString(key);\n for (let j = 0; j < encodedKey.length; j++) {\n operations[i + j] = encodedKey[j];\n }\n i += key.length;\n });\n\n if (numUnmountIDs > 0) {\n // All unmounts except roots are batched in a single message.\n operations[i++] = TREE_OPERATION_REMOVE;\n // The first number is how many unmounted IDs we're gonna send.\n operations[i++] = numUnmountIDs;\n // Fill in the unmounts\n for (let j = 0; j < pendingUnmountedIDs.length; j++) {\n operations[i++] = pendingUnmountedIDs[j];\n }\n // The root ID should always be unmounted last.\n if (pendingUnmountedRootID !== null) {\n operations[i] = pendingUnmountedRootID;\n i++;\n\n operations[i++] = SUSPENSE_TREE_OPERATION_REMOVE;\n operations[i++] = 1;\n operations[i++] = pendingUnmountedRootID;\n }\n }\n\n // Fill in the rest of the operations.\n for (let j = 0; j < pendingOperations.length; j++) {\n operations[i + j] = pendingOperations[j];\n }\n i += pendingOperations.length;\n\n if (__DEBUG__) {\n printOperationsArray(operations);\n }\n\n // If we've already connected to the frontend, just pass the operations through.\n hook.emit('operations', operations);\n\n pendingOperations.length = 0;\n pendingUnmountedIDs = [];\n pendingUnmountedRootID = null;\n pendingStringTable.clear();\n pendingStringTableLength = 0;\n }\n\n function pushOperation(op: number): void {\n if (__DEV__) {\n if (!Number.isInteger(op)) {\n console.error(\n 'pushOperation() was called but the value is not an integer.',\n op,\n );\n }\n }\n pendingOperations.push(op);\n }\n\n function getStringID(str: string | null): number {\n if (str === null) {\n return 0;\n }\n const existingID = pendingStringTable.get(str);\n if (existingID !== undefined) {\n return existingID;\n }\n const stringID = pendingStringTable.size + 1;\n pendingStringTable.set(str, stringID);\n // The string table total length needs to account\n // both for the string length, and for the array item\n // that contains the length itself. Hence + 1.\n pendingStringTableLength += str.length + 1;\n return stringID;\n }\n\n let currentlyInspectedElementID: number | null = null;\n let currentlyInspectedPaths: Object = {};\n\n // Track the intersection of currently inspected paths,\n // so that we can send their data along if the element is re-rendered.\n function mergeInspectedPaths(path: Array<string | number>) {\n let current = currentlyInspectedPaths;\n path.forEach(key => {\n if (!current[key]) {\n current[key] = {};\n }\n current = current[key];\n });\n }\n\n function createIsPathAllowed(key: string) {\n // This function helps prevent previously-inspected paths from being dehydrated in updates.\n // This is important to avoid a bad user experience where expanded toggles collapse on update.\n return function isPathAllowed(path: Array<string | number>): boolean {\n let current = currentlyInspectedPaths[key];\n if (!current) {\n return false;\n }\n for (let i = 0; i < path.length; i++) {\n current = current[path[i]];\n if (!current) {\n return false;\n }\n }\n return true;\n };\n }\n\n // Fast path props lookup for React Native style editor.\n function getInstanceAndStyle(id: number): InstanceAndStyle {\n let instance = null;\n let style = null;\n\n const internalInstance = idToInternalInstanceMap.get(id);\n if (internalInstance != null) {\n instance = internalInstance._instance || null;\n\n const element = internalInstance._currentElement;\n if (element != null && element.props != null) {\n style = element.props.style || null;\n }\n }\n\n return {\n instance,\n style,\n };\n }\n\n function updateSelectedElement(id: number): void {\n const internalInstance = idToInternalInstanceMap.get(id);\n if (internalInstance == null) {\n console.warn(`Could not find instance with id \"${id}\"`);\n return;\n }\n\n switch (getElementType(internalInstance)) {\n case ElementTypeClass:\n global.$r = internalInstance._instance;\n break;\n case ElementTypeFunction:\n const element = internalInstance._currentElement;\n if (element == null) {\n console.warn(`Could not find element with id \"${id}\"`);\n return;\n }\n\n global.$r = {\n props: element.props,\n type: element.type,\n };\n break;\n default:\n global.$r = null;\n break;\n }\n }\n\n function storeAsGlobal(\n id: number,\n path: Array<string | number>,\n count: number,\n ): void {\n const inspectedElement = inspectElementRaw(id);\n if (inspectedElement !== null) {\n const value = getInObject(inspectedElement, path);\n const key = `$reactTemp${count}`;\n\n window[key] = value;\n\n console.log(key);\n console.log(value);\n }\n }\n\n function getSerializedElementValueByPath(\n id: number,\n path: Array<string | number>,\n ): ?string {\n const inspectedElement = inspectElementRaw(id);\n if (inspectedElement !== null) {\n const valueToCopy = getInObject(inspectedElement, path);\n\n return serializeToString(valueToCopy);\n }\n }\n\n function inspectElement(\n requestID: number,\n id: number,\n path: Array<string | number> | null,\n forceFullData: boolean,\n ): InspectedElementPayload {\n if (forceFullData || currentlyInspectedElementID !== id) {\n currentlyInspectedElementID = id;\n currentlyInspectedPaths = {};\n }\n\n const inspectedElement = inspectElementRaw(id);\n if (inspectedElement === null) {\n return {\n id,\n responseID: requestID,\n type: 'not-found',\n };\n }\n\n if (path !== null) {\n mergeInspectedPaths(path);\n }\n\n // Any time an inspected element has an update,\n // we should update the selected $r value as wel.\n // Do this before dehydration (cleanForBridge).\n updateSelectedElement(id);\n\n inspectedElement.context = cleanForBridge(\n inspectedElement.context,\n createIsPathAllowed('context'),\n );\n inspectedElement.props = cleanForBridge(\n inspectedElement.props,\n createIsPathAllowed('props'),\n );\n inspectedElement.state = cleanForBridge(\n inspectedElement.state,\n createIsPathAllowed('state'),\n );\n inspectedElement.suspendedBy = cleanForBridge(\n inspectedElement.suspendedBy,\n createIsPathAllowed('suspendedBy'),\n );\n\n return {\n id,\n responseID: requestID,\n type: 'full-data',\n value: inspectedElement,\n };\n }\n\n function inspectElementRaw(id: number): InspectedElement | null {\n const internalInstance = idToInternalInstanceMap.get(id);\n\n if (internalInstance == null) {\n return null;\n }\n\n const rootID = internalInstanceToRootIDMap.get(internalInstance);\n if (rootID === undefined) {\n throw new Error('Expected to find root ID.');\n }\n const isRoot = rootID === id;\n return isRoot\n ? inspectRootsRaw(rootID)\n : inspectInternalInstanceRaw(id, internalInstance);\n }\n\n function inspectInternalInstanceRaw(\n id: number,\n internalInstance: InternalInstance,\n ): InspectedElement | null {\n const {key} = getData(internalInstance);\n const type = getElementType(internalInstance);\n\n let context = null;\n let owners = null;\n let props = null;\n let state = null;\n\n const element = internalInstance._currentElement;\n if (element !== null) {\n props = element.props;\n\n let owner = element._owner;\n if (owner) {\n owners = ([]: Array<SerializedElement>);\n while (owner != null) {\n owners.push({\n displayName: getData(owner).displayName || 'Unknown',\n id: getID(owner),\n key: element.key,\n env: null,\n stack: null,\n type: getElementType(owner),\n });\n if (owner._currentElement) {\n owner = owner._currentElement._owner;\n }\n }\n }\n }\n\n const publicInstance = internalInstance._instance;\n if (publicInstance != null) {\n context = publicInstance.context || null;\n state = publicInstance.state || null;\n }\n\n // Not implemented\n const errors: Array<[string, number]> = [];\n const warnings: Array<[string, number]> = [];\n\n return {\n id,\n\n // Does the current renderer support editable hooks and function props?\n canEditHooks: false,\n canEditFunctionProps: false,\n\n // Does the current renderer support advanced editing interface?\n canEditHooksAndDeletePaths: false,\n canEditHooksAndRenamePaths: false,\n canEditFunctionPropsDeletePaths: false,\n canEditFunctionPropsRenamePaths: false,\n\n // Toggle error boundary did not exist in legacy versions\n canToggleError: false,\n isErrored: false,\n\n // Suspense did not exist in legacy versions\n canToggleSuspense: false,\n isSuspended: null,\n\n source: null,\n\n stack: null,\n\n // Only legacy context exists in legacy versions.\n hasLegacyContext: true,\n\n type: type,\n\n key: key != null ? key : null,\n\n // Inspectable properties.\n context,\n hooks: null,\n props,\n state,\n errors,\n warnings,\n\n // Not supported in legacy renderers.\n suspendedBy: [],\n suspendedByRange: null,\n unknownSuspenders: UNKNOWN_SUSPENDERS_NONE,\n\n // List of owners\n owners,\n\n env: null,\n\n rootType: null,\n rendererPackageName: null,\n rendererVersion: null,\n\n plugins: {\n stylex: null,\n },\n\n nativeTag: null,\n };\n }\n\n function inspectRootsRaw(arbitraryRootID: number): InspectedElement | null {\n const roots =\n renderer.Mount._instancesByReactRootID ||\n renderer.Mount._instancesByContainerID;\n\n const inspectedRoots: InspectedElement = {\n // invariants\n id: arbitraryRootID,\n type: ElementTypeRoot,\n // Properties we merge\n isErrored: false,\n errors: [],\n warnings: [],\n suspendedBy: [],\n suspendedByRange: null,\n // TODO: How to merge these?\n unknownSuspenders: UNKNOWN_SUSPENDERS_NONE,\n // Properties where merging doesn't make sense so we ignore them entirely in the UI\n rootType: null,\n plugins: {stylex: null},\n nativeTag: null,\n env: null,\n source: null,\n stack: null,\n // TODO: We could make the Frontend accept an array to display\n // a list of unique renderers contributing to this Screen.\n rendererPackageName: null,\n rendererVersion: null,\n // These don't make sense for a Root. They're just bottom values.\n key: null,\n canEditFunctionProps: false,\n canEditHooks: false,\n canEditFunctionPropsDeletePaths: false,\n canEditFunctionPropsRenamePaths: false,\n canEditHooksAndDeletePaths: false,\n canEditHooksAndRenamePaths: false,\n canToggleError: false,\n canToggleSuspense: false,\n isSuspended: false,\n hasLegacyContext: false,\n context: null,\n hooks: null,\n props: null,\n state: null,\n owners: null,\n };\n\n let minSuspendedByRange = Infinity;\n let maxSuspendedByRange = -Infinity;\n\n for (const rootKey in roots) {\n const internalInstance = roots[rootKey];\n const id = getID(internalInstance);\n const inspectedRoot = inspectInternalInstanceRaw(id, internalInstance);\n\n if (inspectedRoot === null) {\n return null;\n }\n\n if (inspectedRoot.isErrored) {\n inspectedRoots.isErrored = true;\n }\n for (let i = 0; i < inspectedRoot.errors.length; i++) {\n inspectedRoots.errors.push(inspectedRoot.errors[i]);\n }\n for (let i = 0; i < inspectedRoot.warnings.length; i++) {\n inspectedRoots.warnings.push(inspectedRoot.warnings[i]);\n }\n for (let i = 0; i < inspectedRoot.suspendedBy.length; i++) {\n inspectedRoots.suspendedBy.push(inspectedRoot.suspendedBy[i]);\n }\n const suspendedByRange = inspectedRoot.suspendedByRange;\n if (suspendedByRange !== null) {\n if (suspendedByRange[0] < minSuspendedByRange) {\n minSuspendedByRange = suspendedByRange[0];\n }\n if (suspendedByRange[1] > maxSuspendedByRange) {\n maxSuspendedByRange = suspendedByRange[1];\n }\n }\n }\n\n if (minSuspendedByRange !== Infinity || maxSuspendedByRange !== -Infinity) {\n inspectedRoots.suspendedByRange = [\n minSuspendedByRange,\n maxSuspendedByRange,\n ];\n }\n\n return inspectedRoots;\n }\n\n function logElementToConsole(id: number): void {\n const result = inspectElementRaw(id);\n if (result === null) {\n console.warn(`Could not find element with id \"${id}\"`);\n return;\n }\n\n const displayName = getDisplayNameForElementID(id);\n\n const supportsGroup = typeof console.groupCollapsed === 'function';\n if (supportsGroup) {\n console.groupCollapsed(\n `[Click to expand] %c<${displayName || 'Component'} />`,\n // --dom-tag-name-color is the CSS variable Chrome styles HTML elements with in the console.\n 'color: var(--dom-tag-name-color); font-weight: normal;',\n );\n }\n if (result.props !== null) {\n console.log('Props:', result.props);\n }\n if (result.state !== null) {\n console.log('State:', result.state);\n }\n if (result.context !== null) {\n console.log('Context:', result.context);\n }\n const hostInstance = findHostInstanceForInternalID(id);\n if (hostInstance !== null) {\n console.log('Node:', hostInstance);\n }\n if (window.chrome || /firefox/i.test(navigator.userAgent)) {\n console.log(\n 'Right-click any value to save it as a global variable for further inspection.',\n );\n }\n if (supportsGroup) {\n console.groupEnd();\n }\n }\n\n function getElementAttributeByPath(\n id: number,\n path: Array<string | number>,\n ): mixed {\n const inspectedElement = inspectElementRaw(id);\n if (inspectedElement !== null) {\n return getInObject(inspectedElement, path);\n }\n return undefined;\n }\n\n function getElementSourceFunctionById(id: number): null | Function {\n const internalInstance = idToInternalInstanceMap.get(id);\n if (internalInstance == null) {\n console.warn(`Could not find instance with id \"${id}\"`);\n return null;\n }\n\n const element = internalInstance._currentElement;\n if (element == null) {\n console.warn(`Could not find element with id \"${id}\"`);\n return null;\n }\n\n return element.type;\n }\n\n function deletePath(\n type: 'context' | 'hooks' | 'props' | 'state',\n id: number,\n hookID: ?number,\n path: Array<string | number>,\n ): void {\n const internalInstance = idToInternalInstanceMap.get(id);\n if (internalInstance != null) {\n const publicInstance = internalInstance._instance;\n if (publicInstance != null) {\n switch (type) {\n case 'context':\n deletePathInObject(publicInstance.context, path);\n forceUpdate(publicInstance);\n break;\n case 'hooks':\n throw new Error('Hooks not supported by this renderer');\n case 'props':\n const element = internalInstance._currentElement;\n internalInstance._currentElement = {\n ...element,\n props: copyWithDelete(element.props, path),\n };\n forceUpdate(publicInstance);\n break;\n case 'state':\n deletePathInObject(publicInstance.state, path);\n forceUpdate(publicInstance);\n break;\n }\n }\n }\n }\n\n function renamePath(\n type: 'context' | 'hooks' | 'props' | 'state',\n id: number,\n hookID: ?number,\n oldPath: Array<string | number>,\n newPath: Array<string | number>,\n ): void {\n const internalInstance = idToInternalInstanceMap.get(id);\n if (internalInstance != null) {\n const publicInstance = internalInstance._instance;\n if (publicInstance != null) {\n switch (type) {\n case 'context':\n renamePathInObject(publicInstance.context, oldPath, newPath);\n forceUpdate(publicInstance);\n break;\n case 'hooks':\n throw new Error('Hooks not supported by this renderer');\n case 'props':\n const element = internalInstance._currentElement;\n internalInstance._currentElement = {\n ...element,\n props: copyWithRename(element.props, oldPath, newPath),\n };\n forceUpdate(publicInstance);\n break;\n case 'state':\n renamePathInObject(publicInstance.state, oldPath, newPath);\n forceUpdate(publicInstance);\n break;\n }\n }\n }\n }\n\n function overrideValueAtPath(\n type: 'context' | 'hooks' | 'props' | 'state',\n id: number,\n hookID: ?number,\n path: Array<string | number>,\n value: any,\n ): void {\n const internalInstance = idToInternalInstanceMap.get(id);\n if (internalInstance != null) {\n const publicInstance = internalInstance._instance;\n if (publicInstance != null) {\n switch (type) {\n case 'context':\n setInObject(publicInstance.context, path, value);\n forceUpdate(publicInstance);\n break;\n case 'hooks':\n throw new Error('Hooks not supported by this renderer');\n case 'props':\n const element = internalInstance._currentElement;\n internalInstance._currentElement = {\n ...element,\n props: copyWithSet(element.props, path, value),\n };\n forceUpdate(publicInstance);\n break;\n case 'state':\n setInObject(publicInstance.state, path, value);\n forceUpdate(publicInstance);\n break;\n }\n }\n }\n }\n\n // v16+ only features\n const getProfilingData = () => {\n throw new Error('getProfilingData not supported by this renderer');\n };\n const handleCommitFiberRoot = () => {\n throw new Error('handleCommitFiberRoot not supported by this renderer');\n };\n const handleCommitFiberUnmount = () => {\n throw new Error('handleCommitFiberUnmount not supported by this renderer');\n };\n const handlePostCommitFiberRoot = () => {\n throw new Error('handlePostCommitFiberRoot not supported by this renderer');\n };\n const overrideError = () => {\n throw new Error('overrideError not supported by this renderer');\n };\n const overrideSuspense = () => {\n throw new Error('overrideSuspense not supported by this renderer');\n };\n const overrideSuspenseMilestone = () => {\n throw new Error('overrideSuspenseMilestone not supported by this renderer');\n };\n const startProfiling = () => {\n // Do not throw, since this would break a multi-root scenario where v15 and v16 were both present.\n };\n const stopProfiling = () => {\n // Do not throw, since this would break a multi-root scenario where v15 and v16 were both present.\n };\n\n function getBestMatchForTrackedPath(): PathMatch | null {\n // Not implemented.\n return null;\n }\n\n function getPathForElement(id: number): Array<PathFrame> | null {\n // Not implemented.\n return null;\n }\n\n function updateComponentFilters(componentFilters: Array<ComponentFilter>) {\n // Not implemented.\n }\n\n function getEnvironmentNames(): Array<string> {\n // No RSC support.\n return [];\n }\n\n function setTraceUpdatesEnabled(enabled: boolean) {\n // Not implemented.\n }\n\n function setTrackedPath(path: Array<PathFrame> | null) {\n // Not implemented.\n }\n\n function getOwnersList(id: number): Array<SerializedElement> | null {\n // Not implemented.\n return null;\n }\n\n function clearErrorsAndWarnings() {\n // Not implemented\n }\n\n function clearErrorsForElementID(id: number) {\n // Not implemented\n }\n\n function clearWarningsForElementID(id: number) {\n // Not implemented\n }\n\n function hasElementWithId(id: number): boolean {\n return idToInternalInstanceMap.has(id);\n }\n\n return {\n clearErrorsAndWarnings,\n clearErrorsForElementID,\n clearWarningsForElementID,\n cleanup,\n getSerializedElementValueByPath,\n deletePath,\n flushInitialOperations,\n getBestMatchForTrackedPath,\n getDisplayNameForElementID,\n getNearestMountedDOMNode,\n getElementIDForHostInstance,\n getSuspenseNodeIDForHostInstance(id: number): null {\n return null;\n },\n getInstanceAndStyle,\n findHostInstancesForElementID: (id: number) => {\n const hostInstance = findHostInstanceForInternalID(id);\n return hostInstance == null ? null : [hostInstance];\n },\n findLastKnownRectsForID() {\n return null;\n },\n getOwnersList,\n getPathForElement,\n getProfilingData,\n handleCommitFiberRoot,\n handleCommitFiberUnmount,\n handlePostCommitFiberRoot,\n hasElementWithId,\n inspectElement,\n logElementToConsole,\n overrideError,\n overrideSuspense,\n overrideSuspenseMilestone,\n overrideValueAtPath,\n renamePath,\n getElementAttributeByPath,\n getElementSourceFunctionById,\n renderer,\n setTraceUpdatesEnabled,\n setTrackedPath,\n startProfiling,\n stopProfiling,\n storeAsGlobal,\n supportsTogglingSuspense,\n updateComponentFilters,\n getEnvironmentNames,\n };\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport type {\n ReactRenderer,\n RendererInterface,\n DevToolsHook,\n RendererID,\n ProfilingSettings,\n} from 'react-devtools-shared/src/backend/types';\n\nimport {attach as attachFlight} from 'react-devtools-shared/src/backend/flight/renderer';\nimport {attach as attachFiber} from 'react-devtools-shared/src/backend/fiber/renderer';\nimport {attach as attachLegacy} from 'react-devtools-shared/src/backend/legacy/renderer';\nimport {hasAssignedBackend} from 'react-devtools-shared/src/backend/utils';\n\n// this is the backend that is compatible with all older React versions\nfunction isMatchingRender(version: string): boolean {\n return !hasAssignedBackend(version);\n}\n\nexport default function attachRenderer(\n hook: DevToolsHook,\n id: RendererID,\n renderer: ReactRenderer,\n global: Object,\n shouldStartProfilingNow: boolean,\n profilingSettings: ProfilingSettings,\n): RendererInterface | void {\n // only attach if the renderer is compatible with the current version of the backend\n if (!isMatchingRender(renderer.reconcilerVersion || renderer.version)) {\n return;\n }\n let rendererInterface = hook.rendererInterfaces.get(id);\n\n // Inject any not-yet-injected renderers (if we didn't reload-and-profile)\n if (rendererInterface == null) {\n if (typeof renderer.getCurrentComponentInfo === 'function') {\n // react-flight/client\n rendererInterface = attachFlight(hook, id, renderer, global);\n } else if (\n // v16-19\n typeof renderer.findFiberByHostInstance === 'function' ||\n // v16.8+\n renderer.currentDispatcherRef != null\n ) {\n // react-reconciler v16+\n rendererInterface = attachFiber(\n hook,\n id,\n renderer,\n global,\n shouldStartProfilingNow,\n profilingSettings,\n );\n } else if (renderer.ComponentTree) {\n // react-dom v15\n rendererInterface = attachLegacy(hook, id, renderer, global);\n } else {\n // Older react-dom or other unsupported renderer version\n }\n }\n\n return rendererInterface;\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\n// Do not add / import anything to this file.\n// This function could be used from multiple places, including hook.\n\n// Skips CSS and object arguments, inlines other in the first argument as a template string\nexport default function formatConsoleArguments(\n maybeMessage: any,\n ...inputArgs: $ReadOnlyArray<any>\n): $ReadOnlyArray<any> {\n if (inputArgs.length === 0 || typeof maybeMessage !== 'string') {\n return [maybeMessage, ...inputArgs];\n }\n\n const args = inputArgs.slice();\n\n let template = '';\n let argumentsPointer = 0;\n for (let i = 0; i < maybeMessage.length; ++i) {\n const currentChar = maybeMessage[i];\n if (currentChar !== '%') {\n template += currentChar;\n continue;\n }\n\n const nextChar = maybeMessage[i + 1];\n ++i;\n\n // Only keep CSS and objects, inline other arguments\n switch (nextChar) {\n case 'c':\n case 'O':\n case 'o': {\n ++argumentsPointer;\n template += `%${nextChar}`;\n\n break;\n }\n case 'd':\n case 'i': {\n const [arg] = args.splice(argumentsPointer, 1);\n template += parseInt(arg, 10).toString();\n\n break;\n }\n case 'f': {\n const [arg] = args.splice(argumentsPointer, 1);\n template += parseFloat(arg).toString();\n\n break;\n }\n case 's': {\n const [arg] = args.splice(argumentsPointer, 1);\n template += String(arg);\n\n break;\n }\n\n default:\n template += `%${nextChar}`;\n }\n }\n\n return [template, ...args];\n}\n","/**\n * Install the hook on window, which is an event emitter.\n * Note: this global hook __REACT_DEVTOOLS_GLOBAL_HOOK__ is a de facto public API.\n * It's especially important to avoid creating direct dependency on the DevTools Backend.\n * That's why we still inline the whole event emitter implementation,\n * the string format implementation, and part of the console implementation here.\n *\n * @flow\n */\n\nimport type {\n DevToolsHook,\n Handler,\n ReactRenderer,\n RendererID,\n RendererInterface,\n DevToolsBackend,\n DevToolsHookSettings,\n ProfilingSettings,\n} from './backend/types';\n\nimport {\n FIREFOX_CONSOLE_DIMMING_COLOR,\n ANSI_STYLE_DIMMING_TEMPLATE,\n ANSI_STYLE_DIMMING_TEMPLATE_WITH_COMPONENT_STACK,\n} from 'react-devtools-shared/src/constants';\nimport attachRenderer from './attachRenderer';\nimport formatConsoleArguments from 'react-devtools-shared/src/backend/utils/formatConsoleArguments';\nimport formatWithStyles from 'react-devtools-shared/src/backend/utils/formatWithStyles';\n\n// React's custom built component stack strings match \"\\s{4}in\"\n// Chrome's prefix matches \"\\s{4}at\"\nconst PREFIX_REGEX = /\\s{4}(in|at)\\s{1}/;\n// Firefox and Safari have no prefix (\"\")\n// but we can fallback to looking for location info (e.g. \"foo.js:12:345\")\nconst ROW_COLUMN_NUMBER_REGEX = /:\\d+:\\d+(\\n|$)/;\n\nfunction isStringComponentStack(text: string): boolean {\n return PREFIX_REGEX.test(text) || ROW_COLUMN_NUMBER_REGEX.test(text);\n}\n\n// We add a suffix to some frames that older versions of React didn't do.\n// To compare if it's equivalent we strip out the suffix to see if they're\n// still equivalent. Similarly, we sometimes use [] and sometimes () so we\n// strip them to for the comparison.\nconst frameDiffs = / \\(\\<anonymous\\>\\)$|\\@unknown\\:0\\:0$|\\(|\\)|\\[|\\]/gm;\nfunction areStackTracesEqual(a: string, b: string): boolean {\n return a.replace(frameDiffs, '') === b.replace(frameDiffs, '');\n}\n\nconst targetConsole: Object = console;\n\nconst defaultProfilingSettings: ProfilingSettings = {\n recordChangeDescriptions: false,\n recordTimeline: false,\n};\n\nexport function installHook(\n target: any,\n maybeSettingsOrSettingsPromise?:\n | DevToolsHookSettings\n | Promise<DevToolsHookSettings>,\n shouldStartProfilingNow: boolean = false,\n profilingSettings: ProfilingSettings = defaultProfilingSettings,\n): DevToolsHook | null {\n if (target.hasOwnProperty('__REACT_DEVTOOLS_GLOBAL_HOOK__')) {\n return null;\n }\n\n function detectReactBuildType(renderer: ReactRenderer) {\n try {\n if (typeof renderer.version === 'string') {\n // React DOM Fiber (16+)\n if (renderer.bundleType > 0) {\n // This is not a production build.\n // We are currently only using 0 (PROD) and 1 (DEV)\n // but might add 2 (PROFILE) in the future.\n return 'development';\n }\n\n // React 16 uses flat bundles. If we report the bundle as production\n // version, it means we also minified and envified it ourselves.\n return 'production';\n // Note: There is still a risk that the CommonJS entry point has not\n // been envified or uglified. In this case the user would have *both*\n // development and production bundle, but only the prod one would run.\n // This would be really bad. We have a separate check for this because\n // it happens *outside* of the renderer injection. See `checkDCE` below.\n }\n\n // $FlowFixMe[method-unbinding]\n const toString = Function.prototype.toString;\n if (renderer.Mount && renderer.Mount._renderNewRootComponent) {\n // React DOM Stack\n const renderRootCode = toString.call(\n renderer.Mount._renderNewRootComponent,\n );\n // Filter out bad results (if that is even possible):\n if (renderRootCode.indexOf('function') !== 0) {\n // Hope for the best if we're not sure.\n return 'production';\n }\n // Check for React DOM Stack < 15.1.0 in development.\n // If it contains \"storedMeasure\" call, it's wrapped in ReactPerf (DEV only).\n // This would be true even if it's minified, as method name still matches.\n if (renderRootCode.indexOf('storedMeasure') !== -1) {\n return 'development';\n }\n // For other versions (and configurations) it's not so easy.\n // Let's quickly exclude proper production builds.\n // If it contains a warning message, it's either a DEV build,\n // or an PROD build without proper dead code elimination.\n if (renderRootCode.indexOf('should be a pure function') !== -1) {\n // Now how do we tell a DEV build from a bad PROD build?\n // If we see NODE_ENV, we're going to assume this is a dev build\n // because most likely it is referring to an empty shim.\n if (renderRootCode.indexOf('NODE_ENV') !== -1) {\n return 'development';\n }\n // If we see \"development\", we're dealing with an envified DEV build\n // (such as the official React DEV UMD).\n if (renderRootCode.indexOf('development') !== -1) {\n return 'development';\n }\n // I've seen process.env.NODE_ENV !== 'production' being smartly\n // replaced by `true` in DEV by Webpack. I don't know how that\n // works but we can safely guard against it because `true` was\n // never used in the function source since it was written.\n if (renderRootCode.indexOf('true') !== -1) {\n return 'development';\n }\n // By now either it is a production build that has not been minified,\n // or (worse) this is a minified development build using non-standard\n // environment (e.g. \"staging\"). We're going to look at whether\n // the function argument name is mangled:\n if (\n // 0.13 to 15\n renderRootCode.indexOf('nextElement') !== -1 ||\n // 0.12\n renderRootCode.indexOf('nextComponent') !== -1\n ) {\n // We can't be certain whether this is a development build or not,\n // but it is definitely unminified.\n return 'unminified';\n } else {\n // This is likely a minified development build.\n return 'development';\n }\n }\n // By now we know that it's envified and dead code elimination worked,\n // but what if it's still not minified? (Is this even possible?)\n // Let's check matches for the first argument name.\n if (\n // 0.13 to 15\n renderRootCode.indexOf('nextElement') !== -1 ||\n // 0.12\n renderRootCode.indexOf('nextComponent') !== -1\n ) {\n return 'unminified';\n }\n // Seems like we're using the production version.\n // However, the branch above is Stack-only so this is 15 or earlier.\n return 'outdated';\n }\n } catch (err) {\n // Weird environments may exist.\n // This code needs a higher fault tolerance\n // because it runs even with closed DevTools.\n // TODO: should we catch errors in all injected code, and not just this part?\n }\n return 'production';\n }\n\n function checkDCE(fn: Function) {\n // This runs for production versions of React.\n // Needs to be super safe.\n try {\n // $FlowFixMe[method-unbinding]\n const toString = Function.prototype.toString;\n const code = toString.call(fn);\n\n // This is a string embedded in the passed function under DEV-only\n // condition. However the function executes only in PROD. Therefore,\n // if we see it, dead code elimination did not work.\n if (code.indexOf('^_^') > -1) {\n // Remember to report during next injection.\n hasDetectedBadDCE = true;\n\n // Bonus: throw an exception hoping that it gets picked up by a reporting system.\n // Not synchronously so that it doesn't break the calling code.\n setTimeout(function () {\n throw new Error(\n 'React is running in production mode, but dead code ' +\n 'elimination has not been applied. Read how to correctly ' +\n 'configure React for production: ' +\n 'https://react.dev/link/perf-use-production-build',\n );\n });\n }\n } catch (err) {}\n }\n\n // TODO: isProfiling should be stateful, and we should update it once profiling is finished\n const isProfiling = shouldStartProfilingNow;\n let uidCounter = 0;\n function inject(renderer: ReactRenderer): number {\n const id = ++uidCounter;\n renderers.set(id, renderer);\n\n const reactBuildType = hasDetectedBadDCE\n ? 'deadcode'\n : detectReactBuildType(renderer);\n\n hook.emit('renderer', {\n id,\n renderer,\n reactBuildType,\n });\n\n const rendererInterface = attachRenderer(\n hook,\n id,\n renderer,\n target,\n isProfiling,\n profilingSettings,\n );\n if (rendererInterface != null) {\n hook.rendererInterfaces.set(id, rendererInterface);\n hook.emit('renderer-attached', {id, rendererInterface});\n } else {\n hook.hasUnsupportedRendererAttached = true;\n hook.emit('unsupported-renderer-version');\n }\n\n return id;\n }\n\n let hasDetectedBadDCE = false;\n\n function sub(event: string, fn: Handler) {\n hook.on(event, fn);\n return () => hook.off(event, fn);\n }\n\n function on(event: string, fn: Handler) {\n if (!listeners[event]) {\n listeners[event] = [];\n }\n listeners[event].push(fn);\n }\n\n function off(event: string, fn: Handler) {\n if (!listeners[event]) {\n return;\n }\n const index = listeners[event].indexOf(fn);\n if (index !== -1) {\n listeners[event].splice(index, 1);\n }\n if (!listeners[event].length) {\n delete listeners[event];\n }\n }\n\n function emit(event: string, data: any) {\n if (listeners[event]) {\n listeners[event].map(fn => fn(data));\n }\n }\n\n function getFiberRoots(rendererID: RendererID) {\n const roots = fiberRoots;\n if (!roots[rendererID]) {\n roots[rendererID] = new Set();\n }\n return roots[rendererID];\n }\n\n function onCommitFiberUnmount(rendererID: RendererID, fiber: any) {\n const rendererInterface = rendererInterfaces.get(rendererID);\n if (rendererInterface != null) {\n rendererInterface.handleCommitFiberUnmount(fiber);\n }\n }\n\n function onCommitFiberRoot(\n rendererID: RendererID,\n root: any,\n priorityLevel: void | number,\n ) {\n const mountedRoots = hook.getFiberRoots(rendererID);\n const current = root.current;\n const isKnownRoot = mountedRoots.has(root);\n const isUnmounting =\n current.memoizedState == null || current.memoizedState.element == null;\n\n // Keep track of mounted roots so we can hydrate when DevTools connect.\n if (!isKnownRoot && !isUnmounting) {\n mountedRoots.add(root);\n } else if (isKnownRoot && isUnmounting) {\n mountedRoots.delete(root);\n }\n const rendererInterface = rendererInterfaces.get(rendererID);\n if (rendererInterface != null) {\n rendererInterface.handleCommitFiberRoot(root, priorityLevel);\n }\n }\n\n function onPostCommitFiberRoot(rendererID: RendererID, root: any) {\n const rendererInterface = rendererInterfaces.get(rendererID);\n if (rendererInterface != null) {\n rendererInterface.handlePostCommitFiberRoot(root);\n }\n }\n\n let isRunningDuringStrictModeInvocation = false;\n function setStrictMode(rendererID: RendererID, isStrictMode: boolean) {\n isRunningDuringStrictModeInvocation = isStrictMode;\n\n if (isStrictMode) {\n patchConsoleForStrictMode();\n } else {\n unpatchConsoleForStrictMode();\n }\n }\n\n const unpatchConsoleCallbacks = [];\n // For StrictMode we patch console once we are running in StrictMode and unpatch right after it\n // So patching could happen multiple times during the runtime\n // Notice how we don't patch error or warn methods, because they are already patched in patchConsoleForErrorsAndWarnings\n // This will only happen once, when hook is installed\n function patchConsoleForStrictMode() {\n // Don't patch console in case settings were not injected\n if (!hook.settings) {\n return;\n }\n\n // Don't patch twice\n if (unpatchConsoleCallbacks.length > 0) {\n return;\n }\n\n // At this point 'error', 'warn', and 'trace' methods are already patched\n // by React DevTools hook to append component stacks and other possible features.\n const consoleMethodsToOverrideForStrictMode = [\n 'group',\n 'groupCollapsed',\n 'info',\n 'log',\n ];\n\n // eslint-disable-next-line no-for-of-loops/no-for-of-loops\n for (const method of consoleMethodsToOverrideForStrictMode) {\n const originalMethod = targetConsole[method];\n const overrideMethod: (...args: Array<any>) => void = (\n ...args: any[]\n ) => {\n const settings = hook.settings;\n // Something unexpected happened, fallback to just printing the console message.\n if (settings == null) {\n originalMethod(...args);\n return;\n }\n\n if (settings.hideConsoleLogsInStrictMode) {\n return;\n }\n\n // Dim the text color of the double logs if we're not hiding them.\n // Firefox doesn't support ANSI escape sequences\n if (__IS_FIREFOX__) {\n originalMethod(\n ...formatWithStyles(args, FIREFOX_CONSOLE_DIMMING_COLOR),\n );\n } else {\n originalMethod(\n ANSI_STYLE_DIMMING_TEMPLATE,\n ...formatConsoleArguments(...args),\n );\n }\n };\n\n targetConsole[method] = overrideMethod;\n unpatchConsoleCallbacks.push(() => {\n targetConsole[method] = originalMethod;\n });\n }\n }\n\n function unpatchConsoleForStrictMode() {\n unpatchConsoleCallbacks.forEach(callback => callback());\n unpatchConsoleCallbacks.length = 0;\n }\n\n type StackFrameString = string;\n\n const openModuleRangesStack: Array<StackFrameString> = [];\n const moduleRanges: Array<[StackFrameString, StackFrameString]> = [];\n\n function getTopStackFrameString(error: Error): StackFrameString | null {\n const frames = error.stack.split('\\n');\n const frame = frames.length > 1 ? frames[1] : null;\n return frame;\n }\n\n function getInternalModuleRanges(): Array<\n [StackFrameString, StackFrameString],\n > {\n return moduleRanges;\n }\n\n function registerInternalModuleStart(error: Error) {\n const startStackFrame = getTopStackFrameString(error);\n if (startStackFrame !== null) {\n openModuleRangesStack.push(startStackFrame);\n }\n }\n\n function registerInternalModuleStop(error: Error) {\n if (openModuleRangesStack.length > 0) {\n const startStackFrame = openModuleRangesStack.pop();\n const stopStackFrame = getTopStackFrameString(error);\n if (stopStackFrame !== null) {\n // $FlowFixMe[incompatible-call]\n moduleRanges.push([startStackFrame, stopStackFrame]);\n }\n }\n }\n\n // For Errors and Warnings we only patch console once\n function patchConsoleForErrorsAndWarnings() {\n // Don't patch console in case settings were not injected\n if (!hook.settings) {\n return;\n }\n\n const consoleMethodsToOverrideForErrorsAndWarnings = [\n 'error',\n 'trace',\n 'warn',\n ];\n\n // eslint-disable-next-line no-for-of-loops/no-for-of-loops\n for (const method of consoleMethodsToOverrideForErrorsAndWarnings) {\n const originalMethod = targetConsole[method];\n const overrideMethod: (...args: Array<any>) => void = (...args) => {\n const settings = hook.settings;\n // Something unexpected happened, fallback to just printing the console message.\n if (settings == null) {\n originalMethod(...args);\n return;\n }\n\n if (\n isRunningDuringStrictModeInvocation &&\n settings.hideConsoleLogsInStrictMode\n ) {\n return;\n }\n\n let injectedComponentStackAsFakeError = false;\n let alreadyHasComponentStack = false;\n if (settings.appendComponentStack) {\n const lastArg = args.length > 0 ? args[args.length - 1] : null;\n alreadyHasComponentStack =\n typeof lastArg === 'string' && isStringComponentStack(lastArg); // The last argument should be a component stack.\n }\n\n const shouldShowInlineWarningsAndErrors =\n settings.showInlineWarningsAndErrors &&\n (method === 'error' || method === 'warn');\n\n // Search for the first renderer that has a current Fiber.\n // We don't handle the edge case of stacks for more than one (e.g. interleaved renderers?)\n // eslint-disable-next-line no-for-of-loops/no-for-of-loops\n for (const rendererInterface of hook.rendererInterfaces.values()) {\n const {onErrorOrWarning, getComponentStack} = rendererInterface;\n try {\n if (shouldShowInlineWarningsAndErrors) {\n // patch() is called by two places: (1) the hook and (2) the renderer backend.\n // The backend is what implements a message queue, so it's the only one that injects onErrorOrWarning.\n if (onErrorOrWarning != null) {\n onErrorOrWarning(\n ((method: any): 'error' | 'warn'),\n args.slice(),\n );\n }\n }\n } catch (error) {\n // Don't let a DevTools or React internal error interfere with logging.\n setTimeout(() => {\n throw error;\n }, 0);\n }\n\n try {\n if (settings.appendComponentStack && getComponentStack != null) {\n // This needs to be directly in the wrapper so we can pop exactly one frame.\n const topFrame = Error('react-stack-top-frame');\n const match = getComponentStack(topFrame);\n if (match !== null) {\n const {enableOwnerStacks, componentStack} = match;\n // Empty string means we have a match but no component stack.\n // We don't need to look in other renderers but we also don't add anything.\n if (componentStack !== '') {\n // Create a fake Error so that when we print it we get native source maps. Every\n // browser will print the .stack property of the error and then parse it back for source\n // mapping. Rather than print the internal slot. So it doesn't matter that the internal\n // slot doesn't line up.\n const fakeError = new Error('');\n // In Chromium, only the stack property is printed but in Firefox the <name>:<message>\n // gets printed so to make the colon make sense, we name it so we print Stack:\n // and similarly Safari leave an expandable slot.\n if (__IS_CHROME__ || __IS_EDGE__) {\n // Before sending the stack to Chrome DevTools for formatting,\n // V8 will reconstruct this according to the template <name>: <message><stack-frames>\n // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/inspector/value-mirror.cc;l=252-311;drc=bdc48d1b1312cc40c00282efb1c9c5f41dcdca9a\n // It has to start with ^[\\w.]*Error\\b to trigger stack formatting.\n fakeError.name = enableOwnerStacks\n ? 'Error Stack'\n : 'Error Component Stack'; // This gets printed\n } else {\n fakeError.name = enableOwnerStacks\n ? 'Stack'\n : 'Component Stack'; // This gets printed\n }\n // In Chromium, the stack property needs to start with ^[\\w.]*Error\\b to trigger stack\n // formatting. Otherwise it is left alone. So we prefix it. Otherwise we just override it\n // to our own stack.\n fakeError.stack =\n __IS_CHROME__ || __IS_EDGE__ || __IS_NATIVE__\n ? (enableOwnerStacks\n ? 'Error Stack:'\n : 'Error Component Stack:') + componentStack\n : componentStack;\n\n if (alreadyHasComponentStack) {\n // Only modify the component stack if it matches what we would've added anyway.\n // Otherwise we assume it was a non-React stack.\n if (\n areStackTracesEqual(args[args.length - 1], componentStack)\n ) {\n const firstArg = args[0];\n if (\n args.length > 1 &&\n typeof firstArg === 'string' &&\n firstArg.endsWith('%s')\n ) {\n args[0] = firstArg.slice(0, firstArg.length - 2); // Strip the %s param\n }\n args[args.length - 1] = fakeError;\n injectedComponentStackAsFakeError = true;\n }\n } else {\n args.push(fakeError);\n injectedComponentStackAsFakeError = true;\n }\n }\n\n // Don't add stacks from other renderers.\n break;\n }\n }\n } catch (error) {\n // Don't let a DevTools or React internal error interfere with logging.\n setTimeout(() => {\n throw error;\n }, 0);\n }\n }\n\n if (settings.breakOnConsoleErrors) {\n // --- Welcome to debugging with React DevTools ---\n // This debugger statement means that you've enabled the \"break on warnings\" feature.\n // Use the browser's Call Stack panel to step out of this override function\n // to where the original warning or error was logged.\n // eslint-disable-next-line no-debugger\n debugger;\n }\n\n if (isRunningDuringStrictModeInvocation) {\n // Dim the text color of the double logs if we're not hiding them.\n // Firefox doesn't support ANSI escape sequences\n if (__IS_FIREFOX__) {\n let argsWithCSSStyles = formatWithStyles(\n args,\n FIREFOX_CONSOLE_DIMMING_COLOR,\n );\n\n if (injectedComponentStackAsFakeError) {\n argsWithCSSStyles = [\n `${argsWithCSSStyles[0]} %o`,\n ...argsWithCSSStyles.slice(1),\n ];\n }\n\n originalMethod(...argsWithCSSStyles);\n } else {\n originalMethod(\n injectedComponentStackAsFakeError\n ? ANSI_STYLE_DIMMING_TEMPLATE_WITH_COMPONENT_STACK\n : ANSI_STYLE_DIMMING_TEMPLATE,\n ...formatConsoleArguments(...args),\n );\n }\n } else {\n originalMethod(...args);\n }\n };\n\n targetConsole[method] = overrideMethod;\n }\n }\n\n // TODO: More meaningful names for \"rendererInterfaces\" and \"renderers\".\n const fiberRoots: {[RendererID]: Set<mixed>} = {};\n const rendererInterfaces = new Map<RendererID, RendererInterface>();\n const listeners: {[string]: Array<Handler>} = {};\n const renderers = new Map<RendererID, ReactRenderer>();\n const backends = new Map<string, DevToolsBackend>();\n\n const hook: DevToolsHook = {\n rendererInterfaces,\n listeners,\n\n backends,\n\n // Fast Refresh for web relies on this.\n renderers,\n hasUnsupportedRendererAttached: false,\n\n emit,\n getFiberRoots,\n inject,\n on,\n off,\n sub,\n\n // This is a legacy flag.\n // React v16 checks the hook for this to ensure DevTools is new enough.\n supportsFiber: true,\n\n // React Flight Client checks the hook for this to ensure DevTools is new enough.\n supportsFlight: true,\n\n // React calls these methods.\n checkDCE,\n onCommitFiberUnmount,\n onCommitFiberRoot,\n // React v18.0+\n onPostCommitFiberRoot,\n setStrictMode,\n\n // Schedule Profiler runtime helpers.\n // These internal React modules to report their own boundaries\n // which in turn enables the profiler to dim or filter internal frames.\n getInternalModuleRanges,\n registerInternalModuleStart,\n registerInternalModuleStop,\n };\n\n if (maybeSettingsOrSettingsPromise == null) {\n // Set default settings\n hook.settings = {\n appendComponentStack: true,\n breakOnConsoleErrors: false,\n showInlineWarningsAndErrors: true,\n hideConsoleLogsInStrictMode: false,\n };\n patchConsoleForErrorsAndWarnings();\n } else {\n Promise.resolve(maybeSettingsOrSettingsPromise)\n .then(settings => {\n hook.settings = settings;\n hook.emit('settingsInitialized', settings);\n\n patchConsoleForErrorsAndWarnings();\n })\n .catch(() => {\n targetConsole.error(\n \"React DevTools failed to get Console Patching settings. Console won't be patched and some console features will not work.\",\n );\n });\n }\n\n Object.defineProperty(\n target,\n '__REACT_DEVTOOLS_GLOBAL_HOOK__',\n ({\n // This property needs to be configurable for the test environment,\n // else we won't be able to delete and recreate it between tests.\n configurable: __DEV__,\n enumerable: false,\n get() {\n return hook;\n },\n }: Object),\n );\n\n return hook;\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport Agent from './agent';\n\nimport type {DevToolsHook, RendererID, RendererInterface} from './types';\n\nexport type InitBackend = typeof initBackend;\n\nexport function initBackend(\n hook: DevToolsHook,\n agent: Agent,\n global: Object,\n isReloadAndProfileSupported: boolean,\n): () => void {\n if (hook == null) {\n // DevTools didn't get injected into this page (maybe b'c of the contentType).\n return () => {};\n }\n\n function registerRendererInterface(\n id: RendererID,\n rendererInterface: RendererInterface,\n ) {\n agent.registerRendererInterface(id, rendererInterface);\n\n // Now that the Store and the renderer interface are connected,\n // it's time to flush the pending operation codes to the frontend.\n rendererInterface.flushInitialOperations();\n }\n\n const subs = [\n hook.sub(\n 'renderer-attached',\n ({\n id,\n rendererInterface,\n }: {\n id: number,\n rendererInterface: RendererInterface,\n }) => {\n registerRendererInterface(id, rendererInterface);\n },\n ),\n hook.sub('unsupported-renderer-version', () => {\n agent.onUnsupportedRenderer();\n }),\n\n hook.sub('fastRefreshScheduled', agent.onFastRefreshScheduled),\n hook.sub('operations', agent.onHookOperations),\n hook.sub('traceUpdates', agent.onTraceUpdates),\n hook.sub('settingsInitialized', agent.onHookSettings),\n\n // TODO Add additional subscriptions required for profiling mode\n ];\n\n agent.addListener('getIfHasUnsupportedRendererVersion', () => {\n if (hook.hasUnsupportedRendererAttached) {\n agent.onUnsupportedRenderer();\n }\n });\n\n hook.rendererInterfaces.forEach((rendererInterface, id) => {\n registerRendererInterface(id, rendererInterface);\n });\n\n hook.emit('react-devtools', agent);\n hook.reactDevtoolsAgent = agent;\n\n const onAgentShutdown = () => {\n subs.forEach(fn => fn());\n hook.rendererInterfaces.forEach(rendererInterface => {\n rendererInterface.cleanup();\n });\n hook.reactDevtoolsAgent = null;\n };\n\n // Agent's event listeners are cleaned up by Agent in `shutdown` implementation.\n agent.addListener('shutdown', onAgentShutdown);\n agent.addListener('updateHookSettings', settings => {\n hook.settings = settings;\n });\n agent.addListener('getHookSettings', () => {\n if (hook.settings != null) {\n agent.onHookSettings(hook.settings);\n }\n });\n\n if (isReloadAndProfileSupported) {\n agent.onReloadAndProfileSupportedByHost();\n }\n\n return () => {\n subs.forEach(fn => fn());\n };\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport type {BoxStyle} from './types';\n\n/**\n * This mirrors react-native/Libraries/Inspector/resolveBoxStyle.js (but without RTL support).\n *\n * Resolve a style property into it's component parts, e.g.\n *\n * resolveBoxStyle('margin', {margin: 5, marginBottom: 10})\n * -> {top: 5, left: 5, right: 5, bottom: 10}\n */\nexport default function resolveBoxStyle(\n prefix: string,\n style: Object,\n): BoxStyle | null {\n let hasParts = false;\n const result = {\n bottom: 0,\n left: 0,\n right: 0,\n top: 0,\n };\n\n const styleForAll = style[prefix];\n if (styleForAll != null) {\n // eslint-disable-next-line no-for-of-loops/no-for-of-loops\n for (const key of Object.keys(result)) {\n result[key] = styleForAll;\n }\n hasParts = true;\n }\n\n const styleForHorizontal = style[prefix + 'Horizontal'];\n if (styleForHorizontal != null) {\n result.left = styleForHorizontal;\n result.right = styleForHorizontal;\n hasParts = true;\n } else {\n const styleForLeft = style[prefix + 'Left'];\n if (styleForLeft != null) {\n result.left = styleForLeft;\n hasParts = true;\n }\n\n const styleForRight = style[prefix + 'Right'];\n if (styleForRight != null) {\n result.right = styleForRight;\n hasParts = true;\n }\n\n const styleForEnd = style[prefix + 'End'];\n if (styleForEnd != null) {\n // TODO RTL support\n result.right = styleForEnd;\n hasParts = true;\n }\n const styleForStart = style[prefix + 'Start'];\n if (styleForStart != null) {\n // TODO RTL support\n result.left = styleForStart;\n hasParts = true;\n }\n }\n\n const styleForVertical = style[prefix + 'Vertical'];\n if (styleForVertical != null) {\n result.bottom = styleForVertical;\n result.top = styleForVertical;\n hasParts = true;\n } else {\n const styleForBottom = style[prefix + 'Bottom'];\n if (styleForBottom != null) {\n result.bottom = styleForBottom;\n hasParts = true;\n }\n\n const styleForTop = style[prefix + 'Top'];\n if (styleForTop != null) {\n result.top = styleForTop;\n hasParts = true;\n }\n }\n\n return hasParts ? result : null;\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport Agent from 'react-devtools-shared/src/backend/agent';\nimport resolveBoxStyle from './resolveBoxStyle';\nimport isArray from 'react-devtools-shared/src/isArray';\n\nimport type {BackendBridge} from 'react-devtools-shared/src/bridge';\nimport type {RendererID} from '../types';\nimport type {StyleAndLayout} from './types';\n\nexport type ResolveNativeStyle = (stylesheetID: any) => ?Object;\nexport type SetupNativeStyleEditor = typeof setupNativeStyleEditor;\n\nexport default function setupNativeStyleEditor(\n bridge: BackendBridge,\n agent: Agent,\n resolveNativeStyle: ResolveNativeStyle,\n validAttributes?: $ReadOnlyArray<string> | null,\n) {\n bridge.addListener(\n 'NativeStyleEditor_measure',\n ({id, rendererID}: {id: number, rendererID: RendererID}) => {\n measureStyle(agent, bridge, resolveNativeStyle, id, rendererID);\n },\n );\n\n bridge.addListener(\n 'NativeStyleEditor_renameAttribute',\n ({\n id,\n rendererID,\n oldName,\n newName,\n value,\n }: {\n id: number,\n rendererID: RendererID,\n oldName: string,\n newName: string,\n value: string,\n }) => {\n renameStyle(agent, id, rendererID, oldName, newName, value);\n setTimeout(() =>\n measureStyle(agent, bridge, resolveNativeStyle, id, rendererID),\n );\n },\n );\n\n bridge.addListener(\n 'NativeStyleEditor_setValue',\n ({\n id,\n rendererID,\n name,\n value,\n }: {\n id: number,\n rendererID: number,\n name: string,\n value: string,\n }) => {\n setStyle(agent, id, rendererID, name, value);\n setTimeout(() =>\n measureStyle(agent, bridge, resolveNativeStyle, id, rendererID),\n );\n },\n );\n\n bridge.send('isNativeStyleEditorSupported', {\n isSupported: true,\n validAttributes,\n });\n}\n\nconst EMPTY_BOX_STYLE = {\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n};\n\nconst componentIDToStyleOverrides: Map<number, Object> = new Map();\n\nfunction measureStyle(\n agent: Agent,\n bridge: BackendBridge,\n resolveNativeStyle: ResolveNativeStyle,\n id: number,\n rendererID: RendererID,\n) {\n const data = agent.getInstanceAndStyle({id, rendererID});\n if (!data || !data.style) {\n bridge.send(\n 'NativeStyleEditor_styleAndLayout',\n ({\n id,\n layout: null,\n style: null,\n }: StyleAndLayout),\n );\n return;\n }\n\n const {instance, style} = data;\n\n let resolvedStyle = resolveNativeStyle(style);\n\n // If it's a host component we edited before, amend styles.\n const styleOverrides = componentIDToStyleOverrides.get(id);\n if (styleOverrides != null) {\n resolvedStyle = Object.assign({}, resolvedStyle, styleOverrides);\n }\n\n if (!instance || typeof instance.measure !== 'function') {\n bridge.send(\n 'NativeStyleEditor_styleAndLayout',\n ({\n id,\n layout: null,\n style: resolvedStyle || null,\n }: StyleAndLayout),\n );\n return;\n }\n\n instance.measure((x, y, width, height, left, top) => {\n // RN Android sometimes returns undefined here. Don't send measurements in this case.\n // https://github.com/jhen0409/react-native-debugger/issues/84#issuecomment-304611817\n if (typeof x !== 'number') {\n bridge.send(\n 'NativeStyleEditor_styleAndLayout',\n ({\n id,\n layout: null,\n style: resolvedStyle || null,\n }: StyleAndLayout),\n );\n return;\n }\n const margin =\n (resolvedStyle != null && resolveBoxStyle('margin', resolvedStyle)) ||\n EMPTY_BOX_STYLE;\n const padding =\n (resolvedStyle != null && resolveBoxStyle('padding', resolvedStyle)) ||\n EMPTY_BOX_STYLE;\n bridge.send(\n 'NativeStyleEditor_styleAndLayout',\n ({\n id,\n layout: {\n x,\n y,\n width,\n height,\n left,\n top,\n margin,\n padding,\n },\n style: resolvedStyle || null,\n }: StyleAndLayout),\n );\n });\n}\n\nfunction shallowClone(object: Object): Object {\n const cloned: {[string]: $FlowFixMe} = {};\n for (const n in object) {\n cloned[n] = object[n];\n }\n return cloned;\n}\n\nfunction renameStyle(\n agent: Agent,\n id: number,\n rendererID: RendererID,\n oldName: string,\n newName: string,\n value: string,\n): void {\n const data = agent.getInstanceAndStyle({id, rendererID});\n if (!data || !data.style) {\n return;\n }\n\n const {instance, style} = data;\n\n const newStyle = newName\n ? {[oldName]: (undefined: string | void), [newName]: value}\n : {[oldName]: undefined};\n\n let customStyle;\n\n // TODO It would be nice if the renderer interface abstracted this away somehow.\n if (instance !== null && typeof instance.setNativeProps === 'function') {\n // In the case of a host component, we need to use setNativeProps().\n // Remember to \"correct\" resolved styles when we read them next time.\n const styleOverrides = componentIDToStyleOverrides.get(id);\n if (!styleOverrides) {\n componentIDToStyleOverrides.set(id, newStyle);\n } else {\n Object.assign(styleOverrides, newStyle);\n }\n // TODO Fabric does not support setNativeProps; chat with Sebastian or Eli\n instance.setNativeProps({style: newStyle});\n } else if (isArray(style)) {\n const lastIndex = style.length - 1;\n if (typeof style[lastIndex] === 'object' && !isArray(style[lastIndex])) {\n customStyle = shallowClone(style[lastIndex]);\n delete customStyle[oldName];\n if (newName) {\n customStyle[newName] = value;\n } else {\n customStyle[oldName] = undefined;\n }\n\n agent.overrideValueAtPath({\n type: 'props',\n id,\n rendererID,\n path: ['style', lastIndex],\n value: customStyle,\n });\n } else {\n agent.overrideValueAtPath({\n type: 'props',\n id,\n rendererID,\n path: ['style'],\n value: style.concat([newStyle]),\n });\n }\n } else if (typeof style === 'object') {\n customStyle = shallowClone(style);\n delete customStyle[oldName];\n if (newName) {\n customStyle[newName] = value;\n } else {\n customStyle[oldName] = undefined;\n }\n\n agent.overrideValueAtPath({\n type: 'props',\n id,\n rendererID,\n path: ['style'],\n value: customStyle,\n });\n } else {\n agent.overrideValueAtPath({\n type: 'props',\n id,\n rendererID,\n path: ['style'],\n value: [style, newStyle],\n });\n }\n\n agent.emit('hideNativeHighlight');\n}\n\nfunction setStyle(\n agent: Agent,\n id: number,\n rendererID: RendererID,\n name: string,\n value: string,\n) {\n const data = agent.getInstanceAndStyle({id, rendererID});\n if (!data || !data.style) {\n return;\n }\n\n const {instance, style} = data;\n const newStyle = {[name]: value};\n\n // TODO It would be nice if the renderer interface abstracted this away somehow.\n if (instance !== null && typeof instance.setNativeProps === 'function') {\n // In the case of a host component, we need to use setNativeProps().\n // Remember to \"correct\" resolved styles when we read them next time.\n const styleOverrides = componentIDToStyleOverrides.get(id);\n if (!styleOverrides) {\n componentIDToStyleOverrides.set(id, newStyle);\n } else {\n Object.assign(styleOverrides, newStyle);\n }\n // TODO Fabric does not support setNativeProps; chat with Sebastian or Eli\n instance.setNativeProps({style: newStyle});\n } else if (isArray(style)) {\n const lastLength = style.length - 1;\n if (typeof style[lastLength] === 'object' && !isArray(style[lastLength])) {\n agent.overrideValueAtPath({\n type: 'props',\n id,\n rendererID,\n path: ['style', lastLength, name],\n value,\n });\n } else {\n agent.overrideValueAtPath({\n type: 'props',\n id,\n rendererID,\n path: ['style'],\n value: style.concat([newStyle]),\n });\n }\n } else {\n agent.overrideValueAtPath({\n type: 'props',\n id,\n rendererID,\n path: ['style'],\n value: [style, newStyle],\n });\n }\n\n agent.emit('hideNativeHighlight');\n}\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport Agent from 'react-devtools-shared/src/backend/agent';\nimport Bridge from 'react-devtools-shared/src/bridge';\nimport {installHook} from 'react-devtools-shared/src/hook';\nimport {initBackend} from 'react-devtools-shared/src/backend';\nimport {__DEBUG__} from 'react-devtools-shared/src/constants';\nimport setupNativeStyleEditor from 'react-devtools-shared/src/backend/NativeStyleEditor/setupNativeStyleEditor';\nimport {\n getDefaultComponentFilters,\n getIsReloadAndProfileSupported,\n} from 'react-devtools-shared/src/utils';\n\nimport type {BackendBridge} from 'react-devtools-shared/src/bridge';\nimport type {\n ComponentFilter,\n Wall,\n} from 'react-devtools-shared/src/frontend/types';\nimport type {\n DevToolsHook,\n DevToolsHookSettings,\n ProfilingSettings,\n} from 'react-devtools-shared/src/backend/types';\nimport type {ResolveNativeStyle} from 'react-devtools-shared/src/backend/NativeStyleEditor/setupNativeStyleEditor';\n\ntype ConnectOptions = {\n host?: string,\n nativeStyleEditorValidAttributes?: $ReadOnlyArray<string>,\n port?: number,\n useHttps?: boolean,\n resolveRNStyle?: ResolveNativeStyle,\n retryConnectionDelay?: number,\n isAppActive?: () => boolean,\n websocket?: ?WebSocket,\n onSettingsUpdated?: (settings: $ReadOnly<DevToolsHookSettings>) => void,\n isReloadAndProfileSupported?: boolean,\n isProfiling?: boolean,\n onReloadAndProfile?: (recordChangeDescriptions: boolean) => void,\n onReloadAndProfileFlagsReset?: () => void,\n};\n\nlet savedComponentFilters: Array<ComponentFilter> =\n getDefaultComponentFilters();\n\nfunction debug(methodName: string, ...args: Array<mixed>) {\n if (__DEBUG__) {\n console.log(\n `%c[core/backend] %c${methodName}`,\n 'color: teal; font-weight: bold;',\n 'font-weight: bold;',\n ...args,\n );\n }\n}\n\nexport function initialize(\n maybeSettingsOrSettingsPromise?:\n | DevToolsHookSettings\n | Promise<DevToolsHookSettings>,\n shouldStartProfilingNow: boolean = false,\n profilingSettings?: ProfilingSettings,\n) {\n installHook(\n window,\n maybeSettingsOrSettingsPromise,\n shouldStartProfilingNow,\n profilingSettings,\n );\n}\n\nexport function connectToDevTools(options: ?ConnectOptions) {\n const hook: ?DevToolsHook = window.__REACT_DEVTOOLS_GLOBAL_HOOK__;\n if (hook == null) {\n // DevTools didn't get injected into this page (maybe b'c of the contentType).\n return;\n }\n\n const {\n host = 'localhost',\n nativeStyleEditorValidAttributes,\n useHttps = false,\n port = 8097,\n websocket,\n resolveRNStyle = (null: $FlowFixMe),\n retryConnectionDelay = 2000,\n isAppActive = () => true,\n onSettingsUpdated,\n isReloadAndProfileSupported = getIsReloadAndProfileSupported(),\n isProfiling,\n onReloadAndProfile,\n onReloadAndProfileFlagsReset,\n } = options || {};\n\n const protocol = useHttps ? 'wss' : 'ws';\n let retryTimeoutID: TimeoutID | null = null;\n\n function scheduleRetry() {\n if (retryTimeoutID === null) {\n // Two seconds because RN had issues with quick retries.\n retryTimeoutID = setTimeout(\n () => connectToDevTools(options),\n retryConnectionDelay,\n );\n }\n }\n\n if (!isAppActive()) {\n // If the app is in background, maybe retry later.\n // Don't actually attempt to connect until we're in foreground.\n scheduleRetry();\n return;\n }\n\n let bridge: BackendBridge | null = null;\n\n const messageListeners = [];\n const uri = protocol + '://' + host + ':' + port;\n\n // If existing websocket is passed, use it.\n // This is necessary to support our custom integrations.\n // See D6251744.\n const ws = websocket ? websocket : new window.WebSocket(uri);\n ws.onclose = handleClose;\n ws.onerror = handleFailed;\n ws.onmessage = handleMessage;\n ws.onopen = function () {\n bridge = new Bridge({\n listen(fn) {\n messageListeners.push(fn);\n return () => {\n const index = messageListeners.indexOf(fn);\n if (index >= 0) {\n messageListeners.splice(index, 1);\n }\n };\n },\n send(event: string, payload: any, transferable?: Array<any>) {\n if (ws.readyState === ws.OPEN) {\n if (__DEBUG__) {\n debug('wall.send()', event, payload);\n }\n\n ws.send(JSON.stringify({event, payload}));\n } else {\n if (__DEBUG__) {\n debug(\n 'wall.send()',\n 'Shutting down bridge because of closed WebSocket connection',\n );\n }\n\n if (bridge !== null) {\n bridge.shutdown();\n }\n\n scheduleRetry();\n }\n },\n });\n bridge.addListener(\n 'updateComponentFilters',\n (componentFilters: Array<ComponentFilter>) => {\n // Save filter changes in memory, in case DevTools is reloaded.\n // In that case, the renderer will already be using the updated values.\n // We'll lose these in between backend reloads but that can't be helped.\n savedComponentFilters = componentFilters;\n },\n );\n\n // The renderer interface doesn't read saved component filters directly,\n // because they are generally stored in localStorage within the context of the extension.\n // Because of this it relies on the extension to pass filters.\n // In the case of the standalone DevTools being used with a website,\n // saved filters are injected along with the backend script tag so we shouldn't override them here.\n // This injection strategy doesn't work for React Native though.\n // Ideally the backend would save the filters itself, but RN doesn't provide a sync storage solution.\n // So for now we just fall back to using the default filters...\n if (window.__REACT_DEVTOOLS_COMPONENT_FILTERS__ == null) {\n // $FlowFixMe[incompatible-use] found when upgrading Flow\n bridge.send('overrideComponentFilters', savedComponentFilters);\n }\n\n // TODO (npm-packages) Warn if \"isBackendStorageAPISupported\"\n // $FlowFixMe[incompatible-call] found when upgrading Flow\n const agent = new Agent(bridge, isProfiling, onReloadAndProfile);\n if (typeof onReloadAndProfileFlagsReset === 'function') {\n onReloadAndProfileFlagsReset();\n }\n\n if (onSettingsUpdated != null) {\n agent.addListener('updateHookSettings', onSettingsUpdated);\n }\n agent.addListener('shutdown', () => {\n if (onSettingsUpdated != null) {\n agent.removeListener('updateHookSettings', onSettingsUpdated);\n }\n\n // If we received 'shutdown' from `agent`, we assume the `bridge` is already shutting down,\n // and that caused the 'shutdown' event on the `agent`, so we don't need to call `bridge.shutdown()` here.\n hook.emit('shutdown');\n });\n\n initBackend(hook, agent, window, isReloadAndProfileSupported);\n\n // Setup React Native style editor if the environment supports it.\n if (resolveRNStyle != null || hook.resolveRNStyle != null) {\n setupNativeStyleEditor(\n // $FlowFixMe[incompatible-call] found when upgrading Flow\n bridge,\n agent,\n ((resolveRNStyle || hook.resolveRNStyle: any): ResolveNativeStyle),\n nativeStyleEditorValidAttributes ||\n hook.nativeStyleEditorValidAttributes ||\n null,\n );\n } else {\n // Otherwise listen to detect if the environment later supports it.\n // For example, Flipper does not eagerly inject these values.\n // Instead it relies on the React Native Inspector to lazily inject them.\n let lazyResolveRNStyle;\n let lazyNativeStyleEditorValidAttributes;\n\n const initAfterTick = () => {\n if (bridge !== null) {\n setupNativeStyleEditor(\n bridge,\n agent,\n lazyResolveRNStyle,\n lazyNativeStyleEditorValidAttributes,\n );\n }\n };\n\n if (!hook.hasOwnProperty('resolveRNStyle')) {\n Object.defineProperty(\n hook,\n 'resolveRNStyle',\n ({\n enumerable: false,\n get() {\n return lazyResolveRNStyle;\n },\n set(value: $FlowFixMe) {\n lazyResolveRNStyle = value;\n initAfterTick();\n },\n }: Object),\n );\n }\n if (!hook.hasOwnProperty('nativeStyleEditorValidAttributes')) {\n Object.defineProperty(\n hook,\n 'nativeStyleEditorValidAttributes',\n ({\n enumerable: false,\n get() {\n return lazyNativeStyleEditorValidAttributes;\n },\n set(value: $FlowFixMe) {\n lazyNativeStyleEditorValidAttributes = value;\n initAfterTick();\n },\n }: Object),\n );\n }\n }\n };\n\n function handleClose() {\n if (__DEBUG__) {\n debug('WebSocket.onclose');\n }\n\n if (bridge !== null) {\n bridge.emit('shutdown');\n }\n\n scheduleRetry();\n }\n\n function handleFailed() {\n if (__DEBUG__) {\n debug('WebSocket.onerror');\n }\n\n scheduleRetry();\n }\n\n function handleMessage(event: MessageEvent) {\n let data;\n try {\n if (typeof event.data === 'string') {\n data = JSON.parse(event.data);\n if (__DEBUG__) {\n debug('WebSocket.onmessage', data);\n }\n } else {\n throw Error();\n }\n } catch (e) {\n console.error(\n '[React DevTools] Failed to parse JSON: ' + (event.data: any),\n );\n return;\n }\n messageListeners.forEach(fn => {\n try {\n fn(data);\n } catch (error) {\n // jsc doesn't play so well with tracebacks that go into eval'd code,\n // so the stack trace here will stop at the `eval()` call. Getting the\n // message that caused the error is the best we can do for now.\n console.log('[React DevTools] Error calling listener', data);\n console.log('error:', error);\n throw error;\n }\n });\n }\n}\n\ntype ConnectWithCustomMessagingOptions = {\n onSubscribe: (cb: Function) => void,\n onUnsubscribe: (cb: Function) => void,\n onMessage: (event: string, payload: any) => void,\n nativeStyleEditorValidAttributes?: $ReadOnlyArray<string>,\n resolveRNStyle?: ResolveNativeStyle,\n onSettingsUpdated?: (settings: $ReadOnly<DevToolsHookSettings>) => void,\n isReloadAndProfileSupported?: boolean,\n isProfiling?: boolean,\n onReloadAndProfile?: (recordChangeDescriptions: boolean) => void,\n onReloadAndProfileFlagsReset?: () => void,\n};\n\nexport function connectWithCustomMessagingProtocol({\n onSubscribe,\n onUnsubscribe,\n onMessage,\n nativeStyleEditorValidAttributes,\n resolveRNStyle,\n onSettingsUpdated,\n isReloadAndProfileSupported = getIsReloadAndProfileSupported(),\n isProfiling,\n onReloadAndProfile,\n onReloadAndProfileFlagsReset,\n}: ConnectWithCustomMessagingOptions): Function {\n const hook: ?DevToolsHook = window.__REACT_DEVTOOLS_GLOBAL_HOOK__;\n if (hook == null) {\n // DevTools didn't get injected into this page (maybe b'c of the contentType).\n return;\n }\n\n const wall: Wall = {\n listen(fn: Function) {\n onSubscribe(fn);\n\n return () => {\n onUnsubscribe(fn);\n };\n },\n send(event: string, payload: any) {\n onMessage(event, payload);\n },\n };\n\n const bridge: BackendBridge = new Bridge(wall);\n\n bridge.addListener(\n 'updateComponentFilters',\n (componentFilters: Array<ComponentFilter>) => {\n // Save filter changes in memory, in case DevTools is reloaded.\n // In that case, the renderer will already be using the updated values.\n // We'll lose these in between backend reloads but that can't be helped.\n savedComponentFilters = componentFilters;\n },\n );\n\n if (window.__REACT_DEVTOOLS_COMPONENT_FILTERS__ == null) {\n bridge.send('overrideComponentFilters', savedComponentFilters);\n }\n\n const agent = new Agent(bridge, isProfiling, onReloadAndProfile);\n if (typeof onReloadAndProfileFlagsReset === 'function') {\n onReloadAndProfileFlagsReset();\n }\n\n if (onSettingsUpdated != null) {\n agent.addListener('updateHookSettings', onSettingsUpdated);\n }\n agent.addListener('shutdown', () => {\n if (onSettingsUpdated != null) {\n agent.removeListener('updateHookSettings', onSettingsUpdated);\n }\n\n // If we received 'shutdown' from `agent`, we assume the `bridge` is already shutting down,\n // and that caused the 'shutdown' event on the `agent`, so we don't need to call `bridge.shutdown()` here.\n hook.emit('shutdown');\n });\n\n const unsubscribeBackend = initBackend(\n hook,\n agent,\n window,\n isReloadAndProfileSupported,\n );\n\n const nativeStyleResolver: ResolveNativeStyle | void =\n resolveRNStyle || hook.resolveRNStyle;\n\n if (nativeStyleResolver != null) {\n const validAttributes =\n nativeStyleEditorValidAttributes ||\n hook.nativeStyleEditorValidAttributes ||\n null;\n\n setupNativeStyleEditor(bridge, agent, nativeStyleResolver, validAttributes);\n }\n\n return unsubscribeBackend;\n}\n"],"names":["_typeof","o","Symbol","iterator","constructor","prototype","ErrorStackParser","require","React","assign","Object","ReactSharedInternals","__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE","REACT_CONTEXT_TYPE","for","REACT_MEMO_CACHE_SENTINEL","hasOwnProperty","hookLog","primitiveStackCache","getPrimitiveStackCache","cache","Map","Dispatcher","useContext","_currentValue","useState","useReducer","s","useRef","useCacheRefresh","useLayoutEffect","useInsertionEffect","useEffect","useImperativeHandle","useDebugValue","useCallback","useTransition","useSyncExternalStore","useDeferredValue","useMemo","useOptimistic","useFormState","useActionState","useHostTransitionStatus","useMemoCache","use","$$typeof","then","status","value","x","useId","useEffectEvent","readHookLog","i","length","hook","set","primitive","parse","stackError","currentFiber","currentHook","currentContextDependency","currentThenableIndex","currentThenableState","nextHook","next","readContext","context","Error","call","memoizedValue","SuspenseException","usable","fulfilledValue","push","displayName","debugInfo","_debugInfo","dispatcherHookName","reason","String","callback","memoizedState","create","ref","instance","current","nextCreate","reducer","initialArg","init","initialValue","initialState","formatterFn","stateHook","subscribe","getSnapshot","action","error","passthrough","size","fiber","updateQueue","memoCache","data","index","Array","DispatcherProxyHandler","get","target","prop","name","DispatcherProxy","Proxy","mostLikelyAncestorIndex","findSharedIndex","hookStack","rootStack","rootIndex","source","a","b","isReactWrapper","functionName","wrapperName","parseHookName","startIndex","lastIndexOf","slice","startsWith","buildTree","rootStack$jscomp$0","rootChildren","prevStack","levelChildren","nativeHookID","stackOfChildren","JSCompiler_inline_result","i$jscomp$0","pop","id","isStateEditable","subHooks","hookSource","lineNumber","columnNumber","fileName","processDebugValues","hooksTree","parentHooksNode","debugValueHooksNodes","hooksNode","splice","map","_ref","handleRenderFunctionError","wrapperError","cause","inspectHooks","renderFunction","props","currentDispatcher","previousDispatcher","H","ancestorStackError","restoreContexts","contextMap","forEach","exports","inspectHooksOfFiber","tag","thenableState","dependencies","_debugThenableState","thenables","isArray","firstContext","dependencies_old","dependencies_new","contextDependencies","first","type","memoizedProps","elementType","defaultProps","propName","_context","has","return","render","process","env","NODE_ENV","module","REACT_ELEMENT_TYPE","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_CONSUMER_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_ACTIVITY_TYPE","REACT_POSTPONE_TYPE","REACT_VIEW_TRANSITION_TYPE","MAYBE_ITERATOR_SYMBOL","getIteratorFn","maybeIterable","ReactNoopUpdateQueue","isMounted","enqueueForceUpdate","enqueueReplaceState","enqueueSetState","emptyObject","Component","updater","refs","isReactComponent","setState","partialState","forceUpdate","ComponentDummy","PureComponent","pureComponentPrototype","isPureReactComponent","isArrayImpl","noop","A","T","S","G","ReactElement","key","refProp","cloneAndReplaceKey","oldElement","newKey","isValidElement","object","escape","escaperLookup","replace","match","userProvidedKeyEscapeRegex","getElementKey","element","toString","resolveThenable","thenable","mapIntoArray","children","array","escapedPrefix","nameSoFar","invokeCallback","_init","_payload","c","nextNamePrefix","done","keys","join","mapChildren","func","result","count","child","lazyInitializer","payload","_status","ctor","_result","moduleObject","default","reportGlobalError","reportError","window","ErrorEvent","event","bubbles","cancelable","message","dispatchEvent","emit","console","startTransition","scope","prevTransition","currentTransition","types","gesture","returnValue","onStartTransitionFinish","addTransitionType","transition","transitionTypes","indexOf","bind","Children","forEachFunc","forEachContext","apply","arguments","n","toArray","only","Activity","Fragment","Profiler","StrictMode","Suspense","ViewTransition","__COMPILER_RUNTIME","__proto__","fn","cacheSignal","cloneElement","config","childArray","createContext","defaultValue","_currentValue2","_threadCount","Provider","Consumer","createElement","childrenLength","createRef","experimental_useOptimistic","forwardRef","lazy","memo","compare","unstable_Activity","unstable_SuspenseList","unstable_getCacheForType","resourceType","dispatcher","getCacheForType","unstable_postpone","unstable_startGestureTransition","provider","options","onStartGestureTransitionFinish","unstable_useCacheRefresh","permalink","deps","Context","getServerSnapshot","version","root","factory","define","amd","StackFrame","FIREFOX_SAFARI_STACK_REGEXP","CHROME_IE_STACK_REGEXP","SAFARI_NATIVE_CODE_REGEXP","ErrorStackParser$$parse","stacktrace","parseOpera","stack","parseV8OrIE","parseFFOrSafari","extractLocation","ErrorStackParser$$extractLocation","urlLike","regExp","parts","exec","undefined","ErrorStackParser$$parseV8OrIE","filtered","split","filter","line","sanitizedLine","location","tokens","locationParts","ErrorStackParser$$parseFFOrSafari","functionNameRegex","matches","ErrorStackParser$$parseOpera","e","parseOpera9","parseOpera10","parseOpera11","ErrorStackParser$$parseOpera9","lineRE","lines","len","ErrorStackParser$$parseOpera10","ErrorStackParser$$parseOpera11","functionCall","shift","argsRaw","args","_classCallCheck","Constructor","TypeError","_defineProperties","descriptor","enumerable","configurable","writable","defineProperty","_toPropertyKey","_createClass","protoProps","staticProps","t","_toPrimitive","r","toPrimitive","Number","Yallist","MAX","LENGTH","LENGTH_CALCULATOR","ALLOW_STALE","MAX_AGE","DISPOSE","NO_DISPOSE_ON_SET","LRU_LIST","CACHE","UPDATE_AGE_ON_GET","naiveLength","LRUCache","max","Infinity","lc","stale","maxAge","dispose","noDisposeOnSet","updateAgeOnGet","reset","mL","trim","allowStale","mA","lC","_this","hit","rforEach","thisp","walker","tail","prev","forEachStep","head","k","values","_this2","dump","_this3","isStale","v","now","h","dumpLru","Date","del","node","item","Entry","unshift","peek","load","arr","l","expiresAt","prune","_this4","self","doUse","unshiftNode","diff","delete","removeNode","cachedSetTimeout","cachedClearTimeout","defaultSetTimout","defaultClearTimeout","setTimeout","clearTimeout","runTimeout","fun","runClearTimeout","marker","queue","draining","currentQueue","queueIndex","cleanUpNextTick","concat","drainQueue","timeout","run","nextTick","Item","title","browser","argv","versions","on","addListener","once","off","removeListener","removeAllListeners","prependListener","prependOnceListener","listeners","binding","cwd","chdir","dir","umask","_isNumber","isNaN","parseFloat","isFinite","_capitalize","str","charAt","toUpperCase","substring","_getter","p","booleanProps","numericProps","stringProps","arrayProps","obj","getArgs","setArgs","getEvalOrigin","evalOrigin","setEvalOrigin","getFileName","getLineNumber","getColumnNumber","getFunctionName","getIsEval","fromString","StackFrame$$fromString","argsStartIndex","argsEndIndex","locationString","Boolean","j","_regeneratorRuntime","asyncIterator","u","toStringTag","wrap","Generator","makeInvokeMethod","tryCatch","arg","f","y","GeneratorFunction","GeneratorFunctionPrototype","d","getPrototypeOf","g","defineIteratorMethods","_invoke","AsyncIterator","invoke","resolve","__await","callInvokeWithMethodAndArg","method","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","resultName","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","isGeneratorFunction","mark","setPrototypeOf","awrap","async","Promise","reverse","stop","rval","handle","complete","finish","catch","_catch","delegateYield","_callee","_callee$","Node","list","pushNode","res","forEachReverse","getReverse","mapReverse","reduce","initial","acc","reduceReverse","toArrayReverse","from","to","ret","sliceReverse","start","deleteCount","insert","inserted","er","EventEmitter","_defineProperty","listener","listenersMap","_len","_key","didThrow","caughtError","clonedListeners","clear","CHROME_WEBSTORE_EXTENSION_ID","INTERNAL_EXTENSION_ID","LOCAL_EXTENSION_ID","__DEBUG__","__PERFORMANCE_PROFILE__","TREE_OPERATION_ADD","TREE_OPERATION_REMOVE","TREE_OPERATION_REORDER_CHILDREN","TREE_OPERATION_UPDATE_TREE_BASE_DURATION","TREE_OPERATION_UPDATE_ERRORS_OR_WARNINGS","TREE_OPERATION_REMOVE_ROOT","TREE_OPERATION_SET_SUBTREE_MODE","SUSPENSE_TREE_OPERATION_ADD","SUSPENSE_TREE_OPERATION_REMOVE","SUSPENSE_TREE_OPERATION_REORDER_CHILDREN","SUSPENSE_TREE_OPERATION_RESIZE","SUSPENSE_TREE_OPERATION_SUSPENDERS","PROFILING_FLAG_BASIC_SUPPORT","PROFILING_FLAG_TIMELINE_SUPPORT","PROFILING_FLAG_PERFORMANCE_TRACKS_SUPPORT","UNKNOWN_SUSPENDERS_NONE","UNKNOWN_SUSPENDERS_REASON_PRODUCTION","UNKNOWN_SUSPENDERS_REASON_OLD_VERSION","UNKNOWN_SUSPENDERS_REASON_THROWN_PROMISE","LOCAL_STORAGE_DEFAULT_TAB_KEY","LOCAL_STORAGE_COMPONENT_FILTER_PREFERENCES_KEY","SESSION_STORAGE_LAST_SELECTION_KEY","LOCAL_STORAGE_OPEN_IN_EDITOR_URL","LOCAL_STORAGE_OPEN_IN_EDITOR_URL_PRESET","LOCAL_STORAGE_ALWAYS_OPEN_IN_EDITOR","LOCAL_STORAGE_PARSE_HOOK_NAMES_KEY","SESSION_STORAGE_RECORD_CHANGE_DESCRIPTIONS_KEY","SESSION_STORAGE_RECORD_TIMELINE_KEY","SESSION_STORAGE_RELOAD_AND_PROFILE_KEY","LOCAL_STORAGE_BROWSER_THEME","LOCAL_STORAGE_TRACE_UPDATES_ENABLED_KEY","LOCAL_STORAGE_SUPPORTS_PROFILING_KEY","PROFILER_EXPORT_VERSION","FIREFOX_CONSOLE_DIMMING_COLOR","ANSI_STYLE_DIMMING_TEMPLATE","ANSI_STYLE_DIMMING_TEMPLATE_WITH_COMPONENT_STACK","compareVersions","v1","v2","n1","validateAndParse","n2","p1","p2","compareSegments","validate","test","semver","operator","assertValidOperator","operatorResMap","includes","satisfies","range","m","op","_validateAndParse","_validateAndParse2","_slicedToArray","v3","vp","_validateAndParse3","_validateAndParse4","r1","r2","r3","rp","nonZero","findIndex","isWildcard","tryParse","parseInt","forceType","compareStrings","_forceType","_forceType2","ap","bp","Math","allowedOperators","enableHydrationLaneScheduling","disableSchedulerTimeoutInWorkLoop","enableSuspenseCallback","enableScopeAPI","enableCreateEventHandleAPI","enableLegacyFBSupport","enableYieldingBeforePassive","enableThrottledScheduling","enableLegacyCache","__EXPERIMENTAL__","enableAsyncIterableChildren","enableTaint","enablePostpone","enableHalt","enableViewTransition","enableGestureTransition","enableScrollEndPolyfill","enableSuspenseyImages","enableFizzBlockingRender","enableSrcObject","enableHydrationChangeEvent","enableDefaultTransitionIndicator","enableObjectFiber","enableTransitionTracing","enableLegacyHidden","enableSuspenseAvoidThisFallback","enableCPUSuspense","enableNoCloningMemoCache","enableUseEffectEventHook","enableFizzExternalRuntime","alwaysThrottleRetries","passChildrenWhenCloningPersistedNodes","enableEagerAlternateStateNodeCleanup","enableRetryLaneExpiration","retryLaneExpirationMs","syncLaneExpirationMs","transitionLaneExpirationMs","enableInfiniteRenderLoopDetection","enableFragmentRefs","enableFragmentRefsScrollIntoView","renameElementSymbol","enableHiddenSubtreeInsertionEffectCleanup","disableLegacyContext","disableLegacyContextForFunctionComponents","enableMoveBefore","disableClientCache","enableReactTestRendererWarning","disableLegacyMode","disableCommentsAsDOMContainers","enableTrustedTypesIntegration","disableInputAttributeSyncing","disableTextareaChildren","enableProfilerTimer","__PROFILE__","enableComponentPerformanceTrack","enableSchedulingProfiler","enableProfilerCommitHooks","enableProfilerNestedUpdatePhase","enableAsyncDebugInfo","enableUpdaterTracking","ownerStackLimit","REACT_LEGACY_ELEMENT_TYPE","REACT_SCOPE_TYPE","REACT_LEGACY_HIDDEN_TYPE","REACT_TRACING_MARKER_TYPE","FAUX_ITERATOR_SYMBOL","maybeIterator","ASYNC_ITERATOR","ElementTypeClass","ElementTypeContext","ElementTypeFunction","ElementTypeForwardRef","ElementTypeHostComponent","ElementTypeMemo","ElementTypeOtherOrUnknown","ElementTypeProfiler","ElementTypeRoot","ElementTypeSuspense","ElementTypeSuspenseList","ElementTypeTracingMarker","ElementTypeVirtual","ElementTypeViewTransition","ElementTypeActivity","ComponentFilterElementType","ComponentFilterDisplayName","ComponentFilterLocation","ComponentFilterHOC","ComponentFilterEnvironmentName","LRU","localStorageGetItem","localStorageSetItem","sessionStorageGetItem","sessionStorageRemoveItem","sessionStorageSetItem","meta","isSynchronousXHRSupported","cachedDisplayNames","WeakMap","encodedStringCache","LEGACY_REACT_PROVIDER_TYPE","alphaSortKeys","getAllEnumerableKeys","Set","_loop","currentKeys","_toConsumableArray","getOwnPropertySymbols","descriptors","getOwnPropertyDescriptors","add","getWrappedDisplayName","outerType","innerType","fallbackName","getDisplayName","nameFromCache","uidCounter","getUID","utfDecodeStringWithRanges","left","right","string","fromCodePoint","surrogatePairToCodePoint","charCode1","charCode2","utfEncodeString","cached","encoded","charCode","charCodeAt","printOperationsArray","operations","rendererID","rootID","logs","stringTable","stringTableSize","stringTableEnd","nextLength","nextString","operation","parentID","displayNameStringID","removeLength","removeIndex","mode","numChildren","numErrors","numWarnings","fiberID","nameStringID","isSuspended","numRects","rects","rectIndex","offset","width","height","changeLength","changeIndex","hasUniqueSuspenders","environmentNamesLength","log","getDefaultComponentFilters","isEnabled","getSavedComponentFilters","raw","parsedFilters","JSON","filterOutLocationComponentFilters","setSavedComponentFilters","componentFilters","stringify","vscodeFilepath","getDefaultPreset","EDITOR_URL","getDefaultOpenInEditorURL","getOpenInEditorURL","rawPreset","getAlwaysOpenInEditor","parseElementDisplayNameFromBackend","formattedDisplayName","hocDisplayNames","compiledWithForget","displayNameWithoutForgetWrapper","_parseElementDisplayN","shallowDiffers","attribute","getInObject","path","reduced","attr","deletePathInObject","last","parent","renamePathInObject","oldPath","newPath","lastOld","lastNew","setInObject","isError","getDataType","HTMLElement","ArrayBuffer","isView","toStringValue","isPlainObject","typeOfWithLegacyElementSymbol","$$typeofType","getDisplayNameForReactElement","MAX_PREVIEW_STRING_LENGTH","truncateForDisplay","formatDataForPreview","showFormattedValue","preview_long","preview_short","tagName","toLowerCase","formatted","byteLength","buffer","shortName","entryOrEntries","resolvedConstructorName","sort","objectPrototype","objectParentPrototype","backendToFrontendSerializedElementMapper","_parseElementDisplayN2","_objectSpread","normalizeUrlIfValid","url","URL","_unused","getIsReloadAndProfileSupported","isBackendStorageAPISupported","localStorage","getItem","getIfReloadedAndProfiling","getProfilingSettings","recordChangeDescriptions","recordTimeline","onReloadAndProfile","onReloadAndProfileFlagsReset","unionOfTwoArrays","inspectable","inspected","readonly","unserializable","LEVEL_THRESHOLD","createDehydrated","cleaned","dehydrated","dehydrate","isPathAllowed","level","isPathAllowedCheck","unserializableValue","dehydrateKey","keyAsString","preview","fillInPath","unserializablePath","isMatch","upgradeUnserializable","hydrate","NaN","replaced","replacement","destination","defineProperties","formatWithStyles","formatConsoleArguments","FIRST_DEVTOOLS_BACKEND_LOCKSTEP_VER","hasAssignedBackend","gte","cleanForBridge","cleanedPaths","unserializablePaths","cleanedData","copyWithDelete","updated","copyWithRename","oldKey","copyWithSet","getEffectDurations","effectDuration","passiveEffectDuration","hostRoot","stateNode","serializeToString","safeToString","val","err","formatConsoleArgumentsToSingleString","maybeMessage","inputArgs","REGEXP","escaped","ptn","flag","document","featurePolicy","allowsFeature","gt","isReactNativeEnvironment","formatDurationToMicrosecondsGranularity","duration","round","getOwnerWindow","ownerDocument","defaultView","getOwnerIframe","nodeWindow","frameElement","getBoundingClientRectWithBorderOffset","dimensions","getElementDimensions","mergeRectOffsets","getBoundingClientRect","top","borderTop","borderLeft","bottom","borderBottom","borderRight","previousRect","rect","getNestedBoundingClientRect","boundaryWindow","ownerIframe","currentIframe","onlyOneMore","domElement","calculatedStyle","getComputedStyle","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth","marginLeft","marginRight","marginTop","marginBottom","paddingLeft","paddingRight","paddingTop","paddingBottom","extractHOCNames","baseComponentName","hocNames","hocRegex","_match","_match2","hocName","inner","OverlayRect","doc","container","border","padding","content","style","borderColor","overlayStyles","backgroundColor","background","margin","pointerEvents","position","zIndex","appendChild","remove","parentNode","removeChild","update","box","dims","boxWrap","OverlayTip","tip","display","flexFlow","borderRadius","fontFamily","fontWeight","fontSize","whiteSpace","nameSpan","color","dimSpan","updateText","textContent","updatePosition","bounds","tipRect","tipPos","findTipPos","Overlay","agent","currentWindow","__REACT_DEVTOOLS_TARGET_WINDOW__","tipBoundsWindow","body","inspect","nodes","elements","nodeType","ELEMENT_NODE","outerBox","POSITIVE_INFINITY","NEGATIVE_INFINITY","min","nodeName","ownerName","getComponentNameForHostInstance","tipBounds","documentElement","scrollY","scrollX","innerHeight","innerWidth","tipSize","tipHeight","tipWidth","what","borderStyle","SHOW_DURATION","timeoutID","overlay","hideOverlayNative","hideOverlayWeb","hideOverlay","showOverlayNative","showOverlayWeb","componentName","hideAfterTimeout","showOverlay","Agent","iframesListeningTo","inspectOnlySuspenseNodes","setupHighlighter","bridge","clearHostInstanceHighlight","highlightHostInstance","highlightHostInstances","scrollToHostInstance","stopInspectingHost","startInspectingHost","onlySuspenseNodes","registerListenersOnWindow","addEventListener","onClick","onMouseEvent","onPointerDown","onPointerMove","onPointerUp","removeListenersOnWindow","frame","contentWindow","removeEventListener","openBuiltinElementsPanel","scrollIntoView","renderer","rendererInterfaces","warn","hasElementWithId","findHostInstancesForElementID","nodeRects","getClientRects","scrollDelayTimer","block","inline","__REACT_DEVTOOLS_GLOBAL_HOOK__","$0","send","_ref2","_elements$i","hostInstances","attemptScrollToHostInstance","behavior","_ref3","findLastKnownRectsForID","clientWidth","clientHeight","scrollTo","preventDefault","stopPropagation","selectElementForNode","getEventTarget","lastHoveredNode","iframe","getIDForHostInstance","getDisplayNameForElementID","composed","composedPath","COLORS","canvas","drawNative","nodeToData","nodesToDraw","iterateNodes","mergedNodes","groupAndSortNodes","drawWeb","initialize","dpr","devicePixelRatio","canvasFlow","getContext","scale","clearRect","group","drawGroupBorders","drawGroupLabel","hidePopover","showPopover","positionGroups","_positionGroups$get","groupA","groupB","maxCountA","maxCountB","beginPath","strokeStyle","stroke","mergedName","_ref4","drawLabel","draw","execute","colorIndex","expirationTime","lastMeasuredAt","text","font","textBaseline","textAlign","textHeight","metrics","measureText","backgroundWidth","backgroundHeight","labelX","labelY","fillStyle","fillRect","fillText","destroyNative","destroyWeb","destroy","setAttribute","cssText","insertBefore","firstChild","destroyCanvas","DISPLAY_DURATION","MAX_DISPLAY_DURATION","REMEASUREMENT_AFTER_DURATION","HOC_MARKERS","getCurrentTime","performance","drawAnimationFrameID","redrawTimeoutID","injectedAgent","traceUpdates","toggleEnabled","cancelAnimationFrame","measureNode","_extractHOCNames","markers","hoc","enhancedDisplayName","requestAnimationFrame","prepareToDraw","earliestExpiration","MAX_VALUE","BRIDGE_PROTOCOL","minNpmVersion","maxNpmVersion","currentBridgeProtocol","Bridge","_EventEmitter","wall","_callSuper","_messageQueue","_this$_wall","_wall","_scheduledFlush","wasForwarded","_wallUnlisten","listen","overrideValueAtPath","_inherits","_isShutdown","devtoolsJestTestScheduler","_flush","queueMicrotask","shutdown","wallUnlisten","localStorageRemoveItem","removeItem","setItem","sessionStorage","setupTraceUpdates","setTraceUpdatesEnabled","debug","methodName","_console","createEmptyInspectedScreen","arbitraryRootID","suspendedBy","isErrored","errors","warnings","suspendedByRange","unknownSuspenders","rootType","plugins","stylex","nativeTag","rendererPackageName","rendererVersion","canEditFunctionProps","canEditHooks","canEditFunctionPropsDeletePaths","canEditFunctionPropsRenamePaths","canEditHooksAndDeletePaths","canEditHooksAndRenamePaths","canToggleError","canToggleSuspense","hasLegacyContext","hooks","state","owners","mergeRoots","suspendedByOffset","leftSuspendedByRange","rightSuspendedByRange","leftSuspendedBy","leftSuspendedByData","rightSuspendedByData","isProfiling","_rendererInterfaces","clearErrorsAndWarnings","clearErrorsForElementID","clearWarningsForElementID","_ref5","getSerializedElementValueByPath","_bridge","_ref6","hookID","deletePath","DEVTOOLS_VERSION","_ref7","getProfilingData","_isProfiling","_ref8","getOwnersList","_ref9","forceFullData","requestID","inspectElement","_persistedSelectionMatch","_persistedSelection","setTrackedPath","_lastSelectedElementID","_lastSelectedRendererID","_persistSelectionTimerScheduled","_persistSelection","_ref10","screenPath","inspectedScreen","found","suspendedByPathIndex","rendererPath","secondaryCategory","suspendedByPathRendererIndex","rendererHasRequestedSuspendedByPath","getElementAttributeByPath","inspectedRootsPayload","inspectedRoots","dehydratedSuspendedBy","rootsSuspendedBy","responseID","_ref11","logElementToConsole","_ref12","forceError","overrideError","_ref13","forceFallback","overrideSuspense","_ref14","suspendedSet","supportsTogglingSuspense","overrideSuspenseMilestone","_ref15","_ref16","_ref17","_ref18","_ref19","_ref20","_onReloadAndProfile","_ref21","renamePath","traceUpdatesEnabled","_traceUpdatesEnabled","selectNode","_ref22","startProfiling","stopProfiling","selected","_ref23","storeAsGlobal","settings","rendererIDString","getPathForElement","updateComponentFilters","accumulatedNames","names","getEnvironmentNames","prevMatch","nextMatch","getBestMatchForTrackedPath","prevMatchID","nextMatchID","isFullMatch","persistedSelectionString","copyElementPath","getBackendVersion","getBridgeProtocol","getProfilingStatus","inspectScreen","reloadAndProfile","syncSelectionFromBuiltinElementsPanel","updateHookSettings","getHookSettings","getIfHasUnsupportedRendererVersion","overrideContext","overrideHookState","overrideProps","overrideState","getInstanceAndStyle","_ref24","getSuspenseNodeIDForHostInstance","getElementIDForHostInstance","bestMatch","bestRenderer","bestRendererID","nearestNode","getNearestMountedDOMNode","contains","registerRendererInterface","rendererInterface","devRenderer","bundleType","enableSuspenseTab","selection","onUnsupportedRenderer","disabledDepth","prevLog","prevInfo","prevWarn","prevError","prevGroup","prevGroupCollapsed","prevGroupEnd","disabledLog","__reactDisabledLog","disableLogs","info","groupCollapsed","groupEnd","reenableLogs","prefix","describeBuiltInComponentFrame","suffix","__IS_CHROME__","__IS_EDGE__","__IS_NATIVE__","__IS_FIREFOX__","describeDebugInfoFrame","reentry","componentFrameCache","__DEV__","PossiblyWeakMap","describeNativeComponentFrame","construct","currentDispatcherRef","previousPrepareStackTrace","prepareStackTrace","RunInRootFrame","DetermineComponentFrameRoot","control","Fake","Reflect","maybePromise","sample","namePropDescriptor","getOwnPropertyDescriptor","_RunInRootFrame$Deter","_RunInRootFrame$Deter2","sampleStack","controlStack","sampleLines","controlLines","syntheticFrame","describeClassComponentFrame","describeFunctionComponentFrame","formatOwnerStack","prevPrepareStackTrace","idx","getOwnerStackByComponentInfoInDev","componentInfo","owner","ownerStack","debugStack","componentInfoToComponentLogsMap","supportsConsoleTasks","debugTask","attach","global","getCurrentComponentInfo","getComponentStack","topFrame","enableOwnerStacks","componentStack","topStackFrames","onErrorOrWarning","format","componentLogsEntry","errorsCount","warningsCount","messageMap","cleanup","flushInitialOperations","handleCommitFiberRoot","handleCommitFiberUnmount","handlePostCommitFiberRoot","getElementSourceFunctionById","parseStackTraceFromChromeStack","skipFrames","frames","parsedFrames","parsed","chromeFrameRegExp","isAsync","filename","col","firefoxFrameRegExp","parseStackTraceFromFirefoxStack","CHROME_STACK_REGEXP","parseStackTraceFromString","framesToSkip","collectedStackTrace","identifierRegExp","getMethodCallName","callSite","typeName","getTypeName","getMethodName","endsWith","collectStackTrace","structuredStackTrace","isNative","isConstructor","isToplevel","getScriptNameOrSourceURL","isEval","origin","enclosingLine","getEnclosingLineNumber","enclosingCol","getEnclosingColumnNumber","stackTraceCache","parseStackTrace","existing","previousPrepare","extractLocationFromOwnerStack","stackTrace","_stackTrace$i","encLine","encCol","extractLocationFromComponentStack","_stackTrace$i2","CONCURRENT_MODE_NUMBER","CONCURRENT_MODE_SYMBOL_STRING","CONTEXT_NUMBER","CONTEXT_SYMBOL_STRING","SERVER_CONTEXT_SYMBOL_STRING","DEPRECATED_ASYNC_MODE_SYMBOL_STRING","ELEMENT_SYMBOL_STRING","LEGACY_ELEMENT_NUMBER","LEGACY_ELEMENT_SYMBOL_STRING","DEBUG_TRACING_MODE_NUMBER","DEBUG_TRACING_MODE_SYMBOL_STRING","FORWARD_REF_NUMBER","FORWARD_REF_SYMBOL_STRING","FRAGMENT_NUMBER","FRAGMENT_SYMBOL_STRING","LAZY_NUMBER","LAZY_SYMBOL_STRING","MEMO_NUMBER","MEMO_SYMBOL_STRING","PORTAL_NUMBER","PORTAL_SYMBOL_STRING","PROFILER_NUMBER","PROFILER_SYMBOL_STRING","PROVIDER_NUMBER","PROVIDER_SYMBOL_STRING","CONSUMER_SYMBOL_STRING","SCOPE_NUMBER","SCOPE_SYMBOL_STRING","STRICT_MODE_NUMBER","STRICT_MODE_SYMBOL_STRING","SUSPENSE_NUMBER","SUSPENSE_SYMBOL_STRING","SUSPENSE_LIST_NUMBER","SUSPENSE_LIST_SYMBOL_STRING","SERVER_CONTEXT_DEFAULT_VALUE_NOT_LOADED_SYMBOL_STRING","enableLogger","enableStyleXFeatures","isInternalFacebookBuild","is","objectIs","getIODescription","href","src","currentSrc","command","request","response","describeFiber","workTagMap","workInProgress","HostHoistable","HostSingleton","HostComponent","LazyComponent","SuspenseComponent","SuspenseListComponent","FunctionComponent","IndeterminateComponent","SimpleMemoComponent","ForwardRef","ClassComponent","ViewTransitionComponent","ActivityComponent","getStackByFiberInDevAndProd","entry","getSourceLocationByFiber","_debugTask","supportsOwnerStacks","_debugStack","getOwnerStackByFiberInDev","HostText","_debugOwner","cachedStyleNameToValueMap","getStyleXData","sources","resolvedStyles","crawlData","crawlObjectProperties","fromEntries","entries","propertyValue","getPropertyValueForStyleName","nestedStyle","styleName","styleSheetIndex","styleSheets","styleSheet","rules","cssRules","_e","ruleIndex","CSSStyleRule","rule","selectorText","property","getPropertyValue","CHANGE_LOG_URL","UNSUPPORTED_VERSION_URL","REACT_DEVTOOLS_WORKPLACE_URL","THEME_STYLES","light","dark","compact","comfortable","COMFORTABLE_LINE_HEIGHT","COMPACT_LINE_HEIGHT","REACT_TOTAL_NUM_LANES","SCHEDULING_PROFILER_VERSION","SNAPSHOT_MAX_HEIGHT","TIME_OFFSET","performanceTarget","supportsUserTiming","clearMarks","supportsUserTimingV3","CHECK_V3_MARK","markOptions","setPerformanceMock_ONLY_FOR_TESTING","performanceMock","createProfilingHooks","getDisplayNameForFiber","getIsProfiling","getLaneLabelMap","reactVersion","currentBatchUID","currentReactComponentMeasure","currentReactMeasuresStack","currentTimelineData","currentFiberStacks","nextRenderShouldStartNewBatch","getRelativeTime","currentTime","startTime","getInternalModuleRanges","ranges","getTimelineData","laneToLanesArray","lanes","lanesArray","lane","laneToLabelMap","markMetadata","markAndClear","_ranges$i","startStackFrame","stopStackFrame","labels","markName","recordReactMeasureStarted","depth","reactMeasure","batchUID","timestamp","_currentTimelineData","batchUIDToMeasuresMap","laneToReactMeasureMap","reactMeasures","recordReactMeasureCompleted","markCommitStarted","markCommitStopped","markComponentRenderStarted","warning","markComponentRenderStopped","componentMeasures","markComponentLayoutEffectMountStarted","markComponentLayoutEffectMountStopped","markComponentLayoutEffectUnmountStarted","markComponentLayoutEffectUnmountStopped","markComponentPassiveEffectMountStarted","markComponentPassiveEffectMountStopped","markComponentPassiveEffectUnmountStarted","markComponentPassiveEffectUnmountStopped","markComponentErrored","thrownValue","phase","alternate","thrownErrors","wakeableIDs","wakeableID","getWakeableID","wakeable","markComponentSuspended","eventType","suspenseEvent","promiseName","resolution","suspenseEvents","markLayoutEffectsStarted","markLayoutEffectsStopped","markPassiveEffectsStarted","markPassiveEffectsStopped","markRenderStarted","markRenderYielded","markRenderStopped","markRenderScheduled","schedulingEvents","markForceUpdateScheduled","getParentFibers","parents","markStateUpdateScheduled","toggleProfilingStatus","internalModuleSourceToRanges","_ranges$i2","flamechart","nativeEvents","networkMeasures","otherUserTimingMarks","snapshots","snapshotHeight","fiberStack","trace","profilingHooks","FIBER_INSTANCE","VIRTUAL_INSTANCE","FILTERED_FIBER_INSTANCE","createFiberInstance","kind","nextSibling","logCount","treeBaseDuration","suspenseNode","createFilteredFiberInstance","createVirtualInstance","debugEntry","NoUpdate","ShouldResetChildren","ShouldResetSuspenseChildren","ShouldResetParentSuspenseChildren","createSuspenseNode","environments","hasUnknownSuspenders","getDispatcherRef","injectedRef","getFiberFlags","flags","effectTag","getInternalReactConstants","ReactPriorityLevels","ImmediatePriority","UserBlockingPriority","NormalPriority","LowPriority","IdlePriority","NoPriority","StrictModeBits","SuspenseyImagesMode","ReactTypeOfWork","CacheComponent","ContextConsumer","ContextProvider","CoroutineComponent","CoroutineHandlerPhase","DehydratedSuspenseComponent","HostPortal","HostRoot","IncompleteClassComponent","IncompleteFunctionComponent","LegacyHiddenComponent","MemoComponent","Mode","OffscreenComponent","ScopeComponent","TracingMarkerComponent","YieldComponent","Throw","getTypeSymbol","symbolOrNumber","_ReactTypeOfWork","resolveFiberType","typeSymbol","_fiber$updateQueue","_fiber$memoizedState","_fiber$memoizedState$","_fiber$memoizedState2","shouldSkipForgetCheck","resolvedType","resolvedContext","fiberRoot","_debugRootType","knownEnvironmentNames","rootToFiberInstanceMap","idToDevToolsInstanceMap","idToSuspenseNodeMap","publicInstanceToDevToolsInstanceMap","hostResourceToDevToolsInstanceMap","getPublicInstance","canonical","publicInstance","_nativeTag","getNativeTag","aquireHostInstance","nearestInstance","hostInstance","releaseHostInstance","aquireHostResource","resource","resourceInstances","releaseHostResource","_iterator","_createForOfIteratorHelper","_step","firstInstance","shouldStartProfilingNow","profilingSettings","reconcilerVersion","_getInternalReactCons","injectProfilingHooks","overrideHookStateDeletePath","overrideHookStateRenamePath","overridePropsDeletePath","overridePropsRenamePath","scheduleRefresh","setErrorHandler","setSuspenseHandler","scheduleUpdate","scheduleRetry","getCurrentFiber","supportsTogglingError","supportsPerformanceTracks","fiberToComponentLogsMap","needsToFlushComponentLogs","bruteForceFlushErrorsAndWarnings","hasChanges","_iterator2","_step2","devtoolsInstance","changed","recordConsoleLogs","updateMostRecentlyInspectedElementIfNecessary","flushPendingEvents","_iterator3","_step3","clearConsoleLogsHelper","instanceID","mostRecentlyInspectedElement","hasElementUpdatedSinceLastInspected","dispatcherRef","forceErrorForFibers","parentInstance","extraString","maybeID","parentDisplayName","maybeParentID","debugTree","indent","repeat","hideElementsWithDisplayNames","hideElementsWithPaths","hideElementsWithTypes","hideElementsWithEnvs","traceUpdatesForNodes","applyComponentFilters","componentFilter","isValid","RegExp","__REACT_DEVTOOLS_COMPONENT_FILTERS__","componentFiltersWithoutLocationBasedOnes","getFiberRoots","rootInstance","currentRoot","unmountInstanceRecursively","rootDisplayNameCounter","newRoot","trackedPath","mightBeOnTrackedPath","setRootPseudoKey","mountFiberRecursively","isFiberHydrated","rootState","isDehydrated","suspenseState","shouldFilterVirtual","secondaryEnv","_iterator4","_step4","displayNameRegExp","shouldFilterFiber","getElementTypeForFiber","_iterator5","_step5","untrackFiber","shouldErrorFiberAlwaysNull","forceFallbackForFibers","shouldSuspendFiberAlwaysFalse","sibling","getChangeDescription","prevFiber","nextFiber","didHooksChange","isFirstMount","getContextChanged","getChangedKeys","indices","getChangedHooksIndices","prevContext","nextContext","isHookThatCanScheduleUpdate","hookObject","boundHasOwnProperty","didStatefulHookChange","prevMemoizedState","nextMemoizedState","changedKeys","_iterator6","_step6","didFiberRender","PerformedWork","pendingOperations","pendingRealUnmountedIDs","pendingRealUnmountedSuspenseIDs","pendingSuspenderChanges","pendingOperationsQueue","pendingStringTable","pendingStringTableLength","pendingUnmountedRootID","pushOperation","isInteger","shouldBailoutWithPendingOperations","currentCommitProfilingMetadata","durations","flushOrQueueOperations","totalCount","numUnmountIDs","numUnmountSuspenseIDs","numSuspenderChanges","stringKey","encodedString","fiberIdWithChanges","suspense","getStringID","measureHostInstance","scrollWidth","scrollHeight","win","createRange","selectNodeContents","unstable_getBoundingClientRect","measureInstance","findAllCurrentHostInstances","childResult","existingEntry","isInDisconnectedSubtree","recordMount","isRoot","fiberInstance","recordReconnect","isProfilingSupported","hasOwnerMetadata","profilingFlags","isProductionBuildOfRenderer","displayNamesByRootID","getDisplayNameForRoot","debugOwner","getUnfilteredOwner","ownerInstance","findNearestOwnerInstance","unfilteredParent","ownerID","keyString","keyStringID","nameProp","namePropString","namePropStringID","parentFiber","parentFiberInstance","recordProfilingDurations","recordVirtualMount","recordVirtualReconnect","recordSuspenseMount","suspenseInstance","parentSuspenseInstance","unfilteredParentInstance","recordUnmount","reconcilingParent","recordDisconnect","recordSuspenseUnmount","trackedPathMatchInstance","recordSuspenseResize","recordSuspenseSuspenders","reconcilingParentSuspenseNode","remainingReconcilingChildren","previouslyReconciledSibling","remainingReconcilingChildrenSuspenseNodes","previouslyReconciledSiblingSuspenseNode","ioExistsInSuspenseAncestor","ioInfo","ancestor","insertSuspendedBy","asyncInfo","parentSuspenseNode","suspenseNodeSuspendedBy","awaited","suspendedBySet","environmentCounts","getAwaitInSuspendedByFromIO","suspensedBy","unblockSuspendedBy","removePreviousSuspendedBy","previousSuspendedBy","nextSuspendedBy","changedEnvironment","alreadyRemovedIO","removedIOInfo","insertChild","moveChild","previousSibling","previousSuspenseSibling","isHiddenOffscreen","isSuspendedOffscreen","unmountRemainingChildren","unmountSuspenseChildrenRecursively","contentInstance","stashedSuspenseParent","stashedSuspensePrevious","stashedSuspenseRemaining","isChildOf","childInstance","grandParent","areEqualRects","aRect","bRect","measureUnchangedSuspenseNodesRecursively","isSuspendedSuspenseComponent","nextRects","prevRects","consumeSuspenseNodesOfExistingInstance","foundOne","previousSkippedSibling","nextRemainingSibling","mountVirtualInstanceRecursively","virtualInstance","lastChild","traceNearestHostComponentUpdate","virtualLevel","mightSiblingsBeOnTrackedPath","updateVirtualTrackedPathStateBeforeMount","stashedParent","stashedPrevious","stashedRemaining","mountVirtualChildrenRecursively","recordVirtualProfilingDurations","updateTrackedPathStateAfterMount","recordVirtualUnmount","recordVirtualDisconnect","getSecondaryEnvironmentName","trackDebugInfoFromLazyType","trackDebugInfoFromUsedThenables","usedThenables","hostAsyncInfoCache","trackDebugInfoFromHostResource","mayResourceSuspendCommit","media","matchMedia","end","byteSize","getEntriesByType","resourceEntries","resourceEntry","transferSize","sheet","promise","trackDebugInfoFromHostComponent","maySuspendCommit","onLoad","loading","fileSize","decodedBodySize","naturalWidth","naturalHeight","trackThrownPromisesFromRetryCache","retryCache","previousVirtualInstance","previousVirtualInstanceFirstFiber","mountChildrenRecursively","mountSuspenseChildrenRecursively","contentFiber","fallbackFiber","shouldIncludeInTree","newInstance","newSuspenseNode","isTimedOut","hydrated","updateTrackedPathStateBeforeMount","shouldPopSuspenseNode","stashedDisconnected","primaryChildFragment","fallbackChildFragment","fallbackChild","primaryChild","contentFiberInstance","actualDuration","convertedTreeBaseDuration","floor","selfDuration","metadata","maxActualDuration","changeDescription","changeDescriptions","updaters","memoizedUpdaters","instanceToSerializedElement","previousTreeBaseDuration","addUnfilteredChildrenIDs","nextChildren","recordResetChildren","addUnfilteredSuspenseChildrenIDs","recordResetSuspenseChildren","updateVirtualInstanceRecursively","nextFirstChild","nextLastChild","prevFirstChild","updateFlags","updateVirtualChildrenRecursively","nextChild","prevChildAtSameIndex","previousVirtualInstanceWasMount","previousVirtualInstanceNextFirstFiber","previousVirtualInstancePrevFirstFiber","previousSiblingOfBestMatch","newVirtualInstance","prevChild","previousSiblingOfExistingInstance","existingInstance","updateFiberRecursively","updateChildrenRecursively","updateSuspenseChildrenRecursively","nextContentFiber","prevContentFiber","prevFallbackFiber","nextFallbackFiber","shouldMeasureSuspenseNode","isLegacySuspense","prevDidTimeout","nextDidTimeOut","prevWasHidden","nextIsHidden","prevWasSuspended","nextIsSuspended","nextFiberChild","nextFallbackChildSet","prevFiberChild","prevFallbackChildSet","childrenUpdateFlags","nextPrimaryChildSet","disconnectChildrenRecursively","reconnectChildrenRecursively","previousHydrated","nextHydrated","rootSupportsProfiling","memoizedInteractions","localPendingOperationsQueue","commitTime","profilingStartTime","priorityLevel","_getEffectDurations","formatPriorityLevel","nextIsMounted","prevWasMounted","removeRootPseudoKey","commitProfilingMetadata","rootToCommitProfilingMetadataMap","getResourceInstance","appendHostInstancesByDevToolsInstance","appendHostInstancesByFiber","getNearestSuspenseNode","domNode","isMostRecentlyInspectedElement","getOwnersListFromInstance","ownerFiber","ownerInfo","originalConsoleMethods","getSuspendedByOfSuspenseNode","filterByChildInstance","hooksCacheKey","hooksCache","streamEntries","_iterator7","_step7","newIO","streamPromise","existingIO","serializeAsyncInfo","getSuspendedByOfInstance","foundIOEntries","getSuspendedByOfInstanceSubtree","suspenseParentInstance","FALLBACK_THROTTLE_MS","getSuspendedByRange","_","parentMax","throttleTime","getAwaitStackFromHooks","matchedStack","ioOwnerInstance","awaitStack","awaitOwnerInstance","resolvedValue","description","isErrorBoundary","getDerivedStateFromError","componentDidCatch","inspectElementRaw","inspectVirtualInstanceRaw","inspectRootsRaw","inspectFiberInstanceRaw","usesHooks","showState","canViewSource","shouldHideContext","contextTypes","contextType","consumerResolvedContext","currentType","currentTypeSymbol","providerResolvedContext","hasErrorBoundary","hasSuspenseBoundary","temp","DidCapture","xstyle","getSourceForFiberInstance","getSourceForInstance","nearestFiber","getNearestFiber","currentlyInspectedPaths","isMostRecentlyInspectedElementCurrent","mergeInspectedPaths","createIsPathAllowed","updateSelectedElement","inspectedElement","$r","valueToCopy","errorType","cleanedInspectedElement","roots","minSuspendedByRange","maxSuspendedByRange","inspectedRoot","supportsGroup","chrome","navigator","userAgent","pendingProps","initialTreeBaseDurationsMap","dataForRoots","commitData","initialTreeBaseDurations","commitProfilingData","commitIndex","fiberActualDurations","fiberSelfDurations","timelineData","rest","_objectWithoutProperties","_excluded","batchUIDToMeasuresKeyValueArray","laneToLabelKeyValueArray","laneToReactMeasureKeyValueArray","snapshotTreeBaseDurations","shouldRecordChangeDescriptions","shouldRecordTimeline","inst","shouldErrorFiberAccordingToMap","shouldSuspendFiberAccordingToSet","unsuspendedSet","resuspended","trackedPathMatchFiber","trackedPathMatchDepth","returnFiber","returnAlternate","actualFrame","getPathFrame","expectedFrame","getVirtualPathFrame","rootPseudoKeys","counter","pseudoKey","preferredDisplayName","fallbackDisplayName","keyPath","ownerSource","stackFrame","unresolvedSource","debugLocation","lastLine","internalMcpFunctions","__IS_INTERNAL_MCP_BUILD__","__internal_only_getComponentTree","treeString","buildTreeString","isLastChild","childPrefix","childCount","tempChild","currentChildIndex","isLastSibling","rootInstances","isLast","decorate","old","decorateMany","fns","olds","restoreMany","getData","internalInstance","_currentElement","getElementType","getChildren","_renderedComponent","_renderedChildren","renderedChildren","idToInternalInstanceMap","internalInstanceToIDMap","internalInstanceToRootIDMap","findHostInstanceForInternalID","ComponentTree","getClosestInstanceFromNode","getNodeFromInstance","Mount","getID","getNode","areEqualArrays","parentIDStack","oldReconcilerMethods","Reconciler","mountComponent","hostContainerInfo","_topLevelWrapper","performUpdateIfNecessary","prevChildren","recordReorder","receiveComponent","unmountComponent","Mixin","_owner","_getData","nextChildIDs","pendingUnmountedIDs","crawlAndRecordInitialMounts","_instancesByReactRootID","_instancesByContainerID","encodedKey","existingID","stringID","currentlyInspectedElementID","_instance","inspectInternalInstanceRaw","_getData2","rootKey","enabled","attachFlight","attachFiber","attachLegacy","isMatchingRender","attachRenderer","findFiberByHostInstance","template","argumentsPointer","currentChar","nextChar","_args$splice","_args$splice2","_args$splice3","_args$splice4","_args$splice5","_args$splice6","PREFIX_REGEX","ROW_COLUMN_NUMBER_REGEX","isStringComponentStack","frameDiffs","areStackTracesEqual","targetConsole","defaultProfilingSettings","installHook","maybeSettingsOrSettingsPromise","detectReactBuildType","Function","_renderNewRootComponent","renderRootCode","checkDCE","code","hasDetectedBadDCE","inject","renderers","reactBuildType","hasUnsupportedRendererAttached","sub","fiberRoots","onCommitFiberUnmount","onCommitFiberRoot","mountedRoots","isKnownRoot","isUnmounting","onPostCommitFiberRoot","isRunningDuringStrictModeInvocation","setStrictMode","isStrictMode","patchConsoleForStrictMode","unpatchConsoleForStrictMode","unpatchConsoleCallbacks","consoleMethodsToOverrideForStrictMode","_consoleMethodsToOver","_i","originalMethod","overrideMethod","hideConsoleLogsInStrictMode","openModuleRangesStack","moduleRanges","getTopStackFrameString","registerInternalModuleStart","registerInternalModuleStop","patchConsoleForErrorsAndWarnings","consoleMethodsToOverrideForErrorsAndWarnings","_loop2","_consoleMethodsToOver2","_i2","_len2","_key2","injectedComponentStackAsFakeError","alreadyHasComponentStack","appendComponentStack","lastArg","shouldShowInlineWarningsAndErrors","showInlineWarningsAndErrors","_loop3","fakeError","firstArg","breakOnConsoleErrors","argsWithCSSStyles","backends","supportsFiber","supportsFlight","initBackend","isReloadAndProfileSupported","subs","onFastRefreshScheduled","onHookOperations","onTraceUpdates","onHookSettings","reactDevtoolsAgent","onAgentShutdown","onReloadAndProfileSupportedByHost","resolveBoxStyle","hasParts","styleForAll","_Object$keys","styleForHorizontal","styleForLeft","styleForRight","styleForEnd","styleForStart","styleForVertical","styleForBottom","styleForTop","setupNativeStyleEditor","resolveNativeStyle","validAttributes","measureStyle","oldName","newName","renameStyle","setStyle","isSupported","EMPTY_BOX_STYLE","componentIDToStyleOverrides","layout","resolvedStyle","styleOverrides","measure","shallowClone","cloned","newStyle","customStyle","setNativeProps","lastIndex","lastLength","savedComponentFilters","connectToDevTools","_ref$host","host","nativeStyleEditorValidAttributes","_ref$useHttps","useHttps","_ref$port","port","websocket","_ref$resolveRNStyle","resolveRNStyle","_ref$retryConnectionD","retryConnectionDelay","_ref$isAppActive","isAppActive","onSettingsUpdated","_ref$isReloadAndProfi","protocol","retryTimeoutID","messageListeners","uri","ws","WebSocket","onclose","handleClose","onerror","handleFailed","onmessage","handleMessage","onopen","transferable","readyState","OPEN","lazyResolveRNStyle","lazyNativeStyleEditorValidAttributes","initAfterTick","connectWithCustomMessagingProtocol","onSubscribe","onUnsubscribe","onMessage","_ref2$isReloadAndProf","unsubscribeBackend","nativeStyleResolver"],"sourceRoot":""}