@react-native/debugger-frontend 0.73.0-nightly-20230922-52104c6ee

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 (656) hide show
  1. package/BUILD_INFO +10 -0
  2. package/README.md +22 -0
  3. package/dist/third-party/LICENSE +28 -0
  4. package/dist/third-party/front_end/Images/3d-center.svg +1 -0
  5. package/dist/third-party/front_end/Images/3d-pan.svg +1 -0
  6. package/dist/third-party/front_end/Images/3d-rotate.svg +1 -0
  7. package/dist/third-party/front_end/Images/Images.js +223 -0
  8. package/dist/third-party/front_end/Images/accelerometer-back.svg +1 -0
  9. package/dist/third-party/front_end/Images/accelerometer-bottom.png +0 -0
  10. package/dist/third-party/front_end/Images/accelerometer-front.svg +1 -0
  11. package/dist/third-party/front_end/Images/accelerometer-left.png +0 -0
  12. package/dist/third-party/front_end/Images/accelerometer-right.png +0 -0
  13. package/dist/third-party/front_end/Images/accelerometer-top.png +0 -0
  14. package/dist/third-party/front_end/Images/align-content-center.svg +1 -0
  15. package/dist/third-party/front_end/Images/align-content-end.svg +1 -0
  16. package/dist/third-party/front_end/Images/align-content-space-around.svg +1 -0
  17. package/dist/third-party/front_end/Images/align-content-space-between.svg +1 -0
  18. package/dist/third-party/front_end/Images/align-content-space-evenly.svg +1 -0
  19. package/dist/third-party/front_end/Images/align-content-start.svg +1 -0
  20. package/dist/third-party/front_end/Images/align-content-stretch.svg +1 -0
  21. package/dist/third-party/front_end/Images/align-items-baseline.svg +1 -0
  22. package/dist/third-party/front_end/Images/align-items-center.svg +1 -0
  23. package/dist/third-party/front_end/Images/align-items-end.svg +1 -0
  24. package/dist/third-party/front_end/Images/align-items-start.svg +1 -0
  25. package/dist/third-party/front_end/Images/align-items-stretch.svg +1 -0
  26. package/dist/third-party/front_end/Images/align-self-center.svg +1 -0
  27. package/dist/third-party/front_end/Images/align-self-end.svg +1 -0
  28. package/dist/third-party/front_end/Images/align-self-start.svg +1 -0
  29. package/dist/third-party/front_end/Images/align-self-stretch.svg +1 -0
  30. package/dist/third-party/front_end/Images/arrow-down.svg +1 -0
  31. package/dist/third-party/front_end/Images/arrow-drop-down-dark.svg +1 -0
  32. package/dist/third-party/front_end/Images/arrow-drop-down-light.svg +1 -0
  33. package/dist/third-party/front_end/Images/arrow-up-down-circle.svg +1 -0
  34. package/dist/third-party/front_end/Images/arrow-up-down.svg +1 -0
  35. package/dist/third-party/front_end/Images/arrow-up.svg +1 -0
  36. package/dist/third-party/front_end/Images/bell.svg +1 -0
  37. package/dist/third-party/front_end/Images/bezier-curve-filled.svg +1 -0
  38. package/dist/third-party/front_end/Images/bin.svg +1 -0
  39. package/dist/third-party/front_end/Images/bottom-panel-close.svg +1 -0
  40. package/dist/third-party/front_end/Images/bottom-panel-open.svg +1 -0
  41. package/dist/third-party/front_end/Images/brackets.svg +1 -0
  42. package/dist/third-party/front_end/Images/breakpoint-circle.svg +1 -0
  43. package/dist/third-party/front_end/Images/breakpoint-crossed-filled.svg +1 -0
  44. package/dist/third-party/front_end/Images/breakpoint-crossed.svg +1 -0
  45. package/dist/third-party/front_end/Images/brush-filled.svg +1 -0
  46. package/dist/third-party/front_end/Images/brush.svg +1 -0
  47. package/dist/third-party/front_end/Images/bug.svg +1 -0
  48. package/dist/third-party/front_end/Images/bundle.svg +1 -0
  49. package/dist/third-party/front_end/Images/check-circle.svg +1 -0
  50. package/dist/third-party/front_end/Images/check-double.svg +1 -0
  51. package/dist/third-party/front_end/Images/checker.svg +1 -0
  52. package/dist/third-party/front_end/Images/checkmark.svg +1 -0
  53. package/dist/third-party/front_end/Images/chevron-double-right.svg +1 -0
  54. package/dist/third-party/front_end/Images/chevron-down.svg +1 -0
  55. package/dist/third-party/front_end/Images/chevron-left-dot.svg +1 -0
  56. package/dist/third-party/front_end/Images/chevron-left.svg +1 -0
  57. package/dist/third-party/front_end/Images/chevron-right.svg +1 -0
  58. package/dist/third-party/front_end/Images/chevron-up.svg +1 -0
  59. package/dist/third-party/front_end/Images/chromeLeft.avif +0 -0
  60. package/dist/third-party/front_end/Images/chromeMiddle.avif +0 -0
  61. package/dist/third-party/front_end/Images/chromeRight.avif +0 -0
  62. package/dist/third-party/front_end/Images/clear-list.svg +1 -0
  63. package/dist/third-party/front_end/Images/clear.svg +1 -0
  64. package/dist/third-party/front_end/Images/cloud.svg +1 -0
  65. package/dist/third-party/front_end/Images/code-circle.svg +1 -0
  66. package/dist/third-party/front_end/Images/code.svg +1 -0
  67. package/dist/third-party/front_end/Images/colon.svg +1 -0
  68. package/dist/third-party/front_end/Images/color-picker-filled.svg +1 -0
  69. package/dist/third-party/front_end/Images/color-picker.svg +1 -0
  70. package/dist/third-party/front_end/Images/console-conditional-breakpoint.svg +1 -0
  71. package/dist/third-party/front_end/Images/console-logpoint.svg +1 -0
  72. package/dist/third-party/front_end/Images/cookie.svg +1 -0
  73. package/dist/third-party/front_end/Images/copy.svg +1 -0
  74. package/dist/third-party/front_end/Images/credit-card.svg +1 -0
  75. package/dist/third-party/front_end/Images/cross-circle-filled.svg +1 -0
  76. package/dist/third-party/front_end/Images/cross-circle.svg +1 -0
  77. package/dist/third-party/front_end/Images/cross.svg +1 -0
  78. package/dist/third-party/front_end/Images/cssoverview_icons_2x.avif +0 -0
  79. package/dist/third-party/front_end/Images/custom-typography.svg +1 -0
  80. package/dist/third-party/front_end/Images/database.svg +1 -0
  81. package/dist/third-party/front_end/Images/deployed.svg +1 -0
  82. package/dist/third-party/front_end/Images/device-fold.svg +1 -0
  83. package/dist/third-party/front_end/Images/devices.svg +1 -0
  84. package/dist/third-party/front_end/Images/dock-bottom.svg +1 -0
  85. package/dist/third-party/front_end/Images/dock-left.svg +1 -0
  86. package/dist/third-party/front_end/Images/dock-right.svg +1 -0
  87. package/dist/third-party/front_end/Images/dock-window.svg +1 -0
  88. package/dist/third-party/front_end/Images/document.svg +1 -0
  89. package/dist/third-party/front_end/Images/dots-horizontal.svg +1 -0
  90. package/dist/third-party/front_end/Images/dots-vertical.svg +1 -0
  91. package/dist/third-party/front_end/Images/download.svg +1 -0
  92. package/dist/third-party/front_end/Images/edit.svg +1 -0
  93. package/dist/third-party/front_end/Images/empty.svg +1 -0
  94. package/dist/third-party/front_end/Images/errorWave.svg +1 -0
  95. package/dist/third-party/front_end/Images/exclamation.svg +1 -0
  96. package/dist/third-party/front_end/Images/experiment-check.svg +1 -0
  97. package/dist/third-party/front_end/Images/experiment.svg +1 -0
  98. package/dist/third-party/front_end/Images/eye.svg +1 -0
  99. package/dist/third-party/front_end/Images/file-document.svg +1 -0
  100. package/dist/third-party/front_end/Images/file-font.svg +1 -0
  101. package/dist/third-party/front_end/Images/file-generic.svg +1 -0
  102. package/dist/third-party/front_end/Images/file-image.svg +1 -0
  103. package/dist/third-party/front_end/Images/file-script.svg +1 -0
  104. package/dist/third-party/front_end/Images/file-snippet.svg +1 -0
  105. package/dist/third-party/front_end/Images/file-stylesheet.svg +1 -0
  106. package/dist/third-party/front_end/Images/filter-clear.svg +1 -0
  107. package/dist/third-party/front_end/Images/filter-filled.svg +1 -0
  108. package/dist/third-party/front_end/Images/filter.svg +1 -0
  109. package/dist/third-party/front_end/Images/flex-direction.svg +1 -0
  110. package/dist/third-party/front_end/Images/flex-no-wrap.svg +1 -0
  111. package/dist/third-party/front_end/Images/flex-wrap.svg +1 -0
  112. package/dist/third-party/front_end/Images/flow.svg +1 -0
  113. package/dist/third-party/front_end/Images/fold-more.svg +1 -0
  114. package/dist/third-party/front_end/Images/folder.svg +1 -0
  115. package/dist/third-party/front_end/Images/frame-crossed.svg +1 -0
  116. package/dist/third-party/front_end/Images/frame-icon.svg +1 -0
  117. package/dist/third-party/front_end/Images/frame.svg +1 -0
  118. package/dist/third-party/front_end/Images/gear-filled.svg +1 -0
  119. package/dist/third-party/front_end/Images/gear.svg +1 -0
  120. package/dist/third-party/front_end/Images/gears.svg +1 -0
  121. package/dist/third-party/front_end/Images/heap-snapshot.svg +1 -0
  122. package/dist/third-party/front_end/Images/heap-snapshots.svg +1 -0
  123. package/dist/third-party/front_end/Images/help.svg +1 -0
  124. package/dist/third-party/front_end/Images/iframe-crossed.svg +1 -0
  125. package/dist/third-party/front_end/Images/iframe.svg +1 -0
  126. package/dist/third-party/front_end/Images/import.svg +1 -0
  127. package/dist/third-party/front_end/Images/info-filled.svg +1 -0
  128. package/dist/third-party/front_end/Images/info.svg +1 -0
  129. package/dist/third-party/front_end/Images/issue-cross-filled.svg +1 -0
  130. package/dist/third-party/front_end/Images/issue-exclamation-filled.svg +1 -0
  131. package/dist/third-party/front_end/Images/issue-questionmark-filled.svg +1 -0
  132. package/dist/third-party/front_end/Images/issue-text-filled.svg +1 -0
  133. package/dist/third-party/front_end/Images/justify-content-center.svg +1 -0
  134. package/dist/third-party/front_end/Images/justify-content-end.svg +1 -0
  135. package/dist/third-party/front_end/Images/justify-content-space-around.svg +1 -0
  136. package/dist/third-party/front_end/Images/justify-content-space-between.svg +1 -0
  137. package/dist/third-party/front_end/Images/justify-content-space-evenly.svg +1 -0
  138. package/dist/third-party/front_end/Images/justify-content-start.svg +1 -0
  139. package/dist/third-party/front_end/Images/justify-items-center.svg +1 -0
  140. package/dist/third-party/front_end/Images/justify-items-end.svg +1 -0
  141. package/dist/third-party/front_end/Images/justify-items-start.svg +1 -0
  142. package/dist/third-party/front_end/Images/justify-items-stretch.svg +1 -0
  143. package/dist/third-party/front_end/Images/keyboard-pen.svg +1 -0
  144. package/dist/third-party/front_end/Images/large-arrow-right-filled.svg +1 -0
  145. package/dist/third-party/front_end/Images/largeIcons.svg +2 -0
  146. package/dist/third-party/front_end/Images/layers-filled.svg +1 -0
  147. package/dist/third-party/front_end/Images/layers.svg +1 -0
  148. package/dist/third-party/front_end/Images/left-panel-close.svg +1 -0
  149. package/dist/third-party/front_end/Images/left-panel-open.svg +1 -0
  150. package/dist/third-party/front_end/Images/lighthouse_logo.svg +1 -0
  151. package/dist/third-party/front_end/Images/list.svg +1 -0
  152. package/dist/third-party/front_end/Images/mediumIcons.svg +1 -0
  153. package/dist/third-party/front_end/Images/memory.svg +1 -0
  154. package/dist/third-party/front_end/Images/minus.svg +1 -0
  155. package/dist/third-party/front_end/Images/minus_icon.svg +1 -0
  156. package/dist/third-party/front_end/Images/navigationControls.png +0 -0
  157. package/dist/third-party/front_end/Images/navigationControls_2x.png +0 -0
  158. package/dist/third-party/front_end/Images/network-settings.svg +1 -0
  159. package/dist/third-party/front_end/Images/nodeIcon.avif +0 -0
  160. package/dist/third-party/front_end/Images/node_search_icon.svg +1 -0
  161. package/dist/third-party/front_end/Images/open-externally.svg +1 -0
  162. package/dist/third-party/front_end/Images/pause.svg +1 -0
  163. package/dist/third-party/front_end/Images/performance.svg +1 -0
  164. package/dist/third-party/front_end/Images/person.svg +1 -0
  165. package/dist/third-party/front_end/Images/play.svg +1 -0
  166. package/dist/third-party/front_end/Images/plus.svg +1 -0
  167. package/dist/third-party/front_end/Images/popoverArrows.png +0 -0
  168. package/dist/third-party/front_end/Images/popup.svg +1 -0
  169. package/dist/third-party/front_end/Images/preview_feature_video_thumbnail.svg +1 -0
  170. package/dist/third-party/front_end/Images/profile.svg +1 -0
  171. package/dist/third-party/front_end/Images/react_native/welcomeIcon.png +0 -0
  172. package/dist/third-party/front_end/Images/record-start.svg +1 -0
  173. package/dist/third-party/front_end/Images/record-stop.svg +1 -0
  174. package/dist/third-party/front_end/Images/redo.svg +1 -0
  175. package/dist/third-party/front_end/Images/refresh.svg +1 -0
  176. package/dist/third-party/front_end/Images/replace.svg +1 -0
  177. package/dist/third-party/front_end/Images/replay.svg +1 -0
  178. package/dist/third-party/front_end/Images/resizeDiagonal.svg +1 -0
  179. package/dist/third-party/front_end/Images/resizeHorizontal.svg +1 -0
  180. package/dist/third-party/front_end/Images/resizeVertical.svg +1 -0
  181. package/dist/third-party/front_end/Images/resume.svg +1 -0
  182. package/dist/third-party/front_end/Images/review.svg +1 -0
  183. package/dist/third-party/front_end/Images/right-panel-close.svg +1 -0
  184. package/dist/third-party/front_end/Images/right-panel-open.svg +1 -0
  185. package/dist/third-party/front_end/Images/screen-rotation.svg +1 -0
  186. package/dist/third-party/front_end/Images/search.svg +1 -0
  187. package/dist/third-party/front_end/Images/securityIcons.svg +1 -0
  188. package/dist/third-party/front_end/Images/select-element.svg +1 -0
  189. package/dist/third-party/front_end/Images/settings_14x14_icon.svg +1 -0
  190. package/dist/third-party/front_end/Images/shadow.svg +1 -0
  191. package/dist/third-party/front_end/Images/smallIcons.svg +1 -0
  192. package/dist/third-party/front_end/Images/snippet.svg +1 -0
  193. package/dist/third-party/front_end/Images/star.svg +1 -0
  194. package/dist/third-party/front_end/Images/step-into.svg +1 -0
  195. package/dist/third-party/front_end/Images/step-out.svg +1 -0
  196. package/dist/third-party/front_end/Images/step-over.svg +1 -0
  197. package/dist/third-party/front_end/Images/step.svg +1 -0
  198. package/dist/third-party/front_end/Images/stop.svg +1 -0
  199. package/dist/third-party/front_end/Images/symbol.svg +1 -0
  200. package/dist/third-party/front_end/Images/sync.svg +1 -0
  201. package/dist/third-party/front_end/Images/table.svg +1 -0
  202. package/dist/third-party/front_end/Images/toolbarResizerVertical.png +0 -0
  203. package/dist/third-party/front_end/Images/top-panel-close.svg +1 -0
  204. package/dist/third-party/front_end/Images/top-panel-open.svg +1 -0
  205. package/dist/third-party/front_end/Images/touchCursor.png +0 -0
  206. package/dist/third-party/front_end/Images/touchCursor_2x.png +0 -0
  207. package/dist/third-party/front_end/Images/triangle-bottom-right.svg +1 -0
  208. package/dist/third-party/front_end/Images/triangle-down.svg +1 -0
  209. package/dist/third-party/front_end/Images/triangle-left.svg +1 -0
  210. package/dist/third-party/front_end/Images/triangle-right.svg +1 -0
  211. package/dist/third-party/front_end/Images/triangle-up.svg +1 -0
  212. package/dist/third-party/front_end/Images/undo.svg +1 -0
  213. package/dist/third-party/front_end/Images/warning-filled.svg +1 -0
  214. package/dist/third-party/front_end/Images/warning.svg +1 -0
  215. package/dist/third-party/front_end/Images/warning_icon.svg +1 -0
  216. package/dist/third-party/front_end/Images/watch.svg +1 -0
  217. package/dist/third-party/front_end/Images/whatsnew.avif +0 -0
  218. package/dist/third-party/front_end/Images/width.svg +1 -0
  219. package/dist/third-party/front_end/Tests.js +1662 -0
  220. package/dist/third-party/front_end/core/common/common-legacy.js +1 -0
  221. package/dist/third-party/front_end/core/common/common.js +1 -0
  222. package/dist/third-party/front_end/core/dom_extension/dom_extension.js +1 -0
  223. package/dist/third-party/front_end/core/host/host-legacy.js +1 -0
  224. package/dist/third-party/front_end/core/host/host.js +1 -0
  225. package/dist/third-party/front_end/core/i18n/i18n.js +1 -0
  226. package/dist/third-party/front_end/core/i18n/locales/en-US.json +1 -0
  227. package/dist/third-party/front_end/core/i18n/locales/zh.json +1 -0
  228. package/dist/third-party/front_end/core/platform/platform.js +1 -0
  229. package/dist/third-party/front_end/core/protocol_client/protocol_client-legacy.js +1 -0
  230. package/dist/third-party/front_end/core/protocol_client/protocol_client.js +1 -0
  231. package/dist/third-party/front_end/core/root/root-legacy.js +1 -0
  232. package/dist/third-party/front_end/core/root/root.js +1 -0
  233. package/dist/third-party/front_end/core/sdk/sdk-legacy.js +1 -0
  234. package/dist/third-party/front_end/core/sdk/sdk-meta.js +1 -0
  235. package/dist/third-party/front_end/core/sdk/sdk.js +1 -0
  236. package/dist/third-party/front_end/device_mode_emulation_frame.html +20 -0
  237. package/dist/third-party/front_end/devtools_app.html +20 -0
  238. package/dist/third-party/front_end/devtools_compatibility.js +1595 -0
  239. package/dist/third-party/front_end/emulated_devices/optimized/MotoG4-landscape.avif +0 -0
  240. package/dist/third-party/front_end/emulated_devices/optimized/MotoG4-portrait.avif +0 -0
  241. package/dist/third-party/front_end/emulated_devices/optimized/Nexus5X-landscape.avif +0 -0
  242. package/dist/third-party/front_end/emulated_devices/optimized/Nexus5X-portrait.avif +0 -0
  243. package/dist/third-party/front_end/emulated_devices/optimized/Nexus6P-landscape.avif +0 -0
  244. package/dist/third-party/front_end/emulated_devices/optimized/Nexus6P-portrait.avif +0 -0
  245. package/dist/third-party/front_end/emulated_devices/optimized/google-nest-hub-horizontal.avif +0 -0
  246. package/dist/third-party/front_end/emulated_devices/optimized/google-nest-hub-max-horizontal.avif +0 -0
  247. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-horizontal-default-1x.avif +0 -0
  248. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-horizontal-default-2x.avif +0 -0
  249. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-1x.avif +0 -0
  250. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-2x.avif +0 -0
  251. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-horizontal-navigation-1x.avif +0 -0
  252. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-horizontal-navigation-2x.avif +0 -0
  253. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-vertical-default-1x.avif +0 -0
  254. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-vertical-default-2x.avif +0 -0
  255. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-vertical-keyboard-1x.avif +0 -0
  256. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-vertical-keyboard-2x.avif +0 -0
  257. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-vertical-navigation-1x.avif +0 -0
  258. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-vertical-navigation-2x.avif +0 -0
  259. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-default-1x.avif +0 -0
  260. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-default-2x.avif +0 -0
  261. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-1x.avif +0 -0
  262. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-2x.avif +0 -0
  263. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-1x.avif +0 -0
  264. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-2x.avif +0 -0
  265. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-vertical-default-1x.avif +0 -0
  266. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-vertical-default-2x.avif +0 -0
  267. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-1x.avif +0 -0
  268. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-2x.avif +0 -0
  269. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-vertical-navigation-1x.avif +0 -0
  270. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-vertical-navigation-2x.avif +0 -0
  271. package/dist/third-party/front_end/emulated_devices/optimized/iPad-landscape.avif +0 -0
  272. package/dist/third-party/front_end/emulated_devices/optimized/iPad-portrait.avif +0 -0
  273. package/dist/third-party/front_end/emulated_devices/optimized/iPhone5-landscape.avif +0 -0
  274. package/dist/third-party/front_end/emulated_devices/optimized/iPhone5-portrait.avif +0 -0
  275. package/dist/third-party/front_end/emulated_devices/optimized/iPhone6-landscape.avif +0 -0
  276. package/dist/third-party/front_end/emulated_devices/optimized/iPhone6-portrait.avif +0 -0
  277. package/dist/third-party/front_end/emulated_devices/optimized/iPhone6Plus-landscape.avif +0 -0
  278. package/dist/third-party/front_end/emulated_devices/optimized/iPhone6Plus-portrait.avif +0 -0
  279. package/dist/third-party/front_end/entrypoints/device_mode_emulation_frame/device_mode_emulation_frame.js +1 -0
  280. package/dist/third-party/front_end/entrypoints/devtools_app/devtools_app.js +1 -0
  281. package/dist/third-party/front_end/entrypoints/formatter_worker/FormatterActions.js +1 -0
  282. package/dist/third-party/front_end/entrypoints/formatter_worker/formatter_worker-entrypoint.js +1 -0
  283. package/dist/third-party/front_end/entrypoints/formatter_worker/formatter_worker.js +1 -0
  284. package/dist/third-party/front_end/entrypoints/heap_snapshot_worker/heap_snapshot_worker-entrypoint.js +1 -0
  285. package/dist/third-party/front_end/entrypoints/heap_snapshot_worker/heap_snapshot_worker-legacy.js +1 -0
  286. package/dist/third-party/front_end/entrypoints/heap_snapshot_worker/heap_snapshot_worker.js +1 -0
  287. package/dist/third-party/front_end/entrypoints/inspector/inspector.js +1 -0
  288. package/dist/third-party/front_end/entrypoints/inspector_main/inspector_main-meta.js +1 -0
  289. package/dist/third-party/front_end/entrypoints/inspector_main/inspector_main.js +1 -0
  290. package/dist/third-party/front_end/entrypoints/js_app/js_app.js +1 -0
  291. package/dist/third-party/front_end/entrypoints/lighthouse_worker/lighthouse_worker.js +1 -0
  292. package/dist/third-party/front_end/entrypoints/main/main-legacy.js +1 -0
  293. package/dist/third-party/front_end/entrypoints/main/main-meta.js +1 -0
  294. package/dist/third-party/front_end/entrypoints/main/main.js +1 -0
  295. package/dist/third-party/front_end/entrypoints/ndb_app/ndb_app.js +1 -0
  296. package/dist/third-party/front_end/entrypoints/node_app/node_app.js +1 -0
  297. package/dist/third-party/front_end/entrypoints/rn_inspector/rn_inspector.js +1 -0
  298. package/dist/third-party/front_end/entrypoints/shell/shell.js +1 -0
  299. package/dist/third-party/front_end/entrypoints/wasmparser_worker/wasmparser_worker-entrypoint.js +1 -0
  300. package/dist/third-party/front_end/entrypoints/wasmparser_worker/wasmparser_worker.js +1 -0
  301. package/dist/third-party/front_end/entrypoints/worker_app/worker_app.js +1 -0
  302. package/dist/third-party/front_end/inspector.html +20 -0
  303. package/dist/third-party/front_end/integration_test_runner.html +40 -0
  304. package/dist/third-party/front_end/js_app.html +20 -0
  305. package/dist/third-party/front_end/legacy_test_runner/legacy_test_runner.js +36 -0
  306. package/dist/third-party/front_end/legacy_test_runner/test_runner/test_runner.js +1 -0
  307. package/dist/third-party/front_end/models/bindings/bindings-legacy.js +1 -0
  308. package/dist/third-party/front_end/models/bindings/bindings.js +1 -0
  309. package/dist/third-party/front_end/models/breakpoints/breakpoints-legacy.js +1 -0
  310. package/dist/third-party/front_end/models/breakpoints/breakpoints.js +1 -0
  311. package/dist/third-party/front_end/models/emulation/emulation.js +1 -0
  312. package/dist/third-party/front_end/models/extensions/extensions-legacy.js +1 -0
  313. package/dist/third-party/front_end/models/extensions/extensions.js +1 -0
  314. package/dist/third-party/front_end/models/formatter/formatter-legacy.js +1 -0
  315. package/dist/third-party/front_end/models/formatter/formatter.js +1 -0
  316. package/dist/third-party/front_end/models/har/har.js +1 -0
  317. package/dist/third-party/front_end/models/heap_snapshot_model/heap_snapshot_model-legacy.js +1 -0
  318. package/dist/third-party/front_end/models/heap_snapshot_model/heap_snapshot_model.js +1 -0
  319. package/dist/third-party/front_end/models/issues_manager/descriptions/CoepCoopSandboxedIframeCannotNavigateToCoopPage.md +4 -0
  320. package/dist/third-party/front_end/models/issues_manager/descriptions/CoepCorpNotSameOrigin.md +8 -0
  321. package/dist/third-party/front_end/models/issues_manager/descriptions/CoepCorpNotSameOriginAfterDefaultedToSameOriginByCoep.md +18 -0
  322. package/dist/third-party/front_end/models/issues_manager/descriptions/CoepCorpNotSameSite.md +7 -0
  323. package/dist/third-party/front_end/models/issues_manager/descriptions/CoepFrameResourceNeedsCoepHeader.md +10 -0
  324. package/dist/third-party/front_end/models/issues_manager/descriptions/CompatibilityModeQuirks.md +5 -0
  325. package/dist/third-party/front_end/models/issues_manager/descriptions/CookieAttributeValueExceedsMaxSize.md +5 -0
  326. package/dist/third-party/front_end/models/issues_manager/descriptions/LowTextContrast.md +5 -0
  327. package/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteExcludeContextDowngradeRead.md +8 -0
  328. package/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteExcludeContextDowngradeSet.md +8 -0
  329. package/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteExcludeNavigationContextDowngrade.md +8 -0
  330. package/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteInvalidSameParty.md +8 -0
  331. package/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteNoneInsecureErrorRead.md +8 -0
  332. package/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteNoneInsecureErrorSet.md +8 -0
  333. package/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteNoneInsecureWarnRead.md +8 -0
  334. package/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteNoneInsecureWarnSet.md +8 -0
  335. package/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteUnspecifiedLaxAllowUnsafeRead.md +9 -0
  336. package/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteUnspecifiedLaxAllowUnsafeSet.md +9 -0
  337. package/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteUnspecifiedTreatedAsLaxRead.md +9 -0
  338. package/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteUnspecifiedTreatedAsLaxSet.md +9 -0
  339. package/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteWarnCrossDowngradeRead.md +8 -0
  340. package/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteWarnCrossDowngradeSet.md +8 -0
  341. package/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteWarnStrictLaxDowngradeStrict.md +8 -0
  342. package/dist/third-party/front_end/models/issues_manager/descriptions/arInsecureContext.md +7 -0
  343. package/dist/third-party/front_end/models/issues_manager/descriptions/arInvalidRegisterOsSourceHeader.md +5 -0
  344. package/dist/third-party/front_end/models/issues_manager/descriptions/arInvalidRegisterOsTriggerHeader.md +5 -0
  345. package/dist/third-party/front_end/models/issues_manager/descriptions/arInvalidRegisterSourceHeader.md +5 -0
  346. package/dist/third-party/front_end/models/issues_manager/descriptions/arInvalidRegisterTriggerHeader.md +5 -0
  347. package/dist/third-party/front_end/models/issues_manager/descriptions/arOsSourceIgnored.md +18 -0
  348. package/dist/third-party/front_end/models/issues_manager/descriptions/arOsTriggerIgnored.md +19 -0
  349. package/dist/third-party/front_end/models/issues_manager/descriptions/arPermissionPolicyDisabled.md +8 -0
  350. package/dist/third-party/front_end/models/issues_manager/descriptions/arSourceAndTriggerHeaders.md +9 -0
  351. package/dist/third-party/front_end/models/issues_manager/descriptions/arSourceIgnored.md +13 -0
  352. package/dist/third-party/front_end/models/issues_manager/descriptions/arTriggerIgnored.md +12 -0
  353. package/dist/third-party/front_end/models/issues_manager/descriptions/arUntrustworthyReportingOrigin.md +10 -0
  354. package/dist/third-party/front_end/models/issues_manager/descriptions/arWebAndOsHeaders.md +11 -0
  355. package/dist/third-party/front_end/models/issues_manager/descriptions/bounceTrackingMitigations.md +3 -0
  356. package/dist/third-party/front_end/models/issues_manager/descriptions/clientHintMetaTagAllowListInvalidOrigin.md +4 -0
  357. package/dist/third-party/front_end/models/issues_manager/descriptions/clientHintMetaTagModifiedHTML.md +4 -0
  358. package/dist/third-party/front_end/models/issues_manager/descriptions/cookieExcludeBlockedWithinFirstPartySet.md +4 -0
  359. package/dist/third-party/front_end/models/issues_manager/descriptions/cookieExcludeDomainNonAscii.md +11 -0
  360. package/dist/third-party/front_end/models/issues_manager/descriptions/cookieWarnDomainNonAscii.md +11 -0
  361. package/dist/third-party/front_end/models/issues_manager/descriptions/corsAllowCredentialsRequired.md +6 -0
  362. package/dist/third-party/front_end/models/issues_manager/descriptions/corsDisabledScheme.md +7 -0
  363. package/dist/third-party/front_end/models/issues_manager/descriptions/corsDisallowedByMode.md +7 -0
  364. package/dist/third-party/front_end/models/issues_manager/descriptions/corsHeaderDisallowedByPreflightResponse.md +5 -0
  365. package/dist/third-party/front_end/models/issues_manager/descriptions/corsInsecurePrivateNetwork.md +10 -0
  366. package/dist/third-party/front_end/models/issues_manager/descriptions/corsInvalidHeaderValues.md +7 -0
  367. package/dist/third-party/front_end/models/issues_manager/descriptions/corsMethodDisallowedByPreflightResponse.md +5 -0
  368. package/dist/third-party/front_end/models/issues_manager/descriptions/corsNoCorsRedirectModeNotFollow.md +5 -0
  369. package/dist/third-party/front_end/models/issues_manager/descriptions/corsOriginMismatch.md +6 -0
  370. package/dist/third-party/front_end/models/issues_manager/descriptions/corsPreflightAllowPrivateNetworkError.md +10 -0
  371. package/dist/third-party/front_end/models/issues_manager/descriptions/corsPreflightResponseInvalid.md +5 -0
  372. package/dist/third-party/front_end/models/issues_manager/descriptions/corsRedirectContainsCredentials.md +5 -0
  373. package/dist/third-party/front_end/models/issues_manager/descriptions/corsWildcardOriginNotAllowed.md +8 -0
  374. package/dist/third-party/front_end/models/issues_manager/descriptions/cspEvalViolation.md +9 -0
  375. package/dist/third-party/front_end/models/issues_manager/descriptions/cspInlineViolation.md +10 -0
  376. package/dist/third-party/front_end/models/issues_manager/descriptions/cspTrustedTypesPolicyViolation.md +5 -0
  377. package/dist/third-party/front_end/models/issues_manager/descriptions/cspTrustedTypesSinkViolation.md +8 -0
  378. package/dist/third-party/front_end/models/issues_manager/descriptions/cspURLViolation.md +10 -0
  379. package/dist/third-party/front_end/models/issues_manager/descriptions/deprecation.md +3 -0
  380. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthRequestAccountsHttpNotFound.md +1 -0
  381. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthRequestAccountsInvalidResponse.md +1 -0
  382. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthRequestAccountsNoResponse.md +1 -0
  383. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthRequestApprovalDeclined.md +1 -0
  384. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthRequestCanceled.md +1 -0
  385. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthRequestClientMetadataHttpNotFound.md +1 -0
  386. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthRequestClientMetadataInvalidResponse.md +1 -0
  387. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthRequestClientMetadataNoResponse.md +1 -0
  388. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthRequestErrorFetchingSignin.md +1 -0
  389. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthRequestErrorIdToken.md +1 -0
  390. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthRequestIdTokenHttpNotFound.md +1 -0
  391. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthRequestIdTokenInvalidRequest.md +1 -0
  392. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthRequestIdTokenInvalidResponse.md +1 -0
  393. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthRequestIdTokenNoResponse.md +1 -0
  394. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthRequestInvalidSigninResponse.md +1 -0
  395. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthRequestManifestHttpNotFound.md +1 -0
  396. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthRequestManifestInvalidResponse.md +1 -0
  397. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthRequestManifestNoResponse.md +1 -0
  398. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthRequestTooManyRequests.md +1 -0
  399. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthUserInfoRequestInvalidAccountsResponse.md +1 -0
  400. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthUserInfoRequestInvalidConfigOrWellKnown.md +1 -0
  401. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthUserInfoRequestNoAccountSharingPermission.md +1 -0
  402. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthUserInfoRequestNoApiPermission.md +1 -0
  403. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthUserInfoRequestNoReturningUserFromFetchedAccounts.md +1 -0
  404. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthUserInfoRequestNotIframe.md +1 -0
  405. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthUserInfoRequestNotPotentiallyTrustworthy.md +1 -0
  406. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthUserInfoRequestNotSameOrigin.md +1 -0
  407. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthUserInfoRequestNotSignedInWithIdp.md +1 -0
  408. package/dist/third-party/front_end/models/issues_manager/descriptions/genericCrossOriginPortalPostMessageError.md +3 -0
  409. package/dist/third-party/front_end/models/issues_manager/descriptions/genericFormAriaLabelledByToNonExistingId.md +8 -0
  410. package/dist/third-party/front_end/models/issues_manager/descriptions/genericFormAutocompleteAttributeEmptyError.md +5 -0
  411. package/dist/third-party/front_end/models/issues_manager/descriptions/genericFormDuplicateIdForInputError.md +5 -0
  412. package/dist/third-party/front_end/models/issues_manager/descriptions/genericFormEmptyIdAndNameAttributesForInputError.md +5 -0
  413. package/dist/third-party/front_end/models/issues_manager/descriptions/genericFormInputAssignedAutocompleteValueToIdOrNameAttributeError.md +5 -0
  414. package/dist/third-party/front_end/models/issues_manager/descriptions/genericFormInputHasWrongButWellIntendedAutocompleteValueError.md +5 -0
  415. package/dist/third-party/front_end/models/issues_manager/descriptions/genericFormInputWithNoLabelError.md +5 -0
  416. package/dist/third-party/front_end/models/issues_manager/descriptions/genericFormLabelForMatchesNonExistingIdError.md +5 -0
  417. package/dist/third-party/front_end/models/issues_manager/descriptions/genericFormLabelForNameError.md +5 -0
  418. package/dist/third-party/front_end/models/issues_manager/descriptions/genericFormLabelHasNeitherForNorNestedInput.md +5 -0
  419. package/dist/third-party/front_end/models/issues_manager/descriptions/heavyAd.md +10 -0
  420. package/dist/third-party/front_end/models/issues_manager/descriptions/mixedContent.md +5 -0
  421. package/dist/third-party/front_end/models/issues_manager/descriptions/sharedArrayBuffer.md +7 -0
  422. package/dist/third-party/front_end/models/issues_manager/descriptions/stylesheetLateImport.md +4 -0
  423. package/dist/third-party/front_end/models/issues_manager/descriptions/stylesheetRequestFailed.md +3 -0
  424. package/dist/third-party/front_end/models/issues_manager/issues_manager.js +1 -0
  425. package/dist/third-party/front_end/models/javascript_metadata/javascript_metadata.js +1 -0
  426. package/dist/third-party/front_end/models/logs/logs-meta.js +1 -0
  427. package/dist/third-party/front_end/models/logs/logs.js +1 -0
  428. package/dist/third-party/front_end/models/persistence/persistence-legacy.js +1 -0
  429. package/dist/third-party/front_end/models/persistence/persistence-meta.js +1 -0
  430. package/dist/third-party/front_end/models/persistence/persistence.js +1 -0
  431. package/dist/third-party/front_end/models/source_map_scopes/source_map_scopes.js +1 -0
  432. package/dist/third-party/front_end/models/text_utils/text_utils-legacy.js +1 -0
  433. package/dist/third-party/front_end/models/text_utils/text_utils.js +1 -0
  434. package/dist/third-party/front_end/models/timeline_model/timeline_model-legacy.js +1 -0
  435. package/dist/third-party/front_end/models/timeline_model/timeline_model.js +1 -0
  436. package/dist/third-party/front_end/models/trace/extras/extras.js +1 -0
  437. package/dist/third-party/front_end/models/trace/handlers/handlers.js +1 -0
  438. package/dist/third-party/front_end/models/trace/helpers/helpers.js +1 -0
  439. package/dist/third-party/front_end/models/trace/trace.js +1 -0
  440. package/dist/third-party/front_end/models/trace/types/types.js +1 -0
  441. package/dist/third-party/front_end/models/workspace/workspace-legacy.js +1 -0
  442. package/dist/third-party/front_end/models/workspace/workspace.js +1 -0
  443. package/dist/third-party/front_end/models/workspace_diff/workspace_diff-legacy.js +1 -0
  444. package/dist/third-party/front_end/models/workspace_diff/workspace_diff.js +1 -0
  445. package/dist/third-party/front_end/ndb_app.html +20 -0
  446. package/dist/third-party/front_end/node_app.html +20 -0
  447. package/dist/third-party/front_end/panels/accessibility/accessibility-legacy.js +1 -0
  448. package/dist/third-party/front_end/panels/accessibility/accessibility-meta.js +1 -0
  449. package/dist/third-party/front_end/panels/accessibility/accessibility.js +1 -0
  450. package/dist/third-party/front_end/panels/animation/animation-legacy.js +1 -0
  451. package/dist/third-party/front_end/panels/animation/animation-meta.js +1 -0
  452. package/dist/third-party/front_end/panels/animation/animation.js +1 -0
  453. package/dist/third-party/front_end/panels/application/application-legacy.js +1 -0
  454. package/dist/third-party/front_end/panels/application/application-meta.js +1 -0
  455. package/dist/third-party/front_end/panels/application/application.js +1 -0
  456. package/dist/third-party/front_end/panels/application/components/components.js +1 -0
  457. package/dist/third-party/front_end/panels/application/preloading/components/components.js +1 -0
  458. package/dist/third-party/front_end/panels/browser_debugger/browser_debugger-legacy.js +1 -0
  459. package/dist/third-party/front_end/panels/browser_debugger/browser_debugger-meta.js +1 -0
  460. package/dist/third-party/front_end/panels/browser_debugger/browser_debugger.js +1 -0
  461. package/dist/third-party/front_end/panels/changes/changes-legacy.js +1 -0
  462. package/dist/third-party/front_end/panels/changes/changes-meta.js +1 -0
  463. package/dist/third-party/front_end/panels/changes/changes.js +1 -0
  464. package/dist/third-party/front_end/panels/console/console-legacy.js +1 -0
  465. package/dist/third-party/front_end/panels/console/console-meta.js +1 -0
  466. package/dist/third-party/front_end/panels/console/console.js +6 -0
  467. package/dist/third-party/front_end/panels/console_counters/console_counters-meta.js +1 -0
  468. package/dist/third-party/front_end/panels/console_counters/console_counters.js +1 -0
  469. package/dist/third-party/front_end/panels/coverage/coverage-legacy.js +1 -0
  470. package/dist/third-party/front_end/panels/coverage/coverage-meta.js +1 -0
  471. package/dist/third-party/front_end/panels/coverage/coverage.js +1 -0
  472. package/dist/third-party/front_end/panels/css_overview/components/components.js +1 -0
  473. package/dist/third-party/front_end/panels/css_overview/css_overview-meta.js +1 -0
  474. package/dist/third-party/front_end/panels/css_overview/css_overview.js +144 -0
  475. package/dist/third-party/front_end/panels/developer_resources/developer_resources-meta.js +1 -0
  476. package/dist/third-party/front_end/panels/developer_resources/developer_resources.js +1 -0
  477. package/dist/third-party/front_end/panels/elements/components/components.js +1 -0
  478. package/dist/third-party/front_end/panels/elements/elements-legacy.js +1 -0
  479. package/dist/third-party/front_end/panels/elements/elements-meta.js +1 -0
  480. package/dist/third-party/front_end/panels/elements/elements.js +1 -0
  481. package/dist/third-party/front_end/panels/emulation/components/components.js +22 -0
  482. package/dist/third-party/front_end/panels/emulation/emulation-legacy.js +1 -0
  483. package/dist/third-party/front_end/panels/emulation/emulation-meta.js +1 -0
  484. package/dist/third-party/front_end/panels/emulation/emulation.js +1 -0
  485. package/dist/third-party/front_end/panels/event_listeners/event_listeners.js +1 -0
  486. package/dist/third-party/front_end/panels/issues/components/components.js +1 -0
  487. package/dist/third-party/front_end/panels/issues/issues-meta.js +1 -0
  488. package/dist/third-party/front_end/panels/issues/issues.js +1 -0
  489. package/dist/third-party/front_end/panels/js_profiler/js_profiler-meta.js +1 -0
  490. package/dist/third-party/front_end/panels/js_profiler/js_profiler.js +1 -0
  491. package/dist/third-party/front_end/panels/layer_viewer/layer_viewer-legacy.js +1 -0
  492. package/dist/third-party/front_end/panels/layer_viewer/layer_viewer-meta.js +1 -0
  493. package/dist/third-party/front_end/panels/layer_viewer/layer_viewer.js +1 -0
  494. package/dist/third-party/front_end/panels/layers/layers-meta.js +1 -0
  495. package/dist/third-party/front_end/panels/layers/layers.js +1 -0
  496. package/dist/third-party/front_end/panels/lighthouse/lighthouse-legacy.js +1 -0
  497. package/dist/third-party/front_end/panels/lighthouse/lighthouse-meta.js +1 -0
  498. package/dist/third-party/front_end/panels/lighthouse/lighthouse.js +66 -0
  499. package/dist/third-party/front_end/panels/media/media-meta.js +1 -0
  500. package/dist/third-party/front_end/panels/media/media.js +25 -0
  501. package/dist/third-party/front_end/panels/mobile_throttling/mobile_throttling-legacy.js +1 -0
  502. package/dist/third-party/front_end/panels/mobile_throttling/mobile_throttling-meta.js +1 -0
  503. package/dist/third-party/front_end/panels/mobile_throttling/mobile_throttling.js +1 -0
  504. package/dist/third-party/front_end/panels/network/components/components.js +1 -0
  505. package/dist/third-party/front_end/panels/network/forward/forward.js +1 -0
  506. package/dist/third-party/front_end/panels/network/network-legacy.js +1 -0
  507. package/dist/third-party/front_end/panels/network/network-meta.js +1 -0
  508. package/dist/third-party/front_end/panels/network/network.js +1 -0
  509. package/dist/third-party/front_end/panels/performance_monitor/performance_monitor-meta.js +1 -0
  510. package/dist/third-party/front_end/panels/performance_monitor/performance_monitor.js +1 -0
  511. package/dist/third-party/front_end/panels/profiler/profiler-legacy.js +1 -0
  512. package/dist/third-party/front_end/panels/profiler/profiler-meta.js +1 -0
  513. package/dist/third-party/front_end/panels/profiler/profiler.js +7 -0
  514. package/dist/third-party/front_end/panels/protocol_monitor/components/components.js +1 -0
  515. package/dist/third-party/front_end/panels/protocol_monitor/protocol_monitor-meta.js +1 -0
  516. package/dist/third-party/front_end/panels/protocol_monitor/protocol_monitor.js +1 -0
  517. package/dist/third-party/front_end/panels/recorder/components/components.js +1 -0
  518. package/dist/third-party/front_end/panels/recorder/controllers/controllers.js +1 -0
  519. package/dist/third-party/front_end/panels/recorder/converters/converters.js +1 -0
  520. package/dist/third-party/front_end/panels/recorder/extensions/extensions.js +1 -0
  521. package/dist/third-party/front_end/panels/recorder/injected/injected.generated.js +1 -0
  522. package/dist/third-party/front_end/panels/recorder/injected/injected.js +1 -0
  523. package/dist/third-party/front_end/panels/recorder/models/models.js +1 -0
  524. package/dist/third-party/front_end/panels/recorder/recorder-actions.js +1 -0
  525. package/dist/third-party/front_end/panels/recorder/recorder-meta.js +1 -0
  526. package/dist/third-party/front_end/panels/recorder/recorder.js +1 -0
  527. package/dist/third-party/front_end/panels/recorder/util/util.js +1 -0
  528. package/dist/third-party/front_end/panels/rn_welcome/rn_welcome-meta.js +1 -0
  529. package/dist/third-party/front_end/panels/rn_welcome/rn_welcome.js +1 -0
  530. package/dist/third-party/front_end/panels/screencast/screencast-meta.js +1 -0
  531. package/dist/third-party/front_end/panels/screencast/screencast.js +1 -0
  532. package/dist/third-party/front_end/panels/search/search-legacy.js +1 -0
  533. package/dist/third-party/front_end/panels/search/search.js +1 -0
  534. package/dist/third-party/front_end/panels/security/security-legacy.js +1 -0
  535. package/dist/third-party/front_end/panels/security/security-meta.js +1 -0
  536. package/dist/third-party/front_end/panels/security/security.js +1 -0
  537. package/dist/third-party/front_end/panels/sensors/sensors-meta.js +1 -0
  538. package/dist/third-party/front_end/panels/sensors/sensors.js +1 -0
  539. package/dist/third-party/front_end/panels/settings/components/components.js +1 -0
  540. package/dist/third-party/front_end/panels/settings/emulation/components/components.js +1 -0
  541. package/dist/third-party/front_end/panels/settings/emulation/emulation-meta.js +1 -0
  542. package/dist/third-party/front_end/panels/settings/emulation/emulation.js +1 -0
  543. package/dist/third-party/front_end/panels/settings/emulation/utils/utils.js +1 -0
  544. package/dist/third-party/front_end/panels/settings/settings-legacy.js +1 -0
  545. package/dist/third-party/front_end/panels/settings/settings-meta.js +1 -0
  546. package/dist/third-party/front_end/panels/settings/settings.js +1 -0
  547. package/dist/third-party/front_end/panels/snippets/snippets-legacy.js +1 -0
  548. package/dist/third-party/front_end/panels/snippets/snippets.js +1 -0
  549. package/dist/third-party/front_end/panels/sources/components/components.js +1 -0
  550. package/dist/third-party/front_end/panels/sources/sources-legacy.js +1 -0
  551. package/dist/third-party/front_end/panels/sources/sources-meta.js +1 -0
  552. package/dist/third-party/front_end/panels/sources/sources.js +1 -0
  553. package/dist/third-party/front_end/panels/timeline/timeline-legacy.js +1 -0
  554. package/dist/third-party/front_end/panels/timeline/timeline-meta.js +1 -0
  555. package/dist/third-party/front_end/panels/timeline/timeline.js +1 -0
  556. package/dist/third-party/front_end/panels/utils/utils.js +1 -0
  557. package/dist/third-party/front_end/panels/web_audio/graph_visualizer/graph_visualizer.js +1 -0
  558. package/dist/third-party/front_end/panels/web_audio/web_audio-legacy.js +1 -0
  559. package/dist/third-party/front_end/panels/web_audio/web_audio-meta.js +1 -0
  560. package/dist/third-party/front_end/panels/web_audio/web_audio.js +1 -0
  561. package/dist/third-party/front_end/panels/webauthn/webauthn-meta.js +1 -0
  562. package/dist/third-party/front_end/panels/webauthn/webauthn.js +1 -0
  563. package/dist/third-party/front_end/rn_inspector.html +20 -0
  564. package/dist/third-party/front_end/services/puppeteer/puppeteer.js +1 -0
  565. package/dist/third-party/front_end/services/tracing/tracing.js +1 -0
  566. package/dist/third-party/front_end/services/window_bounds/window_bounds.js +1 -0
  567. package/dist/third-party/front_end/third_party/acorn/acorn.js +1 -0
  568. package/dist/third-party/front_end/third_party/chromium/client-variations/client-variations.js +1 -0
  569. package/dist/third-party/front_end/third_party/codemirror.next/chunk/angular.js +2 -0
  570. package/dist/third-party/front_end/third_party/codemirror.next/chunk/codemirror.js +2 -0
  571. package/dist/third-party/front_end/third_party/codemirror.next/chunk/cpp.js +2 -0
  572. package/dist/third-party/front_end/third_party/codemirror.next/chunk/java.js +2 -0
  573. package/dist/third-party/front_end/third_party/codemirror.next/chunk/json.js +2 -0
  574. package/dist/third-party/front_end/third_party/codemirror.next/chunk/legacy.js +2 -0
  575. package/dist/third-party/front_end/third_party/codemirror.next/chunk/less.js +2 -0
  576. package/dist/third-party/front_end/third_party/codemirror.next/chunk/markdown.js +2 -0
  577. package/dist/third-party/front_end/third_party/codemirror.next/chunk/php.js +2 -0
  578. package/dist/third-party/front_end/third_party/codemirror.next/chunk/python.js +2 -0
  579. package/dist/third-party/front_end/third_party/codemirror.next/chunk/sass.js +2 -0
  580. package/dist/third-party/front_end/third_party/codemirror.next/chunk/svelte.js +2 -0
  581. package/dist/third-party/front_end/third_party/codemirror.next/chunk/vue.js +2 -0
  582. package/dist/third-party/front_end/third_party/codemirror.next/chunk/wast.js +2 -0
  583. package/dist/third-party/front_end/third_party/codemirror.next/chunk/xml.js +2 -0
  584. package/dist/third-party/front_end/third_party/codemirror.next/codemirror.next.js +2 -0
  585. package/dist/third-party/front_end/third_party/diff/diff-legacy.js +1 -0
  586. package/dist/third-party/front_end/third_party/diff/diff.js +1 -0
  587. package/dist/third-party/front_end/third_party/i18n/i18n.js +1 -0
  588. package/dist/third-party/front_end/third_party/intl-messageformat/intl-messageformat.js +15 -0
  589. package/dist/third-party/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +1297 -0
  590. package/dist/third-party/front_end/third_party/lighthouse/report/report.js +222 -0
  591. package/dist/third-party/front_end/third_party/lit/lit.js +98 -0
  592. package/dist/third-party/front_end/third_party/marked/marked.js +1 -0
  593. package/dist/third-party/front_end/third_party/puppeteer/puppeteer.js +1 -0
  594. package/dist/third-party/front_end/third_party/puppeteer-replay/puppeteer-replay.js +1 -0
  595. package/dist/third-party/front_end/third_party/wasmparser/wasmparser.js +1 -0
  596. package/dist/third-party/front_end/ui/components/adorners/adorners.js +1 -0
  597. package/dist/third-party/front_end/ui/components/buttons/buttons.js +1 -0
  598. package/dist/third-party/front_end/ui/components/chrome_link/chrome_link.js +1 -0
  599. package/dist/third-party/front_end/ui/components/code_highlighter/code_highlighter.js +1 -0
  600. package/dist/third-party/front_end/ui/components/data_grid/data_grid.js +1 -0
  601. package/dist/third-party/front_end/ui/components/dialogs/dialogs.js +1 -0
  602. package/dist/third-party/front_end/ui/components/diff_view/diff_view.js +1 -0
  603. package/dist/third-party/front_end/ui/components/expandable_list/expandable_list.js +1 -0
  604. package/dist/third-party/front_end/ui/components/helpers/helpers.js +1 -0
  605. package/dist/third-party/front_end/ui/components/icon_button/icon_button.js +1 -0
  606. package/dist/third-party/front_end/ui/components/input/input.js +1 -0
  607. package/dist/third-party/front_end/ui/components/issue_counter/issue_counter.js +1 -0
  608. package/dist/third-party/front_end/ui/components/legacy_wrapper/legacy_wrapper.js +1 -0
  609. package/dist/third-party/front_end/ui/components/linear_memory_inspector/linear_memory_inspector-meta.js +1 -0
  610. package/dist/third-party/front_end/ui/components/linear_memory_inspector/linear_memory_inspector.js +1 -0
  611. package/dist/third-party/front_end/ui/components/linkifier/linkifier.js +1 -0
  612. package/dist/third-party/front_end/ui/components/markdown_view/markdown_view.js +1 -0
  613. package/dist/third-party/front_end/ui/components/menus/menus.js +1 -0
  614. package/dist/third-party/front_end/ui/components/node_text/node_text.js +1 -0
  615. package/dist/third-party/front_end/ui/components/panel_feedback/panel_feedback.js +1 -0
  616. package/dist/third-party/front_end/ui/components/panel_introduction_steps/panel_introduction_steps.js +1 -0
  617. package/dist/third-party/front_end/ui/components/render_coordinator/render_coordinator.js +1 -0
  618. package/dist/third-party/front_end/ui/components/report_view/report_view.js +1 -0
  619. package/dist/third-party/front_end/ui/components/request_link_icon/request_link_icon.js +1 -0
  620. package/dist/third-party/front_end/ui/components/settings/settings.js +1 -0
  621. package/dist/third-party/front_end/ui/components/srgb_overlay/srgb_overlay.js +1 -0
  622. package/dist/third-party/front_end/ui/components/survey_link/survey_link.js +1 -0
  623. package/dist/third-party/front_end/ui/components/text_editor/text_editor.js +1 -0
  624. package/dist/third-party/front_end/ui/components/text_prompt/text_prompt.js +1 -0
  625. package/dist/third-party/front_end/ui/components/tree_outline/tree_outline.js +1 -0
  626. package/dist/third-party/front_end/ui/components/two_states_counter/two_states_counter.js +1 -0
  627. package/dist/third-party/front_end/ui/legacy/components/color_picker/color_picker-legacy.js +1 -0
  628. package/dist/third-party/front_end/ui/legacy/components/color_picker/color_picker.js +1 -0
  629. package/dist/third-party/front_end/ui/legacy/components/cookie_table/cookie_table-legacy.js +1 -0
  630. package/dist/third-party/front_end/ui/legacy/components/cookie_table/cookie_table.js +1 -0
  631. package/dist/third-party/front_end/ui/legacy/components/data_grid/data_grid-legacy.js +1 -0
  632. package/dist/third-party/front_end/ui/legacy/components/data_grid/data_grid.js +1 -0
  633. package/dist/third-party/front_end/ui/legacy/components/inline_editor/inline_editor-legacy.js +1 -0
  634. package/dist/third-party/front_end/ui/legacy/components/inline_editor/inline_editor.js +1 -0
  635. package/dist/third-party/front_end/ui/legacy/components/object_ui/object_ui-legacy.js +1 -0
  636. package/dist/third-party/front_end/ui/legacy/components/object_ui/object_ui-meta.js +1 -0
  637. package/dist/third-party/front_end/ui/legacy/components/object_ui/object_ui.js +1 -0
  638. package/dist/third-party/front_end/ui/legacy/components/perf_ui/perf_ui-legacy.js +1 -0
  639. package/dist/third-party/front_end/ui/legacy/components/perf_ui/perf_ui-meta.js +1 -0
  640. package/dist/third-party/front_end/ui/legacy/components/perf_ui/perf_ui.js +12 -0
  641. package/dist/third-party/front_end/ui/legacy/components/quick_open/quick_open-legacy.js +1 -0
  642. package/dist/third-party/front_end/ui/legacy/components/quick_open/quick_open-meta.js +1 -0
  643. package/dist/third-party/front_end/ui/legacy/components/quick_open/quick_open.js +1 -0
  644. package/dist/third-party/front_end/ui/legacy/components/source_frame/source_frame-legacy.js +1 -0
  645. package/dist/third-party/front_end/ui/legacy/components/source_frame/source_frame-meta.js +1 -0
  646. package/dist/third-party/front_end/ui/legacy/components/source_frame/source_frame.js +1 -0
  647. package/dist/third-party/front_end/ui/legacy/components/utils/utils-legacy.js +1 -0
  648. package/dist/third-party/front_end/ui/legacy/components/utils/utils.js +1 -0
  649. package/dist/third-party/front_end/ui/legacy/legacy-legacy.js +1 -0
  650. package/dist/third-party/front_end/ui/legacy/legacy.js +1 -0
  651. package/dist/third-party/front_end/ui/legacy/theme_support/theme_support.js +1 -0
  652. package/dist/third-party/front_end/ui/legacy/utils/utils.js +1 -0
  653. package/dist/third-party/front_end/ui/lit-html/lit-html.js +1 -0
  654. package/dist/third-party/front_end/worker_app.html +20 -0
  655. package/index.js +15 -0
  656. package/package.json +25 -0
