@qilin-agent/experimental-inspector 0.0.0-stage → 3.1.3

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 (930) hide show
  1. package/README.i18n.yaml +49 -0
  2. package/README.md +179 -2
  3. package/README.zh.md +180 -0
  4. package/cordis.patch.yml +5 -0
  5. package/icon.svg +12 -0
  6. package/lib/client.js +3572 -0
  7. package/lib/client.page.js +314 -0
  8. package/lib/devtools/Images/3d-center.svg +3 -0
  9. package/lib/devtools/Images/3d-pan.svg +3 -0
  10. package/lib/devtools/Images/3d-rotate.svg +3 -0
  11. package/lib/devtools/Images/accelerometer-back.svg +69 -0
  12. package/lib/devtools/Images/accelerometer-bottom.png +0 -0
  13. package/lib/devtools/Images/accelerometer-front.svg +28 -0
  14. package/lib/devtools/Images/accelerometer-left.png +0 -0
  15. package/lib/devtools/Images/accelerometer-right.png +0 -0
  16. package/lib/devtools/Images/accelerometer-top.png +0 -0
  17. package/lib/devtools/Images/account-tree.svg +10 -0
  18. package/lib/devtools/Images/add-photo.svg +3 -0
  19. package/lib/devtools/Images/ai-explorer-badge.svg +114 -0
  20. package/lib/devtools/Images/align-content-center.svg +5 -0
  21. package/lib/devtools/Images/align-content-end.svg +5 -0
  22. package/lib/devtools/Images/align-content-space-around.svg +6 -0
  23. package/lib/devtools/Images/align-content-space-between.svg +4 -0
  24. package/lib/devtools/Images/align-content-space-evenly.svg +6 -0
  25. package/lib/devtools/Images/align-content-start.svg +5 -0
  26. package/lib/devtools/Images/align-content-stretch.svg +4 -0
  27. package/lib/devtools/Images/align-items-baseline.svg +4 -0
  28. package/lib/devtools/Images/align-items-center.svg +5 -0
  29. package/lib/devtools/Images/align-items-end.svg +5 -0
  30. package/lib/devtools/Images/align-items-start.svg +5 -0
  31. package/lib/devtools/Images/align-items-stretch.svg +6 -0
  32. package/lib/devtools/Images/align-self-center.svg +3 -0
  33. package/lib/devtools/Images/align-self-end.svg +4 -0
  34. package/lib/devtools/Images/align-self-start.svg +4 -0
  35. package/lib/devtools/Images/align-self-stretch.svg +5 -0
  36. package/lib/devtools/Images/animation.svg +3 -0
  37. package/lib/devtools/Images/arrow-back.svg +4 -0
  38. package/lib/devtools/Images/arrow-collapse.svg +3 -0
  39. package/lib/devtools/Images/arrow-down.svg +10 -0
  40. package/lib/devtools/Images/arrow-drop-down-dark.svg +3 -0
  41. package/lib/devtools/Images/arrow-drop-down-light.svg +3 -0
  42. package/lib/devtools/Images/arrow-drop-down.svg +3 -0
  43. package/lib/devtools/Images/arrow-forward.svg +4 -0
  44. package/lib/devtools/Images/arrow-right-circle.svg +3 -0
  45. package/lib/devtools/Images/arrow-up-down-circle.svg +3 -0
  46. package/lib/devtools/Images/arrow-up-down.svg +3 -0
  47. package/lib/devtools/Images/arrow-up.svg +10 -0
  48. package/lib/devtools/Images/attach-file.svg +3 -0
  49. package/lib/devtools/Images/baseline-high-availability.svg +17 -0
  50. package/lib/devtools/Images/baseline-limited-availability.svg +19 -0
  51. package/lib/devtools/Images/baseline-low-availability.svg +31 -0
  52. package/lib/devtools/Images/bell.svg +3 -0
  53. package/lib/devtools/Images/bezier-curve-filled.svg +3 -0
  54. package/lib/devtools/Images/bin.svg +1 -0
  55. package/lib/devtools/Images/bottom-panel-close.svg +1 -0
  56. package/lib/devtools/Images/bottom-panel-open.svg +1 -0
  57. package/lib/devtools/Images/brackets.svg +1 -0
  58. package/lib/devtools/Images/breakpoint-circle.svg +4 -0
  59. package/lib/devtools/Images/breakpoint-crossed-filled.svg +1 -0
  60. package/lib/devtools/Images/breakpoint-crossed.svg +1 -0
  61. package/lib/devtools/Images/brush-2.svg +3 -0
  62. package/lib/devtools/Images/brush-filled.svg +1 -0
  63. package/lib/devtools/Images/brush.svg +1 -0
  64. package/lib/devtools/Images/bucket.svg +4 -0
  65. package/lib/devtools/Images/bug.svg +3 -0
  66. package/lib/devtools/Images/button-magic.svg +3 -0
  67. package/lib/devtools/Images/calendar-today.svg +3 -0
  68. package/lib/devtools/Images/center-focus-weak.svg +3 -0
  69. package/lib/devtools/Images/check-circle.svg +3 -0
  70. package/lib/devtools/Images/check-double.svg +3 -0
  71. package/lib/devtools/Images/checker.svg +12 -0
  72. package/lib/devtools/Images/checkmark.svg +1 -0
  73. package/lib/devtools/Images/chevron-double-right.svg +3 -0
  74. package/lib/devtools/Images/chevron-down.svg +3 -0
  75. package/lib/devtools/Images/chevron-left-dot.svg +4 -0
  76. package/lib/devtools/Images/chevron-left.svg +3 -0
  77. package/lib/devtools/Images/chevron-right.svg +3 -0
  78. package/lib/devtools/Images/chevron-up.svg +3 -0
  79. package/lib/devtools/Images/chromeLeft.avif +0 -0
  80. package/lib/devtools/Images/chromeMiddle.avif +0 -0
  81. package/lib/devtools/Images/chromeRight.avif +0 -0
  82. package/lib/devtools/Images/class.svg +6 -0
  83. package/lib/devtools/Images/clear-list.svg +3 -0
  84. package/lib/devtools/Images/clear.svg +3 -0
  85. package/lib/devtools/Images/cloud.svg +3 -0
  86. package/lib/devtools/Images/code-circle.svg +5 -0
  87. package/lib/devtools/Images/code-whisperer-badge.svg +166 -0
  88. package/lib/devtools/Images/code.svg +3 -0
  89. package/lib/devtools/Images/colon.svg +4 -0
  90. package/lib/devtools/Images/color-picker-filled.svg +3 -0
  91. package/lib/devtools/Images/color-picker.svg +3 -0
  92. package/lib/devtools/Images/compress.svg +8 -0
  93. package/lib/devtools/Images/console-conditional-breakpoint.svg +1 -0
  94. package/lib/devtools/Images/console-logpoint.svg +1 -0
  95. package/lib/devtools/Images/container.svg +4 -0
  96. package/lib/devtools/Images/cookie.svg +3 -0
  97. package/lib/devtools/Images/cookie_off.svg +3 -0
  98. package/lib/devtools/Images/copy.svg +3 -0
  99. package/lib/devtools/Images/corporate-fare.svg +3 -0
  100. package/lib/devtools/Images/credit-card.svg +3 -0
  101. package/lib/devtools/Images/cross-circle-filled.svg +3 -0
  102. package/lib/devtools/Images/cross-circle.svg +3 -0
  103. package/lib/devtools/Images/cross.svg +3 -0
  104. package/lib/devtools/Images/cssoverview_icons_2x.avif +0 -0
  105. package/lib/devtools/Images/database-off.svg +1 -0
  106. package/lib/devtools/Images/database.svg +3 -0
  107. package/lib/devtools/Images/deployed.svg +3 -0
  108. package/lib/devtools/Images/device-fold.svg +1 -0
  109. package/lib/devtools/Images/devices.svg +3 -0
  110. package/lib/devtools/Images/devtools-thumbnail.svg +57 -0
  111. package/lib/devtools/Images/devtools-tips.svg +61 -0
  112. package/lib/devtools/Images/devtools-user-badge.svg +129 -0
  113. package/lib/devtools/Images/devtools.svg +13 -0
  114. package/lib/devtools/Images/difference.svg +3 -0
  115. package/lib/devtools/Images/dock-bottom.svg +3 -0
  116. package/lib/devtools/Images/dock-left.svg +3 -0
  117. package/lib/devtools/Images/dock-right.svg +3 -0
  118. package/lib/devtools/Images/dock-window.svg +3 -0
  119. package/lib/devtools/Images/document.svg +3 -0
  120. package/lib/devtools/Images/dog-paw.svg +10 -0
  121. package/lib/devtools/Images/dom-detective-badge.svg +136 -0
  122. package/lib/devtools/Images/domain.svg +3 -0
  123. package/lib/devtools/Images/dots-horizontal.svg +1 -0
  124. package/lib/devtools/Images/dots-vertical.svg +3 -0
  125. package/lib/devtools/Images/download.svg +3 -0
  126. package/lib/devtools/Images/edit.svg +1 -0
  127. package/lib/devtools/Images/empty.svg +2 -0
  128. package/lib/devtools/Images/errorWave.svg +74 -0
  129. package/lib/devtools/Images/exclamation.svg +3 -0
  130. package/lib/devtools/Images/expand.svg +1 -0
  131. package/lib/devtools/Images/experiment-check.svg +1 -0
  132. package/lib/devtools/Images/experiment.svg +3 -0
  133. package/lib/devtools/Images/extension.svg +1 -0
  134. package/lib/devtools/Images/eye-crossed.svg +3 -0
  135. package/lib/devtools/Images/eye.svg +3 -0
  136. package/lib/devtools/Images/file-document.svg +3 -0
  137. package/lib/devtools/Images/file-fetch-xhr.svg +3 -0
  138. package/lib/devtools/Images/file-font.svg +4 -0
  139. package/lib/devtools/Images/file-generic.svg +3 -0
  140. package/lib/devtools/Images/file-image.svg +3 -0
  141. package/lib/devtools/Images/file-json.svg +4 -0
  142. package/lib/devtools/Images/file-manifest.svg +3 -0
  143. package/lib/devtools/Images/file-media.svg +3 -0
  144. package/lib/devtools/Images/file-script.svg +3 -0
  145. package/lib/devtools/Images/file-snippet.svg +4 -0
  146. package/lib/devtools/Images/file-stylesheet.svg +4 -0
  147. package/lib/devtools/Images/file-wasm.svg +5 -0
  148. package/lib/devtools/Images/file-websocket.svg +3 -0
  149. package/lib/devtools/Images/filter-clear.svg +3 -0
  150. package/lib/devtools/Images/filter-filled.svg +3 -0
  151. package/lib/devtools/Images/filter.svg +3 -0
  152. package/lib/devtools/Images/flex-direction.svg +5 -0
  153. package/lib/devtools/Images/flex-no-wrap.svg +5 -0
  154. package/lib/devtools/Images/flex-wrap.svg +8 -0
  155. package/lib/devtools/Images/flow.svg +3 -0
  156. package/lib/devtools/Images/flowsheet.svg +1 -0
  157. package/lib/devtools/Images/fold-more.svg +3 -0
  158. package/lib/devtools/Images/folder-asterisk.svg +10 -0
  159. package/lib/devtools/Images/folder-off.svg +3 -0
  160. package/lib/devtools/Images/folder.svg +3 -0
  161. package/lib/devtools/Images/frame-crossed.svg +3 -0
  162. package/lib/devtools/Images/frame-icon.svg +54 -0
  163. package/lib/devtools/Images/frame.svg +3 -0
  164. package/lib/devtools/Images/gdp-logo-dark.png +0 -0
  165. package/lib/devtools/Images/gdp-logo-light.png +0 -0
  166. package/lib/devtools/Images/gear-filled.svg +3 -0
  167. package/lib/devtools/Images/gear.svg +4 -0
  168. package/lib/devtools/Images/gears.svg +3 -0
  169. package/lib/devtools/Images/geminiInDevTools.png +0 -0
  170. package/lib/devtools/Images/geminiInDevTools_2x.png +0 -0
  171. package/lib/devtools/Images/global.svg +5 -0
  172. package/lib/devtools/Images/google.svg +3 -0
  173. package/lib/devtools/Images/goto-filled.svg +1 -0
  174. package/lib/devtools/Images/grid-direction.svg +6 -0
  175. package/lib/devtools/Images/grid-on.svg +10 -0
  176. package/lib/devtools/Images/group.svg +3 -0
  177. package/lib/devtools/Images/heap-snapshot.svg +6 -0
  178. package/lib/devtools/Images/heap-snapshots.svg +7 -0
  179. package/lib/devtools/Images/help.svg +3 -0
  180. package/lib/devtools/Images/history.svg +3 -0
  181. package/lib/devtools/Images/home.svg +3 -0
  182. package/lib/devtools/Images/hover.svg +6 -0
  183. package/lib/devtools/Images/iframe-crossed.svg +3 -0
  184. package/lib/devtools/Images/iframe.svg +3 -0
  185. package/lib/devtools/Images/import.svg +3 -0
  186. package/lib/devtools/Images/indeterminate-question-box.svg +3 -0
  187. package/lib/devtools/Images/info-filled.svg +3 -0
  188. package/lib/devtools/Images/info.svg +3 -0
  189. package/lib/devtools/Images/issue-cross-filled.svg +3 -0
  190. package/lib/devtools/Images/issue-exclamation-filled.svg +3 -0
  191. package/lib/devtools/Images/issue-questionmark-filled.svg +3 -0
  192. package/lib/devtools/Images/issue-text-filled.svg +3 -0
  193. package/lib/devtools/Images/justify-content-center.svg +5 -0
  194. package/lib/devtools/Images/justify-content-end.svg +5 -0
  195. package/lib/devtools/Images/justify-content-space-around.svg +6 -0
  196. package/lib/devtools/Images/justify-content-space-between.svg +4 -0
  197. package/lib/devtools/Images/justify-content-space-evenly.svg +6 -0
  198. package/lib/devtools/Images/justify-content-start.svg +5 -0
  199. package/lib/devtools/Images/justify-content-stretch.svg +4 -0
  200. package/lib/devtools/Images/justify-items-center.svg +4 -0
  201. package/lib/devtools/Images/justify-items-end.svg +4 -0
  202. package/lib/devtools/Images/justify-items-start.svg +4 -0
  203. package/lib/devtools/Images/justify-items-stretch.svg +4 -0
  204. package/lib/devtools/Images/keyboard-arrow-right.svg +1 -0
  205. package/lib/devtools/Images/keyboard-full.svg +10 -0
  206. package/lib/devtools/Images/keyboard-pen.svg +1 -0
  207. package/lib/devtools/Images/keyboard.svg +3 -0
  208. package/lib/devtools/Images/label-auto.svg +3 -0
  209. package/lib/devtools/Images/label.svg +10 -0
  210. package/lib/devtools/Images/large-arrow-right-filled.svg +1 -0
  211. package/lib/devtools/Images/layers-filled.svg +1 -0
  212. package/lib/devtools/Images/layers.svg +1 -0
  213. package/lib/devtools/Images/left-panel-close.svg +1 -0
  214. package/lib/devtools/Images/left-panel-open.svg +1 -0
  215. package/lib/devtools/Images/lightbulb-spark.svg +13 -0
  216. package/lib/devtools/Images/lightbulb.svg +3 -0
  217. package/lib/devtools/Images/lighthouse_logo.svg +158 -0
  218. package/lib/devtools/Images/list.svg +3 -0
  219. package/lib/devtools/Images/location-on.svg +3 -0
  220. package/lib/devtools/Images/lock-person.svg +1 -0
  221. package/lib/devtools/Images/lock.svg +3 -0
  222. package/lib/devtools/Images/mark-email-unread.svg +3 -0
  223. package/lib/devtools/Images/match-case.svg +3 -0
  224. package/lib/devtools/Images/match-whole-word.svg +1 -0
  225. package/lib/devtools/Images/memory.svg +6 -0
  226. package/lib/devtools/Images/minus.svg +3 -0
  227. package/lib/devtools/Images/mop.svg +1 -0
  228. package/lib/devtools/Images/mouse.svg +4 -0
  229. package/lib/devtools/Images/navigationControls.png +0 -0
  230. package/lib/devtools/Images/navigationControls_2x.png +0 -0
  231. package/lib/devtools/Images/network-settings.svg +3 -0
  232. package/lib/devtools/Images/node-stack-icon.svg +1 -0
  233. package/lib/devtools/Images/nodeIcon.avif +0 -0
  234. package/lib/devtools/Images/open-externally.svg +3 -0
  235. package/lib/devtools/Images/override.svg +11 -0
  236. package/lib/devtools/Images/palette.svg +10 -0
  237. package/lib/devtools/Images/pause-circle.svg +1 -0
  238. package/lib/devtools/Images/pause.svg +1 -0
  239. package/lib/devtools/Images/pen-spark.svg +3 -0
  240. package/lib/devtools/Images/performance-panel-delete-annotation.svg +32 -0
  241. package/lib/devtools/Images/performance-panel-diagram.svg +34 -0
  242. package/lib/devtools/Images/performance-panel-entry-label.svg +75 -0
  243. package/lib/devtools/Images/performance-panel-time-range.svg +15 -0
  244. package/lib/devtools/Images/performance.svg +3 -0
  245. package/lib/devtools/Images/person.svg +3 -0
  246. package/lib/devtools/Images/photo-camera.svg +10 -0
  247. package/lib/devtools/Images/play.svg +3 -0
  248. package/lib/devtools/Images/plus.svg +3 -0
  249. package/lib/devtools/Images/policy.svg +3 -0
  250. package/lib/devtools/Images/popoverArrows.png +0 -0
  251. package/lib/devtools/Images/popup.svg +3 -0
  252. package/lib/devtools/Images/preview_feature_video_thumbnail.svg +92 -0
  253. package/lib/devtools/Images/profile.svg +3 -0
  254. package/lib/devtools/Images/psychiatry.svg +3 -0
  255. package/lib/devtools/Images/puzzle.svg +3 -0
  256. package/lib/devtools/Images/record-start.svg +4 -0
  257. package/lib/devtools/Images/record-stop.svg +4 -0
  258. package/lib/devtools/Images/redo.svg +3 -0
  259. package/lib/devtools/Images/refresh.svg +10 -0
  260. package/lib/devtools/Images/regular-expression.svg +3 -0
  261. package/lib/devtools/Images/replace.svg +1 -0
  262. package/lib/devtools/Images/replay.svg +3 -0
  263. package/lib/devtools/Images/report.svg +1 -0
  264. package/lib/devtools/Images/resizeDiagonal.svg +1 -0
  265. package/lib/devtools/Images/resizeHorizontal.svg +1 -0
  266. package/lib/devtools/Images/resizeVertical.svg +1 -0
  267. package/lib/devtools/Images/resume.svg +1 -0
  268. package/lib/devtools/Images/revert.svg +3 -0
  269. package/lib/devtools/Images/review.svg +5 -0
  270. package/lib/devtools/Images/right-panel-close.svg +1 -0
  271. package/lib/devtools/Images/right-panel-open.svg +1 -0
  272. package/lib/devtools/Images/scissors.svg +3 -0
  273. package/lib/devtools/Images/screen-rotation.svg +1 -0
  274. package/lib/devtools/Images/search.svg +3 -0
  275. package/lib/devtools/Images/select-element.svg +3 -0
  276. package/lib/devtools/Images/send.svg +3 -0
  277. package/lib/devtools/Images/shadow.svg +3 -0
  278. package/lib/devtools/Images/shield.svg +3 -0
  279. package/lib/devtools/Images/small-status-dot.svg +3 -0
  280. package/lib/devtools/Images/smart-assistant.svg +3 -0
  281. package/lib/devtools/Images/snippet.svg +4 -0
  282. package/lib/devtools/Images/spark-info.svg +3 -0
  283. package/lib/devtools/Images/spark.svg +3 -0
  284. package/lib/devtools/Images/speculative-loads.svg +1 -0
  285. package/lib/devtools/Images/speedster-badge.svg +166 -0
  286. package/lib/devtools/Images/star.svg +3 -0
  287. package/lib/devtools/Images/step-into.svg +1 -0
  288. package/lib/devtools/Images/step-out.svg +1 -0
  289. package/lib/devtools/Images/step-over.svg +1 -0
  290. package/lib/devtools/Images/step.svg +1 -0
  291. package/lib/devtools/Images/stop.svg +3 -0
  292. package/lib/devtools/Images/symbol.svg +3 -0
  293. package/lib/devtools/Images/sync.svg +3 -0
  294. package/lib/devtools/Images/tab-move.svg +1 -0
  295. package/lib/devtools/Images/table.svg +3 -0
  296. package/lib/devtools/Images/terminal.svg +10 -0
  297. package/lib/devtools/Images/text-analysis.svg +3 -0
  298. package/lib/devtools/Images/thumb-down-filled.svg +3 -0
  299. package/lib/devtools/Images/thumb-down.svg +3 -0
  300. package/lib/devtools/Images/thumb-up-filled.svg +3 -0
  301. package/lib/devtools/Images/thumb-up.svg +3 -0
  302. package/lib/devtools/Images/tonality.svg +10 -0
  303. package/lib/devtools/Images/toolbarResizerVertical.png +0 -0
  304. package/lib/devtools/Images/top-panel-close.svg +1 -0
  305. package/lib/devtools/Images/top-panel-open.svg +1 -0
  306. package/lib/devtools/Images/touch-app.svg +4 -0
  307. package/lib/devtools/Images/touchCursor.png +0 -0
  308. package/lib/devtools/Images/touchCursor_2x.png +0 -0
  309. package/lib/devtools/Images/triangle-bottom-right.svg +3 -0
  310. package/lib/devtools/Images/triangle-down.svg +1 -0
  311. package/lib/devtools/Images/triangle-left.svg +1 -0
  312. package/lib/devtools/Images/triangle-right.svg +1 -0
  313. package/lib/devtools/Images/triangle-up.svg +3 -0
  314. package/lib/devtools/Images/trophy.svg +3 -0
  315. package/lib/devtools/Images/tune.svg +3 -0
  316. package/lib/devtools/Images/undo.svg +1 -0
  317. package/lib/devtools/Images/warning-filled.svg +3 -0
  318. package/lib/devtools/Images/warning.svg +3 -0
  319. package/lib/devtools/Images/watch.svg +3 -0
  320. package/lib/devtools/Images/whatsnew.svg +61 -0
  321. package/lib/devtools/Images/width.svg +3 -0
  322. package/lib/devtools/Images/zoom-in.svg +3 -0
  323. package/lib/devtools/LICENSE +27 -0
  324. package/lib/devtools/application_tokens.css +413 -0
  325. package/lib/devtools/chunks/FormatterActions-FcPgI0uV.js +19 -0
  326. package/lib/devtools/chunks/UIFilter-CIzBruM3.js +18 -0
  327. package/lib/devtools/chunks/UIRequestLocation-CtGcVN3I.js +48 -0
  328. package/lib/devtools/chunks/_qilin-devtools_empty-BvRk9kiK.js +0 -0
  329. package/lib/devtools/chunks/accessibility-CwvHp3sj.js +2718 -0
  330. package/lib/devtools/chunks/acorn-_jSanihy.js +3232 -0
  331. package/lib/devtools/chunks/adorners-D4aU6nuY.js +45 -0
  332. package/lib/devtools/chunks/ai_assistance-BU6E0Wio.js +4255 -0
  333. package/lib/devtools/chunks/angular-Dutmu-L9.js +117 -0
  334. package/lib/devtools/chunks/animation-TEwO5UI_.js +922 -0
  335. package/lib/devtools/chunks/application-SCf6MiCN.js +12740 -0
  336. package/lib/devtools/chunks/autofill-Dp3nMnuK.js +198 -0
  337. package/lib/devtools/chunks/autofill_manager-BXntqfdp.js +58 -0
  338. package/lib/devtools/chunks/bindings-DgoVEdsr.js +4105 -0
  339. package/lib/devtools/chunks/browser-DL1S1Kiu.js +62 -0
  340. package/lib/devtools/chunks/browser_debugger-p7Rr4IBR.js +629 -0
  341. package/lib/devtools/chunks/changes-DeW5MC9u.js +2 -0
  342. package/lib/devtools/chunks/changes-k42bihtm.js +393 -0
  343. package/lib/devtools/chunks/checkbox.css-CZJJ6atQ.js +4 -0
  344. package/lib/devtools/chunks/chunk-DF993M8W.js +11 -0
  345. package/lib/devtools/chunks/code_highlighter-BnTPt9_G.js +210 -0
  346. package/lib/devtools/chunks/codemirror-CBR9VJma.js +15842 -0
  347. package/lib/devtools/chunks/color_picker-Cuh_X19Y.js +1566 -0
  348. package/lib/devtools/chunks/common-DjRFwulW.js +15145 -0
  349. package/lib/devtools/chunks/common-Uu9A2glf.js +2 -0
  350. package/lib/devtools/chunks/common-qd_KLeYO.js +6639 -0
  351. package/lib/devtools/chunks/components-CnPGgDUW.js +704 -0
  352. package/lib/devtools/chunks/components-Cw5tHQqN.js +1338 -0
  353. package/lib/devtools/chunks/components-EJwviLtZ.js +1090 -0
  354. package/lib/devtools/chunks/console-D1WlMaFQ.js +3855 -0
  355. package/lib/devtools/chunks/console-yMm3XVTY.js +2 -0
  356. package/lib/devtools/chunks/console_counters-9SfIdrUo.js +103 -0
  357. package/lib/devtools/chunks/coverage-BbFH390Q.js +1176 -0
  358. package/lib/devtools/chunks/coverage-CLBpovLw.js +2 -0
  359. package/lib/devtools/chunks/cpp-CdElSCaB.js +435 -0
  360. package/lib/devtools/chunks/css_overview-cITV9auE.js +1288 -0
  361. package/lib/devtools/chunks/data_grid-pC5qqfsJ.js +1671 -0
  362. package/lib/devtools/chunks/developer_resources-4DqQIvy6.js +240 -0
  363. package/lib/devtools/chunks/diff-qn55JSCS.js +444 -0
  364. package/lib/devtools/chunks/dom_extension-BfrKZ4JG.js +172 -0
  365. package/lib/devtools/chunks/elements-CgEYz3mX.js +2 -0
  366. package/lib/devtools/chunks/elements-Dbx4q9-v.js +11407 -0
  367. package/lib/devtools/chunks/emulation-C6XKPPGu.js +1306 -0
  368. package/lib/devtools/chunks/emulation-D8xbdsAj.js +2 -0
  369. package/lib/devtools/chunks/emulation-EtJlEukP.js +2732 -0
  370. package/lib/devtools/chunks/emulation-cjFPXHT9.js +157 -0
  371. package/lib/devtools/chunks/event_listeners-BeTH3gi2.js +414 -0
  372. package/lib/devtools/chunks/explain-P_aDGFSD.js +747 -0
  373. package/lib/devtools/chunks/greendev-BU0QcVPX.js +152 -0
  374. package/lib/devtools/chunks/heap_snapshot-CZt2KUPL.js +427 -0
  375. package/lib/devtools/chunks/helper-CI72KvIC.js +33 -0
  376. package/lib/devtools/chunks/helpers--xrfGSwQ.js +29 -0
  377. package/lib/devtools/chunks/i18n-DvFMqQdJ.js +17 -0
  378. package/lib/devtools/chunks/icon_button-BebVdJD8.js +83 -0
  379. package/lib/devtools/chunks/inline_editor-D54X5UUr.js +1309 -0
  380. package/lib/devtools/chunks/inspector_main-DRbdXLmF.js +279 -0
  381. package/lib/devtools/chunks/issue_counter-CeOjTNGW.js +193 -0
  382. package/lib/devtools/chunks/issues-CegBKEda.js +1649 -0
  383. package/lib/devtools/chunks/issues_manager-D7nfNPN1.js +3009 -0
  384. package/lib/devtools/chunks/java-7g_qfFa2.js +263 -0
  385. package/lib/devtools/chunks/layer_viewer-CaFC5oyv.js +1423 -0
  386. package/lib/devtools/chunks/layers-CXqlD9zH.js +370 -0
  387. package/lib/devtools/chunks/legacy-Bqn4Q0Tf.js +41804 -0
  388. package/lib/devtools/chunks/legacy-DOCLCisy.js +1434 -0
  389. package/lib/devtools/chunks/less-DXiRNbd4.js +195 -0
  390. package/lib/devtools/chunks/lighthouse-DtpzvfT6.js +3920 -0
  391. package/lib/devtools/chunks/lighthouse-T9ZpmENr.js +2 -0
  392. package/lib/devtools/chunks/linear_memory_inspector-C50PtM45.js +305 -0
  393. package/lib/devtools/chunks/live-metrics-Bs7wxibB.js +284 -0
  394. package/lib/devtools/chunks/main-C5y6NscM.js +2 -0
  395. package/lib/devtools/chunks/main-DcgYyEI0.js +755 -0
  396. package/lib/devtools/chunks/markdown-tZoR6Bsu.js +1512 -0
  397. package/lib/devtools/chunks/markdown_view-C67b2DdG.js +461 -0
  398. package/lib/devtools/chunks/marked-zGgfoDxO.js +1362 -0
  399. package/lib/devtools/chunks/media-BhuqASbO.js +1337 -0
  400. package/lib/devtools/chunks/media-Wfo1AbXC.js +2 -0
  401. package/lib/devtools/chunks/menus-BAUukA5-.js +969 -0
  402. package/lib/devtools/chunks/mobile_throttling-C26zde8o.js +2 -0
  403. package/lib/devtools/chunks/mobile_throttling-Cw4AkJH4.js +1052 -0
  404. package/lib/devtools/chunks/network-C3gIloDN.js +2 -0
  405. package/lib/devtools/chunks/network-CaxdpGU2.js +9181 -0
  406. package/lib/devtools/chunks/objectValue.css-C9o9fdM2.js +4 -0
  407. package/lib/devtools/chunks/object_ui-BYgPTK_b.js +1461 -0
  408. package/lib/devtools/chunks/object_ui-E7eR7aD-.js +2 -0
  409. package/lib/devtools/chunks/perf_ui-BqzJrt4p.js +2 -0
  410. package/lib/devtools/chunks/perf_ui-CQMkYfn3.js +3143 -0
  411. package/lib/devtools/chunks/performance_monitor-B2kUoCv0.js +385 -0
  412. package/lib/devtools/chunks/php-tl5gKrxu.js +423 -0
  413. package/lib/devtools/chunks/platform-BzB373NB.js +600 -0
  414. package/lib/devtools/chunks/profiler-BGu3akEf.js +4608 -0
  415. package/lib/devtools/chunks/protocol_client-Cwf_jb8R.js +24329 -0
  416. package/lib/devtools/chunks/protocol_monitor-B9nMqAAE.js +2 -0
  417. package/lib/devtools/chunks/protocol_monitor-CvLQ8ms1.js +1224 -0
  418. package/lib/devtools/chunks/puppeteer-CaOjgj3v.js +13299 -0
  419. package/lib/devtools/chunks/python-D9AdRkMm.js +580 -0
  420. package/lib/devtools/chunks/quick_open-C3IZ69m9.js +2 -0
  421. package/lib/devtools/chunks/quick_open-DRITaPnZ.js +722 -0
  422. package/lib/devtools/chunks/recorder-C0f1n95b.js +5465 -0
  423. package/lib/devtools/chunks/recorder-actions-S2RfLX4H.js +6 -0
  424. package/lib/devtools/chunks/request_link_icon-fGy57GcW.js +87 -0
  425. package/lib/devtools/chunks/root-DbVQo07X.js +255 -0
  426. package/lib/devtools/chunks/sass-BPQlMmw2.js +370 -0
  427. package/lib/devtools/chunks/security-NbgKa3ux.js +898 -0
  428. package/lib/devtools/chunks/sensors-nM7qcBE4.js +752 -0
  429. package/lib/devtools/chunks/settings-aKtQC12v.js +1433 -0
  430. package/lib/devtools/chunks/settings_ui-CzxAFzIb.js +175 -0
  431. package/lib/devtools/chunks/snackbars-lPThuWYs.js +12010 -0
  432. package/lib/devtools/chunks/snippets-dIuBmVBv.js +173 -0
  433. package/lib/devtools/chunks/source_frame-CSjno3kf.js +1352 -0
  434. package/lib/devtools/chunks/sources-BIZssBei.js +8216 -0
  435. package/lib/devtools/chunks/sources-Bf8QJxju.js +2 -0
  436. package/lib/devtools/chunks/suggestion_input-Duuu5pyd.js +196 -0
  437. package/lib/devtools/chunks/svelte-DJS1itbE.js +744 -0
  438. package/lib/devtools/chunks/textInput.css-DPvwvIic.js +4 -0
  439. package/lib/devtools/chunks/text_editor-Dq1P6D2J.js +15706 -0
  440. package/lib/devtools/chunks/text_utils-ohNt_gua.js +608 -0
  441. package/lib/devtools/chunks/theme_support-CbSSLkbO.js +92 -0
  442. package/lib/devtools/chunks/third-party-web-DGiPoc0U.js +12626 -0
  443. package/lib/devtools/chunks/timeline-BE_ysZxO.js +2 -0
  444. package/lib/devtools/chunks/timeline-C4vCX79k.js +16347 -0
  445. package/lib/devtools/chunks/utils-CELci976.js +298 -0
  446. package/lib/devtools/chunks/vue-CjH9yovn.js +73 -0
  447. package/lib/devtools/chunks/wast-CbGHiqaW.js +109 -0
  448. package/lib/devtools/chunks/web_audio-IdfBLjwV.js +277 -0
  449. package/lib/devtools/chunks/webauthn-iRZlbjGV.js +522 -0
  450. package/lib/devtools/chunks/whats_new-DOTPf2xJ.js +177 -0
  451. package/lib/devtools/chunks/xml-DI9dcP5w.js +327 -0
  452. package/lib/devtools/connect.js +9 -0
  453. package/lib/devtools/design_system_tokens.css +1061 -0
  454. package/lib/devtools/device_mode_emulation_frame.html +25 -0
  455. package/lib/devtools/devtools_app.html +25 -0
  456. package/lib/devtools/emulated_devices/optimized/MotoG4-landscape.avif +0 -0
  457. package/lib/devtools/emulated_devices/optimized/MotoG4-portrait.avif +0 -0
  458. package/lib/devtools/emulated_devices/optimized/Nexus5X-landscape.avif +0 -0
  459. package/lib/devtools/emulated_devices/optimized/Nexus5X-portrait.avif +0 -0
  460. package/lib/devtools/emulated_devices/optimized/Nexus6P-landscape.avif +0 -0
  461. package/lib/devtools/emulated_devices/optimized/Nexus6P-portrait.avif +0 -0
  462. package/lib/devtools/emulated_devices/optimized/google-nest-hub-horizontal.avif +0 -0
  463. package/lib/devtools/emulated_devices/optimized/google-nest-hub-max-horizontal.avif +0 -0
  464. package/lib/devtools/emulated_devices/optimized/google-nexus-5-horizontal-default-1x.avif +0 -0
  465. package/lib/devtools/emulated_devices/optimized/google-nexus-5-horizontal-default-2x.avif +0 -0
  466. package/lib/devtools/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-1x.avif +0 -0
  467. package/lib/devtools/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-2x.avif +0 -0
  468. package/lib/devtools/emulated_devices/optimized/google-nexus-5-horizontal-navigation-1x.avif +0 -0
  469. package/lib/devtools/emulated_devices/optimized/google-nexus-5-horizontal-navigation-2x.avif +0 -0
  470. package/lib/devtools/emulated_devices/optimized/google-nexus-5-vertical-default-1x.avif +0 -0
  471. package/lib/devtools/emulated_devices/optimized/google-nexus-5-vertical-default-2x.avif +0 -0
  472. package/lib/devtools/emulated_devices/optimized/google-nexus-5-vertical-keyboard-1x.avif +0 -0
  473. package/lib/devtools/emulated_devices/optimized/google-nexus-5-vertical-keyboard-2x.avif +0 -0
  474. package/lib/devtools/emulated_devices/optimized/google-nexus-5-vertical-navigation-1x.avif +0 -0
  475. package/lib/devtools/emulated_devices/optimized/google-nexus-5-vertical-navigation-2x.avif +0 -0
  476. package/lib/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-default-1x.avif +0 -0
  477. package/lib/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-default-2x.avif +0 -0
  478. package/lib/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-1x.avif +0 -0
  479. package/lib/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-2x.avif +0 -0
  480. package/lib/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-1x.avif +0 -0
  481. package/lib/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-2x.avif +0 -0
  482. package/lib/devtools/emulated_devices/optimized/google-nexus-5x-vertical-default-1x.avif +0 -0
  483. package/lib/devtools/emulated_devices/optimized/google-nexus-5x-vertical-default-2x.avif +0 -0
  484. package/lib/devtools/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-1x.avif +0 -0
  485. package/lib/devtools/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-2x.avif +0 -0
  486. package/lib/devtools/emulated_devices/optimized/google-nexus-5x-vertical-navigation-1x.avif +0 -0
  487. package/lib/devtools/emulated_devices/optimized/google-nexus-5x-vertical-navigation-2x.avif +0 -0
  488. package/lib/devtools/emulated_devices/optimized/iPad-landscape.avif +0 -0
  489. package/lib/devtools/emulated_devices/optimized/iPad-portrait.avif +0 -0
  490. package/lib/devtools/emulated_devices/optimized/iPhone5-landscape.avif +0 -0
  491. package/lib/devtools/emulated_devices/optimized/iPhone5-portrait.avif +0 -0
  492. package/lib/devtools/emulated_devices/optimized/iPhone6-landscape.avif +0 -0
  493. package/lib/devtools/emulated_devices/optimized/iPhone6-portrait.avif +0 -0
  494. package/lib/devtools/emulated_devices/optimized/iPhone6Plus-landscape.avif +0 -0
  495. package/lib/devtools/emulated_devices/optimized/iPhone6Plus-portrait.avif +0 -0
  496. package/lib/devtools/emulated_devices/optimized/optimized_images.gni +53 -0
  497. package/lib/devtools/entrypoints/device_mode_emulation_frame/device_mode_emulation_frame.js +4 -0
  498. package/lib/devtools/entrypoints/devtools_app/devtools_app.js +6240 -0
  499. package/lib/devtools/entrypoints/formatter_worker/formatter_worker-entrypoint.js +2810 -0
  500. package/lib/devtools/entrypoints/heap_snapshot_worker/heap_snapshot_worker-entrypoint.js +2142 -0
  501. package/lib/devtools/entrypoints/lighthouse_worker/lighthouse_worker.js +290095 -0
  502. package/lib/devtools/entrypoints/wasmparser_worker/wasmparser_worker-entrypoint.js +3403 -0
  503. package/lib/devtools/models/issues_manager/descriptions/CoepCoopSandboxedIframeCannotNavigateToCoopPage.md +4 -0
  504. package/lib/devtools/models/issues_manager/descriptions/CoepCorpNotSameOrigin.md +8 -0
  505. package/lib/devtools/models/issues_manager/descriptions/CoepCorpNotSameOriginAfterDefaultedToSameOriginByCoep.md +18 -0
  506. package/lib/devtools/models/issues_manager/descriptions/CoepCorpNotSameSite.md +7 -0
  507. package/lib/devtools/models/issues_manager/descriptions/CoepFrameResourceNeedsCoepHeader.md +10 -0
  508. package/lib/devtools/models/issues_manager/descriptions/CompatibilityModeQuirks.md +5 -0
  509. package/lib/devtools/models/issues_manager/descriptions/CookieAttributeValueExceedsMaxSize.md +5 -0
  510. package/lib/devtools/models/issues_manager/descriptions/LowTextContrast.md +5 -0
  511. package/lib/devtools/models/issues_manager/descriptions/SameSiteExcludeContextDowngradeRead.md +8 -0
  512. package/lib/devtools/models/issues_manager/descriptions/SameSiteExcludeContextDowngradeSet.md +8 -0
  513. package/lib/devtools/models/issues_manager/descriptions/SameSiteExcludeNavigationContextDowngrade.md +8 -0
  514. package/lib/devtools/models/issues_manager/descriptions/SameSiteNoneInsecureErrorRead.md +8 -0
  515. package/lib/devtools/models/issues_manager/descriptions/SameSiteNoneInsecureErrorSet.md +8 -0
  516. package/lib/devtools/models/issues_manager/descriptions/SameSiteNoneInsecureWarnRead.md +8 -0
  517. package/lib/devtools/models/issues_manager/descriptions/SameSiteNoneInsecureWarnSet.md +8 -0
  518. package/lib/devtools/models/issues_manager/descriptions/SameSiteUnspecifiedLaxAllowUnsafeRead.md +9 -0
  519. package/lib/devtools/models/issues_manager/descriptions/SameSiteUnspecifiedLaxAllowUnsafeSet.md +9 -0
  520. package/lib/devtools/models/issues_manager/descriptions/SameSiteWarnCrossDowngradeRead.md +8 -0
  521. package/lib/devtools/models/issues_manager/descriptions/SameSiteWarnCrossDowngradeSet.md +8 -0
  522. package/lib/devtools/models/issues_manager/descriptions/SameSiteWarnStrictLaxDowngradeStrict.md +8 -0
  523. package/lib/devtools/models/issues_manager/descriptions/arInsecureContext.md +7 -0
  524. package/lib/devtools/models/issues_manager/descriptions/arInvalidInfoHeader.md +5 -0
  525. package/lib/devtools/models/issues_manager/descriptions/arInvalidRegisterOsSourceHeader.md +5 -0
  526. package/lib/devtools/models/issues_manager/descriptions/arInvalidRegisterOsTriggerHeader.md +5 -0
  527. package/lib/devtools/models/issues_manager/descriptions/arInvalidRegisterSourceHeader.md +5 -0
  528. package/lib/devtools/models/issues_manager/descriptions/arInvalidRegisterTriggerHeader.md +5 -0
  529. package/lib/devtools/models/issues_manager/descriptions/arNavigationRegistrationUniqueScopeAlreadySet.md +5 -0
  530. package/lib/devtools/models/issues_manager/descriptions/arNavigationRegistrationWithoutTransientUserActivation.md +6 -0
  531. package/lib/devtools/models/issues_manager/descriptions/arNoRegisterOsSourceHeader.md +5 -0
  532. package/lib/devtools/models/issues_manager/descriptions/arNoRegisterOsTriggerHeader.md +5 -0
  533. package/lib/devtools/models/issues_manager/descriptions/arNoRegisterSourceHeader.md +5 -0
  534. package/lib/devtools/models/issues_manager/descriptions/arNoRegisterTriggerHeader.md +5 -0
  535. package/lib/devtools/models/issues_manager/descriptions/arNoWebOrOsSupport.md +4 -0
  536. package/lib/devtools/models/issues_manager/descriptions/arOsSourceIgnored.md +18 -0
  537. package/lib/devtools/models/issues_manager/descriptions/arOsTriggerIgnored.md +19 -0
  538. package/lib/devtools/models/issues_manager/descriptions/arPermissionPolicyDisabled.md +8 -0
  539. package/lib/devtools/models/issues_manager/descriptions/arSourceAndTriggerHeaders.md +9 -0
  540. package/lib/devtools/models/issues_manager/descriptions/arSourceIgnored.md +13 -0
  541. package/lib/devtools/models/issues_manager/descriptions/arTriggerIgnored.md +12 -0
  542. package/lib/devtools/models/issues_manager/descriptions/arUntrustworthyReportingOrigin.md +10 -0
  543. package/lib/devtools/models/issues_manager/descriptions/arWebAndOsHeaders.md +11 -0
  544. package/lib/devtools/models/issues_manager/descriptions/bounceTrackingMitigations.md +3 -0
  545. package/lib/devtools/models/issues_manager/descriptions/clientHintMetaTagAllowListInvalidOrigin.md +4 -0
  546. package/lib/devtools/models/issues_manager/descriptions/clientHintMetaTagModifiedHTML.md +4 -0
  547. package/lib/devtools/models/issues_manager/descriptions/connectionAllowlistInvalidAllowlistItemType.md +12 -0
  548. package/lib/devtools/models/issues_manager/descriptions/connectionAllowlistInvalidHeader.md +12 -0
  549. package/lib/devtools/models/issues_manager/descriptions/connectionAllowlistInvalidUrlPattern.md +8 -0
  550. package/lib/devtools/models/issues_manager/descriptions/connectionAllowlistItemNotInnerList.md +12 -0
  551. package/lib/devtools/models/issues_manager/descriptions/connectionAllowlistMoreThanOneList.md +7 -0
  552. package/lib/devtools/models/issues_manager/descriptions/connectionAllowlistReportingEndpointNotToken.md +10 -0
  553. package/lib/devtools/models/issues_manager/descriptions/cookieCrossSiteRedirectDowngrade.md +12 -0
  554. package/lib/devtools/models/issues_manager/descriptions/cookieExcludeBlockedWithinRelatedWebsiteSet.md +4 -0
  555. package/lib/devtools/models/issues_manager/descriptions/cookieExcludeDomainNonAscii.md +11 -0
  556. package/lib/devtools/models/issues_manager/descriptions/cookieExcludePortMismatch.md +8 -0
  557. package/lib/devtools/models/issues_manager/descriptions/cookieExcludeSchemeMismatch.md +7 -0
  558. package/lib/devtools/models/issues_manager/descriptions/cookieExcludeThirdPartyPhaseoutRead.md +6 -0
  559. package/lib/devtools/models/issues_manager/descriptions/cookieExcludeThirdPartyPhaseoutSet.md +6 -0
  560. package/lib/devtools/models/issues_manager/descriptions/cookieWarnDomainNonAscii.md +11 -0
  561. package/lib/devtools/models/issues_manager/descriptions/cookieWarnMetadataGrantRead.md +4 -0
  562. package/lib/devtools/models/issues_manager/descriptions/cookieWarnMetadataGrantSet.md +4 -0
  563. package/lib/devtools/models/issues_manager/descriptions/cookieWarnThirdPartyPhaseoutRead.md +6 -0
  564. package/lib/devtools/models/issues_manager/descriptions/cookieWarnThirdPartyPhaseoutSet.md +6 -0
  565. package/lib/devtools/models/issues_manager/descriptions/corsAllowCredentialsRequired.md +6 -0
  566. package/lib/devtools/models/issues_manager/descriptions/corsDisabledScheme.md +7 -0
  567. package/lib/devtools/models/issues_manager/descriptions/corsDisallowedByMode.md +7 -0
  568. package/lib/devtools/models/issues_manager/descriptions/corsHeaderDisallowedByPreflightResponse.md +5 -0
  569. package/lib/devtools/models/issues_manager/descriptions/corsInvalidHeaderValues.md +7 -0
  570. package/lib/devtools/models/issues_manager/descriptions/corsLocalNetworkAccessPermissionDenied.md +19 -0
  571. package/lib/devtools/models/issues_manager/descriptions/corsMethodDisallowedByPreflightResponse.md +5 -0
  572. package/lib/devtools/models/issues_manager/descriptions/corsNoCorsRedirectModeNotFollow.md +5 -0
  573. package/lib/devtools/models/issues_manager/descriptions/corsOriginMismatch.md +6 -0
  574. package/lib/devtools/models/issues_manager/descriptions/corsPreflightResponseInvalid.md +5 -0
  575. package/lib/devtools/models/issues_manager/descriptions/corsRedirectContainsCredentials.md +5 -0
  576. package/lib/devtools/models/issues_manager/descriptions/corsWildcardOriginNotAllowed.md +8 -0
  577. package/lib/devtools/models/issues_manager/descriptions/cspEvalViolation.md +9 -0
  578. package/lib/devtools/models/issues_manager/descriptions/cspInlineViolation.md +10 -0
  579. package/lib/devtools/models/issues_manager/descriptions/cspTrustedTypesPolicyViolation.md +5 -0
  580. package/lib/devtools/models/issues_manager/descriptions/cspTrustedTypesSinkViolation.md +8 -0
  581. package/lib/devtools/models/issues_manager/descriptions/cspURLViolation.md +10 -0
  582. package/lib/devtools/models/issues_manager/descriptions/deprecation.md +3 -0
  583. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestDnsFetchFailed.md +1 -0
  584. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestDnsInvalidRecord.md +1 -0
  585. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestInvalidEmail.md +1 -0
  586. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestKeyBindingSigningFailed.md +1 -0
  587. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestRpOriginIsOpaque.md +1 -0
  588. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestTokenHttpNotFound.md +1 -0
  589. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestTokenInvalidContentType.md +1 -0
  590. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestTokenInvalidResponse.md +1 -0
  591. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestTokenInvalidSdJwt.md +1 -0
  592. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestTokenMalformedSdJwt.md +1 -0
  593. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestTokenNoResponse.md +1 -0
  594. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestUserLoggedOut.md +1 -0
  595. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestWellKnownAccountsEndpointCrossOrigin.md +1 -0
  596. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestWellKnownHttpNotFound.md +1 -0
  597. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestWellKnownInvalidContentType.md +1 -0
  598. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestWellKnownInvalidResponse.md +1 -0
  599. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestWellKnownIssuanceEndpointCrossOrigin.md +1 -0
  600. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestWellKnownListEmpty.md +1 -0
  601. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestWellKnownMissingAccountsEndpoint.md +1 -0
  602. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestWellKnownMissingIssuanceEndpoint.md +1 -0
  603. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestWellKnownNoResponse.md +1 -0
  604. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestWellKnownUnsupportedSigningAlgorithm.md +1 -0
  605. package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestAccountsHttpNotFound.md +1 -0
  606. package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestAccountsInvalidResponse.md +1 -0
  607. package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestAccountsNoResponse.md +1 -0
  608. package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestApprovalDeclined.md +1 -0
  609. package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestCanceled.md +1 -0
  610. package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestErrorFetchingSignin.md +1 -0
  611. package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestErrorIdToken.md +1 -0
  612. package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestIdTokenHttpNotFound.md +1 -0
  613. package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestIdTokenInvalidRequest.md +1 -0
  614. package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestIdTokenInvalidResponse.md +1 -0
  615. package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestIdTokenNoResponse.md +1 -0
  616. package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestInvalidSigninResponse.md +1 -0
  617. package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestManifestHttpNotFound.md +1 -0
  618. package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestManifestInvalidResponse.md +1 -0
  619. package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestManifestNoResponse.md +1 -0
  620. package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestTooManyRequests.md +1 -0
  621. package/lib/devtools/models/issues_manager/descriptions/federatedAuthUserInfoRequestInvalidAccountsResponse.md +1 -0
  622. package/lib/devtools/models/issues_manager/descriptions/federatedAuthUserInfoRequestInvalidConfigOrWellKnown.md +1 -0
  623. package/lib/devtools/models/issues_manager/descriptions/federatedAuthUserInfoRequestNoAccountSharingPermission.md +1 -0
  624. package/lib/devtools/models/issues_manager/descriptions/federatedAuthUserInfoRequestNoApiPermission.md +1 -0
  625. package/lib/devtools/models/issues_manager/descriptions/federatedAuthUserInfoRequestNoReturningUserFromFetchedAccounts.md +1 -0
  626. package/lib/devtools/models/issues_manager/descriptions/federatedAuthUserInfoRequestNotIframe.md +1 -0
  627. package/lib/devtools/models/issues_manager/descriptions/federatedAuthUserInfoRequestNotPotentiallyTrustworthy.md +1 -0
  628. package/lib/devtools/models/issues_manager/descriptions/federatedAuthUserInfoRequestNotSameOrigin.md +1 -0
  629. package/lib/devtools/models/issues_manager/descriptions/federatedAuthUserInfoRequestNotSignedInWithIdp.md +1 -0
  630. package/lib/devtools/models/issues_manager/descriptions/fetchingPartitionedBlobURL.md +7 -0
  631. package/lib/devtools/models/issues_manager/descriptions/genericBackUINavigationWouldSkipAd.md +4 -0
  632. package/lib/devtools/models/issues_manager/descriptions/genericFormAriaLabelledByToNonExistingIdError.md +8 -0
  633. package/lib/devtools/models/issues_manager/descriptions/genericFormAutocompleteAttributeEmptyError.md +5 -0
  634. package/lib/devtools/models/issues_manager/descriptions/genericFormDuplicateIdForInputError.md +5 -0
  635. package/lib/devtools/models/issues_manager/descriptions/genericFormEmptyIdAndNameAttributesForInputError.md +5 -0
  636. package/lib/devtools/models/issues_manager/descriptions/genericFormInputAssignedAutocompleteValueToIdOrNameAttributeError.md +5 -0
  637. package/lib/devtools/models/issues_manager/descriptions/genericFormInputHasWrongButWellIntendedAutocompleteValueError.md +5 -0
  638. package/lib/devtools/models/issues_manager/descriptions/genericFormInputWithNoLabelError.md +5 -0
  639. package/lib/devtools/models/issues_manager/descriptions/genericFormLabelForMatchesNonExistingIdError.md +5 -0
  640. package/lib/devtools/models/issues_manager/descriptions/genericFormLabelForNameError.md +5 -0
  641. package/lib/devtools/models/issues_manager/descriptions/genericFormLabelHasNeitherForNorNestedInputError.md +5 -0
  642. package/lib/devtools/models/issues_manager/descriptions/genericFormModelContextMissingToolDescription.md +5 -0
  643. package/lib/devtools/models/issues_manager/descriptions/genericFormModelContextMissingToolName.md +5 -0
  644. package/lib/devtools/models/issues_manager/descriptions/genericFormModelContextParameterMissingName.md +5 -0
  645. package/lib/devtools/models/issues_manager/descriptions/genericFormModelContextParameterMissingTitleAndDescription.md +5 -0
  646. package/lib/devtools/models/issues_manager/descriptions/genericFormModelContextRequiredParameterMissingName.md +5 -0
  647. package/lib/devtools/models/issues_manager/descriptions/genericNavigationEntryMarkedSkippable.md +7 -0
  648. package/lib/devtools/models/issues_manager/descriptions/genericResponseWasBlockedByORB.md +4 -0
  649. package/lib/devtools/models/issues_manager/descriptions/heavyAd.md +10 -0
  650. package/lib/devtools/models/issues_manager/descriptions/mixedContent.md +5 -0
  651. package/lib/devtools/models/issues_manager/descriptions/navigatingPartitionedBlobURL.md +5 -0
  652. package/lib/devtools/models/issues_manager/descriptions/permissionElementActivationDisabled.md +7 -0
  653. package/lib/devtools/models/issues_manager/descriptions/permissionElementActivationDisabledWithOccluder.md +9 -0
  654. package/lib/devtools/models/issues_manager/descriptions/permissionElementActivationDisabledWithOccluderParent.md +9 -0
  655. package/lib/devtools/models/issues_manager/descriptions/permissionElementCspFrameAncestorsMissing.md +5 -0
  656. package/lib/devtools/models/issues_manager/descriptions/permissionElementFencedFrameDisallowed.md +5 -0
  657. package/lib/devtools/models/issues_manager/descriptions/permissionElementFontSizeTooLarge.md +5 -0
  658. package/lib/devtools/models/issues_manager/descriptions/permissionElementFontSizeTooSmall.md +5 -0
  659. package/lib/devtools/models/issues_manager/descriptions/permissionElementGeolocationDeprecated.md +5 -0
  660. package/lib/devtools/models/issues_manager/descriptions/permissionElementInsetBoxShadowUnsupported.md +5 -0
  661. package/lib/devtools/models/issues_manager/descriptions/permissionElementInvalidDisplayStyle.md +5 -0
  662. package/lib/devtools/models/issues_manager/descriptions/permissionElementInvalidSizeValue.md +5 -0
  663. package/lib/devtools/models/issues_manager/descriptions/permissionElementInvalidType.md +5 -0
  664. package/lib/devtools/models/issues_manager/descriptions/permissionElementInvalidTypeActivation.md +5 -0
  665. package/lib/devtools/models/issues_manager/descriptions/permissionElementLowContrast.md +5 -0
  666. package/lib/devtools/models/issues_manager/descriptions/permissionElementNonOpaqueColor.md +5 -0
  667. package/lib/devtools/models/issues_manager/descriptions/permissionElementPaddingBottomUnsupported.md +6 -0
  668. package/lib/devtools/models/issues_manager/descriptions/permissionElementPaddingRightUnsupported.md +6 -0
  669. package/lib/devtools/models/issues_manager/descriptions/permissionElementPermissionsPolicyBlocked.md +5 -0
  670. package/lib/devtools/models/issues_manager/descriptions/permissionElementRegistrationFailed.md +5 -0
  671. package/lib/devtools/models/issues_manager/descriptions/permissionElementRequestInProgress.md +5 -0
  672. package/lib/devtools/models/issues_manager/descriptions/permissionElementSecurityChecksFailed.md +5 -0
  673. package/lib/devtools/models/issues_manager/descriptions/permissionElementTypeNotSupported.md +5 -0
  674. package/lib/devtools/models/issues_manager/descriptions/permissionElementUntrustedEvent.md +7 -0
  675. package/lib/devtools/models/issues_manager/descriptions/placeholderDescriptionForInvisibleIssues.md +3 -0
  676. package/lib/devtools/models/issues_manager/descriptions/propertyRuleInvalidNameIssue.md +3 -0
  677. package/lib/devtools/models/issues_manager/descriptions/propertyRuleIssue.md +7 -0
  678. package/lib/devtools/models/issues_manager/descriptions/selectElementAccessibilityDisallowedOptGroupChild.md +7 -0
  679. package/lib/devtools/models/issues_manager/descriptions/selectElementAccessibilityDisallowedSelectChild.md +7 -0
  680. package/lib/devtools/models/issues_manager/descriptions/selectElementAccessibilityInteractiveContentAttributesSelectDescendant.md +3 -0
  681. package/lib/devtools/models/issues_manager/descriptions/selectElementAccessibilityInteractiveContentLegendChild.md +3 -0
  682. package/lib/devtools/models/issues_manager/descriptions/selectElementAccessibilityInteractiveContentOptionChild.md +3 -0
  683. package/lib/devtools/models/issues_manager/descriptions/selectElementAccessibilityNonPhrasingContentOptionChild.md +3 -0
  684. package/lib/devtools/models/issues_manager/descriptions/selectivePermissionsIntervention.md +7 -0
  685. package/lib/devtools/models/issues_manager/descriptions/sharedArrayBuffer.md +7 -0
  686. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryUseErrorCrossOriginNoCorsRequest.md +1 -0
  687. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryUseErrorDictionaryLoadFailure.md +3 -0
  688. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryUseErrorMatchingDictionaryNotUsed.md +3 -0
  689. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryUseErrorUnexpectedContentDictionaryHeader.md +1 -0
  690. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorCossOriginNoCorsRequest.md +1 -0
  691. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorDisallowedBySettings.md +1 -0
  692. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorExpiredResponse.md +3 -0
  693. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorFeatureDisabled.md +3 -0
  694. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorInsufficientResources.md +1 -0
  695. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorInvalidMatchField.md +1 -0
  696. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorInvalidStructuredHeader.md +1 -0
  697. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorInvalidTTLField.md +1 -0
  698. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorNavigationRequest.md +3 -0
  699. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorNoMatchField.md +1 -0
  700. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonIntegerTTLField.md +1 -0
  701. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonListMatchDestField.md +1 -0
  702. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonSecureContext.md +3 -0
  703. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonStringIdField.md +1 -0
  704. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonStringInMatchDestList.md +1 -0
  705. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonStringMatchField.md +1 -0
  706. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonTokenTypeField.md +1 -0
  707. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorRequestAborted.md +1 -0
  708. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorShuttingDown.md +1 -0
  709. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorTooLongIdField.md +3 -0
  710. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorUnsupportedType.md +3 -0
  711. package/lib/devtools/models/issues_manager/descriptions/sriInvalidSignatureHeader.md +14 -0
  712. package/lib/devtools/models/issues_manager/descriptions/sriInvalidSignatureInputHeader.md +15 -0
  713. package/lib/devtools/models/issues_manager/descriptions/sriMissingSignatureHeader.md +8 -0
  714. package/lib/devtools/models/issues_manager/descriptions/sriMissingSignatureInputHeader.md +7 -0
  715. package/lib/devtools/models/issues_manager/descriptions/sriSignatureHeaderValueIsIncorrectLength.md +11 -0
  716. package/lib/devtools/models/issues_manager/descriptions/sriSignatureHeaderValueIsNotByteSequence.md +14 -0
  717. package/lib/devtools/models/issues_manager/descriptions/sriSignatureHeaderValueIsParameterized.md +15 -0
  718. package/lib/devtools/models/issues_manager/descriptions/sriSignatureInputHeaderInvalidComponentName.md +8 -0
  719. package/lib/devtools/models/issues_manager/descriptions/sriSignatureInputHeaderInvalidComponentType.md +13 -0
  720. package/lib/devtools/models/issues_manager/descriptions/sriSignatureInputHeaderInvalidDerivedComponentParameter.md +4 -0
  721. package/lib/devtools/models/issues_manager/descriptions/sriSignatureInputHeaderInvalidHeaderComponentParameter.md +5 -0
  722. package/lib/devtools/models/issues_manager/descriptions/sriSignatureInputHeaderInvalidParameter.md +11 -0
  723. package/lib/devtools/models/issues_manager/descriptions/sriSignatureInputHeaderKeyIdLength.md +12 -0
  724. package/lib/devtools/models/issues_manager/descriptions/sriSignatureInputHeaderMissingLabel.md +6 -0
  725. package/lib/devtools/models/issues_manager/descriptions/sriSignatureInputHeaderMissingRequiredParameters.md +8 -0
  726. package/lib/devtools/models/issues_manager/descriptions/sriSignatureInputHeaderValueMissingComponents.md +11 -0
  727. package/lib/devtools/models/issues_manager/descriptions/sriSignatureInputHeaderValueNotInnerList.md +11 -0
  728. package/lib/devtools/models/issues_manager/descriptions/sriValidationFailedIntegrityMismatch.md +10 -0
  729. package/lib/devtools/models/issues_manager/descriptions/sriValidationFailedInvalidLength.md +5 -0
  730. package/lib/devtools/models/issues_manager/descriptions/sriValidationFailedSignatureExpired.md +6 -0
  731. package/lib/devtools/models/issues_manager/descriptions/sriValidationFailedSignatureMismatch.md +11 -0
  732. package/lib/devtools/models/issues_manager/descriptions/stylesheetLateImport.md +4 -0
  733. package/lib/devtools/models/issues_manager/descriptions/stylesheetRequestFailed.md +3 -0
  734. package/lib/devtools/models/issues_manager/descriptions/summaryElementAccessibilityInteractiveContentSummaryDescendant.md +3 -0
  735. package/lib/devtools/models/issues_manager/descriptions/unencodedDigestIncorrectDigestLength.md +12 -0
  736. package/lib/devtools/models/issues_manager/descriptions/unencodedDigestIncorrectDigestType.md +17 -0
  737. package/lib/devtools/models/issues_manager/descriptions/unencodedDigestMalformedDictionary.md +14 -0
  738. package/lib/devtools/models/issues_manager/descriptions/unencodedDigestUnknownAlgorithm.md +15 -0
  739. package/lib/devtools/models/live-metrics/web-vitals-injected/web-vitals-injected.generated.js +1 -0
  740. package/lib/devtools/panels/recorder/injected/injected.generated.js +1 -0
  741. package/lib/devtools/panels/whats_new/resources/WNDT.md +14 -0
  742. package/lib/devtools/resource-manifest.json +3818 -0
  743. package/lib/devtools/third_party/acorn/package/LICENSE +21 -0
  744. package/lib/devtools/third_party/axe-core/LICENSE +362 -0
  745. package/lib/devtools/third_party/chromium/LICENSE +27 -0
  746. package/lib/devtools/third_party/codemirror/package/LICENSE +21 -0
  747. package/lib/devtools/third_party/codemirror.next/LICENSE +21 -0
  748. package/lib/devtools/third_party/csp_evaluator/package/LICENSE +202 -0
  749. package/lib/devtools/third_party/diff/LICENSE +202 -0
  750. package/lib/devtools/third_party/i18n/LICENSE +202 -0
  751. package/lib/devtools/third_party/intl-messageformat/LICENSE +33 -0
  752. package/lib/devtools/third_party/intl-messageformat/package/LICENSE.md +33 -0
  753. package/lib/devtools/third_party/json5/LICENSE +23 -0
  754. package/lib/devtools/third_party/legacy-javascript/LICENSE +202 -0
  755. package/lib/devtools/third_party/lighthouse/LICENSE +202 -0
  756. package/lib/devtools/third_party/lit/LICENSE +28 -0
  757. package/lib/devtools/third_party/marked/LICENSE +39 -0
  758. package/lib/devtools/third_party/marked/package/LICENSE.md +44 -0
  759. package/lib/devtools/third_party/puppeteer/LICENSE +202 -0
  760. package/lib/devtools/third_party/puppeteer/third_party/mitt/LICENSE +21 -0
  761. package/lib/devtools/third_party/puppeteer/third_party/parsel/LICENSE +21 -0
  762. package/lib/devtools/third_party/puppeteer/third_party/rxjs/LICENSE +201 -0
  763. package/lib/devtools/third_party/puppeteer-replay/package/LICENSE +202 -0
  764. package/lib/devtools/third_party/source-map-scopes-codec/LICENSE +26 -0
  765. package/lib/devtools/third_party/source-map-scopes-codec/package/LICENSE +26 -0
  766. package/lib/devtools/third_party/third-party-web/LICENSE +20 -0
  767. package/lib/devtools/third_party/third-party-web/package/LICENSE +20 -0
  768. package/lib/devtools/third_party/vscode.web-custom-data/package/LICENSE.md +21 -0
  769. package/lib/devtools/third_party/wasmparser/package/LICENSE +177 -0
  770. package/lib/devtools/third_party/web-vitals/package/LICENSE +202 -0
  771. package/lib/index.js +2554 -0
  772. package/lib/types/client/bottom/keyboard.d.ts +10 -0
  773. package/lib/types/client/bottom/locales.d.ts +17 -0
  774. package/lib/types/client/bottom/page.d.ts +10 -0
  775. package/lib/types/client/bottom/resize.d.ts +12 -0
  776. package/lib/types/client/bridge/controller.d.ts +10 -0
  777. package/lib/types/client/bridge/dispatcher.d.ts +26 -0
  778. package/lib/types/client/bridge/lifecycle.d.ts +22 -0
  779. package/lib/types/client/bridge/locales.d.ts +3 -0
  780. package/lib/types/client/bridge/publisher.d.ts +42 -0
  781. package/lib/types/client/bridge/rpc.d.ts +13 -0
  782. package/lib/types/client/bridge/transport.d.ts +41 -0
  783. package/lib/types/client/cdp/console.d.ts +45 -0
  784. package/lib/types/client/cdp/debugger.d.ts +8 -0
  785. package/lib/types/client/cdp/errors.d.ts +8 -0
  786. package/lib/types/client/cdp/heap-profiler.d.ts +8 -0
  787. package/lib/types/client/cdp/index.d.ts +10 -0
  788. package/lib/types/client/cdp/objects.d.ts +69 -0
  789. package/lib/types/client/cdp/profiler.d.ts +8 -0
  790. package/lib/types/client/cdp/properties.d.ts +16 -0
  791. package/lib/types/client/cdp/runtime.d.ts +79 -0
  792. package/lib/types/client/cdp/sources.d.ts +53 -0
  793. package/lib/types/client/cdp/stack.d.ts +27 -0
  794. package/lib/types/client/index.d.ts +3 -0
  795. package/lib/types/client/inspection/cordis.d.ts +3 -0
  796. package/lib/types/client/inspection/network.d.ts +4 -0
  797. package/lib/types/client/inspection/realm.d.ts +27 -0
  798. package/lib/types/client/plugin.d.ts +29 -0
  799. package/lib/types/host/bridge/controller.d.ts +108 -0
  800. package/lib/types/host/bridge/dispatcher.d.ts +16 -0
  801. package/lib/types/host/bridge/lifecycle.d.ts +42 -0
  802. package/lib/types/host/bridge/publisher.d.ts +31 -0
  803. package/lib/types/host/bridge/rpc.d.ts +15 -0
  804. package/lib/types/host/bridge/transport.d.ts +28 -0
  805. package/lib/types/host/cdp/console.d.ts +14 -0
  806. package/lib/types/host/cdp/debugger.d.ts +8 -0
  807. package/lib/types/host/cdp/errors.d.ts +6 -0
  808. package/lib/types/host/cdp/heap-profiler.d.ts +8 -0
  809. package/lib/types/host/cdp/index.d.ts +10 -0
  810. package/lib/types/host/cdp/objects.d.ts +8 -0
  811. package/lib/types/host/cdp/profiler.d.ts +8 -0
  812. package/lib/types/host/cdp/properties.d.ts +7 -0
  813. package/lib/types/host/cdp/runtime.d.ts +16 -0
  814. package/lib/types/host/cdp/sources.d.ts +14 -0
  815. package/lib/types/host/cdp/stack.d.ts +4 -0
  816. package/lib/types/host/index.d.ts +3 -0
  817. package/lib/types/host/inspection/cordis.d.ts +3 -0
  818. package/lib/types/host/inspection/network.d.ts +23 -0
  819. package/lib/types/host/inspection/realm.d.ts +9 -0
  820. package/lib/types/host/plugin.d.ts +19 -0
  821. package/lib/types/index.d.ts +50 -0
  822. package/lib/types/shared/bridge/buffer.d.ts +62 -0
  823. package/lib/types/shared/bridge/codec.d.ts +4 -0
  824. package/lib/types/shared/bridge/control-codec.d.ts +27 -0
  825. package/lib/types/shared/bridge/ids.d.ts +19 -0
  826. package/lib/types/shared/bridge/messages/control.d.ts +64 -0
  827. package/lib/types/shared/bridge/messages/cordis.d.ts +4 -0
  828. package/lib/types/shared/bridge/messages/network.d.ts +4 -0
  829. package/lib/types/shared/bridge/messages/observation.d.ts +110 -0
  830. package/lib/types/shared/bridge/messages/query/codec.d.ts +40 -0
  831. package/lib/types/shared/bridge/messages/query/commands.d.ts +35 -0
  832. package/lib/types/shared/bridge/messages/query/frames.d.ts +31 -0
  833. package/lib/types/shared/bridge/messages/query/index.d.ts +5 -0
  834. package/lib/types/shared/bridge/messages/runtime/command-codec.d.ts +9 -0
  835. package/lib/types/shared/bridge/messages/runtime/commands.d.ts +76 -0
  836. package/lib/types/shared/bridge/messages/runtime/console-frames.d.ts +52 -0
  837. package/lib/types/shared/bridge/messages/runtime/frames.d.ts +98 -0
  838. package/lib/types/shared/bridge/messages/runtime/index.d.ts +5 -0
  839. package/lib/types/shared/bridge/messages/runtime/value-codec.d.ts +28 -0
  840. package/lib/types/shared/bridge/messages/sources/codec.d.ts +15 -0
  841. package/lib/types/shared/bridge/messages/sources/commands.d.ts +42 -0
  842. package/lib/types/shared/bridge/messages/sources/frames.d.ts +67 -0
  843. package/lib/types/shared/bridge/messages/sources/index.d.ts +5 -0
  844. package/lib/types/shared/bridge/publisher.d.ts +33 -0
  845. package/lib/types/shared/bridge/query-reader.d.ts +10 -0
  846. package/lib/types/shared/bridge/rpc.d.ts +62 -0
  847. package/lib/types/shared/bridge/validation.d.ts +3 -0
  848. package/lib/types/shared/bridge/version.d.ts +3 -0
  849. package/lib/types/shared/cdp/capabilities.d.ts +17 -0
  850. package/lib/types/shared/cdp/console.d.ts +28 -0
  851. package/lib/types/shared/cdp/debugger.d.ts +69 -0
  852. package/lib/types/shared/cdp/errors.d.ts +27 -0
  853. package/lib/types/shared/cdp/ids.d.ts +9 -0
  854. package/lib/types/shared/cdp/index.d.ts +11 -0
  855. package/lib/types/shared/cdp/operations.d.ts +86 -0
  856. package/lib/types/shared/cdp/property.d.ts +28 -0
  857. package/lib/types/shared/cdp/realm.d.ts +137 -0
  858. package/lib/types/shared/cdp/remote-object.d.ts +44 -0
  859. package/lib/types/shared/cdp/sources.d.ts +18 -0
  860. package/lib/types/shared/cordis/collector.d.ts +26 -0
  861. package/lib/types/shared/cordis/ids.d.ts +7 -0
  862. package/lib/types/shared/cordis/model.d.ts +61 -0
  863. package/lib/types/shared/cordis/object-reference.d.ts +14 -0
  864. package/lib/types/shared/cordis/object-registry.d.ts +80 -0
  865. package/lib/types/shared/cordis/observer.d.ts +15 -0
  866. package/lib/types/shared/cordis/projector.d.ts +34 -0
  867. package/lib/types/shared/cordis/publisher.d.ts +13 -0
  868. package/lib/types/shared/cordis/reader.d.ts +18 -0
  869. package/lib/types/shared/cordis/snapshot.d.ts +39 -0
  870. package/lib/types/shared/dispose.d.ts +11 -0
  871. package/lib/types/shared/identity.d.ts +12 -0
  872. package/lib/types/shared/index.d.ts +18 -0
  873. package/lib/types/shared/json.d.ts +35 -0
  874. package/lib/types/shared/network/event-source.d.ts +20 -0
  875. package/lib/types/shared/network/observation.d.ts +52 -0
  876. package/lib/types/shared/service.d.ts +23 -0
  877. package/lib/types/shared/validation.d.ts +52 -0
  878. package/lib/types/shared/web.d.ts +16 -0
  879. package/lib/types/worker/bridge/endpoint.d.ts +49 -0
  880. package/lib/types/worker/bridge/hub.d.ts +108 -0
  881. package/lib/types/worker/bridge/runtime-rpc.d.ts +90 -0
  882. package/lib/types/worker/bridge/session.d.ts +15 -0
  883. package/lib/types/worker/bridge/source-rpc.d.ts +42 -0
  884. package/lib/types/worker/cdp/domains/debugger/cdp-params.d.ts +15 -0
  885. package/lib/types/worker/cdp/domains/debugger/index.d.ts +6 -0
  886. package/lib/types/worker/cdp/domains/debugger/projector.d.ts +22 -0
  887. package/lib/types/worker/cdp/domains/debugger/script-registry.d.ts +70 -0
  888. package/lib/types/worker/cdp/domains/debugger/session.d.ts +47 -0
  889. package/lib/types/worker/cdp/domains/dom/index.d.ts +4 -0
  890. package/lib/types/worker/cdp/domains/dom/model.d.ts +121 -0
  891. package/lib/types/worker/cdp/domains/dom/session.d.ts +78 -0
  892. package/lib/types/worker/cdp/domains/native.d.ts +25 -0
  893. package/lib/types/worker/cdp/domains/network/session.d.ts +46 -0
  894. package/lib/types/worker/cdp/domains/runtime/cdp-params.d.ts +82 -0
  895. package/lib/types/worker/cdp/domains/runtime/index.d.ts +3 -0
  896. package/lib/types/worker/cdp/domains/runtime/object-table.d.ts +117 -0
  897. package/lib/types/worker/cdp/domains/runtime/session.d.ts +97 -0
  898. package/lib/types/worker/cdp/ids.d.ts +37 -0
  899. package/lib/types/worker/cdp/protocol.d.ts +46 -0
  900. package/lib/types/worker/cdp/realm-sessions.d.ts +67 -0
  901. package/lib/types/worker/cdp/session.d.ts +39 -0
  902. package/lib/types/worker/cdp/target.d.ts +17 -0
  903. package/lib/types/worker/entry.d.ts +3 -0
  904. package/lib/types/worker/inspection/cordis-query.d.ts +11 -0
  905. package/lib/types/worker/inspection/cordis-store.d.ts +94 -0
  906. package/lib/types/worker/inspection/network-store.d.ts +110 -0
  907. package/lib/types/worker/inspection/query-router.d.ts +78 -0
  908. package/lib/types/worker/inspection/realm-store.d.ts +58 -0
  909. package/lib/types/worker/inspection/realm.d.ts +43 -0
  910. package/lib/types/worker/realms/client/bridge.d.ts +18 -0
  911. package/lib/types/worker/realms/client/console.d.ts +21 -0
  912. package/lib/types/worker/realms/client/debugger.d.ts +8 -0
  913. package/lib/types/worker/realms/client/index.d.ts +18 -0
  914. package/lib/types/worker/realms/client/runtime.d.ts +28 -0
  915. package/lib/types/worker/realms/client/scripts.d.ts +15 -0
  916. package/lib/types/worker/realms/client/sources.d.ts +30 -0
  917. package/lib/types/worker/realms/client/values.d.ts +55 -0
  918. package/lib/types/worker/realms/host/bridge.d.ts +49 -0
  919. package/lib/types/worker/realms/host/console.d.ts +25 -0
  920. package/lib/types/worker/realms/host/debugger.d.ts +25 -0
  921. package/lib/types/worker/realms/host/index.d.ts +13 -0
  922. package/lib/types/worker/realms/host/runtime.d.ts +54 -0
  923. package/lib/types/worker/realms/host/scripts.d.ts +9 -0
  924. package/lib/types/worker/realms/host/sources.d.ts +26 -0
  925. package/lib/types/worker/realms/host/values.d.ts +22 -0
  926. package/lib/types/worker/server.d.ts +16 -0
  927. package/lib/worker.js +7289 -0
  928. package/locale/en.json +6 -0
  929. package/locale/zh.json +6 -0
  930. package/package.json +90 -3