@@ -0,0 +1,12 @@
1
+ import*as e from"../../../../core/common/common.js";import*as t from"../../../../core/i18n/i18n.js";import*as i from"../../../../core/platform/platform.js";import*as s from"../../../components/render_coordinator/render_coordinator.js";import*as r from"../../legacy.js";import*as n from"../../../../models/trace/trace.js";import*as o from"../../theme_support/theme_support.js";import*as a from"../../../../core/host/host.js";import*as l from"../../../../core/sdk/sdk.js";import*as h from"../../../../models/bindings/bindings.js";import*as d from"../../../../models/workspace/workspace.js";import*as c from"../source_frame/source_frame.js";import*as m from"../../../components/helpers/helpers.js";import*as u from"../../../lit-html/lit-html.js";var g={cssContent:".chart-viewport-v-scroll{position:absolute;top:0;right:0;bottom:0;overflow-x:hidden;z-index:200;padding-left:1px}.chart-viewport-v-scroll.always-show-scrollbar{overflow-y:scroll}:host-context(.platform-mac) .chart-viewport-v-scroll{right:2px;top:3px;bottom:3px}:host-context(.platform-mac) ::-webkit-scrollbar{width:8px}:host-context(.platform-mac) ::-webkit-scrollbar-thumb{background-color:var(--color-scrollbar-mac);border-radius:50px}:host-context(.platform-mac) .chart-viewport-v-scroll:hover::-webkit-scrollbar-thumb{background-color:var(--color-scrollbar-mac-hover)}:host-context(.overlay-scrollbar-enabled) ::-webkit-scrollbar{width:10px}:host-context(.overlay-scrollbar-enabled) ::-webkit-scrollbar-thumb{background-color:var(--color-scrollbar-other)}:host-context(.overlay-scrollbar-enabled) .chart-viewport-v-scroll:hover::-webkit-scrollbar-thumb{background-color:var(--color-scrollbar-other-hover)}.chart-viewport-selection-overlay{position:absolute;z-index:100;background-color:var(--color-selection-highlight);border-color:var(--color-selection-highlight-border);border-width:0 1px;border-style:solid;pointer-events:none;top:0;bottom:0;text-align:center}.chart-viewport-selection-overlay .time-span{white-space:nowrap;position:absolute;left:0;right:0;bottom:0}"};let p=null;function f(){if(p)return p;const e=getComputedStyle(document.body);return p=e.fontFamily?e.fontFamily:a.Platform.fontFamily(),p}var v=Object.freeze({__proto__:null,getFontFamilyForCanvas:f,DEFAULT_FONT_SIZE:"11px"}),w={cssContent:".resources-dividers{position:absolute;left:0;right:0;top:0;z-index:-100;bottom:0}.resources-event-dividers{position:absolute;left:0;right:0;height:100%;top:0;z-index:300;pointer-events:none}.resources-dividers-label-bar{position:absolute;top:0;left:0;right:0;background-clip:padding-box;height:20px;z-index:200;pointer-events:none;overflow:hidden}.resources-divider{position:absolute;width:1px;top:0;bottom:0;background-color:var(--divider-line)}.resources-event-divider{position:absolute;width:1px;top:0;bottom:0;z-index:300}.resources-divider-label{position:absolute;top:4px;right:3px;font-size:80%;white-space:nowrap;pointer-events:none}.timeline-grid-header{height:20px;pointer-events:none}"};const y=new Map;class b{element;dividersElementInternal;gridHeaderElement;eventDividersElement;dividersLabelBarElementInternal;constructor(){this.element=document.createElement("div"),o.ThemeSupport.instance().appendStyle(this.element,w),this.dividersElementInternal=this.element.createChild("div","resources-dividers"),this.gridHeaderElement=document.createElement("div"),this.gridHeaderElement.classList.add("timeline-grid-header"),this.eventDividersElement=this.gridHeaderElement.createChild("div","resources-event-dividers"),this.dividersLabelBarElementInternal=this.gridHeaderElement.createChild("div","resources-dividers-label-bar"),this.element.appendChild(this.gridHeaderElement)}static calculateGridOffsets(e,t){const i=e.computePosition(e.maximumBoundary());let s=i/64,r=e.boundarySpan()/s;const n=i/e.boundarySpan(),o=Math.ceil(Math.log(r)/Math.LN10);r=Math.pow(10,o),r*n>=320&&(r/=5),r*n>=128&&(r/=2);const a=Math.ceil((e.minimumBoundary()-e.zeroTime())/r)*r+e.zeroTime();let l=e.maximumBoundary();l+=64/n,s=Math.ceil((l-a)/r),r||(s=0);const h=[];for(let i=0;i<s;++i){const s=a+r*i;e.computePosition(s)<(t||0)||h.push({position:Math.floor(e.computePosition(s)),time:s})}return{offsets:h,precision:Math.max(0,-Math.floor(Math.log(1.01*r)/Math.LN10))}}static drawCanvasGrid(e,t){e.save(),e.scale(window.devicePixelRatio,window.devicePixelRatio);const i=Math.floor(e.canvas.height/window.devicePixelRatio);e.strokeStyle=getComputedStyle(document.body).getPropertyValue("--divider-line"),e.lineWidth=1,e.translate(.5,.5),e.beginPath();for(const s of t.offsets)e.moveTo(s.position,0),e.lineTo(s.position,i);e.stroke(),e.restore()}static drawCanvasHeaders(e,t,i,s,r,n){e.save(),e.scale(window.devicePixelRatio,window.devicePixelRatio);const a=Math.ceil(e.canvas.width/window.devicePixelRatio);e.beginPath(),e.fillStyle=o.ThemeSupport.instance().getComputedValue("--color-background-opacity-50"),e.fillRect(0,0,a,r),e.fillStyle=o.ThemeSupport.instance().getComputedValue("--color-text-primary"),e.textBaseline="hanging",e.font=`11px ${f()}`;for(const r of t.offsets){const t=i(r.time),o=e.measureText(t).width,a=r.position-o-4;(!n||n<a)&&e.fillText(t,a,s)}e.restore()}get dividersElement(){return this.dividersElementInternal}get dividersLabelBarElement(){return this.dividersLabelBarElementInternal}removeDividers(){this.dividersElementInternal.removeChildren(),this.dividersLabelBarElementInternal.removeChildren()}updateDividers(e,t){const i=b.calculateGridOffsets(e,t),s=i.offsets,r=i.precision,n=this.dividersElementInternal.clientWidth;let o=this.dividersElementInternal.firstChild,a=this.dividersLabelBarElementInternal.firstChild;for(let t=0;t<s.length;++t){if(!o){o=document.createElement("div"),o.className="resources-divider",this.dividersElementInternal.appendChild(o),a=document.createElement("div"),a.className="resources-divider";const e=document.createElement("div");e.className="resources-divider-label",y.set(a,e),a.appendChild(e),this.dividersLabelBarElementInternal.appendChild(a)}const i=s[t].time,l=s[t].position;if(a){const t=y.get(a);t&&(t.textContent=e.formatValue(i,r))}const h=100*l/n;o.style.left=h+"%",a&&(a.style.left=h+"%"),o=o.nextSibling,a&&(a=a.nextSibling)}for(;o;){const e=o.nextSibling;if(this.dividersElementInternal.removeChild(o),!e)break;o=e}for(;a;){const e=a.nextSibling;if(this.dividersLabelBarElementInternal.removeChild(a),!e)break;a=e}return!0}addEventDivider(e){this.eventDividersElement.appendChild(e)}addEventDividers(e){this.gridHeaderElement.removeChild(this.eventDividersElement);for(const t of e)this.eventDividersElement.appendChild(t);this.gridHeaderElement.appendChild(this.eventDividersElement)}removeEventDividers(){this.eventDividersElement.removeChildren()}hideEventDividers(){this.eventDividersElement.classList.add("hidden")}showEventDividers(){this.eventDividersElement.classList.remove("hidden")}hideDividers(){this.dividersElementInternal.classList.add("hidden")}showDividers(){this.dividersElementInternal.classList.remove("hidden")}setScrollTop(e){this.dividersLabelBarElementInternal.style.top=e+"px",this.eventDividersElement.style.top=e+"px"}}var T=Object.freeze({__proto__:null,TimelineGrid:b}),E={cssContent:'.flame-chart-main-pane{overflow:hidden;--selected-group-background:hsl(215deg 85% 98%);--selected-group-border:hsl(216deg 68% 54%)}:host-context(.-theme-with-dark-background) .flame-chart-main-pane{--selected-group-background:hsl(215deg 85% 15%);--selected-group-border:hsl(216deg 68% 46%)}.flame-chart-marker-highlight-element{position:absolute;top:1px;height:18px;width:6px;margin:0 -3px;content:"";display:block}.flame-chart-canvas:focus-visible{border-top:1px solid var(--legacy-accent-color);border-bottom:1px solid var(--legacy-accent-color)}.flame-chart-highlight-element{position:absolute;pointer-events:none;background-color:var(--color-background-hover-overlay)}.flame-chart-selected-element{position:absolute;pointer-events:none;outline:2px solid var(--color-accent-red);background-color:var(--color-background-hover-overlay)}.chart-cursor-element{position:absolute;top:0;bottom:0;z-index:100;width:2px;background-color:var(--color-selection-highlight-border);pointer-events:none}.flame-chart-entry-info:not(:empty){z-index:2000;position:absolute;background-color:var(--color-background);pointer-events:none;padding:4px 8px;white-space:nowrap;max-width:80%;box-shadow:var(--drop-shadow)}.flame-chart-entry-info table tr td:empty{padding:0}.flame-chart-entry-info table tr td:not(:empty){padding:0 5px;white-space:nowrap}.flame-chart-entry-info table tr td:first-child{font-weight:bold}.flame-chart-entry-info table tr td span{margin-right:5px}'};const S={flameChart:"Flame Chart",sHovered:"{PH1} hovered",sSelected:"{PH1} selected",sExpanded:"{PH1} expanded",sCollapsed:"{PH1} collapsed"},x=t.i18n.registerUIStrings("ui/legacy/components/perf_ui/FlameChart.ts",S),L=t.i18n.getLocalizedString.bind(void 0,x);class C extends(e.ObjectWrapper.eventMixin(r.Widget.VBox)){groupExpansionSetting;groupExpansionState;flameChartDelegate;chartViewport;dataProvider;candyStripeCanvas;viewportElement;canvas;entryInfo;markerHighlighElement;highlightElement;selectedElement;rulerEnabled;barHeight;textBaseline;textPadding;headerLeftPadding;arrowSide;expansionArrowIndent;headerLabelXPadding;headerLabelYPadding;highlightedMarkerIndex;highlightedEntryIndex;selectedEntryIndex;rawTimelineDataLength;markerPositions;lastMouseOffsetX;selectedGroup;keyboardFocusedGroup;offsetWidth;offsetHeight;dragStartX;dragStartY;lastMouseOffsetY;minimumBoundaryInternal;maxDragOffset;timelineLevels;visibleLevelOffsets;visibleLevels;groupOffsets;rawTimelineData;forceDecorationCache;entryColorsCache;visibleLevelHeights;totalTime;#e;constructor(e,t,i){super(!0),this.#e=`11px ${f()}`,this.registerRequiredCSS(E),this.contentElement.classList.add("flame-chart-main-pane"),this.groupExpansionSetting=i,this.groupExpansionState=i&&i.get()||{},this.flameChartDelegate=t,this.chartViewport=new W(this),this.chartViewport.show(this.contentElement),this.dataProvider=e,this.candyStripeCanvas=document.createElement("canvas"),this.createCandyStripePattern(),this.viewportElement=this.chartViewport.viewportElement,this.canvas=this.viewportElement.createChild("canvas","fill"),this.canvas.tabIndex=0,r.ARIAUtils.setLabel(this.canvas,L(S.flameChart)),r.ARIAUtils.markAsTree(this.canvas),this.setDefaultFocusedElement(this.canvas),this.canvas.classList.add("flame-chart-canvas"),this.canvas.addEventListener("mousemove",this.onMouseMove.bind(this),!1),this.canvas.addEventListener("mouseout",this.onMouseOut.bind(this),!1),this.canvas.addEventListener("click",this.onClick.bind(this),!1),this.canvas.addEventListener("keydown",this.onKeyDown.bind(this),!1),this.entryInfo=this.viewportElement.createChild("div","flame-chart-entry-info"),this.markerHighlighElement=this.viewportElement.createChild("div","flame-chart-marker-highlight-element"),this.highlightElement=this.viewportElement.createChild("div","flame-chart-highlight-element"),this.selectedElement=this.viewportElement.createChild("div","flame-chart-selected-element"),this.canvas.addEventListener("focus",(()=>{this.dispatchEventToListeners(R.CanvasFocused)}),!1),r.UIUtils.installDragHandle(this.viewportElement,this.startDragging.bind(this),this.dragging.bind(this),this.endDragging.bind(this),null),this.rulerEnabled=!0,this.barHeight=17,this.textBaseline=5,this.textPadding=5,this.chartViewport.setWindowTimes(e.minimumBoundary(),e.minimumBoundary()+e.totalTime()),this.headerLeftPadding=6,this.arrowSide=8,this.expansionArrowIndent=this.headerLeftPadding+this.arrowSide/2,this.headerLabelXPadding=3,this.headerLabelYPadding=2,this.highlightedMarkerIndex=-1,this.highlightedEntryIndex=-1,this.selectedEntryIndex=-1,this.rawTimelineDataLength=0,this.markerPositions=new Map,this.lastMouseOffsetX=0,this.selectedGroup=-1,this.keyboardFocusedGroup=-1,o.ThemeSupport.instance().addEventListener(o.ThemeChangeEvent.eventName,(()=>{this.scheduleUpdate()}))}willHide(){this.hideHighlight()}setBarHeight(e){this.barHeight=e}setTextBaseline(e){this.textBaseline=e}setTextPadding(e){this.textPadding=e}enableRuler(e){this.rulerEnabled=e}alwaysShowVerticalScroll(){this.chartViewport.alwaysShowVerticalScroll()}disableRangeSelection(){this.chartViewport.disableRangeSelection()}highlightEntry(e){this.highlightedEntryIndex!==e&&this.dataProvider.entryColor(e)&&(this.highlightedEntryIndex=e,this.updateElementPosition(this.highlightElement,this.highlightedEntryIndex),this.dispatchEventToListeners(R.EntryHighlighted,e))}hideHighlight(){this.entryInfo.removeChildren(),this.highlightedEntryIndex=-1,this.updateElementPosition(this.highlightElement,this.highlightedEntryIndex),this.dispatchEventToListeners(R.EntryHighlighted,-1)}createCandyStripePattern(){const e=17;this.candyStripeCanvas.width=e,this.candyStripeCanvas.height=e;const t=this.candyStripeCanvas.getContext("2d");if(t){t.translate(8.5,8.5),t.rotate(.25*Math.PI),t.translate(-8.5,-8.5),t.fillStyle="rgba(255, 0, 0, 0.8)";for(let e=-17;e<34;e+=3)t.fillRect(e,-17,1,51)}}resetCanvas(){const e=window.devicePixelRatio,t=Math.round(this.offsetWidth*e),i=Math.round(this.offsetHeight*e);this.canvas.width=t,this.canvas.height=i,this.canvas.style.width=t/e+"px",this.canvas.style.height=i/e+"px"}windowChanged(e,t,i){this.flameChartDelegate.windowChanged(e,t,i)}updateRangeSelection(e,t){this.flameChartDelegate.updateRangeSelection(e,t)}setSize(e,t){this.offsetWidth=e,this.offsetHeight=t}startDragging(e){return this.hideHighlight(),this.maxDragOffset=0,this.dragStartX=e.pageX,this.dragStartY=e.pageY,!0}dragging(e){const t=e.pageX-this.dragStartX,i=e.pageY-this.dragStartY;this.maxDragOffset=Math.max(this.maxDragOffset,Math.sqrt(t*t+i*i))}endDragging(e){this.updateHighlight()}timelineData(){if(!this.dataProvider)return null;const e=this.dataProvider.timelineData();return(e!==this.rawTimelineData||e&&e.entryStartTimes.length!==this.rawTimelineDataLength)&&this.processTimelineData(e),this.rawTimelineData||null}revealEntry(e){const t=this.timelineData();if(!t)return;const i=this.chartViewport.windowLeftTime(),s=this.chartViewport.windowRightTime(),r=t.entryStartTimes[e],n=t.entryTotalTimes[e],o=r+n;let a=Math.min(n,s-i);const l=t.entryLevels[e];this.chartViewport.setScrollOffset(this.levelToOffset(l),this.levelHeight(l));const h=(s-i)/this.offsetWidth;if(a=Math.max(a,30*h),i>o){const e=i-o+a;this.windowChanged(i-e,s-e,!0)}else if(s<r){const e=r-s+a;this.windowChanged(i+e,s+e,!0)}}setWindowTimes(e,t,i){this.chartViewport.setWindowTimes(e,t,i),this.updateHighlight()}onMouseMove(e){const t=e;if(this.lastMouseOffsetX=t.offsetX,this.lastMouseOffsetY=t.offsetY,this.enabled()&&!this.chartViewport.isDragging())return this.coordinatesToGroupIndex(t.offsetX,t.offsetY,!0)>=0?(this.hideHighlight(),void(this.viewportElement.style.cursor="pointer")):void this.updateHighlight()}updateHighlight(){const e=this.coordinatesToEntryIndex(this.lastMouseOffsetX,this.lastMouseOffsetY);if(-1!==e)this.chartViewport.isDragging()||(this.updatePopover(e),this.viewportElement.style.cursor=this.dataProvider.canJumpToEntry(e)?"pointer":"default",this.highlightEntry(e));else{this.hideHighlight();const e=this.coordinatesToGroupIndex(this.lastMouseOffsetX,this.lastMouseOffsetY,!1);e>=0&&this.rawTimelineData&&this.rawTimelineData.groups&&this.rawTimelineData.groups[e].selectable?this.viewportElement.style.cursor="pointer":this.viewportElement.style.cursor="default"}}onMouseOut(){this.lastMouseOffsetX=-1,this.lastMouseOffsetY=-1,this.hideHighlight()}updatePopover(e){if(e===this.highlightedEntryIndex)return void this.updatePopoverOffset();this.entryInfo.removeChildren();const t=this.dataProvider.prepareHighlightedEntryInfo(e);t&&(this.entryInfo.appendChild(t),this.updatePopoverOffset())}updatePopoverOffset(){const e=this.lastMouseOffsetX,t=this.lastMouseOffsetY,s=this.entryInfo.parentElement?this.entryInfo.parentElement.clientWidth:0,r=this.entryInfo.parentElement?this.entryInfo.parentElement.clientHeight:0,n=this.entryInfo.clientWidth,o=this.entryInfo.clientHeight;let a,l;for(let h=0;h<4;++h){const d=2&h?-10-n:10,c=1&h?-6-o:6;if(a=i.NumberUtilities.clamp(e+d,0,s-n),l=i.NumberUtilities.clamp(t+c,0,r-o),a>=e||e>=a+n||l>=t||t>=l+o)break}this.entryInfo.style.left=a+"px",this.entryInfo.style.top=l+"px"}onClick(e){const t=e;this.focus();if(this.maxDragOffset>5)return;this.selectGroup(this.coordinatesToGroupIndex(t.offsetX,t.offsetY,!1)),this.toggleGroupExpand(this.coordinatesToGroupIndex(t.offsetX,t.offsetY,!0));const i=this.timelineData();if(t.shiftKey&&-1!==this.highlightedEntryIndex&&i){const e=i.entryStartTimes[this.highlightedEntryIndex],t=e+i.entryTotalTimes[this.highlightedEntryIndex];this.chartViewport.setRangeSelection(e,t)}else this.chartViewport.onClick(t),this.dispatchEventToListeners(R.EntryInvoked,this.highlightedEntryIndex)}selectGroup(e){if(e<0||this.selectedGroup===e)return;if(!this.rawTimelineData)return;const t=this.rawTimelineData.groups;if(!t)return;this.keyboardFocusedGroup=e,this.scrollGroupIntoView(e);const i=t[e].name;t[e].selectable?(this.selectedGroup=e,this.flameChartDelegate.updateSelectedGroup(this,t[e]),this.resetCanvas(),this.draw(),r.ARIAUtils.alert(L(S.sSelected,{PH1:i}))):(this.deselectAllGroups(),r.ARIAUtils.alert(L(S.sHovered,{PH1:i})))}deselectAllGroups(){this.selectedGroup=-1,this.flameChartDelegate.updateSelectedGroup(this,null),this.resetCanvas(),this.draw()}deselectAllEntries(){this.selectedEntryIndex=-1,this.resetCanvas(),this.draw()}isGroupFocused(e){return e===this.selectedGroup||e===this.keyboardFocusedGroup}scrollGroupIntoView(e){if(e<0)return;if(!this.rawTimelineData)return;const t=this.rawTimelineData.groups,i=this.groupOffsets;if(!i||!t)return;const s=i[e];let r=i[e+1];e===t.length-1&&(r+=t[e].style.padding);const n=0===e?0:s,o=Math.min(r-n,this.chartViewport.chartHeight());this.chartViewport.setScrollOffset(n,o)}toggleGroupExpand(e){e<0||!this.isGroupCollapsible(e)||this.rawTimelineData&&this.rawTimelineData.groups&&this.expandGroup(e,!this.rawTimelineData.groups[e].expanded)}expandGroup(e,t=!0,i=!1){if(e<0||!this.isGroupCollapsible(e))return;if(!this.rawTimelineData)return;const s=this.rawTimelineData.groups;if(!s)return;const n=s[e];if(n.expanded=t,this.groupExpansionState[n.name]=n.expanded,this.groupExpansionSetting&&this.groupExpansionSetting.set(this.groupExpansionState),this.updateLevelPositions(),this.updateHighlight(),!n.expanded){const t=this.timelineData();if(t){const i=t.entryLevels[this.selectedEntryIndex];this.selectedEntryIndex>=0&&i>=n.startLevel&&(e>=s.length-1||s[e+1].startLevel>i)&&(this.selectedEntryIndex=-1)}}if(this.updateHeight(),this.resetCanvas(),this.draw(),this.scrollGroupIntoView(e),!i){const t=s[e].name,i=n.expanded?L(S.sExpanded,{PH1:t}):L(S.sCollapsed,{PH1:t});r.ARIAUtils.alert(i)}}onKeyDown(e){if(!r.KeyboardShortcut.KeyboardShortcut.hasNoModifiers(e)||!this.timelineData())return;!this.handleSelectionNavigation(e)&&this.rawTimelineData&&this.rawTimelineData.groups&&this.handleKeyboardGroupNavigation(e)}bindCanvasEvent(e,t){this.canvas.addEventListener(e,t)}handleKeyboardGroupNavigation(e){const t=e;let i=!1,s=!1;"ArrowUp"===t.code?i=this.selectPreviousGroup():"ArrowDown"===t.code?i=this.selectNextGroup():"ArrowLeft"===t.code?this.keyboardFocusedGroup>=0&&(this.expandGroup(this.keyboardFocusedGroup,!1),i=!0):"ArrowRight"===t.code?this.keyboardFocusedGroup>=0&&(this.expandGroup(this.keyboardFocusedGroup,!0),this.selectFirstChild(),i=!0):"Enter"===t.key&&(s=this.selectFirstEntryInCurrentGroup(),i=s),i&&!s&&this.deselectAllEntries(),i&&t.consume(!0)}selectFirstEntryInCurrentGroup(){if(!this.rawTimelineData)return!1;const e=this.rawTimelineData.groups;if(this.keyboardFocusedGroup<0||!e)return!1;const t=e[this.keyboardFocusedGroup].startLevel;if(t<0)return!1;if(this.keyboardFocusedGroup<e.length-1&&e[this.keyboardFocusedGroup+1].startLevel===t)return!1;if(!this.timelineLevels)return!1;const i=this.timelineLevels[t][0];return this.expandGroup(this.keyboardFocusedGroup,!0),this.setSelectedEntry(i),!0}selectPreviousGroup(){if(this.keyboardFocusedGroup<=0)return!1;const e=this.getGroupIndexToSelect(-1);return this.selectGroup(e),!0}selectNextGroup(){if(!this.rawTimelineData||!this.rawTimelineData.groups)return!1;if(this.keyboardFocusedGroup>=this.rawTimelineData.groups.length-1)return!1;const e=this.getGroupIndexToSelect(1);return this.selectGroup(e),!0}getGroupIndexToSelect(e){if(!this.rawTimelineData||!this.rawTimelineData.groups)throw new Error("No raw timeline data");const t=this.rawTimelineData.groups;let i,s,r=this.keyboardFocusedGroup;do{r+=e,i=this.rawTimelineData.groups[r].name,s=-1!==this.keyboardFocusedGroup&&t[r].style.nestingLevel>t[this.keyboardFocusedGroup].style.nestingLevel}while(r>0&&r<t.length-1&&(!i||s));return r}selectFirstChild(){if(!this.rawTimelineData||!this.rawTimelineData.groups)return;const e=this.rawTimelineData.groups;if(this.keyboardFocusedGroup<0||this.keyboardFocusedGroup>=e.length-1)return;const t=this.keyboardFocusedGroup+1;e[t].style.nestingLevel>e[this.keyboardFocusedGroup].style.nestingLevel&&this.selectGroup(t)}handleSelectionNavigation(e){if(-1===this.selectedEntryIndex)return!1;const t=this.timelineData();if(!t)return!1;function s(e,i){if(!t)throw new Error("No timeline data");const s=t.entryStartTimes[e],r=t.entryStartTimes[i],n=s+t.entryTotalTimes[e];return s<r+t.entryTotalTimes[i]&&r<n}const n=e,o=r.KeyboardShortcut.Keys;if(n.keyCode===o.Left.code||n.keyCode===o.Right.code){const s=t.entryLevels[this.selectedEntryIndex],r=this.timelineLevels?this.timelineLevels[s]:[];let a=i.ArrayUtilities.lowerBound(r,this.selectedEntryIndex,((e,t)=>e-t));return a+=n.keyCode===o.Left.code?-1:1,e.consume(!0),a>=0&&a<r.length&&this.dispatchEventToListeners(R.EntrySelected,r[a]),!0}if(n.keyCode===o.Up.code||n.keyCode===o.Down.code){let e=t.entryLevels[this.selectedEntryIndex];if(e+=n.keyCode===o.Up.code?-1:1,e<0||this.timelineLevels&&e>=this.timelineLevels.length)return this.deselectAllEntries(),n.consume(!0),!0;const r=t.entryStartTimes[this.selectedEntryIndex]+t.entryTotalTimes[this.selectedEntryIndex]/2,a=this.timelineLevels?this.timelineLevels[e]:[];let l=i.ArrayUtilities.upperBound(a,r,(function(e,i){if(!t)throw new Error("No timeline data");return e-t.entryStartTimes[i]}))-1;return!s(this.selectedEntryIndex,a[l])&&(++l,l>=a.length||!s(this.selectedEntryIndex,a[l]))?"ArrowDown"!==n.code&&(this.deselectAllEntries(),n.consume(!0),!0):(n.consume(!0),this.dispatchEventToListeners(R.EntrySelected,a[l]),!0)}return"Enter"===e.key&&(e.consume(!0),this.dispatchEventToListeners(R.EntryInvoked,this.selectedEntryIndex),!0)}coordinatesToEntryIndex(e,t){if(e<0||t<0)return-1;const s=this.timelineData();if(!s)return-1;if(t+=this.chartViewport.scrollOffset(),!this.visibleLevelOffsets)throw new Error("No visible level offsets");const r=i.ArrayUtilities.upperBound(this.visibleLevelOffsets,t,i.ArrayUtilities.DEFAULT_COMPARATOR)-1;if(r<0||this.visibleLevels&&!this.visibleLevels[r])return-1;if(t-this.visibleLevelOffsets[r]>this.levelHeight(r))return-1;for(const[t,i]of this.markerPositions)if(s.entryLevels[t]===r&&i.x<=e&&e<i.x+i.width)return t;const n=s.entryStartTimes,o=this.timelineLevels?this.timelineLevels[r]:[];if(!o||!o.length)return-1;const a=this.chartViewport.pixelToTime(e),l=Math.max(i.ArrayUtilities.upperBound(o,a,((e,t)=>e-n[t]))-1,0);function h(t){if(void 0===t)return!1;if(!s)return!1;const i=n[t],r=s.entryTotalTimes[t],o=this.chartViewport.timeToPosition(i),a=this.chartViewport.timeToPosition(i+r);return o-3<e&&e<a+3}let d=o[l];return h.call(this,d)?d:(d=o[l+1],h.call(this,d)?d:-1)}coordinatesToGroupIndex(e,t,s){if(!this.rawTimelineData||!this.rawTimelineData.groups||!this.groupOffsets)return-1;if(e<0||t<0)return-1;t+=this.chartViewport.scrollOffset();const r=this.rawTimelineData.groups||[],n=i.ArrayUtilities.upperBound(this.groupOffsets,t,i.ArrayUtilities.DEFAULT_COMPARATOR)-1;if(n<0||n>=r.length)return-1;const o=s?r[n].style.height:this.groupOffsets[n+1]-this.groupOffsets[n];if(t-this.groupOffsets[n]>=o)return-1;if(!s)return n;const a=this.canvas.getContext("2d");a.save(),a.font=this.#e;const l=this.headerLeftPadding+this.labelWidthForGroup(a,r[n]);return a.restore(),e>l?-1:n}markerIndexBeforeTime(e){const t=this.timelineData();if(!t)throw new Error("No timeline data");if(!t.markers)throw new Error("No timeline markers");return i.ArrayUtilities.lowerBound(t.markers,e,((e,t)=>e-t.startTime()))}draw(){const e=this.timelineData();if(!e)return;const t=this.offsetWidth,i=this.offsetHeight,s=this.canvas.getContext("2d");s.save();const r=window.devicePixelRatio,n=this.chartViewport.scrollOffset();s.scale(r,r),s.fillStyle="rgba(0, 0, 0, 0)",s.fillRect(0,0,t,i),s.translate(0,-n),s.font=this.#e;const{markerIndices:a,colorBuckets:l,titleIndices:h}=this.getDrawableData(s,e);s.save(),this.forEachGroupInViewport(((e,i,r,n,a)=>{this.isGroupFocused(i)&&(s.fillStyle=o.ThemeSupport.instance().getComputedValue("--selected-group-background",this.contentElement),s.fillRect(0,e,t,a-r.style.padding))})),s.restore();for(const[t,{indexes:i}]of l)this.#t(s,e,t,i),this.#i(s,e,i);this.drawMarkers(s,e,a),this.drawEventTitles(s,e,h,t),s.restore(),this.drawGroupHeaders(t,i),this.drawFlowEvents(s,t,i),this.drawMarkerLines();const d=b.calculateGridOffsets(this),c=Array.from(this.dataProvider.navStartTimes().values());let m=0;const u=e=>{if(0===c.length)return this.formatValue(e,d.precision);c.length>m+1&&e>c[m+1].startTime&&m++;const t=c[m];return t&&(e-=t.startTime-this.zeroTime()),this.formatValue(e,d.precision)};b.drawCanvasGrid(s,d),this.rulerEnabled&&b.drawCanvasHeaders(s,d,u,3,P),this.updateElementPosition(this.highlightElement,this.highlightedEntryIndex),this.updateElementPosition(this.selectedElement,this.selectedEntryIndex),this.updateMarkerHighlight()}#t(e,t,i,s){e.save(),e.beginPath();for(let i=0;i<s.length;++i){const r=s[i];this.#s(e,t,r)}e.fillStyle=i,e.fill(),e.restore()}#i(e,t,i){const{entryTotalTimes:s,entryStartTimes:r,entryLevels:o}=t;e.save();for(let a=0;a<i.length;++a){const l=i[a],h=t.entryDecorations.at(l);if(!h||h.length<1)continue;h.length>1&&D(h);const d=r[l],c=e.createPattern(this.candyStripeCanvas,"repeat");for(const i of h){const r=s[l];if("CANDY"===i.type){const s=n.Helpers.Timing.microSecondsToMilliseconds(i.startAtTime);if(r<s)continue;e.save(),e.beginPath();const o=this.timeToPositionClipped(d+s),a=this.timeToPositionClipped(d+r);this.#s(e,t,l,{startX:o,width:a-o}),c&&(e.fillStyle=c,e.fill()),e.restore()}else if("WARNING_TRIANGLE"===i.type){const i=this.timeToPositionClipped(d),s=o[l],r=this.#r(t,l),n=this.levelToOffset(s),a=this.#n(t,l),h=8;e.save(),e.beginPath(),e.rect(i,n,a,r),e.clip(),e.beginPath(),e.fillStyle="red",e.moveTo(i+a-h,n),e.lineTo(i+a,n),e.lineTo(i+a,n+h),e.fill(),e.restore()}}}e.restore()}#s(e,t,i,s){const{entryTotalTimes:r,entryStartTimes:n,entryLevels:o}=t,a=r[i];if(isNaN(a))return;const l=n[i],h=s?.startX||this.timeToPositionClipped(l),d=o[i],c=this.#r(t,i),m=this.levelToOffset(d),u=s?.width||this.#n(t,i);e.rect(h,m,u-.5,c-1)}#r(e,t){const{entryLevels:i}=e,s=i[t];return this.levelHeight(s)}#n(e,t){const{entryTotalTimes:i,entryStartTimes:s}=e,r=i[t],n=s[t],o=this.timeToPositionClipped(n),a=this.timeToPositionClipped(n+r);return Math.max(a-o,1)}getDrawableData(e,t){const s=[],n=[],{entryTotalTimes:o,entryStartTimes:a}=t,l=this.offsetHeight,h=this.chartViewport.scrollOffset(),d=this.visibleLevelOffsets?this.visibleLevelOffsets:new Uint32Array,c=2*this.textPadding+r.UIUtils.measureTextWidth(e,"…"),m=this.chartViewport.pixelToTimeOffset(c),u=Math.max(i.ArrayUtilities.upperBound(d,h,i.ArrayUtilities.DEFAULT_COMPARATOR)-1,0),g=new Map;for(let e=u;e<this.dataProvider.maxStackDepth()&&!(this.levelToOffset(e)>h+l);++e){if(!this.visibleLevels||!this.visibleLevels[e])continue;if(!this.timelineLevels)continue;const t=this.timelineLevels[e];let r=1/0;for(let e=i.ArrayUtilities.lowerBound(t,this.chartViewport.windowRightTime(),((e,t)=>e-a[t]))-1;e>=0;--e){const i=t[e],l=o[i];if(isNaN(l)){n.push(i);continue}(l>=m||this.forceDecorationCache&&this.forceDecorationCache[i])&&s.push(i);const h=a[i];if(h+l<=this.chartViewport.windowLeftTime())break;const d=this.timeToPositionClipped(h);if(!(d>=r)&&(r=d,this.entryColorsCache)){const e=this.entryColorsCache[i];let t=g.get(e);t||(t={indexes:[]},g.set(e,t)),t.indexes.push(i)}}}return{colorBuckets:g,titleIndices:s,markerIndices:n}}drawGroupHeaders(t,i){const s=this.canvas.getContext("2d"),r=this.chartViewport.scrollOffset(),n=window.devicePixelRatio;if(!this.rawTimelineData)return;const a=this.rawTimelineData.groups||[];if(!a.length)return;const l=this.groupOffsets;if(null==l)return;const h=l[l.length-1];function d(e){s.moveTo(0,e),s.lineTo(t,e)}function c(e,t,i){const r=this.arrowSide*Math.sqrt(3)/2,n=Math.round(r/2);s.save(),s.translate(e,t),s.rotate(i?Math.PI/2:0),s.moveTo(-n,-this.arrowSide/2),s.lineTo(-n,this.arrowSide/2),s.lineTo(r-n,0),s.restore()}s.save(),s.scale(n,n),s.translate(0,-r),s.font=this.#e,s.fillStyle=o.ThemeSupport.instance().getComputedValue("--color-background"),this.forEachGroupInViewport(((e,i,r)=>{const n=r.style.padding;n<5||s.fillRect(0,e-n+2,t,n-4)})),a.length&&h<r+i&&s.fillRect(0,h+2,t,r+i-h),s.strokeStyle=o.ThemeSupport.instance().getComputedValue("--color-background-elevation-1"),s.beginPath(),this.forEachGroupInViewport(((e,t,i,s)=>{s||i.style.padding<4||d(e-2.5)})),d(h+1.5),s.stroke(),this.forEachGroupInViewport(((e,i,r)=>{if(r.style.useFirstLineForOverview)return;if(!this.isGroupCollapsible(i)||r.expanded)return void(!r.style.shareHeaderLine&&this.isGroupFocused(i)&&(s.fillStyle=r.style.backgroundColor,s.fillRect(0,e,t,r.style.height)));let n=i+1;for(;n<a.length&&a[n].style.nestingLevel>r.style.nestingLevel;)n++;const o=n<a.length?a[n].startLevel:this.dataProvider.maxStackDepth();this.drawCollapsedOverviewForGroup(r,e,o)})),s.save(),this.forEachGroupInViewport(((t,i,r)=>{if(s.font=this.#e,this.isGroupCollapsible(i)&&!r.expanded||r.style.shareHeaderLine){const n=this.labelWidthForGroup(s,r)+2;if(this.isGroupFocused(i))s.fillStyle=o.ThemeSupport.instance().getComputedValue("--selected-group-background",this.contentElement);else{const t=e.Color.parse(r.style.backgroundColor);t&&(s.fillStyle=t.setAlpha(.8).asString())}s.fillRect(this.headerLeftPadding-this.headerLabelXPadding,t+this.headerLabelYPadding,n,r.style.height-2*this.headerLabelYPadding)}s.fillStyle=r.style.color,s.fillText(r.name,Math.floor(this.expansionArrowIndent*(r.style.nestingLevel+1)+this.arrowSide),t+r.style.height-this.textBaseline)})),s.restore(),s.fillStyle=o.ThemeSupport.instance().getComputedValue("--color-text-secondary"),s.beginPath(),this.forEachGroupInViewport(((e,t,i)=>{this.isGroupCollapsible(t)&&c.call(this,this.expansionArrowIndent*(i.style.nestingLevel+1),e+i.style.height-this.textBaseline-this.arrowSide/2,Boolean(i.expanded))})),s.fill(),s.strokeStyle=o.ThemeSupport.instance().getComputedValue("--color-details-hairline-light"),s.beginPath(),s.stroke(),this.forEachGroupInViewport(((e,t,i,r,n)=>{if(this.isGroupFocused(t)){const t=2,r=10;s.fillStyle=o.ThemeSupport.instance().getComputedValue("--selected-group-border",this.contentElement),s.fillRect(0,e-t,t,n-i.style.padding+2*t),s.fillRect(0,e-t,r,t),s.fillRect(0,e+n-i.style.padding,r,t)}})),s.restore()}drawMarkers(e,t,i){const{entryStartTimes:s,entryLevels:n}=t;this.markerPositions.clear(),e.textBaseline="alphabetic",e.save(),e.beginPath();let o=-1,a=-1/0;for(let t=i.length-1;t>=0;--t){const l=i[t],h=this.dataProvider.entryTitle(l);if(!h)continue;const d=s[l],c=n[l];o!==c&&(a=-1/0);const m=Math.max(this.chartViewport.timeToPosition(d),a),u=this.levelToOffset(c),g=this.levelHeight(c),p=4,f=Math.ceil(r.UIUtils.measureTextWidth(e,h))+2*p;a=m+f+1,o=c,this.markerPositions.set(l,{x:m,width:f}),e.fillStyle=this.dataProvider.entryColor(l),e.fillRect(m,u,f,g-1),e.fillStyle="white",e.fillText(h,m+p,u+g-this.textBaseline)}e.strokeStyle="rgba(0, 0, 0, 0.2)",e.stroke(),e.restore()}drawEventTitles(e,t,i,s){const n=this.chartViewport.timeToPixel(),o=this.textPadding;e.save(),e.beginPath();const{entryStartTimes:a,entryLevels:l}=t;for(let h=0;h<i.length;++h){const d=i[h],c=a[d],m=this.timeToPositionClipped(c),u=Math.min(this.#n(t,d),s),g=l[d],p=this.levelToOffset(g);let f=this.dataProvider.entryTitle(d);f&&f.length&&(e.font=this.#e,f=r.UIUtils.trimTextMiddle(e,f,u-2*o));const v=this.chartViewport.timeToPosition(c),w=this.#r(t,d);this.dataProvider.decorateEntry(d,e,f,m,p,u,w,v,n)||f&&f.length&&(e.fillStyle=this.dataProvider.textColor(d),e.fillText(f,m+o,p+w-this.textBaseline))}e.restore()}forEachGroup(e){if(!this.rawTimelineData)return;const t=this.rawTimelineData.groups||[];if(!t.length)return;const i=this.groupOffsets;if(!i)return;const s=[{nestingLevel:-1,visible:!0}];for(let r=0;r<t.length;++r){const n=i[r],o=t[r];let a=!0,l=s[s.length-1];for(;l&&l.nestingLevel>=o.style.nestingLevel;)s.pop(),a=!1,l=s[s.length-1];l=s[s.length-1];const h=!!l&&l.visible,d=h&&(!this.isGroupCollapsible(r)||o.expanded);s.push({nestingLevel:o.style.nestingLevel,visible:Boolean(d)});const c=r===t.length-1?i[r+1]+o.style.padding:i[r+1];h&&e(n,r,o,a,c-n)}}forEachGroupInViewport(e){const t=this.chartViewport.scrollOffset();this.forEachGroup(((i,s,r,n,o)=>{i-r.style.padding>t+this.offsetHeight||i+o<t||e(i,s,r,n,o)}))}labelWidthForGroup(e,t){return r.UIUtils.measureTextWidth(e,t.name)+this.expansionArrowIndent*(t.style.nestingLevel+1)+2*this.headerLabelXPadding}drawCollapsedOverviewForGroup(t,s,r){const n=new e.SegmentedRange.SegmentedRange((function(e,t){return e.data===t.data&&e.end+.4>t.end?e:null})),o=this.chartViewport.windowLeftTime(),a=this.chartViewport.windowRightTime(),l=this.canvas.getContext("2d"),h=t.style.height;if(!this.rawTimelineData)return;const d=this.rawTimelineData.entryStartTimes,c=this.rawTimelineData.entryTotalTimes,m=this.chartViewport.timeToPixel();for(let u=t.startLevel;u<r;++u){const r=this.timelineLevels?this.timelineLevels[u]:[];let g=1/0;for(let u=i.ArrayUtilities.lowerBound(r,a,((e,t)=>e-d[t]))-1;u>=0;--u){const i=r[u],a=d[i],p=this.timeToPositionClipped(a),f=a+c[i];if(isNaN(f)||p>=g)continue;if(f<=o)break;g=p;const v=this.entryColorsCache?this.entryColorsCache[i]:"",w=this.timeToPositionClipped(f);if(t.style.useDecoratorsForOverview&&this.dataProvider.forceDecoration(i)){const e=this.chartViewport.timeToPosition(a),t=this.#n(this.rawTimelineData,i);l.beginPath(),l.fillStyle=v,l.fillRect(p,s,t,h-1),this.dataProvider.decorateEntry(i,l,"",p,s,t,h,e,m)}else n.append(new e.SegmentedRange.Segment(p,w,v))}}const u=n.segments().slice().sort(((e,t)=>e.data.localeCompare(t.data)));let g;l.beginPath();for(let e=0;e<u.length;++e){const t=u[e];g!==u[e].data&&(l.fill(),l.beginPath(),g=u[e].data,l.fillStyle=g),l.rect(t.begin,s,t.end-t.begin,h)}l.fill()}drawFlowEvents(e,t,s){e.save();const r=window.devicePixelRatio,n=this.chartViewport.scrollOffset();e.scale(r,r),e.translate(0,-n),e.fillStyle="#7f5050",e.strokeStyle="#7f5050";const o=this.timelineData();if(!o)return;const a=i.ArrayUtilities.lowerBound(o.flowStartTimes,this.chartViewport.windowRightTime(),i.ArrayUtilities.DEFAULT_COMPARATOR);e.lineWidth=.5;for(let t=0;t<a;++t){if(!o.flowEndTimes[t]||o.flowEndTimes[t]<this.chartViewport.windowLeftTime())continue;const i=this.chartViewport.timeToPosition(o.flowStartTimes[t]),s=this.chartViewport.timeToPosition(o.flowEndTimes[t]),r=o.flowStartLevels[t],n=o.flowEndLevels[t],a=this.levelToOffset(r)+this.levelHeight(r)/2,l=this.levelToOffset(n)+this.levelHeight(n)/2,h=Math.min((s-i)/4,40),d=(l-a)/10,c=30,m=o.flowEndTimes[t]-o.flowStartTimes[t]<1?a:c+Math.max(0,a+d*(t%c)),u=[];u.push({x:i,y:a}),u.push({x:i+6,y:a}),u.push({x:i+h+12,y:a}),u.push({x:i+h,y:m}),u.push({x:i+2*h,y:m}),u.push({x:s-2*h,y:m}),u.push({x:s-h,y:m}),u.push({x:s-h-12,y:l}),u.push({x:s-6,y:l}),e.beginPath(),e.moveTo(u[0].x,u[0].y),e.lineTo(u[1].x,u[1].y),e.bezierCurveTo(u[2].x,u[2].y,u[3].x,u[3].y,u[4].x,u[4].y),e.lineTo(u[5].x,u[5].y),e.bezierCurveTo(u[6].x,u[6].y,u[7].x,u[7].y,u[8].x,u[8].y),e.stroke(),e.beginPath(),e.arc(i,a,2,-Math.PI/2,Math.PI/2,!1),e.fill(),e.beginPath(),e.moveTo(s,l),e.lineTo(s-6,l-3),e.lineTo(s-6,l+3),e.fill()}e.restore()}drawMarkerLines(){const e=this.timelineData();if(!e)return;const t=e.markers,i=this.markerIndexBeforeTime(this.minimumBoundary()),s=this.maximumBoundary(),r=this.chartViewport.timeToPixel(),n=this.canvas.getContext("2d");n.save();const o=window.devicePixelRatio;n.scale(o,o),n.translate(0,3);const a=P-1;for(let e=i;e<t.length;e++){const i=t[e].startTime();if(i>s)break;t[e].draw(n,this.chartViewport.timeToPosition(i),a,r)}n.restore()}updateMarkerHighlight(){const e=this.markerHighlighElement;e.parentElement&&e.remove();const t=this.highlightedMarkerIndex;if(-1===t)return;const i=this.timelineData();if(!i)return;const s=i.markers[t],n=this.timeToPositionClipped(s.startTime());r.Tooltip.Tooltip.install(e,s.title()||"");const o=e.style;o.left=n+"px",o.backgroundColor=s.color(),this.viewportElement.appendChild(e)}processTimelineData(e){if(!e)return this.timelineLevels=null,this.visibleLevelOffsets=null,this.visibleLevels=null,this.groupOffsets=null,this.rawTimelineData=null,this.forceDecorationCache=null,this.entryColorsCache=null,this.rawTimelineDataLength=0,this.selectedGroup=-1,this.keyboardFocusedGroup=-1,void this.flameChartDelegate.updateSelectedGroup(this,null);this.rawTimelineData=e,this.rawTimelineDataLength=e.entryStartTimes.length,this.forceDecorationCache=new Int8Array(this.rawTimelineDataLength),this.entryColorsCache=new Array(this.rawTimelineDataLength);for(let e=0;e<this.rawTimelineDataLength;++e)this.forceDecorationCache[e]=this.dataProvider.forceDecoration(e)?1:0,this.entryColorsCache[e]=this.dataProvider.entryColor(e);const t=new Uint32Array(this.dataProvider.maxStackDepth()+1);for(let i=0;i<e.entryLevels.length;++i)++t[e.entryLevels[i]];const i=new Array(t.length);for(let e=0;e<i.length;++e)i[e]=new Uint32Array(t[e]),t[e]=0;for(let s=0;s<e.entryLevels.length;++s){const r=e.entryLevels[s];i[r][t[r]++]=s}this.timelineLevels=i;const s=this.rawTimelineData.groups||[];for(let e=0;e<s.length;++e){const t=this.groupExpansionState[s[e].name];void 0!==t&&(s[e].expanded=t)}this.updateLevelPositions(),this.updateHeight(),this.selectedGroup=e.selectedGroup?s.indexOf(e.selectedGroup):-1,this.keyboardFocusedGroup=this.selectedGroup,this.flameChartDelegate.updateSelectedGroup(this,e.selectedGroup)}updateLevelPositions(){const e=this.dataProvider.maxStackDepth(),t=this.rawTimelineData&&this.rawTimelineData.groups||[];this.visibleLevelOffsets=new Uint32Array(e+1),this.visibleLevelHeights=new Uint32Array(e),this.visibleLevels=new Uint16Array(e),this.groupOffsets=new Uint32Array(t.length+1);let i=-1,s=this.rulerEnabled?P+2:2,r=!0;const n=[{nestingLevel:-1,visible:!0}],o=Math.max(e,t.length?t[t.length-1].startLevel+1:0);let a;for(a=0;a<o;++a){let o,l=!0;for(;i<t.length-1&&a===t[i+1].startLevel;){++i,o=t[i].style;let e=!0,a=n[n.length-1];for(;a&&a.nestingLevel>=o.nestingLevel;)n.pop(),e=!1,a=n[n.length-1];const h=!(i>=0&&this.isGroupCollapsible(i))||t[i].expanded;a=n[n.length-1],l=!!a&&a.visible,r=Boolean(h)&&l,n.push({nestingLevel:o.nestingLevel,visible:r}),l&&(s+=e?0:o.padding),this.groupOffsets[i]=s,l&&!o.shareHeaderLine&&(s+=o.height)}if(a>=e)continue;const h=i>=0&&a===t[i].startLevel,d=l&&(r||h&&t[i].style.useFirstLineForOverview);let c;if(i>=0){const e=t[i],s=e.style;c=h&&!s.shareHeaderLine||s.collapsible&&!e.expanded?s.height:s.itemsHeight||this.barHeight}else c=this.barHeight;this.visibleLevels[a]=d?1:0,this.visibleLevelOffsets[a]=s,this.visibleLevelHeights[a]=c,(d||l&&o&&o.shareHeaderLine&&h)&&(s+=this.visibleLevelHeights[a])}i>=0&&(this.groupOffsets[i+1]=s),this.visibleLevelOffsets[a]=s}isGroupCollapsible(e){if(!this.rawTimelineData)return;const t=this.rawTimelineData.groups||[],i=t[e].style;if(!i.shareHeaderLine||!i.collapsible)return Boolean(i.collapsible);const s=e+1>=t.length;if(!s&&t[e+1].style.nestingLevel>i.nestingLevel)return!0;return(s?this.dataProvider.maxStackDepth():t[e+1].startLevel)!==t[e].startLevel+1||i.height!==i.itemsHeight}setSelectedEntry(e){this.selectedEntryIndex!==e&&(-1!==e&&this.chartViewport.hideRangeSelection(),this.selectedEntryIndex=e,this.revealEntry(e),this.updateElementPosition(this.selectedElement,this.selectedEntryIndex))}updateElementPosition(e,t){if(e.classList.add("hidden"),-1===t)return;const i=this.timelineData();if(!i)return;const s=i.entryStartTimes[t],r=i.entryTotalTimes[t];let n=0,o=0,a=!0;if(Number.isNaN(r)){const e=this.markerPositions.get(t);e?(n=e.x,o=e.width):a=!1}else n=this.chartViewport.timeToPosition(s),o=r*this.chartViewport.timeToPixel();if(n+o<=0||n>=this.offsetWidth)return;const l=n+o/2;o=Math.max(o,2),n=l-o/2;const h=i.entryLevels[t],d=this.levelToOffset(h)-this.chartViewport.scrollOffset(),c=this.levelHeight(h),m=e.style;m.left=n+"px",m.top=d+"px",m.width=o+"px",m.height=c-1+"px",e.classList.toggle("hidden",!a),this.viewportElement.appendChild(e)}timeToPositionClipped(e){return i.NumberUtilities.clamp(this.chartViewport.timeToPosition(e),0,this.offsetWidth)}levelToOffset(e){if(!this.visibleLevelOffsets)throw new Error("No visible level offsets");return this.visibleLevelOffsets[e]}levelHeight(e){if(!this.visibleLevelHeights)throw new Error("No visible level heights");return this.visibleLevelHeights[e]}updateBoundaries(){this.totalTime=this.dataProvider.totalTime(),this.minimumBoundaryInternal=this.dataProvider.minimumBoundary(),this.chartViewport.setBoundaries(this.minimumBoundaryInternal,this.totalTime)}updateHeight(){const e=this.levelToOffset(this.dataProvider.maxStackDepth())+2;this.chartViewport.setContentHeight(e)}onResize(){this.scheduleUpdate()}update(){this.timelineData()&&(this.resetCanvas(),this.updateHeight(),this.updateBoundaries(),this.draw(),this.chartViewport.isDragging()||this.updateHighlight())}reset(){this.chartViewport.reset(),this.rawTimelineData=null,this.rawTimelineDataLength=0,this.highlightedMarkerIndex=-1,this.highlightedEntryIndex=-1,this.selectedEntryIndex=-1,this.chartViewport.scheduleUpdate()}scheduleUpdate(){this.chartViewport.scheduleUpdate()}enabled(){return 0!==this.rawTimelineDataLength}computePosition(e){return this.chartViewport.timeToPosition(e)}formatValue(e,t){return this.dataProvider.formatValue(e-this.zeroTime(),t)}maximumBoundary(){return this.chartViewport.windowRightTime()}minimumBoundary(){return this.chartViewport.windowLeftTime()}zeroTime(){return this.dataProvider.minimumBoundary()}boundarySpan(){return this.maximumBoundary()-this.minimumBoundary()}}const P=15,k={CANDY:1,WARNING_TRIANGLE:2};function D(e){e.sort(((e,t)=>k[e.type]-k[t.type]))}class I{entryLevels;entryTotalTimes;entryStartTimes;entryDecorations;groups;markers;flowStartTimes;flowStartLevels;flowEndTimes;flowEndLevels;selectedGroup;constructor(e,t,i,s,r=[]){this.entryLevels=e,this.entryTotalTimes=t,this.entryStartTimes=i,this.entryDecorations=r,this.groups=s||[],this.markers=[],this.flowStartTimes=[],this.flowStartLevels=[],this.flowEndTimes=[],this.flowEndLevels=[],this.selectedGroup=null}static create(e){return new I(e.entryLevels,e.entryTotalTimes,e.entryStartTimes,e.groups,e.entryDecorations||[])}static createEmpty(){return new I([],[],[],[])}}var R;!function(e){e.CanvasFocused="CanvasFocused",e.EntryInvoked="EntryInvoked",e.EntrySelected="EntrySelected",e.EntryHighlighted="EntryHighlighted"}(R||(R={}));var M=Object.freeze({__proto__:null,FlameChartDelegate:class{windowChanged(e,t,i){}updateRangeSelection(e,t){}updateSelectedGroup(e,t){}},FlameChart:C,HeaderHeight:P,MinimalTimeWindowMs:.5,sortDecorationsForRenderingOrder:D,FlameChartTimelineData:I,get Events(){return R}});const z=s.RenderCoordinator.RenderCoordinator.instance();class W extends r.Widget.VBox{delegate;viewportElement;alwaysShowVerticalScrollInternal;rangeSelectionEnabled;vScrollElement;vScrollContent;selectionOverlay;selectedTimeSpanLabel;cursorElement;isDraggingInternal;totalHeight;offsetHeight;scrollTop;rangeSelectionStart;rangeSelectionEnd;dragStartPointX;dragStartPointY;dragStartScrollTop;visibleLeftTime;visibleRightTime;offsetWidth;targetLeftTime;targetRightTime;selectionOffsetShiftX;selectionOffsetShiftY;selectionStartX;lastMouseOffsetX;minimumBoundary;totalTime;cancelWindowTimesAnimation;constructor(e){super(),this.registerRequiredCSS(g),this.delegate=e,this.viewportElement=this.contentElement.createChild("div","fill"),this.viewportElement.addEventListener("mousemove",this.updateCursorPosition.bind(this),!1),this.viewportElement.addEventListener("mouseout",this.onMouseOut.bind(this),!1),this.viewportElement.addEventListener("wheel",this.onMouseWheel.bind(this),!1),this.viewportElement.addEventListener("keydown",this.onChartKeyDown.bind(this),!1),this.viewportElement.addEventListener("keyup",this.onChartKeyUp.bind(this),!1),r.UIUtils.installDragHandle(this.viewportElement,this.startDragging.bind(this),this.dragging.bind(this),this.endDragging.bind(this),"-webkit-grabbing",null),r.UIUtils.installDragHandle(this.viewportElement,this.startRangeSelection.bind(this),this.rangeSelectionDragging.bind(this),this.endRangeSelection.bind(this),"text",null),this.alwaysShowVerticalScrollInternal=!1,this.rangeSelectionEnabled=!0,this.vScrollElement=this.contentElement.createChild("div","chart-viewport-v-scroll"),this.vScrollContent=this.vScrollElement.createChild("div"),this.vScrollElement.addEventListener("scroll",this.onScroll.bind(this),!1),this.selectionOverlay=this.contentElement.createChild("div","chart-viewport-selection-overlay hidden"),this.selectedTimeSpanLabel=this.selectionOverlay.createChild("div","time-span"),this.cursorElement=this.contentElement.createChild("div","chart-cursor-element hidden"),this.reset(),this.rangeSelectionStart=null,this.rangeSelectionEnd=null}alwaysShowVerticalScroll(){this.alwaysShowVerticalScrollInternal=!0,this.vScrollElement.classList.add("always-show-scrollbar")}disableRangeSelection(){this.rangeSelectionEnabled=!1,this.rangeSelectionStart=null,this.rangeSelectionEnd=null,this.updateRangeSelectionOverlay()}isDragging(){return this.isDraggingInternal}elementsToRestoreScrollPositionsFor(){return[this.vScrollElement]}updateScrollBar(){const e=this.alwaysShowVerticalScrollInternal||this.totalHeight>this.offsetHeight;this.vScrollElement.classList.contains("hidden")===e&&(this.vScrollElement.classList.toggle("hidden",!e),this.updateContentElementSize())}onResize(){this.updateScrollBar(),this.updateContentElementSize(),this.scheduleUpdate()}reset(){this.vScrollElement.scrollTop=0,this.scrollTop=0,this.rangeSelectionStart=null,this.rangeSelectionEnd=null,this.isDraggingInternal=!1,this.dragStartPointX=0,this.dragStartPointY=0,this.dragStartScrollTop=0,this.visibleLeftTime=0,this.visibleRightTime=0,this.offsetWidth=0,this.offsetHeight=0,this.totalHeight=0,this.targetLeftTime=0,this.targetRightTime=0,this.updateContentElementSize()}updateContentElementSize(){let e=this.vScrollElement.offsetLeft;e||(e=this.contentElement.offsetWidth),this.offsetWidth=e,this.offsetHeight=this.contentElement.offsetHeight,this.delegate.setSize(this.offsetWidth,this.offsetHeight)}setContentHeight(e){this.totalHeight=e,this.vScrollContent.style.height=e+"px",this.updateScrollBar(),this.updateContentElementSize(),this.scrollTop+this.offsetHeight<=e||(this.scrollTop=Math.max(0,e-this.offsetHeight),this.vScrollElement.scrollTop=this.scrollTop)}setScrollOffset(e,t){t=t||0,this.vScrollElement.scrollTop>e?this.vScrollElement.scrollTop=e:this.vScrollElement.scrollTop<e-this.offsetHeight+t&&(this.vScrollElement.scrollTop=e-this.offsetHeight+t)}scrollOffset(){return this.vScrollElement.scrollTop}chartHeight(){return this.offsetHeight}setBoundaries(e,t){this.minimumBoundary=e,this.totalTime=t}onMouseWheel(t){const i=t,s=i.shiftKey!==("zoom"===e.Settings.Settings.instance().moduleSetting("flamechartMouseWheelAction").get()),r=!s&&(i.deltaY||53===Math.abs(i.deltaX)),n=s&&Math.abs(i.deltaX)>Math.abs(i.deltaY);if(r)this.vScrollElement.scrollTop+=(i.deltaY||i.deltaX)/53*this.offsetHeight/8;else if(n)this.handlePanGesture(i.deltaX,!0);else{const e=1/53;this.handleZoomGesture(Math.pow(1.2,(i.deltaY||i.deltaX)*e)-1)}t.consume(!0)}startDragging(e){return!e.shiftKey&&(this.isDraggingInternal=!0,this.dragStartPointX=e.pageX,this.dragStartPointY=e.pageY,this.dragStartScrollTop=this.vScrollElement.scrollTop,this.viewportElement.style.cursor="",!0)}dragging(e){const t=this.dragStartPointX-e.pageX;this.dragStartPointX=e.pageX,this.handlePanGesture(t);const i=this.dragStartPointY-e.pageY;this.vScrollElement.scrollTop=this.dragStartScrollTop+i}endDragging(){this.isDraggingInternal=!1}startRangeSelection(e){if(!e.shiftKey||!this.rangeSelectionEnabled)return!1;this.isDraggingInternal=!0,this.selectionOffsetShiftX=e.offsetX-e.pageX,this.selectionOffsetShiftY=e.offsetY-e.pageY,this.selectionStartX=e.offsetX;const t=this.selectionOverlay.style;return t.left=this.selectionStartX+"px",t.width="1px",this.selectedTimeSpanLabel.textContent="",this.selectionOverlay.classList.remove("hidden"),!0}endRangeSelection(){this.isDraggingInternal=!1,this.selectionStartX=null}hideRangeSelection(){this.selectionOverlay.classList.add("hidden"),this.rangeSelectionStart=null,this.rangeSelectionEnd=null}setRangeSelection(e,t){this.rangeSelectionEnabled&&(this.rangeSelectionStart=Math.min(e,t),this.rangeSelectionEnd=Math.max(e,t),this.updateRangeSelectionOverlay(),this.delegate.updateRangeSelection(this.rangeSelectionStart,this.rangeSelectionEnd))}onClick(e){const t=e,i=this.pixelToTime(t.offsetX);null!==this.rangeSelectionStart&&null!==this.rangeSelectionEnd&&i>=this.rangeSelectionStart&&i<=this.rangeSelectionEnd||this.hideRangeSelection()}rangeSelectionDragging(e){const t=i.NumberUtilities.clamp(e.pageX+this.selectionOffsetShiftX,0,this.offsetWidth),s=this.pixelToTime(this.selectionStartX||0),r=this.pixelToTime(t);this.setRangeSelection(s,r)}updateRangeSelectionOverlay(){const e=this.rangeSelectionStart||0,s=this.rangeSelectionEnd||0,r=100,n=i.NumberUtilities.clamp(this.timeToPosition(e),-100,this.offsetWidth+r),o=i.NumberUtilities.clamp(this.timeToPosition(s),-100,this.offsetWidth+r),a=this.selectionOverlay.style;a.left=n+"px",a.width=o-n+"px";const l=s-e;this.selectedTimeSpanLabel.textContent=t.TimeUtilities.preciseMillisToString(l,2)}onScroll(){this.scrollTop=this.vScrollElement.scrollTop,this.scheduleUpdate()}onMouseOut(){this.lastMouseOffsetX=-1,this.showCursor(!1)}updateCursorPosition(e){const t=e;this.showCursor(t.shiftKey),this.cursorElement.style.left=t.offsetX+"px",this.lastMouseOffsetX=t.offsetX}pixelToTime(e){return this.pixelToTimeOffset(e)+this.visibleLeftTime}pixelToTimeOffset(e){return e*(this.visibleRightTime-this.visibleLeftTime)/this.offsetWidth}timeToPosition(e){return Math.floor((e-this.visibleLeftTime)/(this.visibleRightTime-this.visibleLeftTime)*this.offsetWidth)}timeToPixel(){return this.offsetWidth/(this.visibleRightTime-this.visibleLeftTime)}showCursor(e){this.cursorElement.classList.toggle("hidden",!e||this.isDraggingInternal)}onChartKeyDown(e){const t=e;this.showCursor(t.shiftKey),this.handleZoomPanKeys(e)}onChartKeyUp(e){const t=e;this.showCursor(t.shiftKey)}handleZoomPanKeys(e){if(!r.KeyboardShortcut.KeyboardShortcut.hasNoModifiers(e))return;const t=e,i=t.shiftKey?.8:.3,s=t.shiftKey?320:160;switch(t.code){case"KeyA":this.handlePanGesture(-s,!0);break;case"KeyD":this.handlePanGesture(s,!0);break;case"KeyW":this.handleZoomGesture(-i);break;case"KeyS":this.handleZoomGesture(i);break;default:return}e.consume(!0)}handleZoomGesture(e){const t={left:this.targetLeftTime,right:this.targetRightTime},i=this.pixelToTime(this.lastMouseOffsetX);t.left+=(t.left-i)*e,t.right+=(t.right-i)*e,this.requestWindowTimes(t,!0)}handlePanGesture(e,t){const s={left:this.targetLeftTime,right:this.targetRightTime},r=i.NumberUtilities.clamp(this.pixelToTimeOffset(e),this.minimumBoundary-s.left,this.totalTime+this.minimumBoundary-s.right);s.left+=r,s.right+=r,this.requestWindowTimes(s,Boolean(t))}requestWindowTimes(e,t){const i=this.minimumBoundary+this.totalTime;e.left<this.minimumBoundary?(e.right=Math.min(e.right+this.minimumBoundary-e.left,i),e.left=this.minimumBoundary):e.right>i&&(e.left=Math.max(e.left-e.right+i,this.minimumBoundary),e.right=i),e.right-e.left<.5||this.delegate.windowChanged(e.left,e.right,t)}scheduleUpdate(){this.cancelWindowTimesAnimation||z.write((()=>this.update()))}update(){this.updateRangeSelectionOverlay(),this.delegate.update()}setWindowTimes(e,t,i){if(e!==this.targetLeftTime||t!==this.targetRightTime){if(!i||0===this.visibleLeftTime||this.visibleRightTime===1/0||0===e&&t===1/0||e===1/0&&t===1/0)return this.targetLeftTime=e,this.targetRightTime=t,this.visibleLeftTime=e,this.visibleRightTime=t,void this.scheduleUpdate();this.cancelWindowTimesAnimation&&(this.cancelWindowTimesAnimation(),this.visibleLeftTime=this.targetLeftTime,this.visibleRightTime=this.targetRightTime),this.targetLeftTime=e,this.targetRightTime=t,this.cancelWindowTimesAnimation=r.UIUtils.animateFunction(this.element.window(),function(e,t){this.visibleLeftTime=e,this.visibleRightTime=t,this.update()}.bind(this),[{from:this.visibleLeftTime,to:e},{from:this.visibleRightTime,to:t}],100,(()=>{this.cancelWindowTimesAnimation=null}))}}windowLeftTime(){return this.visibleLeftTime}windowRightTime(){return this.visibleRightTime}}var A=Object.freeze({__proto__:null,ChartViewport:W}),H={cssContent:".film-strip-view{overflow-x:auto;overflow-y:hidden;align-content:flex-start;min-height:81px}.film-strip-view .frame .time{font-size:10px;margin-top:2px}.film-strip-view.time-based .frame .time{display:none}.film-strip-view .label{margin:auto;font-size:18px;color:var(--color-text-secondary)}.film-strip-view .frame{display:flex;flex-direction:column;align-items:center;padding:4px;flex:none;cursor:pointer}.film-strip-view .frame .thumbnail{min-width:24px;display:flex;flex-direction:row;align-items:center;pointer-events:none;margin:4px 0 2px;border:2px solid transparent}.film-strip-view .frame:hover .thumbnail,\n.film-strip-view .frame:focus .thumbnail{border-color:var(--color-selection-highlight-border)}.film-strip-view .frame .thumbnail img{height:auto;width:auto;max-width:80px;max-height:50px;pointer-events:none;box-shadow:0 0 3px var(--box-shadow-outline-color);flex:0 0 auto}.film-strip-view .frame:hover .thumbnail img,\n.film-strip-view .frame:focus .thumbnail img{box-shadow:none}"};const O={doubleclickToZoomImageClickTo:"Doubleclick to zoom image. Click to view preceding requests.",screenshotForSSelectToView:"Screenshot for {PH1} - select to view preceding requests.",screenshot:"Screenshot",previousFrame:"Previous frame",nextFrame:"Next frame"},G=t.i18n.registerUIStrings("ui/legacy/components/perf_ui/FilmStripView.ts",O),F=t.i18n.getLocalizedString.bind(void 0,G);class B extends(e.ObjectWrapper.eventMixin(r.Widget.HBox)){statusLabel;zeroTime;spanTime;model;mode;constructor(){super(!0),this.registerRequiredCSS(H),this.contentElement.classList.add("film-strip-view"),this.statusLabel=this.contentElement.createChild("div","label"),this.reset(),this.setMode(V.TimeBased)}static setImageData(e,t){t&&(e.src="data:image/jpg;base64,"+t)}setMode(e){this.mode=e,this.contentElement.classList.toggle("time-based",e===V.TimeBased),this.update()}setModel(e,t,i){this.model=e,this.zeroTime=t,this.spanTime=i;e.frames().length?this.update():this.reset()}createFrameElement(e){const i=e.timestamp,s=t.TimeUtilities.millisToString(i-this.zeroTime),n=document.createElement("div");n.classList.add("frame"),r.Tooltip.Tooltip.install(n,F(O.doubleclickToZoomImageClickTo)),n.createChild("div","time").textContent=s,n.tabIndex=0,n.setAttribute("aria-label",F(O.screenshotForSSelectToView,{PH1:s})),r.ARIAUtils.markAsButton(n);const o=n.createChild("div","thumbnail").createChild("img");return o.alt=F(O.screenshot),n.addEventListener("mousedown",this.onMouseEvent.bind(this,U.FrameSelected,i),!1),n.addEventListener("mouseenter",this.onMouseEvent.bind(this,U.FrameEnter,i),!1),n.addEventListener("mouseout",this.onMouseEvent.bind(this,U.FrameExit,i),!1),n.addEventListener("dblclick",this.onDoubleClick.bind(this,e),!1),n.addEventListener("focusin",this.onMouseEvent.bind(this,U.FrameEnter,i),!1),n.addEventListener("focusout",this.onMouseEvent.bind(this,U.FrameExit,i),!1),n.addEventListener("keydown",(e=>{"Enter"!==e.code&&"Space"!==e.code||this.onMouseEvent(U.FrameSelected,i)})),e.imageDataPromise().then(B.setImageData.bind(null,o)).then((function(){return n}))}frameByTime(e){const t=this.model.frames(),s=Math.max(i.ArrayUtilities.upperBound(t,e,(function(e,t){return e-t.timestamp}))-1,0);return t[s]}update(){if(!this.model)return;const e=this.model.frames();if(!e.length)return;if(this.mode===V.FrameBased)return void Promise.all(e.map(this.createFrameElement.bind(this))).then(s.bind(this));const t=this.contentElement.clientWidth,i=this.spanTime/t;function s(e){this.contentElement.removeChildren();for(let t=0;t<e.length;++t)this.contentElement.appendChild(e[t])}this.createFrameElement(e[0]).then(function(e){const n=Math.ceil(r.UIUtils.measurePreferredSize(e,this.contentElement).width);if(!n)return;const o=[];for(let e=n;e<t;e+=n){const t=e*i+this.zeroTime;o.push(this.createFrameElement(this.frameByTime(t)).then(a))}function a(e){return e.style.width=n+"px",e}Promise.all(o).then(s.bind(this))}.bind(this))}onResize(){this.mode!==V.FrameBased&&this.update()}onMouseEvent(e,t){this.dispatchEventToListeners(e,t)}onDoubleClick(e){new N(e,this.zeroTime)}reset(){this.zeroTime=0,this.contentElement.removeChildren(),this.contentElement.appendChild(this.statusLabel)}setStatusText(e){this.statusLabel.textContent=e}}var U;!function(e){e.FrameSelected="FrameSelected",e.FrameEnter="FrameEnter",e.FrameExit="FrameExit"}(U||(U={}));const V={TimeBased:"TimeBased",FrameBased:"FrameBased"};class N{fragment;widget;frames;index;zeroTime;dialog;constructor(e,t){const i=r.UIUtils.createTextButton("◀",this.onPrevFrame.bind(this));r.Tooltip.Tooltip.install(i,F(O.previousFrame));const s=r.UIUtils.createTextButton("▶",this.onNextFrame.bind(this));r.Tooltip.Tooltip.install(s,F(O.nextFrame)),this.fragment=r.Fragment.Fragment.build`
2
+ <x-widget flex=none margin=12px>
3
+ <x-hbox overflow=auto border='1px solid #ddd'>
4
+ <img $='image' style="max-height: 80vh; max-width: 80vw;"></img>
5
+ </x-hbox>
6
+ <x-hbox x-center justify-content=center margin-top=10px>
7
+ ${i}
8
+ <x-hbox $='time' margin=8px></x-hbox>
9
+ ${s}
10
+ </x-hbox>
11
+ </x-widget>
12
+ `,this.widget=this.fragment.element(),this.widget.tabIndex=0,this.widget.addEventListener("keydown",this.keyDown.bind(this),!1),this.frames=e.model().frames(),this.index=e.index,this.zeroTime=t||e.model().zeroTime(),this.dialog=null,this.render()}resize(){this.dialog||(this.dialog=new r.Dialog.Dialog,this.dialog.contentElement.appendChild(this.widget),this.dialog.setDefaultFocusedElement(this.widget),this.dialog.show()),this.dialog.setSizeBehavior("MeasureContent")}keyDown(e){const t=e;switch(t.key){case"ArrowLeft":a.Platform.isMac()&&t.metaKey?this.onFirstFrame():this.onPrevFrame();break;case"ArrowRight":a.Platform.isMac()&&t.metaKey?this.onLastFrame():this.onNextFrame();break;case"Home":this.onFirstFrame();break;case"End":this.onLastFrame()}}onPrevFrame(){this.index>0&&--this.index,this.render()}onNextFrame(){this.index<this.frames.length-1&&++this.index,this.render()}onFirstFrame(){this.index=0,this.render()}onLastFrame(){this.index=this.frames.length-1,this.render()}render(){const e=this.frames[this.index];return this.fragment.$("time").textContent=t.TimeUtilities.millisToString(e.timestamp-this.zeroTime),e.imageDataPromise().then((e=>{const t=this.fragment.$("image");return B.setImageData(t,e)})).then(this.resize.bind(this))}}var _=Object.freeze({__proto__:null,FilmStripView:B,get Events(){return U},Modes:V,Dialog:N});let X;class ${static instance(e={forceNew:null}){const{forceNew:t}=e;return X&&!t||(X=new $),X}handleAction(e,t){for(const e of l.TargetManager.TargetManager.instance().models(l.HeapProfilerModel.HeapProfilerModel))e.collectGarbage();return!0}}var j=Object.freeze({__proto__:null,GCActionDelegate:$});let Y,K;class q{helper;constructor(){this.helper=new J(c.SourceFrame.DecoratorType.PERFORMANCE)}static instance(e={forceNew:null}){const{forceNew:t}=e;return Y&&!t||(Y=new q),Y}reset(){this.helper.reset()}appendLegacyCPUProfile(e){const t=e.target(),i=[e.profileHead],s=(e.profileEndTime-e.profileStartTime)/e.totalHitCount;for(;i.length;){const e=i.pop().children;for(let r=0;r<e.length;++r){const n=e[r];if(i.push(n),n.url&&n.positionTicks)for(let e=0;e<n.positionTicks.length;++e){const i=n.positionTicks[e],r=i.line,o=i.ticks*s;this.helper.addLineData(t,n.url,r,o)}}}}appendCPUProfile(e){if(!e.lines)return this.appendLegacyCPUProfile(e),void this.helper.scheduleUpdate();const t=e.target();if(e.samples){for(let i=1;i<e.samples.length;++i){const s=e.lines[i];if(!s)continue;const r=e.nodeByIndex(i);if(!r)continue;const n=Number(r.scriptId)||r.url;if(!n)continue;const o=e.timestamps[i]-e.timestamps[i-1];this.helper.addLineData(t,n,s,o)}this.helper.scheduleUpdate()}}}class Z{helper;constructor(){this.helper=new J(c.SourceFrame.DecoratorType.MEMORY)}static instance(e={forceNew:null}){const{forceNew:t}=e;return K&&!t||(K=new Z),K}reset(){this.helper.reset()}appendHeapProfile(e,t){const i=this.helper;!function e(s){if(s.children.forEach(e),!s.selfSize)return;const r=Number(s.callFrame.scriptId)||s.callFrame.url;if(!r)return;const n=s.callFrame.lineNumber+1;i.addLineData(t,r,n,s.selfSize)}(e.head),i.scheduleUpdate()}}class J{type;locationPool;updateTimer;lineData;constructor(e){this.type=e,this.locationPool=new h.LiveLocation.LiveLocationPool,this.updateTimer=null,this.reset()}reset(){this.lineData=new Map,this.scheduleUpdate()}addLineData(e,t,i,s){let r=this.lineData.get(e);r||(r=new Map,this.lineData.set(e,r));let n=r.get(t);n||(n=new Map,r.set(t,n)),n.set(i,(n.get(i)||0)+s)}scheduleUpdate(){this.updateTimer||(this.updateTimer=window.setTimeout((()=>{this.updateTimer=null,this.doUpdate()}),0))}async doUpdate(){this.locationPool.disposeAll();const e=new Map,t=[];for(const[i,s]of this.lineData){const r=i?i.model(l.DebuggerModel.DebuggerModel):null;for(const[i,n]of s){const s=d.Workspace.WorkspaceImpl.instance();if(r){const s=h.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance();for(const o of n){const n=o[0]-1,a=o[1],l="string"==typeof i?r.createRawLocationByURL(i,n,0):r.createRawLocationByScriptId(String(i),n,0);l&&t.push(s.rawLocationToUILocation(l).then((t=>{if(t){let i=e.get(t.uiSourceCode);i||(i=new Map,e.set(t.uiSourceCode,i)),i.set(t.lineNumber+1,a)}})))}}else if("string"==typeof i){const t=s.uiSourceCodeForURL(i);t&&e.set(t,n)}}await Promise.all(t);for(const[t,i]of e)t.setDecorationData(this.type,i)}for(const t of d.Workspace.WorkspaceImpl.instance().uiSourceCodes())e.has(t)||t.setDecorationData(this.type,void 0)}}var Q=Object.freeze({__proto__:null,Performance:q,Memory:Z,Helper:J});let ee;class te{running;sessionId;loadEventCallback;setting;constructor(){this.running=!1,this.sessionId=0,this.loadEventCallback=()=>{},this.setting=e.Settings.Settings.instance().moduleSetting("memoryLiveHeapProfile"),this.setting.addChangeListener((e=>e.data?this.startProfiling():this.stopProfiling())),this.setting.get()&&this.startProfiling()}static instance(e={forceNew:null}){const{forceNew:t}=e;return ee&&!t||(ee=new te),ee}async run(){}modelAdded(e){e.startSampling(1e4)}modelRemoved(e){}async startProfiling(){if(this.running)return;this.running=!0;const e=this.sessionId;l.TargetManager.TargetManager.instance().observeModels(l.HeapProfilerModel.HeapProfilerModel,this),l.TargetManager.TargetManager.instance().addModelListener(l.ResourceTreeModel.ResourceTreeModel,l.ResourceTreeModel.Events.Load,this.loadEventFired,this);do{const t=l.TargetManager.TargetManager.instance().models(l.HeapProfilerModel.HeapProfilerModel),i=await Promise.all(t.map((e=>e.getSamplingProfile())));if(e!==this.sessionId)break;Z.instance().reset();for(let e=0;e<i.length;++e){const s=i[e];s&&Z.instance().appendHeapProfile(s,t[e].target())}await Promise.race([new Promise((e=>window.setTimeout(e,a.InspectorFrontendHost.isUnderTest()?10:5e3))),new Promise((e=>{this.loadEventCallback=e}))])}while(e===this.sessionId);l.TargetManager.TargetManager.instance().unobserveModels(l.HeapProfilerModel.HeapProfilerModel,this),l.TargetManager.TargetManager.instance().removeModelListener(l.ResourceTreeModel.ResourceTreeModel,l.ResourceTreeModel.Events.Load,this.loadEventFired,this);for(const e of l.TargetManager.TargetManager.instance().models(l.HeapProfilerModel.HeapProfilerModel))e.stopSampling();Z.instance().reset()}stopProfiling(){this.running&&(this.running=!1,this.sessionId++)}loadEventFired(){this.loadEventCallback()}}var ie=Object.freeze({__proto__:null,LiveHeapProfile:te});const se={lowest:"Lowest",low:"Low",medium:"Medium",high:"High",highest:"Highest"},re=t.i18n.registerUIStrings("ui/legacy/components/perf_ui/NetworkPriorities.ts",se),ne=t.i18n.getLocalizedString.bind(void 0,re);const oe=new Map;let ae;function le(){if(ae)return ae;const e=new Map;return e.set("VeryLow",ne(se.lowest)),e.set("Low",ne(se.low)),e.set("Medium",ne(se.medium)),e.set("High",ne(se.high)),e.set("VeryHigh",ne(se.highest)),ae=e,e}const he=new Map;var de=Object.freeze({__proto__:null,uiLabelForNetworkPriority:function(e){return le().get(e)||""},uiLabelToNetworkPriority:function(e){return 0===oe.size&&le().forEach(((e,t)=>oe.set(e,t))),oe.get(e)||""},priorityUILabelMap:le,networkPriorityWeight:function(e){return 0===he.size&&(he.set("VeryLow",1),he.set("Low",2),he.set("Medium",3),he.set("High",4),he.set("VeryHigh",5)),he.get(e)||0}}),ce={cssContent:".overview-grid-window-selector{position:absolute;top:0;bottom:0;background-color:var(--color-selection-highlight);z-index:250;pointer-events:none}.overview-grid-window-resizer{position:absolute;top:-1px;height:20px;width:6px;margin-left:-3px;background-color:rgb(153 153 153);border:1px solid #fff;z-index:500}.overview-grid-window-resizer:focus-visible{background-color:var(--legacy-active-control-bg-color)}.overview-grid-cursor-area{position:absolute;left:0;right:0;top:20px;bottom:0;z-index:500;cursor:text}.overview-grid-cursor-position{position:absolute;top:0;bottom:0;width:2px;background-color:var(--color-selection-highlight-border);z-index:500;pointer-events:none;visibility:hidden;overflow:hidden}.window-curtain-left,\n.window-curtain-right{background-color:var(--color-background-hover-overlay);position:absolute;top:0;height:100%;z-index:300;pointer-events:none;border:1px none var(--color-background-hover-overlay)}.window-curtain-left{left:0;border-right-style:solid}.window-curtain-right{right:0;border-left-style:solid}@media (forced-colors: active){.overview-grid-cursor-position{forced-color-adjust:none;background-color:Highlight}.window-curtain-left,\n .window-curtain-right{background-color:transparent;border-color:ButtonText}.overview-grid-window-resizer{background-color:ButtonText}.overview-grid-window-resizer:hover,\n .overview-grid-window-resizer:active,\n .overview-grid-window-resizer:focus-visible{forced-color-adjust:none;background-color:Highlight}}"};const me={overviewGridWindow:"Overview grid window",leftResizer:"Left Resizer",rightResizer:"Right Resizer"},ue=t.i18n.registerUIStrings("ui/legacy/components/perf_ui/OverviewGrid.ts",me),ge=t.i18n.getLocalizedString.bind(void 0,ue);class pe{element;grid;window;constructor(e,t){this.element=document.createElement("div"),this.element.id=e+"-overview-container",this.grid=new b,this.grid.element.id=e+"-overview-grid",this.grid.setScrollTop(0),this.element.appendChild(this.grid.element),this.window=new fe(this.element,this.grid.dividersLabelBarElement,t)}clientWidth(){return this.element.clientWidth}updateDividers(e){this.grid.updateDividers(e)}addEventDividers(e){this.grid.addEventDividers(e)}removeEventDividers(){this.grid.removeEventDividers()}reset(){this.window.reset()}windowLeft(){return this.window.windowLeft||0}windowRight(){return this.window.windowRight||0}setWindow(e,t){this.window.setWindow(e,t)}addEventListener(e,t,i){return this.window.addEventListener(e,t,i)}setClickHandler(e){this.window.setClickHandler(e)}zoom(e,t){this.window.zoom(e,t)}setResizeEnabled(e){this.window.setEnabled(e)}}class fe extends e.ObjectWrapper.ObjectWrapper{parentElement;calculator;leftResizeElement;rightResizeElement;leftCurtainElement;rightCurtainElement;overviewWindowSelector;offsetLeft;dragStartPoint;dragStartLeft;dragStartRight;windowLeft;windowRight;enabled;clickHandler;resizerParentOffsetLeft;constructor(e,t,i){super(),this.parentElement=e,r.ARIAUtils.markAsGroup(this.parentElement),this.calculator=i,r.ARIAUtils.setLabel(this.parentElement,ge(me.overviewGridWindow)),r.UIUtils.installDragHandle(this.parentElement,this.startWindowSelectorDragging.bind(this),this.windowSelectorDragging.bind(this),this.endWindowSelectorDragging.bind(this),"text",null),t&&r.UIUtils.installDragHandle(t,this.startWindowDragging.bind(this),this.windowDragging.bind(this),null,"-webkit-grabbing","-webkit-grab"),this.parentElement.addEventListener("wheel",this.onMouseWheel.bind(this),!0),this.parentElement.addEventListener("dblclick",this.resizeWindowMaximum.bind(this),!0),o.ThemeSupport.instance().appendStyle(this.parentElement,ce),this.leftResizeElement=e.createChild("div","overview-grid-window-resizer"),r.UIUtils.installDragHandle(this.leftResizeElement,this.resizerElementStartDragging.bind(this),this.leftResizeElementDragging.bind(this),null,"ew-resize"),this.rightResizeElement=e.createChild("div","overview-grid-window-resizer"),r.UIUtils.installDragHandle(this.rightResizeElement,this.resizerElementStartDragging.bind(this),this.rightResizeElementDragging.bind(this),null,"ew-resize"),r.ARIAUtils.setLabel(this.leftResizeElement,ge(me.leftResizer)),r.ARIAUtils.markAsSlider(this.leftResizeElement);this.leftResizeElement.addEventListener("keydown",(e=>this.handleKeyboardResizing(e,!1))),r.ARIAUtils.setLabel(this.rightResizeElement,ge(me.rightResizer)),r.ARIAUtils.markAsSlider(this.rightResizeElement);this.rightResizeElement.addEventListener("keydown",(e=>this.handleKeyboardResizing(e,!0))),this.rightResizeElement.addEventListener("focus",this.onRightResizeElementFocused.bind(this)),this.leftCurtainElement=e.createChild("div","window-curtain-left"),this.rightCurtainElement=e.createChild("div","window-curtain-right"),this.reset()}onRightResizeElementFocused(){this.parentElement.scrollLeft=0}reset(){this.windowLeft=0,this.windowRight=1,this.setEnabled(!0),this.updateCurtains()}setEnabled(e){this.enabled=e,this.rightResizeElement.tabIndex=e?0:-1,this.leftResizeElement.tabIndex=e?0:-1}setClickHandler(e){this.clickHandler=e}resizerElementStartDragging(e){const t=e,i=e.target;return!!this.enabled&&(this.resizerParentOffsetLeft=t.pageX-t.offsetX-i.offsetLeft,e.stopPropagation(),!0)}leftResizeElementDragging(e){const t=e;this.resizeWindowLeft(t.pageX-(this.resizerParentOffsetLeft||0)),e.preventDefault()}rightResizeElementDragging(e){const t=e;this.resizeWindowRight(t.pageX-(this.resizerParentOffsetLeft||0)),e.preventDefault()}handleKeyboardResizing(e,t){const i=e,s=e.target;let r=!1;if("ArrowLeft"===i.key||"ArrowRight"===i.key){"ArrowRight"===i.key&&(r=!0);const n=this.getNewResizerPosition(s.offsetLeft,r,i.ctrlKey);t?this.resizeWindowRight(n):this.resizeWindowLeft(n),e.consume(!0)}}getNewResizerPosition(e,t,i){let s,r=i?10:2;r=t?r:-Math.abs(r);return s=e+3.5+r,t&&s<10?s=10:!t&&s>this.parentElement.clientWidth-10&&(s=this.parentElement.clientWidth-10),s}startWindowSelectorDragging(e){if(!this.enabled)return!1;const t=e;this.offsetLeft=this.parentElement.getBoundingClientRect().left;const i=t.x-this.offsetLeft;return this.overviewWindowSelector=new we(this.parentElement,i),!0}windowSelectorDragging(e){if(!this.overviewWindowSelector)return;const t=e;this.overviewWindowSelector.updatePosition(t.x-this.offsetLeft),e.preventDefault()}endWindowSelectorDragging(e){if(!this.overviewWindowSelector)return;const t=e,i=this.overviewWindowSelector.close(t.x-this.offsetLeft);delete this.overviewWindowSelector;if(i.end-i.start<3){if(this.clickHandler&&this.clickHandler.call(null,e))return;const t=i.end;i.start=Math.max(0,t-7),i.end=Math.min(this.parentElement.clientWidth,t+7)}else i.end-i.start<14&&(this.parentElement.clientWidth-i.end>14?i.end=i.start+14:i.start=i.end-14);this.setWindowPosition(i.start,i.end)}startWindowDragging(e){const t=e;return this.dragStartPoint=t.pageX,this.dragStartLeft=this.windowLeft||0,this.dragStartRight=this.windowRight||0,e.stopPropagation(),!0}windowDragging(e){const t=e;t.preventDefault();let i=(t.pageX-this.dragStartPoint)/this.parentElement.clientWidth;this.dragStartLeft+i<0&&(i=-this.dragStartLeft),this.dragStartRight+i>1&&(i=1-this.dragStartRight),this.setWindow(this.dragStartLeft+i,this.dragStartRight+i)}resizeWindowLeft(e){e<10?e=0:e>this.rightResizeElement.offsetLeft-4&&(e=this.rightResizeElement.offsetLeft-4),this.setWindowPosition(e,null)}resizeWindowRight(e){e>this.parentElement.clientWidth-10?e=this.parentElement.clientWidth:e<this.leftResizeElement.offsetLeft+14&&(e=this.leftResizeElement.offsetLeft+14),this.setWindowPosition(null,e)}resizeWindowMaximum(){this.setWindowPosition(0,this.parentElement.clientWidth)}getRawSliderValue(e){if(!this.calculator)throw new Error("No calculator to calculate boundaries");const t=this.calculator.minimumBoundary(),i=this.calculator.maximumBoundary()-t;return e?t+i*(this.windowLeft||0):t+i*(this.windowRight||0)}updateResizeElementPositionValue(e,t){const i=e.toFixed(2),s=t.toFixed(2);r.ARIAUtils.setAriaValueNow(this.leftResizeElement,i),r.ARIAUtils.setAriaValueNow(this.rightResizeElement,s);const n=Number(s)-.5,o=Number(i)+.5;r.ARIAUtils.setAriaValueMinMax(this.leftResizeElement,"0",n.toString()),r.ARIAUtils.setAriaValueMinMax(this.rightResizeElement,o.toString(),"100")}updateResizeElementPositionLabels(){if(!this.calculator)return;const e=this.calculator.formatValue(this.getRawSliderValue(!0)),t=this.calculator.formatValue(this.getRawSliderValue(!1));r.ARIAUtils.setAriaValueText(this.leftResizeElement,String(e)),r.ARIAUtils.setAriaValueText(this.rightResizeElement,String(t))}updateResizeElementPercentageLabels(e,t){r.ARIAUtils.setAriaValueText(this.leftResizeElement,e),r.ARIAUtils.setAriaValueText(this.rightResizeElement,t)}calculateWindowPosition(){return{rawStartValue:Number(this.getRawSliderValue(!0)),rawEndValue:Number(this.getRawSliderValue(!1))}}setWindow(e,t){this.windowLeft=e,this.windowRight=t,this.updateCurtains(),this.calculator&&this.dispatchEventToListeners(ve.WindowChangedWithPosition,this.calculateWindowPosition()),this.dispatchEventToListeners(ve.WindowChanged)}updateCurtains(){const e=this.windowLeft||0,t=this.windowRight||0;let i=e,s=t;const r=s-i;if(0!==this.parentElement.clientWidth){const n=r*this.parentElement.clientWidth,o=7;if(n<o){const a=o/n;i=(t+e-r*a)/2,s=(t+e+r*a)/2}}const n=100*i,o=100*s,a=100-100*s,l=n+"%",h=o+"%";this.leftResizeElement.style.left=l,this.rightResizeElement.style.left=h,this.leftCurtainElement.style.width=l,this.rightCurtainElement.style.width=a+"%",this.updateResizeElementPositionValue(n,o),this.calculator?this.updateResizeElementPositionLabels():this.updateResizeElementPercentageLabels(l,h)}setWindowPosition(e,t){const i=this.parentElement.clientWidth,s="number"==typeof e?e/i:this.windowLeft,r="number"==typeof t?t/i:this.windowRight;this.setWindow(s||0,r||0)}onMouseWheel(e){const t=e;if(this.enabled){if(t.deltaY){const e=1.1,i=1/53,s=t.offsetX/this.parentElement.clientWidth;this.zoom(Math.pow(e,t.deltaY*i),s)}if(t.deltaX){let e=Math.round(.3*t.deltaX);const i=this.leftResizeElement.offsetLeft+3.5,s=this.rightResizeElement.offsetLeft+3.5;i-e<0&&(e=i),s-e>this.parentElement.clientWidth&&(e=s-this.parentElement.clientWidth),this.setWindowPosition(i-e,s-e),t.preventDefault()}}}zoom(e,t){let s=this.windowLeft||0,r=this.windowRight||0;const n=r-s;let o=e*n;o>1&&(o=1,e=o/n),s=t+(s-t)*e,s=i.NumberUtilities.clamp(s,0,1-o),r=t+(r-t)*e,r=i.NumberUtilities.clamp(r,o,1),this.setWindow(s,r)}}var ve;!function(e){e.WindowChanged="WindowChanged",e.WindowChangedWithPosition="WindowChangedWithPosition"}(ve||(ve={}));class we{startPosition;width;windowSelector;constructor(e,t){this.startPosition=t,this.width=e.offsetWidth,this.windowSelector=document.createElement("div"),this.windowSelector.className="overview-grid-window-selector",this.windowSelector.style.left=this.startPosition+"px",this.windowSelector.style.right=this.width-this.startPosition+"px",e.appendChild(this.windowSelector)}close(e){return e=Math.max(0,Math.min(e,this.width)),this.windowSelector.remove(),this.startPosition<e?{start:this.startPosition,end:e}:{start:e,end:this.startPosition}}updatePosition(e){(e=Math.max(0,Math.min(e,this.width)))<this.startPosition?(this.windowSelector.style.left=e+"px",this.windowSelector.style.right=this.width-this.startPosition+"px"):(this.windowSelector.style.left=this.startPosition+"px",this.windowSelector.style.right=this.width-e+"px")}}var ye=Object.freeze({__proto__:null,OverviewGrid:pe,MinSelectableSize:14,WindowScrollSpeedFactor:.3,ResizerOffset:3.5,OffsetFromWindowEnds:10,Window:fe,get Events(){return ve},WindowSelector:we});const be=new CSSStyleSheet;be.replaceSync(".root{align-items:center;display:flex;min-width:fit-content;white-space:nowrap}.chart-root{position:relative;overflow:hidden}.pie-chart-foreground{position:absolute;width:100%;height:100%;z-index:10;top:0;display:flex;pointer-events:none}.pie-chart-total{margin:auto;padding:2px 5px;pointer-events:auto}:focus{outline-width:0}.pie-chart-total.selected{font-weight:bold}.chart-root .slice.selected{stroke:var(--legacy-selection-bg-color);stroke-opacity:1;stroke-width:0.04;stroke-linecap:round;stroke-linejoin:round}.pie-chart-legend{margin-left:30px}.pie-chart-legend-row{margin:5px 2px 5px auto;padding-right:25px}.pie-chart-legend-row.selected{font-weight:bold}.pie-chart-legend-row:focus-visible{box-shadow:0 0 0 2px var(--legacy-selection-bg-color)!important}.pie-chart-swatch{display:inline-block;width:11px;height:11px;margin:0 6px;top:1px;position:relative;border:1px solid rgb(100 100 100/20%)}.pie-chart-swatch.pie-chart-empty-swatch{border:none}.pie-chart-name{display:inline-block}.pie-chart-size{display:inline-block;text-align:right;width:70px}@media (forced-colors: active){.pie-chart-swatch{forced-color-adjust:none;border-color:ButtonText}.pie-chart-total{forced-color-adjust:none;background-color:canvas}}\n/*# sourceURL=pieChart.css */\n");const{render:Te,html:Ee,svg:Se}=u,xe={total:"Total"},Le=t.i18n.registerUIStrings("ui/legacy/components/perf_ui/PieChart.ts",xe),Ce=t.i18n.getLocalizedString.bind(void 0,Le);class Pe extends HTMLElement{static litTagName=u.literal`devtools-perf-piechart`;shadow=this.attachShadow({mode:"open"});chartName="";size=0;formatter=e=>String(e);showLegend=!1;total=0;slices=[];totalSelected=!0;sliceSelected=-1;innerR=.618;lastAngle=-Math.PI/2;connectedCallback(){this.shadow.adoptedStyleSheets=[be]}set data(e){this.chartName=e.chartName,this.size=e.size,this.formatter=e.formatter,this.showLegend=e.showLegend,this.total=e.total,this.slices=e.slices,this.render()}render(){this.lastAngle=-Math.PI/2;const e=Ee` <div class="root" role="group" @keydown="${this.onKeyDown}" aria-label="${this.chartName}"> <div class="chart-root" style="width: ${this.size}px; height: ${this.size}px;"> ${Se` <svg> <g transform="scale(${this.size/2}) translate(1, 1) scale(0.99, 0.99)"> <circle r="1" stroke="hsl(0, 0%, 80%)" fill="transparent" stroke-width="${1/this.size}"></circle> <circle r="${this.innerR}" stroke="hsl(0, 0%, 80%)" fill="transparent" stroke-width="${1/this.size}"></circle> ${this.slices.map(((e,t)=>{const i=this.sliceSelected===t,s=i&&!this.showLegend?"0":"-1";return Se`<path class="slice ${i?"selected":""}" @click="${this.onSliceClicked(t)}" tabIndex="${s}" fill="${e.color}" d="${this.getPathStringForSlice(e)}" aria-label="${e.title}" id="${i?"selectedSlice":""}"></path>`}))} <use href="#selectedSlice"/> </g> </svg> `} <div class="pie-chart-foreground"> <div class="pie-chart-total ${this.totalSelected?"selected":""}" @click="${this.selectTotal}" tabIndex="${this.totalSelected&&!this.showLegend?"1":"-1"}"> ${this.total?this.formatter(this.total):""} </div> </div> </div> ${this.showLegend?Ee` <div class="pie-chart-legend"> ${this.slices.map(((e,t)=>{const i=this.sliceSelected===t;return Ee` <div class="pie-chart-legend-row ${i?"selected":""}" @click="${this.onSliceClicked(t)}" tabIndex="${i?"0":"-1"}"> <div class="pie-chart-size">${this.formatter(e.value)}</div> <div class="pie-chart-swatch" style="background-color: ${e.color};"></div> <div class="pie-chart-name">${e.title}</div> </div>`}))} <div class="pie-chart-legend-row ${this.totalSelected?"selected":""}" @click="${this.selectTotal}" tabIndex="${this.totalSelected?"0":"-1"}"> <div class="pie-chart-size">${this.formatter(this.total)}</div> <div class="pie-chart-swatch pie-chart-empty-swatch"></div> <div class="pie-chart-name">${Ce(xe.total)}</div> </div> </div> `:""} </div>`;Te(e,this.shadow,{host:this})}onSliceClicked(e){return()=>{this.selectSlice(e)}}selectSlice(e){this.totalSelected=!1,this.sliceSelected=e,this.render()}selectTotal(){this.totalSelected=!0,this.sliceSelected=-1,this.render()}selectAndFocusTotal(){this.selectTotal();const e=this.shadow.querySelector(".pie-chart-legend > :last-child");e&&e.focus()}selectAndFocusSlice(e){this.selectSlice(e);const t=this.shadow.querySelector(`.pie-chart-legend > :nth-child(${e+1})`);t&&t.focus()}focusNextElement(){this.totalSelected?this.selectAndFocusSlice(0):this.sliceSelected===this.slices.length-1?this.selectAndFocusTotal():this.selectAndFocusSlice(this.sliceSelected+1)}focusPreviousElement(){this.totalSelected?this.selectAndFocusSlice(this.slices.length-1):0===this.sliceSelected?this.selectAndFocusTotal():this.selectAndFocusSlice(this.sliceSelected-1)}onKeyDown(e){let t=!1;"ArrowDown"===e.key?(this.focusNextElement(),t=!0):"ArrowUp"===e.key&&(this.focusPreviousElement(),t=!0),t&&(e.stopImmediatePropagation(),e.preventDefault())}getPathStringForSlice(e){let t=e.value/this.total*2*Math.PI;if(!isFinite(t))return;t=Math.min(t,2*Math.PI*.9999);const i=Math.cos(this.lastAngle),s=Math.sin(this.lastAngle);this.lastAngle+=t;const r=Math.cos(this.lastAngle),n=Math.sin(this.lastAngle),o=this.innerR,a=r*o,l=n*o,h=i*o,d=s*o,c=t>Math.PI?1:0;return`M${i},${s} A1,1,0,${c},1,${r},${n} L${a},${l} A${o},${o},0,${c},0,${h},${d} Z`}}m.CustomElements.defineComponent("devtools-perf-piechart",Pe);var ke=Object.freeze({__proto__:null,PieChart:Pe});const De=new CSSStyleSheet;De.replaceSync(".overview-info:not(:empty){display:flex;background:var(--color-background);box-shadow:var(--drop-shadow);padding:3px}.overview-info .frame .time{display:none}.overview-info .frame .thumbnail img{max-width:50vw;max-height:50vh}\n/*# sourceURL=timelineOverviewInfo.css */\n");class Ie extends(e.ObjectWrapper.eventMixin(r.Widget.VBox)){overviewCalculator;overviewGrid;cursorArea;cursorElement;overviewControls;markers;overviewInfo;updateThrottler;cursorEnabled;cursorPosition;lastWidth;windowStartTime;windowEndTime;muteOnWindowChanged;constructor(t){super(),this.element.id=t+"-overview-pane",this.overviewCalculator=new Me,this.overviewGrid=new pe(t,this.overviewCalculator),this.element.appendChild(this.overviewGrid.element),this.cursorArea=this.overviewGrid.element.createChild("div","overview-grid-cursor-area"),this.cursorElement=this.overviewGrid.element.createChild("div","overview-grid-cursor-position"),this.cursorArea.addEventListener("mousemove",this.onMouseMove.bind(this),!0),this.cursorArea.addEventListener("mouseleave",this.hideCursor.bind(this),!0),this.overviewGrid.setResizeEnabled(!1),this.overviewGrid.addEventListener(ve.WindowChangedWithPosition,this.onWindowChanged,this),this.overviewGrid.setClickHandler(this.onClick.bind(this)),this.overviewControls=[],this.markers=new Map,this.overviewInfo=new We(this.cursorElement),this.updateThrottler=new e.Throttler.Throttler(100),this.cursorEnabled=!1,this.cursorPosition=0,this.lastWidth=0,this.windowStartTime=0,this.windowEndTime=1/0,this.muteOnWindowChanged=!1}onMouseMove(e){if(!this.cursorEnabled)return;const t=e,i=e.target;this.cursorPosition=t.offsetX+i.offsetLeft,this.cursorElement.style.left=this.cursorPosition+"px",this.cursorElement.style.visibility="visible",this.overviewInfo.setContent(this.buildOverviewInfo())}async buildOverviewInfo(){const e=this.element.ownerDocument,t=this.cursorPosition,i=await Promise.all(this.overviewControls.map((e=>e.overviewInfoPromise(t)))),s=e.createDocumentFragment(),r=i.filter((e=>null!==e));return s.append(...r),s}hideCursor(){this.cursorElement.style.visibility="hidden",this.overviewInfo.hide()}wasShown(){this.update()}willHide(){this.overviewInfo.hide()}onResize(){const e=this.element.offsetWidth;e!==this.lastWidth&&(this.lastWidth=e,this.scheduleUpdate())}setOverviewControls(e){for(let e=0;e<this.overviewControls.length;++e)this.overviewControls[e].dispose();for(let t=0;t<e.length;++t)e[t].setCalculator(this.overviewCalculator),e[t].show(this.overviewGrid.element);this.overviewControls=e,this.update()}setBounds(e,t){this.overviewCalculator.setBounds(e,t),this.overviewGrid.setResizeEnabled(!0),this.cursorEnabled=!0}setNavStartTimes(e){this.overviewCalculator.setNavStartTimes(e)}scheduleUpdate(){this.updateThrottler.schedule((async()=>{this.update()}))}update(){if(this.isShowing()){this.overviewCalculator.setDisplayWidth(this.overviewGrid.clientWidth());for(let e=0;e<this.overviewControls.length;++e)this.overviewControls[e].update();this.overviewGrid.updateDividers(this.overviewCalculator),this.updateMarkers(),this.updateWindow()}}setMarkers(e){this.markers=e}updateMarkers(){const e=new Map;for(const t of this.markers.keys()){const i=this.markers.get(t),s=Math.round(this.overviewCalculator.computePosition(t));e.has(s)||(e.set(s,i),i.style.left=s+"px")}this.overviewGrid.removeEventDividers(),this.overviewGrid.addEventDividers([...e.values()])}reset(){this.windowStartTime=0,this.windowEndTime=1/0,this.overviewCalculator.reset(),this.overviewGrid.reset(),this.overviewGrid.setResizeEnabled(!1),this.cursorEnabled=!1,this.hideCursor(),this.markers=new Map;for(const e of this.overviewControls)e.reset();this.overviewInfo.hide(),this.scheduleUpdate()}onClick(e){return this.overviewControls.some((t=>t.onClick(e)))}onWindowChanged(e){if(this.muteOnWindowChanged)return;if(!this.overviewControls.length)return;this.windowStartTime=e.data.rawStartValue===this.overviewCalculator.minimumBoundary()?0:e.data.rawStartValue,this.windowEndTime=e.data.rawEndValue===this.overviewCalculator.maximumBoundary()?1/0:e.data.rawEndValue;const t={startTime:this.windowStartTime,endTime:this.windowEndTime};this.dispatchEventToListeners(Re.WindowChanged,t)}setWindowTimes(e,t){e===this.windowStartTime&&t===this.windowEndTime||(this.windowStartTime=e,this.windowEndTime=t,this.updateWindow(),this.dispatchEventToListeners(Re.WindowChanged,{startTime:e,endTime:t}))}updateWindow(){if(!this.overviewControls.length)return;const e=this.overviewCalculator.minimumBoundary(),t=this.overviewCalculator.maximumBoundary()-e,i=e>0,s=i&&this.windowStartTime?Math.min((this.windowStartTime-e)/t,1):0,r=i&&this.windowEndTime<1/0?(this.windowEndTime-e)/t:1;this.muteOnWindowChanged=!0,this.overviewGrid.setWindow(s,r),this.muteOnWindowChanged=!1}}var Re;!function(e){e.WindowChanged="WindowChanged"}(Re||(Re={}));class Me{minimumBoundaryInternal;maximumBoundaryInternal;workingArea;navStartTimes;constructor(){this.reset()}computePosition(e){return(e-this.minimumBoundaryInternal)/this.boundarySpan()*this.workingArea}positionToTime(e){return e/this.workingArea*this.boundarySpan()+this.minimumBoundaryInternal}setBounds(e,t){this.minimumBoundaryInternal=e,this.maximumBoundaryInternal=t}setNavStartTimes(e){this.navStartTimes=e}setDisplayWidth(e){this.workingArea=e}reset(){this.setBounds(0,100)}formatValue(e,i){if(this.navStartTimes){const t=Array.from(this.navStartTimes.values());for(let i=t.length-1;i>=0;i--)if(e>t[i].startTime){e-=t[i].startTime-this.zeroTime();break}}return t.TimeUtilities.preciseMillisToString(e-this.zeroTime(),i)}maximumBoundary(){return this.maximumBoundaryInternal}minimumBoundary(){return this.minimumBoundaryInternal}zeroTime(){return this.minimumBoundaryInternal}boundarySpan(){return this.maximumBoundaryInternal-this.minimumBoundaryInternal}}class ze extends r.Widget.VBox{calculatorInternal;canvas;contextInternal;constructor(){super(),this.calculatorInternal=null,this.canvas=this.element.createChild("canvas","fill"),this.contextInternal=this.canvas.getContext("2d")}width(){return this.canvas.width}height(){return this.canvas.height}context(){if(!this.contextInternal)throw new Error("Unable to retrieve canvas context");return this.contextInternal}calculator(){return this.calculatorInternal}update(){this.resetCanvas()}dispose(){this.detach()}reset(){}async overviewInfoPromise(e){return null}setCalculator(e){this.calculatorInternal=e}onClick(e){return!1}resetCanvas(){this.element.clientWidth&&this.setCanvasSize(this.element.clientWidth,this.element.clientHeight)}setCanvasSize(e,t){this.canvas.width=e*window.devicePixelRatio,this.canvas.height=t*window.devicePixelRatio}}class We{anchorElement;glassPane;visible;element;constructor(e){this.anchorElement=e,this.glassPane=new r.GlassPane.GlassPane,this.glassPane.setPointerEventsBehavior("PierceContents"),this.glassPane.setMarginBehavior("Arrow"),this.glassPane.setSizeBehavior("MeasureContent"),this.visible=!1,this.element=r.Utils.createShadowRootWithCoreStyles(this.glassPane.contentElement,{cssFile:[De],delegatesFocus:void 0}).createChild("div","overview-info")}async setContent(e){this.visible=!0;const t=await e;this.visible&&(this.element.removeChildren(),this.element.appendChild(t),this.glassPane.setContentAnchorBox(this.anchorElement.boxInWindow()),this.glassPane.isShowing()||this.glassPane.show(this.anchorElement.ownerDocument))}hide(){this.visible=!1,this.glassPane.hide()}}var Ae=Object.freeze({__proto__:null,TimelineOverviewPane:Ie,get Events(){return Re},TimelineOverviewCalculator:Me,TimelineOverviewBase:ze,OverviewInfo:We});export{A as ChartViewport,_ as FilmStripView,M as FlameChart,v as Font,j as GCActionDelegate,Q as LineLevelProfile,ie as LiveHeapProfile,de as NetworkPriorities,ye as OverviewGrid,ke as PieChart,T as TimelineGrid,Ae as TimelineOverviewPane};
@@ -0,0 +1 @@
1
+ import*as e from"./quick_open.js";self.QuickOpen=self.QuickOpen||{},QuickOpen=QuickOpen||{},QuickOpen.CommandMenu=e.CommandMenu.CommandMenu,QuickOpen.CommandMenu.Command=e.CommandMenu.Command,QuickOpen.CommandMenu.ShowActionDelegate=e.CommandMenu.ShowActionDelegate,QuickOpen.CommandMenuProvider=e.CommandMenu.CommandMenuProvider,QuickOpen.CommandMenuProvider.MaterialPaletteColors=e.CommandMenu.MaterialPaletteColors,QuickOpen.FilteredListWidget=e.FilteredListWidget.FilteredListWidget,QuickOpen.FilteredListWidget.Provider=e.FilteredListWidget.Provider,QuickOpen.HelpQuickOpen=e.HelpQuickOpen.HelpQuickOpen,QuickOpen.QuickOpen=e.QuickOpen.QuickOpenImpl,QuickOpen.QuickOpen._history=e.QuickOpen.history,QuickOpen.QuickOpen.ShowActionDelegate=e.QuickOpen.ShowActionDelegate;
@@ -0,0 +1 @@
1
+ import*as t from"../../../../core/i18n/i18n.js";import*as e from"../../legacy.js";const o={openFile:"Open file",runCommand:"Run command"},n=t.i18n.registerUIStrings("ui/legacy/components/quick_open/quick_open-meta.ts",o),i=t.i18n.getLazilyComputedLocalizedString.bind(void 0,n);let a;async function s(){return a||(a=await import("./quick_open.js")),a}e.ActionRegistration.registerActionExtension({actionId:"commandMenu.show",category:e.ActionRegistration.ActionCategory.GLOBAL,title:i(o.runCommand),loadActionDelegate:async()=>(await s()).CommandMenu.ShowActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+P",keybindSets:["devToolsDefault","vsCode"]},{platform:"mac",shortcut:"Meta+Shift+P",keybindSets:["devToolsDefault","vsCode"]},{shortcut:"F1",keybindSets:["vsCode"]}]}),e.ActionRegistration.registerActionExtension({actionId:"quickOpen.show",category:e.ActionRegistration.ActionCategory.GLOBAL,title:i(o.openFile),loadActionDelegate:async()=>(await s()).QuickOpen.ShowActionDelegate.instance(),order:100,bindings:[{platform:"mac",shortcut:"Meta+P",keybindSets:["devToolsDefault","vsCode"]},{platform:"mac",shortcut:"Meta+O",keybindSets:["devToolsDefault","vsCode"]},{platform:"windows,linux",shortcut:"Ctrl+P",keybindSets:["devToolsDefault","vsCode"]},{platform:"windows,linux",shortcut:"Ctrl+O",keybindSets:["devToolsDefault","vsCode"]}]}),e.ContextMenu.registerItem({location:e.ContextMenu.ItemLocation.MAIN_MENU_DEFAULT,actionId:"commandMenu.show",order:void 0}),e.ContextMenu.registerItem({location:e.ContextMenu.ItemLocation.MAIN_MENU_DEFAULT,actionId:"quickOpen.show",order:void 0});
@@ -0,0 +1 @@
1
+ import*as e from"../../../../core/common/common.js";import*as t from"../../../../core/host/host.js";import*as i from"../../../../core/i18n/i18n.js";import*as r from"../../../../core/platform/platform.js";import*as s from"../../../../third_party/diff/diff.js";import*as o from"../../legacy.js";import*as n from"../../../../models/text_utils/text_utils.js";import*as l from"../../../components/text_prompt/text_prompt.js";import*as a from"../../../components/icon_button/icon_button.js";const d=new CSSStyleSheet;d.replaceSync('.filtered-list-widget{display:flex;flex-direction:column;flex:auto;border:1px solid transparent;--override-filtered-list-widget-highlight-text-background-color:rgb(255 255 255/25%)}.-theme-with-dark-background .filtered-list-widget,\n:host-context(.-theme-with-dark-background) .filtered-list-widget{--override-filtered-list-widget-highlight-text-background-color:rgb(255 255 255/75%)}.hbox{flex:0 0 40px;align-items:center}.filtered-list-widget-hint{color:var(--color-text-disabled);padding:12px}devtools-text-prompt{flex-grow:1;font-size:14px;font-family:".SFNSDisplay-Regular","Helvetica Neue","Lucida Grande",sans-serif;line-height:16px;padding:12px}.filtered-list-widget-progress{flex:none;background:rgb(0 0 0/20%);height:1px}.filtered-list-widget-progress-bar{background-color:var(--color-primary-variant);height:2px;width:100%;transform:scaleX(0);transform-origin:top left;opacity:100%;transition:none}.filtered-widget-progress-fade{opacity:0%;transition:opacity 500ms}.filtered-list-widget .vbox > div.container{flex:auto;overflow-x:hidden;overflow-y:auto}.filtered-list-widget-item-wrapper{color:var(--color-text-primary);display:flex;border-bottom:1px solid var(--color-details-hairline-light);font-family:".SFNSDisplay-Regular","Helvetica Neue","Lucida Grande",sans-serif;padding-left:8px;padding-right:8px}.filtered-list-widget-item-wrapper devtools-icon{align-self:center;flex:none;padding-right:8px}.filtered-list-widget-item-wrapper.selected{background-color:var(--color-primary-old)}.filtered-list-widget-item{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;align-self:center;font-size:12px;flex:auto}.filtered-list-widget-item.is-ignore-listed{opacity:50%}.filtered-list-widget-item.two-rows span.highlight{color:var(--color-primary-old)}.filtered-list-widget-item.one-row span.highlight{font-weight:bold}.filtered-list-widget-item .filtered-list-widget-title{flex:initial;overflow:hidden;text-overflow:ellipsis}.filtered-list-widget-item .filtered-list-widget-subtitle{flex:none;overflow:hidden;text-overflow:ellipsis;color:var(--color-text-secondary);display:flex;white-space:pre}.filtered-list-widget-item .filtered-list-widget-subtitle .first-part{flex-shrink:1000;overflow:hidden;text-overflow:ellipsis}.filtered-list-widget-item-wrapper .tag{padding:0 12px;border-radius:4px;line-height:24px;height:24px;align-self:center;flex-shrink:0}.filtered-list-widget-item-wrapper .deprecated-tag{font-size:11px;color:var(--color-text-secondary)}.filtered-list-widget-item-wrapper.selected .deprecated-tag{color:var(--color-background)}.-theme-with-dark-background .filtered-list-widget-item-wrapper.selected .deprecated-tag,\n:host-context(.-theme-with-dark-background) .filtered-list-widget-item-wrapper.selected .deprecated-tag{color:var(--color-background);opacity:80%}.filtered-list-widget-item-wrapper.selected .filtered-list-widget-item span.highlight{color:var(--color-background);background-color:var(--override-filtered-list-widget-highlight-text-background-color)}.filtered-list-widget-item-wrapper.selected .filtered-list-widget-title,\n.filtered-list-widget-item-wrapper.selected .filtered-list-widget-subtitle,\n.filtered-list-widget-item-wrapper.selected .tag{color:var(--color-background)}.filtered-list-widget-item-wrapper.selected devtools-icon{--icon-color:var(--icon-force-white)}.filtered-list-widget-item.one-row{height:36px;line-height:20px;padding-top:8px;padding-bottom:8px;display:flex}.filtered-list-widget-item.one-row .filtered-list-widget-title{padding-right:8px}.filtered-list-widget-item.two-rows{height:45px;padding-top:8px;padding-bottom:8px}.filtered-list-widget-item.two-rows .filtered-list-widget-title{font-weight:bold}.not-found-text{height:34px;line-height:34px;padding-left:8px;font-style:italic;color:var(--color-text-disabled);background:var(--color-background-elevation-0)}.quickpick-description{flex:none;overflow:hidden;text-overflow:ellipsis;color:var(--color-text-disabled);padding-left:15px}@media (forced-colors: active){.filtered-list-widget{forced-color-adjust:none;border-color:ButtonText}.filtered-list-widget-item-wrapper .filtered-list-widget-title,\n .filtered-list-widget-item-wrapper .filtered-list-widget-subtitle,\n .quickpick-description{color:ButtonText}.filtered-list-widget-item-wrapper.selected{background-color:Highlight}.filtered-list-widget-item-wrapper.selected .filtered-list-widget-item .filtered-list-widget-title,\n .filtered-list-widget-item-wrapper.selected .filtered-list-widget-item .filtered-list-widget-subtitle{color:HighlightText}devtools-text-prompt{border-color:ButtonText}}\n/*# sourceURL=filteredListWidget.css */\n');const c={quickOpenPrompt:"Quick open prompt",quickOpen:"Quick open",noResultsFound:"No results found"},h=i.i18n.registerUIStrings("ui/legacy/components/quick_open/FilteredListWidget.ts",c),m=i.i18n.getLocalizedString.bind(void 0,h);class g extends(e.ObjectWrapper.eventMixin(o.Widget.VBox)){promptHistory;scoringTimer;filterTimer;loadTimeout;refreshListWithCurrentResult;dialog;query="";inputBoxElement;hintElement;bottomElementsContainer;progressElement;progressBarElement;items;list;itemElementsContainer;notFoundElement;prefix="";provider;queryChangedCallback;constructor(e,t,i){super(!0),this.promptHistory=t||[],this.scoringTimer=0,this.filterTimer=0,this.loadTimeout=0,this.contentElement.classList.add("filtered-list-widget");const r=this.onKeyDown.bind(this);this.contentElement.addEventListener("keydown",r,!0),o.ARIAUtils.markAsCombobox(this.contentElement);const s=this.contentElement.createChild("div","hbox");this.inputBoxElement=new l.TextPrompt.TextPrompt,this.inputBoxElement.data={ariaLabel:m(c.quickOpenPrompt),prefix:"",suggestion:""},this.inputBoxElement.addEventListener(l.TextPrompt.PromptInputEvent.eventName,this.onInput.bind(this),!1),s.appendChild(this.inputBoxElement),this.hintElement=s.createChild("span","filtered-list-widget-hint"),this.bottomElementsContainer=this.contentElement.createChild("div","vbox"),this.progressElement=this.bottomElementsContainer.createChild("div","filtered-list-widget-progress"),this.progressBarElement=this.progressElement.createChild("div","filtered-list-widget-progress-bar"),this.items=new o.ListModel.ListModel,this.list=new o.ListControl.ListControl(this.items,this,o.ListControl.ListMode.EqualHeightItems),this.itemElementsContainer=this.list.element,this.itemElementsContainer.classList.add("container"),this.bottomElementsContainer.appendChild(this.itemElementsContainer),this.itemElementsContainer.addEventListener("click",this.onClick.bind(this),!1),this.itemElementsContainer.addEventListener("mousemove",this.onMouseMove.bind(this),!1),o.ARIAUtils.markAsListBox(this.itemElementsContainer),o.ARIAUtils.setControls(this.inputBoxElement,this.itemElementsContainer),o.ARIAUtils.setAutocomplete(this.inputBoxElement,o.ARIAUtils.AutocompleteInteractionModel.list),this.notFoundElement=this.bottomElementsContainer.createChild("div","not-found-text"),this.notFoundElement.classList.add("hidden"),this.setDefaultFocusedElement(this.inputBoxElement),this.provider=e,this.queryChangedCallback=i}static highlightRanges(e,t,i){if(!t)return!1;function r(e,t){const i=s.Diff.DiffWrapper.charDiff(t,e);let r=0;const o=[];for(let e=0;e<i.length;++e){const t=i[e];if(t[0]===s.Diff.Operation.Equal)o.push(new n.TextRange.SourceRange(r,t[1].length));else if(t[0]!==s.Diff.Operation.Insert)return null;r+=t[1].length}return o}if(null===e.textContent)return!1;const l=e.textContent;let a=r(l,t);return a&&!i||(a=r(l.toUpperCase(),t.toUpperCase())),!!a&&(o.UIUtils.highlightRangesWithStyleClass(e,a,"highlight"),!0)}setCommandPrefix(e){this.inputBoxElement.setPrefix(e)}setCommandSuggestion(e){this.inputBoxElement.setSuggestion(e)}setHintElement(e){this.hintElement.textContent=e}setPromptTitle(e){o.ARIAUtils.setLabel(this.inputBoxElement,e)}showAsDialog(e){e||(e=m(c.quickOpen)),this.dialog=new o.Dialog.Dialog,o.ARIAUtils.setLabel(this.dialog.contentElement,e),this.dialog.setMaxContentSize(new o.Geometry.Size(504,340)),this.dialog.setSizeBehavior("SetExactWidthMaxHeight"),this.dialog.setContentPosition(null,22),this.dialog.contentElement.style.setProperty("border-radius","4px"),this.show(this.dialog.contentElement),o.ARIAUtils.setExpanded(this.contentElement,!0),this.dialog.once("hidden").then((()=>{this.dispatchEventToListeners("hidden")})),this.dialog.show()}setPrefix(e){this.prefix=e}setProvider(e){e!==this.provider&&(this.provider&&this.provider.detach(),this.clearTimers(),this.provider=e,this.isShowing()&&this.attachProvider())}setQuerySelectedRange(e,t){this.inputBoxElement.setSelectedRange(e,t)}attachProvider(){this.items.replaceAll([]),this.list.invalidateItemHeight(),this.provider&&(this.provider.setRefreshCallback(this.itemsLoaded.bind(this,this.provider)),this.provider.attach()),this.itemsLoaded(this.provider)}cleanValue(){return this.query.substring(this.prefix.length).trim()}wasShown(){this.registerCSSFiles([d]),this.attachProvider()}willHide(){this.provider&&this.provider.detach(),this.clearTimers(),o.ARIAUtils.setExpanded(this.contentElement,!1)}clearTimers(){clearTimeout(this.filterTimer),clearTimeout(this.scoringTimer),clearTimeout(this.loadTimeout),this.filterTimer=0,this.scoringTimer=0,this.loadTimeout=0,this.refreshListWithCurrentResult=void 0}onEnter(e){if(!this.provider)return;e.preventDefault();const t=this.provider.itemCount()?this.list.selectedItem():null;this.selectItem(t),this.dialog&&this.dialog.hide()}itemsLoaded(e){this.loadTimeout||e!==this.provider||(this.loadTimeout=window.setTimeout(this.updateAfterItemsLoaded.bind(this),0))}updateAfterItemsLoaded(){this.loadTimeout=0,this.filterItems()}createElementForItem(e){const t=document.createElement("div");t.className="filtered-list-widget-item-wrapper";const i=t.createChild("div"),r=this.provider&&this.provider.renderAsTwoRows();i.className="filtered-list-widget-item "+(r?"two-rows":"one-row");const s=i.createChild("div","filtered-list-widget-title"),n=i.createChild("div","filtered-list-widget-subtitle");return n.textContent="​",this.provider&&this.provider.renderItem(e,this.cleanValue(),s,n),o.ARIAUtils.markAsOption(i),t}heightForItem(e){return 0}isItemSelectable(e){return!0}selectedItemChanged(e,t,i,r){i&&i.classList.remove("selected"),r&&r.classList.add("selected"),o.ARIAUtils.setActiveDescendant(this.inputBoxElement,r)}onClick(e){const t=this.list.itemForNode(e.target);null!==t&&(e.consume(!0),this.selectItem(t),this.dialog&&this.dialog.hide())}onMouseMove(e){const t=this.list.itemForNode(e.target);null!==t&&this.list.selectItem(t)}setQuery(e){this.query=e,this.inputBoxElement.focus(),this.inputBoxElement.setText(e),this.queryChanged(),this.scheduleFilter()}tabKeyPressed(){const e=this.query;let t;for(let i=this.promptHistory.length-1;i>=0;i--)if(this.promptHistory[i]!==e&&this.promptHistory[i].startsWith(e)){t=this.promptHistory[i];break}if(t){const i=this.inputBoxElement.getComponentSelection();return i&&""!==i.toString().trim()?(this.setQuery(t),!0):(this.inputBoxElement.focus(),this.inputBoxElement.setText(t),this.setQuerySelectedRange(e.length,t.length),!0)}return this.list.selectNextItem(!0,!1)}itemsFilteredForTest(){}filterItems(){if(this.filterTimer=0,this.scoringTimer&&(clearTimeout(this.scoringTimer),this.scoringTimer=0,this.refreshListWithCurrentResult&&this.refreshListWithCurrentResult()),!this.provider)return this.bottomElementsContainer.classList.toggle("hidden",!0),void this.itemsFilteredForTest();this.bottomElementsContainer.classList.toggle("hidden",!1),this.progressBarElement.style.transform="scaleX(0)",this.progressBarElement.classList.remove("filtered-widget-progress-fade","hidden");const e=this.provider.rewriteQuery(this.cleanValue()),t=e?r.StringUtilities.filterRegex(e):null,i=[],s=[],o=[],n=100;let l=0;const a=[],d=window.performance.now(),c=r.NumberUtilities.clamp(10,500,this.provider.itemCount()/10|0);function h(e,t){return t-e}(function m(g){if(!this.provider)return;this.scoringTimer=0;let p,u=0;for(p=g;p<this.provider.itemCount()&&u<c;++p){if(t&&!t.test(this.provider.itemKeyAt(p)))continue;const d=this.provider.itemScoreAt(p,e);if(e&&u++,d>l||s.length<n){const e=r.ArrayUtilities.upperBound(s,d,h);if(s.splice(e,0,d),o.splice(e,0,p),s.length>n){const e=o[o.length-1];e&&a.push(e),s.length=n,o.length=n}const t=s[s.length-1];t&&(l=t)}else i.push(p)}if(this.refreshListWithCurrentResult=this.refreshList.bind(this,o,a,i),p<this.provider.itemCount())return this.scoringTimer=window.setTimeout(m.bind(this,p),0),void(window.performance.now()-d>50&&(this.progressBarElement.style.transform="scaleX("+p/this.provider.itemCount()+")"));window.performance.now()-d>100?(this.progressBarElement.style.transform="scaleX(1)",this.progressBarElement.classList.add("filtered-widget-progress-fade")):this.progressBarElement.classList.add("hidden");this.refreshListWithCurrentResult()}).call(this,0)}refreshList(e,t,i){this.refreshListWithCurrentResult=void 0,i=[...e,...t,...i],this.updateNotFoundMessage(Boolean(i.length));const r=this.list.element.offsetHeight;this.items.replaceAll(i),i.length&&this.list.selectItem(i[0]),this.list.element.offsetHeight!==r&&this.list.viewportResized(),this.itemsFilteredForTest()}updateNotFoundMessage(e){this.list.element.classList.toggle("hidden",!e),this.notFoundElement.classList.toggle("hidden",e),!e&&this.provider&&(this.notFoundElement.textContent=this.provider.notFoundText(this.cleanValue()),o.ARIAUtils.alert(this.notFoundElement.textContent))}onInput(e){this.query=e.data,this.queryChanged(),this.scheduleFilter()}async queryChanged(){this.hintElement.classList.toggle("hidden",Boolean(this.query)),this.queryChangedCallback&&await this.queryChangedCallback(this.query),this.provider&&this.provider.queryChanged(this.cleanValue())}updateSelectedItemARIA(e,t){return!1}onKeyDown(e){let t=!1;switch(e.key){case r.KeyboardUtilities.ENTER_KEY:return void this.onEnter(e);case r.KeyboardUtilities.TAB_KEY:if(e.shiftKey){t=this.list.selectPreviousItem(!0,!1);break}t=this.tabKeyPressed();break;case"ArrowUp":t=this.list.selectPreviousItem(!0,!1);break;case"ArrowDown":t=this.list.selectNextItem(!0,!1);break;case"PageUp":t=this.list.selectItemPreviousPage(!1);break;case"PageDown":t=this.list.selectItemNextPage(!1)}t&&e.consume(!0)}scheduleFilter(){this.filterTimer||(this.filterTimer=window.setTimeout(this.filterItems.bind(this),0))}selectItem(e){this.promptHistory.push(this.query),this.promptHistory.length>100&&this.promptHistory.shift(),this.provider&&this.provider.selectItem(e,this.cleanValue())}}class p{refreshCallback;constructor(){}setRefreshCallback(e){this.refreshCallback=e}attach(){}itemCount(){return 0}itemKeyAt(e){return""}itemScoreAt(e,t){return 1}renderItem(e,t,i,r){}renderAsTwoRows(){return!1}selectItem(e,t){}refresh(){this.refreshCallback&&this.refreshCallback()}rewriteQuery(e){return e}queryChanged(e){}notFoundText(e){return m(c.noResultsFound)}detach(){}}const u=[];function f(e){u.push(e)}function w(){return u}var v=Object.freeze({__proto__:null,FilteredListWidget:g,Provider:p,registerProvider:f,getRegisteredProviders:w});const x={typeToSeeAvailableCommands:"Type ? to see available commands"},C=i.i18n.registerUIStrings("ui/legacy/components/quick_open/QuickOpen.ts",x),y=i.i18n.getLocalizedString.bind(void 0,C),b=[];class E{prefix;prefixes;providers;filteredListWidget;constructor(){this.prefix=null,this.prefixes=[],this.providers=new Map,this.filteredListWidget=null,w().forEach(this.addProvider.bind(this)),this.prefixes.sort(((e,t)=>t.length-e.length))}static show(e){const t=new this,i=new g(null,b,t.queryChanged.bind(t));t.filteredListWidget=i,i.setHintElement(y(x.typeToSeeAvailableCommands)),i.showAsDialog(),i.setQuery(e)}addProvider(e){const t=e.prefix;null!==t&&(this.prefixes.push(t),this.providers.set(t,{provider:e.provider,titlePrefix:e.titlePrefix,titleSuggestion:e.titleSuggestion}))}async queryChanged(e){const t=this.prefixes.find((t=>e.startsWith(t)));if("string"!=typeof t)return;if(!this.filteredListWidget)return;this.filteredListWidget.setPrefix(t);const i=this.providers.get(t)?.titlePrefix;this.filteredListWidget.setCommandPrefix(i?i():"");const r=e===t&&this.providers.get(t)?.titleSuggestion;if(this.filteredListWidget.setCommandSuggestion(r?r():""),this.prefix===t)return;this.prefix=t,this.filteredListWidget.setProvider(null);const s=this.providers.get(t)?.provider;if(!s)return;const o=await s();this.prefix===t&&this.filteredListWidget&&(this.filteredListWidget.setProvider(o),this.providerLoadedForTest(o))}providerLoadedForTest(e){}}let A;class k{static instance(e={forceNew:null}){const{forceNew:t}=e;return A&&!t||(A=new k),A}handleAction(e,t){return"quickOpen.show"===t&&(E.show(""),!0)}}var L=Object.freeze({__proto__:null,history:b,QuickOpenImpl:E,ShowActionDelegate:k});const R={oneOrMoreSettingsHaveChanged:"One or more settings have changed which requires a reload to take effect.",noCommandsFound:"No commands found",run:"Run",command:"Command",deprecated:"— deprecated"},I=i.i18n.registerUIStrings("ui/legacy/components/quick_open/CommandMenu.ts",R),S=i.i18n.getLocalizedString.bind(void 0,I);let T;class P{commandsInternal;constructor(){this.commandsInternal=[],this.loadCommands()}static instance(e={forceNew:null}){const{forceNew:t}=e;return T&&!t||(T=new P),T}static createCommand(e){const{category:i,keys:r,title:s,shortcut:o,executeHandler:n,availableHandler:l,userActionCode:a,deprecationWarning:d,isPanelOrDrawer:c}=e;let h=n;if(a){const e=a;h=()=>{t.userMetrics.actionTaken(e),n()}}return new H(i,s,r,o,h,l,d,c)}static createSettingCommand(t,i,r){const s=t.category();if(!s)throw new Error(`Creating '${i}' setting command failed. Setting has no category.`);const n=t.tags()||"",l=Boolean(t.reloadRequired());return P.createCommand({category:e.Settings.getLocalizedSettingsCategory(s),keys:n,title:i,shortcut:"",executeHandler:()=>{!t.deprecation?.disabled||t.deprecation?.experiment&&!t.deprecation.experiment.isEnabled()?(t.set(r),l&&o.InspectorView.InspectorView.instance().displayReloadRequiredWarning(S(R.oneOrMoreSettingsHaveChanged))):e.Revealer.reveal(t)},availableHandler:function(){return t.get()!==r},userActionCode:void 0,deprecationWarning:t.deprecation?.warning})}static createActionCommand(e){const{action:t,userActionCode:i}=e,r=t.category();if(!r)throw new Error(`Creating '${t.title()}' action command failed. Action has no category.`);let s;r===o.ActionRegistration.ActionCategory.DRAWER&&(s=F.DRAWER);const n=o.ShortcutRegistry.ShortcutRegistry.instance().shortcutTitleForAction(t.id())||"";return P.createCommand({category:o.ActionRegistration.getLocalizedActionCategory(r),keys:t.tags()||"",title:t.title(),shortcut:n,executeHandler:t.execute.bind(t),userActionCode:i,availableHandler:void 0,isPanelOrDrawer:s})}static createRevealViewCommand(e){const{title:i,tags:r,category:s,userActionCode:n,id:l}=e;if(!s)throw new Error(`Creating '${i}' reveal view command failed. Reveal view has no category.`);let a;s===o.ViewManager.ViewLocationCategory.PANEL?a=F.PANEL:s===o.ViewManager.ViewLocationCategory.DRAWER&&(a=F.DRAWER);return P.createCommand({category:o.ViewManager.getLocalizedViewLocationCategory(s),keys:r,title:i,shortcut:"",executeHandler:()=>("issues-pane"===l&&t.userMetrics.issuesPanelOpenedFrom(t.UserMetrics.IssueOpener.CommandMenu),o.ViewManager.ViewManager.instance().showView(l,!0)),userActionCode:n,availableHandler:void 0,isPanelOrDrawer:a})}loadCommands(){const t=new Map;for(const{category:e,name:i}of o.ViewManager.getRegisteredLocationResolvers())e&&i&&t.set(i,e);const i=o.ViewManager.getRegisteredViewExtensions();for(const e of i){const i=e.location(),r=i&&t.get(i);if(!r)continue;const s={title:e.commandPrompt(),tags:e.tags()||"",category:r,userActionCode:void 0,id:e.viewId()};this.commandsInternal.push(P.createRevealViewCommand(s))}const r=e.Settings.getRegisteredSettings();for(const t of r){const i=t.options;if(i&&t.category)for(const r of i){const i=e.Settings.Settings.instance().moduleSetting(t.settingName);this.commandsInternal.push(P.createSettingCommand(i,r.title(),r.value))}}}commands(){return this.commandsInternal}}var F;!function(e){e.PANEL="PANEL",e.DRAWER="DRAWER"}(F||(F={}));class W extends p{commands;constructor(e=[]){super(),this.commands=e}attach(){const e=P.instance().commands(),t=o.ActionRegistry.ActionRegistry.instance().availableActions();for(const e of t){if(!e.category())continue;const t={action:e,userActionCode:void 0};this.commands.push(P.createActionCommand(t))}for(const t of e)t.available()&&this.commands.push(t);this.commands=this.commands.sort((function(e,t){const i=r.StringUtilities.compare(e.category,t.category);return i||r.StringUtilities.compare(e.title,t.title)}))}detach(){this.commands=[]}itemCount(){return this.commands.length}itemKeyAt(e){return this.commands[e].key}itemScoreAt(e,t){const i=this.commands[e];let r=s.Diff.DiffWrapper.characterScore(t.toLowerCase(),i.title.toLowerCase());return i.isPanelOrDrawer===F.PANEL?r+=2:i.isPanelOrDrawer===F.DRAWER&&(r+=1),r}renderItem(e,t,i,s){const n=this.commands[e];i.removeChildren(),o.UIUtils.createTextChild(i,n.title),g.highlightRanges(i,t,!0),s.textContent=n.shortcut;const l=n.deprecationWarning;if(l){const e=i.parentElement?.createChild("span","deprecated-tag");e&&(e.textContent=S(R.deprecated),e.title=l)}const a=i.parentElement?.parentElement?.createChild("span","tag");if(!a)return;const d=r.StringUtilities.hashCode(n.category)%B.length;a.style.backgroundColor=B[d],a.style.color="var(--color-background)",a.textContent=n.category}selectItem(e,i){null!==e&&(this.commands[e].execute(),t.userMetrics.actionTaken(t.UserMetrics.Action.SelectCommandFromCommandMenu))}notFoundText(){return S(R.noCommandsFound)}}const B=["#F44336","#E91E63","#9C27B0","#673AB7","#3F51B5","#03A9F4","#00BCD4","#009688","#4CAF50","#8BC34A","#CDDC39","#FFC107","#FF9800","#FF5722","#795548","#9E9E9E","#607D8B"];class H{category;title;key;shortcut;deprecationWarning;isPanelOrDrawer;#e;#t;constructor(e,t,i,r,s,o,n,l){this.category=e,this.title=t,this.key=e+"\0"+t+"\0"+i,this.shortcut=r,this.#e=s,this.#t=o,this.deprecationWarning=n,this.isPanelOrDrawer=l}available(){return!this.#t||this.#t()}execute(){return this.#e()}}let D;class M{static instance(e={forceNew:null}){const{forceNew:t}=e;return D&&!t||(D=new M),D}handleAction(e,i){return t.InspectorFrontendHost.InspectorFrontendHostInstance.bringToFront(),E.show(">"),!0}}f({prefix:">",iconName:"chevron-right",iconWidth:"20px",provider:()=>Promise.resolve(new W),titlePrefix:()=>S(R.run),titleSuggestion:()=>S(R.command)});var N=Object.freeze({__proto__:null,CommandMenu:P,get PanelOrDrawer(){return F},CommandMenuProvider:W,MaterialPaletteColors:B,Command:H,ShowActionDelegate:M});class U extends p{providers;constructor(){super(),this.providers=[],w().forEach(this.addProvider.bind(this))}addProvider(e){e.titleSuggestion&&this.providers.push({prefix:e.prefix||"",iconName:e.iconName,iconWidth:e.iconWidth,title:e.titlePrefix()+" "+e.titleSuggestion()})}itemCount(){return this.providers.length}itemKeyAt(e){return this.providers[e].prefix}itemScoreAt(e,t){return-this.providers[e].prefix.length}renderItem(e,t,i,r){const s=this.providers[e],n=new a.Icon.Icon;n.data={iconName:s.iconName,color:"var(--icon-default)",width:s.iconWidth},i.parentElement?.parentElement?.insertBefore(n,i.parentElement),o.UIUtils.createTextChild(i,s.title)}selectItem(e,t){null!==e&&E.show(this.providers[e].prefix)}renderAsTwoRows(){return!1}}f({prefix:"?",iconName:"help",iconWidth:"20px",provider:()=>Promise.resolve(new U),titlePrefix:()=>"Help",titleSuggestion:void 0});var q=Object.freeze({__proto__:null,HelpQuickOpen:U});export{N as CommandMenu,v as FilteredListWidget,q as HelpQuickOpen,L as QuickOpen};
@@ -0,0 +1 @@
1
+ import*as e from"./source_frame.js";self.SourceFrame=self.SourceFrame||{},SourceFrame=SourceFrame||{},SourceFrame.BinaryResourceViewFactory=e.BinaryResourceViewFactory.BinaryResourceViewFactory,SourceFrame.FontView=e.FontView.FontView,SourceFrame.ImageView=e.ImageView.ImageView,SourceFrame.JSONView=e.JSONView.JSONView,SourceFrame.ParsedJSON=e.JSONView.ParsedJSON,SourceFrame.PreviewFactory=e.PreviewFactory.PreviewFactory,SourceFrame.ResourceSourceFrame=e.ResourceSourceFrame.ResourceSourceFrame,SourceFrame.ResourceSourceFrame.SearchableContainer=e.ResourceSourceFrame.SearchableContainer,SourceFrame.SourceFrame=e.SourceFrame.SourceFrameImpl,SourceFrame.LineDecorator=e.SourceFrame.LineDecorator,SourceFrame.XMLView=e.XMLView.XMLView,SourceFrame.XMLView.Node=e.XMLView.XMLViewNode;
@@ -0,0 +1 @@
1
+ import*as t from"../../../../core/common/common.js";import*as e from"../../../../core/i18n/i18n.js";const a={defaultIndentation:"Default indentation:",setIndentationToSpaces:"Set indentation to 2 spaces",Spaces:"2 spaces",setIndentationToFSpaces:"Set indentation to 4 spaces",fSpaces:"4 spaces",setIndentationToESpaces:"Set indentation to 8 spaces",eSpaces:"8 spaces",setIndentationToTabCharacter:"Set indentation to tab character",tabCharacter:"Tab character"},n=e.i18n.registerUIStrings("ui/legacy/components/source_frame/source_frame-meta.ts",a),i=e.i18n.getLazilyComputedLocalizedString.bind(void 0,n);t.Settings.registerSettingExtension({category:t.Settings.SettingCategory.SOURCES,storageType:t.Settings.SettingStorageType.Synced,title:i(a.defaultIndentation),settingName:"textEditorIndent",settingType:t.Settings.SettingType.ENUM,defaultValue:" ",options:[{title:i(a.setIndentationToSpaces),text:i(a.Spaces),value:" "},{title:i(a.setIndentationToFSpaces),text:i(a.fSpaces),value:" "},{title:i(a.setIndentationToESpaces),text:i(a.eSpaces),value:" "},{title:i(a.setIndentationToTabCharacter),text:i(a.tabCharacter),value:"\t"}]});
@@ -0,0 +1 @@
1
+ import*as e from"../../../../models/text_utils/text_utils.js";import*as t from"../../../../core/i18n/i18n.js";import*as r from"../../legacy.js";import*as n from"../../../../core/common/common.js";import*as i from"../../../../core/platform/platform.js";import*as s from"../../../../models/formatter/formatter.js";import*as o from"../../../../third_party/codemirror.next/codemirror.next.js";import*as a from"../../../components/code_highlighter/code_highlighter.js";import*as l from"../../../components/text_editor/text_editor.js";import*as c from"../../../../core/host/host.js";import*as h from"../../../../models/workspace/workspace.js";import*as d from"../../../../core/sdk/sdk.js";import*as u from"../object_ui/object_ui.js";const m=["application/javascript","application/json","application/manifest+json","text/css","text/html","text/javascript","text/x-scss"];var p={cssContent:".searchable-view{flex:1}.toolbar{background-color:var(--color-background-elevation-2);border-top:1px solid var(--color-details-hairline)}"};const g={source:"Source",prettyPrint:"Pretty print",loading:"Loading…",dSelectionRegions:"{PH1} selection regions",bytecodePositionXs:"Bytecode position `0x`{PH1}",lineSColumnS:"Line {PH1}, Column {PH2}",dCharactersSelected:"{PH1} characters selected",dLinesDCharactersSelected:"{PH1} lines, {PH2} characters selected"},w=t.i18n.registerUIStrings("ui/legacy/components/source_frame/SourceFrame.ts",g),f=t.i18n.getLocalizedString.bind(void 0,w);class x extends(n.ObjectWrapper.eventMixin(r.View.SimpleView)){options;lazyContent;prettyInternal;rawContent;formattedMap;prettyToggle;shouldAutoPrettyPrint;progressToolbarItem;textEditorInternal;baseDoc;prettyBaseDoc=null;displayedSelection=null;searchConfig;delayedFindSearchMatches;currentSearchResultIndex;searchResults;searchRegex;loadError;muteChangeEventsForSetContent;sourcePosition;searchableView;editable;positionToReveal;lineToScrollTo;selectionToSet;loadedInternal;contentRequested;wasmDisassemblyInternal;contentSet;constructor(e,t={}){super(f(g.source)),this.options=t,this.lazyContent=e,this.prettyInternal=!1,this.rawContent=null,this.formattedMap=null,this.prettyToggle=new r.Toolbar.ToolbarToggle(f(g.prettyPrint),"brackets"),this.prettyToggle.addEventListener(r.Toolbar.ToolbarButton.Events.Click,(()=>{this.setPretty(!this.prettyToggle.toggled())})),this.shouldAutoPrettyPrint=!1,this.prettyToggle.setVisible(!1),this.progressToolbarItem=new r.Toolbar.ToolbarItem(document.createElement("div")),this.textEditorInternal=new l.TextEditor.TextEditor(this.placeholderEditorState("")),this.textEditorInternal.style.flexGrow="1",this.element.appendChild(this.textEditorInternal),this.element.addEventListener("keydown",(e=>{e.defaultPrevented&&e.stopPropagation()})),this.baseDoc=this.textEditorInternal.state.doc,this.searchConfig=null,this.delayedFindSearchMatches=null,this.currentSearchResultIndex=-1,this.searchResults=[],this.searchRegex=null,this.loadError=!1,this.muteChangeEventsForSetContent=!1,this.sourcePosition=new r.Toolbar.ToolbarText,this.searchableView=null,this.editable=!1,this.positionToReveal=null,this.lineToScrollTo=null,this.selectionToSet=null,this.loadedInternal=!1,this.contentRequested=!1,this.wasmDisassemblyInternal=null,this.contentSet=!1,n.Settings.Settings.instance().moduleSetting("textEditorIndent").addChangeListener(this.#e,this)}disposeView(){n.Settings.Settings.instance().moduleSetting("textEditorIndent").removeChangeListener(this.#e,this)}async#e(){this.prettyInternal&&(await this.setPretty(!1),await this.setPretty(!0))}placeholderEditorState(e){return o.EditorState.create({doc:e,extensions:[o.EditorState.readOnly.of(!0),!1!==this.options.lineNumbers?o.lineNumbers():[],l.Config.theme()]})}editorConfiguration(e){return[o.EditorView.updateListener.of((e=>this.dispatchEventToListeners("EditorUpdate",e))),l.Config.baseConfiguration(e),l.Config.closeBrackets,l.Config.autocompletion.instance(),l.Config.showWhitespace.instance(),l.Config.allowScrollPastEof.instance(),o.Prec.lowest(l.Config.codeFolding.instance()),l.Config.autoDetectIndent.instance(),V,o.EditorView.domEventHandlers({focus:()=>this.onFocus(),blur:()=>this.onBlur(),scroll:()=>this.dispatchEventToListeners("EditorScroll"),contextmenu:e=>this.onContextMenu(e)}),o.lineNumbers({domEventHandlers:{contextmenu:(e,t,r)=>this.onLineGutterContextMenu(t.from,r)}}),o.EditorView.updateListener.of((e=>{(e.selectionSet||e.docChanged)&&this.updateSourcePosition(),e.docChanged&&this.onTextChanged()})),C,o.Prec.lowest(R),y.language.of([]),this.wasmDisassemblyInternal?(t=this.wasmDisassemblyInternal,N.init((e=>{const r=[];for(const n of t.nonBreakableLineNumbers())n<e.doc.lines&&r.push(P.range(e.doc.line(n+1).from));return o.RangeSet.of(r)}))):N,this.options.lineWrapping?o.EditorView.lineWrapping:[],!1!==this.options.lineNumbers?o.lineNumbers():[]];var t}onBlur(){}onFocus(){this.resetCurrentSearchResultIndex()}get wasmDisassembly(){return this.wasmDisassemblyInternal}editorLocationToUILocation(e,t){return this.wasmDisassemblyInternal?(t=this.wasmDisassemblyInternal.lineNumberToBytecodeOffset(e),e=0):this.prettyInternal&&([e,t]=this.prettyToRawLocation(e,t)),{lineNumber:e,columnNumber:t}}uiLocationToEditorLocation(e,t=0){return this.wasmDisassemblyInternal?(e=this.wasmDisassemblyInternal.bytecodeOffsetToLineNumber(t),t=0):this.prettyInternal&&([e,t]=this.rawToPrettyLocation(e,t)),{lineNumber:e,columnNumber:t}}setCanPrettyPrint(e,t){this.shouldAutoPrettyPrint=e&&Boolean(t),this.prettyToggle.setVisible(e)}setEditable(e){this.editable=e,this.loaded&&e!==!this.textEditor.state.readOnly&&this.textEditor.dispatch({effects:y.editable.reconfigure(o.EditorState.readOnly.of(!e))})}async setPretty(e){this.prettyInternal=e,this.prettyToggle.setEnabled(!1);const t=this.loaded,{textEditor:r}=this,n=r.state.selection.main,i=r.toLineColumn(n.from),a=r.toLineColumn(n.to);let l;if(this.prettyInternal){const e=this.rawContent instanceof o.Text?this.rawContent.sliceString(0):this.rawContent||"",t=await s.ScriptFormatter.formatScriptContent(this.contentType,e);this.formattedMap=t.formattedMapping,await this.setContent(t.formattedContent),this.prettyBaseDoc=r.state.doc;const n=this.rawToPrettyLocation(i.lineNumber,i.columnNumber),c=this.rawToPrettyLocation(a.lineNumber,a.columnNumber);l=r.createSelection({lineNumber:n[0],columnNumber:n[1]},{lineNumber:c[0],columnNumber:c[1]})}else{await this.setContent(this.rawContent||""),this.baseDoc=r.state.doc;const e=this.prettyToRawLocation(i.lineNumber,i.columnNumber),t=this.prettyToRawLocation(a.lineNumber,a.columnNumber);l=r.createSelection({lineNumber:e[0],columnNumber:e[1]},{lineNumber:t[0],columnNumber:t[1]})}t&&r.revealPosition(l,!1),this.prettyToggle.setEnabled(!0),this.updatePrettyPrintState()}getLineNumberFormatter(){if(!1===this.options.lineNumbers)return[];let e=null;if(this.wasmDisassemblyInternal){const t=this.wasmDisassemblyInternal,r=t.lineNumberToBytecodeOffset(t.lineNumbers-1).toString(16).length+1;e=e=>`0x${t.lineNumberToBytecodeOffset(Math.min(t.lineNumbers,e)-1).toString(16).padStart(r,"0")}`}else this.prettyInternal&&(e=e=>{const t=this.prettyToRawLocation(e-1,0)[0]+1;return 1===e||t!==this.prettyToRawLocation(e-2,0)[0]+1?String(t):"-"});return e?o.lineNumbers({formatNumber:e}):[]}updateLineNumberFormatter(){this.textEditor.dispatch({effects:y.lineNumbers.reconfigure(this.getLineNumberFormatter())})}updatePrettyPrintState(){this.prettyToggle.setToggled(this.prettyInternal),this.textEditorInternal.classList.toggle("pretty-printed",this.prettyInternal),this.updateLineNumberFormatter()}prettyToRawLocation(e,t=0){return this.formattedMap?this.formattedMap.formattedToOriginal(e,t):[e,t]}rawToPrettyLocation(e,t){return this.formattedMap?this.formattedMap.originalToFormatted(e,t):[e,t]}hasLoadError(){return this.loadError}wasShown(){this.ensureContentLoaded(),this.wasShownOrLoaded()}willHide(){super.willHide(),this.clearPositionToReveal()}async toolbarItems(){return[this.prettyToggle,this.sourcePosition,this.progressToolbarItem]}get loaded(){return this.loadedInternal}get textEditor(){return this.textEditorInternal}get pretty(){return this.prettyInternal}get contentType(){return this.loadError?"":this.getContentType()}getContentType(){return""}async ensureContentLoaded(){this.contentRequested||(this.contentRequested=!0,await this.setDeferredContent(this.lazyContent()),this.contentSet=!0)}async setDeferredContent(t){const i=new r.ProgressIndicator.ProgressIndicator;i.setTitle(f(g.loading)),i.setTotalWork(100),this.progressToolbarItem.element.appendChild(i.element),i.setWorked(1);const s=await t;let a,l;if(null===s.content)a=s.error,this.rawContent=s.error;else if(l=s.content,s.isEncoded){const e=new DataView(n.Base64.decode(s.content)),t=new TextDecoder;this.rawContent=t.decode(e,{stream:!0})}else if("wasmDisassemblyInfo"in s&&s.wasmDisassemblyInfo){const{wasmDisassemblyInfo:e}=s;this.rawContent=o.Text.of(e.lines),this.wasmDisassemblyInternal=e}else this.rawContent=l,this.wasmDisassemblyInternal=null;if(l&&"application/wasm"===this.contentType&&!this.wasmDisassemblyInternal){const e=n.Worker.WorkerWrapper.fromURL(new URL("../../../../entrypoints/wasmparser_worker/wasmparser_worker-entrypoint.js",import.meta.url)),t=new Promise(((t,r)=>{e.onmessage=({data:e})=>{if("event"in e){if("progress"===e.event)i?.setWorked(e.params.percentage)}else if("method"in e&&"disassemble"===e.method)"error"in e?r(e.error):"result"in e&&t(e.result)},e.onerror=r}));e.postMessage({method:"disassemble",params:{content:l}});try{const{lines:r,offsets:i,functionBodyOffsets:s}=await t;this.rawContent=l=o.Text.of(r),this.wasmDisassemblyInternal=new n.WasmDisassembly.WasmDisassembly(r,i,s)}catch(e){this.rawContent=l=a=e.message}finally{e.terminate()}}i.setWorked(100),i.done(),this.formattedMap=null,this.prettyToggle.setEnabled(!0),a?(this.loadError=!0,this.textEditor.state=this.placeholderEditorState(a),this.prettyToggle.setEnabled(!1)):this.shouldAutoPrettyPrint&&e.TextUtils.isMinified(l||"")?await this.setPretty(!0):await this.setContent(this.rawContent||"")}revealPosition(e,t){this.lineToScrollTo=null,this.selectionToSet=null;let r=0,n=0;if("number"==typeof e){const{doc:t}=this.textEditor.state;if(e>t.length)r=t.lines-1;else if(e>=0){const i=t.lineAt(e);r=i.number-1,n=e-i.from}}else r=e.lineNumber,n=e.columnNumber??0;this.positionToReveal={line:r,column:n,shouldHighlight:t},this.innerRevealPositionIfNeeded()}innerRevealPositionIfNeeded(){if(!this.positionToReveal)return;if(!this.loaded||!this.isShowing())return;const e=this.uiLocationToEditorLocation(this.positionToReveal.line,this.positionToReveal.column),{textEditor:t}=this;t.revealPosition(t.createSelection(e),this.positionToReveal.shouldHighlight),this.positionToReveal=null}clearPositionToReveal(){this.positionToReveal=null}scrollToLine(e){this.clearPositionToReveal(),this.lineToScrollTo=e,this.innerScrollToLineIfNeeded()}innerScrollToLineIfNeeded(){if(null!==this.lineToScrollTo&&this.loaded&&this.isShowing()){const{textEditor:e}=this,t=e.toOffset({lineNumber:this.lineToScrollTo,columnNumber:0});e.dispatch({effects:o.EditorView.scrollIntoView(t,{y:"start",yMargin:0})}),this.lineToScrollTo=null}}setSelection(e){this.selectionToSet=e,this.innerSetSelectionIfNeeded()}innerSetSelectionIfNeeded(){const e=this.selectionToSet;if(e&&this.loaded&&this.isShowing()){const{textEditor:t}=this;t.dispatch({selection:t.createSelection({lineNumber:e.startLine,columnNumber:e.startColumn},{lineNumber:e.endLine,columnNumber:e.endColumn})}),this.selectionToSet=null}}wasShownOrLoaded(){this.innerRevealPositionIfNeeded(),this.innerSetSelectionIfNeeded(),this.innerScrollToLineIfNeeded()}onTextChanged(){const e=this.pretty;this.prettyInternal=Boolean(this.prettyBaseDoc&&this.textEditor.state.doc.eq(this.prettyBaseDoc)),this.prettyInternal!==e&&this.updatePrettyPrintState(),this.prettyToggle.setEnabled(this.isClean()),this.searchConfig&&this.searchableView&&this.performSearch(this.searchConfig,!1,!1)}isClean(){return this.textEditor.state.doc.eq(this.baseDoc)||null!==this.prettyBaseDoc&&this.textEditor.state.doc.eq(this.prettyBaseDoc)}contentCommitted(){this.baseDoc=this.textEditorInternal.state.doc,this.prettyBaseDoc=null,this.rawContent=this.textEditor.state.doc.toString(),this.formattedMap=null,this.prettyInternal&&(this.prettyInternal=!1,this.updatePrettyPrintState()),this.prettyToggle.setEnabled(!0)}async getLanguageSupport(e){let{contentType:t}=this;"text/x.vue"===t&&((e="string"==typeof e?e:e.sliceString(0)).trimStart().startsWith("<")||(t="text/javascript"));const r=await a.CodeHighlighter.languageFromMIME(t);return r?[r,o.javascript.javascriptLanguage.data.of({autocomplete:o.completeAnyWord})]:[]}async updateLanguageMode(e){const t=await this.getLanguageSupport(e);this.textEditor.dispatch({effects:y.language.reconfigure(t)})}async setContent(e){this.muteChangeEventsForSetContent=!0;const{textEditor:t}=this,r=this.loadedInternal,n=t.editor.scrollDOM.scrollTop;this.loadedInternal=!0;const i=await this.getLanguageSupport(e),s=o.EditorState.create({doc:e,extensions:[this.editorConfiguration(e),i,y.lineNumbers.of(this.getLineNumberFormatter()),y.editable.of(this.editable?[]:o.EditorState.readOnly.of(!0))]});this.baseDoc=s.doc,t.state=s,r&&(t.editor.scrollDOM.scrollTop=n),this.wasShownOrLoaded(),this.delayedFindSearchMatches&&(this.delayedFindSearchMatches(),this.delayedFindSearchMatches=null),this.muteChangeEventsForSetContent=!1}setSearchableView(e){this.searchableView=e}doFindSearchMatches(e,t,r){this.currentSearchResultIndex=-1,this.searchRegex=e.toSearchRegex(!0),this.searchResults=this.collectRegexMatches(this.searchRegex),this.searchableView&&this.searchableView.updateSearchMatchesCount(this.searchResults.length);const n=this.textEditor;this.searchResults.length?t&&r?this.jumpToPreviousSearchResult():t?this.jumpToNextSearchResult():n.dispatch({effects:v.of(new T(this.searchRegex,null))}):n.state.field(C)&&n.dispatch({effects:v.of(null)})}performSearch(e,t,r){this.searchableView&&this.searchableView.updateSearchMatchesCount(0),this.resetSearch(),this.searchConfig=e,this.loaded?this.doFindSearchMatches(e,t,Boolean(r)):this.delayedFindSearchMatches=this.doFindSearchMatches.bind(this,e,t,Boolean(r)),this.ensureContentLoaded()}resetCurrentSearchResultIndex(){if(!this.searchResults.length)return;this.currentSearchResultIndex=-1,this.searchableView&&this.searchableView.updateCurrentMatchIndex(this.currentSearchResultIndex);const e=this.textEditor,t=e.state.field(C);t&&t.currentRange&&e.dispatch({effects:v.of(new T(t.regexp,null))})}resetSearch(){this.searchConfig=null,this.delayedFindSearchMatches=null,this.currentSearchResultIndex=-1,this.searchResults=[],this.searchRegex=null}onSearchCanceled(){const e=-1!==this.currentSearchResultIndex?this.searchResults[this.currentSearchResultIndex]:null;if(this.resetSearch(),!this.loaded)return;this.textEditor.dispatch({effects:v.of(null),selection:e?{anchor:e.from,head:e.to}:void 0,scrollIntoView:!0,userEvent:"select.search.cancel"})}jumpToLastSearchResult(){this.jumpToSearchResult(this.searchResults.length-1)}searchResultIndexForCurrentSelection(){return i.ArrayUtilities.lowerBound(this.searchResults,this.textEditor.state.selection.main,((e,t)=>e.to-t.to))}jumpToNextSearchResult(){const e=this.searchResultIndexForCurrentSelection(),t=-1===this.currentSearchResultIndex?e:e+1;this.jumpToSearchResult(t)}jumpToPreviousSearchResult(){const e=this.searchResultIndexForCurrentSelection();this.jumpToSearchResult(e-1)}supportsCaseSensitiveSearch(){return!0}supportsRegexSearch(){return!0}jumpToSearchResult(e){if(!this.loaded||!this.searchResults.length||!this.searchRegex)return;this.currentSearchResultIndex=(e+this.searchResults.length)%this.searchResults.length,this.searchableView&&this.searchableView.updateCurrentMatchIndex(this.currentSearchResultIndex);const t=this.textEditor,r=this.searchResults[this.currentSearchResultIndex];t.dispatch({effects:v.of(new T(this.searchRegex,r)),selection:{anchor:r.from,head:r.to},scrollIntoView:!0,userEvent:"select.search"})}replaceSelectionWith(e,t){const r=this.searchResults[this.currentSearchResultIndex];if(!r)return;const n=this.searchRegex?.fromQuery?r.insertPlaceholders(t):t,i=this.textEditor,s=i.state.changes({from:r.from,to:r.to,insert:n});i.dispatch({changes:s,selection:{anchor:s.mapPos(i.state.selection.main.to,1)},userEvent:"input.replace"})}replaceAllWith(e,t){this.resetCurrentSearchResultIndex();const r=e.toSearchRegex(!0),n=this.collectRegexMatches(r);if(!n.length)return;const i=r.fromQuery,s=n.map((e=>({from:e.from,to:e.to,insert:i?e.insertPlaceholders(t):t})));this.textEditor.dispatch({changes:s,scrollIntoView:!0,userEvent:"input.replace.all"})}collectRegexMatches({regex:e}){const t=[];let r=0;for(const n of this.textEditor.state.doc.iterLines()){for(e.lastIndex=0;;){const i=e.exec(n);if(!i)break;if(i[0].length){const e=r+i.index;t.push(new S(e,e+i[0].length,i))}else e.lastIndex=i.index+1}r+=n.length+1}return t}canEditSource(){return this.editable}updateSourcePosition(){const{textEditor:e}=this,{state:t}=e,{selection:r}=t;if(this.displayedSelection?.eq(r))return;if(this.displayedSelection=r,r.ranges.length>1)return void this.sourcePosition.setText(f(g.dSelectionRegions,{PH1:r.ranges.length}));const{main:n}=t.selection;if(n.empty){const{lineNumber:t,columnNumber:r}=e.toLineColumn(n.head),i=this.prettyToRawLocation(t,r);if(this.wasmDisassemblyInternal){const e=this.wasmDisassemblyInternal,t=e.lineNumberToBytecodeOffset(e.lineNumbers-1).toString(16).length,r=e.lineNumberToBytecodeOffset(i[0]);this.sourcePosition.setText(f(g.bytecodePositionXs,{PH1:r.toString(16).padStart(t,"0")}))}else this.sourcePosition.setText(f(g.lineSColumnS,{PH1:i[0]+1,PH2:i[1]+1}))}else{const e=t.doc.lineAt(n.from),r=t.doc.lineAt(n.to);e.number===r.number?this.sourcePosition.setText(f(g.dCharactersSelected,{PH1:n.to-n.from})):this.sourcePosition.setText(f(g.dLinesDCharactersSelected,{PH1:r.number-e.number+1,PH2:n.to-n.from}))}}onContextMenu(e){e.consume(!0);const t=new r.ContextMenu.ContextMenu(e),{state:n}=this.textEditor,i=n.selection.main.from,s=n.doc.lineAt(i);return this.populateTextAreaContextMenu(t,s.number-1,i-s.from),t.appendApplicableItems(this),t.show(),!0}populateTextAreaContextMenu(e,t,r){}onLineGutterContextMenu(e,t){t.consume(!0);const n=new r.ContextMenu.ContextMenu(t),i=this.textEditor.state.doc.lineAt(e).number-1;return this.populateLineGutterContextMenu(n,i),n.appendApplicableItems(this),n.show(),!0}populateLineGutterContextMenu(e,t){}focus(){this.textEditor.focus()}}class S{from;to;match;constructor(e,t,r){this.from=e,this.to=t,this.match=r}insertPlaceholders(e){return e.replace(/\$(\$|&|\d+|<[^>]+>)/g,((e,t)=>"$"===t?"$":"&"===t?this.match[0]:"<"===t[0]?this.match.groups&&this.match.groups[t.slice(1,t.length-1)]||"":this.match[Number.parseInt(t,10)]||""))}}var b;!function(e){e.PERFORMANCE="performance",e.MEMORY="memory",e.COVERAGE="coverage"}(b||(b={}));const y={editable:new o.Compartment,language:new o.Compartment,lineNumbers:new o.Compartment};class T{regexp;currentRange;constructor(e,t){this.regexp=e,this.currentRange=t}map(e){return e.empty||!this.currentRange?this:new T(this.regexp,{from:e.mapPos(this.currentRange.from),to:e.mapPos(this.currentRange.to)})}static eq(e,t){return Boolean(e===t||e&&t&&e.currentRange?.from===t.currentRange?.from&&e.currentRange?.to===t.currentRange?.to&&e.regexp.regex.source===t.regexp.regex.source&&e.regexp.regex.flags===t.regexp.regex.flags)}}const v=o.StateEffect.define({map:(e,t)=>e&&e.map(t)}),C=o.StateField.define({create:()=>null,update:(e,t)=>t.effects.reduce(((e,t)=>t.is(v)?t.value:e),e&&e.map(t.changes))}),E=o.Decoration.mark({class:"cm-searchMatch"}),I=o.Decoration.mark({class:"cm-searchMatch cm-searchMatch-selected"}),R=o.ViewPlugin.fromClass(class{decorations;constructor(e){this.decorations=this.computeDecorations(e)}update(e){const t=e.state.field(C);(!T.eq(t,e.startState.field(C))||t&&(e.viewportChanged||e.docChanged))&&(this.decorations=this.computeDecorations(e.view))}computeDecorations(e){const t=e.state.field(C);if(!t)return o.Decoration.none;const r=new o.RangeSetBuilder,{doc:n}=e.state;for(const{from:i,to:s}of e.visibleRanges){let e=i;for(const o of n.iterRange(i,s)){if("\n"!==o)for(t.regexp.regex.lastIndex=0;;){const n=t.regexp.regex.exec(o);if(!n)break;if(n[0].length){const i=e+n.index,s=i+n[0].length,o=t.currentRange&&t.currentRange.from===i&&t.currentRange.to===s;r.add(i,s,o?I:E)}else t.regexp.regex.lastIndex=n.index+1}e+=o.length}}return r.finish()}},{decorations:e=>e.decorations}),P=new class extends o.GutterMarker{elementClass="cm-nonBreakableLine"},L=o.StateEffect.define(),N=o.StateField.define({create:()=>o.RangeSet.empty,update:(e,t)=>t.effects.reduce(((e,t)=>t.is(L)?e.update({add:t.value.map((e=>P.range(e)))}):e),e.map(t.changes)),provide:e=>o.lineNumberMarkers.from(e)});const V=o.EditorView.theme({"&.cm-editor":{height:"100%"},".cm-scroller":{overflow:"auto"},".cm-lineNumbers .cm-gutterElement.cm-nonBreakableLine":{color:"var(--color-non-breakable-line) !important"},".cm-searchMatch":{border:"1px solid var(--color-search-match-border)",borderRadius:"3px",margin:"0 -1px","&.cm-searchMatch-selected":{borderRadius:"1px",backgroundColor:"var(--color-selected-search-match-background)",borderColor:"var(--color-selected-search-match-background)","&, & *":{color:"var(--color-selected-search-match) !important"}}},":host-context(.pretty-printed) & .cm-lineNumbers .cm-gutterElement":{color:"var(--color-primary-old)"}});var F=Object.freeze({__proto__:null,SourceFrameImpl:x,get DecoratorType(){return b},addNonBreakableLines:L,isBreakableLine:function(e,t){const r=e.field(N);if(!r.size)return!0;let n=!1;return r.between(t.from,t.from,(()=>{n=!0})),!n}});const M={find:"Find"},O=t.i18n.registerUIStrings("ui/legacy/components/source_frame/ResourceSourceFrame.ts",M),U=t.i18n.getLocalizedString.bind(void 0,O);class D extends x{givenContentType;resourceInternal;constructor(e,t,r){super((()=>e.requestContent()),r),this.givenContentType=t,this.resourceInternal=e}static createSearchableView(e,t,r){return new j(e,t,r)}getContentType(){return this.givenContentType}get resource(){return this.resourceInternal}populateTextAreaContextMenu(e,t,r){super.populateTextAreaContextMenu(e,t,r),e.appendApplicableItems(this.resourceInternal)}}class j extends r.Widget.VBox{sourceFrame;constructor(e,t,n){super(!0),this.registerRequiredCSS(p);const i=new D(e,t);this.sourceFrame=i;const s=m.includes(t);i.setCanPrettyPrint(s,n);const o=new r.SearchableView.SearchableView(i,i);o.element.classList.add("searchable-view"),o.setPlaceholder(U(M.find)),i.show(o.element),i.setSearchableView(o),o.show(this.contentElement);const a=new r.Toolbar.Toolbar("toolbar",this.contentElement);i.toolbarItems().then((e=>{e.map((e=>a.appendToolbarItem(e)))}))}async revealPosition(e,t){this.sourceFrame.revealPosition({lineNumber:e,columnNumber:t},!0)}}var H=Object.freeze({__proto__:null,ResourceSourceFrame:D,SearchableContainer:j});class k{base64content;contentUrl;resourceType;arrayPromise;hexPromise;utf8Promise;constructor(e,t,r){this.base64content=e,this.contentUrl=t,this.resourceType=r,this.arrayPromise=null,this.hexPromise=null,this.utf8Promise=null}async fetchContentAsArray(){return this.arrayPromise||(this.arrayPromise=new Promise((async e=>{const t=await fetch("data:;base64,"+this.base64content);e(new Uint8Array(await t.arrayBuffer()))}))),await this.arrayPromise}async hex(){if(!this.hexPromise){const e=await this.fetchContentAsArray();return{content:k.uint8ArrayToHexString(e),isEncoded:!1}}return this.hexPromise}async base64(){return{content:this.base64content,isEncoded:!0}}async utf8(){return this.utf8Promise||(this.utf8Promise=new Promise((async e=>{const t=await this.fetchContentAsArray();e({content:new TextDecoder("utf8").decode(t),isEncoded:!1})}))),this.utf8Promise}createBase64View(){return new D(e.StaticContentProvider.StaticContentProvider.fromString(this.contentUrl,this.resourceType,this.base64content),this.resourceType.canonicalMimeType(),{lineNumbers:!1,lineWrapping:!0})}createHexView(){const t=new e.StaticContentProvider.StaticContentProvider(this.contentUrl,this.resourceType,(async()=>{const e=await this.fetchContentAsArray();return{content:k.uint8ArrayToHexViewer(e),isEncoded:!1}}));return new D(t,this.resourceType.canonicalMimeType(),{lineNumbers:!1,lineWrapping:!1})}createUtf8View(){const t=this.utf8.bind(this),r=new e.StaticContentProvider.StaticContentProvider(this.contentUrl,this.resourceType,t);return new D(r,this.resourceType.canonicalMimeType(),{lineNumbers:!0,lineWrapping:!0})}static uint8ArrayToHexString(e){let t="";for(let r=0;r<e.length;r++)t+=k.numberToHex(e[r],2);return t}static numberToHex(e,t){let r=e.toString(16);for(;r.length<t;)r="0"+r;return r}static uint8ArrayToHexViewer(e){let t="",r=0;for(;16*r<e.length;){const n=e.slice(16*r,16*(r+1));t+=k.numberToHex(r,8)+":";let i=0;for(let e=0;e<n.length;e++)e%2==0&&(t+=" ",i++),t+=k.numberToHex(n[e],2),i+=2;for(;i<42;)t+=" ",i++;for(let e=0;e<n.length;e++){const r=n[e];t+=r>=32&&r<=126?String.fromCharCode(r):"."}t+="\n",r++}return t}}var A=Object.freeze({__proto__:null,BinaryResourceViewFactory:k}),_={cssContent:".font-view{font-size:60px;white-space:pre-wrap;word-wrap:break-word;text-align:center;padding:15px}"};const z={font:"Font",previewOfFontFromS:"Preview of font from {PH1}"},B=t.i18n.registerUIStrings("ui/legacy/components/source_frame/FontView.ts",z),W=t.i18n.getLocalizedString.bind(void 0,B);class q extends r.View.SimpleView{url;mimeType;contentProvider;mimeTypeLabel;fontPreviewElement;dummyElement;fontStyleElement;inResize;constructor(e,t){super(W(z.font)),this.registerRequiredCSS(_),this.element.classList.add("font-view"),this.url=t.contentURL(),r.ARIAUtils.setLabel(this.element,W(z.previewOfFontFromS,{PH1:this.url})),this.mimeType=e,this.contentProvider=t,this.mimeTypeLabel=new r.Toolbar.ToolbarText(e)}async toolbarItems(){return[this.mimeTypeLabel]}onFontContentLoaded(t,r){const{content:n}=r,s=n?e.ContentProvider.contentAsDataURL(n,this.mimeType,!0):this.url;this.fontStyleElement&&(this.fontStyleElement.textContent=i.StringUtilities.sprintf('@font-face { font-family: "%s"; src: url(%s); }',t,s),this.updateFontPreviewSize())}createContentIfNeeded(){if(this.fontPreviewElement)return;const e="WebInspectorFontPreview"+ ++J;this.fontStyleElement=document.createElement("style"),this.contentProvider.requestContent().then((t=>{this.onFontContentLoaded(e,t)})),this.element.appendChild(this.fontStyleElement);const t=document.createElement("div");for(let e=0;e<X.length;++e)e>0&&t.createChild("br"),r.UIUtils.createTextChild(t,X[e]);this.fontPreviewElement=t.cloneNode(!0),this.fontPreviewElement&&(r.ARIAUtils.markAsHidden(this.fontPreviewElement),this.fontPreviewElement.style.overflow="hidden",this.fontPreviewElement.style.setProperty("font-family",e),this.fontPreviewElement.style.setProperty("visibility","hidden"),this.dummyElement=t,this.dummyElement.style.visibility="hidden",this.dummyElement.style.zIndex="-1",this.dummyElement.style.display="inline",this.dummyElement.style.position="absolute",this.dummyElement.style.setProperty("font-family",e),this.dummyElement.style.setProperty("font-size",G+"px"),this.element.appendChild(this.fontPreviewElement))}wasShown(){this.createContentIfNeeded(),this.updateFontPreviewSize()}onResize(){if(!this.inResize){this.inResize=!0;try{this.updateFontPreviewSize()}finally{this.inResize=null}}}measureElement(){if(!this.dummyElement)throw new Error("No font preview loaded");this.element.appendChild(this.dummyElement);const e={width:this.dummyElement.offsetWidth,height:this.dummyElement.offsetHeight};return this.element.removeChild(this.dummyElement),e}updateFontPreviewSize(){if(!this.fontPreviewElement||!this.isShowing())return;this.fontPreviewElement.style.removeProperty("visibility");const e=this.measureElement(),t=e.height,r=e.width,n=this.element.offsetWidth-50,i=this.element.offsetHeight-30;if(!(t&&r&&n&&i))return void this.fontPreviewElement.style.removeProperty("font-size");const s=n/r,o=i/t,a=Math.floor(G*Math.min(s,o))-2;this.fontPreviewElement.style.setProperty("font-size",a+"px",void 0)}}let J=0;const X=["ABCDEFGHIJKLM","NOPQRSTUVWXYZ","abcdefghijklm","nopqrstuvwxyz","1234567890"],G=50;var $=Object.freeze({__proto__:null,FontView:q}),Q={cssContent:".image-view{overflow:auto}.image-view > .image{padding:20px 20px 10px;text-align:center}.image-view img.resource-image-view{max-width:100%;max-height:1000px;background-image:var(--image-file-checker);box-shadow:0 5px 10px var(--box-shadow-outline-color);user-select:text;-webkit-user-drag:auto}"};const Y={image:"Image",dropImageFileHere:"Drop image file here",imageFromS:"Image from {PH1}",dD:"{PH1} × {PH2}",copyImageUrl:"Copy image URL",copyImageAsDataUri:"Copy image as data URI",openImageInNewTab:"Open image in new tab",saveImageAs:"Save image as...",download:"download"},K=t.i18n.registerUIStrings("ui/legacy/components/source_frame/ImageView.ts",Y),Z=t.i18n.getLocalizedString.bind(void 0,K);class ee extends r.View.SimpleView{url;parsedURL;mimeType;contentProvider;uiSourceCode;sizeLabel;dimensionsLabel;aspectRatioLabel;mimeTypeLabel;container;imagePreviewElement;cachedContent;constructor(e,t){super(Z(Y.image)),this.registerRequiredCSS(Q),this.element.tabIndex=-1,this.element.classList.add("image-view"),this.url=t.contentURL(),this.parsedURL=new n.ParsedURL.ParsedURL(this.url),this.mimeType=e,this.contentProvider=t,this.uiSourceCode=t instanceof h.UISourceCode.UISourceCode?t:null,this.uiSourceCode&&(this.uiSourceCode.addEventListener(h.UISourceCode.Events.WorkingCopyCommitted,this.workingCopyCommitted,this),new r.DropTarget.DropTarget(this.element,[r.DropTarget.Type.ImageFile,r.DropTarget.Type.URI],Z(Y.dropImageFileHere),this.handleDrop.bind(this))),this.sizeLabel=new r.Toolbar.ToolbarText,this.dimensionsLabel=new r.Toolbar.ToolbarText,this.aspectRatioLabel=new r.Toolbar.ToolbarText,this.mimeTypeLabel=new r.Toolbar.ToolbarText(e),this.container=this.element.createChild("div","image"),this.imagePreviewElement=this.container.createChild("img","resource-image-view"),this.imagePreviewElement.addEventListener("contextmenu",this.contextMenu.bind(this),!0)}async toolbarItems(){return await this.updateContentIfNeeded(),[this.sizeLabel,new r.Toolbar.ToolbarSeparator,this.dimensionsLabel,new r.Toolbar.ToolbarSeparator,this.aspectRatioLabel,new r.Toolbar.ToolbarSeparator,this.mimeTypeLabel]}wasShown(){this.updateContentIfNeeded()}disposeView(){this.uiSourceCode&&this.uiSourceCode.removeEventListener(h.UISourceCode.Events.WorkingCopyCommitted,this.workingCopyCommitted,this)}workingCopyCommitted(){this.updateContentIfNeeded()}async updateContentIfNeeded(){const t=await this.contentProvider.requestContent();if(this.cachedContent?.content===t.content)return;this.cachedContent=t;const r=e.ContentProvider.contentAsDataURL(t.content,this.mimeType,t.isEncoded)||this.url,n=new Promise((e=>{this.imagePreviewElement.onload=e}));this.imagePreviewElement.src=r,this.imagePreviewElement.alt=Z(Y.imageFromS,{PH1:this.url});const s=t.content&&!t.isEncoded?t.content.length:i.StringUtilities.base64ToSize(t.content);this.sizeLabel.setText(i.NumberUtilities.bytesToString(s)),await n,this.dimensionsLabel.setText(Z(Y.dD,{PH1:this.imagePreviewElement.naturalWidth,PH2:this.imagePreviewElement.naturalHeight})),this.aspectRatioLabel.setText(i.NumberUtilities.aspectRatio(this.imagePreviewElement.naturalWidth,this.imagePreviewElement.naturalHeight))}contextMenu(e){const t=new r.ContextMenu.ContextMenu(e),i=new n.ParsedURL.ParsedURL(this.imagePreviewElement.src);this.parsedURL.isDataURL()||t.clipboardSection().appendItem(Z(Y.copyImageUrl),this.copyImageURL.bind(this)),i.isDataURL()&&t.clipboardSection().appendItem(Z(Y.copyImageAsDataUri),this.copyImageAsDataURL.bind(this)),t.clipboardSection().appendItem(Z(Y.openImageInNewTab),this.openInNewTab.bind(this)),t.clipboardSection().appendItem(Z(Y.saveImageAs),(async()=>{await this.saveImage()})),t.show()}copyImageAsDataURL(){c.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(this.imagePreviewElement.src)}copyImageURL(){c.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(this.url)}async saveImage(){if(!this.cachedContent||!this.cachedContent.content)return;const t=e.ContentProvider.contentAsDataURL(this.cachedContent.content,this.mimeType,this.cachedContent.isEncoded,"",!1);if(!t)return;const r=document.createElement("a");r.href=t,r.download=this.parsedURL.isDataURL()?Z(Y.download):decodeURIComponent(this.parsedURL.displayName),r.click(),r.remove()}openInNewTab(){c.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(this.url)}async handleDrop(e){const t=e.items;if(!t.length||"file"!==t[0].kind)return;const r=t[0].getAsFile();if(!r)return;const n=!r.name.endsWith(".svg");(e=>{const t=new FileReader;t.onloadend=()=>{let e;try{e=t.result}catch(t){e=null,console.error("Can't read file: "+t)}"string"==typeof e&&this.uiSourceCode&&this.uiSourceCode.setContent(n?btoa(e):e,n)},n?t.readAsBinaryString(e):t.readAsText(e)})(r)}}var te=Object.freeze({__proto__:null,ImageView:ee}),re={cssContent:".json-view{padding:2px 6px;overflow:auto}"};const ne={find:"Find"},ie=t.i18n.registerUIStrings("ui/legacy/components/source_frame/JSONView.ts",ne),se=t.i18n.getLocalizedString.bind(void 0,ie);class oe extends r.Widget.VBox{initialized;parsedJSON;startCollapsed;searchableView;treeOutline;currentSearchFocusIndex;currentSearchTreeElements;searchRegex;constructor(e,t){super(),this.initialized=!1,this.registerRequiredCSS(re),this.parsedJSON=e,this.startCollapsed=Boolean(t),this.element.classList.add("json-view"),this.currentSearchFocusIndex=0,this.currentSearchTreeElements=[],this.searchRegex=null}static async createView(e){const t=await oe.parseJSON(e);if(!t||"object"!=typeof t.data)return null;const n=new oe(t),i=new r.SearchableView.SearchableView(n,null);return i.setPlaceholder(se(ne.find)),n.searchableView=i,n.show(i.element),i}static createViewSync(e){const t=new oe(new ae(e,"","")),n=new r.SearchableView.SearchableView(t,null);return n.setPlaceholder(se(ne.find)),t.searchableView=n,t.show(n.element),t.element.tabIndex=0,n}static parseJSON(e){let t=null;if(e&&(t=oe.extractJSON(e)),!t)return Promise.resolve(null);try{const e=JSON.parse(t.data);if(!e)return Promise.resolve(null);t.data=e}catch(e){t=null}return Promise.resolve(t)}static extractJSON(e){if(e.startsWith("<"))return null;let t=oe.findBrackets(e,"{","}");const r=oe.findBrackets(e,"[","]");if(t=r.length>t.length?r:t,-1===t.length||e.length-t.length>80)return null;const n=e.substring(0,t.start),i=e.substring(t.end+1);return e=e.substring(t.start,t.end+1),!i.trim().length||i.trim().startsWith(")")&&n.trim().endsWith("(")?new ae(e,n,i):null}static findBrackets(e,t,r){const n=e.indexOf(t),i=e.lastIndexOf(r);let s=i-n-1;return(-1===n||-1===i||i<n)&&(s=-1),{start:n,end:i,length:s}}wasShown(){this.initialize()}initialize(){if(this.initialized)return;this.initialized=!0;const e=d.RemoteObject.RemoteObject.fromLocalObject(this.parsedJSON.data),t=this.parsedJSON.prefix+e.description+this.parsedJSON.suffix;this.treeOutline=new u.ObjectPropertiesSection.ObjectPropertiesSection(e,t,void 0,!0),this.treeOutline.enableContextMenu(),this.treeOutline.setEditable(!1),this.startCollapsed||this.treeOutline.expand(),this.element.appendChild(this.treeOutline.element);const r=this.treeOutline.firstChild();r&&r.select(!0,!1)}jumpToMatch(e){if(!this.searchRegex)return;const t=this.currentSearchTreeElements[this.currentSearchFocusIndex];t&&t.setSearchRegex(this.searchRegex);const n=this.currentSearchTreeElements[e];n?(this.updateSearchIndex(e),n.setSearchRegex(this.searchRegex,r.UIUtils.highlightedCurrentSearchResultClassName),n.reveal()):this.updateSearchIndex(0)}updateSearchCount(e){this.searchableView&&this.searchableView.updateSearchMatchesCount(e)}updateSearchIndex(e){this.currentSearchFocusIndex=e,this.searchableView&&this.searchableView.updateCurrentMatchIndex(e)}onSearchCanceled(){let e;for(this.searchRegex=null,this.currentSearchTreeElements=[],e=this.treeOutline.rootElement();e;e=e.traverseNextTreeElement(!1))e instanceof u.ObjectPropertiesSection.ObjectPropertyTreeElement&&e.revertHighlightChanges();this.updateSearchCount(0),this.updateSearchIndex(0)}performSearch(e,t,r){let n=this.currentSearchFocusIndex;const s=this.currentSearchTreeElements[n];let o;for(this.onSearchCanceled(),this.searchRegex=e.toSearchRegex(!0).regex,o=this.treeOutline.rootElement();o;o=o.traverseNextTreeElement(!1)){if(!(o instanceof u.ObjectPropertiesSection.ObjectPropertyTreeElement))continue;const e=o.setSearchRegex(this.searchRegex);if(e&&this.currentSearchTreeElements.push(o),s===o){const t=this.currentSearchTreeElements.length-1;n=e||r?t:t+1}}this.updateSearchCount(this.currentSearchTreeElements.length),this.currentSearchTreeElements.length?(n=i.NumberUtilities.mod(n,this.currentSearchTreeElements.length),this.jumpToMatch(n)):this.updateSearchIndex(-1)}jumpToNextSearchResult(){if(!this.currentSearchTreeElements.length)return;const e=i.NumberUtilities.mod(this.currentSearchFocusIndex+1,this.currentSearchTreeElements.length);this.jumpToMatch(e)}jumpToPreviousSearchResult(){if(!this.currentSearchTreeElements.length)return;const e=i.NumberUtilities.mod(this.currentSearchFocusIndex-1,this.currentSearchTreeElements.length);this.jumpToMatch(e)}supportsCaseSensitiveSearch(){return!0}supportsRegexSearch(){return!0}}class ae{data;prefix;suffix;constructor(e,t,r){this.data=e,this.prefix=t,this.suffix=r}}var le=Object.freeze({__proto__:null,JSONView:oe,ParsedJSON:ae}),ce={cssContent:".tree-outline ol{list-style:none;padding:0;margin:0;padding-inline-start:16px;--override-xml-view-tag:rgb(136 18 128);--override-xml-view-comment-or-instruction:rgb(35 110 37);--override-xml-view-attribute-name:rgb(153 69 0);--override-xml-view-attribute-value:rgb(26 26 166)}.-theme-with-dark-background .tree-outline ol,\n:host-context(.-theme-with-dark-background) .tree-outline ol{--override-xml-view-tag:rgb(237 119 229);--override-xml-view-comment-or-instruction:rgb(145 220 147);--override-xml-view-attribute-name:rgb(255 171 102);--override-xml-view-attribute-value:rgb(89 89 229)}ol.tree-outline{padding-inline-start:0}.tree-outline li{min-height:12px}.tree-outline li.shadow-xml-view-close-tag{margin-left:-16px}.shadow-xml-view-tag{color:var(--override-xml-view-tag)}.shadow-xml-view-comment{color:var(--override-xml-view-comment-or-instruction)}.shadow-xml-view-processing-instruction{color:var(--override-xml-view-comment-or-instruction)}.shadow-xml-view-attribute-name{color:var(--override-xml-view-attribute-name)}.shadow-xml-view-attribute-value{color:var(--override-xml-view-attribute-value)}.shadow-xml-view-text{color:var(--color-background-inverted);white-space:pre}.shadow-xml-view-cdata{color:var(--color-background-inverted)}"},he={cssContent:".shadow-xml-view{user-select:text;overflow:auto;padding:2px 4px}"};const de={find:"Find"},ue=t.i18n.registerUIStrings("ui/legacy/components/source_frame/XMLView.ts",de),me=t.i18n.getLocalizedString.bind(void 0,ue);class pe extends r.Widget.Widget{treeOutline;searchableView;currentSearchFocusIndex;currentSearchTreeElements;searchConfig;constructor(e){super(!0),this.registerRequiredCSS(he),this.contentElement.classList.add("shadow-xml-view","source-code"),this.treeOutline=new r.TreeOutline.TreeOutlineInShadow,this.treeOutline.registerRequiredCSS(ce),this.contentElement.appendChild(this.treeOutline.element),this.currentSearchFocusIndex=0,this.currentSearchTreeElements=[],ge.populate(this.treeOutline,e,this);const t=this.treeOutline.firstChild();t&&t.select(!0,!1)}static createSearchableView(e){const t=new pe(e),n=new r.SearchableView.SearchableView(t,null);return n.setPlaceholder(me(de.find)),t.searchableView=n,t.show(n.element),n}static parseXML(e,t){let r;try{switch(t){case"application/xhtml+xml":case"application/xml":case"image/svg+xml":case"text/html":case"text/xml":r=(new DOMParser).parseFromString(e,t)}}catch(e){return null}return!r||r.body?null:r}jumpToMatch(e,t){if(!this.searchConfig)return;const{regex:n}=this.searchConfig.toSearchRegex(!0),i=this.currentSearchTreeElements[this.currentSearchFocusIndex];i&&i.setSearchRegex(n);const s=this.currentSearchTreeElements[e];s?(this.updateSearchIndex(e),t&&s.reveal(!0),s.setSearchRegex(n,r.UIUtils.highlightedCurrentSearchResultClassName)):this.updateSearchIndex(0)}updateSearchCount(e){this.searchableView&&this.searchableView.updateSearchMatchesCount(e)}updateSearchIndex(e){this.currentSearchFocusIndex=e,this.searchableView&&this.searchableView.updateCurrentMatchIndex(e)}innerPerformSearch(e,t){if(!this.searchConfig)return;let r=this.currentSearchFocusIndex;const n=this.currentSearchTreeElements[r];this.innerSearchCanceled(),this.currentSearchTreeElements=[];const{regex:s}=this.searchConfig.toSearchRegex(!0);for(let e=this.treeOutline.rootElement();e;e=e.traverseNextTreeElement(!1)){if(!(e instanceof ge))continue;const i=e.setSearchRegex(s);if(i&&this.currentSearchTreeElements.push(e),n===e){const e=this.currentSearchTreeElements.length-1;r=i||t?e:e+1}}this.updateSearchCount(this.currentSearchTreeElements.length),this.currentSearchTreeElements.length?(r=i.NumberUtilities.mod(r,this.currentSearchTreeElements.length),this.jumpToMatch(r,e)):this.updateSearchIndex(0)}innerSearchCanceled(){for(let e=this.treeOutline.rootElement();e;e=e.traverseNextTreeElement(!1))e instanceof ge&&e.revertHighlightChanges();this.updateSearchCount(0),this.updateSearchIndex(0)}onSearchCanceled(){this.searchConfig=null,this.currentSearchTreeElements=[],this.innerSearchCanceled()}performSearch(e,t,r){this.searchConfig=e,this.innerPerformSearch(t,r)}jumpToNextSearchResult(){if(!this.currentSearchTreeElements.length)return;const e=i.NumberUtilities.mod(this.currentSearchFocusIndex+1,this.currentSearchTreeElements.length);this.jumpToMatch(e,!0)}jumpToPreviousSearchResult(){if(!this.currentSearchTreeElements.length)return;const e=i.NumberUtilities.mod(this.currentSearchFocusIndex-1,this.currentSearchTreeElements.length);this.jumpToMatch(e,!0)}supportsCaseSensitiveSearch(){return!0}supportsRegexSearch(){return!0}}class ge extends r.TreeOutline.TreeElement{node;closeTag;highlightChanges;xmlView;constructor(e,t,r){super("",!t&&"childElementCount"in e&&Boolean(e.childElementCount)),this.node=e,this.closeTag=t,this.selectable=!0,this.highlightChanges=[],this.xmlView=r,this.updateTitle()}static populate(e,t,r){if(!(t instanceof Node))return;let n=t.firstChild;for(;n;){const t=n;n=n.nextSibling;const i=t.nodeType;3===i&&t.nodeValue&&t.nodeValue.match(/\s+/)||(1!==i&&3!==i&&4!==i&&7!==i&&8!==i||e.appendChild(new ge(t,!1,r)))}}setSearchRegex(t,n){if(this.revertHighlightChanges(),!t)return!1;if(this.closeTag&&this.parent&&!this.parent.expanded)return!1;t.lastIndex=0;let i=r.UIUtils.highlightedSearchResultClassName;if(n&&(i+=" "+n),!this.listItemElement.textContent)return!1;const s=this.listItemElement.textContent.replace(/\xA0/g," ");let o=t.exec(s);const a=[];for(;o;)a.push(new e.TextRange.SourceRange(o.index,o[0].length)),o=t.exec(s);return a.length&&r.UIUtils.highlightRangesWithStyleClass(this.listItemElement,a,i,this.highlightChanges),Boolean(this.highlightChanges.length)}revertHighlightChanges(){r.UIUtils.revertDomChanges(this.highlightChanges),this.highlightChanges=[]}updateTitle(){const e=this.node;if("nodeType"in e)switch(e.nodeType){case 1:if(e instanceof Element){const t=e.tagName;if(this.closeTag)return void this.setTitle(["</"+t+">","shadow-xml-view-tag"]);const r=["<"+t,"shadow-xml-view-tag"],n=e.attributes;for(let e=0;e<n.length;++e){const t=n.item(e);if(!t)return;r.push(" ","shadow-xml-view-tag",t.name,"shadow-xml-view-attribute-name",'="',"shadow-xml-view-tag",t.value,"shadow-xml-view-attribute-value",'"',"shadow-xml-view-tag")}return this.expanded||(e.childElementCount?r.push(">","shadow-xml-view-tag","…","shadow-xml-view-comment","</"+t,"shadow-xml-view-tag"):e.textContent?r.push(">","shadow-xml-view-tag",e.textContent,"shadow-xml-view-text","</"+t,"shadow-xml-view-tag"):r.push(" /","shadow-xml-view-tag")),r.push(">","shadow-xml-view-tag"),void this.setTitle(r)}return;case 3:return void(e.nodeValue&&this.setTitle([e.nodeValue,"shadow-xml-view-text"]));case 4:return void(e.nodeValue&&this.setTitle(["<![CDATA[","shadow-xml-view-cdata",e.nodeValue,"shadow-xml-view-text","]]>","shadow-xml-view-cdata"]));case 7:return void(e.nodeValue&&this.setTitle(["<?"+e.nodeName+" "+e.nodeValue+"?>","shadow-xml-view-processing-instruction"]));case 8:return void this.setTitle(["\x3c!--"+e.nodeValue+"--\x3e","shadow-xml-view-comment"])}}setTitle(e){const t=document.createDocumentFragment();for(let r=0;r<e.length;r+=2)t.createChild("span",e[r+1]).textContent=e[r];this.title=t,this.xmlView.innerPerformSearch(!1,!1)}onattach(){this.listItemElement.classList.toggle("shadow-xml-view-close-tag",this.closeTag)}onexpand(){this.updateTitle()}oncollapse(){this.updateTitle()}async onpopulate(){ge.populate(this,this.node,this.xmlView),this.appendChild(new ge(this.node,!0,this.xmlView))}}var we=Object.freeze({__proto__:null,XMLView:pe,XMLViewNode:ge});const fe={nothingToPreview:"Nothing to preview"},xe=t.i18n.registerUIStrings("ui/legacy/components/source_frame/PreviewFactory.ts",fe),Se=t.i18n.getLocalizedString.bind(void 0,xe);var be=Object.freeze({__proto__:null,PreviewFactory:class{static async createPreview(e,t){let i=n.ResourceType.ResourceType.fromMimeType(t);switch(i===n.ResourceType.resourceTypes.Other&&(i=e.contentType()),i){case n.ResourceType.resourceTypes.Image:return new ee(t,e);case n.ResourceType.resourceTypes.Font:return new q(t,e)}const s=await e.requestContent();if(null===s.content)return new r.EmptyWidget.EmptyWidget(s.error);if(!s.content)return new r.EmptyWidget.EmptyWidget(Se(fe.nothingToPreview));let o=s.content;s.isEncoded&&(o=window.atob(o));const a=pe.parseXML(o,t);if(a)return pe.createSearchableView(a);const l=await oe.createView(o);if(l)return l;if(i.isTextType()){const r=t.replace(/;.*/,"")||e.contentType().canonicalMimeType();return D.createSearchableView(e,r,!0)}return null}}});export{A as BinaryResourceViewFactory,$ as FontView,te as ImageView,le as JSONView,be as PreviewFactory,H as ResourceSourceFrame,F as SourceFrame,we as XMLView};
@@ -0,0 +1 @@
1
+ import*as e from"./utils.js";self.Components=self.Components||{},Components=Components||{},Components.ImagePreview=e.ImagePreview.ImagePreview,Components.JSPresentationUtils={},Components.JSPresentationUtils.buildStackTracePreviewContents=e.JSPresentationUtils.buildStackTracePreviewContents,Components.Linkifier=e.Linkifier.Linkifier,Components.Linkifier.LinkContextMenuProvider=e.Linkifier.LinkContextMenuProvider,Components.Linkifier.LinkHandlerSettingUI=e.Linkifier.LinkHandlerSettingUI,Components.Linkifier.ContentProviderContextMenuProvider=e.Linkifier.ContentProviderContextMenuProvider,Components.LinkDecorator=e.Linkifier.LinkDecorator,Components.reload=e.Reload.reload,Components.TargetDetachedDialog=e.TargetDetachedDialog.TargetDetachedDialog;
@@ -0,0 +1 @@
1
+ import*as e from"../../../../core/common/common.js";import*as t from"../../../../core/host/host.js";import*as n from"../../../../core/i18n/i18n.js";import*as i from"../../../../core/platform/platform.js";import*as o from"../../../../core/sdk/sdk.js";import*as r from"../../../../models/bindings/bindings.js";import*as a from"../../legacy.js";import*as s from"../../../../models/breakpoints/breakpoints.js";import*as c from"../../../../models/text_utils/text_utils.js";import*as l from"../../../../models/workspace/workspace.js";const d=new CSSStyleSheet;d.replaceSync(".image-preview-container{background:transparent;text-align:center;border-spacing:0}.image-preview-container img{margin:6px 0;max-width:100px;max-height:100px;background-image:var(--image-file-checker);user-select:text;vertical-align:top;-webkit-user-drag:auto}.image-container{padding:0}.image-container > div{min-height:50px;display:flex;align-items:center;justify-content:center;cursor:pointer}.image-preview-container .row{line-height:1.2;vertical-align:baseline}.image-preview-container .title{padding-right:0.5em;text-align:right;color:var(--color-text-secondary);white-space:nowrap}.image-preview-container .description{white-space:nowrap;text-align:left;color:var(--color-text-primary)}.image-preview-container .description-link{max-width:20em}.image-preview-container .source-link{white-space:normal;word-break:break-all;color:var(--color-link);cursor:pointer}\n/*# sourceURL=imagePreview.css */\n");const u={unknownSource:"unknown source",imageFromS:"Image from {PH1}",fileSize:"File size:",intrinsicSize:"Intrinsic size:",renderedSize:"Rendered size:",currentSource:"Current source:",renderedAspectRatio:"Rendered aspect ratio:",intrinsicAspectRatio:"Intrinsic aspect ratio:"},p=n.i18n.registerUIStrings("ui/legacy/components/utils/ImagePreview.ts",u),g=n.i18n.getLocalizedString.bind(void 0,p);function m(t){return null!==t&&t.resourceType()===e.ResourceType.resourceTypes.Image}var h=Object.freeze({__proto__:null,ImagePreview:class{static async build(e,n,r,a={precomputedFeatures:void 0,imageAltText:void 0}){const{precomputedFeatures:s,imageAltText:c}=a,l=e.model(o.ResourceTreeModel.ResourceTreeModel);if(!l)return null;let p=l.resourceForURL(n),h=n;if(!m(p)&&s&&s.currentSrc&&(h=s.currentSrc,p=l.resourceForURL(h)),!p||!m(p))return null;const k=p,L=p.displayName,f=p.content?p.content:p.url.split("base64,")[1],b=p.contentSize(),C=b||i.StringUtilities.base64ToSize(f),w=C>0?i.NumberUtilities.bytesToString(C):"";return new Promise((e=>{const n=document.createElement("img");n.addEventListener("load",(function(){const o=document.createElement("div"),a=o.attachShadow({mode:"open"});a.adoptedStyleSheets=[d];const c=a.createChild("table");c.className="image-preview-container";const l=c.createChild("tr").createChild("td","image-container");l.colSpan=2;const p=l.createChild("div");p.title=L,p.appendChild(n),p.addEventListener("click",(()=>{t.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(h)}));const m=n.naturalWidth,k=n.naturalHeight,f=s?s.renderedWidth:m,b=s?s.renderedHeight:k;if(r){const e=c.createChild("tr","row");e.createChild("td","title").textContent=g(u.renderedSize),e.createChild("td","description").textContent=`${f} × ${b} px`;const t=c.createChild("tr","row");if(t.createChild("td","title").textContent=g(u.renderedAspectRatio),t.createChild("td","description").textContent=i.NumberUtilities.aspectRatio(f,b),b!==k||f!==m){const e=c.createChild("tr","row");e.createChild("td","title").textContent=g(u.intrinsicSize),e.createChild("td","description").textContent=`${m} × ${k} px`;const t=c.createChild("tr","row");t.createChild("td","title").textContent=g(u.intrinsicAspectRatio),t.createChild("td","description").textContent=i.NumberUtilities.aspectRatio(m,k)}}const C=c.createChild("tr","row");C.createChild("td","title").textContent=g(u.fileSize),C.createChild("td","description").textContent=w;const v=c.createChild("tr","row");v.createChild("td","title").textContent=g(u.currentSource);const S=i.StringUtilities.trimMiddle(h,100),I=v.createChild("td","description description-link").createChild("span","source-link");I.textContent=S,I.addEventListener("click",(()=>{t.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(h)})),e(o)}),!1),n.addEventListener("error",(()=>e(null)),!1),c&&(n.alt=c),k.populateImageSource(n)}))}static async loadDimensionsForNode(e){if(!e.nodeName()||"img"!==e.nodeName().toLowerCase())return;const t=await e.resolveToObject("");if(!t)return;const n=await t.callFunctionJSON((function(){return{renderedWidth:this.width,renderedHeight:this.height,currentSrc:this.currentSrc}}),void 0);return t.release(),n}static defaultAltTextForImageURL(t){const n=new e.ParsedURL.ParsedURL(t),i=n.isValid?n.displayName:g(u.unknownSource);return g(u.imageFromS,{PH1:i})}}});const k={unknown:"(unknown)",auto:"auto",revealInS:"Reveal in {PH1}",reveal:"Reveal",openUsingS:"Open using {PH1}",linkHandling:"Link handling:"},L=n.i18n.registerUIStrings("ui/legacy/components/utils/Linkifier.ts",k),f=n.i18n.getLocalizedString.bind(void 0,L),b=new Set;let C=null;const w=new WeakMap,v=new WeakMap,S=new WeakMap,I=new Map;let y;class x{maxLength;anchorsByTarget;locationPoolByTarget;onLiveLocationUpdate;useLinkDecorator;constructor(e,t,n=(()=>{})){this.maxLength=e||a.UIUtils.MaxLengthForDisplayedURLs,this.anchorsByTarget=new Map,this.locationPoolByTarget=new Map,this.onLiveLocationUpdate=n,this.useLinkDecorator=Boolean(t),b.add(this),o.TargetManager.TargetManager.instance().observeTargets(this)}static setLinkDecorator(e){console.assert(!C,"Cannot re-register link decorator."),C=e,e.addEventListener(T.Events.LinkIconChanged,(function(e){const t=e.data,n=w.get(t)||[];for(const e of n)x.updateLinkDecorations(e)}));for(const e of b)e.updateAllAnchorDecorations()}updateAllAnchorDecorations(){for(const e of this.anchorsByTarget.values())for(const t of e)x.updateLinkDecorations(t)}static bindUILocation(e,t){const n=x.linkInfo(e);if(!n)return;if(n.uiLocation=t,!t)return;const i=t.uiSourceCode;let o=w.get(i);o||(o=new Set,w.set(i,o)),o.add(e)}static unbindUILocation(e){const t=x.linkInfo(e);if(!t||!t.uiLocation)return;const n=t.uiLocation.uiSourceCode;t.uiLocation=null;const i=w.get(n);i&&i.delete(e)}static bindBreakpoint(e,t){const n=x.linkInfo(e);if(!n)return;const i=s.BreakpointManager.BreakpointManager.instance().findBreakpoint(t);i&&(n.revealable=i)}static unbindBreakpoint(e){const t=x.linkInfo(e);t&&t.revealable&&(t.revealable=null)}targetAdded(e){this.anchorsByTarget.set(e,[]),this.locationPoolByTarget.set(e,new r.LiveLocation.LiveLocationPool)}targetRemoved(e){const t=this.locationPoolByTarget.get(e);if(this.locationPoolByTarget.delete(e),!t)return;t.disposeAll();const n=this.anchorsByTarget.get(e);if(n){this.anchorsByTarget.delete(e);for(const e of n){const t=x.linkInfo(e);if(!t)continue;t.liveLocation=null,x.unbindUILocation(e);const n=t.fallback;n&&e.replaceWith(n)}}}maybeLinkifyScriptLocation(e,t,n,i,a){let s=null;const c={lineNumber:i,maxLength:this.maxLength,columnNumber:a?.columnNumber,showColumnNumber:Boolean(a?.showColumnNumber),className:a?.className,tabStop:a?.tabStop,inlineFrameIndex:a?.inlineFrameIndex??0,userMetric:a?.userMetric},{columnNumber:l,className:d=""}=c;if(n&&(s=x.linkifyURL(n,c)),!e||e.isDisposed())return s;const u=e.model(o.DebuggerModel.DebuggerModel);if(!u)return s;const p=t?u.createRawLocationByScriptId(t,i||0,l,c.inlineFrameIndex):u.createRawLocationByURL(n,i||0,l,c.inlineFrameIndex);if(!p)return s;const g={tabStop:a?.tabStop},{link:m,linkInfo:h}=x.createLink(s&&s.textContent?s.textContent:"",d,g);h.enableDecorator=this.useLinkDecorator,h.fallback=s,h.userMetric=a?.userMetric;const k=this.locationPoolByTarget.get(p.debuggerModel.target());if(!k)return s;const L={showColumnNumber:c.showColumnNumber,revealBreakpoint:a?.revealBreakpoint},f=this.onLiveLocationUpdate;r.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().createLiveLocation(p,this.updateAnchor.bind(this,m,L),k).then((e=>{e&&(h.liveLocation=e,f())}));return this.anchorsByTarget.get(p.debuggerModel.target()).push(m),m}linkifyScriptLocation(e,t,n,i,o){const r=this.maybeLinkifyScriptLocation(e,t,n,i,o),a={lineNumber:i,maxLength:this.maxLength,className:o?.className,columnNumber:o?.columnNumber,showColumnNumber:Boolean(o?.showColumnNumber),inlineFrameIndex:o?.inlineFrameIndex??0,tabStop:o?.tabStop,userMetric:o?.userMetric};return r||x.linkifyURL(n,a)}linkifyRawLocation(e,t,n){return this.linkifyScriptLocation(e.debuggerModel.target(),e.scriptId,t,e.lineNumber,{columnNumber:e.columnNumber,className:n,inlineFrameIndex:e.inlineFrameIndex})}maybeLinkifyConsoleCallFrame(e,t,n){const i={...n,columnNumber:t.columnNumber,inlineFrameIndex:n?.inlineFrameIndex??0};return this.maybeLinkifyScriptLocation(e,t.scriptId,t.url,t.lineNumber,i)}linkifyStackTraceTopFrame(e,t){console.assert(t.callFrames.length>0);const{url:n,lineNumber:i,columnNumber:a}=t.callFrames[0],s=x.linkifyURL(n,{lineNumber:i,columnNumber:a,showColumnNumber:!1,inlineFrameIndex:0,maxLength:this.maxLength,preventClick:!0});if(!e)return s;const c=this.locationPoolByTarget.get(e);if(!c)return console.assert(e.isDisposed()),s;console.assert(!e.isDisposed());const l=e.model(o.DebuggerModel.DebuggerModel),{link:d,linkInfo:u}=x.createLink("","");u.enableDecorator=this.useLinkDecorator,u.fallback=s;const p=this.onLiveLocationUpdate;r.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().createStackTraceTopFrameLiveLocation(l.createRawLocationsByStackTrace(t),this.updateAnchor.bind(this,d,{showColumnNumber:!1}),c).then((e=>{u.liveLocation=e,p()}));return this.anchorsByTarget.get(e).push(d),d}linkifyCSSLocation(e,t){const{link:n,linkInfo:i}=x.createLink("",t||"",{tabStop:!0});i.enableDecorator=this.useLinkDecorator;const o=this.locationPoolByTarget.get(e.cssModel().target());if(!o)return n;const a=this.onLiveLocationUpdate;r.CSSWorkspaceBinding.CSSWorkspaceBinding.instance().createLiveLocation(e,this.updateAnchor.bind(this,n,{showColumnNumber:!1}),o).then((e=>{i.liveLocation=e,a()}));return this.anchorsByTarget.get(e.cssModel().target()).push(n),n}reset(){for(const e of[...this.anchorsByTarget.keys()])this.targetRemoved(e),this.targetAdded(e)}dispose(){for(const e of[...this.anchorsByTarget.keys()])this.targetRemoved(e);o.TargetManager.TargetManager.instance().unobserveTargets(this),b.delete(this)}async updateAnchor(t,n,i){x.unbindUILocation(t),n.revealBreakpoint&&x.unbindBreakpoint(t);const o=await i.uiLocation();if(!o){if(i instanceof r.CSSWorkspaceBinding.LiveLocation){const n=i.header();n&&n.ownerNode&&(t.addEventListener("click",(t=>{t.consume(!0),e.Revealer.reveal(n.ownerNode||null)}),!1),x.setTrimmedText(t,"<style>"))}return}x.bindUILocation(t,o),n.revealBreakpoint&&x.bindBreakpoint(t,o);const s=o.linkText(!0,n.showColumnNumber);x.setTrimmedText(t,s,this.maxLength);let c=o.uiSourceCode.url();"application/wasm"===o.uiSourceCode.mimeType()?"number"==typeof o.columnNumber&&(c+=`:0x${o.columnNumber.toString(16)}`):(c+=":"+(o.lineNumber+1),n.showColumnNumber&&"number"==typeof o.columnNumber&&(c+=":"+(o.columnNumber+1))),a.Tooltip.Tooltip.install(t,c),t.classList.toggle("ignore-list-link",await i.isIgnoreListed()),x.updateLinkDecorations(t)}setLiveLocationUpdateCallback(e){this.onLiveLocationUpdate=e}static updateLinkDecorations(e){const t=x.linkInfo(e);if(!t||!t.enableDecorator)return;if(!C||!t.uiLocation)return;t.icon&&t.icon.parentElement&&e.removeChild(t.icon);const n=C.linkIcon(t.uiLocation.uiSourceCode);n&&(n.style.setProperty("margin-right","2px"),e.insertBefore(n,e.firstChild)),t.icon=n}static linkifyURL(e,t){const n=(t=t||{showColumnNumber:!1,inlineFrameIndex:0}).text,i=t.className||"",o=t.lineNumber,s=t.columnNumber,c=t.showColumnNumber,l=t.preventClick,d=t.maxLength||a.UIUtils.MaxLengthForDisplayedURLs,u=t.bypassURLTrimming;if(!e||e.trim().toLowerCase().startsWith("javascript:")){const t=document.createElement("span");return i&&(t.className=i),t.textContent=n||e||f(k.unknown),t}let p=n||r.ResourceUtils.displayNameForURL(e);"number"!=typeof o||n||(p+=":"+(o+1),c&&"number"==typeof s&&(p+=":"+(s+1)));const g={maxLength:d,title:p!==e?e:"",href:e,preventClick:l,tabStop:t.tabStop,bypassURLTrimming:u},{link:m,linkInfo:h}=x.createLink(p,i,g);return o&&(h.lineNumber=o),s&&(h.columnNumber=s),h.userMetric=t?.userMetric,m}static linkifyRevealable(e,t,n,i,o){const r={maxLength:a.UIUtils.MaxLengthForDisplayedURLs,href:n,title:i},{link:s,linkInfo:c}=x.createLink(t,o||"",r);return c.revealable=e,s}static createLink(e,t,n={}){const{maxLength:i,title:o,href:r,preventClick:s,tabStop:c,bypassURLTrimming:l}=n,d=document.createElement("span");t&&(d.className=t),d.classList.add("devtools-link"),o&&a.Tooltip.Tooltip.install(d,o),r&&(d.href=r),e instanceof HTMLElement?d.appendChild(e):l?(d.classList.add("devtools-link-styled-trim"),x.appendTextWithoutHashes(d,e)):x.setTrimmedText(d,e,i);const u={icon:null,enableDecorator:!1,uiLocation:null,liveLocation:null,url:r||null,lineNumber:null,columnNumber:null,inlineFrameIndex:0,revealable:null,fallback:null};return v.set(d,u),s?d.classList.add("devtools-link-prevent-click"):(d.addEventListener("click",(e=>{x.handleClick(e)&&e.consume(!0)}),!1),d.addEventListener("keydown",(e=>{"Enter"===e.key&&x.handleClick(e)&&e.consume(!0)}),!1)),a.ARIAUtils.markAsLink(d),d.tabIndex=c?0:-1,{link:d,linkInfo:u}}static setTrimmedText(e,t,n){if(e.removeChildren(),n&&t.length>n){const i=function(e,t){let n=Math.floor(t/2),i=e.length-Math.ceil(t/2)+1;const o=e.codePointAt(i-1);void 0!==o&&o>=65536&&(i++,n++);const r=e.codePointAt(n-1);void 0!==r&&n>0&&r>=65536&&n--;return[e.substring(0,n),e.substring(n,i),e.substring(i)]}(t,n);x.appendTextWithoutHashes(e,i[0]),x.appendHiddenText(e,i[1]),x.appendTextWithoutHashes(e,i[2])}else x.appendTextWithoutHashes(e,t)}static appendTextWithoutHashes(e,t){const n=c.TextUtils.Utils.splitStringByRegexes(t,[/[a-f0-9]{20,}/g]);for(const t of n)-1===t.regexIndex?a.UIUtils.createTextChild(e,t.value):(a.UIUtils.createTextChild(e,t.value.substring(0,7)),x.appendHiddenText(e,t.value.substring(7)))}static appendHiddenText(e,t){const n=a.UIUtils.createTextChild(e.createChild("span","devtools-link-ellipsis"),"…");S.set(n,t)}static untruncatedNodeText(e){return S.get(e)||e.textContent||""}static linkInfo(e){return e&&v.get(e)||null}static handleClick(e){const t=e.currentTarget;if(a.UIUtils.isBeingEdited(e.target)||t.hasSelection())return!1;const n=x.linkInfo(t);return!!n&&x.invokeFirstAction(n)}static handleClickFromNewComponentLand(e){x.invokeFirstAction(e)}static invokeFirstAction(e){const n=x.linkActions(e);return!!n.length&&(n[0].handler.call(null),e.userMetric&&t.userMetrics.actionTaken(e.userMetric),!0)}static linkHandlerSetting(){return y||(y=e.Settings.Settings.instance().createSetting("openLinkHandler",f(k.auto))),y}static registerLinkHandler(e,t){I.set(e,t),F.instance().update()}static unregisterLinkHandler(e){I.delete(e),F.instance().update()}static uiLocation(e){const t=x.linkInfo(e);return t?t.uiLocation:null}static linkActions(n){const o=[];if(!n)return o;let c=i.DevToolsPath.EmptyUrlString,d=null;if(n.uiLocation)d=n.uiLocation,c=d.uiSourceCode.contentURL();else if(n.url){c=n.url;const t=l.Workspace.WorkspaceImpl.instance().uiSourceCodeForURL(c)||l.Workspace.WorkspaceImpl.instance().uiSourceCodeForURL(e.ParsedURL.ParsedURL.urlWithoutHash(c));d=t?t.uiLocation(n.lineNumber||0,n.columnNumber||0):null}const u=c?r.ResourceUtils.resourceForURL(c):null,p=d?d.uiSourceCode:u,g=n.revealable||d||u;if(g){const n=e.Revealer.revealDestination(g);o.push({section:"reveal",title:n?f(k.revealInS,{PH1:n}):f(k.reveal),handler:()=>(g instanceof s.BreakpointManager.BreakpointLocation&&t.userMetrics.breakpointEditDialogRevealedFrom(5),e.Revealer.reveal(g))})}if(p){const e=d?d.lineNumber:n.lineNumber||0;for(const t of I.keys()){const n=I.get(t);if(!n)continue;const i={section:"reveal",title:f(k.openUsingS,{PH1:t}),handler:n.bind(null,p,e)};t===x.linkHandlerSetting().get()?o.unshift(i):o.push(i)}}if((u||n.url)&&(o.push({section:"reveal",title:a.UIUtils.openLinkExternallyLabel(),handler:()=>t.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(c)}),o.push({section:"clipboard",title:a.UIUtils.copyLinkAddressLabel(),handler:()=>t.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(c)})),d&&d.uiSourceCode){const e=d.uiSourceCode;o.push({section:"clipboard",title:a.UIUtils.copyFileNameLabel(),handler:()=>t.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(e.displayName())})}return o}}var T;let U,N;!function(e){let t;!function(e){e.LinkIconChanged="LinkIconChanged"}(t=e.Events||(e.Events={}))}(T||(T={}));class D{static instance(e={forceNew:null}){const{forceNew:t}=e;return U&&!t||(U=new D),U}appendApplicableItems(e,t,n){let i=n;for(;i&&!v.get(i);)i=i.parentNodeOrShadowHost();const o=i,r=x.linkInfo(o);if(!r)return;const a=x.linkActions(r);for(const e of a)t.section(e.section).appendItem(e.title,e.handler)}}class F{element;constructor(){this.element=document.createElement("select"),this.element.classList.add("chrome-select"),this.element.addEventListener("change",this.onChange.bind(this),!1),this.update()}static instance(e={forceNew:null}){const{forceNew:t}=e;return N&&!t||(N=new F),N}update(){this.element.removeChildren();const e=[...I.keys()];e.unshift(f(k.auto));for(const t of e){const e=document.createElement("option");e.textContent=t,e.selected=t===x.linkHandlerSetting().get(),this.element.appendChild(e)}this.element.disabled=e.length<=1}onChange(e){if(!e.target)return;const t=e.target.value;x.linkHandlerSetting().set(t)}settingElement(){return a.SettingsUI.createCustomSetting(f(k.linkHandling),this.element)}}let R,M=!1;M||(M=!0,window.addEventListener("linkifieractivated",(function(e){const t=e;x.handleClickFromNewComponentLand(t.data)})));class H{static instance(e={forceNew:null}){const{forceNew:t}=e;return R&&!t||(R=new H),R}appendApplicableItems(n,i,r){const s=r,c=s.contentURL();if(c){c.startsWith("file://")||i.revealSection().appendItem(a.UIUtils.openLinkExternallyLabel(),(()=>t.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(c.endsWith(":formatted")?e.ParsedURL.ParsedURL.slice(c,0,c.lastIndexOf(":")):c)));for(const e of I.keys()){const t=I.get(e);t&&i.revealSection().appendItem(f(k.openUsingS,{PH1:e}),t.bind(null,s,0))}s instanceof o.NetworkRequest.NetworkRequest||(i.clipboardSection().appendItem(a.UIUtils.copyLinkAddressLabel(),(()=>t.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(c))),i.clipboardSection().appendItem(a.UIUtils.copyFileNameLabel(),(()=>t.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(s.displayName()))))}}}var B=Object.freeze({__proto__:null,Linkifier:x,get LinkDecorator(){return T},LinkContextMenuProvider:D,LinkHandlerSettingUI:F,ContentProviderContextMenuProvider:H});const A=new CSSStyleSheet;A.replaceSync(":host{display:inline}.stack-preview-async-description{padding:3px 0 1px;font-style:italic}.stack-preview-container .ignore-list-link{opacity:60%}.stack-preview-container > tr{height:16px;line-height:16px}.stack-preview-container td{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-inline:2px}.stack-preview-container .function-name{max-width:80em}.stack-preview-container:not(.show-hidden-rows) > tr.hidden-row{display:none}.stack-preview-container > tr.show-all-link,\n.stack-preview-container > tr.show-less-link{font-style:italic}.stack-preview-container.show-hidden-rows > tr.show-all-link{display:none}.stack-preview-container:not(.show-hidden-rows) > tr.show-less-link{display:none}\n/*# sourceURL=jsUtils.css */\n");const P={removeFromIgnore:"Remove from ignore list",addToIgnore:"Add script to ignore list",showSMoreFrames:"{n, plural, =1 {Show # more frame} other {Show # more frames}}",showLess:"Show less",unknownSource:"unknown"},E=n.i18n.registerUIStrings("ui/legacy/components/utils/JSPresentationUtils.ts",P),W=n.i18n.getLocalizedString.bind(void 0,E);function _(e,t){const n=new a.ContextMenu.ContextMenu(t);t.consume(!0);const i=x.uiLocation(e);i&&r.IgnoreListManager.IgnoreListManager.instance().canIgnoreListUISourceCode(i.uiSourceCode)&&(r.IgnoreListManager.IgnoreListManager.instance().isUserIgnoreListedURL(i.uiSourceCode.url())?n.debugSection().appendItem(W(P.removeFromIgnore),(()=>r.IgnoreListManager.IgnoreListManager.instance().unIgnoreListUISourceCode(i.uiSourceCode))):n.debugSection().appendItem(W(P.addToIgnore),(()=>r.IgnoreListManager.IgnoreListManager.instance().ignoreListUISourceCode(i.uiSourceCode)))),n.appendApplicableItems(t),n.show()}function z(t,n,i,s,c){const l=[];if(c){const t=new e.Throttler.Throttler(100);i.setLiveLocationUpdateCallback((()=>t.schedule((async()=>function(e,t){let n=0,i=t.length;for(let e=t.length-1;e>=0;e--){const o=t[e];if("link"in o&&o.link){const e=x.uiLocation(o.link);e&&r.IgnoreListManager.IgnoreListManager.instance().isUserOrSourceMapIgnoreListedUISourceCode(e.uiSourceCode)&&(o.ignoreListHide=!0),o.ignoreListHide&&n++}"asyncDescription"in o&&(n>0&&n===i-e-1&&(o.ignoreListHide=!0),i=e,n=0)}e(t)}(c,l)))))}function d(e,t){let c=null;t&&(c={asyncDescription:a.UIUtils.asyncStackTraceLabel(e.description,t),ignoreListHide:!1},l.push(c));let d=0,u=!1;for(const t of e.callFrames){let e=!1;const c=a.UIUtils.beautifyFunctionName(t.functionName),p=i.maybeLinkifyConsoleCallFrame(n,t,{tabStop:Boolean(s),inlineFrameIndex:0,revealBreakpoint:u});if(p){p.addEventListener("contextmenu",_.bind(null,p));const t=x.uiLocation(p);t&&r.IgnoreListManager.IgnoreListManager.instance().isUserOrSourceMapIgnoreListedUISourceCode(t.uiSourceCode)&&(e=!0),p.textContent||(p.textContent=W(P.unknownSource))}e&&++d,l.push({functionName:c,link:p,ignoreListHide:e}),u=[o.DebuggerModel.COND_BREAKPOINT_SOURCE_URL,o.DebuggerModel.LOGPOINT_SOURCE_URL].includes(t.url)}c&&d>0&&d===e.callFrames.length&&(c.ignoreListHide=!0)}d(t);let u=t.callFrames;for(let e=t.parent;e;e=e.parent)e.callFrames.length&&d(e,u),u=e.callFrames;return l}function j(e,t){e.removeChildren();let n=0;const i=[];for(const o of t){const t=e.createChild("tr");"asyncDescription"in o?(t.createChild("td").textContent="\n",t.createChild("td","stack-preview-async-description").textContent=o.asyncDescription,t.createChild("td"),t.createChild("td")):(t.createChild("td").textContent="\n",t.createChild("td","function-name").textContent=o.functionName,t.createChild("td").textContent=" @ ",o.link&&(t.createChild("td").appendChild(o.link),i.push(o.link)),o.ignoreListHide&&++n),o.ignoreListHide&&t.classList.add("hidden-row"),e.appendChild(t)}if(n){const t=e.createChild("tr","show-all-link");t.createChild("td").textContent="\n";const i=t.createChild("td");i.colSpan=4;const o=i.createChild("span","link");o.textContent=W(P.showSMoreFrames,{n:n}),o.addEventListener("click",(()=>{e.classList.add("show-hidden-rows")}),!1);const r=e.createChild("tr","show-less-link");r.createChild("td").textContent="\n";const a=r.createChild("td");a.colSpan=4;const s=a.createChild("span","link");s.textContent=W(P.showLess),s.addEventListener("click",(()=>{e.classList.remove("show-hidden-rows")}),!1)}return i}var O=Object.freeze({__proto__:null,buildStackTraceRows:z,buildStackTracePreviewContents:function(e,t,n={stackTrace:void 0,tabStops:void 0}){const{stackTrace:i,tabStops:o}=n,r=document.createElement("span");r.classList.add("monospace"),r.style.display="inline-block";const s=a.Utils.createShadowRootWithCoreStyles(r,{cssFile:[A],delegatesFocus:void 0}).createChild("table","stack-preview-container");if(!i)return{element:r,links:[]};const c=j.bind(null,s);return{element:r,links:j(s,z(i,e,t,o,c))}}});var K=Object.freeze({__proto__:null,reload:function(){a.DockController.DockController.instance().canDock()&&"undocked"===a.DockController.DockController.instance().dockSide()&&t.InspectorFrontendHost.InspectorFrontendHostInstance.setIsDocked(!0,(function(){})),t.InspectorFrontendHost.InspectorFrontendHostInstance.reattach((()=>window.location.reload()))}});const $={websocketDisconnected:"WebSocket disconnected"},q=n.i18n.registerUIStrings("ui/legacy/components/utils/TargetDetachedDialog.ts",$),J=n.i18n.getLocalizedString.bind(void 0,q);class G extends o.SDKModel.SDKModel{static hideCrashedDialog;constructor(e){super(e),e.registerInspectorDispatcher(this),e.inspectorAgent().invoke_enable(),e.parentTarget()?.type()===o.Target.Type.Browser&&G.hideCrashedDialog&&(G.hideCrashedDialog.call(null),G.hideCrashedDialog=null)}detached({reason:e}){a.RemoteDebuggingTerminatedScreen.RemoteDebuggingTerminatedScreen.show(e)}static webSocketConnectionLost(){a.RemoteDebuggingTerminatedScreen.RemoteDebuggingTerminatedScreen.show(J($.websocketDisconnected))}targetCrashed(){if(G.hideCrashedDialog)return;const e=this.target().parentTarget();if(e&&e.type()!==o.Target.Type.Browser)return;const t=new a.Dialog.Dialog;t.setSizeBehavior("MeasureContent"),t.addCloseButton(),t.setDimmed(!0),G.hideCrashedDialog=t.hide.bind(t),new a.TargetCrashedScreen.TargetCrashedScreen((()=>{G.hideCrashedDialog=null})).show(t.contentElement),t.show()}targetReloadedAfterCrash(){this.target().runtimeAgent().invoke_runIfWaitingForDebugger(),G.hideCrashedDialog&&(G.hideCrashedDialog.call(null),G.hideCrashedDialog=null)}}o.SDKModel.SDKModel.register(G,{capabilities:o.Target.Capability.Inspector,autostart:!0});var V=Object.freeze({__proto__:null,TargetDetachedDialog:G});export{h as ImagePreview,O as JSPresentationUtils,B as Linkifier,K as Reload,V as TargetDetachedDialog};
@@ -0,0 +1 @@
1
+ import*as e from"./legacy.js";self.UI=self.UI||{},UI=UI||{},UI.DockController=e.DockController.DockController,UI.DockController.Events=e.DockController.Events,UI.DockController.ToggleDockActionDelegate=e.DockController.ToggleDockActionDelegate,UI.DockController.CloseButtonProvider=e.DockController.CloseButtonProvider,UI.Context=e.Context.Context,UI.ContextFlavorListener=e.ContextFlavorListener.ContextFlavorListener,UI.ContextMenu=e.ContextMenu.ContextMenu,UI.ContextMenu.Provider=e.ContextMenu.Provider,UI.Dialog=e.Dialog.Dialog,UI.EmptyWidget=e.EmptyWidget.EmptyWidget,UI.Fragment=e.Fragment.Fragment,UI.html=e.Fragment.html,UI.Geometry={},UI.Geometry.Vector=e.Geometry.Vector,UI.Geometry.CubicBezier=e.Geometry.CubicBezier,UI.Geometry.EulerAngles=e.Geometry.EulerAngles,UI.Geometry.scalarProduct=e.Geometry.scalarProduct,UI.Geometry.crossProduct=e.Geometry.crossProduct,UI.Geometry.calculateAngle=e.Geometry.calculateAngle,UI.Geometry.degreesToRadians=e.Geometry.degreesToRadians,UI.Geometry.radiansToDegrees=e.Geometry.radiansToDegrees,UI.Size=e.Geometry.Size,UI.GlassPane=e.GlassPane.GlassPane,UI.GlassPane._panes=e.GlassPane.GlassPanePanes,UI.InspectorView=e.InspectorView.InspectorView,UI.InspectorView.ActionDelegate=e.InspectorView.ActionDelegate,UI.ListControl=e.ListControl.ListControl,UI.ListMode=e.ListControl.ListMode,UI.ListModel=e.ListModel.ListModel,UI.Panel=e.Panel.Panel,UI.panels={},UI.SearchableView=e.SearchableView.SearchableView,UI.SearchableView.SearchConfig=e.SearchableView.SearchConfig,UI.Searchable=e.SearchableView.Searchable,UI.SettingUI=e.SettingsUI.SettingUI,UI.ShortcutRegistry=e.ShortcutRegistry.ShortcutRegistry,UI.ShortcutRegistry.ForwardedShortcut=e.ShortcutRegistry.ForwardedShortcut,UI.SoftContextMenu=e.SoftContextMenu.SoftContextMenu,UI.SoftDropDown=e.SoftDropDown.SoftDropDown,UI.SplitWidget=e.SplitWidget.SplitWidget,UI.SuggestBox=e.SuggestBox.SuggestBox,UI.TabbedPane=e.TabbedPane.TabbedPane,UI.TabbedPane.Events=e.TabbedPane.Events,UI.TextPrompt=e.TextPrompt.TextPrompt,UI.Toolbar=e.Toolbar.Toolbar,UI.ToolbarItem=e.Toolbar.ToolbarItem,UI.ToolbarItem.Provider=e.Toolbar.Provider,UI.Tooltip=e.Tooltip.Tooltip,UI.Tooltip._symbol=e.Tooltip.TooltipSymbol,UI.TreeOutline=e.TreeOutline.TreeOutline,UI.TreeOutline.Events=e.TreeOutline.Events,UI.TreeElement=e.TreeOutline.TreeElement,UI.TreeOutlineInShadow=e.TreeOutline.TreeOutlineInShadow,UI.Renderer=e.UIUtils.Renderer,UI.isBeingEdited=e.UIUtils.isBeingEdited,UI.isEditing=e.UIUtils.isEditing,UI.highlightRangesWithStyleClass=e.UIUtils.highlightRangesWithStyleClass,UI.applyDomChanges=e.UIUtils.applyDomChanges,UI.revertDomChanges=e.UIUtils.revertDomChanges,UI.beautifyFunctionName=e.UIUtils.beautifyFunctionName,UI.View=e.View.View,UI.SimpleView=e.View.SimpleView,UI.ViewLocation=e.View.ViewLocation,UI.ViewLocationResolver=e.View.ViewLocationResolver,UI.ViewManager=e.ViewManager.ViewManager,UI.ViewManager._ContainerWidget=e.ViewManager.ContainerWidget,UI.Widget=e.Widget.Widget,UI.XLink=e.XLink.XLink,UI.XLink.ContextMenuProvider=e.XLink.ContextMenuProvider,self.UI.context=e.Context.Context.instance(),UI.dockController;