@@ -0,0 +1,4105 @@
1
+ import { K as e, St as t, W as n, i as r, j as i, rt as a, x as o } from "./platform-BzB373NB.js";
2
+ import { $ as s, A as c, At as l, F as u, L as d, O as f, R as p, Z as m, at as ee, bt as h, d as te, n as ne, nt as re, p as g, q as ie, t as ae, wt as _ } from "./common-qd_KLeYO.js";
3
+ import { g as v, p as oe } from "./root-DbVQo07X.js";
4
+ import { $f as se, $l as ce, $s as le, Ad as ue, Al as y, Fl as de, Jd as b, Kl as x, Md as S, Nd as fe, Nl as C, Pl as w, Ql as pe, Qs as me, Rl as he, Sl as ge, Vc as _e, Wc as T, Xf as E, Yl as ve, Zl as ye, _l as D, af as O, cu as be, dc as xe, ef as Se, ff as Ce, hl as k, kl as A, pl as j, vl as we, wl as Te, xl as Ee } from "./legacy-Bqn4Q0Tf.js";
5
+ import { S as De, _ as Oe, b as M, g as N, m as ke, o as Ae, t as je, v as Me } from "./text_utils-ohNt_gua.js";
6
+ import { a as P } from "./FormatterActions-FcPgI0uV.js";
7
+ //#region node_modules/.pnpm/chrome-devtools-frontend@1.0.1638082/node_modules/chrome-devtools-frontend/front_end/models/stack_trace/DetailedErrorStackParser.ts
8
+ var Ne = /^\s*at\s+/;
9
+ function Pe(e) {
10
+ let t = e.split("\n"), n = Fe(t), r = [];
11
+ if (n === -1) return r;
12
+ for (let e = n; e < t.length; ++e) {
13
+ let n = t[e], i = Ne.exec(n);
14
+ if (!i) {
15
+ if (n.trim() === "") continue;
16
+ return null;
17
+ }
18
+ let a = n.substring(i[0].length), o = !1;
19
+ a.startsWith("async ") && (o = !0, a = a.substring(6));
20
+ let s = !1;
21
+ a.startsWith("new ") && (s = !0, a = a.substring(4));
22
+ let c = "", l = "", d = -1, f = -1, p, m, ee = !1, h = !1, te, ne, re, g, ie = a.indexOf(" (");
23
+ if (a.endsWith(")") && ie !== -1) {
24
+ c = a.substring(0, ie).trim();
25
+ let e = a.substring(ie + 2, a.length - 1);
26
+ if (e.startsWith("eval at ")) {
27
+ ee = !0;
28
+ let t = e.lastIndexOf(", "), n = e;
29
+ t === -1 ? e = "" : (n = e.substring(0, t), e = e.substring(t + 2)), n.startsWith("eval at ") && (n = n.substring(8));
30
+ let r = n.indexOf(" ("), i = n, a = "";
31
+ r === -1 ? g = Pe(` at ${i}`)?.[0] : (i = n.substring(0, r).trim(), a = n.substring(r + 2, n.length - 1), g = Pe(` at ${i} (${a})`)?.[0]);
32
+ }
33
+ if (e.startsWith("index ")) re = parseInt(e.substring(6), 10), l = "";
34
+ else if (e === "<anonymous>" || e === "native") l = "";
35
+ else if (e.includes(":wasm-function[")) {
36
+ h = !0;
37
+ let t = /^(.*):wasm-function\[(\d+)\]:(0x[0-9a-fA-F]+)$/.exec(e);
38
+ t && (l = t[1], ne = parseInt(t[2], 10), f = parseInt(t[3], 16));
39
+ } else {
40
+ let t = u.splitLineAndColumn(e);
41
+ l = t.url, d = t.lineNumber ?? -1, f = t.columnNumber ?? -1;
42
+ }
43
+ } else {
44
+ let e = u.splitLineAndColumn(a);
45
+ l = e.url, d = e.lineNumber ?? -1, f = e.columnNumber ?? -1;
46
+ }
47
+ if (c) {
48
+ let e = /(.*)\s+\[as\s+(.*)\]/.exec(c);
49
+ e && (m = e[2], c = e[1]);
50
+ let t = c.indexOf(".");
51
+ t !== -1 && (p = c.substring(0, t), m ??= c.substring(t + 1)), h && p && (te = p);
52
+ }
53
+ r.push({
54
+ url: l,
55
+ functionName: c,
56
+ lineNumber: d,
57
+ columnNumber: f,
58
+ parsedFrameInfo: {
59
+ isAsync: o,
60
+ isConstructor: s,
61
+ isEval: ee,
62
+ evalOrigin: g,
63
+ isWasm: h,
64
+ wasmModuleName: te,
65
+ wasmFunctionIndex: ne,
66
+ typeName: p,
67
+ methodName: m,
68
+ promiseIndex: re
69
+ }
70
+ });
71
+ }
72
+ return r;
73
+ }
74
+ function Fe(e) {
75
+ return e.findIndex((e) => Ne.test(e));
76
+ }
77
+ function Ie(e) {
78
+ let t = e.split("\n"), n = Fe(t);
79
+ return n === -1 ? e : t.slice(0, n).join("\n");
80
+ }
81
+ function Le(e, t) {
82
+ function n(e) {
83
+ let r = e.parsedFrameInfo?.isWasm, i = t.callFrames.find((t) => r ? e.url === t.url && e.columnNumber === t.columnNumber : e.url === t.url && e.lineNumber === t.lineNumber && e.columnNumber === t.columnNumber);
84
+ i && (e.scriptId = i.scriptId), e.parsedFrameInfo?.evalOrigin && n(e.parsedFrameInfo.evalOrigin);
85
+ }
86
+ for (let t of e) n(t);
87
+ }
88
+ //#endregion
89
+ //#region node_modules/.pnpm/chrome-devtools-frontend@1.0.1638082/node_modules/chrome-devtools-frontend/front_end/models/stack_trace/StackTraceImpl.ts
90
+ var Re = class extends l {
91
+ syncFragment;
92
+ asyncFragments;
93
+ constructor(e, t) {
94
+ super(), this.syncFragment = e, this.asyncFragments = t, (e instanceof We || e instanceof He ? e.fragment : e).stackTraces.add(this), this.asyncFragments.forEach((e) => e.fragment.stackTraces.add(this));
95
+ }
96
+ }, ze = class e {
97
+ static EMPTY_FRAGMENT = new e();
98
+ node;
99
+ stackTraces = /* @__PURE__ */ new Set();
100
+ static getOrCreate(t) {
101
+ return t.fragment ||= new e(t), t.fragment;
102
+ }
103
+ constructor(e) {
104
+ this.node = e;
105
+ }
106
+ get frames() {
107
+ if (!this.node) return [];
108
+ let e = [];
109
+ for (let t of this.node.getCallStack()) e.push(...t.frames);
110
+ return e;
111
+ }
112
+ }, Be = class {
113
+ description;
114
+ fragment;
115
+ constructor(e, t) {
116
+ this.description = e, this.fragment = t;
117
+ }
118
+ get frames() {
119
+ return this.fragment.frames;
120
+ }
121
+ }, Ve = class {
122
+ url;
123
+ uiSourceCode;
124
+ name;
125
+ line;
126
+ column;
127
+ missingDebugInfo;
128
+ rawName;
129
+ constructor(e, t, n, r, i, a, o) {
130
+ this.url = e, this.uiSourceCode = t, this.name = n, this.line = r, this.column = i, this.missingDebugInfo = a, this.rawName = o;
131
+ }
132
+ }, He = class {
133
+ fragment;
134
+ constructor(e) {
135
+ this.fragment = e;
136
+ }
137
+ get frames() {
138
+ if (!this.fragment.node) return [];
139
+ let e = [];
140
+ for (let t of this.fragment.node.getCallStack()) for (let n of t.frames) e.push(new Ue(n, t.parsedFrameInfo, t.evalOriginFrames));
141
+ return e;
142
+ }
143
+ }, Ue = class e {
144
+ #e;
145
+ #t;
146
+ #n;
147
+ constructor(e, t, n) {
148
+ this.#e = e, this.#t = t, this.#n = n;
149
+ }
150
+ get url() {
151
+ return this.#e.url;
152
+ }
153
+ get uiSourceCode() {
154
+ return this.#e.uiSourceCode;
155
+ }
156
+ get name() {
157
+ return this.#e.name;
158
+ }
159
+ get line() {
160
+ return this.#e.line;
161
+ }
162
+ get column() {
163
+ return this.#e.column;
164
+ }
165
+ get missingDebugInfo() {
166
+ return this.#e.missingDebugInfo;
167
+ }
168
+ get rawName() {
169
+ return this.#e.rawName;
170
+ }
171
+ get isAsync() {
172
+ return this.#t?.isAsync;
173
+ }
174
+ get isConstructor() {
175
+ return this.#t?.isConstructor;
176
+ }
177
+ get isEval() {
178
+ return this.#t?.isEval;
179
+ }
180
+ get evalOrigin() {
181
+ if (!(!this.#n || this.#n.length === 0)) return new e(this.#n[0], this.#t?.evalOrigin?.parsedFrameInfo);
182
+ }
183
+ get isWasm() {
184
+ return this.#t?.isWasm;
185
+ }
186
+ get wasmModuleName() {
187
+ return this.#t?.wasmModuleName;
188
+ }
189
+ get wasmFunctionIndex() {
190
+ return this.#t?.wasmFunctionIndex;
191
+ }
192
+ get typeName() {
193
+ return this.#t?.typeName;
194
+ }
195
+ get methodName() {
196
+ return this.#t?.methodName;
197
+ }
198
+ get promiseIndex() {
199
+ return this.#t?.promiseIndex;
200
+ }
201
+ }, We = class {
202
+ fragment;
203
+ callFrames;
204
+ constructor(e, t) {
205
+ this.fragment = e, this.callFrames = t;
206
+ }
207
+ get frames() {
208
+ if (!this.fragment.node) return [];
209
+ let e = [], t = 0;
210
+ for (let n of this.fragment.node.getCallStack()) {
211
+ for (let [r, i] of n.frames.entries()) {
212
+ let n = r === 0 ? this.callFrames[t] : this.callFrames[t].createVirtualCallFrame(r, i.name ?? "");
213
+ e.push(new Ge(i, n));
214
+ }
215
+ t++;
216
+ }
217
+ return e;
218
+ }
219
+ }, Ge = class {
220
+ #e;
221
+ #t;
222
+ constructor(e, t) {
223
+ this.#e = e, this.#t = t;
224
+ }
225
+ get url() {
226
+ return this.#e.url;
227
+ }
228
+ get uiSourceCode() {
229
+ return this.#e.uiSourceCode;
230
+ }
231
+ get name() {
232
+ return this.#e.name;
233
+ }
234
+ get line() {
235
+ return this.#e.line;
236
+ }
237
+ get column() {
238
+ return this.#e.column;
239
+ }
240
+ get missingDebugInfo() {
241
+ return this.#e.missingDebugInfo;
242
+ }
243
+ get rawName() {
244
+ return this.#e.rawName;
245
+ }
246
+ get sdkFrame() {
247
+ return this.#t;
248
+ }
249
+ };
250
+ //#endregion
251
+ //#region node_modules/.pnpm/chrome-devtools-frontend@1.0.1638082/node_modules/chrome-devtools-frontend/front_end/models/stack_trace/ErrorStackParser.ts
252
+ function Ke(e, t) {
253
+ let n = e.indexOf("\n");
254
+ return e = `${n === -1 ? e : e.substring(0, n)}. ${t}${n === -1 ? "" : e.substring(n)}`, e;
255
+ }
256
+ function qe(e, t) {
257
+ if (!(/\n\s*at\s/.test(t) || t.startsWith("SyntaxError:"))) return null;
258
+ let n = e.debuggerModel(), r = e.target().inspectedURL(), i = t.split("\n"), a = [];
259
+ for (let e of i) {
260
+ let t = /^\s*at\s(async\s)?/.exec(e);
261
+ if (!t) {
262
+ if (a.length && a[a.length - 1].isCallFrame) return null;
263
+ a.push({ line: e });
264
+ continue;
265
+ }
266
+ let i = t[0].length, o = e.length, s = !1;
267
+ if (e[o - 1] === ")") {
268
+ if (o--, s = !0, i = e.lastIndexOf(" (", o), i < 0) return null;
269
+ i += 2;
270
+ let t = e.indexOf("), ", i);
271
+ t > i && (o = t);
272
+ }
273
+ let c = e.substring(i, o), l = u.splitLineAndColumn(c);
274
+ if (l.url === "<anonymous>") {
275
+ a.length && a[a.length - 1].isCallFrame && !a[a.length - 1].link ? a[a.length - 1].line += `\n${e}` : a.push({
276
+ line: e,
277
+ isCallFrame: !0
278
+ });
279
+ continue;
280
+ }
281
+ let d = Je(n, l.url);
282
+ if (!d && u.isRelativeURL(l.url) && (d = Je(n, u.completeURL(r, l.url))), !d) return null;
283
+ a.push({
284
+ line: e,
285
+ isCallFrame: !0,
286
+ link: {
287
+ url: d,
288
+ prefix: e.substring(0, i),
289
+ suffix: e.substring(o),
290
+ enclosedInBraces: s,
291
+ lineNumber: l.lineNumber,
292
+ columnNumber: l.columnNumber
293
+ }
294
+ });
295
+ }
296
+ return a;
297
+ }
298
+ function Je(e, t) {
299
+ if (!t) return null;
300
+ if (u.isValidUrlString(t) || e.scriptsForSourceURL(t).length) return t;
301
+ let n = new URL(t, "file://");
302
+ return e.scriptsForSourceURL(n.href).length ? n.href : null;
303
+ }
304
+ function Ye(e, t) {
305
+ for (let n of e) {
306
+ let e = t.callFrames.find((e) => Xe(n, e));
307
+ e && n.link && (n.link.scriptId = e.scriptId);
308
+ }
309
+ }
310
+ function Xe(e, t) {
311
+ if (!e.link) return !1;
312
+ let { url: n, lineNumber: r, columnNumber: i } = e.link;
313
+ return n === t.url && r === t.lineNumber && i === t.columnNumber;
314
+ }
315
+ //#endregion
316
+ //#region node_modules/.pnpm/chrome-devtools-frontend@1.0.1638082/node_modules/chrome-devtools-frontend/front_end/models/stack_trace/StackTrace.ts
317
+ var Ze = /* @__PURE__ */ function(e) {
318
+ return e.NO_INFO = "NO_INFO", e.PARTIAL_INFO = "PARTIAL_INFO", e;
319
+ }({}), F = /* @__PURE__ */ function(e) {
320
+ return e.UPDATED = "UPDATED", e;
321
+ }({}), Qe = class e {
322
+ static #e;
323
+ frame;
324
+ constructor(e) {
325
+ this.frame = e;
326
+ }
327
+ get sdkFrame() {
328
+ return this.frame.sdkFrame;
329
+ }
330
+ static for(t) {
331
+ function n(e, t) {
332
+ return e.url === t.url && e.uiSourceCode === t.uiSourceCode && e.name === t.name && e.line === t.line && e.column === t.column && e.sdkFrame === t.sdkFrame && JSON.stringify(e.missingDebugInfo) === JSON.stringify(t.missingDebugInfo);
333
+ }
334
+ return (!e.#e || !n(e.#e.frame, t)) && (e.#e = new e(t)), e.#e;
335
+ }
336
+ };
337
+ //#endregion
338
+ //#region node_modules/.pnpm/chrome-devtools-frontend@1.0.1638082/node_modules/chrome-devtools-frontend/front_end/models/stack_trace/Trie.ts
339
+ function $e(e) {
340
+ return e.lineNumber === -1 && e.columnNumber === -1 && !e.scriptId && !e.url;
341
+ }
342
+ var et = class {
343
+ parent;
344
+ children = [];
345
+ rawFrame;
346
+ frames = [];
347
+ fragment;
348
+ parsedFrameInfo;
349
+ evalOriginFrames;
350
+ constructor(e, t) {
351
+ this.rawFrame = e, this.parent = t, this.parsedFrameInfo = e.parsedFrameInfo;
352
+ }
353
+ *getCallStack() {
354
+ for (let e = this; e.parent; e = e.parent) yield e;
355
+ }
356
+ }, tt = class {
357
+ #e = {
358
+ parent: null,
359
+ children: []
360
+ };
361
+ insert(e) {
362
+ if (e.length === 0) throw Error("Trie.insert called with an empty frames array.");
363
+ let t = this.#e;
364
+ for (let n = e.length - 1; n >= 0; --n) t = this.#t(t, e[n]);
365
+ return t;
366
+ }
367
+ #t(e, t) {
368
+ let n = 0;
369
+ for (; n < e.children.length; ++n) {
370
+ let r = e.children[n], i = r instanceof WeakRef ? r.deref() : r;
371
+ if (!i) continue;
372
+ let a = nt(i.rawFrame, t);
373
+ if (a === 0) return t.parsedFrameInfo && !i.parsedFrameInfo && (i.parsedFrameInfo = t.parsedFrameInfo), i;
374
+ if (a > 0) break;
375
+ }
376
+ let r = new et(t, e);
377
+ return e.parent ? e.children.splice(n, 0, r) : e.children.splice(n, 0, new WeakRef(r)), r;
378
+ }
379
+ walk(e, t) {
380
+ let n = e ? [e] : [...this.#e.children].map((e) => e.deref()).filter((e) => !!e);
381
+ for (let e = n.pop(); e; e = n.pop()) if (t(e)) for (let t = e.children.length - 1; t >= 0; --t) n.push(e.children[t]);
382
+ }
383
+ };
384
+ function nt(e, t) {
385
+ let n = (e.scriptId ?? "").localeCompare(t.scriptId ?? "");
386
+ if (n !== 0) return n;
387
+ let r = (e.url ?? "").localeCompare(t.url ?? "");
388
+ if (r !== 0) return r;
389
+ let i = (e.functionName ?? "").localeCompare(t.functionName ?? "");
390
+ return i === 0 ? e.lineNumber === t.lineNumber ? e.columnNumber - t.columnNumber : e.lineNumber - t.lineNumber : i;
391
+ }
392
+ //#endregion
393
+ //#region node_modules/.pnpm/chrome-devtools-frontend@1.0.1638082/node_modules/chrome-devtools-frontend/front_end/models/stack_trace/StackTraceModel.ts
394
+ var I = class e extends Ce {
395
+ #e = new tt();
396
+ #t = new p();
397
+ static #n(t) {
398
+ let n = (t ?? S.instance().primaryPageTarget())?.model(e);
399
+ if (!n) throw Error("Unable to find StackTraceModel");
400
+ return n;
401
+ }
402
+ async createFromProtocolRuntime(e, t) {
403
+ let [n, r] = await Promise.all([this.#a(e.callFrames, t), this.#i(e, t)]);
404
+ return new Re(n, r);
405
+ }
406
+ async createFromErrorStackLikeString(e, t, n) {
407
+ let r = Pe(e);
408
+ if (!r) return null;
409
+ n?.stackTrace && Le(r, n.stackTrace);
410
+ let [i, a] = await Promise.all([this.#a(r, t), n?.stackTrace ? this.#i(n.stackTrace, t) : Promise.resolve([])]);
411
+ return new Re(new He(i), a);
412
+ }
413
+ async createFromDebuggerPaused(e, t) {
414
+ let [n, r] = await Promise.all([this.#r(e, t), this.#i(e, t)]);
415
+ return new Re(n, r);
416
+ }
417
+ async scriptInfoChanged(e, t) {
418
+ let n = await this.#t.acquire();
419
+ try {
420
+ let n = [], r = /* @__PURE__ */ new Set();
421
+ for (let i of this.#s(e)) i.node?.children.length === 0 && n.push(this.#o(i, t)), r = r.union(i.stackTraces);
422
+ await Promise.all(n);
423
+ for (let e of r) e.dispatchEventToListeners(F.UPDATED);
424
+ } finally {
425
+ n();
426
+ }
427
+ }
428
+ async #r(e, t) {
429
+ return new We(await this.#a(e.callFrames.map((e) => ({
430
+ scriptId: e.script.scriptId,
431
+ url: e.script.sourceURL,
432
+ functionName: e.functionName,
433
+ lineNumber: e.location().lineNumber,
434
+ columnNumber: e.location().columnNumber
435
+ })), t), e.callFrames);
436
+ }
437
+ async #i(t, n) {
438
+ let r = [], i = this.target().model(j);
439
+ if (i) for await (let { stackTrace: a, target: o } of i.iterateAsyncParents(t)) {
440
+ if (a.callFrames.length === 0) continue;
441
+ let t = e.#n(o).#a(a.callFrames, n).then((e) => new Be(a.description ?? "", e));
442
+ r.push(t);
443
+ }
444
+ return await Promise.all(r);
445
+ }
446
+ async #a(e, t) {
447
+ if (e.length === 0) return ze.EMPTY_FRAGMENT;
448
+ let n = await this.#t.acquire();
449
+ try {
450
+ let n = this.#e.insert(e), r = !n.fragment, i = ze.getOrCreate(n);
451
+ return r && await this.#o(i, t), i;
452
+ } finally {
453
+ n();
454
+ }
455
+ }
456
+ async #o(e, t) {
457
+ if (!e.node) return;
458
+ let n = e.node.getCallStack().map((e) => e.rawFrame).toArray(), r = await t(n, this.target());
459
+ console.assert(n.length === r.length, "Broken rawFramesToUIFrames implementation");
460
+ let i = [];
461
+ for (let n of e.node.getCallStack()) n.parsedFrameInfo?.evalOrigin && i.push(t([n.parsedFrameInfo.evalOrigin], this.target()));
462
+ let a = await Promise.all(i), o = 0, s = 0;
463
+ for (let t of e.node.getCallStack()) if (t.frames = r[o++].map((e) => new Ve(e.url, e.uiSourceCode, e.name, e.line, e.column, e.missingDebugInfo, t.rawFrame.functionName)), t.parsedFrameInfo?.evalOrigin) {
464
+ let e = t.parsedFrameInfo.evalOrigin;
465
+ t.evalOriginFrames = a[s++][0].map((t) => new Ve(t.url, t.uiSourceCode, t.name, t.line, t.column, t.missingDebugInfo, e.functionName));
466
+ }
467
+ }
468
+ #s(e) {
469
+ let t = /* @__PURE__ */ new Set();
470
+ this.#e.walk(null, (n) => n.rawFrame.scriptId === e.scriptId || !n.rawFrame.scriptId && n.rawFrame.url === e.sourceURL ? (t.add(n), !1) : !0);
471
+ let n = /* @__PURE__ */ new Set();
472
+ for (let e of t) this.#e.walk(e, (e) => (e.fragment && n.add(e.fragment), !0));
473
+ return n;
474
+ }
475
+ };
476
+ Ce.register(I, {
477
+ capabilities: fe.NONE,
478
+ autostart: !1
479
+ });
480
+ //#endregion
481
+ //#region node_modules/.pnpm/chrome-devtools-frontend@1.0.1638082/node_modules/chrome-devtools-frontend/front_end/models/workspace/FileManager.ts
482
+ var rt, L = class e extends l {
483
+ #e = /* @__PURE__ */ new Map();
484
+ constructor() {
485
+ super(), E.events.addEventListener(se.SavedURL, this.savedURL, this), E.events.addEventListener(se.CanceledSaveURL, this.#t, this), E.events.addEventListener(se.AppendedToURL, this.appendedToURL, this);
486
+ }
487
+ static instance(t = { forceNew: null }) {
488
+ let { forceNew: n } = t;
489
+ return (!rt || n) && (rt = new e()), rt;
490
+ }
491
+ save(e, t, n) {
492
+ let r = new Promise((t) => this.#e.set(e, t)), { isTextContent: i } = t, a = i ? t.text : t.base64;
493
+ return E.save(e, a, n, !i), r;
494
+ }
495
+ savedURL(e) {
496
+ let { url: t, fileSystemPath: n } = e.data, r = this.#e.get(t);
497
+ this.#e.delete(t), r && r({ fileSystemPath: n });
498
+ }
499
+ #t({ data: e }) {
500
+ let t = this.#e.get(e);
501
+ this.#e.delete(e), t && t(null);
502
+ }
503
+ append(e, t) {
504
+ E.append(e, t);
505
+ }
506
+ close(e) {
507
+ E.close(e);
508
+ }
509
+ appendedToURL({ data: e }) {
510
+ this.dispatchEventToListeners("AppendedToURL", e);
511
+ }
512
+ }, it = /* @__PURE__ */ function(e) {
513
+ return e.APPENDED_TO_URL = "AppendedToURL", e;
514
+ }({}), at = {
515
+ index: "(index)",
516
+ thisFileWasChangedExternally: "This file was changed externally. Would you like to reload it?"
517
+ }, ot = _("models/workspace/UISourceCode.ts", at), st = h.bind(void 0, ot), ct = class extends l {
518
+ #e;
519
+ #t;
520
+ #n;
521
+ #r;
522
+ #i;
523
+ #a;
524
+ #o = null;
525
+ #s = /* @__PURE__ */ new Map();
526
+ #c = !1;
527
+ #l = null;
528
+ #u = null;
529
+ #d = !1;
530
+ #f = !1;
531
+ #p = null;
532
+ #m = null;
533
+ #h = null;
534
+ #g = !1;
535
+ #_;
536
+ #v = !1;
537
+ #y = !1;
538
+ #b = !1;
539
+ constructor(e, t, n) {
540
+ super(), this.#n = e, this.#r = t;
541
+ let r = u.fromString(t);
542
+ if (r) if (this.#e = r.securityOrigin(), this.#t = u.concatenate(this.#e, r.folderPathComponents), r.queryParams && !(r.lastPathComponent && n.isFromSourceMap())) this.#i = r.lastPathComponent + "?" + r.queryParams;
543
+ else try {
544
+ this.#i = decodeURIComponent(r.lastPathComponent);
545
+ } catch {
546
+ this.#i = r.lastPathComponent;
547
+ }
548
+ else this.#e = "", this.#t = "", this.#i = t;
549
+ this.#a = n;
550
+ }
551
+ requestMetadata() {
552
+ return this.#n.requestMetadata(this);
553
+ }
554
+ name() {
555
+ return this.#i;
556
+ }
557
+ mimeType() {
558
+ return this.#n.mimeType(this);
559
+ }
560
+ url() {
561
+ return this.#r;
562
+ }
563
+ canonicalScriptId() {
564
+ return `${this.#a.name()},${this.#r}`;
565
+ }
566
+ parentURL() {
567
+ return this.#t;
568
+ }
569
+ origin() {
570
+ return this.#e;
571
+ }
572
+ fullDisplayName() {
573
+ return this.#n.fullDisplayName(this);
574
+ }
575
+ displayName(e) {
576
+ if (!this.#i) return st(at.index);
577
+ let t = this.#i;
578
+ return e ? t : n(t, 100);
579
+ }
580
+ canRename() {
581
+ return this.#n.canRename();
582
+ }
583
+ rename(e) {
584
+ let { resolve: t, promise: n } = Promise.withResolvers();
585
+ return this.#n.rename(this, e, r.bind(this)), n;
586
+ function r(e, n, r, i) {
587
+ e && this.#x(n, r, i), t(e);
588
+ }
589
+ }
590
+ remove() {
591
+ this.#n.deleteFile(this);
592
+ }
593
+ #x(e, t, n) {
594
+ let r = this.#r;
595
+ this.#i = e, t ? this.#r = t : this.#r = u.relativePathToUrlString(e, r), n && (this.#a = n), this.dispatchEventToListeners("TitleChanged", this), this.project().workspace().dispatchEventToListeners(H.UISourceCodeRenamed, {
596
+ oldURL: r,
597
+ uiSourceCode: this
598
+ });
599
+ }
600
+ contentURL() {
601
+ return this.url();
602
+ }
603
+ contentType() {
604
+ return this.#a;
605
+ }
606
+ project() {
607
+ return this.#n;
608
+ }
609
+ requestContentData({ cachedWasmOnly: e } = {}) {
610
+ return this.#o ? this.#o : this.#u ? Promise.resolve(this.#u) : e && this.mimeType() === "application/wasm" ? Promise.resolve(new je([], [], [])) : (this.#o = this.#S(), this.#o);
611
+ }
612
+ async #S() {
613
+ if (this.#u) throw Error("Called UISourceCode#requestContentImpl even though content is available for " + this.#r);
614
+ try {
615
+ this.#u = await this.#n.requestFileContent(this);
616
+ } catch (e) {
617
+ this.#u = { error: e ? String(e) : "" };
618
+ }
619
+ return this.#u;
620
+ }
621
+ #C(e) {
622
+ return e ? e.isEncoded && e.content ? atob(e.content) : e.content : null;
623
+ }
624
+ #w(e) {
625
+ return !e || N.isError(e) ? null : e.createdFromBase64 ? atob(e.base64) : e.text;
626
+ }
627
+ async checkContentUpdated() {
628
+ if (!this.#u && !this.#d || !this.#n.canSetFileContent() || this.#f) return;
629
+ this.#f = !0;
630
+ let e = N.asDeferredContent(await this.#n.requestFileContent(this));
631
+ if (!("error" in e)) {
632
+ if (this.#f = !1, e.content === null) {
633
+ let e = this.workingCopy();
634
+ this.#E("", !1), this.setWorkingCopy(e);
635
+ return;
636
+ }
637
+ if (this.#p !== e.content) {
638
+ if (this.#w(this.#u) === this.#C(e)) {
639
+ this.#p = null;
640
+ return;
641
+ }
642
+ if (!this.isDirty() || this.#m === e.content) {
643
+ this.#E(e.content, !1);
644
+ return;
645
+ }
646
+ await ee(this), await new Promise((e) => setTimeout(e, 0)), typeof globalThis.confirm != "function" || globalThis.confirm(st(at.thisFileWasChangedExternally)) ? this.#E(e.content, !1) : this.#p = e.content;
647
+ }
648
+ }
649
+ }
650
+ forceLoadOnCheckContent() {
651
+ this.#d = !0;
652
+ }
653
+ #T(e) {
654
+ this.#n.canSetFileContent() && this.#n.setFileContent(this, e, !1), this.#E(e, !0);
655
+ }
656
+ #E(e, t) {
657
+ this.#p = null, this.#u = new N(e, !!this.#_, this.mimeType()), this.#o = null, this.#c = !0, this.#D();
658
+ let n = {
659
+ uiSourceCode: this,
660
+ content: e,
661
+ encoded: this.#_
662
+ };
663
+ this.dispatchEventToListeners("WorkingCopyCommitted", n), this.#n.workspace().dispatchEventToListeners(H.WorkingCopyCommitted, n), t && this.#n.workspace().dispatchEventToListeners(H.WorkingCopyCommittedByUser, n);
664
+ }
665
+ addRevision(e) {
666
+ this.#T(e);
667
+ }
668
+ hasCommits() {
669
+ return this.#c;
670
+ }
671
+ workingCopy() {
672
+ return this.workingCopyContent().content || "";
673
+ }
674
+ workingCopyContent() {
675
+ return this.workingCopyContentData().asDeferedContent();
676
+ }
677
+ workingCopyContentData() {
678
+ this.#h &&= (this.#m = this.#h(), null);
679
+ let e = this.#u ? N.contentDataOrEmpty(this.#u) : Oe;
680
+ return this.#m === null ? e : new N(this.#m, !1, e.mimeType);
681
+ }
682
+ resetWorkingCopy() {
683
+ this.#D(), this.#O();
684
+ }
685
+ #D() {
686
+ this.#m = null, this.#h = null, this.setContainsAiChanges(!1);
687
+ }
688
+ setWorkingCopy(e) {
689
+ this.#m = e, this.#h = null, this.#O();
690
+ }
691
+ setContainsAiChanges(e) {
692
+ this.#b = e;
693
+ }
694
+ containsAiChanges() {
695
+ return this.#b;
696
+ }
697
+ setContent(e, t) {
698
+ this.#_ = t, this.#n.canSetFileContent() && this.#n.setFileContent(this, e, t), this.#E(e, !0);
699
+ }
700
+ setWorkingCopyGetter(e) {
701
+ this.#h = e, this.#O();
702
+ }
703
+ #O() {
704
+ this.#k(), this.dispatchEventToListeners("WorkingCopyChanged", this), this.#n.workspace().dispatchEventToListeners(H.WorkingCopyChanged, { uiSourceCode: this });
705
+ }
706
+ removeWorkingCopyGetter() {
707
+ this.#h &&= (this.#m = this.#h(), null);
708
+ }
709
+ commitWorkingCopy() {
710
+ this.isDirty() && this.#T(this.workingCopy());
711
+ }
712
+ isDirty() {
713
+ return this.#m !== null || this.#h !== null;
714
+ }
715
+ isKnownThirdParty() {
716
+ return this.#v;
717
+ }
718
+ markKnownThirdParty() {
719
+ this.#v = !0;
720
+ }
721
+ isUnconditionallyIgnoreListed() {
722
+ return this.#y;
723
+ }
724
+ isFetchXHR() {
725
+ return [c.XHR, c.Fetch].includes(this.contentType());
726
+ }
727
+ markAsUnconditionallyIgnoreListed() {
728
+ this.#y = !0;
729
+ }
730
+ extension() {
731
+ return u.extractExtension(this.#i);
732
+ }
733
+ content() {
734
+ return !this.#u || "error" in this.#u ? "" : this.#u.text;
735
+ }
736
+ loadError() {
737
+ return this.#u && "error" in this.#u && this.#u.error || null;
738
+ }
739
+ searchInContent(e, t, n) {
740
+ return !this.#u || "error" in this.#u ? this.#n.searchInFileContent(this, e, t, n) : Promise.resolve(ke(this.#u, e, t, n));
741
+ }
742
+ contentLoaded() {
743
+ return !!this.#u;
744
+ }
745
+ uiLocation(e, t) {
746
+ return new z(this, e, t);
747
+ }
748
+ messages() {
749
+ return this.#l ? new Set(this.#l) : /* @__PURE__ */ new Set();
750
+ }
751
+ addLineMessage(e, t, n, r, i) {
752
+ let a = M.createFromLocation(n, r || 0), o = new B(e, t, i, a);
753
+ return this.addMessage(o), o;
754
+ }
755
+ addMessage(e) {
756
+ this.#l ||= /* @__PURE__ */ new Set(), this.#l.add(e), this.dispatchEventToListeners("MessageAdded", e);
757
+ }
758
+ removeMessage(e) {
759
+ this.#l?.delete(e) && this.dispatchEventToListeners("MessageRemoved", e);
760
+ }
761
+ #k() {
762
+ if (this.#l) {
763
+ for (let e of this.#l) this.dispatchEventToListeners("MessageRemoved", e);
764
+ this.#l = null;
765
+ }
766
+ }
767
+ setDecorationData(e, t) {
768
+ t !== this.#s.get(e) && (this.#s.set(e, t), this.dispatchEventToListeners("DecorationChanged", e));
769
+ }
770
+ getDecorationData(e) {
771
+ return this.#s.get(e);
772
+ }
773
+ disableEdit() {
774
+ this.#g = !0;
775
+ }
776
+ editDisabled() {
777
+ return this.#g;
778
+ }
779
+ isIgnoreListed(e = _t.instance()) {
780
+ return e.isUserOrSourceMapIgnoreListedUISourceCode(this);
781
+ }
782
+ }, R = /* @__PURE__ */ function(e) {
783
+ return e.WorkingCopyChanged = "WorkingCopyChanged", e.WorkingCopyCommitted = "WorkingCopyCommitted", e.TitleChanged = "TitleChanged", e.MessageAdded = "MessageAdded", e.MessageRemoved = "MessageRemoved", e.DecorationChanged = "DecorationChanged", e;
784
+ }({}), z = class {
785
+ uiSourceCode;
786
+ lineNumber;
787
+ columnNumber;
788
+ constructor(e, t, n) {
789
+ this.uiSourceCode = e, this.lineNumber = t, this.columnNumber = n;
790
+ }
791
+ linkText(e = !1, t = !1) {
792
+ let n = this.uiSourceCode.displayName(e), r = this.lineAndColumnText(t), i = r ? n + ":" + r : n;
793
+ return this.uiSourceCode.isDirty() && (i = "*" + i), i;
794
+ }
795
+ lineAndColumnText(e = !1) {
796
+ let t;
797
+ return this.uiSourceCode.mimeType() === "application/wasm" ? typeof this.columnNumber == "number" && (t = `0x${this.columnNumber.toString(16)}`) : (t = `${this.lineNumber + 1}`, e && typeof this.columnNumber == "number" && (t += ":" + (this.columnNumber + 1))), t;
798
+ }
799
+ id() {
800
+ return typeof this.columnNumber == "number" ? this.uiSourceCode.project().id() + ":" + this.uiSourceCode.url() + ":" + this.lineNumber + ":" + this.columnNumber : this.lineId();
801
+ }
802
+ lineId() {
803
+ return this.uiSourceCode.project().id() + ":" + this.uiSourceCode.url() + ":" + this.lineNumber;
804
+ }
805
+ static comparator(e, t) {
806
+ return e.compareTo(t);
807
+ }
808
+ compareTo(e) {
809
+ return this.uiSourceCode.url() === e.uiSourceCode.url() ? this.lineNumber === e.lineNumber ? this.columnNumber === e.columnNumber ? 0 : typeof this.columnNumber == "number" ? typeof e.columnNumber == "number" ? this.columnNumber - e.columnNumber : 1 : -1 : this.lineNumber - e.lineNumber : this.uiSourceCode.url() > e.uiSourceCode.url() ? 1 : -1;
810
+ }
811
+ isIgnoreListed(e = _t.instance()) {
812
+ return this.uiSourceCode.isIgnoreListed(e);
813
+ }
814
+ }, lt = class {
815
+ uiSourceCode;
816
+ range;
817
+ constructor(e, t) {
818
+ this.uiSourceCode = e, this.range = t;
819
+ }
820
+ }, ut = class {
821
+ uiSourceCode;
822
+ range;
823
+ name;
824
+ constructor(e, t, n) {
825
+ this.uiSourceCode = e, this.range = t, this.name = n;
826
+ }
827
+ }, B = class {
828
+ #e;
829
+ #t;
830
+ range;
831
+ #n;
832
+ constructor(e, t, n, r) {
833
+ this.#e = e, this.#t = t, this.range = r ?? new M(0, 0, 0, 0), this.#n = n;
834
+ }
835
+ level() {
836
+ return this.#e;
837
+ }
838
+ text() {
839
+ return this.#t;
840
+ }
841
+ clickHandler() {
842
+ return this.#n;
843
+ }
844
+ lineNumber() {
845
+ return this.range.startLine;
846
+ }
847
+ columnNumber() {
848
+ return this.range.startColumn;
849
+ }
850
+ isEqual(e) {
851
+ return this.text() === e.text() && this.level() === e.level() && this.range.equal(e.range);
852
+ }
853
+ };
854
+ (function(e) {
855
+ e.Level = /* @__PURE__ */ function(e) {
856
+ return e.ERROR = "Error", e.ISSUE = "Issue", e.WARNING = "Warning", e;
857
+ }({});
858
+ })(B ||= {});
859
+ var dt = class {
860
+ modificationTime;
861
+ contentSize;
862
+ constructor(e, t) {
863
+ this.modificationTime = e, this.contentSize = t;
864
+ }
865
+ }, ft = /* @__PURE__ */ function(e) {
866
+ return e.PERFORMANCE = "performance", e.COVERAGE = "coverage", e;
867
+ }({});
868
+ function pt(e, t) {
869
+ let n = /* @__PURE__ */ new Map();
870
+ for (let [r, i] of e) for (let [e, a] of i) {
871
+ let i = t(r - 1, e - 1);
872
+ if (!i) continue;
873
+ let o = i[0] + 1, s = i[1] + 1, c = n.get(o);
874
+ c || (c = /* @__PURE__ */ new Map(), n.set(o, c)), c.set(s, (c.get(s) || 0) + a);
875
+ }
876
+ return n;
877
+ }
878
+ //#endregion
879
+ //#region node_modules/.pnpm/chrome-devtools-frontend@1.0.1638082/node_modules/chrome-devtools-frontend/front_end/models/workspace/WorkspaceImpl.ts
880
+ var V = /* @__PURE__ */ function(e) {
881
+ return e.Debugger = "debugger", e.Formatter = "formatter", e.Network = "network", e.FileSystem = "filesystem", e.ConnectableFileSystem = "connectablefilesystem", e.ContentScripts = "contentscripts", e.Service = "service", e;
882
+ }({}), mt = class {
883
+ #e;
884
+ #t;
885
+ #n;
886
+ #r;
887
+ #i = /* @__PURE__ */ new Map();
888
+ constructor(e, t, n, r) {
889
+ this.#e = e, this.#t = t, this.#n = n, this.#r = r;
890
+ }
891
+ id() {
892
+ return this.#t;
893
+ }
894
+ type() {
895
+ return this.#n;
896
+ }
897
+ displayName() {
898
+ return this.#r;
899
+ }
900
+ workspace() {
901
+ return this.#e;
902
+ }
903
+ createUISourceCode(e, t) {
904
+ return new ct(this, e, t);
905
+ }
906
+ addUISourceCode(e) {
907
+ let t = e.url();
908
+ return this.uiSourceCodeForURL(t) ? !1 : (this.#i.set(t, e), this.#e.dispatchEventToListeners("UISourceCodeAdded", e), !0);
909
+ }
910
+ removeUISourceCode(e) {
911
+ let t = this.#i.get(e);
912
+ t !== void 0 && (this.#i.delete(e), this.#e.dispatchEventToListeners("UISourceCodeRemoved", t));
913
+ }
914
+ removeProject() {
915
+ this.#e.removeProject(this), this.#i.clear();
916
+ }
917
+ uiSourceCodeForURL(e) {
918
+ return this.#i.get(e) ?? null;
919
+ }
920
+ uiSourceCodes() {
921
+ return this.#i.values();
922
+ }
923
+ renameUISourceCode(e, t) {
924
+ let n = e.url(), r = e.parentURL() ? u.urlFromParentUrlAndName(e.parentURL(), t) : u.preEncodeSpecialCharactersInPath(t);
925
+ this.#i.set(r, e), this.#i.delete(n);
926
+ }
927
+ rename(e, t, n) {}
928
+ excludeFolder(e) {}
929
+ deleteFile(e) {}
930
+ deleteDirectoryRecursively(e) {
931
+ return Promise.resolve(!1);
932
+ }
933
+ remove() {}
934
+ indexContent(e) {}
935
+ }, ht = class e extends l {
936
+ #e = /* @__PURE__ */ new Map();
937
+ #t = !1;
938
+ static instance(t = { forceNew: null }) {
939
+ let { forceNew: n } = t;
940
+ return (!v().has(e) || n) && v().set(e, new e()), v().get(e);
941
+ }
942
+ static removeInstance() {
943
+ v().delete(e);
944
+ }
945
+ uiSourceCode(e, t) {
946
+ let n = this.#e.get(e);
947
+ return n ? n.uiSourceCodeForURL(t) : null;
948
+ }
949
+ uiSourceCodeForURL(e) {
950
+ for (let t of this.#e.values()) {
951
+ let n = t.uiSourceCodeForURL(e);
952
+ if (n) return n;
953
+ }
954
+ return null;
955
+ }
956
+ findCompatibleUISourceCodes(e) {
957
+ let t = e.url(), n = e.contentType(), r = [];
958
+ for (let i of this.#e.values()) {
959
+ if (e.project().type() !== i.type()) continue;
960
+ let a = i.uiSourceCodeForURL(t);
961
+ a && a.url() === t && a.contentType() === n && r.push(a);
962
+ }
963
+ return r;
964
+ }
965
+ uiSourceCodesForProjectType(e) {
966
+ let t = [];
967
+ for (let n of this.#e.values()) if (n.type() === e) for (let e of n.uiSourceCodes()) t.push(e);
968
+ return t;
969
+ }
970
+ addProject(e) {
971
+ console.assert(!this.#e.has(e.id()), `A project with id ${e.id()} already exists!`), this.#e.set(e.id(), e), this.dispatchEventToListeners("ProjectAdded", e);
972
+ }
973
+ removeProject(e) {
974
+ this.#e.delete(e.id()), this.dispatchEventToListeners("ProjectRemoved", e);
975
+ }
976
+ project(e) {
977
+ return this.#e.get(e) || null;
978
+ }
979
+ projectForFileSystemRoot(e) {
980
+ let t = u.rawPathToUrlString(e);
981
+ return this.project(t);
982
+ }
983
+ projects() {
984
+ return [...this.#e.values()];
985
+ }
986
+ projectsForType(e) {
987
+ function t(t) {
988
+ return t.type() === e;
989
+ }
990
+ return this.projects().filter(t);
991
+ }
992
+ uiSourceCodes() {
993
+ let e = [];
994
+ for (let t of this.#e.values()) for (let n of t.uiSourceCodes()) e.push(n);
995
+ return e;
996
+ }
997
+ setHasResourceContentTrackingExtensions(e) {
998
+ this.#t = e;
999
+ }
1000
+ hasResourceContentTrackingExtensions() {
1001
+ return this.#t;
1002
+ }
1003
+ }, H = /* @__PURE__ */ function(e) {
1004
+ return e.UISourceCodeAdded = "UISourceCodeAdded", e.UISourceCodeRemoved = "UISourceCodeRemoved", e.UISourceCodeRenamed = "UISourceCodeRenamed", e.WorkingCopyChanged = "WorkingCopyChanged", e.WorkingCopyCommitted = "WorkingCopyCommitted", e.WorkingCopyCommittedByUser = "WorkingCopyCommittedByUser", e.ProjectAdded = "ProjectAdded", e.ProjectRemoved = "ProjectRemoved", e;
1005
+ }({}), U = {
1006
+ removeFromIgnoreList: "Remove from ignore list",
1007
+ addScriptToIgnoreList: "Add script to ignore list",
1008
+ addDirectoryToIgnoreList: "Add directory to ignore list",
1009
+ addAllContentScriptsToIgnoreList: "Add all extension scripts to ignore list",
1010
+ addAllThirdPartyScriptsToIgnoreList: "Add all third-party scripts to ignore list",
1011
+ addAllAnonymousScriptsToIgnoreList: "Add all anonymous scripts to ignore list"
1012
+ }, gt = _("models/workspace/IgnoreListManager.ts", U), W = h.bind(void 0, gt), _t = class e extends l {
1013
+ #e;
1014
+ #t;
1015
+ #n = /* @__PURE__ */ new Set();
1016
+ #r = /* @__PURE__ */ new Map();
1017
+ #i = /* @__PURE__ */ new Set();
1018
+ constructor(e, t) {
1019
+ super(), this.#e = e, this.#t = t, this.#t.addModelListener(j, k.GlobalObjectCleared, this.clearCacheIfNeeded.bind(this), this), this.#t.addModelListener(Te, ge.ExecutionContextCreated, this.onExecutionContextCreated, this, { scoped: !0 }), this.#t.addModelListener(Te, ge.ExecutionContextDestroyed, this.onExecutionContextDestroyed, this, { scoped: !0 }), this.#e.moduleSetting("skip-stack-frames-pattern").addChangeListener(this.patternChanged.bind(this)), this.#e.moduleSetting("skip-content-scripts").addChangeListener(this.patternChanged.bind(this)), this.#e.moduleSetting("automatically-ignore-list-known-third-party-scripts").addChangeListener(this.patternChanged.bind(this)), this.#e.moduleSetting("enable-ignore-listing").addChangeListener(this.patternChanged.bind(this)), this.#e.moduleSetting("skip-anonymous-scripts").addChangeListener(this.patternChanged.bind(this)), this.#t.observeModels(j, this);
1020
+ }
1021
+ static instance(t = { forceNew: null }) {
1022
+ let { forceNew: n } = t;
1023
+ return n && v().set(e, new e(t.settings ?? te.instance(), t.targetManager ?? S.instance())), v().get(e);
1024
+ }
1025
+ static removeInstance() {
1026
+ v().delete(e);
1027
+ }
1028
+ addChangeListener(e) {
1029
+ this.#n.add(e);
1030
+ }
1031
+ removeChangeListener(e) {
1032
+ this.#n.delete(e);
1033
+ }
1034
+ modelAdded(e) {
1035
+ this.setIgnoreListPatterns(e);
1036
+ let t = e.sourceMapManager();
1037
+ t.addEventListener(w.SourceMapAttached, this.sourceMapAttached, this), t.addEventListener(w.SourceMapDetached, this.sourceMapDetached, this);
1038
+ }
1039
+ modelRemoved(e) {
1040
+ this.clearCacheIfNeeded();
1041
+ let t = e.sourceMapManager();
1042
+ t.removeEventListener(w.SourceMapAttached, this.sourceMapAttached, this), t.removeEventListener(w.SourceMapDetached, this.sourceMapDetached, this);
1043
+ }
1044
+ isContentScript(e) {
1045
+ return !e.isDefault;
1046
+ }
1047
+ onExecutionContextCreated(e) {
1048
+ if (this.isContentScript(e.data) && (this.#i.add(e.data.uniqueId), this.skipContentScripts)) for (let e of this.#t.models(j)) this.updateIgnoredExecutionContexts(e);
1049
+ }
1050
+ onExecutionContextDestroyed(e) {
1051
+ if (this.isContentScript(e.data) && (this.#i.delete(e.data.uniqueId), this.skipContentScripts)) for (let e of this.#t.models(j)) this.updateIgnoredExecutionContexts(e);
1052
+ }
1053
+ clearCacheIfNeeded() {
1054
+ this.#r.size > 1024 && this.#r.clear();
1055
+ }
1056
+ getSkipStackFramesPatternSetting() {
1057
+ return this.#e.moduleSetting("skip-stack-frames-pattern");
1058
+ }
1059
+ setIgnoreListPatterns(e) {
1060
+ let t = this.enableIgnoreListing ? this.getSkipStackFramesPatternSetting().getAsArray() : [], n = [];
1061
+ for (let e of t) !e.disabled && e.pattern && n.push(e.pattern);
1062
+ return e.setBlackboxPatterns(n, this.skipAnonymousScripts);
1063
+ }
1064
+ updateIgnoredExecutionContexts(e) {
1065
+ return e.setBlackboxExecutionContexts(this.skipContentScripts ? Array.from(this.#i) : []);
1066
+ }
1067
+ getGeneralRulesForUISourceCode(e) {
1068
+ return {
1069
+ isContentScript: e.project().type() === V.ContentScripts,
1070
+ isKnownThirdParty: e.isKnownThirdParty()
1071
+ };
1072
+ }
1073
+ isUserOrSourceMapIgnoreListedUISourceCode(e) {
1074
+ if (e.isUnconditionallyIgnoreListed()) return !0;
1075
+ let t = this.uiSourceCodeURL(e);
1076
+ return this.isUserIgnoreListedURL(t, this.getGeneralRulesForUISourceCode(e));
1077
+ }
1078
+ isUserIgnoreListedURL(e, t) {
1079
+ if (!this.enableIgnoreListing) return !1;
1080
+ if (t?.isContentScript && this.skipContentScripts || t?.isKnownThirdParty && this.automaticallyIgnoreListKnownThirdPartyScripts) return !0;
1081
+ if (!e) return this.skipAnonymousScripts;
1082
+ if (this.#r.has(e)) return !!this.#r.get(e);
1083
+ let n = this.getFirstMatchedRegex(e) !== null;
1084
+ return this.#r.set(e, n), n;
1085
+ }
1086
+ getFirstMatchedRegex(e) {
1087
+ if (!e) return null;
1088
+ let t = this.getSkipStackFramesPatternSetting().getAsArray();
1089
+ if (!this.urlToRegExpString(e)) return null;
1090
+ for (let n = 0; n < t.length; ++n) {
1091
+ let r = t[n];
1092
+ if (r.disabled || r.disabledForUrl === e) continue;
1093
+ let i = new RegExp(r.pattern);
1094
+ if (i.test(e)) return i;
1095
+ }
1096
+ return null;
1097
+ }
1098
+ sourceMapAttached(e) {
1099
+ let t = e.data.client, n = e.data.sourceMap;
1100
+ this.updateScriptRanges(t, n);
1101
+ }
1102
+ sourceMapDetached(e) {
1103
+ let t = e.data.client;
1104
+ this.updateScriptRanges(t, void 0);
1105
+ }
1106
+ async updateScriptRanges(e, t) {
1107
+ let n = !1;
1108
+ if (this.isUserIgnoreListedURL(e.sourceURL, { isContentScript: e.isContentScript() }) || (n = t?.sourceURLs().some((e) => this.isUserIgnoreListedURL(e, { isKnownThirdParty: t.hasIgnoreListHint(e) })) ?? !1), !n) {
1109
+ vt.get(e) && await e.setBlackboxedRanges([]) && vt.delete(e), this.dispatchEventToListeners("IGNORED_SCRIPT_RANGES_UPDATED", e);
1110
+ return;
1111
+ }
1112
+ if (!t) return;
1113
+ let r = t.findRanges((e) => this.isUserIgnoreListedURL(e, { isKnownThirdParty: t.hasIgnoreListHint(e) }), { isStartMatching: !0 }).flatMap((e) => [e.start, e.end]);
1114
+ !i(vt.get(e) || [], r) && await e.setBlackboxedRanges(r) && vt.set(e, r), this.dispatchEventToListeners("IGNORED_SCRIPT_RANGES_UPDATED", e);
1115
+ function i(e, t) {
1116
+ if (e.length !== t.length) return !1;
1117
+ for (let n = 0; n < e.length; ++n) if (e[n].lineNumber !== t[n].lineNumber || e[n].columnNumber !== t[n].columnNumber) return !1;
1118
+ return !0;
1119
+ }
1120
+ }
1121
+ uiSourceCodeURL(e) {
1122
+ return e.project().type() === V.Debugger ? null : e.url();
1123
+ }
1124
+ canIgnoreListUISourceCode(e) {
1125
+ let t = this.uiSourceCodeURL(e);
1126
+ return t ? !!this.urlToRegExpString(t) : !1;
1127
+ }
1128
+ ignoreListUISourceCode(e) {
1129
+ let t = this.uiSourceCodeURL(e);
1130
+ t && this.ignoreListURL(t);
1131
+ }
1132
+ unIgnoreListUISourceCode(e) {
1133
+ this.unIgnoreListURL(this.uiSourceCodeURL(e), this.getGeneralRulesForUISourceCode(e));
1134
+ }
1135
+ get enableIgnoreListing() {
1136
+ return this.#e.moduleSetting("enable-ignore-listing").get();
1137
+ }
1138
+ set enableIgnoreListing(e) {
1139
+ this.#e.moduleSetting("enable-ignore-listing").set(e);
1140
+ }
1141
+ get skipContentScripts() {
1142
+ return this.enableIgnoreListing && this.#e.moduleSetting("skip-content-scripts").get();
1143
+ }
1144
+ get skipAnonymousScripts() {
1145
+ return this.enableIgnoreListing && this.#e.moduleSetting("skip-anonymous-scripts").get();
1146
+ }
1147
+ get automaticallyIgnoreListKnownThirdPartyScripts() {
1148
+ return this.enableIgnoreListing && this.#e.moduleSetting("automatically-ignore-list-known-third-party-scripts").get();
1149
+ }
1150
+ ignoreListContentScripts() {
1151
+ this.enableIgnoreListing ||= !0, this.#e.moduleSetting("skip-content-scripts").set(!0);
1152
+ }
1153
+ unIgnoreListContentScripts() {
1154
+ this.#e.moduleSetting("skip-content-scripts").set(!1);
1155
+ }
1156
+ ignoreListAnonymousScripts() {
1157
+ this.enableIgnoreListing ||= !0, this.#e.moduleSetting("skip-anonymous-scripts").set(!0);
1158
+ }
1159
+ unIgnoreListAnonymousScripts() {
1160
+ this.#e.moduleSetting("skip-anonymous-scripts").set(!1);
1161
+ }
1162
+ ignoreListThirdParty() {
1163
+ this.enableIgnoreListing ||= !0, this.#e.moduleSetting("automatically-ignore-list-known-third-party-scripts").set(!0);
1164
+ }
1165
+ unIgnoreListThirdParty() {
1166
+ this.#e.moduleSetting("automatically-ignore-list-known-third-party-scripts").set(!1);
1167
+ }
1168
+ ignoreListURL(e) {
1169
+ let t = this.urlToRegExpString(e);
1170
+ t && this.addRegexToIgnoreList(t, e);
1171
+ }
1172
+ addRegexToIgnoreList(e, t) {
1173
+ let n = this.getSkipStackFramesPatternSetting().getAsArray(), r = !1;
1174
+ for (let i = 0; i < n.length; ++i) {
1175
+ let a = n[i];
1176
+ (a.pattern === e || t && a.disabledForUrl === t) && (a.disabled = !1, a.disabledForUrl = void 0, r = !0);
1177
+ }
1178
+ r || n.push({
1179
+ pattern: e,
1180
+ disabled: !1
1181
+ }), this.enableIgnoreListing ||= !0, this.getSkipStackFramesPatternSetting().setAsArray(n);
1182
+ }
1183
+ unIgnoreListURL(e, t) {
1184
+ if (t?.isContentScript && this.unIgnoreListContentScripts(), t?.isKnownThirdParty && this.unIgnoreListThirdParty(), !e) {
1185
+ this.unIgnoreListAnonymousScripts();
1186
+ return;
1187
+ }
1188
+ let n = this.getSkipStackFramesPatternSetting().getAsArray(), r = this.urlToRegExpString(e);
1189
+ if (r) {
1190
+ n = n.filter(function(e) {
1191
+ return e.pattern !== r;
1192
+ });
1193
+ for (let t = 0; t < n.length; ++t) {
1194
+ let r = n[t];
1195
+ if (!r.disabled) try {
1196
+ new RegExp(r.pattern).test(e) && (r.disabled = !0, r.disabledForUrl = e);
1197
+ } catch {}
1198
+ }
1199
+ this.getSkipStackFramesPatternSetting().setAsArray(n);
1200
+ }
1201
+ }
1202
+ removeIgnoreListPattern(e) {
1203
+ let t = this.getSkipStackFramesPatternSetting().getAsArray();
1204
+ t = t.filter(function(t) {
1205
+ return t.pattern !== e;
1206
+ }), this.getSkipStackFramesPatternSetting().setAsArray(t);
1207
+ }
1208
+ ignoreListHasPattern(e, t) {
1209
+ return this.getSkipStackFramesPatternSetting().getAsArray().some((n) => !(t && n.disabled) && n.pattern === e);
1210
+ }
1211
+ async patternChanged() {
1212
+ this.#r.clear();
1213
+ let e = [];
1214
+ for (let t of this.#t.models(j)) {
1215
+ e.push(this.setIgnoreListPatterns(t));
1216
+ let n = t.sourceMapManager();
1217
+ for (let r of t.scripts()) e.push(this.updateScriptRanges(r, n.sourceMapForClient(r)));
1218
+ e.push(this.updateIgnoredExecutionContexts(t));
1219
+ }
1220
+ await Promise.all(e);
1221
+ let t = Array.from(this.#n);
1222
+ for (let e of t) e();
1223
+ this.patternChangeFinishedForTests();
1224
+ }
1225
+ patternChangeFinishedForTests() {}
1226
+ urlToRegExpString(e) {
1227
+ let t = new u(e);
1228
+ if (t.isAboutBlank() || t.isDataURL()) return "";
1229
+ if (!t.isValid) return "^" + o(e) + "$";
1230
+ let n = t.lastPathComponent;
1231
+ if (n ? n = "/" + n : t.folderPathComponents && (n = t.folderPathComponents + "/"), n ||= t.host, !n) return "";
1232
+ let r = t.scheme, i = "";
1233
+ return r && r !== "http" && r !== "https" && (i = "^" + r + "://", r === "chrome-extension" && (i += t.host + "\\b"), i += ".*"), i + o(n) + (e.endsWith(n) ? "$" : "\\b");
1234
+ }
1235
+ getIgnoreListURLContextMenuItems(e) {
1236
+ if (e.project().type() === V.FileSystem) return [];
1237
+ let t = [], n = this.canIgnoreListUISourceCode(e), r = this.isUserOrSourceMapIgnoreListedUISourceCode(e), i = !this.uiSourceCodeURL(e), { isContentScript: a, isKnownThirdParty: o } = this.getGeneralRulesForUISourceCode(e);
1238
+ return r ? (n || a || o || i) && t.push({
1239
+ text: W(U.removeFromIgnoreList),
1240
+ callback: this.unIgnoreListUISourceCode.bind(this, e),
1241
+ jslogContext: "remove-script-from-ignorelist"
1242
+ }) : (n ? t.push({
1243
+ text: W(U.addScriptToIgnoreList),
1244
+ callback: this.ignoreListUISourceCode.bind(this, e),
1245
+ jslogContext: "add-script-to-ignorelist"
1246
+ }) : i && t.push({
1247
+ text: W(U.addAllAnonymousScriptsToIgnoreList),
1248
+ callback: this.ignoreListAnonymousScripts.bind(this),
1249
+ jslogContext: "add-anonymous-scripts-to-ignorelist"
1250
+ }), t.push(...this.getIgnoreListGeneralContextMenuItems({
1251
+ isContentScript: a,
1252
+ isKnownThirdParty: o
1253
+ }))), t;
1254
+ }
1255
+ getIgnoreListGeneralContextMenuItems(e) {
1256
+ let t = [];
1257
+ return e?.isContentScript && t.push({
1258
+ text: W(U.addAllContentScriptsToIgnoreList),
1259
+ callback: this.ignoreListContentScripts.bind(this),
1260
+ jslogContext: "add-content-scripts-to-ignorelist"
1261
+ }), e?.isKnownThirdParty && t.push({
1262
+ text: W(U.addAllThirdPartyScriptsToIgnoreList),
1263
+ callback: this.ignoreListThirdParty.bind(this),
1264
+ jslogContext: "add-3p-scripts-to-ignorelist"
1265
+ }), t;
1266
+ }
1267
+ getIgnoreListFolderContextMenuItems(e, t) {
1268
+ let n = [], r = "^" + o(e) + "/";
1269
+ return this.ignoreListHasPattern(r, !0) ? n.push({
1270
+ text: W(U.removeFromIgnoreList),
1271
+ callback: this.removeIgnoreListPattern.bind(this, r),
1272
+ jslogContext: "remove-from-ignore-list"
1273
+ }) : this.isUserIgnoreListedURL(e, t) ? n.push({
1274
+ text: W(U.removeFromIgnoreList),
1275
+ callback: this.unIgnoreListURL.bind(this, e, t),
1276
+ jslogContext: "remove-from-ignore-list"
1277
+ }) : t?.isCurrentlyIgnoreListed || (n.push({
1278
+ text: W(U.addDirectoryToIgnoreList),
1279
+ callback: this.addRegexToIgnoreList.bind(this, r),
1280
+ jslogContext: "add-directory-to-ignore-list"
1281
+ }), n.push(...this.getIgnoreListGeneralContextMenuItems(t))), n;
1282
+ }
1283
+ }, vt = /* @__PURE__ */ new WeakMap(), yt = /* @__PURE__ */ function(e) {
1284
+ return e.IGNORED_SCRIPT_RANGES_UPDATED = "IGNORED_SCRIPT_RANGES_UPDATED", e;
1285
+ }({}), bt = class e {
1286
+ #e;
1287
+ #t;
1288
+ #n;
1289
+ #r;
1290
+ #i;
1291
+ constructor(t, n, r) {
1292
+ this.#e = t, this.#t = n, this.#n = r;
1293
+ let { queries: i, fileRegexQueries: a } = e.#a(t, n, r);
1294
+ this.#r = i, this.#i = a;
1295
+ }
1296
+ static fromPlainObject(t) {
1297
+ return new e(t.query, t.ignoreCase, t.isRegex);
1298
+ }
1299
+ filePathMatchesFileQuery(e) {
1300
+ return this.#i.every(({ regex: t, shouldMatch: n }) => !!e.match(t) === n);
1301
+ }
1302
+ queries() {
1303
+ return this.#r;
1304
+ }
1305
+ query() {
1306
+ return this.#e;
1307
+ }
1308
+ ignoreCase() {
1309
+ return this.#t;
1310
+ }
1311
+ isRegex() {
1312
+ return this.#n;
1313
+ }
1314
+ toPlainObject() {
1315
+ return {
1316
+ query: this.query(),
1317
+ ignoreCase: this.ignoreCase(),
1318
+ isRegex: this.isRegex()
1319
+ };
1320
+ }
1321
+ static #a(t, n, r) {
1322
+ let i = /"([^\\"]|\\.)+"/, a = /(\s*(?!-?f(ile)?:)[^\\ ]|\\.)+/, o = a.source + "(\\s+" + a.source + ")*", s = [
1323
+ "(\\s*" + xt.source + "\\s*)",
1324
+ "(" + i.source + ")",
1325
+ "(" + o + ")"
1326
+ ].join("|"), c = new RegExp(s, "g"), l = t.match(c) || [], u = [], d = [];
1327
+ for (let t of l) {
1328
+ if (!t) continue;
1329
+ let i = e.#c(t);
1330
+ if (i) {
1331
+ let e = new RegExp(i.text, n ? "i" : "");
1332
+ d.push({
1333
+ regex: e,
1334
+ shouldMatch: i.shouldMatch
1335
+ });
1336
+ } else r ? u.push(t) : t.startsWith("\"") && t.endsWith("\"") ? u.push(e.#s(t)) : u.push(e.#o(t));
1337
+ }
1338
+ return {
1339
+ queries: u,
1340
+ fileRegexQueries: d
1341
+ };
1342
+ }
1343
+ static #o(e) {
1344
+ return e.replace(/\\(.)/g, "$1");
1345
+ }
1346
+ static #s(e) {
1347
+ return e.substring(1, e.length - 1).replace(/\\(.)/g, "$1");
1348
+ }
1349
+ static #c(e) {
1350
+ let t = e.match(xt);
1351
+ if (!t) return null;
1352
+ e = t[3];
1353
+ let n = "";
1354
+ for (let t = 0; t < e.length; ++t) {
1355
+ let r = e[t];
1356
+ r === "*" ? n += ".*" : r === "\\" ? (++t, e[t] === " " && (n += " ")) : (i().indexOf(e.charAt(t)) !== -1 && (n += "\\"), n += e.charAt(t));
1357
+ }
1358
+ let r = !t[1];
1359
+ return {
1360
+ text: n,
1361
+ shouldMatch: r
1362
+ };
1363
+ }
1364
+ }, xt = /(-)?f(ile)?:((?:[^\\ ]|\\.)+)/, St = { unknownErrorLoadingFile: "Unknown error loading file" }, Ct = _("models/bindings/ContentProviderBasedProject.ts", St), wt = h.bind(void 0, Ct), G = class extends mt {
1365
+ #e;
1366
+ #t = /* @__PURE__ */ new WeakMap();
1367
+ constructor(e, t, n, r, i) {
1368
+ super(e, t, n, r), this.#e = i, e.addProject(this);
1369
+ }
1370
+ async requestFileContent(e) {
1371
+ let { contentProvider: t } = this.#t.get(e);
1372
+ try {
1373
+ return await t.requestContentData();
1374
+ } catch (e) {
1375
+ return { error: e ? String(e) : wt(St.unknownErrorLoadingFile) };
1376
+ }
1377
+ }
1378
+ isServiceProject() {
1379
+ return this.#e;
1380
+ }
1381
+ async requestMetadata(e) {
1382
+ let { metadata: t } = this.#t.get(e);
1383
+ return t;
1384
+ }
1385
+ canSetFileContent() {
1386
+ return !1;
1387
+ }
1388
+ async setFileContent(e, t, n) {}
1389
+ fullDisplayName(e) {
1390
+ let t = e.parentURL().replace(/^(?:https?|file)\:\/\//, "");
1391
+ try {
1392
+ t = decodeURI(t);
1393
+ } catch {}
1394
+ return t + "/" + e.displayName(!0);
1395
+ }
1396
+ mimeType(e) {
1397
+ let { mimeType: t } = this.#t.get(e);
1398
+ return t;
1399
+ }
1400
+ canRename() {
1401
+ return !1;
1402
+ }
1403
+ rename(e, t, n) {
1404
+ n(!1);
1405
+ }
1406
+ excludeFolder(e) {}
1407
+ canExcludeFolder(e) {
1408
+ return !1;
1409
+ }
1410
+ async createFile(e, t, n, r) {
1411
+ return null;
1412
+ }
1413
+ canCreateFile() {
1414
+ return !1;
1415
+ }
1416
+ deleteFile(e) {}
1417
+ remove() {}
1418
+ searchInFileContent(e, t, n, r) {
1419
+ let { contentProvider: i } = this.#t.get(e);
1420
+ return i.searchInContent(t, n, r);
1421
+ }
1422
+ async findFilesMatchingSearchRequest(e, n, r) {
1423
+ let i = /* @__PURE__ */ new Map();
1424
+ return r.totalWork = n.length, await Promise.all(n.map(a.bind(this))), r.done = !0, i;
1425
+ async function a(n) {
1426
+ let a = !0, o = [];
1427
+ for (let r of e.queries().slice()) {
1428
+ let i = await this.searchInFileContent(n, r, !e.ignoreCase(), e.isRegex());
1429
+ if (!i.length) {
1430
+ a = !1;
1431
+ break;
1432
+ }
1433
+ o = t(o, i, De.comparator);
1434
+ }
1435
+ a && i.set(n, o), ++r.worked;
1436
+ }
1437
+ }
1438
+ indexContent(e) {
1439
+ queueMicrotask(() => {
1440
+ e.done = !0;
1441
+ });
1442
+ }
1443
+ addUISourceCodeWithProvider(e, t, n, r) {
1444
+ this.#t.set(e, {
1445
+ mimeType: r,
1446
+ metadata: n,
1447
+ contentProvider: t
1448
+ }), this.addUISourceCode(e);
1449
+ }
1450
+ addContentProvider(e, t, n) {
1451
+ let r = this.createUISourceCode(e, t.contentType());
1452
+ return this.addUISourceCodeWithProvider(r, t, null, n), r;
1453
+ }
1454
+ reset() {
1455
+ this.removeProject(), this.workspace().addProject(this);
1456
+ }
1457
+ dispose() {
1458
+ this.removeProject();
1459
+ }
1460
+ }, K = /* @__PURE__ */ new WeakMap(), Tt = /* @__PURE__ */ new WeakMap(), Et, Dt = class e extends l {
1461
+ constructor() {
1462
+ super();
1463
+ }
1464
+ static instance({ forceNew: t } = { forceNew: !1 }) {
1465
+ return (!Et || t) && (Et = new e()), Et;
1466
+ }
1467
+ }, Ot = /* @__PURE__ */ function(e) {
1468
+ return e.FRAME_ATTRIBUTION_ADDED = "FrameAttributionAdded", e.FRAME_ATTRIBUTION_REMOVED = "FrameAttributionRemoved", e;
1469
+ }({}), q = class e {
1470
+ static resolveFrame(t, n) {
1471
+ let r = e.targetForUISourceCode(t)?.model(T);
1472
+ return r ? r.frameForId(n) : null;
1473
+ }
1474
+ static setInitialFrameAttribution(t, n) {
1475
+ if (!n) return;
1476
+ let r = e.resolveFrame(t, n);
1477
+ if (!r) return;
1478
+ let i = /* @__PURE__ */ new Map();
1479
+ i.set(n, {
1480
+ frame: r,
1481
+ count: 1
1482
+ }), K.set(t, i);
1483
+ }
1484
+ static cloneInitialFrameAttribution(e, t) {
1485
+ let n = K.get(e);
1486
+ if (!n) return;
1487
+ let r = /* @__PURE__ */ new Map();
1488
+ for (let e of n.keys()) {
1489
+ let t = n.get(e);
1490
+ t !== void 0 && r.set(e, {
1491
+ frame: t.frame,
1492
+ count: t.count
1493
+ });
1494
+ }
1495
+ K.set(t, r);
1496
+ }
1497
+ static addFrameAttribution(t, n) {
1498
+ let r = e.resolveFrame(t, n);
1499
+ if (!r) return;
1500
+ let i = K.get(t);
1501
+ if (!i) return;
1502
+ let a = i.get(n) || {
1503
+ frame: r,
1504
+ count: 0
1505
+ };
1506
+ if (a.count += 1, i.set(n, a), a.count !== 1) return;
1507
+ let o = {
1508
+ uiSourceCode: t,
1509
+ frame: r
1510
+ };
1511
+ Dt.instance().dispatchEventToListeners("FrameAttributionAdded", o);
1512
+ }
1513
+ static removeFrameAttribution(e, t) {
1514
+ let n = K.get(e);
1515
+ if (!n) return;
1516
+ let r = n.get(t);
1517
+ if (console.assert(!!r, "Failed to remove frame attribution for url: " + e.url()), !r || (--r.count, r.count > 0)) return;
1518
+ n.delete(t);
1519
+ let i = {
1520
+ uiSourceCode: e,
1521
+ frame: r.frame
1522
+ };
1523
+ Dt.instance().dispatchEventToListeners("FrameAttributionRemoved", i);
1524
+ }
1525
+ static targetForUISourceCode(e) {
1526
+ return Tt.get(e.project()) || null;
1527
+ }
1528
+ static setTargetForProject(e, t) {
1529
+ Tt.set(e, t);
1530
+ }
1531
+ static getTargetForProject(e) {
1532
+ return Tt.get(e) || null;
1533
+ }
1534
+ static framesForUISourceCode(t) {
1535
+ let n = e.targetForUISourceCode(t)?.model(T), r = K.get(t);
1536
+ return !n || !r ? [] : Array.from(r.keys()).map((e) => n.frameForId(e)).filter((e) => !!e);
1537
+ }
1538
+ }, kt = class {
1539
+ #e;
1540
+ #t;
1541
+ #n = /* @__PURE__ */ new Map();
1542
+ #r;
1543
+ #i;
1544
+ #a = /* @__PURE__ */ new Map();
1545
+ #o = /* @__PURE__ */ new Map();
1546
+ #s = new a();
1547
+ #c;
1548
+ #l;
1549
+ constructor(e, t, n) {
1550
+ this.#e = e.sourceMapManager(), this.#t = n, this.#c = e, this.#l = n.ignoreListManager, this.#r = new G(t, "jsSourceMaps:stub:" + e.target().id(), V.Service, "", !0), this.#i = [
1551
+ this.#e.addEventListener(w.SourceMapWillAttach, this.sourceMapWillAttach, this),
1552
+ this.#e.addEventListener(w.SourceMapFailedToAttach, this.sourceMapFailedToAttach, this),
1553
+ this.#e.addEventListener(w.SourceMapAttached, this.sourceMapAttached, this),
1554
+ this.#e.addEventListener(w.SourceMapDetached, this.sourceMapDetached, this)
1555
+ ];
1556
+ }
1557
+ setFunctionRanges(e, t) {
1558
+ for (let n of this.#s.get(e)) n.augmentWithScopes(e.url(), t);
1559
+ }
1560
+ addStubUISourceCode(e) {
1561
+ let t = this.#r.addContentProvider(u.concatenate(e.sourceURL, ":sourcemap"), Ae.fromString(e.sourceURL, c.Script, "\n\n\n\n\n// Please wait a bit.\n// Compiled script is not shown while source map is being loaded!"), "text/javascript");
1562
+ this.#n.set(e, t);
1563
+ }
1564
+ removeStubUISourceCode(e) {
1565
+ let t = this.#n.get(e);
1566
+ this.#n.delete(e), t && this.#r.removeUISourceCode(t.url());
1567
+ }
1568
+ getLocationRangesForSameSourceLocation(e) {
1569
+ let t = e.debuggerModel, n = e.script();
1570
+ if (!n) return [];
1571
+ let r = this.#e.sourceMapForClient(n);
1572
+ if (!r) return [];
1573
+ let { lineNumber: i, columnNumber: a } = n.rawLocationToRelativeLocation(e), o = r.findEntry(i, a);
1574
+ if (!o?.sourceURL) return [];
1575
+ let s = this.#o.get(r);
1576
+ if (!s) return [];
1577
+ let c = s.uiSourceCodeForURL(o.sourceURL);
1578
+ return !c || !this.#s.hasValue(c, r) ? [] : r.findReverseRanges(o.sourceURL, o.sourceLineNumber, o.sourceColumnNumber).map(({ startLine: e, startColumn: r, endLine: i, endColumn: a }) => {
1579
+ let o = n.relativeLocationToRawLocation({
1580
+ lineNumber: e,
1581
+ columnNumber: r
1582
+ }), s = n.relativeLocationToRawLocation({
1583
+ lineNumber: i,
1584
+ columnNumber: a
1585
+ });
1586
+ return {
1587
+ start: t.createRawLocation(n, o.lineNumber, o.columnNumber),
1588
+ end: t.createRawLocation(n, s.lineNumber, s.columnNumber)
1589
+ };
1590
+ });
1591
+ }
1592
+ uiSourceCodeForURL(e, t) {
1593
+ let n = t ? V.ContentScripts : V.Network;
1594
+ for (let t of this.#a.values()) {
1595
+ if (t.type() !== n) continue;
1596
+ let r = t.uiSourceCodeForURL(e);
1597
+ if (r) return r;
1598
+ }
1599
+ return null;
1600
+ }
1601
+ rawLocationToUILocation(e) {
1602
+ let t = e.script();
1603
+ if (!t) return null;
1604
+ let { lineNumber: n, columnNumber: r } = t.rawLocationToRelativeLocation(e), i = this.#n.get(t);
1605
+ if (i) return new z(i, n, r);
1606
+ let a = this.#e.sourceMapForClient(t);
1607
+ if (!a) return null;
1608
+ let o = this.#o.get(a);
1609
+ if (!o) return null;
1610
+ let s = a.findEntry(n, r, e.inlineFrameIndex);
1611
+ if (!s?.sourceURL) return null;
1612
+ let c = o.uiSourceCodeForURL(s.sourceURL);
1613
+ return !c || !this.#s.hasValue(c, a) ? null : c.uiLocation(s.sourceLineNumber, s.sourceColumnNumber);
1614
+ }
1615
+ uiLocationToRawLocations(e, t, n) {
1616
+ let r = [];
1617
+ for (let i of this.#s.get(e)) {
1618
+ let a = i.sourceLineMapping(e.url(), t, n);
1619
+ if (!a) continue;
1620
+ let o = i.findReverseEntries(e.url(), a.sourceLineNumber, a.sourceColumnNumber, !0);
1621
+ if (o.length === 0) continue;
1622
+ let s = this.#e.clientForSourceMap(i);
1623
+ if (s) for (let e of o) {
1624
+ let t = s.relativeLocationToRawLocation(e);
1625
+ r.push(s.debuggerModel.createRawLocation(s, t.lineNumber, t.columnNumber));
1626
+ }
1627
+ }
1628
+ return r;
1629
+ }
1630
+ uiLocationRangeToRawLocationRanges(e, t) {
1631
+ if (!this.#s.has(e)) return null;
1632
+ let n = [];
1633
+ for (let r of this.#s.get(e)) {
1634
+ let i = this.#e.clientForSourceMap(r);
1635
+ if (i) for (let a of r.reverseMapTextRanges(e.url(), t)) {
1636
+ let e = i.relativeLocationToRawLocation(a.start), t = i.relativeLocationToRawLocation(a.end), r = i.debuggerModel.createRawLocation(i, e.lineNumber, e.columnNumber), o = i.debuggerModel.createRawLocation(i, t.lineNumber, t.columnNumber);
1637
+ n.push({
1638
+ start: r,
1639
+ end: o
1640
+ });
1641
+ }
1642
+ }
1643
+ return n;
1644
+ }
1645
+ async functionBoundsAtRawLocation(e) {
1646
+ let t = e.script();
1647
+ if (!t) return null;
1648
+ let n = this.#e.sourceMapForClient(t);
1649
+ if (!n) return null;
1650
+ await n.waitForScopeInfo();
1651
+ let { lineNumber: r, columnNumber: i } = t.rawLocationToRelativeLocation(e), { url: a, scope: o } = n.findOriginalFunctionScope({
1652
+ line: r,
1653
+ column: i
1654
+ }) ?? {};
1655
+ if (!o || !a) return null;
1656
+ let s = this.#o.get(n);
1657
+ if (!s) return null;
1658
+ let c = s.uiSourceCodeForURL(a);
1659
+ if (!c || "error" in await c.requestContentData()) return null;
1660
+ let l = o.name ?? "";
1661
+ return new ut(c, new M(o.start.line, o.start.column, o.end.line, o.end.column), l);
1662
+ }
1663
+ async translateRawFramesStep(e, t) {
1664
+ let n = e[0];
1665
+ if ($e(n)) return !1;
1666
+ let r = await (async (e) => {
1667
+ let t = this.#c.scriptForId(e.scriptId ?? "");
1668
+ if (!t || this.#n.has(t)) return null;
1669
+ let n = t.sourceMap();
1670
+ return await n?.waitForScopeInfo(), n?.hasScopeInfo() ? {
1671
+ sourceMap: n,
1672
+ script: t
1673
+ } : null;
1674
+ })(n);
1675
+ if (!r) return !1;
1676
+ let { sourceMap: i, script: a } = r, { lineNumber: o, columnNumber: s } = a.relativeLocationToRawLocation(n);
1677
+ if (!i.isOutlinedFrame(o, s)) {
1678
+ let n = i.translateCallSite(o, s);
1679
+ if (!n.length) return !1;
1680
+ e.shift();
1681
+ let r = [];
1682
+ t.push(r);
1683
+ let a = this.#o.get(i);
1684
+ for (let e of n) {
1685
+ let t = e.url ? a?.uiSourceCodeForURL(e.url) : void 0;
1686
+ r.push({
1687
+ ...e,
1688
+ url: t ? void 0 : e.url,
1689
+ uiSourceCode: t ?? void 0
1690
+ });
1691
+ }
1692
+ return !0;
1693
+ }
1694
+ return !1;
1695
+ }
1696
+ getMappedLines(e) {
1697
+ if (!this.#s.has(e)) return null;
1698
+ let t = /* @__PURE__ */ new Set();
1699
+ for (let n of this.#s.get(e)) for (let r of n.mappings()) r.sourceURL === e.url() && t.add(r.sourceLineNumber);
1700
+ return t;
1701
+ }
1702
+ sourceMapWillAttach(e) {
1703
+ let { client: t } = e.data;
1704
+ this.addStubUISourceCode(t), this.#t.updateLocations(t), this.#l.isUserIgnoreListedURL(t.sourceURL, { isContentScript: t.isContentScript() }) && this.#e.cancelAttachSourceMap(t);
1705
+ }
1706
+ sourceMapFailedToAttach(e) {
1707
+ let { client: t } = e.data;
1708
+ this.removeStubUISourceCode(t), this.#t.updateLocations(t);
1709
+ }
1710
+ sourceMapAttached(e) {
1711
+ let { client: t, sourceMap: n } = e.data, r = new Set([t]);
1712
+ this.removeStubUISourceCode(t);
1713
+ let i = t.target(), a = `jsSourceMaps:${t.isContentScript() ? "extensions" : ""}:${i.id()}`, o = this.#a.get(a);
1714
+ if (!o) {
1715
+ let e = t.isContentScript() ? V.ContentScripts : V.Network;
1716
+ o = new G(this.#r.workspace(), a, e, "", !1), q.setTargetForProject(o, i), this.#a.set(a, o);
1717
+ }
1718
+ this.#o.set(n, o);
1719
+ for (let e of n.sourceURLs()) {
1720
+ let i = c.SourceMapScript, a = o.createUISourceCode(e, i);
1721
+ n.hasIgnoreListHint(e) && a.markKnownThirdParty();
1722
+ let s = n.embeddedContentByURL(e), l = s === null ? new xe(e, i, t.createPageResourceLoadInitiator()) : Ae.fromString(e, i, s), u = null;
1723
+ s !== null && (u = new dt(null, new TextEncoder().encode(s).length));
1724
+ let d = f.mimeFromURL(e) ?? i.canonicalMimeType();
1725
+ this.#s.set(a, n), q.setInitialFrameAttribution(a, t.frameId);
1726
+ let p = o.uiSourceCodeForURL(e);
1727
+ if (p !== null) {
1728
+ for (let t of this.#s.get(p)) {
1729
+ this.#s.delete(p, t);
1730
+ let i = this.#e.clientForSourceMap(t);
1731
+ i && (q.removeFrameAttribution(p, i.frameId), n.compatibleForURL(e, t) && (this.#s.set(a, t), q.addFrameAttribution(a, i.frameId)), r.add(i));
1732
+ }
1733
+ o.removeUISourceCode(e);
1734
+ }
1735
+ o.addUISourceCodeWithProvider(a, l, u, d);
1736
+ }
1737
+ Promise.all([...r].map((e) => this.#t.updateLocations(e))).then(() => this.sourceMapAttachedForTest(n));
1738
+ }
1739
+ sourceMapDetached(e) {
1740
+ let { client: t, sourceMap: n } = e.data, r = this.#o.get(n);
1741
+ if (r) {
1742
+ for (let e of r.uiSourceCodes()) this.#s.delete(e, n) && (q.removeFrameAttribution(e, t.frameId), this.#s.has(e) || r.removeUISourceCode(e.url()));
1743
+ this.#o.delete(n), this.#t.updateLocations(t);
1744
+ }
1745
+ }
1746
+ scriptsForUISourceCode(e) {
1747
+ let t = [];
1748
+ for (let n of this.#s.get(e)) {
1749
+ let e = this.#e.clientForSourceMap(n);
1750
+ e && t.push(e);
1751
+ }
1752
+ return t;
1753
+ }
1754
+ sourceMapAttachedForTest(e) {}
1755
+ dispose() {
1756
+ m(this.#i);
1757
+ for (let e of this.#a.values()) e.dispose();
1758
+ this.#r.dispose();
1759
+ }
1760
+ }, At = class {
1761
+ #e;
1762
+ #t;
1763
+ #n;
1764
+ constructor(e, t) {
1765
+ this.#e = e, this.#t = t, this.#t.add(this), this.#n = null;
1766
+ }
1767
+ async update() {
1768
+ this.#e && (this.#n ? await this.#n.then(() => this.update()) : (this.#n = this.#e(this), await this.#n, this.#n = null));
1769
+ }
1770
+ async uiLocation() {
1771
+ throw Error("Not implemented");
1772
+ }
1773
+ dispose() {
1774
+ this.#t.delete(this), this.#e = null;
1775
+ }
1776
+ isDisposed() {
1777
+ return !this.#t.has(this);
1778
+ }
1779
+ }, jt = class {
1780
+ #e;
1781
+ constructor() {
1782
+ this.#e = /* @__PURE__ */ new Set();
1783
+ }
1784
+ add(e) {
1785
+ this.#e.add(e);
1786
+ }
1787
+ delete(e) {
1788
+ this.#e.delete(e);
1789
+ }
1790
+ has(e) {
1791
+ return this.#e.has(e);
1792
+ }
1793
+ disposeAll() {
1794
+ for (let e of this.#e) e.dispose();
1795
+ }
1796
+ }, Mt = class {
1797
+ #e;
1798
+ #t;
1799
+ #n;
1800
+ #r;
1801
+ #i;
1802
+ constructor(e, t, n, r) {
1803
+ this.#e = t, this.#i = r, this.#t = new G(n, "cssSourceMaps:" + e.id(), V.Network, "", !1), q.setTargetForProject(this.#t, e), this.#r = /* @__PURE__ */ new Map(), this.#n = [this.#e.addEventListener(w.SourceMapAttached, this.sourceMapAttached, this), this.#e.addEventListener(w.SourceMapDetached, this.sourceMapDetached, this)];
1804
+ }
1805
+ sourceMapAttachedForTest(e) {}
1806
+ async sourceMapAttached(e) {
1807
+ let t = e.data.client, n = e.data.sourceMap, r = this.#t, i = this.#r;
1808
+ for (let e of n.sourceURLs()) {
1809
+ let a = i.get(e);
1810
+ a || (a = new Pt(r, e, t.createPageResourceLoadInitiator()), i.set(e, a)), a.addSourceMap(n, t.frameId);
1811
+ }
1812
+ await this.#i.updateLocations(t), this.sourceMapAttachedForTest(n);
1813
+ }
1814
+ async sourceMapDetached(e) {
1815
+ let t = e.data.client, n = e.data.sourceMap, r = this.#r;
1816
+ for (let e of n.sourceURLs()) {
1817
+ let i = r.get(e);
1818
+ i && (i.removeSourceMap(n, t.frameId), i.getUiSourceCode() || r.delete(e));
1819
+ }
1820
+ await this.#i.updateLocations(t);
1821
+ }
1822
+ rawLocationToUILocation(e) {
1823
+ let t = e.header();
1824
+ if (!t) return null;
1825
+ let n = this.#e.sourceMapForClient(t);
1826
+ if (!n) return null;
1827
+ let { lineNumber: r, columnNumber: i } = e;
1828
+ n.mapsOrigin() && t.isInline && (r -= t.startLine, r === 0 && (i -= t.startColumn));
1829
+ let a = n.findEntry(r, i);
1830
+ if (!a?.sourceURL) return null;
1831
+ let o = this.#t.uiSourceCodeForURL(a.sourceURL);
1832
+ return o ? o.uiLocation(a.sourceLineNumber, a.sourceColumnNumber) : null;
1833
+ }
1834
+ uiLocationToRawLocations(e) {
1835
+ let { uiSourceCode: t, lineNumber: n, columnNumber: r = 0 } = e, i = Nt.get(t);
1836
+ if (!i) return [];
1837
+ let a = [];
1838
+ for (let e of i.getReferringSourceMaps()) {
1839
+ let i = e.findReverseEntries(t.url(), n, r), o = this.#e.clientForSourceMap(e);
1840
+ o && a.push(...i.map((e) => new A(o, e.lineNumber, e.columnNumber)));
1841
+ }
1842
+ return a;
1843
+ }
1844
+ static uiSourceOrigin(e) {
1845
+ let t = Nt.get(e);
1846
+ return t ? t.getReferringSourceMaps().map((e) => e.compiledURL()) : [];
1847
+ }
1848
+ dispose() {
1849
+ m(this.#n), this.#t.dispose();
1850
+ }
1851
+ }, Nt = /* @__PURE__ */ new WeakMap(), Pt = class {
1852
+ #e;
1853
+ #t;
1854
+ #n;
1855
+ referringSourceMaps;
1856
+ uiSourceCode;
1857
+ constructor(e, t, n) {
1858
+ this.#e = e, this.#t = t, this.#n = n, this.referringSourceMaps = [], this.uiSourceCode = null;
1859
+ }
1860
+ recreateUISourceCodeIfNeeded(e) {
1861
+ let t = this.referringSourceMaps[this.referringSourceMaps.length - 1], n = c.SourceMapStyleSheet, r = t.embeddedContentByURL(this.#t), i = r === null ? new xe(this.#t, n, this.#n) : Ae.fromString(this.#t, n, r), a = this.#e.createUISourceCode(this.#t, n);
1862
+ Nt.set(a, this);
1863
+ let o = f.mimeFromURL(this.#t) || n.canonicalMimeType(), s = typeof r == "string" ? new dt(null, r.length) : null;
1864
+ this.uiSourceCode ? (q.cloneInitialFrameAttribution(this.uiSourceCode, a), this.#e.removeUISourceCode(this.uiSourceCode.url())) : q.setInitialFrameAttribution(a, e), this.uiSourceCode = a, this.#e.addUISourceCodeWithProvider(this.uiSourceCode, i, s, o);
1865
+ }
1866
+ addSourceMap(e, t) {
1867
+ this.uiSourceCode && q.addFrameAttribution(this.uiSourceCode, t), this.referringSourceMaps.push(e), this.recreateUISourceCodeIfNeeded(t);
1868
+ }
1869
+ removeSourceMap(e, t) {
1870
+ let n = this.uiSourceCode;
1871
+ q.removeFrameAttribution(n, t);
1872
+ let r = this.referringSourceMaps.lastIndexOf(e);
1873
+ r !== -1 && this.referringSourceMaps.splice(r, 1), this.referringSourceMaps.length ? this.recreateUISourceCodeIfNeeded(t) : (this.#e.removeUISourceCode(n.url()), this.uiSourceCode = null);
1874
+ }
1875
+ getReferringSourceMaps() {
1876
+ return this.referringSourceMaps;
1877
+ }
1878
+ getUiSourceCode() {
1879
+ return this.uiSourceCode;
1880
+ }
1881
+ };
1882
+ //#endregion
1883
+ //#region node_modules/.pnpm/chrome-devtools-frontend@1.0.1638082/node_modules/chrome-devtools-frontend/front_end/models/bindings/ResourceUtils.ts
1884
+ function Ft(e) {
1885
+ return T.resourceForURL(e);
1886
+ }
1887
+ function It(t) {
1888
+ if (!t) return "";
1889
+ let n = ht.instance().uiSourceCodeForURL(t);
1890
+ if (n) return n.displayName();
1891
+ let r = Ft(t);
1892
+ if (r) return r.displayName;
1893
+ let i = S.instance().inspectedURL();
1894
+ if (!i) return e(t, "");
1895
+ let a = u.fromString(i);
1896
+ if (!a) return t;
1897
+ let o = a.lastPathComponent, s = i.indexOf(o);
1898
+ if (s !== -1 && s + o.length === i.length) {
1899
+ let e = i.substring(0, s);
1900
+ if (t.startsWith(e) && t.length > s) return t.substring(s);
1901
+ }
1902
+ let c = e(t, a.host);
1903
+ return c === "/" ? a.host + "/" : c;
1904
+ }
1905
+ function Lt(e, t, n) {
1906
+ let r = e.model(T);
1907
+ if (!r) return null;
1908
+ let i = r.frameForId(t);
1909
+ return i ? Rt(i.resourceForURL(n)) : null;
1910
+ }
1911
+ function Rt(e) {
1912
+ return !e || typeof e.contentSize() != "number" && !e.lastModified() ? null : new dt(e.lastModified(), e.contentSize());
1913
+ }
1914
+ //#endregion
1915
+ //#region node_modules/.pnpm/chrome-devtools-frontend@1.0.1638082/node_modules/chrome-devtools-frontend/front_end/models/bindings/StylesSourceMapping.ts
1916
+ var zt = /* @__PURE__ */ new WeakMap(), Bt = class {
1917
+ #e;
1918
+ #t;
1919
+ #n = /* @__PURE__ */ new Map();
1920
+ #r;
1921
+ constructor(e, t) {
1922
+ this.#e = e;
1923
+ let n = this.#e.target();
1924
+ this.#t = new G(t, "css:" + n.id(), V.Network, "", !1), q.setTargetForProject(this.#t, n), this.#r = [
1925
+ this.#e.addEventListener(C.StyleSheetAdded, this.styleSheetAdded, this),
1926
+ this.#e.addEventListener(C.StyleSheetRemoved, this.styleSheetRemoved, this),
1927
+ this.#e.addEventListener(C.StyleSheetChanged, this.styleSheetChanged, this)
1928
+ ];
1929
+ }
1930
+ addSourceMap(e, t) {
1931
+ this.#n.get(e)?.addSourceMap(e, t);
1932
+ }
1933
+ rawLocationToUILocation(e) {
1934
+ let t = e.header();
1935
+ if (!t || !this.acceptsHeader(t)) return null;
1936
+ let n = this.#n.get(t.resourceURL());
1937
+ if (!n) return null;
1938
+ let r = e.lineNumber, i = e.columnNumber;
1939
+ if (t.isInline && t.hasSourceURL) {
1940
+ r -= t.lineNumberInSource(0);
1941
+ let e = t.columnNumberInSource(r, 0);
1942
+ e === void 0 ? i = e : i -= e;
1943
+ }
1944
+ return n.getUiSourceCode().uiLocation(r, i);
1945
+ }
1946
+ uiLocationToRawLocations(e) {
1947
+ let t = zt.get(e.uiSourceCode);
1948
+ if (!t) return [];
1949
+ let n = [];
1950
+ for (let r of t.getHeaders()) {
1951
+ let t = e.lineNumber, i = e.columnNumber;
1952
+ r.isInline && r.hasSourceURL && (i = r.columnNumberInSource(t, e.columnNumber || 0), t = r.lineNumberInSource(t)), n.push(new A(r, t, i));
1953
+ }
1954
+ return n;
1955
+ }
1956
+ acceptsHeader(e) {
1957
+ return !(e.isConstructedByNew() || e.isInline && !e.hasSourceURL && e.origin !== "inspector" || !e.resourceURL());
1958
+ }
1959
+ styleSheetAdded(e) {
1960
+ let t = e.data;
1961
+ if (!this.acceptsHeader(t)) return;
1962
+ let n = t.resourceURL(), r = this.#n.get(n);
1963
+ r ? r.addHeader(t) : (r = new Vt(this.#e, this.#t, t), this.#n.set(n, r));
1964
+ }
1965
+ styleSheetRemoved(e) {
1966
+ let t = e.data;
1967
+ if (!this.acceptsHeader(t)) return;
1968
+ let n = t.resourceURL(), r = this.#n.get(n);
1969
+ r && (r.getHeaders().size === 1 ? (r.dispose(), this.#n.delete(n)) : r.removeHeader(t));
1970
+ }
1971
+ styleSheetChanged(e) {
1972
+ let t = this.#e.styleSheetHeaderForId(e.data.styleSheetId);
1973
+ if (!t || !this.acceptsHeader(t)) return;
1974
+ let n = this.#n.get(t.resourceURL());
1975
+ n && n.styleSheetChanged(t);
1976
+ }
1977
+ dispose() {
1978
+ for (let e of this.#n.values()) e.dispose();
1979
+ this.#n.clear(), m(this.#r), this.#t.removeProject();
1980
+ }
1981
+ }, Vt = class {
1982
+ #e;
1983
+ #t;
1984
+ headers;
1985
+ uiSourceCode;
1986
+ #n;
1987
+ #r = new ne(200);
1988
+ #i = !1;
1989
+ #a;
1990
+ #o;
1991
+ constructor(e, t, n) {
1992
+ this.#e = e, this.#t = t, this.headers = new Set([n]);
1993
+ let r = e.target(), i = n.resourceURL(), a = Lt(r, n.frameId, i);
1994
+ this.uiSourceCode = this.#t.createUISourceCode(i, n.contentType()), zt.set(this.uiSourceCode, this), q.setInitialFrameAttribution(this.uiSourceCode, n.frameId), this.#t.addUISourceCodeWithProvider(this.uiSourceCode, this, a, "text/css"), this.#n = [this.uiSourceCode.addEventListener(R.WorkingCopyChanged, this.workingCopyChanged, this), this.uiSourceCode.addEventListener(R.WorkingCopyCommitted, this.workingCopyCommitted, this)];
1995
+ }
1996
+ addHeader(e) {
1997
+ this.headers.add(e), q.addFrameAttribution(this.uiSourceCode, e.frameId);
1998
+ }
1999
+ removeHeader(e) {
2000
+ this.headers.delete(e), q.removeFrameAttribution(this.uiSourceCode, e.frameId);
2001
+ }
2002
+ styleSheetChanged(e) {
2003
+ if (console.assert(this.headers.has(e)), this.#o || !this.headers.has(e)) return;
2004
+ let t = this.mirrorContent.bind(this, e, !0);
2005
+ this.#r.schedule(t, ae.DEFAULT);
2006
+ }
2007
+ workingCopyCommitted() {
2008
+ if (this.#a) return;
2009
+ let e = this.mirrorContent.bind(this, this.uiSourceCode, !0);
2010
+ this.#r.schedule(e, ae.AS_SOON_AS_POSSIBLE);
2011
+ }
2012
+ workingCopyChanged() {
2013
+ if (this.#a) return;
2014
+ let e = this.mirrorContent.bind(this, this.uiSourceCode, !1);
2015
+ this.#r.schedule(e, ae.DEFAULT);
2016
+ }
2017
+ async mirrorContent(e, t) {
2018
+ if (this.#i) {
2019
+ this.styleFileSyncedForTest();
2020
+ return;
2021
+ }
2022
+ let n = null;
2023
+ if (n = e === this.uiSourceCode ? this.uiSourceCode.workingCopy() : N.textOr(await e.requestContentData(), null), n === null || this.#i) {
2024
+ this.styleFileSyncedForTest();
2025
+ return;
2026
+ }
2027
+ e !== this.uiSourceCode && (this.#a = !0, this.uiSourceCode.setWorkingCopy(n), this.#a = !1), this.#o = !0;
2028
+ let r = [];
2029
+ for (let i of this.headers) i !== e && r.push(this.#e.setStyleSheetText(i.id, n, t));
2030
+ await Promise.all(r), this.#o = !1, this.styleFileSyncedForTest();
2031
+ }
2032
+ styleFileSyncedForTest() {}
2033
+ dispose() {
2034
+ this.#i || (this.#i = !0, this.#t.removeUISourceCode(this.uiSourceCode.url()), m(this.#n));
2035
+ }
2036
+ contentURL() {
2037
+ return console.assert(this.headers.size > 0), this.#s().originalContentProvider().contentURL();
2038
+ }
2039
+ contentType() {
2040
+ return console.assert(this.headers.size > 0), this.#s().originalContentProvider().contentType();
2041
+ }
2042
+ requestContentData() {
2043
+ return console.assert(this.headers.size > 0), this.#s().originalContentProvider().requestContentData();
2044
+ }
2045
+ searchInContent(e, t, n) {
2046
+ return console.assert(this.headers.size > 0), this.#s().originalContentProvider().searchInContent(e, t, n);
2047
+ }
2048
+ #s() {
2049
+ return console.assert(this.headers.size > 0), this.headers.values().next().value;
2050
+ }
2051
+ getHeaders() {
2052
+ return this.headers;
2053
+ }
2054
+ getUiSourceCode() {
2055
+ return this.uiSourceCode;
2056
+ }
2057
+ addSourceMap(e, t) {
2058
+ let n = this.#e.sourceMapManager();
2059
+ this.headers.forEach((r) => {
2060
+ n.detachSourceMap(r), n.attachSourceMap(r, e, t);
2061
+ });
2062
+ }
2063
+ }, Ht = class e {
2064
+ #e;
2065
+ #t;
2066
+ #n;
2067
+ constructor(e, t) {
2068
+ this.#e = e, this.#e.cssWorkspaceBinding = this, this.#t = /* @__PURE__ */ new Map(), t.observeModels(y, this), this.#n = /* @__PURE__ */ new Set();
2069
+ }
2070
+ static instance(t = {
2071
+ forceNew: null,
2072
+ resourceMapping: null,
2073
+ targetManager: null
2074
+ }) {
2075
+ let { forceNew: n, resourceMapping: r, targetManager: i } = t;
2076
+ if (n) {
2077
+ if (!r || !i) throw Error(`Unable to create CSSWorkspaceBinding: resourceMapping and targetManager must be provided: ${(/* @__PURE__ */ Error()).stack}`);
2078
+ v().set(e, new e(r, i));
2079
+ }
2080
+ return v().get(e);
2081
+ }
2082
+ static removeInstance() {
2083
+ v().delete(e);
2084
+ }
2085
+ get modelToInfo() {
2086
+ return this.#t;
2087
+ }
2088
+ getCSSModelInfo(e) {
2089
+ return this.#t.get(e);
2090
+ }
2091
+ modelAdded(e) {
2092
+ this.#t.set(e, new Ut(e, this.#e, this));
2093
+ }
2094
+ modelRemoved(e) {
2095
+ this.getCSSModelInfo(e).dispose(), this.#t.delete(e);
2096
+ }
2097
+ async pendingLiveLocationChangesPromise() {
2098
+ await Promise.all(this.#n);
2099
+ }
2100
+ recordLiveLocationChange(e) {
2101
+ e.then(() => {
2102
+ this.#n.delete(e);
2103
+ }), this.#n.add(e);
2104
+ }
2105
+ async updateLocations(e) {
2106
+ let t = this.getCSSModelInfo(e.cssModel()).updateLocations(e);
2107
+ this.recordLiveLocationChange(t), await t;
2108
+ }
2109
+ createLiveLocation(e, t, n) {
2110
+ let r = this.getCSSModelInfo(e.cssModel()).createLiveLocation(e, t, n);
2111
+ return this.recordLiveLocationChange(r), r;
2112
+ }
2113
+ propertyRawLocation(e, t) {
2114
+ let n = e.ownerStyle;
2115
+ if (!n || n.type !== be.Regular || !n.styleSheetId) return null;
2116
+ let r = n.cssModel().styleSheetHeaderForId(n.styleSheetId);
2117
+ if (!r) return null;
2118
+ let i = t ? e.nameRange() : e.valueRange();
2119
+ if (!i) return null;
2120
+ let a = i.startLine, o = i.startColumn;
2121
+ return new A(r, r.lineNumberInSource(a), r.columnNumberInSource(a, o));
2122
+ }
2123
+ propertyUILocation(e, t) {
2124
+ let n = this.propertyRawLocation(e, t);
2125
+ return n ? this.rawLocationToUILocation(n) : null;
2126
+ }
2127
+ rawLocationToUILocation(e) {
2128
+ return this.getCSSModelInfo(e.cssModel()).rawLocationToUILocation(e);
2129
+ }
2130
+ uiLocationToRawLocations(e) {
2131
+ let t = [];
2132
+ for (let n of this.#t.values()) t.push(...n.uiLocationToRawLocations(e));
2133
+ return t;
2134
+ }
2135
+ }, Ut = class {
2136
+ #e;
2137
+ #t;
2138
+ #n;
2139
+ #r;
2140
+ #i;
2141
+ #a;
2142
+ constructor(e, t, n) {
2143
+ this.#e = [e.addEventListener(C.StyleSheetAdded, (e) => {
2144
+ this.styleSheetAdded(e);
2145
+ }, this), e.addEventListener(C.StyleSheetRemoved, (e) => {
2146
+ this.styleSheetRemoved(e);
2147
+ }, this)], this.#t = t, this.#n = new Bt(e, t.workspace);
2148
+ let r = e.sourceMapManager();
2149
+ this.#r = new Mt(e.target(), r, t.workspace, n), this.#i = new a(), this.#a = new a();
2150
+ }
2151
+ get locations() {
2152
+ return this.#i;
2153
+ }
2154
+ async createLiveLocation(e, t, n) {
2155
+ let r = new Wt(e, this, t, n), i = e.header();
2156
+ return i ? (r.setHeader(i), this.#i.set(i, r), await r.update()) : this.#a.set(e.url, r), r;
2157
+ }
2158
+ disposeLocation(e) {
2159
+ let t = e.header();
2160
+ t ? this.#i.delete(t, e) : this.#a.delete(e.url, e);
2161
+ }
2162
+ updateLocations(e) {
2163
+ let t = [];
2164
+ for (let n of this.#i.get(e)) t.push(n.update());
2165
+ return Promise.all(t);
2166
+ }
2167
+ async styleSheetAdded(e) {
2168
+ let t = e.data;
2169
+ if (!t.sourceURL) return;
2170
+ let n = [];
2171
+ for (let e of this.#a.get(t.sourceURL)) e.setHeader(t), this.#i.set(t, e), n.push(e.update());
2172
+ await Promise.all(n), this.#a.deleteAll(t.sourceURL);
2173
+ }
2174
+ async styleSheetRemoved(e) {
2175
+ let t = e.data, n = [];
2176
+ for (let e of this.#i.get(t)) e.setHeader(t), this.#a.set(e.url, e), n.push(e.update());
2177
+ await Promise.all(n), this.#i.deleteAll(t);
2178
+ }
2179
+ addSourceMap(e, t) {
2180
+ this.#n.addSourceMap(e, t);
2181
+ }
2182
+ rawLocationToUILocation(e) {
2183
+ let t = null;
2184
+ return t ||= this.#r.rawLocationToUILocation(e), t ||= this.#n.rawLocationToUILocation(e), t ||= this.#t.cssLocationToUILocation(e), t;
2185
+ }
2186
+ uiLocationToRawLocations(e) {
2187
+ let t = this.#r.uiLocationToRawLocations(e);
2188
+ return t.length || (t = this.#n.uiLocationToRawLocations(e), t.length) ? t : this.#t.uiLocationToCSSLocations(e);
2189
+ }
2190
+ dispose() {
2191
+ m(this.#e), this.#n.dispose(), this.#r.dispose();
2192
+ }
2193
+ }, Wt = class extends At {
2194
+ url;
2195
+ #e;
2196
+ #t;
2197
+ #n;
2198
+ #r;
2199
+ constructor(e, t, n, r) {
2200
+ super(n, r), this.url = e.url, this.#e = e.lineNumber, this.#t = e.columnNumber, this.#n = t, this.#r = null;
2201
+ }
2202
+ header() {
2203
+ return this.#r;
2204
+ }
2205
+ setHeader(e) {
2206
+ this.#r = e;
2207
+ }
2208
+ async uiLocation() {
2209
+ if (!this.#r) return null;
2210
+ let e = new A(this.#r, this.#e, this.#t);
2211
+ return Ht.instance().rawLocationToUILocation(e);
2212
+ }
2213
+ dispose() {
2214
+ super.dispose(), this.#n.disposeLocation(this);
2215
+ }
2216
+ }, J = {
2217
+ errorInDebuggerLanguagePlugin: "Error in debugger language plugin: {PH1}",
2218
+ loadingDebugSymbolsForVia: "[{PH1}] Loading debug symbols for {PH2} (via {PH3})…",
2219
+ loadingDebugSymbolsFor: "[{PH1}] Loading debug symbols for {PH2}…",
2220
+ loadedDebugSymbolsForButDidnt: "[{PH1}] Loaded debug symbols for {PH2}, but didn't find any source files",
2221
+ loadedDebugSymbolsForFound: "[{PH1}] Loaded debug symbols for {PH2}, found {PH3} source file(s)",
2222
+ failedToLoadDebugSymbolsFor: "[{PH1}] Failed to load debug symbols for {PH2} ({PH3})"
2223
+ }, Gt = _("models/bindings/DebuggerLanguagePlugins.ts", J), Y = h.bind(void 0, Gt);
2224
+ function X(e) {
2225
+ return `${e.sourceURL}@${e.hash}`;
2226
+ }
2227
+ function Kt(e) {
2228
+ let { script: t } = e;
2229
+ return {
2230
+ rawModuleId: X(t),
2231
+ codeOffset: e.location().columnNumber - (t.codeOffset() || 0),
2232
+ inlineFrameIndex: e.inlineFrameIndex
2233
+ };
2234
+ }
2235
+ var qt = class e extends Error {
2236
+ exception;
2237
+ exceptionDetails;
2238
+ constructor(e, t) {
2239
+ let { description: n } = t.exception || {};
2240
+ super(n || t.text), this.exception = e, this.exceptionDetails = t;
2241
+ }
2242
+ static makeLocal(t, n) {
2243
+ let r = {
2244
+ type: O.RemoteObjectType.Object,
2245
+ subtype: O.RemoteObjectSubtype.Error,
2246
+ description: n
2247
+ }, i = {
2248
+ text: "Uncaught",
2249
+ exceptionId: -1,
2250
+ columnNumber: 0,
2251
+ lineNumber: 0,
2252
+ exception: r
2253
+ };
2254
+ return new e(t.debuggerModel.runtimeModel().createRemoteObject(r), i);
2255
+ }
2256
+ }, Jt = class extends x {
2257
+ get description() {
2258
+ return this.type;
2259
+ }
2260
+ get type() {
2261
+ return "namespace";
2262
+ }
2263
+ };
2264
+ async function Yt(e, t) {
2265
+ if (!/^(local|global|operand)$/.test(t.valueClass)) return { type: O.RemoteObjectType.Undefined };
2266
+ let n = Number(t.index), r = `${t.valueClass}s[${n}]`, i = await e.debuggerModel.agent.invoke_evaluateOnCallFrame({
2267
+ callFrameId: e.id,
2268
+ expression: r,
2269
+ silent: !0,
2270
+ generatePreview: !0,
2271
+ throwOnSideEffect: !0
2272
+ });
2273
+ return i.getError() || i.exceptionDetails ? { type: O.RemoteObjectType.Undefined } : i.result;
2274
+ }
2275
+ async function Xt(e, t, n) {
2276
+ if (t.type === "reftype") {
2277
+ let n = await Yt(e, t);
2278
+ return e.debuggerModel.runtimeModel().createRemoteObject(n);
2279
+ }
2280
+ return new $t(e, t, n);
2281
+ }
2282
+ var Zt = class extends pe {
2283
+ variables;
2284
+ #e;
2285
+ #t;
2286
+ stopId;
2287
+ constructor(e, t, n) {
2288
+ super(e.debuggerModel.runtimeModel(), void 0, "object", void 0, null), this.variables = [], this.#e = e, this.#t = n, this.stopId = t;
2289
+ }
2290
+ async doGetProperties(e, t, n) {
2291
+ if (t) return {
2292
+ properties: [],
2293
+ internalProperties: []
2294
+ };
2295
+ let r = [], i = {};
2296
+ function a(e, t) {
2297
+ return new ce(e, t, !1, !1, !0, !1);
2298
+ }
2299
+ for (let e of this.variables) {
2300
+ let t;
2301
+ try {
2302
+ let n = await this.#t.evaluate(e.name, Kt(this.#e), this.stopId);
2303
+ t = n ? await Xt(this.#e, n, this.#t) : new x(void 0);
2304
+ } catch (e) {
2305
+ console.warn(e), t = new x(void 0);
2306
+ }
2307
+ if (e.nestedName && e.nestedName.length > 1) {
2308
+ let n = i;
2309
+ for (let t = 0; t < e.nestedName.length - 1; t++) {
2310
+ let r = e.nestedName[t], i = n[r];
2311
+ i || (i = new Jt({}), n[r] = i), n = i.value;
2312
+ }
2313
+ let r = e.nestedName[e.nestedName.length - 1];
2314
+ n[r] = t;
2315
+ } else r.push(a(e.name, t));
2316
+ }
2317
+ for (let e in i) r.push(a(e, i[e]));
2318
+ return {
2319
+ properties: r,
2320
+ internalProperties: []
2321
+ };
2322
+ }
2323
+ }, Qt = class {
2324
+ #e;
2325
+ #t;
2326
+ #n;
2327
+ #r;
2328
+ #i;
2329
+ constructor(e, t, n, r, i, a) {
2330
+ if (i && new URL(i).protocol !== "data:") throw Error("The icon must be a data:-URL");
2331
+ this.#e = e, this.#t = n, this.#n = r, this.#r = i, this.#i = new Zt(e, t, a);
2332
+ }
2333
+ async getVariableValue(e) {
2334
+ for (let t = 0; t < this.#i.variables.length; ++t) {
2335
+ if (this.#i.variables[t].name !== e) continue;
2336
+ let n = await this.#i.getAllProperties(!1, !1);
2337
+ if (!n.properties) continue;
2338
+ let { value: r } = n.properties[t];
2339
+ if (r) return r;
2340
+ }
2341
+ return null;
2342
+ }
2343
+ callFrame() {
2344
+ return this.#e;
2345
+ }
2346
+ type() {
2347
+ return this.#t;
2348
+ }
2349
+ typeName() {
2350
+ return this.#n;
2351
+ }
2352
+ name() {}
2353
+ range() {
2354
+ return null;
2355
+ }
2356
+ object() {
2357
+ return this.#i;
2358
+ }
2359
+ description() {
2360
+ return "";
2361
+ }
2362
+ icon() {
2363
+ return this.#r;
2364
+ }
2365
+ extraProperties() {
2366
+ return [];
2367
+ }
2368
+ }, $t = class extends ye {
2369
+ extensionObject;
2370
+ plugin;
2371
+ callFrame;
2372
+ constructor(e, t, n) {
2373
+ super(), this.extensionObject = t, this.plugin = n, this.callFrame = e;
2374
+ }
2375
+ get linearMemoryAddress() {
2376
+ return this.extensionObject.linearMemoryAddress;
2377
+ }
2378
+ get linearMemorySize() {
2379
+ return this.extensionObject.linearMemorySize;
2380
+ }
2381
+ get objectId() {
2382
+ return this.extensionObject.objectId;
2383
+ }
2384
+ get type() {
2385
+ return this.extensionObject.type === "array" || this.extensionObject.type === "null" ? "object" : this.extensionObject.type;
2386
+ }
2387
+ get subtype() {
2388
+ if (this.extensionObject.type === "array" || this.extensionObject.type === "null") return this.extensionObject.type;
2389
+ }
2390
+ get value() {
2391
+ return this.extensionObject.value;
2392
+ }
2393
+ unserializableValue() {}
2394
+ get description() {
2395
+ return this.extensionObject.description;
2396
+ }
2397
+ set description(e) {}
2398
+ get hasChildren() {
2399
+ return this.extensionObject.hasChildren;
2400
+ }
2401
+ get preview() {}
2402
+ get className() {
2403
+ return this.extensionObject.className ?? null;
2404
+ }
2405
+ arrayLength() {
2406
+ return 0;
2407
+ }
2408
+ arrayBufferByteLength() {
2409
+ return 0;
2410
+ }
2411
+ getOwnProperties(e, t) {
2412
+ return this.getAllProperties(!1, e, t);
2413
+ }
2414
+ async getAllProperties(e, t, n) {
2415
+ let { objectId: i } = this.extensionObject;
2416
+ if (i) {
2417
+ r(this.plugin.getProperties);
2418
+ let e = await this.plugin.getProperties(i);
2419
+ return {
2420
+ properties: await Promise.all(e.map(async (e) => new ce(e.name, await Xt(this.callFrame, e.value, this.plugin)))),
2421
+ internalProperties: null
2422
+ };
2423
+ }
2424
+ return {
2425
+ properties: null,
2426
+ internalProperties: null
2427
+ };
2428
+ }
2429
+ release() {
2430
+ let { objectId: e } = this.extensionObject;
2431
+ e && (r(this.plugin.releaseObject), this.plugin.releaseObject(e));
2432
+ }
2433
+ debuggerModel() {
2434
+ return this.callFrame.debuggerModel;
2435
+ }
2436
+ runtimeModel() {
2437
+ return this.callFrame.debuggerModel.runtimeModel();
2438
+ }
2439
+ isLinearMemoryInspectable() {
2440
+ return this.extensionObject.linearMemoryAddress !== void 0;
2441
+ }
2442
+ }, en = class {
2443
+ #e;
2444
+ #t;
2445
+ #n;
2446
+ #r;
2447
+ #i;
2448
+ callFrameByStopId = /* @__PURE__ */ new Map();
2449
+ stopIdByCallFrame = /* @__PURE__ */ new Map();
2450
+ nextStopId = 0n;
2451
+ constructor(e, t, n) {
2452
+ this.#e = t, this.#t = n, this.#n = [], this.#r = /* @__PURE__ */ new Map(), e.observeModels(j, this), this.#i = /* @__PURE__ */ new Map();
2453
+ }
2454
+ async evaluateOnCallFrame(e, t) {
2455
+ let { script: n } = e, { expression: r, returnByValue: i, throwOnSideEffect: a } = t, { plugin: o } = await this.rawModuleIdAndPluginForScript(n);
2456
+ if (!o) return null;
2457
+ let s = Kt(e);
2458
+ if ((await o.rawLocationToSourceLocation(s)).length === 0) return null;
2459
+ if (i) return { error: "Cannot return by value" };
2460
+ if (a) return { error: "Cannot guarantee side-effect freedom" };
2461
+ try {
2462
+ let t = await o.evaluate(r, s, this.stopIdForCallFrame(e));
2463
+ return t ? { object: await Xt(e, t, o) } : { object: new x(void 0) };
2464
+ } catch (t) {
2465
+ if (t instanceof qt) {
2466
+ let { exception: e, exceptionDetails: n } = t;
2467
+ return {
2468
+ object: e,
2469
+ exceptionDetails: n
2470
+ };
2471
+ }
2472
+ let { exception: n, exceptionDetails: r } = qt.makeLocal(e, t.message);
2473
+ return {
2474
+ object: n,
2475
+ exceptionDetails: r
2476
+ };
2477
+ }
2478
+ }
2479
+ stopIdForCallFrame(e) {
2480
+ let t = this.stopIdByCallFrame.get(e);
2481
+ return t === void 0 ? (t = this.nextStopId++, this.stopIdByCallFrame.set(e, t), this.callFrameByStopId.set(t, e), t) : t;
2482
+ }
2483
+ callFrameForStopId(e) {
2484
+ return this.callFrameByStopId.get(e);
2485
+ }
2486
+ modelAdded(e) {
2487
+ this.#r.set(e, new tn(e, this.#e)), e.addEventListener(k.GlobalObjectCleared, this.globalObjectCleared, this), e.addEventListener(k.ParsedScriptSource, this.parsedScriptSource, this), e.addEventListener(k.DebuggerResumed, this.debuggerResumed, this), e.setEvaluateOnCallFrameCallback(this.evaluateOnCallFrame.bind(this));
2488
+ }
2489
+ modelRemoved(e) {
2490
+ e.removeEventListener(k.GlobalObjectCleared, this.globalObjectCleared, this), e.removeEventListener(k.ParsedScriptSource, this.parsedScriptSource, this), e.removeEventListener(k.DebuggerResumed, this.debuggerResumed, this), e.setEvaluateOnCallFrameCallback(null);
2491
+ let t = this.#r.get(e);
2492
+ t && (t.dispose(), this.#r.delete(e)), this.#i.forEach((t, n) => {
2493
+ let r = t.scripts.filter((t) => t.debuggerModel !== e);
2494
+ r.length === 0 ? (t.plugin.removeRawModule(n).catch((e) => {
2495
+ s.instance().error(Y(J.errorInDebuggerLanguagePlugin, { PH1: e.message }), !1);
2496
+ }), this.#i.delete(n)) : t.scripts = r;
2497
+ });
2498
+ }
2499
+ globalObjectCleared(e) {
2500
+ let t = e.data;
2501
+ this.modelRemoved(t), this.modelAdded(t);
2502
+ }
2503
+ addPlugin(e) {
2504
+ this.#n.push(e);
2505
+ for (let e of this.#r.keys()) for (let t of e.scripts()) this.hasPluginForScript(t) || this.parsedScriptSource({ data: t });
2506
+ }
2507
+ removePlugin(e) {
2508
+ this.#n = this.#n.filter((t) => t !== e);
2509
+ let t = /* @__PURE__ */ new Set();
2510
+ this.#i.forEach((n, r) => {
2511
+ n.plugin === e && (n.scripts.forEach((e) => t.add(e)), this.#i.delete(r));
2512
+ });
2513
+ for (let e of t) this.#r.get(e.debuggerModel).removeScript(e), this.parsedScriptSource({ data: e });
2514
+ }
2515
+ hasPluginForScript(e) {
2516
+ let t = X(e);
2517
+ return this.#i.get(t)?.scripts.includes(e) ?? !1;
2518
+ }
2519
+ async rawModuleIdAndPluginForScript(e) {
2520
+ let t = X(e), n = this.#i.get(t);
2521
+ return n && (await n.addRawModulePromise, n === this.#i.get(t)) ? {
2522
+ rawModuleId: t,
2523
+ plugin: n.plugin
2524
+ } : {
2525
+ rawModuleId: t,
2526
+ plugin: null
2527
+ };
2528
+ }
2529
+ uiSourceCodeForURL(e, t) {
2530
+ let n = this.#r.get(e);
2531
+ return n ? n.getProject().uiSourceCodeForURL(t) : null;
2532
+ }
2533
+ async rawLocationToUILocation(e) {
2534
+ let t = e.script();
2535
+ if (!t) return null;
2536
+ let { rawModuleId: n, plugin: r } = await this.rawModuleIdAndPluginForScript(t);
2537
+ if (!r) return null;
2538
+ let i = {
2539
+ rawModuleId: n,
2540
+ codeOffset: e.columnNumber - (t.codeOffset() || 0),
2541
+ inlineFrameIndex: e.inlineFrameIndex
2542
+ };
2543
+ try {
2544
+ let e = await r.rawLocationToSourceLocation(i);
2545
+ for (let n of e) {
2546
+ let e = this.uiSourceCodeForURL(t.debuggerModel, n.sourceFileURL);
2547
+ if (e) return e.uiLocation(n.lineNumber, n.columnNumber >= 0 ? n.columnNumber : void 0);
2548
+ }
2549
+ } catch (e) {
2550
+ s.instance().error(Y(J.errorInDebuggerLanguagePlugin, { PH1: e.message }), !1);
2551
+ }
2552
+ return null;
2553
+ }
2554
+ uiLocationToRawLocationRanges(e, t, n = -1) {
2555
+ let r = [];
2556
+ if (this.scriptsForUISourceCode(e).forEach((e) => {
2557
+ let t = X(e), n = this.#i.get(t);
2558
+ if (!n) return;
2559
+ let { plugin: a } = n;
2560
+ r.push(i(t, a, e));
2561
+ }), r.length === 0) return Promise.resolve(null);
2562
+ return Promise.all(r).then((e) => e.flat()).catch((e) => (s.instance().error(Y(J.errorInDebuggerLanguagePlugin, { PH1: e.message }), !1), null));
2563
+ async function i(r, i, a) {
2564
+ let o = {
2565
+ rawModuleId: r,
2566
+ sourceFileURL: e.url(),
2567
+ lineNumber: t,
2568
+ columnNumber: n
2569
+ }, s = await i.sourceLocationToRawLocation(o);
2570
+ return s ? s.map((e) => ({
2571
+ start: new D(a.debuggerModel, a.scriptId, 0, Number(e.startOffset) + (a.codeOffset() || 0)),
2572
+ end: new D(a.debuggerModel, a.scriptId, 0, Number(e.endOffset) + (a.codeOffset() || 0))
2573
+ })) : [];
2574
+ }
2575
+ }
2576
+ async uiLocationToRawLocations(e, t, n) {
2577
+ let r = await this.uiLocationToRawLocationRanges(e, t, n);
2578
+ return r ? r.map(({ start: e }) => e) : null;
2579
+ }
2580
+ async uiLocationRangeToRawLocationRanges(e, t) {
2581
+ let n = [];
2582
+ for (let r = t.startLine; r <= t.endLine; ++r) n.push(this.uiLocationToRawLocationRanges(e, r));
2583
+ let r = [];
2584
+ for (let e of await Promise.all(n)) {
2585
+ if (e === null) return null;
2586
+ for (let n of e) {
2587
+ let [e, i] = await Promise.all([this.rawLocationToUILocation(n.start), this.rawLocationToUILocation(n.end)]);
2588
+ e === null || i === null || t.intersection(new M(e.lineNumber, e.columnNumber ?? 0, i.lineNumber, i.columnNumber ?? Infinity)).isEmpty() || r.push(n);
2589
+ }
2590
+ }
2591
+ return r;
2592
+ }
2593
+ async translateRawFramesStep(e, t, n) {
2594
+ let r = e[0], i = n.model(j)?.scriptForId(r.scriptId ?? "");
2595
+ if (!i) return !1;
2596
+ let a = await this.getFunctionInfo(i, r);
2597
+ if (!a) return !1;
2598
+ if (e.shift(), "frames" in a && a.frames.length) {
2599
+ let e = a.frames.map(async ({ name: e }, t) => {
2600
+ let n = new D(i.debuggerModel, i.scriptId, r.lineNumber, r.columnNumber, t);
2601
+ return s(await this.rawLocationToUILocation(n), e, r);
2602
+ });
2603
+ return t.push(await Promise.all(e)), !0;
2604
+ }
2605
+ let o = s(await this.#t.rawLocationToUILocation(new D(i.debuggerModel, i.scriptId, r.lineNumber, r.columnNumber)), r.functionName, r);
2606
+ return "missingSymbolFiles" in a && a.missingSymbolFiles.length ? t.push([{
2607
+ ...o,
2608
+ missingDebugInfo: {
2609
+ type: Ze.PARTIAL_INFO,
2610
+ missingDebugFiles: a.missingSymbolFiles
2611
+ }
2612
+ }]) : t.push([{
2613
+ ...o,
2614
+ missingDebugInfo: { type: Ze.NO_INFO }
2615
+ }]), !0;
2616
+ function s(e, t, n) {
2617
+ return e ? {
2618
+ uiSourceCode: e.uiSourceCode,
2619
+ name: t,
2620
+ line: e.lineNumber,
2621
+ column: e.columnNumber ?? -1
2622
+ } : {
2623
+ url: n.url,
2624
+ name: n.functionName,
2625
+ line: n.lineNumber,
2626
+ column: n.columnNumber
2627
+ };
2628
+ }
2629
+ }
2630
+ scriptsForUISourceCode(e) {
2631
+ for (let t of this.#r.values()) {
2632
+ let n = t.uiSourceCodeToScripts.get(e);
2633
+ if (n) return n;
2634
+ }
2635
+ return [];
2636
+ }
2637
+ setDebugInfoURL(e, t) {
2638
+ this.hasPluginForScript(e) || (e.debugSymbols = {
2639
+ type: b.DebugSymbolsType.ExternalDWARF,
2640
+ externalURL: t
2641
+ }, this.parsedScriptSource({ data: e }), e.debuggerModel.setDebugInfoURL(e, t));
2642
+ }
2643
+ parsedScriptSource(e) {
2644
+ let t = e.data;
2645
+ if (t.sourceURL) for (let e of this.#n) {
2646
+ if (!e.handleScript(t)) continue;
2647
+ let n = X(t), r = this.#i.get(n);
2648
+ if (r) r.scripts.push(t);
2649
+ else {
2650
+ let i = (async () => {
2651
+ let i = s.instance(), a = t.sourceURL, o = t.debugSymbols?.externalURL || "";
2652
+ o ? i.log(Y(J.loadingDebugSymbolsForVia, {
2653
+ PH1: e.name,
2654
+ PH2: a,
2655
+ PH3: o
2656
+ })) : i.log(Y(J.loadingDebugSymbolsFor, {
2657
+ PH1: e.name,
2658
+ PH2: a
2659
+ }));
2660
+ try {
2661
+ let s = !o && d(a, "wasm:") ? await t.getWasmBytecode() : void 0, c = await e.addRawModule(n, o, {
2662
+ url: a,
2663
+ code: s
2664
+ });
2665
+ if (r !== this.#i.get(n)) return [];
2666
+ if ("missingSymbolFiles" in c) {
2667
+ let t = e.createPageResourceLoadInitiator();
2668
+ return { missingSymbolFiles: c.missingSymbolFiles.map((e) => ({
2669
+ resourceUrl: e,
2670
+ initiator: t
2671
+ })) };
2672
+ }
2673
+ let l = c;
2674
+ return l.length === 0 ? i.warn(Y(J.loadedDebugSymbolsForButDidnt, {
2675
+ PH1: e.name,
2676
+ PH2: a
2677
+ })) : i.log(Y(J.loadedDebugSymbolsForFound, {
2678
+ PH1: e.name,
2679
+ PH2: a,
2680
+ PH3: l.length
2681
+ })), l;
2682
+ } catch (t) {
2683
+ return i.error(Y(J.failedToLoadDebugSymbolsFor, {
2684
+ PH1: e.name,
2685
+ PH2: a,
2686
+ PH3: t.message
2687
+ }), !1), this.#i.delete(n), [];
2688
+ }
2689
+ })();
2690
+ r = {
2691
+ rawModuleId: n,
2692
+ plugin: e,
2693
+ scripts: [t],
2694
+ addRawModulePromise: i
2695
+ }, this.#i.set(n, r);
2696
+ }
2697
+ r.addRawModulePromise.then((e) => {
2698
+ if (t.debuggerModel.scriptForId(t.scriptId) === t) {
2699
+ let n = this.#r.get(t.debuggerModel);
2700
+ n && Array.isArray(e) && n.addSourceFiles(t, e), this.#t.updateLocations(t);
2701
+ }
2702
+ });
2703
+ return;
2704
+ }
2705
+ }
2706
+ debuggerResumed(e) {
2707
+ let t = Array.from(this.callFrameByStopId.values()).filter((t) => t.debuggerModel === e.data);
2708
+ for (let e of t) {
2709
+ let t = this.stopIdByCallFrame.get(e);
2710
+ r(t), this.stopIdByCallFrame.delete(e), this.callFrameByStopId.delete(t);
2711
+ }
2712
+ }
2713
+ getSourcesForScript(e) {
2714
+ let t = X(e), n = this.#i.get(t);
2715
+ return n ? n.addRawModulePromise : Promise.resolve(void 0);
2716
+ }
2717
+ async resolveScopeChain(e) {
2718
+ let t = e.script, { rawModuleId: n, plugin: r } = await this.rawModuleIdAndPluginForScript(t);
2719
+ if (!r) return null;
2720
+ let i = {
2721
+ rawModuleId: n,
2722
+ codeOffset: e.location().columnNumber - (t.codeOffset() || 0),
2723
+ inlineFrameIndex: e.inlineFrameIndex
2724
+ }, a = this.stopIdForCallFrame(e);
2725
+ try {
2726
+ if ((await r.rawLocationToSourceLocation(i)).length === 0) return null;
2727
+ let t = /* @__PURE__ */ new Map(), n = await r.listVariablesInScope(i);
2728
+ for (let i of n || []) {
2729
+ let n = t.get(i.scope);
2730
+ if (!n) {
2731
+ let { type: o, typeName: s, icon: c } = await r.getScopeInfo(i.scope);
2732
+ n = new Qt(e, a, o, s, c, r), t.set(i.scope, n);
2733
+ }
2734
+ n.object().variables.push(i);
2735
+ }
2736
+ return Array.from(t.values());
2737
+ } catch (e) {
2738
+ return s.instance().error(Y(J.errorInDebuggerLanguagePlugin, { PH1: e.message }), !1), null;
2739
+ }
2740
+ }
2741
+ async getFunctionInfo(e, t) {
2742
+ let { rawModuleId: n, plugin: r } = await this.rawModuleIdAndPluginForScript(e);
2743
+ if (!r) return null;
2744
+ let i = {
2745
+ rawModuleId: n,
2746
+ codeOffset: t.columnNumber - (e.codeOffset() || 0),
2747
+ inlineFrameIndex: 0
2748
+ };
2749
+ try {
2750
+ let e = await r.getFunctionInfo(i);
2751
+ if ("missingSymbolFiles" in e) {
2752
+ let t = r.createPageResourceLoadInitiator();
2753
+ return {
2754
+ missingSymbolFiles: e.missingSymbolFiles.map((e) => ({
2755
+ resourceUrl: e,
2756
+ initiator: t
2757
+ })),
2758
+ ..."frames" in e && { frames: e.frames }
2759
+ };
2760
+ }
2761
+ return e;
2762
+ } catch (e) {
2763
+ return s.instance().warn(Y(J.errorInDebuggerLanguagePlugin, { PH1: e.message })), { frames: [] };
2764
+ }
2765
+ }
2766
+ async getInlinedFunctionRanges(e) {
2767
+ let t = e.script();
2768
+ if (!t) return [];
2769
+ let { rawModuleId: n, plugin: r } = await this.rawModuleIdAndPluginForScript(t);
2770
+ if (!r) return [];
2771
+ let i = {
2772
+ rawModuleId: n,
2773
+ codeOffset: e.columnNumber - (t.codeOffset() || 0)
2774
+ };
2775
+ try {
2776
+ return (await r.getInlinedFunctionRanges(i)).map((e) => ({
2777
+ start: new D(t.debuggerModel, t.scriptId, 0, Number(e.startOffset) + (t.codeOffset() || 0)),
2778
+ end: new D(t.debuggerModel, t.scriptId, 0, Number(e.endOffset) + (t.codeOffset() || 0))
2779
+ }));
2780
+ } catch (e) {
2781
+ return s.instance().warn(Y(J.errorInDebuggerLanguagePlugin, { PH1: e.message })), [];
2782
+ }
2783
+ }
2784
+ async getInlinedCalleesRanges(e) {
2785
+ let t = e.script();
2786
+ if (!t) return [];
2787
+ let { rawModuleId: n, plugin: r } = await this.rawModuleIdAndPluginForScript(t);
2788
+ if (!r) return [];
2789
+ let i = {
2790
+ rawModuleId: n,
2791
+ codeOffset: e.columnNumber - (t.codeOffset() || 0)
2792
+ };
2793
+ try {
2794
+ return (await r.getInlinedCalleesRanges(i)).map((e) => ({
2795
+ start: new D(t.debuggerModel, t.scriptId, 0, Number(e.startOffset) + (t.codeOffset() || 0)),
2796
+ end: new D(t.debuggerModel, t.scriptId, 0, Number(e.endOffset) + (t.codeOffset() || 0))
2797
+ }));
2798
+ } catch (e) {
2799
+ return s.instance().warn(Y(J.errorInDebuggerLanguagePlugin, { PH1: e.message })), [];
2800
+ }
2801
+ }
2802
+ async getMappedLines(e) {
2803
+ let t = await Promise.all(this.scriptsForUISourceCode(e).map((e) => this.rawModuleIdAndPluginForScript(e))), n = null;
2804
+ for (let { rawModuleId: r, plugin: i } of t) {
2805
+ if (!i) continue;
2806
+ let t = await i.getMappedLines(r, e.url());
2807
+ t !== void 0 && (n === null ? n = new Set(t) : t.forEach((e) => n.add(e)));
2808
+ }
2809
+ return n;
2810
+ }
2811
+ }, tn = class {
2812
+ project;
2813
+ uiSourceCodeToScripts;
2814
+ constructor(e, t) {
2815
+ this.project = new G(t, "language_plugins::" + e.target().id(), V.Network, "", !1), q.setTargetForProject(this.project, e.target()), this.uiSourceCodeToScripts = /* @__PURE__ */ new Map();
2816
+ }
2817
+ addSourceFiles(e, t) {
2818
+ let n = e.createPageResourceLoadInitiator();
2819
+ for (let r of t) {
2820
+ let t = this.project.uiSourceCodeForURL(r);
2821
+ if (t) {
2822
+ let n = this.uiSourceCodeToScripts.get(t);
2823
+ n.includes(e) || n.push(e);
2824
+ } else {
2825
+ t = this.project.createUISourceCode(r, c.SourceMapScript), q.setInitialFrameAttribution(t, e.frameId), this.uiSourceCodeToScripts.set(t, [e]);
2826
+ let i = new xe(r, c.SourceMapScript, n), a = f.mimeFromURL(r) || "text/javascript";
2827
+ this.project.addUISourceCodeWithProvider(t, i, null, a);
2828
+ }
2829
+ }
2830
+ }
2831
+ removeScript(e) {
2832
+ this.uiSourceCodeToScripts.forEach((t, n) => {
2833
+ t = t.filter((t) => t !== e), t.length === 0 ? (this.uiSourceCodeToScripts.delete(n), this.project.removeUISourceCode(n.url())) : this.uiSourceCodeToScripts.set(n, t);
2834
+ });
2835
+ }
2836
+ dispose() {
2837
+ this.project.dispose();
2838
+ }
2839
+ getProject() {
2840
+ return this.project;
2841
+ }
2842
+ }, nn = class e {
2843
+ #e;
2844
+ #t;
2845
+ #n;
2846
+ #r;
2847
+ #i;
2848
+ constructor(e, t, n) {
2849
+ rn.add(this), this.#e = n, this.#t = new G(t, "debugger:" + e.target().id(), V.Debugger, "", !0), this.#n = [
2850
+ e.addEventListener(k.GlobalObjectCleared, this.globalObjectCleared, this),
2851
+ e.addEventListener(k.ParsedScriptSource, this.parsedScriptSource, this),
2852
+ e.addEventListener(k.DiscardedAnonymousScriptSource, this.discardedScriptSource, this)
2853
+ ], this.#r = /* @__PURE__ */ new Map(), this.#i = /* @__PURE__ */ new Map();
2854
+ }
2855
+ static createV8ScriptURL(e) {
2856
+ let t = u.extractName(e.sourceURL);
2857
+ return "debugger:///VM" + e.scriptId + (t ? " " + t : "");
2858
+ }
2859
+ static scriptForUISourceCode(e) {
2860
+ for (let t of rn) {
2861
+ let n = t.#r.get(e);
2862
+ if (n !== void 0) return n;
2863
+ }
2864
+ return null;
2865
+ }
2866
+ uiSourceCodeForScript(e) {
2867
+ return this.#i.get(e) ?? null;
2868
+ }
2869
+ rawLocationToUILocation(e) {
2870
+ let t = e.script();
2871
+ if (!t) return null;
2872
+ let n = this.#i.get(t);
2873
+ if (!n) return null;
2874
+ let { lineNumber: r, columnNumber: i } = t.rawLocationToRelativeLocation(e);
2875
+ return n.uiLocation(r, i);
2876
+ }
2877
+ uiLocationToRawLocations(e, t, n) {
2878
+ let r = this.#r.get(e);
2879
+ return r ? ({lineNumber: t, columnNumber: n} = r.relativeLocationToRawLocation({
2880
+ lineNumber: t,
2881
+ columnNumber: n
2882
+ }), [r.debuggerModel.createRawLocation(r, t, n ?? 0)]) : [];
2883
+ }
2884
+ uiLocationRangeToRawLocationRanges(e, { startLine: t, startColumn: n, endLine: r, endColumn: i }) {
2885
+ let a = this.#r.get(e);
2886
+ return a ? ({lineNumber: t, columnNumber: n} = a.relativeLocationToRawLocation({
2887
+ lineNumber: t,
2888
+ columnNumber: n
2889
+ }), {lineNumber: r, columnNumber: i} = a.relativeLocationToRawLocation({
2890
+ lineNumber: r,
2891
+ columnNumber: i
2892
+ }), [{
2893
+ start: a.debuggerModel.createRawLocation(a, t, n),
2894
+ end: a.debuggerModel.createRawLocation(a, r, i)
2895
+ }]) : [];
2896
+ }
2897
+ parsedScriptSource(t) {
2898
+ let n = t.data, r = e.createV8ScriptURL(n), i = this.#t.createUISourceCode(r, c.Script);
2899
+ n.isBreakpointCondition && i.markAsUnconditionallyIgnoreListed(), this.#r.set(i, n), this.#i.set(n, i), this.#t.addUISourceCodeWithProvider(i, n, null, "text/javascript"), this.#e.updateLocations(n);
2900
+ }
2901
+ discardedScriptSource(e) {
2902
+ let t = e.data, n = this.#i.get(t);
2903
+ n !== void 0 && (this.#i.delete(t), this.#r.delete(n), this.#t.removeUISourceCode(n.url()));
2904
+ }
2905
+ globalObjectCleared() {
2906
+ this.#i.clear(), this.#r.clear(), this.#t.reset();
2907
+ }
2908
+ dispose() {
2909
+ rn.delete(this), m(this.#n), this.globalObjectCleared(), this.#t.dispose();
2910
+ }
2911
+ }, rn = /* @__PURE__ */ new Set(), an = {
2912
+ liveEditFailed: "`LiveEdit` failed: {PH1}",
2913
+ liveEditCompileFailed: "`LiveEdit` compile failed: {PH1}"
2914
+ }, on = _("models/bindings/ResourceScriptMapping.ts", an), sn = h.bind(void 0, on), cn = class {
2915
+ debuggerModel;
2916
+ #e;
2917
+ debuggerWorkspaceBinding;
2918
+ #t;
2919
+ #n;
2920
+ #r;
2921
+ #i;
2922
+ constructor(e, t, n) {
2923
+ this.debuggerModel = e, this.#e = t, this.debuggerWorkspaceBinding = n, this.#t = /* @__PURE__ */ new Map(), this.#n = /* @__PURE__ */ new Map(), this.#r = /* @__PURE__ */ new Map();
2924
+ let r = e.runtimeModel();
2925
+ this.#i = [
2926
+ this.debuggerModel.addEventListener(k.ParsedScriptSource, (e) => this.addScript(e.data), this),
2927
+ this.debuggerModel.addEventListener(k.GlobalObjectCleared, this.globalObjectCleared, this),
2928
+ r.addEventListener(ge.ExecutionContextDestroyed, this.executionContextDestroyed, this),
2929
+ r.target().targetManager().addEventListener(ue.INSPECTED_URL_CHANGED, this.inspectedURLChanged, this)
2930
+ ];
2931
+ }
2932
+ project(e) {
2933
+ let t = (e.isContentScript() ? "js:extensions:" : "js::") + this.debuggerModel.target().id() + ":" + e.frameId, n = this.#n.get(t);
2934
+ if (!n) {
2935
+ let r = e.isContentScript() ? V.ContentScripts : V.Network;
2936
+ n = new G(this.#e, t, r, "", !1), q.setTargetForProject(n, this.debuggerModel.target()), this.#n.set(t, n);
2937
+ }
2938
+ return n;
2939
+ }
2940
+ uiSourceCodeForScript(e) {
2941
+ return this.#r.get(e) ?? null;
2942
+ }
2943
+ rawLocationToUILocation(e) {
2944
+ let t = e.script();
2945
+ if (!t) return null;
2946
+ let n = this.#r.get(t);
2947
+ if (!n) return null;
2948
+ let r = this.#t.get(n);
2949
+ if (!r || r.hasDivergedFromVM() && !r.isMergingToVM() || r.isDivergingFromVM() || r.script !== t) return null;
2950
+ let { lineNumber: i, columnNumber: a = 0 } = e;
2951
+ return n.uiLocation(i, a);
2952
+ }
2953
+ uiLocationToRawLocations(e, t, n) {
2954
+ let r = this.#t.get(e);
2955
+ if (!r) return [];
2956
+ let { script: i } = r;
2957
+ return i ? [this.debuggerModel.createRawLocation(i, t, n)] : [];
2958
+ }
2959
+ uiLocationRangeToRawLocationRanges(e, { startLine: t, startColumn: n, endLine: r, endColumn: i }) {
2960
+ let a = this.#t.get(e);
2961
+ if (!a) return null;
2962
+ let { script: o } = a;
2963
+ return o ? [{
2964
+ start: this.debuggerModel.createRawLocation(o, t, n),
2965
+ end: this.debuggerModel.createRawLocation(o, r, i)
2966
+ }] : null;
2967
+ }
2968
+ inspectedURLChanged(e) {
2969
+ for (let t = this.debuggerModel.target(); t !== e.data; t = t.parentTarget()) if (t === null) return;
2970
+ for (let e of Array.from(this.#r.keys())) this.removeScripts([e]), this.addScript(e);
2971
+ }
2972
+ async functionBoundsAtRawLocation(e) {
2973
+ let t = e.script();
2974
+ if (!t) return null;
2975
+ let n = this.#r.get(t);
2976
+ if (!n) return null;
2977
+ let r = t ? await he(t) : null;
2978
+ if (!r) return null;
2979
+ let i = r.text.offsetFromPosition(e.lineNumber, e.columnNumber), a = [];
2980
+ (function e(t) {
2981
+ for (let n of t) i >= n.start && i < n.end && (a.push(n), e(n.children));
2982
+ })([r.scopeTree]);
2983
+ let o = a.findLast((e) => e.kind === P.FUNCTION || e.kind === P.ARROW_FUNCTION);
2984
+ if (!o) return null;
2985
+ let s = r.text.positionFromOffset(o.start), c = r.text.positionFromOffset(o.end);
2986
+ return new ut(n, new M(s.lineNumber, s.columnNumber, c.lineNumber, c.columnNumber), "");
2987
+ }
2988
+ addScript(e) {
2989
+ if (e.isLiveEdit() || e.isBreakpointCondition) return;
2990
+ let t = e.sourceURL;
2991
+ if (!t) return;
2992
+ if (e.hasSourceURL) t = de.resolveRelativeSourceURL(e.debuggerModel.target(), t);
2993
+ else if (e.isInlineScript() || e.isContentScript() && !new u(t).isValid) return;
2994
+ let n = this.project(e), r = n.uiSourceCodeForURL(t);
2995
+ if (r) {
2996
+ let e = this.#t.get(r);
2997
+ e?.script && this.removeScripts([e.script]);
2998
+ }
2999
+ let i = e.originalContentProvider(), a = n.createUISourceCode(t, i.contentType());
3000
+ q.setInitialFrameAttribution(a, e.frameId);
3001
+ let o = Lt(this.debuggerModel.target(), e.frameId, t), s = new ln(this, a, e);
3002
+ this.#t.set(a, s), this.#r.set(e, a);
3003
+ let c = e.isWasm() ? "application/wasm" : "text/javascript";
3004
+ n.addUISourceCodeWithProvider(a, i, o, c), this.debuggerWorkspaceBinding.updateLocations(e);
3005
+ }
3006
+ scriptFile(e) {
3007
+ return this.#t.get(e) || null;
3008
+ }
3009
+ removeScripts(e) {
3010
+ let t = new a();
3011
+ for (let n of e) {
3012
+ let e = this.#r.get(n);
3013
+ if (!e) continue;
3014
+ let r = this.#t.get(e);
3015
+ r && r.dispose(), this.#t.delete(e), this.#r.delete(n), t.set(e.project(), e), this.debuggerWorkspaceBinding.updateLocations(n);
3016
+ }
3017
+ for (let e of t.keysArray()) {
3018
+ let n = t.get(e), r = !0;
3019
+ for (let t of e.uiSourceCodes()) if (!n.has(t)) {
3020
+ r = !1;
3021
+ break;
3022
+ }
3023
+ r ? (this.#n.delete(e.id()), e.removeProject()) : n.forEach((t) => e.removeUISourceCode(t.url()));
3024
+ }
3025
+ }
3026
+ executionContextDestroyed(e) {
3027
+ let t = e.data;
3028
+ this.removeScripts(this.debuggerModel.scriptsForExecutionContext(t));
3029
+ }
3030
+ globalObjectCleared() {
3031
+ let e = Array.from(this.#r.keys());
3032
+ this.removeScripts(e);
3033
+ }
3034
+ resetForTest() {
3035
+ this.globalObjectCleared();
3036
+ }
3037
+ dispose() {
3038
+ m(this.#i), this.globalObjectCleared();
3039
+ }
3040
+ }, ln = class e extends l {
3041
+ #e;
3042
+ uiSourceCode;
3043
+ script;
3044
+ #t;
3045
+ #n;
3046
+ #r;
3047
+ #i;
3048
+ #a = new p();
3049
+ constructor(e, t, n) {
3050
+ super(), this.#e = e, this.uiSourceCode = t, this.script = this.uiSourceCode.contentType().isScript() ? n : null, this.uiSourceCode.addEventListener(R.WorkingCopyChanged, this.workingCopyChanged, this), this.uiSourceCode.addEventListener(R.WorkingCopyCommitted, this.workingCopyCommitted, this);
3051
+ }
3052
+ isDiverged() {
3053
+ if (this.uiSourceCode.isDirty()) return !0;
3054
+ if (!this.script || this.#t === void 0 || this.#t === null) return !1;
3055
+ let e = this.uiSourceCode.workingCopy();
3056
+ if (!e) return !1;
3057
+ if (!e.startsWith(this.#t.trimEnd())) return !0;
3058
+ let t = this.uiSourceCode.workingCopy().substr(this.#t.length);
3059
+ return !!t.length && !t.match(Ee);
3060
+ }
3061
+ workingCopyChanged() {
3062
+ this.update();
3063
+ }
3064
+ workingCopyCommitted() {
3065
+ if (oe.devToolsLiveEdit?.enabled === !1 || this.uiSourceCode.project().canSetFileContent() || !this.script) return;
3066
+ let e = this.uiSourceCode.workingCopy();
3067
+ this.script.editSource(e).then(({ status: t, exceptionDetails: n }) => {
3068
+ this.scriptSourceWasSet(e, t, n);
3069
+ });
3070
+ }
3071
+ async scriptSourceWasSet(e, t, n) {
3072
+ if (t === b.SetScriptSourceResponseStatus.Ok && (this.#t = e), await this.update(), t === b.SetScriptSourceResponseStatus.Ok) return;
3073
+ if (!n) {
3074
+ s.instance().addMessage(sn(an.liveEditFailed, { PH1: i(t) }), re.WARNING);
3075
+ return;
3076
+ }
3077
+ let r = sn(an.liveEditCompileFailed, { PH1: n.text });
3078
+ this.uiSourceCode.addLineMessage(B.Level.ERROR, r, n.lineNumber, n.columnNumber);
3079
+ function i(e) {
3080
+ switch (e) {
3081
+ case b.SetScriptSourceResponseStatus.BlockedByActiveFunction: return "Functions that are on the stack (currently being executed) can not be edited";
3082
+ case b.SetScriptSourceResponseStatus.BlockedByActiveGenerator: return "Async functions/generators that are active can not be edited";
3083
+ case b.SetScriptSourceResponseStatus.BlockedByTopLevelEsModuleChange: return "The top-level of ES modules can not be edited";
3084
+ case b.SetScriptSourceResponseStatus.CompileError:
3085
+ case b.SetScriptSourceResponseStatus.Ok: throw Error("Compile errors and Ok status must not be reported on the console");
3086
+ }
3087
+ }
3088
+ }
3089
+ async update() {
3090
+ let e = await this.#a.acquire(), t = this.isDiverged();
3091
+ t && !this.#r ? await this.divergeFromVM() : !t && this.#r && await this.mergeToVM(), e();
3092
+ }
3093
+ async divergeFromVM() {
3094
+ this.script && (this.#n = !0, await this.#e.debuggerWorkspaceBinding.updateLocations(this.script), this.#n = void 0, this.#r = !0, this.dispatchEventToListeners(e.Events.DID_DIVERGE_FROM_VM));
3095
+ }
3096
+ async mergeToVM() {
3097
+ this.script && (this.#r = void 0, this.#i = !0, await this.#e.debuggerWorkspaceBinding.updateLocations(this.script), this.#i = void 0, this.dispatchEventToListeners(e.Events.DID_MERGE_TO_VM));
3098
+ }
3099
+ hasDivergedFromVM() {
3100
+ return !!this.#r;
3101
+ }
3102
+ isDivergingFromVM() {
3103
+ return !!this.#n;
3104
+ }
3105
+ isMergingToVM() {
3106
+ return !!this.#i;
3107
+ }
3108
+ checkMapping() {
3109
+ if (!this.script || this.#t !== void 0) {
3110
+ this.mappingCheckedForTest();
3111
+ return;
3112
+ }
3113
+ this.script.requestContentData().then((e) => {
3114
+ this.#t = N.textOr(e, null), this.update().then(() => this.mappingCheckedForTest());
3115
+ });
3116
+ }
3117
+ mappingCheckedForTest() {}
3118
+ dispose() {
3119
+ this.uiSourceCode.removeEventListener(R.WorkingCopyChanged, this.workingCopyChanged, this), this.uiSourceCode.removeEventListener(R.WorkingCopyCommitted, this.workingCopyCommitted, this);
3120
+ }
3121
+ addSourceMapURL(e) {
3122
+ this.script && this.script.debuggerModel.setSourceMapURL(this.script, e);
3123
+ }
3124
+ addDebugInfoURL(e) {
3125
+ if (!this.script) return;
3126
+ let { pluginManager: t } = hn.instance();
3127
+ t.setDebugInfoURL(this.script, e);
3128
+ }
3129
+ hasSourceMapURL() {
3130
+ return !!this.script?.sourceMapURL;
3131
+ }
3132
+ async missingSymbolFiles() {
3133
+ if (!this.script) return null;
3134
+ let { pluginManager: e } = this.#e.debuggerWorkspaceBinding, t = await e.getSourcesForScript(this.script);
3135
+ return t && "missingSymbolFiles" in t ? t.missingSymbolFiles : null;
3136
+ }
3137
+ };
3138
+ (function(e) {
3139
+ e.Events = /* @__PURE__ */ function(e) {
3140
+ return e.DID_MERGE_TO_VM = "DidMergeToVM", e.DID_DIVERGE_FROM_VM = "DidDivergeFromVM", e;
3141
+ }({});
3142
+ })(ln ||= {});
3143
+ //#endregion
3144
+ //#region node_modules/.pnpm/chrome-devtools-frontend@1.0.1638082/node_modules/chrome-devtools-frontend/front_end/models/bindings/SymbolizedError.ts
3145
+ function un(e) {
3146
+ return /\n\s*at\s/.test(e) || e.startsWith("SyntaxError:");
3147
+ }
3148
+ var dn = class e extends l {
3149
+ errorStack;
3150
+ cause;
3151
+ constructor(e, t) {
3152
+ super(), this.errorStack = e, this.cause = t, this.cause?.addEventListener("UPDATED", this.#e, this);
3153
+ }
3154
+ dispose() {
3155
+ this.cause?.removeEventListener("UPDATED", this.#e, this), (this.cause instanceof fn || this.cause instanceof e) && this.cause.dispose();
3156
+ }
3157
+ #e() {
3158
+ this.dispatchEventToListeners("UPDATED");
3159
+ }
3160
+ }, fn = class e extends l {
3161
+ message;
3162
+ stackTrace;
3163
+ cause;
3164
+ constructor(e, t, n) {
3165
+ super(), this.message = e, this.stackTrace = t, this.cause = n, this.stackTrace.addEventListener(F.UPDATED, this.#e, this), this.cause?.addEventListener("UPDATED", this.#e, this);
3166
+ }
3167
+ dispose() {
3168
+ this.stackTrace.removeEventListener(F.UPDATED, this.#e, this), this.cause?.removeEventListener("UPDATED", this.#e, this), (this.cause instanceof e || this.cause instanceof dn) && this.cause.dispose();
3169
+ }
3170
+ #e() {
3171
+ this.dispatchEventToListeners("UPDATED");
3172
+ }
3173
+ }, pn = class e extends l {
3174
+ message;
3175
+ #e = null;
3176
+ constructor(e) {
3177
+ super(), this.message = e;
3178
+ }
3179
+ get uiLocation() {
3180
+ return this.#e;
3181
+ }
3182
+ static async fromExceptionDetails(t, n, r) {
3183
+ let { exception: i, scriptId: a, lineNumber: o, columnNumber: s } = r;
3184
+ if (!i || i.subtype !== "error" || i.className !== "SyntaxError") throw Error("SymbolizedSyntaxError.fromExceptionDetails expects a SyntaxError");
3185
+ if (!a) return null;
3186
+ let c = t.model(j);
3187
+ if (!c) return null;
3188
+ let l = c.createRawLocationByScriptId(a, o, s), u = new e(i.description || "");
3189
+ return await n.createLiveLocation(l, u.#t.bind(u), new jt()), u;
3190
+ }
3191
+ async #t(e) {
3192
+ this.#e = await e.uiLocation(), this.dispatchEventToListeners("UPDATED");
3193
+ }
3194
+ }, mn = /* @__PURE__ */ function(e) {
3195
+ return e.UPDATED = "UPDATED", e;
3196
+ }({}), hn = class e {
3197
+ resourceMapping;
3198
+ #e;
3199
+ #t;
3200
+ pluginManager;
3201
+ ignoreListManager;
3202
+ workspace;
3203
+ constructor(e, t, n, r) {
3204
+ this.resourceMapping = e, this.resourceMapping.debuggerWorkspaceBinding = this, this.ignoreListManager = n, this.workspace = r, this.#e = /* @__PURE__ */ new Map(), t.observeModels(j, this), this.ignoreListManager.addEventListener(yt.IGNORED_SCRIPT_RANGES_UPDATED, (e) => this.updateLocations(e.data)), this.#t = /* @__PURE__ */ new Set(), this.pluginManager = new en(t, e.workspace, this);
3205
+ }
3206
+ setFunctionRanges(e, t) {
3207
+ for (let n of this.#e.values()) n.compilerMapping.setFunctionRanges(e, t);
3208
+ }
3209
+ static instance(t = {
3210
+ forceNew: null,
3211
+ resourceMapping: null,
3212
+ targetManager: null,
3213
+ ignoreListManager: null,
3214
+ workspace: null
3215
+ }) {
3216
+ let { forceNew: n, resourceMapping: r, targetManager: i, ignoreListManager: a, workspace: o } = t;
3217
+ if (n) {
3218
+ if (!r || !i || !a || !o) throw Error(`Unable to create DebuggerWorkspaceBinding: resourceMapping, targetManager and IgnoreLIstManager must be provided: ${(/* @__PURE__ */ Error()).stack}`);
3219
+ v().set(e, new e(r, i, a, o));
3220
+ }
3221
+ return v().get(e);
3222
+ }
3223
+ static removeInstance() {
3224
+ v().delete(e);
3225
+ }
3226
+ async computeAutoStepRanges(e, t) {
3227
+ function n(e, t) {
3228
+ let { start: n, end: r } = t;
3229
+ return !(n.scriptId !== e.scriptId || e.lineNumber < n.lineNumber || e.lineNumber > r.lineNumber || e.lineNumber === n.lineNumber && e.columnNumber < n.columnNumber || e.lineNumber === r.lineNumber && e.columnNumber >= r.columnNumber);
3230
+ }
3231
+ let r = t.location();
3232
+ if (!r) return [];
3233
+ let i = this.pluginManager, a = [];
3234
+ if (e === we.STEP_OUT) return await i.getInlinedFunctionRanges(r);
3235
+ let o = await i.rawLocationToUILocation(r);
3236
+ if (o) return a = await i.uiLocationToRawLocationRanges(o.uiSourceCode, o.lineNumber, o.columnNumber) || [], a = a.filter((e) => n(r, e)), e === we.STEP_OVER && (a = a.concat(await i.getInlinedCalleesRanges(r))), a;
3237
+ let s = this.#e.get(r.debuggerModel)?.compilerMapping;
3238
+ return s ? (a = s.getLocationRangesForSameSourceLocation(r), a = a.filter((e) => n(r, e)), a) : [];
3239
+ }
3240
+ modelAdded(e) {
3241
+ e.setBeforePausedCallback(this.shouldPause.bind(this)), this.#e.set(e, new gn(e, this)), e.setComputeAutoStepRangesCallback(this.computeAutoStepRanges.bind(this));
3242
+ }
3243
+ modelRemoved(e) {
3244
+ e.setComputeAutoStepRangesCallback(null);
3245
+ let t = this.#e.get(e);
3246
+ t && (t.dispose(), this.#e.delete(e));
3247
+ }
3248
+ async pendingLiveLocationChangesPromise() {
3249
+ await Promise.all(this.#t);
3250
+ }
3251
+ recordLiveLocationChange(e) {
3252
+ e.then(() => {
3253
+ this.#t.delete(e);
3254
+ }), this.#t.add(e);
3255
+ }
3256
+ async updateLocations(e) {
3257
+ let t = e.target().model(I)?.scriptInfoChanged(e, this.#n.bind(this));
3258
+ t && this.recordLiveLocationChange(t);
3259
+ let n = [t], r = this.#e.get(e.debuggerModel);
3260
+ if (r) {
3261
+ let t = r.updateLocations(e);
3262
+ this.recordLiveLocationChange(t), n.push(t);
3263
+ }
3264
+ await Promise.all(n);
3265
+ }
3266
+ async createStackTraceFromProtocolRuntime(e, t) {
3267
+ let n = t.model(I).createFromProtocolRuntime(e, this.#n.bind(this));
3268
+ return this.recordLiveLocationChange(n), await n;
3269
+ }
3270
+ async createStackTraceFromDebuggerPaused(e, t) {
3271
+ let n = t.model(I).createFromDebuggerPaused(e, this.#n.bind(this));
3272
+ return this.recordLiveLocationChange(n), await n;
3273
+ }
3274
+ async createStackTraceFromErrorStackLikeString(e, t, n) {
3275
+ let r = e.model(I).createFromErrorStackLikeString(t, this.#n.bind(this), n);
3276
+ return this.recordLiveLocationChange(r), await r;
3277
+ }
3278
+ async createSymbolizedError(e, t) {
3279
+ let n = "", r, i = t;
3280
+ if (e.subtype === "error") {
3281
+ let a = ve.objectAsError(e);
3282
+ n = a.errorStack;
3283
+ let [o, s] = await Promise.all([t ? Promise.resolve(t) : a.exceptionDetails(), a.cause()]);
3284
+ if (i = o, r = s, e.className === "SyntaxError" && i) {
3285
+ let t = await pn.fromExceptionDetails(e.runtimeModel().target(), this, i);
3286
+ if (t) return t;
3287
+ }
3288
+ } else if (e.type === "string") {
3289
+ if (n = e.description || "", !un(n)) return null;
3290
+ } else return null;
3291
+ let [a, o] = await Promise.all([this.createStackTraceFromErrorStackLikeString(e.runtimeModel().target(), n, i), r ? this.createSymbolizedError(r) : Promise.resolve(null)]), s = i?.exceptionMetaData?.issueSummary;
3292
+ return typeof s == "string" && (n = Ke(n, s)), a ? new fn(Ie(n), a, o) : new dn(n, o);
3293
+ }
3294
+ async createLiveLocation(e, t, n) {
3295
+ let r = this.#e.get(e.debuggerModel);
3296
+ if (!r) return null;
3297
+ let i = r.createLiveLocation(e, t, n);
3298
+ return this.recordLiveLocationChange(i), await i;
3299
+ }
3300
+ async createStackTraceTopFrameLiveLocation(e, t, n) {
3301
+ console.assert(e.length > 0);
3302
+ let r = vn.createStackTraceTopFrameLocation(e, this, t, n);
3303
+ return this.recordLiveLocationChange(r), await r;
3304
+ }
3305
+ async rawLocationToUILocation(e) {
3306
+ let t = await this.pluginManager.rawLocationToUILocation(e);
3307
+ if (t) return t;
3308
+ let n = this.#e.get(e.debuggerModel);
3309
+ return n ? n.rawLocationToUILocation(e) : null;
3310
+ }
3311
+ uiSourceCodeForSourceMapSourceURL(e, t, n) {
3312
+ let r = this.#e.get(e);
3313
+ return r ? r.compilerMapping.uiSourceCodeForURL(t, n) : null;
3314
+ }
3315
+ async uiSourceCodeForSourceMapSourceURLPromise(e, t, n) {
3316
+ return await (this.uiSourceCodeForSourceMapSourceURL(e, t, n) || this.waitForUISourceCodeAdded(t, e.target()));
3317
+ }
3318
+ async uiSourceCodeForDebuggerLanguagePluginSourceURLPromise(e, t) {
3319
+ return await (this.pluginManager.uiSourceCodeForURL(e, t) || this.waitForUISourceCodeAdded(t, e.target()));
3320
+ }
3321
+ uiSourceCodeForScript(e) {
3322
+ let t = this.#e.get(e.debuggerModel);
3323
+ return t ? t.uiSourceCodeForScript(e) : null;
3324
+ }
3325
+ waitForUISourceCodeAdded(e, t) {
3326
+ return new Promise((n) => {
3327
+ let r = this.workspace.addEventListener(H.UISourceCodeAdded, (i) => {
3328
+ let a = i.data;
3329
+ a.url() === e && q.targetForUISourceCode(a) === t && (this.workspace.removeEventListener(H.UISourceCodeAdded, r.listener), n(a));
3330
+ });
3331
+ });
3332
+ }
3333
+ async uiLocationToRawLocations(e, t, n) {
3334
+ let r = await this.pluginManager.uiLocationToRawLocations(e, t, n);
3335
+ if (r) return r;
3336
+ for (let r of this.#e.values()) {
3337
+ let i = r.uiLocationToRawLocations(e, t, n);
3338
+ if (i.length) return i;
3339
+ }
3340
+ return [];
3341
+ }
3342
+ async uiLocationRangeToRawLocationRanges(e, t) {
3343
+ let n = await this.pluginManager.uiLocationRangeToRawLocationRanges(e, t);
3344
+ if (n) return n;
3345
+ for (let n of this.#e.values()) {
3346
+ let r = n.uiLocationRangeToRawLocationRanges(e, t);
3347
+ if (r) return r;
3348
+ }
3349
+ return [];
3350
+ }
3351
+ async functionBoundsAtRawLocation(e) {
3352
+ let t = this.#e.get(e.debuggerModel);
3353
+ return t ? await t.functionBoundsAtRawLocation(e) : null;
3354
+ }
3355
+ async normalizeUILocation(e) {
3356
+ let t = await this.uiLocationToRawLocations(e.uiSourceCode, e.lineNumber, e.columnNumber);
3357
+ for (let e of t) {
3358
+ let t = await this.rawLocationToUILocation(e);
3359
+ if (t) return t;
3360
+ }
3361
+ return e;
3362
+ }
3363
+ async getMappedLines(e) {
3364
+ for (let t of this.#e.values()) {
3365
+ let n = t.getMappedLines(e);
3366
+ if (n !== null) return n;
3367
+ }
3368
+ return await this.pluginManager.getMappedLines(e);
3369
+ }
3370
+ scriptFile(e, t) {
3371
+ let n = this.#e.get(t);
3372
+ return n ? n.getResourceScriptMapping().scriptFile(e) : null;
3373
+ }
3374
+ scriptsForUISourceCode(e) {
3375
+ let t = /* @__PURE__ */ new Set();
3376
+ this.pluginManager.scriptsForUISourceCode(e).forEach((e) => t.add(e));
3377
+ for (let n of this.#e.values()) {
3378
+ let r = n.getResourceScriptMapping().scriptFile(e);
3379
+ r?.script && t.add(r.script), n.compilerMapping.scriptsForUISourceCode(e).forEach((e) => t.add(e));
3380
+ }
3381
+ return [...t];
3382
+ }
3383
+ supportsConditionalBreakpoints(e) {
3384
+ return this.pluginManager.scriptsForUISourceCode(e).every((e) => e.isJavaScript());
3385
+ }
3386
+ resetForTest(e) {
3387
+ let t = e.model(j), n = this.#e.get(t);
3388
+ n && n.getResourceScriptMapping().resetForTest();
3389
+ }
3390
+ removeLiveLocation(e) {
3391
+ let t = this.#e.get(e.rawLocation.debuggerModel);
3392
+ t && t.disposeLocation(e);
3393
+ }
3394
+ async shouldPause(e, t) {
3395
+ let { callFrames: [n] } = e;
3396
+ if (!n) return !1;
3397
+ let r = n.functionLocation();
3398
+ return !t || e.reason !== b.PausedEventReason.Step || !r || !n.script.isWasm() || !g("wasm-auto-stepping").get() || !this.pluginManager.hasPluginForScript(n.script) || await this.pluginManager.rawLocationToUILocation(n.location()) ? !0 : t.script() !== r.script() || t.columnNumber !== r.columnNumber || t.lineNumber !== r.lineNumber;
3399
+ }
3400
+ async #n(e, t) {
3401
+ let n = e.slice(0), r = [];
3402
+ for (; n.length;) await this.#r(n, r, t);
3403
+ return r;
3404
+ }
3405
+ async #r(e, t, n) {
3406
+ if (await this.pluginManager.translateRawFramesStep(e, t, n)) return;
3407
+ let r = this.#e.get(n.model(j));
3408
+ if (r) {
3409
+ await r.translateRawFramesStep(e, t);
3410
+ return;
3411
+ }
3412
+ let { url: i, lineNumber: a, columnNumber: o, functionName: s } = e.shift();
3413
+ t.push([{
3414
+ url: i,
3415
+ line: a,
3416
+ column: o,
3417
+ name: s
3418
+ }]);
3419
+ }
3420
+ }, gn = class {
3421
+ #e;
3422
+ #t;
3423
+ #n;
3424
+ #r;
3425
+ #i;
3426
+ compilerMapping;
3427
+ #a;
3428
+ constructor(e, t) {
3429
+ this.#e = e, this.#t = t;
3430
+ let { workspace: n } = t.resourceMapping;
3431
+ this.#n = new nn(e, n, t), this.#r = t.resourceMapping, this.#i = new cn(e, n, t), this.compilerMapping = new kt(e, n, t), this.#a = new a();
3432
+ }
3433
+ async createLiveLocation(e, t, n) {
3434
+ console.assert(e.scriptId !== "");
3435
+ let r = e.scriptId, i = new _n(r, e, this.#t, t, n);
3436
+ return this.#a.set(r, i), await i.update(), i;
3437
+ }
3438
+ disposeLocation(e) {
3439
+ this.#a.delete(e.scriptId, e);
3440
+ }
3441
+ async updateLocations(e) {
3442
+ let t = [];
3443
+ for (let n of this.#a.get(e.scriptId)) t.push(n.update());
3444
+ await Promise.all(t);
3445
+ }
3446
+ rawLocationToUILocation(e) {
3447
+ let t = this.compilerMapping.rawLocationToUILocation(e);
3448
+ return t ||= this.#i.rawLocationToUILocation(e), t ||= this.#r.jsLocationToUILocation(e), t ||= this.#n.rawLocationToUILocation(e), t;
3449
+ }
3450
+ uiSourceCodeForScript(e) {
3451
+ let t = null;
3452
+ return t ||= this.#i.uiSourceCodeForScript(e), t ||= this.#r.uiSourceCodeForScript(e), t ||= this.#n.uiSourceCodeForScript(e), t;
3453
+ }
3454
+ uiLocationToRawLocations(e, t, n = 0) {
3455
+ let r = this.compilerMapping.uiLocationToRawLocations(e, t, n);
3456
+ return r = r.length ? r : this.#i.uiLocationToRawLocations(e, t, n), r = r.length ? r : this.#r.uiLocationToJSLocations(e, t, n), r = r.length ? r : this.#n.uiLocationToRawLocations(e, t, n), r;
3457
+ }
3458
+ uiLocationRangeToRawLocationRanges(e, t) {
3459
+ let n = this.compilerMapping.uiLocationRangeToRawLocationRanges(e, t);
3460
+ return n ??= this.#i.uiLocationRangeToRawLocationRanges(e, t), n ??= this.#r.uiLocationRangeToJSLocationRanges(e, t), n ??= this.#n.uiLocationRangeToRawLocationRanges(e, t), n;
3461
+ }
3462
+ async functionBoundsAtRawLocation(e) {
3463
+ let t = null;
3464
+ return t ||= await this.compilerMapping.functionBoundsAtRawLocation(e), t ||= await this.#i.functionBoundsAtRawLocation(e), t ||= await this.#r.functionBoundsAtRawLocation(e), t;
3465
+ }
3466
+ async translateRawFramesStep(e, t) {
3467
+ await this.compilerMapping.translateRawFramesStep(e, t) || this.#o(e, t);
3468
+ }
3469
+ #o(e, t) {
3470
+ let { scriptId: n, url: r, lineNumber: i, columnNumber: a, functionName: o } = e.shift(), s = n ? this.#e.createRawLocationByScriptId(n, i, a) : r ? this.#e.createRawLocationByURL(r, i, a) : null;
3471
+ if (s) {
3472
+ let e = this.rawLocationToUILocation(s);
3473
+ if (e) {
3474
+ t.push([{
3475
+ uiSourceCode: e.uiSourceCode,
3476
+ name: o,
3477
+ line: e.lineNumber,
3478
+ column: e.columnNumber ?? -1
3479
+ }]);
3480
+ return;
3481
+ }
3482
+ }
3483
+ t.push([{
3484
+ url: r,
3485
+ line: i,
3486
+ column: a,
3487
+ name: o
3488
+ }]);
3489
+ }
3490
+ getMappedLines(e) {
3491
+ return this.compilerMapping.getMappedLines(e);
3492
+ }
3493
+ dispose() {
3494
+ this.#e.setBeforePausedCallback(null), this.compilerMapping.dispose(), this.#i.dispose(), this.#n.dispose();
3495
+ }
3496
+ getResourceScriptMapping() {
3497
+ return this.#i;
3498
+ }
3499
+ }, _n = class extends At {
3500
+ scriptId;
3501
+ rawLocation;
3502
+ #e;
3503
+ constructor(e, t, n, r, i) {
3504
+ super(r, i), this.scriptId = e, this.rawLocation = t, this.#e = n;
3505
+ }
3506
+ async uiLocation() {
3507
+ let e = this.rawLocation;
3508
+ return await this.#e.rawLocationToUILocation(e);
3509
+ }
3510
+ dispose() {
3511
+ super.dispose(), this.#e.removeLiveLocation(this);
3512
+ }
3513
+ }, vn = class e extends At {
3514
+ #e;
3515
+ #t;
3516
+ #n;
3517
+ constructor(e, t) {
3518
+ super(e, t), this.#e = !0, this.#t = null, this.#n = null;
3519
+ }
3520
+ static async createStackTraceTopFrameLocation(t, n, r, i) {
3521
+ let a = new e(r, i), o = t.map((e) => n.createLiveLocation(e, a.scheduleUpdate.bind(a), i));
3522
+ return a.#n = (await Promise.all(o)).filter((e) => !!e), await a.updateLocation(), a;
3523
+ }
3524
+ async uiLocation() {
3525
+ return this.#t ? await this.#t.uiLocation() : null;
3526
+ }
3527
+ dispose() {
3528
+ if (super.dispose(), this.#n) for (let e of this.#n) e.dispose();
3529
+ this.#n = null, this.#t = null;
3530
+ }
3531
+ async scheduleUpdate() {
3532
+ this.#e || (this.#e = !0, queueMicrotask(() => {
3533
+ this.updateLocation();
3534
+ }));
3535
+ }
3536
+ async updateLocation() {
3537
+ if (this.#e = !1, !(!this.#n || this.#n.length === 0)) {
3538
+ this.#t = this.#n[0];
3539
+ for (let e of this.#n) if (!(await e.uiLocation())?.isIgnoreListed()) {
3540
+ this.#t = e;
3541
+ break;
3542
+ }
3543
+ this.update();
3544
+ }
3545
+ }
3546
+ }, yn = class {
3547
+ #e;
3548
+ #t;
3549
+ #n;
3550
+ #r;
3551
+ #i;
3552
+ #a;
3553
+ #o;
3554
+ #s;
3555
+ #c;
3556
+ #l;
3557
+ #u;
3558
+ #d;
3559
+ constructor(e, t, n) {
3560
+ this.#e = e, this.#t = e.size, this.#n = 0, this.#i = t || Number.MAX_VALUE, this.#a = n, this.#o = new TextDecoder(), this.#s = !1, this.#c = null, this.#r = null;
3561
+ }
3562
+ async read(e) {
3563
+ if (this.#a && this.#a(this), this.#e?.type.endsWith("gzip")) {
3564
+ let e = ie(this.#e.stream());
3565
+ this.#r = e.getReader();
3566
+ } else this.#d = new FileReader(), this.#d.onload = this.onChunkLoaded.bind(this), this.#d.onerror = this.onError.bind(this);
3567
+ return this.#u = e, this.loadChunk(), await new Promise((e) => {
3568
+ this.#l = e;
3569
+ });
3570
+ }
3571
+ cancel() {
3572
+ this.#s = !0;
3573
+ }
3574
+ loadedSize() {
3575
+ return this.#n;
3576
+ }
3577
+ fileSize() {
3578
+ return this.#t;
3579
+ }
3580
+ fileName() {
3581
+ return this.#e ? this.#e.name : "";
3582
+ }
3583
+ error() {
3584
+ return this.#c;
3585
+ }
3586
+ onChunkLoaded(e) {
3587
+ if (this.#s || e.target.readyState !== FileReader.DONE || !this.#d) return;
3588
+ let t = this.#d.result;
3589
+ this.#n += t.byteLength;
3590
+ let n = this.#n === this.#t;
3591
+ this.decodeChunkBuffer(t, n);
3592
+ }
3593
+ async decodeChunkBuffer(e, t) {
3594
+ if (!this.#u) return;
3595
+ let n = this.#o.decode(e, { stream: !t });
3596
+ if (await this.#u.write(n, t), !this.#s) {
3597
+ if (this.#a && this.#a(this), t) {
3598
+ this.finishRead();
3599
+ return;
3600
+ }
3601
+ this.loadChunk();
3602
+ }
3603
+ }
3604
+ async finishRead() {
3605
+ this.#u && (this.#e = null, this.#d = null, await this.#u.close(), this.#l(!this.#c));
3606
+ }
3607
+ async loadChunk() {
3608
+ if (!(!this.#u || !this.#e)) {
3609
+ if (this.#r) {
3610
+ let { value: e, done: t } = await this.#r.read();
3611
+ if (t || !e) return await this.#u.write("", !0), await this.finishRead();
3612
+ this.decodeChunkBuffer(e.buffer, !1);
3613
+ }
3614
+ if (this.#d) {
3615
+ let e = this.#n, t = Math.min(this.#t, e + this.#i), n = this.#e.slice(e, t);
3616
+ this.#d.readAsArrayBuffer(n);
3617
+ }
3618
+ }
3619
+ }
3620
+ onError(e) {
3621
+ let t = e.target;
3622
+ this.#c = t.error, this.#l(!1);
3623
+ }
3624
+ }, bn = class {
3625
+ #e;
3626
+ #t;
3627
+ #n;
3628
+ constructor() {
3629
+ this.#e = [];
3630
+ }
3631
+ async open(e) {
3632
+ this.#n = !1, this.#e = [], this.#t = e;
3633
+ let t = await L.instance().save(this.#t, Oe, !0);
3634
+ return t && L.instance().addEventListener(it.APPENDED_TO_URL, this.onAppendDone, this), !!t;
3635
+ }
3636
+ write(e) {
3637
+ return new Promise((t) => {
3638
+ this.#e.push(t), L.instance().append(this.#t, e);
3639
+ });
3640
+ }
3641
+ async close() {
3642
+ this.#n = !0, !this.#e.length && (L.instance().removeEventListener(it.APPENDED_TO_URL, this.onAppendDone, this), L.instance().close(this.#t));
3643
+ }
3644
+ onAppendDone(e) {
3645
+ if (e.data !== this.#t) return;
3646
+ let t = this.#e.shift();
3647
+ t && t(), !this.#e.length && this.#n && (L.instance().removeEventListener(it.APPENDED_TO_URL, this.onAppendDone, this), L.instance().close(this.#t));
3648
+ }
3649
+ }, xn = class {
3650
+ #e = /* @__PURE__ */ new WeakMap();
3651
+ constructor() {
3652
+ S.instance().observeModels(j, this), S.instance().observeModels(y, this);
3653
+ }
3654
+ modelAdded(e) {
3655
+ let t = e.target(), n = this.#e.get(t) ?? new Cn();
3656
+ e instanceof j ? n.setDebuggerModel(e) : n.setCSSModel(e), this.#e.set(t, n);
3657
+ }
3658
+ modelRemoved(e) {
3659
+ let t = e.target();
3660
+ this.#e.get(t)?.clear();
3661
+ }
3662
+ addMessage(e, t, n) {
3663
+ this.#e.get(n)?.addMessage(e, t);
3664
+ }
3665
+ clear() {
3666
+ for (let e of S.instance().targets()) this.#e.get(e)?.clear();
3667
+ }
3668
+ }, Sn = class {
3669
+ #e = new xn();
3670
+ constructor() {
3671
+ S.instance().addModelListener(me, le.MessageAdded, (e) => this.consoleMessageAdded(e.data)), me.allMessagesUnordered().forEach(this.consoleMessageAdded, this), S.instance().addModelListener(me, le.ConsoleCleared, () => this.#e.clear());
3672
+ }
3673
+ consoleMessageAdded(e) {
3674
+ let t = e.runtimeModel();
3675
+ if (!e.isErrorOrWarning() || !e.runtimeModel() || e.source === Se.LogEntrySource.Violation || !t) return;
3676
+ let n = e.level === Se.LogEntryLevel.Error ? B.Level.ERROR : B.Level.WARNING;
3677
+ this.#e.addMessage(new B(n, e.messageText), e, t.target());
3678
+ }
3679
+ }, Cn = class {
3680
+ #e;
3681
+ #t;
3682
+ #n = /* @__PURE__ */ new Map();
3683
+ #r;
3684
+ constructor() {
3685
+ this.#r = new jt(), ht.instance().addEventListener(H.UISourceCodeAdded, this.#c.bind(this));
3686
+ }
3687
+ setDebuggerModel(e) {
3688
+ if (this.#e) throw Error("Cannot set DebuggerModel twice");
3689
+ this.#e = e, e.addEventListener(k.ParsedScriptSource, (e) => {
3690
+ queueMicrotask(() => {
3691
+ this.#s(e);
3692
+ });
3693
+ }), e.addEventListener(k.GlobalObjectCleared, this.#u, this);
3694
+ }
3695
+ setCSSModel(e) {
3696
+ if (this.#t) throw Error("Cannot set CSSModel twice");
3697
+ this.#t = e, e.addEventListener(C.StyleSheetAdded, (e) => queueMicrotask(() => this.#l(e)));
3698
+ }
3699
+ async addMessage(e, t) {
3700
+ let n = new Tn(e, this.#r), r = this.#o(t) ?? this.#a(t) ?? this.#i(t);
3701
+ if (r && await n.updateLocationSource(r), t.url) {
3702
+ let e = this.#n.get(t.url);
3703
+ e || (e = [], this.#n.set(t.url, e)), e.push({
3704
+ source: t,
3705
+ presentation: n
3706
+ });
3707
+ }
3708
+ }
3709
+ #i(e) {
3710
+ if (!e.url) return null;
3711
+ let t = ht.instance().uiSourceCodeForURL(e.url);
3712
+ return t ? new z(t, e.line, e.column) : null;
3713
+ }
3714
+ #a(e) {
3715
+ return !this.#t || !e.url ? null : this.#t.createRawLocationsByURL(e.url, e.line, e.column)[0] ?? null;
3716
+ }
3717
+ #o(e) {
3718
+ if (!this.#e) return null;
3719
+ if (e.scriptId) return this.#e.createRawLocationByScriptId(e.scriptId, e.line, e.column);
3720
+ let t = e.stackTrace?.callFrames ? e.stackTrace.callFrames[0] : null;
3721
+ return t ? this.#e.createRawLocationByScriptId(t.scriptId, t.lineNumber, t.columnNumber) : e.url ? this.#e.createRawLocationByURL(e.url, e.line, e.column) : null;
3722
+ }
3723
+ #s(e) {
3724
+ let t = e.data, n = this.#n.get(t.sourceURL), r = [];
3725
+ for (let { presentation: e, source: i } of n ?? []) {
3726
+ let n = this.#o(i);
3727
+ n && t.scriptId === n.scriptId && r.push(e.updateLocationSource(n));
3728
+ }
3729
+ Promise.all(r).then(this.parsedScriptSourceForTest.bind(this));
3730
+ }
3731
+ parsedScriptSourceForTest() {}
3732
+ #c(e) {
3733
+ let t = e.data, n = this.#n.get(t.url()), r = [];
3734
+ for (let { presentation: e, source: i } of n ?? []) r.push(e.updateLocationSource(new z(t, i.line, i.column)));
3735
+ Promise.all(r).then(this.uiSourceCodeAddedForTest.bind(this));
3736
+ }
3737
+ uiSourceCodeAddedForTest() {}
3738
+ #l(e) {
3739
+ let t = e.data, n = this.#n.get(t.sourceURL), r = [];
3740
+ for (let { source: e, presentation: i } of n ?? []) t.containsLocation(e.line, e.column) && r.push(i.updateLocationSource(new A(t, e.line, e.column)));
3741
+ Promise.all(r).then(this.styleSheetAddedForTest.bind(this));
3742
+ }
3743
+ styleSheetAddedForTest() {}
3744
+ clear() {
3745
+ this.#u();
3746
+ }
3747
+ #u() {
3748
+ let e = Array.from(this.#n.values()).flat();
3749
+ for (let { presentation: t } of e) t.dispose();
3750
+ this.#n.clear(), this.#r.disposeAll();
3751
+ }
3752
+ }, wn = class extends At {
3753
+ #e;
3754
+ constructor(e, t, n) {
3755
+ super(t, n), this.#e = e;
3756
+ }
3757
+ async uiLocation() {
3758
+ return this.#e;
3759
+ }
3760
+ }, Tn = class {
3761
+ #e;
3762
+ #t;
3763
+ #n;
3764
+ #r;
3765
+ constructor(e, t) {
3766
+ this.#r = e, this.#n = t;
3767
+ }
3768
+ async updateLocationSource(e) {
3769
+ e instanceof D ? await hn.instance().createLiveLocation(e, this.#i.bind(this), this.#n) : e instanceof A ? await Ht.instance().createLiveLocation(e, this.#i.bind(this), this.#n) : e instanceof z && (this.#t || (this.#t = new wn(e, this.#i.bind(this), this.#n), await this.#t.update()));
3770
+ }
3771
+ async #i(e) {
3772
+ this.#e && this.#e.removeMessage(this.#r), e !== this.#t && (this.#e?.removeMessage(this.#r), this.#t?.dispose(), this.#t = e);
3773
+ let t = await e.uiLocation();
3774
+ t && (this.#r.range = M.createFromLocation(t.lineNumber, t.columnNumber || 0), this.#e = t.uiSourceCode, this.#e.addMessage(this.#r));
3775
+ }
3776
+ dispose() {
3777
+ this.#e?.removeMessage(this.#r), this.#t?.dispose();
3778
+ }
3779
+ }, En = /* @__PURE__ */ new WeakMap(), Z = /* @__PURE__ */ new WeakMap(), Q = /* @__PURE__ */ new WeakSet();
3780
+ function $(e) {
3781
+ return new M(e.lineOffset, e.columnOffset, e.endLine, e.endColumn);
3782
+ }
3783
+ function Dn(e) {
3784
+ return new M(e.startLine, e.startColumn, e.endLine, e.endColumn);
3785
+ }
3786
+ var On = class {
3787
+ workspace;
3788
+ #e = /* @__PURE__ */ new Map();
3789
+ #t = null;
3790
+ #n = null;
3791
+ constructor(e, t) {
3792
+ this.workspace = t, e.observeModels(T, this);
3793
+ }
3794
+ get debuggerWorkspaceBinding() {
3795
+ return this.#t;
3796
+ }
3797
+ set debuggerWorkspaceBinding(e) {
3798
+ if (this.#t) throw Error("DebuggerWorkspaceBinding already set");
3799
+ this.#t = e;
3800
+ }
3801
+ get cssWorkspaceBinding() {
3802
+ return this.#n;
3803
+ }
3804
+ set cssWorkspaceBinding(e) {
3805
+ if (this.#n) throw Error("CSSWorkspaceBinding already set");
3806
+ this.#n = e;
3807
+ }
3808
+ modelAdded(e) {
3809
+ let t = new kn(this, e);
3810
+ this.#e.set(e, t);
3811
+ }
3812
+ modelRemoved(e) {
3813
+ let t = this.#e.get(e);
3814
+ t && (t.dispose(), this.#e.delete(e));
3815
+ }
3816
+ infoForTarget(e) {
3817
+ let t = e.model(T);
3818
+ return t && this.#e.get(t) || null;
3819
+ }
3820
+ uiSourceCodeForScript(e) {
3821
+ let t = this.infoForTarget(e.debuggerModel.target());
3822
+ return t ? t.getProject().uiSourceCodeForURL(e.sourceURL) : null;
3823
+ }
3824
+ cssLocationToUILocation(e) {
3825
+ let t = e.header();
3826
+ if (!t) return null;
3827
+ let n = this.infoForTarget(e.cssModel().target());
3828
+ if (!n) return null;
3829
+ let r = n.getProject().uiSourceCodeForURL(e.url);
3830
+ if (!r) return null;
3831
+ let i = En.get(t) ?? Dn(t), a = e.lineNumber + i.startLine - t.startLine, o = e.columnNumber;
3832
+ return e.lineNumber === t.startLine && (o += i.startColumn - t.startColumn), r.uiLocation(a, o);
3833
+ }
3834
+ jsLocationToUILocation(e) {
3835
+ let t = e.script();
3836
+ if (!t) return null;
3837
+ let n = this.infoForTarget(e.debuggerModel.target());
3838
+ if (!n) return null;
3839
+ let r = t.embedderName();
3840
+ if (!r) return null;
3841
+ let i = n.getProject().uiSourceCodeForURL(r);
3842
+ if (!i) return null;
3843
+ let { startLine: a, startColumn: o } = Z.get(t) ?? $(t), { lineNumber: s, columnNumber: c } = e;
3844
+ return s === t.lineOffset && (c += o - t.columnOffset), s += a - t.lineOffset, t.hasSourceURL && (s === 0 && (c += t.columnOffset), s += t.lineOffset), i.uiLocation(s, c);
3845
+ }
3846
+ uiLocationToJSLocations(e, t, n) {
3847
+ if (!Q.has(e)) return [];
3848
+ let r = q.targetForUISourceCode(e);
3849
+ if (!r) return [];
3850
+ let i = r.model(j);
3851
+ if (!i) return [];
3852
+ let a = [];
3853
+ for (let r of i.scripts()) {
3854
+ if (r.embedderName() !== e.url()) continue;
3855
+ let o = Z.get(r) ?? $(r);
3856
+ if (!o.containsLocation(t, n)) continue;
3857
+ let s = t, c = n;
3858
+ r.hasSourceURL && (s -= o.startLine, s === 0 && (c -= o.startColumn)), a.push(i.createRawLocation(r, s, c));
3859
+ }
3860
+ return a;
3861
+ }
3862
+ uiLocationRangeToJSLocationRanges(e, t) {
3863
+ if (!Q.has(e)) return null;
3864
+ let n = q.targetForUISourceCode(e);
3865
+ if (!n) return null;
3866
+ let r = n.model(j);
3867
+ if (!r) return null;
3868
+ let i = [];
3869
+ for (let n of r.scripts()) {
3870
+ if (n.embedderName() !== e.url()) continue;
3871
+ let a = (Z.get(n) ?? $(n)).intersection(t);
3872
+ if (a.isEmpty()) continue;
3873
+ let { startLine: o, startColumn: s, endLine: c, endColumn: l } = a;
3874
+ n.hasSourceURL && (o -= a.startLine, o === 0 && (s -= a.startColumn), c -= a.startLine, c === 0 && (l -= a.startColumn));
3875
+ let u = r.createRawLocation(n, o, s), d = r.createRawLocation(n, c, l);
3876
+ i.push({
3877
+ start: u,
3878
+ end: d
3879
+ });
3880
+ }
3881
+ return i;
3882
+ }
3883
+ getMappedLines(e) {
3884
+ if (!Q.has(e)) return null;
3885
+ let t = q.targetForUISourceCode(e);
3886
+ if (!t) return null;
3887
+ let n = t.model(j);
3888
+ if (!n) return null;
3889
+ let r = /* @__PURE__ */ new Set();
3890
+ for (let t of n.scripts()) {
3891
+ if (t.embedderName() !== e.url()) continue;
3892
+ let { startLine: n, endLine: i } = Z.get(t) ?? $(t);
3893
+ for (let e = n; e <= i; ++e) r.add(e);
3894
+ }
3895
+ return r;
3896
+ }
3897
+ uiLocationToCSSLocations(e) {
3898
+ if (!Q.has(e.uiSourceCode)) return [];
3899
+ let t = q.targetForUISourceCode(e.uiSourceCode);
3900
+ if (!t) return [];
3901
+ let n = t.model(y);
3902
+ return n ? n.createRawLocationsByURL(e.uiSourceCode.url(), e.lineNumber, e.columnNumber) : [];
3903
+ }
3904
+ async functionBoundsAtRawLocation(e) {
3905
+ let t = e.script();
3906
+ if (!t) return null;
3907
+ let n = this.infoForTarget(t.debuggerModel.target());
3908
+ if (!n) return null;
3909
+ let r = t.embedderName();
3910
+ if (!r) return null;
3911
+ let i = n.getProject().uiSourceCodeForURL(r);
3912
+ if (!i) return null;
3913
+ let { lineNumber: a, columnNumber: o } = e;
3914
+ a -= t.lineOffset, a === 0 && (o -= t.columnOffset);
3915
+ let s = t ? await he(t) : null;
3916
+ if (!s) return null;
3917
+ let c = s.text.offsetFromPosition(a, o), l = [];
3918
+ (function e(t) {
3919
+ for (let n of t) c >= n.start && c < n.end && (l.push(n), e(n.children));
3920
+ })([s.scopeTree]);
3921
+ let u = l.findLast((e) => e.kind === P.FUNCTION || e.kind === P.ARROW_FUNCTION);
3922
+ if (!u) return null;
3923
+ let d = s.text.positionFromOffset(u.start), f = s.text.positionFromOffset(u.end);
3924
+ return d.lineNumber += t.lineOffset, d.lineNumber === t.lineOffset && (d.columnNumber += t.columnOffset), f.lineNumber += t.lineOffset, f.lineNumber === t.lineOffset && (f.columnNumber += t.columnOffset), new ut(i, new M(d.lineNumber, d.columnNumber, f.lineNumber, f.columnNumber), "");
3925
+ }
3926
+ resetForTest(e) {
3927
+ let t = e.model(T), n = t ? this.#e.get(t) : null;
3928
+ n && n.resetForTest();
3929
+ }
3930
+ }, kn = class {
3931
+ project;
3932
+ #e = /* @__PURE__ */ new Map();
3933
+ #t;
3934
+ #n;
3935
+ resourceMapping;
3936
+ constructor(e, t) {
3937
+ let n = t.target();
3938
+ this.resourceMapping = e, this.project = new G(e.workspace, "resources:" + n.id(), V.Network, "", !1), q.setTargetForProject(this.project, n);
3939
+ let r = n.model(y);
3940
+ console.assert(!!r), this.#t = r;
3941
+ for (let e of t.frames()) for (let t of e.getResourcesMap().values()) this.addResource(t);
3942
+ this.#n = [
3943
+ t.addEventListener(_e.ResourceAdded, this.resourceAdded, this),
3944
+ t.addEventListener(_e.FrameWillNavigate, this.frameWillNavigate, this),
3945
+ t.addEventListener(_e.FrameDetached, this.frameDetached, this),
3946
+ this.#t.addEventListener(C.StyleSheetChanged, (e) => {
3947
+ this.styleSheetChanged(e);
3948
+ }, this)
3949
+ ];
3950
+ }
3951
+ async styleSheetChanged(e) {
3952
+ let t = this.#t.styleSheetHeaderForId(e.data.styleSheetId);
3953
+ if (!t || !t.isInline || t.isInline && t.isMutable) return;
3954
+ let n = this.#e.get(t.resourceURL());
3955
+ n && await n.styleSheetChanged(t, e.data.edit || null);
3956
+ }
3957
+ acceptsResource(e) {
3958
+ let t = e.resourceType();
3959
+ return !(t !== c.Image && t !== c.Font && t !== c.Document && t !== c.Manifest && t !== c.Fetch && t !== c.XHR || t === c.Image && e.mimeType && !e.mimeType.startsWith("image") || t === c.Font && e.mimeType && !e.mimeType.includes("font") || (t === c.Image || t === c.Font) && d(e.contentURL(), "data:"));
3960
+ }
3961
+ resourceAdded(e) {
3962
+ this.addResource(e.data);
3963
+ }
3964
+ addResource(e) {
3965
+ if (!this.acceptsResource(e)) return;
3966
+ let t = this.#e.get(e.url);
3967
+ t ? t.addResource(e) : (t = new An(this, e), this.#e.set(e.url, t));
3968
+ }
3969
+ removeFrameResources(e) {
3970
+ for (let t of e.resources()) {
3971
+ if (!this.acceptsResource(t)) continue;
3972
+ let e = this.#e.get(t.url);
3973
+ e && (e.resources.size === 1 ? (e.dispose(), this.#e.delete(t.url)) : e.removeResource(t));
3974
+ }
3975
+ }
3976
+ frameWillNavigate(e) {
3977
+ this.removeFrameResources(e.data);
3978
+ }
3979
+ frameDetached(e) {
3980
+ this.removeFrameResources(e.data.frame);
3981
+ }
3982
+ resetForTest() {
3983
+ for (let e of this.#e.values()) e.dispose();
3984
+ this.#e.clear();
3985
+ }
3986
+ dispose() {
3987
+ m(this.#n);
3988
+ for (let e of this.#e.values()) e.dispose();
3989
+ this.#e.clear(), this.project.removeProject();
3990
+ }
3991
+ getProject() {
3992
+ return this.project;
3993
+ }
3994
+ }, An = class {
3995
+ resources;
3996
+ #e;
3997
+ #t;
3998
+ #n = [];
3999
+ #r;
4000
+ #i;
4001
+ constructor(e, t) {
4002
+ this.resources = new Set([t]), this.#e = e.project, this.#r = e.resourceMapping.debuggerWorkspaceBinding, this.#i = e.resourceMapping.cssWorkspaceBinding, this.#t = this.#e.createUISourceCode(t.url, t.contentType()), Q.add(this.#t), t.frameId && q.setInitialFrameAttribution(this.#t, t.frameId), this.#e.addUISourceCodeWithProvider(this.#t, this, Rt(t), t.mimeType), Promise.all([...this.inlineScripts().map((e) => this.#r?.updateLocations(e)), ...this.inlineStyles().map((e) => this.#i?.updateLocations(e))]);
4003
+ }
4004
+ inlineStyles() {
4005
+ let e = q.targetForUISourceCode(this.#t), t = [];
4006
+ if (!e) return t;
4007
+ let n = e.model(y);
4008
+ if (n) for (let e of n.getStyleSheetIdsForURL(this.#t.url())) {
4009
+ let r = n.styleSheetHeaderForId(e);
4010
+ r && t.push(r);
4011
+ }
4012
+ return t;
4013
+ }
4014
+ inlineScripts() {
4015
+ let e = q.targetForUISourceCode(this.#t);
4016
+ if (!e) return [];
4017
+ let t = e.model(j);
4018
+ return t ? t.scripts().filter((e) => e.embedderName() === this.#t.url()) : [];
4019
+ }
4020
+ async styleSheetChanged(e, t) {
4021
+ if (this.#n.push({
4022
+ stylesheet: e,
4023
+ edit: t
4024
+ }), this.#n.length > 1) return;
4025
+ let n = await this.#t.requestContentData();
4026
+ N.isError(n) || await this.innerStyleSheetChanged(n.text), this.#n = [];
4027
+ }
4028
+ async innerStyleSheetChanged(e) {
4029
+ let t = this.inlineScripts(), n = this.inlineStyles(), r = new Me(e);
4030
+ for (let e of this.#n) {
4031
+ let i = e.edit;
4032
+ if (!i) continue;
4033
+ let a = e.stylesheet, o = En.get(a) ?? Dn(a), s = i.oldRange.relativeFrom(o.startLine, o.startColumn), c = i.newRange.relativeFrom(o.startLine, o.startColumn);
4034
+ r = new Me(r.replaceRange(s, i.newText));
4035
+ let l = [];
4036
+ for (let e of t) {
4037
+ let t = Z.get(e) ?? $(e);
4038
+ t.follows(s) && (Z.set(e, t.rebaseAfterTextEdit(s, c)), l.push(this.#r?.updateLocations(e)));
4039
+ }
4040
+ for (let e of n) {
4041
+ let t = En.get(e) ?? Dn(e);
4042
+ t.follows(s) && (En.set(e, t.rebaseAfterTextEdit(s, c)), l.push(this.#i?.updateLocations(e)));
4043
+ }
4044
+ await Promise.all(l);
4045
+ }
4046
+ this.#t.addRevision(r.value());
4047
+ }
4048
+ addResource(e) {
4049
+ this.resources.add(e), e.frameId && q.addFrameAttribution(this.#t, e.frameId);
4050
+ }
4051
+ removeResource(e) {
4052
+ this.resources.delete(e), e.frameId && q.removeFrameAttribution(this.#t, e.frameId);
4053
+ }
4054
+ dispose() {
4055
+ this.#e.removeUISourceCode(this.#t.url()), Promise.all([...this.inlineScripts().map((e) => this.#r?.updateLocations(e)), ...this.inlineStyles().map((e) => this.#i?.updateLocations(e))]);
4056
+ }
4057
+ firstResource() {
4058
+ return console.assert(this.resources.size > 0), this.resources.values().next().value;
4059
+ }
4060
+ contentURL() {
4061
+ return this.firstResource().contentURL();
4062
+ }
4063
+ contentType() {
4064
+ return this.firstResource().contentType();
4065
+ }
4066
+ requestContentData() {
4067
+ return this.firstResource().requestContentData();
4068
+ }
4069
+ searchInContent(e, t, n) {
4070
+ return this.firstResource().searchInContent(e, t, n);
4071
+ }
4072
+ }, jn = class {
4073
+ #e = null;
4074
+ write(e) {
4075
+ this.#e && e.unshift(this.#e), this.#e = new Blob(e, { type: "text/plain" });
4076
+ }
4077
+ read() {
4078
+ return this.readRange();
4079
+ }
4080
+ size() {
4081
+ return this.#e ? this.#e.size : 0;
4082
+ }
4083
+ async readRange(e, t) {
4084
+ if (!this.#e) return s.instance().error("Attempt to read a temp file that was never written"), "";
4085
+ let n = typeof e == "number" || typeof t == "number" ? this.#e.slice(e, t) : this.#e, r = new FileReader();
4086
+ try {
4087
+ await new Promise((e, t) => {
4088
+ r.onloadend = e, r.onerror = t, r.readAsText(n);
4089
+ });
4090
+ } catch (e) {
4091
+ s.instance().error("Failed to read from temp file: " + e.message);
4092
+ }
4093
+ return r.result;
4094
+ }
4095
+ async copyToOutputStream(e, t) {
4096
+ if (!this.#e) return e.close(), null;
4097
+ let n = new yn(this.#e, 10 * 1e3 * 1e3, t);
4098
+ return await n.read(e).then((e) => e ? null : n.error());
4099
+ }
4100
+ remove() {
4101
+ this.#e = null;
4102
+ }
4103
+ };
4104
+ //#endregion
4105
+ export { lt as A, qe as B, mt as C, R as D, ft as E, Qe as F, F as I, Ze as L, dt as M, pt as N, B as O, L as P, Ye as R, H as S, V as T, Ot as _, yn as a, bt as b, mn as c, $t as d, Ht as f, jt as g, Mt as h, xn as i, ct as j, z as k, ln as l, Ft as m, On as n, bn as o, It as p, Sn as r, hn as s, jn as t, nn as u, q as v, ht as w, _t as x, Dt as y, Ke as z };